@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,57 @@
|
|
|
1
|
+
import type { Client } from "@connectrpc/connect";
|
|
2
|
+
import { type DescService } from "@bufbuild/protobuf";
|
|
3
|
+
import { type Run } from "@stigmer/apis/ai/stigmer/agentic/run/v1/api_pb";
|
|
4
|
+
import type { Attachment } from "@stigmer/apis/ai/stigmer/agentic/run/v1/spec_pb";
|
|
5
|
+
import type { WorkspaceEntry } from "@stigmer/apis/ai/stigmer/agentic/session/v1/workspace_pb";
|
|
6
|
+
import { type ApiResourceReference } from "@stigmer/apis/ai/stigmer/commons/apiresource/io_pb";
|
|
7
|
+
import type { HarnessFlag, RunMode, ServiceTierFlag, ThinkingFlag } from "./prepare.js";
|
|
8
|
+
export type ControllerFn = <Desc extends DescService>(service: Desc) => Client<Desc>;
|
|
9
|
+
/**
|
|
10
|
+
* The agent a new conversation starts on, by reference: the server resolves
|
|
11
|
+
* it, pins the version on the session it creates, and checks every later turn
|
|
12
|
+
* against that pin. An empty version pins the agent's current version.
|
|
13
|
+
*/
|
|
14
|
+
export interface AgentRefInput {
|
|
15
|
+
readonly org: string;
|
|
16
|
+
readonly slug: string;
|
|
17
|
+
readonly version?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Inputs for creating a run. The turn's target is one of two
|
|
21
|
+
* things: sessionId continues an existing conversation (whose agent the
|
|
22
|
+
* session already pins), or a new conversation the backend creates from the
|
|
23
|
+
* embedded session_spec. agentRef names the new conversation's agent; with
|
|
24
|
+
* neither, the new conversation runs the built-in assistant.
|
|
25
|
+
*
|
|
26
|
+
* workspaceEntries, harness, vaults, includeMyVault and plugins ride the
|
|
27
|
+
* one-call bootstrap (spec.session_spec, stigmer/stigmer#249) and shape the
|
|
28
|
+
* auto-created session. A session's agent, workspace, harness, vault and
|
|
29
|
+
* plugin choice are set at creation, so with sessionId set they are not sent: the
|
|
30
|
+
* target carries the session id alone, and the conversation keeps the vaults
|
|
31
|
+
* it was started with. A run carries no keys of its own; they come from the
|
|
32
|
+
* vaults its conversation uses.
|
|
33
|
+
*/
|
|
34
|
+
export interface CreateRunInput {
|
|
35
|
+
readonly agentRef?: AgentRefInput;
|
|
36
|
+
readonly sessionId?: string;
|
|
37
|
+
readonly orgId: string;
|
|
38
|
+
readonly message: string;
|
|
39
|
+
/** The shared vaults the new conversation uses, in order. */
|
|
40
|
+
readonly vaults: readonly ApiResourceReference[];
|
|
41
|
+
/** Whether each turn of the new conversation uses its sender's My vault first. */
|
|
42
|
+
readonly includeMyVault: boolean;
|
|
43
|
+
/** The plugins the new conversation uses: their skills, agents, MCP servers and hooks. */
|
|
44
|
+
readonly plugins: readonly ApiResourceReference[];
|
|
45
|
+
readonly attachments: readonly Attachment[];
|
|
46
|
+
readonly workspaceFileRefs: readonly string[];
|
|
47
|
+
readonly workspaceEntries: readonly WorkspaceEntry[];
|
|
48
|
+
readonly model: string;
|
|
49
|
+
readonly mode: RunMode;
|
|
50
|
+
readonly serviceTier: ServiceTierFlag;
|
|
51
|
+
readonly thinking: ThinkingFlag;
|
|
52
|
+
readonly autoApproveAll: boolean;
|
|
53
|
+
readonly harness: HarnessFlag;
|
|
54
|
+
}
|
|
55
|
+
/** Create a run. Mirrors Go's createAgentExecution. */
|
|
56
|
+
export declare function createAgentRun(controller: ControllerFn, input: CreateRunInput): Promise<Run>;
|
|
57
|
+
//# sourceMappingURL=create.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/resources/run/create.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,KAAK,GAAG,EAAa,MAAM,gDAAgD,CAAC;AAGrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iDAAiD,CAAC;AAWlF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,O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IAChC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,WAAW,CAAC;CAC/B;AAED,uDAAuD;AACvD,wBAAsB,cAAc,CAClC,UAAU,EAAE,YAAY,EACxB,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC,GAAG,CAAC,CAkBd"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// Resource creation for the run path: Run.
|
|
2
|
+
//
|
|
3
|
+
// Ports the Go CLI's run_create.go. We build the full proto messages and drive
|
|
4
|
+
// the generated command controllers directly — the fidelity rule
|
|
5
|
+
// resources/apply/handlers.ts states: the SDK's typed `create(input)` wrappers model a
|
|
6
|
+
// subset of fields, and our attachments/workspace entries are already proto
|
|
7
|
+
// messages, so a round-trip through the input types would be lossy and pointless.
|
|
8
|
+
import { create } from "@bufbuild/protobuf";
|
|
9
|
+
import { RunSchema } from "@stigmer/apis/ai/stigmer/agentic/run/v1/api_pb";
|
|
10
|
+
import { RunCommandController } from "@stigmer/apis/ai/stigmer/agentic/run/v1/command_pb";
|
|
11
|
+
import { InteractionMode, ServiceTier, ThinkingMode } from "@stigmer/apis/ai/stigmer/agentic/run/v1/enum_pb";
|
|
12
|
+
import { RunSpecSchema, } from "@stigmer/apis/ai/stigmer/agentic/run/v1/spec_pb";
|
|
13
|
+
import { RunConfigSchema, } from "@stigmer/apis/ai/stigmer/agentic/run/v1/invocation_pb";
|
|
14
|
+
import { Harness } from "@stigmer/apis/ai/stigmer/agentic/session/v1/enum_pb";
|
|
15
|
+
import { SessionSpecSchema } from "@stigmer/apis/ai/stigmer/agentic/session/v1/spec_pb";
|
|
16
|
+
import { ApiResourceMetadataSchema } from "@stigmer/apis/ai/stigmer/commons/apiresource/metadata_pb";
|
|
17
|
+
import { ApiResourceReferenceSchema, } from "@stigmer/apis/ai/stigmer/commons/apiresource/io_pb";
|
|
18
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
19
|
+
const API_VERSION = "agentic.stigmer.ai/v1";
|
|
20
|
+
/** Create a run. Mirrors Go's createAgentExecution. */
|
|
21
|
+
export async function createAgentRun(controller, input) {
|
|
22
|
+
const run = create(RunSchema, {
|
|
23
|
+
apiVersion: API_VERSION,
|
|
24
|
+
kind: "Run",
|
|
25
|
+
metadata: create(ApiResourceMetadataSchema, { name: runName(), org: input.orgId }),
|
|
26
|
+
spec: create(RunSpecSchema, {
|
|
27
|
+
message: input.message === "" ? "execute" : input.message,
|
|
28
|
+
attachments: [...input.attachments],
|
|
29
|
+
workspaceFileRefs: [...input.workspaceFileRefs],
|
|
30
|
+
autoApproveAll: input.autoApproveAll,
|
|
31
|
+
target: buildTarget(input),
|
|
32
|
+
runConfig: buildRunConfig(input.model, input.serviceTier, input.thinking),
|
|
33
|
+
// Only "plan" maps to a non-default mode; "agent"/"" leave it
|
|
34
|
+
// unspecified (agent).
|
|
35
|
+
interactionMode: input.mode === "plan" ? InteractionMode.PLAN : InteractionMode.UNSPECIFIED,
|
|
36
|
+
}),
|
|
37
|
+
});
|
|
38
|
+
return controller(RunCommandController).create(run);
|
|
39
|
+
}
|
|
40
|
+
// The turn's target: an existing session by id, or the session_spec of the
|
|
41
|
+
// conversation the backend creates for it.
|
|
42
|
+
function buildTarget(input) {
|
|
43
|
+
const sessionId = input.sessionId ?? "";
|
|
44
|
+
if (sessionId !== "")
|
|
45
|
+
return { case: "sessionId", value: sessionId };
|
|
46
|
+
return { case: "sessionSpec", value: buildSessionSpec(input) };
|
|
47
|
+
}
|
|
48
|
+
// Build the embedded session spec for the one-call bootstrap
|
|
49
|
+
// (stigmer/stigmer#249). It is always sent, even for a plain built-in
|
|
50
|
+
// assistant run: a conversation the server creates from no spec has every
|
|
51
|
+
// field at its default, and include_my_vault's default is off, so a person's
|
|
52
|
+
// run would lose their own My vault. The agent reference names the
|
|
53
|
+
// conversation's agent. A resolved harness is stamped explicitly,
|
|
54
|
+
// including "native": the value may be a deliberate per-run escape from the
|
|
55
|
+
// account's default_harness preference, so it must survive any future change
|
|
56
|
+
// to the server-side default. Empty means "no opinion" and stays off the wire
|
|
57
|
+
// (server defaults to native). Subject is left empty: the server defaults its
|
|
58
|
+
// sentinel and the async title activity replaces it. The server clones this
|
|
59
|
+
// spec onto the auto-created session and then clears it from the persisted
|
|
60
|
+
// run — the Session resource stays the single source of truth.
|
|
61
|
+
function buildSessionSpec(input) {
|
|
62
|
+
const { agentRef, harness } = input;
|
|
63
|
+
const spec = create(SessionSpecSchema, {
|
|
64
|
+
workspaceEntries: [...input.workspaceEntries],
|
|
65
|
+
vaults: [...input.vaults],
|
|
66
|
+
includeMyVault: input.includeMyVault,
|
|
67
|
+
plugins: [...input.plugins],
|
|
68
|
+
});
|
|
69
|
+
if (agentRef !== undefined) {
|
|
70
|
+
spec.agentRef = create(ApiResourceReferenceSchema, {
|
|
71
|
+
kind: ApiResourceKind.agent,
|
|
72
|
+
org: agentRef.org,
|
|
73
|
+
slug: agentRef.slug,
|
|
74
|
+
version: agentRef.version ?? "",
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (harness === "cursor")
|
|
78
|
+
spec.harness = Harness.CURSOR;
|
|
79
|
+
else if (harness === "native")
|
|
80
|
+
spec.harness = Harness.NATIVE;
|
|
81
|
+
return spec;
|
|
82
|
+
}
|
|
83
|
+
// Build the RunConfig this message asks for, or undefined when no flag is set
|
|
84
|
+
// so the less specific layers (the agent's run defaults, the operator profile)
|
|
85
|
+
// choose. An explicit --service-tier or --thinking value maps to the enum even
|
|
86
|
+
// for the base choice ("standard"/"disabled"): sent alone it adjusts the model
|
|
87
|
+
// another layer chose (thinking off for one message on an agent whose
|
|
88
|
+
// defaults turn it on), and unspecified vs explicit is a load-bearing
|
|
89
|
+
// usage-record distinction (#357/#772).
|
|
90
|
+
function buildRunConfig(model, serviceTier, thinking) {
|
|
91
|
+
if (model === "" && serviceTier === "" && thinking === "")
|
|
92
|
+
return undefined;
|
|
93
|
+
const cfg = create(RunConfigSchema);
|
|
94
|
+
if (model !== "")
|
|
95
|
+
cfg.modelName = model;
|
|
96
|
+
if (serviceTier === "fast")
|
|
97
|
+
cfg.serviceTier = ServiceTier.FAST;
|
|
98
|
+
else if (serviceTier === "standard")
|
|
99
|
+
cfg.serviceTier = ServiceTier.STANDARD;
|
|
100
|
+
if (thinking === "enabled")
|
|
101
|
+
cfg.thinkingMode = ThinkingMode.ENABLED;
|
|
102
|
+
else if (thinking === "disabled")
|
|
103
|
+
cfg.thinkingMode = ThinkingMode.DISABLED;
|
|
104
|
+
return cfg;
|
|
105
|
+
}
|
|
106
|
+
// Unique-enough placeholder name; the backend owns final identity. Go's CLI
|
|
107
|
+
// used fmt.Sprintf("execution-%d", time.Now().UnixMicro()); the prefix now
|
|
108
|
+
// says run.
|
|
109
|
+
function runName() {
|
|
110
|
+
return `run-${Date.now() * 1000}`;
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../src/resources/run/create.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,EAAE;AACF,+EAA+E;AAC/E,iEAAiE;AACjE,uFAAuF;AACvF,4EAA4E;AAC5E,kFAAkF;AAGlF,OAAO,EAAE,MAAM,EAAoB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAY,SAAS,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAE7G,OAAO,EAEL,aAAa,GACd,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAEL,eAAe,GAChB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,qDAAqD,CAAC;AAC9E,OAAO,EAAoB,iBAAiB,EAAE,MAAM,qD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AAO,GAAG,OAAO,CAAC,MAAM,CAAC;SACnD,IAAI,OAAO,KAAK,QAAQ;QAAE,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;IAC7D,OAAO,IAAI,CAAC;AACd,CAAC;AAED,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,sEAAsE;AACtE,sEAAsE;AACtE,wCAAwC;AACxC,SAAS,cAAc,CACrB,KAAa,EACb,WAA4B,EAC5B,QAAsB;IAEtB,IAAI,KAAK,KAAK,EAAE,IAAI,WAAW,KAAK,EAAE,IAAI,QAAQ,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAC5E,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;IACpC,IAAI,KAAK,KAAK,EAAE;QAAE,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC;IACxC,IAAI,WAAW,KAAK,MAAM;QAAE,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC,IAAI,CAAC;SAC1D,IAAI,WAAW,KAAK,UAAU;QAAE,GAAG,CAAC,WAAW,GAAG,WAAW,CAAC,QAAQ,CAAC;IAC5E,IAAI,QAAQ,KAAK,SAAS;QAAE,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC,OAAO,CAAC;SAC/D,IAAI,QAAQ,KAAK,UAAU;QAAE,GAAG,CAAC,YAAY,GAAG,YAAY,CAAC,QAAQ,CAAC;IAC3E,OAAO,GAAG,CAAC;AACb,CAAC;AAED,4EAA4E;AAC5E,2EAA2E;AAC3E,YAAY;AACZ,SAAS,OAAO;IACd,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Run } from "@stigmer/apis/ai/stigmer/agentic/run/v1/api_pb";
|
|
2
|
+
import { type Stigmer } from "@stigmer/client";
|
|
3
|
+
import type { HeadlessResult } from "../stream/headless.js";
|
|
4
|
+
/**
|
|
5
|
+
* Fetch the final run + usage and print the exit summary. Returns the
|
|
6
|
+
* final run so the caller can act on its artifacts (e.g. --download).
|
|
7
|
+
*/
|
|
8
|
+
export declare function runEpilogue(client: Stigmer, sessionId: string, runId: string, result: HeadlessResult): Promise<Run>;
|
|
9
|
+
//# sourceMappingURL=epilogue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epilogue.d.ts","sourceRoot":"","sources":["../../src/resources/run/epilogue.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,gDAAgD,CAAC;AAG1E,OAAO,EAAuB,KAAK,OAAO,EAA2C,MAAM,iBAAiB,CAAC;AAM7G,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;GAGG;AACH,wBAAsB,WAAW,CAC/B,MAAM,EAAE,OAAO,EACf,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,GAAG,CAAC,CAoBd"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
// The post-stream epilogue, shared by every renderer (Go's streamAgentEpilogue +
|
|
2
|
+
// run_display_summary.go). After the stream ends we fetch the authoritative final
|
|
3
|
+
// run and its usage report, then print a compact, copy-paste-friendly exit
|
|
4
|
+
// summary to stderr (AI content already went to stdout). A completed turn
|
|
5
|
+
// names its duration and its tokens, never a price; tokens counted from the
|
|
6
|
+
// runner's own report rather than the meter carry a "~". A stream that failed
|
|
7
|
+
// before reaching a phase is re-raised as a CLI error.
|
|
8
|
+
//
|
|
9
|
+
// What went wrong with a failed or stopped turn is read from the turn as the
|
|
10
|
+
// session's log folds it: the run's own error, else the turn's status error,
|
|
11
|
+
// its last error event, the platform's last note, the first failed tool use's
|
|
12
|
+
// output. The headless stream hands its folded turn over; after the Ink view,
|
|
13
|
+
// the turn's events are listed only when the summary needs them.
|
|
14
|
+
import { create } from "@bufbuild/protobuf";
|
|
15
|
+
import { RunPhase } from "@stigmer/apis/ai/stigmer/agentic/run/v1/enum_pb";
|
|
16
|
+
import { GetRunUsageReportInputSchema } from "@stigmer/apis/ai/stigmer/agentic/run/v1/io_pb";
|
|
17
|
+
import { foldSession, turnOf } from "@stigmer/client";
|
|
18
|
+
import { CliExitError, ExitCode } from "../../errors/index.js";
|
|
19
|
+
import { shouldColorize, styler } from "../../output/style.js";
|
|
20
|
+
import { formatTokenCount } from "../run-format.js";
|
|
21
|
+
import { formatAgentPhase } from "../runs.js";
|
|
22
|
+
import { listSessionEvents } from "../session.js";
|
|
23
|
+
/**
|
|
24
|
+
* Fetch the final run + usage and print the exit summary. Returns the
|
|
25
|
+
* final run so the caller can act on its artifacts (e.g. --download).
|
|
26
|
+
*/
|
|
27
|
+
export async function runEpilogue(client, sessionId, runId, result) {
|
|
28
|
+
// A stream error before any phase is a hard failure (Go: epilogue returns it).
|
|
29
|
+
if (result.error !== "" && result.phase === "") {
|
|
30
|
+
throw new CliExitError(result.error, ExitCode.General);
|
|
31
|
+
}
|
|
32
|
+
const exec = await client.run.get(runId);
|
|
33
|
+
const usage = await fetchUsage(client, runId);
|
|
34
|
+
const failure = () => resolveFailureError(client, sessionId, runId, exec, result.turn);
|
|
35
|
+
const write = (line) => void process.stderr.write(`${line}\n`);
|
|
36
|
+
const s = styler(shouldColorize(process.stderr));
|
|
37
|
+
write("");
|
|
38
|
+
if (sessionId !== "") {
|
|
39
|
+
await printSessionExit(write, s, sessionId, exec, usage, failure);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
await printCompletion(write, s, exec, failure);
|
|
43
|
+
}
|
|
44
|
+
return exec;
|
|
45
|
+
}
|
|
46
|
+
// Best-effort usage fetch; a failure here must not fail the run (the summary
|
|
47
|
+
// renders without the token count).
|
|
48
|
+
async function fetchUsage(client, runId) {
|
|
49
|
+
try {
|
|
50
|
+
const report = await client.run.getRunUsageReport(create(GetRunUsageReportInputSchema, { runId }));
|
|
51
|
+
return report.aggregate;
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
// Compact session summary + a copy-paste resume command. Mirrors Go's
|
|
58
|
+
// displaySessionExitLine + sessionResumeVerb.
|
|
59
|
+
async function printSessionExit(write, s, sessionId, exec, usage, failure) {
|
|
60
|
+
const phase = exec.status?.phase ?? RunPhase.RUN_PHASE_UNSPECIFIED;
|
|
61
|
+
const duration = formatDuration(exec.status?.startedAt ?? "", exec.status?.completedAt ?? "");
|
|
62
|
+
const tokens = formatRunTokens(usage);
|
|
63
|
+
switch (phase) {
|
|
64
|
+
case RunPhase.RUN_COMPLETED:
|
|
65
|
+
write(s.green(completedLine(duration, tokens)));
|
|
66
|
+
break;
|
|
67
|
+
case RunPhase.RUN_FAILED:
|
|
68
|
+
write(s.red(`✗ Failed: ${await failure()}`));
|
|
69
|
+
break;
|
|
70
|
+
case RunPhase.RUN_CANCELLED:
|
|
71
|
+
write(s.yellow("Cancelled"));
|
|
72
|
+
break;
|
|
73
|
+
case RunPhase.RUN_TERMINATED:
|
|
74
|
+
write(s.yellow(`Stopped: ${await failure()}`));
|
|
75
|
+
break;
|
|
76
|
+
default:
|
|
77
|
+
write(s.yellow(`Exited (${formatAgentPhase(phase)})`));
|
|
78
|
+
}
|
|
79
|
+
write("");
|
|
80
|
+
write(` ${resumeVerb(phase)} stigmer resume ${sessionId}`);
|
|
81
|
+
}
|
|
82
|
+
// Non-session completion (rare for run; e.g. a degraded backend). Mirrors the
|
|
83
|
+
// information of Go's displayAgentExecutionComplete without the panel chrome.
|
|
84
|
+
async function printCompletion(write, s, exec, failure) {
|
|
85
|
+
const phase = exec.status?.phase ?? RunPhase.RUN_PHASE_UNSPECIFIED;
|
|
86
|
+
if (phase === RunPhase.RUN_FAILED) {
|
|
87
|
+
write(s.red(`✗ Run failed: ${await failure()}`));
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
write(s.green(`✓ Run ${formatAgentPhase(phase)}`));
|
|
91
|
+
}
|
|
92
|
+
function completedLine(duration, tokens) {
|
|
93
|
+
const parts = [duration, tokens].filter((part) => part !== "");
|
|
94
|
+
return parts.length > 0 ? `✓ Completed (${parts.join(" · ")})` : "✓ Completed";
|
|
95
|
+
}
|
|
96
|
+
// "18.4k tokens", or "" when the report is missing or counted none. The run
|
|
97
|
+
// aggregate carries no estimated flag of its own: a run counted from its
|
|
98
|
+
// runner's report adds tokens and no metered calls, so tokens with zero calls
|
|
99
|
+
// read as estimated ("~18.4k tokens").
|
|
100
|
+
function formatRunTokens(usage) {
|
|
101
|
+
if (usage === undefined || usage.totalTokens <= 0n)
|
|
102
|
+
return "";
|
|
103
|
+
const estimated = usage.llmCallCount === 0 ? "~" : "";
|
|
104
|
+
return `${estimated}${formatTokenCount(usage.totalTokens)} tokens`;
|
|
105
|
+
}
|
|
106
|
+
function resumeVerb(phase) {
|
|
107
|
+
switch (phase) {
|
|
108
|
+
case RunPhase.RUN_COMPLETED:
|
|
109
|
+
return "To continue:";
|
|
110
|
+
case RunPhase.RUN_FAILED:
|
|
111
|
+
return "To retry: ";
|
|
112
|
+
default:
|
|
113
|
+
return "To resume: ";
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
// The run's own error, else what the turn's events say (module header), else
|
|
117
|
+
// a generic pointer to the logs.
|
|
118
|
+
async function resolveFailureError(client, sessionId, runId, exec, folded) {
|
|
119
|
+
const error = exec.status?.error ?? "";
|
|
120
|
+
if (error !== "")
|
|
121
|
+
return error;
|
|
122
|
+
const turn = folded ?? (await readTurn(client, sessionId, runId));
|
|
123
|
+
if (turn === undefined)
|
|
124
|
+
return GENERIC_FAILURE;
|
|
125
|
+
if (turn.status !== undefined && turn.status.error !== "")
|
|
126
|
+
return turn.status.error;
|
|
127
|
+
const lastError = turn.errors.at(-1);
|
|
128
|
+
if (lastError !== undefined && lastError.message !== "")
|
|
129
|
+
return lastError.message;
|
|
130
|
+
const note = [...turn.items].reverse().find((item) => item.kind === "note" && item.text !== "");
|
|
131
|
+
if (note !== undefined)
|
|
132
|
+
return note.text;
|
|
133
|
+
return firstFailedOutput(turn.items) ?? GENERIC_FAILURE;
|
|
134
|
+
}
|
|
135
|
+
// The turn as its events fold; undefined outside a session.
|
|
136
|
+
async function readTurn(client, sessionId, runId) {
|
|
137
|
+
if (sessionId === "")
|
|
138
|
+
return undefined;
|
|
139
|
+
return turnOf(foldSession(await listSessionEvents(client, sessionId, runId)), runId);
|
|
140
|
+
}
|
|
141
|
+
// The output of the first tool use that failed, a subagent's included.
|
|
142
|
+
function firstFailedOutput(items) {
|
|
143
|
+
for (const item of items) {
|
|
144
|
+
if (item.kind !== "tool_use")
|
|
145
|
+
continue;
|
|
146
|
+
const text = item.result?.text ?? "";
|
|
147
|
+
if (item.state === "failed" && text !== "")
|
|
148
|
+
return text;
|
|
149
|
+
const nested = item.thread === undefined ? undefined : firstFailedOutput(item.thread.items);
|
|
150
|
+
if (nested !== undefined)
|
|
151
|
+
return nested;
|
|
152
|
+
}
|
|
153
|
+
return undefined;
|
|
154
|
+
}
|
|
155
|
+
const GENERIC_FAILURE = "Run failed (error details unavailable — check run logs)";
|
|
156
|
+
// "1m23s"/"45s" between two RFC3339 timestamps, or "" when unknown. Mirrors Go's
|
|
157
|
+
// parseDuration + Round(time.Second).
|
|
158
|
+
function formatDuration(startedAt, completedAt) {
|
|
159
|
+
if (startedAt === "" || completedAt === "")
|
|
160
|
+
return "";
|
|
161
|
+
const start = Date.parse(startedAt);
|
|
162
|
+
const end = Date.parse(completedAt);
|
|
163
|
+
if (Number.isNaN(start) || Number.isNaN(end) || end < start)
|
|
164
|
+
return "";
|
|
165
|
+
const totalSeconds = Math.round((end - start) / 1000);
|
|
166
|
+
if (totalSeconds < 60)
|
|
167
|
+
return `${totalSeconds}s`;
|
|
168
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
169
|
+
const seconds = totalSeconds % 60;
|
|
170
|
+
return seconds === 0 ? `${minutes}m` : `${minutes}m${seconds}s`;
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=epilogue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"epilogue.js","sourceRoot":"","sources":["../../src/resources/run/epilogue.ts"],"names":[],"mappings":"AAAA,iFAAiF;AACjF,kFAAkF;AAClF,2EAA2E;AAC3E,0EAA0E;AAC1E,4EAA4E;AAC5E,8EAA8E;AAC9E,uDAAuD;AACvD,EAAE;AACF,6EAA6E;AAC7E,6EAA6E;AAC7E,8EAA8E;AAC9E,8EAA8E;AAC9E,iEAAiE;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iDAAiD,CAAC;AAE3E,OAAO,EAAE,4BAA4B,EAAE,MAAM,+CAA+C,CAAC;AAE7F,OAAO,EAAE,WAAW,EAAE,MAAM,EAAyD,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAGlD;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,MAAe,EACf,SAAiB,EACjB,KAAa,EACb,MAAsB;IAEtB,+EAA+E;IAC/E,IAAI,MAAM,CAAC,KAAK,KAAK,EAAE,IAAI,MAAM,CAAC,KAAK,KAAK,EAAE,EAAE,CAAC;QAC/C,MAAM,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,IAAI,GAA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,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IACtD,IAAI,YAAY,GAAG,EAAE;QAAE,OAAO,GAAG,YAAY,GAAG,CAAC;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;IAC9C,MAAM,OAAO,GAAG,YAAY,GAAG,EAAE,CAAC;IAClC,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,OAAO,IAAI,OAAO,GAAG,CAAC;AAClE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { WorkspaceEntry } from "@stigmer/apis/ai/stigmer/agentic/session/v1/workspace_pb";
|
|
2
|
+
import type { HarnessFlag, RunMode } from "./prepare.js";
|
|
3
|
+
export interface SessionHeaderInfo {
|
|
4
|
+
readonly agentName: string;
|
|
5
|
+
readonly sessionId: string;
|
|
6
|
+
/** Session subject; shown for resumed sessions, empty for fresh runs. */
|
|
7
|
+
readonly subject?: string;
|
|
8
|
+
readonly model: string;
|
|
9
|
+
readonly mode: RunMode;
|
|
10
|
+
/**
|
|
11
|
+
* Resolved harness for the session. Surfaced only when it is "cursor":
|
|
12
|
+
* a harness switch changes the toolset, conversation-state model, and
|
|
13
|
+
* billing tier, and it may come from the account preference rather than
|
|
14
|
+
* a flag — a cursor session must never start silently (the CLI
|
|
15
|
+
* counterpart of the web composer's harness selector).
|
|
16
|
+
*/
|
|
17
|
+
readonly harness?: HarnessFlag;
|
|
18
|
+
readonly workspaces: readonly string[];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Write the session header to `out` (stderr). Empty fields are omitted, exactly
|
|
22
|
+
* like Go's formatMetadataSection. A header with no populated fields prints
|
|
23
|
+
* nothing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function renderSessionHeader(out: {
|
|
26
|
+
write(chunk: string): unknown;
|
|
27
|
+
isTTY?: boolean;
|
|
28
|
+
}, info: SessionHeaderInfo): void;
|
|
29
|
+
/** Displayable names from workspace entries (Go's workspaceNames). */
|
|
30
|
+
export declare function workspaceNames(entries: readonly WorkspaceEntry[]): string[];
|
|
31
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/resources/run/header.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;CACxC;AAKD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE;IAAE,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAoB1H;AAOD,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,MAAM,EAAE,CAE3E"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// The session header shown before a headless stream starts (Go's
|
|
2
|
+
// renderSessionHeader / sessionHeaderInfo in run_display_header.go).
|
|
3
|
+
//
|
|
4
|
+
// Deliberate divergence (clean over chrome): Go renders a lipgloss bordered
|
|
5
|
+
// panel with a side-by-side "recent sessions" column. That panel is TTY
|
|
6
|
+
// eye-candy; the interactive path here is owned by Ink's SessionView, which
|
|
7
|
+
// draws its own header. The only consumers of THIS header are the headless
|
|
8
|
+
// (--json / non-TTY plaintext) paths, where the output target is stderr — a
|
|
9
|
+
// bordered panel there would be noise. So we emit a compact, aligned key/value
|
|
10
|
+
// block carrying the same fields (Agent, Session, Model, Mode, Workspaces).
|
|
11
|
+
import { shouldColorize, styler } from "../../output/style.js";
|
|
12
|
+
// Fixed label column width; sized to the longest label ("Workspaces") + ": ".
|
|
13
|
+
const LABEL_WIDTH = 12;
|
|
14
|
+
/**
|
|
15
|
+
* Write the session header to `out` (stderr). Empty fields are omitted, exactly
|
|
16
|
+
* like Go's formatMetadataSection. A header with no populated fields prints
|
|
17
|
+
* nothing.
|
|
18
|
+
*/
|
|
19
|
+
export function renderSessionHeader(out, info) {
|
|
20
|
+
const s = styler(shouldColorize(out));
|
|
21
|
+
const lines = [];
|
|
22
|
+
if (info.agentName !== "")
|
|
23
|
+
lines.push(row(s, "Agent", info.agentName));
|
|
24
|
+
if (info.sessionId !== "")
|
|
25
|
+
lines.push(row(s, "Session", info.sessionId));
|
|
26
|
+
if ((info.subject ?? "") !== "")
|
|
27
|
+
lines.push(row(s, "Subject", info.subject ?? ""));
|
|
28
|
+
if (info.model !== "")
|
|
29
|
+
lines.push(row(s, "Model", info.model));
|
|
30
|
+
// Only "cursor" is surfaced; native/"" is the default and stays implicit.
|
|
31
|
+
if (info.harness === "cursor")
|
|
32
|
+
lines.push(row(s, "Harness", "Cursor"));
|
|
33
|
+
// Only "plan" is surfaced; "agent"/"" is the default and stays implicit.
|
|
34
|
+
if (info.mode === "plan")
|
|
35
|
+
lines.push(row(s, "Mode", "Plan (read-only)"));
|
|
36
|
+
if (info.workspaces.length > 0) {
|
|
37
|
+
lines.push(row(s, "Workspaces", info.workspaces[0]));
|
|
38
|
+
const indent = " ".repeat(LABEL_WIDTH);
|
|
39
|
+
for (const ws of info.workspaces.slice(1))
|
|
40
|
+
lines.push(`${indent}${ws}`);
|
|
41
|
+
}
|
|
42
|
+
if (lines.length === 0)
|
|
43
|
+
return;
|
|
44
|
+
out.write(`${lines.join("\n")}\n\n`);
|
|
45
|
+
}
|
|
46
|
+
function row(s, label, value) {
|
|
47
|
+
const padded = `${label}:`.padEnd(LABEL_WIDTH, " ");
|
|
48
|
+
return `${s.dim(padded)}${value}`;
|
|
49
|
+
}
|
|
50
|
+
/** Displayable names from workspace entries (Go's workspaceNames). */
|
|
51
|
+
export function workspaceNames(entries) {
|
|
52
|
+
return entries.map((e) => e.name);
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.js","sourceRoot":"","sources":["../../src/resources/run/header.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,qEAAqE;AACrE,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAG5E,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAqB/D,8EAA8E;AAC9E,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAuD,EAAE,IAAuB;IAClH,MAAM,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC;IACtC,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,IAAI,IAAI,CAAC,SAAS,KAAK,EAAE;QAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IACvE,IAAI,IAAI,CAAC,SAAS,KAAK,E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C,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AACvC,CAAC;AAED,SAAS,GAAG,CAAC,CAA4B,EAAE,KAAa,EAAE,KAAa;IACrE,MAAM,MAAM,GAAG,GAAG,KAAK,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACpD,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,KAAK,EAAE,CAAC;AACpC,CAAC;AAED,sEAAsE;AACtE,MAAM,UAAU,cAAc,CAAC,OAAkC;IAC/D,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ApiResourceReference } from "@stigmer/apis/ai/stigmer/commons/apiresource/io_pb";
|
|
2
|
+
import type { Stigmer } from "@stigmer/client";
|
|
3
|
+
/** The plugin reads an id lookup needs, injectable for tests. */
|
|
4
|
+
export type PluginReader = Pick<Stigmer, "plugin">;
|
|
5
|
+
/**
|
|
6
|
+
* Resolve each `--plugin` reference to the reference the conversation
|
|
7
|
+
* stores, in order, a reference written twice once. An empty or malformed
|
|
8
|
+
* reference is a usage error.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolveRunPlugins(client: PluginReader, refs: readonly string[], org: string): Promise<ApiResourceReference[]>;
|
|
11
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../../src/resources/run/plugins.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG/C,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAEnD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAMjC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// The plugins a new conversation uses, from `stigmer run --plugin <ref>`.
|
|
2
|
+
//
|
|
3
|
+
// A conversation that lists a plugin gets its skills, its agents, its MCP
|
|
4
|
+
// servers' tools and its hooks, as an agent that lists it does; with no
|
|
5
|
+
// agent, the built-in assistant runs with them. Each reference resolves by
|
|
6
|
+
// the one rule every run flag naming resources shares (references.ts), and
|
|
7
|
+
// names the installed version: the server reads the plugin at each turn.
|
|
8
|
+
import { ApiResourceKind } from "@stigmer/apis/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
9
|
+
import { resolveRunReferences } from "./references.js";
|
|
10
|
+
/**
|
|
11
|
+
* Resolve each `--plugin` reference to the reference the conversation
|
|
12
|
+
* stores, in order, a reference written twice once. An empty or malformed
|
|
13
|
+
* reference is a usage error.
|
|
14
|
+
*/
|
|
15
|
+
export function resolveRunPlugins(client, refs, org) {
|
|
16
|
+
return resolveRunReferences({ flag: "--plugin", noun: "plugin", kind: ApiResourceKind.plugin, get: (id) => client.plugin.get(id) }, refs, org);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=plugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.js","sourceRoot":"","sources":["../../src/resources/run/plugins.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,0EAA0E;AAC1E,wEAAwE;AACxE,2EAA2E;AAC3E,2EAA2E;AAC3E,yEAAyE;AAEzE,OAAO,EAAE,eAAe,EAAE,MAAM,mFAAmF,CAAC;AAGpH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAKvD;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAC/B,MAAoB,EACpB,IAAuB,EACvB,GAAW;IAEX,OAAO,oBAAoB,CACzB,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EACtG,IAAI,EACJ,GAAG,CACJ,CAAC;AACJ,CAAC"}
|