@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,113 @@
|
|
|
1
|
+
// `stigmer up [server]` — start the local Stigmer stack (managed Temporal, the
|
|
2
|
+
// control-plane server, and the unified runner) as a supervised background
|
|
3
|
+
// daemon, or with `--foreground` as this very process. `up server` brings up
|
|
4
|
+
// only the control plane.
|
|
5
|
+
//
|
|
6
|
+
// Thin handler: parse flags, delegate to the local daemon launcher, render the
|
|
7
|
+
// outcome. The launcher (and the heavy resolvers it pulls in) load lazily so
|
|
8
|
+
// `--help` stays fast.
|
|
9
|
+
|
|
10
|
+
import { homedir } from "node:os";
|
|
11
|
+
import { join } from "node:path";
|
|
12
|
+
import type { Command } from "commander";
|
|
13
|
+
import { CliExitError } from "../errors/cli-exit-error.js";
|
|
14
|
+
import { ExitCode } from "../errors/exit-codes.js";
|
|
15
|
+
import { CommandResult, type OutputFlags, renderResult } from "../output/index.js";
|
|
16
|
+
import { HEALTH_STATE_FILE, SERVER_PORT } from "../local/constants.js";
|
|
17
|
+
import { addResultFlags, resultFormat } from "./shared.js";
|
|
18
|
+
|
|
19
|
+
interface UpFlags extends OutputFlags {
|
|
20
|
+
serverOnly?: boolean;
|
|
21
|
+
web?: boolean; // false when --no-web is passed
|
|
22
|
+
foreground?: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
interface UpRun {
|
|
26
|
+
serverOnly: boolean;
|
|
27
|
+
noWeb: boolean;
|
|
28
|
+
foreground: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// The server serves the web console from its unified port; the
|
|
32
|
+
// flag suppresses probing/reporting it, not the serving itself (one
|
|
33
|
+
// process, one origin — there is no separate console to not-start).
|
|
34
|
+
const NO_WEB_HELP = "don't report the web console URL";
|
|
35
|
+
|
|
36
|
+
// Foreground is the shape a supervisor wants — a container entrypoint, a
|
|
37
|
+
// systemd unit, a tmux pane: one process to watch, signals delivered to it,
|
|
38
|
+
// the stack's output on its stdio — instead of a detached daemon to poll.
|
|
39
|
+
const FOREGROUND_HELP = "run the stack in this process until Ctrl-C or SIGTERM (for containers and service managers)";
|
|
40
|
+
|
|
41
|
+
export function registerUp(program: Command): void {
|
|
42
|
+
const up = program
|
|
43
|
+
.command("up")
|
|
44
|
+
.description("start the local Stigmer stack (server, runner, Temporal)")
|
|
45
|
+
.option("--server-only", "start only the control plane (no runners)")
|
|
46
|
+
.option("--no-web", NO_WEB_HELP)
|
|
47
|
+
.option("--foreground", FOREGROUND_HELP)
|
|
48
|
+
.action((options: UpFlags) =>
|
|
49
|
+
runUp(
|
|
50
|
+
{ serverOnly: options.serverOnly === true, noWeb: options.web === false, foreground: options.foreground === true },
|
|
51
|
+
options,
|
|
52
|
+
),
|
|
53
|
+
);
|
|
54
|
+
addResultFlags(up);
|
|
55
|
+
|
|
56
|
+
const server = up
|
|
57
|
+
.command("server")
|
|
58
|
+
.description("start only the control plane (no runners)")
|
|
59
|
+
.option("--no-web", NO_WEB_HELP)
|
|
60
|
+
.option("--foreground", FOREGROUND_HELP)
|
|
61
|
+
.action((options: UpFlags) =>
|
|
62
|
+
runUp({ serverOnly: true, noWeb: options.web === false, foreground: options.foreground === true }, options),
|
|
63
|
+
);
|
|
64
|
+
addResultFlags(server);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
async function runUp(run: UpRun, flags: OutputFlags): Promise<void> {
|
|
68
|
+
process.stderr.write("Starting Stigmer local stack… (first run may take a moment)\n");
|
|
69
|
+
const launch = await import("../local/daemon/launch.js");
|
|
70
|
+
|
|
71
|
+
if (!run.foreground) {
|
|
72
|
+
await launch.up(run);
|
|
73
|
+
await renderUpCard(run, flags);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The card renders when the stack is serving — the moment the
|
|
78
|
+
// detached shape would have returned — and the process then stays up,
|
|
79
|
+
// mirroring the server's and runner's output, until a shutdown signal.
|
|
80
|
+
const code = await launch.upForeground(run, homedir(), {
|
|
81
|
+
onReady: () => renderUpCard(run, flags),
|
|
82
|
+
});
|
|
83
|
+
if (code !== 0) {
|
|
84
|
+
// The daemon body has already logged which component failed and why.
|
|
85
|
+
const { logDir } = await import("../local/paths.js");
|
|
86
|
+
throw new CliExitError("the local stack did not start", ExitCode.General, [
|
|
87
|
+
`Check the component logs under ${logDir(homedir())}.`,
|
|
88
|
+
]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function renderUpCard(run: UpRun, flags: OutputFlags): Promise<void> {
|
|
93
|
+
const result = CommandResult.success(run.serverOnly ? "Stigmer control plane is up" : "Stigmer local stack is up");
|
|
94
|
+
const section = result.addSection("Endpoints");
|
|
95
|
+
section.field("server", `http://localhost:${SERVER_PORT}`);
|
|
96
|
+
if (await consoleReported()) {
|
|
97
|
+
// Same origin as the API: the server serves the console. Only
|
|
98
|
+
// printed when the daemon's probe found a bundled export — a dev-tree
|
|
99
|
+
// server without one must not advertise a dead URL.
|
|
100
|
+
section.field("console", `http://localhost:${SERVER_PORT}`);
|
|
101
|
+
}
|
|
102
|
+
result.hint("Check status with: stigmer status");
|
|
103
|
+
result.hint(run.foreground ? "Stop it with: Ctrl-C (or stigmer down from another shell)" : "Stop it with: stigmer down");
|
|
104
|
+
renderResult(result, resultFormat(flags));
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/** Whether the daemon recorded the web console as running (its own probe). */
|
|
108
|
+
async function consoleReported(): Promise<boolean> {
|
|
109
|
+
const { dataDir } = await import("../local/paths.js");
|
|
110
|
+
const { loadHealthState } = await import("../local/state/health-state.js");
|
|
111
|
+
const health = loadHealthState(join(dataDir(homedir()), HEALTH_STATE_FILE));
|
|
112
|
+
return health?.components["web-console"]?.state === "running";
|
|
113
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// `stigmer usage {session,agent,org}` — token, model and working-time reports
|
|
2
|
+
// at three granularities — and `stigmer usage hours`, the organization's
|
|
3
|
+
// agent hours against its plan. Thin handlers: validate flags, fetch the
|
|
4
|
+
// report, render. The dates pass through as typed: the server reads a UTC
|
|
5
|
+
// calendar day (the whole day, both bounds inclusive) or an RFC 3339
|
|
6
|
+
// instant. Heavy modules are lazy-imported inside actions so `--help` stays
|
|
7
|
+
// fast.
|
|
8
|
+
//
|
|
9
|
+
// Agent hours are a Stigmer Cloud plan's (the subscription kind's), so
|
|
10
|
+
// `usage hours` asks the server whether it serves that kind before calling
|
|
11
|
+
// it, the question `stigmer run` asks of account preferences, and a server
|
|
12
|
+
// that does not gets a plain sentence instead of an Unimplemented error.
|
|
13
|
+
|
|
14
|
+
import type { Command } from "commander";
|
|
15
|
+
import { ensureAuthenticated, resolveOrganization } from "../config/index.js";
|
|
16
|
+
import { UsageError } from "../errors/index.js";
|
|
17
|
+
import type { OutputFlags } from "../output/index.js";
|
|
18
|
+
import { globalOrg, readFormat } from "./shared.js";
|
|
19
|
+
|
|
20
|
+
interface UsageFlags extends OutputFlags {
|
|
21
|
+
from?: string;
|
|
22
|
+
to?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const FROM_HELP = "start: a UTC day, inclusive (e.g. 2026-03-01), or an RFC 3339 instant";
|
|
26
|
+
const TO_HELP = "end: a UTC day, inclusive (e.g. 2026-03-13), or an RFC 3339 instant";
|
|
27
|
+
|
|
28
|
+
/** What `usage hours` says on a server that serves no subscriptions. */
|
|
29
|
+
export const AGENT_HOURS_NOT_SERVED =
|
|
30
|
+
"This server does not count agent hours: they are a Stigmer Cloud plan's. `stigmer usage org` shows working time.";
|
|
31
|
+
|
|
32
|
+
export function registerUsage(program: Command): void {
|
|
33
|
+
const usage = program.command("usage").description("view token and working-time usage reports");
|
|
34
|
+
|
|
35
|
+
usage
|
|
36
|
+
.command("session <session-id>")
|
|
37
|
+
.description("view the usage report for a session")
|
|
38
|
+
.option("-o, --output <format>", "output format: table, json, or yaml")
|
|
39
|
+
.action((sessionId: string, options: UsageFlags) => runSessionUsage(sessionId, options));
|
|
40
|
+
|
|
41
|
+
usage
|
|
42
|
+
.command("agent <agent-id>")
|
|
43
|
+
.description("view the aggregated usage report for an agent within your organization")
|
|
44
|
+
.option("--from <date>", FROM_HELP)
|
|
45
|
+
.option("--to <date>", TO_HELP)
|
|
46
|
+
.option("-o, --output <format>", "output format: table, json, or yaml")
|
|
47
|
+
.action((agentId: string, options: UsageFlags, command: Command) => runAgentUsage(agentId, options, command));
|
|
48
|
+
|
|
49
|
+
usage
|
|
50
|
+
.command("org")
|
|
51
|
+
.description("view the organization-wide usage report")
|
|
52
|
+
.option("--from <date>", `${FROM_HELP}, required`)
|
|
53
|
+
.option("--to <date>", `${TO_HELP}, required`)
|
|
54
|
+
.option("-o, --output <format>", "output format: table, json, or yaml")
|
|
55
|
+
.action((options: UsageFlags, command: Command) => runOrgUsage(options, command));
|
|
56
|
+
|
|
57
|
+
usage
|
|
58
|
+
.command("hours")
|
|
59
|
+
.description("view the organization's agent hours against its plan (Stigmer Cloud)")
|
|
60
|
+
.option("-o, --output <format>", "output format: table, json, or yaml")
|
|
61
|
+
.action((options: UsageFlags, command: Command) => runAgentHours(options, command));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async function runSessionUsage(sessionId: string, options: UsageFlags): Promise<void> {
|
|
65
|
+
const [{ connectBackend }, usage] = await Promise.all([import("../backend.js"), import("../resources/usage.js")]);
|
|
66
|
+
const client = connectBackend();
|
|
67
|
+
ensureAuthenticated(client.config);
|
|
68
|
+
|
|
69
|
+
const report = await usage.getSessionUsageReport(client.stigmer, sessionId);
|
|
70
|
+
process.stdout.write(usage.renderSessionUsage(report, readFormat(options)));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async function runAgentUsage(agentId: string, options: UsageFlags, command: Command): Promise<void> {
|
|
74
|
+
const [{ connectBackend }, usage] = await Promise.all([import("../backend.js"), import("../resources/usage.js")]);
|
|
75
|
+
const client = connectBackend();
|
|
76
|
+
ensureAuthenticated(client.config);
|
|
77
|
+
// The report is org-scoped (usage of the agent within one org), so the org
|
|
78
|
+
// resolves exactly as `usage org` does: global --org flag or config default.
|
|
79
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
80
|
+
|
|
81
|
+
const range = { from: options.from ?? "", to: options.to ?? "" };
|
|
82
|
+
const report = await usage.getAgentUsageReport(client.stigmer, agentId, org, range);
|
|
83
|
+
process.stdout.write(usage.renderAgentUsage(report, range, readFormat(options)));
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async function runOrgUsage(options: UsageFlags, command: Command): Promise<void> {
|
|
87
|
+
const range = { from: options.from ?? "", to: options.to ?? "" };
|
|
88
|
+
if (range.from === "" || range.to === "") {
|
|
89
|
+
throw new UsageError("usage org requires both --from and --to");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const [{ connectBackend }, usage] = await Promise.all([import("../backend.js"), import("../resources/usage.js")]);
|
|
93
|
+
const client = connectBackend();
|
|
94
|
+
ensureAuthenticated(client.config);
|
|
95
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
96
|
+
|
|
97
|
+
const report = await usage.getOrgUsageReport(client.stigmer, org, range);
|
|
98
|
+
process.stdout.write(usage.renderOrgUsage(report, range, readFormat(options)));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
async function runAgentHours(options: UsageFlags, command: Command): Promise<void> {
|
|
102
|
+
const [{ connectBackend }, usage, { ApiResourceKind }] = await Promise.all([
|
|
103
|
+
import("../backend.js"),
|
|
104
|
+
import("../resources/usage.js"),
|
|
105
|
+
import("@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb"),
|
|
106
|
+
]);
|
|
107
|
+
const client = connectBackend();
|
|
108
|
+
ensureAuthenticated(client.config);
|
|
109
|
+
if (!(await client.isResourceAvailable(ApiResourceKind.subscription))) {
|
|
110
|
+
throw new UsageError(AGENT_HOURS_NOT_SERVED);
|
|
111
|
+
}
|
|
112
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
113
|
+
|
|
114
|
+
const hours = await usage.getAgentHours(client.stigmer, org);
|
|
115
|
+
process.stdout.write(usage.renderAgentHours(hours, readFormat(options)));
|
|
116
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// `stigmer validate -f <file|dir>` — offline validation of resource YAML, or
|
|
2
|
+
// of a plugin directory.
|
|
3
|
+
//
|
|
4
|
+
// Two inputs, one verb. A YAML file or a directory of YAML files is parsed
|
|
5
|
+
// document by document into its proto schema (structural validation, no
|
|
6
|
+
// server). A directory holding a plugin manifest (`plugin.json`,
|
|
7
|
+
// `.cursor-plugin/plugin.json`, `.claude-plugin/plugin.json` or
|
|
8
|
+
// `.codex-plugin/plugin.json`) is read with `@stigmer/plugin-package`, the
|
|
9
|
+
// same reader the server installs with, so what validates here installs
|
|
10
|
+
// there and what is refused here is refused there with the same sentence.
|
|
11
|
+
// The plugin check runs BEFORE the YAML walk: a plugin's `ai.stigmer/*.yaml`
|
|
12
|
+
// documents would otherwise be validated as loose resources.
|
|
13
|
+
//
|
|
14
|
+
// A plugin refusal is a `UsageError` (exit 2) listing every problem at once;
|
|
15
|
+
// an accepted plugin renders as `success`, or `warning` when the reader had
|
|
16
|
+
// something to say, both exit 0. `--json` carries the normalised package as
|
|
17
|
+
// the result's `data`.
|
|
18
|
+
|
|
19
|
+
import type { Command } from "commander";
|
|
20
|
+
import { UsageError } from "../errors/index.js";
|
|
21
|
+
import {
|
|
22
|
+
CommandResult,
|
|
23
|
+
type OutputFlags,
|
|
24
|
+
renderResult,
|
|
25
|
+
} from "../output/index.js";
|
|
26
|
+
import { defaultRegistry, unknownKindError, Verb } from "../registry/index.js";
|
|
27
|
+
import { loadDocuments, resolveYamlFiles } from "../resources/documents.js";
|
|
28
|
+
import { addResultFlags, resultFormat } from "./shared.js";
|
|
29
|
+
|
|
30
|
+
interface ValidateFlags extends OutputFlags {
|
|
31
|
+
file?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function registerValidate(program: Command): void {
|
|
35
|
+
const validate = program
|
|
36
|
+
.command("validate")
|
|
37
|
+
.description("validate resource YAML files or a plugin directory offline")
|
|
38
|
+
.requiredOption(
|
|
39
|
+
"-f, --file <path>",
|
|
40
|
+
"path to a YAML file, a directory of YAML files, or a plugin directory",
|
|
41
|
+
)
|
|
42
|
+
.action(async (options: ValidateFlags) => {
|
|
43
|
+
renderResult(await runValidate(options), resultFormat(options));
|
|
44
|
+
});
|
|
45
|
+
addResultFlags(validate);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
async function runValidate(options: ValidateFlags): Promise<CommandResult> {
|
|
49
|
+
const path = options.file;
|
|
50
|
+
if (path === undefined || path === "") {
|
|
51
|
+
throw new UsageError("file path is required: use -f <file>");
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const { isPluginDirectory } = await import("../resources/plugin.js");
|
|
55
|
+
if (isPluginDirectory(path)) {
|
|
56
|
+
return runValidatePlugin(path);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const files = resolveYamlFiles(path);
|
|
60
|
+
if (files.length === 0) {
|
|
61
|
+
throw new UsageError(`no YAML files found in ${path}`);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const { schemaForValidate, validateDocument } =
|
|
65
|
+
await import("../resources/validate.js");
|
|
66
|
+
const registry = defaultRegistry();
|
|
67
|
+
const validated: string[] = [];
|
|
68
|
+
|
|
69
|
+
for (const file of files) {
|
|
70
|
+
// Validate stays lenient (default) — strict parsing is reserved for apply.
|
|
71
|
+
for (const { kind, document } of loadDocuments(file)) {
|
|
72
|
+
const info = registry.getByYamlKind(kind);
|
|
73
|
+
if (info === undefined) throw unknownKindError(kind, file);
|
|
74
|
+
if (!info.supportedVerbs.has(Verb.Validate)) {
|
|
75
|
+
throw new UsageError(
|
|
76
|
+
`${info.displayName} does not support validation (in ${file})`,
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
const schema = schemaForValidate(info.kind);
|
|
80
|
+
if (schema === undefined) {
|
|
81
|
+
// The kind declares validate support but the CLI lacks a schema binding
|
|
82
|
+
// — a CLI gap, not bad user input, so this is a general (exit 1) error.
|
|
83
|
+
throw new Error(
|
|
84
|
+
`validation is not implemented for ${info.displayName}`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
try {
|
|
88
|
+
validateDocument(schema, document);
|
|
89
|
+
} catch (err) {
|
|
90
|
+
throw new UsageError(
|
|
91
|
+
`${file}: invalid ${info.displayName}: ${(err as Error).message}`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
validated.push(`${file}: ${info.displayName} is valid`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const result = CommandResult.success(
|
|
99
|
+
`Validation complete: ${validated.length} resource(s) valid`,
|
|
100
|
+
);
|
|
101
|
+
const section = result.addSection("");
|
|
102
|
+
for (const item of validated) section.item(item);
|
|
103
|
+
return result;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function runValidatePlugin(dir: string): Promise<CommandResult> {
|
|
107
|
+
const { readPluginPackage } = await import("@stigmer/plugin-package");
|
|
108
|
+
const { count, describePackageOn, pluginRefusal, readPluginDirectory } =
|
|
109
|
+
await import("../resources/plugin.js");
|
|
110
|
+
|
|
111
|
+
const directory = readPluginDirectory(dir);
|
|
112
|
+
const outcome = readPluginPackage(directory.files);
|
|
113
|
+
if (!outcome.ok) {
|
|
114
|
+
// Warnings ride along under the refusal so the author fixes everything
|
|
115
|
+
// in one pass, not the errors now and the warnings on the next run.
|
|
116
|
+
throw pluginRefusal(dir, outcome.errors, outcome.warnings);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const { plugin, warnings } = outcome;
|
|
120
|
+
const result =
|
|
121
|
+
warnings.length === 0
|
|
122
|
+
? CommandResult.success(`Plugin '${plugin.name}' is valid`)
|
|
123
|
+
: CommandResult.warning(
|
|
124
|
+
`Plugin '${plugin.name}' is valid with ${count(warnings.length, "warning")}`,
|
|
125
|
+
);
|
|
126
|
+
return describePackageOn(result, plugin, warnings, directory.stats);
|
|
127
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
// `stigmer vault …` — the logins and secrets runs use.
|
|
2
|
+
//
|
|
3
|
+
// vault mine your own vault's entry names
|
|
4
|
+
// vault create <name> a shared vault (organization admins)
|
|
5
|
+
// vault set-secret <NAME> save a secret by name
|
|
6
|
+
// vault remove-secret <NAME...> confirms first; -f/--force skips it
|
|
7
|
+
// vault set-connection <address> save a login for a tool's URL or a Git host
|
|
8
|
+
// vault remove-connection <address...> confirms first; -f/--force skips it
|
|
9
|
+
// vault connect-link <vault> a one-time sign-in page for a customer
|
|
10
|
+
//
|
|
11
|
+
// Entry commands name their vault with --mine (your own, created by your
|
|
12
|
+
// first save) or --vault <ref> (a shared vault: id, org/slug, or slug).
|
|
13
|
+
// A value is read from --from-env, --from-file or stdin (a hidden prompt on a
|
|
14
|
+
// terminal), never from the command line, and no command prints one: saved
|
|
15
|
+
// values can be replaced but never read back. The generic get, list and
|
|
16
|
+
// delete verbs cover vaults too; a vault has no apply, because a secret never
|
|
17
|
+
// belongs in a manifest file.
|
|
18
|
+
//
|
|
19
|
+
// A removal destroys a value that cannot be recovered, so it runs the same
|
|
20
|
+
// interaction as `delete`: warn naming each entry and the vault, confirm on a
|
|
21
|
+
// TTY, and abort cleanly when declined or when no one can answer.
|
|
22
|
+
//
|
|
23
|
+
// Thin handlers: resolve credentials and org, delegate to resources/vault,
|
|
24
|
+
// render. Heavy modules are lazy-imported so `--help` stays fast.
|
|
25
|
+
|
|
26
|
+
import type { Command } from "commander";
|
|
27
|
+
import { ensureAuthenticated, resolveOrganization } from "../config/index.js";
|
|
28
|
+
import type { OutputFlags } from "../output/index.js";
|
|
29
|
+
import { addResultFlags, globalOrg, resultFormat } from "./shared.js";
|
|
30
|
+
|
|
31
|
+
interface TargetFlags extends OutputFlags {
|
|
32
|
+
mine?: boolean;
|
|
33
|
+
vault?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface ValueFlags extends TargetFlags {
|
|
37
|
+
fromEnv?: string;
|
|
38
|
+
fromFile?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
interface RemoveFlags extends TargetFlags {
|
|
43
|
+
force?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
interface ConnectLinkFlags extends OutputFlags {
|
|
47
|
+
address: string;
|
|
48
|
+
returnUrl: string;
|
|
49
|
+
expiresIn?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
interface CreateFlags extends OutputFlags {
|
|
53
|
+
description?: string;
|
|
54
|
+
externalId?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function addTargetFlags(command: Command): Command {
|
|
58
|
+
return command
|
|
59
|
+
.option("--mine", "your own vault (created by your first save)")
|
|
60
|
+
.option("--vault <ref>", "a shared vault: id, org/slug, or slug");
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function addForceFlag(command: Command): Command {
|
|
64
|
+
return command.option("-f, --force", "skip the confirmation prompt");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function addValueFlags(command: Command): Command {
|
|
68
|
+
return command
|
|
69
|
+
.option("--from-env <var>", "read the value from this environment variable")
|
|
70
|
+
.option("--from-file <path>", "read the value from this file")
|
|
71
|
+
.option("--description <text>", "what the entry is for");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function registerVault(program: Command): void {
|
|
75
|
+
const vault = program
|
|
76
|
+
.command("vault")
|
|
77
|
+
.description("manage the logins and secrets your runs use (values are never shown)");
|
|
78
|
+
|
|
79
|
+
const mine = vault
|
|
80
|
+
.command("mine")
|
|
81
|
+
.description("show your own vault: the names of its secrets and logins")
|
|
82
|
+
.action((options: OutputFlags, command: Command) =>
|
|
83
|
+
run(options, command, async (controller, org, r) => r.showMyVault(controller, org)),
|
|
84
|
+
);
|
|
85
|
+
addResultFlags(mine);
|
|
86
|
+
|
|
87
|
+
const createCmd = vault
|
|
88
|
+
.command("create <name>")
|
|
89
|
+
.description("create a shared vault in the organization (organization admins)")
|
|
90
|
+
.option("--description <text>", "what the vault is for")
|
|
91
|
+
.option("--external-id <id>", "your own id for the vault, unique in the organization")
|
|
92
|
+
.action((name: string, options: CreateFlags, command: Command) =>
|
|
93
|
+
run(options, command, async (controller, org, r) =>
|
|
94
|
+
r.createSharedVault(controller, org, name, {
|
|
95
|
+
description: options.description,
|
|
96
|
+
externalId: options.externalId,
|
|
97
|
+
}),
|
|
98
|
+
),
|
|
99
|
+
);
|
|
100
|
+
addResultFlags(createCmd);
|
|
101
|
+
|
|
102
|
+
const setSecret = addValueFlags(
|
|
103
|
+
addTargetFlags(
|
|
104
|
+
vault
|
|
105
|
+
.command("set-secret <name>")
|
|
106
|
+
.description("save a secret by name, replacing any saved under it (value from --from-env, --from-file or stdin)"),
|
|
107
|
+
),
|
|
108
|
+
).action((name: string, options: ValueFlags, command: Command) =>
|
|
109
|
+
run(options, command, async (controller, org, r) => {
|
|
110
|
+
const value = async () => r.readValue(name, options, await valueIo());
|
|
111
|
+
return r.setSecret(controller, org, r.vaultChoiceOf(options), name, value, options.description ?? "");
|
|
112
|
+
}),
|
|
113
|
+
);
|
|
114
|
+
addResultFlags(setSecret);
|
|
115
|
+
|
|
116
|
+
const removeSecret = addForceFlag(
|
|
117
|
+
addTargetFlags(vault.command("remove-secret <names...>").description("remove secrets by name")),
|
|
118
|
+
).action((names: string[], options: RemoveFlags, command: Command) =>
|
|
119
|
+
runRemoval(options, command, async (controller, org, r) =>
|
|
120
|
+
r.planRemoveSecrets(controller, org, r.vaultChoiceOf(options), names),
|
|
121
|
+
),
|
|
122
|
+
);
|
|
123
|
+
addResultFlags(removeSecret);
|
|
124
|
+
|
|
125
|
+
const setConnection = addValueFlags(
|
|
126
|
+
addTargetFlags(
|
|
127
|
+
vault
|
|
128
|
+
.command("set-connection <address>")
|
|
129
|
+
.description(
|
|
130
|
+
"save a login for a tool's URL (https://mcp.example.com/mcp) or a Git host (github.com), replacing any saved there",
|
|
131
|
+
),
|
|
132
|
+
),
|
|
133
|
+
).action((address: string, options: ValueFlags, command: Command) =>
|
|
134
|
+
run(options, command, async (controller, org, r) => {
|
|
135
|
+
const token = async () => r.readValue(address, options, await valueIo());
|
|
136
|
+
return r.setConnection(controller, org, r.vaultChoiceOf(options), address, token, options.description ?? "");
|
|
137
|
+
}),
|
|
138
|
+
);
|
|
139
|
+
addResultFlags(setConnection);
|
|
140
|
+
|
|
141
|
+
const removeConnection = addForceFlag(
|
|
142
|
+
addTargetFlags(
|
|
143
|
+
vault.command("remove-connection <addresses...>").description("remove logins by address"),
|
|
144
|
+
),
|
|
145
|
+
).action((addresses: string[], options: RemoveFlags, command: Command) =>
|
|
146
|
+
runRemoval(options, command, async (controller, org, r) =>
|
|
147
|
+
r.planRemoveConnections(controller, org, r.vaultChoiceOf(options), addresses),
|
|
148
|
+
),
|
|
149
|
+
);
|
|
150
|
+
addResultFlags(removeConnection);
|
|
151
|
+
|
|
152
|
+
const connectLink = vault
|
|
153
|
+
.command("connect-link <vault>")
|
|
154
|
+
.description(
|
|
155
|
+
"make a one-time page where someone without a Stigmer account signs in at an address and the login is saved into a shared vault",
|
|
156
|
+
)
|
|
157
|
+
.requiredOption("--address <address>", "the tool's URL or Git host to sign in to")
|
|
158
|
+
.requiredOption("--return-url <url>", "where to send them afterwards (https)")
|
|
159
|
+
.option("--expires-in <duration>", "how long the link works: 30m (default) up to 24h")
|
|
160
|
+
.action((ref: string, options: ConnectLinkFlags, command: Command) =>
|
|
161
|
+
run(options, command, async (controller, org, r) => {
|
|
162
|
+
const expiresInSeconds =
|
|
163
|
+
options.expiresIn === undefined
|
|
164
|
+
? undefined
|
|
165
|
+
: Math.floor((await import("./apikey/duration.js")).parseExpiration(options.expiresIn) / 1000);
|
|
166
|
+
return r.createConnectLink(controller, org, ref, {
|
|
167
|
+
address: options.address,
|
|
168
|
+
returnUrl: options.returnUrl,
|
|
169
|
+
expiresInSeconds,
|
|
170
|
+
});
|
|
171
|
+
}),
|
|
172
|
+
);
|
|
173
|
+
addResultFlags(connectLink);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type VaultModule = typeof import("../resources/vault.js");
|
|
177
|
+
type ControllerFn = import("../resources/run/create.js").ControllerFn;
|
|
178
|
+
type CommandResult = import("../output/index.js").CommandResult;
|
|
179
|
+
type DeletePlan = import("../resources/delete.js").DeletePlan;
|
|
180
|
+
type Render = typeof import("../output/command-result.js").renderResult;
|
|
181
|
+
|
|
182
|
+
interface Session {
|
|
183
|
+
readonly controller: ControllerFn;
|
|
184
|
+
readonly org: string;
|
|
185
|
+
readonly resources: VaultModule;
|
|
186
|
+
readonly renderResult: Render;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
async function openSession(command: Command): Promise<Session> {
|
|
190
|
+
const [{ connectBackend }, resources, { renderResult }] = await Promise.all([
|
|
191
|
+
import("../backend.js"),
|
|
192
|
+
import("../resources/vault.js"),
|
|
193
|
+
import("../output/command-result.js"),
|
|
194
|
+
]);
|
|
195
|
+
const client = connectBackend();
|
|
196
|
+
ensureAuthenticated(client.config);
|
|
197
|
+
const org = resolveOrganization(client.config, globalOrg(command));
|
|
198
|
+
return { controller: client.controller.bind(client), org, resources, renderResult };
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
async function run(
|
|
202
|
+
options: OutputFlags,
|
|
203
|
+
command: Command,
|
|
204
|
+
act: (controller: ControllerFn, org: string, r: VaultModule) => Promise<CommandResult>,
|
|
205
|
+
): Promise<void> {
|
|
206
|
+
const format = resultFormat(options);
|
|
207
|
+
const session = await openSession(command);
|
|
208
|
+
session.renderResult(await act(session.controller, session.org, session.resources), format);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// The `delete` interaction (commands/delete.ts): render the warning, confirm
|
|
212
|
+
// unless --force, then send the write.
|
|
213
|
+
async function runRemoval(
|
|
214
|
+
options: RemoveFlags,
|
|
215
|
+
command: Command,
|
|
216
|
+
plan: (controller: ControllerFn, org: string, r: VaultModule) => Promise<DeletePlan>,
|
|
217
|
+
): Promise<void> {
|
|
218
|
+
const format = resultFormat(options);
|
|
219
|
+
const [session, { confirm }] = await Promise.all([openSession(command), import("../output/confirm.js")]);
|
|
220
|
+
const staged = await plan(session.controller, session.org, session.resources);
|
|
221
|
+
if (options.force !== true) {
|
|
222
|
+
session.renderResult(staged.warning, format);
|
|
223
|
+
const confirmed = await confirm(staged.confirmPrompt);
|
|
224
|
+
if (!confirmed) {
|
|
225
|
+
// Declined (or no TTY): a clean, intentional no-op — exit 0.
|
|
226
|
+
process.stderr.write("Aborted.\n");
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
session.renderResult(await staged.perform(), format);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
async function valueIo(): Promise<import("../resources/vault.js").ValueIo> {
|
|
234
|
+
const { promptSecret } = await import("../local/setup/prompt.js");
|
|
235
|
+
return {
|
|
236
|
+
env: process.env,
|
|
237
|
+
stdinIsTty: process.stdin.isTTY === true,
|
|
238
|
+
promptHidden: promptSecret,
|
|
239
|
+
readStdin: async () => {
|
|
240
|
+
const chunks: Buffer[] = [];
|
|
241
|
+
for await (const chunk of process.stdin) chunks.push(chunk as Buffer);
|
|
242
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// `stigmer version` — print the CLI version. No backend, no flags.
|
|
2
|
+
|
|
3
|
+
import type { Command } from "commander";
|
|
4
|
+
import { VERSION } from "../version.js";
|
|
5
|
+
|
|
6
|
+
export function registerVersion(program: Command): void {
|
|
7
|
+
program
|
|
8
|
+
.command("version")
|
|
9
|
+
.description("print the CLI version")
|
|
10
|
+
.action(() => {
|
|
11
|
+
process.stdout.write(`${VERSION}\n`);
|
|
12
|
+
});
|
|
13
|
+
}
|