@agentxm/extension-model 0.38.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/dist/src/unstable/agent-capabilities/catalog.d.ts +1820 -96
  2. package/dist/src/unstable/agent-capabilities/catalog.js +2 -1
  3. package/dist/src/unstable/agent-capabilities/data/agents/augment.d.ts +1 -1
  4. package/dist/src/unstable/agent-capabilities/data/agents/augment.js +1 -1
  5. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.d.ts +21 -3
  6. package/dist/src/unstable/agent-capabilities/data/agents/claude-code.js +18 -3
  7. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.d.ts +1 -1
  8. package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.js +1 -1
  9. package/dist/src/unstable/agent-capabilities/data/agents/codex.d.ts +3 -2
  10. package/dist/src/unstable/agent-capabilities/data/agents/codex.js +3 -2
  11. package/dist/src/unstable/agent-capabilities/data/agents/cursor.d.ts +186 -10
  12. package/dist/src/unstable/agent-capabilities/data/agents/cursor.js +223 -10
  13. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.d.ts +1 -1
  14. package/dist/src/unstable/agent-capabilities/data/agents/deepagents.js +1 -1
  15. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.d.ts +1 -1
  16. package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.js +1 -1
  17. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.d.ts +19 -1
  18. package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.js +16 -1
  19. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.d.ts +1 -1
  20. package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.js +1 -1
  21. package/dist/src/unstable/agent-capabilities/data/agents/index.d.ts +1 -0
  22. package/dist/src/unstable/agent-capabilities/data/agents/index.js +1 -0
  23. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.d.ts +1 -1
  24. package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.js +1 -1
  25. package/dist/src/unstable/agent-capabilities/data/agents/opencode.d.ts +2 -1
  26. package/dist/src/unstable/agent-capabilities/data/agents/opencode.js +2 -1
  27. package/dist/src/unstable/agent-capabilities/data/agents/pi.d.ts +105 -6
  28. package/dist/src/unstable/agent-capabilities/data/agents/pi.js +77 -6
  29. package/dist/src/unstable/agent-capabilities/data/agents/qoder.d.ts +1 -1
  30. package/dist/src/unstable/agent-capabilities/data/agents/qoder.js +1 -1
  31. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.d.ts +1 -1
  32. package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.js +1 -1
  33. package/dist/src/unstable/agent-capabilities/data/agents/roo.d.ts +1 -1
  34. package/dist/src/unstable/agent-capabilities/data/agents/roo.js +1 -1
  35. package/dist/src/unstable/agent-capabilities/data/agents/vscode.d.ts +263 -0
  36. package/dist/src/unstable/agent-capabilities/data/agents/vscode.js +139 -0
  37. package/dist/src/unstable/agent-capabilities/derive.d.ts +14 -22
  38. package/dist/src/unstable/agent-capabilities/derive.js +40 -51
  39. package/dist/src/unstable/agent-capabilities/identity.d.ts +3 -3
  40. package/dist/src/unstable/agent-capabilities/identity.js +1 -0
  41. package/dist/src/unstable/agent-capabilities/schema.d.ts +50 -12
  42. package/dist/src/unstable/agent-capabilities/schema.js +10 -2
  43. package/dist/src/unstable/agents/types.d.ts +1 -1
  44. package/dist/src/unstable/extensions/common.d.ts +17 -3
  45. package/dist/src/unstable/extensions/common.js +8 -8
  46. package/dist/src/unstable/extensions/installable-types.d.ts +2 -2
  47. package/dist/src/unstable/extensions/refs/mcp-server.d.ts +16 -2
  48. package/dist/src/unstable/extensions/refs/mcp-server.js +12 -1
  49. package/dist/src/unstable/extensions/refs/ref-base.d.ts +17 -2
  50. package/dist/src/unstable/extensions/refs/ref-base.js +16 -1
  51. package/dist/src/unstable/extensions/refs/skill.d.ts +14 -2
  52. package/dist/src/unstable/extensions/refs/skill.js +0 -9
  53. package/dist/src/unstable/hooks/manifest-schema.d.ts +221 -105
  54. package/dist/src/unstable/hooks/manifest-schema.js +271 -87
  55. package/dist/src/unstable/hooks/resolution.d.ts +24 -0
  56. package/dist/src/unstable/hooks/resolution.js +99 -0
  57. package/dist/src/unstable/sources/http-artifact.d.ts +24 -0
  58. package/dist/src/unstable/sources/http-artifact.js +46 -0
  59. package/dist/src/unstable/sources/printer.js +14 -1
  60. package/dist/src/unstable/sources/source-host-provider.d.ts +3 -0
  61. package/dist/src/unstable/sources/types.d.ts +16 -6
  62. package/dist/src/unstable/sources/types.js +2 -0
  63. package/dist/src/unstable/subagents/manifest-schema.d.ts +48 -18
  64. package/dist/src/unstable/subagents/manifest-schema.js +85 -18
  65. package/package.json +10 -2
