@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,123 @@
|
|
|
1
|
+
import { ApiResourceVisibility } from "@stigmer/apis/ai/stigmer/commons/apiresource/enum_pb";
|
|
2
|
+
import type { Stigmer } from "@stigmer/client";
|
|
3
|
+
import { DETERMINISTIC_ZIP_MTIME } from "@stigmer/plugin-package/client";
|
|
4
|
+
export declare const SKILL_FILE = "SKILL.md";
|
|
5
|
+
export { DETERMINISTIC_ZIP_MTIME };
|
|
6
|
+
export interface IgnoreOptions {
|
|
7
|
+
readonly respectGitignore: boolean;
|
|
8
|
+
readonly extraIgnore: readonly string[];
|
|
9
|
+
readonly extraInclude: readonly string[];
|
|
10
|
+
}
|
|
11
|
+
export interface ZipStats {
|
|
12
|
+
filesIncluded: number;
|
|
13
|
+
filesIgnored: number;
|
|
14
|
+
dirsSkipped: number;
|
|
15
|
+
totalSize: number;
|
|
16
|
+
}
|
|
17
|
+
export interface PushResult {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly skillName: string;
|
|
20
|
+
readonly slug: string;
|
|
21
|
+
readonly versionHash: string;
|
|
22
|
+
readonly tag: string;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
readonly artifactSize: number;
|
|
25
|
+
readonly isNewResource: boolean;
|
|
26
|
+
readonly versionChanged: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* The visibility the SKILL.md declared and that was applied after push, if
|
|
29
|
+
* any. `undefined` means the skill left visibility unspecified and the
|
|
30
|
+
* server-side value was left untouched (push never silently downgrades).
|
|
31
|
+
*/
|
|
32
|
+
readonly visibility?: ApiResourceVisibility;
|
|
33
|
+
}
|
|
34
|
+
export interface DryRunAnalysis {
|
|
35
|
+
readonly stats: ZipStats;
|
|
36
|
+
readonly patternSources: readonly string[];
|
|
37
|
+
readonly sampleIgnored: readonly string[];
|
|
38
|
+
readonly sampleIncluded: readonly string[];
|
|
39
|
+
}
|
|
40
|
+
/** A callback for --verbose ignore-decision lines (INCLUDE/IGNORE/SKIP DIR). */
|
|
41
|
+
export type DecisionSink = (line: string) => void;
|
|
42
|
+
export declare function hasSkillFile(dir: string): boolean;
|
|
43
|
+
interface SkillMetadata {
|
|
44
|
+
readonly name: string;
|
|
45
|
+
/**
|
|
46
|
+
* Declared access level, parsed from the optional `visibility:` frontmatter
|
|
47
|
+
* key. `undefined` when omitted — the skill keeps whatever the server already
|
|
48
|
+
* has (the kind's default for new skills). The level is declared with the
|
|
49
|
+
* skill so a push carries it, rather than a second command after.
|
|
50
|
+
*/
|
|
51
|
+
readonly visibility?: ApiResourceVisibility;
|
|
52
|
+
}
|
|
53
|
+
/** Parse SKILL.md YAML frontmatter and validate the skill name (kebab-case, optionally dot-scoped). */
|
|
54
|
+
export declare function parseSkillMetadata(dir: string): SkillMetadata;
|
|
55
|
+
/**
|
|
56
|
+
* Parse SKILL.md content directly — the shared core behind the directory
|
|
57
|
+
* path (`parseSkillMetadata`) and the pre-packaged archive path
|
|
58
|
+
* (`pushSkillFromArchive`), where the content comes out of a zip entry
|
|
59
|
+
* rather than the filesystem.
|
|
60
|
+
*/
|
|
61
|
+
export declare function parseSkillMetadataContent(content: string): SkillMetadata;
|
|
62
|
+
/**
|
|
63
|
+
* Map an optional `visibility` frontmatter value to the proto enum. Returns
|
|
64
|
+
* undefined when omitted or explicitly unspecified; throws on an unknown value
|
|
65
|
+
* (a typo should fail loudly rather than silently leave a skill private).
|
|
66
|
+
*/
|
|
67
|
+
export declare function parseVisibility(value: unknown, source?: string): ApiResourceVisibility | undefined;
|
|
68
|
+
/** Walk `dir`, filter through the ignore matcher, and zip the survivors. */
|
|
69
|
+
export declare function createSkillZip(dir: string, options: IgnoreOptions, onDecision?: DecisionSink): {
|
|
70
|
+
bytes: Uint8Array;
|
|
71
|
+
stats: ZipStats;
|
|
72
|
+
};
|
|
73
|
+
/** Dry-run: report what would be included/ignored without zipping. */
|
|
74
|
+
export declare function analyzeDryRun(dir: string, options: IgnoreOptions): DryRunAnalysis;
|
|
75
|
+
/** Push a skill from a local directory. Git provenance is auto-detected. */
|
|
76
|
+
export declare function pushSkill(client: Stigmer, dir: string, org: string, tag: string, message: string, options: IgnoreOptions, onDecision?: DecisionSink): Promise<PushResult>;
|
|
77
|
+
export interface RemotePushParams {
|
|
78
|
+
readonly gitUrl: string;
|
|
79
|
+
readonly gitRef: string;
|
|
80
|
+
readonly subdir: string;
|
|
81
|
+
readonly org: string;
|
|
82
|
+
readonly tag: string;
|
|
83
|
+
readonly message: string;
|
|
84
|
+
readonly options: IgnoreOptions;
|
|
85
|
+
}
|
|
86
|
+
/** Push a skill from a directory cloned from a remote git repo (--git-url). */
|
|
87
|
+
export declare function pushSkillFromClone(client: Stigmer, skillDir: string, params: RemotePushParams, onDecision?: DecisionSink): Promise<PushResult>;
|
|
88
|
+
/** A validated pre-packaged skill archive (`--archive`), ready to upload. */
|
|
89
|
+
export interface SkillArchive {
|
|
90
|
+
/** The archive file's exact bytes — uploaded untouched. */
|
|
91
|
+
readonly bytes: Uint8Array;
|
|
92
|
+
/** Metadata parsed from the archive's root SKILL.md. */
|
|
93
|
+
readonly meta: SkillMetadata;
|
|
94
|
+
/** Number of file entries (directory markers excluded). */
|
|
95
|
+
readonly fileCount: number;
|
|
96
|
+
/** Total uncompressed size of all file entries, in bytes. */
|
|
97
|
+
readonly totalSize: number;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Read and validate a pre-packaged skill archive.
|
|
101
|
+
*
|
|
102
|
+
* Client-side validation is deliberately minimal — root SKILL.md present and
|
|
103
|
+
* frontmatter parses (the same contract the console's upload preview checks);
|
|
104
|
+
* the server remains the authoritative validator. The unzip filter inflates
|
|
105
|
+
* ONLY SKILL.md: entry metadata is enough for the count/size summary, and
|
|
106
|
+
* validation must not pay for decompressing a large artifact.
|
|
107
|
+
*/
|
|
108
|
+
export declare function readSkillArchive(archivePath: string): SkillArchive;
|
|
109
|
+
/**
|
|
110
|
+
* Push a pre-packaged skill archive as-is (`--archive`).
|
|
111
|
+
*
|
|
112
|
+
* The bytes are uploaded untouched, so the engine's version hash is the
|
|
113
|
+
* SHA-256 of the file on disk — release pipelines that publish checksums get
|
|
114
|
+
* engine version identities that match them (stigmer/stigmer#671). Git
|
|
115
|
+
* provenance is deliberately omitted: the archive was built elsewhere, so the
|
|
116
|
+
* local checkout says nothing about the artifact's origin.
|
|
117
|
+
*/
|
|
118
|
+
export declare function pushSkillFromArchive(client: Stigmer, archivePath: string, org: string, tag: string, message: string): Promise<PushResult>;
|
|
119
|
+
/** Human-readable byte size (1024-based), matching Go's formatBytes. */
|
|
120
|
+
export declare function formatBytes(bytes: number): string;
|
|
121
|
+
/** Friendly truncated sha256 identifier. */
|
|
122
|
+
export declare function shortHash(hash: string): string;
|
|
123
|
+
//# sourceMappingURL=skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill.d.ts","sourceRoot":"","sources":["../src/resources/skill.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAE7F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAMzE,eAAO,MAAM,UAAU,aAAa,CAAC;AAMrC,OAAO,EAAE,uBAAuB,EAAE,CAAC;AAMnC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1C;AAED,MAAM,WAAW,QAAQ;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,MAAM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CAAC;IAC3B,6DAA6D;IAC7D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,CAmClE;AAED;;;;;;;;GAQG;AACH,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,UAAU,CAAC,CAarB;AAkED,wEAAwE;AACxE,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASjD;AAED,4CAA4C;AAC5C,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAG9C"}
|
|
@@ -0,0 +1,441 @@
|
|
|
1
|
+
// `push skill`: package a skill directory into a ZIP artifact and upload it.
|
|
2
|
+
//
|
|
3
|
+
// The directory must contain a SKILL.md with YAML frontmatter naming the skill.
|
|
4
|
+
// Files are filtered through the gitignore-compatible ignore engine, zipped with
|
|
5
|
+
// fflate, and uploaded inline via the Skill push RPC. Git provenance is
|
|
6
|
+
// auto-detected (local) or recorded from the clone (remote --git-url).
|
|
7
|
+
import { readdirSync, readFileSync, statSync } from "node:fs";
|
|
8
|
+
import { join, relative, resolve } from "node:path";
|
|
9
|
+
import { create } from "@bufbuild/protobuf";
|
|
10
|
+
import { PushSkillRequestSchema } from "@stigmer/apis/ai/stigmer/agentic/skill/v1/io_pb";
|
|
11
|
+
import { GitProvenanceSchema } from "@stigmer/apis/ai/stigmer/agentic/skill/v1/status_pb";
|
|
12
|
+
import { ApiResourceVisibility } from "@stigmer/apis/ai/stigmer/commons/apiresource/enum_pb";
|
|
13
|
+
import { UpdateVisibilityInputSchema } from "@stigmer/apis/ai/stigmer/commons/apiresource/io_pb";
|
|
14
|
+
import { strFromU8, unzipSync, zipSync } from "fflate";
|
|
15
|
+
import { DETERMINISTIC_ZIP_MTIME } from "@stigmer/plugin-package/client";
|
|
16
|
+
import { parse as parseYaml } from "yaml";
|
|
17
|
+
import { UsageError } from "../errors/index.js";
|
|
18
|
+
import { getGitBranchName, getGitCommit, getGitRemoteUrl, getGitRepoRoot } from "./git.js";
|
|
19
|
+
import { createMatcher, REASON_TEXT } from "./ignore/index.js";
|
|
20
|
+
export const SKILL_FILE = "SKILL.md";
|
|
21
|
+
// The one mtime every archive entry carries is the shared module's
|
|
22
|
+
// `DETERMINISTIC_ZIP_MTIME` (stigmer/stigmer#671: fflate would otherwise
|
|
23
|
+
// stamp creation time into every entry and the server's unchanged-content
|
|
24
|
+
// no-op would never fire). Re-exported so the CLI's callers keep one name.
|
|
25
|
+
export { DETERMINISTIC_ZIP_MTIME };
|
|
26
|
+
// Kebab-case, optionally scoped with dot-separated namespaces (e.g.
|
|
27
|
+
// "platform.planton-architecture"). Every segment must be alphanumeric, so no
|
|
28
|
+
// leading/trailing/consecutive separators. The derived slug renders dots as hyphens.
|
|
29
|
+
const SKILL_NAME_RE = /^[a-z0-9]+([.-][a-z0-9]+)*$/;
|
|
30
|
+
function safeReaddir(dir) {
|
|
31
|
+
try {
|
|
32
|
+
return readdirSync(dir, { withFileTypes: true });
|
|
33
|
+
}
|
|
34
|
+
catch {
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export function hasSkillFile(dir) {
|
|
39
|
+
try {
|
|
40
|
+
return statSync(join(dir, SKILL_FILE)).isFile();
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
return false;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/** Parse SKILL.md YAML frontmatter and validate the skill name (kebab-case, optionally dot-scoped). */
|
|
47
|
+
export function parseSkillMetadata(dir) {
|
|
48
|
+
let content;
|
|
49
|
+
try {
|
|
50
|
+
content = readFileSync(join(dir, SKILL_FILE), "utf8");
|
|
51
|
+
}
|
|
52
|
+
catch (err) {
|
|
53
|
+
throw new Error(`failed to read ${SKILL_FILE}: ${err.message}`);
|
|
54
|
+
}
|
|
55
|
+
return parseSkillMetadataContent(content);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Parse SKILL.md content directly — the shared core behind the directory
|
|
59
|
+
* path (`parseSkillMetadata`) and the pre-packaged archive path
|
|
60
|
+
* (`pushSkillFromArchive`), where the content comes out of a zip entry
|
|
61
|
+
* rather than the filesystem.
|
|
62
|
+
*/
|
|
63
|
+
export function parseSkillMetadataContent(content) {
|
|
64
|
+
const frontmatter = extractFrontmatter(content);
|
|
65
|
+
const parsed = (parseYaml(frontmatter) ?? {});
|
|
66
|
+
const name = typeof parsed.name === "string" ? parsed.name : "";
|
|
67
|
+
if (name === "") {
|
|
68
|
+
throw new UsageError(`${SKILL_FILE} is missing required 'name' field in YAML frontmatter\n\n` +
|
|
69
|
+
"Expected format:\n---\nname: my-skill-name\n---\n\n" +
|
|
70
|
+
"The name must be kebab-case (lowercase letters, numbers, and hyphens), " +
|
|
71
|
+
"optionally scoped with dots (e.g. 'platform.my-skill')");
|
|
72
|
+
}
|
|
73
|
+
if (!SKILL_NAME_RE.test(name)) {
|
|
74
|
+
throw new UsageError(`invalid skill name '${name}' in ${SKILL_FILE}\n\n` +
|
|
75
|
+
"Skill names must be kebab-case (a-z, 0-9, hyphens), optionally scoped with\n" +
|
|
76
|
+
"dot-separated namespaces. Every segment must be alphanumeric (no leading,\n" +
|
|
77
|
+
"trailing, or consecutive separators).\n" +
|
|
78
|
+
"Examples: 'calculator', 'web-scraper', 'math-utils', 'platform.planton-architecture'");
|
|
79
|
+
}
|
|
80
|
+
return { name, visibility: parseVisibility(parsed.visibility, SKILL_FILE) };
|
|
81
|
+
}
|
|
82
|
+
// Friendly frontmatter spellings → proto enum. Both the short form (`org`)
|
|
83
|
+
// and the canonical enum name (`visibility_org`) are accepted so authors can
|
|
84
|
+
// copy either from docs or from generated YAML. `unspecified`/empty is treated
|
|
85
|
+
// as "not declared" (returns undefined) so we never emit a no-op update.
|
|
86
|
+
const VISIBILITY_ALIASES = new Map([
|
|
87
|
+
["private", ApiResourceVisibility.visibility_private],
|
|
88
|
+
["visibility_private", ApiResourceVisibility.visibility_private],
|
|
89
|
+
["org", ApiResourceVisibility.visibility_org],
|
|
90
|
+
["visibility_org", ApiResourceVisibility.visibility_org],
|
|
91
|
+
["child-orgs", ApiResourceVisibility.visibility_child_orgs],
|
|
92
|
+
["visibility_child_orgs", ApiResourceVisibility.visibility_child_orgs],
|
|
93
|
+
]);
|
|
94
|
+
/**
|
|
95
|
+
* The spellings of the retired public level. They are refused like any
|
|
96
|
+
* unknown value, with one extra clause: an author who wrote `public` meant
|
|
97
|
+
* something the platform no longer offers, and the error should say so
|
|
98
|
+
* rather than read as a typo.
|
|
99
|
+
*/
|
|
100
|
+
const RETIRED_VISIBILITY_SPELLINGS = new Set(["public", "visibility_public"]);
|
|
101
|
+
const VALID_VISIBILITY_VALUES = "Valid values: private, org, child-orgs.";
|
|
102
|
+
/**
|
|
103
|
+
* Map an optional `visibility` frontmatter value to the proto enum. Returns
|
|
104
|
+
* undefined when omitted or explicitly unspecified; throws on an unknown value
|
|
105
|
+
* (a typo should fail loudly rather than silently leave a skill private).
|
|
106
|
+
*/
|
|
107
|
+
export function parseVisibility(value, source = SKILL_FILE) {
|
|
108
|
+
if (value === undefined || value === null)
|
|
109
|
+
return undefined;
|
|
110
|
+
if (typeof value !== "string") {
|
|
111
|
+
throw new UsageError(`invalid 'visibility' in ${source}: expected a string, got ${typeof value}`);
|
|
112
|
+
}
|
|
113
|
+
const key = value.trim().toLowerCase();
|
|
114
|
+
if (key === "" || key === "unspecified" || key === "api_resource_visibility_unspecified")
|
|
115
|
+
return undefined;
|
|
116
|
+
if (RETIRED_VISIBILITY_SPELLINGS.has(key)) {
|
|
117
|
+
throw new UsageError(`invalid 'visibility' value '${value}' in ${source}: the public level is retired\n\n` +
|
|
118
|
+
"Resources are shared across organizations through plugins, or with an\n" +
|
|
119
|
+
`organization's child organizations through the child-orgs level. ${VALID_VISIBILITY_VALUES}`);
|
|
120
|
+
}
|
|
121
|
+
const mapped = VISIBILITY_ALIASES.get(key);
|
|
122
|
+
if (mapped === undefined) {
|
|
123
|
+
throw new UsageError(`invalid 'visibility' value '${value}' in ${source}\n\n${VALID_VISIBILITY_VALUES}`);
|
|
124
|
+
}
|
|
125
|
+
return mapped;
|
|
126
|
+
}
|
|
127
|
+
function extractFrontmatter(content) {
|
|
128
|
+
const lines = content.split(/\r?\n/);
|
|
129
|
+
if (lines.length === 0 || lines[0].trim() !== "---") {
|
|
130
|
+
throw new UsageError(`${SKILL_FILE} must start with YAML frontmatter (---)`);
|
|
131
|
+
}
|
|
132
|
+
const collected = [];
|
|
133
|
+
let closed = false;
|
|
134
|
+
for (let i = 1; i < lines.length; i++) {
|
|
135
|
+
if (lines[i].trim() === "---") {
|
|
136
|
+
closed = true;
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
collected.push(lines[i]);
|
|
140
|
+
}
|
|
141
|
+
if (!closed)
|
|
142
|
+
throw new UsageError(`${SKILL_FILE} frontmatter is not closed (missing closing ---)`);
|
|
143
|
+
if (collected.length === 0)
|
|
144
|
+
throw new UsageError(`${SKILL_FILE} has empty frontmatter`);
|
|
145
|
+
return collected.join("\n");
|
|
146
|
+
}
|
|
147
|
+
/** Walk `dir`, filter through the ignore matcher, and zip the survivors. */
|
|
148
|
+
export function createSkillZip(dir, options, onDecision) {
|
|
149
|
+
const matcher = createMatcher({
|
|
150
|
+
rootDir: dir,
|
|
151
|
+
respectGitignore: options.respectGitignore,
|
|
152
|
+
includeDefaults: true,
|
|
153
|
+
extraIgnore: options.extraIgnore,
|
|
154
|
+
extraInclude: options.extraInclude,
|
|
155
|
+
});
|
|
156
|
+
const stats = { filesIncluded: 0, filesIgnored: 0, dirsSkipped: 0, totalSize: 0 };
|
|
157
|
+
const files = {};
|
|
158
|
+
const walk = (currentDir, prefix) => {
|
|
159
|
+
const entries = readdirSync(currentDir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
160
|
+
for (const entry of entries) {
|
|
161
|
+
const relPath = prefix === "" ? entry.name : `${prefix}/${entry.name}`;
|
|
162
|
+
const full = join(currentDir, entry.name);
|
|
163
|
+
if (entry.isDirectory()) {
|
|
164
|
+
const result = matcher.matchWithReason(relPath, true);
|
|
165
|
+
if (result.ignored) {
|
|
166
|
+
stats.dirsSkipped++;
|
|
167
|
+
onDecision?.(` SKIP DIR ${relPath}/ (${REASON_TEXT[result.reason]})`);
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
walk(full, relPath);
|
|
171
|
+
continue;
|
|
172
|
+
}
|
|
173
|
+
if (!entry.isFile())
|
|
174
|
+
continue;
|
|
175
|
+
const result = matcher.matchWithReason(relPath, false);
|
|
176
|
+
if (result.ignored) {
|
|
177
|
+
stats.filesIgnored++;
|
|
178
|
+
onDecision?.(` IGNORE ${relPath} (${REASON_TEXT[result.reason]})`);
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
onDecision?.(` INCLUDE ${relPath}`);
|
|
182
|
+
const data = readFileSync(full);
|
|
183
|
+
files[relPath] = new Uint8Array(data);
|
|
184
|
+
stats.filesIncluded++;
|
|
185
|
+
stats.totalSize += data.length;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
walk(dir, "");
|
|
189
|
+
const bytes = zipSync(files, { level: 6, mtime: DETERMINISTIC_ZIP_MTIME });
|
|
190
|
+
return { bytes, stats };
|
|
191
|
+
}
|
|
192
|
+
/** Dry-run: report what would be included/ignored without zipping. */
|
|
193
|
+
export function analyzeDryRun(dir, options) {
|
|
194
|
+
const matcher = createMatcher({
|
|
195
|
+
rootDir: dir,
|
|
196
|
+
respectGitignore: options.respectGitignore,
|
|
197
|
+
includeDefaults: true,
|
|
198
|
+
extraIgnore: options.extraIgnore,
|
|
199
|
+
extraInclude: options.extraInclude,
|
|
200
|
+
});
|
|
201
|
+
const stats = { filesIncluded: 0, filesIgnored: 0, dirsSkipped: 0, totalSize: 0 };
|
|
202
|
+
const sampleIgnored = [];
|
|
203
|
+
const sampleIncluded = [];
|
|
204
|
+
const walk = (currentDir, prefix) => {
|
|
205
|
+
const entries = safeReaddir(currentDir);
|
|
206
|
+
if (entries === undefined)
|
|
207
|
+
return; // Skip unreadable directories gracefully (dry-run is best-effort).
|
|
208
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
209
|
+
const relPath = prefix === "" ? entry.name : `${prefix}/${entry.name}`;
|
|
210
|
+
const full = join(currentDir, entry.name);
|
|
211
|
+
if (entry.isDirectory()) {
|
|
212
|
+
const result = matcher.matchWithReason(relPath, true);
|
|
213
|
+
if (result.ignored) {
|
|
214
|
+
stats.dirsSkipped++;
|
|
215
|
+
if (sampleIgnored.length < 10)
|
|
216
|
+
sampleIgnored.push(`${relPath}/ (${REASON_TEXT[result.reason]})`);
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
walk(full, relPath);
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
if (!entry.isFile())
|
|
223
|
+
continue;
|
|
224
|
+
const result = matcher.matchWithReason(relPath, false);
|
|
225
|
+
if (result.ignored) {
|
|
226
|
+
stats.filesIgnored++;
|
|
227
|
+
if (sampleIgnored.length < 10)
|
|
228
|
+
sampleIgnored.push(`${relPath} (${REASON_TEXT[result.reason]})`);
|
|
229
|
+
}
|
|
230
|
+
else {
|
|
231
|
+
stats.filesIncluded++;
|
|
232
|
+
try {
|
|
233
|
+
stats.totalSize += statSync(full).size;
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// size unknown; ignore
|
|
237
|
+
}
|
|
238
|
+
if (sampleIncluded.length < 10)
|
|
239
|
+
sampleIncluded.push(relPath);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
walk(dir, "");
|
|
244
|
+
const sourceCounts = new Map();
|
|
245
|
+
for (const p of matcher.patterns()) {
|
|
246
|
+
const end = p.indexOf("]");
|
|
247
|
+
if (p.startsWith("[") && end > 0) {
|
|
248
|
+
const source = p.slice(1, end);
|
|
249
|
+
sourceCounts.set(source, (sourceCounts.get(source) ?? 0) + 1);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const patternSources = [...sourceCounts.entries()].map(([source, count]) => `${source} (${count} patterns)`);
|
|
253
|
+
return { stats, patternSources, sampleIgnored, sampleIncluded };
|
|
254
|
+
}
|
|
255
|
+
// Size-routed push (#675) moved down into the SDK (stigmer#701): the
|
|
256
|
+
// Stigmer client's `skill.push` routes large artifacts over the HTTP
|
|
257
|
+
// transfer lane itself, so the CLI — like every other SDK consumer — just
|
|
258
|
+
// calls push. See sdk/typescript/src/skill.ts (RoutedSkillClient).
|
|
259
|
+
/** Push a skill from a local directory. Git provenance is auto-detected. */
|
|
260
|
+
export async function pushSkill(client, dir, org, tag, message, options, onDecision) {
|
|
261
|
+
if (!hasSkillFile(dir)) {
|
|
262
|
+
throw new UsageError(`${SKILL_FILE} not found in ${dir}\n\nA skill directory must contain a ${SKILL_FILE} file defining the skill interface`);
|
|
263
|
+
}
|
|
264
|
+
const { name, visibility } = parseSkillMetadata(dir);
|
|
265
|
+
const { bytes, stats } = createSkillZip(dir, options, onDecision);
|
|
266
|
+
const provenance = collectLocalGitProvenance(dir);
|
|
267
|
+
const request = create(PushSkillRequestSchema, {
|
|
268
|
+
org,
|
|
269
|
+
artifact: bytes,
|
|
270
|
+
tag: tag === "" ? "latest" : tag,
|
|
271
|
+
message,
|
|
272
|
+
gitProvenance: provenance,
|
|
273
|
+
});
|
|
274
|
+
const response = await client.skill.push(request);
|
|
275
|
+
const applied = await applyDeclaredVisibility(client, response, visibility);
|
|
276
|
+
return toResult(applied, name, message, stats.totalSize, visibility);
|
|
277
|
+
}
|
|
278
|
+
/** Push a skill from a directory cloned from a remote git repo (--git-url). */
|
|
279
|
+
export async function pushSkillFromClone(client, skillDir, params, onDecision) {
|
|
280
|
+
if (!hasSkillFile(skillDir)) {
|
|
281
|
+
throw new UsageError(`${SKILL_FILE} not found in ${skillDir}\n\nThe skill directory must contain a ${SKILL_FILE} file`);
|
|
282
|
+
}
|
|
283
|
+
const { name, visibility } = parseSkillMetadata(skillDir);
|
|
284
|
+
const { bytes, stats } = createSkillZip(skillDir, params.options, onDecision);
|
|
285
|
+
const commit = getGitCommit(skillDir) ?? "";
|
|
286
|
+
const provenance = create(GitProvenanceSchema, {
|
|
287
|
+
remoteUrl: params.gitUrl,
|
|
288
|
+
ref: params.gitRef,
|
|
289
|
+
commit,
|
|
290
|
+
subdir: params.subdir,
|
|
291
|
+
});
|
|
292
|
+
const request = create(PushSkillRequestSchema, {
|
|
293
|
+
org: params.org,
|
|
294
|
+
artifact: bytes,
|
|
295
|
+
tag: params.tag === "" ? "latest" : params.tag,
|
|
296
|
+
message: params.message,
|
|
297
|
+
gitProvenance: provenance,
|
|
298
|
+
});
|
|
299
|
+
const response = await client.skill.push(request);
|
|
300
|
+
const applied = await applyDeclaredVisibility(client, response, visibility);
|
|
301
|
+
return toResult(applied, name, params.message, stats.totalSize, visibility);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Read and validate a pre-packaged skill archive.
|
|
305
|
+
*
|
|
306
|
+
* Client-side validation is deliberately minimal — root SKILL.md present and
|
|
307
|
+
* frontmatter parses (the same contract the console's upload preview checks);
|
|
308
|
+
* the server remains the authoritative validator. The unzip filter inflates
|
|
309
|
+
* ONLY SKILL.md: entry metadata is enough for the count/size summary, and
|
|
310
|
+
* validation must not pay for decompressing a large artifact.
|
|
311
|
+
*/
|
|
312
|
+
export function readSkillArchive(archivePath) {
|
|
313
|
+
let raw;
|
|
314
|
+
try {
|
|
315
|
+
raw = readFileSync(archivePath);
|
|
316
|
+
}
|
|
317
|
+
catch (err) {
|
|
318
|
+
throw new UsageError(`failed to read archive ${archivePath}: ${err.message}`);
|
|
319
|
+
}
|
|
320
|
+
const bytes = new Uint8Array(raw);
|
|
321
|
+
let fileCount = 0;
|
|
322
|
+
let totalSize = 0;
|
|
323
|
+
let unzipped;
|
|
324
|
+
try {
|
|
325
|
+
unzipped = unzipSync(bytes, {
|
|
326
|
+
filter: (info) => {
|
|
327
|
+
if (!info.name.endsWith("/")) {
|
|
328
|
+
fileCount++;
|
|
329
|
+
totalSize += info.originalSize;
|
|
330
|
+
}
|
|
331
|
+
return info.name === SKILL_FILE;
|
|
332
|
+
},
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
catch (err) {
|
|
336
|
+
throw new UsageError(`${archivePath} is not a valid ZIP archive: ${err.message}`);
|
|
337
|
+
}
|
|
338
|
+
const skillMd = unzipped[SKILL_FILE];
|
|
339
|
+
if (skillMd === undefined) {
|
|
340
|
+
throw new UsageError(`${SKILL_FILE} not found at the root of ${archivePath}\n\n` +
|
|
341
|
+
`A skill archive must contain ${SKILL_FILE} at its root (not inside a directory) defining the skill interface`);
|
|
342
|
+
}
|
|
343
|
+
return { bytes, meta: parseSkillMetadataContent(strFromU8(skillMd)), fileCount, totalSize };
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Push a pre-packaged skill archive as-is (`--archive`).
|
|
347
|
+
*
|
|
348
|
+
* The bytes are uploaded untouched, so the engine's version hash is the
|
|
349
|
+
* SHA-256 of the file on disk — release pipelines that publish checksums get
|
|
350
|
+
* engine version identities that match them (stigmer/stigmer#671). Git
|
|
351
|
+
* provenance is deliberately omitted: the archive was built elsewhere, so the
|
|
352
|
+
* local checkout says nothing about the artifact's origin.
|
|
353
|
+
*/
|
|
354
|
+
export async function pushSkillFromArchive(client, archivePath, org, tag, message) {
|
|
355
|
+
const archive = readSkillArchive(archivePath);
|
|
356
|
+
const request = create(PushSkillRequestSchema, {
|
|
357
|
+
org,
|
|
358
|
+
artifact: archive.bytes,
|
|
359
|
+
tag: tag === "" ? "latest" : tag,
|
|
360
|
+
message,
|
|
361
|
+
});
|
|
362
|
+
// Size-routed like every other push path (#675): pre-packaged archives are
|
|
363
|
+
// the release-pipeline lane, exactly where content-heavy skills come from.
|
|
364
|
+
const response = await client.skill.push(request);
|
|
365
|
+
const applied = await applyDeclaredVisibility(client, response, archive.meta.visibility);
|
|
366
|
+
return toResult(applied, archive.meta.name, message, archive.totalSize, archive.meta.visibility);
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* Apply the SKILL.md-declared visibility after a push. The push RPC carries
|
|
370
|
+
* artifact + provenance but not access level (visibility is metadata, not part
|
|
371
|
+
* of the versioned content), so we follow it with a single UpdateVisibility RPC.
|
|
372
|
+
* No-ops (undefined visibility, or the server already matching) are skipped
|
|
373
|
+
* so an unchanged skill costs nothing extra.
|
|
374
|
+
*/
|
|
375
|
+
async function applyDeclaredVisibility(client, pushed, visibility) {
|
|
376
|
+
if (visibility === undefined)
|
|
377
|
+
return pushed;
|
|
378
|
+
const resourceId = pushed.metadata?.id ?? "";
|
|
379
|
+
if (resourceId === "")
|
|
380
|
+
return pushed;
|
|
381
|
+
if (pushed.metadata?.visibility === visibility)
|
|
382
|
+
return pushed;
|
|
383
|
+
return client.skill.updateVisibility(create(UpdateVisibilityInputSchema, { resourceId, visibility }));
|
|
384
|
+
}
|
|
385
|
+
function collectLocalGitProvenance(dir) {
|
|
386
|
+
const root = getGitRepoRoot(dir);
|
|
387
|
+
if (root === undefined)
|
|
388
|
+
return undefined;
|
|
389
|
+
const remoteUrl = getGitRemoteUrl(dir);
|
|
390
|
+
if (remoteUrl === undefined)
|
|
391
|
+
return undefined; // No remote → no meaningful provenance.
|
|
392
|
+
const provenance = create(GitProvenanceSchema, { remoteUrl });
|
|
393
|
+
const commit = getGitCommit(dir);
|
|
394
|
+
if (commit !== undefined)
|
|
395
|
+
provenance.commit = commit;
|
|
396
|
+
const branch = getGitBranchName(dir);
|
|
397
|
+
if (branch !== undefined)
|
|
398
|
+
provenance.ref = branch;
|
|
399
|
+
// Subdir relative to repo root (git returns an absolute toplevel path).
|
|
400
|
+
const rel = relative(root, resolve(dir));
|
|
401
|
+
if (rel !== "" && rel !== ".")
|
|
402
|
+
provenance.subdir = rel;
|
|
403
|
+
return provenance;
|
|
404
|
+
}
|
|
405
|
+
function toResult(response, skillName, message, size, visibility) {
|
|
406
|
+
const version = response.metadata?.version;
|
|
407
|
+
const isNew = version === undefined ? false : version.previousVersionId === "";
|
|
408
|
+
const changed = version === undefined ? true : version.previousVersionId === "" ? true : version.id !== version.previousVersionId;
|
|
409
|
+
return {
|
|
410
|
+
id: response.metadata?.id ?? "",
|
|
411
|
+
skillName,
|
|
412
|
+
slug: response.metadata?.slug ?? "",
|
|
413
|
+
versionHash: response.status?.versionHash ?? "",
|
|
414
|
+
tag: response.spec?.tag ?? "",
|
|
415
|
+
message,
|
|
416
|
+
artifactSize: size,
|
|
417
|
+
isNewResource: isNew,
|
|
418
|
+
versionChanged: changed,
|
|
419
|
+
visibility,
|
|
420
|
+
};
|
|
421
|
+
}
|
|
422
|
+
const BYTE_UNITS = ["B", "KB", "MB", "GB", "TB", "PB"];
|
|
423
|
+
/** Human-readable byte size (1024-based), matching Go's formatBytes. */
|
|
424
|
+
export function formatBytes(bytes) {
|
|
425
|
+
if (bytes < 1024)
|
|
426
|
+
return `${bytes} B`;
|
|
427
|
+
let div = 1024;
|
|
428
|
+
let exp = 0;
|
|
429
|
+
for (let n = Math.floor(bytes / 1024); n >= 1024; n = Math.floor(n / 1024)) {
|
|
430
|
+
div *= 1024;
|
|
431
|
+
exp++;
|
|
432
|
+
}
|
|
433
|
+
return `${(bytes / div).toFixed(1)} ${BYTE_UNITS[exp + 1]}`;
|
|
434
|
+
}
|
|
435
|
+
/** Friendly truncated sha256 identifier. */
|
|
436
|
+
export function shortHash(hash) {
|
|
437
|
+
if (hash === "")
|
|
438
|
+
return "sha256:(none)";
|
|
439
|
+
return `sha256:${hash.length > 12 ? hash.slice(0, 12) : hash}`;
|
|
440
|
+
}
|
|
441
|
+
//# sourceMappingURL=skill.js.map
|
|
@@ -0,0 +1 @@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,UAAU,GAAG,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAU,CAAC;AAEhE,wEAAwE;AACxE,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;QAC3E,GAAG,IAAI,IAAI,CAAC;QACZ,GAAG,EAAE,CAAC;IACR,CAAC;IACD,OAAO,GAAG,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC;AAC9D,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,IAAI,IAAI,KAAK,EAAE;QAAE,OAAO,eAAe,CAAC;IACxC,OAAO,UAAU,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ConfirmToolUseInput, type GrantPermissionInput } from "@stigmer/apis/ai/stigmer/agentic/session/v1/io_pb";
|
|
2
|
+
/** The `--approve-default` choice; "" when the flag is unset. */
|
|
3
|
+
export type ApproveDefault = "" | "allow" | "deny" | "allow-all";
|
|
4
|
+
/** One answer to a waiting tool use. */
|
|
5
|
+
export type AskAnswer = {
|
|
6
|
+
readonly kind: "allow";
|
|
7
|
+
} | {
|
|
8
|
+
readonly kind: "deny";
|
|
9
|
+
readonly reason: string;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: "grant";
|
|
12
|
+
};
|
|
13
|
+
/** The reason `--approve-default` denies a call with: the agent reads it and goes on. */
|
|
14
|
+
export declare const DENY_REASON = "Denied by --approve-default: carry on without this call.";
|
|
15
|
+
/** The slice of the session client an answer goes through. */
|
|
16
|
+
export interface AnswerClient {
|
|
17
|
+
readonly session: {
|
|
18
|
+
confirmToolUse(input: ConfirmToolUseInput): Promise<unknown>;
|
|
19
|
+
grantPermission(input: GrantPermissionInput): Promise<unknown>;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Parse `--approve-default`. Case-insensitive, with `allow_all` and
|
|
24
|
+
* `allowall` read as allow-all; empty means unset. A retired word is refused
|
|
25
|
+
* with the word that replaced it.
|
|
26
|
+
*/
|
|
27
|
+
export declare function parseApproveDefault(value: string): ApproveDefault;
|
|
28
|
+
/** The answer a run's `--approve-default` gives every ask. */
|
|
29
|
+
export declare function answerFor(choice: ApproveDefault): AskAnswer;
|
|
30
|
+
/** The answer's word, for a status line: allowed, denied, allowed for the turn. */
|
|
31
|
+
export declare function answerWord(answer: AskAnswer): string;
|
|
32
|
+
/** Send one answer for the tool use `toolUseId` of the session. */
|
|
33
|
+
export declare function submitAnswer(client: AnswerClient, sessionId: string, toolUseId: string, answer: AskAnswer): Promise<void>;
|
|
34
|
+
//# sourceMappingURL=answer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer.d.ts","sourceRoot":"","sources":["../../src/resources/stream/answer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAGL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EAC1B,MAAM,mDAAmD,CAAC;AAG3D,iEAAiE;AACjE,MAAM,MAAM,cAAc,GAAG,EAAE,GAAG,OAAO,GAAG,MAAM,GAAG,WAAW,CAAC;AAEjE,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