@stigmer/cli 3.0.8
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 +190 -0
- package/README.md +42 -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 +56 -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 +33 -0
- package/auth/token.d.ts.map +1 -0
- package/auth/token.js +111 -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 +25 -0
- package/client/client.d.ts.map +1 -0
- package/client/client.js +55 -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/commands/agent-exec-flags.d.ts +30 -0
- package/commands/agent-exec-flags.d.ts.map +1 -0
- package/commands/agent-exec-flags.js +52 -0
- package/commands/agent-exec-flags.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 +3 -0
- package/commands/apikey/index.d.ts.map +1 -0
- package/commands/apikey/index.js +118 -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 +155 -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 +76 -0
- package/commands/auth/index.js.map +1 -0
- package/commands/completion.d.ts +3 -0
- package/commands/completion.d.ts.map +1 -0
- package/commands/completion.js +82 -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 +49 -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 +23 -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 +56 -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 +41 -0
- package/commands/delete.js.map +1 -0
- package/commands/diff.d.ts +3 -0
- package/commands/diff.d.ts.map +1 -0
- package/commands/diff.js +87 -0
- package/commands/diff.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 +46 -0
- package/commands/download.js.map +1 -0
- package/commands/draft.d.ts +3 -0
- package/commands/draft.d.ts.map +1 -0
- package/commands/draft.js +97 -0
- package/commands/draft.js.map +1 -0
- package/commands/execution/approve.d.ts +3 -0
- package/commands/execution/approve.d.ts.map +1 -0
- package/commands/execution/approve.js +60 -0
- package/commands/execution/approve.js.map +1 -0
- package/commands/execution/control.d.ts +3 -0
- package/commands/execution/control.d.ts.map +1 -0
- package/commands/execution/control.js +57 -0
- package/commands/execution/control.js.map +1 -0
- package/commands/execution/index.d.ts +3 -0
- package/commands/execution/index.d.ts.map +1 -0
- package/commands/execution/index.js +21 -0
- package/commands/execution/index.js.map +1 -0
- package/commands/execution/logs.d.ts +3 -0
- package/commands/execution/logs.d.ts.map +1 -0
- package/commands/execution/logs.js +34 -0
- package/commands/execution/logs.js.map +1 -0
- package/commands/execution/trace.d.ts +3 -0
- package/commands/execution/trace.d.ts.map +1 -0
- package/commands/execution/trace.js +24 -0
- package/commands/execution/trace.js.map +1 -0
- package/commands/get.d.ts +3 -0
- package/commands/get.d.ts.map +1 -0
- package/commands/get.js +81 -0
- package/commands/get.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 +22 -0
- package/commands/internal-daemon.js.map +1 -0
- package/commands/list.d.ts +3 -0
- package/commands/list.d.ts.map +1 -0
- package/commands/list.js +117 -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/mcp-server.d.ts +22 -0
- package/commands/mcp-server.d.ts.map +1 -0
- package/commands/mcp-server.js +104 -0
- package/commands/mcp-server.js.map +1 -0
- package/commands/push.d.ts +3 -0
- package/commands/push.d.ts.map +1 -0
- package/commands/push.js +150 -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 +87 -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 +193 -0
- package/commands/run.js.map +1 -0
- package/commands/search.d.ts +3 -0
- package/commands/search.d.ts.map +1 -0
- package/commands/search.js +73 -0
- package/commands/search.js.map +1 -0
- package/commands/seedpack.d.ts +3 -0
- package/commands/seedpack.d.ts.map +1 -0
- package/commands/seedpack.js +76 -0
- package/commands/seedpack.js.map +1 -0
- package/commands/setup.d.ts +3 -0
- package/commands/setup.d.ts.map +1 -0
- package/commands/setup.js +57 -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 +39 -0
- package/commands/up.js.map +1 -0
- package/commands/usage.d.ts +3 -0
- package/commands/usage.d.ts.map +1 -0
- package/commands/usage.js +56 -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 +64 -0
- package/commands/validate.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 +39 -0
- package/config/config.d.ts.map +1 -0
- package/config/config.js +85 -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 +53 -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 +33 -0
- package/config/resolve.d.ts.map +1 -0
- package/config/resolve.js +77 -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 +158 -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 +12 -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 +38 -0
- package/local/artifact.d.ts.map +1 -0
- package/local/artifact.js +133 -0
- package/local/artifact.js.map +1 -0
- package/local/constants.d.ts +36 -0
- package/local/constants.d.ts.map +1 -0
- package/local/constants.js +44 -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 +105 -0
- package/local/daemon/components.js.map +1 -0
- package/local/daemon/env.d.ts +55 -0
- package/local/daemon/env.d.ts.map +1 -0
- package/local/daemon/env.js +82 -0
- package/local/daemon/env.js.map +1 -0
- package/local/daemon/host.d.ts +7 -0
- package/local/daemon/host.d.ts.map +1 -0
- package/local/daemon/host.js +74 -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 +11 -0
- package/local/daemon/launch.d.ts.map +1 -0
- package/local/daemon/launch.js +219 -0
- package/local/daemon/launch.js.map +1 -0
- package/local/daemon/process.d.ts +28 -0
- package/local/daemon/process.d.ts.map +1 -0
- package/local/daemon/process.js +149 -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 +63 -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 +30 -0
- package/local/llm-config.d.ts.map +1 -0
- package/local/llm-config.js +93 -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/paths.d.ts +26 -0
- package/local/paths.d.ts.map +1 -0
- package/local/paths.js +57 -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 +6 -0
- package/local/runtime/index.js.map +1 -0
- package/local/runtime/node.d.ts +8 -0
- package/local/runtime/node.d.ts.map +1 -0
- package/local/runtime/node.js +59 -0
- package/local/runtime/node.js.map +1 -0
- package/local/runtime/runner.d.ts +40 -0
- package/local/runtime/runner.d.ts.map +1 -0
- package/local/runtime/runner.js +154 -0
- package/local/runtime/runner.js.map +1 -0
- package/local/runtime/server.d.ts +39 -0
- package/local/runtime/server.d.ts.map +1 -0
- package/local/runtime/server.js +141 -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/seedpack/apply.d.ts +43 -0
- package/local/seedpack/apply.d.ts.map +1 -0
- package/local/seedpack/apply.js +94 -0
- package/local/seedpack/apply.js.map +1 -0
- package/local/seedpack/content.d.ts +56 -0
- package/local/seedpack/content.d.ts.map +1 -0
- package/local/seedpack/content.js +201 -0
- package/local/seedpack/content.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 +22 -0
- package/local/setup/wizard.d.ts.map +1 -0
- package/local/setup/wizard.js +65 -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 +12 -0
- package/local/state/lock.d.ts.map +1 -0
- package/local/state/lock.js +70 -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 +16 -0
- package/local/state/proc.d.ts.map +1 -0
- package/local/state/proc.js +69 -0
- package/local/state/proc.js.map +1 -0
- package/local/state/startup-config.d.ts +23 -0
- package/local/state/startup-config.d.ts.map +1 -0
- package/local/state/startup-config.js +33 -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 +168 -0
- package/local/status.js.map +1 -0
- package/local/temporal/download.d.ts +20 -0
- package/local/temporal/download.d.ts.map +1 -0
- package/local/temporal/download.js +36 -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 +8 -0
- package/local/temporal/inspect.d.ts.map +1 -0
- package/local/temporal/inspect.js +33 -0
- package/local/temporal/inspect.js.map +1 -0
- package/local/temporal/manager.d.ts +50 -0
- package/local/temporal/manager.d.ts.map +1 -0
- package/local/temporal/manager.js +208 -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 +4 -0
- package/local/webconsole/index.d.ts.map +1 -0
- package/local/webconsole/index.js +13 -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/output/command-result.d.ts +47 -0
- package/output/command-result.d.ts.map +1 -0
- package/output/command-result.js +134 -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 +42 -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 +24 -0
- package/output/ndjson.d.ts.map +1 -0
- package/output/ndjson.js +38 -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 +49 -0
- package/program.d.ts +3 -0
- package/program.d.ts.map +1 -0
- package/program.js +95 -0
- package/program.js.map +1 -0
- package/registry/aliases.d.ts +18 -0
- package/registry/aliases.d.ts.map +1 -0
- package/registry/aliases.js +85 -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 +12 -0
- package/registry/metadata.d.ts.map +1 -0
- package/registry/metadata.js +49 -0
- package/registry/metadata.js.map +1 -0
- package/registry/registry.d.ts +39 -0
- package/registry/registry.d.ts.map +1 -0
- package/registry/registry.js +59 -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 +48 -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 +36 -0
- package/registry/verbs.js.map +1 -0
- package/resources/apply/apply.d.ts +55 -0
- package/resources/apply/apply.d.ts.map +1 -0
- package/resources/apply/apply.js +163 -0
- package/resources/apply/apply.js.map +1 -0
- package/resources/apply/declarative.d.ts +106 -0
- package/resources/apply/declarative.d.ts.map +1 -0
- package/resources/apply/declarative.js +378 -0
- package/resources/apply/declarative.js.map +1 -0
- package/resources/apply/discovery.d.ts +7 -0
- package/resources/apply/discovery.d.ts.map +1 -0
- package/resources/apply/discovery.js +47 -0
- package/resources/apply/discovery.js.map +1 -0
- package/resources/apply/handlers.d.ts +15 -0
- package/resources/apply/handlers.d.ts.map +1 -0
- package/resources/apply/handlers.js +126 -0
- package/resources/apply/handlers.js.map +1 -0
- package/resources/apply/synth/project-track.d.ts +21 -0
- package/resources/apply/synth/project-track.d.ts.map +1 -0
- package/resources/apply/synth/project-track.js +102 -0
- package/resources/apply/synth/project-track.js.map +1 -0
- package/resources/apply/synth/reader.d.ts +18 -0
- package/resources/apply/synth/reader.d.ts.map +1 -0
- package/resources/apply/synth/reader.js +55 -0
- package/resources/apply/synth/reader.js.map +1 -0
- package/resources/apply/synth/runtime.d.ts +8 -0
- package/resources/apply/synth/runtime.d.ts.map +1 -0
- package/resources/apply/synth/runtime.js +32 -0
- package/resources/apply/synth/runtime.js.map +1 -0
- package/resources/apply/synth/synthesize.d.ts +43 -0
- package/resources/apply/synth/synthesize.d.ts.map +1 -0
- package/resources/apply/synth/synthesize.js +115 -0
- package/resources/apply/synth/synthesize.js.map +1 -0
- package/resources/connect/connect.d.ts +24 -0
- package/resources/connect/connect.d.ts.map +1 -0
- package/resources/connect/connect.js +71 -0
- package/resources/connect/connect.js.map +1 -0
- package/resources/connect/discover.d.ts +5 -0
- package/resources/connect/discover.d.ts.map +1 -0
- package/resources/connect/discover.js +100 -0
- package/resources/connect/discover.js.map +1 -0
- package/resources/connect/display.d.ts +5 -0
- package/resources/connect/display.d.ts.map +1 -0
- package/resources/connect/display.js +58 -0
- package/resources/connect/display.js.map +1 -0
- package/resources/connect/oauth.d.ts +45 -0
- package/resources/connect/oauth.d.ts.map +1 -0
- package/resources/connect/oauth.js +152 -0
- package/resources/connect/oauth.js.map +1 -0
- package/resources/delete.d.ts +18 -0
- package/resources/delete.d.ts.map +1 -0
- package/resources/delete.js +180 -0
- package/resources/delete.js.map +1 -0
- package/resources/diff.d.ts +16 -0
- package/resources/diff.d.ts.map +1 -0
- package/resources/diff.js +158 -0
- package/resources/diff.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 +107 -0
- package/resources/download.js.map +1 -0
- package/resources/execution-approve.d.ts +26 -0
- package/resources/execution-approve.d.ts.map +1 -0
- package/resources/execution-approve.js +69 -0
- package/resources/execution-approve.js.map +1 -0
- package/resources/execution-control.d.ts +16 -0
- package/resources/execution-control.d.ts.map +1 -0
- package/resources/execution-control.js +57 -0
- package/resources/execution-control.js.map +1 -0
- package/resources/execution-format.d.ts +12 -0
- package/resources/execution-format.d.ts.map +1 -0
- package/resources/execution-format.js +56 -0
- package/resources/execution-format.js.map +1 -0
- package/resources/execution-logs.d.ts +16 -0
- package/resources/execution-logs.d.ts.map +1 -0
- package/resources/execution-logs.js +132 -0
- package/resources/execution-logs.js.map +1 -0
- package/resources/execution-trace.d.ts +10 -0
- package/resources/execution-trace.d.ts.map +1 -0
- package/resources/execution-trace.js +125 -0
- package/resources/execution-trace.js.map +1 -0
- package/resources/execution.d.ts +59 -0
- package/resources/execution.d.ts.map +1 -0
- package/resources/execution.js +192 -0
- package/resources/execution.js.map +1 -0
- package/resources/get-bindings.d.ts +12 -0
- package/resources/get-bindings.d.ts.map +1 -0
- package/resources/get-bindings.js +40 -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 +31 -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/defaults.d.ts +2 -0
- package/resources/ignore/defaults.d.ts.map +1 -0
- package/resources/ignore/defaults.js +140 -0
- package/resources/ignore/defaults.js.map +1 -0
- package/resources/ignore/index.d.ts +5 -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/match.d.ts +3 -0
- package/resources/ignore/match.d.ts.map +1 -0
- package/resources/ignore/match.js +166 -0
- package/resources/ignore/match.js.map +1 -0
- package/resources/ignore/matcher.d.ts +44 -0
- package/resources/ignore/matcher.d.ts.map +1 -0
- package/resources/ignore/matcher.js +125 -0
- package/resources/ignore/matcher.js.map +1 -0
- package/resources/ignore/pattern.d.ts +13 -0
- package/resources/ignore/pattern.d.ts.map +1 -0
- package/resources/ignore/pattern.js +118 -0
- package/resources/ignore/pattern.js.map +1 -0
- package/resources/list.d.ts +7 -0
- package/resources/list.d.ts.map +1 -0
- package/resources/list.js +82 -0
- package/resources/list.js.map +1 -0
- package/resources/mcp/runtime-env.d.ts +23 -0
- package/resources/mcp/runtime-env.d.ts.map +1 -0
- package/resources/mcp/runtime-env.js +68 -0
- package/resources/mcp/runtime-env.js.map +1 -0
- package/resources/picker/ink.d.ts +35 -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/reference.d.ts +32 -0
- package/resources/reference.d.ts.map +1 -0
- package/resources/reference.js +128 -0
- package/resources/reference.js.map +1 -0
- package/resources/render.d.ts +28 -0
- package/resources/render.d.ts.map +1 -0
- package/resources/render.js +87 -0
- package/resources/render.js.map +1 -0
- package/resources/run/agent-exec.d.ts +15 -0
- package/resources/run/agent-exec.d.ts.map +1 -0
- package/resources/run/agent-exec.js +81 -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 +209 -0
- package/resources/run/attachments.js.map +1 -0
- package/resources/run/create.d.ts +56 -0
- package/resources/run/create.d.ts.map +1 -0
- package/resources/run/create.js +105 -0
- package/resources/run/create.js.map +1 -0
- package/resources/run/env.d.ts +18 -0
- package/resources/run/env.d.ts.map +1 -0
- package/resources/run/env.js +147 -0
- package/resources/run/env.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 +144 -0
- package/resources/run/epilogue.js.map +1 -0
- package/resources/run/header.d.ts +23 -0
- package/resources/run/header.d.ts.map +1 -0
- package/resources/run/header.js +51 -0
- package/resources/run/header.js.map +1 -0
- package/resources/run/prepare.d.ts +60 -0
- package/resources/run/prepare.d.ts.map +1 -0
- package/resources/run/prepare.js +78 -0
- package/resources/run/prepare.js.map +1 -0
- package/resources/run/resolve.d.ts +8 -0
- package/resources/run/resolve.d.ts.map +1 -0
- package/resources/run/resolve.js +28 -0
- package/resources/run/resolve.js.map +1 -0
- package/resources/run/resume.d.ts +13 -0
- package/resources/run/resume.d.ts.map +1 -0
- package/resources/run/resume.js +94 -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 +80 -0
- package/resources/run/stream.js.map +1 -0
- package/resources/run/workflow-stream.d.ts +25 -0
- package/resources/run/workflow-stream.d.ts.map +1 -0
- package/resources/run/workflow-stream.js +152 -0
- package/resources/run/workflow-stream.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/search.d.ts +22 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +23 -0
- package/resources/search.js.map +1 -0
- package/resources/session.d.ts +19 -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 +84 -0
- package/resources/skill.d.ts.map +1 -0
- package/resources/skill.js +342 -0
- package/resources/skill.js.map +1 -0
- package/resources/stream/approval-detect.d.ts +38 -0
- package/resources/stream/approval-detect.d.ts.map +1 -0
- package/resources/stream/approval-detect.js +93 -0
- package/resources/stream/approval-detect.js.map +1 -0
- package/resources/stream/convert.d.ts +38 -0
- package/resources/stream/convert.d.ts.map +1 -0
- package/resources/stream/convert.js +178 -0
- package/resources/stream/convert.js.map +1 -0
- package/resources/stream/diff.d.ts +29 -0
- package/resources/stream/diff.d.ts.map +1 -0
- package/resources/stream/diff.js +214 -0
- package/resources/stream/diff.js.map +1 -0
- package/resources/stream/events.d.ts +137 -0
- package/resources/stream/events.d.ts.map +1 -0
- package/resources/stream/events.js +15 -0
- package/resources/stream/events.js.map +1 -0
- package/resources/stream/headless.d.ts +38 -0
- package/resources/stream/headless.d.ts.map +1 -0
- package/resources/stream/headless.js +75 -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 +25 -0
- package/resources/stream/render-ndjson.d.ts.map +1 -0
- package/resources/stream/render-ndjson.js +156 -0
- package/resources/stream/render-ndjson.js.map +1 -0
- package/resources/stream/render-plaintext.d.ts +18 -0
- package/resources/stream/render-plaintext.d.ts.map +1 -0
- package/resources/stream/render-plaintext.js +71 -0
- package/resources/stream/render-plaintext.js.map +1 -0
- package/resources/stream/snapshot.d.ts +8 -0
- package/resources/stream/snapshot.d.ts.map +1 -0
- package/resources/stream/snapshot.js +163 -0
- package/resources/stream/snapshot.js.map +1 -0
- package/resources/stream/subagent.d.ts +12 -0
- package/resources/stream/subagent.d.ts.map +1 -0
- package/resources/stream/subagent.js +76 -0
- package/resources/stream/subagent.js.map +1 -0
- package/resources/stream/submit.d.ts +20 -0
- package/resources/stream/submit.d.ts.map +1 -0
- package/resources/stream/submit.js +125 -0
- package/resources/stream/submit.js.map +1 -0
- package/resources/stream/todo.d.ts +11 -0
- package/resources/stream/todo.d.ts.map +1 -0
- package/resources/stream/todo.js +44 -0
- package/resources/stream/todo.js.map +1 -0
- package/resources/stream/tool-state.d.ts +31 -0
- package/resources/stream/tool-state.d.ts.map +1 -0
- package/resources/stream/tool-state.js +126 -0
- package/resources/stream/tool-state.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/stream/workflow-event-view.d.ts +21 -0
- package/resources/stream/workflow-event-view.d.ts.map +1 -0
- package/resources/stream/workflow-event-view.js +88 -0
- package/resources/stream/workflow-event-view.js.map +1 -0
- package/resources/stream/workflow-render-ndjson.d.ts +5 -0
- package/resources/stream/workflow-render-ndjson.d.ts.map +1 -0
- package/resources/stream/workflow-render-ndjson.js +54 -0
- package/resources/stream/workflow-render-ndjson.js.map +1 -0
- package/resources/stream/workflow-render-plaintext.d.ts +8 -0
- package/resources/stream/workflow-render-plaintext.d.ts.map +1 -0
- package/resources/stream/workflow-render-plaintext.js +34 -0
- package/resources/stream/workflow-render-plaintext.js.map +1 -0
- package/resources/tag.d.ts +4 -0
- package/resources/tag.d.ts.map +1 -0
- package/resources/tag.js +36 -0
- package/resources/tag.js.map +1 -0
- package/resources/usage.d.ts +14 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +251 -0
- package/resources/usage.js.map +1 -0
- package/resources/validate.d.ts +6 -0
- package/resources/validate.d.ts.map +1 -0
- package/resources/validate.js +28 -0
- package/resources/validate.js.map +1 -0
- package/resources/version.d.ts +6 -0
- package/resources/version.d.ts.map +1 -0
- package/resources/version.js +75 -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 +61 -0
- package/src/auth/pages.ts +31 -0
- package/src/auth/pkce.test.ts +37 -0
- package/src/auth/pkce.ts +26 -0
- package/src/auth/token.test.ts +95 -0
- package/src/auth/token.ts +135 -0
- package/src/backend.ts +15 -0
- package/src/cli/stigmer.ts +16 -0
- package/src/client/client.test.ts +46 -0
- package/src/client/client.ts +84 -0
- package/src/client/index.ts +3 -0
- package/src/commands/agent-exec-flags.ts +75 -0
- package/src/commands/apikey/duration.test.ts +23 -0
- package/src/commands/apikey/duration.ts +35 -0
- package/src/commands/apikey/index.ts +133 -0
- package/src/commands/apply.ts +213 -0
- package/src/commands/auth/index.ts +87 -0
- package/src/commands/completion.ts +96 -0
- package/src/commands/config/backend.ts +58 -0
- package/src/commands/config/context.ts +26 -0
- package/src/commands/config/index.ts +18 -0
- package/src/commands/config/kv.ts +44 -0
- package/src/commands/connect.ts +75 -0
- package/src/commands/delete.ts +56 -0
- package/src/commands/diff.ts +97 -0
- package/src/commands/down.ts +27 -0
- package/src/commands/download.ts +68 -0
- package/src/commands/draft.ts +128 -0
- package/src/commands/execution/approve.ts +76 -0
- package/src/commands/execution/control.ts +79 -0
- package/src/commands/execution/index.ts +24 -0
- package/src/commands/execution/logs.ts +47 -0
- package/src/commands/execution/trace.ts +32 -0
- package/src/commands/get.ts +99 -0
- package/src/commands/internal-daemon.ts +25 -0
- package/src/commands/list.ts +138 -0
- package/src/commands/logs.ts +73 -0
- package/src/commands/mcp-server.test.ts +65 -0
- package/src/commands/mcp-server.ts +124 -0
- package/src/commands/push.ts +205 -0
- package/src/commands/reset.ts +57 -0
- package/src/commands/resume.ts +121 -0
- package/src/commands/run.ts +276 -0
- package/src/commands/search.ts +90 -0
- package/src/commands/seedpack.ts +94 -0
- package/src/commands/setup.ts +71 -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 +51 -0
- package/src/commands/usage.ts +74 -0
- package/src/commands/validate.test.ts +79 -0
- package/src/commands/validate.ts +73 -0
- package/src/commands/version.ts +13 -0
- package/src/config/config.test.ts +76 -0
- package/src/config/config.ts +127 -0
- package/src/config/index.ts +22 -0
- package/src/config/keys.test.ts +38 -0
- package/src/config/keys.ts +64 -0
- package/src/config/paths.ts +25 -0
- package/src/config/resolve.test.ts +103 -0
- package/src/config/resolve.ts +80 -0
- package/src/errors/classify.ts +199 -0
- package/src/errors/cli-exit-error.ts +16 -0
- package/src/errors/clierr.test.ts +172 -0
- package/src/errors/exit-codes.ts +14 -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.test.ts +28 -0
- package/src/local/artifact.ts +166 -0
- package/src/local/constants.ts +52 -0
- package/src/local/daemon/components.test.ts +80 -0
- package/src/local/daemon/components.ts +113 -0
- package/src/local/daemon/daemon.integration.test.ts +183 -0
- package/src/local/daemon/env.test.ts +51 -0
- package/src/local/daemon/env.ts +118 -0
- package/src/local/daemon/host.ts +79 -0
- package/src/local/daemon/index.ts +18 -0
- package/src/local/daemon/launch.ts +260 -0
- package/src/local/daemon/process.ts +183 -0
- package/src/local/daemon/supervisor.test.ts +260 -0
- package/src/local/daemon/supervisor.ts +249 -0
- package/src/local/daemon/types.ts +76 -0
- package/src/local/llm-config.test.ts +80 -0
- package/src/local/llm-config.ts +107 -0
- package/src/local/logs/tail.test.ts +70 -0
- package/src/local/logs/tail.ts +100 -0
- package/src/local/logs/view.test.ts +46 -0
- package/src/local/logs/view.ts +65 -0
- package/src/local/net/tcp.ts +65 -0
- package/src/local/paths.ts +67 -0
- package/src/local/reset.test.ts +53 -0
- package/src/local/reset.ts +90 -0
- package/src/local/runtime/index.ts +18 -0
- package/src/local/runtime/node.ts +67 -0
- package/src/local/runtime/runner.ts +186 -0
- package/src/local/runtime/runtime.test.ts +155 -0
- package/src/local/runtime/server.test.ts +152 -0
- package/src/local/runtime/server.ts +172 -0
- package/src/local/runtime/which.ts +30 -0
- package/src/local/seedpack/apply.test.ts +166 -0
- package/src/local/seedpack/apply.ts +139 -0
- package/src/local/seedpack/content.test.ts +148 -0
- package/src/local/seedpack/content.ts +223 -0
- package/src/local/setup/prompt.ts +70 -0
- package/src/local/setup/wizard.test.ts +42 -0
- package/src/local/setup/wizard.ts +78 -0
- package/src/local/state/health-state.ts +55 -0
- package/src/local/state/index.ts +8 -0
- package/src/local/state/lock.ts +77 -0
- package/src/local/state/log-rotation.ts +112 -0
- package/src/local/state/pidfile.ts +37 -0
- package/src/local/state/proc.ts +66 -0
- package/src/local/state/startup-config.ts +51 -0
- package/src/local/state/state.test.ts +166 -0
- package/src/local/status.test.ts +88 -0
- package/src/local/status.ts +186 -0
- package/src/local/temporal/download.test.ts +64 -0
- package/src/local/temporal/download.ts +54 -0
- package/src/local/temporal/index.ts +6 -0
- package/src/local/temporal/inspect.ts +32 -0
- package/src/local/temporal/manager.test.ts +31 -0
- package/src/local/temporal/manager.ts +247 -0
- package/src/local/temporal/supervisor.test.ts +77 -0
- package/src/local/temporal/supervisor.ts +97 -0
- package/src/local/webconsole/index.ts +13 -0
- package/src/logger.ts +39 -0
- package/src/output/command-result.test.ts +64 -0
- package/src/output/command-result.ts +185 -0
- package/src/output/confirm.test.ts +43 -0
- package/src/output/confirm.ts +53 -0
- package/src/output/format.test.ts +65 -0
- package/src/output/format.ts +101 -0
- package/src/output/index.ts +30 -0
- package/src/output/ndjson.ts +55 -0
- package/src/output/proto.test.ts +72 -0
- package/src/output/proto.ts +55 -0
- package/src/output/style.ts +57 -0
- package/src/output/table.test.ts +37 -0
- package/src/output/table.ts +52 -0
- package/src/program.test.ts +64 -0
- package/src/program.ts +100 -0
- package/src/registry/aliases.test.ts +99 -0
- package/src/registry/aliases.ts +93 -0
- package/src/registry/index.ts +7 -0
- package/src/registry/metadata.ts +60 -0
- package/src/registry/registry.test.ts +80 -0
- package/src/registry/registry.ts +101 -0
- package/src/registry/verb-support.ts +50 -0
- package/src/registry/verbs.ts +43 -0
- package/src/resources/apply/apply.integration.test.ts +207 -0
- package/src/resources/apply/apply.ts +202 -0
- package/src/resources/apply/declarative.integration.test.ts +126 -0
- package/src/resources/apply/declarative.test.ts +132 -0
- package/src/resources/apply/declarative.ts +474 -0
- package/src/resources/apply/discovery.ts +60 -0
- package/src/resources/apply/handlers.ts +145 -0
- package/src/resources/apply/synth/capstone.integration.test.ts +134 -0
- package/src/resources/apply/synth/project-track.integration.test.ts +194 -0
- package/src/resources/apply/synth/project-track.ts +126 -0
- package/src/resources/apply/synth/reader.test.ts +90 -0
- package/src/resources/apply/synth/reader.ts +68 -0
- package/src/resources/apply/synth/runtime.test.ts +29 -0
- package/src/resources/apply/synth/runtime.ts +39 -0
- package/src/resources/apply/synth/synthesize.test.ts +109 -0
- package/src/resources/apply/synth/synthesize.ts +161 -0
- package/src/resources/connect/__fixtures__/stdio-crash.mjs +6 -0
- package/src/resources/connect/__fixtures__/stdio-server.mjs +43 -0
- package/src/resources/connect/connect.integration.test.ts +185 -0
- package/src/resources/connect/connect.ts +107 -0
- package/src/resources/connect/discover.test.ts +45 -0
- package/src/resources/connect/discover.ts +125 -0
- package/src/resources/connect/display.ts +68 -0
- package/src/resources/connect/oauth.test.ts +155 -0
- package/src/resources/connect/oauth.ts +191 -0
- package/src/resources/delete.ts +239 -0
- package/src/resources/diff.integration.test.ts +103 -0
- package/src/resources/diff.test.ts +34 -0
- package/src/resources/diff.ts +187 -0
- package/src/resources/documents.test.ts +67 -0
- package/src/resources/documents.ts +102 -0
- package/src/resources/download.ts +151 -0
- package/src/resources/execution-approve.test.ts +50 -0
- package/src/resources/execution-approve.ts +94 -0
- package/src/resources/execution-control.ts +78 -0
- package/src/resources/execution-format.test.ts +48 -0
- package/src/resources/execution-format.ts +54 -0
- package/src/resources/execution-logs.ts +176 -0
- package/src/resources/execution-trace.ts +159 -0
- package/src/resources/execution.integration.test.ts +285 -0
- package/src/resources/execution.test.ts +138 -0
- package/src/resources/execution.ts +229 -0
- package/src/resources/get-bindings.ts +61 -0
- package/src/resources/get.ts +41 -0
- package/src/resources/git.ts +71 -0
- package/src/resources/ignore/defaults.ts +155 -0
- package/src/resources/ignore/ignore.test.ts +139 -0
- package/src/resources/ignore/index.ts +17 -0
- package/src/resources/ignore/match.ts +158 -0
- package/src/resources/ignore/matcher.ts +158 -0
- package/src/resources/ignore/pattern.ts +131 -0
- package/src/resources/list.ts +97 -0
- package/src/resources/mcp/runtime-env.test.ts +68 -0
- package/src/resources/mcp/runtime-env.ts +79 -0
- package/src/resources/mutate-verbs.integration.test.ts +233 -0
- package/src/resources/picker/ink.tsx +114 -0
- package/src/resources/picker/tty.test.ts +37 -0
- package/src/resources/picker/tty.ts +30 -0
- package/src/resources/push-download.integration.test.ts +175 -0
- package/src/resources/read-completion.integration.test.ts +156 -0
- package/src/resources/read-verbs.integration.test.ts +164 -0
- package/src/resources/reference.test.ts +107 -0
- package/src/resources/reference.ts +140 -0
- package/src/resources/render.ts +118 -0
- package/src/resources/run/agent-exec.ts +107 -0
- package/src/resources/run/attachments.test.ts +113 -0
- package/src/resources/run/attachments.ts +261 -0
- package/src/resources/run/create.test.ts +119 -0
- package/src/resources/run/create.ts +165 -0
- package/src/resources/run/env.test.ts +131 -0
- package/src/resources/run/env.ts +167 -0
- package/src/resources/run/epilogue.ts +166 -0
- package/src/resources/run/header.test.ts +61 -0
- package/src/resources/run/header.ts +62 -0
- package/src/resources/run/prepare.test.ts +92 -0
- package/src/resources/run/prepare.ts +139 -0
- package/src/resources/run/resolve.ts +32 -0
- package/src/resources/run/resume.ts +119 -0
- package/src/resources/run/stream.ts +108 -0
- package/src/resources/run/workflow-stream.integration.test.ts +157 -0
- package/src/resources/run/workflow-stream.ts +203 -0
- package/src/resources/run/workspace.test.ts +93 -0
- package/src/resources/run/workspace.ts +171 -0
- package/src/resources/search.ts +53 -0
- package/src/resources/session.test.ts +48 -0
- package/src/resources/session.ts +66 -0
- package/src/resources/skill.test.ts +227 -0
- package/src/resources/skill.ts +451 -0
- package/src/resources/stream/approval-detect.ts +118 -0
- package/src/resources/stream/convert.ts +210 -0
- package/src/resources/stream/diff.test.ts +316 -0
- package/src/resources/stream/diff.ts +254 -0
- package/src/resources/stream/events.ts +193 -0
- package/src/resources/stream/headless.test.ts +119 -0
- package/src/resources/stream/headless.ts +112 -0
- package/src/resources/stream/ink.tsx +56 -0
- package/src/resources/stream/lazy-import.test.ts +63 -0
- package/src/resources/stream/render-ndjson.test.ts +116 -0
- package/src/resources/stream/render-ndjson.ts +176 -0
- package/src/resources/stream/render-plaintext.test.ts +68 -0
- package/src/resources/stream/render-plaintext.ts +86 -0
- package/src/resources/stream/snapshot.test.ts +97 -0
- package/src/resources/stream/snapshot.ts +191 -0
- package/src/resources/stream/subagent.ts +104 -0
- package/src/resources/stream/submit.test.ts +77 -0
- package/src/resources/stream/submit.ts +137 -0
- package/src/resources/stream/todo.ts +53 -0
- package/src/resources/stream/tool-state.ts +142 -0
- package/src/resources/stream/tty.ts +14 -0
- package/src/resources/stream/workflow-event-view.test.ts +116 -0
- package/src/resources/stream/workflow-event-view.ts +111 -0
- package/src/resources/stream/workflow-render-ndjson.ts +61 -0
- package/src/resources/stream/workflow-render-plaintext.ts +43 -0
- package/src/resources/stream/workflow-render.test.ts +81 -0
- package/src/resources/tag.ts +50 -0
- package/src/resources/usage.test.ts +94 -0
- package/src/resources/usage.ts +301 -0
- package/src/resources/validate.test.ts +54 -0
- package/src/resources/validate.ts +31 -0
- package/src/resources/version.ts +105 -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,144 @@
|
|
|
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
|
+
// execution and a usage report, then print a compact, copy-paste-friendly exit
|
|
4
|
+
// summary to stderr (AI content already went to stdout). A stream that failed
|
|
5
|
+
// before reaching a phase is re-raised as a CLI error.
|
|
6
|
+
import { create } from "@bufbuild/protobuf";
|
|
7
|
+
import { ExecutionPhase, MessageType, ToolCallStatus } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
8
|
+
import { GetExecutionUsageReportInputSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/io_pb";
|
|
9
|
+
import { CliExitError, ExitCode } from "../../errors/index.js";
|
|
10
|
+
import { shouldColorize, styler } from "../../output/style.js";
|
|
11
|
+
import { mapPhaseToString } from "../stream/convert.js";
|
|
12
|
+
/**
|
|
13
|
+
* Fetch the final execution + usage and print the exit summary. Returns the
|
|
14
|
+
* final execution so the caller can act on its artifacts (e.g. --download).
|
|
15
|
+
*/
|
|
16
|
+
export async function runEpilogue(client, sessionId, executionId, result) {
|
|
17
|
+
// A stream error before any phase is a hard failure (Go: epilogue returns it).
|
|
18
|
+
if (result.error !== "" && result.phase === "") {
|
|
19
|
+
throw new CliExitError(result.error, ExitCode.General);
|
|
20
|
+
}
|
|
21
|
+
const exec = await client.agentExecution.get(executionId);
|
|
22
|
+
const usage = await fetchUsage(client, executionId);
|
|
23
|
+
const write = (line) => void process.stderr.write(`${line}\n`);
|
|
24
|
+
const s = styler(shouldColorize(process.stderr));
|
|
25
|
+
write("");
|
|
26
|
+
if (sessionId !== "") {
|
|
27
|
+
printSessionExit(write, s, sessionId, exec, usage);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
printCompletion(write, s, exec);
|
|
31
|
+
}
|
|
32
|
+
return exec;
|
|
33
|
+
}
|
|
34
|
+
// Best-effort usage fetch; a failure here must not fail the run (Go tolerates a
|
|
35
|
+
// nil usage report and renders without the cost line).
|
|
36
|
+
async function fetchUsage(client, executionId) {
|
|
37
|
+
try {
|
|
38
|
+
const report = await client.agentExecution.getExecutionUsageReport(create(GetExecutionUsageReportInputSchema, { executionId }));
|
|
39
|
+
return report.aggregate;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return undefined;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// Compact session summary + a copy-paste resume command. Mirrors Go's
|
|
46
|
+
// displaySessionExitLine + sessionResumeVerb.
|
|
47
|
+
function printSessionExit(write, s, sessionId, exec, usage) {
|
|
48
|
+
const phase = exec.status?.phase ?? ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED;
|
|
49
|
+
const duration = formatDuration(exec.status?.startedAt ?? "", exec.status?.completedAt ?? "");
|
|
50
|
+
const cost = usage !== undefined && usage.billableCostMicros > 0n ? formatCost(usage.billableCostMicros) : "";
|
|
51
|
+
switch (phase) {
|
|
52
|
+
case ExecutionPhase.EXECUTION_COMPLETED:
|
|
53
|
+
write(s.green(completedLine(duration, cost)));
|
|
54
|
+
break;
|
|
55
|
+
case ExecutionPhase.EXECUTION_FAILED:
|
|
56
|
+
write(s.red(`✗ Failed: ${resolveFailureError(exec)}`));
|
|
57
|
+
break;
|
|
58
|
+
case ExecutionPhase.EXECUTION_CANCELLED:
|
|
59
|
+
write(s.yellow("Cancelled"));
|
|
60
|
+
break;
|
|
61
|
+
case ExecutionPhase.EXECUTION_TERMINATED:
|
|
62
|
+
write(s.yellow(`Stopped: ${resolveFailureError(exec)}`));
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
write(s.yellow(`Exited (${mapPhaseToString(phase)})`));
|
|
66
|
+
}
|
|
67
|
+
write("");
|
|
68
|
+
write(` ${resumeVerb(phase)} stigmer resume ${sessionId}`);
|
|
69
|
+
}
|
|
70
|
+
// Non-session completion (rare for run; e.g. a degraded backend). Mirrors the
|
|
71
|
+
// information of Go's displayAgentExecutionComplete without the panel chrome.
|
|
72
|
+
function printCompletion(write, s, exec) {
|
|
73
|
+
const phase = exec.status?.phase ?? ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED;
|
|
74
|
+
if (phase === ExecutionPhase.EXECUTION_FAILED) {
|
|
75
|
+
write(s.red(`✗ Execution failed: ${resolveFailureError(exec)}`));
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
write(s.green(`✓ Execution ${mapPhaseToString(phase)}`));
|
|
79
|
+
}
|
|
80
|
+
function completedLine(duration, cost) {
|
|
81
|
+
if (duration !== "" && cost !== "")
|
|
82
|
+
return `✓ Completed (${duration} · ${cost})`;
|
|
83
|
+
if (duration !== "")
|
|
84
|
+
return `✓ Completed (${duration})`;
|
|
85
|
+
return "✓ Completed";
|
|
86
|
+
}
|
|
87
|
+
function resumeVerb(phase) {
|
|
88
|
+
switch (phase) {
|
|
89
|
+
case ExecutionPhase.EXECUTION_COMPLETED:
|
|
90
|
+
return "To continue:";
|
|
91
|
+
case ExecutionPhase.EXECUTION_FAILED:
|
|
92
|
+
return "To retry: ";
|
|
93
|
+
default:
|
|
94
|
+
return "To resume: ";
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
// Mirrors Go's resolveFailureError: canonical error, else last system message,
|
|
98
|
+
// else first failed tool call's error, else a generic pointer to the logs.
|
|
99
|
+
function resolveFailureError(exec) {
|
|
100
|
+
const status = exec.status;
|
|
101
|
+
if (status === undefined)
|
|
102
|
+
return GENERIC_FAILURE;
|
|
103
|
+
if (status.error !== "")
|
|
104
|
+
return status.error;
|
|
105
|
+
for (let i = status.messages.length - 1; i >= 0; i--) {
|
|
106
|
+
const msg = status.messages[i];
|
|
107
|
+
if (msg.type === MessageType.MESSAGE_SYSTEM && msg.content !== "")
|
|
108
|
+
return msg.content;
|
|
109
|
+
}
|
|
110
|
+
for (const msg of status.messages) {
|
|
111
|
+
for (const tc of msg.toolCalls) {
|
|
112
|
+
if (tc.status === ToolCallStatus.TOOL_CALL_FAILED && tc.error !== "")
|
|
113
|
+
return tc.error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return GENERIC_FAILURE;
|
|
117
|
+
}
|
|
118
|
+
const GENERIC_FAILURE = "Execution failed (error details unavailable — check execution logs)";
|
|
119
|
+
// "1m23s"/"45s" between two RFC3339 timestamps, or "" when unknown. Mirrors Go's
|
|
120
|
+
// parseDuration + Round(time.Second).
|
|
121
|
+
function formatDuration(startedAt, completedAt) {
|
|
122
|
+
if (startedAt === "" || completedAt === "")
|
|
123
|
+
return "";
|
|
124
|
+
const start = Date.parse(startedAt);
|
|
125
|
+
const end = Date.parse(completedAt);
|
|
126
|
+
if (Number.isNaN(start) || Number.isNaN(end) || end < start)
|
|
127
|
+
return "";
|
|
128
|
+
const totalSeconds = Math.round((end - start) / 1000);
|
|
129
|
+
if (totalSeconds < 60)
|
|
130
|
+
return `${totalSeconds}s`;
|
|
131
|
+
const minutes = Math.floor(totalSeconds / 60);
|
|
132
|
+
const seconds = totalSeconds % 60;
|
|
133
|
+
return seconds === 0 ? `${minutes}m` : `${minutes}m${seconds}s`;
|
|
134
|
+
}
|
|
135
|
+
// USD from micros. Mirrors usage.ts's formatCost precision tiers.
|
|
136
|
+
function formatCost(micros) {
|
|
137
|
+
const usd = Number(micros) / 1_000_000;
|
|
138
|
+
if (usd === 0)
|
|
139
|
+
return "$0.00";
|
|
140
|
+
if (usd < 1)
|
|
141
|
+
return `$${usd.toFixed(3)}`;
|
|
142
|
+
return `$${usd.toFixed(2)}`;
|
|
143
|
+
}
|
|
144
|
+
//# 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,kF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import type { WorkspaceEntry } from "@stigmer/protos/ai/stigmer/agentic/session/v1/workspace_pb";
|
|
2
|
+
import type { 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
|
+
readonly workspaces: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Write the session header to `out` (stderr). Empty fields are omitted, exactly
|
|
14
|
+
* like Go's formatMetadataSection. A header with no populated fields prints
|
|
15
|
+
* nothing.
|
|
16
|
+
*/
|
|
17
|
+
export declare function renderSessionHeader(out: {
|
|
18
|
+
write(chunk: string): unknown;
|
|
19
|
+
isTTY?: boolean;
|
|
20
|
+
}, info: SessionHeaderInfo): void;
|
|
21
|
+
/** Displayable names from workspace entries (Go's workspaceNames). */
|
|
22
|
+
export declare function workspaceNames(entries: readonly WorkspaceEntry[]): string[];
|
|
23
|
+
//# 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,4DAA4D,CAAC;AAEjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,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,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,CAkB1H;AAOD,sEAAsE;AACtE,wBAAgB,cAAc,CAAC,OAAO,EAAE,SAAS,cAAc,EAAE,GAAG,MAAM,EAAE,CAE3E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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 "plan" is surfaced; "agent"/"" is the default and stays implicit.
|
|
31
|
+
if (info.mode === "plan")
|
|
32
|
+
lines.push(row(s, "Mode", "Plan (read-only)"));
|
|
33
|
+
if (info.workspaces.length > 0) {
|
|
34
|
+
lines.push(row(s, "Workspaces", info.workspaces[0]));
|
|
35
|
+
const indent = " ".repeat(LABEL_WIDTH);
|
|
36
|
+
for (const ws of info.workspaces.slice(1))
|
|
37
|
+
lines.push(`${indent}${ws}`);
|
|
38
|
+
}
|
|
39
|
+
if (lines.length === 0)
|
|
40
|
+
return;
|
|
41
|
+
out.write(`${lines.join("\n")}\n\n`);
|
|
42
|
+
}
|
|
43
|
+
function row(s, label, value) {
|
|
44
|
+
const padded = `${label}:`.padEnd(LABEL_WIDTH, " ");
|
|
45
|
+
return `${s.dim(padded)}${value}`;
|
|
46
|
+
}
|
|
47
|
+
/** Displayable names from workspace entries (Go's workspaceNames). */
|
|
48
|
+
export function workspaceNames(entries) {
|
|
49
|
+
return entries.map((e) => e.name);
|
|
50
|
+
}
|
|
51
|
+
//# 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;AAa/D,8EAA8E;AAC9E,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB;;;;GAIG;AACH,MAAM,UAAU,mB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CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,GAAG,EAAE,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAC/B,GAAG,CAAC,KAAK,CAAC,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,60 @@
|
|
|
1
|
+
import type { Attachment } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/spec_pb";
|
|
2
|
+
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
3
|
+
import type { WorkspaceEntry } from "@stigmer/protos/ai/stigmer/agentic/session/v1/workspace_pb";
|
|
4
|
+
import type { Stigmer } from "@stigmer/sdk";
|
|
5
|
+
import { type ProgressSink } from "./attachments.js";
|
|
6
|
+
import { type RuntimeEnv } from "./env.js";
|
|
7
|
+
/** The interaction mode requested for the run; "" means the agent default. */
|
|
8
|
+
export type RunMode = "" | "agent" | "plan";
|
|
9
|
+
/** Raw agent-execution flags shared by `run` and `draft` (Go's agentExecFlags). */
|
|
10
|
+
export interface AgentExecFlags {
|
|
11
|
+
readonly message: string;
|
|
12
|
+
readonly attach: readonly string[];
|
|
13
|
+
readonly approveDefault: string;
|
|
14
|
+
readonly verbose: boolean;
|
|
15
|
+
readonly detach: boolean;
|
|
16
|
+
readonly workspace: readonly string[];
|
|
17
|
+
readonly branch: string;
|
|
18
|
+
readonly commit: string;
|
|
19
|
+
readonly env: readonly string[];
|
|
20
|
+
readonly envFile: readonly string[];
|
|
21
|
+
readonly secret: readonly string[];
|
|
22
|
+
readonly secretFile: readonly string[];
|
|
23
|
+
readonly model: string;
|
|
24
|
+
readonly autoApprove: boolean;
|
|
25
|
+
readonly mode: RunMode;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The validated, resolved inputs ready for create + stream. Mirrors Go's
|
|
29
|
+
* preparedAgentExec, minus the client/org which the command already owns.
|
|
30
|
+
*/
|
|
31
|
+
export interface PreparedRun {
|
|
32
|
+
readonly defaultAction: ApprovalAction;
|
|
33
|
+
readonly workspaceEntries: WorkspaceEntry[];
|
|
34
|
+
readonly runtimeEnv: RuntimeEnv;
|
|
35
|
+
readonly attachments: Attachment[];
|
|
36
|
+
readonly workspaceFileRefs: string[];
|
|
37
|
+
readonly message: string;
|
|
38
|
+
readonly detach: boolean;
|
|
39
|
+
readonly verbose: boolean;
|
|
40
|
+
readonly model: string;
|
|
41
|
+
readonly autoApproveAll: boolean;
|
|
42
|
+
readonly mode: RunMode;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Validate flags and resolve all execution inputs. The `org` is used to inject
|
|
46
|
+
* STIGMER_ORG_ID and the `client` to upload non-workspace attachments.
|
|
47
|
+
*/
|
|
48
|
+
export declare function prepareAgentExec(flags: AgentExecFlags, client: Stigmer, org: string, progress?: ProgressSink): Promise<PreparedRun>;
|
|
49
|
+
/**
|
|
50
|
+
* Parse the `--approve-default` flag to an ApprovalAction. Empty means "no
|
|
51
|
+
* default" (UNSPECIFIED). Mirrors Go's approval.ParseAction, including the
|
|
52
|
+
* approve-all aliases and case-insensitivity.
|
|
53
|
+
*/
|
|
54
|
+
export declare function parseApprovalAction(value: string): ApprovalAction;
|
|
55
|
+
/**
|
|
56
|
+
* Validate the `--mode` flag. Empty (unset) is valid and means "use default"
|
|
57
|
+
* (agent). Mirrors Go's validateMode.
|
|
58
|
+
*/
|
|
59
|
+
export declare function validateMode(mode: string): asserts mode is RunMode;
|
|
60
|
+
//# sourceMappingURL=prepare.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","sourceRoot":"","sources":["../../../src/resources/run/prepare.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAC9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4DAA4D,CAAC;AACjG,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAG5D,8EAA8E;AAC9E,MAAM,MAAM,OAAO,GAAG,EAAE,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5C,mFAAmF;AACnF,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM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|
2
|
+
// create step needs. Ports the Go CLI's prepareAgentExec (run_agent_exec.go).
|
|
3
|
+
//
|
|
4
|
+
// Order matters and mirrors Go: validate cheap flags first (mode, approve
|
|
5
|
+
// default), then parse workspaces, then merge env, then process attachments
|
|
6
|
+
// (the only step that hits the network). A failure short-circuits before any
|
|
7
|
+
// upload. STIGMER_ORG_ID is injected into the runtime env when absent so agents
|
|
8
|
+
// can address the caller's org without the user wiring it manually.
|
|
9
|
+
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
10
|
+
import { UsageError } from "../../errors/index.js";
|
|
11
|
+
import { processAttachments } from "./attachments.js";
|
|
12
|
+
import { loadAndMergeEnv } from "./env.js";
|
|
13
|
+
import { localWorkspaceRoots, parseWorkspaceEntries } from "./workspace.js";
|
|
14
|
+
/**
|
|
15
|
+
* Validate flags and resolve all execution inputs. The `org` is used to inject
|
|
16
|
+
* STIGMER_ORG_ID and the `client` to upload non-workspace attachments.
|
|
17
|
+
*/
|
|
18
|
+
export async function prepareAgentExec(flags, client, org, progress) {
|
|
19
|
+
const defaultAction = parseApprovalAction(flags.approveDefault);
|
|
20
|
+
validateMode(flags.mode);
|
|
21
|
+
const workspaceEntries = parseWorkspaceEntries(flags.workspace, flags.branch, flags.commit);
|
|
22
|
+
const runtimeEnv = loadAndMergeEnv({
|
|
23
|
+
envFlags: flags.env,
|
|
24
|
+
secretFlags: flags.secret,
|
|
25
|
+
envFiles: flags.envFile,
|
|
26
|
+
secretFiles: flags.secretFile,
|
|
27
|
+
});
|
|
28
|
+
if (runtimeEnv.STIGMER_ORG_ID === undefined && org !== "") {
|
|
29
|
+
runtimeEnv.STIGMER_ORG_ID = { value: org, isSecret: false };
|
|
30
|
+
}
|
|
31
|
+
const { attachments, workspaceFileRefs } = await processAttachments(client.agentExecution, flags.attach, localWorkspaceRoots(workspaceEntries), progress);
|
|
32
|
+
return {
|
|
33
|
+
defaultAction,
|
|
34
|
+
workspaceEntries,
|
|
35
|
+
runtimeEnv,
|
|
36
|
+
attachments,
|
|
37
|
+
workspaceFileRefs,
|
|
38
|
+
message: flags.message,
|
|
39
|
+
detach: flags.detach,
|
|
40
|
+
verbose: flags.verbose,
|
|
41
|
+
model: flags.model,
|
|
42
|
+
autoApproveAll: flags.autoApprove,
|
|
43
|
+
mode: flags.mode,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Parse the `--approve-default` flag to an ApprovalAction. Empty means "no
|
|
48
|
+
* default" (UNSPECIFIED). Mirrors Go's approval.ParseAction, including the
|
|
49
|
+
* approve-all aliases and case-insensitivity.
|
|
50
|
+
*/
|
|
51
|
+
export function parseApprovalAction(value) {
|
|
52
|
+
if (value.trim() === "")
|
|
53
|
+
return ApprovalAction.UNSPECIFIED;
|
|
54
|
+
switch (value.trim().toLowerCase()) {
|
|
55
|
+
case "approve":
|
|
56
|
+
return ApprovalAction.APPROVE;
|
|
57
|
+
case "skip":
|
|
58
|
+
return ApprovalAction.SKIP;
|
|
59
|
+
case "reject":
|
|
60
|
+
return ApprovalAction.REJECT;
|
|
61
|
+
case "approve-all":
|
|
62
|
+
case "approve_all":
|
|
63
|
+
case "approveall":
|
|
64
|
+
return ApprovalAction.APPROVE_ALL;
|
|
65
|
+
default:
|
|
66
|
+
throw new UsageError(`invalid --approve-default value "${value}": must be one of: approve, skip, reject, approve-all`);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Validate the `--mode` flag. Empty (unset) is valid and means "use default"
|
|
71
|
+
* (agent). Mirrors Go's validateMode.
|
|
72
|
+
*/
|
|
73
|
+
export function validateMode(mode) {
|
|
74
|
+
if (mode !== "" && mode !== "agent" && mode !== "plan") {
|
|
75
|
+
throw new UsageError(`invalid --mode value "${mode}": must be "agent" or "plan"`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=prepare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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AC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Agent } from "@stigmer/protos/ai/stigmer/agentic/agent/v1/api_pb";
|
|
2
|
+
import type { Workflow } from "@stigmer/protos/ai/stigmer/agentic/workflow/v1/api_pb";
|
|
3
|
+
import type { Stigmer } from "@stigmer/sdk";
|
|
4
|
+
/** Resolve an agent by ID, org/slug, or bare slug. Throws if not found. */
|
|
5
|
+
export declare function resolveAgentRef(client: Stigmer, ref: string, org: string): Promise<Agent>;
|
|
6
|
+
/** Resolve a workflow by ID, org/slug, or bare slug. Throws if not found. */
|
|
7
|
+
export declare function resolveWorkflowRef(client: Stigmer, ref: string, org: string): Promise<Workflow>;
|
|
8
|
+
//# sourceMappingURL=resolve.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../src/resources/run/resolve.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uDAAuD,CAAC;AAEtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C,2EAA2E;AAC3E,wBAAsB,eAAe,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC,CAI/F;AAED,6EAA6E;AAC7E,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAIrG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// Reference resolution for the run path (Go's resolveAgent / resolveWorkflow in
|
|
2
|
+
// run_resolve.go). A reference is an ID (agt_…/wfl_…), an explicit org/slug, or
|
|
3
|
+
// a bare slug resolved against the context org. The strict ID *classification*
|
|
4
|
+
// used by smart dispatch lives in resources/reference.ts; this module just turns
|
|
5
|
+
// a reference into a fetched resource.
|
|
6
|
+
import { ApiResourceKind } from "@stigmer/protos/ai/stigmer/commons/apiresource/apiresourcekind/api_resource_kind_pb";
|
|
7
|
+
import { defaultRegistry } from "../../registry/index.js";
|
|
8
|
+
import { parseReference } from "../reference.js";
|
|
9
|
+
/** Resolve an agent by ID, org/slug, or bare slug. Throws if not found. */
|
|
10
|
+
export async function resolveAgentRef(client, ref, org) {
|
|
11
|
+
const parsed = parseReference(ref, org, idPrefix(ApiResourceKind.agent));
|
|
12
|
+
if (parsed.kind === "id")
|
|
13
|
+
return client.agent.get(parsed.id);
|
|
14
|
+
return client.agent.getByReference({ org: parsed.org, slug: parsed.slug });
|
|
15
|
+
}
|
|
16
|
+
/** Resolve a workflow by ID, org/slug, or bare slug. Throws if not found. */
|
|
17
|
+
export async function resolveWorkflowRef(client, ref, org) {
|
|
18
|
+
const parsed = parseReference(ref, org, idPrefix(ApiResourceKind.workflow));
|
|
19
|
+
if (parsed.kind === "id")
|
|
20
|
+
return client.workflow.get(parsed.id);
|
|
21
|
+
return client.workflow.getByReference({ org: parsed.org, slug: parsed.slug });
|
|
22
|
+
}
|
|
23
|
+
// The id_prefix for a kind, via the shared registry (single source of truth).
|
|
24
|
+
function idPrefix(kind) {
|
|
25
|
+
const alias = kind === ApiResourceKind.agent ? "agent" : "workflow";
|
|
26
|
+
return defaultRegistry().getByAlias(alias)?.idPrefix ?? "";
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=resolve.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../src/resources/run/resolve.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,iFAAiF;AACjF,uCAAuC;AAIvC,OAAO,EAAE,eAAe,EAAE,MAAM,qFAAqF,CAAC;AAEtH,OAAO,EAAE,eAAe,EAAE,MAAM,y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,IAAI,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { BackendClient } from "../../client/index.js";
|
|
2
|
+
import type { RunMode } from "./prepare.js";
|
|
3
|
+
import { type RunOutputMode } from "./stream.js";
|
|
4
|
+
export interface OpenSessionDeps {
|
|
5
|
+
readonly client: BackendClient;
|
|
6
|
+
readonly sessionId: string;
|
|
7
|
+
readonly org: string;
|
|
8
|
+
/** Explicit --mode override; "" means infer from the latest execution. */
|
|
9
|
+
readonly mode: RunMode;
|
|
10
|
+
readonly outputMode: RunOutputMode;
|
|
11
|
+
}
|
|
12
|
+
export declare function openSession(deps: OpenSessionDeps): Promise<void>;
|
|
13
|
+
//# sourceMappingURL=resume.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume.d.ts","sourceRoot":"","sources":["../../../src/resources/run/resume.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAO3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAcvE,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;CACpC;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAsCtE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Re-opening an existing session (Go's openSession / resumeSession in
|
|
2
|
+
// resume_session.go). Fetch the session + its executions, then either:
|
|
3
|
+
// - re-attach to the live stream when the latest execution is still active, or
|
|
4
|
+
// - replay the full history (snapshotToEvents) when everything has finished.
|
|
5
|
+
// The TTY path defers to Ink's SessionView, which loads history and offers a
|
|
6
|
+
// follow-up composer for free.
|
|
7
|
+
import { ApprovalAction, ExecutionPhase, InteractionMode } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
8
|
+
import { getSessionById, listExecutionsBySession } from "../session.js";
|
|
9
|
+
import { NdjsonRenderer } from "../stream/render-ndjson.js";
|
|
10
|
+
import { PlaintextRenderer } from "../stream/render-plaintext.js";
|
|
11
|
+
import { snapshotToEvents } from "../stream/snapshot.js";
|
|
12
|
+
import { isInkSupported } from "../stream/tty.js";
|
|
13
|
+
import { renderSessionHeader, workspaceNames } from "./header.js";
|
|
14
|
+
import { streamAgentExecution } from "./stream.js";
|
|
15
|
+
// The backend's auto-create sentinel; suppressed in the header until the async
|
|
16
|
+
// title activity replaces it (Go's session.PendingSubject / ResolvedSubject).
|
|
17
|
+
const PENDING_SUBJECT = "Auto-created session";
|
|
18
|
+
// Phases where the latest execution is still producing output — re-attach live.
|
|
19
|
+
const ACTIVE_PHASES = new Set([
|
|
20
|
+
ExecutionPhase.EXECUTION_PENDING,
|
|
21
|
+
ExecutionPhase.EXECUTION_IN_PROGRESS,
|
|
22
|
+
ExecutionPhase.EXECUTION_WAITING_FOR_APPROVAL,
|
|
23
|
+
ExecutionPhase.EXECUTION_PAUSED,
|
|
24
|
+
]);
|
|
25
|
+
export async function openSession(deps) {
|
|
26
|
+
const stigmer = deps.client.stigmer;
|
|
27
|
+
const session = await getSessionById(stigmer, deps.sessionId);
|
|
28
|
+
const entries = await listExecutionsBySession(stigmer, deps.sessionId);
|
|
29
|
+
if (entries.length === 0) {
|
|
30
|
+
process.stderr.write(`Session ${deps.sessionId} has no executions\n`);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const latest = entries[0];
|
|
34
|
+
const phase = latest.status?.phase ?? ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED;
|
|
35
|
+
const effectiveMode = resolveResumeMode(deps.mode, latest);
|
|
36
|
+
const header = {
|
|
37
|
+
agentName: "",
|
|
38
|
+
sessionId: deps.sessionId,
|
|
39
|
+
subject: resolvedSubject(session.spec?.subject ?? ""),
|
|
40
|
+
model: "",
|
|
41
|
+
mode: effectiveMode,
|
|
42
|
+
workspaces: workspaceNames(session.spec?.workspaceEntries ?? []),
|
|
43
|
+
};
|
|
44
|
+
if (ACTIVE_PHASES.has(phase)) {
|
|
45
|
+
// Live re-attach reuses the exact run streaming stack.
|
|
46
|
+
await streamAgentExecution({
|
|
47
|
+
client: stigmer,
|
|
48
|
+
sessionId: deps.sessionId,
|
|
49
|
+
executionId: latest.metadata?.id ?? "",
|
|
50
|
+
org: deps.org,
|
|
51
|
+
mode: effectiveMode,
|
|
52
|
+
defaultAction: ApprovalAction.UNSPECIFIED,
|
|
53
|
+
outputMode: deps.outputMode,
|
|
54
|
+
header,
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
await replaySession(deps, entries, header);
|
|
59
|
+
}
|
|
60
|
+
// Completed session: render the stored history. TTY → Ink (history + composer);
|
|
61
|
+
// headless → snapshot events through the matching renderer.
|
|
62
|
+
async function replaySession(deps, entries, header) {
|
|
63
|
+
if (deps.outputMode === "inline" && isInkSupported(process.stdout)) {
|
|
64
|
+
const { runInkSession } = await import("../stream/ink.js");
|
|
65
|
+
await runInkSession({
|
|
66
|
+
client: deps.client.stigmer,
|
|
67
|
+
sessionId: deps.sessionId,
|
|
68
|
+
org: deps.org,
|
|
69
|
+
mode: header.mode === "plan" ? "plan" : "agent",
|
|
70
|
+
});
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
renderSessionHeader(process.stderr, header);
|
|
74
|
+
const chronological = [...entries].reverse();
|
|
75
|
+
const events = snapshotToEvents(chronological);
|
|
76
|
+
const renderer = deps.outputMode === "json"
|
|
77
|
+
? new NdjsonRenderer({ data: process.stdout, status: process.stderr, defaultAction: ApprovalAction.UNSPECIFIED })
|
|
78
|
+
: new PlaintextRenderer({ data: process.stdout, status: process.stderr });
|
|
79
|
+
for (const event of events)
|
|
80
|
+
renderer.render(event);
|
|
81
|
+
}
|
|
82
|
+
// Mirrors Go's resolveResumeMode: --mode wins; else infer "plan" from the last
|
|
83
|
+
// execution's InteractionMode; else default (agent).
|
|
84
|
+
function resolveResumeMode(explicit, latest) {
|
|
85
|
+
if (explicit !== "")
|
|
86
|
+
return explicit;
|
|
87
|
+
if (latest.spec?.executionConfig?.interactionMode === InteractionMode.PLAN)
|
|
88
|
+
return "plan";
|
|
89
|
+
return "";
|
|
90
|
+
}
|
|
91
|
+
function resolvedSubject(subject) {
|
|
92
|
+
return subject === PENDING_SUBJECT ? "" : subject;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=resume.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resume.js","sourceRoot":"","sources":["../../../src/resources/run/resume.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,uEAAuE;AACvE,iFAAiF;AACjF,+EAA+E;AAC/E,6EAA6E;AAC7E,+BAA+B;AAG/B,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,8DAA8D,CAAC;AAE/H,OAAO,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAA0B,cAAc,EAAE,MAAM,aAAa,CAAC;AAE1F,OAAO,EAAE,oBAAoB,EAAsB,MAAM,aAAa,CAAC;AAEvE,+EAA+E;AAC/E,8EAA8E;AAC9E,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AM;QACxB,CAAC,CAAC,IAAI,cAAc,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,aAAa,EAAE,cAAc,CAAC,WAAW,EAAE,CAAC;QACjH,CAAC,CAAC,IAAI,iBAAiB,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9E,KAAK,MAAM,KAAK,IAAI,MAAM;QAAE,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAED,+EAA+E;AAC/E,qDAAqD;AACrD,SAAS,iBAAiB,CAAC,QAAiB,EAAE,MAAsB;IAClE,IAAI,QAAQ,KAAK,EAAE;QAAE,OAAO,QAAQ,CAAC;IACrC,IAAI,MAAM,CAAC,IAAI,EAAE,eAAe,EAAE,eAAe,KAAK,eAAe,CAAC,IAAI;QAAE,OAAO,MAAM,CAAC;IAC1F,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,SAAS,eAAe,CAAC,OAAe;IACtC,OAAO,OAAO,KAAK,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
2
|
+
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
3
|
+
import type { Stigmer } from "@stigmer/sdk";
|
|
4
|
+
import { type SessionHeaderInfo } from "./header.js";
|
|
5
|
+
import type { RunMode } from "./prepare.js";
|
|
6
|
+
/** The user-selected output mode for a streaming command. */
|
|
7
|
+
export type RunOutputMode = "inline" | "json";
|
|
8
|
+
export interface StreamDeps {
|
|
9
|
+
readonly client: Stigmer;
|
|
10
|
+
readonly sessionId: string;
|
|
11
|
+
readonly executionId: string;
|
|
12
|
+
/** Org slug, for follow-up executions created from the Ink composer. */
|
|
13
|
+
readonly org: string;
|
|
14
|
+
readonly mode: RunMode;
|
|
15
|
+
readonly defaultAction: ApprovalAction;
|
|
16
|
+
readonly outputMode: RunOutputMode;
|
|
17
|
+
readonly header: SessionHeaderInfo;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Stream the execution to a terminal phase, then run the epilogue. Returns the
|
|
21
|
+
* authoritative final execution (for artifact download).
|
|
22
|
+
*/
|
|
23
|
+
export declare function streamAgentExecution(deps: StreamDeps): Promise<AgentExecution>;
|
|
24
|
+
//# sourceMappingURL=stream.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream.d.ts","sourceRoot":"","sources":["../../../src/resources/run/stream.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAM5C,6DAA6D;AAC7D,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE9C,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,cAAc,CAAC;IACvC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAAC,cAAc,CAAC,CAgBpF"}
|