@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,230 @@
|
|
|
1
|
+
// `eval run` dispatch: resolve what the eval run is about, start it, follow
|
|
2
|
+
// it to the end, and print or write the result; and `eval cancel`.
|
|
3
|
+
//
|
|
4
|
+
// The start, the follow loop, Ctrl+C, the deadlines and the exit on a lost
|
|
5
|
+
// eval run are follow.ts's (whose header holds those rules); this module
|
|
6
|
+
// reads what the eval run is about and creates it.
|
|
7
|
+
//
|
|
8
|
+
// The agent is read first, by id or by reference in the organization (the
|
|
9
|
+
// group's one rule, resources/agent/resolve.ts), so the eval run is
|
|
10
|
+
// created in the agent's own organization and the output names it by
|
|
11
|
+
// slug. Its version is not read here: create resolves a tag, refuses a
|
|
12
|
+
// version that does not exist, and stamps the hash, which the tables show.
|
|
13
|
+
// A plugin named with `--plugin` is read the same way, in the agent's
|
|
14
|
+
// organization beside `--agent`, since create takes its id; a plugin named
|
|
15
|
+
// with `--cases-from` is sent as written (an id, or a slug in the agent's
|
|
16
|
+
// organization, or org/slug), and the server matches it against the
|
|
17
|
+
// plugins a try loads. Every read is part of the start: its refusal exits
|
|
18
|
+
// 1, as create's does.
|
|
19
|
+
//
|
|
20
|
+
// The eval run is sent with no name: the server names it by its id, which
|
|
21
|
+
// is short and unique, and a person tells eval runs apart by subject and
|
|
22
|
+
// start time.
|
|
23
|
+
//
|
|
24
|
+
// The load findings of the plugin `--plugin` names (a case file that does
|
|
25
|
+
// not parse) go to stderr before the eval run starts, each as the server
|
|
26
|
+
// relays it, on one line: its message already starts with the file's
|
|
27
|
+
// path. Under `--json` they go into Stigmer's `findings` field of the
|
|
28
|
+
// result document beside the format's, and a finding fails the exit code.
|
|
29
|
+
// `--json` writes the SDK's result document with the subject's slug, and
|
|
30
|
+
// `stillRunning: true` when the command could not cancel an eval run it
|
|
31
|
+
// stopped following.
|
|
32
|
+
|
|
33
|
+
import type { EvalRun } from "@stigmer/apis/ai/stigmer/agentic/evalrun/v1/api_pb";
|
|
34
|
+
import type { Plugin } from "@stigmer/apis/ai/stigmer/agentic/plugin/v1/api_pb";
|
|
35
|
+
import type { PluginWarning } from "@stigmer/apis/ai/stigmer/agentic/plugin/v1/status_pb";
|
|
36
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
37
|
+
import {
|
|
38
|
+
toResultDocument,
|
|
39
|
+
type EvalRunCaseSourceInput,
|
|
40
|
+
type EvalRunInput,
|
|
41
|
+
type EvalRunResultDocument,
|
|
42
|
+
type Stigmer,
|
|
43
|
+
} from "@stigmer/client";
|
|
44
|
+
import { requireOrganization } from "../../client/single-org.js";
|
|
45
|
+
import { resolveAgent } from "../agent/resolve.js";
|
|
46
|
+
import { idPrefixesFor, parseReference } from "../reference.js";
|
|
47
|
+
import { asStartRefusal, runEval, type EvalIo } from "./follow.js";
|
|
48
|
+
import type { EvalRunOptions, EvalTarget } from "./options.js";
|
|
49
|
+
import { evalExitCode, oneLine, renderEvalReport, type EvalExit } from "./report.js";
|
|
50
|
+
|
|
51
|
+
export { CALL_DEADLINE_MS, POLL_INTERVAL_MS, POLL_RETRY_BUDGET_MS } from "./follow.js";
|
|
52
|
+
|
|
53
|
+
/** The commands that set the organization a slug is read in, when none is set. */
|
|
54
|
+
const SET_ORG_WITH = ["stigmer config context set --org <org>", "stigmer eval run --org <org> ..."] as const;
|
|
55
|
+
|
|
56
|
+
/** A problem reading a plugin's suite, as the result document carries it. */
|
|
57
|
+
interface ResultFinding {
|
|
58
|
+
/** The finding's kind, such as `eval-case-invalid`. */
|
|
59
|
+
readonly kind: string;
|
|
60
|
+
/** The plugin-relative file it is about; empty for the suite as a whole. */
|
|
61
|
+
readonly path: string;
|
|
62
|
+
/** The sentence, which starts with the path. */
|
|
63
|
+
readonly message: string;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** The result document the command writes: the SDK's, with the named plugin's load findings. */
|
|
67
|
+
interface CliResultDocument extends EvalRunResultDocument {
|
|
68
|
+
readonly findings: readonly ResultFinding[];
|
|
69
|
+
/**
|
|
70
|
+
* Present, and true, only when the command stopped following the eval
|
|
71
|
+
* run and could not cancel it: it may still be running and spending.
|
|
72
|
+
*/
|
|
73
|
+
readonly stillRunning?: true;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/** What the eval run is about, read: the subject and the spec fields that name it. */
|
|
77
|
+
interface ResolvedSubject {
|
|
78
|
+
/** The subject's slug, for the output. */
|
|
79
|
+
readonly slug: string;
|
|
80
|
+
/** What the eval run runs on, for `Started <id> on <on>.` */
|
|
81
|
+
readonly on: string;
|
|
82
|
+
/** Where to cancel an eval run whose start went unanswered. */
|
|
83
|
+
readonly cancelElsewhere: string;
|
|
84
|
+
/** The plugin `--plugin` named, whose load findings the command reports. */
|
|
85
|
+
readonly named?: Plugin;
|
|
86
|
+
/** The create's subject fields. */
|
|
87
|
+
readonly input: Pick<
|
|
88
|
+
EvalRunInput,
|
|
89
|
+
"org" | "agentId" | "agentVersion" | "pluginId" | "pluginDigest" | "comparedPluginId" | "cases"
|
|
90
|
+
>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** Runs `stigmer eval run` and returns the code to exit with. */
|
|
94
|
+
export async function runEvalRun(client: Stigmer, org: string, options: EvalRunOptions, io: EvalIo): Promise<EvalExit> {
|
|
95
|
+
const quiet = options.json.kind !== "none";
|
|
96
|
+
const subject = await resolveSubject(client, org, options).catch(asStartRefusal);
|
|
97
|
+
const findings = subject.named?.status?.evals?.findings ?? [];
|
|
98
|
+
if (!quiet) {
|
|
99
|
+
for (const finding of findings) io.stderr.write(`evals: ${oneLine(finding.message)}\n`);
|
|
100
|
+
}
|
|
101
|
+
return runEval(
|
|
102
|
+
client,
|
|
103
|
+
{
|
|
104
|
+
cancelElsewhere: subject.cancelElsewhere,
|
|
105
|
+
on: subject.on,
|
|
106
|
+
create: () => startEvalRun(client, subject, options),
|
|
107
|
+
report: (evalRun, interrupted, stillRunning) =>
|
|
108
|
+
renderEvalReport(evalRun, {
|
|
109
|
+
subjectSlug: subject.slug,
|
|
110
|
+
interrupted,
|
|
111
|
+
durationSeconds: toResultDocument(evalRun, { interrupted, nowMs: io.now() }).durationSeconds,
|
|
112
|
+
stillRunning,
|
|
113
|
+
}),
|
|
114
|
+
document: (evalRun, interrupted, stillRunning) =>
|
|
115
|
+
documentOf(evalRun, subject.slug, findings, interrupted, io.now(), stillRunning),
|
|
116
|
+
exitCode: (evalRun, interrupted) => evalExitCode(evalRun, { interrupted, loadFindings: findings.length }),
|
|
117
|
+
},
|
|
118
|
+
options,
|
|
119
|
+
io,
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/** Cancels an eval run and says what happened. */
|
|
124
|
+
export async function cancelEvalRun(client: Stigmer, id: string, io: Pick<EvalIo, "stderr">): Promise<void> {
|
|
125
|
+
const cancelled = await client.evalrun.cancel(id);
|
|
126
|
+
const status = cancelled.status;
|
|
127
|
+
io.stderr.write(
|
|
128
|
+
`Cancelled ${id}: tries in flight stop; ${status?.triesFinished ?? 0} of ${status?.triesTotal ?? 0} tries had finished.\n`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function resolveSubject(client: Stigmer, org: string, options: EvalRunOptions): Promise<ResolvedSubject> {
|
|
133
|
+
const subject = options.subject;
|
|
134
|
+
if (subject.kind === "plugin") {
|
|
135
|
+
const plugin = await resolvePlugin(client, subject.plugin.ref, org);
|
|
136
|
+
const slug = plugin.metadata?.slug || plugin.metadata?.name || subject.plugin.ref;
|
|
137
|
+
return {
|
|
138
|
+
slug,
|
|
139
|
+
on: slug,
|
|
140
|
+
cancelElsewhere: "cancel it from the plugin's Evals tab in the console",
|
|
141
|
+
named: plugin,
|
|
142
|
+
input: { org: plugin.metadata?.org ?? "", pluginId: plugin.metadata?.id ?? "", pluginDigest: subject.plugin.digest },
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
const agent = await resolveAgent(client, subject.agent.ref, org, SET_ORG_WITH);
|
|
146
|
+
const agentOrg = agent.metadata?.org ?? "";
|
|
147
|
+
const slug = agent.metadata?.slug || agent.metadata?.name || subject.agent.ref;
|
|
148
|
+
const compared = subject.compared === "" ? undefined : await resolvePlugin(client, subject.compared, agentOrg);
|
|
149
|
+
const on = subject.agent.version === "" ? slug : `${slug}@${subject.agent.version}`;
|
|
150
|
+
return {
|
|
151
|
+
slug,
|
|
152
|
+
on: compared === undefined ? on : `${on} with and without ${compared.metadata?.slug || subject.compared}`,
|
|
153
|
+
cancelElsewhere: "cancel it from the agent's Evals tab in the console",
|
|
154
|
+
...(compared !== undefined && { named: compared }),
|
|
155
|
+
input: {
|
|
156
|
+
org: agentOrg,
|
|
157
|
+
agentId: agent.metadata?.id ?? "",
|
|
158
|
+
agentVersion: subject.agent.version,
|
|
159
|
+
comparedPluginId: compared?.metadata?.id ?? "",
|
|
160
|
+
cases: [
|
|
161
|
+
...subject.casesFrom.map((ref) => caseSourceOf(ref, agentOrg)),
|
|
162
|
+
...subject.evals.map((target) => evalSourceOf(target, agentOrg)),
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
async function resolvePlugin(client: Stigmer, ref: string, org: string): Promise<Plugin> {
|
|
169
|
+
const parsed = parseReference(ref, org, idPrefixesFor(ApiResourceKind.plugin));
|
|
170
|
+
if (parsed.kind === "id") {
|
|
171
|
+
return client.plugin.get(parsed.id);
|
|
172
|
+
}
|
|
173
|
+
await requireOrganization(client, parsed.org, SET_ORG_WITH);
|
|
174
|
+
return client.plugin.getByReference({ org: parsed.org, slug: parsed.slug });
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** A `--cases-from` reference as the create's case source: by id, or by slug in its organization. */
|
|
178
|
+
function caseSourceOf(ref: string, agentOrg: string): EvalRunCaseSourceInput {
|
|
179
|
+
const parsed = parseReference(ref, agentOrg, idPrefixesFor(ApiResourceKind.plugin));
|
|
180
|
+
return parsed.kind === "id"
|
|
181
|
+
? { plugin: { org: "", slug: "", id: parsed.id } }
|
|
182
|
+
: { plugin: { org: parsed.org, slug: parsed.slug } };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** An `--eval` reference as the create's case source: by id, or by slug in its organization, at its version. */
|
|
186
|
+
function evalSourceOf(target: EvalTarget, agentOrg: string): EvalRunCaseSourceInput {
|
|
187
|
+
const parsed = parseReference(target.ref, agentOrg, idPrefixesFor(ApiResourceKind.eval));
|
|
188
|
+
const ref =
|
|
189
|
+
parsed.kind === "id" ? { org: "", slug: "", id: parsed.id } : { org: parsed.org, slug: parsed.slug };
|
|
190
|
+
return { eval: { ...ref, ...(target.version !== "" && { version: target.version }) } };
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
async function startEvalRun(client: Stigmer, subject: ResolvedSubject, options: EvalRunOptions): Promise<EvalRun> {
|
|
194
|
+
try {
|
|
195
|
+
return await client.evalrun.create({
|
|
196
|
+
name: "",
|
|
197
|
+
...subject.input,
|
|
198
|
+
targets: [...options.targets],
|
|
199
|
+
runs: options.runs,
|
|
200
|
+
ablation: options.ablation,
|
|
201
|
+
...(options.threshold !== undefined && { threshold: options.threshold }),
|
|
202
|
+
caseGlob: options.caseGlob,
|
|
203
|
+
caseTags: [...options.caseTags],
|
|
204
|
+
judgeModel: options.judgeModel,
|
|
205
|
+
maxCostUsd: options.maxCostUsd,
|
|
206
|
+
concurrency: options.concurrency,
|
|
207
|
+
allowTools: [...options.allowTools],
|
|
208
|
+
realMcpServers: options.realMcpServers,
|
|
209
|
+
allowRealServers: options.allowRealServers,
|
|
210
|
+
skipScaffold: options.skipScaffold,
|
|
211
|
+
});
|
|
212
|
+
} catch (error) {
|
|
213
|
+
return asStartRefusal(error);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function documentOf(
|
|
218
|
+
evalRun: EvalRun,
|
|
219
|
+
subjectSlug: string,
|
|
220
|
+
findings: readonly PluginWarning[],
|
|
221
|
+
interrupted: boolean,
|
|
222
|
+
nowMs: number,
|
|
223
|
+
stillRunning: boolean,
|
|
224
|
+
): CliResultDocument {
|
|
225
|
+
return {
|
|
226
|
+
...toResultDocument(evalRun, { interrupted, nowMs, subjectSlug }),
|
|
227
|
+
findings: findings.map((finding) => ({ kind: finding.kind, path: finding.path, message: finding.message })),
|
|
228
|
+
...(stillRunning && { stillRunning: true as const }),
|
|
229
|
+
};
|
|
230
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// An evals/ folder as an eval push, and an eval's archive back as a folder.
|
|
2
|
+
//
|
|
3
|
+
// An eval is Claude Code's evals/ folder pushed whole: its case directories,
|
|
4
|
+
// mocks/ and shared files at the archive root, named by the slug the push
|
|
5
|
+
// gives, since the folder names nothing. The push half walks the folder
|
|
6
|
+
// through the same walk and ignore rules a plugin push uses
|
|
7
|
+
// (`readPluginDirectory`), then hands the selection to the shared
|
|
8
|
+
// `prepareEvalArchive`, which leaves out `results/` (what `claude plugin
|
|
9
|
+
// eval` writes), reads the cases exactly as the server will and builds the
|
|
10
|
+
// archive whose SHA-256 the server records. `push eval --dry-run` prints that
|
|
11
|
+
// reading and sends nothing.
|
|
12
|
+
//
|
|
13
|
+
// The download half resolves the reference at its version first, so the
|
|
14
|
+
// folder written is the version that was named, then fetches its archive
|
|
15
|
+
// through the SDK helper (digest checked) and unzips it into a new or empty
|
|
16
|
+
// directory, refusing an entry that would land outside it.
|
|
17
|
+
|
|
18
|
+
import { mkdirSync, readdirSync, statSync, writeFileSync } from "node:fs";
|
|
19
|
+
import { dirname, isAbsolute, join, resolve, sep } from "node:path";
|
|
20
|
+
import { create, toJson } from "@bufbuild/protobuf";
|
|
21
|
+
import { unzipSync } from "fflate";
|
|
22
|
+
import type { EvalSuite, EvalSuiteFinding } from "@stigmer/plugin-package";
|
|
23
|
+
import { prepareEvalArchive } from "@stigmer/plugin-package/client";
|
|
24
|
+
import { EvalSchema, type Eval } from "@stigmer/apis/ai/stigmer/agentic/eval/v1/api_pb";
|
|
25
|
+
import { PushEvalRequestSchema } from "@stigmer/apis/ai/stigmer/agentic/eval/v1/io_pb";
|
|
26
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
27
|
+
import type { ApiResourceVisibility } from "@stigmer/apis/ai/stigmer/commons/apiresource/enum_pb";
|
|
28
|
+
import { downloadEvalArchive, type Stigmer } from "@stigmer/client";
|
|
29
|
+
import { UsageError } from "../errors/index.js";
|
|
30
|
+
import { CommandResult } from "../output/index.js";
|
|
31
|
+
import { readPluginDirectory } from "./plugin.js";
|
|
32
|
+
import type { ParsedReference } from "./reference.js";
|
|
33
|
+
import { formatBytes, shortHash, type IgnoreOptions, type ZipStats } from "./skill.js";
|
|
34
|
+
|
|
35
|
+
/** An evals/ folder ready to push: the server's reading, the bytes and their identity. */
|
|
36
|
+
export interface PreparedEvalPush {
|
|
37
|
+
readonly dir: string;
|
|
38
|
+
readonly suite: EvalSuite;
|
|
39
|
+
readonly stats: ZipStats;
|
|
40
|
+
readonly archive: Uint8Array;
|
|
41
|
+
readonly digest: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Walk, select, read and archive an evals/ folder, refusing what the server
|
|
46
|
+
* refuses: a plugin folder (its evals/ folder is the eval) and a folder
|
|
47
|
+
* where no case loads, with the reader's sentences.
|
|
48
|
+
*/
|
|
49
|
+
export async function prepareEvalPush(dir: string, ignoreOptions: IgnoreOptions): Promise<PreparedEvalPush> {
|
|
50
|
+
const directory = readPluginDirectory(dir, ignoreOptions);
|
|
51
|
+
const outcome = await prepareEvalArchive(directory);
|
|
52
|
+
if (!outcome.ok) {
|
|
53
|
+
if (outcome.kind === "plugin-folder") throw pluginFolderRefusal(dir);
|
|
54
|
+
throw noCaseRefusal(dir, outcome.findings);
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
dir,
|
|
58
|
+
suite: outcome.prepared.suite,
|
|
59
|
+
stats: outcome.prepared.stats,
|
|
60
|
+
archive: outcome.prepared.archive,
|
|
61
|
+
digest: outcome.prepared.digest,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function pluginFolderRefusal(dir: string): UsageError {
|
|
66
|
+
return new UsageError(
|
|
67
|
+
`${dir} is a plugin folder, not an evals/ folder\n\n` +
|
|
68
|
+
`An eval is the folder of cases itself: push ${join(dir, "evals")} instead.`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function noCaseRefusal(dir: string, findings: readonly EvalSuiteFinding[]): UsageError {
|
|
73
|
+
if (findings.length === 0) {
|
|
74
|
+
return new UsageError(
|
|
75
|
+
`${dir}: eval cannot be pushed: the folder holds no case\n\n` +
|
|
76
|
+
"A case is a directory holding prompt.md or case.yaml, at the folder's root or beneath it.",
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return new UsageError(
|
|
80
|
+
[
|
|
81
|
+
`${dir}: eval cannot be pushed: no case in the folder loads, ${count(findings.length, "problem")} found:`,
|
|
82
|
+
...findings.map((finding) => ` - ${finding.message}`),
|
|
83
|
+
].join("\n"),
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function count(n: number, noun: string): string {
|
|
88
|
+
return `${n} ${noun}${n === 1 ? "" : "s"}`;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** What a push of the folder would store, as `push eval --dry-run` prints it. */
|
|
92
|
+
export function describeEvalPush(prepared: PreparedEvalPush, slug: string): CommandResult {
|
|
93
|
+
const { suite, stats } = prepared;
|
|
94
|
+
const result = CommandResult.success(`Dry run: eval '${slug}' would hold ${count(suite.cases.length, "case")}`);
|
|
95
|
+
const about = result.addSection("Eval");
|
|
96
|
+
about.field("Slug", slug);
|
|
97
|
+
about.field("Digest", prepared.digest);
|
|
98
|
+
about.field("Files", `${stats.filesIncluded} read, ${stats.filesIgnored} left out`);
|
|
99
|
+
about.field("Size", formatBytes(prepared.archive.length));
|
|
100
|
+
const cases = result.addSection("Cases");
|
|
101
|
+
for (const evalCase of suite.cases) {
|
|
102
|
+
const tags = evalCase.tags.length === 0 ? "" : ` [${evalCase.tags.join(", ")}]`;
|
|
103
|
+
const unsupported = evalCase.unsupported === undefined ? "" : ` (not run yet: ${evalCase.unsupported})`;
|
|
104
|
+
cases.item(`${evalCase.name} (${evalCase.dir})${tags}${unsupported}`);
|
|
105
|
+
}
|
|
106
|
+
result.addSection("Mocks").field("MCP servers", suite.servers.length === 0 ? "none" : suite.servers.join(", "));
|
|
107
|
+
if (suite.findings.length > 0) {
|
|
108
|
+
const section = result.addSection("Findings");
|
|
109
|
+
for (const finding of suite.findings) section.item(finding.message);
|
|
110
|
+
}
|
|
111
|
+
result.hint("Run without --dry-run to push it.");
|
|
112
|
+
return result.withData({
|
|
113
|
+
slug,
|
|
114
|
+
digest: prepared.digest,
|
|
115
|
+
cases: suite.cases.map((c) => ({ name: c.name, path: c.dir, tags: c.tags, ...(c.unsupported !== undefined && { unsupported: c.unsupported }) })),
|
|
116
|
+
findings: suite.findings,
|
|
117
|
+
mockServers: suite.servers,
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface PushEvalOptions {
|
|
122
|
+
readonly org: string;
|
|
123
|
+
readonly slug: string;
|
|
124
|
+
/** The display name; absent keeps the stored one (the slug for a new eval). */
|
|
125
|
+
readonly name?: string;
|
|
126
|
+
/** The tag to move to this version; absent moves none. */
|
|
127
|
+
readonly tag?: string;
|
|
128
|
+
readonly visibility: ApiResourceVisibility | undefined;
|
|
129
|
+
readonly message: string;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/** The push request a prepared folder becomes: only what the user gave is set. */
|
|
133
|
+
export function evalPushRequest(prepared: PreparedEvalPush, options: PushEvalOptions) {
|
|
134
|
+
return create(PushEvalRequestSchema, {
|
|
135
|
+
org: options.org,
|
|
136
|
+
slug: options.slug,
|
|
137
|
+
artifact: prepared.archive,
|
|
138
|
+
message: options.message,
|
|
139
|
+
...(options.name !== undefined && { name: options.name }),
|
|
140
|
+
...(options.tag !== undefined && { tag: options.tag }),
|
|
141
|
+
...(options.visibility !== undefined && { visibility: options.visibility }),
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/** Push a prepared folder through the SDK's routed eval client. */
|
|
146
|
+
export async function pushEval(client: Stigmer, prepared: PreparedEvalPush, options: PushEvalOptions): Promise<Eval> {
|
|
147
|
+
return client.eval.push(evalPushRequest(prepared, options));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** The pushed eval: which version it is now at, and what that version holds. */
|
|
151
|
+
export function renderEvalPush(pushed: Eval, prepared: PreparedEvalPush): CommandResult {
|
|
152
|
+
const status = pushed.status;
|
|
153
|
+
const findings = status?.findings ?? [];
|
|
154
|
+
const headline = `Pushed eval '${pushed.metadata?.slug ?? ""}' (${count(status?.caseCount ?? 0, "case")})`;
|
|
155
|
+
const result =
|
|
156
|
+
findings.length === 0
|
|
157
|
+
? CommandResult.success(headline)
|
|
158
|
+
: CommandResult.warning(`${headline} with ${count(findings.length, "case finding")}`);
|
|
159
|
+
const about = result.addSection("Eval");
|
|
160
|
+
about.field("ID", pushed.metadata?.id ?? "");
|
|
161
|
+
about.field("Slug", pushed.metadata?.slug ?? "");
|
|
162
|
+
about.field("Digest", shortHash(status?.digest ?? ""));
|
|
163
|
+
if (pushed.spec?.tag) about.field("Tag", pushed.spec.tag);
|
|
164
|
+
if (pushed.metadata?.version?.message) about.field("Message", pushed.metadata.version.message);
|
|
165
|
+
about.field("Size", formatBytes(prepared.archive.length));
|
|
166
|
+
if (findings.length > 0) {
|
|
167
|
+
const section = result.addSection("Findings");
|
|
168
|
+
for (const finding of findings) section.item(finding.message);
|
|
169
|
+
}
|
|
170
|
+
return result.withData({ eval: toJson(EvalSchema, pushed) });
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** `<ref>@<version>` split: the reference, and a digest or tag when one is named. */
|
|
174
|
+
export function splitEvalVersion(input: string): { readonly ref: string; readonly version: string } {
|
|
175
|
+
const trimmed = input.trim();
|
|
176
|
+
const at = trimmed.lastIndexOf("@");
|
|
177
|
+
if (at <= 0) return { ref: trimmed, version: "" };
|
|
178
|
+
const version = trimmed.slice(at + 1);
|
|
179
|
+
if (version === "") {
|
|
180
|
+
throw new UsageError(`'${input}' names no version after '@': give a digest or a tag, or leave '@' out for the current version`);
|
|
181
|
+
}
|
|
182
|
+
return { ref: trimmed.slice(0, at), version };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export interface DownloadEvalOutcome {
|
|
186
|
+
readonly slug: string;
|
|
187
|
+
readonly digest: string;
|
|
188
|
+
readonly tag: string;
|
|
189
|
+
readonly dir: string;
|
|
190
|
+
readonly files: number;
|
|
191
|
+
readonly bytes: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Download one version of an eval into `outputDir`, or `./<slug>` when
|
|
196
|
+
* none is given: resolve the reference at its version, fetch that digest's
|
|
197
|
+
* archive (checked against it), and unzip it.
|
|
198
|
+
*/
|
|
199
|
+
export async function downloadEval(
|
|
200
|
+
client: Stigmer,
|
|
201
|
+
ref: ParsedReference,
|
|
202
|
+
version: string,
|
|
203
|
+
outputDir: string | undefined,
|
|
204
|
+
): Promise<DownloadEvalOutcome> {
|
|
205
|
+
const reference =
|
|
206
|
+
ref.kind === "id"
|
|
207
|
+
? { org: "", slug: "", id: ref.id, version, kind: ApiResourceKind.eval }
|
|
208
|
+
: { org: ref.org, slug: ref.slug, version, kind: ApiResourceKind.eval };
|
|
209
|
+
const resolved = await client.eval.getByReference(reference);
|
|
210
|
+
const slug = resolved.metadata?.slug ?? "";
|
|
211
|
+
const digest = resolved.status?.digest ?? "";
|
|
212
|
+
const target = outputDir ?? join(".", slug);
|
|
213
|
+
ensureEmptyDirectory(target);
|
|
214
|
+
const downloaded = await downloadEvalArchive(
|
|
215
|
+
client.eval,
|
|
216
|
+
{ org: resolved.metadata?.org ?? "", slug, version: digest, kind: ApiResourceKind.eval },
|
|
217
|
+
client.fetch,
|
|
218
|
+
);
|
|
219
|
+
const files = extractArchive(downloaded.bytes, target);
|
|
220
|
+
return { slug, digest: downloaded.digest, tag: resolved.spec?.tag ?? "", dir: target, files, bytes: downloaded.bytes.length };
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/** A directory the download may write: absent (made here) or empty. */
|
|
224
|
+
export function ensureEmptyDirectory(dir: string): void {
|
|
225
|
+
let stats;
|
|
226
|
+
try {
|
|
227
|
+
stats = statSync(dir);
|
|
228
|
+
} catch {
|
|
229
|
+
mkdirSync(dir, { recursive: true });
|
|
230
|
+
return;
|
|
231
|
+
}
|
|
232
|
+
if (!stats.isDirectory()) {
|
|
233
|
+
throw new UsageError(`${dir} exists and is not a directory: name a new or empty directory with -o`);
|
|
234
|
+
}
|
|
235
|
+
if (readdirSync(dir).length > 0) {
|
|
236
|
+
throw new UsageError(`${dir} is not empty: name a new or empty directory with -o, so no file of yours is overwritten`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Write every file of `archive` under `dir`, refusing the whole archive
|
|
242
|
+
* before writing anything when an entry is absolute or would land outside
|
|
243
|
+
* `dir`. Returns the number of files written.
|
|
244
|
+
*/
|
|
245
|
+
export function extractArchive(archive: Uint8Array, dir: string): number {
|
|
246
|
+
const entries = unzipSync(archive);
|
|
247
|
+
const root = resolve(dir);
|
|
248
|
+
const planned: Array<[string, Uint8Array]> = [];
|
|
249
|
+
for (const [name, bytes] of Object.entries(entries)) {
|
|
250
|
+
if (name.endsWith("/")) continue;
|
|
251
|
+
if (isAbsolute(name) || /^[A-Za-z]:/.test(name) || name.startsWith("\\")) {
|
|
252
|
+
throw new UsageError(`the eval archive holds an absolute path '${name}'; nothing was written`);
|
|
253
|
+
}
|
|
254
|
+
const target = resolve(root, name);
|
|
255
|
+
// An entry that resolves to the directory itself (`x/..`) names no
|
|
256
|
+
// file in it, and one outside it would escape.
|
|
257
|
+
if (!target.startsWith(root + sep)) {
|
|
258
|
+
throw new UsageError(`the eval archive holds '${name}', which would land outside ${dir}; nothing was written`);
|
|
259
|
+
}
|
|
260
|
+
planned.push([target, bytes]);
|
|
261
|
+
}
|
|
262
|
+
for (const [target, bytes] of planned) {
|
|
263
|
+
mkdirSync(dirname(target), { recursive: true });
|
|
264
|
+
writeFileSync(target, bytes);
|
|
265
|
+
}
|
|
266
|
+
return planned.length;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
/** The downloaded folder, as `download eval` prints it. */
|
|
270
|
+
export function renderEvalDownload(outcome: DownloadEvalOutcome): CommandResult {
|
|
271
|
+
const result = CommandResult.success(`Downloaded eval '${outcome.slug}' into ${outcome.dir}`);
|
|
272
|
+
const about = result.addSection("Eval");
|
|
273
|
+
about.field("Digest", outcome.digest);
|
|
274
|
+
if (outcome.tag !== "") about.field("Tag", outcome.tag);
|
|
275
|
+
about.field("Files", String(outcome.files));
|
|
276
|
+
about.field("Size", formatBytes(outcome.bytes));
|
|
277
|
+
return result.withData(outcome);
|
|
278
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// Binds each registry kind to its proto schema and the SDK call that fetches a
|
|
2
|
+
// single resource (by ID or by org/slug reference). This is the seam between the
|
|
3
|
+
// proto-kind registry and the high-level SDK sub-clients for the `get` verb;
|
|
4
|
+
// the schema travels with the message so rendering stays kind-agnostic.
|
|
5
|
+
|
|
6
|
+
import type { DescMessage, Message } from "@bufbuild/protobuf";
|
|
7
|
+
import { AgentSchema } from "@stigmer/apis/ai/stigmer/agentic/agent/v1/api_pb";
|
|
8
|
+
import { ChannelSchema } from "@stigmer/apis/ai/stigmer/agentic/channel/v1/api_pb";
|
|
9
|
+
import { ChannelAppSchema } from "@stigmer/apis/ai/stigmer/agentic/channelapp/v1/api_pb";
|
|
10
|
+
import { PluginSchema } from "@stigmer/apis/ai/stigmer/agentic/plugin/v1/api_pb";
|
|
11
|
+
import { ScheduleSchema } from "@stigmer/apis/ai/stigmer/agentic/schedule/v1/api_pb";
|
|
12
|
+
import { EvalSchema } from "@stigmer/apis/ai/stigmer/agentic/eval/v1/api_pb";
|
|
13
|
+
import { EvalRunSchema } from "@stigmer/apis/ai/stigmer/agentic/evalrun/v1/api_pb";
|
|
14
|
+
import { ScoringRuleSchema } from "@stigmer/apis/ai/stigmer/agentic/scoringrule/v1/api_pb";
|
|
15
|
+
import { ScoreSchema } from "@stigmer/apis/ai/stigmer/agentic/score/v1/api_pb";
|
|
16
|
+
import { SkillSchema } from "@stigmer/apis/ai/stigmer/agentic/skill/v1/api_pb";
|
|
17
|
+
import { VaultSchema } from "@stigmer/apis/ai/stigmer/agentic/vault/v1/api_pb";
|
|
18
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
19
|
+
import { ApiKeySchema } from "@stigmer/apis/ai/stigmer/iam/apikey/v1/api_pb";
|
|
20
|
+
import type { Stigmer } from "@stigmer/client";
|
|
21
|
+
import { UsageError } from "../errors/index.js";
|
|
22
|
+
import type { ParsedReference } from "./reference.js";
|
|
23
|
+
|
|
24
|
+
export interface ResourceResult {
|
|
25
|
+
readonly schema: DescMessage;
|
|
26
|
+
readonly message: Message;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type Getter = (
|
|
30
|
+
client: Stigmer,
|
|
31
|
+
ref: ParsedReference,
|
|
32
|
+
) => Promise<ResourceResult>;
|
|
33
|
+
|
|
34
|
+
// Every kind declaring Get in the verb matrix must have an entry here (or a
|
|
35
|
+
// documented special case, e.g. organization) — the conformance test in
|
|
36
|
+
// registry/registry.test.ts enforces it, so the two cannot drift.
|
|
37
|
+
export const GET_BINDINGS: ReadonlyMap<ApiResourceKind, Getter> = new Map([
|
|
38
|
+
[
|
|
39
|
+
ApiResourceKind.agent,
|
|
40
|
+
refGetter(ApiResourceKind.agent, AgentSchema, (c) => c.agent),
|
|
41
|
+
],
|
|
42
|
+
[
|
|
43
|
+
ApiResourceKind.vault,
|
|
44
|
+
refGetter(ApiResourceKind.vault, VaultSchema, (c) => c.vault),
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
ApiResourceKind.channel,
|
|
48
|
+
refGetter(
|
|
49
|
+
ApiResourceKind.channel,
|
|
50
|
+
ChannelSchema,
|
|
51
|
+
(c) => c.channel,
|
|
52
|
+
),
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
ApiResourceKind.channel_app,
|
|
56
|
+
refGetter(
|
|
57
|
+
ApiResourceKind.channel_app,
|
|
58
|
+
ChannelAppSchema,
|
|
59
|
+
(c) => c.channelapp,
|
|
60
|
+
),
|
|
61
|
+
],
|
|
62
|
+
[
|
|
63
|
+
ApiResourceKind.schedule,
|
|
64
|
+
refGetter(ApiResourceKind.schedule, ScheduleSchema, (c) => c.schedule),
|
|
65
|
+
],
|
|
66
|
+
[
|
|
67
|
+
ApiResourceKind.skill,
|
|
68
|
+
refGetter(ApiResourceKind.skill, SkillSchema, (c) => c.skill),
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
ApiResourceKind.plugin,
|
|
72
|
+
refGetter(ApiResourceKind.plugin, PluginSchema, (c) => c.plugin),
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
ApiResourceKind.eval,
|
|
76
|
+
refGetter(ApiResourceKind.eval, EvalSchema, (c) => c.eval),
|
|
77
|
+
],
|
|
78
|
+
[
|
|
79
|
+
ApiResourceKind.api_key,
|
|
80
|
+
idOnlyGetter(ApiKeySchema, (c) => c.apiKey, "API keys"),
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
ApiResourceKind.score,
|
|
84
|
+
idOnlyGetter(ScoreSchema, (c) => c.score, "Scores"),
|
|
85
|
+
],
|
|
86
|
+
[
|
|
87
|
+
ApiResourceKind.scoring_rule,
|
|
88
|
+
idOnlyGetter(ScoringRuleSchema, (c) => c.scoringrule, "Scoring rules"),
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
ApiResourceKind.eval_run,
|
|
92
|
+
idOnlyGetter(EvalRunSchema, (c) => c.evalrun, "Eval runs"),
|
|
93
|
+
],
|
|
94
|
+
]);
|
|
95
|
+
|
|
96
|
+
export function getterFor(kind: ApiResourceKind): Getter | undefined {
|
|
97
|
+
return GET_BINDINGS.get(kind);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// A resource fetchable by ID or by org/slug reference.
|
|
101
|
+
interface RefClient {
|
|
102
|
+
get(id: string): Promise<Message>;
|
|
103
|
+
getByReference(ref: {
|
|
104
|
+
org: string;
|
|
105
|
+
slug: string;
|
|
106
|
+
kind: number;
|
|
107
|
+
}): Promise<Message>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function refGetter(
|
|
111
|
+
kind: ApiResourceKind,
|
|
112
|
+
schema: DescMessage,
|
|
113
|
+
pick: (c: Stigmer) => RefClient,
|
|
114
|
+
): Getter {
|
|
115
|
+
return async (client, ref) => {
|
|
116
|
+
const sub = pick(client);
|
|
117
|
+
const message =
|
|
118
|
+
ref.kind === "id"
|
|
119
|
+
? await sub.get(ref.id)
|
|
120
|
+
: await sub.getByReference({ org: ref.org, slug: ref.slug, kind });
|
|
121
|
+
return { schema, message };
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// A resource fetchable only by ID (e.g. API keys are not slug-addressable).
|
|
126
|
+
function idOnlyGetter(
|
|
127
|
+
schema: DescMessage,
|
|
128
|
+
pick: (c: Stigmer) => { get(id: string): Promise<Message> },
|
|
129
|
+
label: string,
|
|
130
|
+
): Getter {
|
|
131
|
+
return async (client, ref) => {
|
|
132
|
+
if (ref.kind !== "id") {
|
|
133
|
+
throw new UsageError(`${label} can only be fetched by ID`);
|
|
134
|
+
}
|
|
135
|
+
return { schema, message: await pick(client).get(ref.id) };
|
|
136
|
+
};
|
|
137
|
+
}
|