@agentxm/extension-model 0.35.0 → 0.37.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.
- package/dist/src/unstable/agent-capabilities/catalog.d.ts +19197 -4977
- package/dist/src/unstable/agent-capabilities/data/agents/adal.d.ts +31 -3
- package/dist/src/unstable/agent-capabilities/data/agents/adal.js +27 -3
- package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.d.ts +19 -2
- package/dist/src/unstable/agent-capabilities/data/agents/aider-desk.js +17 -2
- package/dist/src/unstable/agent-capabilities/data/agents/amp.d.ts +56 -4
- package/dist/src/unstable/agent-capabilities/data/agents/amp.js +52 -4
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity-cli.d.ts +68 -6
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity-cli.js +61 -6
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity.d.ts +179 -53
- package/dist/src/unstable/agent-capabilities/data/agents/antigravity.js +152 -42
- package/dist/src/unstable/agent-capabilities/data/agents/augment.d.ts +176 -64
- package/dist/src/unstable/agent-capabilities/data/agents/augment.js +162 -64
- package/dist/src/unstable/agent-capabilities/data/agents/chatgpt.d.ts +3 -1
- package/dist/src/unstable/agent-capabilities/data/agents/chatgpt.js +3 -1
- package/dist/src/unstable/agent-capabilities/data/agents/claude-ai.d.ts +2 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-ai.js +2 -0
- package/dist/src/unstable/agent-capabilities/data/agents/claude-code.d.ts +238 -75
- package/dist/src/unstable/agent-capabilities/data/agents/claude-code.js +222 -78
- package/dist/src/unstable/agent-capabilities/data/agents/cline.d.ts +115 -55
- package/dist/src/unstable/agent-capabilities/data/agents/cline.js +100 -47
- package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.d.ts +140 -63
- package/dist/src/unstable/agent-capabilities/data/agents/codearts-agent.js +123 -52
- package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.d.ts +211 -76
- package/dist/src/unstable/agent-capabilities/data/agents/codebuddy.js +197 -79
- package/dist/src/unstable/agent-capabilities/data/agents/codestudio.d.ts +46 -4
- package/dist/src/unstable/agent-capabilities/data/agents/codestudio.js +40 -4
- package/dist/src/unstable/agent-capabilities/data/agents/codex.d.ts +242 -68
- package/dist/src/unstable/agent-capabilities/data/agents/codex.js +213 -59
- package/dist/src/unstable/agent-capabilities/data/agents/command-code.d.ts +169 -68
- package/dist/src/unstable/agent-capabilities/data/agents/command-code.js +156 -64
- package/dist/src/unstable/agent-capabilities/data/agents/continue.d.ts +79 -7
- package/dist/src/unstable/agent-capabilities/data/agents/continue.js +75 -7
- package/dist/src/unstable/agent-capabilities/data/agents/cortex.d.ts +116 -9
- package/dist/src/unstable/agent-capabilities/data/agents/cortex.js +110 -9
- package/dist/src/unstable/agent-capabilities/data/agents/cowork.d.ts +4 -0
- package/dist/src/unstable/agent-capabilities/data/agents/cowork.js +4 -0
- package/dist/src/unstable/agent-capabilities/data/agents/crush.d.ts +165 -60
- package/dist/src/unstable/agent-capabilities/data/agents/crush.js +151 -54
- package/dist/src/unstable/agent-capabilities/data/agents/cursor.d.ts +230 -55
- package/dist/src/unstable/agent-capabilities/data/agents/cursor.js +205 -51
- package/dist/src/unstable/agent-capabilities/data/agents/deepagents.d.ts +100 -5
- package/dist/src/unstable/agent-capabilities/data/agents/deepagents.js +86 -5
- package/dist/src/unstable/agent-capabilities/data/agents/devin.d.ts +224 -77
- package/dist/src/unstable/agent-capabilities/data/agents/devin.js +203 -70
- package/dist/src/unstable/agent-capabilities/data/agents/dexto.d.ts +28 -2
- package/dist/src/unstable/agent-capabilities/data/agents/dexto.js +26 -2
- package/dist/src/unstable/agent-capabilities/data/agents/droid.d.ts +93 -8
- package/dist/src/unstable/agent-capabilities/data/agents/droid.js +87 -8
- package/dist/src/unstable/agent-capabilities/data/agents/firebender.d.ts +119 -8
- package/dist/src/unstable/agent-capabilities/data/agents/firebender.js +112 -13
- package/dist/src/unstable/agent-capabilities/data/agents/forgecode.d.ts +94 -6
- package/dist/src/unstable/agent-capabilities/data/agents/forgecode.js +82 -6
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-app.d.ts +2 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-app.js +2 -0
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.d.ts +218 -56
- package/dist/src/unstable/agent-capabilities/data/agents/gemini-cli.js +193 -55
- package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.d.ts +201 -66
- package/dist/src/unstable/agent-capabilities/data/agents/github-copilot-cli.js +188 -69
- package/dist/src/unstable/agent-capabilities/data/agents/goose.d.ts +37 -3
- package/dist/src/unstable/agent-capabilities/data/agents/goose.js +34 -5
- package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.d.ts +98 -6
- package/dist/src/unstable/agent-capabilities/data/agents/grok-cli.js +83 -6
- package/dist/src/unstable/agent-capabilities/data/agents/hermes.d.ts +105 -42
- package/dist/src/unstable/agent-capabilities/data/agents/hermes.js +87 -28
- package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.d.ts +173 -61
- package/dist/src/unstable/agent-capabilities/data/agents/ibm-bob.js +152 -52
- package/dist/src/unstable/agent-capabilities/data/agents/iflow-cli.d.ts +47 -5
- package/dist/src/unstable/agent-capabilities/data/agents/iflow-cli.js +41 -5
- package/dist/src/unstable/agent-capabilities/data/agents/junie.d.ts +130 -42
- package/dist/src/unstable/agent-capabilities/data/agents/junie.js +121 -39
- package/dist/src/unstable/agent-capabilities/data/agents/kilo.d.ts +187 -65
- package/dist/src/unstable/agent-capabilities/data/agents/kilo.js +169 -62
- package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.d.ts +147 -60
- package/dist/src/unstable/agent-capabilities/data/agents/kimi-cli.js +134 -53
- package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.d.ts +138 -50
- package/dist/src/unstable/agent-capabilities/data/agents/kiro-cli.js +121 -39
- package/dist/src/unstable/agent-capabilities/data/agents/kode.d.ts +45 -5
- package/dist/src/unstable/agent-capabilities/data/agents/kode.js +39 -5
- package/dist/src/unstable/agent-capabilities/data/agents/lingma.d.ts +19 -2
- package/dist/src/unstable/agent-capabilities/data/agents/lingma.js +17 -2
- package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.d.ts +16 -1
- package/dist/src/unstable/agent-capabilities/data/agents/mcpjam.js +14 -1
- package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.d.ts +93 -8
- package/dist/src/unstable/agent-capabilities/data/agents/mistral-vibe.js +87 -8
- package/dist/src/unstable/agent-capabilities/data/agents/mux.d.ts +46 -4
- package/dist/src/unstable/agent-capabilities/data/agents/mux.js +40 -4
- package/dist/src/unstable/agent-capabilities/data/agents/neovate.d.ts +111 -59
- package/dist/src/unstable/agent-capabilities/data/agents/neovate.js +97 -50
- package/dist/src/unstable/agent-capabilities/data/agents/ona.d.ts +41 -4
- package/dist/src/unstable/agent-capabilities/data/agents/ona.js +37 -4
- package/dist/src/unstable/agent-capabilities/data/agents/openclaw.d.ts +14 -1
- package/dist/src/unstable/agent-capabilities/data/agents/openclaw.js +12 -1
- package/dist/src/unstable/agent-capabilities/data/agents/opencode.d.ts +286 -14
- package/dist/src/unstable/agent-capabilities/data/agents/opencode.js +261 -16
- package/dist/src/unstable/agent-capabilities/data/agents/openhands.d.ts +53 -4
- package/dist/src/unstable/agent-capabilities/data/agents/openhands.js +49 -4
- package/dist/src/unstable/agent-capabilities/data/agents/pi.d.ts +69 -2
- package/dist/src/unstable/agent-capabilities/data/agents/pi.js +56 -2
- package/dist/src/unstable/agent-capabilities/data/agents/pochi.d.ts +96 -44
- package/dist/src/unstable/agent-capabilities/data/agents/pochi.js +81 -33
- package/dist/src/unstable/agent-capabilities/data/agents/qoder-cn.d.ts +70 -6
- package/dist/src/unstable/agent-capabilities/data/agents/qoder-cn.js +75 -7
- package/dist/src/unstable/agent-capabilities/data/agents/qoder.d.ts +196 -72
- package/dist/src/unstable/agent-capabilities/data/agents/qoder.js +182 -72
- package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.d.ts +169 -57
- package/dist/src/unstable/agent-capabilities/data/agents/qwen-code.js +154 -56
- package/dist/src/unstable/agent-capabilities/data/agents/replit.d.ts +16 -1
- package/dist/src/unstable/agent-capabilities/data/agents/replit.js +14 -1
- package/dist/src/unstable/agent-capabilities/data/agents/roo.d.ts +60 -7
- package/dist/src/unstable/agent-capabilities/data/agents/roo.js +51 -7
- package/dist/src/unstable/agent-capabilities/data/agents/rovodev.d.ts +70 -6
- package/dist/src/unstable/agent-capabilities/data/agents/rovodev.js +64 -6
- package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.d.ts +92 -7
- package/dist/src/unstable/agent-capabilities/data/agents/tabnine-cli.js +85 -7
- package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.d.ts +72 -33
- package/dist/src/unstable/agent-capabilities/data/agents/trae-cn.js +64 -29
- package/dist/src/unstable/agent-capabilities/data/agents/trae.d.ts +72 -33
- package/dist/src/unstable/agent-capabilities/data/agents/trae.js +64 -29
- package/dist/src/unstable/agent-capabilities/data/agents/warp.d.ts +31 -3
- package/dist/src/unstable/agent-capabilities/data/agents/warp.js +27 -3
- package/dist/src/unstable/agent-capabilities/data/agents/windsurf.d.ts +126 -41
- package/dist/src/unstable/agent-capabilities/data/agents/windsurf.js +110 -39
- package/dist/src/unstable/agent-capabilities/data/agents/zed.d.ts +31 -3
- package/dist/src/unstable/agent-capabilities/data/agents/zed.js +27 -3
- package/dist/src/unstable/agent-capabilities/data/agents/zencoder.d.ts +41 -5
- package/dist/src/unstable/agent-capabilities/data/agents/zencoder.js +37 -5
- package/dist/src/unstable/agent-capabilities/data/agents/zenflow.d.ts +34 -2
- package/dist/src/unstable/agent-capabilities/data/agents/zenflow.js +31 -4
- package/dist/src/unstable/agent-capabilities/derive.js +37 -60
- package/dist/src/unstable/agent-capabilities/identity.d.ts +2 -0
- package/dist/src/unstable/agent-capabilities/identity.js +3 -0
- package/dist/src/unstable/agent-capabilities/index.d.ts +2 -2
- package/dist/src/unstable/agent-capabilities/index.js +2 -2
- package/dist/src/unstable/agent-capabilities/schema.d.ts +769 -761
- package/dist/src/unstable/agent-capabilities/schema.js +188 -91
- package/dist/src/unstable/agents/registry.d.ts +3 -17
- package/dist/src/unstable/agents/registry.js +2 -29
- package/dist/src/unstable/agents/types.d.ts +19 -53
- package/dist/src/unstable/agents/types.js +2 -4
- package/dist/src/unstable/extensions/common.d.ts +1 -2
- package/dist/src/unstable/extensions/common.js +1 -2
- package/dist/src/unstable/extensions/name-patterns.d.ts +5 -3
- package/dist/src/unstable/extensions/name-patterns.js +31 -32
- package/dist/src/unstable/path-types.d.ts +6 -0
- package/dist/src/unstable/path-types.js +20 -0
- package/dist/src/unstable/sources/forge-grammar.d.ts +46 -10
- package/dist/src/unstable/sources/forge-grammar.js +153 -33
- package/dist/src/unstable/sources/parser.d.ts +3 -5
- package/dist/src/unstable/sources/parser.js +14 -31
- package/dist/src/unstable/sources/printer.js +16 -35
- package/dist/src/unstable/sources/types.d.ts +1 -93
- package/dist/src/unstable/sources/types.js +1 -48
- package/package.json +3 -3
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
*
|
|
40
40
|
* @experimental This API is unstable and may change without notice.
|
|
41
41
|
*/
|
|
42
|
-
import * as Effect from "effect/Effect";
|
|
43
42
|
import * as Schema from "effect/Schema";
|
|
44
43
|
import { DocLinkSchema, LeafExtensionTypeSchema, UrlSchema, } from "../extension-types/schema.js";
|
|
45
44
|
import {} from "../extensions/common.js";
|
|
@@ -76,31 +75,62 @@ export const ConventionSchema = Schema.Literals(["universal", "vendor", "hosted"
|
|
|
76
75
|
examples: ["universal", "vendor", "hosted"],
|
|
77
76
|
});
|
|
78
77
|
/** @experimental This API is unstable and may change without notice. */
|
|
79
|
-
export const SkillReadPathStatusSchema = Schema.Literals([
|
|
80
|
-
"canonical",
|
|
81
|
-
"compat",
|
|
82
|
-
"deprecated",
|
|
83
|
-
]).annotate({
|
|
84
|
-
identifier: "SkillReadPathStatus",
|
|
85
|
-
title: "Skill Read Path Status",
|
|
86
|
-
description: "How an additional native Skill directory relates to the agent's primary path.",
|
|
87
|
-
});
|
|
88
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
89
|
-
export const SkillReadPathSchema = Schema.Struct({
|
|
90
|
-
path: Schema.NonEmptyString,
|
|
91
|
-
status: SkillReadPathStatusSchema,
|
|
92
|
-
}).annotate({
|
|
93
|
-
identifier: "SkillReadPath",
|
|
94
|
-
title: "Skill Read Path",
|
|
95
|
-
description: "An additional directory an agent reads for Skill discovery but AXM never writes.",
|
|
96
|
-
});
|
|
97
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
98
78
|
export const ScopeSchema = Schema.Literals(["user", "project"]).annotate({
|
|
99
79
|
identifier: "Scope",
|
|
100
80
|
title: "Scope",
|
|
101
81
|
description: "Where a capability can be configured.",
|
|
102
82
|
examples: ["user", "project"],
|
|
103
83
|
});
|
|
84
|
+
/** A declared reader path; physical resolution and ownership belong to the workspace. */
|
|
85
|
+
const NativeReadLocationFields = {
|
|
86
|
+
scope: ScopeSchema,
|
|
87
|
+
root: Schema.Literals(["project", "home", "xdg-config"]),
|
|
88
|
+
path: Schema.NonEmptyString,
|
|
89
|
+
configRootRelativePath: Schema.optionalKey(Schema.NonEmptyString),
|
|
90
|
+
shape: Schema.Literals(["directory", "file"]),
|
|
91
|
+
role: Schema.Literals(["primary", "additional"]),
|
|
92
|
+
status: Schema.Literals(["canonical", "compat", "deprecated"]),
|
|
93
|
+
applicability: Schema.Union([
|
|
94
|
+
Schema.Struct({ kind: Schema.Literal("always") }),
|
|
95
|
+
Schema.Struct({ kind: Schema.Literal("conditional"), condition: Schema.NonEmptyString }),
|
|
96
|
+
]),
|
|
97
|
+
provenance: Schema.Union([
|
|
98
|
+
Schema.Struct({ kind: Schema.Literal("capability-sources") }),
|
|
99
|
+
Schema.Struct({ kind: Schema.Literal("sources"), sources: Schema.NonEmptyArray(UrlSchema) }),
|
|
100
|
+
]),
|
|
101
|
+
};
|
|
102
|
+
const nativeReadLocationCheck = Schema.makeFilter((location) => {
|
|
103
|
+
if (location.configRootRelativePath !== undefined &&
|
|
104
|
+
(location.scope !== "user" ||
|
|
105
|
+
/^(?:[\\/~]|[A-Za-z]:)/.test(location.configRootRelativePath) ||
|
|
106
|
+
location.configRootRelativePath.split(/[\\/]/).includes(".."))) {
|
|
107
|
+
return {
|
|
108
|
+
path: ["configRootRelativePath"],
|
|
109
|
+
issue: "Configuration-root overrides require a bounded relative path in user scope.",
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
if ((location.scope === "project") !== (location.root === "project")) {
|
|
113
|
+
return {
|
|
114
|
+
path: ["root"],
|
|
115
|
+
issue: "Project locations require the project root; user locations require home or xdg-config.",
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
if (/^(?:[\\/~]|[A-Za-z]:)/.test(location.path) ||
|
|
119
|
+
location.path.split(/[\\/]/).includes("..")) {
|
|
120
|
+
return {
|
|
121
|
+
path: ["path"],
|
|
122
|
+
issue: "Native locations must be relative to their declared root without parent traversal.",
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
return undefined;
|
|
126
|
+
});
|
|
127
|
+
export const NativeReadLocationSchema = Schema.Struct(NativeReadLocationFields)
|
|
128
|
+
.check(nativeReadLocationCheck)
|
|
129
|
+
.annotate({
|
|
130
|
+
identifier: "NativeReadLocation",
|
|
131
|
+
title: "Native Reader Location",
|
|
132
|
+
description: "A documented native reader path with explicit scope, root, shape, conditions, and evidence; it grants no writer ownership.",
|
|
133
|
+
});
|
|
104
134
|
const NonEmptyScopesSchema = Schema.NonEmptyArray(ScopeSchema).pipe(Schema.check(Schema.isUnique()));
|
|
105
135
|
/** @experimental This API is unstable and may change without notice. */
|
|
106
136
|
export const SUPPORTED_AXM_SUPPORT = "supported";
|
|
@@ -402,8 +432,7 @@ export const SkillsExtensionCapabilitySchema = Schema.Struct({
|
|
|
402
432
|
Schema.Struct({
|
|
403
433
|
...AvailableSpecTrackedNativeCapabilityFields,
|
|
404
434
|
convention: Schema.Literals(["universal", "vendor"]),
|
|
405
|
-
|
|
406
|
-
additionalReadPaths: Schema.Array(SkillReadPathSchema).pipe(Schema.withDecodingDefaultKey(Effect.succeed([])), Schema.optionalKey),
|
|
435
|
+
locations: Schema.Array(NativeReadLocationSchema),
|
|
407
436
|
}),
|
|
408
437
|
Schema.Struct({
|
|
409
438
|
...AvailableSpecTrackedNativeCapabilityFields,
|
|
@@ -419,14 +448,6 @@ export const SkillsExtensionCapabilitySchema = Schema.Struct({
|
|
|
419
448
|
title: "Skills Capability",
|
|
420
449
|
description: "Agent support for Agent Skills-style extensions.",
|
|
421
450
|
});
|
|
422
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
423
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
424
|
-
export const SubagentsLayoutSchema = Schema.Literals(["file", "directory"]).annotate({
|
|
425
|
-
identifier: "SubagentsLayout",
|
|
426
|
-
title: "Subagents Layout",
|
|
427
|
-
description: "Whether subagents live in a directory or a single opaque file path.",
|
|
428
|
-
examples: ["directory", "file"],
|
|
429
|
-
});
|
|
430
451
|
const PluginSubagentsNativeCapabilitySchema = Schema.Struct({
|
|
431
452
|
...AvailableNativeCapabilityBaseFields,
|
|
432
453
|
availability: PluginAvailabilitySchema,
|
|
@@ -437,8 +458,7 @@ export const SubagentsExtensionCapabilitySchema = Schema.Struct({
|
|
|
437
458
|
Schema.Struct({
|
|
438
459
|
...AvailableNativeCapabilityBaseFields,
|
|
439
460
|
availability: NativeAvailabilitySchema,
|
|
440
|
-
|
|
441
|
-
layout: SubagentsLayoutSchema,
|
|
461
|
+
locations: Schema.Array(NativeReadLocationSchema),
|
|
442
462
|
}),
|
|
443
463
|
PluginSubagentsNativeCapabilitySchema,
|
|
444
464
|
Schema.Struct(UnavailableNativeCapabilityFields),
|
|
@@ -469,39 +489,22 @@ export const RuleInstructionsImportSyntaxSchema = Schema.Literals(["at-path"]).a
|
|
|
469
489
|
description: "Syntax an agent uses to import another instruction file.",
|
|
470
490
|
examples: ["at-path"],
|
|
471
491
|
});
|
|
472
|
-
const
|
|
473
|
-
directory: Schema.optionalKey(Schema.NonEmptyString),
|
|
474
|
-
};
|
|
475
|
-
const AgentsMdRulesExtensionCapabilitySchema = Schema.Struct({
|
|
476
|
-
...AvailableSpecTrackedNativeCapabilityFields,
|
|
477
|
-
...OptionalRuleDirectoryField,
|
|
478
|
-
kind: Schema.Literal("agents-md"),
|
|
479
|
-
files: Schema.Tuple([Schema.Literal("AGENTS.md")]),
|
|
480
|
-
nestedDiscovery: Schema.Boolean,
|
|
481
|
-
importSyntax: Schema.NullOr(RuleInstructionsImportSyntaxSchema),
|
|
482
|
-
});
|
|
483
|
-
const OwnFileRulesExtensionCapabilitySchema = Schema.Struct({
|
|
492
|
+
const AvailableRulesExtensionCapabilitySchema = Schema.Struct({
|
|
484
493
|
...AvailableSpecTrackedNativeCapabilityFields,
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
files: Schema.Tuple([Schema.NonEmptyString]),
|
|
494
|
+
kind: RuleInstructionsKindSchema,
|
|
495
|
+
locations: Schema.Array(NativeReadLocationSchema),
|
|
488
496
|
nestedDiscovery: Schema.Boolean,
|
|
489
497
|
importSyntax: Schema.NullOr(RuleInstructionsImportSyntaxSchema),
|
|
490
|
-
})
|
|
491
|
-
const
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
importSyntax: Schema.NullOr(RuleInstructionsImportSyntaxSchema),
|
|
497
|
-
directory: Schema.NonEmptyString,
|
|
498
|
-
});
|
|
498
|
+
}).check(Schema.makeFilter((capability) => {
|
|
499
|
+
const shape = capability.kind === "rules-dir" ? "directory" : "file";
|
|
500
|
+
return capability.locations.some((location) => location.role === "primary" && location.shape !== shape)
|
|
501
|
+
? { path: ["locations"], issue: `Primary instruction locations must have ${shape} shape` }
|
|
502
|
+
: undefined;
|
|
503
|
+
}));
|
|
499
504
|
/** @experimental This API is unstable and may change without notice. */
|
|
500
505
|
export const RulesExtensionCapabilitySchema = Schema.Struct({
|
|
501
506
|
native: Schema.Union([
|
|
502
|
-
|
|
503
|
-
OwnFileRulesExtensionCapabilitySchema,
|
|
504
|
-
RulesDirRulesExtensionCapabilitySchema,
|
|
507
|
+
AvailableRulesExtensionCapabilitySchema,
|
|
505
508
|
Schema.Struct(UnavailableNativeCapabilityFields),
|
|
506
509
|
]),
|
|
507
510
|
axm: NoWriterAxmCapabilityStateSchema,
|
|
@@ -526,6 +529,37 @@ export const ConfigFileFormatSchema = Schema.Literals([
|
|
|
526
529
|
description: "Serialization format used by an agent's permission config file.",
|
|
527
530
|
examples: ["json", "toml", "yaml", "vscode-settings"],
|
|
528
531
|
});
|
|
532
|
+
/** One declared native configuration reader, independently of any AXM writer. */
|
|
533
|
+
export const NativeConfigReadLocationSchema = Schema.Struct({
|
|
534
|
+
...NativeReadLocationFields,
|
|
535
|
+
shape: Schema.Literal("file"),
|
|
536
|
+
id: Schema.NonEmptyString,
|
|
537
|
+
format: ConfigFileFormatSchema,
|
|
538
|
+
keyPath: Schema.optionalKey(Schema.NonEmptyArray(Schema.NonEmptyString)),
|
|
539
|
+
attribution: Schema.optionalKey(Schema.Literals(["shared", "agent"])),
|
|
540
|
+
gitignored: Schema.optionalKey(Schema.Boolean),
|
|
541
|
+
})
|
|
542
|
+
.check(nativeReadLocationCheck)
|
|
543
|
+
.annotate({
|
|
544
|
+
identifier: "NativeConfigReadLocation",
|
|
545
|
+
title: "Native Configuration Reader Location",
|
|
546
|
+
description: "A scoped native file with its syntax, static container path, and source evidence. Writers refer to its id; no writer support or ownership is implied.",
|
|
547
|
+
});
|
|
548
|
+
const nativeConfigReferenceIssues = (locations, references, writerPath) => {
|
|
549
|
+
const issues = [];
|
|
550
|
+
const ids = new Set(locations.map((location) => location.id));
|
|
551
|
+
if (ids.size !== locations.length)
|
|
552
|
+
issues.push({
|
|
553
|
+
path: ["native", "locations"],
|
|
554
|
+
issue: "Native config location ids must be unique within a capability.",
|
|
555
|
+
});
|
|
556
|
+
if (references.some((id) => !ids.has(id)))
|
|
557
|
+
issues.push({
|
|
558
|
+
path: [...writerPath],
|
|
559
|
+
issue: "AXM writers must reference declared native config location ids.",
|
|
560
|
+
});
|
|
561
|
+
return issues;
|
|
562
|
+
};
|
|
529
563
|
/** @experimental This API is unstable and may change without notice. */
|
|
530
564
|
export const McpServersKeySchema = Schema.Literals([
|
|
531
565
|
"mcpServers",
|
|
@@ -547,6 +581,8 @@ export const McpTargetAttributionSchema = Schema.Literals(["shared", "agent"]).a
|
|
|
547
581
|
});
|
|
548
582
|
/** @experimental This API is unstable and may change without notice. */
|
|
549
583
|
export const McpConfigTargetSchema = Schema.Struct({
|
|
584
|
+
/** Explicit captured native root for a resolved runtime destination. */
|
|
585
|
+
nativeRoot: Schema.optionalKey(Schema.NonEmptyString),
|
|
550
586
|
scope: ScopeSchema,
|
|
551
587
|
path: Schema.NonEmptyString,
|
|
552
588
|
format: ConfigFileFormatSchema,
|
|
@@ -625,6 +661,9 @@ export const McpUrlKeyMapSchema = Schema.Struct({
|
|
|
625
661
|
});
|
|
626
662
|
/** @experimental This API is unstable and may change without notice. */
|
|
627
663
|
export const McpRemoteDialectSchema = Schema.Struct({
|
|
664
|
+
implicitTransport: Schema.optionalKey(Schema.Literal("http-or-sse")).annotate({
|
|
665
|
+
description: "A documented URL-only remote entry selects HTTP or SSE through the endpoint, without an explicit transport discriminator.",
|
|
666
|
+
}),
|
|
628
667
|
typeField: McpTypeFieldSchema,
|
|
629
668
|
urlKey: McpUrlKeyMapSchema,
|
|
630
669
|
headersKey: Schema.NullOr(Schema.NonEmptyString),
|
|
@@ -636,16 +675,22 @@ export const McpRemoteDialectSchema = Schema.Struct({
|
|
|
636
675
|
description: "How an agent represents remote MCP server entries.",
|
|
637
676
|
});
|
|
638
677
|
/** @experimental This API is unstable and may change without notice. */
|
|
639
|
-
export const
|
|
640
|
-
serversKey: McpServersKeySchema,
|
|
678
|
+
export const McpEntryDialectSchema = Schema.Struct({
|
|
641
679
|
activationField: McpActivationFieldSchema,
|
|
642
|
-
targets: Schema.Array(McpConfigTargetSchema),
|
|
643
680
|
stdio: Schema.NullOr(McpStdioDialectSchema),
|
|
644
681
|
remote: Schema.NullOr(McpRemoteDialectSchema),
|
|
682
|
+
}).annotate({
|
|
683
|
+
identifier: "McpEntryDialect",
|
|
684
|
+
title: "Native MCP Entry Dialect",
|
|
685
|
+
description: "Verified native entry grammar, independent of AXM writer support.",
|
|
686
|
+
});
|
|
687
|
+
/** @experimental This API is unstable and may change without notice. */
|
|
688
|
+
export const McpConfigSchema = Schema.Struct({
|
|
689
|
+
locationIds: Schema.NonEmptyArray(Schema.NonEmptyString).check(Schema.isUnique()),
|
|
645
690
|
}).annotate({
|
|
646
691
|
identifier: "McpConfig",
|
|
647
|
-
title: "MCP
|
|
648
|
-
description: "
|
|
692
|
+
title: "MCP Writer Locations",
|
|
693
|
+
description: "Native configuration locations selected by the AXM writer.",
|
|
649
694
|
});
|
|
650
695
|
/** @experimental This API is unstable and may change without notice. */
|
|
651
696
|
export const McpEnvExpansionSchema = Schema.Struct({
|
|
@@ -663,6 +708,8 @@ const McpUnavailableCapabilityStruct = Schema.Struct({
|
|
|
663
708
|
const McpNativeWithTransportsSchema = Schema.Struct({
|
|
664
709
|
...AvailableSpecTrackedNativeCapabilityFields,
|
|
665
710
|
transports: NonEmptyMcpTransportsSchema,
|
|
711
|
+
entryDialect: Schema.NullOr(McpEntryDialectSchema),
|
|
712
|
+
locations: Schema.Array(NativeConfigReadLocationSchema),
|
|
666
713
|
mcpEnvExpansion: Schema.optionalKey(McpEnvExpansionSchema),
|
|
667
714
|
});
|
|
668
715
|
const McpAvailableCapabilityStruct = Schema.Struct({
|
|
@@ -679,12 +726,41 @@ const McpExtensionCapabilitySchemaWithChecks = McpExtensionCapabilityStruct.pipe
|
|
|
679
726
|
if (activeSourcesIssue !== undefined)
|
|
680
727
|
issues.push(activeSourcesIssue);
|
|
681
728
|
const writer = capability.axm.writer;
|
|
729
|
+
if ("locations" in capability.native) {
|
|
730
|
+
issues.push(...nativeConfigReferenceIssues(capability.native.locations, writer?.config.locationIds ?? [], ["axm", "writer", "config", "locationIds"]));
|
|
731
|
+
if (capability.native.locations.some((location) => location.keyPath === undefined))
|
|
732
|
+
issues.push({
|
|
733
|
+
path: ["native", "locations"],
|
|
734
|
+
issue: "MCP reader locations require an explicit servers-container keyPath.",
|
|
735
|
+
});
|
|
736
|
+
if (capability.native.locations.some((location) => location.attribution === undefined))
|
|
737
|
+
issues.push({
|
|
738
|
+
path: ["native", "locations"],
|
|
739
|
+
issue: "MCP reader locations require explicit attribution.",
|
|
740
|
+
});
|
|
741
|
+
const selected = new Set(writer?.config.locationIds ?? []);
|
|
742
|
+
if (capability.native.locations.some((location) => selected.has(location.id) &&
|
|
743
|
+
(location.keyPath?.length !== 1 ||
|
|
744
|
+
!Schema.is(McpServersKeySchema)(location.keyPath[0])))) {
|
|
745
|
+
issues.push({
|
|
746
|
+
path: ["native", "locations"],
|
|
747
|
+
issue: "Writable MCP locations require one recognized MCP servers key.",
|
|
748
|
+
});
|
|
749
|
+
}
|
|
750
|
+
}
|
|
682
751
|
if (writer === null || !("transports" in capability.native))
|
|
683
752
|
return issues;
|
|
684
|
-
const config =
|
|
753
|
+
const config = capability.native.entryDialect;
|
|
754
|
+
if (config === null) {
|
|
755
|
+
issues.push({
|
|
756
|
+
path: ["native", "entryDialect"],
|
|
757
|
+
issue: "An MCP writer requires a verified native entry dialect.",
|
|
758
|
+
});
|
|
759
|
+
return issues;
|
|
760
|
+
}
|
|
685
761
|
if (capability.native.transports.includes("stdio") && config.stdio === null) {
|
|
686
762
|
issues.push({
|
|
687
|
-
path: ["
|
|
763
|
+
path: ["native", "entryDialect", "stdio"],
|
|
688
764
|
issue: "MCP stdio config is required when stdio transport is supported.",
|
|
689
765
|
});
|
|
690
766
|
}
|
|
@@ -692,7 +768,7 @@ const McpExtensionCapabilitySchemaWithChecks = McpExtensionCapabilityStruct.pipe
|
|
|
692
768
|
capability.native.transports.includes("sse")) &&
|
|
693
769
|
config.remote === null) {
|
|
694
770
|
issues.push({
|
|
695
|
-
path: ["
|
|
771
|
+
path: ["native", "entryDialect", "remote"],
|
|
696
772
|
issue: "MCP remote config is required when http or sse transport is supported.",
|
|
697
773
|
});
|
|
698
774
|
}
|
|
@@ -730,17 +806,6 @@ export const PermissionGrammarStyleSchema = Schema.Literals([
|
|
|
730
806
|
examples: ["tool-call", "prefix", "regex"],
|
|
731
807
|
});
|
|
732
808
|
/** @experimental This API is unstable and may change without notice. */
|
|
733
|
-
export const ConfigFileLocationSchema = Schema.Struct({
|
|
734
|
-
scope: ScopeSchema,
|
|
735
|
-
path: Schema.NonEmptyString,
|
|
736
|
-
format: ConfigFileFormatSchema,
|
|
737
|
-
gitignored: Schema.Boolean,
|
|
738
|
-
}).annotate({
|
|
739
|
-
identifier: "ConfigFileLocation",
|
|
740
|
-
title: "Config File Location",
|
|
741
|
-
description: "A configuration file where an agent's permission rules can live.",
|
|
742
|
-
});
|
|
743
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
744
809
|
export const CANONICAL_HOOK_EVENT_IDS = [
|
|
745
810
|
"session.start",
|
|
746
811
|
"prompt.submit",
|
|
@@ -919,30 +984,39 @@ export const HookCommandNameSerializationSchema = Schema.Literals(["omit", "mani
|
|
|
919
984
|
examples: ["omit", "manifest"],
|
|
920
985
|
});
|
|
921
986
|
/** @experimental This API is unstable and may change without notice. */
|
|
922
|
-
export const
|
|
987
|
+
export const HookEntryDialectSchema = Schema.Struct({
|
|
923
988
|
serializer: HooksSerializerSchema,
|
|
924
|
-
configFiles: Schema.NonEmptyArray(ConfigFileLocationSchema),
|
|
925
|
-
settingsKey: Schema.NonEmptyString,
|
|
926
|
-
eventMap: Schema.Literal("native.events"),
|
|
927
989
|
matcherKind: HookMatcherKindSchema,
|
|
928
990
|
matcherSerialization: HookMatcherSerializationSchema,
|
|
929
991
|
timeoutSerialization: HookTimeoutSerializationSchema,
|
|
930
992
|
commandNameSerialization: HookCommandNameSerializationSchema,
|
|
993
|
+
}).annotate({
|
|
994
|
+
identifier: "HookEntryDialect",
|
|
995
|
+
title: "Native Hook Entry Dialect",
|
|
996
|
+
description: "Verified native Hook entry grammar, independent of AXM writer support.",
|
|
997
|
+
});
|
|
998
|
+
/** @experimental This API is unstable and may change without notice. */
|
|
999
|
+
export const HooksWriterSchema = Schema.Struct({
|
|
1000
|
+
locationIds: Schema.NonEmptyArray(Schema.NonEmptyString).check(Schema.isUnique()),
|
|
1001
|
+
eventMap: Schema.Literal("native.events"),
|
|
931
1002
|
}).annotate({
|
|
932
1003
|
identifier: "HooksWriter",
|
|
933
1004
|
title: "Hooks Writer",
|
|
934
|
-
description: "
|
|
1005
|
+
description: "Native Hook locations and event mappings selected by the AXM writer.",
|
|
935
1006
|
});
|
|
936
1007
|
const HooksAvailableNativeCapabilitySchema = Schema.Struct({
|
|
937
1008
|
...AvailableNativeCapabilityBaseFields,
|
|
938
1009
|
mechanism: NonEmptyHookMechanismFamiliesSchema,
|
|
939
|
-
|
|
1010
|
+
entryDialect: Schema.NullOr(HookEntryDialectSchema),
|
|
1011
|
+
locations: Schema.Array(NativeConfigReadLocationSchema),
|
|
940
1012
|
events: Schema.NonEmptyArray(HookEventMappingSchema),
|
|
941
1013
|
tools: Schema.Array(HookToolMappingSchema),
|
|
942
1014
|
});
|
|
943
1015
|
const HooksUnmodeledNativeCapabilitySchema = Schema.Struct({
|
|
944
1016
|
...AvailableNativeCapabilityBaseFields,
|
|
945
1017
|
modeling: Schema.Literal("native-unmodeled"),
|
|
1018
|
+
entryDialect: Schema.NullOr(HookEntryDialectSchema),
|
|
1019
|
+
locations: Schema.Array(NativeConfigReadLocationSchema),
|
|
946
1020
|
});
|
|
947
1021
|
const HooksExtensionCapabilityStruct = Schema.Struct({
|
|
948
1022
|
native: Schema.Union([
|
|
@@ -955,6 +1029,22 @@ const HooksExtensionCapabilityStruct = Schema.Struct({
|
|
|
955
1029
|
/** @experimental This API is unstable and may change without notice. */
|
|
956
1030
|
export const HooksExtensionCapabilitySchema = HooksExtensionCapabilityStruct.pipe(Schema.check(Schema.makeFilter((capability) => {
|
|
957
1031
|
const issues = [];
|
|
1032
|
+
if ("locations" in capability.native) {
|
|
1033
|
+
issues.push(...nativeConfigReferenceIssues(capability.native.locations, capability.axm.writer?.locationIds ?? [], ["axm", "writer", "locationIds"]));
|
|
1034
|
+
const selected = new Set(capability.axm.writer?.locationIds ?? []);
|
|
1035
|
+
if (capability.native.locations.some((location) => selected.has(location.id) && location.keyPath === undefined))
|
|
1036
|
+
issues.push({
|
|
1037
|
+
path: ["native", "locations"],
|
|
1038
|
+
issue: "Writable Hook reader locations require a static keyPath.",
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
if (capability.axm.writer !== null &&
|
|
1042
|
+
(!("entryDialect" in capability.native) || capability.native.entryDialect === null)) {
|
|
1043
|
+
issues.push({
|
|
1044
|
+
path: ["native", "entryDialect"],
|
|
1045
|
+
issue: "A Hook writer requires a verified native entry dialect.",
|
|
1046
|
+
});
|
|
1047
|
+
}
|
|
958
1048
|
if (capability.axm.writer !== null && capability.native.sources.length === 0) {
|
|
959
1049
|
issues.push({
|
|
960
1050
|
path: ["native", "sources"],
|
|
@@ -1007,7 +1097,11 @@ export const PermissionCliFlagSchema = Schema.Struct({
|
|
|
1007
1097
|
description: "Invocation-time flag that adjusts approval or sandbox behavior.",
|
|
1008
1098
|
});
|
|
1009
1099
|
const PermissionGrantStruct = Schema.Struct({
|
|
1010
|
-
|
|
1100
|
+
destination: Schema.Union([
|
|
1101
|
+
Schema.Struct({ kind: Schema.Literal("location"), locationId: Schema.NonEmptyString }),
|
|
1102
|
+
Schema.Struct({ kind: Schema.Literal("invocation") }),
|
|
1103
|
+
Schema.Struct({ kind: Schema.Literal("settings-ui") }),
|
|
1104
|
+
]),
|
|
1011
1105
|
patch: Schema.NullOr(Schema.Unknown),
|
|
1012
1106
|
template: Schema.NullOr(Schema.NonEmptyString),
|
|
1013
1107
|
});
|
|
@@ -1025,7 +1119,7 @@ export const PermissionsExtensionCapabilitySchema = Schema.Struct({
|
|
|
1025
1119
|
Schema.Struct({
|
|
1026
1120
|
...AvailableNativeCapabilityBaseFields,
|
|
1027
1121
|
mechanism: NonEmptyPermissionMechanismsSchema,
|
|
1028
|
-
|
|
1122
|
+
locations: Schema.Array(NativeConfigReadLocationSchema),
|
|
1029
1123
|
grammar: Schema.NullOr(PermissionGrammarSchema),
|
|
1030
1124
|
prerequisites: Schema.Array(PermissionPrerequisiteSchema),
|
|
1031
1125
|
cliFlags: Schema.Array(PermissionCliFlagSchema),
|
|
@@ -1034,7 +1128,9 @@ export const PermissionsExtensionCapabilitySchema = Schema.Struct({
|
|
|
1034
1128
|
]),
|
|
1035
1129
|
axm: axmCapabilityStateSchema(Schema.Struct({ grants: Schema.Record(Schema.String, PermissionGrantSchema) }), "PermissionsAxmState"),
|
|
1036
1130
|
})
|
|
1037
|
-
.pipe(Schema.check(Schema.makeFilter(requireSourcesForActiveAxmSupport)))
|
|
1131
|
+
.pipe(Schema.check(Schema.makeFilter(requireSourcesForActiveAxmSupport)), Schema.check(Schema.makeFilter((capability) => "locations" in capability.native
|
|
1132
|
+
? nativeConfigReferenceIssues(capability.native.locations, Object.values(capability.axm.writer?.grants ?? {}).flatMap((grant) => grant.destination.kind === "location" ? [grant.destination.locationId] : []), ["axm", "writer", "grants"])
|
|
1133
|
+
: undefined)))
|
|
1038
1134
|
.annotate({
|
|
1039
1135
|
identifier: "PermissionsExtensionCapability",
|
|
1040
1136
|
title: "Permissions Capability",
|
|
@@ -1159,9 +1255,11 @@ export const AgentSchema = AgentStruct.pipe(Schema.check(Schema.makeFilter((agen
|
|
|
1159
1255
|
const issues = [];
|
|
1160
1256
|
if ("kind" in agent.instructions.native &&
|
|
1161
1257
|
agent.instructions.native.kind === "agents-md" &&
|
|
1162
|
-
agent.instructions.native.
|
|
1258
|
+
agent.instructions.native.locations.some((location) => location.scope === "project" &&
|
|
1259
|
+
location.role === "primary" &&
|
|
1260
|
+
(location.shape !== "file" || location.path !== "AGENTS.md"))) {
|
|
1163
1261
|
issues.push({
|
|
1164
|
-
path: ["instructions", "native", "
|
|
1262
|
+
path: ["instructions", "native", "locations"],
|
|
1165
1263
|
issue: 'instructions.kind "agents-md" requires AGENTS.md.',
|
|
1166
1264
|
});
|
|
1167
1265
|
}
|
|
@@ -1198,8 +1296,7 @@ export const AgentSchema = AgentStruct.pipe(Schema.check(Schema.makeFilter((agen
|
|
|
1198
1296
|
});
|
|
1199
1297
|
}
|
|
1200
1298
|
if (hostedOnly &&
|
|
1201
|
-
capabilitySlots.some((capability) => "
|
|
1202
|
-
("configFiles" in capability.native && capability.native.configFiles.length > 0))) {
|
|
1299
|
+
capabilitySlots.some((capability) => "locations" in capability.native && capability.native.locations.length > 0)) {
|
|
1203
1300
|
issues.push({
|
|
1204
1301
|
path: ["capabilities"],
|
|
1205
1302
|
issue: "Hosted-only agents cannot declare local capability paths.",
|
|
@@ -6,28 +6,14 @@
|
|
|
6
6
|
* @experimental This API is unstable and may change without notice.
|
|
7
7
|
* @packageDocumentation
|
|
8
8
|
*/
|
|
9
|
-
import
|
|
9
|
+
import type { AgentRegistry } from "./types.js";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Derived descriptors for all known configurable coding agents.
|
|
12
12
|
*
|
|
13
13
|
* Keys are agent IDs, values are full descriptor objects.
|
|
14
14
|
* Paths are pre-expanded at module initialization.
|
|
15
15
|
*
|
|
16
16
|
* @experimental This API is unstable and may change without notice.
|
|
17
17
|
*/
|
|
18
|
-
export declare const
|
|
19
|
-
/**
|
|
20
|
-
* Get all registered agent IDs.
|
|
21
|
-
*
|
|
22
|
-
* @returns Array of all agent identifiers
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```typescript
|
|
26
|
-
* const ids = getAgentIds();
|
|
27
|
-
* // ["adal", "amp", "antigravity", "augment", "claude-code", ...]
|
|
28
|
-
* ```
|
|
29
|
-
*
|
|
30
|
-
* @experimental This API is unstable and may change without notice.
|
|
31
|
-
*/
|
|
32
|
-
export declare const getAgentIds: () => ReadonlyArray<AgentId>;
|
|
18
|
+
export declare const AGENT_DESCRIPTORS: AgentRegistry;
|
|
33
19
|
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -9,42 +9,15 @@
|
|
|
9
9
|
import * as Record from "effect/Record";
|
|
10
10
|
import { CONFIGURABLE_AGENTS_BY_ID } from "../agent-capabilities/catalog.js";
|
|
11
11
|
import { deriveAgentDescriptor } from "../agent-capabilities/derive.js";
|
|
12
|
-
import { UNIVERSAL_SKILLS_DIR } from "../extensions/universal-skills-dir.js";
|
|
13
|
-
import { AGENT_IDS } from "./types.js";
|
|
14
|
-
const UNIVERSAL_AGENT_DESCRIPTOR = {
|
|
15
|
-
id: "universal",
|
|
16
|
-
name: "Universal",
|
|
17
|
-
rootDir: undefined,
|
|
18
|
-
skills: {
|
|
19
|
-
dir: UNIVERSAL_SKILLS_DIR,
|
|
20
|
-
additionalReadPaths: [],
|
|
21
|
-
},
|
|
22
|
-
detection: { project: { markers: [] }, user: { markers: [] } },
|
|
23
|
-
};
|
|
24
12
|
/**
|
|
25
|
-
*
|
|
13
|
+
* Derived descriptors for all known configurable coding agents.
|
|
26
14
|
*
|
|
27
15
|
* Keys are agent IDs, values are full descriptor objects.
|
|
28
16
|
* Paths are pre-expanded at module initialization.
|
|
29
17
|
*
|
|
30
18
|
* @experimental This API is unstable and may change without notice.
|
|
31
19
|
*/
|
|
32
|
-
export const
|
|
20
|
+
export const AGENT_DESCRIPTORS = {
|
|
33
21
|
...Record.map(CONFIGURABLE_AGENTS_BY_ID, deriveAgentDescriptor),
|
|
34
|
-
universal: UNIVERSAL_AGENT_DESCRIPTOR,
|
|
35
22
|
};
|
|
36
|
-
/**
|
|
37
|
-
* Get all registered agent IDs.
|
|
38
|
-
*
|
|
39
|
-
* @returns Array of all agent identifiers
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* ```typescript
|
|
43
|
-
* const ids = getAgentIds();
|
|
44
|
-
* // ["adal", "amp", "antigravity", "augment", "claude-code", ...]
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* @experimental This API is unstable and may change without notice.
|
|
48
|
-
*/
|
|
49
|
-
export const getAgentIds = () => AGENT_IDS;
|
|
50
23
|
//# sourceMappingURL=registry.js.map
|
|
@@ -6,17 +6,16 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import type { Record } from "effect";
|
|
8
8
|
import { CONFIGURABLE_AGENT_IDS, type ConfigurableAgentId } from "../agent-capabilities/identity.js";
|
|
9
|
-
import type { DetectionMarker, Scope, ScopeDetection,
|
|
9
|
+
import type { DetectionMarker, Scope, ScopeDetection, NativeReadLocation } from "../agent-capabilities/schema.js";
|
|
10
10
|
/**
|
|
11
11
|
* Skills-specific configuration for an agent.
|
|
12
12
|
*
|
|
13
13
|
* @experimental This API is unstable and may change without notice.
|
|
14
14
|
*/
|
|
15
15
|
export interface AgentSkillsDescriptor {
|
|
16
|
-
|
|
17
|
-
readonly
|
|
18
|
-
|
|
19
|
-
readonly additionalReadPaths: ReadonlyArray<SkillReadPath>;
|
|
16
|
+
readonly locations: ReadonlyArray<NativeReadLocation>;
|
|
17
|
+
readonly scopes: ReadonlyArray<Scope>;
|
|
18
|
+
readonly writerSupported: boolean;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Subagents-specific configuration for an agent.
|
|
@@ -24,18 +23,9 @@ export interface AgentSkillsDescriptor {
|
|
|
24
23
|
* @experimental This API is unstable and may change without notice.
|
|
25
24
|
*/
|
|
26
25
|
export interface AgentSubagentsDescriptor {
|
|
27
|
-
|
|
28
|
-
readonly dir: string;
|
|
29
|
-
/**
|
|
30
|
-
* Scopes the agent itself supports for subagents. See
|
|
31
|
-
* The scopes the agent itself supports for subagents.
|
|
32
|
-
*/
|
|
26
|
+
readonly locations: ReadonlyArray<NativeReadLocation>;
|
|
33
27
|
readonly scopes: ReadonlyArray<Scope>;
|
|
34
|
-
|
|
35
|
-
* When true, the path is a single file (e.g., ".roomodes") rather than a
|
|
36
|
-
* directory containing subagent files.
|
|
37
|
-
*/
|
|
38
|
-
readonly isFile?: boolean;
|
|
28
|
+
readonly writerSupported: boolean;
|
|
39
29
|
}
|
|
40
30
|
/**
|
|
41
31
|
* Workspace instruction-file convention for one coding agent.
|
|
@@ -48,19 +38,13 @@ export interface AgentSubagentsDescriptor {
|
|
|
48
38
|
*
|
|
49
39
|
* @experimental
|
|
50
40
|
*/
|
|
51
|
-
export
|
|
52
|
-
readonly kind: "agents-md";
|
|
53
|
-
readonly
|
|
54
|
-
|
|
55
|
-
readonly
|
|
56
|
-
readonly file: string;
|
|
41
|
+
export interface AgentInstructionsDescriptor {
|
|
42
|
+
readonly kind: "agents-md" | "own-file" | "rules-dir";
|
|
43
|
+
readonly locations: ReadonlyArray<NativeReadLocation>;
|
|
44
|
+
readonly scopes: ReadonlyArray<Scope>;
|
|
45
|
+
readonly writerSupported: boolean;
|
|
57
46
|
readonly importSyntax?: "at-path";
|
|
58
|
-
|
|
59
|
-
} | {
|
|
60
|
-
readonly kind: "rules-dir";
|
|
61
|
-
readonly dir: string;
|
|
62
|
-
readonly format: "frontmatter";
|
|
63
|
-
};
|
|
47
|
+
}
|
|
64
48
|
/** @experimental This API is unstable and may change without notice. */
|
|
65
49
|
export type AgentDetectionMarker = DetectionMarker;
|
|
66
50
|
/** @experimental This API is unstable and may change without notice. */
|
|
@@ -74,12 +58,10 @@ export interface AgentDetectionDescriptor {
|
|
|
74
58
|
}
|
|
75
59
|
/** @experimental This API is unstable and may change without notice. */
|
|
76
60
|
export { CONFIGURABLE_AGENT_IDS, type ConfigurableAgentId };
|
|
61
|
+
/** Real agents that can participate in native materialization. @experimental */
|
|
62
|
+
export declare const MATERIALIZATION_TARGET_IDS: readonly ["adal", "aider-desk", "amp", "antigravity", "antigravity-cli", "augment", "claude-code", "cline", "codearts-agent", "codebuddy", "codemaker", "codestudio", "codex", "command-code", "continue", "cortex", "crush", "cursor", "deepagents", "devin", "dexto", "droid", "firebender", "forgecode", "gemini-cli", "github-copilot-cli", "goose", "grok-cli", "hermes", "ibm-bob", "iflow-cli", "junie", "lingma", "kilo", "kimi-cli", "kiro-cli", "kode", "mcpjam", "minimax-code", "mistral-vibe", "mux", "neovate", "openclaw", "opencode", "openhands", "ona", "pi", "pochi", "qoder", "qoder-cn", "qwen-code", "replit", "roo", "rovodev", "tabnine-cli", "trae-cn", "trae", "warp", "windsurf", "zencoder", "zed", "zenflow"];
|
|
77
63
|
/** @experimental This API is unstable and may change without notice. */
|
|
78
|
-
export
|
|
79
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
80
|
-
export type AgentId = (typeof AGENT_IDS)[number];
|
|
81
|
-
/** @experimental This API is unstable and may change without notice. */
|
|
82
|
-
export declare const isConfigurableAgentId: (id: AgentId) => id is ConfigurableAgentId;
|
|
64
|
+
export type MaterializationTargetId = (typeof MATERIALIZATION_TARGET_IDS)[number];
|
|
83
65
|
/**
|
|
84
66
|
* Configuration for an AI coding agent.
|
|
85
67
|
*
|
|
@@ -87,28 +69,12 @@ export declare const isConfigurableAgentId: (id: AgentId) => id is ConfigurableA
|
|
|
87
69
|
*/
|
|
88
70
|
export interface AgentDescriptor {
|
|
89
71
|
/** Unique identifier (e.g., "claude-code") */
|
|
90
|
-
readonly id:
|
|
72
|
+
readonly id: MaterializationTargetId;
|
|
91
73
|
/** Human-readable display name (e.g., "Claude Code") */
|
|
92
74
|
readonly name: string;
|
|
93
|
-
/**
|
|
94
|
-
* Per-agent native configuration root, relative to the workspace root
|
|
95
|
-
* (e.g., `.claude` for Claude Code, `.cursor` for Cursor). The
|
|
96
|
-
* workspace read-model scanners look for this agent's `settings.json`,
|
|
97
|
-
* `mcp.json`, and other native config files inside this directory.
|
|
98
|
-
*
|
|
99
|
-
* Three states (with `exactOptionalPropertyTypes: true`):
|
|
100
|
-
*
|
|
101
|
-
* - `string` — use this directory as the explicit native config root.
|
|
102
|
-
* - omitted (key not present) — fall back to the first segment of
|
|
103
|
-
* `skills.dir` when a verified Skill surface exists, otherwise `.<id>`.
|
|
104
|
-
* - `undefined` — explicit opt-out. Scanners SHALL NOT attempt to
|
|
105
|
-
* discover native config for this agent. Use this when an agent's
|
|
106
|
-
* first `skills.dir` segment collides with another agent's (e.g.,
|
|
107
|
-
* several agents share a parent like `.agents`) and there is no
|
|
108
|
-
* authoritative answer about the real native config root.
|
|
109
|
-
*/
|
|
75
|
+
/** Explicit project native configuration root. Undefined suppresses root discovery. */
|
|
110
76
|
readonly rootDir?: string | undefined;
|
|
111
|
-
/**
|
|
77
|
+
/** Native Skill reader declarations, independent of AXM writer support. */
|
|
112
78
|
readonly skills?: AgentSkillsDescriptor;
|
|
113
79
|
/** Subagents installation configuration (optional — not all agents support subagents) */
|
|
114
80
|
readonly subagents?: AgentSubagentsDescriptor;
|
|
@@ -122,5 +88,5 @@ export interface AgentDescriptor {
|
|
|
122
88
|
*
|
|
123
89
|
* @experimental This API is unstable and may change without notice.
|
|
124
90
|
*/
|
|
125
|
-
export type AgentRegistry = Record.ReadonlyRecord<
|
|
91
|
+
export type AgentRegistry = Record.ReadonlyRecord<MaterializationTargetId, AgentDescriptor>;
|
|
126
92
|
//# sourceMappingURL=types.d.ts.map
|