Skip to main content

JSR

Recommend AXM extensions from a JSR (Deno, TypeScript) package and target JSR packages from an extension.

AXM reads JSR extension metadata from a top-level agentExtensions field in deno.json (deno.jsonc is also read). This is the two-way linking model applied to the JSR ecosystem.

Recommend extensions from a package

Section titled Recommend extensions from a package

Add an agentExtensions array to deno.json. Each entry is an extension reference (@owner/<type>/<name>):

// deno.json
{
  "name": "@agentxm/example-tinyflags",
  "version": "0.1.1",
  "agentExtensions": [{ "ref": "@examples/packs/typescript-jsr-tinyflags" }],
}

Keep recommendations identity-only — omit versionRange. AXM resolves the reference to the newest matching extension version and pins it in the user's axm.lock. Prefer recommending a single pack so you keep one stable reference while its contents evolve.

Add a semver versionRange only when your package genuinely pairs with a bounded major line of the extension:

{
  "agentExtensions": [
    {
      "ref": "@examples/packs/typescript-jsr-tinyflags",
      "versionRange": "^1.0.0",
    },
  ],
}

Target JSR packages from an extension

Section titled Target JSR packages from an extension

On the extension manifest (skill.json, pack.json, subagent.json, …), add a packages array with a JSR purl. JSR package names are scoped, and the leading @ of the scope is percent-encoded as %40; the scope separator stays a literal /:

// pack.json
{
  "packages": [{ "purl": "pkg:jsr/%40agentxm/example-tinyflags" }],
}

Default to identity-only. Add a VERS versionRange with the jsr scheme only when the extension depends on package APIs introduced or removed in a known range:

{
  "packages": [
    {
      "purl": "pkg:jsr/%40agentxm/example-tinyflags",
      "versionRange": "vers:jsr/>=0.1.0|<1.0.0",
    },
  ],
}

When the JSR package recommends an extension through the AgentXM Registry and that extension names the package as a companion via its purl, AXM derives official status for the pair — no extra flag. See Official extensions.

The typescript-jsr-lib and typescript-jsr-app directories in polyglot-examples are the working fixtures for everything above. The package publishes a TinyFlags companion pack and recommends it from the agentExtensions field in deno.json; the pack and each skill declare the package's scoped pkg:jsr purl as an identity-only companion package.