@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,179 @@
|
|
|
1
|
+
// The sources a CLI knows: the built-in one (the official catalogue, the same
|
|
2
|
+
// list the console ships) and the ones a user added under the `marketplaces`
|
|
3
|
+
// key of ~/.stigmer/config.yaml.
|
|
4
|
+
//
|
|
5
|
+
// A source is client-side configuration, never a server resource: the
|
|
6
|
+
// server only ever sees the plugin archive a client pushes. That is why the
|
|
7
|
+
// list lives beside the named backends and the context, and why `stigmer
|
|
8
|
+
// marketplace` is a noun group like `config` and `auth`. The built-in is
|
|
9
|
+
// code, not config: it cannot be added over or removed, so `stigmer install
|
|
10
|
+
// assistant` works on a fresh machine and the CLI's list never drifts from
|
|
11
|
+
// the console's. A vendor's public repository is a source the user adds by
|
|
12
|
+
// name (`stigmer marketplace add cursor/plugins`), never one on offer by
|
|
13
|
+
// default: the official catalogue already carries what Stigmer can offer of
|
|
14
|
+
// it, curated (`plugins/README.md`).
|
|
15
|
+
//
|
|
16
|
+
// The config module keeps the on-disk entry loose (`MarketplaceEntryConfig`,
|
|
17
|
+
// every field optional) so a hand-edited entry this CLI cannot read survives
|
|
18
|
+
// the next save; this module is where the entry is narrowed into a
|
|
19
|
+
// `MarketplaceSource` the fetchers act on, and where an unreadable entry
|
|
20
|
+
// becomes a reason `stigmer marketplace list` prints instead of a silent gap.
|
|
21
|
+
import { load as loadConfig, save as saveConfig, } from "../config/index.js";
|
|
22
|
+
import { BUILT_IN_MARKETPLACES, OFFICIAL_MARKETPLACE_NAME, builtInSourceRefusal, describeGitHubSource, isBuiltInMarketplaceName, isOwnerRepo, } from "@stigmer/plugin-package/client";
|
|
23
|
+
import { UsageError } from "../errors/index.js";
|
|
24
|
+
import { isStandalone } from "../runtime.js";
|
|
25
|
+
export { OFFICIAL_MARKETPLACE_NAME, isOwnerRepo };
|
|
26
|
+
export const OFFICIAL_MARKETPLACE = {
|
|
27
|
+
name: OFFICIAL_MARKETPLACE_NAME,
|
|
28
|
+
source: { type: "official" },
|
|
29
|
+
};
|
|
30
|
+
/** The sources every CLI ships with, in listing order; the official one is first. */
|
|
31
|
+
export const BUILT_IN_SOURCES = BUILT_IN_MARKETPLACES.map((entry) => ({
|
|
32
|
+
name: entry.name,
|
|
33
|
+
source: entry.source,
|
|
34
|
+
}));
|
|
35
|
+
/** Every source the CLI knows: the built-ins first, then the config's entries in file order. */
|
|
36
|
+
export function listMarketplaces(config = loadConfig()) {
|
|
37
|
+
const known = [...BUILT_IN_SOURCES];
|
|
38
|
+
const unreadable = [];
|
|
39
|
+
for (const [name, entry] of Object.entries(config.marketplaces ?? {})) {
|
|
40
|
+
// A config may name the built-in (a hand edit, or a file written by a
|
|
41
|
+
// CLI whose built-ins differed); the built-in wins and the entry is left
|
|
42
|
+
// in the file untouched.
|
|
43
|
+
if (isBuiltInMarketplaceName(name))
|
|
44
|
+
continue;
|
|
45
|
+
const narrowed = narrowEntry(entry);
|
|
46
|
+
if (narrowed.ok)
|
|
47
|
+
known.push({ name, source: narrowed.source });
|
|
48
|
+
else
|
|
49
|
+
unreadable.push({ name, reason: narrowed.reason });
|
|
50
|
+
}
|
|
51
|
+
return { known, unreadable };
|
|
52
|
+
}
|
|
53
|
+
/** The marketplace called `name`, or `undefined`; an unreadable entry refuses with its reason. */
|
|
54
|
+
export function findMarketplace(name, config = loadConfig()) {
|
|
55
|
+
const listing = listMarketplaces(config);
|
|
56
|
+
const known = listing.known.find((marketplace) => marketplace.name === name);
|
|
57
|
+
if (known !== undefined)
|
|
58
|
+
return known;
|
|
59
|
+
const broken = listing.unreadable.find((marketplace) => marketplace.name === name);
|
|
60
|
+
if (broken !== undefined) {
|
|
61
|
+
throw new UsageError(`marketplace '${name}' is configured but cannot be read: ${broken.reason}\n\n` +
|
|
62
|
+
`Fix the entry under 'marketplaces.${name}' in the config file, or remove it with 'stigmer marketplace remove ${name}'.`);
|
|
63
|
+
}
|
|
64
|
+
return undefined;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Record a marketplace under `name` and save. Refuses the reserved name, a
|
|
68
|
+
* name already taken, and a run under `--standalone` (the config file is
|
|
69
|
+
* ignored there, so there is nothing to add to; saving would write a fresh
|
|
70
|
+
* default file over the user's own).
|
|
71
|
+
*/
|
|
72
|
+
export function addMarketplace(name, source) {
|
|
73
|
+
refuseStandalone("add");
|
|
74
|
+
if (isBuiltInMarketplaceName(name)) {
|
|
75
|
+
throw new UsageError(`${builtInSourceRefusal(name, "add")}\n\n` +
|
|
76
|
+
"Pass --name <other-name> to add this source under a different name.");
|
|
77
|
+
}
|
|
78
|
+
const config = loadConfig();
|
|
79
|
+
if (config.marketplaces?.[name] !== undefined) {
|
|
80
|
+
throw new UsageError(`a marketplace named '${name}' is already configured\n\n` +
|
|
81
|
+
`Remove it first with 'stigmer marketplace remove ${name}', or pass --name <other-name>.`);
|
|
82
|
+
}
|
|
83
|
+
saveConfig({
|
|
84
|
+
...config,
|
|
85
|
+
marketplaces: { ...config.marketplaces, [name]: toEntry(source) },
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/** Remove the marketplace called `name` and save. Refuses the reserved name and an unknown one. */
|
|
89
|
+
export function removeMarketplace(name) {
|
|
90
|
+
refuseStandalone("remove");
|
|
91
|
+
if (isBuiltInMarketplaceName(name)) {
|
|
92
|
+
throw new UsageError(builtInSourceRefusal(name, "remove"));
|
|
93
|
+
}
|
|
94
|
+
const config = loadConfig();
|
|
95
|
+
if (config.marketplaces?.[name] === undefined) {
|
|
96
|
+
throw new UsageError(`no marketplace named '${name}' is configured\n\nRun 'stigmer marketplace list' to see the configured names.`);
|
|
97
|
+
}
|
|
98
|
+
const { [name]: _removed, ...rest } = config.marketplaces;
|
|
99
|
+
saveConfig({
|
|
100
|
+
...config,
|
|
101
|
+
marketplaces: Object.keys(rest).length === 0 ? undefined : rest,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function refuseStandalone(verb) {
|
|
105
|
+
if (isStandalone()) {
|
|
106
|
+
throw new UsageError(`--standalone ignores the config file, so there is no marketplace list to ${verb} to\n\n` +
|
|
107
|
+
"Run without --standalone to change the configured marketplaces.");
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** The loose on-disk entry as a source, or the reason it is not one. */
|
|
111
|
+
export function narrowEntry(entry) {
|
|
112
|
+
switch (entry.type) {
|
|
113
|
+
case "github": {
|
|
114
|
+
if (typeof entry.repo !== "string" || !isOwnerRepo(entry.repo)) {
|
|
115
|
+
return { ok: false, reason: "type 'github' needs 'repo: owner/repo'" };
|
|
116
|
+
}
|
|
117
|
+
if (entry.ref !== undefined &&
|
|
118
|
+
(typeof entry.ref !== "string" || entry.ref === "")) {
|
|
119
|
+
return {
|
|
120
|
+
ok: false,
|
|
121
|
+
reason: "'ref' must be a non-empty branch, tag or commit",
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
ok: true,
|
|
126
|
+
source: {
|
|
127
|
+
type: "github",
|
|
128
|
+
repo: entry.repo,
|
|
129
|
+
...(entry.ref !== undefined && { ref: entry.ref }),
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
case "local": {
|
|
134
|
+
if (typeof entry.path !== "string" || entry.path === "") {
|
|
135
|
+
return { ok: false, reason: "type 'local' needs 'path: <directory>'" };
|
|
136
|
+
}
|
|
137
|
+
return { ok: true, source: { type: "local", path: entry.path } };
|
|
138
|
+
}
|
|
139
|
+
case undefined:
|
|
140
|
+
return { ok: false, reason: "no 'type' (expected 'github' or 'local')" };
|
|
141
|
+
default:
|
|
142
|
+
return {
|
|
143
|
+
ok: false,
|
|
144
|
+
reason: `unknown type '${String(entry.type)}' (expected 'github' or 'local')`,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function toEntry(source) {
|
|
149
|
+
switch (source.type) {
|
|
150
|
+
case "github":
|
|
151
|
+
return {
|
|
152
|
+
type: "github",
|
|
153
|
+
repo: source.repo,
|
|
154
|
+
...(source.ref !== undefined && { ref: source.ref }),
|
|
155
|
+
};
|
|
156
|
+
case "local":
|
|
157
|
+
return { type: "local", path: source.path };
|
|
158
|
+
default: {
|
|
159
|
+
const exhaustive = source;
|
|
160
|
+
return exhaustive;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** One sentence naming where a source comes from, for lists and sentences. */
|
|
165
|
+
export function describeSource(source) {
|
|
166
|
+
switch (source.type) {
|
|
167
|
+
case "official":
|
|
168
|
+
return "built in";
|
|
169
|
+
case "github":
|
|
170
|
+
return describeGitHubSource(source);
|
|
171
|
+
case "local":
|
|
172
|
+
return source.path;
|
|
173
|
+
default: {
|
|
174
|
+
const exhaustive = source;
|
|
175
|
+
return exhaustive;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/marketplace/config.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,4EAA4E;AAC5E,yEAAyE;AACzE,yEAAyE;AACzE,4EAA4E;AAC5E,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,qCAAqC;AACrC,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,mEAAmE;AACnE,yEAAyE;AACzE,8EAA8E;AAE9E,OAAO,EAGL,IAAI,IAAI,UAAU,EAClB,IAAI,IAAI,UAAU,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,oBAAoB,EACpB,wBAAwB,EACxB,WAAW,GACZ,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAE,yBAAyB,EA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I;gBACjB,GAAG,CAAC,MAAM,CAAC,GAAG,KAAK,SAAS,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE,CAAC;aACrD,CAAC;QACJ,KAAK,OAAO;YACV,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9C,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,UAAU,GAAU,MAAM,CAAC;YACjC,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,cAAc,CAAC,MAAyB;IACtD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAC;QACtC,KAAK,OAAO;YACV,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,UAAU,GAAU,MAAM,CAAC;YACjC,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { type Marketplace, type MarketplaceFinding } from "@stigmer/plugin-package";
|
|
2
|
+
/** The caps a repository zipball must fit under; each refusal names the one it hit. */
|
|
3
|
+
export declare const GITHUB_ZIPBALL_LIMITS: {
|
|
4
|
+
/** The compressed archive as downloaded. */
|
|
5
|
+
readonly downloadBytes: number;
|
|
6
|
+
/** The sum of every entry's declared uncompressed size. */
|
|
7
|
+
readonly inflatedBytes: number;
|
|
8
|
+
/** Files and directories the central directory lists. */
|
|
9
|
+
readonly entries: 20000;
|
|
10
|
+
};
|
|
11
|
+
export interface GitHubTreeSource {
|
|
12
|
+
/** `owner/repo`. */
|
|
13
|
+
readonly repo: string;
|
|
14
|
+
/** Branch, tag or commit; the default branch when absent. */
|
|
15
|
+
readonly ref?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface FetchGitHubTreeOptions {
|
|
18
|
+
/** Where the tree is written; created if missing. The caller owns its lifetime. */
|
|
19
|
+
readonly destDir: string;
|
|
20
|
+
/** The HTTP client (injectable for tests). */
|
|
21
|
+
readonly fetchImpl?: typeof globalThis.fetch;
|
|
22
|
+
}
|
|
23
|
+
/** The URL codeload answers with the zipball of `ref` (no API, no token). */
|
|
24
|
+
export declare function zipballUrl(source: GitHubTreeSource): string;
|
|
25
|
+
/** The URL raw.githubusercontent.com serves `path` from at `ref` (no API, no token). */
|
|
26
|
+
export declare function rawFileUrl(source: GitHubTreeSource, path: string): string;
|
|
27
|
+
/** What a peek learned: the file as declared, and where it sat. */
|
|
28
|
+
export interface PeekedMarketplace {
|
|
29
|
+
readonly marketplace: Marketplace;
|
|
30
|
+
readonly warnings: readonly MarketplaceFinding[];
|
|
31
|
+
/** The marketplace file's path in the tree, the first present in the library's precedence. */
|
|
32
|
+
readonly location: string;
|
|
33
|
+
}
|
|
34
|
+
export type PeekOutcome = {
|
|
35
|
+
readonly ok: true;
|
|
36
|
+
readonly peeked: PeekedMarketplace;
|
|
37
|
+
}
|
|
38
|
+
/** No marketplace file at any of the four locations: the repository is not a marketplace. */
|
|
39
|
+
| {
|
|
40
|
+
readonly ok: false;
|
|
41
|
+
readonly kind: "not-a-marketplace";
|
|
42
|
+
}
|
|
43
|
+
/** A file was found and the library refused it; its sentences travel. */
|
|
44
|
+
| {
|
|
45
|
+
readonly ok: false;
|
|
46
|
+
readonly kind: "refused";
|
|
47
|
+
readonly location: string;
|
|
48
|
+
readonly errors: readonly MarketplaceFinding[];
|
|
49
|
+
readonly warnings: readonly MarketplaceFinding[];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Read only the marketplace file of a GitHub source. The four locations are
|
|
53
|
+
* tried in the library's precedence and the first that exists is read as
|
|
54
|
+
* declared (`readMarketplaceFile`: the tree is not consulted). Network and
|
|
55
|
+
* server faults throw a `CliExitError` naming the repository, as the
|
|
56
|
+
* zipball download does; a 404 at every location is the `not-a-marketplace`
|
|
57
|
+
* outcome, not an error, because a bare-name search must say which sources
|
|
58
|
+
* it looked at and move on.
|
|
59
|
+
*/
|
|
60
|
+
export declare function peekGitHubMarketplace(source: GitHubTreeSource, fetchImpl?: typeof globalThis.fetch): Promise<PeekOutcome>;
|
|
61
|
+
/**
|
|
62
|
+
* Download the zipball and extract it into `destDir` with the zipball's
|
|
63
|
+
* single top-level directory (`<repo>-<ref>/`) stripped, so `destDir` IS the
|
|
64
|
+
* repository root. Throws a `CliExitError` naming what refused: the
|
|
65
|
+
* repository, a cap, or an entry that would escape the directory.
|
|
66
|
+
*/
|
|
67
|
+
export declare function fetchGitHubTree(source: GitHubTreeSource, options: FetchGitHubTreeOptions): Promise<void>;
|
|
68
|
+
//# sourceMappingURL=github.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.d.ts","sourceRoot":"","sources":["../src/marketplace/github.ts"],"names":[],"mappings":"AAsCA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,kBAAkB,EAIxB,MAAM,yBAAyB,CAAC;AAcjC,uFAAuF;AACvF,eAAO,MAAM,qBAAqB;IAChC,4CAA4C;;IAE5C,2DAA2D;;IAE3D,yDAAyD;;CAEjD,CAAC;AAKX,MAAM,WAAW,gBAAgB;IAC/B,oBAAoB;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,6DAA6D;IAC7D,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,sBAAsB;IACrC,mFAAmF;IACnF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAC;CAC9C;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,MAAM,CAE3D;AAED,wFAAwF;AACxF,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzE;AAED,mEAAmE;AACnE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACjD,8FAA8F;IAC9F,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAA;CAAE;AAC3D,6FAA6F;GAC3F;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;CAAE;AAC5D,yEAAyE;GACvE;IACE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,SAAS,kBAAkB,EAAE,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAClD,CAAC;AAEN;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,gBAAgB,EACxB,SAAS,GAAE,OAAO,UAAU,CAAC,KAAwB,GACpD,OAAO,CAAC,WAAW,CAAC,CA0BtB;AAkCD;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -0,0 +1,272 @@
|
|
|
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
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
36
|
+
import { dirname, join } from "node:path";
|
|
37
|
+
import { inflateRawSync } from "node:zlib";
|
|
38
|
+
import { MARKETPLACE_LOCATIONS, inMemoryPluginFiles, isContainedPath, readMarketplaceFile, } from "@stigmer/plugin-package";
|
|
39
|
+
import { crc32, parseZipStructure, } from "@stigmer/zip-structure";
|
|
40
|
+
import { CliExitError } from "../errors/cli-exit-error.js";
|
|
41
|
+
import { ExitCode } from "../errors/exit-codes.js";
|
|
42
|
+
import { log } from "../logger.js";
|
|
43
|
+
/** ZIP compression methods this reader opens, the two the platform's gates register. */
|
|
44
|
+
const METHOD_STORED = 0;
|
|
45
|
+
const METHOD_DEFLATED = 8;
|
|
46
|
+
/** The caps a repository zipball must fit under; each refusal names the one it hit. */
|
|
47
|
+
export const GITHUB_ZIPBALL_LIMITS = {
|
|
48
|
+
/** The compressed archive as downloaded. */
|
|
49
|
+
downloadBytes: 64 * 1024 * 1024,
|
|
50
|
+
/** The sum of every entry's declared uncompressed size. */
|
|
51
|
+
inflatedBytes: 256 * 1024 * 1024,
|
|
52
|
+
/** Files and directories the central directory lists. */
|
|
53
|
+
entries: 20_000,
|
|
54
|
+
};
|
|
55
|
+
/** The ref codeload serves when none is named: the repository's default branch. */
|
|
56
|
+
const DEFAULT_REF = "HEAD";
|
|
57
|
+
/** The URL codeload answers with the zipball of `ref` (no API, no token). */
|
|
58
|
+
export function zipballUrl(source) {
|
|
59
|
+
return `https://codeload.github.com/${source.repo}/zip/${source.ref ?? DEFAULT_REF}`;
|
|
60
|
+
}
|
|
61
|
+
/** The URL raw.githubusercontent.com serves `path` from at `ref` (no API, no token). */
|
|
62
|
+
export function rawFileUrl(source, path) {
|
|
63
|
+
return `https://raw.githubusercontent.com/${source.repo}/${source.ref ?? DEFAULT_REF}/${path}`;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Read only the marketplace file of a GitHub source. The four locations are
|
|
67
|
+
* tried in the library's precedence and the first that exists is read as
|
|
68
|
+
* declared (`readMarketplaceFile`: the tree is not consulted). Network and
|
|
69
|
+
* server faults throw a `CliExitError` naming the repository, as the
|
|
70
|
+
* zipball download does; a 404 at every location is the `not-a-marketplace`
|
|
71
|
+
* outcome, not an error, because a bare-name search must say which sources
|
|
72
|
+
* it looked at and move on.
|
|
73
|
+
*/
|
|
74
|
+
export async function peekGitHubMarketplace(source, fetchImpl = globalThis.fetch) {
|
|
75
|
+
for (const location of Object.values(MARKETPLACE_LOCATIONS)) {
|
|
76
|
+
const bytes = await fetchRawFile(source, location, fetchImpl);
|
|
77
|
+
if (bytes === undefined)
|
|
78
|
+
continue;
|
|
79
|
+
const outcome = readMarketplaceFile(inMemoryPluginFiles(new Map([[location, bytes]])));
|
|
80
|
+
if (!outcome.ok) {
|
|
81
|
+
return {
|
|
82
|
+
ok: false,
|
|
83
|
+
kind: "refused",
|
|
84
|
+
location,
|
|
85
|
+
errors: outcome.errors,
|
|
86
|
+
warnings: outcome.warnings,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
return {
|
|
90
|
+
ok: true,
|
|
91
|
+
peeked: {
|
|
92
|
+
marketplace: outcome.marketplace,
|
|
93
|
+
warnings: outcome.warnings,
|
|
94
|
+
location,
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
return { ok: false, kind: "not-a-marketplace" };
|
|
99
|
+
}
|
|
100
|
+
/** One raw file, or `undefined` when the path does not exist at the ref. */
|
|
101
|
+
async function fetchRawFile(source, path, fetchImpl) {
|
|
102
|
+
const url = rawFileUrl(source, path);
|
|
103
|
+
let response;
|
|
104
|
+
try {
|
|
105
|
+
response = await fetchImpl(url, { redirect: "follow" });
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
throw new CliExitError(`could not reach GitHub for ${source.repo}`, ExitCode.Connection, [
|
|
109
|
+
`URL: ${url}`,
|
|
110
|
+
"Check the network connection and retry.",
|
|
111
|
+
error instanceof Error ? error.message : String(error),
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
114
|
+
if (response.status === 404)
|
|
115
|
+
return undefined;
|
|
116
|
+
if (!response.ok) {
|
|
117
|
+
throw new CliExitError(`GitHub answered ${response.status} for ${source.repo}`, ExitCode.Connection, [`URL: ${url}`, "Retry; if it persists, the repository or GitHub is unavailable."]);
|
|
118
|
+
}
|
|
119
|
+
return new Uint8Array(await response.arrayBuffer());
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Download the zipball and extract it into `destDir` with the zipball's
|
|
123
|
+
* single top-level directory (`<repo>-<ref>/`) stripped, so `destDir` IS the
|
|
124
|
+
* repository root. Throws a `CliExitError` naming what refused: the
|
|
125
|
+
* repository, a cap, or an entry that would escape the directory.
|
|
126
|
+
*/
|
|
127
|
+
export async function fetchGitHubTree(source, options) {
|
|
128
|
+
const bytes = await download(source, options.fetchImpl ?? globalThis.fetch);
|
|
129
|
+
const entries = inspect(bytes, source);
|
|
130
|
+
mkdirSync(options.destDir, { recursive: true });
|
|
131
|
+
for (const entry of entries) {
|
|
132
|
+
const content = inflate(entry, source);
|
|
133
|
+
const target = join(options.destDir, ...entry.relative.split("/"));
|
|
134
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
135
|
+
writeFileSync(target, content);
|
|
136
|
+
}
|
|
137
|
+
log.debug("github tree extracted", {
|
|
138
|
+
repo: source.repo,
|
|
139
|
+
ref: source.ref ?? DEFAULT_REF,
|
|
140
|
+
files: entries.length,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* One entry's bytes, inflated under its declared size as the output cap
|
|
145
|
+
* and checked against its CRC. An entry that inflates past what it declared
|
|
146
|
+
* lied about its budget; one whose bytes do not match its CRC is corrupt or
|
|
147
|
+
* tampered; a method neither the server nor Go registers is not opened.
|
|
148
|
+
*/
|
|
149
|
+
function inflate(entry, source) {
|
|
150
|
+
let content;
|
|
151
|
+
switch (entry.zip.compressionMethod) {
|
|
152
|
+
case METHOD_STORED:
|
|
153
|
+
content = entry.zip.compressedData;
|
|
154
|
+
break;
|
|
155
|
+
case METHOD_DEFLATED:
|
|
156
|
+
try {
|
|
157
|
+
content = new Uint8Array(inflateRawSync(entry.zip.compressedData, {
|
|
158
|
+
maxOutputLength: entry.declaredSize + 1,
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
161
|
+
catch (error) {
|
|
162
|
+
if (isOutputLengthError(error)) {
|
|
163
|
+
throw refusal(source, `entry '${entry.relative}' inflated past its declared size`);
|
|
164
|
+
}
|
|
165
|
+
throw refusal(source, `entry '${entry.relative}' could not be inflated (${error instanceof Error ? error.message : String(error)})`);
|
|
166
|
+
}
|
|
167
|
+
break;
|
|
168
|
+
default:
|
|
169
|
+
throw refusal(source, `entry '${entry.relative}' uses compression method ${entry.zip.compressionMethod}, which is not supported`);
|
|
170
|
+
}
|
|
171
|
+
if (content.length > entry.declaredSize) {
|
|
172
|
+
throw refusal(source, `entry '${entry.relative}' inflated past its declared size`);
|
|
173
|
+
}
|
|
174
|
+
if (crc32(content) !== entry.zip.crc32) {
|
|
175
|
+
throw refusal(source, `entry '${entry.relative}' failed its checksum`);
|
|
176
|
+
}
|
|
177
|
+
return content;
|
|
178
|
+
}
|
|
179
|
+
async function download(source, fetchImpl) {
|
|
180
|
+
const url = zipballUrl(source);
|
|
181
|
+
let response;
|
|
182
|
+
try {
|
|
183
|
+
response = await fetchImpl(url, { redirect: "follow" });
|
|
184
|
+
}
|
|
185
|
+
catch (error) {
|
|
186
|
+
throw new CliExitError(`could not reach GitHub for ${source.repo}`, ExitCode.Connection, [
|
|
187
|
+
`URL: ${url}`,
|
|
188
|
+
"Check the network connection and retry.",
|
|
189
|
+
error instanceof Error ? error.message : String(error),
|
|
190
|
+
]);
|
|
191
|
+
}
|
|
192
|
+
if (response.status === 404) {
|
|
193
|
+
throw new CliExitError(`GitHub has no public repository '${source.repo}'${source.ref === undefined ? "" : ` at ref '${source.ref}'`}`, ExitCode.NotFound, [
|
|
194
|
+
"Check the owner, the repository name and the ref.",
|
|
195
|
+
"Private repositories are not supported; a marketplace is public content.",
|
|
196
|
+
]);
|
|
197
|
+
}
|
|
198
|
+
if (!response.ok) {
|
|
199
|
+
throw new CliExitError(`GitHub answered ${response.status} for ${source.repo}`, ExitCode.General, [`URL: ${url}`]);
|
|
200
|
+
}
|
|
201
|
+
const declaredLength = Number(response.headers.get("content-length") ?? "0");
|
|
202
|
+
if (declaredLength > GITHUB_ZIPBALL_LIMITS.downloadBytes) {
|
|
203
|
+
throw refusal(source, `the archive is ${mib(declaredLength)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.downloadBytes)} download cap`);
|
|
204
|
+
}
|
|
205
|
+
const bytes = new Uint8Array(await response.arrayBuffer());
|
|
206
|
+
if (bytes.length > GITHUB_ZIPBALL_LIMITS.downloadBytes) {
|
|
207
|
+
throw refusal(source, `the archive is ${mib(bytes.length)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.downloadBytes)} download cap`);
|
|
208
|
+
}
|
|
209
|
+
return bytes;
|
|
210
|
+
}
|
|
211
|
+
// node:zlib's maxOutputLength violation: the output-cap arm.
|
|
212
|
+
function isOutputLengthError(error) {
|
|
213
|
+
return (error instanceof Error &&
|
|
214
|
+
(("code" in error &&
|
|
215
|
+
error.code === "ERR_BUFFER_TOO_LARGE") ||
|
|
216
|
+
error.message.includes("maxOutputLength")));
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* The files to extract, in archive order, decided from the central directory
|
|
220
|
+
* alone. Refuses the caps, an entry outside the one top directory, and a
|
|
221
|
+
* path that would escape the destination.
|
|
222
|
+
*/
|
|
223
|
+
function inspect(bytes, source) {
|
|
224
|
+
let structure;
|
|
225
|
+
try {
|
|
226
|
+
structure = parseZipStructure(bytes);
|
|
227
|
+
}
|
|
228
|
+
catch (error) {
|
|
229
|
+
throw refusal(source, `the archive is not a readable zip (${error instanceof Error ? error.message : String(error)})`);
|
|
230
|
+
}
|
|
231
|
+
if (structure.length > GITHUB_ZIPBALL_LIMITS.entries) {
|
|
232
|
+
throw refusal(source, `the archive lists ${structure.length} entries, over the ${GITHUB_ZIPBALL_LIMITS.entries} cap`);
|
|
233
|
+
}
|
|
234
|
+
let inflated = 0;
|
|
235
|
+
for (const entry of structure)
|
|
236
|
+
inflated += entry.uncompressedSize;
|
|
237
|
+
if (inflated > GITHUB_ZIPBALL_LIMITS.inflatedBytes) {
|
|
238
|
+
throw refusal(source, `the archive inflates to ${mib(inflated)}, over the ${mib(GITHUB_ZIPBALL_LIMITS.inflatedBytes)} cap`);
|
|
239
|
+
}
|
|
240
|
+
const entries = [];
|
|
241
|
+
let top;
|
|
242
|
+
for (const entry of structure) {
|
|
243
|
+
const slash = entry.name.indexOf("/");
|
|
244
|
+
const head = slash === -1 ? entry.name : entry.name.slice(0, slash);
|
|
245
|
+
if (top === undefined)
|
|
246
|
+
top = head;
|
|
247
|
+
if (head !== top) {
|
|
248
|
+
throw refusal(source, `the archive holds more than one top-level directory ('${top}' and '${head}')`);
|
|
249
|
+
}
|
|
250
|
+
const relative = slash === -1 ? "" : entry.name.slice(slash + 1).replace(/\/+$/, "");
|
|
251
|
+
if (relative === "")
|
|
252
|
+
continue; // the top directory itself
|
|
253
|
+
if (!isContainedPath(relative)) {
|
|
254
|
+
throw refusal(source, `entry '${entry.name}' would escape the destination directory`);
|
|
255
|
+
}
|
|
256
|
+
if (entry.isDirectory)
|
|
257
|
+
continue;
|
|
258
|
+
entries.push({
|
|
259
|
+
relative,
|
|
260
|
+
declaredSize: entry.uncompressedSize,
|
|
261
|
+
zip: entry,
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
return entries;
|
|
265
|
+
}
|
|
266
|
+
function refusal(source, reason) {
|
|
267
|
+
return new CliExitError(`cannot read ${source.repo} as a marketplace: ${reason}`, ExitCode.Usage, ["A marketplace is a repository tree with a marketplace file at its root."]);
|
|
268
|
+
}
|
|
269
|
+
function mib(bytes) {
|
|
270
|
+
return `${(bytes / (1024 * 1024)).toFixed(1)} MiB`;
|
|
271
|
+
}
|
|
272
|
+
//# sourceMappingURL=github.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github.js","sourceRoot":"","sources":["../src/marketplace/github.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAC5E,yEAAyE;AACzE,oCAAoC;AACpC,EAAE;AACF,2EAA2E;AAC3E,wEAAwE;AACxE,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,2EAA2E;AAC3E,gEAAgE;AAChE,EAAE;AACF,0EAA0E;AAC1E,mEAAmE;AACnE,8EAA8E;AAC9E,wEAAwE;AACxE,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,uEAAuE;AACvE,yEAAyE;AACzE,4EAA4E;AAC5E,0EAA0E;AAC1E,0EAA0E;AAC1E,8DAA8D;AAC9D,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,2EAA2E;AAC3E,2EAA2E;AAC3E,6EAA6E;AAC7E,uEAAuE;AACvE,6EAA6E;AAC7E,4EAA4E;AAE5E,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,qBAAqB,EAGrB,mBAAmB,EACnB,eAAe,EACf,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,EACL,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CA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K,CAAC,IAAI,0CAA0C,CAC/D,CAAC;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,WAAW;YAAE,SAAS;QAChC,OAAO,CAAC,IAAI,CAAC;YACX,QAAQ;YACR,YAAY,EAAE,KAAK,CAAC,gBAAgB;YACpC,GAAG,EAAE,KAAK;SACX,CAAC,CAAC;IACL,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,OAAO,CAAC,MAAwB,EAAE,MAAc;IACvD,OAAO,IAAI,YAAY,CACrB,eAAe,MAAM,CAAC,IAAI,sBAAsB,MAAM,EAAE,EACxD,QAAQ,CAAC,KAAK,EACd,CAAC,yEAAyE,CAAC,CAC5E,CAAC;AACJ,CAAC;AAED,SAAS,GAAG,CAAC,KAAa;IACxB,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { OFFICIAL_MARKETPLACE, OFFICIAL_MARKETPLACE_NAME, type KnownMarketplace, type MarketplaceListing, type MarketplaceSource, type UnreadableMarketplace, addMarketplace, describeSource, findMarketplace, listMarketplaces, removeMarketplace, } from "./config.js";
|
|
2
|
+
export { type LocatedEntry, assertVersion, locateEntry, prepareEntry, } from "./install.js";
|
|
3
|
+
export { type OpenMarketplace, type OpenMarketplaceOptions, openMarketplace, withMarketplace, } from "./materialize.js";
|
|
4
|
+
export { type OfficialMarketplaceDir, type ResolveOfficialOptions, resolveOfficialMarketplace, } from "./official.js";
|
|
5
|
+
export { type ReadMarketplaceTree, entryDirectory, findEntry, marketplaceRefusal, readMarketplaceTree, } from "./read.js";
|
|
6
|
+
export { type InstallRef, formatInstallRef, parseAddSource, parseInstallRef, } from "./ref.js";
|
|
7
|
+
export { type ShownEntry, inspectEntries, renderMarketplaceList, renderMarketplaceShow, } from "./render.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/marketplace/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,YAAY,EACjB,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,eAAe,EACf,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,KAAK,mBAAmB,EACxB,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,KAAK,UAAU,EACf,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,KAAK,UAAU,EACf,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
export { OFFICIAL_MARKETPLACE, OFFICIAL_MARKETPLACE_NAME, addMarketplace, describeSource, findMarketplace, listMarketplaces, removeMarketplace, } from "./config.js";
|
|
6
|
+
export { assertVersion, locateEntry, prepareEntry, } from "./install.js";
|
|
7
|
+
export { openMarketplace, withMarketplace, } from "./materialize.js";
|
|
8
|
+
export { resolveOfficialMarketplace, } from "./official.js";
|
|
9
|
+
export { entryDirectory, findEntry, marketplaceRefusal, readMarketplaceTree, } from "./read.js";
|
|
10
|
+
export { formatInstallRef, parseAddSource, parseInstallRef, } from "./ref.js";
|
|
11
|
+
export { inspectEntries, renderMarketplaceList, renderMarketplaceShow, } from "./render.js";
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/marketplace/index.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,4EAA4E;AAC5E,wEAAwE;AACxE,uEAAuE;AAEvE,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EAKzB,cAAc,EACd,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,aAAa,EACb,WAAW,EACX,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,eAAe,EACf,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAGL,0BAA0B,GAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,cAAc,EACd,SAAS,EACT,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,cAAc,EACd,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { type PreparedPluginPush } from "../resources/plugin.js";
|
|
2
|
+
import { type KnownMarketplace, type MarketplaceListing } from "./config.js";
|
|
3
|
+
import { type OpenMarketplace, type OpenMarketplaceOptions } from "./materialize.js";
|
|
4
|
+
import { type ReadMarketplaceTree } from "./read.js";
|
|
5
|
+
import { type InstallRef } from "./ref.js";
|
|
6
|
+
/** A ref resolved to the one marketplace that offers it, with that marketplace open on disk. */
|
|
7
|
+
export interface LocatedEntry {
|
|
8
|
+
readonly marketplace: KnownMarketplace;
|
|
9
|
+
readonly open: OpenMarketplace;
|
|
10
|
+
readonly tree: ReadMarketplaceTree;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Find the source a ref names. A prefixed ref names it outright; a bare
|
|
14
|
+
* name is searched across every known source in listing order (the official
|
|
15
|
+
* one first), and exactly one must offer it: none refuses toward
|
|
16
|
+
* `marketplace show`, more than one refuses by naming each holder, because
|
|
17
|
+
* "the first one wins" would make the answer depend on the order the user
|
|
18
|
+
* added sources in. The caller owns `open` and disposes it.
|
|
19
|
+
*
|
|
20
|
+
* The search is cheap by design: a GitHub source is asked through its
|
|
21
|
+
* marketplace file alone (`peekGitHubMarketplace`, a few KB), and only the
|
|
22
|
+
* one source that declares the name is opened as a tree and read whole,
|
|
23
|
+
* which is where "declared" becomes "offered" or the install refuses. With
|
|
24
|
+
* the vendors' catalogues built in, the alternative was three zipballs per
|
|
25
|
+
* bare install.
|
|
26
|
+
*/
|
|
27
|
+
export declare function locateEntry(ref: InstallRef, listing: MarketplaceListing, options?: OpenMarketplaceOptions): Promise<LocatedEntry>;
|
|
28
|
+
/** Read, validate and zip the entry called `name`; refuses an entry the marketplace does not offer. */
|
|
29
|
+
export declare function prepareEntry(tree: ReadMarketplaceTree, name: string): Promise<PreparedPluginPush>;
|
|
30
|
+
/**
|
|
31
|
+
* `@version` in a ref is an assertion, not a selector: a marketplace tree
|
|
32
|
+
* holds one version of each plugin, so the ref either names it or is wrong.
|
|
33
|
+
*/
|
|
34
|
+
export declare function assertVersion(prepared: PreparedPluginPush, wanted: string | undefined, ref: string): void;
|
|
35
|
+
//# sourceMappingURL=install.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../src/marketplace/install.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,kBAAkB,EAExB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EAExB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAE5B,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,KAAK,mBAAmB,EAKzB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,UAAU,CAAC;AAE7D,gGAAgG;AAChG,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACvC,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;IAC/B,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;CACpC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,kBAAkB,EAC3B,OAAO,GAAE,sBAA2B,GACnC,OAAO,CAAC,YAAY,CAAC,CAsDvB;AAyDD,uGAAuG;AACvG,wBAAsB,YAAY,CAChC,IAAI,EAAE,mBAAmB,EACzB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,kBAAkB,CAAC,CAI7B;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,kBAAkB,EAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,GAAG,EAAE,MAAM,GACV,IAAI,CASN"}
|