@agentxm/client-core 0.5.0 → 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/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 +15 -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 +84 -9
- package/dist/src/unstable/app-error/app-error.d.ts.map +1 -1
- package/dist/src/unstable/app-error/app-error.js +104 -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 +53 -18
- 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 +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js +5 -3
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.d.ts +5 -4
- package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.js +46 -17
- 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 -14
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.js +58 -19
- package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.d.ts +9 -9
- package/dist/src/unstable/cli-runtime/output-mode.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.js +11 -8
- 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 +76 -8
- 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 +21 -24
- package/dist/src/unstable/commands/command-content.d.ts.map +1 -1
- package/dist/src/unstable/commands/command-content.js +50 -37
- 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 +65 -42
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts +10 -8
- package/dist/src/unstable/commands/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.js +8 -7
- 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 +22 -11
- package/dist/src/unstable/commands/operations/enable.js.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts +5 -5
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.js +38 -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 +71 -20
- 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 +30 -15
- package/dist/src/unstable/commands/operations/publish.js.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +20 -20
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.js +59 -43
- 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 +6 -7
- 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/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/discover/discover.js +5 -5
- package/dist/src/unstable/discover/discover.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.d.ts +116 -22
- package/dist/src/unstable/extensions/common.d.ts.map +1 -1
- package/dist/src/unstable/extensions/common.js +187 -45
- package/dist/src/unstable/extensions/common.js.map +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts +4 -4
- package/dist/src/unstable/extensions/fqn.d.ts.map +1 -1
- package/dist/src/unstable/extensions/fqn.js +11 -7
- 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 +4 -2
- package/dist/src/unstable/extensions/index.d.ts.map +1 -1
- package/dist/src/unstable/extensions/index.js +3 -1
- 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 +232 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -0
- 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/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 +5 -8
- 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/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/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/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/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/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/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/lockfile.js +10 -10
- package/dist/src/unstable/lockfile/lockfile.js.map +1 -1
- package/dist/src/unstable/lockfile/resolved-version.js +10 -10
- 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.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.js +20 -25
- 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 +25 -33
- 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 +4 -4
- 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 +63 -25
- 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 +20 -20
- 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 +31 -37
- 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 +26 -43
- 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 +48 -39
- 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 +38 -35
- 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 +31 -43
- 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 +25 -28
- 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 +19 -19
- 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 +44 -17
- 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/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 +15 -11
- 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 +49 -39
- package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.js +29 -5
- 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/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/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 +51 -43
- 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 +90 -107
- 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 +12 -12
- 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/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 +28 -28
- package/dist/src/unstable/settings/schema.d.ts.map +1 -1
- package/dist/src/unstable/settings/schema.js +58 -74
- package/dist/src/unstable/settings/schema.js.map +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 +1 -3
- package/dist/src/unstable/skills/index.d.ts.map +1 -1
- package/dist/src/unstable/skills/index.js +1 -2
- 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 +12 -19
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts +8 -5
- package/dist/src/unstable/skills/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.js +6 -4
- 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 +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +27 -36
- 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 +17 -12
- 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.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js +8 -10
- 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/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 +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 +17 -33
- 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/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 +10 -13
- 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/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 +12 -11
- package/dist/src/unstable/subagents/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.js +10 -12
- 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/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/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-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/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 +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 +118 -84
- 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 +4 -4
- 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 +2 -1
- 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 +44 -44
- 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/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/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 +3 -3
- 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.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 +18 -20
- 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 +76 -77
- package/dist/src/unstable/workspace/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service.js +46 -69
- 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 +8 -8
- package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.js +16 -17
- 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 +11 -11
- 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 +118 -20
- 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 +122 -18
- package/site-content/__generated__/schemas/subagent.schema.json +176 -0
- package/site-content/install.md +1 -1
- 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
- package/site-content/__generated__/schemas/extension-pack.schema.json +0 -103
|
@@ -4,7 +4,7 @@ import * as Fiber from "effect/Fiber";
|
|
|
4
4
|
* Wrap a program in signal-aware graceful shutdown.
|
|
5
5
|
*
|
|
6
6
|
* SIGTERM/SIGINT → interrupt the running fiber with a 5s timeout.
|
|
7
|
-
* Exit code
|
|
7
|
+
* Exit code follows POSIX convention (128 + signum): SIGINT=130, SIGTERM=143.
|
|
8
8
|
* Uses Effect.forkChild (supervised) so the fiber dies with parent.
|
|
9
9
|
*/
|
|
10
10
|
export const withGracefulShutdown = (program) => Effect.gen(function* () {
|
|
@@ -12,9 +12,11 @@ export const withGracefulShutdown = (program) => Effect.gen(function* () {
|
|
|
12
12
|
const fiber = yield* Effect.forkChild(program);
|
|
13
13
|
const runFork = Effect.runForkWith(services);
|
|
14
14
|
const interruptAndExit = (exitCode) => {
|
|
15
|
-
runFork(Fiber.interrupt(fiber).pipe(Effect.timeout("5 seconds"), Effect.ensuring(Effect.sync(() =>
|
|
15
|
+
runFork(Fiber.interrupt(fiber).pipe(Effect.timeout("5 seconds"), Effect.ensuring(Effect.sync(() => {
|
|
16
|
+
void process.exit(exitCode);
|
|
17
|
+
}))));
|
|
16
18
|
};
|
|
17
|
-
const onSigterm = () => interruptAndExit(
|
|
19
|
+
const onSigterm = () => interruptAndExit(143);
|
|
18
20
|
const onSigint = () => interruptAndExit(130);
|
|
19
21
|
process.on("SIGTERM", onSigterm);
|
|
20
22
|
process.on("SIGINT", onSigint);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graceful-shutdown.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/graceful-shutdown.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,OAA+B,EACP,EAAE,CAC1B,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClB,MAAM,QAAQ,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,OAAO,EAAK,CAAC;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,SAAS,CA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;IAC9C,MAAM,QAAQ,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAE/B,OAAO,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAClC,MAAM,CAAC,QAAQ,CACb,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;QACf,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC,CAAC,CACH,CACF,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import type { OutputFormat } from "./output-mode.js";
|
|
2
|
+
import type { ErrorEvent } from "./output-mode.js";
|
|
2
3
|
/**
|
|
3
4
|
* Classified error result — pure data describing what handleError should do.
|
|
4
5
|
*/
|
|
5
6
|
export interface ErrorClassification {
|
|
6
7
|
readonly exitCode: number;
|
|
8
|
+
readonly errorEvent?: ErrorEvent;
|
|
7
9
|
readonly output?: {
|
|
8
10
|
readonly channel: "stdout" | "stderr";
|
|
9
11
|
readonly content: string;
|
|
10
12
|
};
|
|
11
|
-
readonly stderrMessage?: string;
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Pure error classification — determines exit code and output without side effects.
|
|
15
16
|
*
|
|
16
17
|
* Channel routing per format:
|
|
17
18
|
* - text: human-readable to stderr only (no stdout pollution)
|
|
18
|
-
* - json: typed error JSON to stdout +
|
|
19
|
+
* - json: typed error JSON to stdout + NDJSON error event to stderr
|
|
19
20
|
* Exit codes:
|
|
20
21
|
* - ShowHelp (no errors) → 0 (help successfully displayed)
|
|
21
|
-
* - ShowHelp (with errors) →
|
|
22
|
+
* - ShowHelp (with errors) → 2 (usage — help shown due to invocation error)
|
|
22
23
|
* - EffectCliExit → custom exit code
|
|
23
24
|
* - CliError → 2 (usage/validation — bad flags, missing args)
|
|
24
|
-
* - Other →
|
|
25
|
+
* - Other → 10 (unexpected internal error)
|
|
25
26
|
*/
|
|
26
27
|
export declare const classifyError: (error: unknown, format: OutputFormat) => ErrorClassification;
|
|
27
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-error.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/handle-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handle-error.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/handle-error.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAMnD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAChB,QAAQ,CAAC,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAC;QACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;KAC1B,CAAC;CACH;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,OAAO,EAAE,QAAQ,YAAY,KAAG,mBA8FpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,OAAO,EAAE,QAAQ,YAAY,KAAG,KAelE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CliError } from "effect/unstable/cli";
|
|
2
|
+
import { AppError, ExitCode, exitCodeFor, renderAppError } from "../app-error/index.js";
|
|
2
3
|
import { isEffectCliExit } from "./effect-cli-exit.js";
|
|
3
|
-
import { makeJsonErrorEnvelope } from "./json-envelope.js";
|
|
4
|
+
import { makeJsonErrorEnvelope, makeJsonErrorEnvelopeFromAppError } from "./json-envelope.js";
|
|
4
5
|
const writeStderr = (message) => {
|
|
5
6
|
process.stderr.write(message.endsWith("\n") ? message : `${message}\n`);
|
|
6
7
|
};
|
|
@@ -9,59 +10,87 @@ const writeStderr = (message) => {
|
|
|
9
10
|
*
|
|
10
11
|
* Channel routing per format:
|
|
11
12
|
* - text: human-readable to stderr only (no stdout pollution)
|
|
12
|
-
* - json: typed error JSON to stdout +
|
|
13
|
+
* - json: typed error JSON to stdout + NDJSON error event to stderr
|
|
13
14
|
* Exit codes:
|
|
14
15
|
* - ShowHelp (no errors) → 0 (help successfully displayed)
|
|
15
|
-
* - ShowHelp (with errors) →
|
|
16
|
+
* - ShowHelp (with errors) → 2 (usage — help shown due to invocation error)
|
|
16
17
|
* - EffectCliExit → custom exit code
|
|
17
18
|
* - CliError → 2 (usage/validation — bad flags, missing args)
|
|
18
|
-
* - Other →
|
|
19
|
+
* - Other → 10 (unexpected internal error)
|
|
19
20
|
*/
|
|
20
21
|
export const classifyError = (error, format) => {
|
|
21
22
|
if (isEffectCliExit(error)) {
|
|
22
23
|
return { exitCode: error.exitCode };
|
|
23
24
|
}
|
|
25
|
+
if (error instanceof AppError) {
|
|
26
|
+
const exitCode = exitCodeFor(error.code);
|
|
27
|
+
if (format === "text") {
|
|
28
|
+
return {
|
|
29
|
+
exitCode,
|
|
30
|
+
output: { channel: "stderr", content: renderAppError(error) },
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
exitCode,
|
|
35
|
+
errorEvent: {
|
|
36
|
+
type: "error",
|
|
37
|
+
code: error.code,
|
|
38
|
+
message: error.message,
|
|
39
|
+
},
|
|
40
|
+
output: {
|
|
41
|
+
channel: "stdout",
|
|
42
|
+
content: JSON.stringify(makeJsonErrorEnvelopeFromAppError(error), null, 2) + "\n",
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
24
46
|
if (CliError.isCliError(error)) {
|
|
25
47
|
if (error._tag === "ShowHelp") {
|
|
26
|
-
return { exitCode: error.errors.length > 0 ?
|
|
48
|
+
return { exitCode: error.errors.length > 0 ? ExitCode.Usage : ExitCode.Success };
|
|
27
49
|
}
|
|
28
50
|
if (format !== "text") {
|
|
29
51
|
const message = "errors" in error && Array.isArray(error.errors) && error.errors.length > 0
|
|
30
52
|
? error.errors.map((e) => e.message ?? String(e)).join("; ")
|
|
31
53
|
: error.message;
|
|
32
54
|
return {
|
|
33
|
-
exitCode:
|
|
55
|
+
exitCode: ExitCode.Usage,
|
|
56
|
+
errorEvent: {
|
|
57
|
+
type: "error",
|
|
58
|
+
code: "usage",
|
|
59
|
+
message,
|
|
60
|
+
},
|
|
34
61
|
output: {
|
|
35
62
|
channel: "stdout",
|
|
36
63
|
content: JSON.stringify(makeJsonErrorEnvelope({
|
|
37
|
-
code: "
|
|
64
|
+
code: "usage",
|
|
38
65
|
message,
|
|
39
|
-
exitCode: 2,
|
|
40
66
|
}), null, 2) + "\n",
|
|
41
67
|
},
|
|
42
68
|
};
|
|
43
69
|
}
|
|
44
|
-
return { exitCode:
|
|
70
|
+
return { exitCode: ExitCode.Usage };
|
|
45
71
|
}
|
|
46
72
|
const message = error instanceof Error ? error.message : String(error);
|
|
47
|
-
const code =
|
|
73
|
+
const code = "internal";
|
|
48
74
|
if (format === "text") {
|
|
49
75
|
return {
|
|
50
|
-
exitCode:
|
|
76
|
+
exitCode: ExitCode.Internal,
|
|
51
77
|
output: { channel: "stderr", content: `\u2717 ${message}` },
|
|
52
78
|
};
|
|
53
79
|
}
|
|
54
80
|
return {
|
|
55
|
-
exitCode:
|
|
81
|
+
exitCode: ExitCode.Internal,
|
|
82
|
+
errorEvent: {
|
|
83
|
+
type: "error",
|
|
84
|
+
code,
|
|
85
|
+
message,
|
|
86
|
+
},
|
|
56
87
|
output: {
|
|
57
88
|
channel: "stdout",
|
|
58
89
|
content: JSON.stringify(makeJsonErrorEnvelope({
|
|
59
90
|
code,
|
|
60
91
|
message,
|
|
61
|
-
exitCode: 1,
|
|
62
92
|
}), null, 2) + "\n",
|
|
63
93
|
},
|
|
64
|
-
stderrMessage: `\u2717 ${message}`,
|
|
65
94
|
};
|
|
66
95
|
};
|
|
67
96
|
/**
|
|
@@ -73,10 +102,10 @@ export const handleError = (error, format) => {
|
|
|
73
102
|
const result = classifyError(error, format);
|
|
74
103
|
if (result.output) {
|
|
75
104
|
if (result.output.channel === "stdout") {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
writeStderr(result.stderrMessage);
|
|
105
|
+
if (format !== "text" && result.errorEvent !== undefined) {
|
|
106
|
+
writeStderr(JSON.stringify(result.errorEvent));
|
|
79
107
|
}
|
|
108
|
+
process.stdout.write(result.output.content);
|
|
80
109
|
}
|
|
81
110
|
else {
|
|
82
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;
|
|
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,IA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AAC,QAAQ;QAC3B,UAAU,EAAE;YACV,IAAI,EAAE,OAAO;YACb,IAAI;YACJ,OAAO;SACR;QACD,MAAM,EAAE;YACN,OAAO,EAAE,QAAQ;YACjB,OAAO,EACL,IAAI,CAAC,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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type { OutputFormat, ProgressEvent, LogEvent, ErrorEvent, StreamEvent, } from "./output-mode.js";
|
|
2
|
-
export { ProgressEventSchema, LogEventSchema, ErrorEventSchema, emitEvent } from "./output-mode.js";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export type { OutputFormat, ProgressEvent, LogEvent, ErrorEvent, BreadcrumbEvent, StreamEvent, } from "./output-mode.js";
|
|
2
|
+
export { ProgressEventSchema, LogEventSchema, ErrorEventSchema, BreadcrumbEventSchema, emitEvent, } from "./output-mode.js";
|
|
3
|
+
export { BreadcrumbSchema, type Breadcrumb } from "./breadcrumb.js";
|
|
4
|
+
export { JsonEnvelopeSchema, JsonSuccessEnvelopeSchema, JsonErrorEnvelopeSchema, makeJsonSuccessEnvelope, makeJsonErrorEnvelope, makeJsonErrorEnvelopeFromAppError, type JsonEnvelope, type JsonSuccessEnvelope, type JsonErrorEnvelope, } from "./json-envelope.js";
|
|
5
5
|
export { EffectCliExit, effectCliExit, isEffectCliExit } from "./effect-cli-exit.js";
|
|
6
6
|
export { resolveFormatFromArgv, resolveFormat } from "./resolve-format.js";
|
|
7
7
|
export { handleError, classifyError, type ErrorClassification } from "./handle-error.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,UAAU,EACV,eAAe,EACf,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,iCAAiC,EACjC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Schema, ErrorEventSchema, emitEvent } from "./output-mode.js";
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export { ProgressEventSchema, LogEventSchema, ErrorEventSchema, BreadcrumbEventSchema, emitEvent, } from "./output-mode.js";
|
|
2
|
+
export { BreadcrumbSchema } from "./breadcrumb.js";
|
|
3
|
+
export { JsonEnvelopeSchema, JsonSuccessEnvelopeSchema, JsonErrorEnvelopeSchema, makeJsonSuccessEnvelope, makeJsonErrorEnvelope, makeJsonErrorEnvelopeFromAppError, } from "./json-envelope.js";
|
|
4
4
|
export { EffectCliExit, effectCliExit, isEffectCliExit } from "./effect-cli-exit.js";
|
|
5
5
|
export { resolveFormatFromArgv, resolveFormat } from "./resolve-format.js";
|
|
6
6
|
export { handleError, classifyError } from "./handle-error.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,qBAAqB,EACrB,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAmB,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,iCAAiC,GAIlC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,aAAa,EAA4B,MAAM,mBAAmB,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAuB,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAkC,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EAGL,cAAc,EAEd,mBAAmB,EACnB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,eAAe,EACf,cAAc,EACd,4BAA4B,EAC5B,4BAA4B,EAC5B,yBAAyB,EACzB,6BAA6B,GAI9B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EAEX,gBAAgB,EAChB,aAAa,EACb,iBAAiB,GAClB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,uBAAuB,GAKxB,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,23 +1,59 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
export declare const JsonSchemaVersionSchema: Schema.Literal<1>;
|
|
2
|
+
import { type AppError, type AppErrorCode } from "../app-error/index.js";
|
|
3
|
+
import { type Breadcrumb } from "./breadcrumb.js";
|
|
5
4
|
export declare const JsonErrorEnvelopeSchema: Schema.Struct<{
|
|
6
|
-
readonly
|
|
7
|
-
readonly
|
|
8
|
-
readonly code: Schema.String;
|
|
5
|
+
readonly ok: Schema.Literal<false>;
|
|
6
|
+
readonly code: Schema.Literals<readonly ["issues", "usage", "not_found", "auth", "forbidden", "conflict", "rate_limit", "network", "validation", "internal"]>;
|
|
9
7
|
readonly message: Schema.String;
|
|
10
|
-
readonly
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
9
|
+
readonly task: Schema.String;
|
|
10
|
+
readonly description: Schema.String;
|
|
11
|
+
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
12
|
+
readonly cmd: Schema.optional<Schema.String>;
|
|
13
|
+
}>>>;
|
|
13
14
|
}>;
|
|
14
15
|
export type JsonErrorEnvelope = typeof JsonErrorEnvelopeSchema.Type;
|
|
16
|
+
export declare const JsonSuccessEnvelopeSchema: Schema.StructWithRest<Schema.Struct<{
|
|
17
|
+
readonly ok: Schema.Literal<true>;
|
|
18
|
+
readonly summary: Schema.optional<Schema.String>;
|
|
19
|
+
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
20
|
+
readonly task: Schema.String;
|
|
21
|
+
readonly description: Schema.String;
|
|
22
|
+
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
23
|
+
readonly cmd: Schema.optional<Schema.String>;
|
|
24
|
+
}>>>;
|
|
25
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>;
|
|
26
|
+
export type JsonSuccessEnvelope = typeof JsonSuccessEnvelopeSchema.Type;
|
|
27
|
+
export declare const JsonEnvelopeSchema: Schema.Union<readonly [Schema.StructWithRest<Schema.Struct<{
|
|
28
|
+
readonly ok: Schema.Literal<true>;
|
|
29
|
+
readonly summary: Schema.optional<Schema.String>;
|
|
30
|
+
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
31
|
+
readonly task: Schema.String;
|
|
32
|
+
readonly description: Schema.String;
|
|
33
|
+
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
34
|
+
readonly cmd: Schema.optional<Schema.String>;
|
|
35
|
+
}>>>;
|
|
36
|
+
}>, readonly [Schema.$Record<Schema.String, Schema.Unknown>]>, Schema.Struct<{
|
|
37
|
+
readonly ok: Schema.Literal<false>;
|
|
38
|
+
readonly code: Schema.Literals<readonly ["issues", "usage", "not_found", "auth", "forbidden", "conflict", "rate_limit", "network", "validation", "internal"]>;
|
|
39
|
+
readonly message: Schema.String;
|
|
40
|
+
readonly breadcrumbs: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
41
|
+
readonly task: Schema.String;
|
|
42
|
+
readonly description: Schema.String;
|
|
43
|
+
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
44
|
+
readonly cmd: Schema.optional<Schema.String>;
|
|
45
|
+
}>>>;
|
|
46
|
+
}>]>;
|
|
47
|
+
export type JsonEnvelope = typeof JsonEnvelopeSchema.Type;
|
|
48
|
+
export declare const makeJsonSuccessEnvelope: (args?: {
|
|
49
|
+
readonly payload?: unknown;
|
|
50
|
+
readonly summary?: string;
|
|
51
|
+
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
52
|
+
}) => JsonSuccessEnvelope;
|
|
15
53
|
export declare const makeJsonErrorEnvelope: (args: {
|
|
16
|
-
readonly code:
|
|
54
|
+
readonly code: AppErrorCode;
|
|
17
55
|
readonly message: string;
|
|
18
|
-
readonly
|
|
19
|
-
readonly howToFix?: string;
|
|
20
|
-
readonly exitCode: number;
|
|
56
|
+
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
21
57
|
}) => JsonErrorEnvelope;
|
|
22
|
-
export declare const makeJsonErrorEnvelopeFromAppError: (error: AppError
|
|
58
|
+
export declare const makeJsonErrorEnvelopeFromAppError: (error: AppError) => JsonErrorEnvelope;
|
|
23
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":"
|
|
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,34 +1,73 @@
|
|
|
1
|
-
import * as Option from "effect/Option";
|
|
2
1
|
import * as Schema from "effect/Schema";
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { AppErrorCodeSchema } from "../app-error/index.js";
|
|
3
|
+
import { BreadcrumbSchema } from "./breadcrumb.js";
|
|
4
|
+
const ReservedSuccessEnvelopeKeys = new Set(["ok", "summary", "breadcrumbs"]);
|
|
5
5
|
export const JsonErrorEnvelopeSchema = Schema.Struct({
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
code: Schema.String,
|
|
6
|
+
ok: Schema.Literal(false),
|
|
7
|
+
code: AppErrorCodeSchema,
|
|
9
8
|
message: Schema.String,
|
|
10
|
-
|
|
11
|
-
howToFix: Schema.optional(Schema.String),
|
|
12
|
-
exitCode: Schema.Number,
|
|
9
|
+
breadcrumbs: Schema.optional(Schema.Array(BreadcrumbSchema)),
|
|
13
10
|
}).annotate({
|
|
14
11
|
identifier: "JsonErrorEnvelope",
|
|
15
12
|
title: "JSON Error Envelope",
|
|
16
13
|
description: "Structured JSON error envelope for machine-readable CLI error output.",
|
|
17
14
|
});
|
|
15
|
+
export const JsonSuccessEnvelopeSchema = Schema.StructWithRest(Schema.Struct({
|
|
16
|
+
ok: Schema.Literal(true),
|
|
17
|
+
summary: Schema.optional(Schema.String),
|
|
18
|
+
breadcrumbs: Schema.optional(Schema.Array(BreadcrumbSchema)),
|
|
19
|
+
}), [Schema.Record(Schema.String, Schema.Unknown)]).annotate({
|
|
20
|
+
identifier: "JsonSuccessEnvelope",
|
|
21
|
+
title: "JSON Success Envelope",
|
|
22
|
+
description: "Structured JSON success envelope for machine-readable CLI output.",
|
|
23
|
+
});
|
|
24
|
+
export const JsonEnvelopeSchema = Schema.Union([
|
|
25
|
+
JsonSuccessEnvelopeSchema,
|
|
26
|
+
JsonErrorEnvelopeSchema,
|
|
27
|
+
]).annotate({
|
|
28
|
+
identifier: "JsonEnvelope",
|
|
29
|
+
title: "JSON Envelope",
|
|
30
|
+
description: "Structured JSON success or error envelope for machine-readable CLI output.",
|
|
31
|
+
});
|
|
32
|
+
const ensurePayloadObject = (payload) => {
|
|
33
|
+
if (payload === undefined) {
|
|
34
|
+
return {};
|
|
35
|
+
}
|
|
36
|
+
if (typeof payload !== "object" || payload === null || Array.isArray(payload)) {
|
|
37
|
+
return { value: payload };
|
|
38
|
+
}
|
|
39
|
+
return Object.fromEntries(Object.entries(payload));
|
|
40
|
+
};
|
|
41
|
+
const ensureNoReservedPayloadKeys = (payload) => {
|
|
42
|
+
for (const key of Object.keys(payload)) {
|
|
43
|
+
if (ReservedSuccessEnvelopeKeys.has(key)) {
|
|
44
|
+
throw new Error(`JSON success payload cannot include reserved key: ${key}`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
export const makeJsonSuccessEnvelope = (args) => ({
|
|
49
|
+
ok: true,
|
|
50
|
+
...(() => {
|
|
51
|
+
const payload = ensurePayloadObject(args?.payload);
|
|
52
|
+
ensureNoReservedPayloadKeys(payload);
|
|
53
|
+
return payload;
|
|
54
|
+
})(),
|
|
55
|
+
...(args?.summary !== undefined ? { summary: args.summary } : {}),
|
|
56
|
+
...(args?.breadcrumbs !== undefined && args.breadcrumbs.length > 0
|
|
57
|
+
? { breadcrumbs: [...args.breadcrumbs] }
|
|
58
|
+
: {}),
|
|
59
|
+
});
|
|
18
60
|
export const makeJsonErrorEnvelope = (args) => ({
|
|
19
|
-
|
|
20
|
-
type: "error",
|
|
61
|
+
ok: false,
|
|
21
62
|
code: args.code,
|
|
22
63
|
message: args.message,
|
|
23
|
-
...(args.
|
|
24
|
-
|
|
25
|
-
|
|
64
|
+
...(args.breadcrumbs !== undefined && args.breadcrumbs.length > 0
|
|
65
|
+
? { breadcrumbs: [...args.breadcrumbs] }
|
|
66
|
+
: {}),
|
|
26
67
|
});
|
|
27
|
-
export const makeJsonErrorEnvelopeFromAppError = (error
|
|
68
|
+
export const makeJsonErrorEnvelopeFromAppError = (error) => makeJsonErrorEnvelope({
|
|
28
69
|
code: error.code,
|
|
29
|
-
message: error.
|
|
30
|
-
|
|
31
|
-
...(Option.isSome(error.howToFix) ? { howToFix: error.howToFix.value } : {}),
|
|
32
|
-
exitCode,
|
|
70
|
+
message: error.message,
|
|
71
|
+
breadcrumbs: error.breadcrumbs ?? [],
|
|
33
72
|
});
|
|
34
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":"AAA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C,CAAC;QACrC,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC,EAAE;IACJ,GAAG,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACjE,GAAG,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;QAChE,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE;QACxC,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,IAIrC,EAAqB,EAAE,CAAC,CAAC;IACxB,EAAE,EAAE,KAAK;IACT,IAAI,EAAE,IAAI,CAAC,IAAI;IACf,OAAO,EAAE,IAAI,CAAC,OAAO;IACrB,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,IAAI,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC;QAC/D,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE;QACxC,CAAC,CAAC,EAAE,CAAC;CACR,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAe,EAAqB,EAAE,CACtF,qBAAqB,CAAC;IACpB,IAAI,EAAE,KAAK,CAAC,IAAI;IAChB,OAAO,EAAE,KAAK,CAAC,OAAO;IACtB,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,EAAE;CACrC,CAAC,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
|
-
import { JsonSchemaVersion } from "./json-envelope.js";
|
|
3
2
|
export type OutputFormat = "text" | "json";
|
|
4
3
|
export declare const ProgressEventSchema: Schema.Struct<{
|
|
5
|
-
readonly _version: Schema.Literal<1>;
|
|
6
4
|
readonly type: Schema.Literal<"progress">;
|
|
7
5
|
readonly phase: Schema.String;
|
|
8
6
|
readonly percent: Schema.Number;
|
|
@@ -10,23 +8,25 @@ export declare const ProgressEventSchema: Schema.Struct<{
|
|
|
10
8
|
}>;
|
|
11
9
|
export type ProgressEvent = typeof ProgressEventSchema.Type;
|
|
12
10
|
export declare const LogEventSchema: Schema.Struct<{
|
|
13
|
-
readonly _version: Schema.Literal<1>;
|
|
14
11
|
readonly type: Schema.Literal<"log">;
|
|
15
12
|
readonly level: Schema.Literals<readonly ["info", "warn", "error"]>;
|
|
16
13
|
readonly message: Schema.String;
|
|
17
14
|
}>;
|
|
18
15
|
export type LogEvent = typeof LogEventSchema.Type;
|
|
19
16
|
export declare const ErrorEventSchema: Schema.Struct<{
|
|
20
|
-
readonly _version: Schema.Literal<1>;
|
|
21
17
|
readonly type: Schema.Literal<"error">;
|
|
22
18
|
readonly code: Schema.String;
|
|
23
19
|
readonly message: Schema.String;
|
|
24
|
-
readonly details: Schema.optional<Schema.$Array<Schema.String>>;
|
|
25
|
-
readonly howToFix: Schema.optional<Schema.String>;
|
|
26
|
-
readonly exitCode: Schema.optional<Schema.Number>;
|
|
27
20
|
}>;
|
|
28
21
|
export type ErrorEvent = typeof ErrorEventSchema.Type;
|
|
29
|
-
export
|
|
22
|
+
export declare const BreadcrumbEventSchema: Schema.Struct<{
|
|
23
|
+
readonly type: Schema.Literal<"breadcrumb">;
|
|
24
|
+
readonly task: Schema.String;
|
|
25
|
+
readonly description: Schema.String;
|
|
26
|
+
readonly command: Schema.optional<Schema.$Array<Schema.String>>;
|
|
27
|
+
readonly cmd: Schema.optional<Schema.String>;
|
|
28
|
+
}>;
|
|
29
|
+
export type BreadcrumbEvent = typeof BreadcrumbEventSchema.Type;
|
|
30
|
+
export type StreamEvent = ProgressEvent | LogEvent | ErrorEvent | BreadcrumbEvent;
|
|
30
31
|
export declare const emitEvent: (event: StreamEvent) => import("effect/Effect").Effect<void, never, never>;
|
|
31
|
-
export { JsonSchemaVersion };
|
|
32
32
|
//# sourceMappingURL=output-mode.d.ts.map
|
|
@@ -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;
|
|
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,MAAM,UAAU,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAC;AAEtD,eAAO,MAAM,qBAAqB;;;;;;EAUhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAC;AAEhE,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,CAAC;AAMlF,eAAO,MAAM,SAAS,GAAI,OAAO,WAAW,uDAAyC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as Console from "effect/Console";
|
|
2
2
|
import * as Schema from "effect/Schema";
|
|
3
|
-
import { JsonSchemaVersion, JsonSchemaVersionSchema } from "./json-envelope.js";
|
|
4
3
|
// ---------------------------------------------------------------------------
|
|
5
4
|
// NDJSON event schemas — typed contract for machine-mode stderr events
|
|
6
5
|
//
|
|
@@ -14,7 +13,6 @@ import { JsonSchemaVersion, JsonSchemaVersionSchema } from "./json-envelope.js";
|
|
|
14
13
|
// result → final output (emitted last, wraps command-specific data)
|
|
15
14
|
// ---------------------------------------------------------------------------
|
|
16
15
|
export const ProgressEventSchema = Schema.Struct({
|
|
17
|
-
_version: JsonSchemaVersionSchema,
|
|
18
16
|
type: Schema.Literal("progress"),
|
|
19
17
|
phase: Schema.String,
|
|
20
18
|
percent: Schema.Number,
|
|
@@ -25,7 +23,6 @@ export const ProgressEventSchema = Schema.Struct({
|
|
|
25
23
|
description: "NDJSON progress event for driving progress bars in machine mode.",
|
|
26
24
|
});
|
|
27
25
|
export const LogEventSchema = Schema.Struct({
|
|
28
|
-
_version: JsonSchemaVersionSchema,
|
|
29
26
|
type: Schema.Literal("log"),
|
|
30
27
|
level: Schema.Literals(["info", "warn", "error"]).annotate({
|
|
31
28
|
identifier: "LogLevel",
|
|
@@ -39,21 +36,27 @@ export const LogEventSchema = Schema.Struct({
|
|
|
39
36
|
description: "NDJSON log event for informational messages at different severity levels.",
|
|
40
37
|
});
|
|
41
38
|
export const ErrorEventSchema = Schema.Struct({
|
|
42
|
-
_version: JsonSchemaVersionSchema,
|
|
43
39
|
type: Schema.Literal("error"),
|
|
44
40
|
code: Schema.String,
|
|
45
41
|
message: Schema.String,
|
|
46
|
-
details: Schema.optional(Schema.Array(Schema.String)),
|
|
47
|
-
howToFix: Schema.optional(Schema.String),
|
|
48
|
-
exitCode: Schema.optional(Schema.Number),
|
|
49
42
|
}).annotate({
|
|
50
43
|
identifier: "ErrorEvent",
|
|
51
44
|
title: "Error Event",
|
|
52
45
|
description: "NDJSON error event with a stable error code for programmatic handling.",
|
|
53
46
|
});
|
|
47
|
+
export const BreadcrumbEventSchema = Schema.Struct({
|
|
48
|
+
type: Schema.Literal("breadcrumb"),
|
|
49
|
+
task: Schema.String,
|
|
50
|
+
description: Schema.String,
|
|
51
|
+
command: Schema.optional(Schema.Array(Schema.String)),
|
|
52
|
+
cmd: Schema.optional(Schema.String),
|
|
53
|
+
}).annotate({
|
|
54
|
+
identifier: "BreadcrumbEvent",
|
|
55
|
+
title: "Breadcrumb Event",
|
|
56
|
+
description: "NDJSON breadcrumb event with a suggested follow-up task.",
|
|
57
|
+
});
|
|
54
58
|
// ---------------------------------------------------------------------------
|
|
55
59
|
// Event emitter — writes a single NDJSON line to stderr
|
|
56
60
|
// ---------------------------------------------------------------------------
|
|
57
61
|
export const emitEvent = (event) => Console.error(JSON.stringify(event));
|
|
58
|
-
export { JsonSchemaVersion };
|
|
59
62
|
//# sourceMappingURL=output-mode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-mode.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/output-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"output-mode.js","sourceRoot":"","sources":["../../../../src/unstable/cli-runtime/output-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAQxC,8EAA8E;AAC9E,uEAAuE;AACvE,EAAE;AACF,+EAA+E;AAC/E,yEAAyE;AACzE,4CAA4C;AAC5C,EAAE;AACF,6DAA6D;AAC7D,mEAAmE;AACnE,sEAAsE;AACtE,wEAAwE;AACxE,8EAA8E;AAE9E,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,CAAC;IAC/C,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC,MAAM;IACpB,OAAO,EAAE,MAAM,CAAC,MAAM;IACtB,OAAO,EAAE,MAAM,CAAC,MAAM;CACvB,CAAC,CAAC,QAAQ,CAAC;IACV,UAAU,EAAE,eAAe;IAC3B,KAAK,EAAE,g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AU,EAAE,iBAAiB;IAC7B,KAAK,EAAE,kBAAkB;IACzB,WAAW,EAAE,0DAA0D;CACxE,CAAC,CAAC;AAKH,8EAA8E;AAC9E,wDAAwD;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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