@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,410 @@
|
|
|
1
|
+
// A public GitHub repository as a marketplace tree: the zipball of one ref,
|
|
2
|
+
// downloaded from codeload and extracted into a directory the one plugin
|
|
3
|
+
// walker then reads like any other.
|
|
4
|
+
//
|
|
5
|
+
// Why a zipball and not `git`: codeload needs no API call, no token and no
|
|
6
|
+
// `git` binary, and the tree convention every vendor publishes (Cursor,
|
|
7
|
+
// Claude Code, Codex) is "the repository at a ref", which is exactly what a
|
|
8
|
+
// zipball is. Why to disk and not in memory: `install` and `push plugin`
|
|
9
|
+
// must yield one digest for one tree, and the digest is a function of the
|
|
10
|
+
// CLI's gitignore-aware, symlink-skipping walk over a directory. A second,
|
|
11
|
+
// in-memory walk with its own rules would be a second identity.
|
|
12
|
+
//
|
|
13
|
+
// The archive is untrusted input, so it is read the way the server's push
|
|
14
|
+
// gate reads one: the shape from the central directory (the shared
|
|
15
|
+
// `@stigmer/zip-structure` parser) BEFORE a byte is inflated, entry count and
|
|
16
|
+
// total declared size against the caps, every path contained; then each
|
|
17
|
+
// entry inflated with node:zlib under its declared size as a hard output cap
|
|
18
|
+
// and its CRC verified, because a declaration is a claim and the bytes are
|
|
19
|
+
// the fact. That per-entry read mirrors `archive/inflate.ts` in the server,
|
|
20
|
+
// its second consumer; when a third appears it moves to `@stigmer/zip-
|
|
21
|
+
// structure` beside `crc32`. The caps are set against the three vendors'
|
|
22
|
+
// real trees at HEAD (cursor/plugins 4.5 MiB down and 5.5 MiB inflated over
|
|
23
|
+
// 1,169 entries; anthropics/claude-code 11.7 / 13.6 / 1,595; openai/codex
|
|
24
|
+
// 18.6 / 76.8 / 9,188, its marketplace file at the repository root so the
|
|
25
|
+
// whole repository is the tree), with room above the largest.
|
|
26
|
+
//
|
|
27
|
+
// The peek. A bare `stigmer install <name>` asks every known source whether
|
|
28
|
+
// it offers the name, and with the vendors' catalogues built in that would be
|
|
29
|
+
// three zipballs (about 35 MiB) per install. `peekGitHubMarketplace` reads
|
|
30
|
+
// only the marketplace file instead: the four locations the library knows,
|
|
31
|
+
// tried in its precedence, from raw.githubusercontent.com at the ref (no API
|
|
32
|
+
// call, no token, no rate budget, the same reasons as the zipball). It
|
|
33
|
+
// answers what the file declares; the zipball is then downloaded for the one
|
|
34
|
+
// holder and the tree read verifies the entry before anything is installed.
|
|
35
|
+
|
|
36
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
37
|
+
import { dirname, join } from "node:path";
|
|
38
|
+
import { inflateRawSync } from "node:zlib";
|
|
39
|
+
import {
|
|
40
|
+
MARKETPLACE_LOCATIONS,
|
|
41
|
+
type Marketplace,
|
|
42
|
+
type MarketplaceFinding,
|
|
43
|
+
inMemoryPluginFiles,
|
|
44
|
+
isContainedPath,
|
|
45
|
+
readMarketplaceFile,
|
|
46
|
+
} from "@stigmer/plugin-package";
|
|
47
|
+
import {
|
|
48
|
+
type ZipStructuralEntry,
|
|
49
|
+
crc32,
|
|
50
|
+
parseZipStructure,
|
|
51
|
+
} from "@stigmer/zip-structure";
|
|
52
|
+
import { CliExitError } from "../errors/cli-exit-error.js";
|
|
53
|
+
import { ExitCode } from "../errors/exit-codes.js";
|
|
54
|
+
import { log } from "../logger.js";
|
|
55
|
+
|
|
56
|
+
/** ZIP compression methods this reader opens, the two the platform's gates register. */
|
|
57
|
+
const METHOD_STORED = 0;
|
|
58
|
+
const METHOD_DEFLATED = 8;
|
|
59
|
+
|
|
60
|
+
/** The caps a repository zipball must fit under; each refusal names the one it hit. */
|
|
61
|
+
export const GITHUB_ZIPBALL_LIMITS = {
|
|
62
|
+
/** The compressed archive as downloaded. */
|
|
63
|
+
downloadBytes: 64 * 1024 * 1024,
|
|
64
|
+
/** The sum of every entry's declared uncompressed size. */
|
|
65
|
+
inflatedBytes: 256 * 1024 * 1024,
|
|
66
|
+
/** Files and directories the central directory lists. */
|
|
67
|
+
entries: 20_000,
|
|
68
|
+
} as const;
|
|
69
|
+
|
|
70
|
+
/** The ref codeload serves when none is named: the repository's default branch. */
|
|
71
|
+
const DEFAULT_REF = "HEAD";
|
|
72
|
+
|
|
73
|
+
export interface GitHubTreeSource {
|
|
74
|
+
/** `owner/repo`. */
|
|
75
|
+
readonly repo: string;
|
|
76
|
+
/** Branch, tag or commit; the default branch when absent. */
|
|
77
|
+
readonly ref?: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export interface FetchGitHubTreeOptions {
|
|
81
|
+
/** Where the tree is written; created if missing. The caller owns its lifetime. */
|
|
82
|
+
readonly destDir: string;
|
|
83
|
+
/** The HTTP client (injectable for tests). */
|
|
84
|
+
readonly fetchImpl?: typeof globalThis.fetch;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** The URL codeload answers with the zipball of `ref` (no API, no token). */
|
|
88
|
+
export function zipballUrl(source: GitHubTreeSource): string {
|
|
89
|
+
return `https://codeload.github.com/${source.repo}/zip/${source.ref ?? DEFAULT_REF}`;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/** The URL raw.githubusercontent.com serves `path` from at `ref` (no API, no token). */
|
|
93
|
+
export function rawFileUrl(source: GitHubTreeSource, path: string): string {
|
|
94
|
+
return `https://raw.githubusercontent.com/${source.repo}/${source.ref ?? DEFAULT_REF}/${path}`;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** What a peek learned: the file as declared, and where it sat. */
|
|
98
|
+
export interface PeekedMarketplace {
|
|
99
|
+
readonly marketplace: Marketplace;
|
|
100
|
+
readonly warnings: readonly MarketplaceFinding[];
|
|
101
|
+
/** The marketplace file's path in the tree, the first present in the library's precedence. */
|
|
102
|
+
readonly location: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type PeekOutcome =
|
|
106
|
+
| { readonly ok: true; readonly peeked: PeekedMarketplace }
|
|
107
|
+
/** No marketplace file at any of the four locations: the repository is not a marketplace. */
|
|
108
|
+
| { readonly ok: false; readonly kind: "not-a-marketplace" }
|
|
109
|
+
/** A file was found and the library refused it; its sentences travel. */
|
|
110
|
+
| {
|
|
111
|
+
readonly ok: false;
|
|
112
|
+
readonly kind: "refused";
|
|
113
|
+
readonly location: string;
|
|
114
|
+
readonly errors: readonly MarketplaceFinding[];
|
|
115
|
+
readonly warnings: readonly MarketplaceFinding[];
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Read only the marketplace file of a GitHub source. The four locations are
|
|
120
|
+
* tried in the library's precedence and the first that exists is read as
|
|
121
|
+
* declared (`readMarketplaceFile`: the tree is not consulted). Network and
|
|
122
|
+
* server faults throw a `CliExitError` naming the repository, as the
|
|
123
|
+
* zipball download does; a 404 at every location is the `not-a-marketplace`
|
|
124
|
+
* outcome, not an error, because a bare-name search must say which sources
|
|
125
|
+
* it looked at and move on.
|
|
126
|
+
*/
|
|
127
|
+
export async function peekGitHubMarketplace(
|
|
128
|
+
source: GitHubTreeSource,
|
|
129
|
+
fetchImpl: typeof globalThis.fetch = globalThis.fetch,
|
|
130
|
+
): Promise<PeekOutcome> {
|
|
131
|
+
for (const location of Object.values(MARKETPLACE_LOCATIONS)) {
|
|
132
|
+
const bytes = await fetchRawFile(source, location, fetchImpl);
|
|
133
|
+
if (bytes === undefined) continue;
|
|
134
|
+
const outcome = readMarketplaceFile(
|
|
135
|
+
inMemoryPluginFiles(new Map([[location, bytes]])),
|
|
136
|
+
);
|
|
137
|
+
if (!outcome.ok) {
|
|
138
|
+
return {
|
|
139
|
+
ok: false,
|
|
140
|
+
kind: "refused",
|
|
141
|
+
location,
|
|
142
|
+
errors: outcome.errors,
|
|
143
|
+
warnings: outcome.warnings,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
ok: true,
|
|
148
|
+
peeked: {
|
|
149
|
+
marketplace: outcome.marketplace,
|
|
150
|
+
warnings: outcome.warnings,
|
|
151
|
+
location,
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
return { ok: false, kind: "not-a-marketplace" };
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/** One raw file, or `undefined` when the path does not exist at the ref. */
|
|
159
|
+
async function fetchRawFile(
|
|
160
|
+
source: GitHubTreeSource,
|
|
161
|
+
path: string,
|
|
162
|
+
fetchImpl: typeof globalThis.fetch,
|
|
163
|
+
): Promise<Uint8Array | undefined> {
|
|
164
|
+
const url = rawFileUrl(source, path);
|
|
165
|
+
let response: Response;
|
|
166
|
+
try {
|
|
167
|
+
response = await fetchImpl(url, { redirect: "follow" });
|
|
168
|
+
} catch (error) {
|
|
169
|
+
throw new CliExitError(
|
|
170
|
+
`could not reach GitHub for ${source.repo}`,
|
|
171
|
+
ExitCode.Connection,
|
|
172
|
+
[
|
|
173
|
+
`URL: ${url}`,
|
|
174
|
+
"Check the network connection and retry.",
|
|
175
|
+
error instanceof Error ? error.message : String(error),
|
|
176
|
+
],
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
if (response.status === 404) return undefined;
|
|
180
|
+
if (!response.ok) {
|
|
181
|
+
throw new CliExitError(
|
|
182
|
+
`GitHub answered ${response.status} for ${source.repo}`,
|
|
183
|
+
ExitCode.Connection,
|
|
184
|
+
[`URL: ${url}`, "Retry; if it persists, the repository or GitHub is unavailable."],
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Download the zipball and extract it into `destDir` with the zipball's
|
|
192
|
+
* single top-level directory (`<repo>-<ref>/`) stripped, so `destDir` IS the
|
|
193
|
+
* repository root. Throws a `CliExitError` naming what refused: the
|
|
194
|
+
* repository, a cap, or an entry that would escape the directory.
|
|
195
|
+
*/
|
|
196
|
+
export async function fetchGitHubTree(
|
|
197
|
+
source: GitHubTreeSource,
|
|
198
|
+
options: FetchGitHubTreeOptions,
|
|
199
|
+
): Promise<void> {
|
|
200
|
+
const bytes = await download(source, options.fetchImpl ?? globalThis.fetch);
|
|
201
|
+
const entries = inspect(bytes, source);
|
|
202
|
+
|
|
203
|
+
mkdirSync(options.destDir, { recursive: true });
|
|
204
|
+
for (const entry of entries) {
|
|
205
|
+
const content = inflate(entry, source);
|
|
206
|
+
const target = join(options.destDir, ...entry.relative.split("/"));
|
|
207
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
208
|
+
writeFileSync(target, content);
|
|
209
|
+
}
|
|
210
|
+
log.debug("github tree extracted", {
|
|
211
|
+
repo: source.repo,
|
|
212
|
+
ref: source.ref ?? DEFAULT_REF,
|
|
213
|
+
files: entries.length,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* One entry's bytes, inflated under its declared size as the output cap
|
|
219
|
+
* and checked against its CRC. An entry that inflates past what it declared
|
|
220
|
+
* lied about its budget; one whose bytes do not match its CRC is corrupt or
|
|
221
|
+
* tampered; a method neither the server nor Go registers is not opened.
|
|
222
|
+
*/
|
|
223
|
+
function inflate(entry: PlannedEntry, source: GitHubTreeSource): Uint8Array {
|
|
224
|
+
let content: Uint8Array;
|
|
225
|
+
switch (entry.zip.compressionMethod) {
|
|
226
|
+
case METHOD_STORED:
|
|
227
|
+
content = entry.zip.compressedData;
|
|
228
|
+
break;
|
|
229
|
+
case METHOD_DEFLATED:
|
|
230
|
+
try {
|
|
231
|
+
content = new Uint8Array(
|
|
232
|
+
inflateRawSync(entry.zip.compressedData, {
|
|
233
|
+
maxOutputLength: entry.declaredSize + 1,
|
|
234
|
+
}),
|
|
235
|
+
);
|
|
236
|
+
} catch (error) {
|
|
237
|
+
if (isOutputLengthError(error)) {
|
|
238
|
+
throw refusal(
|
|
239
|
+
source,
|
|
240
|
+
`entry '${entry.relative}' inflated past its declared size`,
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
throw refusal(
|
|
244
|
+
source,
|
|
245
|
+
`entry '${entry.relative}' could not be inflated (${error instanceof Error ? error.message : String(error)})`,
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
break;
|
|
249
|
+
default:
|
|
250
|
+
throw refusal(
|
|
251
|
+
source,
|
|
252
|
+
`entry '${entry.relative}' uses compression method ${entry.zip.compressionMethod}, which is not supported`,
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
if (content.length > entry.declaredSize) {
|
|
256
|
+
throw refusal(
|
|
257
|
+
source,
|
|
258
|
+
`entry '${entry.relative}' inflated past its declared size`,
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
if (crc32(content) !== entry.zip.crc32) {
|
|
262
|
+
throw refusal(source, `entry '${entry.relative}' failed its checksum`);
|
|
263
|
+
}
|
|
264
|
+
return content;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
async function download(
|
|
268
|
+
source: GitHubTreeSource,
|
|
269
|
+
fetchImpl: typeof globalThis.fetch,
|
|
270
|
+
): Promise<Uint8Array> {
|
|
271
|
+
const url = zipballUrl(source);
|
|
272
|
+
let response: Response;
|
|
273
|
+
try {
|
|
274
|
+
response = await fetchImpl(url, { redirect: "follow" });
|
|
275
|
+
} catch (error) {
|
|
276
|
+
throw new CliExitError(
|
|
277
|
+
`could not reach GitHub for ${source.repo}`,
|
|
278
|
+
ExitCode.Connection,
|
|
279
|
+
[
|
|
280
|
+
`URL: ${url}`,
|
|
281
|
+
"Check the network connection and retry.",
|
|
282
|
+
error instanceof Error ? error.message : String(error),
|
|
283
|
+
],
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
if (response.status === 404) {
|
|
287
|
+
throw new CliExitError(
|
|
288
|
+
`GitHub has no public repository '${source.repo}'${source.ref === undefined ? "" : ` at ref '${source.ref}'`}`,
|
|
289
|
+
ExitCode.NotFound,
|
|
290
|
+
[
|
|
291
|
+
"Check the owner, the repository name and the ref.",
|
|
292
|
+
"Private repositories are not supported; a marketplace is public content.",
|
|
293
|
+
],
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
if (!response.ok) {
|
|
297
|
+
throw new CliExitError(
|
|
298
|
+
`GitHub answered ${response.status} for ${source.repo}`,
|
|
299
|
+
ExitCode.General,
|
|
300
|
+
[`URL: ${url}`],
|
|
301
|
+
);
|
|
302
|
+
}
|
|
303
|
+
const declaredLength = Number(response.headers.get("content-length") ?? "0");
|
|
304
|
+
if (declaredLength > GITHUB_ZIPBALL_LIMITS.downloadBytes) {
|
|
305
|
+
throw refusal(
|
|
306
|
+
source,
|
|
307
|
+
`the archive is ${mib(declaredLength)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.downloadBytes)} download cap`,
|
|
308
|
+
);
|
|
309
|
+
}
|
|
310
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
311
|
+
if (bytes.length > GITHUB_ZIPBALL_LIMITS.downloadBytes) {
|
|
312
|
+
throw refusal(
|
|
313
|
+
source,
|
|
314
|
+
`the archive is ${mib(bytes.length)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.downloadBytes)} download cap`,
|
|
315
|
+
);
|
|
316
|
+
}
|
|
317
|
+
return bytes;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
// node:zlib's maxOutputLength violation: the output-cap arm.
|
|
321
|
+
function isOutputLengthError(error: unknown): boolean {
|
|
322
|
+
return (
|
|
323
|
+
error instanceof Error &&
|
|
324
|
+
(("code" in error &&
|
|
325
|
+
(error as { code?: string }).code === "ERR_BUFFER_TOO_LARGE") ||
|
|
326
|
+
error.message.includes("maxOutputLength"))
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** One file the archive will yield: where it lands, how large it said it is, and its record. */
|
|
331
|
+
interface PlannedEntry {
|
|
332
|
+
/** Repository-relative path, the zipball's top directory stripped. */
|
|
333
|
+
readonly relative: string;
|
|
334
|
+
/** The central directory's uncompressed size, the inflate budget. */
|
|
335
|
+
readonly declaredSize: number;
|
|
336
|
+
readonly zip: ZipStructuralEntry;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* The files to extract, in archive order, decided from the central directory
|
|
341
|
+
* alone. Refuses the caps, an entry outside the one top directory, and a
|
|
342
|
+
* path that would escape the destination.
|
|
343
|
+
*/
|
|
344
|
+
function inspect(bytes: Uint8Array, source: GitHubTreeSource): PlannedEntry[] {
|
|
345
|
+
let structure;
|
|
346
|
+
try {
|
|
347
|
+
structure = parseZipStructure(bytes);
|
|
348
|
+
} catch (error) {
|
|
349
|
+
throw refusal(
|
|
350
|
+
source,
|
|
351
|
+
`the archive is not a readable zip (${error instanceof Error ? error.message : String(error)})`,
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
if (structure.length > GITHUB_ZIPBALL_LIMITS.entries) {
|
|
355
|
+
throw refusal(
|
|
356
|
+
source,
|
|
357
|
+
`the archive lists ${structure.length} entries, over the ${GITHUB_ZIPBALL_LIMITS.entries} cap`,
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
let inflated = 0;
|
|
361
|
+
for (const entry of structure) inflated += entry.uncompressedSize;
|
|
362
|
+
if (inflated > GITHUB_ZIPBALL_LIMITS.inflatedBytes) {
|
|
363
|
+
throw refusal(
|
|
364
|
+
source,
|
|
365
|
+
`the archive inflates to ${mib(inflated)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.inflatedBytes)} cap`,
|
|
366
|
+
);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
const entries: PlannedEntry[] = [];
|
|
370
|
+
let top: string | undefined;
|
|
371
|
+
for (const entry of structure) {
|
|
372
|
+
const slash = entry.name.indexOf("/");
|
|
373
|
+
const head = slash === -1 ? entry.name : entry.name.slice(0, slash);
|
|
374
|
+
if (top === undefined) top = head;
|
|
375
|
+
if (head !== top) {
|
|
376
|
+
throw refusal(
|
|
377
|
+
source,
|
|
378
|
+
`the archive holds more than one top-level directory ('${top}' and '${head}')`,
|
|
379
|
+
);
|
|
380
|
+
}
|
|
381
|
+
const relative =
|
|
382
|
+
slash === -1 ? "" : entry.name.slice(slash + 1).replace(/\/+$/, "");
|
|
383
|
+
if (relative === "") continue; // the top directory itself
|
|
384
|
+
if (!isContainedPath(relative)) {
|
|
385
|
+
throw refusal(
|
|
386
|
+
source,
|
|
387
|
+
`entry '${entry.name}' would escape the destination directory`,
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
if (entry.isDirectory) continue;
|
|
391
|
+
entries.push({
|
|
392
|
+
relative,
|
|
393
|
+
declaredSize: entry.uncompressedSize,
|
|
394
|
+
zip: entry,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
return entries;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
function refusal(source: GitHubTreeSource, reason: string): CliExitError {
|
|
401
|
+
return new CliExitError(
|
|
402
|
+
`cannot read ${source.repo} as a marketplace: ${reason}`,
|
|
403
|
+
ExitCode.Usage,
|
|
404
|
+
["A marketplace is a repository tree with a marketplace file at its root."],
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
function mib(bytes: number): string {
|
|
409
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MiB`;
|
|
410
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Public surface of the marketplace module: the sources a CLI knows, the two
|
|
2
|
+
// grammars a user types, one way to get a tree on disk, one way to read it,
|
|
3
|
+
// one way to turn an entry into a push, and the two renderers. Commands
|
|
4
|
+
// lazy-import this barrel inside their actions so `--help` stays fast.
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
OFFICIAL_MARKETPLACE,
|
|
8
|
+
OFFICIAL_MARKETPLACE_NAME,
|
|
9
|
+
type KnownMarketplace,
|
|
10
|
+
type MarketplaceListing,
|
|
11
|
+
type MarketplaceSource,
|
|
12
|
+
type UnreadableMarketplace,
|
|
13
|
+
addMarketplace,
|
|
14
|
+
describeSource,
|
|
15
|
+
findMarketplace,
|
|
16
|
+
listMarketplaces,
|
|
17
|
+
removeMarketplace,
|
|
18
|
+
} from "./config.js";
|
|
19
|
+
export {
|
|
20
|
+
type LocatedEntry,
|
|
21
|
+
assertVersion,
|
|
22
|
+
locateEntry,
|
|
23
|
+
prepareEntry,
|
|
24
|
+
} from "./install.js";
|
|
25
|
+
export {
|
|
26
|
+
type OpenMarketplace,
|
|
27
|
+
type OpenMarketplaceOptions,
|
|
28
|
+
openMarketplace,
|
|
29
|
+
withMarketplace,
|
|
30
|
+
} from "./materialize.js";
|
|
31
|
+
export {
|
|
32
|
+
type OfficialMarketplaceDir,
|
|
33
|
+
type ResolveOfficialOptions,
|
|
34
|
+
resolveOfficialMarketplace,
|
|
35
|
+
} from "./official.js";
|
|
36
|
+
export {
|
|
37
|
+
type ReadMarketplaceTree,
|
|
38
|
+
entryDirectory,
|
|
39
|
+
findEntry,
|
|
40
|
+
marketplaceRefusal,
|
|
41
|
+
readMarketplaceTree,
|
|
42
|
+
} from "./read.js";
|
|
43
|
+
export {
|
|
44
|
+
type InstallRef,
|
|
45
|
+
formatInstallRef,
|
|
46
|
+
parseAddSource,
|
|
47
|
+
parseInstallRef,
|
|
48
|
+
} from "./ref.js";
|
|
49
|
+
export {
|
|
50
|
+
type ShownEntry,
|
|
51
|
+
inspectEntries,
|
|
52
|
+
renderMarketplaceList,
|
|
53
|
+
renderMarketplaceShow,
|
|
54
|
+
} from "./render.js";
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
// An entry of an open marketplace becomes a prepared push. This is the one
|
|
2
|
+
// place that happens, for both callers: `stigmer install <ref>` and the
|
|
3
|
+
// `stigmer up` default-set step. Neither re-derives the entry's directory or
|
|
4
|
+
// the archive's digest; both hand the prepared value to `pushPrepared` (or,
|
|
5
|
+
// for `up`, compare its digest first). The entry's directory goes through the
|
|
6
|
+
// same walker `push plugin <dir>` uses, so a marketplace install and a push
|
|
7
|
+
// of the same checked-out folder yield one digest for one tree.
|
|
8
|
+
|
|
9
|
+
import { type MarketplaceEntry } from "@stigmer/plugin-package";
|
|
10
|
+
import { UsageError } from "../errors/index.js";
|
|
11
|
+
import {
|
|
12
|
+
type PreparedPluginPush,
|
|
13
|
+
preparePluginPush,
|
|
14
|
+
} from "../resources/plugin.js";
|
|
15
|
+
import {
|
|
16
|
+
type KnownMarketplace,
|
|
17
|
+
type MarketplaceListing,
|
|
18
|
+
describeSource,
|
|
19
|
+
} from "./config.js";
|
|
20
|
+
import {
|
|
21
|
+
type OpenMarketplace,
|
|
22
|
+
type OpenMarketplaceOptions,
|
|
23
|
+
openMarketplace,
|
|
24
|
+
} from "./materialize.js";
|
|
25
|
+
import { peekGitHubMarketplace } from "./github.js";
|
|
26
|
+
import {
|
|
27
|
+
type ReadMarketplaceTree,
|
|
28
|
+
entryDirectory,
|
|
29
|
+
findEntry,
|
|
30
|
+
marketplaceRefusal,
|
|
31
|
+
readMarketplaceTree,
|
|
32
|
+
} from "./read.js";
|
|
33
|
+
import { type InstallRef, formatInstallRef } from "./ref.js";
|
|
34
|
+
|
|
35
|
+
/** A ref resolved to the one marketplace that offers it, with that marketplace open on disk. */
|
|
36
|
+
export interface LocatedEntry {
|
|
37
|
+
readonly marketplace: KnownMarketplace;
|
|
38
|
+
readonly open: OpenMarketplace;
|
|
39
|
+
readonly tree: ReadMarketplaceTree;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Find the source a ref names. A prefixed ref names it outright; a bare
|
|
44
|
+
* name is searched across every known source in listing order (the official
|
|
45
|
+
* one first), and exactly one must offer it: none refuses toward
|
|
46
|
+
* `marketplace show`, more than one refuses by naming each holder, because
|
|
47
|
+
* "the first one wins" would make the answer depend on the order the user
|
|
48
|
+
* added sources in. The caller owns `open` and disposes it.
|
|
49
|
+
*
|
|
50
|
+
* The search is cheap by design: a GitHub source is asked through its
|
|
51
|
+
* marketplace file alone (`peekGitHubMarketplace`, a few KB), and only the
|
|
52
|
+
* one source that declares the name is opened as a tree and read whole,
|
|
53
|
+
* which is where "declared" becomes "offered" or the install refuses. With
|
|
54
|
+
* the vendors' catalogues built in, the alternative was three zipballs per
|
|
55
|
+
* bare install.
|
|
56
|
+
*/
|
|
57
|
+
export async function locateEntry(
|
|
58
|
+
ref: InstallRef,
|
|
59
|
+
listing: MarketplaceListing,
|
|
60
|
+
options: OpenMarketplaceOptions = {},
|
|
61
|
+
): Promise<LocatedEntry> {
|
|
62
|
+
if (ref.marketplace !== undefined) {
|
|
63
|
+
const marketplace = listing.known.find(
|
|
64
|
+
(known) => known.name === ref.marketplace,
|
|
65
|
+
);
|
|
66
|
+
if (marketplace === undefined) {
|
|
67
|
+
throw new UsageError(
|
|
68
|
+
`no marketplace named '${ref.marketplace}' is configured\n\n` +
|
|
69
|
+
"Run 'stigmer marketplace list' to see the configured names, or add one with 'stigmer marketplace add <source>'.",
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
const open = await openMarketplace(marketplace.source, options);
|
|
73
|
+
try {
|
|
74
|
+
const tree = readMarketplaceTree(
|
|
75
|
+
open.root,
|
|
76
|
+
describeSource(marketplace.source),
|
|
77
|
+
);
|
|
78
|
+
if (findEntry(tree.marketplace, ref.name) === undefined)
|
|
79
|
+
throw entryNotOffered(tree, ref.name);
|
|
80
|
+
return { marketplace, open, tree };
|
|
81
|
+
} catch (error) {
|
|
82
|
+
open.dispose();
|
|
83
|
+
throw error;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const holders: LocatedEntry[] = [];
|
|
88
|
+
for (const marketplace of listing.known) {
|
|
89
|
+
let located: LocatedEntry | undefined;
|
|
90
|
+
try {
|
|
91
|
+
located = await locateIn(marketplace, ref.name, options);
|
|
92
|
+
} catch (error) {
|
|
93
|
+
for (const holder of holders) holder.open.dispose();
|
|
94
|
+
throw error;
|
|
95
|
+
}
|
|
96
|
+
if (located !== undefined) holders.push(located);
|
|
97
|
+
}
|
|
98
|
+
if (holders.length === 1) return holders[0]!;
|
|
99
|
+
for (const holder of holders) holder.open.dispose();
|
|
100
|
+
if (holders.length === 0) {
|
|
101
|
+
const skipped =
|
|
102
|
+
listing.unreadable.length === 0
|
|
103
|
+
? ""
|
|
104
|
+
: ` Not searched, because its entry cannot be read: ${listing.unreadable.map((entry) => entry.name).join(", ")} (see 'stigmer marketplace list').`;
|
|
105
|
+
throw new UsageError(
|
|
106
|
+
`no configured marketplace offers a plugin named '${ref.name}'\n\n` +
|
|
107
|
+
`Searched: ${listing.known.map((known) => known.name).join(", ")}.${skipped} ` +
|
|
108
|
+
"Run 'stigmer marketplace show <name>' to see what each offers, or add the marketplace that has it.",
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
throw new UsageError(
|
|
112
|
+
`'${ref.name}' is offered by more than one marketplace: ${holders.map((holder) => holder.marketplace.name).join(", ")}\n\n` +
|
|
113
|
+
`Name the one you mean: ${holders.map((holder) => formatInstallRef({ ...ref, marketplace: holder.marketplace.name })).join(" or ")}.`,
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The entry called `name` in one source, opened and read, or `undefined`
|
|
119
|
+
* when the source does not offer it. A GitHub source is first asked through
|
|
120
|
+
* its marketplace file alone (a few KB); its zipball is downloaded only when
|
|
121
|
+
* the file declares the name, and the tree read then decides whether it is
|
|
122
|
+
* held. A local or official tree is on disk and is read once. A GitHub
|
|
123
|
+
* repository with no marketplace file declares nothing (a built-in whose
|
|
124
|
+
* vendor moved the file must not break every bare install); one whose file
|
|
125
|
+
* the library refuses is a real fault and is said so.
|
|
126
|
+
*/
|
|
127
|
+
async function locateIn(
|
|
128
|
+
marketplace: KnownMarketplace,
|
|
129
|
+
name: string,
|
|
130
|
+
options: OpenMarketplaceOptions,
|
|
131
|
+
): Promise<LocatedEntry | undefined> {
|
|
132
|
+
if (marketplace.source.type === "github") {
|
|
133
|
+
const peek = await peekGitHubMarketplace(
|
|
134
|
+
marketplace.source,
|
|
135
|
+
options.fetchImpl,
|
|
136
|
+
);
|
|
137
|
+
if (!peek.ok) {
|
|
138
|
+
switch (peek.kind) {
|
|
139
|
+
case "not-a-marketplace":
|
|
140
|
+
return undefined;
|
|
141
|
+
case "refused":
|
|
142
|
+
throw marketplaceRefusal(
|
|
143
|
+
`${describeSource(marketplace.source)} (${peek.location})`,
|
|
144
|
+
peek.errors,
|
|
145
|
+
peek.warnings,
|
|
146
|
+
);
|
|
147
|
+
default: {
|
|
148
|
+
const exhaustive: never = peek;
|
|
149
|
+
return exhaustive;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (findEntry(peek.peeked.marketplace, name) === undefined) return undefined;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const open = await openMarketplace(marketplace.source, options);
|
|
157
|
+
try {
|
|
158
|
+
const tree = readMarketplaceTree(open.root, describeSource(marketplace.source));
|
|
159
|
+
if (findEntry(tree.marketplace, name) === undefined) {
|
|
160
|
+
// Declared by a file but not held by the tree, or simply absent: not a
|
|
161
|
+
// holder. The not-found sentence names every source searched.
|
|
162
|
+
open.dispose();
|
|
163
|
+
return undefined;
|
|
164
|
+
}
|
|
165
|
+
return { marketplace, open, tree };
|
|
166
|
+
} catch (error) {
|
|
167
|
+
open.dispose();
|
|
168
|
+
throw error;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** Read, validate and zip the entry called `name`; refuses an entry the marketplace does not offer. */
|
|
173
|
+
export async function prepareEntry(
|
|
174
|
+
tree: ReadMarketplaceTree,
|
|
175
|
+
name: string,
|
|
176
|
+
): Promise<PreparedPluginPush> {
|
|
177
|
+
const entry = findEntry(tree.marketplace, name);
|
|
178
|
+
if (entry === undefined) throw entryNotOffered(tree, name);
|
|
179
|
+
return preparePluginPush(entryDirectory(tree, entry));
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* `@version` in a ref is an assertion, not a selector: a marketplace tree
|
|
184
|
+
* holds one version of each plugin, so the ref either names it or is wrong.
|
|
185
|
+
*/
|
|
186
|
+
export function assertVersion(
|
|
187
|
+
prepared: PreparedPluginPush,
|
|
188
|
+
wanted: string | undefined,
|
|
189
|
+
ref: string,
|
|
190
|
+
): void {
|
|
191
|
+
if (wanted === undefined) return;
|
|
192
|
+
const offered = prepared.plugin.version;
|
|
193
|
+
if (offered === wanted) return;
|
|
194
|
+
throw new UsageError(
|
|
195
|
+
offered === undefined
|
|
196
|
+
? `'${ref}' pins version ${wanted}, but the marketplace's '${prepared.plugin.name}' declares no version\n\nInstall it without '@${wanted}'.`
|
|
197
|
+
: `'${ref}' pins version ${wanted}, but the marketplace offers '${prepared.plugin.name}' at ${offered}\n\nInstall it as '${ref.slice(0, ref.lastIndexOf("@"))}@${offered}', or without a version.`,
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function entryNotOffered(tree: ReadMarketplaceTree, name: string): UsageError {
|
|
202
|
+
const dropped = tree.warnings.find((warning) => warning.subject === name);
|
|
203
|
+
const offered = tree.marketplace.plugins.map(
|
|
204
|
+
(entry: MarketplaceEntry) => entry.name,
|
|
205
|
+
);
|
|
206
|
+
const lines = [
|
|
207
|
+
`marketplace '${tree.marketplace.name}' does not offer a plugin named '${name}'`,
|
|
208
|
+
];
|
|
209
|
+
if (dropped !== undefined) lines.push("", dropped.message);
|
|
210
|
+
lines.push(
|
|
211
|
+
"",
|
|
212
|
+
offered.length === 0
|
|
213
|
+
? "It offers no plugins this CLI can install."
|
|
214
|
+
: `Run 'stigmer marketplace show ${tree.marketplace.name}' to see the ${offered.length} it offers.`,
|
|
215
|
+
);
|
|
216
|
+
return new UsageError(lines.join("\n"));
|
|
217
|
+
}
|