@agentxm/client-core 0.5.1 → 0.5.2
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/mcp-sync.d.ts.map +1 -1
- package/dist/src/unstable/agents/mcp-sync.js +1 -0
- package/dist/src/unstable/agents/mcp-sync.js.map +1 -1
- package/dist/src/unstable/app-error/app-error.d.ts +77 -3
- package/dist/src/unstable/app-error/app-error.d.ts.map +1 -1
- package/dist/src/unstable/app-error/app-error.js +97 -30
- package/dist/src/unstable/app-error/app-error.js.map +1 -1
- package/dist/src/unstable/app-error/index.d.ts +1 -1
- package/dist/src/unstable/app-error/index.d.ts.map +1 -1
- package/dist/src/unstable/app-error/index.js +1 -1
- package/dist/src/unstable/app-error/index.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 +9 -9
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.js.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.d.ts +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js +2 -2
- package/dist/src/unstable/cli-runtime/handle-error.d.ts +3 -4
- package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.js +10 -20
- package/dist/src/unstable/cli-runtime/handle-error.js.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts +3 -6
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.js +3 -6
- package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.d.ts +0 -1
- package/dist/src/unstable/cli-runtime/output-mode.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.js +0 -1
- package/dist/src/unstable/cli-runtime/output-mode.js.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts +10 -0
- package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.js +32 -11
- package/dist/src/unstable/cli-runtime/runtime-envelope.js.map +1 -1
- package/dist/src/unstable/commands/command-content.d.ts +10 -0
- package/dist/src/unstable/commands/command-content.d.ts.map +1 -1
- package/dist/src/unstable/commands/command-content.js +17 -2
- package/dist/src/unstable/commands/command-content.js.map +1 -1
- package/dist/src/unstable/commands/manager.d.ts.map +1 -1
- package/dist/src/unstable/commands/manager.js +4 -3
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts +10 -7
- package/dist/src/unstable/commands/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.js +8 -6
- package/dist/src/unstable/commands/manifest-schema.js.map +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/enable.js +2 -1
- package/dist/src/unstable/commands/operations/enable.js.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.js +2 -1
- package/dist/src/unstable/commands/operations/install.js.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.js +5 -3
- 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 +8 -1
- package/dist/src/unstable/commands/operations/publish.js.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +10 -6
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.js +33 -7
- package/dist/src/unstable/commands/operations/shared-command-helpers.js.map +1 -1
- package/dist/src/unstable/commands/reconciliation-adapter.js +2 -2
- package/dist/src/unstable/commands/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/commands/registry-ref-builder.d.ts +2 -2
- package/dist/src/unstable/commands/registry-ref-builder.d.ts.map +1 -1
- package/dist/src/unstable/commands/registry-ref-builder.js.map +1 -1
- package/dist/src/unstable/discover/discover.js +5 -5
- package/dist/src/unstable/discover/discover.js.map +1 -1
- package/dist/src/unstable/extensions/common.d.ts +116 -22
- package/dist/src/unstable/extensions/common.d.ts.map +1 -1
- package/dist/src/unstable/extensions/common.js +185 -43
- package/dist/src/unstable/extensions/common.js.map +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts +3 -3
- package/dist/src/unstable/extensions/fqn.d.ts.map +1 -1
- package/dist/src/unstable/extensions/fqn.js +3 -3
- package/dist/src/unstable/extensions/fqn.js.map +1 -1
- package/dist/src/unstable/extensions/index.d.ts +2 -2
- package/dist/src/unstable/extensions/index.d.ts.map +1 -1
- package/dist/src/unstable/extensions/index.js +1 -1
- package/dist/src/unstable/extensions/index.js.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts +2 -2
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.js +4 -7
- package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -1
- package/dist/src/unstable/extensions/operations.d.ts +1 -1
- package/dist/src/unstable/extensions/operations.d.ts.map +1 -1
- package/dist/src/unstable/extensions/operations.js +1 -1
- package/dist/src/unstable/extensions/operations.js.map +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts +4 -7
- package/dist/src/unstable/extensions/ref-base.d.ts.map +1 -1
- package/dist/src/unstable/extensions/refs.d.ts +2 -2
- package/dist/src/unstable/extensions/refs.d.ts.map +1 -1
- package/dist/src/unstable/extensions/registry-source.d.ts +8 -8
- package/dist/src/unstable/extensions/registry-source.js +13 -13
- package/dist/src/unstable/extensions/registry-source.js.map +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.d.ts +4 -4
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js +9 -9
- package/dist/src/unstable/lint/catalog/pack/manifest-keys-recognized.js.map +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-present.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-present.js +6 -6
- package/dist/src/unstable/lint/catalog/pack/manifest-present.js.map +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts +5 -5
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js +9 -9
- package/dist/src/unstable/lint/catalog/pack/manifest-schema-valid.js.map +1 -1
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/pack-accessor/contexts.js +1 -1
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.d.ts +3 -3
- package/dist/src/unstable/lint/catalog/pack-accessor/platform.js +3 -3
- package/dist/src/unstable/lint/catalog/shared/schema-rule.js +1 -1
- package/dist/src/unstable/lint/catalog/shared/schema-rule.js.map +1 -1
- package/dist/src/unstable/lint/catalog/skill/manifest-present.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/skill/manifest-present.js +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/skill-accessor/vft.js +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js +1 -1
- package/dist/src/unstable/lint/catalog/workspace/helpers/registry-source.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js +1 -1
- package/dist/src/unstable/lint/catalog/workspace/packs-dependencies-resolved.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js +1 -1
- package/dist/src/unstable/lint/catalog/workspace/skills-lockfile-aligned.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace-fixtures/interpret-ops.js +3 -3
- package/dist/src/unstable/lint/catalog/workspace-fixtures/interpret-ops.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace-read-model/lint-workspace.d.ts +1 -1
- package/dist/src/unstable/lint/catalog/workspace-read-model/lint-workspace.js +1 -1
- package/dist/src/unstable/lint/context.d.ts +7 -7
- package/dist/src/unstable/lint/issues-to-findings.js +1 -1
- package/dist/src/unstable/lint/issues-to-findings.js.map +1 -1
- package/dist/src/unstable/lockfile/index.d.ts +2 -2
- package/dist/src/unstable/lockfile/index.d.ts.map +1 -1
- package/dist/src/unstable/lockfile/index.js +1 -1
- package/dist/src/unstable/lockfile/index.js.map +1 -1
- package/dist/src/unstable/lockfile/resolved-version.js +3 -3
- package/dist/src/unstable/lockfile/resolved-version.js.map +1 -1
- package/dist/src/unstable/lockfile/schema.d.ts +61 -61
- package/dist/src/unstable/lockfile/schema.d.ts.map +1 -1
- package/dist/src/unstable/lockfile/schema.js +20 -17
- package/dist/src/unstable/lockfile/schema.js.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.js +2 -2
- package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
- package/dist/src/unstable/mcp-servers/manifest-schema.d.ts +8 -4
- package/dist/src/unstable/mcp-servers/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/manifest-schema.js +6 -3
- package/dist/src/unstable/mcp-servers/manifest-schema.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.js +2 -2
- package/dist/src/unstable/mcp-servers/operations/install.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/mcp-servers/registry-ref-builder.d.ts +2 -2
- package/dist/src/unstable/mcp-servers/registry-ref-builder.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/registry-ref-builder.js.map +1 -1
- package/dist/src/unstable/packaging/axm-package-meta.d.ts +1 -1
- package/dist/src/unstable/packaging/axm-package-meta.js +2 -2
- package/dist/src/unstable/packaging/axm-package-meta.js.map +1 -1
- package/dist/src/unstable/packaging/package-type.d.ts +4 -0
- package/dist/src/unstable/packaging/package-type.d.ts.map +1 -1
- package/dist/src/unstable/packaging/package-type.js +17 -4
- package/dist/src/unstable/packaging/package-type.js.map +1 -1
- package/dist/src/unstable/packaging/package-url.d.ts +7 -1
- package/dist/src/unstable/packaging/package-url.d.ts.map +1 -1
- package/dist/src/unstable/packaging/package-url.js +38 -5
- package/dist/src/unstable/packaging/package-url.js.map +1 -1
- package/dist/src/unstable/packaging/read.d.ts +1 -1
- package/dist/src/unstable/packaging/read.d.ts.map +1 -1
- package/dist/src/unstable/packaging/types.d.ts +2 -2
- package/dist/src/unstable/packaging/types.d.ts.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.d.ts +3 -3
- package/dist/src/unstable/packs/dependency-resolution.d.ts.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.js +61 -22
- package/dist/src/unstable/packs/dependency-resolution.js.map +1 -1
- package/dist/src/unstable/packs/expansion.d.ts +14 -14
- package/dist/src/unstable/packs/expansion.d.ts.map +1 -1
- package/dist/src/unstable/packs/expansion.js +17 -17
- package/dist/src/unstable/packs/expansion.js.map +1 -1
- package/dist/src/unstable/packs/index.d.ts +22 -22
- package/dist/src/unstable/packs/index.d.ts.map +1 -1
- package/dist/src/unstable/packs/index.js +14 -14
- package/dist/src/unstable/packs/index.js.map +1 -1
- package/dist/src/unstable/packs/manager.d.ts +7 -7
- package/dist/src/unstable/packs/manager.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.js +26 -30
- package/dist/src/unstable/packs/manager.js.map +1 -1
- package/dist/src/unstable/packs/manifest-schema.d.ts +15 -16
- package/dist/src/unstable/packs/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/packs/manifest-schema.js +14 -15
- package/dist/src/unstable/packs/manifest-schema.js.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts +7 -7
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.js +18 -39
- package/dist/src/unstable/packs/operations/add-to-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/install.d.ts +17 -17
- package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.js +37 -32
- package/dist/src/unstable/packs/operations/install.js.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.d.ts +12 -12
- package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.js +29 -31
- package/dist/src/unstable/packs/operations/new-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/publish.d.ts +8 -8
- package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/publish.js +18 -29
- package/dist/src/unstable/packs/operations/publish.js.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts +7 -7
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.js +17 -24
- package/dist/src/unstable/packs/operations/remove-from-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.d.ts +11 -11
- package/dist/src/unstable/packs/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.js +17 -17
- package/dist/src/unstable/packs/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.d.ts +10 -10
- package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.js +37 -15
- package/dist/src/unstable/packs/operations/unpack.js.map +1 -1
- package/dist/src/unstable/packs/paths.d.ts +9 -9
- package/dist/src/unstable/packs/paths.d.ts.map +1 -1
- package/dist/src/unstable/packs/paths.js +7 -7
- package/dist/src/unstable/packs/paths.js.map +1 -1
- package/dist/src/unstable/packs/reconciliation-adapter.d.ts +1 -1
- package/dist/src/unstable/packs/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/packs/reconciliation-adapter.js +123 -65
- package/dist/src/unstable/packs/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/packs/refs.d.ts +5 -5
- package/dist/src/unstable/packs/refs.d.ts.map +1 -1
- package/dist/src/unstable/packs/refs.js +2 -2
- package/dist/src/unstable/plan/resolve-plan.js +2 -2
- package/dist/src/unstable/plan/resolve-plan.js.map +1 -1
- package/dist/src/unstable/publish/input-normalization.d.ts +3 -3
- package/dist/src/unstable/publish/input-normalization.d.ts.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.d.ts +44 -29
- package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.js +19 -8
- package/dist/src/unstable/publish/manifest-policy.js.map +1 -1
- package/dist/src/unstable/registry/client.d.ts +6 -6
- package/dist/src/unstable/registry/client.d.ts.map +1 -1
- package/dist/src/unstable/registry/client.js.map +1 -1
- package/dist/src/unstable/registry/discover-schema.d.ts +8 -6
- package/dist/src/unstable/registry/discover-schema.d.ts.map +1 -1
- package/dist/src/unstable/registry/discover-schema.js +2 -2
- package/dist/src/unstable/registry/discover-schema.js.map +1 -1
- package/dist/src/unstable/registry/local-client.js +7 -7
- package/dist/src/unstable/registry/local-client.js.map +1 -1
- package/dist/src/unstable/registry/remote-client.js +4 -4
- package/dist/src/unstable/registry/remote-client.js.map +1 -1
- package/dist/src/unstable/registry/schema.d.ts +9 -5
- package/dist/src/unstable/registry/schema.d.ts.map +1 -1
- package/dist/src/unstable/registry/schema.js +2 -2
- package/dist/src/unstable/registry/schema.js.map +1 -1
- package/dist/src/unstable/registry/utils.d.ts +1 -1
- package/dist/src/unstable/registry/utils.d.ts.map +1 -1
- package/dist/src/unstable/registry/utils.js +4 -4
- package/dist/src/unstable/registry/utils.js.map +1 -1
- package/dist/src/unstable/settings/index.d.ts +2 -2
- package/dist/src/unstable/settings/index.d.ts.map +1 -1
- package/dist/src/unstable/settings/index.js +1 -1
- package/dist/src/unstable/settings/index.js.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts +27 -27
- package/dist/src/unstable/settings/schema.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.js +57 -73
- package/dist/src/unstable/settings/schema.js.map +1 -1
- package/dist/src/unstable/skills/index.d.ts +1 -1
- package/dist/src/unstable/skills/index.d.ts.map +1 -1
- package/dist/src/unstable/skills/index.js +1 -1
- package/dist/src/unstable/skills/index.js.map +1 -1
- package/dist/src/unstable/skills/manager.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.js +5 -5
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts +8 -4
- package/dist/src/unstable/skills/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.js +6 -3
- package/dist/src/unstable/skills/manifest-schema.js.map +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +8 -8
- package/dist/src/unstable/skills/operations/install.js.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.js +3 -3
- package/dist/src/unstable/skills/operations/new-skill.js.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js +4 -6
- package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/skills/reconciliation-adapter.js +2 -2
- package/dist/src/unstable/skills/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/skills/registry-ref-builder.d.ts +2 -2
- package/dist/src/unstable/skills/registry-ref-builder.d.ts.map +1 -1
- package/dist/src/unstable/skills/registry-ref-builder.js.map +1 -1
- package/dist/src/unstable/skills/utils.d.ts +7 -7
- package/dist/src/unstable/skills/utils.d.ts.map +1 -1
- package/dist/src/unstable/skills/utils.js +6 -6
- package/dist/src/unstable/skills/utils.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.d.ts +2 -2
- 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 +11 -26
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.js.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-identifier.js +3 -3
- package/dist/src/unstable/source-resolution/resolve-identifier.js.map +1 -1
- package/dist/src/unstable/sources/index.d.ts +1 -1
- package/dist/src/unstable/sources/index.d.ts.map +1 -1
- package/dist/src/unstable/sources/index.js +1 -1
- package/dist/src/unstable/sources/index.js.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.d.ts +3 -3
- package/dist/src/unstable/sources/lock-entry-to-ref.d.ts.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.js +2 -5
- package/dist/src/unstable/sources/lock-entry-to-ref.js.map +1 -1
- package/dist/src/unstable/sources/parser.d.ts +2 -2
- package/dist/src/unstable/sources/parser.d.ts.map +1 -1
- package/dist/src/unstable/sources/parser.js +1 -1
- package/dist/src/unstable/sources/parser.js.map +1 -1
- package/dist/src/unstable/sources/provider.d.ts +2 -2
- package/dist/src/unstable/sources/provider.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.d.ts +8 -4
- package/dist/src/unstable/subagents/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.js +6 -3
- package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
- package/dist/src/unstable/subagents/reconciliation-adapter.js +2 -2
- package/dist/src/unstable/subagents/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/subagents/registry-ref-builder.d.ts +2 -2
- package/dist/src/unstable/subagents/registry-ref-builder.d.ts.map +1 -1
- package/dist/src/unstable/subagents/registry-ref-builder.js.map +1 -1
- package/dist/src/unstable/version-constraints/version-constraints.d.ts +30 -23
- package/dist/src/unstable/version-constraints/version-constraints.d.ts.map +1 -1
- package/dist/src/unstable/version-constraints/version-constraints.js +52 -43
- package/dist/src/unstable/version-constraints/version-constraints.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts +6 -6
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +23 -23
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/types.d.ts +4 -4
- package/dist/src/unstable/workspace/configured-entry-resolution/types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.d.ts +1 -1
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization.d.ts +20 -20
- package/dist/src/unstable/workspace/read-model/extensions/pack.d.ts +4 -4
- package/dist/src/unstable/workspace/read-model/extensions/pack.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/extensions/pack.js +2 -2
- package/dist/src/unstable/workspace/read-model/extensions/pack.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/service.js +2 -2
- package/dist/src/unstable/workspace/read-model/service.js.map +1 -1
- package/dist/src/unstable/workspace/read-model-record-readers.js +2 -2
- package/dist/src/unstable/workspace/read-model-record-readers.js.map +1 -1
- package/dist/src/unstable/workspace/reconciliation-types.d.ts +2 -2
- package/dist/src/unstable/workspace/reconciliation-types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.js.map +1 -1
- package/dist/src/unstable/workspace/service-interface.d.ts +17 -17
- package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.js.map +1 -1
- package/dist/src/unstable/workspace/service.d.ts +30 -30
- package/dist/src/unstable/workspace/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service.js +22 -26
- package/dist/src/unstable/workspace/service.js.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.d.ts +8 -8
- package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.js +16 -16
- package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
- package/dist/src/unstable/workspace/version-currency/check-currency.d.ts +5 -5
- package/dist/src/unstable/workspace/version-currency/check-currency.d.ts.map +1 -1
- package/dist/src/unstable/workspace/version-currency/check-currency.js +2 -2
- package/dist/src/unstable/workspace/version-currency/check-currency.js.map +1 -1
- package/dist/src/unstable/workspace/version-currency/collectors.d.ts +3 -3
- package/dist/src/unstable/workspace/version-currency/collectors.d.ts.map +1 -1
- package/dist/src/unstable/workspace/version-currency/collectors.js +2 -2
- package/dist/src/unstable/workspace/version-currency/collectors.js.map +1 -1
- package/dist/src/unstable/workspace/version-currency/test-stubs.js +2 -2
- package/dist/src/unstable/workspace/version-currency/test-stubs.js.map +1 -1
- package/package.json +2 -2
- package/site-content/__generated__/schemas/axm-lock.schema.json +54 -23
- package/site-content/__generated__/schemas/axm-package-meta.schema.json +13 -2
- package/site-content/__generated__/schemas/command.schema.json +122 -18
- package/site-content/__generated__/schemas/mcp-server.schema.json +123 -13
- package/site-content/__generated__/schemas/pack.schema.json +173 -0
- package/site-content/__generated__/schemas/settings.schema.json +107 -22
- package/site-content/__generated__/schemas/skill.schema.json +123 -13
- package/site-content/__generated__/schemas/subagent.schema.json +176 -0
- package/site-content/install.md +1 -1
- package/site-content/__generated__/schemas/extension-pack.schema.json +0 -103
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CliError } from "effect/unstable/cli";
|
|
2
|
-
import { AppError, exitCodeFor, renderAppError } from "../app-error/index.js";
|
|
2
|
+
import { AppError, ExitCode, exitCodeFor, renderAppError } from "../app-error/index.js";
|
|
3
3
|
import { isEffectCliExit } from "./effect-cli-exit.js";
|
|
4
4
|
import { makeJsonErrorEnvelope, makeJsonErrorEnvelopeFromAppError } from "./json-envelope.js";
|
|
5
5
|
const writeStderr = (message) => {
|
|
@@ -10,13 +10,13 @@ const writeStderr = (message) => {
|
|
|
10
10
|
*
|
|
11
11
|
* Channel routing per format:
|
|
12
12
|
* - text: human-readable to stderr only (no stdout pollution)
|
|
13
|
-
* - json: typed error JSON to stdout +
|
|
13
|
+
* - json: typed error JSON to stdout + NDJSON error event to stderr
|
|
14
14
|
* Exit codes:
|
|
15
15
|
* - ShowHelp (no errors) → 0 (help successfully displayed)
|
|
16
|
-
* - ShowHelp (with errors) →
|
|
16
|
+
* - ShowHelp (with errors) → 2 (usage — help shown due to invocation error)
|
|
17
17
|
* - EffectCliExit → custom exit code
|
|
18
18
|
* - CliError → 2 (usage/validation — bad flags, missing args)
|
|
19
|
-
* - Other →
|
|
19
|
+
* - Other → 10 (unexpected internal error)
|
|
20
20
|
*/
|
|
21
21
|
export const classifyError = (error, format) => {
|
|
22
22
|
if (isEffectCliExit(error)) {
|
|
@@ -36,68 +36,61 @@ export const classifyError = (error, format) => {
|
|
|
36
36
|
type: "error",
|
|
37
37
|
code: error.code,
|
|
38
38
|
message: error.message,
|
|
39
|
-
exitCode,
|
|
40
39
|
},
|
|
41
40
|
output: {
|
|
42
41
|
channel: "stdout",
|
|
43
|
-
content: JSON.stringify(makeJsonErrorEnvelopeFromAppError(error
|
|
42
|
+
content: JSON.stringify(makeJsonErrorEnvelopeFromAppError(error), null, 2) + "\n",
|
|
44
43
|
},
|
|
45
|
-
stderrMessage: `\u2717 ${error.message}`,
|
|
46
44
|
};
|
|
47
45
|
}
|
|
48
46
|
if (CliError.isCliError(error)) {
|
|
49
47
|
if (error._tag === "ShowHelp") {
|
|
50
|
-
return { exitCode: error.errors.length > 0 ?
|
|
48
|
+
return { exitCode: error.errors.length > 0 ? ExitCode.Usage : ExitCode.Success };
|
|
51
49
|
}
|
|
52
50
|
if (format !== "text") {
|
|
53
51
|
const message = "errors" in error && Array.isArray(error.errors) && error.errors.length > 0
|
|
54
52
|
? error.errors.map((e) => e.message ?? String(e)).join("; ")
|
|
55
53
|
: error.message;
|
|
56
54
|
return {
|
|
57
|
-
exitCode:
|
|
55
|
+
exitCode: ExitCode.Usage,
|
|
58
56
|
errorEvent: {
|
|
59
57
|
type: "error",
|
|
60
58
|
code: "usage",
|
|
61
59
|
message,
|
|
62
|
-
exitCode: 2,
|
|
63
60
|
},
|
|
64
61
|
output: {
|
|
65
62
|
channel: "stdout",
|
|
66
63
|
content: JSON.stringify(makeJsonErrorEnvelope({
|
|
67
64
|
code: "usage",
|
|
68
65
|
message,
|
|
69
|
-
exitCode: 2,
|
|
70
66
|
}), null, 2) + "\n",
|
|
71
67
|
},
|
|
72
68
|
};
|
|
73
69
|
}
|
|
74
|
-
return { exitCode:
|
|
70
|
+
return { exitCode: ExitCode.Usage };
|
|
75
71
|
}
|
|
76
72
|
const message = error instanceof Error ? error.message : String(error);
|
|
77
73
|
const code = "internal";
|
|
78
74
|
if (format === "text") {
|
|
79
75
|
return {
|
|
80
|
-
exitCode:
|
|
76
|
+
exitCode: ExitCode.Internal,
|
|
81
77
|
output: { channel: "stderr", content: `\u2717 ${message}` },
|
|
82
78
|
};
|
|
83
79
|
}
|
|
84
80
|
return {
|
|
85
|
-
exitCode:
|
|
81
|
+
exitCode: ExitCode.Internal,
|
|
86
82
|
errorEvent: {
|
|
87
83
|
type: "error",
|
|
88
84
|
code,
|
|
89
85
|
message,
|
|
90
|
-
exitCode: 1,
|
|
91
86
|
},
|
|
92
87
|
output: {
|
|
93
88
|
channel: "stdout",
|
|
94
89
|
content: JSON.stringify(makeJsonErrorEnvelope({
|
|
95
90
|
code,
|
|
96
91
|
message,
|
|
97
|
-
exitCode: 1,
|
|
98
92
|
}), null, 2) + "\n",
|
|
99
93
|
},
|
|
100
|
-
stderrMessage: `\u2717 ${message}`,
|
|
101
94
|
};
|
|
102
95
|
};
|
|
103
96
|
/**
|
|
@@ -113,9 +106,6 @@ export const handleError = (error, format) => {
|
|
|
113
106
|
writeStderr(JSON.stringify(result.errorEvent));
|
|
114
107
|
}
|
|
115
108
|
process.stdout.write(result.output.content);
|
|
116
|
-
if (result.stderrMessage) {
|
|
117
|
-
writeStderr(result.stderrMessage);
|
|
118
|
-
}
|
|
119
109
|
}
|
|
120
110
|
else {
|
|
121
111
|
writeStderr(result.output.content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-error.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/handle-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"handle-error.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/handle-error.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,iCAAiC,EAAE,MAAM,oBAAoB,CAAC;AAG9F,MAAM,WAAW,GAAG,CAAC,OAAe,EAAQ,EAAE;IAC5C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,CAAC;AAC1E,CAAC,CAAC;AAcF;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAA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AAC,SAAS,CACZ,qBAAqB,CAAC;gBACpB,IAAI;gBACJ,OAAO;aACR,CAAC,EACF,IAAI,EACJ,CAAC,CACF,GAAG,IAAI;SACX;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,MAAoB,EAAS,EAAE;IACzE,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAE5C,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClB,IAAI,MAAM,CAAC,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YACvC,IAAI,MAAM,KAAK,MAAM,IAAI,MAAM,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;gBACzD,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACjD,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9C,CAAC;aAAM,CAAC;YACN,WAAW,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;AAChC,CAAC,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { type AppError, type AppErrorCode } from "../app-error/index.js";
|
|
|
3
3
|
import { type Breadcrumb } from "./breadcrumb.js";
|
|
4
4
|
export declare const JsonErrorEnvelopeSchema: Schema.Struct<{
|
|
5
5
|
readonly ok: Schema.Literal<false>;
|
|
6
|
-
readonly code: Schema.Literals<readonly
|
|
6
|
+
readonly code: Schema.Literals<readonly ["issues", "usage", "not_found", "auth", "forbidden", "conflict", "rate_limit", "network", "validation", "internal"]>;
|
|
7
7
|
readonly message: Schema.String;
|
|
8
8
|
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
9
9
|
readonly task: Schema.String;
|
|
@@ -11,7 +11,6 @@ export declare const JsonErrorEnvelopeSchema: Schema.Struct<{
|
|
|
11
11
|
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
12
12
|
readonly cmd: Schema.optional<Schema.String>;
|
|
13
13
|
}>>>;
|
|
14
|
-
readonly exitCode: Schema.Number;
|
|
15
14
|
}>;
|
|
16
15
|
export type JsonErrorEnvelope = typeof JsonErrorEnvelopeSchema.Type;
|
|
17
16
|
export declare const JsonSuccessEnvelopeSchema: Schema.StructWithRest<Schema.Struct<{
|
|
@@ -36,7 +35,7 @@ export declare const JsonEnvelopeSchema: Schema.Union<readonly [Schema.StructWit
|
|
|
36
35
|
}>>>;
|
|
37
36
|
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.Struct<{
|
|
38
37
|
readonly ok: Schema.Literal<false>;
|
|
39
|
-
readonly code: Schema.Literals<readonly
|
|
38
|
+
readonly code: Schema.Literals<readonly ["issues", "usage", "not_found", "auth", "forbidden", "conflict", "rate_limit", "network", "validation", "internal"]>;
|
|
40
39
|
readonly message: Schema.String;
|
|
41
40
|
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
42
41
|
readonly task: Schema.String;
|
|
@@ -44,7 +43,6 @@ export declare const JsonEnvelopeSchema: Schema.Union<readonly [Schema.StructWit
|
|
|
44
43
|
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
45
44
|
readonly cmd: Schema.optional<Schema.String>;
|
|
46
45
|
}>>>;
|
|
47
|
-
readonly exitCode: Schema.Number;
|
|
48
46
|
}>]>;
|
|
49
47
|
export type JsonEnvelope = typeof JsonEnvelopeSchema.Type;
|
|
50
48
|
export declare const makeJsonSuccessEnvelope: (args?: {
|
|
@@ -56,7 +54,6 @@ export declare const makeJsonErrorEnvelope: (args: {
|
|
|
56
54
|
readonly code: AppErrorCode;
|
|
57
55
|
readonly message: string;
|
|
58
56
|
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
59
|
-
readonly exitCode: number;
|
|
60
57
|
}) => JsonErrorEnvelope;
|
|
61
|
-
export declare const makeJsonErrorEnvelopeFromAppError: (error: AppError
|
|
58
|
+
export declare const makeJsonErrorEnvelopeFromAppError: (error: AppError) => JsonErrorEnvelope;
|
|
62
59
|
//# sourceMappingURL=json-envelope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-envelope.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/json-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,
|
|
1
|
+
{"version":3,"file":"json-envelope.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/json-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAsB,KAAK,QAAQ,EAAE,KAAK,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAIpE,eAAO,MAAM,uBAAuB;;;;;;;;;;EASlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,uBAAuB,CAAC,IAAI,CAAC;AAEpE,eAAO,MAAM,yBAAyB;;;;;;;;;6DAWpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,yBAAyB,CAAC,IAAI,CAAC;AAExE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;IAO7B,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,OAAO,kBAAkB,CAAC,IAAI,CAAC;AAoB1D,eAAO,MAAM,uBAAuB,GAAI,OAAO;IAC7C,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAClD,KAAG,mBAWF,CAAC;AAEH,eAAO,MAAM,qBAAqB,GAAI,MAAM;IAC1C,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;CAClD,KAAG,iBAOF,CAAC;AAEH,eAAO,MAAM,iCAAiC,GAAI,OAAO,QAAQ,KAAG,iBAKhE,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import {
|
|
2
|
+
import { AppErrorCodeSchema } from "../app-error/index.js";
|
|
3
3
|
import { BreadcrumbSchema } from "./breadcrumb.js";
|
|
4
4
|
const ReservedSuccessEnvelopeKeys = new Set(["ok", "summary", "breadcrumbs"]);
|
|
5
5
|
export const JsonErrorEnvelopeSchema = Schema.Struct({
|
|
6
6
|
ok: Schema.Literal(false),
|
|
7
|
-
code:
|
|
7
|
+
code: AppErrorCodeSchema,
|
|
8
8
|
message: Schema.String,
|
|
9
9
|
breadcrumbs: Schema.optional(Schema.Array(BreadcrumbSchema)),
|
|
10
|
-
exitCode: Schema.Number,
|
|
11
10
|
}).annotate({
|
|
12
11
|
identifier: "JsonErrorEnvelope",
|
|
13
12
|
title: "JSON Error Envelope",
|
|
@@ -65,12 +64,10 @@ export const makeJsonErrorEnvelope = (args) => ({
|
|
|
65
64
|
...(args.breadcrumbs !== undefined && args.breadcrumbs.length > 0
|
|
66
65
|
? { breadcrumbs: [...args.breadcrumbs] }
|
|
67
66
|
: {}),
|
|
68
|
-
exitCode: args.exitCode,
|
|
69
67
|
});
|
|
70
|
-
export const makeJsonErrorEnvelopeFromAppError = (error
|
|
68
|
+
export const makeJsonErrorEnvelopeFromAppError = (error) => makeJsonErrorEnvelope({
|
|
71
69
|
code: error.code,
|
|
72
70
|
message: error.message,
|
|
73
71
|
breadcrumbs: error.breadcrumbs ?? [],
|
|
74
|
-
exitCode,
|
|
75
72
|
});
|
|
76
73
|
//# sourceMappingURL=json-envelope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-envelope.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/json-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"json-envelope.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/json-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAoC,MAAM,uBAAuB,CAAC;AAC7F,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AAEpE,MAAM,2BAA2B,GAAG,IAAI,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAE9E,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,CAAC;IACnD,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;IACzB,IAAI,EAAE,kBAAkB;IACxB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;CAC7D,CAAC,CAAC,QAAQ,CAAC;IACV,UAAU,EAAE,mBAAmB;IAC/B,KAAK,EAAE,qBAAqB;IAC5B,WAAW,EAAE,uEAAuE;CACrF,CAAC,CAAC;AAGH,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,cAAc,CAC5D,MAAM,CAAC,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC;IAC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AAW,IAAI,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -17,7 +17,6 @@ export declare const ErrorEventSchema: Schema.Struct<{
|
|
|
17
17
|
readonly type: Schema.Literal<"error">;
|
|
18
18
|
readonly code: Schema.String;
|
|
19
19
|
readonly message: Schema.String;
|
|
20
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
21
20
|
}>;
|
|
22
21
|
export type ErrorEvent = typeof ErrorEventSchema.Type;
|
|
23
22
|
export declare const BreadcrumbEventSchema: Schema.Struct<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-mode.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/output-mode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAe3C,eAAO,MAAM,mBAAmB;;;;;EAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAE5D,eAAO,MAAM,cAAc;;;;EAYzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAElD,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"output-mode.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/output-mode.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAMxC,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAe3C,eAAO,MAAM,mBAAmB;;;;;EAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAE5D,eAAO,MAAM,cAAc;;;;EAYzB,CAAC;AACH,MAAM,MAAM,QAAQ,GAAG,OAAO,cAAc,CAAC,IAAI,CAAC;AAElD,eAAO,MAAM,gBAAgB;;;;EAQ3B,CAAC;AACH,MAAM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AwD;AACxD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAkB,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as Cause from "effect/Cause";
|
|
1
2
|
import * as Effect from "effect/Effect";
|
|
2
3
|
import * as Layer from "effect/Layer";
|
|
3
4
|
import type { OutputFormat } from "./output-mode.js";
|
|
@@ -6,6 +7,15 @@ import type { PromptCancelled } from "../cli-prompt/prompt-cancelled.js";
|
|
|
6
7
|
import { type CliTelemetryConfigService } from "./telemetry-layer.js";
|
|
7
8
|
import { type CliRenderer } from "../cli-renderer/index.js";
|
|
8
9
|
import { Verbosity, type VerbosityLevel } from "../cli-flags/index.js";
|
|
10
|
+
/**
|
|
11
|
+
* Emit a defect (unhandled panic) to the appropriate channel.
|
|
12
|
+
*
|
|
13
|
+
* - text: human-readable message on stderr.
|
|
14
|
+
* - json: NDJSON `error` event on stderr + structured envelope on stdout.
|
|
15
|
+
*
|
|
16
|
+
* Exported for tests; production callers route through `withCliErrorHandling`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const writeDefect: (cause: Cause.Cause<unknown>, format: OutputFormat) => void;
|
|
9
19
|
export type ExpectedCliError = AppError | PromptCancelled;
|
|
10
20
|
export type CliRuntimeFoundation = CliRenderer | Verbosity;
|
|
11
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-envelope.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/runtime-envelope.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime-envelope.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/runtime-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,O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,CAAC;IAC9B,QAAQ,CAAC,eAAe,EAAE,yBAAyB,CAAC;CACrD,kbAiGF,CAAC;AAMF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,eAAe,EAAE,yBAAyB,CAAC;CACrD;AAED,eAAO,MAAM,cAAc,GAAI,CAAC,EAAE,CAAC,EACjC,SAAS,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,gBAAgB,EAAE,CAAC,CAAC,EAC9C,SAAS,qBAAqB,2fAY5B,CAAC"}
|
|
@@ -3,7 +3,7 @@ import * as Effect from "effect/Effect";
|
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
4
|
import * as Option from "effect/Option";
|
|
5
5
|
import { jsonFlag, debugFlag, verboseFlag, quietFlag } from "../cli-flags/index.js";
|
|
6
|
-
import { exitCodeFor, renderAppError } from "../app-error/index.js";
|
|
6
|
+
import { ExitCode, exitCodeFor, renderAppError } from "../app-error/index.js";
|
|
7
7
|
import { effectCliExit, isEffectCliExit } from "./effect-cli-exit.js";
|
|
8
8
|
import { resolveFormat } from "./resolve-format.js";
|
|
9
9
|
import { makeCliTelemetryLayer } from "./telemetry-layer.js";
|
|
@@ -11,7 +11,7 @@ import { readGlobalFlagProperties, reportCliDefect, reportCliError, trackCliComm
|
|
|
11
11
|
import { CommandArgv, serializeArgv } from "./command-argv.js";
|
|
12
12
|
import { InteractiveRenderer, MachineRenderer } from "../cli-renderer/index.js";
|
|
13
13
|
import { makeVerbosityLayer, Verbosity } from "../cli-flags/index.js";
|
|
14
|
-
import { makeJsonErrorEnvelopeFromAppError } from "./json-envelope.js";
|
|
14
|
+
import { makeJsonErrorEnvelope, makeJsonErrorEnvelopeFromAppError } from "./json-envelope.js";
|
|
15
15
|
const writeStderr = (message) => {
|
|
16
16
|
process.stderr.write(message.endsWith("\n") ? message : `${message}\n`);
|
|
17
17
|
};
|
|
@@ -47,15 +47,35 @@ const writeMachineBreadcrumbs = (breadcrumbs) => {
|
|
|
47
47
|
}));
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
const writeMachineError = (error
|
|
50
|
+
const writeMachineError = (error) => {
|
|
51
51
|
writeStderr(JSON.stringify({
|
|
52
52
|
type: "error",
|
|
53
53
|
code: error.code,
|
|
54
54
|
message: error.message,
|
|
55
|
-
exitCode,
|
|
56
55
|
}));
|
|
57
56
|
};
|
|
58
|
-
const
|
|
57
|
+
const defectMessage = (cause) => {
|
|
58
|
+
const squashed = Cause.squash(cause);
|
|
59
|
+
return squashed instanceof Error ? squashed.message : String(squashed);
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Emit a defect (unhandled panic) to the appropriate channel.
|
|
63
|
+
*
|
|
64
|
+
* - text: human-readable message on stderr.
|
|
65
|
+
* - json: NDJSON `error` event on stderr + structured envelope on stdout.
|
|
66
|
+
*
|
|
67
|
+
* Exported for tests; production callers route through `withCliErrorHandling`.
|
|
68
|
+
*/
|
|
69
|
+
export const writeDefect = (cause, format) => {
|
|
70
|
+
const message = defectMessage(cause);
|
|
71
|
+
if (format === "text") {
|
|
72
|
+
writeStderr(`✗ ${message}`);
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
writeStderr(JSON.stringify({ type: "error", code: "internal", message }));
|
|
76
|
+
process.stdout.write(JSON.stringify(makeJsonErrorEnvelope({ code: "internal", message }), null, 2) + "\n");
|
|
77
|
+
};
|
|
78
|
+
const defaultExitCodeForExpectedError = (error) => error._tag === "PromptCancelled" ? ExitCode.Success : exitCodeFor(error.code);
|
|
59
79
|
const writeExpectedCliError = (error, format) => Effect.gen(function* () {
|
|
60
80
|
if (error._tag === "PromptCancelled") {
|
|
61
81
|
return;
|
|
@@ -73,11 +93,9 @@ const writeExpectedCliError = (error, format) => Effect.gen(function* () {
|
|
|
73
93
|
writeTextBreadcrumbs(error.breadcrumbs ?? []);
|
|
74
94
|
return;
|
|
75
95
|
}
|
|
76
|
-
const exitCode = defaultExitCodeForExpectedError(error);
|
|
77
96
|
writeMachineBreadcrumbs(error.breadcrumbs ?? []);
|
|
78
|
-
writeMachineError(error
|
|
79
|
-
process.stdout.write(JSON.stringify(makeJsonErrorEnvelopeFromAppError(error
|
|
80
|
-
writeStderr(`\u2717 ${error.message}`);
|
|
97
|
+
writeMachineError(error);
|
|
98
|
+
process.stdout.write(JSON.stringify(makeJsonErrorEnvelopeFromAppError(error), null, 2) + "\n");
|
|
81
99
|
});
|
|
82
100
|
// ---------------------------------------------------------------------------
|
|
83
101
|
// Building blocks — composable pieces callers assemble directly
|
|
@@ -178,7 +196,10 @@ export const withCliErrorHandling = (program, options) => {
|
|
|
178
196
|
if (isEffectCliExit(defect)) {
|
|
179
197
|
return Effect.failCause(cause);
|
|
180
198
|
}
|
|
181
|
-
|
|
199
|
+
if (Cause.hasInterruptsOnly(cause)) {
|
|
200
|
+
return Effect.failCause(cause);
|
|
201
|
+
}
|
|
202
|
+
return Effect.sync(() => writeDefect(cause, options.format)).pipe(Effect.andThen(reportCliDefect(cause, command)), Effect.andThen(Effect.gen(function* () {
|
|
182
203
|
const semanticProperties = yield* getCommandSemanticProperties;
|
|
183
204
|
yield* trackCliCommandCompleted({
|
|
184
205
|
command,
|
|
@@ -186,7 +207,7 @@ export const withCliErrorHandling = (program, options) => {
|
|
|
186
207
|
durationMs,
|
|
187
208
|
semanticProperties,
|
|
188
209
|
});
|
|
189
|
-
})), Effect.andThen(Effect.
|
|
210
|
+
})), Effect.andThen(Effect.die(effectCliExit(ExitCode.Internal))));
|
|
190
211
|
}));
|
|
191
212
|
});
|
|
192
213
|
return enrichedProgram.pipe(Effect.provide(Layer.mergeAll(telemetryLayer, CommandSemanticPropertiesLive)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-envelope.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/runtime-envelope.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,cA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C;YACL,CAAC,CAAC,CACH,EACD,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAC7D,CAAC;QACJ,CAAC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,IAAI,CACzB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,cAAc,EAAE,6BAA6B,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC,CAAC;AAWF,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,OAA8C,EAC9C,OAA8B,EAC9B,EAAE,CACF,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,MAAM,GAAG,KAAK,CAAC,CAAC,gBAAgB,CAAC;IACvC,MAAM,eAAe,GAAG,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IAE9E,OAAO,KAAK,CAAC,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAC3C,OAAO,EAAE,OAAO,CAAC,OAAO;QACxB,MAAM;QACN,eAAe,EAAE,OAAO,CAAC,eAAe;KACzC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
import * as Effect from "effect/Effect";
|
|
12
12
|
import * as Option from "effect/Option";
|
|
13
13
|
import * as Schema from "effect/Schema";
|
|
14
|
+
import type { AllAgentOverrides } from "../extensions/agent-overrides.js";
|
|
14
15
|
import { type AppError } from "../app-error/index.js";
|
|
15
16
|
/**
|
|
16
17
|
* Schema for command content file frontmatter fields.
|
|
@@ -24,6 +25,12 @@ export declare const CommandFrontmatterSchema: Schema.$Record<Schema.String, Sch
|
|
|
24
25
|
* @experimental This API is unstable and may change without notice.
|
|
25
26
|
*/
|
|
26
27
|
export type CommandFrontmatter = Schema.Schema.Type<typeof CommandFrontmatterSchema>;
|
|
28
|
+
/**
|
|
29
|
+
* Map of agent-id -> merge patch applied during per-agent rendering.
|
|
30
|
+
*
|
|
31
|
+
* @experimental This API is unstable and may change without notice.
|
|
32
|
+
*/
|
|
33
|
+
export type CommandAgentOverrides = AllAgentOverrides;
|
|
27
34
|
/**
|
|
28
35
|
* Result of parsing a command content file.
|
|
29
36
|
*
|
|
@@ -32,9 +39,12 @@ export type CommandFrontmatter = Schema.Schema.Type<typeof CommandFrontmatterSch
|
|
|
32
39
|
export interface CommandContentResult {
|
|
33
40
|
/** Parsed and validated frontmatter, or Option.none() if no frontmatter block was found. */
|
|
34
41
|
readonly frontmatter: Option.Option<CommandFrontmatter>;
|
|
42
|
+
/** The `agentOverrides` map keyed by agent id, when present and structurally valid. */
|
|
43
|
+
readonly agentOverrides: Option.Option<CommandAgentOverrides>;
|
|
35
44
|
/** Content body after the frontmatter block, or full content if no frontmatter. */
|
|
36
45
|
readonly body: string;
|
|
37
46
|
}
|
|
47
|
+
export declare const extractAgentOverrides: (fm: Readonly<Record<string, unknown>>) => Option.Option<CommandAgentOverrides>;
|
|
38
48
|
/**
|
|
39
49
|
* Parse a command content file into validated frontmatter and body.
|
|
40
50
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-content.d.ts","sourceRoot":"","sources":["../../../../src/unstable/commands/command-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAgB,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,+CAInC,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,kBAAkB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AAM,CAAC;CACvB;AAKD,eAAO,MAAM,qBAAqB,GAChC,IAAI,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,KACpC,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAQrC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,QAAQ,CA0BzF,CAAC;AAEL;;;;;;;GAOG;AACH,eAAO,MAAM,mCAAmC;;;EAO9C,CAAC;AAEH;;;;GAIG;AACH,MAAM,MAAM,6BAA6B,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAC5D,OAAO,mCAAmC,CAC3C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,4BAA4B,GACvC,aAAa,kBAAkB,KAC9B,6BAQF,CAAC"}
|
|
@@ -24,6 +24,17 @@ export const CommandFrontmatterSchema = Schema.Record(Schema.String, Schema.Unkn
|
|
|
24
24
|
description: "Opaque YAML frontmatter fields for command content files.",
|
|
25
25
|
});
|
|
26
26
|
const isPlainObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
27
|
+
export const extractAgentOverrides = (fm) => {
|
|
28
|
+
const raw = fm["agentOverrides"];
|
|
29
|
+
if (!isPlainObject(raw))
|
|
30
|
+
return Option.none();
|
|
31
|
+
const out = {};
|
|
32
|
+
for (const [agentId, patch] of Object.entries(raw)) {
|
|
33
|
+
if (isPlainObject(patch))
|
|
34
|
+
out[agentId] = patch;
|
|
35
|
+
}
|
|
36
|
+
return Option.some(out);
|
|
37
|
+
};
|
|
27
38
|
/**
|
|
28
39
|
* Parse a command content file into validated frontmatter and body.
|
|
29
40
|
*
|
|
@@ -35,7 +46,7 @@ const isPlainObject = (value) => typeof value === "object" && value !== null &&
|
|
|
35
46
|
export const parseCommandMd = (content) => Effect.gen(function* () {
|
|
36
47
|
const parsed = yield* parseFrontmatterEffect(content);
|
|
37
48
|
if (parsed.frontmatter === undefined) {
|
|
38
|
-
return { frontmatter: Option.none(), body: parsed.body };
|
|
49
|
+
return { frontmatter: Option.none(), agentOverrides: Option.none(), body: parsed.body };
|
|
39
50
|
}
|
|
40
51
|
if (!isPlainObject(parsed.frontmatter)) {
|
|
41
52
|
return yield* makeAppError({
|
|
@@ -49,7 +60,11 @@ export const parseCommandMd = (content) => Effect.gen(function* () {
|
|
|
49
60
|
],
|
|
50
61
|
});
|
|
51
62
|
}
|
|
52
|
-
return {
|
|
63
|
+
return {
|
|
64
|
+
frontmatter: Option.some(parsed.frontmatter),
|
|
65
|
+
agentOverrides: extractAgentOverrides(parsed.frontmatter),
|
|
66
|
+
body: parsed.body,
|
|
67
|
+
};
|
|
53
68
|
});
|
|
54
69
|
/**
|
|
55
70
|
* Schema for manifest fields projected from frontmatter.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-content.js","sourceRoot":"","sources":["../../../../src/unstable/commands/command-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAA0B,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"command-content.js","sourceRoot":"","sources":["../../../../src/unstable/commands/command-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,sBAAsB,EAA0B,MAAM,8BAA8B,CAAC;AAE9F,OAAO,EAAE,YAAY,EAAiB,MAAM,uBAAuB,CAAC;AAEpE;;;;GAIG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,MAAM,CAAC,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,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;KACvE,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/unstable/commands/manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAIpC,OAAO,KAAK,EACV,mBAAmB,EAIpB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,mCAAmC,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAMvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;;AAW3D,qBAAa,cAAe,SAAQ,mBAGgC;CAAG;AA0FvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,mBAAmB,EAAE,KAAK,IAAI,KAAG,gBAS3E,CAAC;AAWF,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../../src/unstable/commands/manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAIpC,OAAO,KAAK,EACV,mBAAmB,EAIpB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAA0B,MAAM,mCAAmC,CAAC;AAClG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAMvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;;AAW3D,qBAAa,cAAe,SAAQ,mBAGgC;CAAG;AA0FvE;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,KAAK,mBAAmB,EAAE,KAAK,IAAI,KAAG,gBAS3E,CAAC;AAWF,eAAO,MAAM,kBAAkB,oHA6V9B,CAAC"}
|
|
@@ -21,7 +21,7 @@ import { EXTERNAL_EXTENSIONS_DIR, REGISTRY_EXTENSIONS_DIR } from "../extensions/
|
|
|
21
21
|
import { copyExtensionDirectory, validatePathSafety } from "../extensions/utils.js";
|
|
22
22
|
import { createRegistryClient, extractZip } from "../registry/index.js";
|
|
23
23
|
import { validateExactResolvedVersion } from "../lockfile/index.js";
|
|
24
|
-
import {
|
|
24
|
+
import { decodeVersionSync } from "../version-constraints/version-constraints.js";
|
|
25
25
|
import { CodingAgentRepository } from "../agents/index.js";
|
|
26
26
|
import { checkInstalledOnDisk, readCommandContent, renderToAgents, } from "./operations/shared-command-helpers.js";
|
|
27
27
|
// -----------------------------------------------------------------------------
|
|
@@ -34,7 +34,7 @@ const buildCommandLockEntry = (ref, now) => ({
|
|
|
34
34
|
type: "registry",
|
|
35
35
|
owner: ref.owner,
|
|
36
36
|
name: ref.name,
|
|
37
|
-
resolvedVersion:
|
|
37
|
+
resolvedVersion: decodeVersionSync(ref.version),
|
|
38
38
|
integrity: Option.getOrElse(ref.integrity, () => ""),
|
|
39
39
|
sourceName: "default",
|
|
40
40
|
agents: [],
|
|
@@ -254,7 +254,7 @@ export const CommandManagerLive = Layer.effect(CommandManager, Effect.gen(functi
|
|
|
254
254
|
return yield* materializeFromLocal(ref);
|
|
255
255
|
}
|
|
256
256
|
});
|
|
257
|
-
const { frontmatter, body, manifest } = yield* provide(readCommandContent(canonicalPath, ref.command.name, "INSTALL_COMMAND"));
|
|
257
|
+
const { frontmatter, agentOverrides, body, manifest } = yield* provide(readCommandContent(canonicalPath, ref.command.name, "INSTALL_COMMAND"));
|
|
258
258
|
const owner = ref.refType === "registry"
|
|
259
259
|
? ref.owner
|
|
260
260
|
: yield* ws.getConfiguredOwner().pipe(Effect.flatMap(Option.match({
|
|
@@ -273,6 +273,7 @@ export const CommandManagerLive = Layer.effect(CommandManager, Effect.gen(functi
|
|
|
273
273
|
yield* provide(renderToAgents({
|
|
274
274
|
commandName: ref.command.name,
|
|
275
275
|
frontmatter,
|
|
276
|
+
agentOverrides: Option.getOrUndefined(agentOverrides),
|
|
276
277
|
body,
|
|
277
278
|
manifest,
|
|
278
279
|
owner,
|