@@ -19,7 +19,7 @@ import type { Handle } from "../extensions/handle.js";
19
19
  *
20
20
  * @experimental
21
21
  */
22
- export declare const SourceTypeSchema: Schema.Literals<readonly ["git", "registry", "local", "inline", "workspace"]>;
22
+ export declare const SourceTypeSchema: Schema.Literals<readonly ["git", "http", "registry", "local", "inline", "workspace"]>;
23
23
  /**
24
24
  * Inferred type for SourceTypeSchema.
25
25
  *
@@ -36,7 +36,7 @@ export type SourceType = Schema.Schema.Type<typeof SourceTypeSchema>;
36
36
  *
37
37
  * @experimental This API is unstable and may change without notice.
38
38
  */
39
- export declare const RefTypeSchema: Schema.Literals<readonly ["git-hosted", "registry", "local", "workspace"]>;
39
+ export declare const RefTypeSchema: Schema.Literals<readonly ["git-hosted", "http", "registry", "local", "workspace"]>;
40
40
  /**
41
41
  * Inferred type for RefTypeSchema.
42
42
  *
@@ -73,7 +73,10 @@ export interface WorkspaceSourceHost {
73
73
  readonly type: "workspace";
74
74
  }
75
75
  /** @experimental */
76
- export type SourceHost = GitSourceHost | RegistrySourceHost | LocalSourceHost | InlineSourceHost | WorkspaceSourceHost;
76
+ export interface HttpSourceHost {
77
+ readonly type: "http";
78
+ }
79
+ export type SourceHost = HttpSourceHost | GitSourceHost | RegistrySourceHost | LocalSourceHost | InlineSourceHost | WorkspaceSourceHost;
77
80
  /** @experimental */
