@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,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E;QAAE,OAAO,QAAQ,CAAC,EAAE,CAAC;IACjC,OAAO,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;AACxB,CAAC;AAED,wEAAwE;AACxE,SAAS,oBAAoB,CAAC,IAAY,EAAE,EAAU;IACpD,IAAI,IAAI,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IACxC,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,MAAM,EAAE,EAAE,CAAC;IACnC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,QAAQ,IAAI,EAAE,CAAC;IACrC,OAAO,GAAG,IAAI,OAAO,EAAE,EAAE,CAAC;AAC5B,CAAC;AAED,+EAA+E;AAC/E,SAAS,gBAAgB,CAAC,KAAe;IACvC,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,QAAQ,CAAC,WAAW;YACvB,OAAO,SAAS,CAAC;QACnB,KAAK,QAAQ,CAAC,eAAe;YAC3B,OAAO,aAAa,CAAC;QACvB,KAAK,QAAQ,CAAC,aAAa;YACzB,OAAO,WAAW,CAAC;QACrB,KAAK,QAAQ,CAAC,UAAU;YACtB,OAAO,QAAQ,CAAC;QAClB,KAAK,QAAQ,CAAC,aAAa;YACzB,OAAO,WAAW,CAAC;QACrB,KAAK,QAAQ,CAAC,wBAAwB;YACpC,OAAO,sBAAsB,CAAC;QAChC,KAAK,QAAQ,CAAC,cAAc;YAC1B,OAAO,YAAY,CAAC;QACtB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type DescMessage, type JsonValue } from "@bufbuild/protobuf";
|
|
2
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
3
|
+
export declare const VALIDATE_SCHEMAS: ReadonlyMap<ApiResourceKind, DescMessage>;
|
|
4
|
+
export declare function schemaForValidate(kind: ApiResourceKind): DescMessage | undefined;
|
|
5
|
+
/** Structurally validate a parsed YAML document against its proto schema. */
|
|
6
|
+
export declare function validateDocument(schema: DescMessage, document: JsonValue): void;
|
|
7
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/resources/validate.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAY,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEhF,OAAO,EAAE,eAAe,EAAE,MAAM,mFAAmF,CAAC;AAOpH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,eAAe,EAAE,WAAW,CAErE,CAAC;AAEH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,eAAe,GAAG,WAAW,GAAG,SAAS,CAEhF;AAED,6EAA6E;AAC7E,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,GAAG,IAAI,CAW/E"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Offline resource validation: parse a YAML document into its proto schema.
|
|
2
|
+
//
|
|
3
|
+
// protobuf-es `fromJson` performs structural validation — field types, required
|
|
4
|
+
// shapes, and enum membership — without a server round-trip, mirroring the Go
|
|
5
|
+
// CLI's local load-and-validate. The accepted kinds are the file-based verbs
|
|
6
|
+
// (apply/validate) that carry a YAML representation.
|
|
7
|
+
import { fromJson } from "@bufbuild/protobuf";
|
|
8
|
+
import { AgentSchema } from "@stigmer/apis/ai/stigmer/agentic/agent/v1/api_pb";
|
|
9
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
10
|
+
import { mcpServerWayForward, subagentsWayForward } from "@stigmer/client";
|
|
11
|
+
// Exported for the verb/dispatch conformance suite (registry/registry.test.ts),
|
|
12
|
+
// which holds this map and the matrix's Verb.Validate promises to strict
|
|
13
|
+
// bidirectional equality — the stigmer/stigmer#353 drift class. Command code
|
|
14
|
+
// resolves schemas through `schemaForValidate`, never this map directly.
|
|
15
|
+
export const VALIDATE_SCHEMAS = new Map([
|
|
16
|
+
[ApiResourceKind.agent, AgentSchema],
|
|
17
|
+
]);
|
|
18
|
+
export function schemaForValidate(kind) {
|
|
19
|
+
return VALIDATE_SCHEMAS.get(kind);
|
|
20
|
+
}
|
|
21
|
+
/** Structurally validate a parsed YAML document against its proto schema. */
|
|
22
|
+
export function validateDocument(schema, document) {
|
|
23
|
+
// A retired field is not a forward-compat one: the leniency below would
|
|
24
|
+
// pass an agent listing mcp_server_usages or sub_agents that apply then
|
|
25
|
+
// refuses, so each is refused here with the same way forward.
|
|
26
|
+
const retired = mcpServerWayForward(document);
|
|
27
|
+
if (retired !== undefined)
|
|
28
|
+
throw new Error(`mcp_server_usages is no longer read. ${retired}`);
|
|
29
|
+
const subagents = subagentsWayForward(document);
|
|
30
|
+
if (subagents !== undefined)
|
|
31
|
+
throw new Error(`sub_agents is no longer read. ${subagents}`);
|
|
32
|
+
// ignoreUnknownFields mirrors the server's lenient unmarshal: forward-compat
|
|
33
|
+
// fields a newer server adds should not fail a slightly older CLI.
|
|
34
|
+
fromJson(schema, document, { ignoreUnknownFields: true });
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=validate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/resources/validate.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,EAAE;AACF,gFAAgF;AAChF,8EAA8E;AAC9E,6EAA6E;AAC7E,qDAAqD;AAErD,OAAO,EAAoB,QAAQ,EAAkB,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,kDAAkD,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,mFAAmF,CAAC;AACpH,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAE3E,gFAAgF;AAChF,yEAAyE;AACzE,6EAA6E;AAC7E,yEAAyE;AACzE,MAAM,CAAC,MAAM,gBAAgB,GAA8C,IAAI,GAAG,CAA+B;IAC/G,CAAC,eAAe,CAAC,KAAK,EAAE,WAAW,CAAC;CACrC,CAAC,CAAC;AAEH,MAAM,UAAU,iBAAiB,CAAC,IAAqB;IACrD,OAAO,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,gBAAgB,CAAC,MAAmB,EAAE,QAAmB;IACvE,wEAAwE;IACxE,wEAAwE;IACxE,8DAA8D;IAC9D,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAC9C,IAAI,OAAO,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,wCAAwC,OAAO,EAAE,CAAC,CAAC;IAC9F,MAAM,SAAS,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAChD,IAAI,SAAS,KAAK,SAAS;QAAE,MAAM,IAAI,KAAK,CAAC,iCAAiC,SAAS,EAAE,CAAC,CAAC;IAC3F,6EAA6E;IAC7E,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,mBAAmB,EAAE,IAAI,EAAE,CAAC,CAAC;AAC5D,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { CommandResult } from "../output/index.js";
|
|
2
|
+
import type { DeletePlan } from "./delete.js";
|
|
3
|
+
import type { ControllerFn } from "./run/create.js";
|
|
4
|
+
/** Which vault an entry command changes: a reference, or the caller's own. */
|
|
5
|
+
export type VaultChoice = {
|
|
6
|
+
readonly kind: "mine";
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: "ref";
|
|
9
|
+
readonly ref: string;
|
|
10
|
+
};
|
|
11
|
+
/** Where an entry's value comes from; never the command line itself. */
|
|
12
|
+
export interface ValueSource {
|
|
13
|
+
/** Read the value from this environment variable. */
|
|
14
|
+
readonly fromEnv?: string;
|
|
15
|
+
/** Read the value from this file (one trailing newline dropped). */
|
|
16
|
+
readonly fromFile?: string;
|
|
17
|
+
}
|
|
18
|
+
/** The streams and environment value reading touches, injectable for tests. */
|
|
19
|
+
export interface ValueIo {
|
|
20
|
+
readonly env: NodeJS.ProcessEnv;
|
|
21
|
+
readonly readStdin: () => Promise<string>;
|
|
22
|
+
readonly promptHidden: (question: string) => Promise<string>;
|
|
23
|
+
readonly stdinIsTty: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** Pick the vault from `--mine` / `--vault`: exactly one is required. */
|
|
26
|
+
export declare function vaultChoiceOf(options: {
|
|
27
|
+
mine?: boolean;
|
|
28
|
+
vault?: string;
|
|
29
|
+
}): VaultChoice;
|
|
30
|
+
/**
|
|
31
|
+
* Read an entry's value from the named source: an environment variable, a
|
|
32
|
+
* file, or stdin (a hidden prompt on a terminal). An empty value is refused:
|
|
33
|
+
* removing an entry is its own command.
|
|
34
|
+
*/
|
|
35
|
+
export declare function readValue(label: string, source: ValueSource, io: ValueIo): Promise<string>;
|
|
36
|
+
/** Create a shared vault in `org`: the organization's, empty and private. */
|
|
37
|
+
export declare function createSharedVault(controller: ControllerFn, org: string, name: string, options: {
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
readonly externalId?: string;
|
|
40
|
+
}): Promise<CommandResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Make a Connect link for a shared vault: a one-time page where someone
|
|
43
|
+
* without a Stigmer account signs in at `address`, the login is saved into
|
|
44
|
+
* the vault, and they are sent back to `returnUrl`. The server refuses My
|
|
45
|
+
* vault, an address the organization has no login app of its own for, and a
|
|
46
|
+
* return URL that is not https. The link carries its own secret, so the result prints it once and
|
|
47
|
+
* says to send it only to its customer.
|
|
48
|
+
*/
|
|
49
|
+
export declare function createConnectLink(controller: ControllerFn, org: string, ref: string, options: {
|
|
50
|
+
readonly address: string;
|
|
51
|
+
readonly returnUrl: string;
|
|
52
|
+
readonly expiresInSeconds?: number;
|
|
53
|
+
}): Promise<CommandResult>;
|
|
54
|
+
/** Show the caller's own My vault in `org`: its entry names, never a value. */
|
|
55
|
+
export declare function showMyVault(controller: ControllerFn, org: string): Promise<CommandResult>;
|
|
56
|
+
/**
|
|
57
|
+
* Save one secret in the chosen vault, replacing any saved under its name.
|
|
58
|
+
* The value is read only once the vault resolves, so a mistyped reference
|
|
59
|
+
* refuses before anyone types or pipes a secret.
|
|
60
|
+
*/
|
|
61
|
+
export declare function setSecret(controller: ControllerFn, org: string, choice: VaultChoice, name: string, value: () => Promise<string>, description: string): Promise<CommandResult>;
|
|
62
|
+
/**
|
|
63
|
+
* Stage the removal of secrets from the chosen vault by name: the warning
|
|
64
|
+
* names each secret and the vault, and `perform` sends the write. Names not
|
|
65
|
+
* saved are ignored.
|
|
66
|
+
*/
|
|
67
|
+
export declare function planRemoveSecrets(controller: ControllerFn, org: string, choice: VaultChoice, names: readonly string[]): Promise<DeletePlan>;
|
|
68
|
+
/**
|
|
69
|
+
* Save a login at an address (a tool's URL or a Git host) in the chosen
|
|
70
|
+
* vault. The token is read only once the vault resolves, as for a secret.
|
|
71
|
+
*/
|
|
72
|
+
export declare function setConnection(controller: ControllerFn, org: string, choice: VaultChoice, address: string, token: () => Promise<string>, description: string): Promise<CommandResult>;
|
|
73
|
+
/**
|
|
74
|
+
* Stage the removal of logins from the chosen vault by address: the warning
|
|
75
|
+
* names each address and the vault, and `perform` sends the write. Addresses
|
|
76
|
+
* not saved are ignored.
|
|
77
|
+
*/
|
|
78
|
+
export declare function planRemoveConnections(controller: ControllerFn, org: string, choice: VaultChoice, addresses: readonly string[]): Promise<DeletePlan>;
|
|
79
|
+
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../src/resources/vault.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,K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AqB,CACzC,UAAU,EAAE,YAAY,EACxB,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,SAAS,MAAM,EAAE,GAC3B,OAAO,CAAC,UAAU,CAAC,CAarB"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
// `stigmer vault` dispatch: create a shared vault, show your own, save or
|
|
2
|
+
// remove the secrets (by name) and logins (by address) a vault holds, and make
|
|
3
|
+
// a Connect link that lets someone without a Stigmer account sign in and save
|
|
4
|
+
// a login into a shared vault.
|
|
5
|
+
//
|
|
6
|
+
// A vault is write-only: no RPC returns a saved value, so nothing here ever
|
|
7
|
+
// prints one, and a value never rides the command line by default — it is
|
|
8
|
+
// read from an environment variable the caller names, a file, or stdin (a
|
|
9
|
+
// hidden prompt on a terminal). Entry writes name their vault through
|
|
10
|
+
// VaultTarget: a vault by id, or the caller's own My vault, which the first
|
|
11
|
+
// write that names it creates. A reference (org/slug or slug) is resolved to
|
|
12
|
+
// its id first, so the write is addressed exactly.
|
|
13
|
+
//
|
|
14
|
+
// Removing an entry destroys a value no one can read back, so a removal is
|
|
15
|
+
// staged as a DeletePlan (delete.ts's shape): the vault is resolved and named
|
|
16
|
+
// first, the command layer confirms, and only then is the write sent.
|
|
17
|
+
//
|
|
18
|
+
// The raw controllers are driven directly (the run path's seam, create.ts):
|
|
19
|
+
// the entry RPCs take their request messages as-is, and the generic get, list
|
|
20
|
+
// and delete verbs cover the rest through the SDK.
|
|
21
|
+
import { readFileSync } from "node:fs";
|
|
22
|
+
import { create } from "@bufbuild/protobuf";
|
|
23
|
+
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
24
|
+
import { VaultSchema } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/api_pb";
|
|
25
|
+
import { VaultCommandController } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/command_pb";
|
|
26
|
+
import { CreateConnectLinkInputSchema, GetMyVaultInputSchema, RemoveVaultConnectionsInputSchema, RemoveVaultSecretsInputSchema, SetVaultConnectionInputSchema, SetVaultSecretsInputSchema, VaultTargetSchema, } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/io_pb";
|
|
27
|
+
import { VaultQueryController } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/query_pb";
|
|
28
|
+
import { VaultConnectionSource } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/spec_pb";
|
|
29
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
30
|
+
import { ApiResourceIdSchema, ApiResourceReferenceSchema } from "@stigmer/apis/ai/stigmer/commons/apiresource/io_pb";
|
|
31
|
+
import { ApiResourceMetadataSchema } from "@stigmer/apis/ai/stigmer/commons/apiresource/metadata_pb";
|
|
32
|
+
import { Code, ConnectError } from "@connectrpc/connect";
|
|
33
|
+
import { UsageError } from "../errors/index.js";
|
|
34
|
+
import { CommandResult } from "../output/index.js";
|
|
35
|
+
import { parseReference } from "./reference.js";
|
|
36
|
+
/** The vault kind's canonical id prefix (proto kind_meta). */
|
|
37
|
+
const VAULT_ID_PREFIX = "vlt";
|
|
38
|
+
/** Pick the vault from `--mine` / `--vault`: exactly one is required. */
|
|
39
|
+
export function vaultChoiceOf(options) {
|
|
40
|
+
const mine = options.mine === true;
|
|
41
|
+
const ref = options.vault ?? "";
|
|
42
|
+
if (mine && ref !== "") {
|
|
43
|
+
throw new UsageError("name one vault: --mine or --vault <ref>, not both");
|
|
44
|
+
}
|
|
45
|
+
if (mine)
|
|
46
|
+
return { kind: "mine" };
|
|
47
|
+
if (ref !== "")
|
|
48
|
+
return { kind: "ref", ref };
|
|
49
|
+
throw new UsageError("name the vault: --mine for your own, or --vault <ref> for a shared vault");
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Read an entry's value from the named source: an environment variable, a
|
|
53
|
+
* file, or stdin (a hidden prompt on a terminal). An empty value is refused:
|
|
54
|
+
* removing an entry is its own command.
|
|
55
|
+
*/
|
|
56
|
+
export async function readValue(label, source, io) {
|
|
57
|
+
if (source.fromEnv !== undefined && source.fromFile !== undefined) {
|
|
58
|
+
throw new UsageError("read the value from one place: --from-env or --from-file, not both");
|
|
59
|
+
}
|
|
60
|
+
let value;
|
|
61
|
+
if (source.fromEnv !== undefined) {
|
|
62
|
+
value = io.env[source.fromEnv] ?? "";
|
|
63
|
+
if (value === "") {
|
|
64
|
+
throw new UsageError(`environment variable ${source.fromEnv} is not set or empty`);
|
|
65
|
+
}
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
if (source.fromFile !== undefined) {
|
|
69
|
+
try {
|
|
70
|
+
value = readFileSync(source.fromFile, "utf8");
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
throw new UsageError(`failed to read ${source.fromFile}: ${err.message}`);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
else if (io.stdinIsTty) {
|
|
77
|
+
value = await io.promptHidden(`Value for ${label}`);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
value = await io.readStdin();
|
|
81
|
+
}
|
|
82
|
+
value = value.replace(/\r?\n$/, "");
|
|
83
|
+
if (value === "") {
|
|
84
|
+
throw new UsageError(`no value given for ${label}`);
|
|
85
|
+
}
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
/** Create a shared vault in `org`: the organization's, empty and private. */
|
|
89
|
+
export async function createSharedVault(controller, org, name, options) {
|
|
90
|
+
const created = await controller(VaultCommandController).create(create(VaultSchema, {
|
|
91
|
+
apiVersion: "agentic.stigmer.ai/v1",
|
|
92
|
+
kind: "Vault",
|
|
93
|
+
metadata: create(ApiResourceMetadataSchema, { name, org }),
|
|
94
|
+
spec: {
|
|
95
|
+
description: options.description ?? "",
|
|
96
|
+
externalId: options.externalId ?? "",
|
|
97
|
+
},
|
|
98
|
+
}));
|
|
99
|
+
const result = CommandResult.success(`Shared vault '${created.metadata?.name ?? name}' created`);
|
|
100
|
+
const section = result.addSection();
|
|
101
|
+
section.field("ID", created.metadata?.id ?? "");
|
|
102
|
+
section.field("Slug", created.metadata?.slug ?? "");
|
|
103
|
+
result.hint(`Only the organization's admins may use it until it is shared. Add a key with: stigmer vault set-secret <NAME> --vault ${created.metadata?.slug ?? "<slug>"}`);
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Make a Connect link for a shared vault: a one-time page where someone
|
|
108
|
+
* without a Stigmer account signs in at `address`, the login is saved into
|
|
109
|
+
* the vault, and they are sent back to `returnUrl`. The server refuses My
|
|
110
|
+
* vault, an address the organization has no login app of its own for, and a
|
|
111
|
+
* return URL that is not https. The link carries its own secret, so the result prints it once and
|
|
112
|
+
* says to send it only to its customer.
|
|
113
|
+
*/
|
|
114
|
+
export async function createConnectLink(controller, org, ref, options) {
|
|
115
|
+
// A reference always resolves to a vault by id: a link names a shared vault.
|
|
116
|
+
const { target, label } = await targetOf(controller, org, { kind: "ref", ref });
|
|
117
|
+
const link = await controller(VaultCommandController).createConnectLink(create(CreateConnectLinkInputSchema, {
|
|
118
|
+
org: target.org,
|
|
119
|
+
vaultId: target.vault.case === "id" ? target.vault.value : "",
|
|
120
|
+
address: options.address,
|
|
121
|
+
returnUrl: options.returnUrl,
|
|
122
|
+
expiresInSeconds: options.expiresInSeconds ?? 0,
|
|
123
|
+
}));
|
|
124
|
+
const result = CommandResult.success(`Connect link for ${options.address} into ${label}`);
|
|
125
|
+
const section = result.addSection();
|
|
126
|
+
section.field("URL", link.url);
|
|
127
|
+
if (link.expiresAt !== undefined) {
|
|
128
|
+
section.field("Expires", timestampDate(link.expiresAt).toISOString());
|
|
129
|
+
}
|
|
130
|
+
result.hint("The link works once and carries its own secret: send it only to the customer it is for.");
|
|
131
|
+
return result;
|
|
132
|
+
}
|
|
133
|
+
/** Show the caller's own My vault in `org`: its entry names, never a value. */
|
|
134
|
+
export async function showMyVault(controller, org) {
|
|
135
|
+
let vault;
|
|
136
|
+
try {
|
|
137
|
+
vault = await controller(VaultQueryController).getMine(create(GetMyVaultInputSchema, { org }));
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
if (err instanceof ConnectError && err.code === Code.NotFound) {
|
|
141
|
+
const result = CommandResult.success("Your vault is empty");
|
|
142
|
+
result.hint("Save a key with: stigmer vault set-secret <NAME> --mine");
|
|
143
|
+
return result;
|
|
144
|
+
}
|
|
145
|
+
throw err;
|
|
146
|
+
}
|
|
147
|
+
return describeVault(vault, "Your vault");
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Save one secret in the chosen vault, replacing any saved under its name.
|
|
151
|
+
* The value is read only once the vault resolves, so a mistyped reference
|
|
152
|
+
* refuses before anyone types or pipes a secret.
|
|
153
|
+
*/
|
|
154
|
+
export async function setSecret(controller, org, choice, name, value, description) {
|
|
155
|
+
const { target } = await targetOf(controller, org, choice);
|
|
156
|
+
const vault = await controller(VaultCommandController).setSecrets(create(SetVaultSecretsInputSchema, {
|
|
157
|
+
vault: target,
|
|
158
|
+
secrets: { [name]: { value: await value(), description } },
|
|
159
|
+
}));
|
|
160
|
+
return CommandResult.success(`Secret ${name} saved in ${vaultLabel(vault, choice)}`);
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Stage the removal of secrets from the chosen vault by name: the warning
|
|
164
|
+
* names each secret and the vault, and `perform` sends the write. Names not
|
|
165
|
+
* saved are ignored.
|
|
166
|
+
*/
|
|
167
|
+
export async function planRemoveSecrets(controller, org, choice, names) {
|
|
168
|
+
const { target, label } = await targetOf(controller, org, choice);
|
|
169
|
+
const what = names.length === 1 ? "this secret" : "these secrets";
|
|
170
|
+
return {
|
|
171
|
+
warning: removalWarning(`You are about to remove ${what} from ${label}:`, names),
|
|
172
|
+
confirmPrompt: REMOVAL_PROMPT,
|
|
173
|
+
perform: async () => {
|
|
174
|
+
await controller(VaultCommandController).removeSecrets(create(RemoveVaultSecretsInputSchema, { vault: target, names: [...names] }));
|
|
175
|
+
return CommandResult.success(`Removed ${names.join(", ")} from ${label}`);
|
|
176
|
+
},
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Save a login at an address (a tool's URL or a Git host) in the chosen
|
|
181
|
+
* vault. The token is read only once the vault resolves, as for a secret.
|
|
182
|
+
*/
|
|
183
|
+
export async function setConnection(controller, org, choice, address, token, description) {
|
|
184
|
+
const { target } = await targetOf(controller, org, choice);
|
|
185
|
+
const vault = await controller(VaultCommandController).setConnection(create(SetVaultConnectionInputSchema, { vault: target, address, token: await token(), description }));
|
|
186
|
+
return CommandResult.success(`Login for ${address} saved in ${vaultLabel(vault, choice)}`);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Stage the removal of logins from the chosen vault by address: the warning
|
|
190
|
+
* names each address and the vault, and `perform` sends the write. Addresses
|
|
191
|
+
* not saved are ignored.
|
|
192
|
+
*/
|
|
193
|
+
export async function planRemoveConnections(controller, org, choice, addresses) {
|
|
194
|
+
const { target, label } = await targetOf(controller, org, choice);
|
|
195
|
+
const what = addresses.length === 1 ? "the login for this address" : "the logins for these addresses";
|
|
196
|
+
return {
|
|
197
|
+
warning: removalWarning(`You are about to remove ${what} from ${label}:`, addresses),
|
|
198
|
+
confirmPrompt: REMOVAL_PROMPT,
|
|
199
|
+
perform: async () => {
|
|
200
|
+
await controller(VaultCommandController).removeConnections(create(RemoveVaultConnectionsInputSchema, { vault: target, addresses: [...addresses] }));
|
|
201
|
+
return CommandResult.success(`Removed the logins for ${addresses.join(", ")} from ${label}`);
|
|
202
|
+
},
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
const REMOVAL_PROMPT = "Proceed with removal? [y/N]";
|
|
206
|
+
function removalWarning(message, entries) {
|
|
207
|
+
const warning = CommandResult.warning(message);
|
|
208
|
+
const section = warning.addSection("");
|
|
209
|
+
for (const entry of entries)
|
|
210
|
+
section.item(entry);
|
|
211
|
+
warning.hint("A removed value cannot be recovered: to restore it, save it again.");
|
|
212
|
+
return warning;
|
|
213
|
+
}
|
|
214
|
+
// The VaultTarget an entry write sends, with how the vault is named to the
|
|
215
|
+
// caller. A reference resolves to its vault's id and organization first, so
|
|
216
|
+
// the write is addressed exactly and a removal's warning names the vault.
|
|
217
|
+
// `--mine` sends the organization as resolved, empty included: a server that
|
|
218
|
+
// holds one organization fills it in (as `vault mine` relies on), and one
|
|
219
|
+
// that holds several refuses the write.
|
|
220
|
+
async function targetOf(controller, org, choice) {
|
|
221
|
+
if (choice.kind === "mine") {
|
|
222
|
+
return {
|
|
223
|
+
target: create(VaultTargetSchema, { org, vault: { case: "mine", value: true } }),
|
|
224
|
+
label: "your vault",
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
const parsed = parseReference(choice.ref, org, VAULT_ID_PREFIX);
|
|
228
|
+
const query = controller(VaultQueryController);
|
|
229
|
+
const vault = parsed.kind === "id"
|
|
230
|
+
? await query.get(create(ApiResourceIdSchema, { value: parsed.id }))
|
|
231
|
+
: await query.getByReference(create(ApiResourceReferenceSchema, {
|
|
232
|
+
org: parsed.org,
|
|
233
|
+
slug: parsed.slug,
|
|
234
|
+
kind: ApiResourceKind.vault,
|
|
235
|
+
}));
|
|
236
|
+
const id = vault.metadata?.id ?? "";
|
|
237
|
+
if (id === "") {
|
|
238
|
+
throw new UsageError(`vault '${choice.ref}' has no id`);
|
|
239
|
+
}
|
|
240
|
+
return {
|
|
241
|
+
target: create(VaultTargetSchema, {
|
|
242
|
+
org: vault.metadata?.org ?? org,
|
|
243
|
+
vault: { case: "id", value: id },
|
|
244
|
+
}),
|
|
245
|
+
label: vaultLabel(vault, choice),
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
function vaultLabel(vault, choice) {
|
|
249
|
+
if (choice.kind === "mine" || vault.spec?.owner.case === "person")
|
|
250
|
+
return "your vault";
|
|
251
|
+
return `vault '${vault.metadata?.name || vault.metadata?.slug || ""}'`;
|
|
252
|
+
}
|
|
253
|
+
// A vault's entries by name and address, with who saved each and when. The
|
|
254
|
+
// values are blank on every read; they are never shown.
|
|
255
|
+
function describeVault(vault, title) {
|
|
256
|
+
const result = CommandResult.success(title);
|
|
257
|
+
const secrets = Object.entries(vault.spec?.secrets ?? {}).sort(([a], [b]) => a.localeCompare(b));
|
|
258
|
+
const connections = Object.entries(vault.spec?.connections ?? {}).sort(([a], [b]) => a.localeCompare(b));
|
|
259
|
+
const secretSection = result.addSection(`Secrets (${secrets.length})`);
|
|
260
|
+
for (const [name, secret] of secrets) {
|
|
261
|
+
secretSection.field(name, savedLine(secret.description, secret.savedAt));
|
|
262
|
+
}
|
|
263
|
+
const loginSection = result.addSection(`Logins (${connections.length})`);
|
|
264
|
+
for (const [address, connection] of connections) {
|
|
265
|
+
const how = connection.source === VaultConnectionSource.sign_in ? "signed in" : "pasted";
|
|
266
|
+
loginSection.field(address, savedLine(connection.description || how, connection.savedAt));
|
|
267
|
+
}
|
|
268
|
+
if (secrets.length === 0 && connections.length === 0) {
|
|
269
|
+
result.hint("Save a key with: stigmer vault set-secret <NAME> --mine");
|
|
270
|
+
}
|
|
271
|
+
return result;
|
|
272
|
+
}
|
|
273
|
+
function savedLine(description, savedAt) {
|
|
274
|
+
const when = savedAt === undefined ? "" : `saved ${timestampDate(savedAt).toISOString().slice(0, 10)}`;
|
|
275
|
+
return [description, when].filter((part) => part !== "").join(" · ") || "-";
|
|
276
|
+
}
|
|
277
|
+
//# sourceMappingURL=vault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.js","sourceRoot":"","sources":["../src/resources/vault.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,+EAA+E;AAC/E,8EAA8E;AAC9E,+BAA+B;AAC/B,EAAE;AACF,4EAA4E;AAC5E,0EAA0E;AAC1E,0EAA0E;AAC1E,sEAAsE;AACtE,4EAA4E;AAC5E,6EAA6E;AAC7E,mDAAmD;AACnD,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,sEAAsE;AACtE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C,KAAK,CAAC,IAAI,GAAG,CAAC;AAC9E,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Agent } from "@stigmer/apis/ai/stigmer/agentic/agent/v1/api_pb";
|
|
2
|
+
import type { Stigmer } from "@stigmer/client";
|
|
3
|
+
/** Render the agent's version history table, or empty-history guidance. */
|
|
4
|
+
export declare function renderAgentVersionHistory(client: Stigmer, org: string, slug: string): Promise<string>;
|
|
5
|
+
/**
|
|
6
|
+
* The agent as a version (a hash, a tag, or "latest") stored it. An agent last
|
|
7
|
+
* written before agents were versioned has no history yet; its next apply
|
|
8
|
+
* records one.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getAgentAtVersion(client: Stigmer, org: string, slug: string, hashOrTag: string): Promise<Agent>;
|
|
11
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/resources/version.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AAK9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAS/C,2EAA2E;AAC3E,wBAAsB,yBAAyB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ3G;AAED;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAErH"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Version history (`get agent --version-history`) and single version
|
|
2
|
+
// retrieval (`get agent --version <hashOrTag>`): every apply that changes an
|
|
3
|
+
// agent records an immutable, hash-addressed version that can be tagged. The
|
|
4
|
+
// history table mirrors Go's RunVersionsList layout and empty-history
|
|
5
|
+
// guidance, which names the organization by slug where the caller can see it.
|
|
6
|
+
// A version prints the agent as that version stored it.
|
|
7
|
+
import { create } from "@bufbuild/protobuf";
|
|
8
|
+
import { timestampDate } from "@bufbuild/protobuf/wkt";
|
|
9
|
+
import { ListAgentVersionsInputSchema, } from "@stigmer/apis/ai/stigmer/agentic/agent/v1/version_pb";
|
|
10
|
+
import { organizationLabel } from "../client/organizations.js";
|
|
11
|
+
// Go caps the history view at 50 entries (RunVersionsList).
|
|
12
|
+
const VERSION_HISTORY_PAGE_SIZE = 50;
|
|
13
|
+
/** Render the agent's version history table, or empty-history guidance. */
|
|
14
|
+
export async function renderAgentVersionHistory(client, org, slug) {
|
|
15
|
+
const response = await client.agent.listVersions(create(ListAgentVersionsInputSchema, { org, slug, pageSize: VERSION_HISTORY_PAGE_SIZE }));
|
|
16
|
+
if (response.entries.length === 0) {
|
|
17
|
+
return emptyHistory(client, org, slug);
|
|
18
|
+
}
|
|
19
|
+
return renderVersionsTable(response.entries, response.nextPageToken !== "");
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The agent as a version (a hash, a tag, or "latest") stored it. An agent last
|
|
23
|
+
* written before agents were versioned has no history yet; its next apply
|
|
24
|
+
* records one.
|
|
25
|
+
*/
|
|
26
|
+
export async function getAgentAtVersion(client, org, slug, hashOrTag) {
|
|
27
|
+
return client.agent.getByReference({ org, slug, version: hashOrTag });
|
|
28
|
+
}
|
|
29
|
+
async function emptyHistory(client, org, slug) {
|
|
30
|
+
return [
|
|
31
|
+
"",
|
|
32
|
+
// An empty org is a server that holds one: it is never named.
|
|
33
|
+
`No version history found for ${org === "" ? slug : `${await organizationLabel(client, org)}/${slug}`}`,
|
|
34
|
+
"Tip: Apply an agent to create the first version:",
|
|
35
|
+
" stigmer apply -f agent.yaml",
|
|
36
|
+
"",
|
|
37
|
+
].join("\n");
|
|
38
|
+
}
|
|
39
|
+
// --- Rendering (mirrors Go's displayVersionsTable) ---
|
|
40
|
+
// The history is one page, newest first: a list says whether more follow,
|
|
41
|
+
// not how many there are, so the header counts the page and adds "+" when
|
|
42
|
+
// older versions follow it.
|
|
43
|
+
function renderVersionsTable(entries, olderFollow) {
|
|
44
|
+
const lines = [
|
|
45
|
+
"",
|
|
46
|
+
`Version History (${entries.length}${olderFollow ? "+" : ""})`,
|
|
47
|
+
"",
|
|
48
|
+
` ${pad("HASH", 14)} ${pad("TAG", 10)} ${pad("APPLIED AT", 20)} ${pad("CURRENT", 8)} MESSAGE`,
|
|
49
|
+
` ${"─".repeat(14)} ${"─".repeat(10)} ${"─".repeat(20)} ${"─".repeat(8)} ───────`,
|
|
50
|
+
];
|
|
51
|
+
for (const entry of entries) {
|
|
52
|
+
const hash = truncateHash(entry.versionHash);
|
|
53
|
+
const tag = entry.tag === "" ? "-" : entry.tag;
|
|
54
|
+
const appliedAt = entry.appliedAt === undefined ? "-" : formatAppliedAt(entry.appliedAt);
|
|
55
|
+
const current = entry.isCurrent ? "*" : "";
|
|
56
|
+
const message = truncateMessage(entry.message);
|
|
57
|
+
lines.push(` ${pad(hash, 14)} ${pad(tag, 10)} ${pad(appliedAt, 20)} ${pad(current, 8)} ${message}`);
|
|
58
|
+
}
|
|
59
|
+
lines.push("");
|
|
60
|
+
return `${lines.join("\n")}\n`;
|
|
61
|
+
}
|
|
62
|
+
function truncateHash(hash) {
|
|
63
|
+
return hash.length > 12 ? hash.slice(0, 12) : hash;
|
|
64
|
+
}
|
|
65
|
+
function truncateMessage(message) {
|
|
66
|
+
if (message === "")
|
|
67
|
+
return "-";
|
|
68
|
+
return message.length > 40 ? `${message.slice(0, 37)}...` : message;
|
|
69
|
+
}
|
|
70
|
+
// Matches Go's "2006-01-02 15:04" local-time layout.
|
|
71
|
+
function formatAppliedAt(timestamp) {
|
|
72
|
+
const date = timestampDate(timestamp);
|
|
73
|
+
const pad2 = (n) => String(n).padStart(2, "0");
|
|
74
|
+
return (`${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ` +
|
|
75
|
+
`${pad2(date.getHours())}:${pad2(date.getMinutes())}`);
|
|
76
|
+
}
|
|
77
|
+
function pad(value, width) {
|
|
78
|
+
return value.length >= width ? value : value + " ".repeat(width - value.length);
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/resources/version.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,6EAA6E;AAC7E,6EAA6E;AAC7E,sEAAsE;AACtE,8EAA8E;AAC9E,wDAAwD;AAExD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAEL,4BAA4B,GAC7B,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,4DAA4D;AAC5D,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAKrC,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,MAAe,EAAE,GAAW,EAAE,IAAY;IACxF,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,CAC9C,MAAM,CAAC,4BAA4B,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,yBAAyB,EAAE,CAAC,CACzF,CAAC;IACF,IAAI,QAAQ,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClC,OAAO,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,mBAAmB,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,aAAa,KAAK,EAAE,CAAC,CAAC;AAC9E,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAe,EAAE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DAAqD;AACrD,SAAS,eAAe,CAAC,SAA8C;IACrE,MAAM,IAAI,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IACtC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAC/D,OAAO,CACL,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,GAAG;QAC7E,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,EAAE,CACtD,CAAC;AACJ,CAAC;AAED,SAAS,GAAG,CAAC,KAAa,EAAE,KAAa;IACvC,OAAO,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;AAClF,CAAC"}
|
package/runtime.d.ts
ADDED
package/runtime.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["src/runtime.ts"],"names":[],"mappings":"AAQA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAE7C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAEjC;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAElD;AAED,wBAAgB,YAAY,IAAI,OAAO,CAEtC"}
|
package/runtime.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Process-global CLI flags that cross-cutting modules (config, errors, logger)
|
|
2
|
+
// read without threading them through every call. Set once by the root
|
|
3
|
+
// preAction hook from the parsed global options. Mirrors the Go CLI's atomic
|
|
4
|
+
// `standalone`/`debug` globals in internal/cli/config and clierr.
|
|
5
|
+
let debug = false;
|
|
6
|
+
let standalone = false;
|
|
7
|
+
export function setDebug(value) {
|
|
8
|
+
debug = value;
|
|
9
|
+
}
|
|
10
|
+
export function isDebug() {
|
|
11
|
+
return debug;
|
|
12
|
+
}
|
|
13
|
+
export function setStandalone(value) {
|
|
14
|
+
standalone = value;
|
|
15
|
+
}
|
|
16
|
+
export function isStandalone() {
|
|
17
|
+
return standalone;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=runtime.js.map
|
package/runtime.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["src/runtime.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,uEAAuE;AACvE,6EAA6E;AAC7E,kEAAkE;AAElE,IAAI,KAAK,GAAG,KAAK,CAAC;AAClB,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,KAAK,GAAG,KAAK,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,OAAO;IACrB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,UAAU,GAAG,KAAK,CAAC;AACrB,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,OAAO,UAAU,CAAC;AACpB,CAAC"}
|