@stigmer/cli 0.1.0-dev.20261017020314.g644422724c27
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/LICENSE +194 -0
- package/README.md +45 -0
- package/auth/auth0.d.ts +19 -0
- package/auth/auth0.d.ts.map +1 -0
- package/auth/auth0.js +39 -0
- package/auth/auth0.js.map +1 -0
- package/auth/callback-server.d.ts +18 -0
- package/auth/callback-server.d.ts.map +1 -0
- package/auth/callback-server.js +77 -0
- package/auth/callback-server.js.map +1 -0
- package/auth/index.d.ts +5 -0
- package/auth/index.d.ts.map +1 -0
- package/auth/index.js +6 -0
- package/auth/index.js.map +1 -0
- package/auth/login.d.ts +2 -0
- package/auth/login.d.ts.map +1 -0
- package/auth/login.js +81 -0
- package/auth/login.js.map +1 -0
- package/auth/pages.d.ts +7 -0
- package/auth/pages.d.ts.map +1 -0
- package/auth/pages.js +21 -0
- package/auth/pages.js.map +1 -0
- package/auth/pkce.d.ts +7 -0
- package/auth/pkce.d.ts.map +1 -0
- package/auth/pkce.js +22 -0
- package/auth/pkce.js.map +1 -0
- package/auth/token.d.ts +38 -0
- package/auth/token.d.ts.map +1 -0
- package/auth/token.js +120 -0
- package/auth/token.js.map +1 -0
- package/backend.d.ts +5 -0
- package/backend.d.ts.map +1 -0
- package/backend.js +14 -0
- package/backend.js.map +1 -0
- package/cli/stigmer.d.ts +3 -0
- package/cli/stigmer.d.ts.map +1 -0
- package/cli/stigmer.js +14 -0
- package/cli/stigmer.js.map +1 -0
- package/client/client.d.ts +44 -0
- package/client/client.d.ts.map +1 -0
- package/client/client.js +82 -0
- package/client/client.js.map +1 -0
- package/client/index.d.ts +2 -0
- package/client/index.d.ts.map +1 -0
- package/client/index.js +3 -0
- package/client/index.js.map +1 -0
- package/client/organizations.d.ts +41 -0
- package/client/organizations.d.ts.map +1 -0
- package/client/organizations.js +86 -0
- package/client/organizations.js.map +1 -0
- package/client/single-org.d.ts +16 -0
- package/client/single-org.d.ts.map +1 -0
- package/client/single-org.js +35 -0
- package/client/single-org.js.map +1 -0
- package/commands/access-history/index.d.ts +3 -0
- package/commands/access-history/index.d.ts.map +1 -0
- package/commands/access-history/index.js +99 -0
- package/commands/access-history/index.js.map +1 -0
- package/commands/agent-exec-flags.d.ts +30 -0
- package/commands/agent-exec-flags.d.ts.map +1 -0
- package/commands/agent-exec-flags.js +49 -0
- package/commands/agent-exec-flags.js.map +1 -0
- package/commands/agent.d.ts +3 -0
- package/commands/agent.d.ts.map +1 -0
- package/commands/agent.js +43 -0
- package/commands/agent.js.map +1 -0
- package/commands/apikey/duration.d.ts +2 -0
- package/commands/apikey/duration.d.ts.map +1 -0
- package/commands/apikey/duration.js +30 -0
- package/commands/apikey/duration.js.map +1 -0
- package/commands/apikey/index.d.ts +18 -0
- package/commands/apikey/index.d.ts.map +1 -0
- package/commands/apikey/index.js +198 -0
- package/commands/apikey/index.js.map +1 -0
- package/commands/apply.d.ts +3 -0
- package/commands/apply.d.ts.map +1 -0
- package/commands/apply.js +146 -0
- package/commands/apply.js.map +1 -0
- package/commands/auth/index.d.ts +3 -0
- package/commands/auth/index.d.ts.map +1 -0
- package/commands/auth/index.js +58 -0
- package/commands/auth/index.js.map +1 -0
- package/commands/auth/login.d.ts +13 -0
- package/commands/auth/login.d.ts.map +1 -0
- package/commands/auth/login.js +58 -0
- package/commands/auth/login.js.map +1 -0
- package/commands/auth/whoami.d.ts +22 -0
- package/commands/auth/whoami.d.ts.map +1 -0
- package/commands/auth/whoami.js +123 -0
- package/commands/auth/whoami.js.map +1 -0
- package/commands/channel.d.ts +3 -0
- package/commands/channel.d.ts.map +1 -0
- package/commands/channel.js +114 -0
- package/commands/channel.js.map +1 -0
- package/commands/completion.d.ts +3 -0
- package/commands/completion.d.ts.map +1 -0
- package/commands/completion.js +80 -0
- package/commands/completion.js.map +1 -0
- package/commands/config/backend.d.ts +3 -0
- package/commands/config/backend.d.ts.map +1 -0
- package/commands/config/backend.js +171 -0
- package/commands/config/backend.js.map +1 -0
- package/commands/config/context.d.ts +3 -0
- package/commands/config/context.d.ts.map +1 -0
- package/commands/config/context.js +88 -0
- package/commands/config/context.js.map +1 -0
- package/commands/config/index.d.ts +3 -0
- package/commands/config/index.d.ts.map +1 -0
- package/commands/config/index.js +13 -0
- package/commands/config/index.js.map +1 -0
- package/commands/config/kv.d.ts +3 -0
- package/commands/config/kv.d.ts.map +1 -0
- package/commands/config/kv.js +39 -0
- package/commands/config/kv.js.map +1 -0
- package/commands/connect.d.ts +3 -0
- package/commands/connect.d.ts.map +1 -0
- package/commands/connect.js +74 -0
- package/commands/connect.js.map +1 -0
- package/commands/delete.d.ts +3 -0
- package/commands/delete.d.ts.map +1 -0
- package/commands/delete.js +44 -0
- package/commands/delete.js.map +1 -0
- package/commands/down.d.ts +3 -0
- package/commands/down.d.ts.map +1 -0
- package/commands/down.js +23 -0
- package/commands/down.js.map +1 -0
- package/commands/download.d.ts +3 -0
- package/commands/download.d.ts.map +1 -0
- package/commands/download.js +79 -0
- package/commands/download.js.map +1 -0
- package/commands/eval.d.ts +3 -0
- package/commands/eval.d.ts.map +1 -0
- package/commands/eval.js +115 -0
- package/commands/eval.js.map +1 -0
- package/commands/get.d.ts +3 -0
- package/commands/get.d.ts.map +1 -0
- package/commands/get.js +113 -0
- package/commands/get.js.map +1 -0
- package/commands/install.d.ts +3 -0
- package/commands/install.d.ts.map +1 -0
- package/commands/install.js +68 -0
- package/commands/install.js.map +1 -0
- package/commands/internal-daemon.d.ts +3 -0
- package/commands/internal-daemon.d.ts.map +1 -0
- package/commands/internal-daemon.js +15 -0
- package/commands/internal-daemon.js.map +1 -0
- package/commands/list.d.ts +10 -0
- package/commands/list.d.ts.map +1 -0
- package/commands/list.js +131 -0
- package/commands/list.js.map +1 -0
- package/commands/logs.d.ts +3 -0
- package/commands/logs.d.ts.map +1 -0
- package/commands/logs.js +59 -0
- package/commands/logs.js.map +1 -0
- package/commands/marketplace.d.ts +3 -0
- package/commands/marketplace.d.ts.map +1 -0
- package/commands/marketplace.js +94 -0
- package/commands/marketplace.js.map +1 -0
- package/commands/mcp-server.d.ts +22 -0
- package/commands/mcp-server.d.ts.map +1 -0
- package/commands/mcp-server.js +105 -0
- package/commands/mcp-server.js.map +1 -0
- package/commands/mcp.d.ts +3 -0
- package/commands/mcp.d.ts.map +1 -0
- package/commands/mcp.js +58 -0
- package/commands/mcp.js.map +1 -0
- package/commands/push.d.ts +27 -0
- package/commands/push.d.ts.map +1 -0
- package/commands/push.js +401 -0
- package/commands/push.js.map +1 -0
- package/commands/reset.d.ts +3 -0
- package/commands/reset.d.ts.map +1 -0
- package/commands/reset.js +45 -0
- package/commands/reset.js.map +1 -0
- package/commands/resume.d.ts +3 -0
- package/commands/resume.d.ts.map +1 -0
- package/commands/resume.js +90 -0
- package/commands/resume.js.map +1 -0
- package/commands/run.d.ts +3 -0
- package/commands/run.d.ts.map +1 -0
- package/commands/run.js +158 -0
- package/commands/run.js.map +1 -0
- package/commands/runs/approve.d.ts +3 -0
- package/commands/runs/approve.d.ts.map +1 -0
- package/commands/runs/approve.js +37 -0
- package/commands/runs/approve.js.map +1 -0
- package/commands/runs/control.d.ts +3 -0
- package/commands/runs/control.d.ts.map +1 -0
- package/commands/runs/control.js +71 -0
- package/commands/runs/control.js.map +1 -0
- package/commands/runs/index.d.ts +3 -0
- package/commands/runs/index.d.ts.map +1 -0
- package/commands/runs/index.js +28 -0
- package/commands/runs/index.js.map +1 -0
- package/commands/runs/logs.d.ts +3 -0
- package/commands/runs/logs.d.ts.map +1 -0
- package/commands/runs/logs.js +33 -0
- package/commands/runs/logs.js.map +1 -0
- package/commands/runs/scores.d.ts +3 -0
- package/commands/runs/scores.d.ts.map +1 -0
- package/commands/runs/scores.js +26 -0
- package/commands/runs/scores.js.map +1 -0
- package/commands/runs/to-eval-case.d.ts +3 -0
- package/commands/runs/to-eval-case.d.ts.map +1 -0
- package/commands/runs/to-eval-case.js +35 -0
- package/commands/runs/to-eval-case.js.map +1 -0
- package/commands/runs/trace.d.ts +3 -0
- package/commands/runs/trace.d.ts.map +1 -0
- package/commands/runs/trace.js +24 -0
- package/commands/runs/trace.js.map +1 -0
- package/commands/schedule.d.ts +3 -0
- package/commands/schedule.d.ts.map +1 -0
- package/commands/schedule.js +57 -0
- package/commands/schedule.js.map +1 -0
- package/commands/search.d.ts +3 -0
- package/commands/search.d.ts.map +1 -0
- package/commands/search.js +76 -0
- package/commands/search.js.map +1 -0
- package/commands/service-account/index.d.ts +7 -0
- package/commands/service-account/index.d.ts.map +1 -0
- package/commands/service-account/index.js +144 -0
- package/commands/service-account/index.js.map +1 -0
- package/commands/setup.d.ts +3 -0
- package/commands/setup.d.ts.map +1 -0
- package/commands/setup.js +76 -0
- package/commands/setup.js.map +1 -0
- package/commands/shared.d.ts +15 -0
- package/commands/shared.d.ts.map +1 -0
- package/commands/shared.js +34 -0
- package/commands/shared.js.map +1 -0
- package/commands/status.d.ts +3 -0
- package/commands/status.d.ts.map +1 -0
- package/commands/status.js +18 -0
- package/commands/status.js.map +1 -0
- package/commands/tag.d.ts +3 -0
- package/commands/tag.d.ts.map +1 -0
- package/commands/tag.js +24 -0
- package/commands/tag.js.map +1 -0
- package/commands/up.d.ts +3 -0
- package/commands/up.d.ts.map +1 -0
- package/commands/up.js +84 -0
- package/commands/up.js.map +1 -0
- package/commands/usage.d.ts +5 -0
- package/commands/usage.d.ts.map +1 -0
- package/commands/usage.js +92 -0
- package/commands/usage.js.map +1 -0
- package/commands/validate.d.ts +3 -0
- package/commands/validate.d.ts.map +1 -0
- package/commands/validate.js +95 -0
- package/commands/validate.js.map +1 -0
- package/commands/vault.d.ts +3 -0
- package/commands/vault.d.ts.map +1 -0
- package/commands/vault.js +143 -0
- package/commands/vault.js.map +1 -0
- package/commands/version.d.ts +3 -0
- package/commands/version.d.ts.map +1 -0
- package/commands/version.js +11 -0
- package/commands/version.js.map +1 -0
- package/config/config.d.ts +110 -0
- package/config/config.d.ts.map +1 -0
- package/config/config.js +199 -0
- package/config/config.js.map +1 -0
- package/config/index.d.ts +5 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +6 -0
- package/config/index.js.map +1 -0
- package/config/keys.d.ts +6 -0
- package/config/keys.d.ts.map +1 -0
- package/config/keys.js +80 -0
- package/config/keys.js.map +1 -0
- package/config/paths.d.ts +10 -0
- package/config/paths.d.ts.map +1 -0
- package/config/paths.js +21 -0
- package/config/paths.js.map +1 -0
- package/config/resolve.d.ts +65 -0
- package/config/resolve.d.ts.map +1 -0
- package/config/resolve.js +160 -0
- package/config/resolve.js.map +1 -0
- package/errors/classify.d.ts +17 -0
- package/errors/classify.d.ts.map +1 -0
- package/errors/classify.js +204 -0
- package/errors/classify.js.map +1 -0
- package/errors/cli-exit-error.d.ts +6 -0
- package/errors/cli-exit-error.d.ts.map +1 -0
- package/errors/cli-exit-error.js +15 -0
- package/errors/cli-exit-error.js.map +1 -0
- package/errors/exit-codes.d.ts +10 -0
- package/errors/exit-codes.d.ts.map +1 -0
- package/errors/exit-codes.js +15 -0
- package/errors/exit-codes.js.map +1 -0
- package/errors/handle.d.ts +14 -0
- package/errors/handle.d.ts.map +1 -0
- package/errors/handle.js +46 -0
- package/errors/handle.js.map +1 -0
- package/errors/index.d.ts +6 -0
- package/errors/index.d.ts.map +1 -0
- package/errors/index.js +7 -0
- package/errors/index.js.map +1 -0
- package/errors/usage-error.d.ts +5 -0
- package/errors/usage-error.d.ts.map +1 -0
- package/errors/usage-error.js +13 -0
- package/errors/usage-error.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +8 -0
- package/index.js.map +1 -0
- package/local/artifact.d.ts +77 -0
- package/local/artifact.d.ts.map +1 -0
- package/local/artifact.js +268 -0
- package/local/artifact.js.map +1 -0
- package/local/constants.d.ts +41 -0
- package/local/constants.d.ts.map +1 -0
- package/local/constants.js +48 -0
- package/local/constants.js.map +1 -0
- package/local/daemon/components.d.ts +20 -0
- package/local/daemon/components.d.ts.map +1 -0
- package/local/daemon/components.js +140 -0
- package/local/daemon/components.js.map +1 -0
- package/local/daemon/env.d.ts +77 -0
- package/local/daemon/env.d.ts.map +1 -0
- package/local/daemon/env.js +107 -0
- package/local/daemon/env.js.map +1 -0
- package/local/daemon/host.d.ts +15 -0
- package/local/daemon/host.d.ts.map +1 -0
- package/local/daemon/host.js +115 -0
- package/local/daemon/host.js.map +1 -0
- package/local/daemon/index.d.ts +8 -0
- package/local/daemon/index.d.ts.map +1 -0
- package/local/daemon/index.js +8 -0
- package/local/daemon/index.js.map +1 -0
- package/local/daemon/launch.d.ts +38 -0
- package/local/daemon/launch.d.ts.map +1 -0
- package/local/daemon/launch.js +261 -0
- package/local/daemon/launch.js.map +1 -0
- package/local/daemon/process.d.ts +42 -0
- package/local/daemon/process.d.ts.map +1 -0
- package/local/daemon/process.js +166 -0
- package/local/daemon/process.js.map +1 -0
- package/local/daemon/supervisor.d.ts +56 -0
- package/local/daemon/supervisor.d.ts.map +1 -0
- package/local/daemon/supervisor.js +211 -0
- package/local/daemon/supervisor.js.map +1 -0
- package/local/daemon/types.d.ts +65 -0
- package/local/daemon/types.d.ts.map +1 -0
- package/local/daemon/types.js +9 -0
- package/local/daemon/types.js.map +1 -0
- package/local/llm-config.d.ts +24 -0
- package/local/llm-config.d.ts.map +1 -0
- package/local/llm-config.js +74 -0
- package/local/llm-config.js.map +1 -0
- package/local/logs/tail.d.ts +19 -0
- package/local/logs/tail.d.ts.map +1 -0
- package/local/logs/tail.js +86 -0
- package/local/logs/tail.js.map +1 -0
- package/local/logs/view.d.ts +20 -0
- package/local/logs/view.d.ts.map +1 -0
- package/local/logs/view.js +50 -0
- package/local/logs/view.js.map +1 -0
- package/local/net/tcp.d.ts +23 -0
- package/local/net/tcp.d.ts.map +1 -0
- package/local/net/tcp.js +47 -0
- package/local/net/tcp.js.map +1 -0
- package/local/operator-config.d.ts +28 -0
- package/local/operator-config.d.ts.map +1 -0
- package/local/operator-config.js +77 -0
- package/local/operator-config.js.map +1 -0
- package/local/paths.d.ts +47 -0
- package/local/paths.d.ts.map +1 -0
- package/local/paths.js +83 -0
- package/local/paths.js.map +1 -0
- package/local/reset.d.ts +14 -0
- package/local/reset.d.ts.map +1 -0
- package/local/reset.js +57 -0
- package/local/reset.js.map +1 -0
- package/local/runtime/index.d.ts +5 -0
- package/local/runtime/index.d.ts.map +1 -0
- package/local/runtime/index.js +8 -0
- package/local/runtime/index.js.map +1 -0
- package/local/runtime/node.d.ts +17 -0
- package/local/runtime/node.d.ts.map +1 -0
- package/local/runtime/node.js +139 -0
- package/local/runtime/node.js.map +1 -0
- package/local/runtime/runner.d.ts +45 -0
- package/local/runtime/runner.d.ts.map +1 -0
- package/local/runtime/runner.js +131 -0
- package/local/runtime/runner.js.map +1 -0
- package/local/runtime/runtimes-install.d.ts +13 -0
- package/local/runtime/runtimes-install.d.ts.map +1 -0
- package/local/runtime/runtimes-install.js +63 -0
- package/local/runtime/runtimes-install.js.map +1 -0
- package/local/runtime/server.d.ts +40 -0
- package/local/runtime/server.d.ts.map +1 -0
- package/local/runtime/server.js +144 -0
- package/local/runtime/server.js.map +1 -0
- package/local/runtime/which.d.ts +3 -0
- package/local/runtime/which.d.ts.map +1 -0
- package/local/runtime/which.js +30 -0
- package/local/runtime/which.js.map +1 -0
- package/local/setup/prompt.d.ts +8 -0
- package/local/setup/prompt.d.ts.map +1 -0
- package/local/setup/prompt.js +63 -0
- package/local/setup/prompt.js.map +1 -0
- package/local/setup/wizard.d.ts +43 -0
- package/local/setup/wizard.d.ts.map +1 -0
- package/local/setup/wizard.js +119 -0
- package/local/setup/wizard.js.map +1 -0
- package/local/state/health-state.d.ts +26 -0
- package/local/state/health-state.d.ts.map +1 -0
- package/local/state/health-state.js +34 -0
- package/local/state/health-state.js.map +1 -0
- package/local/state/index.d.ts +7 -0
- package/local/state/index.d.ts.map +1 -0
- package/local/state/index.js +8 -0
- package/local/state/index.js.map +1 -0
- package/local/state/lock.d.ts +13 -0
- package/local/state/lock.d.ts.map +1 -0
- package/local/state/lock.js +84 -0
- package/local/state/lock.js.map +1 -0
- package/local/state/log-rotation.d.ts +17 -0
- package/local/state/log-rotation.d.ts.map +1 -0
- package/local/state/log-rotation.js +101 -0
- package/local/state/log-rotation.js.map +1 -0
- package/local/state/pidfile.d.ts +11 -0
- package/local/state/pidfile.d.ts.map +1 -0
- package/local/state/pidfile.js +35 -0
- package/local/state/pidfile.js.map +1 -0
- package/local/state/proc.d.ts +29 -0
- package/local/state/proc.d.ts.map +1 -0
- package/local/state/proc.js +84 -0
- package/local/state/proc.js.map +1 -0
- package/local/state/startup-config.d.ts +24 -0
- package/local/state/startup-config.d.ts.map +1 -0
- package/local/state/startup-config.js +36 -0
- package/local/state/startup-config.js.map +1 -0
- package/local/status.d.ts +9 -0
- package/local/status.d.ts.map +1 -0
- package/local/status.js +170 -0
- package/local/status.js.map +1 -0
- package/local/temporal/download.d.ts +42 -0
- package/local/temporal/download.d.ts.map +1 -0
- package/local/temporal/download.js +55 -0
- package/local/temporal/download.js.map +1 -0
- package/local/temporal/index.d.ts +5 -0
- package/local/temporal/index.d.ts.map +1 -0
- package/local/temporal/index.js +6 -0
- package/local/temporal/index.js.map +1 -0
- package/local/temporal/inspect.d.ts +15 -0
- package/local/temporal/inspect.d.ts.map +1 -0
- package/local/temporal/inspect.js +72 -0
- package/local/temporal/inspect.js.map +1 -0
- package/local/temporal/manager.d.ts +62 -0
- package/local/temporal/manager.d.ts.map +1 -0
- package/local/temporal/manager.js +221 -0
- package/local/temporal/manager.js.map +1 -0
- package/local/temporal/supervisor.d.ts +34 -0
- package/local/temporal/supervisor.d.ts.map +1 -0
- package/local/temporal/supervisor.js +83 -0
- package/local/temporal/supervisor.js.map +1 -0
- package/local/webconsole/index.d.ts +3 -0
- package/local/webconsole/index.d.ts.map +1 -0
- package/local/webconsole/index.js +27 -0
- package/local/webconsole/index.js.map +1 -0
- package/logger.d.ts +13 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +35 -0
- package/logger.js.map +1 -0
- package/marketplace/config.d.ts +61 -0
- package/marketplace/config.d.ts.map +1 -0
- package/marketplace/config.js +179 -0
- package/marketplace/config.js.map +1 -0
- package/marketplace/github.d.ts +68 -0
- package/marketplace/github.d.ts.map +1 -0
- package/marketplace/github.js +272 -0
- package/marketplace/github.js.map +1 -0
- package/marketplace/index.d.ts +8 -0
- package/marketplace/index.d.ts.map +1 -0
- package/marketplace/index.js +12 -0
- package/marketplace/index.js.map +1 -0
- package/marketplace/install.d.ts +35 -0
- package/marketplace/install.d.ts.map +1 -0
- package/marketplace/install.js +156 -0
- package/marketplace/install.js.map +1 -0
- package/marketplace/materialize.d.ts +19 -0
- package/marketplace/materialize.d.ts.map +1 -0
- package/marketplace/materialize.js +53 -0
- package/marketplace/materialize.js.map +1 -0
- package/marketplace/official.d.ts +28 -0
- package/marketplace/official.d.ts.map +1 -0
- package/marketplace/official.js +87 -0
- package/marketplace/official.js.map +1 -0
- package/marketplace/read.d.ts +17 -0
- package/marketplace/read.d.ts.map +1 -0
- package/marketplace/read.js +44 -0
- package/marketplace/read.js.map +1 -0
- package/marketplace/ref.d.ts +13 -0
- package/marketplace/ref.d.ts.map +1 -0
- package/marketplace/ref.js +54 -0
- package/marketplace/ref.js.map +1 -0
- package/marketplace/render.d.ts +22 -0
- package/marketplace/render.d.ts.map +1 -0
- package/marketplace/render.js +115 -0
- package/marketplace/render.js.map +1 -0
- package/output/command-result.d.ts +55 -0
- package/output/command-result.d.ts.map +1 -0
- package/output/command-result.js +147 -0
- package/output/command-result.js.map +1 -0
- package/output/confirm.d.ts +22 -0
- package/output/confirm.d.ts.map +1 -0
- package/output/confirm.js +43 -0
- package/output/confirm.js.map +1 -0
- package/output/format.d.ts +22 -0
- package/output/format.d.ts.map +1 -0
- package/output/format.js +72 -0
- package/output/format.js.map +1 -0
- package/output/index.d.ts +7 -0
- package/output/index.d.ts.map +1 -0
- package/output/index.js +8 -0
- package/output/index.js.map +1 -0
- package/output/ndjson.d.ts +7 -0
- package/output/ndjson.d.ts.map +1 -0
- package/output/ndjson.js +13 -0
- package/output/ndjson.js.map +1 -0
- package/output/proto.d.ts +12 -0
- package/output/proto.d.ts.map +1 -0
- package/output/proto.js +34 -0
- package/output/proto.js.map +1 -0
- package/output/style.d.ts +19 -0
- package/output/style.d.ts.map +1 -0
- package/output/style.js +44 -0
- package/output/style.js.map +1 -0
- package/output/table.d.ts +5 -0
- package/output/table.d.ts.map +1 -0
- package/output/table.js +43 -0
- package/output/table.js.map +1 -0
- package/package.json +50 -0
- package/program.d.ts +17 -0
- package/program.d.ts.map +1 -0
- package/program.js +195 -0
- package/program.js.map +1 -0
- package/registry/aliases.d.ts +21 -0
- package/registry/aliases.d.ts.map +1 -0
- package/registry/aliases.js +99 -0
- package/registry/aliases.js.map +1 -0
- package/registry/index.d.ts +6 -0
- package/registry/index.d.ts.map +1 -0
- package/registry/index.js +7 -0
- package/registry/index.js.map +1 -0
- package/registry/metadata.d.ts +27 -0
- package/registry/metadata.d.ts.map +1 -0
- package/registry/metadata.js +152 -0
- package/registry/metadata.js.map +1 -0
- package/registry/registry.d.ts +56 -0
- package/registry/registry.d.ts.map +1 -0
- package/registry/registry.js +85 -0
- package/registry/registry.js.map +1 -0
- package/registry/verb-support.d.ts +5 -0
- package/registry/verb-support.d.ts.map +1 -0
- package/registry/verb-support.js +112 -0
- package/registry/verb-support.js.map +1 -0
- package/registry/verbs.d.ts +16 -0
- package/registry/verbs.d.ts.map +1 -0
- package/registry/verbs.js +35 -0
- package/registry/verbs.js.map +1 -0
- package/resources/access-history.d.ts +28 -0
- package/resources/access-history.d.ts.map +1 -0
- package/resources/access-history.js +124 -0
- package/resources/access-history.js.map +1 -0
- package/resources/agent/quality.d.ts +40 -0
- package/resources/agent/quality.d.ts.map +1 -0
- package/resources/agent/quality.js +338 -0
- package/resources/agent/quality.js.map +1 -0
- package/resources/agent/resolve.d.ts +5 -0
- package/resources/agent/resolve.d.ts.map +1 -0
- package/resources/agent/resolve.js +23 -0
- package/resources/agent/resolve.js.map +1 -0
- package/resources/apply/apply.d.ts +62 -0
- package/resources/apply/apply.d.ts.map +1 -0
- package/resources/apply/apply.js +371 -0
- package/resources/apply/apply.js.map +1 -0
- package/resources/apply/handlers.d.ts +54 -0
- package/resources/apply/handlers.d.ts.map +1 -0
- package/resources/apply/handlers.js +56 -0
- package/resources/apply/handlers.js.map +1 -0
- package/resources/channel.d.ts +52 -0
- package/resources/channel.d.ts.map +1 -0
- package/resources/channel.js +404 -0
- package/resources/channel.js.map +1 -0
- package/resources/connect/address.d.ts +5 -0
- package/resources/connect/address.d.ts.map +1 -0
- package/resources/connect/address.js +49 -0
- package/resources/connect/address.js.map +1 -0
- package/resources/connect/connect.d.ts +30 -0
- package/resources/connect/connect.d.ts.map +1 -0
- package/resources/connect/connect.js +163 -0
- package/resources/connect/connect.js.map +1 -0
- package/resources/connect/discover.d.ts +7 -0
- package/resources/connect/discover.d.ts.map +1 -0
- package/resources/connect/discover.js +122 -0
- package/resources/connect/discover.js.map +1 -0
- package/resources/connect/display.d.ts +10 -0
- package/resources/connect/display.d.ts.map +1 -0
- package/resources/connect/display.js +50 -0
- package/resources/connect/display.js.map +1 -0
- package/resources/connect/sign-in.d.ts +48 -0
- package/resources/connect/sign-in.d.ts.map +1 -0
- package/resources/connect/sign-in.js +158 -0
- package/resources/connect/sign-in.js.map +1 -0
- package/resources/cursor-pages.d.ts +9 -0
- package/resources/cursor-pages.d.ts.map +1 -0
- package/resources/cursor-pages.js +25 -0
- package/resources/cursor-pages.js.map +1 -0
- package/resources/delete.d.ts +34 -0
- package/resources/delete.d.ts.map +1 -0
- package/resources/delete.js +260 -0
- package/resources/delete.js.map +1 -0
- package/resources/documents.d.ts +16 -0
- package/resources/documents.d.ts.map +1 -0
- package/resources/documents.js +89 -0
- package/resources/documents.js.map +1 -0
- package/resources/download.d.ts +16 -0
- package/resources/download.d.ts.map +1 -0
- package/resources/download.js +101 -0
- package/resources/download.js.map +1 -0
- package/resources/eval-run/follow.d.ts +67 -0
- package/resources/eval-run/follow.d.ts.map +1 -0
- package/resources/eval-run/follow.js +285 -0
- package/resources/eval-run/follow.js.map +1 -0
- package/resources/eval-run/node-io.d.ts +4 -0
- package/resources/eval-run/node-io.d.ts.map +1 -0
- package/resources/eval-run/node-io.js +39 -0
- package/resources/eval-run/node-io.js.map +1 -0
- package/resources/eval-run/options.d.ts +116 -0
- package/resources/eval-run/options.d.ts.map +1 -0
- package/resources/eval-run/options.js +265 -0
- package/resources/eval-run/options.js.map +1 -0
- package/resources/eval-run/report.d.ts +64 -0
- package/resources/eval-run/report.d.ts.map +1 -0
- package/resources/eval-run/report.js +434 -0
- package/resources/eval-run/report.js.map +1 -0
- package/resources/eval-run/run.d.ts +10 -0
- package/resources/eval-run/run.d.ts.map +1 -0
- package/resources/eval-run/run.js +158 -0
- package/resources/eval-run/run.js.map +1 -0
- package/resources/eval.d.ts +69 -0
- package/resources/eval.d.ts.map +1 -0
- package/resources/eval.js +225 -0
- package/resources/eval.js.map +1 -0
- package/resources/get-bindings.d.ts +13 -0
- package/resources/get-bindings.d.ts.map +1 -0
- package/resources/get-bindings.js +93 -0
- package/resources/get-bindings.js.map +1 -0
- package/resources/get.d.ts +6 -0
- package/resources/get.d.ts.map +1 -0
- package/resources/get.js +43 -0
- package/resources/get.js.map +1 -0
- package/resources/git.d.ts +15 -0
- package/resources/git.d.ts.map +1 -0
- package/resources/git.js +69 -0
- package/resources/git.js.map +1 -0
- package/resources/ignore/index.d.ts +3 -0
- package/resources/ignore/index.d.ts.map +1 -0
- package/resources/ignore/index.js +6 -0
- package/resources/ignore/index.js.map +1 -0
- package/resources/ignore/matcher.d.ts +11 -0
- package/resources/ignore/matcher.d.ts.map +1 -0
- package/resources/ignore/matcher.js +41 -0
- package/resources/ignore/matcher.js.map +1 -0
- package/resources/list.d.ts +16 -0
- package/resources/list.d.ts.map +1 -0
- package/resources/list.js +453 -0
- package/resources/list.js.map +1 -0
- package/resources/mcp/add.d.ts +18 -0
- package/resources/mcp/add.d.ts.map +1 -0
- package/resources/mcp/add.js +95 -0
- package/resources/mcp/add.js.map +1 -0
- package/resources/mcp/placeholder-resolver.d.ts +19 -0
- package/resources/mcp/placeholder-resolver.d.ts.map +1 -0
- package/resources/mcp/placeholder-resolver.js +52 -0
- package/resources/mcp/placeholder-resolver.js.map +1 -0
- package/resources/picker/ink.d.ts +45 -0
- package/resources/picker/ink.d.ts.map +1 -0
- package/resources/picker/ink.js +45 -0
- package/resources/picker/ink.js.map +1 -0
- package/resources/picker/tty.d.ts +19 -0
- package/resources/picker/tty.d.ts.map +1 -0
- package/resources/picker/tty.js +21 -0
- package/resources/picker/tty.js.map +1 -0
- package/resources/plugin.d.ts +131 -0
- package/resources/plugin.d.ts.map +1 -0
- package/resources/plugin.js +382 -0
- package/resources/plugin.js.map +1 -0
- package/resources/reference.d.ts +44 -0
- package/resources/reference.d.ts.map +1 -0
- package/resources/reference.js +152 -0
- package/resources/reference.js.map +1 -0
- package/resources/render.d.ts +52 -0
- package/resources/render.d.ts.map +1 -0
- package/resources/render.js +135 -0
- package/resources/render.js.map +1 -0
- package/resources/run/agent-exec.d.ts +16 -0
- package/resources/run/agent-exec.d.ts.map +1 -0
- package/resources/run/agent-exec.js +89 -0
- package/resources/run/agent-exec.js.map +1 -0
- package/resources/run/attachments.d.ts +24 -0
- package/resources/run/attachments.d.ts.map +1 -0
- package/resources/run/attachments.js +237 -0
- package/resources/run/attachments.js.map +1 -0
- package/resources/run/create.d.ts +57 -0
- package/resources/run/create.d.ts.map +1 -0
- package/resources/run/create.js +112 -0
- package/resources/run/create.js.map +1 -0
- package/resources/run/epilogue.d.ts +9 -0
- package/resources/run/epilogue.d.ts.map +1 -0
- package/resources/run/epilogue.js +172 -0
- package/resources/run/epilogue.js.map +1 -0
- package/resources/run/header.d.ts +31 -0
- package/resources/run/header.d.ts.map +1 -0
- package/resources/run/header.js +54 -0
- package/resources/run/header.js.map +1 -0
- package/resources/run/plugins.d.ts +11 -0
- package/resources/run/plugins.d.ts.map +1 -0
- package/resources/run/plugins.js +18 -0
- package/resources/run/plugins.js.map +1 -0
- package/resources/run/prepare.d.ts +149 -0
- package/resources/run/prepare.d.ts.map +1 -0
- package/resources/run/prepare.js +180 -0
- package/resources/run/prepare.js.map +1 -0
- package/resources/run/references.d.ts +22 -0
- package/resources/run/references.d.ts.map +1 -0
- package/resources/run/references.js +56 -0
- package/resources/run/references.js.map +1 -0
- package/resources/run/resolve.d.ts +5 -0
- package/resources/run/resolve.d.ts.map +1 -0
- package/resources/run/resolve.js +16 -0
- package/resources/run/resolve.js.map +1 -0
- package/resources/run/resume.d.ts +12 -0
- package/resources/run/resume.d.ts.map +1 -0
- package/resources/run/resume.js +97 -0
- package/resources/run/resume.js.map +1 -0
- package/resources/run/stream.d.ts +24 -0
- package/resources/run/stream.d.ts.map +1 -0
- package/resources/run/stream.js +74 -0
- package/resources/run/stream.js.map +1 -0
- package/resources/run/vaults.d.ts +11 -0
- package/resources/run/vaults.d.ts.map +1 -0
- package/resources/run/vaults.js +19 -0
- package/resources/run/vaults.js.map +1 -0
- package/resources/run/workspace.d.ts +17 -0
- package/resources/run/workspace.d.ts.map +1 -0
- package/resources/run/workspace.js +147 -0
- package/resources/run/workspace.js.map +1 -0
- package/resources/run-approve.d.ts +18 -0
- package/resources/run-approve.d.ts.map +1 -0
- package/resources/run-approve.js +72 -0
- package/resources/run-approve.js.map +1 -0
- package/resources/run-control.d.ts +19 -0
- package/resources/run-control.d.ts.map +1 -0
- package/resources/run-control.js +37 -0
- package/resources/run-control.js.map +1 -0
- package/resources/run-format.d.ts +15 -0
- package/resources/run-format.d.ts.map +1 -0
- package/resources/run-format.js +49 -0
- package/resources/run-format.js.map +1 -0
- package/resources/run-logs.d.ts +17 -0
- package/resources/run-logs.d.ts.map +1 -0
- package/resources/run-logs.js +105 -0
- package/resources/run-logs.js.map +1 -0
- package/resources/run-scores.d.ts +20 -0
- package/resources/run-scores.d.ts.map +1 -0
- package/resources/run-scores.js +132 -0
- package/resources/run-scores.js.map +1 -0
- package/resources/run-to-eval-case.d.ts +24 -0
- package/resources/run-to-eval-case.d.ts.map +1 -0
- package/resources/run-to-eval-case.js +113 -0
- package/resources/run-to-eval-case.js.map +1 -0
- package/resources/run-trace.d.ts +10 -0
- package/resources/run-trace.d.ts.map +1 -0
- package/resources/run-trace.js +81 -0
- package/resources/run-trace.js.map +1 -0
- package/resources/runs.d.ts +45 -0
- package/resources/runs.d.ts.map +1 -0
- package/resources/runs.js +123 -0
- package/resources/runs.js.map +1 -0
- package/resources/schedule.d.ts +22 -0
- package/resources/schedule.d.ts.map +1 -0
- package/resources/schedule.js +116 -0
- package/resources/schedule.js.map +1 -0
- package/resources/search.d.ts +21 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +25 -0
- package/resources/search.js.map +1 -0
- package/resources/service-account.d.ts +37 -0
- package/resources/service-account.d.ts.map +1 -0
- package/resources/service-account.js +139 -0
- package/resources/service-account.js.map +1 -0
- package/resources/session.d.ts +20 -0
- package/resources/session.d.ts.map +1 -0
- package/resources/session.js +51 -0
- package/resources/session.js.map +1 -0
- package/resources/skill.d.ts +123 -0
- package/resources/skill.d.ts.map +1 -0
- package/resources/skill.js +441 -0
- package/resources/skill.js.map +1 -0
- package/resources/stream/answer.d.ts +34 -0
- package/resources/stream/answer.d.ts.map +1 -0
- package/resources/stream/answer.js +88 -0
- package/resources/stream/answer.js.map +1 -0
- package/resources/stream/headless.d.ts +45 -0
- package/resources/stream/headless.d.ts.map +1 -0
- package/resources/stream/headless.js +100 -0
- package/resources/stream/headless.js.map +1 -0
- package/resources/stream/ink.d.ts +22 -0
- package/resources/stream/ink.d.ts.map +1 -0
- package/resources/stream/ink.js +24 -0
- package/resources/stream/ink.js.map +1 -0
- package/resources/stream/render-ndjson.d.ts +23 -0
- package/resources/stream/render-ndjson.d.ts.map +1 -0
- package/resources/stream/render-ndjson.js +28 -0
- package/resources/stream/render-ndjson.js.map +1 -0
- package/resources/stream/render-plaintext.d.ts +27 -0
- package/resources/stream/render-plaintext.d.ts.map +1 -0
- package/resources/stream/render-plaintext.js +142 -0
- package/resources/stream/render-plaintext.js.map +1 -0
- package/resources/stream/submit.d.ts +25 -0
- package/resources/stream/submit.d.ts.map +1 -0
- package/resources/stream/submit.js +132 -0
- package/resources/stream/submit.js.map +1 -0
- package/resources/stream/tty.d.ts +8 -0
- package/resources/stream/tty.d.ts.map +1 -0
- package/resources/stream/tty.js +15 -0
- package/resources/stream/tty.js.map +1 -0
- package/resources/tag.d.ts +4 -0
- package/resources/tag.d.ts.map +1 -0
- package/resources/tag.js +37 -0
- package/resources/tag.js.map +1 -0
- package/resources/usage.d.ts +47 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +376 -0
- package/resources/usage.js.map +1 -0
- package/resources/validate.d.ts +7 -0
- package/resources/validate.d.ts.map +1 -0
- package/resources/validate.js +36 -0
- package/resources/validate.js.map +1 -0
- package/resources/vault.d.ts +79 -0
- package/resources/vault.d.ts.map +1 -0
- package/resources/vault.js +277 -0
- package/resources/vault.js.map +1 -0
- package/resources/version.d.ts +11 -0
- package/resources/version.d.ts.map +1 -0
- package/resources/version.js +80 -0
- package/resources/version.js.map +1 -0
- package/runtime.d.ts +5 -0
- package/runtime.d.ts.map +1 -0
- package/runtime.js +19 -0
- package/runtime.js.map +1 -0
- package/src/auth/auth0.ts +43 -0
- package/src/auth/callback-server.ts +104 -0
- package/src/auth/index.ts +6 -0
- package/src/auth/login.ts +106 -0
- package/src/auth/pages.ts +31 -0
- package/src/auth/pkce.ts +26 -0
- package/src/auth/token.ts +159 -0
- package/src/backend.ts +15 -0
- package/src/cli/stigmer.ts +16 -0
- package/src/client/client.ts +157 -0
- package/src/client/index.ts +3 -0
- package/src/client/organizations.ts +118 -0
- package/src/client/single-org.ts +62 -0
- package/src/commands/access-history/index.ts +124 -0
- package/src/commands/agent-exec-flags.ts +76 -0
- package/src/commands/agent.ts +57 -0
- package/src/commands/apikey/duration.ts +35 -0
- package/src/commands/apikey/index.ts +273 -0
- package/src/commands/apply.ts +200 -0
- package/src/commands/auth/index.ts +76 -0
- package/src/commands/auth/login.ts +70 -0
- package/src/commands/auth/whoami.ts +157 -0
- package/src/commands/channel.ts +178 -0
- package/src/commands/completion.ts +94 -0
- package/src/commands/config/backend.ts +239 -0
- package/src/commands/config/context.ts +110 -0
- package/src/commands/config/index.ts +18 -0
- package/src/commands/config/kv.ts +44 -0
- package/src/commands/connect.ts +115 -0
- package/src/commands/delete.ts +59 -0
- package/src/commands/down.ts +27 -0
- package/src/commands/download.ts +113 -0
- package/src/commands/eval.ts +148 -0
- package/src/commands/get.ts +138 -0
- package/src/commands/install.ts +108 -0
- package/src/commands/internal-daemon.ts +17 -0
- package/src/commands/list.ts +164 -0
- package/src/commands/logs.ts +73 -0
- package/src/commands/marketplace.ts +133 -0
- package/src/commands/mcp-server.ts +125 -0
- package/src/commands/mcp.ts +92 -0
- package/src/commands/push.ts +630 -0
- package/src/commands/reset.ts +57 -0
- package/src/commands/resume.ts +122 -0
- package/src/commands/run.ts +228 -0
- package/src/commands/runs/approve.ts +57 -0
- package/src/commands/runs/control.ts +96 -0
- package/src/commands/runs/index.ts +31 -0
- package/src/commands/runs/logs.ts +45 -0
- package/src/commands/runs/scores.ts +34 -0
- package/src/commands/runs/to-eval-case.ts +50 -0
- package/src/commands/runs/trace.ts +32 -0
- package/src/commands/schedule.ts +70 -0
- package/src/commands/search.ts +95 -0
- package/src/commands/service-account/index.ts +180 -0
- package/src/commands/setup.ts +97 -0
- package/src/commands/shared.ts +41 -0
- package/src/commands/status.ts +20 -0
- package/src/commands/tag.ts +31 -0
- package/src/commands/up.ts +113 -0
- package/src/commands/usage.ts +116 -0
- package/src/commands/validate.ts +127 -0
- package/src/commands/vault.ts +245 -0
- package/src/commands/version.ts +13 -0
- package/src/config/config.ts +308 -0
- package/src/config/index.ts +33 -0
- package/src/config/keys.ts +105 -0
- package/src/config/paths.ts +25 -0
- package/src/config/resolve.ts +174 -0
- package/src/errors/classify.ts +249 -0
- package/src/errors/cli-exit-error.ts +16 -0
- package/src/errors/exit-codes.ts +17 -0
- package/src/errors/handle.ts +53 -0
- package/src/errors/index.ts +7 -0
- package/src/errors/usage-error.ts +14 -0
- package/src/index.ts +8 -0
- package/src/local/artifact.ts +351 -0
- package/src/local/constants.ts +55 -0
- package/src/local/daemon/components.ts +145 -0
- package/src/local/daemon/env.ts +171 -0
- package/src/local/daemon/host.ts +128 -0
- package/src/local/daemon/index.ts +18 -0
- package/src/local/daemon/launch.ts +326 -0
- package/src/local/daemon/process.ts +213 -0
- package/src/local/daemon/supervisor.ts +249 -0
- package/src/local/daemon/types.ts +78 -0
- package/src/local/llm-config.ts +86 -0
- package/src/local/logs/tail.ts +100 -0
- package/src/local/logs/view.ts +65 -0
- package/src/local/net/tcp.ts +65 -0
- package/src/local/operator-config.ts +95 -0
- package/src/local/paths.ts +95 -0
- package/src/local/reset.ts +90 -0
- package/src/local/runtime/index.ts +19 -0
- package/src/local/runtime/node.ts +173 -0
- package/src/local/runtime/runner.ts +159 -0
- package/src/local/runtime/runtimes-install.ts +75 -0
- package/src/local/runtime/server.ts +197 -0
- package/src/local/runtime/which.ts +30 -0
- package/src/local/setup/prompt.ts +70 -0
- package/src/local/setup/wizard.ts +140 -0
- package/src/local/state/health-state.ts +55 -0
- package/src/local/state/index.ts +8 -0
- package/src/local/state/lock.ts +92 -0
- package/src/local/state/log-rotation.ts +112 -0
- package/src/local/state/pidfile.ts +37 -0
- package/src/local/state/proc.ts +82 -0
- package/src/local/state/startup-config.ts +55 -0
- package/src/local/status.ts +189 -0
- package/src/local/temporal/download.ts +84 -0
- package/src/local/temporal/index.ts +14 -0
- package/src/local/temporal/inspect.ts +80 -0
- package/src/local/temporal/manager.ts +261 -0
- package/src/local/temporal/supervisor.ts +97 -0
- package/src/local/webconsole/index.ts +30 -0
- package/src/logger.ts +39 -0
- package/src/marketplace/config.ts +255 -0
- package/src/marketplace/github.ts +410 -0
- package/src/marketplace/index.ts +54 -0
- package/src/marketplace/install.ts +217 -0
- package/src/marketplace/materialize.ts +80 -0
- package/src/marketplace/official.ts +126 -0
- package/src/marketplace/read.ts +76 -0
- package/src/marketplace/ref.ts +74 -0
- package/src/marketplace/render.ts +151 -0
- package/src/output/command-result.ts +199 -0
- package/src/output/confirm.ts +54 -0
- package/src/output/format.ts +101 -0
- package/src/output/index.ts +30 -0
- package/src/output/ndjson.ts +14 -0
- package/src/output/proto.ts +55 -0
- package/src/output/style.ts +57 -0
- package/src/output/table.ts +52 -0
- package/src/program.ts +209 -0
- package/src/registry/aliases.ts +113 -0
- package/src/registry/index.ts +30 -0
- package/src/registry/metadata.ts +170 -0
- package/src/registry/registry.ts +135 -0
- package/src/registry/verb-support.ts +117 -0
- package/src/registry/verbs.ts +42 -0
- package/src/resources/access-history.ts +167 -0
- package/src/resources/agent/quality.ts +424 -0
- package/src/resources/agent/resolve.ts +31 -0
- package/src/resources/apply/apply.ts +472 -0
- package/src/resources/apply/handlers.ts +115 -0
- package/src/resources/channel.ts +548 -0
- package/src/resources/connect/address.ts +47 -0
- package/src/resources/connect/connect.ts +219 -0
- package/src/resources/connect/discover.ts +145 -0
- package/src/resources/connect/display.ts +67 -0
- package/src/resources/connect/sign-in.ts +210 -0
- package/src/resources/cursor-pages.ts +35 -0
- package/src/resources/delete.ts +381 -0
- package/src/resources/documents.ts +102 -0
- package/src/resources/download.ts +147 -0
- package/src/resources/eval-run/follow.ts +390 -0
- package/src/resources/eval-run/node-io.ts +42 -0
- package/src/resources/eval-run/options.ts +391 -0
- package/src/resources/eval-run/report.ts +529 -0
- package/src/resources/eval-run/run.ts +230 -0
- package/src/resources/eval.ts +278 -0
- package/src/resources/get-bindings.ts +137 -0
- package/src/resources/get.ts +51 -0
- package/src/resources/git.ts +71 -0
- package/src/resources/ignore/index.ts +20 -0
- package/src/resources/ignore/matcher.ts +55 -0
- package/src/resources/list.ts +552 -0
- package/src/resources/mcp/add.ts +105 -0
- package/src/resources/mcp/placeholder-resolver.ts +63 -0
- package/src/resources/picker/ink.tsx +123 -0
- package/src/resources/picker/tty.ts +30 -0
- package/src/resources/plugin.ts +560 -0
- package/src/resources/reference.ts +170 -0
- package/src/resources/render.ts +198 -0
- package/src/resources/run/agent-exec.ts +115 -0
- package/src/resources/run/attachments.ts +300 -0
- package/src/resources/run/create.ts +181 -0
- package/src/resources/run/epilogue.ts +200 -0
- package/src/resources/run/header.ts +72 -0
- package/src/resources/run/plugins.ts +32 -0
- package/src/resources/run/prepare.ts +350 -0
- package/src/resources/run/references.ts +77 -0
- package/src/resources/run/resolve.ts +18 -0
- package/src/resources/run/resume.ts +122 -0
- package/src/resources/run/stream.ts +96 -0
- package/src/resources/run/vaults.ts +33 -0
- package/src/resources/run/workspace.ts +171 -0
- package/src/resources/run-approve.ts +94 -0
- package/src/resources/run-control.ts +59 -0
- package/src/resources/run-format.ts +44 -0
- package/src/resources/run-logs.ts +131 -0
- package/src/resources/run-scores.ts +164 -0
- package/src/resources/run-to-eval-case.ts +160 -0
- package/src/resources/run-trace.ts +102 -0
- package/src/resources/runs.ts +155 -0
- package/src/resources/schedule.ts +132 -0
- package/src/resources/search.ts +62 -0
- package/src/resources/service-account.ts +195 -0
- package/src/resources/session.ts +64 -0
- package/src/resources/skill.ts +577 -0
- package/src/resources/stream/answer.ts +125 -0
- package/src/resources/stream/headless.ts +150 -0
- package/src/resources/stream/ink.tsx +56 -0
- package/src/resources/stream/render-ndjson.ts +44 -0
- package/src/resources/stream/render-plaintext.ts +153 -0
- package/src/resources/stream/submit.ts +145 -0
- package/src/resources/stream/tty.ts +14 -0
- package/src/resources/tag.ts +51 -0
- package/src/resources/usage.ts +443 -0
- package/src/resources/validate.ts +37 -0
- package/src/resources/vault.ts +372 -0
- package/src/resources/version.ts +103 -0
- package/src/runtime.ts +23 -0
- package/src/types/marked-terminal.d.ts +31 -0
- package/src/version.ts +46 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +45 -0
- package/version.js.map +1 -0
package/config/config.js
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
// CLI configuration model and persistence (~/.stigmer/config.yaml).
|
|
2
|
+
//
|
|
3
|
+
// Named backends ("a named backend without a credential story is half a
|
|
4
|
+
// feature"): the `backends` map + `current_backend` are the
|
|
5
|
+
// kubectl-context model — each entry carries its own endpoint AND its own
|
|
6
|
+
// credentials, so switching between Stigmer Cloud and a self-hosted server
|
|
7
|
+
// never clobbers either side's login state. Two names are reserved:
|
|
8
|
+
// "local" (the managed daemon, never stored in the map — its endpoint and
|
|
9
|
+
// no-auth posture are fixed) and "cloud" (where `stigmer auth login` lands
|
|
10
|
+
// by default).
|
|
11
|
+
//
|
|
12
|
+
// Legacy shape + migration: older files carried one `backend.cloud` slot
|
|
13
|
+
// selected by `backend.type`. Loading migrates that shape in memory
|
|
14
|
+
// (cloud section → `backends.cloud`, type → `current_backend`); the first
|
|
15
|
+
// save writes the new shape — a one-time write migration. The
|
|
16
|
+
// legacy `backend.type` is still WRITTEN (mirroring local vs non-local)
|
|
17
|
+
// so older readers keep a coherent view, and the opaque `backend.local`
|
|
18
|
+
// section (daemon/LLM/Temporal settings owned by other tools) is
|
|
19
|
+
// preserved verbatim, exactly as before.
|
|
20
|
+
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
21
|
+
import { dirname } from "node:path";
|
|
22
|
+
import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
|
|
23
|
+
import { UsageError } from "../errors/index.js";
|
|
24
|
+
import { isStandalone } from "../runtime.js";
|
|
25
|
+
import { configPath } from "./paths.js";
|
|
26
|
+
/** The reserved name of the managed local daemon backend. */
|
|
27
|
+
export const LOCAL_BACKEND_NAME = "local";
|
|
28
|
+
/** The reserved name `stigmer auth login` targets from local mode. */
|
|
29
|
+
export const CLOUD_BACKEND_NAME = "cloud";
|
|
30
|
+
const SAVE_HEADER = `# Stigmer CLI Configuration
|
|
31
|
+
# For configuration options and examples, see:
|
|
32
|
+
# https://github.com/stigmer/stigmer/blob/main/docs/cli/configuration.md
|
|
33
|
+
|
|
34
|
+
`;
|
|
35
|
+
/** The default config: the local backend, no daemon settings fabricated. */
|
|
36
|
+
export function getDefault() {
|
|
37
|
+
return {
|
|
38
|
+
backend: { type: "local" },
|
|
39
|
+
backends: {},
|
|
40
|
+
current_backend: LOCAL_BACKEND_NAME,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Load the config from disk. In standalone mode the file is ignored and the
|
|
45
|
+
* default is returned, isolating sidecar/automation invocations from ambient
|
|
46
|
+
* user config (matches the Go CLI). A missing file also yields the default.
|
|
47
|
+
*/
|
|
48
|
+
export function load(path = configPath()) {
|
|
49
|
+
if (isStandalone()) {
|
|
50
|
+
return getDefault();
|
|
51
|
+
}
|
|
52
|
+
let raw;
|
|
53
|
+
try {
|
|
54
|
+
raw = readFileSync(path, "utf8");
|
|
55
|
+
}
|
|
56
|
+
catch (err) {
|
|
57
|
+
if (isNotFound(err))
|
|
58
|
+
return getDefault();
|
|
59
|
+
throw err;
|
|
60
|
+
}
|
|
61
|
+
const parsed = parseYaml(raw);
|
|
62
|
+
return normalize(parsed);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Persist the config to disk (0600 file in a 0755 directory), with the
|
|
66
|
+
* documentation header the file has always carried. Writes the NAMED shape
|
|
67
|
+
* (the one-time migration): the legacy cloud slot is dropped — its content
|
|
68
|
+
* lives in `backends.cloud` — and `backend.type` is written as the
|
|
69
|
+
* local-vs-not mirror. A pristine local config (no named backends) writes
|
|
70
|
+
* exactly the legacy bytes.
|
|
71
|
+
*/
|
|
72
|
+
export function save(config, path = configPath()) {
|
|
73
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o755 });
|
|
74
|
+
const body = stringifyYaml(stripUndefined(serializable(config)));
|
|
75
|
+
writeFileSync(path, SAVE_HEADER + body, { mode: 0o600 });
|
|
76
|
+
}
|
|
77
|
+
/** The active backend's name (normalize always stamps current_backend). */
|
|
78
|
+
export function activeBackendName(config) {
|
|
79
|
+
const name = config.current_backend ?? "";
|
|
80
|
+
return name === "" ? LOCAL_BACKEND_NAME : name;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The active backend: the reserved local daemon (entry undefined) or a
|
|
84
|
+
* named entry. A current_backend naming a missing entry is a loud
|
|
85
|
+
* configuration error, never a silent fallback — the config was edited by
|
|
86
|
+
* hand or a remove left it dangling.
|
|
87
|
+
*/
|
|
88
|
+
export function activeBackend(config) {
|
|
89
|
+
const name = activeBackendName(config);
|
|
90
|
+
if (name === LOCAL_BACKEND_NAME) {
|
|
91
|
+
return { name, entry: undefined };
|
|
92
|
+
}
|
|
93
|
+
const entry = config.backends?.[name];
|
|
94
|
+
if (entry === undefined) {
|
|
95
|
+
throw new UsageError(`current backend "${name}" does not exist — run 'stigmer config backend list' and 'stigmer config backend use <name>'`);
|
|
96
|
+
}
|
|
97
|
+
return { name, entry };
|
|
98
|
+
}
|
|
99
|
+
/** True when the active backend is Stigmer Cloud. */
|
|
100
|
+
export function isCloudMode(config) {
|
|
101
|
+
return activeBackend(config).entry?.type === "cloud";
|
|
102
|
+
}
|
|
103
|
+
function normalize(parsed) {
|
|
104
|
+
if (parsed === null || typeof parsed !== "object") {
|
|
105
|
+
return getDefault();
|
|
106
|
+
}
|
|
107
|
+
const legacy = parsed.backend;
|
|
108
|
+
const backends = normalizeBackends(parsed.backends);
|
|
109
|
+
// Migration: a legacy cloud slot becomes the reserved "cloud" entry —
|
|
110
|
+
// unless a named shape already exists (then the named shape wins and the
|
|
111
|
+
// stale legacy slot is ignored).
|
|
112
|
+
if (Object.keys(backends).length === 0 && legacy?.cloud !== undefined) {
|
|
113
|
+
backends[CLOUD_BACKEND_NAME] = { type: "cloud", ...legacy.cloud };
|
|
114
|
+
}
|
|
115
|
+
let current = typeof parsed.current_backend === "string" ? parsed.current_backend : "";
|
|
116
|
+
if (current === "") {
|
|
117
|
+
current =
|
|
118
|
+
legacy?.type === "cloud" && backends[CLOUD_BACKEND_NAME] !== undefined
|
|
119
|
+
? CLOUD_BACKEND_NAME
|
|
120
|
+
: LOCAL_BACKEND_NAME;
|
|
121
|
+
}
|
|
122
|
+
return {
|
|
123
|
+
backend: {
|
|
124
|
+
type: legacy?.type === "cloud" ? "cloud" : "local",
|
|
125
|
+
local: legacy?.local,
|
|
126
|
+
},
|
|
127
|
+
backends,
|
|
128
|
+
current_backend: current,
|
|
129
|
+
context: parsed.context,
|
|
130
|
+
marketplaces: normalizeMarketplaces(parsed.marketplaces),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
/** Object-valued entries verbatim; anything else is not a marketplace and is dropped. */
|
|
134
|
+
function normalizeMarketplaces(parsed) {
|
|
135
|
+
if (parsed === undefined || parsed === null || typeof parsed !== "object") {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
const marketplaces = {};
|
|
139
|
+
for (const [name, entry] of Object.entries(parsed)) {
|
|
140
|
+
if (entry === null || typeof entry !== "object")
|
|
141
|
+
continue;
|
|
142
|
+
marketplaces[name] = { ...entry };
|
|
143
|
+
}
|
|
144
|
+
return Object.keys(marketplaces).length === 0 ? undefined : marketplaces;
|
|
145
|
+
}
|
|
146
|
+
function normalizeBackends(parsed) {
|
|
147
|
+
const backends = {};
|
|
148
|
+
if (parsed === undefined || typeof parsed !== "object") {
|
|
149
|
+
return backends;
|
|
150
|
+
}
|
|
151
|
+
for (const [name, entry] of Object.entries(parsed)) {
|
|
152
|
+
if (entry === null || typeof entry !== "object")
|
|
153
|
+
continue;
|
|
154
|
+
backends[name] = {
|
|
155
|
+
...entry,
|
|
156
|
+
type: entry.type === "cloud" ? "cloud" : "selfhost",
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
return backends;
|
|
160
|
+
}
|
|
161
|
+
/** The on-disk shape: named model + legacy mirror, minimal for defaults. */
|
|
162
|
+
function serializable(config) {
|
|
163
|
+
const backends = config.backends ?? {};
|
|
164
|
+
const current = activeBackendName(config);
|
|
165
|
+
const pristineLocal = Object.keys(backends).length === 0 && current === LOCAL_BACKEND_NAME;
|
|
166
|
+
return {
|
|
167
|
+
backend: {
|
|
168
|
+
// The legacy mirror: local stays "local"; anything named is "cloud"
|
|
169
|
+
// to older readers (which cannot represent selfhost anyway).
|
|
170
|
+
type: current === LOCAL_BACKEND_NAME ? "local" : "cloud",
|
|
171
|
+
local: config.backend.local,
|
|
172
|
+
// The legacy cloud slot is never written back — migrated.
|
|
173
|
+
},
|
|
174
|
+
...(pristineLocal ? {} : { backends, current_backend: current }),
|
|
175
|
+
context: config.context,
|
|
176
|
+
marketplaces: config.marketplaces,
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
// Recursively drop undefined-valued keys so the serialized YAML omits empty
|
|
180
|
+
// optionals (matching Go's yaml omitempty), while preserving the opaque local
|
|
181
|
+
// section untouched.
|
|
182
|
+
function stripUndefined(value) {
|
|
183
|
+
if (Array.isArray(value)) {
|
|
184
|
+
return value.map((item) => stripUndefined(item));
|
|
185
|
+
}
|
|
186
|
+
if (value !== null && typeof value === "object") {
|
|
187
|
+
const out = {};
|
|
188
|
+
for (const [key, val] of Object.entries(value)) {
|
|
189
|
+
if (val !== undefined)
|
|
190
|
+
out[key] = stripUndefined(val);
|
|
191
|
+
}
|
|
192
|
+
return out;
|
|
193
|
+
}
|
|
194
|
+
return value;
|
|
195
|
+
}
|
|
196
|
+
function isNotFound(err) {
|
|
197
|
+
return err?.code === "ENOENT";
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config/config.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,EAAE;AACF,wEAAwE;AACxE,4DAA4D;AAC5D,0EAA0E;AAC1E,2EAA2E;AAC3E,oEAAoE;AACpE,0EAA0E;AAC1E,2EAA2E;AAC3E,eAAe;AACf,EAAE;AACF,yEAAyE;AACzE,oE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AAC,CAAC;QACxD,CAAC;QACD,OAAO,GAAQ,CAAC;IAClB,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,UAAU,CAAC,GAAY;IAC9B,OAAQ,GAAoC,EAAE,IAAI,KAAK,QAAQ,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { type BackendConfig, type BackendType, type CloudBackendConfig, type Config, type ContextConfig, type MarketplaceEntryConfig, type NamedBackendConfig, type NamedBackendType, CLOUD_BACKEND_NAME, LOCAL_BACKEND_NAME, activeBackend, activeBackendName, getDefault, isCloudMode, load, save, } from "./config.js";
|
|
2
|
+
export { DEFAULT_CLOUD_CONSOLE_URL, ensureAuthenticated, resolveConsoleURL, contextOrganizationId, contextOrganizationLabel, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
3
|
+
export { configDir, configPath, dataDir } from "./paths.js";
|
|
4
|
+
export { configKeyNames, getConfigValue, setConfigValue } from "./keys.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,kBAAkB,EACvB,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
package/config/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Public surface of the CLI config module.
|
|
2
|
+
export { CLOUD_BACKEND_NAME, LOCAL_BACKEND_NAME, activeBackend, activeBackendName, getDefault, isCloudMode, load, save, } from "./config.js";
|
|
3
|
+
export { DEFAULT_CLOUD_CONSOLE_URL, ensureAuthenticated, resolveConsoleURL, contextOrganizationId, contextOrganizationLabel, resolveContextOrganization, resolveEndpoint, resolveOrganization, resolveToken, } from "./resolve.js";
|
|
4
|
+
export { configDir, configPath, dataDir } from "./paths.js";
|
|
5
|
+
export { configKeyNames, getConfigValue, setConfigValue } from "./keys.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/config/index.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAE3C,OAAO,EASL,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,EACb,iBAAiB,EACjB,UAAU,EACV,WAAW,EACX,IAAI,EACJ,IAAI,GACL,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
package/config/keys.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Config } from "./config.js";
|
|
2
|
+
/** All known config keys, sorted, for `config list` and error messages. */
|
|
3
|
+
export declare function configKeyNames(): string[];
|
|
4
|
+
export declare function getConfigValue(config: Config, key: string): string;
|
|
5
|
+
export declare function setConfigValue(config: Config, key: string, value: string): void;
|
|
6
|
+
//# sourceMappingURL=keys.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.d.ts","sourceRoot":"","sources":["../src/config/keys.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,KAAK,MAAM,EAGZ,MAAM,aAAa,CAAC;AAuErB,2EAA2E;AAC3E,wBAAgB,cAAc,IAAI,MAAM,EAAE,CAEzC;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAIlE;AAED,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,GACZ,IAAI,CAIN"}
|
package/config/keys.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Dotted-key access for the generic `config get|set|list` commands. Only the
|
|
2
|
+
// fields this CLI owns are exposed; daemon/local settings are not, and are
|
|
3
|
+
// preserved opaquely on save.
|
|
4
|
+
import { UsageError } from "../errors/usage-error.js";
|
|
5
|
+
import { CLOUD_BACKEND_NAME, LOCAL_BACKEND_NAME, activeBackendName, } from "./config.js";
|
|
6
|
+
// The backend.cloud.* keys predate named backends and remain the documented
|
|
7
|
+
// kv surface for the reserved "cloud" entry; `current_backend` is the named
|
|
8
|
+
// model's own key. `backend.type` stays the simple local/cloud switch
|
|
9
|
+
// (named backends switch through `config backend use`).
|
|
10
|
+
const KEYS = {
|
|
11
|
+
"backend.type": {
|
|
12
|
+
get: (config) => activeBackendName(config) === LOCAL_BACKEND_NAME ? "local" : "cloud",
|
|
13
|
+
set: (config, value) => {
|
|
14
|
+
if (value !== "local" && value !== "cloud") {
|
|
15
|
+
throw new UsageError(`invalid backend.type "${value}" (expected: local, cloud)`);
|
|
16
|
+
}
|
|
17
|
+
if (value === "cloud") {
|
|
18
|
+
(config.backends ??= {})[CLOUD_BACKEND_NAME] ??= { type: "cloud" };
|
|
19
|
+
config.current_backend = CLOUD_BACKEND_NAME;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
config.current_backend = LOCAL_BACKEND_NAME;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
current_backend: {
|
|
27
|
+
get: (config) => activeBackendName(config),
|
|
28
|
+
set: (config, value) => {
|
|
29
|
+
if (value !== LOCAL_BACKEND_NAME &&
|
|
30
|
+
config.backends?.[value] === undefined) {
|
|
31
|
+
throw new UsageError(`unknown backend "${value}" (add it first: stigmer config backend add)`);
|
|
32
|
+
}
|
|
33
|
+
config.current_backend = value;
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
"backend.cloud.endpoint": {
|
|
37
|
+
get: (config) => config.backends?.[CLOUD_BACKEND_NAME]?.endpoint ?? "",
|
|
38
|
+
set: (config, value) => {
|
|
39
|
+
const backends = (config.backends ??= {});
|
|
40
|
+
(backends[CLOUD_BACKEND_NAME] ??= { type: "cloud" }).endpoint = value;
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
"backend.cloud.org_id": {
|
|
44
|
+
get: (config) => config.backends?.[CLOUD_BACKEND_NAME]?.org_id ?? "",
|
|
45
|
+
set: (config, value) => {
|
|
46
|
+
const backends = (config.backends ??= {});
|
|
47
|
+
(backends[CLOUD_BACKEND_NAME] ??= { type: "cloud" }).org_id = value;
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
"context.org": {
|
|
51
|
+
get: (config) => config.context?.org ?? "",
|
|
52
|
+
set: (config, value) => {
|
|
53
|
+
// The raw escape hatch stores the value as given; the slug stored
|
|
54
|
+
// beside an earlier checked value would no longer describe it.
|
|
55
|
+
const context = (config.context ??= {});
|
|
56
|
+
context.org = value;
|
|
57
|
+
delete context.org_slug;
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
/** All known config keys, sorted, for `config list` and error messages. */
|
|
62
|
+
export function configKeyNames() {
|
|
63
|
+
return Object.keys(KEYS).sort();
|
|
64
|
+
}
|
|
65
|
+
export function getConfigValue(config, key) {
|
|
66
|
+
const entry = KEYS[key];
|
|
67
|
+
if (entry === undefined)
|
|
68
|
+
throw new UsageError(unknownKeyMessage(key));
|
|
69
|
+
return entry.get(config);
|
|
70
|
+
}
|
|
71
|
+
export function setConfigValue(config, key, value) {
|
|
72
|
+
const entry = KEYS[key];
|
|
73
|
+
if (entry === undefined)
|
|
74
|
+
throw new UsageError(unknownKeyMessage(key));
|
|
75
|
+
entry.set(config, value);
|
|
76
|
+
}
|
|
77
|
+
function unknownKeyMessage(key) {
|
|
78
|
+
return `unknown config key "${key}" (known keys: ${configKeyNames().join(", ")})`;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=keys.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keys.js","sourceRoot":"","sources":["../src/config/keys.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,8BAA8B;AAE9B,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EACL,kBAAkB,EAElB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AASrB,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,wDAAwD;AACxD,MAAM,IAAI,GAA8B;IACtC,cAAc,EAAE;QACd,GAAG,EAAE,CAAC,MAAM,EAAE,EAAE,CACd,iBAAiB,CAAC,MAAM,CAAC,KAAK,kBAAkB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QACtE,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACrB,IAAI,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;gBAC3C,MAAM,IAAI,UAAU,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,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;IACtE,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAC3B,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW;IACpC,OAAO,uBAAuB,GAAG,kBAAkB,cAAc,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const CONFIG_DIR_NAME = ".stigmer";
|
|
2
|
+
export declare const CONFIG_FILE_NAME = "config.yaml";
|
|
3
|
+
export declare const DEFAULT_DATA_DIR = "data";
|
|
4
|
+
/** Absolute path to the config directory (~/.stigmer). */
|
|
5
|
+
export declare function configDir(home?: string): string;
|
|
6
|
+
/** Absolute path to the config file (~/.stigmer/config.yaml). */
|
|
7
|
+
export declare function configPath(home?: string): string;
|
|
8
|
+
/** Absolute path to the local backend data directory (~/.stigmer/data). */
|
|
9
|
+
export declare function dataDir(home?: string): string;
|
|
10
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/config/paths.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,eAAe,aAAa,CAAC;AAC1C,eAAO,MAAM,gBAAgB,gBAAgB,CAAC;AAC9C,eAAO,MAAM,gBAAgB,SAAS,CAAC;AAEvC,0DAA0D;AAC1D,wBAAgB,SAAS,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE1D;AAED,iEAAiE;AACjE,wBAAgB,UAAU,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE3D;AAED,2EAA2E;AAC3E,wBAAgB,OAAO,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAExD"}
|
package/config/paths.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Filesystem locations for CLI configuration and local data. Mirrors the Go
|
|
2
|
+
// CLI's config path helpers (~/.stigmer/...). Functions take the home dir as a
|
|
3
|
+
// parameter (defaulting to os.homedir()) so tests can redirect them cleanly.
|
|
4
|
+
import { homedir } from "node:os";
|
|
5
|
+
import { join } from "node:path";
|
|
6
|
+
export const CONFIG_DIR_NAME = ".stigmer";
|
|
7
|
+
export const CONFIG_FILE_NAME = "config.yaml";
|
|
8
|
+
export const DEFAULT_DATA_DIR = "data";
|
|
9
|
+
/** Absolute path to the config directory (~/.stigmer). */
|
|
10
|
+
export function configDir(home = homedir()) {
|
|
11
|
+
return join(home, CONFIG_DIR_NAME);
|
|
12
|
+
}
|
|
13
|
+
/** Absolute path to the config file (~/.stigmer/config.yaml). */
|
|
14
|
+
export function configPath(home = homedir()) {
|
|
15
|
+
return join(configDir(home), CONFIG_FILE_NAME);
|
|
16
|
+
}
|
|
17
|
+
/** Absolute path to the local backend data directory (~/.stigmer/data). */
|
|
18
|
+
export function dataDir(home = homedir()) {
|
|
19
|
+
return join(configDir(home), DEFAULT_DATA_DIR);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/config/paths.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAE7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAC1C,MAAM,CAAC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAC9C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEvC,0DAA0D;AAC1D,MAAM,UAAU,SAAS,CAAC,OAAe,OAAO,EAAE;IAChD,OAAO,IAAI,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;AACrC,CAAC;AAED,iEAAiE;AACjE,MAAM,UAAU,UAAU,CAAC,OAAe,OAAO,EAAE;IACjD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,OAAO,CAAC,OAAe,OAAO,EAAE;IAC9C,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,gBAAgB,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { type Config } from "./config.js";
|
|
2
|
+
/** Well-known URL for the Stigmer Cloud web console. */
|
|
3
|
+
export declare const DEFAULT_CLOUD_CONSOLE_URL = "https://app.stigmer.ai";
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the server endpoint.
|
|
6
|
+
* STIGMER_SERVER_ADDRESS (explicit override, any backend)
|
|
7
|
+
* > the active entry's endpoint (cloud falls back to api.stigmer.ai:443)
|
|
8
|
+
* > localhost:7234 (the local daemon)
|
|
9
|
+
*
|
|
10
|
+
* A selfhost entry without an endpoint is a loud configuration error —
|
|
11
|
+
* `config backend add` requires one, so this only happens to hand-edited
|
|
12
|
+
* files, and guessing an address for a self-hosted server helps nobody.
|
|
13
|
+
*/
|
|
14
|
+
export declare function resolveEndpoint(config: Config): string;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the auth token.
|
|
17
|
+
* STIGMER_API_KEY (env, also where the --api-key global is bridged)
|
|
18
|
+
* > the active entry's credential (cloud: login token; selfhost: api_key)
|
|
19
|
+
* > "" (unauthenticated)
|
|
20
|
+
*/
|
|
21
|
+
export declare function resolveToken(config: Config): string;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the active organization.
|
|
24
|
+
* --org flag override > STIGMER_ORG env > context.org
|
|
25
|
+
* > the active entry's org_id (legacy fallback)
|
|
26
|
+
*/
|
|
27
|
+
export declare function resolveOrganization(config: Config, flagOrg?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Resolve the web console URL:
|
|
30
|
+
* 1. `STIGMER_CONSOLE_URL` (explicit override)
|
|
31
|
+
* 2. local daemon → `http://localhost:{SERVER_PORT}` — the server's own
|
|
32
|
+
* unified port serves the console (one origin for UI and
|
|
33
|
+
* API; the Go-era separate 8234 listener is retired)
|
|
34
|
+
* 3. selfhost → the entry's endpoint on the same one-origin rule
|
|
35
|
+
* (https for :443, http otherwise)
|
|
36
|
+
* 4. cloud → {@link DEFAULT_CLOUD_CONSOLE_URL}
|
|
37
|
+
*
|
|
38
|
+
* The console origin is also the app origin that serves the hosted chat
|
|
39
|
+
* page (`/chat/<share id>`) and the embed loader (`/embed.js`), so
|
|
40
|
+
* chat-link builders use this same resolver — both routes live in the
|
|
41
|
+
* same static export the server serves.
|
|
42
|
+
*/
|
|
43
|
+
export declare function resolveConsoleURL(config: Config, env?: NodeJS.ProcessEnv): string;
|
|
44
|
+
/**
|
|
45
|
+
* The configured organization, with the active entry's org_id fallback.
|
|
46
|
+
* Reports only what is explicitly set (no implicit local default) so
|
|
47
|
+
* config/context display can faithfully show "(not set)".
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveContextOrganization(config: Config): string;
|
|
50
|
+
/**
|
|
51
|
+
* Fail fast with a clear "please log in" error when a CLOUD command has no
|
|
52
|
+
* usable credential. The local daemon never requires auth. Selfhost
|
|
53
|
+
* backends are deliberately not gated client-side: an unauthenticated
|
|
54
|
+
* self-host (no issuer configured) is a legitimate posture, and an
|
|
55
|
+
* authenticated one answers UNAUTHENTICATED with a clear message — the
|
|
56
|
+
* server owns that decision. A credential is any of: the STIGMER_API_KEY
|
|
57
|
+
* env (or bridged --api-key), a persisted access token, or a refresh token
|
|
58
|
+
* (which the token provider can exchange for a fresh access token).
|
|
59
|
+
*/
|
|
60
|
+
export declare function ensureAuthenticated(config: Config): void;
|
|
61
|
+
/** How output names the context organization: the slug `set` stored with its id, else the value as configured. */
|
|
62
|
+
export declare function contextOrganizationLabel(config: Config): string;
|
|
63
|
+
/** The context organization's id, shown beside its label; "" when the label already is the configured value. */
|
|
64
|
+
export declare function contextOrganizationId(config: Config): string;
|
|
65
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../src/config/resolve.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,aAAa,CAAC;AAKzD,wDAAwD;AACxD,eAAO,MAAM,yBAAyB,2BAA2B,CAAC;AAElE;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAuBtD;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAUnD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAiB5E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,MAAM,CAWR;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAQjE;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASxD;AAED,kHAAkH;AAClH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAI/D;AAED,gHAAgH;AAChH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAG5D"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Effective-value resolution with env > config > default precedence. These are
|
|
2
|
+
// the settings the backend client and read verbs depend on; centralizing the
|
|
3
|
+
// precedence keeps every call site consistent (mirrors the Go CLI's Resolve*).
|
|
4
|
+
//
|
|
5
|
+
// All resolvers read the ACTIVE named backend (config.ts): local is the
|
|
6
|
+
// managed daemon (fixed endpoint, never requires auth), cloud entries carry
|
|
7
|
+
// the OAuth token set, selfhost entries carry an endpoint + api_key.
|
|
8
|
+
import { CliExitError, ExitCode } from "../errors/index.js";
|
|
9
|
+
import { SERVER_PORT } from "../local/constants.js";
|
|
10
|
+
import { activeBackend } from "./config.js";
|
|
11
|
+
const DEFAULT_CLOUD_ENDPOINT = "api.stigmer.ai:443";
|
|
12
|
+
const DEFAULT_LOCAL_ENDPOINT = "localhost:7234";
|
|
13
|
+
/** Well-known URL for the Stigmer Cloud web console. */
|
|
14
|
+
export const DEFAULT_CLOUD_CONSOLE_URL = "https://app.stigmer.ai";
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the server endpoint.
|
|
17
|
+
* STIGMER_SERVER_ADDRESS (explicit override, any backend)
|
|
18
|
+
* > the active entry's endpoint (cloud falls back to api.stigmer.ai:443)
|
|
19
|
+
* > localhost:7234 (the local daemon)
|
|
20
|
+
*
|
|
21
|
+
* A selfhost entry without an endpoint is a loud configuration error —
|
|
22
|
+
* `config backend add` requires one, so this only happens to hand-edited
|
|
23
|
+
* files, and guessing an address for a self-hosted server helps nobody.
|
|
24
|
+
*/
|
|
25
|
+
export function resolveEndpoint(config) {
|
|
26
|
+
const override = process.env.STIGMER_SERVER_ADDRESS;
|
|
27
|
+
if (override !== undefined && override !== "") {
|
|
28
|
+
return override;
|
|
29
|
+
}
|
|
30
|
+
const { name, entry } = activeBackend(config);
|
|
31
|
+
if (entry === undefined) {
|
|
32
|
+
return DEFAULT_LOCAL_ENDPOINT;
|
|
33
|
+
}
|
|
34
|
+
if (entry.endpoint !== undefined && entry.endpoint !== "") {
|
|
35
|
+
return entry.endpoint;
|
|
36
|
+
}
|
|
37
|
+
if (entry.type === "cloud") {
|
|
38
|
+
return DEFAULT_CLOUD_ENDPOINT;
|
|
39
|
+
}
|
|
40
|
+
throw new CliExitError(`backend "${name}" has no endpoint configured`, ExitCode.Usage, [
|
|
41
|
+
`Re-add it with one:`,
|
|
42
|
+
` stigmer config backend add ${name} --endpoint <host:port>`,
|
|
43
|
+
]);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Resolve the auth token.
|
|
47
|
+
* STIGMER_API_KEY (env, also where the --api-key global is bridged)
|
|
48
|
+
* > the active entry's credential (cloud: login token; selfhost: api_key)
|
|
49
|
+
* > "" (unauthenticated)
|
|
50
|
+
*/
|
|
51
|
+
export function resolveToken(config) {
|
|
52
|
+
const env = process.env.STIGMER_API_KEY;
|
|
53
|
+
if (env !== undefined && env !== "") {
|
|
54
|
+
return env;
|
|
55
|
+
}
|
|
56
|
+
const { entry } = activeBackend(config);
|
|
57
|
+
if (entry === undefined) {
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
return (entry.type === "cloud" ? entry.token : entry.api_key) ?? "";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Resolve the active organization.
|
|
64
|
+
* --org flag override > STIGMER_ORG env > context.org
|
|
65
|
+
* > the active entry's org_id (legacy fallback)
|
|
66
|
+
*/
|
|
67
|
+
export function resolveOrganization(config, flagOrg) {
|
|
68
|
+
if (flagOrg !== undefined && flagOrg !== "") {
|
|
69
|
+
return flagOrg;
|
|
70
|
+
}
|
|
71
|
+
const env = process.env.STIGMER_ORG;
|
|
72
|
+
if (env !== undefined && env !== "") {
|
|
73
|
+
return env;
|
|
74
|
+
}
|
|
75
|
+
const context = resolveContextOrganization(config);
|
|
76
|
+
if (context !== "") {
|
|
77
|
+
return context;
|
|
78
|
+
}
|
|
79
|
+
// Nothing names one: the CLI never invents an organization. A server that
|
|
80
|
+
// holds one fills it into every request that names none (its
|
|
81
|
+
// getServerInfo answers single_org); a server that holds several refuses
|
|
82
|
+
// the request, and the commands that need one say so first.
|
|
83
|
+
return "";
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Resolve the web console URL:
|
|
87
|
+
* 1. `STIGMER_CONSOLE_URL` (explicit override)
|
|
88
|
+
* 2. local daemon → `http://localhost:{SERVER_PORT}` — the server's own
|
|
89
|
+
* unified port serves the console (one origin for UI and
|
|
90
|
+
* API; the Go-era separate 8234 listener is retired)
|
|
91
|
+
* 3. selfhost → the entry's endpoint on the same one-origin rule
|
|
92
|
+
* (https for :443, http otherwise)
|
|
93
|
+
* 4. cloud → {@link DEFAULT_CLOUD_CONSOLE_URL}
|
|
94
|
+
*
|
|
95
|
+
* The console origin is also the app origin that serves the hosted chat
|
|
96
|
+
* page (`/chat/<share id>`) and the embed loader (`/embed.js`), so
|
|
97
|
+
* chat-link builders use this same resolver — both routes live in the
|
|
98
|
+
* same static export the server serves.
|
|
99
|
+
*/
|
|
100
|
+
export function resolveConsoleURL(config, env = process.env) {
|
|
101
|
+
const override = env.STIGMER_CONSOLE_URL;
|
|
102
|
+
if (override !== undefined && override !== "")
|
|
103
|
+
return override;
|
|
104
|
+
const { entry } = activeBackend(config);
|
|
105
|
+
if (entry === undefined)
|
|
106
|
+
return `http://localhost:${SERVER_PORT}`;
|
|
107
|
+
if (entry.type === "selfhost") {
|
|
108
|
+
const endpoint = entry.endpoint ?? "";
|
|
109
|
+
const scheme = endpoint.endsWith(":443") ? "https" : "http";
|
|
110
|
+
return `${scheme}://${endpoint.replace(/:443$/, "")}`;
|
|
111
|
+
}
|
|
112
|
+
return DEFAULT_CLOUD_CONSOLE_URL;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* The configured organization, with the active entry's org_id fallback.
|
|
116
|
+
* Reports only what is explicitly set (no implicit local default) so
|
|
117
|
+
* config/context display can faithfully show "(not set)".
|
|
118
|
+
*/
|
|
119
|
+
export function resolveContextOrganization(config) {
|
|
120
|
+
if (config.context?.org !== undefined &&
|
|
121
|
+
config.context.org !== "") {
|
|
122
|
+
return config.context.org;
|
|
123
|
+
}
|
|
124
|
+
return activeBackend(config).entry?.org_id ?? "";
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Fail fast with a clear "please log in" error when a CLOUD command has no
|
|
128
|
+
* usable credential. The local daemon never requires auth. Selfhost
|
|
129
|
+
* backends are deliberately not gated client-side: an unauthenticated
|
|
130
|
+
* self-host (no issuer configured) is a legitimate posture, and an
|
|
131
|
+
* authenticated one answers UNAUTHENTICATED with a clear message — the
|
|
132
|
+
* server owns that decision. A credential is any of: the STIGMER_API_KEY
|
|
133
|
+
* env (or bridged --api-key), a persisted access token, or a refresh token
|
|
134
|
+
* (which the token provider can exchange for a fresh access token).
|
|
135
|
+
*/
|
|
136
|
+
export function ensureAuthenticated(config) {
|
|
137
|
+
const { entry } = activeBackend(config);
|
|
138
|
+
if (entry?.type !== "cloud")
|
|
139
|
+
return;
|
|
140
|
+
if (process.env.STIGMER_API_KEY)
|
|
141
|
+
return;
|
|
142
|
+
if (entry.token || entry.refresh_token)
|
|
143
|
+
return;
|
|
144
|
+
throw new CliExitError("Not authenticated", ExitCode.Auth, [
|
|
145
|
+
"Please sign in:",
|
|
146
|
+
" stigmer auth login",
|
|
147
|
+
]);
|
|
148
|
+
}
|
|
149
|
+
/** How output names the context organization: the slug `set` stored with its id, else the value as configured. */
|
|
150
|
+
export function contextOrganizationLabel(config) {
|
|
151
|
+
const org = resolveContextOrganization(config);
|
|
152
|
+
const slug = config.context?.org_slug ?? "";
|
|
153
|
+
return org === "" || slug === "" ? org : slug;
|
|
154
|
+
}
|
|
155
|
+
/** The context organization's id, shown beside its label; "" when the label already is the configured value. */
|
|
156
|
+
export function contextOrganizationId(config) {
|
|
157
|
+
const org = resolveContextOrganization(config);
|
|
158
|
+
return contextOrganizationLabel(config) === org ? "" : org;
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../src/config/resolve.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6EAA6E;AAC7E,+EAA+E;AAC/E,EAAE;AACF,wEAAwE;AACxE,4EAA4E;AAC5E,qEA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IACrD,MAAM,GAAG,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,EAAE,QAAQ,IAAI,EAAE,CAAC;IAC5C,OAAO,GAAG,KAAK,EAAE,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC;AAED,gHAAgH;AAChH,MAAM,UAAU,qBAAqB,CAAC,MAAc;IAClD,MAAM,GAAG,GAAG,0BAA0B,CAAC,MAAM,CAAC,CAAC;IAC/C,OAAO,wBAAwB,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured result of classifying a raw error. `classify` produces these and
|
|
3
|
+
* `handle` consumes them. `message === ""` signals a clean, silent outcome
|
|
4
|
+
* (local cancellation) for which nothing should be printed.
|
|
5
|
+
*/
|
|
6
|
+
export interface CliError {
|
|
7
|
+
readonly exitCode: number;
|
|
8
|
+
readonly message: string;
|
|
9
|
+
readonly hints?: readonly string[];
|
|
10
|
+
readonly cause?: Error;
|
|
11
|
+
/** Numeric Connect/gRPC code, present when the error originated from an RPC. */
|
|
12
|
+
readonly code?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function classify(err: unknown): CliError | null;
|
|
15
|
+
/** Human-readable Connect/gRPC code name, e.g. 12 -> "Unimplemented". */
|
|
16
|
+
export declare function codeName(code: number): string;
|
|
17
|
+
//# sourceMappingURL=classify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../src/errors/classify.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IACvB,gFAAgF;IAChF,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAcD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,QAAQ,GAAG,IAAI,CAqDtD;AA+ID,yEAAyE;AACzE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C"}
|