@ai-agent-forge/agent-forge 0.85.3 → 0.85.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/capabilities/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CACpD,MAAM,CACH,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,uBAAuB,GACvB,2BAA2B,GAC3B,gBAAgB,EAClB,MAAM,CACN,CAQA,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAOnD,CAAC;AAEF,MAAM,WAAW,2BAA2B;IAC3C;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,SAAS,EAAE,CAAC;IACpC,mGAA8F;IAC9F,QAAQ,CAAC,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,GAAG,2BAA2B,CAgBnG","sourcesContent":["/**\n * Suite short-id mapping for the first-party capability family (方案系统 M3,\n * docs/plans/方案实施计划.md §8).\n *\n * D-075 S4 (all four batches): every first-party capability has been split\n * out of the host — `builtin.goal`/`builtin.plan`/`builtin.todo-set`/\n * `builtin.session-share`/`builtin.subagent-delegate` and, with the fourth\n * batch, `builtin.memory` assemble from the independent `plugins/<name>`\n * packages through the install store (see\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS}). The host carries NO embedded\n * capability registry anymore: this module only maps the legacy suite short\n * ids onto their package plugin ids and reports dangling ids. The\n * agent-dir config channel (`<agentDir>/capabilities/<short-id>.json`) moved\n * into the packages' own entries; host services ride the public\n * HostCapabilities (`api.host.agentDir`/`communication`/`turnContext`/\n * `roleAssociations`/`memoryStorage`).\n */\n\n/**\n * Suite short ids (suite.json `capabilities`) that map onto INDEPENDENT plugin\n * packages after the S4 split (D-075 §6 S4, all four batches): none of them\n * have embedded implementations — they assemble from the corresponding\n * `plugins/<name>` packages through the install store (bootstrap factory\n * manifest or explicit `plugin install`).\n */\nexport const BUILTIN_CAPABILITY_PACKAGE_IDS: Readonly<\n\tRecord<\n\t\t| \"builtin.goal\"\n\t\t| \"builtin.plan\"\n\t\t| \"builtin.todo-set\"\n\t\t| \"builtin.session-share\"\n\t\t| \"builtin.subagent-delegate\"\n\t\t| \"builtin.memory\",\n\t\tstring\n\t>\n> = Object.freeze({\n\t\"builtin.goal\": \"agent-forge.plugin.goal\",\n\t\"builtin.plan\": \"agent-forge.plugin.plan\",\n\t\"builtin.todo-set\": \"agent-forge.plugin.todo-set\",\n\t\"builtin.session-share\": \"agent-forge.plugin.session-share\",\n\t\"builtin.subagent-delegate\": \"agent-forge.plugin.subagent-delegate\",\n\t\"builtin.memory\": \"agent-forge.plugin.memory\",\n});\n\n/** Suite short ids (suite.json `capabilities`) of the builtin capability family. */\nexport const BUILTIN_CAPABILITY_IDS: readonly string[] = [\n\t\"builtin.goal\",\n\t\"builtin.plan\",\n\t\"builtin.todo-set\",\n\t\"builtin.memory\",\n\t\"builtin.session-share\",\n\t\"builtin.subagent-delegate\",\n];\n\nexport interface ResolvedBuiltinCapabilities {\n\t/**\n\t * Always empty since the S4 split completed: no capability ships embedded\n\t * in the host. Kept on the contract so the sdk's wiring reads the same\n\t * shape; capability packages load through the installed-plugin path.\n\t */\n\treadonly registrations: readonly [];\n\t/** Short ids that map to no known builtin capability (设计 §11.3 dangling, never fail-fast). */\n\treadonly unknownShortIds: readonly string[];\n}\n\n/**\n * Resolves suite.json `capabilities` short ids. Since the S4 split completed\n * there is no embedded registry: every short id in\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS} maps to an independent plugin package\n * (assembled through the install store by the sdk) and is skipped here;\n * unknown ids surface as dangling diagnostics, never as errors (决策记录 §8).\n */\nexport function resolveBuiltinCapabilities(shortIds: readonly string[]): ResolvedBuiltinCapabilities {\n\tconst unknownShortIds: string[] = [];\n\tconst seen = new Set<string>();\n\tfor (const shortId of shortIds) {\n\t\t// S4 拆包短 id(六件套全部):内嵌实现已移除,由 sdk 装配链经\n\t\t// BUILTIN_CAPABILITY_PACKAGE_IDS 映射到独立插件包(安装店)接管。这里静默\n\t\t// 跳过:不产出内嵌注册,也不算 dangling。\n\t\tif (shortId in BUILTIN_CAPABILITY_PACKAGE_IDS) continue;\n\t\tif (seen.has(shortId)) continue;\n\t\tseen.add(shortId);\n\t\tunknownShortIds.push(shortId);\n\t}\n\treturn {\n\t\tregistrations: Object.freeze([]),\n\t\tunknownShortIds: Object.freeze(unknownShortIds),\n\t};\n}\n"]}
1
+ {"version":3,"file":"builtin.d.ts","sourceRoot":"","sources":["../../src/capabilities/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CACpD,MAAM,CACH,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,uBAAuB,GACvB,2BAA2B,GAC3B,gBAAgB,EAClB,MAAM,CACN,CAQA,CAAC;AAEH,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,EAAE,SAAS,MAAM,EAOnD,CAAC","sourcesContent":["/**\n * Suite short-id mapping for the first-party capability family (方案系统 M3,\n * docs/plans/方案实施计划.md §8).\n *\n * D-075 S4 (all four batches): every first-party capability has been split\n * out of the host — `builtin.goal`/`builtin.plan`/`builtin.todo-set`/\n * `builtin.session-share`/`builtin.subagent-delegate` and, with the fourth\n * batch, `builtin.memory` assemble from the independent `plugins/<name>`\n * packages through the install store (see\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS}). The host carries NO embedded\n * capability registry anymore — the retired `resolveBuiltinCapabilities`\n * assembly entry was deleted with its last sdk consumer (S5 embedded-path\n * retirement): unknown suite short ids surface as dangling diagnostics in\n * the sdk assembly chain, never as errors. The agent-dir config channel\n * (`<agentDir>/capabilities/<short-id>.json`) moved into the packages' own\n * entries; host services ride the public HostCapabilities\n * (`api.host.agentDir`/`communication`/`turnContext`/`roleAssociations`/\n * `memoryStorage`).\n */\n\n/**\n * Suite short ids (suite.json `capabilities`) that map onto INDEPENDENT plugin\n * packages after the S4 split (D-075 §6 S4, all four batches): none of them\n * have embedded implementations — they assemble from the corresponding\n * `plugins/<name>` packages through the install store (bootstrap factory\n * manifest or explicit `plugin install`).\n */\nexport const BUILTIN_CAPABILITY_PACKAGE_IDS: Readonly<\n\tRecord<\n\t\t| \"builtin.goal\"\n\t\t| \"builtin.plan\"\n\t\t| \"builtin.todo-set\"\n\t\t| \"builtin.session-share\"\n\t\t| \"builtin.subagent-delegate\"\n\t\t| \"builtin.memory\",\n\t\tstring\n\t>\n> = Object.freeze({\n\t\"builtin.goal\": \"agent-forge.plugin.goal\",\n\t\"builtin.plan\": \"agent-forge.plugin.plan\",\n\t\"builtin.todo-set\": \"agent-forge.plugin.todo-set\",\n\t\"builtin.session-share\": \"agent-forge.plugin.session-share\",\n\t\"builtin.subagent-delegate\": \"agent-forge.plugin.subagent-delegate\",\n\t\"builtin.memory\": \"agent-forge.plugin.memory\",\n});\n\n/** Suite short ids (suite.json `capabilities`) of the builtin capability family. */\nexport const BUILTIN_CAPABILITY_IDS: readonly string[] = [\n\t\"builtin.goal\",\n\t\"builtin.plan\",\n\t\"builtin.todo-set\",\n\t\"builtin.memory\",\n\t\"builtin.session-share\",\n\t\"builtin.subagent-delegate\",\n];\n"]}
@@ -8,12 +8,14 @@
8
8
  * batch, `builtin.memory` assemble from the independent `plugins/<name>`
9
9
  * packages through the install store (see
10
10
  * {@link BUILTIN_CAPABILITY_PACKAGE_IDS}). The host carries NO embedded
11
- * capability registry anymore: this module only maps the legacy suite short
12
- * ids onto their package plugin ids and reports dangling ids. The
13
- * agent-dir config channel (`<agentDir>/capabilities/<short-id>.json`) moved
14
- * into the packages' own entries; host services ride the public
15
- * HostCapabilities (`api.host.agentDir`/`communication`/`turnContext`/
16
- * `roleAssociations`/`memoryStorage`).
11
+ * capability registry anymore — the retired `resolveBuiltinCapabilities`
12
+ * assembly entry was deleted with its last sdk consumer (S5 embedded-path
13
+ * retirement): unknown suite short ids surface as dangling diagnostics in
14
+ * the sdk assembly chain, never as errors. The agent-dir config channel
15
+ * (`<agentDir>/capabilities/<short-id>.json`) moved into the packages' own
16
+ * entries; host services ride the public HostCapabilities
17
+ * (`api.host.agentDir`/`communication`/`turnContext`/`roleAssociations`/
18
+ * `memoryStorage`).
17
19
  */
18
20
  /**
19
21
  * Suite short ids (suite.json `capabilities`) that map onto INDEPENDENT plugin
@@ -39,30 +41,4 @@ export const BUILTIN_CAPABILITY_IDS = [
39
41
  "builtin.session-share",
40
42
  "builtin.subagent-delegate",
41
43
  ];
42
- /**
43
- * Resolves suite.json `capabilities` short ids. Since the S4 split completed
44
- * there is no embedded registry: every short id in
45
- * {@link BUILTIN_CAPABILITY_PACKAGE_IDS} maps to an independent plugin package
46
- * (assembled through the install store by the sdk) and is skipped here;
47
- * unknown ids surface as dangling diagnostics, never as errors (决策记录 §8).
48
- */
49
- export function resolveBuiltinCapabilities(shortIds) {
50
- const unknownShortIds = [];
51
- const seen = new Set();
52
- for (const shortId of shortIds) {
53
- // S4 拆包短 id(六件套全部):内嵌实现已移除,由 sdk 装配链经
54
- // BUILTIN_CAPABILITY_PACKAGE_IDS 映射到独立插件包(安装店)接管。这里静默
55
- // 跳过:不产出内嵌注册,也不算 dangling。
56
- if (shortId in BUILTIN_CAPABILITY_PACKAGE_IDS)
57
- continue;
58
- if (seen.has(shortId))
59
- continue;
60
- seen.add(shortId);
61
- unknownShortIds.push(shortId);
62
- }
63
- return {
64
- registrations: Object.freeze([]),
65
- unknownShortIds: Object.freeze(unknownShortIds),
66
- };
67
- }
68
44
  //# sourceMappingURL=builtin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/capabilities/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAUvC,MAAM,CAAC,MAAM,CAAC;IACjB,cAAc,EAAE,yBAAyB;IACzC,cAAc,EAAE,yBAAyB;IACzC,kBAAkB,EAAE,6BAA6B;IACjD,uBAAuB,EAAE,kCAAkC;IAC3D,2BAA2B,EAAE,sCAAsC;IACnE,gBAAgB,EAAE,2BAA2B;CAC7C,CAAC,CAAC;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACxD,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,uBAAuB;IACvB,2BAA2B;CAC3B,CAAC;AAaF;;;;;;GAMG;AACH,MAAM,UAAU,0BAA0B,CAAC,QAA2B,EAA+B;IACpG,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAChC,sFAAsC;QACtC,8FAAsD;QACtD,yDAA2B;QAC3B,IAAI,OAAO,IAAI,8BAA8B;YAAE,SAAS;QACxD,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC;YAAE,SAAS;QAChC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClB,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO;QACN,aAAa,EAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAChC,eAAe,EAAE,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC;KAC/C,CAAC;AAAA,CACF","sourcesContent":["/**\n * Suite short-id mapping for the first-party capability family (方案系统 M3,\n * docs/plans/方案实施计划.md §8).\n *\n * D-075 S4 (all four batches): every first-party capability has been split\n * out of the host — `builtin.goal`/`builtin.plan`/`builtin.todo-set`/\n * `builtin.session-share`/`builtin.subagent-delegate` and, with the fourth\n * batch, `builtin.memory` assemble from the independent `plugins/<name>`\n * packages through the install store (see\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS}). The host carries NO embedded\n * capability registry anymore: this module only maps the legacy suite short\n * ids onto their package plugin ids and reports dangling ids. The\n * agent-dir config channel (`<agentDir>/capabilities/<short-id>.json`) moved\n * into the packages' own entries; host services ride the public\n * HostCapabilities (`api.host.agentDir`/`communication`/`turnContext`/\n * `roleAssociations`/`memoryStorage`).\n */\n\n/**\n * Suite short ids (suite.json `capabilities`) that map onto INDEPENDENT plugin\n * packages after the S4 split (D-075 §6 S4, all four batches): none of them\n * have embedded implementations — they assemble from the corresponding\n * `plugins/<name>` packages through the install store (bootstrap factory\n * manifest or explicit `plugin install`).\n */\nexport const BUILTIN_CAPABILITY_PACKAGE_IDS: Readonly<\n\tRecord<\n\t\t| \"builtin.goal\"\n\t\t| \"builtin.plan\"\n\t\t| \"builtin.todo-set\"\n\t\t| \"builtin.session-share\"\n\t\t| \"builtin.subagent-delegate\"\n\t\t| \"builtin.memory\",\n\t\tstring\n\t>\n> = Object.freeze({\n\t\"builtin.goal\": \"agent-forge.plugin.goal\",\n\t\"builtin.plan\": \"agent-forge.plugin.plan\",\n\t\"builtin.todo-set\": \"agent-forge.plugin.todo-set\",\n\t\"builtin.session-share\": \"agent-forge.plugin.session-share\",\n\t\"builtin.subagent-delegate\": \"agent-forge.plugin.subagent-delegate\",\n\t\"builtin.memory\": \"agent-forge.plugin.memory\",\n});\n\n/** Suite short ids (suite.json `capabilities`) of the builtin capability family. */\nexport const BUILTIN_CAPABILITY_IDS: readonly string[] = [\n\t\"builtin.goal\",\n\t\"builtin.plan\",\n\t\"builtin.todo-set\",\n\t\"builtin.memory\",\n\t\"builtin.session-share\",\n\t\"builtin.subagent-delegate\",\n];\n\nexport interface ResolvedBuiltinCapabilities {\n\t/**\n\t * Always empty since the S4 split completed: no capability ships embedded\n\t * in the host. Kept on the contract so the sdk's wiring reads the same\n\t * shape; capability packages load through the installed-plugin path.\n\t */\n\treadonly registrations: readonly [];\n\t/** Short ids that map to no known builtin capability (设计 §11.3 dangling, never fail-fast). */\n\treadonly unknownShortIds: readonly string[];\n}\n\n/**\n * Resolves suite.json `capabilities` short ids. Since the S4 split completed\n * there is no embedded registry: every short id in\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS} maps to an independent plugin package\n * (assembled through the install store by the sdk) and is skipped here;\n * unknown ids surface as dangling diagnostics, never as errors (决策记录 §8).\n */\nexport function resolveBuiltinCapabilities(shortIds: readonly string[]): ResolvedBuiltinCapabilities {\n\tconst unknownShortIds: string[] = [];\n\tconst seen = new Set<string>();\n\tfor (const shortId of shortIds) {\n\t\t// S4 拆包短 id(六件套全部):内嵌实现已移除,由 sdk 装配链经\n\t\t// BUILTIN_CAPABILITY_PACKAGE_IDS 映射到独立插件包(安装店)接管。这里静默\n\t\t// 跳过:不产出内嵌注册,也不算 dangling。\n\t\tif (shortId in BUILTIN_CAPABILITY_PACKAGE_IDS) continue;\n\t\tif (seen.has(shortId)) continue;\n\t\tseen.add(shortId);\n\t\tunknownShortIds.push(shortId);\n\t}\n\treturn {\n\t\tregistrations: Object.freeze([]),\n\t\tunknownShortIds: Object.freeze(unknownShortIds),\n\t};\n}\n"]}
1
+ {"version":3,"file":"builtin.js","sourceRoot":"","sources":["../../src/capabilities/builtin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,8BAA8B,GAUvC,MAAM,CAAC,MAAM,CAAC;IACjB,cAAc,EAAE,yBAAyB;IACzC,cAAc,EAAE,yBAAyB;IACzC,kBAAkB,EAAE,6BAA6B;IACjD,uBAAuB,EAAE,kCAAkC;IAC3D,2BAA2B,EAAE,sCAAsC;IACnE,gBAAgB,EAAE,2BAA2B;CAC7C,CAAC,CAAC;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAsB;IACxD,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,gBAAgB;IAChB,uBAAuB;IACvB,2BAA2B;CAC3B,CAAC","sourcesContent":["/**\n * Suite short-id mapping for the first-party capability family (方案系统 M3,\n * docs/plans/方案实施计划.md §8).\n *\n * D-075 S4 (all four batches): every first-party capability has been split\n * out of the host — `builtin.goal`/`builtin.plan`/`builtin.todo-set`/\n * `builtin.session-share`/`builtin.subagent-delegate` and, with the fourth\n * batch, `builtin.memory` assemble from the independent `plugins/<name>`\n * packages through the install store (see\n * {@link BUILTIN_CAPABILITY_PACKAGE_IDS}). The host carries NO embedded\n * capability registry anymore — the retired `resolveBuiltinCapabilities`\n * assembly entry was deleted with its last sdk consumer (S5 embedded-path\n * retirement): unknown suite short ids surface as dangling diagnostics in\n * the sdk assembly chain, never as errors. The agent-dir config channel\n * (`<agentDir>/capabilities/<short-id>.json`) moved into the packages' own\n * entries; host services ride the public HostCapabilities\n * (`api.host.agentDir`/`communication`/`turnContext`/`roleAssociations`/\n * `memoryStorage`).\n */\n\n/**\n * Suite short ids (suite.json `capabilities`) that map onto INDEPENDENT plugin\n * packages after the S4 split (D-075 §6 S4, all four batches): none of them\n * have embedded implementations — they assemble from the corresponding\n * `plugins/<name>` packages through the install store (bootstrap factory\n * manifest or explicit `plugin install`).\n */\nexport const BUILTIN_CAPABILITY_PACKAGE_IDS: Readonly<\n\tRecord<\n\t\t| \"builtin.goal\"\n\t\t| \"builtin.plan\"\n\t\t| \"builtin.todo-set\"\n\t\t| \"builtin.session-share\"\n\t\t| \"builtin.subagent-delegate\"\n\t\t| \"builtin.memory\",\n\t\tstring\n\t>\n> = Object.freeze({\n\t\"builtin.goal\": \"agent-forge.plugin.goal\",\n\t\"builtin.plan\": \"agent-forge.plugin.plan\",\n\t\"builtin.todo-set\": \"agent-forge.plugin.todo-set\",\n\t\"builtin.session-share\": \"agent-forge.plugin.session-share\",\n\t\"builtin.subagent-delegate\": \"agent-forge.plugin.subagent-delegate\",\n\t\"builtin.memory\": \"agent-forge.plugin.memory\",\n});\n\n/** Suite short ids (suite.json `capabilities`) of the builtin capability family. */\nexport const BUILTIN_CAPABILITY_IDS: readonly string[] = [\n\t\"builtin.goal\",\n\t\"builtin.plan\",\n\t\"builtin.todo-set\",\n\t\"builtin.memory\",\n\t\"builtin.session-share\",\n\t\"builtin.subagent-delegate\",\n];\n"]}
@@ -354,6 +354,7 @@ export declare class InteractiveMode implements DialogUiHost, authFlow.AuthUiHos
354
354
  private handleClipboardPaste;
355
355
  private handleStartupSubmit;
356
356
  private setupEditorSubmitHandler;
357
+ private dispatchCommandOrBash;
357
358
  /**
358
359
  * Run a /command through COMMAND_DISPATCH_ENTRIES. Returns undefined when
359
360
  * text is not a registered command; otherwise the command has been fully