@agentxm/client-core 0.5.0 → 0.5.1
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/agents/augment/service.d.ts.map +1 -1
- package/dist/src/unstable/agents/augment/service.js +12 -8
- package/dist/src/unstable/agents/augment/service.js.map +1 -1
- package/dist/src/unstable/agents/coding-agent.d.ts +1 -1
- package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
- package/dist/src/unstable/agents/coding-agent.js +1 -1
- package/dist/src/unstable/agents/coding-agent.js.map +1 -1
- package/dist/src/unstable/agents/command-sync.d.ts +2 -2
- package/dist/src/unstable/agents/command-sync.d.ts.map +1 -1
- package/dist/src/unstable/agents/command-sync.js +44 -23
- package/dist/src/unstable/agents/command-sync.js.map +1 -1
- package/dist/src/unstable/agents/detection.js +3 -3
- package/dist/src/unstable/agents/detection.js.map +1 -1
- package/dist/src/unstable/agents/index.d.ts +1 -1
- package/dist/src/unstable/agents/index.d.ts.map +1 -1
- package/dist/src/unstable/agents/index.js +1 -1
- package/dist/src/unstable/agents/index.js.map +1 -1
- package/dist/src/unstable/agents/mcp-sync.d.ts.map +1 -1
- package/dist/src/unstable/agents/mcp-sync.js +14 -20
- package/dist/src/unstable/agents/mcp-sync.js.map +1 -1
- package/dist/src/unstable/agents/repository.js +2 -2
- package/dist/src/unstable/agents/repository.js.map +1 -1
- package/dist/src/unstable/agents/subagent-sync.js +14 -14
- package/dist/src/unstable/agents/subagent-sync.js.map +1 -1
- package/dist/src/unstable/app-error/app-error.d.ts +10 -9
- package/dist/src/unstable/app-error/app-error.d.ts.map +1 -1
- package/dist/src/unstable/app-error/app-error.js +37 -4
- package/dist/src/unstable/app-error/app-error.js.map +1 -1
- package/dist/src/unstable/app-error/builders.d.ts +21 -0
- package/dist/src/unstable/app-error/builders.d.ts.map +1 -0
- package/dist/src/unstable/app-error/builders.js +46 -0
- package/dist/src/unstable/app-error/builders.js.map +1 -0
- package/dist/src/unstable/app-error/index.d.ts +2 -1
- package/dist/src/unstable/app-error/index.d.ts.map +1 -1
- package/dist/src/unstable/app-error/index.js +2 -1
- package/dist/src/unstable/app-error/index.js.map +1 -1
- package/dist/src/unstable/app-error/render.d.ts.map +1 -1
- package/dist/src/unstable/app-error/render.js +6 -24
- package/dist/src/unstable/app-error/render.js.map +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
- package/dist/src/unstable/auth/auth-client.js +76 -42
- package/dist/src/unstable/auth/auth-client.js.map +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
- package/dist/src/unstable/auth/credential-store.js +22 -24
- package/dist/src/unstable/auth/credential-store.js.map +1 -1
- package/dist/src/unstable/auth/device-login.d.ts +1 -1
- package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
- package/dist/src/unstable/auth/device-login.js +1 -1
- package/dist/src/unstable/auth/device-login.js.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.js +1 -1
- package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
- package/dist/src/unstable/auth/guard.d.ts.map +1 -1
- package/dist/src/unstable/auth/guard.js +5 -9
- package/dist/src/unstable/auth/guard.js.map +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/login-interaction.js +1 -1
- package/dist/src/unstable/auth/login-interaction.js.map +1 -1
- package/dist/src/unstable/auth/registry-url.d.ts +1 -1
- package/dist/src/unstable/auth/registry-url.js +1 -1
- package/dist/src/unstable/auth/registry-url.js.map +1 -1
- package/dist/src/unstable/auth/token-resolution.d.ts +1 -1
- package/dist/src/unstable/auth/token-resolution.d.ts.map +1 -1
- package/dist/src/unstable/auth/token-resolution.js +6 -10
- package/dist/src/unstable/auth/token-resolution.js.map +1 -1
- package/dist/src/unstable/cli/prompt/helpers.d.ts +1 -1
- package/dist/src/unstable/cli/prompt/helpers.js +3 -3
- package/dist/src/unstable/cli/prompt/helpers.js.map +1 -1
- package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
- package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js +128 -9
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.js +45 -10
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts +2 -0
- package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-test.js +80 -21
- package/dist/src/unstable/cli-renderer/cli-renderer-test.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +32 -7
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
- package/dist/src/unstable/cli-renderer/entity-registry.d.ts +15 -0
- package/dist/src/unstable/cli-renderer/entity-registry.d.ts.map +1 -0
- package/dist/src/unstable/cli-renderer/entity-registry.js +17 -0
- package/dist/src/unstable/cli-renderer/entity-registry.js.map +1 -0
- package/dist/src/unstable/cli-renderer/index.d.ts +2 -1
- package/dist/src/unstable/cli-renderer/index.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/index.js +1 -0
- package/dist/src/unstable/cli-renderer/index.js.map +1 -1
- package/dist/src/unstable/cli-runtime/breadcrumb.d.ts +9 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.d.ts.map +1 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.js +12 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.js.map +1 -0
- package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js +3 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.d.ts +2 -0
- package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.js +42 -3
- package/dist/src/unstable/cli-runtime/handle-error.js.map +1 -1
- package/dist/src/unstable/cli-runtime/index.d.ts +4 -4
- package/dist/src/unstable/cli-runtime/index.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/index.js +3 -3
- package/dist/src/unstable/cli-runtime/index.js.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts +50 -11
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.js +57 -15
- package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.d.ts +9 -8
- package/dist/src/unstable/cli-runtime/output-mode.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.js +11 -7
- package/dist/src/unstable/cli-runtime/output-mode.js.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.js +52 -5
- package/dist/src/unstable/cli-runtime/runtime-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts +2 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.js +4 -4
- package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
- package/dist/src/unstable/commands/command-argument.d.ts +2 -2
- package/dist/src/unstable/commands/command-argument.js +2 -2
- package/dist/src/unstable/commands/command-content.d.ts +11 -24
- package/dist/src/unstable/commands/command-content.d.ts.map +1 -1
- package/dist/src/unstable/commands/command-content.js +34 -36
- package/dist/src/unstable/commands/command-content.js.map +1 -1
- package/dist/src/unstable/commands/index.d.ts +2 -1
- package/dist/src/unstable/commands/index.d.ts.map +1 -1
- package/dist/src/unstable/commands/index.js +1 -0
- package/dist/src/unstable/commands/index.js.map +1 -1
- package/dist/src/unstable/commands/manager.d.ts +3 -2
- package/dist/src/unstable/commands/manager.d.ts.map +1 -1
- package/dist/src/unstable/commands/manager.js +62 -40
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts +0 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.js +0 -1
- package/dist/src/unstable/commands/manifest-schema.js.map +1 -1
- package/dist/src/unstable/commands/operations/disable.js +2 -2
- package/dist/src/unstable/commands/operations/disable.js.map +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/enable.js +21 -11
- package/dist/src/unstable/commands/operations/enable.js.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts +4 -4
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.js +37 -36
- package/dist/src/unstable/commands/operations/install.js.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.d.ts +8 -3
- package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.js +67 -18
- package/dist/src/unstable/commands/operations/new-command.js.map +1 -1
- package/dist/src/unstable/commands/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/publish.js +23 -15
- package/dist/src/unstable/commands/operations/publish.js.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +10 -14
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.js +27 -37
- package/dist/src/unstable/commands/operations/shared-command-helpers.js.map +1 -1
- package/dist/src/unstable/commands/operations/uninstall.js +2 -2
- package/dist/src/unstable/commands/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/commands/paths.d.ts +64 -0
- package/dist/src/unstable/commands/paths.d.ts.map +1 -0
- package/dist/src/unstable/commands/paths.js +41 -0
- package/dist/src/unstable/commands/paths.js.map +1 -0
- package/dist/src/unstable/commands/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/commands/reconciliation-adapter.js +4 -5
- package/dist/src/unstable/commands/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/commands/renderers/index.d.ts +6 -5
- package/dist/src/unstable/commands/renderers/index.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/index.js +3 -2
- package/dist/src/unstable/commands/renderers/index.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-only.js +3 -28
- package/dist/src/unstable/commands/renderers/render-markdown-only.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js +5 -42
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-plain-text.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-plain-text.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-plain-text.js +8 -31
- package/dist/src/unstable/commands/renderers/render-plain-text.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-prompt-md.js +5 -33
- package/dist/src/unstable/commands/renderers/render-prompt-md.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-toml.d.ts +4 -5
- package/dist/src/unstable/commands/renderers/render-toml.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-toml.js +36 -51
- package/dist/src/unstable/commands/renderers/render-toml.js.map +1 -1
- package/dist/src/unstable/commands/renderers/types.d.ts +45 -39
- package/dist/src/unstable/commands/renderers/types.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/types.js +19 -1
- package/dist/src/unstable/commands/renderers/types.js.map +1 -1
- package/dist/src/unstable/extensions/agent-overrides.d.ts +45 -0
- package/dist/src/unstable/extensions/agent-overrides.d.ts.map +1 -0
- package/dist/src/unstable/extensions/agent-overrides.js +66 -0
- package/dist/src/unstable/extensions/agent-overrides.js.map +1 -0
- package/dist/src/unstable/extensions/common.js +2 -2
- package/dist/src/unstable/extensions/common.js.map +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts.map +1 -1
- package/dist/src/unstable/extensions/fqn.js +8 -4
- package/dist/src/unstable/extensions/fqn.js.map +1 -1
- package/dist/src/unstable/extensions/frontmatter.d.ts.map +1 -1
- package/dist/src/unstable/extensions/frontmatter.js +8 -4
- package/dist/src/unstable/extensions/frontmatter.js.map +1 -1
- package/dist/src/unstable/extensions/index.d.ts +2 -0
- package/dist/src/unstable/extensions/index.d.ts.map +1 -1
- package/dist/src/unstable/extensions/index.js +2 -0
- package/dist/src/unstable/extensions/index.js.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts +24 -0
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js +235 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -0
- package/dist/src/unstable/extensions/reconciliation-utils.js +2 -2
- package/dist/src/unstable/extensions/reconciliation-utils.js.map +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts.map +1 -1
- package/dist/src/unstable/extensions/utils.d.ts +1 -1
- package/dist/src/unstable/extensions/utils.d.ts.map +1 -1
- package/dist/src/unstable/extensions/utils.js +3 -3
- package/dist/src/unstable/extensions/utils.js.map +1 -1
- package/dist/src/unstable/git/operations.d.ts.map +1 -1
- package/dist/src/unstable/git/operations.js +2 -8
- package/dist/src/unstable/git/operations.js.map +1 -1
- package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
- package/dist/src/unstable/install-meta/install-meta.js +1 -1
- package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts +1 -1
- package/dist/src/unstable/install-method/install-method.js +1 -1
- package/dist/src/unstable/install-method/install-method.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts +4 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js +78 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace.js +2 -0
- package/dist/src/unstable/lint/catalog/workspace.js.map +1 -1
- package/dist/src/unstable/lockfile/lockfile.js +10 -10
- package/dist/src/unstable/lockfile/lockfile.js.map +1 -1
- package/dist/src/unstable/lockfile/resolved-version.js +7 -7
- package/dist/src/unstable/lockfile/resolved-version.js.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.js +18 -23
- package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.js +23 -31
- package/dist/src/unstable/mcp-servers/operations/install.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.js +14 -15
- package/dist/src/unstable/mcp-servers/operations/publish.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.js +10 -17
- package/dist/src/unstable/mcp-servers/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/mcp-servers/reconciliation-adapter.js +2 -2
- package/dist/src/unstable/mcp-servers/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.d.ts.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.js +6 -7
- package/dist/src/unstable/packs/dependency-resolution.js.map +1 -1
- package/dist/src/unstable/packs/expansion.js +3 -3
- package/dist/src/unstable/packs/expansion.js.map +1 -1
- package/dist/src/unstable/packs/manager.d.ts +1 -1
- package/dist/src/unstable/packs/manager.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.js +8 -10
- package/dist/src/unstable/packs/manager.js.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.js +16 -12
- package/dist/src/unstable/packs/operations/add-to-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.js +19 -15
- package/dist/src/unstable/packs/operations/install.js.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.js +14 -9
- package/dist/src/unstable/packs/operations/new-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/publish.js +14 -15
- package/dist/src/unstable/packs/operations/publish.js.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.js +16 -12
- package/dist/src/unstable/packs/operations/remove-from-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.js +3 -3
- package/dist/src/unstable/packs/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.js +10 -5
- package/dist/src/unstable/packs/operations/unpack.js.map +1 -1
- package/dist/src/unstable/plan/apply-plan.d.ts.map +1 -1
- package/dist/src/unstable/plan/apply-plan.js +5 -6
- package/dist/src/unstable/plan/apply-plan.js.map +1 -1
- package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -1
- package/dist/src/unstable/plan/resolve-plan.js +13 -9
- package/dist/src/unstable/plan/resolve-plan.js.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.d.ts +9 -14
- package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.js +13 -0
- package/dist/src/unstable/publish/manifest-policy.js.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts +1271 -51
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.js +403 -47
- package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
- package/dist/src/unstable/registry/error-mapping.d.ts +7 -6
- package/dist/src/unstable/registry/error-mapping.d.ts.map +1 -1
- package/dist/src/unstable/registry/error-mapping.js +44 -31
- package/dist/src/unstable/registry/error-mapping.js.map +1 -1
- package/dist/src/unstable/registry/index.d.ts +1 -1
- package/dist/src/unstable/registry/index.d.ts.map +1 -1
- package/dist/src/unstable/registry/index.js +1 -1
- package/dist/src/unstable/registry/index.js.map +1 -1
- package/dist/src/unstable/registry/local-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/local-client.js +44 -36
- package/dist/src/unstable/registry/local-client.js.map +1 -1
- package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/remote-client.js +86 -103
- package/dist/src/unstable/registry/remote-client.js.map +1 -1
- package/dist/src/unstable/registry/utils.js +8 -8
- package/dist/src/unstable/registry/utils.js.map +1 -1
- package/dist/src/unstable/settings/ignored-patterns.d.ts.map +1 -1
- package/dist/src/unstable/settings/ignored-patterns.js +13 -7
- package/dist/src/unstable/settings/ignored-patterns.js.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts +1 -1
- package/dist/src/unstable/settings/schema.js +1 -1
- package/dist/src/unstable/settings/settings.js +6 -6
- package/dist/src/unstable/settings/settings.js.map +1 -1
- package/dist/src/unstable/skills/index.d.ts +0 -2
- package/dist/src/unstable/skills/index.d.ts.map +1 -1
- package/dist/src/unstable/skills/index.js +0 -1
- package/dist/src/unstable/skills/index.js.map +1 -1
- package/dist/src/unstable/skills/manager.d.ts +1 -1
- package/dist/src/unstable/skills/manager.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.js +7 -14
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts +0 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.js +0 -1
- package/dist/src/unstable/skills/manifest-schema.js.map +1 -1
- package/dist/src/unstable/skills/materialization.d.ts.map +1 -1
- package/dist/src/unstable/skills/materialization.js +11 -12
- package/dist/src/unstable/skills/materialization.js.map +1 -1
- package/dist/src/unstable/skills/operations/copy.js +6 -6
- package/dist/src/unstable/skills/operations/copy.js.map +1 -1
- package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/disable.js +7 -5
- package/dist/src/unstable/skills/operations/disable.js.map +1 -1
- package/dist/src/unstable/skills/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/enable.js +5 -3
- package/dist/src/unstable/skills/operations/enable.js.map +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +19 -28
- package/dist/src/unstable/skills/operations/install.js.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.js +14 -9
- package/dist/src/unstable/skills/operations/new-skill.js.map +1 -1
- package/dist/src/unstable/skills/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/publish.js +26 -24
- package/dist/src/unstable/skills/operations/publish.js.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js +4 -4
- package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/source-resolution/index.d.ts +1 -0
- package/dist/src/unstable/source-resolution/index.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/index.js +1 -0
- package/dist/src/unstable/source-resolution/index.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js +4 -6
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git-hosting.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git-hosting.js +6 -8
- package/dist/src/unstable/source-resolution/providers/git-hosting.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git.js +4 -4
- package/dist/src/unstable/source-resolution/providers/git.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/github/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/github/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/gitlab/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/local.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/local.js +4 -5
- package/dist/src/unstable/source-resolution/providers/local.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js +5 -7
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.js +6 -7
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.js.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-identifier.d.ts +61 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.d.ts.map +1 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.js +322 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.js.map +1 -0
- package/dist/src/unstable/source-resolution/resolve-source-pattern.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source-pattern.js +10 -6
- package/dist/src/unstable/source-resolution/resolve-source-pattern.js.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.d.ts +2 -2
- package/dist/src/unstable/source-resolution/resolve-source.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.js +50 -73
- package/dist/src/unstable/source-resolution/resolve-source.js.map +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/service.js +1 -1
- package/dist/src/unstable/source-resolution/service.js.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.js +8 -8
- package/dist/src/unstable/sources/lock-entry-to-ref.js.map +1 -1
- package/dist/src/unstable/subagents/index.d.ts +3 -4
- package/dist/src/unstable/subagents/index.d.ts.map +1 -1
- package/dist/src/unstable/subagents/index.js +3 -5
- package/dist/src/unstable/subagents/index.js.map +1 -1
- package/dist/src/unstable/subagents/manager.d.ts +1 -1
- package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manager.js +51 -65
- package/dist/src/unstable/subagents/manager.js.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.d.ts +4 -7
- package/dist/src/unstable/subagents/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.js +5 -10
- package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.js +7 -5
- package/dist/src/unstable/subagents/operations/disable.js.map +1 -1
- package/dist/src/unstable/subagents/operations/enable.d.ts +1 -1
- package/dist/src/unstable/subagents/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/enable.js +39 -16
- package/dist/src/unstable/subagents/operations/enable.js.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.d.ts +1 -1
- package/dist/src/unstable/subagents/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.js +53 -52
- package/dist/src/unstable/subagents/operations/publish.js.map +1 -1
- package/dist/src/unstable/subagents/paths.d.ts +7 -1
- package/dist/src/unstable/subagents/paths.d.ts.map +1 -1
- package/dist/src/unstable/subagents/paths.js +7 -1
- package/dist/src/unstable/subagents/paths.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.d.ts +2 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.js +7 -39
- package/dist/src/unstable/subagents/rendering/adapters/json.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts +2 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js +17 -101
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts +5 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.js +18 -36
- package/dist/src/unstable/subagents/rendering/adapters/roo.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts +3 -2
- package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/toml.js +24 -54
- package/dist/src/unstable/subagents/rendering/adapters/toml.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/index.d.ts +1 -4
- package/dist/src/unstable/subagents/rendering/index.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/index.js +1 -2
- package/dist/src/unstable/subagents/rendering/index.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/overrides.d.ts +2 -0
- package/dist/src/unstable/subagents/rendering/overrides.d.ts.map +1 -0
- package/dist/src/unstable/subagents/rendering/overrides.js +2 -0
- package/dist/src/unstable/subagents/rendering/overrides.js.map +1 -0
- package/dist/src/unstable/subagents/rendering/types.d.ts +9 -16
- package/dist/src/unstable/subagents/rendering/types.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/types.js +3 -2
- package/dist/src/unstable/subagents/rendering/types.js.map +1 -1
- package/dist/src/unstable/subagents/subagent-content.d.ts +16 -56
- package/dist/src/unstable/subagents/subagent-content.d.ts.map +1 -1
- package/dist/src/unstable/subagents/subagent-content.js +69 -60
- package/dist/src/unstable/subagents/subagent-content.js.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +10 -10
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +8 -5
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
- package/dist/src/unstable/telemetry/client.d.ts +2 -2
- package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/client.js +5 -2
- package/dist/src/unstable/telemetry/client.js.map +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts +1 -1
- package/dist/src/unstable/update-check/update-check.js +1 -1
- package/dist/src/unstable/update-check/update-check.js.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.d.ts.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.js +11 -6
- package/dist/src/unstable/utils/build-zip-archive.js.map +1 -1
- package/dist/src/unstable/utils/create-symlink.js +8 -8
- package/dist/src/unstable/utils/create-symlink.js.map +1 -1
- package/dist/src/unstable/version-resolution/version-resolution.d.ts.map +1 -1
- package/dist/src/unstable/version-resolution/version-resolution.js +38 -21
- package/dist/src/unstable/version-resolution/version-resolution.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +101 -67
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js +3 -4
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/types.js +5 -8
- package/dist/src/unstable/workspace/configured-entry-resolution/types.js.map +1 -1
- package/dist/src/unstable/workspace/index.d.ts +1 -0
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.js +1 -0
- package/dist/src/unstable/workspace/index.js.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/initialization.d.ts +24 -24
- package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization.js +13 -11
- package/dist/src/unstable/workspace/initialization.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js +8 -9
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.js +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/discovery/skills.js +4 -4
- package/dist/src/unstable/workspace/read-model/discovery/skills.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/discovery/subagents.js +2 -2
- package/dist/src/unstable/workspace/read-model/discovery/subagents.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/extensions/subagent.js +1 -1
- package/dist/src/unstable/workspace/read-model/extensions/subagent.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js +11 -7
- package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js +12 -8
- package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/types.d.ts +2 -2
- package/dist/src/unstable/workspace/read-model/service.d.ts +1 -1
- package/dist/src/unstable/workspace/read-model/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/service.js +1 -1
- package/dist/src/unstable/workspace/read-model/service.js.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.js +13 -15
- package/dist/src/unstable/workspace/reconciliation.js.map +1 -1
- package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts +15 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts.map +1 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.js +58 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.js.map +1 -0
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/service-interface.d.ts +1 -3
- package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.js +1 -1
- package/dist/src/unstable/workspace/service-interface.js.map +1 -1
- package/dist/src/unstable/workspace/service.d.ts +46 -47
- package/dist/src/unstable/workspace/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service.js +24 -43
- package/dist/src/unstable/workspace/service.js.map +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.js +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.js.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.js +0 -1
- package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
- package/package.json +11 -11
- package/site-content/__generated__/schemas/command.schema.json +0 -6
- package/site-content/__generated__/schemas/skill.schema.json +1 -7
- package/dist/src/unstable/cli-runtime/command-document.d.ts +0 -12
- package/dist/src/unstable/cli-runtime/command-document.d.ts.map +0 -1
- package/dist/src/unstable/cli-runtime/command-document.js +0 -13
- package/dist/src/unstable/cli-runtime/command-document.js.map +0 -1
- package/dist/src/unstable/skills/operations/rename.d.ts +0 -34
- package/dist/src/unstable/skills/operations/rename.d.ts.map +0 -1
- package/dist/src/unstable/skills/operations/rename.js +0 -117
- package/dist/src/unstable/skills/operations/rename.js.map +0 -1
- package/dist/src/unstable/subagents/rendering/model-mapping.d.ts +0 -31
- package/dist/src/unstable/subagents/rendering/model-mapping.d.ts.map +0 -1
- package/dist/src/unstable/subagents/rendering/model-mapping.js +0 -127
- package/dist/src/unstable/subagents/rendering/model-mapping.js.map +0 -1
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts +0 -31
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts.map +0 -1
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.js +0 -169
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.js.map +0 -1
- package/dist/src/unstable/subagents/tool-access.d.ts +0 -11
- package/dist/src/unstable/subagents/tool-access.d.ts.map +0 -1
- package/dist/src/unstable/subagents/tool-access.js +0 -15
- package/dist/src/unstable/subagents/tool-access.js.map +0 -1
|
@@ -11,6 +11,7 @@ import * as FileSystem from "effect/FileSystem";
|
|
|
11
11
|
import * as Path from "effect/Path";
|
|
12
12
|
import * as Effect from "effect/Effect";
|
|
13
13
|
import * as Option from "effect/Option";
|
|
14
|
+
import * as Result from "effect/Result";
|
|
14
15
|
import * as Schema from "effect/Schema";
|
|
15
16
|
import { REGISTRY_EXTENSIONS_DIR, parseFqn } from "../../extensions/index.js";
|
|
16
17
|
import { SubagentManifestSchema, MANIFEST_FILENAME, } from "../manifest-schema.js";
|
|
@@ -18,7 +19,9 @@ import { createRegistryClient } from "../../registry/index.js";
|
|
|
18
19
|
import { buildZipArchive, computeIntegrity } from "../../utils/index.js";
|
|
19
20
|
import { makeAppError } from "../../app-error/index.js";
|
|
20
21
|
import { WorkspaceMutations } from "../../workspace/service-interface.js";
|
|
21
|
-
import {
|
|
22
|
+
import { validateManifestHasNoAgentsField } from "../../publish/manifest-policy.js";
|
|
23
|
+
import { parseSubagentMd } from "../subagent-content.js";
|
|
24
|
+
import { subagentContentFilename, subagentContentPath } from "../paths.js";
|
|
22
25
|
// -----------------------------------------------------------------------------
|
|
23
26
|
// Public API
|
|
24
27
|
// -----------------------------------------------------------------------------
|
|
@@ -26,7 +29,7 @@ import { parseSubagentMd, projectFrontmatterToManifest } from "../subagent-conte
|
|
|
26
29
|
* Publish-subagent operation handler.
|
|
27
30
|
*
|
|
28
31
|
* 1. Read and validate `subagent.json` manifest
|
|
29
|
-
* 2.
|
|
32
|
+
* 2. Validate the content file exists and its frontmatter `name` matches the manifest
|
|
30
33
|
* 3. Build zip archive of extension directory
|
|
31
34
|
* 4. Compute SRI integrity hash
|
|
32
35
|
* 5. Resolve target registry provider by source name
|
|
@@ -45,15 +48,15 @@ export const publishSubagent = (op) => Effect.gen(function* () {
|
|
|
45
48
|
.pipe(Effect.orElseSucceed(() => false));
|
|
46
49
|
if (!extensionDirExists) {
|
|
47
50
|
return yield* makeAppError({
|
|
48
|
-
code: "
|
|
49
|
-
|
|
51
|
+
code: "not_found",
|
|
52
|
+
message: `Managed subagent not found: ${extensionDir}`,
|
|
50
53
|
});
|
|
51
54
|
}
|
|
52
55
|
// Read and validate manifest
|
|
53
56
|
const manifestPath = path.join(extensionDir, MANIFEST_FILENAME);
|
|
54
57
|
const manifestContent = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((e) => makeAppError({
|
|
55
|
-
code: "
|
|
56
|
-
|
|
58
|
+
code: "internal",
|
|
59
|
+
message: `Failed to read manifest: ${manifestPath}`,
|
|
57
60
|
cause: e,
|
|
58
61
|
})));
|
|
59
62
|
const manifestJson = yield* Effect.try({
|
|
@@ -62,64 +65,69 @@ export const publishSubagent = (op) => Effect.gen(function* () {
|
|
|
62
65
|
return parsed;
|
|
63
66
|
},
|
|
64
67
|
catch: (e) => makeAppError({
|
|
65
|
-
code: "
|
|
66
|
-
|
|
68
|
+
code: "validation",
|
|
69
|
+
message: `Invalid JSON in manifest: ${manifestPath}`,
|
|
67
70
|
cause: e,
|
|
68
71
|
}),
|
|
69
72
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
const agentsFieldValidation = validateManifestHasNoAgentsField(MANIFEST_FILENAME, manifestJson);
|
|
74
|
+
if (Result.isFailure(agentsFieldValidation)) {
|
|
75
|
+
return yield* makeAppError({
|
|
76
|
+
code: "validation",
|
|
77
|
+
message: agentsFieldValidation.failure.detail,
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
const manifest = yield* Schema.decodeUnknownEffect(SubagentManifestSchema)(manifestJson).pipe(Effect.mapError((e) => makeAppError({
|
|
81
|
+
code: "validation",
|
|
82
|
+
message: `Invalid manifest schema: ${manifestPath}`,
|
|
73
83
|
cause: e,
|
|
74
84
|
})));
|
|
75
|
-
//
|
|
76
|
-
|
|
85
|
+
// Validate that the content file exists at the expected path and that its
|
|
86
|
+
// frontmatter `name` matches the manifest. The manifest is the source of
|
|
87
|
+
// truth for portable fields; this check just guards against drift.
|
|
88
|
+
const contentRoot = path.join(extensionDir, "src");
|
|
89
|
+
const expectedFilename = subagentContentFilename(manifest.name);
|
|
90
|
+
const contentPath = subagentContentPath(path.join, contentRoot, manifest.name);
|
|
77
91
|
const contentExists = yield* fs.exists(contentPath).pipe(Effect.orElseSucceed(() => false));
|
|
78
|
-
if (contentExists) {
|
|
79
|
-
|
|
80
|
-
code: "
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
...(projected.description !== undefined && { description: projected.description }),
|
|
90
|
-
...(projected.model !== undefined && { model: projected.model }),
|
|
91
|
-
...(projected.toolAccess !== undefined && { toolAccess: projected.toolAccess }),
|
|
92
|
-
...(projected.background !== undefined && { background: projected.background }),
|
|
93
|
-
};
|
|
94
|
-
// Write synced manifest back to disk
|
|
95
|
-
yield* fs.writeFileString(manifestPath, JSON.stringify(manifest, null, 2) + "\n").pipe(Effect.mapError((e) => makeAppError({
|
|
96
|
-
code: "PUBLISH_SUBAGENT_MANIFEST_WRITE_FAILED",
|
|
97
|
-
what: `Failed to write synced manifest: ${manifestPath}`,
|
|
98
|
-
cause: e,
|
|
99
|
-
})));
|
|
100
|
-
}
|
|
92
|
+
if (!contentExists) {
|
|
93
|
+
return yield* makeAppError({
|
|
94
|
+
code: "not_found",
|
|
95
|
+
message: `Missing subagent content file: expected ${expectedFilename}`,
|
|
96
|
+
breadcrumbs: [
|
|
97
|
+
{
|
|
98
|
+
task: "Recover",
|
|
99
|
+
description: `Rename the subagent content file to ${expectedFilename} and ensure its frontmatter name is ${manifest.name}.`,
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
});
|
|
101
103
|
}
|
|
104
|
+
const rawContent = yield* fs.readFileString(contentPath).pipe(Effect.mapError((e) => makeAppError({
|
|
105
|
+
code: "internal",
|
|
106
|
+
message: `Failed to read ${expectedFilename}: ${contentPath}`,
|
|
107
|
+
cause: e,
|
|
108
|
+
})));
|
|
109
|
+
yield* parseSubagentMd(rawContent, manifest.name);
|
|
102
110
|
// Build zip archive from extension directory (includes manifest + src/)
|
|
103
111
|
const archive = yield* buildZipArchive(extensionDir, "PUBLISH_SUBAGENT_ARCHIVE_FAILED");
|
|
104
112
|
// Compute integrity
|
|
105
113
|
const integrity = yield* computeIntegrity(archive);
|
|
106
114
|
// Resolve target registry source
|
|
107
115
|
const registrySource = yield* ws.getConfiguredSourceByName(op.args.registryName).pipe(Effect.mapError((e) => makeAppError({
|
|
108
|
-
code: "
|
|
109
|
-
|
|
116
|
+
code: "internal",
|
|
117
|
+
message: `Failed to lookup registry source "${op.args.registryName}"`,
|
|
110
118
|
cause: e,
|
|
111
119
|
})));
|
|
112
120
|
if (Option.isNone(registrySource)) {
|
|
113
121
|
return yield* makeAppError({
|
|
114
|
-
code: "
|
|
115
|
-
|
|
122
|
+
code: "not_found",
|
|
123
|
+
message: `Registry source "${op.args.registryName}" not found or not a registry source`,
|
|
116
124
|
});
|
|
117
125
|
}
|
|
118
126
|
const source = registrySource.value;
|
|
119
127
|
if (source.type !== "registry") {
|
|
120
128
|
return yield* makeAppError({
|
|
121
|
-
code: "
|
|
122
|
-
|
|
129
|
+
code: "not_found",
|
|
130
|
+
message: `Registry source "${op.args.registryName}" not found or not a registry source`,
|
|
123
131
|
});
|
|
124
132
|
}
|
|
125
133
|
const registryUrl = source.location.href;
|
|
@@ -144,16 +152,9 @@ export const publishSubagent = (op) => Effect.gen(function* () {
|
|
|
144
152
|
metadata: versionEntry,
|
|
145
153
|
})
|
|
146
154
|
.pipe(Effect.mapError((e) => makeAppError({
|
|
147
|
-
code: "
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
`Registry source: ${op.args.registryName}`,
|
|
151
|
-
`Registry URL: ${registryUrl}`,
|
|
152
|
-
`Extension: ${op.args.name}@${manifest.version}`,
|
|
153
|
-
`Registry error: ${e.what} (${e.code})`,
|
|
154
|
-
...e.details,
|
|
155
|
-
],
|
|
156
|
-
...(Option.isSome(e.howToFix) && { howToFix: e.howToFix.value }),
|
|
155
|
+
code: "network",
|
|
156
|
+
message: `Registry publish did not complete "${op.args.registryName}"`,
|
|
157
|
+
breadcrumbs: e.breadcrumbs ?? [],
|
|
157
158
|
cause: e,
|
|
158
159
|
})));
|
|
159
160
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../../../../src/unstable/subagents/operations/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAA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CAAC;QAChB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,OAAO;QACP,QAAQ,EAAE,YAAY;KACvB,CAAC;SACD,IAAI,CACH,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CACpB,YAAY,CAAC;QACX,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,sCAAsC,EAAE,CAAC,IAAI,CAAC,YAAY,GAAG;QACtE,WAAW,EAAE,CAAC,CAAC,WAAW,IAAI,EAAE;QAChC,KAAK,EAAE,CAAC;KACT,CAAC,CACH,CACF,CAAC;IAEJ,OAAO;QACL,MAAM,EAAE,SAAS;QACjB,OAAO,EAAE,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,EAAE;KACjC,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
|
@@ -42,7 +42,13 @@ export interface SubagentDirPaths {
|
|
|
42
42
|
*
|
|
43
43
|
* @experimental This API is unstable and may change without notice.
|
|
44
44
|
*/
|
|
45
|
-
export declare const
|
|
45
|
+
export declare const subagentContentFilename: (name: string) => string;
|
|
46
|
+
/**
|
|
47
|
+
* Content path for subagent instructions.
|
|
48
|
+
*
|
|
49
|
+
* @experimental This API is unstable and may change without notice.
|
|
50
|
+
*/
|
|
51
|
+
export declare const subagentContentPath: (join: (...paths: string[]) => string, root: string, name: string) => string;
|
|
46
52
|
/**
|
|
47
53
|
* Pure function to compute subagent directory paths.
|
|
48
54
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEtD;;;;;;;GAOG;AACH,MAAM,MAAM,k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pC,MAAM,MAAM,EACZ,QAAQ,kBAAkB,EAC1B,eAAe,MAAM,KACpB,gBAaF,CAAC"}
|
|
@@ -12,7 +12,13 @@ import { EXTERNAL_EXTENSIONS_DIR, REGISTRY_EXTENSIONS_DIR } from "../extensions/
|
|
|
12
12
|
*
|
|
13
13
|
* @experimental This API is unstable and may change without notice.
|
|
14
14
|
*/
|
|
15
|
-
export const
|
|
15
|
+
export const subagentContentFilename = (name) => `${name}.md`;
|
|
16
|
+
/**
|
|
17
|
+
* Content path for subagent instructions.
|
|
18
|
+
*
|
|
19
|
+
* @experimental This API is unstable and may change without notice.
|
|
20
|
+
*/
|
|
21
|
+
export const subagentContentPath = (join, root, name) => join(root, subagentContentFilename(name));
|
|
16
22
|
/**
|
|
17
23
|
* Pure function to compute subagent directory paths.
|
|
18
24
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAgC1F;;;;GAIG;AACH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../../src/unstable/subagents/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAgC1F;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,GAAG,IAAI,KAAK,CAAC;AAE9E;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,IAAoC,EACpC,IAAY,EACZ,IAAY,EACJ,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAoC,EACpC,IAAY,EACZ,MAA0B,EAC1B,aAAqB,EACH,EAAE;IACpB,IAAI,MAAM,CAAC,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,MAAM,aAAa,GAAG,IAAI,CACxB,IAAI,EACJ,uBAAuB,EACvB,MAAM,CAAC,KAAK,EACZ,WAAW,EACX,aAAa,CACd,CAAC;QACF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,IAAI,CAAC,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC;IACxE,CAAC;IACD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,aAAa,CAAC,CAAC;IACtF,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC;AAC3D,CAAC,CAAC"}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* JSON adapter for subagent rendering.
|
|
3
3
|
*
|
|
4
4
|
* For: Kiro CLI.
|
|
5
|
-
*
|
|
5
|
+
* Emits the user's frontmatter keys as a JSON object and the body as the
|
|
6
|
+
* `prompt` field. `agentOverrides[kiro]` is merged on top.
|
|
6
7
|
*
|
|
7
8
|
* @experimental This API is unstable and may change without notice.
|
|
8
9
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAM7F;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,mBAAmB,KAAG,qBAOvD,CAAC"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
* JSON adapter for subagent rendering.
|
|
3
3
|
*
|
|
4
4
|
* For: Kiro CLI.
|
|
5
|
-
*
|
|
5
|
+
* Emits the user's frontmatter keys as a JSON object and the body as the
|
|
6
|
+
* `prompt` field. `agentOverrides[kiro]` is merged on top.
|
|
6
7
|
*
|
|
7
8
|
* @experimental This API is unstable and may change without notice.
|
|
8
9
|
*/
|
|
9
10
|
import * as Schema from "effect/Schema";
|
|
10
|
-
import {
|
|
11
|
-
import { mapToolAccess } from "../tool-access-mapping.js";
|
|
11
|
+
import { applyOverrides } from "../overrides.js";
|
|
12
12
|
import { rendered } from "../types.js";
|
|
13
13
|
const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schema.brand("RenderedFilePath")));
|
|
14
14
|
/**
|
|
@@ -17,42 +17,10 @@ const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schem
|
|
|
17
17
|
* @experimental This API is unstable and may change without notice.
|
|
18
18
|
*/
|
|
19
19
|
export const renderJson = (input) => {
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
description: input.description,
|
|
24
|
-
prompt: input.body,
|
|
25
|
-
};
|
|
26
|
-
// Model mapping
|
|
27
|
-
const modelResult = mapModelTier(input.model, "kiro");
|
|
28
|
-
if (modelResult.value !== undefined) {
|
|
29
|
-
obj["model"] = modelResult.value;
|
|
30
|
-
}
|
|
31
|
-
if (modelResult.warning !== undefined) {
|
|
32
|
-
warnings.push(modelResult.warning);
|
|
33
|
-
}
|
|
34
|
-
// Tool access mapping
|
|
35
|
-
const toolResult = mapToolAccess(input.toolAccess, "kiro");
|
|
36
|
-
for (const [key, value] of Object.entries(toolResult.fields)) {
|
|
37
|
-
obj[key] = value;
|
|
38
|
-
}
|
|
39
|
-
warnings.push(...toolResult.warnings);
|
|
40
|
-
// Background — Kiro does not support background mode
|
|
41
|
-
if (input.background === true) {
|
|
42
|
-
warnings.push({
|
|
43
|
-
agent: "kiro",
|
|
44
|
-
feature: "background",
|
|
45
|
-
message: "Kiro CLI does not support background mode; background: true will be ignored",
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
// Apply agent-specific overrides on top
|
|
49
|
-
if (input.agentOverrides !== undefined) {
|
|
50
|
-
for (const [key, value] of Object.entries(input.agentOverrides)) {
|
|
51
|
-
obj[key] = value;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
const content = JSON.stringify(obj, null, 2);
|
|
20
|
+
const base = { ...input.frontmatter, prompt: input.body };
|
|
21
|
+
const merged = applyOverrides(base, input.agentOverrides);
|
|
22
|
+
const content = JSON.stringify(merged, null, 2);
|
|
55
23
|
const path = decodeRenderedFilePath(`.kiro/agents/${input.name}.json`);
|
|
56
|
-
return rendered([{ content, path }],
|
|
24
|
+
return rendered([{ content, path }], []);
|
|
57
25
|
};
|
|
58
26
|
//# sourceMappingURL=json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"json.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/json.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAwD,MAAM,aAAa,CAAC;AAE7F,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,CACrD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CACrD,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA0B,EAAyB,EAAE;IAC9E,MAAM,IAAI,GAA4B,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IACnF,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAC1D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,MAAM,IAAI,GAAG,sBAAsB,CAAC,gBAAgB,KAAK,CAAC,IAAI,OAAO,CAAC,CAAC;IAEvE,OAAO,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC3C,CAAC,CAAC"}
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* For: Claude Code, Copilot, Cursor, Gemini CLI, OpenCode, Augment,
|
|
5
5
|
* Junie, Kilo Code, Kiro IDE.
|
|
6
6
|
*
|
|
7
|
-
* Produces `.md` with YAML frontmatter and body.
|
|
7
|
+
* Produces `.md` with YAML frontmatter and body. The user's frontmatter
|
|
8
|
+
* passes through verbatim; `agentOverrides[<agent-id>]` is merged on top.
|
|
8
9
|
*
|
|
9
10
|
* @experimental This API is unstable and may change without notice.
|
|
10
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-yaml.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"markdown-yaml.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,OAAO,EAAY,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAoB7F;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,OAAO,mBAAmB,KAAG,qBAa/D,CAAC"}
|
|
@@ -4,125 +4,41 @@
|
|
|
4
4
|
* For: Claude Code, Copilot, Cursor, Gemini CLI, OpenCode, Augment,
|
|
5
5
|
* Junie, Kilo Code, Kiro IDE.
|
|
6
6
|
*
|
|
7
|
-
* Produces `.md` with YAML frontmatter and body.
|
|
7
|
+
* Produces `.md` with YAML frontmatter and body. The user's frontmatter
|
|
8
|
+
* passes through verbatim; `agentOverrides[<agent-id>]` is merged on top.
|
|
8
9
|
*
|
|
9
10
|
* @experimental This API is unstable and may change without notice.
|
|
10
11
|
*/
|
|
11
12
|
import * as Schema from "effect/Schema";
|
|
12
13
|
import YAML from "yaml";
|
|
13
|
-
import {
|
|
14
|
-
import { mapToolAccess } from "../tool-access-mapping.js";
|
|
14
|
+
import { applyOverrides } from "../overrides.js";
|
|
15
15
|
import { rendered } from "../types.js";
|
|
16
16
|
const decodeRenderedFilePath = Schema.decodeUnknownSync(Schema.String.pipe(Schema.brand("RenderedFilePath")));
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
...DEFAULT_CONFIG,
|
|
28
|
-
agentsDir: ".claude/agents",
|
|
29
|
-
supportsBackground: true,
|
|
30
|
-
},
|
|
31
|
-
"github-copilot": {
|
|
32
|
-
...DEFAULT_CONFIG,
|
|
33
|
-
agentsDir: ".github/agents",
|
|
34
|
-
},
|
|
35
|
-
cursor: {
|
|
36
|
-
...DEFAULT_CONFIG,
|
|
37
|
-
agentsDir: ".cursor/agents",
|
|
38
|
-
supportsBackground: true,
|
|
39
|
-
},
|
|
40
|
-
"gemini-cli": {
|
|
41
|
-
...DEFAULT_CONFIG,
|
|
42
|
-
agentsDir: ".gemini/agents",
|
|
43
|
-
},
|
|
44
|
-
opencode: {
|
|
45
|
-
...DEFAULT_CONFIG,
|
|
46
|
-
agentsDir: ".opencode/agents",
|
|
47
|
-
},
|
|
48
|
-
augment: {
|
|
49
|
-
...DEFAULT_CONFIG,
|
|
50
|
-
agentsDir: ".augment/agents",
|
|
51
|
-
},
|
|
52
|
-
junie: {
|
|
53
|
-
...DEFAULT_CONFIG,
|
|
54
|
-
agentsDir: ".junie/agents",
|
|
55
|
-
},
|
|
56
|
-
"kilo-code": {
|
|
57
|
-
...DEFAULT_CONFIG,
|
|
58
|
-
agentsDir: ".kilo/agents",
|
|
59
|
-
},
|
|
60
|
-
kiro: {
|
|
61
|
-
...DEFAULT_CONFIG,
|
|
62
|
-
agentsDir: ".kiro/agents",
|
|
63
|
-
},
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Build the YAML frontmatter object from subagent input and agent config.
|
|
67
|
-
*/
|
|
68
|
-
const buildFrontmatterObject = (input, config, warnings) => {
|
|
69
|
-
const fm = {};
|
|
70
|
-
fm[config.descriptionField] = input.description;
|
|
71
|
-
// Model mapping
|
|
72
|
-
if (config.supportsModel) {
|
|
73
|
-
const modelResult = mapModelTier(input.model, input.agentId);
|
|
74
|
-
if (modelResult.value !== undefined) {
|
|
75
|
-
fm["model"] = modelResult.value;
|
|
76
|
-
}
|
|
77
|
-
if (modelResult.warning !== undefined) {
|
|
78
|
-
warnings.push(modelResult.warning);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
// Tool access mapping
|
|
82
|
-
const toolResult = mapToolAccess(input.toolAccess, input.agentId);
|
|
83
|
-
for (const [key, value] of Object.entries(toolResult.fields)) {
|
|
84
|
-
fm[key] = value;
|
|
85
|
-
}
|
|
86
|
-
warnings.push(...toolResult.warnings);
|
|
87
|
-
// Background
|
|
88
|
-
if (input.background === true) {
|
|
89
|
-
if (config.supportsBackground) {
|
|
90
|
-
fm["background"] = true;
|
|
91
|
-
}
|
|
92
|
-
else {
|
|
93
|
-
warnings.push({
|
|
94
|
-
agent: input.agentId,
|
|
95
|
-
feature: "background",
|
|
96
|
-
message: `${input.agentId} does not support background mode; "background: true" will be ignored`,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
// Apply agent-specific overrides on top of computed frontmatter
|
|
101
|
-
if (input.agentOverrides !== undefined) {
|
|
102
|
-
for (const [key, value] of Object.entries(input.agentOverrides)) {
|
|
103
|
-
fm[key] = value;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
return fm;
|
|
17
|
+
const AGENT_DIRS = {
|
|
18
|
+
"claude-code": ".claude/agents",
|
|
19
|
+
"github-copilot": ".github/agents",
|
|
20
|
+
cursor: ".cursor/agents",
|
|
21
|
+
"gemini-cli": ".gemini/agents",
|
|
22
|
+
opencode: ".opencode/agents",
|
|
23
|
+
augment: ".augment/agents",
|
|
24
|
+
junie: ".junie/agents",
|
|
25
|
+
"kilo-code": ".kilo/agents",
|
|
26
|
+
kiro: ".kiro/agents",
|
|
107
27
|
};
|
|
28
|
+
const resolveAgentsDir = (agentId) => AGENT_DIRS[agentId] ?? `.${agentId}/agents`;
|
|
108
29
|
/**
|
|
109
30
|
* Render a subagent as Markdown with YAML frontmatter.
|
|
110
31
|
*
|
|
111
32
|
* @experimental This API is unstable and may change without notice.
|
|
112
33
|
*/
|
|
113
34
|
export const renderMarkdownYaml = (input) => {
|
|
114
|
-
const
|
|
115
|
-
...DEFAULT_CONFIG,
|
|
116
|
-
agentsDir: `.${input.agentId}/agents`,
|
|
117
|
-
};
|
|
118
|
-
const warnings = [];
|
|
119
|
-
const fmObject = buildFrontmatterObject(input, config, warnings);
|
|
35
|
+
const fmObject = applyOverrides(input.frontmatter, input.agentOverrides);
|
|
120
36
|
const yamlStr = YAML.stringify(fmObject, { lineWidth: 0 }).trim();
|
|
121
37
|
const parts = [`---\n${yamlStr}\n---`];
|
|
122
38
|
if (input.body.length > 0) {
|
|
123
39
|
parts.push(input.body);
|
|
124
40
|
}
|
|
125
|
-
const path = decodeRenderedFilePath(`${
|
|
126
|
-
return rendered([{ content: parts.join("\n"), path }],
|
|
41
|
+
const path = decodeRenderedFilePath(`${resolveAgentsDir(input.agentId)}/${input.name}.md`);
|
|
42
|
+
return rendered([{ content: parts.join("\n"), path }], []);
|
|
127
43
|
};
|
|
128
44
|
//# sourceMappingURL=markdown-yaml.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdown-yaml.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"markdown-yaml.js","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/markdown-yaml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAwD,MAAM,aAAa,CAAC;AAE7F,MAAM,sBAAsB,GAAG,MAAM,CAAC,iBAAiB,CACrD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,CACrD,CAAC;AAEF,MAAM,UAAU,GAAqC;IACnD,aAAa,EAAE,gBAAgB;IAC/B,gBAAgB,EAAE,gBAAgB;IAClC,MAAM,EAAE,gBAAgB;IACxB,YAAY,EAAE,gBAAgB;IAC9B,QAAQ,EAAE,kBAAkB;IAC5B,OAAO,EAAE,iBAAiB;IAC1B,KAAK,EAAE,eAAe;IACtB,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,cAAc;CACrB,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,OAAe,EAAU,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,SAAS,CAAC;AAElG;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAA0B,EAAyB,EAAE;IACtF,MAAM,QAAQ,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IAEzE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IAClE,MAAM,KAAK,GAAkB,CAAC,QAAQ,OAAO,OAAO,CAAC,CAAC;IAEtD,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC;IAED,MAAM,IAAI,GAAG,sBAAsB,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC;IAE3F,OAAO,QAAQ,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC"}
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
* `settings/custom_modes.yaml` (user scope).
|
|
7
7
|
*
|
|
8
8
|
* The mode entry is a data structure — the actual file read-modify-write
|
|
9
|
-
* is handled separately.
|
|
9
|
+
* is handled separately. The user's frontmatter passes through verbatim,
|
|
10
|
+
* with structural Roo fields layered on top: `slug` is always
|
|
11
|
+
* `input.name`, the body splits into `roleDefinition` / `customInstructions`,
|
|
12
|
+
* and `groups` falls back to a sane default when not provided. Then
|
|
13
|
+
* `agentOverrides[roo-code]` is merged on top.
|
|
10
14
|
*
|
|
11
15
|
* @experimental This API is unstable and may change without notice.
|
|
12
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roo.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/roo.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"roo.d.ts","sourceRoot":"","sources":["../../../../../../src/unstable/subagents/rendering/adapters/roo.ts"],"names":[],"mapp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C,MAAM,EAAE,OAAO,CAAC,CAA0D,CAAC"}
|
|
@@ -6,24 +6,17 @@
|
|
|
6
6
|
* `settings/custom_modes.yaml` (user scope).
|
|
7
7
|
*
|
|
8
8
|
* The mode entry is a data structure — the actual file read-modify-write
|
|
9
|
-
* is handled separately.
|
|
9
|
+
* is handled separately. The user's frontmatter passes through verbatim,
|
|
10
|
+
* with structural Roo fields layered on top: `slug` is always
|
|
11
|
+
* `input.name`, the body splits into `roleDefinition` / `customInstructions`,
|
|
12
|
+
* and `groups` falls back to a sane default when not provided. Then
|
|
13
|
+
* `agentOverrides[roo-code]` is merged on top.
|
|
10
14
|
*
|
|
11
15
|
* @experimental This API is unstable and may change without notice.
|
|
12
16
|
*/
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
/** Default groups when tool access mapping returns no groups. */
|
|
17
|
+
import { applyOverrides } from "../overrides.js";
|
|
18
|
+
/** Default groups when the user does not specify any. */
|
|
16
19
|
const DEFAULT_GROUPS = ["read", "edit", "command", "mcp"];
|
|
17
|
-
/**
|
|
18
|
-
* Extract groups from tool access fields, falling back to default.
|
|
19
|
-
*/
|
|
20
|
-
const extractGroups = (fields) => {
|
|
21
|
-
const groups = fields["groups"];
|
|
22
|
-
if (Array.isArray(groups)) {
|
|
23
|
-
return groups.filter((g) => typeof g === "string");
|
|
24
|
-
}
|
|
25
|
-
return DEFAULT_GROUPS;
|
|
26
|
-
};
|
|
27
20
|
/**
|
|
28
21
|
* Split a body into roleDefinition (first paragraph) and customInstructions (rest).
|
|
29
22
|
*
|
|
@@ -43,6 +36,7 @@ export const splitBody = (body) => {
|
|
|
43
36
|
customInstructions: body.slice(blankLineIndex + 2).trim(),
|
|
44
37
|
};
|
|
45
38
|
};
|
|
39
|
+
const isStringArray = (value) => Array.isArray(value) && value.every((g) => typeof g === "string");
|
|
46
40
|
/**
|
|
47
41
|
* Build a Roo Code mode entry from a subagent render input.
|
|
48
42
|
*
|
|
@@ -53,35 +47,23 @@ export const splitBody = (body) => {
|
|
|
53
47
|
* @experimental This API is unstable and may change without notice.
|
|
54
48
|
*/
|
|
55
49
|
export const buildRooModeEntry = (input) => {
|
|
56
|
-
const warnings = [];
|
|
57
50
|
const { roleDefinition, customInstructions } = splitBody(input.body);
|
|
58
|
-
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
// Tool access → groups
|
|
64
|
-
const toolResult = mapToolAccess(input.toolAccess, "roo-code");
|
|
65
|
-
warnings.push(...toolResult.warnings);
|
|
66
|
-
const groups = extractGroups(toolResult.fields);
|
|
67
|
-
// Background — Roo does not support background mode
|
|
68
|
-
if (input.background === true) {
|
|
69
|
-
warnings.push({
|
|
70
|
-
agent: "roo-code",
|
|
71
|
-
feature: "background",
|
|
72
|
-
message: "Roo Code does not support background mode; background: true will be ignored",
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
const entry = {
|
|
51
|
+
const fmGroups = input.frontmatter["groups"];
|
|
52
|
+
const groups = isStringArray(fmGroups) ? fmGroups : DEFAULT_GROUPS;
|
|
53
|
+
const baseEntry = {
|
|
54
|
+
...input.frontmatter,
|
|
76
55
|
slug: input.name,
|
|
77
56
|
name: input.name,
|
|
78
57
|
roleDefinition,
|
|
79
58
|
...(customInstructions.length > 0 ? { customInstructions } : {}),
|
|
80
59
|
groups,
|
|
81
|
-
description: input.description,
|
|
82
|
-
...input.agentOverrides,
|
|
83
60
|
};
|
|
84
|
-
|
|
61
|
+
// Assertion needed: overrides may intentionally delete fields the
|
|
62
|
+
// RooModeEntry interface marks as required; mirrors the merge semantics
|
|
63
|
+
// applied uniformly across all subagent adapters.
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
65
|
+
const entry = applyOverrides(baseEntry, input.agentOverrides);
|
|
66
|
+
return { entry, warnings: [] };
|
|
85
67
|
};
|
|
86
68
|
/**
|
|
87
69
|
* Merge a mode entry into an existing modes array by slug.
|