@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,20 @@
|
|
|
1
|
+
import { type FollowHandle } from "./tail.js";
|
|
2
|
+
export interface LogComponent {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly file: string;
|
|
5
|
+
}
|
|
6
|
+
/** The components whose logs the daemon writes, in dependency order. */
|
|
7
|
+
export declare function allComponents(logDir: string): LogComponent[];
|
|
8
|
+
/** One component by name, or undefined if not a known component. */
|
|
9
|
+
export declare function componentByName(logDir: string, name: string): LogComponent | undefined;
|
|
10
|
+
export interface Sink {
|
|
11
|
+
write(chunk: string): unknown;
|
|
12
|
+
}
|
|
13
|
+
/** Print the last `tail` lines of each component (grouped by component). */
|
|
14
|
+
export declare function printTail(components: LogComponent[], tail: number, out: Sink): void;
|
|
15
|
+
/**
|
|
16
|
+
* Follow appended lines from each component until the returned handle is
|
|
17
|
+
* stopped. New lines only (the caller prints the tail snapshot first).
|
|
18
|
+
*/
|
|
19
|
+
export declare function followAll(components: LogComponent[], out: Sink): FollowHandle;
|
|
20
|
+
//# sourceMappingURL=view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.d.ts","sourceRoot":"","sources":["../../../src/local/logs/view.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,YAAY,EAAyB,MAAM,WAAW,CAAC;AAErE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,YAAY,EAAE,CAM5D;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEtF;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/B;AAMD,4EAA4E;AAC5E,wBAAgB,SAAS,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,GAAG,IAAI,CAOnF;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,YAAY,EAAE,EAAE,GAAG,EAAE,IAAI,GAAG,YAAY,CAU7E"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Multi-component log viewing for `stigmer logs`: print a tail snapshot and,
|
|
2
|
+
// optionally, follow appended lines live.
|
|
3
|
+
//
|
|
4
|
+
// Divergence from the Go CLI (documented, not drift): the Go `--all` view merges
|
|
5
|
+
// components by parsing each line's timestamp. That parse is fragile across the
|
|
6
|
+
// server's and runner's different log formats and silently misorders lines it
|
|
7
|
+
// cannot parse. The TS view instead prefixes every line with its component name
|
|
8
|
+
// (kubectl-style), which is robust without any format coupling and reads clearly
|
|
9
|
+
// in both snapshot and follow modes.
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { followFile, tailLines } from "./tail.js";
|
|
12
|
+
/** The components whose logs the daemon writes, in dependency order. */
|
|
13
|
+
export function allComponents(logDir) {
|
|
14
|
+
return [
|
|
15
|
+
{ name: "stigmer-server", file: join(logDir, "stigmer-server.log") },
|
|
16
|
+
{ name: "runner", file: join(logDir, "runner.log") },
|
|
17
|
+
{ name: "temporal", file: join(logDir, "temporal.log") },
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
/** One component by name, or undefined if not a known component. */
|
|
21
|
+
export function componentByName(logDir, name) {
|
|
22
|
+
return allComponents(logDir).find((component) => component.name === name);
|
|
23
|
+
}
|
|
24
|
+
function format(line, name, prefix) {
|
|
25
|
+
return prefix ? `[${name}] ${line}\n` : `${line}\n`;
|
|
26
|
+
}
|
|
27
|
+
/** Print the last `tail` lines of each component (grouped by component). */
|
|
28
|
+
export function printTail(components, tail, out) {
|
|
29
|
+
const prefix = components.length > 1;
|
|
30
|
+
for (const component of components) {
|
|
31
|
+
for (const line of tailLines(component.file, tail)) {
|
|
32
|
+
out.write(format(line, component.name, prefix));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Follow appended lines from each component until the returned handle is
|
|
38
|
+
* stopped. New lines only (the caller prints the tail snapshot first).
|
|
39
|
+
*/
|
|
40
|
+
export function followAll(components, out) {
|
|
41
|
+
const prefix = components.length > 1;
|
|
42
|
+
const handles = components.map((component) => followFile(component.file, (line) => out.write(format(line, component.name, prefix))));
|
|
43
|
+
return {
|
|
44
|
+
stop() {
|
|
45
|
+
for (const handle of handles)
|
|
46
|
+
handle.stop();
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../src/local/logs/view.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,0CAA0C;AAC1C,EAAE;AACF,iFAAiF;AACjF,gFAAgF;AAChF,8EAA8E;AAC9E,gFAAgF;AAChF,iFAAiF;AACjF,qCAAqC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAqB,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAOrE,wEAAwE;AACxE,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,OAAO;QACL,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAAE;QACpE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE;QACpD,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,cAAc,CAAC,EAAE;KACzD,CAAC;AACJ,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,MAAc,EAAE,IAAY;IAC1D,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;AAC5E,CAAC;AAMD,SAAS,MAAM,CAAC,IAAY,EAAE,IAAY,EAAE,MAAe;IACzD,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC;AACtD,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,SAAS,CAAC,UAA0B,EAAE,IAAY,EAAE,GAAS;IAC3E,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACrC,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC;YACnD,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,UAA0B,EAAE,GAAS;IAC7D,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC;IACrC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAC3C,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CACtF,CAAC;IACF,OAAO;QACL,IAAI;YACF,KAAK,MAAM,MAAM,IAAI,OAAO;gBAAE,MAAM,CAAC,IAAI,EAAE,CAAC;QAC9C,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Attempt a single TCP connection; resolves true if it connects in time. */
|
|
2
|
+
export declare function tcpConnects(port: number, host?: string, timeoutMs?: number): Promise<boolean>;
|
|
3
|
+
export interface WaitForTcpOptions {
|
|
4
|
+
port: number;
|
|
5
|
+
host?: string;
|
|
6
|
+
/** Overall deadline. */
|
|
7
|
+
timeoutMs?: number;
|
|
8
|
+
/** Delay between probes. */
|
|
9
|
+
pollMs?: number;
|
|
10
|
+
/** If provided and it returns non-null, the watched process has exited — fail
|
|
11
|
+
* immediately rather than waiting out the deadline. */
|
|
12
|
+
getExit?: () => {
|
|
13
|
+
code: number | null;
|
|
14
|
+
signal: NodeJS.Signals | null;
|
|
15
|
+
} | null;
|
|
16
|
+
/** Diagnostic log tail, appended to the failure message. */
|
|
17
|
+
getLog?: () => string;
|
|
18
|
+
/** Human label for the thing being awaited (used in error text). */
|
|
19
|
+
label?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Poll a TCP port until it accepts a connection or the deadline passes. */
|
|
22
|
+
export declare function waitForTcp(options: WaitForTcpOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=tcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tcp.d.ts","sourceRoot":"","sources":["../../../src/local/net/tcp.ts"],"names":[],"mappings":"AAYA,6EAA6E;AAC7E,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAc,EAAE,SAAS,SAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAc/F;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4BAA4B;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;2DACuD;IACvD,OAAO,CAAC,EAAE,MAAM;QAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC,OAAO,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC;IAC9E,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,MAAM,CAAC;IACtB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,4EAA4E;AAC5E,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAa1E"}
|
package/local/net/tcp.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// TCP readiness probing — the "poll-don't-sleep" pattern shared by the Temporal
|
|
2
|
+
// manager and the server gate.
|
|
3
|
+
//
|
|
4
|
+
// A single short-lived connection attempt tells us whether something is
|
|
5
|
+
// listening; waitForTcp loops that probe until a deadline, failing fast (with a
|
|
6
|
+
// log tail) if the process under watch exits first. This mirrors
|
|
7
|
+
// `test/conformance/src/harness/temporal.ts` so the CLI and the harnesses share
|
|
8
|
+
// one readiness model.
|
|
9
|
+
import { connect } from "node:net";
|
|
10
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
11
|
+
/** Attempt a single TCP connection; resolves true if it connects in time. */
|
|
12
|
+
export function tcpConnects(port, host = "127.0.0.1", timeoutMs = 200) {
|
|
13
|
+
return new Promise((resolveConnected) => {
|
|
14
|
+
const socket = connect({ port, host });
|
|
15
|
+
let settled = false;
|
|
16
|
+
const settle = (connected) => {
|
|
17
|
+
if (settled)
|
|
18
|
+
return;
|
|
19
|
+
settled = true;
|
|
20
|
+
socket.destroy();
|
|
21
|
+
resolveConnected(connected);
|
|
22
|
+
};
|
|
23
|
+
socket.setTimeout(timeoutMs, () => settle(false));
|
|
24
|
+
socket.once("connect", () => settle(true));
|
|
25
|
+
socket.once("error", () => settle(false));
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** Poll a TCP port until it accepts a connection or the deadline passes. */
|
|
29
|
+
export async function waitForTcp(options) {
|
|
30
|
+
const { port, host = "127.0.0.1", timeoutMs = 30_000, pollMs = 150, getExit, getLog, label = `port ${port}` } = options;
|
|
31
|
+
const deadline = Date.now() + timeoutMs;
|
|
32
|
+
while (Date.now() < deadline) {
|
|
33
|
+
const exit = getExit?.();
|
|
34
|
+
if (exit != null) {
|
|
35
|
+
throw new Error(`${label} exited before becoming ready (code=${exit.code}, signal=${exit.signal})${tail(getLog)}`);
|
|
36
|
+
}
|
|
37
|
+
if (await tcpConnects(port, host))
|
|
38
|
+
return;
|
|
39
|
+
await delay(pollMs);
|
|
40
|
+
}
|
|
41
|
+
throw new Error(`${label} did not become ready within ${timeoutMs}ms${tail(getLog)}`);
|
|
42
|
+
}
|
|
43
|
+
function tail(getLog) {
|
|
44
|
+
const log = getLog?.();
|
|
45
|
+
return log ? `\n--- log tail ---\n${log}` : "";
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=tcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tcp.js","sourceRoot":"","sources":["../../../src/local/net/tcp.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,+BAA+B;AAC/B,EAAE;AACF,wEAAwE;AACxE,gFAAgF;AAChF,iEAAiE;AACjE,gFAAgF;AAChF,uBAAuB;AAEvB,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAE3D,6EAA6E;AAC7E,MAAM,UAAU,WAAW,CAAC,IAAY,EAAE,IAAI,GAAG,WAAW,EAAE,SAAS,GAAG,GAAG;IAC3E,OAAO,IAAI,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;QACtC,MAAM,MAAM,GAAG,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACvC,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,MAAM,MAAM,GAAG,CAAC,SAAkB,EAAQ,EAAE;YAC1C,IAAI,OAAO;gBAAE,OAAO;YACpB,OAAO,GAAG,IAAI,CAAC;YACf,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC9B,CAAC,CAAC;QACF,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAClD,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC,CAAC,CAAC;AACL,CAAC;AAkBD,4EAA4E;AAC5E,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,OAA0B;IACzD,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,EAAE,SAAS,GAAG,MAAM,EAAE,MAAM,GAAG,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,GAAG,QAAQ,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC;IACxH,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;IAExC,OAAO,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAC;QAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,EAAE,CAAC;QACzB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,uCAAuC,IAAI,CAAC,IAAI,YAAY,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;QACrH,CAAC;QACD,IAAI,MAAM,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC;YAAE,OAAO;QAC1C,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,GAAG,KAAK,gCAAgC,SAAS,KAAK,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACxF,CAAC;AAED,SAAS,IAAI,CAAC,MAAqB;IACjC,MAAM,GAAG,GAAG,MAAM,EAAE,EAAE,CAAC;IACvB,OAAO,GAAG,CAAC,CAAC,CAAC,uBAAuB,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACjD,CAAC"}
|
package/local/paths.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { configDir, dataDir } from "../config/paths.js";
|
|
2
|
+
export { configDir, dataDir };
|
|
3
|
+
/** Daemon/server/runner/temporal log directory (~/.stigmer/data/logs). */
|
|
4
|
+
export declare function logDir(home?: string): string;
|
|
5
|
+
/** Working directory the runner is launched in (~/.stigmer/data/workspace). */
|
|
6
|
+
export declare function workspaceDir(home?: string): string;
|
|
7
|
+
/** Downloaded-binary directory for Temporal + stigmer-server (~/.stigmer/bin). */
|
|
8
|
+
export declare function binDir(home?: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Root for on-demand-acquired npm runtimes (~/.stigmer/runtimes). Each release
|
|
11
|
+
* version installs into its own `<version>/` subtree so multiple CLI versions can
|
|
12
|
+
* coexist and a partial install never poisons another version's runner.
|
|
13
|
+
*/
|
|
14
|
+
export declare function runtimesDir(home?: string): string;
|
|
15
|
+
/** Temporal dev-server data directory (~/.stigmer/temporal-data). */
|
|
16
|
+
export declare function temporalDataDir(home?: string): string;
|
|
17
|
+
/** Temporal PID file (~/.stigmer/temporal.pid). Lives in the config dir, not
|
|
18
|
+
* the data dir — matching the Go CLI's Temporal manager layout. */
|
|
19
|
+
export declare function temporalPidFile(home?: string): string;
|
|
20
|
+
/** Temporal single-instance lock file (~/.stigmer/temporal.lock). */
|
|
21
|
+
export declare function temporalLockFile(home?: string): string;
|
|
22
|
+
/** Local SQLite database path (~/.stigmer/stigmer.db), the server's default. */
|
|
23
|
+
export declare function databasePath(home?: string): string;
|
|
24
|
+
/** Server artifact storage path (~/.stigmer/storage), the server's default. */
|
|
25
|
+
export declare function storagePath(home?: string): string;
|
|
26
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/local/paths.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAE9B,0EAA0E;AAC1E,wBAAgB,MAAM,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEvD;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE7D;AAED,kFAAkF;AAClF,wBAAgB,MAAM,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE5D;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEhE;AAED;mEACmE;AACnE,wBAAgB,eAAe,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEhE;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAEjE;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE7D;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,IAAI,GAAE,MAAkB,GAAG,MAAM,CAE5D"}
|
package/local/paths.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// Filesystem layout for the local stack, built on the CLI's config paths.
|
|
2
|
+
//
|
|
3
|
+
// The Go CLI deliberately splits state across two roots and the TS port
|
|
4
|
+
// preserves it exactly:
|
|
5
|
+
// - the *data dir* (~/.stigmer/data) holds daemon/server/runner PID + state +
|
|
6
|
+
// logs + the runner workspace;
|
|
7
|
+
// - the *config dir* (~/.stigmer) holds config.yaml, the SQLite db, and the
|
|
8
|
+
// Temporal binary/data/lock.
|
|
9
|
+
// Centralizing the asymmetry here keeps every call site honest. Each helper
|
|
10
|
+
// takes the home dir (defaulting to os.homedir()) so tests can redirect the
|
|
11
|
+
// whole tree to a temp directory.
|
|
12
|
+
import { homedir } from "node:os";
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { configDir, dataDir } from "../config/paths.js";
|
|
15
|
+
export { configDir, dataDir };
|
|
16
|
+
/** Daemon/server/runner/temporal log directory (~/.stigmer/data/logs). */
|
|
17
|
+
export function logDir(home = homedir()) {
|
|
18
|
+
return join(dataDir(home), "logs");
|
|
19
|
+
}
|
|
20
|
+
/** Working directory the runner is launched in (~/.stigmer/data/workspace). */
|
|
21
|
+
export function workspaceDir(home = homedir()) {
|
|
22
|
+
return join(dataDir(home), "workspace");
|
|
23
|
+
}
|
|
24
|
+
/** Downloaded-binary directory for Temporal + stigmer-server (~/.stigmer/bin). */
|
|
25
|
+
export function binDir(home = homedir()) {
|
|
26
|
+
return join(configDir(home), "bin");
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Root for on-demand-acquired npm runtimes (~/.stigmer/runtimes). Each release
|
|
30
|
+
* version installs into its own `<version>/` subtree so multiple CLI versions can
|
|
31
|
+
* coexist and a partial install never poisons another version's runner.
|
|
32
|
+
*/
|
|
33
|
+
export function runtimesDir(home = homedir()) {
|
|
34
|
+
return join(configDir(home), "runtimes");
|
|
35
|
+
}
|
|
36
|
+
/** Temporal dev-server data directory (~/.stigmer/temporal-data). */
|
|
37
|
+
export function temporalDataDir(home = homedir()) {
|
|
38
|
+
return join(configDir(home), "temporal-data");
|
|
39
|
+
}
|
|
40
|
+
/** Temporal PID file (~/.stigmer/temporal.pid). Lives in the config dir, not
|
|
41
|
+
* the data dir — matching the Go CLI's Temporal manager layout. */
|
|
42
|
+
export function temporalPidFile(home = homedir()) {
|
|
43
|
+
return join(configDir(home), "temporal.pid");
|
|
44
|
+
}
|
|
45
|
+
/** Temporal single-instance lock file (~/.stigmer/temporal.lock). */
|
|
46
|
+
export function temporalLockFile(home = homedir()) {
|
|
47
|
+
return join(configDir(home), "temporal.lock");
|
|
48
|
+
}
|
|
49
|
+
/** Local SQLite database path (~/.stigmer/stigmer.db), the server's default. */
|
|
50
|
+
export function databasePath(home = homedir()) {
|
|
51
|
+
return join(configDir(home), "stigmer.db");
|
|
52
|
+
}
|
|
53
|
+
/** Server artifact storage path (~/.stigmer/storage), the server's default. */
|
|
54
|
+
export function storagePath(home = homedir()) {
|
|
55
|
+
return join(configDir(home), "storage");
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/local/paths.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,wEAAwE;AACxE,wBAAwB;AACxB,gFAAgF;AAChF,mCAAmC;AACnC,8EAA8E;AAC9E,iCAAiC;AACjC,4EAA4E;AAC5E,4EAA4E;AAC5E,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAE9B,0EAA0E;AAC1E,MAAM,UAAU,MAAM,CAAC,OAAe,OAAO,EAAE;IAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,YAAY,CAAC,OAAe,OAAO,EAAE;IACnD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC,CAAC;AAC1C,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,MAAM,CAAC,OAAe,OAAO,EAAE;IAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe,OAAO,EAAE;IAClD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,CAAC;AAC3C,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,eAAe,CAAC,OAAe,OAAO,EAAE;IACtD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;AAChD,CAAC;AAED;mEACmE;AACnE,MAAM,UAAU,eAAe,CAAC,OAAe,OAAO,EAAE;IACtD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC,CAAC;AAC/C,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,gBAAgB,CAAC,OAAe,OAAO,EAAE;IACvD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,eAAe,CAAC,CAAC;AAChD,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,YAAY,CAAC,OAAe,OAAO,EAAE;IACnD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,CAAC;AAC7C,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CAAC,OAAe,OAAO,EAAE;IAClD,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,SAAS,CAAC,CAAC;AAC1C,CAAC"}
|
package/local/reset.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface ResetOptions {
|
|
2
|
+
/** Also remove config.yaml (the user must reconfigure on next start). */
|
|
3
|
+
includeConfig?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export interface ResetResult {
|
|
6
|
+
servicesStopped: boolean;
|
|
7
|
+
removedPaths: string[];
|
|
8
|
+
}
|
|
9
|
+
/** Stop the stack if running. Returns whether anything was stopped. Injectable
|
|
10
|
+
* so reset's file-wiping can be tested without touching a real daemon. */
|
|
11
|
+
export type StopFn = (home: string) => Promise<boolean>;
|
|
12
|
+
/** Stop services (if running) and remove persistent state under `home`. */
|
|
13
|
+
export declare function reset(options?: ResetOptions, home?: string, stop?: StopFn): Promise<ResetResult>;
|
|
14
|
+
//# sourceMappingURL=reset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../src/local/reset.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,eAAe,EAAE,OAAO,CAAC;IACzB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAED;0EAC0E;AAC1E,MAAM,MAAM,MAAM,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAQxD,2EAA2E;AAC3E,wBAAsB,KAAK,CACzB,OAAO,GAAE,YAAiB,EAC1B,IAAI,GAAE,MAAkB,EACxB,IAAI,GAAE,MAAoB,GACzB,OAAO,CAAC,WAAW,CAAC,CAwCtB"}
|
package/local/reset.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// `stigmer reset` — stop the stack and wipe all persistent local state, so the
|
|
2
|
+
// next `up` starts from a clean slate. Configuration (config.yaml) is preserved
|
|
3
|
+
// by default so users do not lose API keys; `includeConfig` removes it too.
|
|
4
|
+
//
|
|
5
|
+
// The set of removed paths is a faithful port of the Go CLI's reset, spanning
|
|
6
|
+
// both roots of the `~/.stigmer` layout (the SQLite db + Temporal state under
|
|
7
|
+
// the config dir, and everything under the data dir).
|
|
8
|
+
import { existsSync, rmSync } from "node:fs";
|
|
9
|
+
import { homedir } from "node:os";
|
|
10
|
+
import { join } from "node:path";
|
|
11
|
+
import { configPath } from "../config/paths.js";
|
|
12
|
+
import { binDir, configDir, databasePath, dataDir, storagePath, temporalDataDir, temporalLockFile, temporalPidFile, } from "./paths.js";
|
|
13
|
+
import { down, isRunning } from "./daemon/launch.js";
|
|
14
|
+
const defaultStop = async (home) => {
|
|
15
|
+
if (!(await isRunning(home)))
|
|
16
|
+
return false;
|
|
17
|
+
await down(home);
|
|
18
|
+
return true;
|
|
19
|
+
};
|
|
20
|
+
/** Stop services (if running) and remove persistent state under `home`. */
|
|
21
|
+
export async function reset(options = {}, home = homedir(), stop = defaultStop) {
|
|
22
|
+
const servicesStopped = await stop(home);
|
|
23
|
+
const config = configDir(home);
|
|
24
|
+
const db = databasePath(home);
|
|
25
|
+
// Order: db (+ sidecars) first, then the data tree, then config-dir state.
|
|
26
|
+
const targets = [
|
|
27
|
+
db,
|
|
28
|
+
`${db}-wal`,
|
|
29
|
+
`${db}-shm`,
|
|
30
|
+
dataDir(home),
|
|
31
|
+
storagePath(home),
|
|
32
|
+
join(config, "sessions"),
|
|
33
|
+
join(config, "runtimes"),
|
|
34
|
+
temporalDataDir(home),
|
|
35
|
+
temporalPidFile(home),
|
|
36
|
+
temporalLockFile(home),
|
|
37
|
+
binDir(home),
|
|
38
|
+
join(config, "logs"),
|
|
39
|
+
join(config, "llm.pid"),
|
|
40
|
+
];
|
|
41
|
+
const removedPaths = [];
|
|
42
|
+
for (const target of targets) {
|
|
43
|
+
if (existsSync(target)) {
|
|
44
|
+
rmSync(target, { recursive: true, force: true });
|
|
45
|
+
removedPaths.push(target);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (options.includeConfig === true) {
|
|
49
|
+
const cfg = configPath(home);
|
|
50
|
+
if (existsSync(cfg)) {
|
|
51
|
+
rmSync(cfg, { force: true });
|
|
52
|
+
removedPaths.push(cfg);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return { servicesStopped, removedPaths };
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=reset.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reset.js","sourceRoot":"","sources":["../../src/local/reset.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,gFAAgF;AAChF,4EAA4E;AAC5E,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,sDAAsD;AAEtD,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EACL,MAAM,EACN,SAAS,EACT,YAAY,EACZ,OAAO,EACP,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAgBrD,MAAM,WAAW,GAAW,KAAK,EAAE,IAAI,EAAE,EAAE;IACzC,IAAI,CAAC,CAAC,MAAM,SAAS,CAAC,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IAC3C,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,2EAA2E;AAC3E,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,UAAwB,EAAE,EAC1B,OAAe,OAAO,EAAE,EACxB,OAAe,WAAW;IAE1B,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;IAEzC,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,EAAE,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IAE9B,2EAA2E;IAC3E,MAAM,OAAO,GAAG;QACd,EAAE;QACF,GAAG,EAAE,MAAM;QACX,GAAG,EAAE,MAAM;QACX,OAAO,CAAC,IAAI,CAAC;QACb,WAAW,CAAC,IAAI,CAAC;QACjB,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC;QACxB,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC;QACxB,eAAe,CAAC,IAAI,CAAC;QACrB,eAAe,CAAC,IAAI,CAAC;QACrB,gBAAgB,CAAC,IAAI,CAAC;QACtB,MAAM,CAAC,IAAI,CAAC;QACZ,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC;QACpB,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;KACxB,CAAC;IAEF,MAAM,YAAY,GAAa,EAAE,CAAC;IAClC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;YACvB,MAAM,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACjD,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,IAAI,OAAO,CAAC,aAAa,KAAK,IAAI,EAAE,CAAC;QACnC,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;QAC7B,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,CAAC,GAAG,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YAC7B,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { MIN_NODE_MAJOR, resolveNode } from "./node.js";
|
|
2
|
+
export { type EnsureRunnerOptions, type RunnerResolution, acquireRunner, ensureRunner, resolveRunner, } from "./runner.js";
|
|
3
|
+
export { type EnsureServerOptions, type ServerDownloadTarget, downloadServerBinary, ensureServerBinary, resolveServerBinary, } from "./server.js";
|
|
4
|
+
export { which } from "./which.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/local/runtime/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Public surface of the runtime-acquisition seams (DD-002/003/007).
|
|
2
|
+
export { MIN_NODE_MAJOR, resolveNode } from "./node.js";
|
|
3
|
+
export { acquireRunner, ensureRunner, resolveRunner, } from "./runner.js";
|
|
4
|
+
export { downloadServerBinary, ensureServerBinary, resolveServerBinary, } from "./server.js";
|
|
5
|
+
export { which } from "./which.js";
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/local/runtime/index.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,EAGL,aAAa,EACb,YAAY,EACZ,aAAa,GACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Minimum Node major version the runner requires. */
|
|
2
|
+
export declare const MIN_NODE_MAJOR = 20;
|
|
3
|
+
/**
|
|
4
|
+
* Resolve the Node binary to launch the runner with. Honors STIGMER_NODE_BIN
|
|
5
|
+
* (version-checked); otherwise returns the current runtime.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveNode(): string;
|
|
8
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/local/runtime/node.ts"],"names":[],"mappings":"AAcA,sDAAsD;AACtD,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;GAGG;AACH,wBAAgB,WAAW,IAAI,MAAM,CASpC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// Resolution of the Node.js runtime used to launch the runner subprocess.
|
|
2
|
+
//
|
|
3
|
+
// We reuse the very Node that is running the CLI (process.execPath). The CLI is
|
|
4
|
+
// itself an npm package with `engines: node >= 20`, so a suitable Node is always
|
|
5
|
+
// present by construction — there is deliberately no hermetic Node download
|
|
6
|
+
// (DD-002: keep the base install lean; nothing to acquire that the host already
|
|
7
|
+
// guarantees). This is exactly what the conformance harness does
|
|
8
|
+
// (`spawn(process.execPath, ...)`). An explicit STIGMER_NODE_BIN override is
|
|
9
|
+
// honored and version-checked for advanced/multi-runtime setups.
|
|
10
|
+
import { execFileSync } from "node:child_process";
|
|
11
|
+
import { CliExitError } from "../../errors/cli-exit-error.js";
|
|
12
|
+
import { ExitCode } from "../../errors/exit-codes.js";
|
|
13
|
+
/** Minimum Node major version the runner requires. */
|
|
14
|
+
export const MIN_NODE_MAJOR = 20;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the Node binary to launch the runner with. Honors STIGMER_NODE_BIN
|
|
17
|
+
* (version-checked); otherwise returns the current runtime.
|
|
18
|
+
*/
|
|
19
|
+
export function resolveNode() {
|
|
20
|
+
const override = process.env.STIGMER_NODE_BIN;
|
|
21
|
+
if (override !== undefined && override !== "") {
|
|
22
|
+
assertVersion(override, probeNodeMajor(override));
|
|
23
|
+
return override;
|
|
24
|
+
}
|
|
25
|
+
// The CLI's own runtime: major is readable directly, no subprocess needed.
|
|
26
|
+
assertVersion(process.execPath, currentMajor());
|
|
27
|
+
return process.execPath;
|
|
28
|
+
}
|
|
29
|
+
function currentMajor() {
|
|
30
|
+
return parseMajor(process.versions.node);
|
|
31
|
+
}
|
|
32
|
+
function probeNodeMajor(bin) {
|
|
33
|
+
try {
|
|
34
|
+
const out = execFileSync(bin, ["--version"], { encoding: "utf8" });
|
|
35
|
+
return parseMajor(out.trim());
|
|
36
|
+
}
|
|
37
|
+
catch {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Parses "v22.22.2" or "22.22.2" to its major number.
|
|
42
|
+
function parseMajor(version) {
|
|
43
|
+
const match = /^v?(\d+)\./.exec(version.trim());
|
|
44
|
+
if (match === null)
|
|
45
|
+
return null;
|
|
46
|
+
const major = Number.parseInt(match[1], 10);
|
|
47
|
+
return Number.isInteger(major) ? major : null;
|
|
48
|
+
}
|
|
49
|
+
function assertVersion(bin, major) {
|
|
50
|
+
if (major === null) {
|
|
51
|
+
throw new CliExitError(`could not determine the Node version of ${bin}`, ExitCode.General, [
|
|
52
|
+
`Ensure ${bin} is a working Node >= ${MIN_NODE_MAJOR} runtime.`,
|
|
53
|
+
]);
|
|
54
|
+
}
|
|
55
|
+
if (major < MIN_NODE_MAJOR) {
|
|
56
|
+
throw new CliExitError(`Node >= ${MIN_NODE_MAJOR} is required to run the runner (found major ${major} at ${bin})`, ExitCode.General, [`Upgrade Node to ${MIN_NODE_MAJOR} or newer, or point STIGMER_NODE_BIN at one.`]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../../src/local/runtime/node.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,4EAA4E;AAC5E,gFAAgF;AAChF,iEAAiE;AACjE,6EAA6E;AAC7E,iEAAiE;AAEjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,sDAAsD;AACtD,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC;;;GAGG;AACH,MAAM,UAAU,WAAW;IACzB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC9C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;QAC9C,aAAa,CAAC,QAAQ,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;QAClD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,2EAA2E;IAC3E,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC;IAChD,OAAO,OAAO,CAAC,QAAQ,CAAC;AAC1B,CAAC;AAED,SAAS,YAAY;IACnB,OAAO,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC3C,CAAC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;QACnE,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAChC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,sDAAsD;AACtD,SAAS,UAAU,CAAC,OAAe;IACjC,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAChD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAChD,CAAC;AAED,SAAS,aAAa,CAAC,GAAW,EAAE,KAAoB;IACtD,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QACnB,MAAM,IAAI,YAAY,CAAC,2CAA2C,GAAG,EAAE,EAAE,QAAQ,CAAC,OAAO,EAAE;YACzF,UAAU,GAAG,yBAAyB,cAAc,WAAW;SAChE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,GAAG,cAAc,EAAE,CAAC;QAC3B,MAAM,IAAI,YAAY,CACpB,WAAW,cAAc,+CAA+C,KAAK,OAAO,GAAG,GAAG,EAC1F,QAAQ,CAAC,OAAO,EAChB,CAAC,mBAAmB,cAAc,8CAA8C,CAAC,CAClF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Everything needed to spawn the runner subprocess. */
|
|
2
|
+
export interface RunnerResolution {
|
|
3
|
+
/** Node binary to launch with. */
|
|
4
|
+
nodeBin: string;
|
|
5
|
+
/** Absolute path to the compiled runner entry (`main.js`). */
|
|
6
|
+
entryPath: string;
|
|
7
|
+
/** The runner package directory. */
|
|
8
|
+
appDir: string;
|
|
9
|
+
}
|
|
10
|
+
export interface EnsureRunnerOptions {
|
|
11
|
+
home?: string;
|
|
12
|
+
/** Release version of the slim runner to acquire (defaults to the CLI version). */
|
|
13
|
+
version?: string;
|
|
14
|
+
/** Node resolver (injectable for tests). */
|
|
15
|
+
node?: () => string;
|
|
16
|
+
/** npm install implementation (injectable for tests). */
|
|
17
|
+
install?: (installDir: string, spec: string) => void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Ensure a launchable runner, acquiring `@stigmer/runner-slim` on demand if no
|
|
21
|
+
* repo-tree / STIGMER_RUNNER_DIR runner is present. Throws actionable guidance on
|
|
22
|
+
* a missing build, an invalid override, or a non-release CLI build.
|
|
23
|
+
*/
|
|
24
|
+
export declare function ensureRunner(opts?: EnsureRunnerOptions): RunnerResolution;
|
|
25
|
+
/**
|
|
26
|
+
* Resolve a repo-tree runner (dev) or an explicit STIGMER_RUNNER_DIR, or null
|
|
27
|
+
* when neither is present (the caller then acquires the slim package). Throws
|
|
28
|
+
* when an override is set but invalid, or when a found runner is not built — both
|
|
29
|
+
* are actionable user-facing conditions, not a reason to silently download.
|
|
30
|
+
* `node` is injectable for tests.
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveRunner(node?: () => string): RunnerResolution | null;
|
|
33
|
+
/**
|
|
34
|
+
* Acquire the published `@stigmer/runner-slim@<version>` into
|
|
35
|
+
* ~/.stigmer/runtimes/<version>/ (idempotent: reuses a prior install) and resolve
|
|
36
|
+
* its `main.js` entry. The version is pinned to the CLI's own version so the
|
|
37
|
+
* runner's protos/SDK stay in lockstep with the control plane.
|
|
38
|
+
*/
|
|
39
|
+
export declare function acquireRunner(opts?: EnsureRunnerOptions): RunnerResolution;
|
|
40
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../../src/local/runtime/runner.ts"],"names":[],"mappings":"AAiCA,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,MAAM,CAAC;IACpB,yDAAyD;IACzD,OAAO,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,mBAAwB,GAAG,gBAAgB,CAK7E;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,MAAM,MAAoB,GAAG,gBAAgB,GAAG,IAAI,CAiBvF;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,GAAE,mBAAwB,GAAG,gBAAgB,CAmC9E"}
|