78
81
  export interface GitSourceParams {
79
82
  readonly type: "git";
@@ -108,7 +111,14 @@ export interface WorkspaceSourceParams {
108
111
  readonly name: ExtensionName;
109
112
  }
110
113
  /** @experimental */
111
- export type SourceParams = GitSourceParams | RegistrySourceParams | LocalSourceParams | InlineSourceParams | WorkspaceSourceParams;
114
+ export interface HttpSourceParams {
115
+ readonly type: "http";
116
+ readonly url: URL;
117
+ readonly kind: "skill-md" | "archive" | "index";
118
+ readonly entry?: string;
119
+ }
120
+ export type HttpSource = HttpSourceHost & HttpSourceParams;
121
+ export type SourceParams = HttpSourceParams | GitSourceParams | RegistrySourceParams | LocalSourceParams | InlineSourceParams | WorkspaceSourceParams;
112
122
  /** @experimental */
113
123
  export type InlineSource = InlineSourceHost & InlineSourceParams;
114
124
  /** @experimental */
@@ -120,11 +130,11 @@ export type LocalSource = LocalSourceHost & LocalSourceParams;
120
130
  /** @experimental */
121
131
  export type WorkspaceSource = WorkspaceSourceHost & WorkspaceSourceParams;
122
132
  /** @experimental */
123
- export type Source = GitSource | RegistrySource | LocalSource | WorkspaceSource;
133
+ export type Source = HttpSource | GitSource | RegistrySource | LocalSource | WorkspaceSource;
124
134
  /** All git-based sources. Hosted-provider syntax expands to this source. @experimental */
125
135
  export type GitBasedSource = GitSource;
126
136
  /** Sources that require host configuration from settings. @experimental */
127
137
  export type ConfiguredSourceHost = RegistrySourceHost;
128
138
  /** Sources that are self-describing (no settings config needed). @experimental */
129
- export type SelfDescribingSourceHost = GitSourceHost | LocalSourceHost;
139
+ export type SelfDescribingSourceHost = GitSourceHost | LocalSourceHost | HttpSourceHost;
130
140
  //# sourceMappingURL=types.d.ts.map
@@ -21,6 +21,7 @@ import * as Schema from "effect/Schema";
21
21
  */
22
22
  export const SourceTypeSchema = Schema.Literals([
23
23
  "git",
24
+ "http",
24
25
  "registry",
25
26
  "local",
26
27
  "inline",
@@ -45,6 +46,7 @@ export const SourceTypeSchema = Schema.Literals([
45
46
  */
46
47
  export const RefTypeSchema = Schema.Literals([
47
48
  "git-hosted",
49
+ "http",
48
50
  "registry",
49
51
  "local",
50
52
  "workspace",
@@ -1,8 +1,4 @@
1
- /**
2
- * Subagent manifest schema definition.
3
- *
4
- * @experimental This API is unstable and may change without notice.
5
- */
1
+ /** Subagent packages declare portable instructions and explicit native implementations. */
6
2
  import * as Schema from "effect/Schema";
7
3
  /**
8
4
  * Filename for subagent manifest files.
@@ -16,24 +12,57 @@ export declare const MANIFEST_FILENAME = "subagent.json";
16
12
  * @experimental This API is unstable and may change without notice.
17
13
  */
18
14
  export declare const MANIFEST_SCHEMA_URL = "https://axm.sh/schemas/subagent.schema.json";
19
- /**
20
- * Schema for subagent manifest files (subagent.json).
21
- *
22
- * The manifest carries registry-facing identity and metadata. Fields like
23
- * `model`, `toolAccess`, and `background` live (if at all) in the content
24
- * file's frontmatter and are passed through to agent-native files verbatim;
25
- * the manifest does not mirror them.
26
- *
27
- * @experimental This API is unstable and may change without notice.
28
- */
15
+ /** A contained, portable package file reference, never a URL or host path. */
16
+ export declare const SubagentSourcePathSchema: Schema.String;
17
+ /** Native names are file stems and need not equal the package identity. */
18
+ export declare const SubagentNativeNameSchema: Schema.String;
19
+ export declare const SubagentConfigurationSchema: Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>;
20
+ export declare const SubagentCoreSchema: Schema.Struct<{
21
+ readonly instructions: Schema.String;
22
+ readonly name: Schema.optional<Schema.String>;
23
+ }>;
24
+ export declare const SubagentImplementationSchema: Schema.Union<readonly [Schema.Struct<{
25
+ readonly kind: Schema.Literal<"customized">;
26
+ readonly source: Schema.optional<Schema.Never>;
27
+ readonly configuration: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
28
+ readonly instructions: Schema.optional<Schema.Struct<{
29
+ readonly mode: Schema.Literals<readonly ["append", "replace"]>;
30
+ readonly source: Schema.String;
31
+ }>>;
32
+ }>, Schema.Struct<{
33
+ readonly kind: Schema.Literal<"native">;
34
+ readonly source: Schema.String;
35
+ readonly configuration: Schema.optional<Schema.Never>;
36
+ readonly instructions: Schema.optional<Schema.Never>;
37
+ }>]>;
29
38
  export declare const SubagentManifestSchema: Schema.Struct<{
30
- readonly type: Schema.Literal<"subagent">;
31
- readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
32
39
  readonly enhances: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
33
40
  readonly requires: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
34
- readonly fallback: Schema.optional<Schema.Literals<readonly ["auto", "none"]>>;
35
41
  readonly recommendedPacks: Schema.optional<Schema.$Array<Schema.brand<Schema.NonEmptyString, "PackSpec">>>;
36
42
  readonly standalone: Schema.optional<Schema.Boolean>;
43
+ readonly type: Schema.Literal<"subagent">;
44
+ readonly name: Schema.brand<Schema.NonEmptyString, "ExtensionName">;
45
+ readonly core: Schema.optional<Schema.Struct<{
46
+ readonly instructions: Schema.String;
47
+ readonly name: Schema.optional<Schema.String>;
48
+ }>>;
49
+ readonly implementations: Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{
50
+ readonly kind: Schema.Literal<"customized">;
51
+ readonly source: Schema.optional<Schema.Never>;
52
+ readonly configuration: Schema.optional<Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>;
53
+ readonly instructions: Schema.optional<Schema.Struct<{
54
+ readonly mode: Schema.Literals<readonly ["append", "replace"]>;
55
+ readonly source: Schema.String;
56
+ }>>;
57
+ }>, Schema.Struct<{
58
+ readonly kind: Schema.Literal<"native">;
59
+ readonly source: Schema.String;
60
+ readonly configuration: Schema.optional<Schema.Never>;
61
+ readonly instructions: Schema.optional<Schema.Never>;
62
+ }>]>>>;
63
+ readonly fallback: Schema.optional<Schema.Never>;
64
+ readonly agentOverrides: Schema.optional<Schema.Never>;
65
+ readonly agents: Schema.optional<Schema.Never>;
37
66
  readonly publish: Schema.optional<Schema.Struct<{
38
67
  readonly visibility: Schema.optional<Schema.Literals<readonly ["public", "private"]>>;
39
68
  readonly ignore: Schema.optional<Schema.$Array<Schema.NonEmptyString>>;
@@ -78,4 +107,5 @@ export declare const SubagentManifestSchema: Schema.Struct<{
78
107
  * @experimental This API is unstable and may change without notice.
79
108
  */
80
109
  export type SubagentManifest = Schema.Schema.Type<typeof SubagentManifestSchema>;
110
+ export type SubagentImplementation = Schema.Schema.Type<typeof SubagentImplementationSchema>;
81
111
  //# sourceMappingURL=manifest-schema.d.ts.map
@@ -1,9 +1,6 @@
1
- /**
2
- * Subagent manifest schema definition.
3
- *
4
- * @experimental This API is unstable and may change without notice.
5
- */
1
+ /** Subagent packages declare portable instructions and explicit native implementations. */
6
2
  import * as Schema from "effect/Schema";
3
+ import { AgentIdSchema } from "../agent-capabilities/identity.js";
7
4
  import { CommonManifestBaseFields, ExtensionNameSchema, NonPackManifestFields, } from "../extensions/common.js";
8
5
  /**
9
6
  * Filename for subagent manifest files.
@@ -17,27 +14,97 @@ export const MANIFEST_FILENAME = "subagent.json";
17
14
  * @experimental This API is unstable and may change without notice.
18
15
  */
19
16
  export const MANIFEST_SCHEMA_URL = "https://axm.sh/schemas/subagent.schema.json";
20
- /**
21
- * Schema for subagent manifest files (subagent.json).
22
- *
23
- * The manifest carries registry-facing identity and metadata. Fields like
24
- * `model`, `toolAccess`, and `background` live (if at all) in the content
25
- * file's frontmatter and are passed through to agent-native files verbatim;
26
- * the manifest does not mirror them.
27
- *
28
- * @experimental This API is unstable and may change without notice.
29
- */
17
+ /** A contained, portable package file reference, never a URL or host path. */
18
+ export const SubagentSourcePathSchema = Schema.String.check(Schema.isPattern(/^(?!\/)(?!.*(?:^|\/)\.{1,2}(?:\/|$))(?!.*\/\/)[^\\\p{Cc}:]+$/u), Schema.makeFilter((value) => !value.endsWith("/"), {
19
+ message: "Expected a contained package-relative file path",
20
+ toJsonSchema: () => ({ not: { pattern: "/$" } }),
21
+ })).annotate({
22
+ description: "Package-relative regular file path; traversal and host paths are forbidden.",
23
+ });
24
+ /** Native names are file stems and need not equal the package identity. */
25
+ export const SubagentNativeNameSchema = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9_-]*$/)).annotate({ description: "Native agent name, independent of the AXM package name." });
26
+ const safeConfigurationKey = Schema.String.check(Schema.isPattern(/^(?!(?:name|description|instructions|developer_instructions|prompt|systemPrompt|system_prompt|roleDefinition|agentOverrides|fallback|__proto__|prototype|constructor)$).+$/));
27
+ export const SubagentConfigurationSchema = Schema.Record(Schema.String, Schema.Json)
28
+ .check(Schema.isPropertyNames(safeConfigurationKey))
29
+ .annotate({
30
+ description: "Opaque native configuration; identity and instruction fields belong to the core or a complete native implementation.",
31
+ });
32
+ export const SubagentCoreSchema = Schema.Struct({
33
+ instructions: SubagentSourcePathSchema,
34
+ name: Schema.optional(SubagentNativeNameSchema),
35
+ });
36
+ export const SubagentImplementationSchema = Schema.Union([
37
+ Schema.Struct({
38
+ kind: Schema.Literal("customized"),
39
+ source: Schema.optional(Schema.Never),
40
+ configuration: Schema.optional(SubagentConfigurationSchema),
41
+ instructions: Schema.optional(Schema.Struct({
42
+ mode: Schema.Literals(["append", "replace"]),
43
+ source: SubagentSourcePathSchema,
44
+ })),
45
+ }),
46
+ Schema.Struct({
47
+ kind: Schema.Literal("native"),
48
+ source: SubagentSourcePathSchema,
49
+ configuration: Schema.optional(Schema.Never),
50
+ instructions: Schema.optional(Schema.Never),
51
+ }),
52
+ ]);
30
53
  export const SubagentManifestSchema = Schema.Struct({
31
54
  $schema: Schema.optional(Schema.String),
32
55
  ...CommonManifestBaseFields,
33
- ...NonPackManifestFields,
56
+ enhances: NonPackManifestFields.enhances,
57
+ requires: NonPackManifestFields.requires,
58
+ recommendedPacks: NonPackManifestFields.recommendedPacks,
59
+ standalone: NonPackManifestFields.standalone,
34
60
  type: Schema.Literal("subagent"),
35
61
  name: ExtensionNameSchema.pipe(Schema.annotateKey({ messageMissingKey: "subagent name is required" }), Schema.annotate({
36
62
  description: "Short name for this subagent within its owner namespace. Combined with owner, forms the FQN @owner/subagents/<name>.",
37
63
  })),
38
- }).annotate({
64
+ core: Schema.optional(SubagentCoreSchema),
65
+ implementations: Schema.optional(Schema.Record(Schema.String, SubagentImplementationSchema).check(Schema.isPropertyNames(AgentIdSchema))),
66
+ // Reject obsolete contracts even at readers that otherwise discard excess fields.
67
+ fallback: Schema.optional(Schema.Never),
68
+ agentOverrides: Schema.optional(Schema.Never),
69
+ agents: Schema.optional(Schema.Never),
70
+ })
71
+ .check(Schema.makeFilter((manifest) => {
72
+ const implementations = Object.values(manifest.implementations ?? {});
73
+ if (manifest.core === undefined) {
74
+ if (implementations.some((implementation) => implementation.kind === "customized")) {
75
+ return "A customized implementation requires a portable core";
76
+ }
77
+ if (!implementations.some((implementation) => implementation.kind === "native")) {
78
+ return "A subagent requires a portable core or at least one native implementation";
79
+ }
80
+ }
81
+ else if (manifest.description === undefined || manifest.description.trim().length === 0) {
82
+ return "A portable core requires a nonempty manifest description";
83
+ }
84
+ return true;
85
+ }, {
86
+ toJsonSchema: () => ({
87
+ anyOf: [
88
+ {
89
+ required: ["core", "description"],
90
+ properties: { description: { type: "string", pattern: "\\S" } },
91
+ },
92
+ {
93
+ not: { required: ["core"] },
94
+ required: ["implementations"],
95
+ properties: {
96
+ implementations: {
97
+ minProperties: 1,
98
+ additionalProperties: { properties: { kind: { const: "native" } } },
99
+ },
100
+ },
101
+ },
102
+ ],
103
+ }),
104
+ }))
105
+ .annotate({
39
106
  identifier: "SubagentManifest",
40
107
  title: "Subagent Manifest",
41
- description: "Extension manifest file for subagent. Carries the registry-facing identity, version, and metadata.",
108
+ description: "One subagent package with portable instructions, explicit per-agent customization, or complete native implementations.",
42
109
  });
43
110
  //# sourceMappingURL=manifest-schema.js.map
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "description": "Shared AgentXM extension model: identities, manifests, version constraints, and agent capabilities. Unstable and unsupported — use the axm.sh CLI.",
13
13
  "devDependencies": {
14
- "@agentxm/specification-metadata": "0.38.0",
14
+ "@agentxm/specification-metadata": "0.39.0",
15
15
  "@effect/vitest": "4.0.0-rc.117",
16
16
  "@fast-check/vitest": "^0.5.0",
17
17
  "@types/semver": "^7.8.0",
@@ -283,6 +283,14 @@
283
283
  "./unstable/extensions/name-patterns": {
284
284
  "types": "./dist/src/unstable/extensions/name-patterns.d.ts",
285
285
  "default": "./dist/src/unstable/extensions/name-patterns.js"
286
+ },
287
+ "./unstable/sources/http-artifact": {
288
+ "types": "./dist/src/unstable/sources/http-artifact.d.ts",
289
+ "default": "./dist/src/unstable/sources/http-artifact.js"
290
+ },
291
+ "./unstable/hooks/resolution": {
292
+ "types": "./dist/src/unstable/hooks/resolution.d.ts",
293
+ "default": "./dist/src/unstable/hooks/resolution.js"
286
294
  }
287
295
  },
288
296
  "files": [
@@ -305,5 +313,5 @@
305
313
  },
306
314
  "sideEffects": false,
307
315
  "type": "module",
308
- "version": "0.38.0"
316
+ "version": "0.39.0"
309
317
  }