@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
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
// `stigmer auth whoami` — who the connected server says you are.
|
|
2
|
+
//
|
|
3
|
+
// Runs the SDK's ensureMyIdentityAccount, the same first-sign-in flow the
|
|
4
|
+
// console's gate runs: an authenticated caller with no
|
|
5
|
+
// account yet is provisioned here rather than told "not found", so a person
|
|
6
|
+
// who only ever uses the CLI is never left without an account. The result
|
|
7
|
+
// says when THIS call created it — a first sign-in is visible, never silent.
|
|
8
|
+
//
|
|
9
|
+
// It names the context organization by the slug the backend answers now,
|
|
10
|
+
// not the one `config context set` stored, and stores the current one when
|
|
11
|
+
// the organization was renamed since.
|
|
12
|
+
//
|
|
13
|
+
// whoamiResult is the pure half (given the account and what the call learned,
|
|
14
|
+
// the CommandResult a person reads); runWhoami is the I/O half.
|
|
15
|
+
|
|
16
|
+
import type { IdentityAccount } from "@stigmer/apis/ai/stigmer/iam/identityaccount/v1/api_pb";
|
|
17
|
+
import { IdentityAccountProvisioningMode } from "@stigmer/apis/ai/stigmer/iam/identityaccount/v1/enum_pb";
|
|
18
|
+
import { ensureMyIdentityAccount, type Stigmer } from "@stigmer/client";
|
|
19
|
+
import {
|
|
20
|
+
type Config,
|
|
21
|
+
ensureAuthenticated,
|
|
22
|
+
load,
|
|
23
|
+
resolveContextOrganization,
|
|
24
|
+
save,
|
|
25
|
+
} from "../../config/index.js";
|
|
26
|
+
import { CommandResult } from "../../output/index.js";
|
|
27
|
+
import { organizationNamed, type OrganizationNames } from "../../client/organizations.js";
|
|
28
|
+
import { omitsOrganization } from "../../client/single-org.js";
|
|
29
|
+
|
|
30
|
+
/** What the call learned beyond the account itself. */
|
|
31
|
+
export interface WhoamiContext {
|
|
32
|
+
/** `true` when this call created the account (a first sign-in). */
|
|
33
|
+
readonly created: boolean;
|
|
34
|
+
/** The organization the CLI context resolves to, by slug when known; "" when none is set. */
|
|
35
|
+
readonly org: string;
|
|
36
|
+
/** Its id, when `org` is its slug; "" otherwise. */
|
|
37
|
+
readonly orgId?: string;
|
|
38
|
+
/** The server holds one organization and fills it, so the CLI never names one. */
|
|
39
|
+
readonly singleOrg: boolean;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Render the caller's account. Every field is optional on the wire and an
|
|
44
|
+
* empty profile (the unconfigured laptop's operator) renders only what it
|
|
45
|
+
* has; a missing organization is a hint with the command that sets it, not a
|
|
46
|
+
* failure.
|
|
47
|
+
*/
|
|
48
|
+
export function whoamiResult(
|
|
49
|
+
account: IdentityAccount,
|
|
50
|
+
context: WhoamiContext,
|
|
51
|
+
): CommandResult {
|
|
52
|
+
const result = CommandResult.success(
|
|
53
|
+
context.created
|
|
54
|
+
? "Authenticated — your account was created on this first sign-in"
|
|
55
|
+
: "Authenticated",
|
|
56
|
+
);
|
|
57
|
+
const section = result.addSection("");
|
|
58
|
+
|
|
59
|
+
if (account.metadata !== undefined) {
|
|
60
|
+
section.field("Account ID", account.metadata.id);
|
|
61
|
+
if (account.metadata.name !== "")
|
|
62
|
+
section.field("Name", account.metadata.name);
|
|
63
|
+
}
|
|
64
|
+
if (account.spec !== undefined) {
|
|
65
|
+
if (account.spec.email !== "") section.field("Email", account.spec.email);
|
|
66
|
+
if (account.spec.firstName !== "" || account.spec.lastName !== "") {
|
|
67
|
+
section.field(
|
|
68
|
+
"Full Name",
|
|
69
|
+
`${account.spec.firstName} ${account.spec.lastName}`.trim(),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
section.field("Account Type", accountTypeOf(account));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// A server that holds one organization fills it: nothing to show or set.
|
|
76
|
+
if (!context.singleOrg) {
|
|
77
|
+
if (context.org !== "") {
|
|
78
|
+
section.field("Organization", context.org);
|
|
79
|
+
if (context.orgId) section.field("Organization ID", context.orgId);
|
|
80
|
+
} else {
|
|
81
|
+
result.hint(
|
|
82
|
+
"No organization set. Use: stigmer config context set --org <slug>",
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return result;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export async function runWhoami(): Promise<CommandResult> {
|
|
91
|
+
const { connectBackend } = await import("../../backend.js");
|
|
92
|
+
const client = connectBackend();
|
|
93
|
+
ensureAuthenticated(client.config);
|
|
94
|
+
|
|
95
|
+
const { account, created } = await ensureMyIdentityAccount(client.stigmer, {
|
|
96
|
+
onProvisioning: () => process.stderr.write("Setting up your account...\n"),
|
|
97
|
+
});
|
|
98
|
+
const singleOrg = await omitsOrganization(client.stigmer);
|
|
99
|
+
const org = singleOrg ? { label: "", id: "" } : await liveContextOrganization(client.stigmer, client.config);
|
|
100
|
+
return whoamiResult(account, { created, org: org.label, orgId: org.id, singleOrg });
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The context organization as the backend names it now: its live slug and
|
|
105
|
+
* id when the caller can see it, else the slug `context set` stored, else
|
|
106
|
+
* the value as configured. The config catches up with what the backend
|
|
107
|
+
* answers: a context an older CLI wrote by slug is rewritten to the id (with
|
|
108
|
+
* the slug beside it), and a stored slug the organization was renamed from
|
|
109
|
+
* is replaced, so `config context show` shows it too. Printing never fails
|
|
110
|
+
* the command: any failure of the lookup falls back to what is stored.
|
|
111
|
+
*/
|
|
112
|
+
async function liveContextOrganization(
|
|
113
|
+
stigmer: Stigmer,
|
|
114
|
+
config: Config,
|
|
115
|
+
): Promise<{ readonly label: string; readonly id: string }> {
|
|
116
|
+
const org = resolveContextOrganization(config);
|
|
117
|
+
if (org === "") return { label: "", id: "" };
|
|
118
|
+
const stored = config.context?.org_slug ?? "";
|
|
119
|
+
let named: OrganizationNames | undefined;
|
|
120
|
+
try {
|
|
121
|
+
named = await organizationNamed(stigmer, org);
|
|
122
|
+
} catch {
|
|
123
|
+
named = undefined;
|
|
124
|
+
}
|
|
125
|
+
if (named === undefined) {
|
|
126
|
+
const label = stored || org;
|
|
127
|
+
return { label, id: label === org ? "" : org };
|
|
128
|
+
}
|
|
129
|
+
if (named.id !== org) {
|
|
130
|
+
rememberContext(org, { org: named.id, org_slug: named.slug });
|
|
131
|
+
} else if (stored !== "" && stored !== named.slug) {
|
|
132
|
+
rememberContext(org, { org: named.id, org_slug: named.slug });
|
|
133
|
+
}
|
|
134
|
+
const label = named.slug || named.id;
|
|
135
|
+
return { label, id: label === named.id ? "" : named.id };
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/** Store what the backend answers for the context organization, unless the file names another organization by now. */
|
|
139
|
+
function rememberContext(org: string, context: { readonly org: string; readonly org_slug: string }): void {
|
|
140
|
+
const config = load();
|
|
141
|
+
if (config.context?.org !== org) return;
|
|
142
|
+
config.context.org = context.org;
|
|
143
|
+
config.context.org_slug = context.org_slug;
|
|
144
|
+
save(config);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* What kind of account a credential speaks for: an organization's service
|
|
149
|
+
* account (a CI job's API key), the platform's own machine account, or a
|
|
150
|
+
* person.
|
|
151
|
+
*/
|
|
152
|
+
function accountTypeOf(account: IdentityAccount): string {
|
|
153
|
+
if (account.spec?.provisioningMode === IdentityAccountProvisioningMode.service_account) {
|
|
154
|
+
return "Service Account";
|
|
155
|
+
}
|
|
156
|
+
return account.spec?.isMachineAccount === true ? "Machine Account" : "User Account";
|
|
157
|
+
}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// `stigmer channel link <agent>` — turn an agent's chat link on
|
|
2
|
+
// (organization members, unless `--audience public`) or off (--off),
|
|
3
|
+
// printing the hosted chat link and embed snippet. `stigmer channel enable
|
|
4
|
+
// <channel>` and `stigmer channel disable <channel>` — flip any channel's
|
|
5
|
+
// switch (web, Slack or WhatsApp); disabling pauses it and keeps its
|
|
6
|
+
// configuration, where `delete channel` tears it down.
|
|
7
|
+
//
|
|
8
|
+
// A noun group beside the verb-first matrix, as `schedule` is: the
|
|
9
|
+
// declarative verbs on channels stay generic (apply/get/list/delete), and
|
|
10
|
+
// this group holds the kind's operational actions, which no generic verb
|
|
11
|
+
// carries.
|
|
12
|
+
//
|
|
13
|
+
// Thin handler: resolve credentials/org and the console origin, delegate to
|
|
14
|
+
// resources/channel, render the result. `--open` is a best-effort browser
|
|
15
|
+
// launch after render (mirrors auth login: the URL is already on screen, so
|
|
16
|
+
// a failed launch costs nothing). Heavy modules are lazy-imported so
|
|
17
|
+
// `--help` stays fast.
|
|
18
|
+
|
|
19
|
+
import type { Command } from "commander";
|
|
20
|
+
import {
|
|
21
|
+
activeBackend,
|
|
22
|
+
ensureAuthenticated,
|
|
23
|
+
resolveConsoleURL,
|
|
24
|
+
resolveOrganization,
|
|
25
|
+
} from "../config/index.js";
|
|
26
|
+
import { UsageError } from "../errors/index.js";
|
|
27
|
+
import type { OutputFlags } from "../output/index.js";
|
|
28
|
+
import type { LinkAudience } from "../resources/channel.js";
|
|
29
|
+
import { addResultFlags, globalOrg, resultFormat } from "./shared.js";
|
|
30
|
+
|
|
31
|
+
interface LinkFlags extends OutputFlags {
|
|
32
|
+
off?: boolean;
|
|
33
|
+
open?: boolean;
|
|
34
|
+
audience?: string;
|
|
35
|
+
resetLink?: boolean;
|
|
36
|
+
name?: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function registerChannel(program: Command): void {
|
|
40
|
+
const channel = program
|
|
41
|
+
.command("channel")
|
|
42
|
+
.description("operate on channels: chat links, and switching a channel on or off");
|
|
43
|
+
|
|
44
|
+
const link = channel
|
|
45
|
+
.command("link <agent>")
|
|
46
|
+
.description(
|
|
47
|
+
"turn an agent's chat link on and print the link and embed snippet",
|
|
48
|
+
)
|
|
49
|
+
.option("--off", "turn the chat link off (the link stops working immediately)")
|
|
50
|
+
.option(
|
|
51
|
+
"--audience <audience>",
|
|
52
|
+
"who can chat: 'public' (anyone with the link) or 'org' (signed-in organization members only); omit to keep the current audience (organization for a new link)",
|
|
53
|
+
)
|
|
54
|
+
.option(
|
|
55
|
+
"--reset-link",
|
|
56
|
+
"generate a new link and kill the current one immediately (public audience)",
|
|
57
|
+
)
|
|
58
|
+
.option(
|
|
59
|
+
"--name <slug>",
|
|
60
|
+
"the chat link's slug: edit that web channel of the agent, or create the link under it (default: <agent slug>-web)",
|
|
61
|
+
)
|
|
62
|
+
.option("--open", "open the chat link in your browser")
|
|
63
|
+
.action((ref: string, options: LinkFlags, command: Command) =>
|
|
64
|
+
runChannelLink(ref, options, command),
|
|
65
|
+
);
|
|
66
|
+
addResultFlags(link);
|
|
67
|
+
|
|
68
|
+
const enable = channel
|
|
69
|
+
.command("enable <channel>")
|
|
70
|
+
.description("turn a channel on (id, org/slug, or slug)")
|
|
71
|
+
.action((ref: string, options: OutputFlags, command: Command) =>
|
|
72
|
+
runChannelSwitch(ref, true, options, command),
|
|
73
|
+
);
|
|
74
|
+
addResultFlags(enable);
|
|
75
|
+
|
|
76
|
+
const disable = channel
|
|
77
|
+
.command("disable <channel>")
|
|
78
|
+
.description(
|
|
79
|
+
"pause a channel, keeping its configuration (id, org/slug, or slug)",
|
|
80
|
+
)
|
|
81
|
+
.action((ref: string, options: OutputFlags, command: Command) =>
|
|
82
|
+
runChannelSwitch(ref, false, options, command),
|
|
83
|
+
);
|
|
84
|
+
addResultFlags(disable);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Validates --audience before any network work; omitted means "preserve".
|
|
88
|
+
function parseAudience(value: string | undefined): LinkAudience | undefined {
|
|
89
|
+
if (value === undefined) return undefined;
|
|
90
|
+
if (value === "public" || value === "org") return value;
|
|
91
|
+
throw new UsageError(
|
|
92
|
+
`invalid --audience '${value}'\n\nExpected 'public' or 'org'.`,
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function runChannelLink(
|
|
97
|
+
ref: string,
|
|
98
|
+
options: LinkFlags,
|
|
99
|
+
command: Command,
|
|
100
|
+
): Promise<void> {
|
|
101
|
+
const format = resultFormat(options);
|
|
102
|
+
|
|
103
|
+
const [{ connectBackend }, { linkAgent }, { renderResult }] =
|
|
104
|
+
await Promise.all([
|
|
105
|
+
import("../backend.js"),
|
|
106
|
+
import("../resources/channel.js"),
|
|
107
|
+
import("../output/command-result.js"),
|
|
108
|
+
]);
|
|
109
|
+
|
|
110
|
+
const client = connectBackend();
|
|
111
|
+
ensureAuthenticated(client.config);
|
|
112
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
113
|
+
|
|
114
|
+
const appOrigin = resolveConsoleURL(client.config);
|
|
115
|
+
const enabled = options.off !== true;
|
|
116
|
+
const audience = parseAudience(options.audience);
|
|
117
|
+
const resetLink = options.resetLink === true;
|
|
118
|
+
if (resetLink && !enabled) {
|
|
119
|
+
throw new UsageError(
|
|
120
|
+
"--reset-link cannot be combined with --off\n\n" +
|
|
121
|
+
"Turning the link off already kills it. Reset is for keeping the\n" +
|
|
122
|
+
"link on while invalidating the current URL.",
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
if (options.name === "") {
|
|
126
|
+
throw new UsageError("--name needs a slug\n\nOmit it for the agent's own chat link.");
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const result = await linkAgent(client.stigmer, ref, org, {
|
|
130
|
+
enabled,
|
|
131
|
+
...(audience !== undefined ? { audience } : {}),
|
|
132
|
+
...(options.name !== undefined ? { name: options.name } : {}),
|
|
133
|
+
resetLink,
|
|
134
|
+
appOrigin,
|
|
135
|
+
isLocal: activeBackend(client.config).entry === undefined,
|
|
136
|
+
});
|
|
137
|
+
renderResult(result, format);
|
|
138
|
+
|
|
139
|
+
if (options.open === true && enabled) {
|
|
140
|
+
// Best-effort: the link is already rendered above, so a launch failure
|
|
141
|
+
// only needs a nudge, never an error exit (mirrors auth login).
|
|
142
|
+
const url = result.sections.find((s) => s.title.endsWith("chat link"))
|
|
143
|
+
?.items[0];
|
|
144
|
+
if (url !== undefined) {
|
|
145
|
+
try {
|
|
146
|
+
const { default: open } = await import("open");
|
|
147
|
+
await open(url);
|
|
148
|
+
} catch {
|
|
149
|
+
process.stderr.write(
|
|
150
|
+
"Could not open the browser automatically. Please open the link above.\n",
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
async function runChannelSwitch(
|
|
158
|
+
ref: string,
|
|
159
|
+
enabled: boolean,
|
|
160
|
+
options: OutputFlags,
|
|
161
|
+
command: Command,
|
|
162
|
+
): Promise<void> {
|
|
163
|
+
const format = resultFormat(options);
|
|
164
|
+
|
|
165
|
+
const [{ connectBackend }, { setChannelEnabled }, { renderResult }] =
|
|
166
|
+
await Promise.all([
|
|
167
|
+
import("../backend.js"),
|
|
168
|
+
import("../resources/channel.js"),
|
|
169
|
+
import("../output/command-result.js"),
|
|
170
|
+
]);
|
|
171
|
+
|
|
172
|
+
const client = connectBackend();
|
|
173
|
+
ensureAuthenticated(client.config);
|
|
174
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
175
|
+
|
|
176
|
+
const result = await setChannelEnabled(client.stigmer, ref, org, enabled);
|
|
177
|
+
renderResult(result, format);
|
|
178
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// `stigmer completion <shell>` — emit a shell completion script.
|
|
2
|
+
//
|
|
3
|
+
// Completion covers the top-level commands, derived from the live commander
|
|
4
|
+
// tree (so new commands appear automatically — the tree is the source of
|
|
5
|
+
// truth). Flag-level and dynamic resource completion are not implemented.
|
|
6
|
+
|
|
7
|
+
import type { Command } from "commander";
|
|
8
|
+
|
|
9
|
+
const SHELLS = ["bash", "zsh", "fish", "powershell"] as const;
|
|
10
|
+
type Shell = (typeof SHELLS)[number];
|
|
11
|
+
|
|
12
|
+
export function registerCompletion(program: Command): void {
|
|
13
|
+
program
|
|
14
|
+
.command("completion <shell>")
|
|
15
|
+
.description(`generate a shell completion script (${SHELLS.join(", ")})`)
|
|
16
|
+
.action((shell: string) => {
|
|
17
|
+
if (!isShell(shell)) {
|
|
18
|
+
throw new Error(`unsupported shell "${shell}" (expected one of: ${SHELLS.join(", ")})`);
|
|
19
|
+
}
|
|
20
|
+
const commandNames = topLevelCommandNames(program);
|
|
21
|
+
process.stdout.write(renderScript(shell, commandNames) + "\n");
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function isShell(value: string): value is Shell {
|
|
26
|
+
return (SHELLS as readonly string[]).includes(value);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function topLevelCommandNames(program: Command): string[] {
|
|
30
|
+
return program.commands
|
|
31
|
+
.map((command) => command.name())
|
|
32
|
+
.filter((name) => name.length > 0)
|
|
33
|
+
.sort();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function renderScript(shell: Shell, commands: string[]): string {
|
|
37
|
+
switch (shell) {
|
|
38
|
+
case "bash":
|
|
39
|
+
return renderBash(commands);
|
|
40
|
+
case "zsh":
|
|
41
|
+
return renderZsh(commands);
|
|
42
|
+
case "fish":
|
|
43
|
+
return renderFish(commands);
|
|
44
|
+
case "powershell":
|
|
45
|
+
return renderPowershell(commands);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function renderBash(commands: string[]): string {
|
|
50
|
+
return [
|
|
51
|
+
"# stigmer bash completion",
|
|
52
|
+
"_stigmer_complete() {",
|
|
53
|
+
' local cur="${COMP_WORDS[COMP_CWORD]}"',
|
|
54
|
+
' if [ "$COMP_CWORD" -eq 1 ]; then',
|
|
55
|
+
` COMPREPLY=( $(compgen -W "${commands.join(" ")}" -- "$cur") )`,
|
|
56
|
+
" fi",
|
|
57
|
+
"}",
|
|
58
|
+
"complete -F _stigmer_complete stigmer",
|
|
59
|
+
].join("\n");
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function renderZsh(commands: string[]): string {
|
|
63
|
+
return [
|
|
64
|
+
"#compdef stigmer",
|
|
65
|
+
"_stigmer() {",
|
|
66
|
+
` local -a commands=(${commands.map((c) => `'${c}'`).join(" ")})`,
|
|
67
|
+
" _arguments '1: :->command' '*::arg:->args'",
|
|
68
|
+
' if [ "$state" = command ]; then',
|
|
69
|
+
" compadd -- $commands",
|
|
70
|
+
" fi",
|
|
71
|
+
"}",
|
|
72
|
+
"_stigmer",
|
|
73
|
+
].join("\n");
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function renderFish(commands: string[]): string {
|
|
77
|
+
return commands
|
|
78
|
+
.map(
|
|
79
|
+
(command) =>
|
|
80
|
+
`complete -c stigmer -n __fish_use_subcommand -a ${command} -d '${command} command'`,
|
|
81
|
+
)
|
|
82
|
+
.join("\n");
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function renderPowershell(commands: string[]): string {
|
|
86
|
+
return [
|
|
87
|
+
"Register-ArgumentCompleter -Native -CommandName stigmer -ScriptBlock {",
|
|
88
|
+
" param($wordToComplete, $commandAst, $cursorPosition)",
|
|
89
|
+
` @(${commands.map((c) => `'${c}'`).join(", ")}) |`,
|
|
90
|
+
" Where-Object { $_ -like \"$wordToComplete*\" } |",
|
|
91
|
+
" ForEach-Object { [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_) }",
|
|
92
|
+
"}",
|
|
93
|
+
].join("\n");
|
|
94
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// `stigmer config backend status|set|add|use|list|remove` — the named-backend
|
|
2
|
+
// surface (the kubectl-context model). `status` and
|
|
3
|
+
// `set <local|cloud>` predate named backends and stay as the simple view:
|
|
4
|
+
// set is sugar for `use` over the two reserved names.
|
|
5
|
+
|
|
6
|
+
import type { Command } from "commander";
|
|
7
|
+
import {
|
|
8
|
+
CLOUD_BACKEND_NAME,
|
|
9
|
+
type Config,
|
|
10
|
+
LOCAL_BACKEND_NAME,
|
|
11
|
+
type NamedBackendType,
|
|
12
|
+
activeBackend,
|
|
13
|
+
activeBackendName,
|
|
14
|
+
load,
|
|
15
|
+
resolveEndpoint,
|
|
16
|
+
save,
|
|
17
|
+
} from "../../config/index.js";
|
|
18
|
+
import { UsageError } from "../../errors/index.js";
|
|
19
|
+
import {
|
|
20
|
+
CommandResult,
|
|
21
|
+
type OutputFlags,
|
|
22
|
+
renderResult,
|
|
23
|
+
} from "../../output/index.js";
|
|
24
|
+
import { addResultFlags, resultFormat } from "../shared.js";
|
|
25
|
+
|
|
26
|
+
const DEFAULT_CLOUD_ENDPOINT = "api.stigmer.ai:443";
|
|
27
|
+
|
|
28
|
+
interface AddOptions extends OutputFlags {
|
|
29
|
+
endpoint?: string;
|
|
30
|
+
type?: string;
|
|
31
|
+
apiKey?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function addBackendCommands(backend: Command): void {
|
|
35
|
+
const status = backend
|
|
36
|
+
.command("status")
|
|
37
|
+
.description("show the current backend")
|
|
38
|
+
.action((options: OutputFlags) => {
|
|
39
|
+
renderResult(buildStatus(load()), resultFormat(options));
|
|
40
|
+
});
|
|
41
|
+
addResultFlags(status);
|
|
42
|
+
|
|
43
|
+
const set = backend
|
|
44
|
+
.command("set <type>")
|
|
45
|
+
.description("switch between the reserved local and cloud backends")
|
|
46
|
+
.action((type: string, options: OutputFlags) => {
|
|
47
|
+
renderResult(applySet(type), resultFormat(options));
|
|
48
|
+
});
|
|
49
|
+
addResultFlags(set);
|
|
50
|
+
|
|
51
|
+
const add = backend
|
|
52
|
+
.command("add <name>")
|
|
53
|
+
.description("add or update a named backend (self-hosted by default)")
|
|
54
|
+
.requiredOption(
|
|
55
|
+
"--endpoint <host:port>",
|
|
56
|
+
"the server address, e.g. stigmer.example.com:443",
|
|
57
|
+
)
|
|
58
|
+
.option("--type <type>", "backend type: selfhost or cloud", "selfhost")
|
|
59
|
+
.option(
|
|
60
|
+
"--api-key <key>",
|
|
61
|
+
"API token for a self-hosted backend (stigmer apikey create)",
|
|
62
|
+
)
|
|
63
|
+
.action((name: string, options: AddOptions) => {
|
|
64
|
+
renderResult(applyAdd(name, options), resultFormat(options));
|
|
65
|
+
});
|
|
66
|
+
addResultFlags(add);
|
|
67
|
+
|
|
68
|
+
const use = backend
|
|
69
|
+
.command("use <name>")
|
|
70
|
+
.description("switch the active backend")
|
|
71
|
+
.action((name: string, options: OutputFlags) => {
|
|
72
|
+
renderResult(applyUse(name), resultFormat(options));
|
|
73
|
+
});
|
|
74
|
+
addResultFlags(use);
|
|
75
|
+
|
|
76
|
+
const list = backend
|
|
77
|
+
.command("list")
|
|
78
|
+
.description("list configured backends")
|
|
79
|
+
.action((options: OutputFlags) => {
|
|
80
|
+
renderResult(buildList(load()), resultFormat(options));
|
|
81
|
+
});
|
|
82
|
+
addResultFlags(list);
|
|
83
|
+
|
|
84
|
+
const remove = backend
|
|
85
|
+
.command("remove <name>")
|
|
86
|
+
.description("remove a named backend")
|
|
87
|
+
.action((name: string, options: OutputFlags) => {
|
|
88
|
+
renderResult(applyRemove(name), resultFormat(options));
|
|
89
|
+
});
|
|
90
|
+
addResultFlags(remove);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function buildStatus(config: Config): CommandResult {
|
|
94
|
+
const { name, entry } = activeBackend(config);
|
|
95
|
+
const result = CommandResult.success("Backend configuration");
|
|
96
|
+
const section = result
|
|
97
|
+
.addSection("")
|
|
98
|
+
.field("Backend", name)
|
|
99
|
+
.field("Type", entry?.type ?? "local")
|
|
100
|
+
.field("Endpoint", resolveEndpoint(config));
|
|
101
|
+
if (entry?.type === "cloud") {
|
|
102
|
+
section.field("Auth", entry.token ? "Logged in" : "Not logged in");
|
|
103
|
+
}
|
|
104
|
+
if (entry?.type === "selfhost") {
|
|
105
|
+
section.field(
|
|
106
|
+
"Auth",
|
|
107
|
+
entry.api_key
|
|
108
|
+
? "API key stored"
|
|
109
|
+
: "No credential (unauthenticated server, or STIGMER_API_KEY)",
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
function applySet(type: string): CommandResult {
|
|
116
|
+
if (type !== "local" && type !== "cloud") {
|
|
117
|
+
throw new UsageError(
|
|
118
|
+
`invalid backend type "${type}" (expected: local, cloud — named backends switch with 'use')`,
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
const config = load();
|
|
123
|
+
if (type === "cloud") {
|
|
124
|
+
const backends = (config.backends ??= {});
|
|
125
|
+
backends[CLOUD_BACKEND_NAME] ??= {
|
|
126
|
+
type: "cloud",
|
|
127
|
+
endpoint: DEFAULT_CLOUD_ENDPOINT,
|
|
128
|
+
};
|
|
129
|
+
config.current_backend = CLOUD_BACKEND_NAME;
|
|
130
|
+
save(config);
|
|
131
|
+
return CommandResult.success("Backend set to cloud")
|
|
132
|
+
.hint("Please authenticate:")
|
|
133
|
+
.hint(" stigmer auth login");
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
config.current_backend = LOCAL_BACKEND_NAME;
|
|
137
|
+
save(config);
|
|
138
|
+
return CommandResult.success("Backend set to local").hint(
|
|
139
|
+
"Make sure the Stigmer server is running.",
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function applyAdd(name: string, options: AddOptions): CommandResult {
|
|
144
|
+
if (name === LOCAL_BACKEND_NAME) {
|
|
145
|
+
throw new UsageError(
|
|
146
|
+
`"${LOCAL_BACKEND_NAME}" is the managed local daemon — it cannot be redefined`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
const type = options.type ?? "selfhost";
|
|
150
|
+
if (type !== "selfhost" && type !== "cloud") {
|
|
151
|
+
throw new UsageError(
|
|
152
|
+
`invalid backend type "${type}" (expected: selfhost, cloud)`,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
const endpoint = options.endpoint ?? "";
|
|
156
|
+
if (endpoint === "") {
|
|
157
|
+
throw new UsageError("--endpoint is required");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const config = load();
|
|
161
|
+
const backends = (config.backends ??= {});
|
|
162
|
+
const existing = backends[name];
|
|
163
|
+
backends[name] = {
|
|
164
|
+
...existing,
|
|
165
|
+
type: type as NamedBackendType,
|
|
166
|
+
endpoint,
|
|
167
|
+
...(options.apiKey !== undefined ? { api_key: options.apiKey } : {}),
|
|
168
|
+
};
|
|
169
|
+
save(config);
|
|
170
|
+
|
|
171
|
+
const result = CommandResult.success(
|
|
172
|
+
`Backend "${name}" ${existing !== undefined ? "updated" : "added"} (${type}, ${endpoint})`,
|
|
173
|
+
).hint(`Switch to it: stigmer config backend use ${name}`);
|
|
174
|
+
if (type === "selfhost" && backends[name].api_key === undefined) {
|
|
175
|
+
result.hint(
|
|
176
|
+
"No API key stored. For an authenticated server, mint one on that backend:",
|
|
177
|
+
);
|
|
178
|
+
result.hint(" stigmer apikey create --name cli");
|
|
179
|
+
}
|
|
180
|
+
return result;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function applyUse(name: string): CommandResult {
|
|
184
|
+
const config = load();
|
|
185
|
+
if (name !== LOCAL_BACKEND_NAME && config.backends?.[name] === undefined) {
|
|
186
|
+
throw new UsageError(
|
|
187
|
+
`unknown backend "${name}" (known: ${knownBackendNames(config).join(", ")})`,
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
config.current_backend = name;
|
|
191
|
+
save(config);
|
|
192
|
+
return CommandResult.success(`Switched to backend "${name}"`);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function buildList(config: Config): CommandResult {
|
|
196
|
+
const current = activeBackendName(config);
|
|
197
|
+
const result = CommandResult.success("Configured backends");
|
|
198
|
+
for (const name of knownBackendNames(config)) {
|
|
199
|
+
const entry = config.backends?.[name];
|
|
200
|
+
const marker = name === current ? " (current)" : "";
|
|
201
|
+
const section = result.addSection(`${name}${marker}`);
|
|
202
|
+
section.field("Type", entry?.type ?? "local");
|
|
203
|
+
section.field(
|
|
204
|
+
"Endpoint",
|
|
205
|
+
entry?.endpoint ??
|
|
206
|
+
(entry?.type === "cloud" ? DEFAULT_CLOUD_ENDPOINT : "localhost:7234"),
|
|
207
|
+
);
|
|
208
|
+
if (entry?.type === "cloud") {
|
|
209
|
+
section.field("Auth", entry.token ? "Logged in" : "Not logged in");
|
|
210
|
+
} else if (entry?.type === "selfhost") {
|
|
211
|
+
section.field("Auth", entry.api_key ? "API key stored" : "None");
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return result;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function applyRemove(name: string): CommandResult {
|
|
218
|
+
if (name === LOCAL_BACKEND_NAME) {
|
|
219
|
+
throw new UsageError(
|
|
220
|
+
`"${LOCAL_BACKEND_NAME}" is the managed local daemon — it cannot be removed`,
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
const config = load();
|
|
224
|
+
if (config.backends?.[name] === undefined) {
|
|
225
|
+
throw new UsageError(`unknown backend "${name}"`);
|
|
226
|
+
}
|
|
227
|
+
if (activeBackendName(config) === name) {
|
|
228
|
+
throw new UsageError(
|
|
229
|
+
`backend "${name}" is the current backend — switch first: stigmer config backend use ${LOCAL_BACKEND_NAME}`,
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
delete config.backends[name];
|
|
233
|
+
save(config);
|
|
234
|
+
return CommandResult.success(`Removed backend "${name}"`);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
function knownBackendNames(config: Config): string[] {
|
|
238
|
+
return [LOCAL_BACKEND_NAME, ...Object.keys(config.backends ?? {}).sort()];
|
|
239
|
+
}
|