@stigmer/cli 0.1.0-dev.20261017020314.g644422724c27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +194 -0
- package/README.md +45 -0
- package/auth/auth0.d.ts +19 -0
- package/auth/auth0.d.ts.map +1 -0
- package/auth/auth0.js +39 -0
- package/auth/auth0.js.map +1 -0
- package/auth/callback-server.d.ts +18 -0
- package/auth/callback-server.d.ts.map +1 -0
- package/auth/callback-server.js +77 -0
- package/auth/callback-server.js.map +1 -0
- package/auth/index.d.ts +5 -0
- package/auth/index.d.ts.map +1 -0
- package/auth/index.js +6 -0
- package/auth/index.js.map +1 -0
- package/auth/login.d.ts +2 -0
- package/auth/login.d.ts.map +1 -0
- package/auth/login.js +81 -0
- package/auth/login.js.map +1 -0
- package/auth/pages.d.ts +7 -0
- package/auth/pages.d.ts.map +1 -0
- package/auth/pages.js +21 -0
- package/auth/pages.js.map +1 -0
- package/auth/pkce.d.ts +7 -0
- package/auth/pkce.d.ts.map +1 -0
- package/auth/pkce.js +22 -0
- package/auth/pkce.js.map +1 -0
- package/auth/token.d.ts +38 -0
- package/auth/token.d.ts.map +1 -0
- package/auth/token.js +120 -0
- package/auth/token.js.map +1 -0
- package/backend.d.ts +5 -0
- package/backend.d.ts.map +1 -0
- package/backend.js +14 -0
- package/backend.js.map +1 -0
- package/cli/stigmer.d.ts +3 -0
- package/cli/stigmer.d.ts.map +1 -0
- package/cli/stigmer.js +14 -0
- package/cli/stigmer.js.map +1 -0
- package/client/client.d.ts +44 -0
- package/client/client.d.ts.map +1 -0
- package/client/client.js +82 -0
- package/client/client.js.map +1 -0
- package/client/index.d.ts +2 -0
- package/client/index.d.ts.map +1 -0
- package/client/index.js +3 -0
- package/client/index.js.map +1 -0
- package/client/organizations.d.ts +41 -0
- package/client/organizations.d.ts.map +1 -0
- package/client/organizations.js +86 -0
- package/client/organizations.js.map +1 -0
- package/client/single-org.d.ts +16 -0
- package/client/single-org.d.ts.map +1 -0
- package/client/single-org.js +35 -0
- package/client/single-org.js.map +1 -0
- package/commands/access-history/index.d.ts +3 -0
- package/commands/access-history/index.d.ts.map +1 -0
- package/commands/access-history/index.js +99 -0
- package/commands/access-history/index.js.map +1 -0
- package/commands/agent-exec-flags.d.ts +30 -0
- package/commands/agent-exec-flags.d.ts.map +1 -0
- package/commands/agent-exec-flags.js +49 -0
- package/commands/agent-exec-flags.js.map +1 -0
- package/commands/agent.d.ts +3 -0
- package/commands/agent.d.ts.map +1 -0
- package/commands/agent.js +43 -0
- package/commands/agent.js.map +1 -0
- package/commands/apikey/duration.d.ts +2 -0
- package/commands/apikey/duration.d.ts.map +1 -0
- package/commands/apikey/duration.js +30 -0
- package/commands/apikey/duration.js.map +1 -0
- package/commands/apikey/index.d.ts +18 -0
- package/commands/apikey/index.d.ts.map +1 -0
- package/commands/apikey/index.js +198 -0
- package/commands/apikey/index.js.map +1 -0
- package/commands/apply.d.ts +3 -0
- package/commands/apply.d.ts.map +1 -0
- package/commands/apply.js +146 -0
- package/commands/apply.js.map +1 -0
- package/commands/auth/index.d.ts +3 -0
- package/commands/auth/index.d.ts.map +1 -0
- package/commands/auth/index.js +58 -0
- package/commands/auth/index.js.map +1 -0
- package/commands/auth/login.d.ts +13 -0
- package/commands/auth/login.d.ts.map +1 -0
- package/commands/auth/login.js +58 -0
- package/commands/auth/login.js.map +1 -0
- package/commands/auth/whoami.d.ts +22 -0
- package/commands/auth/whoami.d.ts.map +1 -0
- package/commands/auth/whoami.js +123 -0
- package/commands/auth/whoami.js.map +1 -0
- package/commands/channel.d.ts +3 -0
- package/commands/channel.d.ts.map +1 -0
- package/commands/channel.js +114 -0
- package/commands/channel.js.map +1 -0
- package/commands/completion.d.ts +3 -0
- package/commands/completion.d.ts.map +1 -0
- package/commands/completion.js +80 -0
- package/commands/completion.js.map +1 -0
- package/commands/config/backend.d.ts +3 -0
- package/commands/config/backend.d.ts.map +1 -0
- package/commands/config/backend.js +171 -0
- package/commands/config/backend.js.map +1 -0
- package/commands/config/context.d.ts +3 -0
- package/commands/config/context.d.ts.map +1 -0
- package/commands/config/context.js +88 -0
- package/commands/config/context.js.map +1 -0
- package/commands/config/index.d.ts +3 -0
- package/commands/config/index.d.ts.map +1 -0
- package/commands/config/index.js +13 -0
- package/commands/config/index.js.map +1 -0
- package/commands/config/kv.d.ts +3 -0
- package/commands/config/kv.d.ts.map +1 -0
- package/commands/config/kv.js +39 -0
- package/commands/config/kv.js.map +1 -0
- package/commands/connect.d.ts +3 -0
- package/commands/connect.d.ts.map +1 -0
- package/commands/connect.js +74 -0
- package/commands/connect.js.map +1 -0
- package/commands/delete.d.ts +3 -0
- package/commands/delete.d.ts.map +1 -0
- package/commands/delete.js +44 -0
- package/commands/delete.js.map +1 -0
- package/commands/down.d.ts +3 -0
- package/commands/down.d.ts.map +1 -0
- package/commands/down.js +23 -0
- package/commands/down.js.map +1 -0
- package/commands/download.d.ts +3 -0
- package/commands/download.d.ts.map +1 -0
- package/commands/download.js +79 -0
- package/commands/download.js.map +1 -0
- package/commands/eval.d.ts +3 -0
- package/commands/eval.d.ts.map +1 -0
- package/commands/eval.js +115 -0
- package/commands/eval.js.map +1 -0
- package/commands/get.d.ts +3 -0
- package/commands/get.d.ts.map +1 -0
- package/commands/get.js +113 -0
- package/commands/get.js.map +1 -0
- package/commands/install.d.ts +3 -0
- package/commands/install.d.ts.map +1 -0
- package/commands/install.js +68 -0
- package/commands/install.js.map +1 -0
- package/commands/internal-daemon.d.ts +3 -0
- package/commands/internal-daemon.d.ts.map +1 -0
- package/commands/internal-daemon.js +15 -0
- package/commands/internal-daemon.js.map +1 -0
- package/commands/list.d.ts +10 -0
- package/commands/list.d.ts.map +1 -0
- package/commands/list.js +131 -0
- package/commands/list.js.map +1 -0
- package/commands/logs.d.ts +3 -0
- package/commands/logs.d.ts.map +1 -0
- package/commands/logs.js +59 -0
- package/commands/logs.js.map +1 -0
- package/commands/marketplace.d.ts +3 -0
- package/commands/marketplace.d.ts.map +1 -0
- package/commands/marketplace.js +94 -0
- package/commands/marketplace.js.map +1 -0
- package/commands/mcp-server.d.ts +22 -0
- package/commands/mcp-server.d.ts.map +1 -0
- package/commands/mcp-server.js +105 -0
- package/commands/mcp-server.js.map +1 -0
- package/commands/mcp.d.ts +3 -0
- package/commands/mcp.d.ts.map +1 -0
- package/commands/mcp.js +58 -0
- package/commands/mcp.js.map +1 -0
- package/commands/push.d.ts +27 -0
- package/commands/push.d.ts.map +1 -0
- package/commands/push.js +401 -0
- package/commands/push.js.map +1 -0
- package/commands/reset.d.ts +3 -0
- package/commands/reset.d.ts.map +1 -0
- package/commands/reset.js +45 -0
- package/commands/reset.js.map +1 -0
- package/commands/resume.d.ts +3 -0
- package/commands/resume.d.ts.map +1 -0
- package/commands/resume.js +90 -0
- package/commands/resume.js.map +1 -0
- package/commands/run.d.ts +3 -0
- package/commands/run.d.ts.map +1 -0
- package/commands/run.js +158 -0
- package/commands/run.js.map +1 -0
- package/commands/runs/approve.d.ts +3 -0
- package/commands/runs/approve.d.ts.map +1 -0
- package/commands/runs/approve.js +37 -0
- package/commands/runs/approve.js.map +1 -0
- package/commands/runs/control.d.ts +3 -0
- package/commands/runs/control.d.ts.map +1 -0
- package/commands/runs/control.js +71 -0
- package/commands/runs/control.js.map +1 -0
- package/commands/runs/index.d.ts +3 -0
- package/commands/runs/index.d.ts.map +1 -0
- package/commands/runs/index.js +28 -0
- package/commands/runs/index.js.map +1 -0
- package/commands/runs/logs.d.ts +3 -0
- package/commands/runs/logs.d.ts.map +1 -0
- package/commands/runs/logs.js +33 -0
- package/commands/runs/logs.js.map +1 -0
- package/commands/runs/scores.d.ts +3 -0
- package/commands/runs/scores.d.ts.map +1 -0
- package/commands/runs/scores.js +26 -0
- package/commands/runs/scores.js.map +1 -0
- package/commands/runs/to-eval-case.d.ts +3 -0
- package/commands/runs/to-eval-case.d.ts.map +1 -0
- package/commands/runs/to-eval-case.js +35 -0
- package/commands/runs/to-eval-case.js.map +1 -0
- package/commands/runs/trace.d.ts +3 -0
- package/commands/runs/trace.d.ts.map +1 -0
- package/commands/runs/trace.js +24 -0
- package/commands/runs/trace.js.map +1 -0
- package/commands/schedule.d.ts +3 -0
- package/commands/schedule.d.ts.map +1 -0
- package/commands/schedule.js +57 -0
- package/commands/schedule.js.map +1 -0
- package/commands/search.d.ts +3 -0
- package/commands/search.d.ts.map +1 -0
- package/commands/search.js +76 -0
- package/commands/search.js.map +1 -0
- package/commands/service-account/index.d.ts +7 -0
- package/commands/service-account/index.d.ts.map +1 -0
- package/commands/service-account/index.js +144 -0
- package/commands/service-account/index.js.map +1 -0
- package/commands/setup.d.ts +3 -0
- package/commands/setup.d.ts.map +1 -0
- package/commands/setup.js +76 -0
- package/commands/setup.js.map +1 -0
- package/commands/shared.d.ts +15 -0
- package/commands/shared.d.ts.map +1 -0
- package/commands/shared.js +34 -0
- package/commands/shared.js.map +1 -0
- package/commands/status.d.ts +3 -0
- package/commands/status.d.ts.map +1 -0
- package/commands/status.js +18 -0
- package/commands/status.js.map +1 -0
- package/commands/tag.d.ts +3 -0
- package/commands/tag.d.ts.map +1 -0
- package/commands/tag.js +24 -0
- package/commands/tag.js.map +1 -0
- package/commands/up.d.ts +3 -0
- package/commands/up.d.ts.map +1 -0
- package/commands/up.js +84 -0
- package/commands/up.js.map +1 -0
- package/commands/usage.d.ts +5 -0
- package/commands/usage.d.ts.map +1 -0
- package/commands/usage.js +92 -0
- package/commands/usage.js.map +1 -0
- package/commands/validate.d.ts +3 -0
- package/commands/validate.d.ts.map +1 -0
- package/commands/validate.js +95 -0
- package/commands/validate.js.map +1 -0
- package/commands/vault.d.ts +3 -0
- package/commands/vault.d.ts.map +1 -0
- package/commands/vault.js +143 -0
- package/commands/vault.js.map +1 -0
- package/commands/version.d.ts +3 -0
- package/commands/version.d.ts.map +1 -0
- package/commands/version.js +11 -0
- package/commands/version.js.map +1 -0
- package/config/config.d.ts +110 -0
- package/config/config.d.ts.map +1 -0
- package/config/config.js +199 -0
- package/config/config.js.map +1 -0
- package/config/index.d.ts +5 -0
- package/config/index.d.ts.map +1 -0
- package/config/index.js +6 -0
- package/config/index.js.map +1 -0
- package/config/keys.d.ts +6 -0
- package/config/keys.d.ts.map +1 -0
- package/config/keys.js +80 -0
- package/config/keys.js.map +1 -0
- package/config/paths.d.ts +10 -0
- package/config/paths.d.ts.map +1 -0
- package/config/paths.js +21 -0
- package/config/paths.js.map +1 -0
- package/config/resolve.d.ts +65 -0
- package/config/resolve.d.ts.map +1 -0
- package/config/resolve.js +160 -0
- package/config/resolve.js.map +1 -0
- package/errors/classify.d.ts +17 -0
- package/errors/classify.d.ts.map +1 -0
- package/errors/classify.js +204 -0
- package/errors/classify.js.map +1 -0
- package/errors/cli-exit-error.d.ts +6 -0
- package/errors/cli-exit-error.d.ts.map +1 -0
- package/errors/cli-exit-error.js +15 -0
- package/errors/cli-exit-error.js.map +1 -0
- package/errors/exit-codes.d.ts +10 -0
- package/errors/exit-codes.d.ts.map +1 -0
- package/errors/exit-codes.js +15 -0
- package/errors/exit-codes.js.map +1 -0
- package/errors/handle.d.ts +14 -0
- package/errors/handle.d.ts.map +1 -0
- package/errors/handle.js +46 -0
- package/errors/handle.js.map +1 -0
- package/errors/index.d.ts +6 -0
- package/errors/index.d.ts.map +1 -0
- package/errors/index.js +7 -0
- package/errors/index.js.map +1 -0
- package/errors/usage-error.d.ts +5 -0
- package/errors/usage-error.d.ts.map +1 -0
- package/errors/usage-error.js +13 -0
- package/errors/usage-error.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +8 -0
- package/index.js.map +1 -0
- package/local/artifact.d.ts +77 -0
- package/local/artifact.d.ts.map +1 -0
- package/local/artifact.js +268 -0
- package/local/artifact.js.map +1 -0
- package/local/constants.d.ts +41 -0
- package/local/constants.d.ts.map +1 -0
- package/local/constants.js +48 -0
- package/local/constants.js.map +1 -0
- package/local/daemon/components.d.ts +20 -0
- package/local/daemon/components.d.ts.map +1 -0
- package/local/daemon/components.js +140 -0
- package/local/daemon/components.js.map +1 -0
- package/local/daemon/env.d.ts +77 -0
- package/local/daemon/env.d.ts.map +1 -0
- package/local/daemon/env.js +107 -0
- package/local/daemon/env.js.map +1 -0
- package/local/daemon/host.d.ts +15 -0
- package/local/daemon/host.d.ts.map +1 -0
- package/local/daemon/host.js +115 -0
- package/local/daemon/host.js.map +1 -0
- package/local/daemon/index.d.ts +8 -0
- package/local/daemon/index.d.ts.map +1 -0
- package/local/daemon/index.js +8 -0
- package/local/daemon/index.js.map +1 -0
- package/local/daemon/launch.d.ts +38 -0
- package/local/daemon/launch.d.ts.map +1 -0
- package/local/daemon/launch.js +261 -0
- package/local/daemon/launch.js.map +1 -0
- package/local/daemon/process.d.ts +42 -0
- package/local/daemon/process.d.ts.map +1 -0
- package/local/daemon/process.js +166 -0
- package/local/daemon/process.js.map +1 -0
- package/local/daemon/supervisor.d.ts +56 -0
- package/local/daemon/supervisor.d.ts.map +1 -0
- package/local/daemon/supervisor.js +211 -0
- package/local/daemon/supervisor.js.map +1 -0
- package/local/daemon/types.d.ts +65 -0
- package/local/daemon/types.d.ts.map +1 -0
- package/local/daemon/types.js +9 -0
- package/local/daemon/types.js.map +1 -0
- package/local/llm-config.d.ts +24 -0
- package/local/llm-config.d.ts.map +1 -0
- package/local/llm-config.js +74 -0
- package/local/llm-config.js.map +1 -0
- package/local/logs/tail.d.ts +19 -0
- package/local/logs/tail.d.ts.map +1 -0
- package/local/logs/tail.js +86 -0
- package/local/logs/tail.js.map +1 -0
- package/local/logs/view.d.ts +20 -0
- package/local/logs/view.d.ts.map +1 -0
- package/local/logs/view.js +50 -0
- package/local/logs/view.js.map +1 -0
- package/local/net/tcp.d.ts +23 -0
- package/local/net/tcp.d.ts.map +1 -0
- package/local/net/tcp.js +47 -0
- package/local/net/tcp.js.map +1 -0
- package/local/operator-config.d.ts +28 -0
- package/local/operator-config.d.ts.map +1 -0
- package/local/operator-config.js +77 -0
- package/local/operator-config.js.map +1 -0
- package/local/paths.d.ts +47 -0
- package/local/paths.d.ts.map +1 -0
- package/local/paths.js +83 -0
- package/local/paths.js.map +1 -0
- package/local/reset.d.ts +14 -0
- package/local/reset.d.ts.map +1 -0
- package/local/reset.js +57 -0
- package/local/reset.js.map +1 -0
- package/local/runtime/index.d.ts +5 -0
- package/local/runtime/index.d.ts.map +1 -0
- package/local/runtime/index.js +8 -0
- package/local/runtime/index.js.map +1 -0
- package/local/runtime/node.d.ts +17 -0
- package/local/runtime/node.d.ts.map +1 -0
- package/local/runtime/node.js +139 -0
- package/local/runtime/node.js.map +1 -0
- package/local/runtime/runner.d.ts +45 -0
- package/local/runtime/runner.d.ts.map +1 -0
- package/local/runtime/runner.js +131 -0
- package/local/runtime/runner.js.map +1 -0
- package/local/runtime/runtimes-install.d.ts +13 -0
- package/local/runtime/runtimes-install.d.ts.map +1 -0
- package/local/runtime/runtimes-install.js +63 -0
- package/local/runtime/runtimes-install.js.map +1 -0
- package/local/runtime/server.d.ts +40 -0
- package/local/runtime/server.d.ts.map +1 -0
- package/local/runtime/server.js +144 -0
- package/local/runtime/server.js.map +1 -0
- package/local/runtime/which.d.ts +3 -0
- package/local/runtime/which.d.ts.map +1 -0
- package/local/runtime/which.js +30 -0
- package/local/runtime/which.js.map +1 -0
- package/local/setup/prompt.d.ts +8 -0
- package/local/setup/prompt.d.ts.map +1 -0
- package/local/setup/prompt.js +63 -0
- package/local/setup/prompt.js.map +1 -0
- package/local/setup/wizard.d.ts +43 -0
- package/local/setup/wizard.d.ts.map +1 -0
- package/local/setup/wizard.js +119 -0
- package/local/setup/wizard.js.map +1 -0
- package/local/state/health-state.d.ts +26 -0
- package/local/state/health-state.d.ts.map +1 -0
- package/local/state/health-state.js +34 -0
- package/local/state/health-state.js.map +1 -0
- package/local/state/index.d.ts +7 -0
- package/local/state/index.d.ts.map +1 -0
- package/local/state/index.js +8 -0
- package/local/state/index.js.map +1 -0
- package/local/state/lock.d.ts +13 -0
- package/local/state/lock.d.ts.map +1 -0
- package/local/state/lock.js +84 -0
- package/local/state/lock.js.map +1 -0
- package/local/state/log-rotation.d.ts +17 -0
- package/local/state/log-rotation.d.ts.map +1 -0
- package/local/state/log-rotation.js +101 -0
- package/local/state/log-rotation.js.map +1 -0
- package/local/state/pidfile.d.ts +11 -0
- package/local/state/pidfile.d.ts.map +1 -0
- package/local/state/pidfile.js +35 -0
- package/local/state/pidfile.js.map +1 -0
- package/local/state/proc.d.ts +29 -0
- package/local/state/proc.d.ts.map +1 -0
- package/local/state/proc.js +84 -0
- package/local/state/proc.js.map +1 -0
- package/local/state/startup-config.d.ts +24 -0
- package/local/state/startup-config.d.ts.map +1 -0
- package/local/state/startup-config.js +36 -0
- package/local/state/startup-config.js.map +1 -0
- package/local/status.d.ts +9 -0
- package/local/status.d.ts.map +1 -0
- package/local/status.js +170 -0
- package/local/status.js.map +1 -0
- package/local/temporal/download.d.ts +42 -0
- package/local/temporal/download.d.ts.map +1 -0
- package/local/temporal/download.js +55 -0
- package/local/temporal/download.js.map +1 -0
- package/local/temporal/index.d.ts +5 -0
- package/local/temporal/index.d.ts.map +1 -0
- package/local/temporal/index.js +6 -0
- package/local/temporal/index.js.map +1 -0
- package/local/temporal/inspect.d.ts +15 -0
- package/local/temporal/inspect.d.ts.map +1 -0
- package/local/temporal/inspect.js +72 -0
- package/local/temporal/inspect.js.map +1 -0
- package/local/temporal/manager.d.ts +62 -0
- package/local/temporal/manager.d.ts.map +1 -0
- package/local/temporal/manager.js +221 -0
- package/local/temporal/manager.js.map +1 -0
- package/local/temporal/supervisor.d.ts +34 -0
- package/local/temporal/supervisor.d.ts.map +1 -0
- package/local/temporal/supervisor.js +83 -0
- package/local/temporal/supervisor.js.map +1 -0
- package/local/webconsole/index.d.ts +3 -0
- package/local/webconsole/index.d.ts.map +1 -0
- package/local/webconsole/index.js +27 -0
- package/local/webconsole/index.js.map +1 -0
- package/logger.d.ts +13 -0
- package/logger.d.ts.map +1 -0
- package/logger.js +35 -0
- package/logger.js.map +1 -0
- package/marketplace/config.d.ts +61 -0
- package/marketplace/config.d.ts.map +1 -0
- package/marketplace/config.js +179 -0
- package/marketplace/config.js.map +1 -0
- package/marketplace/github.d.ts +68 -0
- package/marketplace/github.d.ts.map +1 -0
- package/marketplace/github.js +272 -0
- package/marketplace/github.js.map +1 -0
- package/marketplace/index.d.ts +8 -0
- package/marketplace/index.d.ts.map +1 -0
- package/marketplace/index.js +12 -0
- package/marketplace/index.js.map +1 -0
- package/marketplace/install.d.ts +35 -0
- package/marketplace/install.d.ts.map +1 -0
- package/marketplace/install.js +156 -0
- package/marketplace/install.js.map +1 -0
- package/marketplace/materialize.d.ts +19 -0
- package/marketplace/materialize.d.ts.map +1 -0
- package/marketplace/materialize.js +53 -0
- package/marketplace/materialize.js.map +1 -0
- package/marketplace/official.d.ts +28 -0
- package/marketplace/official.d.ts.map +1 -0
- package/marketplace/official.js +87 -0
- package/marketplace/official.js.map +1 -0
- package/marketplace/read.d.ts +17 -0
- package/marketplace/read.d.ts.map +1 -0
- package/marketplace/read.js +44 -0
- package/marketplace/read.js.map +1 -0
- package/marketplace/ref.d.ts +13 -0
- package/marketplace/ref.d.ts.map +1 -0
- package/marketplace/ref.js +54 -0
- package/marketplace/ref.js.map +1 -0
- package/marketplace/render.d.ts +22 -0
- package/marketplace/render.d.ts.map +1 -0
- package/marketplace/render.js +115 -0
- package/marketplace/render.js.map +1 -0
- package/output/command-result.d.ts +55 -0
- package/output/command-result.d.ts.map +1 -0
- package/output/command-result.js +147 -0
- package/output/command-result.js.map +1 -0
- package/output/confirm.d.ts +22 -0
- package/output/confirm.d.ts.map +1 -0
- package/output/confirm.js +43 -0
- package/output/confirm.js.map +1 -0
- package/output/format.d.ts +22 -0
- package/output/format.d.ts.map +1 -0
- package/output/format.js +72 -0
- package/output/format.js.map +1 -0
- package/output/index.d.ts +7 -0
- package/output/index.d.ts.map +1 -0
- package/output/index.js +8 -0
- package/output/index.js.map +1 -0
- package/output/ndjson.d.ts +7 -0
- package/output/ndjson.d.ts.map +1 -0
- package/output/ndjson.js +13 -0
- package/output/ndjson.js.map +1 -0
- package/output/proto.d.ts +12 -0
- package/output/proto.d.ts.map +1 -0
- package/output/proto.js +34 -0
- package/output/proto.js.map +1 -0
- package/output/style.d.ts +19 -0
- package/output/style.d.ts.map +1 -0
- package/output/style.js +44 -0
- package/output/style.js.map +1 -0
- package/output/table.d.ts +5 -0
- package/output/table.d.ts.map +1 -0
- package/output/table.js +43 -0
- package/output/table.js.map +1 -0
- package/package.json +50 -0
- package/program.d.ts +17 -0
- package/program.d.ts.map +1 -0
- package/program.js +195 -0
- package/program.js.map +1 -0
- package/registry/aliases.d.ts +21 -0
- package/registry/aliases.d.ts.map +1 -0
- package/registry/aliases.js +99 -0
- package/registry/aliases.js.map +1 -0
- package/registry/index.d.ts +6 -0
- package/registry/index.d.ts.map +1 -0
- package/registry/index.js +7 -0
- package/registry/index.js.map +1 -0
- package/registry/metadata.d.ts +27 -0
- package/registry/metadata.d.ts.map +1 -0
- package/registry/metadata.js +152 -0
- package/registry/metadata.js.map +1 -0
- package/registry/registry.d.ts +56 -0
- package/registry/registry.d.ts.map +1 -0
- package/registry/registry.js +85 -0
- package/registry/registry.js.map +1 -0
- package/registry/verb-support.d.ts +5 -0
- package/registry/verb-support.d.ts.map +1 -0
- package/registry/verb-support.js +112 -0
- package/registry/verb-support.js.map +1 -0
- package/registry/verbs.d.ts +16 -0
- package/registry/verbs.d.ts.map +1 -0
- package/registry/verbs.js +35 -0
- package/registry/verbs.js.map +1 -0
- package/resources/access-history.d.ts +28 -0
- package/resources/access-history.d.ts.map +1 -0
- package/resources/access-history.js +124 -0
- package/resources/access-history.js.map +1 -0
- package/resources/agent/quality.d.ts +40 -0
- package/resources/agent/quality.d.ts.map +1 -0
- package/resources/agent/quality.js +338 -0
- package/resources/agent/quality.js.map +1 -0
- package/resources/agent/resolve.d.ts +5 -0
- package/resources/agent/resolve.d.ts.map +1 -0
- package/resources/agent/resolve.js +23 -0
- package/resources/agent/resolve.js.map +1 -0
- package/resources/apply/apply.d.ts +62 -0
- package/resources/apply/apply.d.ts.map +1 -0
- package/resources/apply/apply.js +371 -0
- package/resources/apply/apply.js.map +1 -0
- package/resources/apply/handlers.d.ts +54 -0
- package/resources/apply/handlers.d.ts.map +1 -0
- package/resources/apply/handlers.js +56 -0
- package/resources/apply/handlers.js.map +1 -0
- package/resources/channel.d.ts +52 -0
- package/resources/channel.d.ts.map +1 -0
- package/resources/channel.js +404 -0
- package/resources/channel.js.map +1 -0
- package/resources/connect/address.d.ts +5 -0
- package/resources/connect/address.d.ts.map +1 -0
- package/resources/connect/address.js +49 -0
- package/resources/connect/address.js.map +1 -0
- package/resources/connect/connect.d.ts +30 -0
- package/resources/connect/connect.d.ts.map +1 -0
- package/resources/connect/connect.js +163 -0
- package/resources/connect/connect.js.map +1 -0
- package/resources/connect/discover.d.ts +7 -0
- package/resources/connect/discover.d.ts.map +1 -0
- package/resources/connect/discover.js +122 -0
- package/resources/connect/discover.js.map +1 -0
- package/resources/connect/display.d.ts +10 -0
- package/resources/connect/display.d.ts.map +1 -0
- package/resources/connect/display.js +50 -0
- package/resources/connect/display.js.map +1 -0
- package/resources/connect/sign-in.d.ts +48 -0
- package/resources/connect/sign-in.d.ts.map +1 -0
- package/resources/connect/sign-in.js +158 -0
- package/resources/connect/sign-in.js.map +1 -0
- package/resources/cursor-pages.d.ts +9 -0
- package/resources/cursor-pages.d.ts.map +1 -0
- package/resources/cursor-pages.js +25 -0
- package/resources/cursor-pages.js.map +1 -0
- package/resources/delete.d.ts +34 -0
- package/resources/delete.d.ts.map +1 -0
- package/resources/delete.js +260 -0
- package/resources/delete.js.map +1 -0
- package/resources/documents.d.ts +16 -0
- package/resources/documents.d.ts.map +1 -0
- package/resources/documents.js +89 -0
- package/resources/documents.js.map +1 -0
- package/resources/download.d.ts +16 -0
- package/resources/download.d.ts.map +1 -0
- package/resources/download.js +101 -0
- package/resources/download.js.map +1 -0
- package/resources/eval-run/follow.d.ts +67 -0
- package/resources/eval-run/follow.d.ts.map +1 -0
- package/resources/eval-run/follow.js +285 -0
- package/resources/eval-run/follow.js.map +1 -0
- package/resources/eval-run/node-io.d.ts +4 -0
- package/resources/eval-run/node-io.d.ts.map +1 -0
- package/resources/eval-run/node-io.js +39 -0
- package/resources/eval-run/node-io.js.map +1 -0
- package/resources/eval-run/options.d.ts +116 -0
- package/resources/eval-run/options.d.ts.map +1 -0
- package/resources/eval-run/options.js +265 -0
- package/resources/eval-run/options.js.map +1 -0
- package/resources/eval-run/report.d.ts +64 -0
- package/resources/eval-run/report.d.ts.map +1 -0
- package/resources/eval-run/report.js +434 -0
- package/resources/eval-run/report.js.map +1 -0
- package/resources/eval-run/run.d.ts +10 -0
- package/resources/eval-run/run.d.ts.map +1 -0
- package/resources/eval-run/run.js +158 -0
- package/resources/eval-run/run.js.map +1 -0
- package/resources/eval.d.ts +69 -0
- package/resources/eval.d.ts.map +1 -0
- package/resources/eval.js +225 -0
- package/resources/eval.js.map +1 -0
- package/resources/get-bindings.d.ts +13 -0
- package/resources/get-bindings.d.ts.map +1 -0
- package/resources/get-bindings.js +93 -0
- package/resources/get-bindings.js.map +1 -0
- package/resources/get.d.ts +6 -0
- package/resources/get.d.ts.map +1 -0
- package/resources/get.js +43 -0
- package/resources/get.js.map +1 -0
- package/resources/git.d.ts +15 -0
- package/resources/git.d.ts.map +1 -0
- package/resources/git.js +69 -0
- package/resources/git.js.map +1 -0
- package/resources/ignore/index.d.ts +3 -0
- package/resources/ignore/index.d.ts.map +1 -0
- package/resources/ignore/index.js +6 -0
- package/resources/ignore/index.js.map +1 -0
- package/resources/ignore/matcher.d.ts +11 -0
- package/resources/ignore/matcher.d.ts.map +1 -0
- package/resources/ignore/matcher.js +41 -0
- package/resources/ignore/matcher.js.map +1 -0
- package/resources/list.d.ts +16 -0
- package/resources/list.d.ts.map +1 -0
- package/resources/list.js +453 -0
- package/resources/list.js.map +1 -0
- package/resources/mcp/add.d.ts +18 -0
- package/resources/mcp/add.d.ts.map +1 -0
- package/resources/mcp/add.js +95 -0
- package/resources/mcp/add.js.map +1 -0
- package/resources/mcp/placeholder-resolver.d.ts +19 -0
- package/resources/mcp/placeholder-resolver.d.ts.map +1 -0
- package/resources/mcp/placeholder-resolver.js +52 -0
- package/resources/mcp/placeholder-resolver.js.map +1 -0
- package/resources/picker/ink.d.ts +45 -0
- package/resources/picker/ink.d.ts.map +1 -0
- package/resources/picker/ink.js +45 -0
- package/resources/picker/ink.js.map +1 -0
- package/resources/picker/tty.d.ts +19 -0
- package/resources/picker/tty.d.ts.map +1 -0
- package/resources/picker/tty.js +21 -0
- package/resources/picker/tty.js.map +1 -0
- package/resources/plugin.d.ts +131 -0
- package/resources/plugin.d.ts.map +1 -0
- package/resources/plugin.js +382 -0
- package/resources/plugin.js.map +1 -0
- package/resources/reference.d.ts +44 -0
- package/resources/reference.d.ts.map +1 -0
- package/resources/reference.js +152 -0
- package/resources/reference.js.map +1 -0
- package/resources/render.d.ts +52 -0
- package/resources/render.d.ts.map +1 -0
- package/resources/render.js +135 -0
- package/resources/render.js.map +1 -0
- package/resources/run/agent-exec.d.ts +16 -0
- package/resources/run/agent-exec.d.ts.map +1 -0
- package/resources/run/agent-exec.js +89 -0
- package/resources/run/agent-exec.js.map +1 -0
- package/resources/run/attachments.d.ts +24 -0
- package/resources/run/attachments.d.ts.map +1 -0
- package/resources/run/attachments.js +237 -0
- package/resources/run/attachments.js.map +1 -0
- package/resources/run/create.d.ts +57 -0
- package/resources/run/create.d.ts.map +1 -0
- package/resources/run/create.js +112 -0
- package/resources/run/create.js.map +1 -0
- package/resources/run/epilogue.d.ts +9 -0
- package/resources/run/epilogue.d.ts.map +1 -0
- package/resources/run/epilogue.js +172 -0
- package/resources/run/epilogue.js.map +1 -0
- package/resources/run/header.d.ts +31 -0
- package/resources/run/header.d.ts.map +1 -0
- package/resources/run/header.js +54 -0
- package/resources/run/header.js.map +1 -0
- package/resources/run/plugins.d.ts +11 -0
- package/resources/run/plugins.d.ts.map +1 -0
- package/resources/run/plugins.js +18 -0
- package/resources/run/plugins.js.map +1 -0
- package/resources/run/prepare.d.ts +149 -0
- package/resources/run/prepare.d.ts.map +1 -0
- package/resources/run/prepare.js +180 -0
- package/resources/run/prepare.js.map +1 -0
- package/resources/run/references.d.ts +22 -0
- package/resources/run/references.d.ts.map +1 -0
- package/resources/run/references.js +56 -0
- package/resources/run/references.js.map +1 -0
- package/resources/run/resolve.d.ts +5 -0
- package/resources/run/resolve.d.ts.map +1 -0
- package/resources/run/resolve.js +16 -0
- package/resources/run/resolve.js.map +1 -0
- package/resources/run/resume.d.ts +12 -0
- package/resources/run/resume.d.ts.map +1 -0
- package/resources/run/resume.js +97 -0
- package/resources/run/resume.js.map +1 -0
- package/resources/run/stream.d.ts +24 -0
- package/resources/run/stream.d.ts.map +1 -0
- package/resources/run/stream.js +74 -0
- package/resources/run/stream.js.map +1 -0
- package/resources/run/vaults.d.ts +11 -0
- package/resources/run/vaults.d.ts.map +1 -0
- package/resources/run/vaults.js +19 -0
- package/resources/run/vaults.js.map +1 -0
- package/resources/run/workspace.d.ts +17 -0
- package/resources/run/workspace.d.ts.map +1 -0
- package/resources/run/workspace.js +147 -0
- package/resources/run/workspace.js.map +1 -0
- package/resources/run-approve.d.ts +18 -0
- package/resources/run-approve.d.ts.map +1 -0
- package/resources/run-approve.js +72 -0
- package/resources/run-approve.js.map +1 -0
- package/resources/run-control.d.ts +19 -0
- package/resources/run-control.d.ts.map +1 -0
- package/resources/run-control.js +37 -0
- package/resources/run-control.js.map +1 -0
- package/resources/run-format.d.ts +15 -0
- package/resources/run-format.d.ts.map +1 -0
- package/resources/run-format.js +49 -0
- package/resources/run-format.js.map +1 -0
- package/resources/run-logs.d.ts +17 -0
- package/resources/run-logs.d.ts.map +1 -0
- package/resources/run-logs.js +105 -0
- package/resources/run-logs.js.map +1 -0
- package/resources/run-scores.d.ts +20 -0
- package/resources/run-scores.d.ts.map +1 -0
- package/resources/run-scores.js +132 -0
- package/resources/run-scores.js.map +1 -0
- package/resources/run-to-eval-case.d.ts +24 -0
- package/resources/run-to-eval-case.d.ts.map +1 -0
- package/resources/run-to-eval-case.js +113 -0
- package/resources/run-to-eval-case.js.map +1 -0
- package/resources/run-trace.d.ts +10 -0
- package/resources/run-trace.d.ts.map +1 -0
- package/resources/run-trace.js +81 -0
- package/resources/run-trace.js.map +1 -0
- package/resources/runs.d.ts +45 -0
- package/resources/runs.d.ts.map +1 -0
- package/resources/runs.js +123 -0
- package/resources/runs.js.map +1 -0
- package/resources/schedule.d.ts +22 -0
- package/resources/schedule.d.ts.map +1 -0
- package/resources/schedule.js +116 -0
- package/resources/schedule.js.map +1 -0
- package/resources/search.d.ts +21 -0
- package/resources/search.d.ts.map +1 -0
- package/resources/search.js +25 -0
- package/resources/search.js.map +1 -0
- package/resources/service-account.d.ts +37 -0
- package/resources/service-account.d.ts.map +1 -0
- package/resources/service-account.js +139 -0
- package/resources/service-account.js.map +1 -0
- package/resources/session.d.ts +20 -0
- package/resources/session.d.ts.map +1 -0
- package/resources/session.js +51 -0
- package/resources/session.js.map +1 -0
- package/resources/skill.d.ts +123 -0
- package/resources/skill.d.ts.map +1 -0
- package/resources/skill.js +441 -0
- package/resources/skill.js.map +1 -0
- package/resources/stream/answer.d.ts +34 -0
- package/resources/stream/answer.d.ts.map +1 -0
- package/resources/stream/answer.js +88 -0
- package/resources/stream/answer.js.map +1 -0
- package/resources/stream/headless.d.ts +45 -0
- package/resources/stream/headless.d.ts.map +1 -0
- package/resources/stream/headless.js +100 -0
- package/resources/stream/headless.js.map +1 -0
- package/resources/stream/ink.d.ts +22 -0
- package/resources/stream/ink.d.ts.map +1 -0
- package/resources/stream/ink.js +24 -0
- package/resources/stream/ink.js.map +1 -0
- package/resources/stream/render-ndjson.d.ts +23 -0
- package/resources/stream/render-ndjson.d.ts.map +1 -0
- package/resources/stream/render-ndjson.js +28 -0
- package/resources/stream/render-ndjson.js.map +1 -0
- package/resources/stream/render-plaintext.d.ts +27 -0
- package/resources/stream/render-plaintext.d.ts.map +1 -0
- package/resources/stream/render-plaintext.js +142 -0
- package/resources/stream/render-plaintext.js.map +1 -0
- package/resources/stream/submit.d.ts +25 -0
- package/resources/stream/submit.d.ts.map +1 -0
- package/resources/stream/submit.js +132 -0
- package/resources/stream/submit.js.map +1 -0
- package/resources/stream/tty.d.ts +8 -0
- package/resources/stream/tty.d.ts.map +1 -0
- package/resources/stream/tty.js +15 -0
- package/resources/stream/tty.js.map +1 -0
- package/resources/tag.d.ts +4 -0
- package/resources/tag.d.ts.map +1 -0
- package/resources/tag.js +37 -0
- package/resources/tag.js.map +1 -0
- package/resources/usage.d.ts +47 -0
- package/resources/usage.d.ts.map +1 -0
- package/resources/usage.js +376 -0
- package/resources/usage.js.map +1 -0
- package/resources/validate.d.ts +7 -0
- package/resources/validate.d.ts.map +1 -0
- package/resources/validate.js +36 -0
- package/resources/validate.js.map +1 -0
- package/resources/vault.d.ts +79 -0
- package/resources/vault.d.ts.map +1 -0
- package/resources/vault.js +277 -0
- package/resources/vault.js.map +1 -0
- package/resources/version.d.ts +11 -0
- package/resources/version.d.ts.map +1 -0
- package/resources/version.js +80 -0
- package/resources/version.js.map +1 -0
- package/runtime.d.ts +5 -0
- package/runtime.d.ts.map +1 -0
- package/runtime.js +19 -0
- package/runtime.js.map +1 -0
- package/src/auth/auth0.ts +43 -0
- package/src/auth/callback-server.ts +104 -0
- package/src/auth/index.ts +6 -0
- package/src/auth/login.ts +106 -0
- package/src/auth/pages.ts +31 -0
- package/src/auth/pkce.ts +26 -0
- package/src/auth/token.ts +159 -0
- package/src/backend.ts +15 -0
- package/src/cli/stigmer.ts +16 -0
- package/src/client/client.ts +157 -0
- package/src/client/index.ts +3 -0
- package/src/client/organizations.ts +118 -0
- package/src/client/single-org.ts +62 -0
- package/src/commands/access-history/index.ts +124 -0
- package/src/commands/agent-exec-flags.ts +76 -0
- package/src/commands/agent.ts +57 -0
- package/src/commands/apikey/duration.ts +35 -0
- package/src/commands/apikey/index.ts +273 -0
- package/src/commands/apply.ts +200 -0
- package/src/commands/auth/index.ts +76 -0
- package/src/commands/auth/login.ts +70 -0
- package/src/commands/auth/whoami.ts +157 -0
- package/src/commands/channel.ts +178 -0
- package/src/commands/completion.ts +94 -0
- package/src/commands/config/backend.ts +239 -0
- package/src/commands/config/context.ts +110 -0
- package/src/commands/config/index.ts +18 -0
- package/src/commands/config/kv.ts +44 -0
- package/src/commands/connect.ts +115 -0
- package/src/commands/delete.ts +59 -0
- package/src/commands/down.ts +27 -0
- package/src/commands/download.ts +113 -0
- package/src/commands/eval.ts +148 -0
- package/src/commands/get.ts +138 -0
- package/src/commands/install.ts +108 -0
- package/src/commands/internal-daemon.ts +17 -0
- package/src/commands/list.ts +164 -0
- package/src/commands/logs.ts +73 -0
- package/src/commands/marketplace.ts +133 -0
- package/src/commands/mcp-server.ts +125 -0
- package/src/commands/mcp.ts +92 -0
- package/src/commands/push.ts +630 -0
- package/src/commands/reset.ts +57 -0
- package/src/commands/resume.ts +122 -0
- package/src/commands/run.ts +228 -0
- package/src/commands/runs/approve.ts +57 -0
- package/src/commands/runs/control.ts +96 -0
- package/src/commands/runs/index.ts +31 -0
- package/src/commands/runs/logs.ts +45 -0
- package/src/commands/runs/scores.ts +34 -0
- package/src/commands/runs/to-eval-case.ts +50 -0
- package/src/commands/runs/trace.ts +32 -0
- package/src/commands/schedule.ts +70 -0
- package/src/commands/search.ts +95 -0
- package/src/commands/service-account/index.ts +180 -0
- package/src/commands/setup.ts +97 -0
- package/src/commands/shared.ts +41 -0
- package/src/commands/status.ts +20 -0
- package/src/commands/tag.ts +31 -0
- package/src/commands/up.ts +113 -0
- package/src/commands/usage.ts +116 -0
- package/src/commands/validate.ts +127 -0
- package/src/commands/vault.ts +245 -0
- package/src/commands/version.ts +13 -0
- package/src/config/config.ts +308 -0
- package/src/config/index.ts +33 -0
- package/src/config/keys.ts +105 -0
- package/src/config/paths.ts +25 -0
- package/src/config/resolve.ts +174 -0
- package/src/errors/classify.ts +249 -0
- package/src/errors/cli-exit-error.ts +16 -0
- package/src/errors/exit-codes.ts +17 -0
- package/src/errors/handle.ts +53 -0
- package/src/errors/index.ts +7 -0
- package/src/errors/usage-error.ts +14 -0
- package/src/index.ts +8 -0
- package/src/local/artifact.ts +351 -0
- package/src/local/constants.ts +55 -0
- package/src/local/daemon/components.ts +145 -0
- package/src/local/daemon/env.ts +171 -0
- package/src/local/daemon/host.ts +128 -0
- package/src/local/daemon/index.ts +18 -0
- package/src/local/daemon/launch.ts +326 -0
- package/src/local/daemon/process.ts +213 -0
- package/src/local/daemon/supervisor.ts +249 -0
- package/src/local/daemon/types.ts +78 -0
- package/src/local/llm-config.ts +86 -0
- package/src/local/logs/tail.ts +100 -0
- package/src/local/logs/view.ts +65 -0
- package/src/local/net/tcp.ts +65 -0
- package/src/local/operator-config.ts +95 -0
- package/src/local/paths.ts +95 -0
- package/src/local/reset.ts +90 -0
- package/src/local/runtime/index.ts +19 -0
- package/src/local/runtime/node.ts +173 -0
- package/src/local/runtime/runner.ts +159 -0
- package/src/local/runtime/runtimes-install.ts +75 -0
- package/src/local/runtime/server.ts +197 -0
- package/src/local/runtime/which.ts +30 -0
- package/src/local/setup/prompt.ts +70 -0
- package/src/local/setup/wizard.ts +140 -0
- package/src/local/state/health-state.ts +55 -0
- package/src/local/state/index.ts +8 -0
- package/src/local/state/lock.ts +92 -0
- package/src/local/state/log-rotation.ts +112 -0
- package/src/local/state/pidfile.ts +37 -0
- package/src/local/state/proc.ts +82 -0
- package/src/local/state/startup-config.ts +55 -0
- package/src/local/status.ts +189 -0
- package/src/local/temporal/download.ts +84 -0
- package/src/local/temporal/index.ts +14 -0
- package/src/local/temporal/inspect.ts +80 -0
- package/src/local/temporal/manager.ts +261 -0
- package/src/local/temporal/supervisor.ts +97 -0
- package/src/local/webconsole/index.ts +30 -0
- package/src/logger.ts +39 -0
- package/src/marketplace/config.ts +255 -0
- package/src/marketplace/github.ts +410 -0
- package/src/marketplace/index.ts +54 -0
- package/src/marketplace/install.ts +217 -0
- package/src/marketplace/materialize.ts +80 -0
- package/src/marketplace/official.ts +126 -0
- package/src/marketplace/read.ts +76 -0
- package/src/marketplace/ref.ts +74 -0
- package/src/marketplace/render.ts +151 -0
- package/src/output/command-result.ts +199 -0
- package/src/output/confirm.ts +54 -0
- package/src/output/format.ts +101 -0
- package/src/output/index.ts +30 -0
- package/src/output/ndjson.ts +14 -0
- package/src/output/proto.ts +55 -0
- package/src/output/style.ts +57 -0
- package/src/output/table.ts +52 -0
- package/src/program.ts +209 -0
- package/src/registry/aliases.ts +113 -0
- package/src/registry/index.ts +30 -0
- package/src/registry/metadata.ts +170 -0
- package/src/registry/registry.ts +135 -0
- package/src/registry/verb-support.ts +117 -0
- package/src/registry/verbs.ts +42 -0
- package/src/resources/access-history.ts +167 -0
- package/src/resources/agent/quality.ts +424 -0
- package/src/resources/agent/resolve.ts +31 -0
- package/src/resources/apply/apply.ts +472 -0
- package/src/resources/apply/handlers.ts +115 -0
- package/src/resources/channel.ts +548 -0
- package/src/resources/connect/address.ts +47 -0
- package/src/resources/connect/connect.ts +219 -0
- package/src/resources/connect/discover.ts +145 -0
- package/src/resources/connect/display.ts +67 -0
- package/src/resources/connect/sign-in.ts +210 -0
- package/src/resources/cursor-pages.ts +35 -0
- package/src/resources/delete.ts +381 -0
- package/src/resources/documents.ts +102 -0
- package/src/resources/download.ts +147 -0
- package/src/resources/eval-run/follow.ts +390 -0
- package/src/resources/eval-run/node-io.ts +42 -0
- package/src/resources/eval-run/options.ts +391 -0
- package/src/resources/eval-run/report.ts +529 -0
- package/src/resources/eval-run/run.ts +230 -0
- package/src/resources/eval.ts +278 -0
- package/src/resources/get-bindings.ts +137 -0
- package/src/resources/get.ts +51 -0
- package/src/resources/git.ts +71 -0
- package/src/resources/ignore/index.ts +20 -0
- package/src/resources/ignore/matcher.ts +55 -0
- package/src/resources/list.ts +552 -0
- package/src/resources/mcp/add.ts +105 -0
- package/src/resources/mcp/placeholder-resolver.ts +63 -0
- package/src/resources/picker/ink.tsx +123 -0
- package/src/resources/picker/tty.ts +30 -0
- package/src/resources/plugin.ts +560 -0
- package/src/resources/reference.ts +170 -0
- package/src/resources/render.ts +198 -0
- package/src/resources/run/agent-exec.ts +115 -0
- package/src/resources/run/attachments.ts +300 -0
- package/src/resources/run/create.ts +181 -0
- package/src/resources/run/epilogue.ts +200 -0
- package/src/resources/run/header.ts +72 -0
- package/src/resources/run/plugins.ts +32 -0
- package/src/resources/run/prepare.ts +350 -0
- package/src/resources/run/references.ts +77 -0
- package/src/resources/run/resolve.ts +18 -0
- package/src/resources/run/resume.ts +122 -0
- package/src/resources/run/stream.ts +96 -0
- package/src/resources/run/vaults.ts +33 -0
- package/src/resources/run/workspace.ts +171 -0
- package/src/resources/run-approve.ts +94 -0
- package/src/resources/run-control.ts +59 -0
- package/src/resources/run-format.ts +44 -0
- package/src/resources/run-logs.ts +131 -0
- package/src/resources/run-scores.ts +164 -0
- package/src/resources/run-to-eval-case.ts +160 -0
- package/src/resources/run-trace.ts +102 -0
- package/src/resources/runs.ts +155 -0
- package/src/resources/schedule.ts +132 -0
- package/src/resources/search.ts +62 -0
- package/src/resources/service-account.ts +195 -0
- package/src/resources/session.ts +64 -0
- package/src/resources/skill.ts +577 -0
- package/src/resources/stream/answer.ts +125 -0
- package/src/resources/stream/headless.ts +150 -0
- package/src/resources/stream/ink.tsx +56 -0
- package/src/resources/stream/render-ndjson.ts +44 -0
- package/src/resources/stream/render-plaintext.ts +153 -0
- package/src/resources/stream/submit.ts +145 -0
- package/src/resources/stream/tty.ts +14 -0
- package/src/resources/tag.ts +51 -0
- package/src/resources/usage.ts +443 -0
- package/src/resources/validate.ts +37 -0
- package/src/resources/vault.ts +372 -0
- package/src/resources/version.ts +103 -0
- package/src/runtime.ts +23 -0
- package/src/types/marked-terminal.d.ts +31 -0
- package/src/version.ts +46 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +45 -0
- package/version.js.map +1 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// The foreground launcher hands the supervised daemon everything it needs to
|
|
2
|
+
// run through the environment. Centralizing the variable names and the
|
|
3
|
+
// (de)serialization here keeps that contract in one place: the launcher writes
|
|
4
|
+
// it with buildDaemonEnv, the daemon reads it with readDaemonConfig, and
|
|
5
|
+
// nothing in between guesses at string keys.
|
|
6
|
+
/** Environment variable names that make up the launcher -> daemon contract. */
|
|
7
|
+
export const DaemonEnvVar = {
|
|
8
|
+
DataDir: "STIGMER_DATA_DIR",
|
|
9
|
+
LogDir: "STIGMER_LOG_DIR",
|
|
10
|
+
TemporalManaged: "STIGMER_TEMPORAL_MANAGED",
|
|
11
|
+
TemporalAddress: "TEMPORAL_SERVICE_ADDRESS",
|
|
12
|
+
ServerOnly: "STIGMER_SERVER_ONLY",
|
|
13
|
+
NoWeb: "STIGMER_NO_WEB",
|
|
14
|
+
ServerNodeBin: "STIGMER_SERVER_NODE_BIN",
|
|
15
|
+
ServerEntry: "STIGMER_SERVER_ENTRY",
|
|
16
|
+
ServerAppDir: "STIGMER_SERVER_APP_DIR",
|
|
17
|
+
RunnerNodeBin: "STIGMER_RUNNER_NODE_BIN",
|
|
18
|
+
RunnerEntry: "STIGMER_RUNNER_ENTRY",
|
|
19
|
+
RunnerAppDir: "STIGMER_RUNNER_APP_DIR",
|
|
20
|
+
CursorApiKey: "CURSOR_API_KEY",
|
|
21
|
+
AnthropicApiKey: "ANTHROPIC_API_KEY",
|
|
22
|
+
ActivityRouting: "STIGMER_ACTIVITY_ROUTING",
|
|
23
|
+
OperatorEmail: "STIGMER_OPERATOR_EMAIL",
|
|
24
|
+
OperatorName: "STIGMER_OPERATOR_NAME",
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Build the environment for the internal-daemon child: the caller's environment
|
|
28
|
+
* plus the resolved contract values. Runner coordinates are omitted in
|
|
29
|
+
* server-only mode.
|
|
30
|
+
*/
|
|
31
|
+
export function buildDaemonEnv(inputs, base = process.env) {
|
|
32
|
+
const env = { ...base };
|
|
33
|
+
env[DaemonEnvVar.DataDir] = inputs.dataDir;
|
|
34
|
+
env[DaemonEnvVar.LogDir] = inputs.logDir;
|
|
35
|
+
env[DaemonEnvVar.TemporalManaged] = String(inputs.temporalManaged);
|
|
36
|
+
env[DaemonEnvVar.TemporalAddress] = inputs.temporalAddress;
|
|
37
|
+
env[DaemonEnvVar.ServerNodeBin] = inputs.server.nodeBin;
|
|
38
|
+
env[DaemonEnvVar.ServerEntry] = inputs.server.entryPath;
|
|
39
|
+
env[DaemonEnvVar.ServerAppDir] = inputs.server.appDir;
|
|
40
|
+
if (inputs.serverOnly)
|
|
41
|
+
env[DaemonEnvVar.ServerOnly] = "true";
|
|
42
|
+
if (inputs.noWeb)
|
|
43
|
+
env[DaemonEnvVar.NoWeb] = "1";
|
|
44
|
+
if (inputs.runner !== undefined && !inputs.serverOnly) {
|
|
45
|
+
env[DaemonEnvVar.RunnerNodeBin] = inputs.runner.nodeBin;
|
|
46
|
+
env[DaemonEnvVar.RunnerEntry] = inputs.runner.entryPath;
|
|
47
|
+
env[DaemonEnvVar.RunnerAppDir] = inputs.runner.appDir;
|
|
48
|
+
}
|
|
49
|
+
if (inputs.anthropicApiKey !== undefined)
|
|
50
|
+
env[DaemonEnvVar.AnthropicApiKey] = inputs.anthropicApiKey;
|
|
51
|
+
if (inputs.operatorEmail !== undefined)
|
|
52
|
+
env[DaemonEnvVar.OperatorEmail] = inputs.operatorEmail;
|
|
53
|
+
if (inputs.operatorName !== undefined)
|
|
54
|
+
env[DaemonEnvVar.OperatorName] = inputs.operatorName;
|
|
55
|
+
return env;
|
|
56
|
+
}
|
|
57
|
+
/** Parse the daemon configuration from an environment. Throws if a required
|
|
58
|
+
* value is missing. */
|
|
59
|
+
export function readDaemonConfig(env = process.env) {
|
|
60
|
+
const dataDir = required(env, DaemonEnvVar.DataDir);
|
|
61
|
+
const logDir = env[DaemonEnvVar.LogDir] ?? `${dataDir}/logs`;
|
|
62
|
+
const serverOnly = env[DaemonEnvVar.ServerOnly] === "true";
|
|
63
|
+
const runner = readRunner(env);
|
|
64
|
+
return {
|
|
65
|
+
dataDir,
|
|
66
|
+
logDir,
|
|
67
|
+
temporalManaged: env[DaemonEnvVar.TemporalManaged] === "true",
|
|
68
|
+
temporalAddress: env[DaemonEnvVar.TemporalAddress] ?? "127.0.0.1:7233",
|
|
69
|
+
serverOnly,
|
|
70
|
+
noWeb: env[DaemonEnvVar.NoWeb] === "1",
|
|
71
|
+
server: readServer(env),
|
|
72
|
+
runner: serverOnly ? undefined : runner,
|
|
73
|
+
cursorApiKey: nonEmpty(env[DaemonEnvVar.CursorApiKey]),
|
|
74
|
+
anthropicApiKey: nonEmpty(env[DaemonEnvVar.AnthropicApiKey]),
|
|
75
|
+
activityRouting: nonEmpty(env[DaemonEnvVar.ActivityRouting]),
|
|
76
|
+
operatorEmail: nonEmpty(env[DaemonEnvVar.OperatorEmail]),
|
|
77
|
+
operatorName: nonEmpty(env[DaemonEnvVar.OperatorName]),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function readServer(env) {
|
|
81
|
+
const nodeBin = env[DaemonEnvVar.ServerNodeBin];
|
|
82
|
+
const entryPath = env[DaemonEnvVar.ServerEntry];
|
|
83
|
+
const appDir = env[DaemonEnvVar.ServerAppDir];
|
|
84
|
+
if (!nodeBin || !entryPath || !appDir) {
|
|
85
|
+
throw new Error(`the ${DaemonEnvVar.ServerNodeBin}/${DaemonEnvVar.ServerEntry}/${DaemonEnvVar.ServerAppDir} triple is required for the daemon process`);
|
|
86
|
+
}
|
|
87
|
+
return { nodeBin, entryPath, appDir };
|
|
88
|
+
}
|
|
89
|
+
function readRunner(env) {
|
|
90
|
+
const nodeBin = env[DaemonEnvVar.RunnerNodeBin];
|
|
91
|
+
const entryPath = env[DaemonEnvVar.RunnerEntry];
|
|
92
|
+
const appDir = env[DaemonEnvVar.RunnerAppDir];
|
|
93
|
+
if (!nodeBin || !entryPath || !appDir)
|
|
94
|
+
return undefined;
|
|
95
|
+
return { nodeBin, entryPath, appDir };
|
|
96
|
+
}
|
|
97
|
+
function required(env, key) {
|
|
98
|
+
const value = env[key];
|
|
99
|
+
if (value === undefined || value === "") {
|
|
100
|
+
throw new Error(`${key} is required for the daemon process`);
|
|
101
|
+
}
|
|
102
|
+
return value;
|
|
103
|
+
}
|
|
104
|
+
function nonEmpty(value) {
|
|
105
|
+
return value !== undefined && value !== "" ? value : undefined;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.js","sourceRoot":"","sources":["../../src/local/daemon/env.ts"],"names":[],"mappings":"AAAA,6EAA6E;AAC7E,uEAAuE;AACvE,+EAA+E;AAC/E,yEAAyE;AACzE,6CAA6C;AAE7C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,OAAO,EAAE,kBAAkB;IAC3B,MAAM,EAAE,iBAAiB;IACzB,eAAe,EAAE,0BAA0B;IAC3C,eAAe,EAAE,0BAA0B;IAC3C,UAAU,EAAE,qBAAqB;IACjC,KAAK,EAAE,gBAAgB;IACvB,aAAa,EAAE,yBAAyB;IACxC,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,wBAAwB;IACtC,aAAa,EAAE,yBAAyB;IACxC,WAAW,EAAE,sBAAsB;IACnC,YAAY,EAAE,wBAAwB;IACtC,YAAY,EAAE,gBAAgB;IAC9B,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,0BAA0B;IAC3C,aAAa,EAAE,wBAAwB;IACvC,YAAY,EAAE,uBAAuB;CAC7B,CAAC;AA+DX;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAuB,EAAE,OAA0B,OAAO,CAAC,GAAG;IAC3F,MAAM,GAAG,GAAsB,EAAE,GAAG,IAAI,EAAE,CAAC;IAC3C,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,MAAM,CAAC,OAAO,CA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;AAED,SAAS,QAAQ,CAAC,KAAyB;IACzC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChildHandle, Clock, ProcessHost, SpawnRequest } from "./types.js";
|
|
2
|
+
/** Receives one complete output line from a child, with the component that wrote it. */
|
|
3
|
+
export type OutputMirror = (component: string, line: string) => void;
|
|
4
|
+
export interface NodeProcessHostOptions {
|
|
5
|
+
mirror?: OutputMirror;
|
|
6
|
+
}
|
|
7
|
+
export declare class NodeProcessHost implements ProcessHost {
|
|
8
|
+
private readonly mirror;
|
|
9
|
+
constructor(options?: NodeProcessHostOptions);
|
|
10
|
+
spawn(request: SpawnRequest): ChildHandle;
|
|
11
|
+
private lineMirror;
|
|
12
|
+
}
|
|
13
|
+
/** Real wall-clock implementation of Clock. */
|
|
14
|
+
export declare const systemClock: Clock;
|
|
15
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/local/daemon/host.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,WAAW,EAAE,KAAK,EAAY,WAAW,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1F,wFAAwF;AACxF,MAAM,MAAM,YAAY,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;AAErE,MAAM,WAAW,sBAAsB;IACrC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,qBAAa,eAAgB,YAAW,WAAW;IACjD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;gBAEtC,OAAO,GAAE,sBAA2B;IAIhD,KAAK,CAAC,OAAO,EAAE,YAAY,GAAG,WAAW;IAuEzC,OAAO,CAAC,UAAU;CAenB;AAED,+CAA+C;AAC/C,eAAO,MAAM,WAAW,EAAE,KAGzB,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// The production ProcessHost and Clock.
|
|
2
|
+
//
|
|
3
|
+
// Children are spawned detached (their own process group) so the whole tree can
|
|
4
|
+
// be signaled, with stdout+stderr piped through the daemon. The daemon tees each
|
|
5
|
+
// chunk to the component's log file and scans stdout for an optional readiness
|
|
6
|
+
// marker — the same pipe-and-watch shape the conformance/e2e harnesses use,
|
|
7
|
+
// which is what lets `status` report "runner actually polling" instead of mere
|
|
8
|
+
// liveness. Logs survive normally because the daemon outlives its children; an
|
|
9
|
+
// abnormal daemon death is handled by orphan cleanup on the next `up`.
|
|
10
|
+
//
|
|
11
|
+
// An optional mirror receives every complete line a child writes, tagged with
|
|
12
|
+
// the component's name. The foreground launcher (`stigmer up --foreground`)
|
|
13
|
+
// uses it to show the stack's output in the terminal — or in `docker logs` —
|
|
14
|
+
// while the log files keep receiving the same bytes. The detached daemon
|
|
15
|
+
// installs no mirror: its own stdout is already redirected to daemon.log.
|
|
16
|
+
import { spawn } from "node:child_process";
|
|
17
|
+
import { createWriteStream } from "node:fs";
|
|
18
|
+
import { killProcessGroup } from "../state/proc.js";
|
|
19
|
+
export class NodeProcessHost {
|
|
20
|
+
mirror;
|
|
21
|
+
constructor(options = {}) {
|
|
22
|
+
this.mirror = options.mirror;
|
|
23
|
+
}
|
|
24
|
+
spawn(request) {
|
|
25
|
+
const out = createWriteStream(request.logFile, { flags: "a" });
|
|
26
|
+
const child = spawn(request.command, request.args, {
|
|
27
|
+
cwd: request.cwd,
|
|
28
|
+
env: request.env,
|
|
29
|
+
detached: true,
|
|
30
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
31
|
+
});
|
|
32
|
+
let exited = false;
|
|
33
|
+
let exitCb = null;
|
|
34
|
+
let readyCb = null;
|
|
35
|
+
let ready = false;
|
|
36
|
+
// Keep a small rolling tail so a marker split across chunks is still found.
|
|
37
|
+
let tail = "";
|
|
38
|
+
const marker = request.readinessMarker;
|
|
39
|
+
// One line assembler per stream: a chunk can end mid-line, and the two
|
|
40
|
+
// streams interleave, so each keeps its own partial line.
|
|
41
|
+
const mirrorStdout = this.lineMirror(request.name);
|
|
42
|
+
const mirrorStderr = this.lineMirror(request.name);
|
|
43
|
+
child.stdout?.on("data", (chunk) => {
|
|
44
|
+
out.write(chunk);
|
|
45
|
+
mirrorStdout(chunk);
|
|
46
|
+
if (marker !== undefined && !ready) {
|
|
47
|
+
tail = (tail + chunk.toString("utf8")).slice(-Math.max(marker.length * 2, 256));
|
|
48
|
+
if (tail.includes(marker)) {
|
|
49
|
+
ready = true;
|
|
50
|
+
readyCb?.();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
child.stderr?.on("data", (chunk) => {
|
|
55
|
+
out.write(chunk);
|
|
56
|
+
mirrorStderr(chunk);
|
|
57
|
+
});
|
|
58
|
+
child.on("exit", (code, signal) => {
|
|
59
|
+
exited = true;
|
|
60
|
+
mirrorStdout(null);
|
|
61
|
+
mirrorStderr(null);
|
|
62
|
+
out.end();
|
|
63
|
+
exitCb?.({ code, signal });
|
|
64
|
+
});
|
|
65
|
+
child.on("error", (err) => {
|
|
66
|
+
out.write(`failed to spawn ${request.command}: ${String(err)}\n`);
|
|
67
|
+
exited = true;
|
|
68
|
+
exitCb?.({ code: null, signal: null });
|
|
69
|
+
});
|
|
70
|
+
const pid = child.pid ?? -1;
|
|
71
|
+
return {
|
|
72
|
+
pid,
|
|
73
|
+
hasExited: () => exited,
|
|
74
|
+
onExit: (cb) => {
|
|
75
|
+
exitCb = cb;
|
|
76
|
+
},
|
|
77
|
+
onReady: (cb) => {
|
|
78
|
+
readyCb = cb;
|
|
79
|
+
if (ready)
|
|
80
|
+
cb();
|
|
81
|
+
},
|
|
82
|
+
kill: (signal) => {
|
|
83
|
+
if (pid > 0)
|
|
84
|
+
killProcessGroup(pid, signal);
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
// Assemble complete lines from a byte stream and hand each to the mirror. A
|
|
89
|
+
// `null` chunk flushes the trailing partial line at exit. Without a mirror
|
|
90
|
+
// this is a no-op closure, so the hot path pays nothing in the detached daemon.
|
|
91
|
+
lineMirror(component) {
|
|
92
|
+
const mirror = this.mirror;
|
|
93
|
+
if (mirror === undefined)
|
|
94
|
+
return () => { };
|
|
95
|
+
let partial = "";
|
|
96
|
+
return (chunk) => {
|
|
97
|
+
if (chunk === null) {
|
|
98
|
+
if (partial !== "")
|
|
99
|
+
mirror(component, partial);
|
|
100
|
+
partial = "";
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
const lines = (partial + chunk.toString("utf8")).split("\n");
|
|
104
|
+
partial = lines.pop() ?? "";
|
|
105
|
+
for (const line of lines)
|
|
106
|
+
mirror(component, line);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** Real wall-clock implementation of Clock. */
|
|
111
|
+
export const systemClock = {
|
|
112
|
+
now: () => Date.now(),
|
|
113
|
+
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/local/daemon/host.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,gFAAgF;AAChF,iFAAiF;AACjF,+EAA+E;AAC/E,4EAA4E;AAC5E,+EAA+E;AAC/E,+EAA+E;AAC/E,uEAAuE;AACvE,EAAE;AACF,8EAA8E;AAC9E,4EAA4E;AAC5E,6EAA6E;AAC7E,yEAAyE;AACzE,0EAA0E;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAA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,EAAE;IACrB,KAAK,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;CACjE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { buildComponents, buildRunnerEnv, buildServerEnv } from "./components.js";
|
|
2
|
+
export { type DaemonConfig, type DaemonEnvInputs, DaemonEnvVar, buildDaemonEnv, readDaemonConfig } from "./env.js";
|
|
3
|
+
export { NodeProcessHost, type NodeProcessHostOptions, type OutputMirror, systemClock } from "./host.js";
|
|
4
|
+
export { down, isRunning, type UpForegroundDeps, type UpOptions, up, upForeground } from "./launch.js";
|
|
5
|
+
export { type InternalDaemonDeps, type TemporalControl, runInternalDaemon, waitForShutdownSignal } from "./process.js";
|
|
6
|
+
export { HEALTH_CHECK_INTERVAL_MS, MAX_RESTARTS, MAX_UNHEALTHY_CHECKS, ProcessSupervisor, RAPID_CRASH_WINDOW_MS, SETTLE_DELAY_MS, type StartResult, type SupervisorDeps, } from "./supervisor.js";
|
|
7
|
+
export type { ChildHandle, Clock, ComponentSpec, ExitInfo, ProcessHost, ReadinessGate, SpawnRequest } from "./types.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/local/daemon/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,eAAe,EAAE,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,gBAAgB,EAAE,KAAK,SAAS,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,eAAe,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,KAAK,WAAW,EAChB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Public surface of the daemon subsystem.
|
|
2
|
+
export { buildComponents, buildRunnerEnv, buildServerEnv } from "./components.js";
|
|
3
|
+
export { DaemonEnvVar, buildDaemonEnv, readDaemonConfig } from "./env.js";
|
|
4
|
+
export { NodeProcessHost, systemClock } from "./host.js";
|
|
5
|
+
export { down, isRunning, up, upForeground } from "./launch.js";
|
|
6
|
+
export { runInternalDaemon, waitForShutdownSignal } from "./process.js";
|
|
7
|
+
export { HEALTH_CHECK_INTERVAL_MS, MAX_RESTARTS, MAX_UNHEALTHY_CHECKS, ProcessSupervisor, RAPID_CRASH_WINDOW_MS, SETTLE_DELAY_MS, } from "./supervisor.js";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/local/daemon/index.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAE1C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EAA2C,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACnH,OAAO,EAAE,eAAe,EAAkD,WAAW,EAAE,MAAM,WAAW,CAAC;AACzG,OAAO,EAAE,IAAI,EAAE,SAAS,EAAyC,EAAE,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACvG,OAAO,EAAiD,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACvH,OAAO,EACL,wBAAwB,EACxB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAGhB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type OutputMirror } from "./host.js";
|
|
2
|
+
import { type InternalDaemonDeps } from "./process.js";
|
|
3
|
+
export interface UpOptions {
|
|
4
|
+
serverOnly?: boolean;
|
|
5
|
+
noWeb?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/** Start the local stack in the background. Throws on any startup failure. */
|
|
8
|
+
export declare function up(options?: UpOptions, home?: string): Promise<void>;
|
|
9
|
+
/** Seams of the foreground launcher, injectable for tests. */
|
|
10
|
+
export interface UpForegroundDeps {
|
|
11
|
+
/** The daemon body (default: the real one). */
|
|
12
|
+
runDaemon?: (deps: InternalDaemonDeps) => Promise<number>;
|
|
13
|
+
/** Resolves when the stack should shut down (default: the first SIGTERM/SIGINT). */
|
|
14
|
+
waitForShutdown?: () => Promise<void>;
|
|
15
|
+
/** Receives each line the server and runner write (default: a `[component]`-prefixed stdout mirror). */
|
|
16
|
+
mirror?: OutputMirror;
|
|
17
|
+
/** Invoked once the stack is serving — the moment a detached `up` would have returned. */
|
|
18
|
+
onReady?: () => void | Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Start the local stack in THIS process and run it until shutdown is requested.
|
|
22
|
+
* Resolves to the daemon's exit code: 0 after a clean shutdown, 1 when a
|
|
23
|
+
* critical component failed to start (the daemon has already logged why).
|
|
24
|
+
*
|
|
25
|
+
* The same resolution, the same daemon body and the same on-disk state as
|
|
26
|
+
* `up`, so `stigmer status` and `stigmer down` from another shell see an
|
|
27
|
+
* ordinary daemon whose PID happens to be ours. The children receive the very
|
|
28
|
+
* environment a detached daemon would have inherited, and what a detached `up`
|
|
29
|
+
* does once the server answers — the startup record — happens in `onStarted`,
|
|
30
|
+
* at the same point in the stack's life. The server makes its own
|
|
31
|
+
* organization before it answers, so there is nothing else to do.
|
|
32
|
+
*/
|
|
33
|
+
export declare function upForeground(options?: UpOptions, home?: string, deps?: UpForegroundDeps): Promise<number>;
|
|
34
|
+
/** Stop the local stack. Returns false if nothing was running. */
|
|
35
|
+
export declare function down(home?: string): Promise<boolean>;
|
|
36
|
+
/** Whether the daemon is running: a live peer's PID, else a server-port fallback. */
|
|
37
|
+
export declare function isRunning(home?: string): Promise<boolean>;
|
|
38
|
+
//# sourceMappingURL=launch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch.d.ts","sourceRoot":"","sources":["../../src/local/daemon/launch.ts"],"names":[],"mappings":"AAiCA,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,KAAK,kBAAkB,EAA4C,MAAM,cAAc,CAAC;AAUjG,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAUD,8EAA8E;AAC9E,wBAAsB,EAAE,CAAC,OAAO,GAAE,SAAc,EAAE,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBzF;AAED,8DAA8D;AAC9D,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1D,oFAAoF;IACpF,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,wGAAwG;IACxG,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,0FAA0F;IAC1F,OAAO,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,YAAY,CAChC,OAAO,GAAE,SAAc,EACvB,IAAI,GAAE,MAAkB,EACxB,IAAI,GAAE,gBAAqB,GAC1B,OAAO,CAAC,MAAM,CAAC,CAcjB;AAyDD,kEAAkE;AAClE,wBAAsB,IAAI,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAiCrE;AAED,qFAAqF;AACrF,wBAAsB,SAAS,CAAC,IAAI,GAAE,MAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ1E"}
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// Foreground control of the daemon: `up` (spawn + verify + wait-ready),
|
|
2
|
+
// `upForeground` (run the daemon body right here until a signal), `down`
|
|
3
|
+
// (signal + wait + safety-net cleanup), and a liveness check.
|
|
4
|
+
//
|
|
5
|
+
// Both `up` shapes resolve every heavy dependency first (Temporal binary,
|
|
6
|
+
// server launch, runner entry) so failures surface with a clear message before
|
|
7
|
+
// anything long-lived starts. The detached shape then re-execs this same CLI
|
|
8
|
+
// as the hidden `internal-daemon` and waits until the server's gRPC port
|
|
9
|
+
// answers; the foreground shape calls the same daemon body in-process, which
|
|
10
|
+
// is what a container entrypoint, a systemd unit or a tmux pane wants: one
|
|
11
|
+
// process to watch, signals delivered to it, the stack's output on its stdio.
|
|
12
|
+
import { spawn } from "node:child_process";
|
|
13
|
+
import { mkdirSync, openSync } from "node:fs";
|
|
14
|
+
import { homedir } from "node:os";
|
|
15
|
+
import { join } from "node:path";
|
|
16
|
+
import { load as loadConfig } from "../../config/config.js";
|
|
17
|
+
import { log } from "../../logger.js";
|
|
18
|
+
import { CliExitError } from "../../errors/cli-exit-error.js";
|
|
19
|
+
import { ExitCode } from "../../errors/exit-codes.js";
|
|
20
|
+
import { DAEMON_PID_FILE, SERVER_PORT } from "../constants.js";
|
|
21
|
+
import { tcpConnects, waitForTcp } from "../net/tcp.js";
|
|
22
|
+
import { dataDir, logDir } from "../paths.js";
|
|
23
|
+
import { readPidFile, removePidFile } from "../state/pidfile.js";
|
|
24
|
+
import { findProcessByPort, isOtherLiveProcess, isProcessAlive, killProcess } from "../state/proc.js";
|
|
25
|
+
import { removeStartupConfig, saveStartupConfig } from "../state/startup-config.js";
|
|
26
|
+
import { rotateLogs } from "../state/log-rotation.js";
|
|
27
|
+
import { resolveApiKey, resolveProvider } from "../llm-config.js";
|
|
28
|
+
import { resolveOperatorIdentity } from "../operator-config.js";
|
|
29
|
+
import { ensureRunner } from "../runtime/runner.js";
|
|
30
|
+
import { ensureServer } from "../runtime/server.js";
|
|
31
|
+
import { TemporalManager } from "../temporal/manager.js";
|
|
32
|
+
import { buildDaemonEnv, readDaemonConfig } from "./env.js";
|
|
33
|
+
import { NodeProcessHost } from "./host.js";
|
|
34
|
+
import { runInternalDaemon, waitForShutdownSignal } from "./process.js";
|
|
35
|
+
/** How long `up` waits for the server's gRPC port after spawning the daemon. */
|
|
36
|
+
const READY_TIMEOUT_MS = 60_000;
|
|
37
|
+
/** How long to wait for the daemon to come up before checking it is still alive. */
|
|
38
|
+
const DAEMON_SETTLE_MS = 3_000;
|
|
39
|
+
/** How long `down` waits for graceful daemon exit before force-killing. */
|
|
40
|
+
const STOP_TIMEOUT_MS = 15_000;
|
|
41
|
+
const STOP_POLL_MS = 500;
|
|
42
|
+
/** Start the local stack in the background. Throws on any startup failure. */
|
|
43
|
+
export async function up(options = {}, home = homedir()) {
|
|
44
|
+
const { data, logs, temporalAddress, env } = await prepareLaunch(options, home);
|
|
45
|
+
const daemonPid = spawnDaemon(env, join(logs, "daemon.log"));
|
|
46
|
+
log.info("daemon process started", { pid: daemonPid });
|
|
47
|
+
await sleep(DAEMON_SETTLE_MS);
|
|
48
|
+
if (!isProcessAlive(daemonPid)) {
|
|
49
|
+
throw new CliExitError("daemon process crashed during startup", ExitCode.General, [
|
|
50
|
+
`Check ${join(logs, "daemon.log")} for details.`,
|
|
51
|
+
]);
|
|
52
|
+
}
|
|
53
|
+
await waitForTcp({ port: SERVER_PORT, timeoutMs: READY_TIMEOUT_MS, label: "stigmer-server" });
|
|
54
|
+
saveStartupConfig(data, buildStartupConfig(data, logs, temporalAddress, daemonPid, options));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Start the local stack in THIS process and run it until shutdown is requested.
|
|
58
|
+
* Resolves to the daemon's exit code: 0 after a clean shutdown, 1 when a
|
|
59
|
+
* critical component failed to start (the daemon has already logged why).
|
|
60
|
+
*
|
|
61
|
+
* The same resolution, the same daemon body and the same on-disk state as
|
|
62
|
+
* `up`, so `stigmer status` and `stigmer down` from another shell see an
|
|
63
|
+
* ordinary daemon whose PID happens to be ours. The children receive the very
|
|
64
|
+
* environment a detached daemon would have inherited, and what a detached `up`
|
|
65
|
+
* does once the server answers — the startup record — happens in `onStarted`,
|
|
66
|
+
* at the same point in the stack's life. The server makes its own
|
|
67
|
+
* organization before it answers, so there is nothing else to do.
|
|
68
|
+
*/
|
|
69
|
+
export async function upForeground(options = {}, home = homedir(), deps = {}) {
|
|
70
|
+
const { data, logs, temporalAddress, env } = await prepareLaunch(options, home);
|
|
71
|
+
const runDaemon = deps.runDaemon ?? runInternalDaemon;
|
|
72
|
+
return runDaemon({
|
|
73
|
+
config: readDaemonConfig(env),
|
|
74
|
+
env,
|
|
75
|
+
host: new NodeProcessHost({ mirror: deps.mirror ?? mirrorToStdout }),
|
|
76
|
+
waitForShutdown: deps.waitForShutdown ?? waitForShutdownSignal,
|
|
77
|
+
onStarted: async () => {
|
|
78
|
+
saveStartupConfig(data, buildStartupConfig(data, logs, temporalAddress, process.pid, options));
|
|
79
|
+
await deps.onReady?.();
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// The default foreground mirror: one line per child line, tagged with the
|
|
84
|
+
// component, on stdout — a terminal in a tmux pane, `docker logs` in a
|
|
85
|
+
// container. The log files keep receiving the same bytes untagged.
|
|
86
|
+
const mirrorToStdout = (component, line) => {
|
|
87
|
+
process.stdout.write(`[${component}] ${line}\n`);
|
|
88
|
+
};
|
|
89
|
+
// The part of `up` that is the same whether the daemon then runs detached or
|
|
90
|
+
// right here: refuse a second stack, prepare the state dirs, resolve every
|
|
91
|
+
// heavy dependency, and encode the launcher→daemon contract.
|
|
92
|
+
async function prepareLaunch(options, home) {
|
|
93
|
+
const data = dataDir(home);
|
|
94
|
+
const logs = logDir(home);
|
|
95
|
+
cleanupOrphans(data);
|
|
96
|
+
if (await isRunning(home)) {
|
|
97
|
+
throw new CliExitError("daemon is already running", ExitCode.General);
|
|
98
|
+
}
|
|
99
|
+
mkdirSync(data, { recursive: true });
|
|
100
|
+
mkdirSync(logs, { recursive: true });
|
|
101
|
+
rotateLogs(logs);
|
|
102
|
+
const config = loadConfig();
|
|
103
|
+
const temporalManaged = isTemporalManaged(config);
|
|
104
|
+
const temporal = TemporalManager.forHome(home);
|
|
105
|
+
if (temporalManaged) {
|
|
106
|
+
log.info("ensuring Temporal is installed");
|
|
107
|
+
await temporal.ensureInstalled();
|
|
108
|
+
}
|
|
109
|
+
// Resolves the server (repo tree or the acquired @stigmer/server-slim).
|
|
110
|
+
const server = ensureServer({ home });
|
|
111
|
+
const runner = options.serverOnly === true ? undefined : ensureRunner({ home });
|
|
112
|
+
const env = buildDaemonEnv({
|
|
113
|
+
dataDir: data,
|
|
114
|
+
logDir: logs,
|
|
115
|
+
temporalManaged,
|
|
116
|
+
temporalAddress: temporal.address,
|
|
117
|
+
serverOnly: options.serverOnly === true,
|
|
118
|
+
noWeb: options.noWeb === true,
|
|
119
|
+
server,
|
|
120
|
+
runner,
|
|
121
|
+
...resolveLlmKeyInputs(config),
|
|
122
|
+
...resolveOperatorIdentityInputs(config),
|
|
123
|
+
}, process.env);
|
|
124
|
+
return { data, logs, temporalAddress: temporal.address, env };
|
|
125
|
+
}
|
|
126
|
+
/** Stop the local stack. Returns false if nothing was running. */
|
|
127
|
+
export async function down(home = homedir()) {
|
|
128
|
+
const data = dataDir(home);
|
|
129
|
+
let pid = readPidFile(join(data, DAEMON_PID_FILE));
|
|
130
|
+
if (pid === null)
|
|
131
|
+
pid = findProcessByPort(SERVER_PORT);
|
|
132
|
+
if (pid === null || !isOtherLiveProcess(pid)) {
|
|
133
|
+
removePidFile(join(data, DAEMON_PID_FILE));
|
|
134
|
+
await stopManagedTemporal(home);
|
|
135
|
+
cleanupOrphans(data);
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
// The daemon traps SIGTERM and tears down children + Temporal in order.
|
|
139
|
+
killProcess(pid, "SIGTERM");
|
|
140
|
+
log.info("sent SIGTERM to daemon", { pid });
|
|
141
|
+
const deadline = Date.now() + STOP_TIMEOUT_MS;
|
|
142
|
+
while (Date.now() < deadline) {
|
|
143
|
+
if (!isProcessAlive(pid)) {
|
|
144
|
+
removePidFile(join(data, DAEMON_PID_FILE));
|
|
145
|
+
removeStartupConfig(data);
|
|
146
|
+
return true;
|
|
147
|
+
}
|
|
148
|
+
await sleep(STOP_POLL_MS);
|
|
149
|
+
}
|
|
150
|
+
log.warn("daemon did not stop gracefully, force killing", { pid });
|
|
151
|
+
killProcess(pid, "SIGKILL");
|
|
152
|
+
removePidFile(join(data, DAEMON_PID_FILE));
|
|
153
|
+
removeStartupConfig(data);
|
|
154
|
+
await stopManagedTemporal(home);
|
|
155
|
+
cleanupOrphans(data);
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
/** Whether the daemon is running: a live peer's PID, else a server-port fallback. */
|
|
159
|
+
export async function isRunning(home = homedir()) {
|
|
160
|
+
const data = dataDir(home);
|
|
161
|
+
const pid = readPidFile(join(data, DAEMON_PID_FILE));
|
|
162
|
+
if (pid !== null) {
|
|
163
|
+
if (isOtherLiveProcess(pid))
|
|
164
|
+
return true;
|
|
165
|
+
removePidFile(join(data, DAEMON_PID_FILE)); // stale (dead, or a previous life of our own PID)
|
|
166
|
+
}
|
|
167
|
+
return tcpConnects(SERVER_PORT, "127.0.0.1", 1000);
|
|
168
|
+
}
|
|
169
|
+
// Re-exec this CLI as the detached internal-daemon, returning its PID. Replaying
|
|
170
|
+
// execArgv carries the tsx loader in dev and is a no-op for a plain-node build.
|
|
171
|
+
function spawnDaemon(env, daemonLog) {
|
|
172
|
+
const script = process.argv[1];
|
|
173
|
+
if (script === undefined) {
|
|
174
|
+
throw new CliExitError("cannot resolve the CLI entry point to launch the daemon", ExitCode.General);
|
|
175
|
+
}
|
|
176
|
+
const out = openSync(daemonLog, "a");
|
|
177
|
+
const child = spawn(process.execPath, [...process.execArgv, script, "internal-daemon"], {
|
|
178
|
+
detached: true,
|
|
179
|
+
env,
|
|
180
|
+
stdio: ["ignore", out, out],
|
|
181
|
+
});
|
|
182
|
+
child.unref();
|
|
183
|
+
if (child.pid === undefined) {
|
|
184
|
+
throw new CliExitError("failed to start the daemon process", ExitCode.General);
|
|
185
|
+
}
|
|
186
|
+
return child.pid;
|
|
187
|
+
}
|
|
188
|
+
// Kill any daemon/server/runner left alive by a previous, improperly-stopped
|
|
189
|
+
// run. A recorded PID that is our own is a leftover, never a peer (the fresh
|
|
190
|
+
// PID namespace of a restarted container hands the launcher the PID its last
|
|
191
|
+
// life had) — signalling it would be signalling ourselves.
|
|
192
|
+
function cleanupOrphans(data) {
|
|
193
|
+
for (const name of [DAEMON_PID_FILE, "stigmer-server.pid", "runner.pid"]) {
|
|
194
|
+
const pidPath = join(data, name);
|
|
195
|
+
const pid = readPidFile(pidPath);
|
|
196
|
+
if (pid === null)
|
|
197
|
+
continue;
|
|
198
|
+
if (isOtherLiveProcess(pid)) {
|
|
199
|
+
log.warn("killing orphaned process from a previous run", { file: name, pid });
|
|
200
|
+
killProcess(pid, "SIGTERM");
|
|
201
|
+
}
|
|
202
|
+
removePidFile(pidPath);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function stopManagedTemporal(home) {
|
|
206
|
+
try {
|
|
207
|
+
await TemporalManager.forHome(home).stop();
|
|
208
|
+
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
log.debug("managed Temporal stop skipped", { error: String(err) });
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
// LLM-key delivery for the runner: a key persisted by `stigmer setup` lives only in
|
|
214
|
+
// the config file, so the launcher must write it into the daemon contract explicitly
|
|
215
|
+
// — unlike a shell-exported key, it cannot flow by env inheritance. resolveApiKey's
|
|
216
|
+
// precedence (env var > config file) makes both cases one code path; when the env
|
|
217
|
+
// var is set this re-writes the same value. Anthropic is the only provider the
|
|
218
|
+
// local stack executes on, so it is the only key with a persisted delivery path.
|
|
219
|
+
function resolveLlmKeyInputs(config) {
|
|
220
|
+
if (resolveProvider(config) !== "anthropic")
|
|
221
|
+
return {};
|
|
222
|
+
const key = resolveApiKey(config);
|
|
223
|
+
return key === "" ? {} : { anthropicApiKey: key };
|
|
224
|
+
}
|
|
225
|
+
// Operator-identity delivery for the server child (oss#796): same persisted-
|
|
226
|
+
// delivery reasoning as the LLM key above — a setup-persisted identity lives
|
|
227
|
+
// only in the config file, so the launcher must write it into the daemon
|
|
228
|
+
// contract explicitly. resolveOperatorIdentity's precedence (env > config,
|
|
229
|
+
// sources never mixed) makes both cases one code path.
|
|
230
|
+
function resolveOperatorIdentityInputs(config) {
|
|
231
|
+
const identity = resolveOperatorIdentity(config);
|
|
232
|
+
if (identity === undefined)
|
|
233
|
+
return {};
|
|
234
|
+
return identity.name === undefined
|
|
235
|
+
? { operatorEmail: identity.email }
|
|
236
|
+
: { operatorEmail: identity.email, operatorName: identity.name };
|
|
237
|
+
}
|
|
238
|
+
// Default to managed Temporal unless the opaque local config explicitly opts
|
|
239
|
+
// out — zero-config `stigmer up` must work on a fresh machine.
|
|
240
|
+
function isTemporalManaged(config) {
|
|
241
|
+
const local = config.backend.local;
|
|
242
|
+
return local?.temporal?.managed !== false;
|
|
243
|
+
}
|
|
244
|
+
function buildStartupConfig(data, logs, temporalAddr, daemonPid, options) {
|
|
245
|
+
return {
|
|
246
|
+
data_dir: data,
|
|
247
|
+
log_dir: logs,
|
|
248
|
+
temporal_addr: temporalAddr,
|
|
249
|
+
execution_mode: "local",
|
|
250
|
+
sandbox_image: "",
|
|
251
|
+
sandbox_auto_pull: false,
|
|
252
|
+
sandbox_cleanup: false,
|
|
253
|
+
sandbox_ttl: 0,
|
|
254
|
+
stigmer_server_pid: daemonPid,
|
|
255
|
+
server_only: options.serverOnly === true,
|
|
256
|
+
};
|
|
257
|
+
}
|
|
258
|
+
function sleep(ms) {
|
|
259
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
260
|
+
}
|
|
261
|
+
//# sourceMappingURL=launch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"launch.js","sourceRoot":"","sources":["../../src/local/daemon/launch.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,yEAAyE;AACzE,8DAA8D;AAC9D,EAAE;AACF,0EAA0E;AAC1E,+EAA+E;AAC/E,6EAA6E;AAC7E,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,8EAA8E;AAE9E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAe,IAAI,IAAI,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,WAAW,EA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