@agentxm/client-core 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/unstable/agents/augment/service.d.ts.map +1 -1
- package/dist/src/unstable/agents/augment/service.js +12 -8
- package/dist/src/unstable/agents/augment/service.js.map +1 -1
- package/dist/src/unstable/agents/coding-agent.d.ts +1 -1
- package/dist/src/unstable/agents/coding-agent.d.ts.map +1 -1
- package/dist/src/unstable/agents/coding-agent.js +1 -1
- package/dist/src/unstable/agents/coding-agent.js.map +1 -1
- package/dist/src/unstable/agents/command-sync.d.ts +2 -2
- package/dist/src/unstable/agents/command-sync.d.ts.map +1 -1
- package/dist/src/unstable/agents/command-sync.js +44 -23
- package/dist/src/unstable/agents/command-sync.js.map +1 -1
- package/dist/src/unstable/agents/detection.js +3 -3
- package/dist/src/unstable/agents/detection.js.map +1 -1
- package/dist/src/unstable/agents/index.d.ts +1 -1
- package/dist/src/unstable/agents/index.d.ts.map +1 -1
- package/dist/src/unstable/agents/index.js +1 -1
- package/dist/src/unstable/agents/index.js.map +1 -1
- package/dist/src/unstable/agents/mcp-sync.d.ts.map +1 -1
- package/dist/src/unstable/agents/mcp-sync.js +14 -20
- package/dist/src/unstable/agents/mcp-sync.js.map +1 -1
- package/dist/src/unstable/agents/repository.js +2 -2
- package/dist/src/unstable/agents/repository.js.map +1 -1
- package/dist/src/unstable/agents/subagent-sync.js +14 -14
- package/dist/src/unstable/agents/subagent-sync.js.map +1 -1
- package/dist/src/unstable/app-error/app-error.d.ts +10 -9
- package/dist/src/unstable/app-error/app-error.d.ts.map +1 -1
- package/dist/src/unstable/app-error/app-error.js +37 -4
- package/dist/src/unstable/app-error/app-error.js.map +1 -1
- package/dist/src/unstable/app-error/builders.d.ts +21 -0
- package/dist/src/unstable/app-error/builders.d.ts.map +1 -0
- package/dist/src/unstable/app-error/builders.js +46 -0
- package/dist/src/unstable/app-error/builders.js.map +1 -0
- package/dist/src/unstable/app-error/index.d.ts +2 -1
- package/dist/src/unstable/app-error/index.d.ts.map +1 -1
- package/dist/src/unstable/app-error/index.js +2 -1
- package/dist/src/unstable/app-error/index.js.map +1 -1
- package/dist/src/unstable/app-error/render.d.ts.map +1 -1
- package/dist/src/unstable/app-error/render.js +6 -24
- package/dist/src/unstable/app-error/render.js.map +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts +1 -1
- package/dist/src/unstable/auth/auth-client.d.ts.map +1 -1
- package/dist/src/unstable/auth/auth-client.js +76 -42
- package/dist/src/unstable/auth/auth-client.js.map +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts +1 -1
- package/dist/src/unstable/auth/credential-store.d.ts.map +1 -1
- package/dist/src/unstable/auth/credential-store.js +22 -24
- package/dist/src/unstable/auth/credential-store.js.map +1 -1
- package/dist/src/unstable/auth/device-login.d.ts +1 -1
- package/dist/src/unstable/auth/device-login.d.ts.map +1 -1
- package/dist/src/unstable/auth/device-login.js +1 -1
- package/dist/src/unstable/auth/device-login.js.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/guard-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/guard-interaction.js +1 -1
- package/dist/src/unstable/auth/guard-interaction.js.map +1 -1
- package/dist/src/unstable/auth/guard.d.ts.map +1 -1
- package/dist/src/unstable/auth/guard.js +5 -9
- package/dist/src/unstable/auth/guard.js.map +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts +1 -1
- package/dist/src/unstable/auth/login-interaction.d.ts.map +1 -1
- package/dist/src/unstable/auth/login-interaction.js +1 -1
- package/dist/src/unstable/auth/login-interaction.js.map +1 -1
- package/dist/src/unstable/auth/registry-url.d.ts +1 -1
- package/dist/src/unstable/auth/registry-url.js +1 -1
- package/dist/src/unstable/auth/registry-url.js.map +1 -1
- package/dist/src/unstable/auth/token-resolution.d.ts +1 -1
- package/dist/src/unstable/auth/token-resolution.d.ts.map +1 -1
- package/dist/src/unstable/auth/token-resolution.js +6 -10
- package/dist/src/unstable/auth/token-resolution.js.map +1 -1
- package/dist/src/unstable/cli/prompt/helpers.d.ts +1 -1
- package/dist/src/unstable/cli/prompt/helpers.js +3 -3
- package/dist/src/unstable/cli/prompt/helpers.js.map +1 -1
- package/dist/src/unstable/cli-flags/verbosity.d.ts +1 -1
- package/dist/src/unstable/cli-flags/verbosity.d.ts.map +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js +1 -1
- package/dist/src/unstable/cli-flags/verbosity.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js +128 -9
- package/dist/src/unstable/cli-renderer/cli-renderer-interactive.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.js +45 -10
- package/dist/src/unstable/cli-renderer/cli-renderer-machine.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts +2 -0
- package/dist/src/unstable/cli-renderer/cli-renderer-test.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer-test.js +80 -21
- package/dist/src/unstable/cli-renderer/cli-renderer-test.js.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts +32 -7
- package/dist/src/unstable/cli-renderer/cli-renderer.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js +1 -1
- package/dist/src/unstable/cli-renderer/cli-renderer.js.map +1 -1
- package/dist/src/unstable/cli-renderer/entity-registry.d.ts +15 -0
- package/dist/src/unstable/cli-renderer/entity-registry.d.ts.map +1 -0
- package/dist/src/unstable/cli-renderer/entity-registry.js +17 -0
- package/dist/src/unstable/cli-renderer/entity-registry.js.map +1 -0
- package/dist/src/unstable/cli-renderer/index.d.ts +2 -1
- package/dist/src/unstable/cli-renderer/index.d.ts.map +1 -1
- package/dist/src/unstable/cli-renderer/index.js +1 -0
- package/dist/src/unstable/cli-renderer/index.js.map +1 -1
- package/dist/src/unstable/cli-runtime/breadcrumb.d.ts +9 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.d.ts.map +1 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.js +12 -0
- package/dist/src/unstable/cli-runtime/breadcrumb.js.map +1 -0
- package/dist/src/unstable/cli-runtime/command-argv.d.ts +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js +1 -1
- package/dist/src/unstable/cli-runtime/command-argv.js.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js +3 -1
- package/dist/src/unstable/cli-runtime/graceful-shutdown.js.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.d.ts +2 -0
- package/dist/src/unstable/cli-runtime/handle-error.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/handle-error.js +42 -3
- package/dist/src/unstable/cli-runtime/handle-error.js.map +1 -1
- package/dist/src/unstable/cli-runtime/index.d.ts +4 -4
- package/dist/src/unstable/cli-runtime/index.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/index.js +3 -3
- package/dist/src/unstable/cli-runtime/index.js.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts +50 -11
- package/dist/src/unstable/cli-runtime/json-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/json-envelope.js +57 -15
- package/dist/src/unstable/cli-runtime/json-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.d.ts +9 -8
- package/dist/src/unstable/cli-runtime/output-mode.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/output-mode.js +11 -7
- package/dist/src/unstable/cli-runtime/output-mode.js.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/runtime-envelope.js +52 -5
- package/dist/src/unstable/cli-runtime/runtime-envelope.js.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts +2 -1
- package/dist/src/unstable/cli-runtime/telemetry.d.ts.map +1 -1
- package/dist/src/unstable/cli-runtime/telemetry.js +4 -4
- package/dist/src/unstable/cli-runtime/telemetry.js.map +1 -1
- package/dist/src/unstable/commands/command-argument.d.ts +2 -2
- package/dist/src/unstable/commands/command-argument.js +2 -2
- package/dist/src/unstable/commands/command-content.d.ts +11 -24
- package/dist/src/unstable/commands/command-content.d.ts.map +1 -1
- package/dist/src/unstable/commands/command-content.js +34 -36
- package/dist/src/unstable/commands/command-content.js.map +1 -1
- package/dist/src/unstable/commands/index.d.ts +2 -1
- package/dist/src/unstable/commands/index.d.ts.map +1 -1
- package/dist/src/unstable/commands/index.js +1 -0
- package/dist/src/unstable/commands/index.js.map +1 -1
- package/dist/src/unstable/commands/manager.d.ts +3 -2
- package/dist/src/unstable/commands/manager.d.ts.map +1 -1
- package/dist/src/unstable/commands/manager.js +62 -40
- package/dist/src/unstable/commands/manager.js.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts +0 -1
- package/dist/src/unstable/commands/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/commands/manifest-schema.js +0 -1
- package/dist/src/unstable/commands/manifest-schema.js.map +1 -1
- package/dist/src/unstable/commands/operations/disable.js +2 -2
- package/dist/src/unstable/commands/operations/disable.js.map +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts +1 -1
- package/dist/src/unstable/commands/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/enable.js +21 -11
- package/dist/src/unstable/commands/operations/enable.js.map +1 -1
- package/dist/src/unstable/commands/operations/install.d.ts +4 -4
- package/dist/src/unstable/commands/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/install.js +37 -36
- package/dist/src/unstable/commands/operations/install.js.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.d.ts +8 -3
- package/dist/src/unstable/commands/operations/new-command.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/new-command.js +67 -18
- package/dist/src/unstable/commands/operations/new-command.js.map +1 -1
- package/dist/src/unstable/commands/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/publish.js +23 -15
- package/dist/src/unstable/commands/operations/publish.js.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts +10 -14
- package/dist/src/unstable/commands/operations/shared-command-helpers.d.ts.map +1 -1
- package/dist/src/unstable/commands/operations/shared-command-helpers.js +27 -37
- package/dist/src/unstable/commands/operations/shared-command-helpers.js.map +1 -1
- package/dist/src/unstable/commands/operations/uninstall.js +2 -2
- package/dist/src/unstable/commands/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/commands/paths.d.ts +64 -0
- package/dist/src/unstable/commands/paths.d.ts.map +1 -0
- package/dist/src/unstable/commands/paths.js +41 -0
- package/dist/src/unstable/commands/paths.js.map +1 -0
- package/dist/src/unstable/commands/reconciliation-adapter.d.ts.map +1 -1
- package/dist/src/unstable/commands/reconciliation-adapter.js +4 -5
- package/dist/src/unstable/commands/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/commands/renderers/index.d.ts +6 -5
- package/dist/src/unstable/commands/renderers/index.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/index.js +3 -2
- package/dist/src/unstable/commands/renderers/index.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-markdown-only.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-only.js +3 -28
- package/dist/src/unstable/commands/renderers/render-markdown-only.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js +5 -42
- package/dist/src/unstable/commands/renderers/render-markdown-with-frontmatter.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-plain-text.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-plain-text.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-plain-text.js +8 -31
- package/dist/src/unstable/commands/renderers/render-plain-text.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts +2 -2
- package/dist/src/unstable/commands/renderers/render-prompt-md.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-prompt-md.js +5 -33
- package/dist/src/unstable/commands/renderers/render-prompt-md.js.map +1 -1
- package/dist/src/unstable/commands/renderers/render-toml.d.ts +4 -5
- package/dist/src/unstable/commands/renderers/render-toml.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/render-toml.js +36 -51
- package/dist/src/unstable/commands/renderers/render-toml.js.map +1 -1
- package/dist/src/unstable/commands/renderers/types.d.ts +45 -39
- package/dist/src/unstable/commands/renderers/types.d.ts.map +1 -1
- package/dist/src/unstable/commands/renderers/types.js +19 -1
- package/dist/src/unstable/commands/renderers/types.js.map +1 -1
- package/dist/src/unstable/extensions/agent-overrides.d.ts +45 -0
- package/dist/src/unstable/extensions/agent-overrides.d.ts.map +1 -0
- package/dist/src/unstable/extensions/agent-overrides.js +66 -0
- package/dist/src/unstable/extensions/agent-overrides.js.map +1 -0
- package/dist/src/unstable/extensions/common.js +2 -2
- package/dist/src/unstable/extensions/common.js.map +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts +1 -1
- package/dist/src/unstable/extensions/fqn.d.ts.map +1 -1
- package/dist/src/unstable/extensions/fqn.js +8 -4
- package/dist/src/unstable/extensions/fqn.js.map +1 -1
- package/dist/src/unstable/extensions/frontmatter.d.ts.map +1 -1
- package/dist/src/unstable/extensions/frontmatter.js +8 -4
- package/dist/src/unstable/extensions/frontmatter.js.map +1 -1
- package/dist/src/unstable/extensions/index.d.ts +2 -0
- package/dist/src/unstable/extensions/index.d.ts.map +1 -1
- package/dist/src/unstable/extensions/index.js +2 -0
- package/dist/src/unstable/extensions/index.js.map +1 -1
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts +24 -0
- package/dist/src/unstable/extensions/materializable-from-disk.d.ts.map +1 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js +235 -0
- package/dist/src/unstable/extensions/materializable-from-disk.js.map +1 -0
- package/dist/src/unstable/extensions/reconciliation-utils.js +2 -2
- package/dist/src/unstable/extensions/reconciliation-utils.js.map +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts +1 -1
- package/dist/src/unstable/extensions/ref-base.d.ts.map +1 -1
- package/dist/src/unstable/extensions/utils.d.ts +1 -1
- package/dist/src/unstable/extensions/utils.d.ts.map +1 -1
- package/dist/src/unstable/extensions/utils.js +3 -3
- package/dist/src/unstable/extensions/utils.js.map +1 -1
- package/dist/src/unstable/git/operations.d.ts.map +1 -1
- package/dist/src/unstable/git/operations.js +2 -8
- package/dist/src/unstable/git/operations.js.map +1 -1
- package/dist/src/unstable/install-meta/install-meta.d.ts +1 -1
- package/dist/src/unstable/install-meta/install-meta.js +1 -1
- package/dist/src/unstable/install-meta/install-meta.js.map +1 -1
- package/dist/src/unstable/install-method/install-method.d.ts +1 -1
- package/dist/src/unstable/install-method/install-method.js +1 -1
- package/dist/src/unstable/install-method/install-method.js.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts +4 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.d.ts.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js +78 -0
- package/dist/src/unstable/lint/catalog/workspace/configured-but-not-installed.js.map +1 -0
- package/dist/src/unstable/lint/catalog/workspace.d.ts.map +1 -1
- package/dist/src/unstable/lint/catalog/workspace.js +2 -0
- package/dist/src/unstable/lint/catalog/workspace.js.map +1 -1
- package/dist/src/unstable/lockfile/lockfile.js +10 -10
- package/dist/src/unstable/lockfile/lockfile.js.map +1 -1
- package/dist/src/unstable/lockfile/resolved-version.js +7 -7
- package/dist/src/unstable/lockfile/resolved-version.js.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts +1 -1
- package/dist/src/unstable/mcp-servers/manager.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/manager.js +18 -23
- package/dist/src/unstable/mcp-servers/manager.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/install.js +23 -31
- package/dist/src/unstable/mcp-servers/operations/install.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/publish.js +14 -15
- package/dist/src/unstable/mcp-servers/operations/publish.js.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.d.ts.map +1 -1
- package/dist/src/unstable/mcp-servers/operations/uninstall.js +10 -17
- package/dist/src/unstable/mcp-servers/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/mcp-servers/reconciliation-adapter.js +2 -2
- package/dist/src/unstable/mcp-servers/reconciliation-adapter.js.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.d.ts.map +1 -1
- package/dist/src/unstable/packs/dependency-resolution.js +6 -7
- package/dist/src/unstable/packs/dependency-resolution.js.map +1 -1
- package/dist/src/unstable/packs/expansion.js +3 -3
- package/dist/src/unstable/packs/expansion.js.map +1 -1
- package/dist/src/unstable/packs/manager.d.ts +1 -1
- package/dist/src/unstable/packs/manager.d.ts.map +1 -1
- package/dist/src/unstable/packs/manager.js +8 -10
- package/dist/src/unstable/packs/manager.js.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/add-to-pack.js +16 -12
- package/dist/src/unstable/packs/operations/add-to-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/install.js +19 -15
- package/dist/src/unstable/packs/operations/install.js.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/new-pack.js +14 -9
- package/dist/src/unstable/packs/operations/new-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/publish.js +14 -15
- package/dist/src/unstable/packs/operations/publish.js.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/remove-from-pack.js +16 -12
- package/dist/src/unstable/packs/operations/remove-from-pack.js.map +1 -1
- package/dist/src/unstable/packs/operations/uninstall.js +3 -3
- package/dist/src/unstable/packs/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.d.ts.map +1 -1
- package/dist/src/unstable/packs/operations/unpack.js +10 -5
- package/dist/src/unstable/packs/operations/unpack.js.map +1 -1
- package/dist/src/unstable/plan/apply-plan.d.ts.map +1 -1
- package/dist/src/unstable/plan/apply-plan.js +5 -6
- package/dist/src/unstable/plan/apply-plan.js.map +1 -1
- package/dist/src/unstable/plan/resolve-plan.d.ts.map +1 -1
- package/dist/src/unstable/plan/resolve-plan.js +13 -9
- package/dist/src/unstable/plan/resolve-plan.js.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.d.ts +9 -14
- package/dist/src/unstable/publish/manifest-policy.d.ts.map +1 -1
- package/dist/src/unstable/publish/manifest-policy.js +13 -0
- package/dist/src/unstable/publish/manifest-policy.js.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts +1271 -51
- package/dist/src/unstable/registry/__generated__/registry-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/__generated__/registry-client.js +403 -47
- package/dist/src/unstable/registry/__generated__/registry-client.js.map +1 -1
- package/dist/src/unstable/registry/error-mapping.d.ts +7 -6
- package/dist/src/unstable/registry/error-mapping.d.ts.map +1 -1
- package/dist/src/unstable/registry/error-mapping.js +44 -31
- package/dist/src/unstable/registry/error-mapping.js.map +1 -1
- package/dist/src/unstable/registry/index.d.ts +1 -1
- package/dist/src/unstable/registry/index.d.ts.map +1 -1
- package/dist/src/unstable/registry/index.js +1 -1
- package/dist/src/unstable/registry/index.js.map +1 -1
- package/dist/src/unstable/registry/local-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/local-client.js +44 -36
- package/dist/src/unstable/registry/local-client.js.map +1 -1
- package/dist/src/unstable/registry/remote-client.d.ts.map +1 -1
- package/dist/src/unstable/registry/remote-client.js +86 -103
- package/dist/src/unstable/registry/remote-client.js.map +1 -1
- package/dist/src/unstable/registry/utils.js +8 -8
- package/dist/src/unstable/registry/utils.js.map +1 -1
- package/dist/src/unstable/settings/ignored-patterns.d.ts.map +1 -1
- package/dist/src/unstable/settings/ignored-patterns.js +13 -7
- package/dist/src/unstable/settings/ignored-patterns.js.map +1 -1
- package/dist/src/unstable/settings/schema.d.ts +1 -1
- package/dist/src/unstable/settings/schema.js +1 -1
- package/dist/src/unstable/settings/settings.js +6 -6
- package/dist/src/unstable/settings/settings.js.map +1 -1
- package/dist/src/unstable/skills/index.d.ts +0 -2
- package/dist/src/unstable/skills/index.d.ts.map +1 -1
- package/dist/src/unstable/skills/index.js +0 -1
- package/dist/src/unstable/skills/index.js.map +1 -1
- package/dist/src/unstable/skills/manager.d.ts +1 -1
- package/dist/src/unstable/skills/manager.d.ts.map +1 -1
- package/dist/src/unstable/skills/manager.js +7 -14
- package/dist/src/unstable/skills/manager.js.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts +0 -1
- package/dist/src/unstable/skills/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/skills/manifest-schema.js +0 -1
- package/dist/src/unstable/skills/manifest-schema.js.map +1 -1
- package/dist/src/unstable/skills/materialization.d.ts.map +1 -1
- package/dist/src/unstable/skills/materialization.js +11 -12
- package/dist/src/unstable/skills/materialization.js.map +1 -1
- package/dist/src/unstable/skills/operations/copy.js +6 -6
- package/dist/src/unstable/skills/operations/copy.js.map +1 -1
- package/dist/src/unstable/skills/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/disable.js +7 -5
- package/dist/src/unstable/skills/operations/disable.js.map +1 -1
- package/dist/src/unstable/skills/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/enable.js +5 -3
- package/dist/src/unstable/skills/operations/enable.js.map +1 -1
- package/dist/src/unstable/skills/operations/install.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/install.js +19 -28
- package/dist/src/unstable/skills/operations/install.js.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/new-skill.js +14 -9
- package/dist/src/unstable/skills/operations/new-skill.js.map +1 -1
- package/dist/src/unstable/skills/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/skills/operations/publish.js +26 -24
- package/dist/src/unstable/skills/operations/publish.js.map +1 -1
- package/dist/src/unstable/skills/operations/uninstall.js +4 -4
- package/dist/src/unstable/skills/operations/uninstall.js.map +1 -1
- package/dist/src/unstable/source-resolution/index.d.ts +1 -0
- package/dist/src/unstable/source-resolution/index.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/index.js +1 -0
- package/dist/src/unstable/source-resolution/index.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js +4 -6
- package/dist/src/unstable/source-resolution/providers/azurerepos/repo-exists.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/azurerepos/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/azurerepos/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/bitbucket/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/bitbucket/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/bitbucket/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git-hosting.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git-hosting.js +6 -8
- package/dist/src/unstable/source-resolution/providers/git-hosting.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/git.js +4 -4
- package/dist/src/unstable/source-resolution/providers/git.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/github/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/github/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/github/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/github/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js +3 -4
- package/dist/src/unstable/source-resolution/providers/gitlab/resolve-repo.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.js +4 -6
- package/dist/src/unstable/source-resolution/providers/gitlab/scp.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/url.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/gitlab/url.js +6 -9
- package/dist/src/unstable/source-resolution/providers/gitlab/url.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/local.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/local.js +4 -5
- package/dist/src/unstable/source-resolution/providers/local.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js +5 -7
- package/dist/src/unstable/source-resolution/providers/parse-provider-shorthand.js.map +1 -1
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.js +6 -7
- package/dist/src/unstable/source-resolution/providers/registry/host-provider.js.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-identifier.d.ts +61 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.d.ts.map +1 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.js +322 -0
- package/dist/src/unstable/source-resolution/resolve-identifier.js.map +1 -0
- package/dist/src/unstable/source-resolution/resolve-source-pattern.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source-pattern.js +10 -6
- package/dist/src/unstable/source-resolution/resolve-source-pattern.js.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.d.ts +2 -2
- package/dist/src/unstable/source-resolution/resolve-source.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/resolve-source.js +50 -73
- package/dist/src/unstable/source-resolution/resolve-source.js.map +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts +1 -1
- package/dist/src/unstable/source-resolution/service.d.ts.map +1 -1
- package/dist/src/unstable/source-resolution/service.js +1 -1
- package/dist/src/unstable/source-resolution/service.js.map +1 -1
- package/dist/src/unstable/sources/lock-entry-to-ref.js +8 -8
- package/dist/src/unstable/sources/lock-entry-to-ref.js.map +1 -1
- package/dist/src/unstable/subagents/index.d.ts +3 -4
- package/dist/src/unstable/subagents/index.d.ts.map +1 -1
- package/dist/src/unstable/subagents/index.js +3 -5
- package/dist/src/unstable/subagents/index.js.map +1 -1
- package/dist/src/unstable/subagents/manager.d.ts +1 -1
- package/dist/src/unstable/subagents/manager.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manager.js +51 -65
- package/dist/src/unstable/subagents/manager.js.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.d.ts +4 -7
- package/dist/src/unstable/subagents/manifest-schema.d.ts.map +1 -1
- package/dist/src/unstable/subagents/manifest-schema.js +5 -10
- package/dist/src/unstable/subagents/manifest-schema.js.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/disable.js +7 -5
- package/dist/src/unstable/subagents/operations/disable.js.map +1 -1
- package/dist/src/unstable/subagents/operations/enable.d.ts +1 -1
- package/dist/src/unstable/subagents/operations/enable.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/enable.js +39 -16
- package/dist/src/unstable/subagents/operations/enable.js.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.d.ts +1 -1
- package/dist/src/unstable/subagents/operations/publish.d.ts.map +1 -1
- package/dist/src/unstable/subagents/operations/publish.js +53 -52
- package/dist/src/unstable/subagents/operations/publish.js.map +1 -1
- package/dist/src/unstable/subagents/paths.d.ts +7 -1
- package/dist/src/unstable/subagents/paths.d.ts.map +1 -1
- package/dist/src/unstable/subagents/paths.js +7 -1
- package/dist/src/unstable/subagents/paths.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.d.ts +2 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/json.js +7 -39
- package/dist/src/unstable/subagents/rendering/adapters/json.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts +2 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js +17 -101
- package/dist/src/unstable/subagents/rendering/adapters/markdown-yaml.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts +5 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/roo.js +18 -36
- package/dist/src/unstable/subagents/rendering/adapters/roo.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts +3 -2
- package/dist/src/unstable/subagents/rendering/adapters/toml.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/adapters/toml.js +24 -54
- package/dist/src/unstable/subagents/rendering/adapters/toml.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/index.d.ts +1 -4
- package/dist/src/unstable/subagents/rendering/index.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/index.js +1 -2
- package/dist/src/unstable/subagents/rendering/index.js.map +1 -1
- package/dist/src/unstable/subagents/rendering/overrides.d.ts +2 -0
- package/dist/src/unstable/subagents/rendering/overrides.d.ts.map +1 -0
- package/dist/src/unstable/subagents/rendering/overrides.js +2 -0
- package/dist/src/unstable/subagents/rendering/overrides.js.map +1 -0
- package/dist/src/unstable/subagents/rendering/types.d.ts +9 -16
- package/dist/src/unstable/subagents/rendering/types.d.ts.map +1 -1
- package/dist/src/unstable/subagents/rendering/types.js +3 -2
- package/dist/src/unstable/subagents/rendering/types.js.map +1 -1
- package/dist/src/unstable/subagents/subagent-content.d.ts +16 -56
- package/dist/src/unstable/subagents/subagent-content.d.ts.map +1 -1
- package/dist/src/unstable/subagents/subagent-content.js +69 -60
- package/dist/src/unstable/subagents/subagent-content.js.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts +10 -10
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js +8 -5
- package/dist/src/unstable/telemetry/__generated__/telemetry-client.js.map +1 -1
- package/dist/src/unstable/telemetry/client.d.ts +2 -2
- package/dist/src/unstable/telemetry/client.d.ts.map +1 -1
- package/dist/src/unstable/telemetry/client.js +5 -2
- package/dist/src/unstable/telemetry/client.js.map +1 -1
- package/dist/src/unstable/update-check/update-check.d.ts +1 -1
- package/dist/src/unstable/update-check/update-check.js +1 -1
- package/dist/src/unstable/update-check/update-check.js.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.d.ts.map +1 -1
- package/dist/src/unstable/utils/build-zip-archive.js +11 -6
- package/dist/src/unstable/utils/build-zip-archive.js.map +1 -1
- package/dist/src/unstable/utils/create-symlink.js +8 -8
- package/dist/src/unstable/utils/create-symlink.js.map +1 -1
- package/dist/src/unstable/version-resolution/version-resolution.d.ts.map +1 -1
- package/dist/src/unstable/version-resolution/version-resolution.js +38 -21
- package/dist/src/unstable/version-resolution/version-resolution.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js +101 -67
- package/dist/src/unstable/workspace/configured-entry-resolution/resolve.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js +3 -4
- package/dist/src/unstable/workspace/configured-entry-resolution/timeout.js.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/types.d.ts.map +1 -1
- package/dist/src/unstable/workspace/configured-entry-resolution/types.js +5 -8
- package/dist/src/unstable/workspace/configured-entry-resolution/types.js.map +1 -1
- package/dist/src/unstable/workspace/index.d.ts +1 -0
- package/dist/src/unstable/workspace/index.d.ts.map +1 -1
- package/dist/src/unstable/workspace/index.js +1 -0
- package/dist/src/unstable/workspace/index.js.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js +1 -1
- package/dist/src/unstable/workspace/initialization-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/initialization.d.ts +24 -24
- package/dist/src/unstable/workspace/initialization.d.ts.map +1 -1
- package/dist/src/unstable/workspace/initialization.js +13 -11
- package/dist/src/unstable/workspace/initialization.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js +8 -9
- package/dist/src/unstable/workspace/read-model/__fixtures__/occurrences.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.js +1 -1
- package/dist/src/unstable/workspace/read-model/agent-root-resolver.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/discovery/skills.js +4 -4
- package/dist/src/unstable/workspace/read-model/discovery/skills.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/discovery/subagents.js +2 -2
- package/dist/src/unstable/workspace/read-model/discovery/subagents.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/extensions/subagent.js +1 -1
- package/dist/src/unstable/workspace/read-model/extensions/subagent.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js +11 -7
- package/dist/src/unstable/workspace/read-model/scanners/agent-dir.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js +12 -8
- package/dist/src/unstable/workspace/read-model/scanners/canonical-extensions.js.map +1 -1
- package/dist/src/unstable/workspace/read-model/scanners/types.d.ts +2 -2
- package/dist/src/unstable/workspace/read-model/service.d.ts +1 -1
- package/dist/src/unstable/workspace/read-model/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/read-model/service.js +1 -1
- package/dist/src/unstable/workspace/read-model/service.js.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts +1 -1
- package/dist/src/unstable/workspace/reconciliation.d.ts.map +1 -1
- package/dist/src/unstable/workspace/reconciliation.js +13 -15
- package/dist/src/unstable/workspace/reconciliation.js.map +1 -1
- package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts +15 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.d.ts.map +1 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.js +58 -0
- package/dist/src/unstable/workspace/rendered-file-cleanup.js.map +1 -0
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.d.ts.map +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js +1 -1
- package/dist/src/unstable/workspace/resolve-plan-interaction.js.map +1 -1
- package/dist/src/unstable/workspace/service-interface.d.ts +1 -3
- package/dist/src/unstable/workspace/service-interface.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service-interface.js +1 -1
- package/dist/src/unstable/workspace/service-interface.js.map +1 -1
- package/dist/src/unstable/workspace/service.d.ts +46 -47
- package/dist/src/unstable/workspace/service.d.ts.map +1 -1
- package/dist/src/unstable/workspace/service.js +24 -43
- package/dist/src/unstable/workspace/service.js.map +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.js +1 -1
- package/dist/src/unstable/workspace/skill-snapshot.js.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.d.ts.map +1 -1
- package/dist/src/unstable/workspace/test-stubs.js +0 -1
- package/dist/src/unstable/workspace/test-stubs.js.map +1 -1
- package/package.json +11 -11
- package/site-content/__generated__/schemas/command.schema.json +0 -6
- package/site-content/__generated__/schemas/skill.schema.json +1 -7
- package/dist/src/unstable/cli-runtime/command-document.d.ts +0 -12
- package/dist/src/unstable/cli-runtime/command-document.d.ts.map +0 -1
- package/dist/src/unstable/cli-runtime/command-document.js +0 -13
- package/dist/src/unstable/cli-runtime/command-document.js.map +0 -1
- package/dist/src/unstable/skills/operations/rename.d.ts +0 -34
- package/dist/src/unstable/skills/operations/rename.d.ts.map +0 -1
- package/dist/src/unstable/skills/operations/rename.js +0 -117
- package/dist/src/unstable/skills/operations/rename.js.map +0 -1
- package/dist/src/unstable/subagents/rendering/model-mapping.d.ts +0 -31
- package/dist/src/unstable/subagents/rendering/model-mapping.d.ts.map +0 -1
- package/dist/src/unstable/subagents/rendering/model-mapping.js +0 -127
- package/dist/src/unstable/subagents/rendering/model-mapping.js.map +0 -1
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts +0 -31
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.d.ts.map +0 -1
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.js +0 -169
- package/dist/src/unstable/subagents/rendering/tool-access-mapping.js.map +0 -1
- package/dist/src/unstable/subagents/tool-access.d.ts +0 -11
- package/dist/src/unstable/subagents/tool-access.d.ts.map +0 -1
- package/dist/src/unstable/subagents/tool-access.js +0 -15
- package/dist/src/unstable/subagents/tool-access.js.map +0 -1
|
@@ -62,8 +62,8 @@ export const writeSubagentFiles = (subagentsDir, args) => Effect.gen(function* (
|
|
|
62
62
|
}));
|
|
63
63
|
// Ensure directory exists and write all files
|
|
64
64
|
yield* fs.makeDirectory(subagentsDir, { recursive: true }).pipe(Effect.mapError((error) => makeAppError({
|
|
65
|
-
code: "
|
|
66
|
-
|
|
65
|
+
code: "internal",
|
|
66
|
+
message: `Failed to create subagents directory: ${subagentsDir}`,
|
|
67
67
|
cause: error,
|
|
68
68
|
})));
|
|
69
69
|
const renderedFilePaths = [];
|
|
@@ -71,13 +71,13 @@ export const writeSubagentFiles = (subagentsDir, args) => Effect.gen(function* (
|
|
|
71
71
|
// Ensure parent dir exists (for nested paths)
|
|
72
72
|
const parentDir = path.dirname(filePath);
|
|
73
73
|
yield* fs.makeDirectory(parentDir, { recursive: true }).pipe(Effect.mapError((error) => makeAppError({
|
|
74
|
-
code: "
|
|
75
|
-
|
|
74
|
+
code: "internal",
|
|
75
|
+
message: `Failed to create directory: ${parentDir}`,
|
|
76
76
|
cause: error,
|
|
77
77
|
})));
|
|
78
78
|
yield* fs.writeFileString(filePath, output.content).pipe(Effect.mapError((error) => makeAppError({
|
|
79
|
-
code: "
|
|
80
|
-
|
|
79
|
+
code: "internal",
|
|
80
|
+
message: `Failed to write subagent file: ${filePath}`,
|
|
81
81
|
cause: error,
|
|
82
82
|
})));
|
|
83
83
|
renderedFilePaths.push(filePath);
|
|
@@ -102,8 +102,8 @@ export const removeSubagentFiles = (args) => Effect.gen(function* () {
|
|
|
102
102
|
const exists = yield* fs.exists(filePath).pipe(Effect.catch(() => Effect.succeed(false)));
|
|
103
103
|
if (exists) {
|
|
104
104
|
yield* fs.remove(filePath).pipe(Effect.mapError((error) => makeAppError({
|
|
105
|
-
code: "
|
|
106
|
-
|
|
105
|
+
code: "internal",
|
|
106
|
+
message: `Failed to remove subagent file: ${filePath}`,
|
|
107
107
|
cause: error,
|
|
108
108
|
})));
|
|
109
109
|
}
|
|
@@ -171,13 +171,13 @@ export const addRooSubagent = (roomodesPath, args) => Effect.gen(function* () {
|
|
|
171
171
|
const path = yield* Path.Path;
|
|
172
172
|
const parentDir = path.dirname(roomodesPath);
|
|
173
173
|
yield* fs.makeDirectory(parentDir, { recursive: true }).pipe(Effect.mapError((error) => makeAppError({
|
|
174
|
-
code: "
|
|
175
|
-
|
|
174
|
+
code: "internal",
|
|
175
|
+
message: `Failed to create directory: ${parentDir}`,
|
|
176
176
|
cause: error,
|
|
177
177
|
})));
|
|
178
178
|
yield* fs.writeFileString(roomodesPath, newContent).pipe(Effect.mapError((error) => makeAppError({
|
|
179
|
-
code: "
|
|
180
|
-
|
|
179
|
+
code: "internal",
|
|
180
|
+
message: `Failed to write roomodes file: ${roomodesPath}`,
|
|
181
181
|
cause: error,
|
|
182
182
|
})));
|
|
183
183
|
return {
|
|
@@ -206,8 +206,8 @@ export const removeRooSubagent = (roomodesPath, subagentName) => Effect.gen(func
|
|
|
206
206
|
const filtered = removeRooMode(existingModes, subagentName);
|
|
207
207
|
const newContent = JSON.stringify({ customModes: filtered }, null, 2);
|
|
208
208
|
yield* fs.writeFileString(roomodesPath, newContent).pipe(Effect.mapError((error) => makeAppError({
|
|
209
|
-
code: "
|
|
210
|
-
|
|
209
|
+
code: "internal",
|
|
210
|
+
message: `Failed to write roomodes file: ${roomodesPath}`,
|
|
211
211
|
cause: error,
|
|
212
212
|
})));
|
|
213
213
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subagent-sync.js","sourceRoot":"","sources":["../../../../src/unstable/agents/subagent-sync.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,YAAY,EAAiB,MAAM,uBAAuB,CAAC;AACpE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,aAAa,GACd,MAAM,iCAAiC,CAAC;AAQzC;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,OAAe,EAAmD,EAAE;IACzF,IAAI,CAAC;QACH,MAAM,GAAG,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACzC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,CAAC,CAAC,aAAa,IAAI,GAAG,CAAC,EAAE,CAAC;YACvE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;QAC7B,CAAC;QACD,MAAM,KAAK,GAAG,GAAG,CAAC,WAAW,CAAC;QAC9B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;QAC7B,CAAC;QACD,OAAO;YACL,WAAW,EAAE,K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D,KAAK,EAAE,KAAK;KACb,CAAC,CACH,CACF,CAAC;IAEF,OAAO;QACL,IAAI,EAAE,SAAS;QACf,iBAAiB,EAAE,CAAC,YAAY,CAAC;QACjC,QAAQ,EAAE,EAAE;KACJ,CAAC;AACb,CAAC,CAAC,CAAC"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Breadcrumb } from "../cli-runtime/breadcrumb.js";
|
|
2
|
+
export type AppErrorCode = "usage" | "not_found" | "auth" | "forbidden" | "conflict" | "rate_limit" | "network" | "validation" | "internal";
|
|
3
|
+
export declare const AppErrorCodes: ReadonlyArray<AppErrorCode>;
|
|
4
|
+
export declare const exitCodeFor: (code: AppErrorCode) => number;
|
|
2
5
|
declare const AppError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
3
6
|
readonly _tag: "AppError";
|
|
4
7
|
} & Readonly<A>;
|
|
5
8
|
export declare class AppError extends AppError_base<{
|
|
6
|
-
readonly code:
|
|
7
|
-
readonly
|
|
8
|
-
readonly
|
|
9
|
-
readonly howToFix: Option.Option<string>;
|
|
9
|
+
readonly code: AppErrorCode;
|
|
10
|
+
readonly message: string;
|
|
11
|
+
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
10
12
|
readonly cause: unknown;
|
|
11
13
|
}> {
|
|
12
14
|
}
|
|
13
15
|
export declare const makeAppError: (args: {
|
|
14
|
-
readonly code:
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly howToFix?: string;
|
|
16
|
+
readonly code: AppErrorCode;
|
|
17
|
+
readonly message: string;
|
|
18
|
+
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
18
19
|
readonly cause?: unknown;
|
|
19
20
|
}) => AppError;
|
|
20
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-error.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/app-error.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-error.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/app-error.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,MAAM,MAAM,YAAY,GACpB,OAAO,GACP,WAAW,GACX,MAAM,GACN,WAAW,GACX,UAAU,GACV,YAAY,GACZ,SAAS,GACT,YAAY,GACZ,UAAU,CAAC;AAEf,eAAO,MAAM,aAAa,EAAE,aAAa,CAAC,YAAY,CAUrD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,MAAM,YAAY,KAAG,MAqBhD,CAAC;;;;AAEF,qBAAa,QAAS,SAAQ,cAA6B;IACzD,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACjD,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;CACzB,CAAC;CAAG;AAEL,eAAO,MAAM,YAAY,GAAI,MAAM;IACjC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,KAAG,QAQA,CAAC"}
|
|
@@ -1,12 +1,45 @@
|
|
|
1
1
|
import * as Data from "effect/Data";
|
|
2
|
-
|
|
2
|
+
export const AppErrorCodes = [
|
|
3
|
+
"usage",
|
|
4
|
+
"not_found",
|
|
5
|
+
"auth",
|
|
6
|
+
"forbidden",
|
|
7
|
+
"conflict",
|
|
8
|
+
"rate_limit",
|
|
9
|
+
"network",
|
|
10
|
+
"validation",
|
|
11
|
+
"internal",
|
|
12
|
+
];
|
|
13
|
+
export const exitCodeFor = (code) => {
|
|
14
|
+
switch (code) {
|
|
15
|
+
case "usage":
|
|
16
|
+
return 2;
|
|
17
|
+
case "not_found":
|
|
18
|
+
return 3;
|
|
19
|
+
case "auth":
|
|
20
|
+
return 4;
|
|
21
|
+
case "forbidden":
|
|
22
|
+
return 5;
|
|
23
|
+
case "conflict":
|
|
24
|
+
return 6;
|
|
25
|
+
case "rate_limit":
|
|
26
|
+
return 7;
|
|
27
|
+
case "network":
|
|
28
|
+
return 8;
|
|
29
|
+
case "validation":
|
|
30
|
+
return 9;
|
|
31
|
+
case "internal":
|
|
32
|
+
return 1;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
3
35
|
export class AppError extends Data.TaggedError("AppError") {
|
|
4
36
|
}
|
|
5
37
|
export const makeAppError = (args) => new AppError({
|
|
6
38
|
code: args.code,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
39
|
+
message: args.message,
|
|
40
|
+
...(args.breadcrumbs !== undefined && args.breadcrumbs.length > 0
|
|
41
|
+
? { breadcrumbs: args.breadcrumbs }
|
|
42
|
+
: {}),
|
|
10
43
|
cause: args.cause,
|
|
11
44
|
});
|
|
12
45
|
//# sourceMappingURL=app-error.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-error.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/app-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"app-error.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/app-error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAepC,MAAM,CAAC,MAAM,aAAa,GAAgC;IACxD,OAAO;IACP,WAAW;IACX,MAAM;IACN,WAAW;IACX,UAAU;IACV,YAAY;IACZ,SAAS;IACT,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAU,EAAE;IACxD,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,CAAC,CAAC;QACX,KAAK,WAAW;YACd,OAAO,CAAC,CAAC;QACX,KAAK,MAAM;YACT,OAAO,CAAC,CAAC;QACX,KAAK,WAAW;YACd,OAAO,CAAC,CAAC;QACX,KAAK,UAAU;YACb,OAAO,CAAC,CAAC;QACX,KAAK,YAAY;YACf,OAAO,CAAC,CAAC;QACX,KAAK,SAAS;YACZ,OAAO,CAAC,CAAC;QACX,KAAK,YAAY;YACf,OAAO,CAAC,CAAC;QACX,KAAK,UAAU;YACb,OAAO,CAAC,CAAC;IACb,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,OAAO,QAAS,SAAQ,IAAI,CAAC,WAAW,CAAC,UAAU,CAKvD;CAAG;AAEL,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAK5B,EAAY,EAAE,CACb,IAAI,QAAQ,CAAC;IACX,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,IAAI,CAAC,WAAW,EAAE;QACnC,CAAC,CAAC,EAAE,CAAC;IACP,KAAK,EAAE,IAAI,CAAC,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Breadcrumb } from "../cli-runtime/breadcrumb.js";
|
|
2
|
+
export declare const BC: {
|
|
3
|
+
readonly run: (cmd: string, description: string) => Breadcrumb;
|
|
4
|
+
readonly do: (description: string) => Breadcrumb;
|
|
5
|
+
};
|
|
6
|
+
export declare const errAuthRequired: (message?: string, cause?: unknown) => import("./app-error.js").AppError;
|
|
7
|
+
export declare const errAuthTokenRequired: (cause?: unknown) => import("./app-error.js").AppError;
|
|
8
|
+
export declare const errPublishConflict: (args: {
|
|
9
|
+
readonly version?: string;
|
|
10
|
+
readonly cause?: unknown;
|
|
11
|
+
}) => import("./app-error.js").AppError;
|
|
12
|
+
export declare const errInstallFailed: (args: {
|
|
13
|
+
readonly message: string;
|
|
14
|
+
readonly cause?: unknown;
|
|
15
|
+
}) => import("./app-error.js").AppError;
|
|
16
|
+
export declare const errRegistryPublishRejected: (args: {
|
|
17
|
+
readonly message: string;
|
|
18
|
+
readonly breadcrumbs?: ReadonlyArray<Breadcrumb>;
|
|
19
|
+
readonly cause?: unknown;
|
|
20
|
+
}) => import("./app-error.js").AppError;
|
|
21
|
+
//# sourceMappingURL=builders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/builders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/D,eAAO,MAAM,EAAE;wBACF,MAAM,eAAe,MAAM,KAAG,UAAU;+BAIjC,MAAM,KAAG,UAAU;CAI7B,CAAC;AAEX,eAAO,MAAM,eAAe,GAAI,gBAAmC,EAAE,QAAQ,OAAO,sCAQhF,CAAC;AAEL,eAAO,MAAM,oBAAoB,GAAI,QAAQ,OAAO,sCAMhD,CAAC;AAEL,eAAO,MAAM,kBAAkB,GAAI,MAAM;IAAE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,sCAS5F,CAAC;AAEL,eAAO,MAAM,gBAAgB,GAAI,MAAM;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,sCAMzF,CAAC;AAEL,eAAO,MAAM,0BAA0B,GAAI,MAAM;IAC/C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,sCAMG,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { makeAppError } from "./app-error.js";
|
|
2
|
+
export const BC = {
|
|
3
|
+
run: (cmd, description) => ({
|
|
4
|
+
task: `Run \`${cmd}\``,
|
|
5
|
+
description,
|
|
6
|
+
}),
|
|
7
|
+
do: (description) => ({
|
|
8
|
+
task: "Recover",
|
|
9
|
+
description,
|
|
10
|
+
}),
|
|
11
|
+
};
|
|
12
|
+
export const errAuthRequired = (message = "Authentication required", cause) => makeAppError({
|
|
13
|
+
code: "auth",
|
|
14
|
+
message,
|
|
15
|
+
breadcrumbs: [
|
|
16
|
+
BC.run("axm login", "Run `axm login` to sign in, or set the AXM_TOKEN environment variable."),
|
|
17
|
+
],
|
|
18
|
+
cause,
|
|
19
|
+
});
|
|
20
|
+
export const errAuthTokenRequired = (cause) => makeAppError({
|
|
21
|
+
code: "auth",
|
|
22
|
+
message: "No authentication token is available.",
|
|
23
|
+
breadcrumbs: [BC.do("Set the AXM_TOKEN environment variable instead of running `axm login`.")],
|
|
24
|
+
cause,
|
|
25
|
+
});
|
|
26
|
+
export const errPublishConflict = (args) => makeAppError({
|
|
27
|
+
code: "conflict",
|
|
28
|
+
message: args.version === undefined
|
|
29
|
+
? "Version already exists with different content."
|
|
30
|
+
: `Version ${args.version} already exists with different content.`,
|
|
31
|
+
breadcrumbs: [BC.do("Bump the version in your manifest.")],
|
|
32
|
+
cause: args.cause,
|
|
33
|
+
});
|
|
34
|
+
export const errInstallFailed = (args) => makeAppError({
|
|
35
|
+
code: "validation",
|
|
36
|
+
message: args.message,
|
|
37
|
+
breadcrumbs: [BC.do("Check the extension package and try again.")],
|
|
38
|
+
cause: args.cause,
|
|
39
|
+
});
|
|
40
|
+
export const errRegistryPublishRejected = (args) => makeAppError({
|
|
41
|
+
code: "validation",
|
|
42
|
+
message: args.message,
|
|
43
|
+
breadcrumbs: args.breadcrumbs ?? [BC.do("Check the extension package and try again.")],
|
|
44
|
+
cause: args.cause,
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=builders.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builders.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/builders.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,GAAG,EAAE,CAAC,GAAW,EAAE,WAAmB,EAAc,EAAE,CAAC,CAAC;QACtD,IAAI,EAAE,SAAS,GAAG,IAAI;QACtB,WAAW;KACZ,CAAC;IACF,EAAE,EAAE,CAAC,WAAmB,EAAc,EAAE,CAAC,CAAC;QACxC,IAAI,EAAE,SAAS;QACf,WAAW;KACZ,CAAC;CACM,CAAC;AAEX,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAO,GAAG,yBAAyB,EAAE,KAAe,EAAE,EAAE,CACtF,YAAY,CAAC;IACX,IAAI,EAAE,MAAM;IACZ,OAAO;IACP,WAAW,EAAE;QACX,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,wEAAwE,CAAC;KAC9F;IACD,KAAK;CACN,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAe,EAAE,EAAE,CACtD,YAAY,CAAC;IACX,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,uCAAuC;IAChD,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,wEAAwE,CAAC,CAAC;IAC9F,KAAK;CACN,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAA6D,EAAE,EAAE,CAClG,YAAY,CAAC;IACX,IAAI,EAAE,UAAU;IAChB,OAAO,EACL,IAAI,CAAC,OAAO,KAAK,SAAS;QACxB,CAAC,CAAC,gDAAgD;QAClD,CAAC,CAAC,WAAW,IAAI,CAAC,OAAO,yCAAyC;IACtE,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,oCAAoC,CAAC,CAAC;IAC1D,KAAK,EAAE,IAAI,CAAC,KAAK;CAClB,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAA4D,EAAE,EAAE,CAC/F,YAAY,CAAC;IACX,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,IAAI,CAAC,OAAO;IACrB,WAAW,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,4CAA4C,CAAC,CAAC;IAClE,KAAK,EAAE,IAAI,CAAC,KAAK;CAClB,CAAC,CAAC;AAEL,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,IAI1C,EAAE,EAAE,CACH,YAAY,CAAC;IACX,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,IAAI,CAAC,OAAO;IACrB,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,4CAA4C,CAAC,CAAC;IACtF,KAAK,EAAE,IAAI,CAAC,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { AppError, makeAppError } from "./app-error.js";
|
|
1
|
+
export { AppError, AppErrorCodes, exitCodeFor, makeAppError, type AppErrorCode, } from "./app-error.js";
|
|
2
|
+
export { BC, errAuthRequired, errAuthTokenRequired, errInstallFailed, errPublishConflict, errRegistryPublishRejected, } from "./builders.js";
|
|
2
3
|
export { renderAppError, renderDefect } from "./render.js";
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,YAAY,EACZ,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,EAAE,EACF,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
export { AppError, makeAppError } from "./app-error.js";
|
|
1
|
+
export { AppError, AppErrorCodes, exitCodeFor, makeAppError, } from "./app-error.js";
|
|
2
|
+
export { BC, errAuthRequired, errAuthTokenRequired, errInstallFailed, errPublishConflict, errRegistryPublishRejected, } from "./builders.js";
|
|
2
3
|
export { renderAppError, renderDefect } from "./render.js";
|
|
3
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,aAAa,EACb,WAAW,EACX,YAAY,GAEb,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,EAAE,EACF,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../../../../src/unstable/app-error/render.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAiD/C,eAAO,MAAM,cAAc,GACzB,OAAO,QAAQ,EACf,UAAS;IAAE,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;CAAyB,KACrF,MAYF,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,OAAO,KAAG,MAa7C,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import * as Option from "effect/Option";
|
|
2
1
|
const defaultRenderOptions = {
|
|
3
2
|
verbose: false,
|
|
4
3
|
debug: false,
|
|
@@ -7,25 +6,14 @@ const isAppError = (cause) => typeof cause === "object" &&
|
|
|
7
6
|
cause !== null &&
|
|
8
7
|
"_tag" in cause &&
|
|
9
8
|
cause._tag === "AppError" &&
|
|
10
|
-
"
|
|
9
|
+
"message" in cause &&
|
|
11
10
|
"code" in cause;
|
|
12
|
-
const formatCause = (cause, options
|
|
11
|
+
const formatCause = (cause, options) => {
|
|
13
12
|
if (cause === undefined || cause === null)
|
|
14
13
|
return [];
|
|
15
14
|
if (isAppError(cause)) {
|
|
16
|
-
const causeHeadline = `${cause.
|
|
17
|
-
|
|
18
|
-
const hasEquivalentParentSummary = Array.from(parentDetailSet).some((detail) => detail === causeHeadline || detail.endsWith(`: ${causeHeadline}`));
|
|
19
|
-
const lines = hasEquivalentParentSummary ? [] : [`Cause: ${causeHeadline}`];
|
|
20
|
-
if (options.debug) {
|
|
21
|
-
for (const detail of cause.details) {
|
|
22
|
-
if (parentDetailSet.has(detail)) {
|
|
23
|
-
continue;
|
|
24
|
-
}
|
|
25
|
-
lines.push(`Cause detail: ${detail}`);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return lines;
|
|
15
|
+
const causeHeadline = `${cause.message} (${cause.code})`;
|
|
16
|
+
return [`Cause: ${causeHeadline}`];
|
|
29
17
|
}
|
|
30
18
|
if (cause instanceof Error) {
|
|
31
19
|
const lines = [`Cause: ${cause.message}`];
|
|
@@ -49,15 +37,9 @@ const formatCause = (cause, options, parentDetails) => {
|
|
|
49
37
|
};
|
|
50
38
|
export const renderAppError = (error, options = defaultRenderOptions) => {
|
|
51
39
|
const lines = [];
|
|
52
|
-
lines.push(`\u2717 ${error.
|
|
53
|
-
for (const detail of error.details) {
|
|
54
|
-
lines.push(` ${detail}`);
|
|
55
|
-
}
|
|
56
|
-
if (Option.isSome(error.howToFix)) {
|
|
57
|
-
lines.push(` ${error.howToFix.value}`);
|
|
58
|
-
}
|
|
40
|
+
lines.push(`\u2717 ${error.message} (${error.code})`);
|
|
59
41
|
if (options.verbose || options.debug) {
|
|
60
|
-
for (const line of formatCause(error.cause, options
|
|
42
|
+
for (const line of formatCause(error.cause, options)) {
|
|
61
43
|
lines.push(` ${line}`);
|
|
62
44
|
}
|
|
63
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../src/unstable/app-error/render.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAA2D;IACnF,OAAO,EAAE,KAAK;IACd,KAAK,EAAE,KAAK;CACb,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAc,EAAqB,EAAE,CACvD,OAAO,KAAK,KAAK,QAAQ;IACzB,KAAK,KAAK,IAAI;IACd,MAAM,IAAI,KAAK;IACf,KAAK,CAAC,IAAI,KAAK,UAAU;IACzB,SAAS,IAAI,KAAK;IAClB,MAAM,IAAI,KAAK,CAAC;AAElB,MAAM,WAAW,GAAG,CAClB,KAAc,EACd,OAA+D,EACxC,EAAE;IACzB,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAErD,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AO,KAAK,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;IAEtD,IAAI,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QACrC,KAAK,MAAM,IAAI,IAAI,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAc,EAAU,EAAE;IACrD,MAAM,KAAK,GAAkB,EAAE,CAAC;IAEhC,KAAK,CAAC,IAAI,CAAC,qCAAqC,CAAC,CAAC;IAClD,KAAK,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC;IAEzF,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACnC,CAAC;SAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACrC,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAC"}
|
|
@@ -57,7 +57,7 @@ export interface AuthClientService {
|
|
|
57
57
|
readonly revokeToken: (accessToken: string) => Effect.Effect<void, AppError>;
|
|
58
58
|
readonly getMe: (accessToken: string) => Effect.Effect<MeResponse, AppError>;
|
|
59
59
|
}
|
|
60
|
-
declare const AuthClient_base: ServiceMap.ServiceClass<AuthClient, "@agentxm/client-core/AuthClient", AuthClientService>;
|
|
60
|
+
declare const AuthClient_base: ServiceMap.ServiceClass<AuthClient, "@agentxm/client-core/unstable/auth/auth-client/AuthClient", AuthClientService>;
|
|
61
61
|
export declare class AuthClient extends AuthClient_base {
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../../../src/unstable/auth/auth-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,UAAU,MAAM,iCAAiC,CAAC;AAG9D,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,KAAK,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AACpE,OAAO,EAAmB,KAAK,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,uBAAuB,MAAM,8CAA8C,CAAC;AAyBxF,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAC5C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACvC,QAAQ,CA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c,qEAyM1B,CAAC;AAMF,eAAO,MAAM,cAAc,GAAI,YAAY,OAAO,CAAC,iBAAiB,CAAC,0CAgCrC,CAAC"}
|
|
@@ -31,7 +31,7 @@ const DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
|
|
|
31
31
|
const SLOW_DOWN_INCREMENT_MS = 5000;
|
|
32
32
|
const TRANSIENT_DEVICE_POLL_RETRY_COUNT = 2;
|
|
33
33
|
const TRANSIENT_DEVICE_POLL_RETRY_BASE_DELAY = "250 millis";
|
|
34
|
-
export class AuthClient extends ServiceMap.Service()("@agentxm/client-core/AuthClient") {
|
|
34
|
+
export class AuthClient extends ServiceMap.Service()("@agentxm/client-core/unstable/auth/auth-client/AuthClient") {
|
|
35
35
|
}
|
|
36
36
|
// -----------------------------------------------------------------------------
|
|
37
37
|
// Internal helpers
|
|
@@ -53,9 +53,14 @@ const normalizeTokenResponse = (token) => ({
|
|
|
53
53
|
const getOAuthErrorCode = (error) => getString(error.cause, "error") ?? getString(error.cause, "code");
|
|
54
54
|
const isRetryableDevicePollError = (error) => error._tag === "RetryableDevicePollError";
|
|
55
55
|
const makeTransientDevicePollAppError = (cause) => makeAppError({
|
|
56
|
-
code: "
|
|
57
|
-
|
|
58
|
-
|
|
56
|
+
code: "auth",
|
|
57
|
+
message: "Lost connection to the registry during login",
|
|
58
|
+
breadcrumbs: [
|
|
59
|
+
{
|
|
60
|
+
task: "Recover",
|
|
61
|
+
description: "Verify the registry is running and reachable, then try `axm login` again.",
|
|
62
|
+
},
|
|
63
|
+
],
|
|
59
64
|
cause,
|
|
60
65
|
});
|
|
61
66
|
/**
|
|
@@ -106,10 +111,9 @@ const pollOnceInternal = (client, deviceCode) => client
|
|
|
106
111
|
return Effect.succeed({ _tag: "ExpiredToken" });
|
|
107
112
|
default:
|
|
108
113
|
return Effect.fail(makeAppError({
|
|
109
|
-
code: "
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
howToFix: "Try running `axm login` again.",
|
|
114
|
+
code: "auth",
|
|
115
|
+
message: "Device token exchange failed with an unexpected error",
|
|
116
|
+
breadcrumbs: [{ task: "Recover", description: "Try running `axm login` again." }],
|
|
113
117
|
cause: error,
|
|
114
118
|
}));
|
|
115
119
|
}
|
|
@@ -118,9 +122,9 @@ const pollOnceInternal = (client, deviceCode) => client
|
|
|
118
122
|
return Effect.fail(new RetryableDevicePollError({ cause: error }));
|
|
119
123
|
}
|
|
120
124
|
return Effect.fail(makeAppError({
|
|
121
|
-
code: "
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
code: "auth",
|
|
126
|
+
message: "Device token exchange failed with an unexpected error",
|
|
127
|
+
breadcrumbs: [{ task: "Recover", description: "Try running `axm login` again." }],
|
|
124
128
|
cause: error,
|
|
125
129
|
}));
|
|
126
130
|
}));
|
|
@@ -144,10 +148,14 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
144
148
|
payload: { client_id: CLIENT_ID, scope: DEVICE_CODE_SCOPES },
|
|
145
149
|
})
|
|
146
150
|
.pipe(Effect.mapError((error) => makeAppError({
|
|
147
|
-
code: "
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
+
code: "auth",
|
|
152
|
+
message: "Could not connect to the registry",
|
|
153
|
+
breadcrumbs: [
|
|
154
|
+
{
|
|
155
|
+
task: "Recover",
|
|
156
|
+
description: "Verify the registry is running and reachable, then try again.",
|
|
157
|
+
},
|
|
158
|
+
],
|
|
151
159
|
cause: error,
|
|
152
160
|
})));
|
|
153
161
|
return {
|
|
@@ -174,15 +182,15 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
174
182
|
continue;
|
|
175
183
|
case "AccessDenied":
|
|
176
184
|
return yield* makeAppError({
|
|
177
|
-
code: "
|
|
178
|
-
|
|
179
|
-
|
|
185
|
+
code: "auth",
|
|
186
|
+
message: "Login was denied or cancelled",
|
|
187
|
+
breadcrumbs: [{ task: "Recover", description: "Run `axm login` to try again." }],
|
|
180
188
|
});
|
|
181
189
|
case "ExpiredToken":
|
|
182
190
|
return yield* makeAppError({
|
|
183
|
-
code: "
|
|
184
|
-
|
|
185
|
-
|
|
191
|
+
code: "auth",
|
|
192
|
+
message: "Login code expired",
|
|
193
|
+
breadcrumbs: [{ task: "Recover", description: "Run `axm login` to try again." }],
|
|
186
194
|
});
|
|
187
195
|
}
|
|
188
196
|
}
|
|
@@ -197,9 +205,11 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
197
205
|
},
|
|
198
206
|
})
|
|
199
207
|
.pipe(Effect.mapError((error) => makeAppError({
|
|
200
|
-
code: "
|
|
201
|
-
|
|
202
|
-
|
|
208
|
+
code: "auth",
|
|
209
|
+
message: "Token refresh request failed",
|
|
210
|
+
breadcrumbs: [
|
|
211
|
+
{ task: "Recover", description: "Run `axm login` to re-authenticate." },
|
|
212
|
+
],
|
|
203
213
|
cause: error,
|
|
204
214
|
})));
|
|
205
215
|
return normalizeTokenResponse(token);
|
|
@@ -219,17 +229,21 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
219
229
|
const decoded = yield* authedClient.AuthGetMe(undefined).pipe(Effect.mapError((error) => {
|
|
220
230
|
if (isRegistryClientError("AuthGetMe401")(error)) {
|
|
221
231
|
return makeAppError({
|
|
222
|
-
code: "
|
|
223
|
-
|
|
224
|
-
|
|
232
|
+
code: "auth",
|
|
233
|
+
message: "Not authenticated or token is invalid",
|
|
234
|
+
breadcrumbs: [
|
|
235
|
+
{ task: "Recover", description: "Run `axm login` to re-authenticate." },
|
|
236
|
+
],
|
|
225
237
|
cause: error,
|
|
226
238
|
});
|
|
227
239
|
}
|
|
228
240
|
if (isRegistryClientError("AuthGetMe400")(error)) {
|
|
229
241
|
return makeAppError({
|
|
230
|
-
code: "
|
|
231
|
-
|
|
232
|
-
|
|
242
|
+
code: "auth",
|
|
243
|
+
message: "Not authenticated or token is invalid",
|
|
244
|
+
breadcrumbs: [
|
|
245
|
+
{ task: "Recover", description: "Run `axm login` to re-authenticate." },
|
|
246
|
+
],
|
|
233
247
|
cause: error,
|
|
234
248
|
});
|
|
235
249
|
}
|
|
@@ -238,18 +252,26 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
238
252
|
// kept to safely handle future generated-client changes that add 5xx variants.
|
|
239
253
|
if (isAnyRegistryClientError(error) && hasTagSuffix(error, "5xx")) {
|
|
240
254
|
return makeAppError({
|
|
241
|
-
code: "
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
255
|
+
code: "network",
|
|
256
|
+
message: "Registry returned server error",
|
|
257
|
+
breadcrumbs: [
|
|
258
|
+
{
|
|
259
|
+
task: "Recover",
|
|
260
|
+
description: "The registry may be temporarily unavailable. Try again later.",
|
|
261
|
+
},
|
|
262
|
+
],
|
|
245
263
|
cause: error,
|
|
246
264
|
});
|
|
247
265
|
}
|
|
248
266
|
return makeAppError({
|
|
249
|
-
code: "
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
267
|
+
code: "auth",
|
|
268
|
+
message: "Could not connect to the registry",
|
|
269
|
+
breadcrumbs: [
|
|
270
|
+
{
|
|
271
|
+
task: "Recover",
|
|
272
|
+
description: "Verify the registry is running and reachable, then try again.",
|
|
273
|
+
},
|
|
274
|
+
],
|
|
253
275
|
cause: error,
|
|
254
276
|
});
|
|
255
277
|
}));
|
|
@@ -274,11 +296,23 @@ export const AuthClientLive = Layer.effect(AuthClient, Effect.gen(function* () {
|
|
|
274
296
|
// Test layer factory
|
|
275
297
|
// -----------------------------------------------------------------------------
|
|
276
298
|
export const AuthClientTest = (overrides) => Layer.succeed(AuthClient, {
|
|
277
|
-
initiateDeviceFlow: () => Effect.fail(makeAppError({
|
|
278
|
-
|
|
279
|
-
|
|
299
|
+
initiateDeviceFlow: () => Effect.fail(makeAppError({
|
|
300
|
+
code: "auth",
|
|
301
|
+
message: "Not implemented in test",
|
|
302
|
+
})),
|
|
303
|
+
pollDeviceToken: () => Effect.fail(makeAppError({
|
|
304
|
+
code: "auth",
|
|
305
|
+
message: "Not implemented in test",
|
|
306
|
+
})),
|
|
307
|
+
refreshToken: () => Effect.fail(makeAppError({
|
|
308
|
+
code: "auth",
|
|
309
|
+
message: "Not implemented in test",
|
|
310
|
+
})),
|
|
280
311
|
revokeToken: () => Effect.void,
|
|
281
|
-
getMe: () => Effect.fail(makeAppError({
|
|
312
|
+
getMe: () => Effect.fail(makeAppError({
|
|
313
|
+
code: "auth",
|
|
314
|
+
message: "Not implemented in test",
|
|
315
|
+
})),
|
|
282
316
|
...overrides,
|
|
283
317
|
});
|
|
284
318
|
//# sourceMappingURL=auth-client.js.map
|