lorenz 0.1.0
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 +201 -0
- package/NOTICE +13 -0
- package/README.md +774 -0
- package/RELEASE-MANIFEST.json +211 -0
- package/apps/cli/bin/lorenz.js +25 -0
- package/apps/cli/dist/bin/cli.d.ts +3 -0
- package/apps/cli/dist/bin/cli.d.ts.map +1 -0
- package/apps/cli/dist/bin/cli.js +4 -0
- package/apps/cli/dist/bin/cli.js.map +1 -0
- package/apps/cli/dist/daemon.d.ts +76 -0
- package/apps/cli/dist/daemon.d.ts.map +1 -0
- package/apps/cli/dist/daemon.js +189 -0
- package/apps/cli/dist/daemon.js.map +1 -0
- package/apps/cli/dist/doctor.d.ts +40 -0
- package/apps/cli/dist/doctor.d.ts.map +1 -0
- package/apps/cli/dist/doctor.js +590 -0
- package/apps/cli/dist/doctor.js.map +1 -0
- package/apps/cli/dist/index.d.ts +32 -0
- package/apps/cli/dist/index.d.ts.map +1 -0
- package/apps/cli/dist/index.js +26 -0
- package/apps/cli/dist/index.js.map +1 -0
- package/apps/cli/dist/main.d.ts +40 -0
- package/apps/cli/dist/main.d.ts.map +1 -0
- package/apps/cli/dist/main.js +259 -0
- package/apps/cli/dist/main.js.map +1 -0
- package/apps/cli/dist/runs.d.ts +31 -0
- package/apps/cli/dist/runs.d.ts.map +1 -0
- package/apps/cli/dist/runs.js +281 -0
- package/apps/cli/dist/runs.js.map +1 -0
- package/apps/cli/dist/workerDriverLoader.d.ts +64 -0
- package/apps/cli/dist/workerDriverLoader.d.ts.map +1 -0
- package/apps/cli/dist/workerDriverLoader.js +211 -0
- package/apps/cli/dist/workerDriverLoader.js.map +1 -0
- package/apps/cli/package.json +57 -0
- package/apps/symphony-dashboard/dist/assets/index-B3owF3jd.css +1 -0
- package/apps/symphony-dashboard/dist/assets/index-DQ6XlL0d.js +227 -0
- package/apps/symphony-dashboard/dist/index.html +18 -0
- package/bin/lorenz +16 -0
- package/extensions/docker-worker/dist/index.d.ts +92 -0
- package/extensions/docker-worker/dist/index.d.ts.map +1 -0
- package/extensions/docker-worker/dist/index.js +283 -0
- package/extensions/docker-worker/dist/index.js.map +1 -0
- package/extensions/docker-worker/package.json +14 -0
- package/extensions/jira-tracker/dist/client.d.ts +50 -0
- package/extensions/jira-tracker/dist/client.d.ts.map +1 -0
- package/extensions/jira-tracker/dist/client.js +619 -0
- package/extensions/jira-tracker/dist/client.js.map +1 -0
- package/extensions/jira-tracker/dist/index.d.ts +5 -0
- package/extensions/jira-tracker/dist/index.d.ts.map +1 -0
- package/extensions/jira-tracker/dist/index.js +5 -0
- package/extensions/jira-tracker/dist/index.js.map +1 -0
- package/extensions/jira-tracker/dist/options.d.ts +38 -0
- package/extensions/jira-tracker/dist/options.d.ts.map +1 -0
- package/extensions/jira-tracker/dist/options.js +61 -0
- package/extensions/jira-tracker/dist/options.js.map +1 -0
- package/extensions/jira-tracker/dist/provider.d.ts +6 -0
- package/extensions/jira-tracker/dist/provider.d.ts.map +1 -0
- package/extensions/jira-tracker/dist/provider.js +178 -0
- package/extensions/jira-tracker/dist/provider.js.map +1 -0
- package/extensions/jira-tracker/dist/register.d.ts +10 -0
- package/extensions/jira-tracker/dist/register.d.ts.map +1 -0
- package/extensions/jira-tracker/dist/register.js +15 -0
- package/extensions/jira-tracker/dist/register.js.map +1 -0
- package/extensions/jira-tracker/package.json +16 -0
- package/extensions/linear-tracker/dist/client.d.ts +82 -0
- package/extensions/linear-tracker/dist/client.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/client.js +622 -0
- package/extensions/linear-tracker/dist/client.js.map +1 -0
- package/extensions/linear-tracker/dist/index.d.ts +8 -0
- package/extensions/linear-tracker/dist/index.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/index.js +7 -0
- package/extensions/linear-tracker/dist/index.js.map +1 -0
- package/extensions/linear-tracker/dist/options.d.ts +32 -0
- package/extensions/linear-tracker/dist/options.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/options.js +59 -0
- package/extensions/linear-tracker/dist/options.js.map +1 -0
- package/extensions/linear-tracker/dist/provider.d.ts +4 -0
- package/extensions/linear-tracker/dist/provider.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/provider.js +58 -0
- package/extensions/linear-tracker/dist/provider.js.map +1 -0
- package/extensions/linear-tracker/dist/register.d.ts +11 -0
- package/extensions/linear-tracker/dist/register.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/register.js +19 -0
- package/extensions/linear-tracker/dist/register.js.map +1 -0
- package/extensions/linear-tracker/dist/toolOps.d.ts +8 -0
- package/extensions/linear-tracker/dist/toolOps.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/toolOps.js +160 -0
- package/extensions/linear-tracker/dist/toolOps.js.map +1 -0
- package/extensions/linear-tracker/dist/tools.d.ts +7 -0
- package/extensions/linear-tracker/dist/tools.d.ts.map +1 -0
- package/extensions/linear-tracker/dist/tools.js +210 -0
- package/extensions/linear-tracker/dist/tools.js.map +1 -0
- package/extensions/linear-tracker/package.json +18 -0
- package/extensions/local-tracker/dist/boardStore.d.ts +116 -0
- package/extensions/local-tracker/dist/boardStore.d.ts.map +1 -0
- package/extensions/local-tracker/dist/boardStore.js +475 -0
- package/extensions/local-tracker/dist/boardStore.js.map +1 -0
- package/extensions/local-tracker/dist/client.d.ts +14 -0
- package/extensions/local-tracker/dist/client.d.ts.map +1 -0
- package/extensions/local-tracker/dist/client.js +27 -0
- package/extensions/local-tracker/dist/client.js.map +1 -0
- package/extensions/local-tracker/dist/index.d.ts +7 -0
- package/extensions/local-tracker/dist/index.d.ts.map +1 -0
- package/extensions/local-tracker/dist/index.js +7 -0
- package/extensions/local-tracker/dist/index.js.map +1 -0
- package/extensions/local-tracker/dist/options.d.ts +31 -0
- package/extensions/local-tracker/dist/options.d.ts.map +1 -0
- package/extensions/local-tracker/dist/options.js +69 -0
- package/extensions/local-tracker/dist/options.js.map +1 -0
- package/extensions/local-tracker/dist/provider.d.ts +9 -0
- package/extensions/local-tracker/dist/provider.d.ts.map +1 -0
- package/extensions/local-tracker/dist/provider.js +35 -0
- package/extensions/local-tracker/dist/provider.js.map +1 -0
- package/extensions/local-tracker/dist/register.d.ts +11 -0
- package/extensions/local-tracker/dist/register.d.ts.map +1 -0
- package/extensions/local-tracker/dist/register.js +19 -0
- package/extensions/local-tracker/dist/register.js.map +1 -0
- package/extensions/local-tracker/dist/resolveBoardDir.d.ts +24 -0
- package/extensions/local-tracker/dist/resolveBoardDir.d.ts.map +1 -0
- package/extensions/local-tracker/dist/resolveBoardDir.js +39 -0
- package/extensions/local-tracker/dist/resolveBoardDir.js.map +1 -0
- package/extensions/local-tracker/dist/toolOps.d.ts +9 -0
- package/extensions/local-tracker/dist/toolOps.d.ts.map +1 -0
- package/extensions/local-tracker/dist/toolOps.js +86 -0
- package/extensions/local-tracker/dist/toolOps.js.map +1 -0
- package/extensions/local-tracker/dist/tools.d.ts +7 -0
- package/extensions/local-tracker/dist/tools.d.ts.map +1 -0
- package/extensions/local-tracker/dist/tools.js +170 -0
- package/extensions/local-tracker/dist/tools.js.map +1 -0
- package/extensions/local-tracker/package.json +18 -0
- package/extensions/memory-tracker/dist/index.d.ts +24 -0
- package/extensions/memory-tracker/dist/index.d.ts.map +1 -0
- package/extensions/memory-tracker/dist/index.js +110 -0
- package/extensions/memory-tracker/dist/index.js.map +1 -0
- package/extensions/memory-tracker/package.json +16 -0
- package/extensions/slack-tracker/dist/client.d.ts +88 -0
- package/extensions/slack-tracker/dist/client.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/client.js +246 -0
- package/extensions/slack-tracker/dist/client.js.map +1 -0
- package/extensions/slack-tracker/dist/inMemoryTransport.d.ts +42 -0
- package/extensions/slack-tracker/dist/inMemoryTransport.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/inMemoryTransport.js +104 -0
- package/extensions/slack-tracker/dist/inMemoryTransport.js.map +1 -0
- package/extensions/slack-tracker/dist/index.d.ts +15 -0
- package/extensions/slack-tracker/dist/index.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/index.js +11 -0
- package/extensions/slack-tracker/dist/index.js.map +1 -0
- package/extensions/slack-tracker/dist/mapping.d.ts +27 -0
- package/extensions/slack-tracker/dist/mapping.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/mapping.js +109 -0
- package/extensions/slack-tracker/dist/mapping.js.map +1 -0
- package/extensions/slack-tracker/dist/operations.d.ts +41 -0
- package/extensions/slack-tracker/dist/operations.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/operations.js +97 -0
- package/extensions/slack-tracker/dist/operations.js.map +1 -0
- package/extensions/slack-tracker/dist/options.d.ts +30 -0
- package/extensions/slack-tracker/dist/options.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/options.js +49 -0
- package/extensions/slack-tracker/dist/options.js.map +1 -0
- package/extensions/slack-tracker/dist/provider.d.ts +9 -0
- package/extensions/slack-tracker/dist/provider.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/provider.js +74 -0
- package/extensions/slack-tracker/dist/provider.js.map +1 -0
- package/extensions/slack-tracker/dist/register.d.ts +11 -0
- package/extensions/slack-tracker/dist/register.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/register.js +19 -0
- package/extensions/slack-tracker/dist/register.js.map +1 -0
- package/extensions/slack-tracker/dist/threadState.d.ts +52 -0
- package/extensions/slack-tracker/dist/threadState.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/threadState.js +192 -0
- package/extensions/slack-tracker/dist/threadState.js.map +1 -0
- package/extensions/slack-tracker/dist/toolOps.d.ts +13 -0
- package/extensions/slack-tracker/dist/toolOps.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/toolOps.js +76 -0
- package/extensions/slack-tracker/dist/toolOps.js.map +1 -0
- package/extensions/slack-tracker/dist/tools.d.ts +8 -0
- package/extensions/slack-tracker/dist/tools.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/tools.js +266 -0
- package/extensions/slack-tracker/dist/tools.js.map +1 -0
- package/extensions/slack-tracker/dist/transport.d.ts +63 -0
- package/extensions/slack-tracker/dist/transport.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/transport.js +2 -0
- package/extensions/slack-tracker/dist/transport.js.map +1 -0
- package/extensions/slack-tracker/dist/webTransport.d.ts +44 -0
- package/extensions/slack-tracker/dist/webTransport.d.ts.map +1 -0
- package/extensions/slack-tracker/dist/webTransport.js +402 -0
- package/extensions/slack-tracker/dist/webTransport.js.map +1 -0
- package/extensions/slack-tracker/package.json +17 -0
- package/package.json +89 -0
- package/packages/acp/dist/childProcess.d.ts +4 -0
- package/packages/acp/dist/childProcess.d.ts.map +1 -0
- package/packages/acp/dist/childProcess.js +33 -0
- package/packages/acp/dist/childProcess.js.map +1 -0
- package/packages/acp/dist/index.d.ts +70 -0
- package/packages/acp/dist/index.d.ts.map +1 -0
- package/packages/acp/dist/index.js +701 -0
- package/packages/acp/dist/index.js.map +1 -0
- package/packages/acp/dist/options.d.ts +24 -0
- package/packages/acp/dist/options.d.ts.map +1 -0
- package/packages/acp/dist/options.js +92 -0
- package/packages/acp/dist/options.js.map +1 -0
- package/packages/acp/dist/toml.d.ts +2 -0
- package/packages/acp/dist/toml.d.ts.map +1 -0
- package/packages/acp/dist/toml.js +51 -0
- package/packages/acp/dist/toml.js.map +1 -0
- package/packages/acp/package.json +24 -0
- package/packages/agent-runner/dist/index.d.ts +58 -0
- package/packages/agent-runner/dist/index.d.ts.map +1 -0
- package/packages/agent-runner/dist/index.js +288 -0
- package/packages/agent-runner/dist/index.js.map +1 -0
- package/packages/agent-runner/package.json +19 -0
- package/packages/agent-sdk/dist/index.d.ts +2 -0
- package/packages/agent-sdk/dist/index.d.ts.map +1 -0
- package/packages/agent-sdk/dist/index.js +2 -0
- package/packages/agent-sdk/dist/index.js.map +1 -0
- package/packages/agent-sdk/dist/provider.d.ts +66 -0
- package/packages/agent-sdk/dist/provider.d.ts.map +1 -0
- package/packages/agent-sdk/dist/provider.js +38 -0
- package/packages/agent-sdk/dist/provider.js.map +1 -0
- package/packages/agent-sdk/package.json +14 -0
- package/packages/cli-kit/dist/index.d.ts +20 -0
- package/packages/cli-kit/dist/index.d.ts.map +1 -0
- package/packages/cli-kit/dist/index.js +72 -0
- package/packages/cli-kit/dist/index.js.map +1 -0
- package/packages/cli-kit/package.json +14 -0
- package/packages/config/dist/aliases.d.ts +10 -0
- package/packages/config/dist/aliases.d.ts.map +1 -0
- package/packages/config/dist/aliases.js +153 -0
- package/packages/config/dist/aliases.js.map +1 -0
- package/packages/config/dist/defaults.d.ts +12 -0
- package/packages/config/dist/defaults.d.ts.map +1 -0
- package/packages/config/dist/defaults.js +78 -0
- package/packages/config/dist/defaults.js.map +1 -0
- package/packages/config/dist/errors.d.ts +3 -0
- package/packages/config/dist/errors.d.ts.map +1 -0
- package/packages/config/dist/errors.js +56 -0
- package/packages/config/dist/errors.js.map +1 -0
- package/packages/config/dist/index.d.ts +5 -0
- package/packages/config/dist/index.d.ts.map +1 -0
- package/packages/config/dist/index.js +4 -0
- package/packages/config/dist/index.js.map +1 -0
- package/packages/config/dist/leaf-utils.d.ts +3 -0
- package/packages/config/dist/leaf-utils.d.ts.map +1 -0
- package/packages/config/dist/leaf-utils.js +9 -0
- package/packages/config/dist/leaf-utils.js.map +1 -0
- package/packages/config/dist/parse.d.ts +11 -0
- package/packages/config/dist/parse.d.ts.map +1 -0
- package/packages/config/dist/parse.js +821 -0
- package/packages/config/dist/parse.js.map +1 -0
- package/packages/config/dist/schemas.d.ts +214 -0
- package/packages/config/dist/schemas.d.ts.map +1 -0
- package/packages/config/dist/schemas.js +248 -0
- package/packages/config/dist/schemas.js.map +1 -0
- package/packages/config/package.json +19 -0
- package/packages/dispatch/dist/index.d.ts +22 -0
- package/packages/dispatch/dist/index.d.ts.map +1 -0
- package/packages/dispatch/dist/index.js +117 -0
- package/packages/dispatch/dist/index.js.map +1 -0
- package/packages/dispatch/package.json +16 -0
- package/packages/dispatch-coordinator/dist/coordinator.d.ts +158 -0
- package/packages/dispatch-coordinator/dist/coordinator.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/coordinator.js +529 -0
- package/packages/dispatch-coordinator/dist/coordinator.js.map +1 -0
- package/packages/dispatch-coordinator/dist/gate.d.ts +24 -0
- package/packages/dispatch-coordinator/dist/gate.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/gate.js +47 -0
- package/packages/dispatch-coordinator/dist/gate.js.map +1 -0
- package/packages/dispatch-coordinator/dist/index.d.ts +6 -0
- package/packages/dispatch-coordinator/dist/index.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/index.js +16 -0
- package/packages/dispatch-coordinator/dist/index.js.map +1 -0
- package/packages/dispatch-coordinator/dist/mcpEndpointManager.d.ts +28 -0
- package/packages/dispatch-coordinator/dist/mcpEndpointManager.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/mcpEndpointManager.js +54 -0
- package/packages/dispatch-coordinator/dist/mcpEndpointManager.js.map +1 -0
- package/packages/dispatch-coordinator/dist/nullEndpointManager.d.ts +18 -0
- package/packages/dispatch-coordinator/dist/nullEndpointManager.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/nullEndpointManager.js +40 -0
- package/packages/dispatch-coordinator/dist/nullEndpointManager.js.map +1 -0
- package/packages/dispatch-coordinator/dist/types.d.ts +119 -0
- package/packages/dispatch-coordinator/dist/types.d.ts.map +1 -0
- package/packages/dispatch-coordinator/dist/types.js +17 -0
- package/packages/dispatch-coordinator/dist/types.js.map +1 -0
- package/packages/dispatch-coordinator/package.json +16 -0
- package/packages/domain/dist/index.d.ts +775 -0
- package/packages/domain/dist/index.d.ts.map +1 -0
- package/packages/domain/dist/index.js +124 -0
- package/packages/domain/dist/index.js.map +1 -0
- package/packages/domain/package.json +14 -0
- package/packages/humanize/dist/index.d.ts +4 -0
- package/packages/humanize/dist/index.d.ts.map +1 -0
- package/packages/humanize/dist/index.js +347 -0
- package/packages/humanize/dist/index.js.map +1 -0
- package/packages/humanize/package.json +11 -0
- package/packages/issue/dist/index.d.ts +7 -0
- package/packages/issue/dist/index.d.ts.map +1 -0
- package/packages/issue/dist/index.js +147 -0
- package/packages/issue/dist/index.js.map +1 -0
- package/packages/issue/package.json +14 -0
- package/packages/log-file/dist/index.d.ts +10 -0
- package/packages/log-file/dist/index.d.ts.map +1 -0
- package/packages/log-file/dist/index.js +200 -0
- package/packages/log-file/dist/index.js.map +1 -0
- package/packages/log-file/package.json +15 -0
- package/packages/mcp/dist/agentEndpoint.d.ts +31 -0
- package/packages/mcp/dist/agentEndpoint.d.ts.map +1 -0
- package/packages/mcp/dist/agentEndpoint.js +270 -0
- package/packages/mcp/dist/agentEndpoint.js.map +1 -0
- package/packages/mcp/dist/auth.d.ts +7 -0
- package/packages/mcp/dist/auth.d.ts.map +1 -0
- package/packages/mcp/dist/auth.js +48 -0
- package/packages/mcp/dist/auth.js.map +1 -0
- package/packages/mcp/dist/filter.d.ts +70 -0
- package/packages/mcp/dist/filter.d.ts.map +1 -0
- package/packages/mcp/dist/filter.js +231 -0
- package/packages/mcp/dist/filter.js.map +1 -0
- package/packages/mcp/dist/index.d.ts +7 -0
- package/packages/mcp/dist/index.d.ts.map +1 -0
- package/packages/mcp/dist/index.js +5 -0
- package/packages/mcp/dist/index.js.map +1 -0
- package/packages/mcp/dist/server.d.ts +31 -0
- package/packages/mcp/dist/server.d.ts.map +1 -0
- package/packages/mcp/dist/server.js +176 -0
- package/packages/mcp/dist/server.js.map +1 -0
- package/packages/mcp/dist/tools/linear.d.ts +5 -0
- package/packages/mcp/dist/tools/linear.d.ts.map +1 -0
- package/packages/mcp/dist/tools/linear.js +192 -0
- package/packages/mcp/dist/tools/linear.js.map +1 -0
- package/packages/mcp/dist/tools/local.d.ts +5 -0
- package/packages/mcp/dist/tools/local.d.ts.map +1 -0
- package/packages/mcp/dist/tools/local.js +161 -0
- package/packages/mcp/dist/tools/local.js.map +1 -0
- package/packages/mcp/dist/tools/result.d.ts +5 -0
- package/packages/mcp/dist/tools/result.d.ts.map +1 -0
- package/packages/mcp/dist/tools/result.js +15 -0
- package/packages/mcp/dist/tools/result.js.map +1 -0
- package/packages/mcp/dist/tools.d.ts +14 -0
- package/packages/mcp/dist/tools.d.ts.map +1 -0
- package/packages/mcp/dist/tools.js +58 -0
- package/packages/mcp/dist/tools.js.map +1 -0
- package/packages/mcp/package.json +20 -0
- package/packages/orchestrator/dist/index.d.ts +171 -0
- package/packages/orchestrator/dist/index.d.ts.map +1 -0
- package/packages/orchestrator/dist/index.js +524 -0
- package/packages/orchestrator/dist/index.js.map +1 -0
- package/packages/orchestrator/package.json +18 -0
- package/packages/policies/dist/index.d.ts +11 -0
- package/packages/policies/dist/index.d.ts.map +1 -0
- package/packages/policies/dist/index.js +6 -0
- package/packages/policies/dist/index.js.map +1 -0
- package/packages/policies/dist/reconciliation.d.ts +5 -0
- package/packages/policies/dist/reconciliation.d.ts.map +1 -0
- package/packages/policies/dist/reconciliation.js +17 -0
- package/packages/policies/dist/reconciliation.js.map +1 -0
- package/packages/policies/dist/resume.d.ts +14 -0
- package/packages/policies/dist/resume.d.ts.map +1 -0
- package/packages/policies/dist/resume.js +7 -0
- package/packages/policies/dist/resume.js.map +1 -0
- package/packages/policies/dist/retry.d.ts +4 -0
- package/packages/policies/dist/retry.d.ts.map +1 -0
- package/packages/policies/dist/retry.js +7 -0
- package/packages/policies/dist/retry.js.map +1 -0
- package/packages/policies/dist/stopReason.d.ts +4 -0
- package/packages/policies/dist/stopReason.d.ts.map +1 -0
- package/packages/policies/dist/stopReason.js +11 -0
- package/packages/policies/dist/stopReason.js.map +1 -0
- package/packages/policies/dist/usage.d.ts +14 -0
- package/packages/policies/dist/usage.d.ts.map +1 -0
- package/packages/policies/dist/usage.js +38 -0
- package/packages/policies/dist/usage.js.map +1 -0
- package/packages/policies/dist/workerHost.d.ts +8 -0
- package/packages/policies/dist/workerHost.d.ts.map +1 -0
- package/packages/policies/dist/workerHost.js +20 -0
- package/packages/policies/dist/workerHost.js.map +1 -0
- package/packages/policies/package.json +21 -0
- package/packages/presenter/dist/index.d.ts +81 -0
- package/packages/presenter/dist/index.d.ts.map +1 -0
- package/packages/presenter/dist/index.js +421 -0
- package/packages/presenter/dist/index.js.map +1 -0
- package/packages/presenter/package.json +16 -0
- package/packages/projections/dist/index.d.ts +10 -0
- package/packages/projections/dist/index.d.ts.map +1 -0
- package/packages/projections/dist/index.js +30 -0
- package/packages/projections/dist/index.js.map +1 -0
- package/packages/projections/package.json +15 -0
- package/packages/prompt/dist/index.d.ts +9 -0
- package/packages/prompt/dist/index.d.ts.map +1 -0
- package/packages/prompt/dist/index.js +71 -0
- package/packages/prompt/dist/index.js.map +1 -0
- package/packages/prompt/package.json +16 -0
- package/packages/retry-scheduler/dist/index.d.ts +12 -0
- package/packages/retry-scheduler/dist/index.d.ts.map +1 -0
- package/packages/retry-scheduler/dist/index.js +39 -0
- package/packages/retry-scheduler/dist/index.js.map +1 -0
- package/packages/retry-scheduler/package.json +15 -0
- package/packages/runtime/dist/index.d.ts +157 -0
- package/packages/runtime/dist/index.d.ts.map +1 -0
- package/packages/runtime/dist/index.js +1074 -0
- package/packages/runtime/dist/index.js.map +1 -0
- package/packages/runtime/package.json +26 -0
- package/packages/runtime-events/dist/index.d.ts +110 -0
- package/packages/runtime-events/dist/index.d.ts.map +1 -0
- package/packages/runtime-events/dist/index.js +25 -0
- package/packages/runtime-events/dist/index.js.map +1 -0
- package/packages/runtime-events/package.json +14 -0
- package/packages/server/dist/index.d.ts +25 -0
- package/packages/server/dist/index.d.ts.map +1 -0
- package/packages/server/dist/index.js +213 -0
- package/packages/server/dist/index.js.map +1 -0
- package/packages/server/dist/issue-store.d.ts +26 -0
- package/packages/server/dist/issue-store.d.ts.map +1 -0
- package/packages/server/dist/issue-store.js +88 -0
- package/packages/server/dist/issue-store.js.map +1 -0
- package/packages/server/dist/path-params.d.ts +6 -0
- package/packages/server/dist/path-params.d.ts.map +1 -0
- package/packages/server/dist/path-params.js +15 -0
- package/packages/server/dist/path-params.js.map +1 -0
- package/packages/server/dist/source.d.ts +12 -0
- package/packages/server/dist/source.d.ts.map +1 -0
- package/packages/server/dist/source.js +2 -0
- package/packages/server/dist/source.js.map +1 -0
- package/packages/server/dist/trace-routes.d.ts +21 -0
- package/packages/server/dist/trace-routes.d.ts.map +1 -0
- package/packages/server/dist/trace-routes.js +66 -0
- package/packages/server/dist/trace-routes.js.map +1 -0
- package/packages/server/dist/ws.d.ts +18 -0
- package/packages/server/dist/ws.d.ts.map +1 -0
- package/packages/server/dist/ws.js +168 -0
- package/packages/server/dist/ws.js.map +1 -0
- package/packages/server/package.json +22 -0
- package/packages/ssh/dist/index.d.ts +33 -0
- package/packages/ssh/dist/index.d.ts.map +1 -0
- package/packages/ssh/dist/index.js +281 -0
- package/packages/ssh/dist/index.js.map +1 -0
- package/packages/ssh/package.json +15 -0
- package/packages/static-worker/dist/index.d.ts +73 -0
- package/packages/static-worker/dist/index.d.ts.map +1 -0
- package/packages/static-worker/dist/index.js +150 -0
- package/packages/static-worker/dist/index.js.map +1 -0
- package/packages/static-worker/package.json +14 -0
- package/packages/tool-sdk/dist/filter.d.ts +70 -0
- package/packages/tool-sdk/dist/filter.d.ts.map +1 -0
- package/packages/tool-sdk/dist/filter.js +231 -0
- package/packages/tool-sdk/dist/filter.js.map +1 -0
- package/packages/tool-sdk/dist/index.d.ts +6 -0
- package/packages/tool-sdk/dist/index.d.ts.map +1 -0
- package/packages/tool-sdk/dist/index.js +4 -0
- package/packages/tool-sdk/dist/index.js.map +1 -0
- package/packages/tool-sdk/dist/provider.d.ts +51 -0
- package/packages/tool-sdk/dist/provider.d.ts.map +1 -0
- package/packages/tool-sdk/dist/provider.js +2 -0
- package/packages/tool-sdk/dist/provider.js.map +1 -0
- package/packages/tool-sdk/dist/registry.d.ts +35 -0
- package/packages/tool-sdk/dist/registry.d.ts.map +1 -0
- package/packages/tool-sdk/dist/registry.js +85 -0
- package/packages/tool-sdk/dist/registry.js.map +1 -0
- package/packages/tool-sdk/dist/result.d.ts +5 -0
- package/packages/tool-sdk/dist/result.d.ts.map +1 -0
- package/packages/tool-sdk/dist/result.js +15 -0
- package/packages/tool-sdk/dist/result.js.map +1 -0
- package/packages/tool-sdk/package.json +14 -0
- package/packages/traceviz-emitter/dist/index.d.ts +19 -0
- package/packages/traceviz-emitter/dist/index.d.ts.map +1 -0
- package/packages/traceviz-emitter/dist/index.js +97 -0
- package/packages/traceviz-emitter/dist/index.js.map +1 -0
- package/packages/traceviz-emitter/package.json +17 -0
- package/packages/traceviz-server/dist/index.d.ts +14 -0
- package/packages/traceviz-server/dist/index.d.ts.map +1 -0
- package/packages/traceviz-server/dist/index.js +10 -0
- package/packages/traceviz-server/dist/index.js.map +1 -0
- package/packages/traceviz-server/dist/models/api.d.ts +51 -0
- package/packages/traceviz-server/dist/models/api.d.ts.map +1 -0
- package/packages/traceviz-server/dist/models/api.js +5 -0
- package/packages/traceviz-server/dist/models/api.js.map +1 -0
- package/packages/traceviz-server/dist/models/display-events.d.ts +58 -0
- package/packages/traceviz-server/dist/models/display-events.d.ts.map +1 -0
- package/packages/traceviz-server/dist/models/display-events.js +6 -0
- package/packages/traceviz-server/dist/models/display-events.js.map +1 -0
- package/packages/traceviz-server/dist/parser.d.ts +14 -0
- package/packages/traceviz-server/dist/parser.d.ts.map +1 -0
- package/packages/traceviz-server/dist/parser.js +363 -0
- package/packages/traceviz-server/dist/parser.js.map +1 -0
- package/packages/traceviz-server/dist/stats.d.ts +7 -0
- package/packages/traceviz-server/dist/stats.d.ts.map +1 -0
- package/packages/traceviz-server/dist/stats.js +81 -0
- package/packages/traceviz-server/dist/stats.js.map +1 -0
- package/packages/traceviz-server/dist/watcher.d.ts +54 -0
- package/packages/traceviz-server/dist/watcher.d.ts.map +1 -0
- package/packages/traceviz-server/dist/watcher.js +368 -0
- package/packages/traceviz-server/dist/watcher.js.map +1 -0
- package/packages/traceviz-server/package.json +16 -0
- package/packages/tracker-sdk/dist/index.d.ts +5 -0
- package/packages/tracker-sdk/dist/index.d.ts.map +1 -0
- package/packages/tracker-sdk/dist/index.js +4 -0
- package/packages/tracker-sdk/dist/index.js.map +1 -0
- package/packages/tracker-sdk/dist/options.d.ts +20 -0
- package/packages/tracker-sdk/dist/options.d.ts.map +1 -0
- package/packages/tracker-sdk/dist/options.js +46 -0
- package/packages/tracker-sdk/dist/options.js.map +1 -0
- package/packages/tracker-sdk/dist/provider.d.ts +104 -0
- package/packages/tracker-sdk/dist/provider.d.ts.map +1 -0
- package/packages/tracker-sdk/dist/provider.js +2 -0
- package/packages/tracker-sdk/dist/provider.js.map +1 -0
- package/packages/tracker-sdk/dist/registry.d.ts +26 -0
- package/packages/tracker-sdk/dist/registry.d.ts.map +1 -0
- package/packages/tracker-sdk/dist/registry.js +52 -0
- package/packages/tracker-sdk/dist/registry.js.map +1 -0
- package/packages/tracker-sdk/dist/toolPack.d.ts +10 -0
- package/packages/tracker-sdk/dist/toolPack.d.ts.map +1 -0
- package/packages/tracker-sdk/dist/toolPack.js +185 -0
- package/packages/tracker-sdk/dist/toolPack.js.map +1 -0
- package/packages/tracker-sdk/package.json +15 -0
- package/packages/tui/dist/index.d.ts +35 -0
- package/packages/tui/dist/index.d.ts.map +1 -0
- package/packages/tui/dist/index.js +354 -0
- package/packages/tui/dist/index.js.map +1 -0
- package/packages/tui/package.json +18 -0
- package/packages/worker-host-pool/dist/index.d.ts +33 -0
- package/packages/worker-host-pool/dist/index.d.ts.map +1 -0
- package/packages/worker-host-pool/dist/index.js +311 -0
- package/packages/worker-host-pool/dist/index.js.map +1 -0
- package/packages/worker-host-pool/package.json +14 -0
- package/packages/worker-pool/dist/index.d.ts +6 -0
- package/packages/worker-pool/dist/index.d.ts.map +1 -0
- package/packages/worker-pool/dist/index.js +15 -0
- package/packages/worker-pool/dist/index.js.map +1 -0
- package/packages/worker-pool/dist/lease.d.ts +36 -0
- package/packages/worker-pool/dist/lease.d.ts.map +1 -0
- package/packages/worker-pool/dist/lease.js +53 -0
- package/packages/worker-pool/dist/lease.js.map +1 -0
- package/packages/worker-pool/dist/ledger.d.ts +51 -0
- package/packages/worker-pool/dist/ledger.d.ts.map +1 -0
- package/packages/worker-pool/dist/ledger.js +165 -0
- package/packages/worker-pool/dist/ledger.js.map +1 -0
- package/packages/worker-pool/dist/mutex.d.ts +10 -0
- package/packages/worker-pool/dist/mutex.d.ts.map +1 -0
- package/packages/worker-pool/dist/mutex.js +22 -0
- package/packages/worker-pool/dist/mutex.js.map +1 -0
- package/packages/worker-pool/dist/pool.d.ts +33 -0
- package/packages/worker-pool/dist/pool.d.ts.map +1 -0
- package/packages/worker-pool/dist/pool.js +1727 -0
- package/packages/worker-pool/dist/pool.js.map +1 -0
- package/packages/worker-pool/dist/reaper.d.ts +94 -0
- package/packages/worker-pool/dist/reaper.d.ts.map +1 -0
- package/packages/worker-pool/dist/reaper.js +295 -0
- package/packages/worker-pool/dist/reaper.js.map +1 -0
- package/packages/worker-pool/dist/types.d.ts +249 -0
- package/packages/worker-pool/dist/types.d.ts.map +1 -0
- package/packages/worker-pool/dist/types.js +2 -0
- package/packages/worker-pool/dist/types.js.map +1 -0
- package/packages/worker-pool/package.json +16 -0
- package/packages/worker-sdk/dist/conformance.d.ts +64 -0
- package/packages/worker-sdk/dist/conformance.d.ts.map +1 -0
- package/packages/worker-sdk/dist/conformance.js +109 -0
- package/packages/worker-sdk/dist/conformance.js.map +1 -0
- package/packages/worker-sdk/dist/fake.d.ts +76 -0
- package/packages/worker-sdk/dist/fake.d.ts.map +1 -0
- package/packages/worker-sdk/dist/fake.js +142 -0
- package/packages/worker-sdk/dist/fake.js.map +1 -0
- package/packages/worker-sdk/dist/index.d.ts +5 -0
- package/packages/worker-sdk/dist/index.d.ts.map +1 -0
- package/packages/worker-sdk/dist/index.js +10 -0
- package/packages/worker-sdk/dist/index.js.map +1 -0
- package/packages/worker-sdk/dist/module.d.ts +46 -0
- package/packages/worker-sdk/dist/module.d.ts.map +1 -0
- package/packages/worker-sdk/dist/module.js +59 -0
- package/packages/worker-sdk/dist/module.js.map +1 -0
- package/packages/worker-sdk/dist/registry.d.ts +24 -0
- package/packages/worker-sdk/dist/registry.d.ts.map +1 -0
- package/packages/worker-sdk/dist/registry.js +49 -0
- package/packages/worker-sdk/dist/registry.js.map +1 -0
- package/packages/worker-sdk/dist/types.d.ts +138 -0
- package/packages/worker-sdk/dist/types.d.ts.map +1 -0
- package/packages/worker-sdk/dist/types.js +21 -0
- package/packages/worker-sdk/dist/types.js.map +1 -0
- package/packages/worker-sdk/package.json +15 -0
- package/packages/workflow/dist/index.d.ts +33 -0
- package/packages/workflow/dist/index.d.ts.map +1 -0
- package/packages/workflow/dist/index.js +125 -0
- package/packages/workflow/dist/index.js.map +1 -0
- package/packages/workflow/package.json +19 -0
- package/packages/workspace/dist/index.d.ts +70 -0
- package/packages/workspace/dist/index.d.ts.map +1 -0
- package/packages/workspace/dist/index.js +1016 -0
- package/packages/workspace/dist/index.js.map +1 -0
- package/packages/workspace/package.json +17 -0
- package/runtime-deps/anthropic-claude-agent-sdk/LICENSE.md +1 -0
- package/runtime-deps/anthropic-claude-agent-sdk/README.md +65 -0
- package/runtime-deps/anthropic-claude-agent-sdk/agentSdkTypes.d.ts +1 -0
- package/runtime-deps/anthropic-claude-agent-sdk/assistant.d.ts +135 -0
- package/runtime-deps/anthropic-claude-agent-sdk/assistant.mjs +190 -0
- package/runtime-deps/anthropic-claude-agent-sdk/bridge.d.ts +231 -0
- package/runtime-deps/anthropic-claude-agent-sdk/bridge.mjs +168 -0
- package/runtime-deps/anthropic-claude-agent-sdk/browser-sdk.d.ts +53 -0
- package/runtime-deps/anthropic-claude-agent-sdk/browser-sdk.js +93 -0
- package/runtime-deps/anthropic-claude-agent-sdk/extractFromBunfs.d.ts +1 -0
- package/runtime-deps/anthropic-claude-agent-sdk/extractFromBunfs.js +156 -0
- package/runtime-deps/anthropic-claude-agent-sdk/manifest.json +47 -0
- package/runtime-deps/anthropic-claude-agent-sdk/manifest.zst.json +55 -0
- package/runtime-deps/anthropic-claude-agent-sdk/node_modules/.bin/anthropic-ai-sdk +21 -0
- package/runtime-deps/anthropic-claude-agent-sdk/package.json +81 -0
- package/runtime-deps/anthropic-claude-agent-sdk/sdk-tools.d.ts +3170 -0
- package/runtime-deps/anthropic-claude-agent-sdk/sdk.d.ts +6000 -0
- package/runtime-deps/anthropic-claude-agent-sdk/sdk.mjs +119 -0
- package/runtime-deps/openai-codex/README.md +60 -0
- package/runtime-deps/openai-codex/bin/codex.js +229 -0
- package/runtime-deps/openai-codex/bin/rg +79 -0
- package/runtime-deps/openai-codex/package.json +22 -0
- package/vendor/claude-agent-acp/dist/acp-agent.d.ts +239 -0
- package/vendor/claude-agent-acp/dist/acp-agent.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/acp-agent.js +2693 -0
- package/vendor/claude-agent-acp/dist/bundle.js +41230 -0
- package/vendor/claude-agent-acp/dist/index.d.ts +3 -0
- package/vendor/claude-agent-acp/dist/index.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/index.js +67 -0
- package/vendor/claude-agent-acp/dist/lib.d.ts +6 -0
- package/vendor/claude-agent-acp/dist/lib.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/lib.js +5 -0
- package/vendor/claude-agent-acp/dist/settings.d.ts +68 -0
- package/vendor/claude-agent-acp/dist/settings.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/settings.js +182 -0
- package/vendor/claude-agent-acp/dist/tools.d.ts +103 -0
- package/vendor/claude-agent-acp/dist/tools.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/tools.js +713 -0
- package/vendor/claude-agent-acp/dist/utils.d.ts +16 -0
- package/vendor/claude-agent-acp/dist/utils.d.ts.map +1 -0
- package/vendor/claude-agent-acp/dist/utils.js +83 -0
- package/vendor/claude-agent-acp/package.json +23 -0
- package/vendor/codex-acp/dist/index.js +21280 -0
- package/vendor/codex-acp/package.json +17 -0
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
import type { PermissionOption, PromptResponse, RequestPermissionRequest, SessionNotification } from "@agentclientprotocol/sdk";
|
|
2
|
+
export declare const PORT_MAX = 65535;
|
|
3
|
+
export declare const ONE_WEEK_MS = 604800000;
|
|
4
|
+
export declare const RENDER_INTERVAL_MAX_MS = 60000;
|
|
5
|
+
export declare const CONCURRENCY_MAX = 1000;
|
|
6
|
+
export declare const MAX_TURNS_MAX = 10000;
|
|
7
|
+
export declare const ENSEMBLE_SIZE_MAX = 100;
|
|
8
|
+
export declare function isValidPort(n: number): boolean;
|
|
9
|
+
export declare function isValidTimeoutMs(n: number): boolean;
|
|
10
|
+
export declare function isValidNonNegativeTimeoutMs(n: number): boolean;
|
|
11
|
+
export declare function isValidIntervalMs(n: number): boolean;
|
|
12
|
+
export declare function isValidRenderIntervalMs(n: number): boolean;
|
|
13
|
+
export declare function isValidConcurrency(n: number): boolean;
|
|
14
|
+
export declare function isValidMaxTurns(n: number): boolean;
|
|
15
|
+
export declare function isValidEnsembleSize(n: number): boolean;
|
|
16
|
+
export declare function normalizeHttpBindHost(host: string): string;
|
|
17
|
+
export declare function httpUrlHost(host: string): string;
|
|
18
|
+
export type StopReason = "end_turn" | "max_tokens" | "max_turn_requests" | "refusal" | "cancelled";
|
|
19
|
+
/**
|
|
20
|
+
* Identifies a configured agent backend by name (e.g. `"codex"`, `"claude"`).
|
|
21
|
+
* Matches a key in {@link Settings.agents} and is open-ended because operators define their own.
|
|
22
|
+
*/
|
|
23
|
+
export type AgentKind = string;
|
|
24
|
+
/**
|
|
25
|
+
* Identifies a tracker backend by name (e.g. `"linear"`, `"local"`, `"memory"`).
|
|
26
|
+
* Open-ended: the set of supported kinds is whatever the composition root registered
|
|
27
|
+
* in its tracker provider registry, not a closed union owned by the domain.
|
|
28
|
+
*/
|
|
29
|
+
export type TrackerKind = string;
|
|
30
|
+
/**
|
|
31
|
+
* Selector for the worker driver backend; keys into the worker-driver registry the
|
|
32
|
+
* composition root assembles, so the set of supported kinds is open-ended
|
|
33
|
+
* (an unregistered kind fails loud at pool construction).
|
|
34
|
+
*/
|
|
35
|
+
export type WorkerDriverKind = string;
|
|
36
|
+
export declare const ISSUE_STATE_TYPES: readonly ["backlog", "unstarted", "started", "completed", "canceled", "triage"];
|
|
37
|
+
export type IssueStateType = (typeof ISSUE_STATE_TYPES)[number];
|
|
38
|
+
export declare function isRecord(value: unknown): value is Record<string, unknown>;
|
|
39
|
+
export declare function errorMessage(error: unknown): string;
|
|
40
|
+
export declare function isOneOf<const Values extends readonly string[]>(value: string, values: Values): value is Values[number];
|
|
41
|
+
export declare function normalizeStateType(value: string | null | undefined): IssueStateType | null;
|
|
42
|
+
export declare function durationMs(startedAt: string, endedAt: string): number;
|
|
43
|
+
export interface ClockPort {
|
|
44
|
+
now(): Date;
|
|
45
|
+
monotonicMs(): number;
|
|
46
|
+
setTimeout(callback: () => void, delayMs: number): TimerHandle;
|
|
47
|
+
clearTimeout(handle: TimerHandle): void;
|
|
48
|
+
}
|
|
49
|
+
export interface TimerHandle {
|
|
50
|
+
unref?: (() => void) | undefined;
|
|
51
|
+
}
|
|
52
|
+
export declare const systemClock: ClockPort;
|
|
53
|
+
export declare const PRIORITY_VALUES: readonly [1, 2, 3, 4];
|
|
54
|
+
export type Priority = (typeof PRIORITY_VALUES)[number];
|
|
55
|
+
/**
|
|
56
|
+
* Minimal reference to a related issue - just enough to identify it and check its state.
|
|
57
|
+
* Used for relationships like blockers where the full issue isn't needed.
|
|
58
|
+
*/
|
|
59
|
+
export interface IssueRef {
|
|
60
|
+
id?: string | undefined;
|
|
61
|
+
identifier?: string | undefined;
|
|
62
|
+
/** Tracker-specific state name (e.g. `"In Progress"`, `"Todo"`). */
|
|
63
|
+
state?: string | undefined;
|
|
64
|
+
/** Category bucket from the tracker: typically `"unstarted" | "started" | "completed" | "canceled" | "backlog" | "triage"`. */
|
|
65
|
+
stateType?: IssueStateType | null | undefined;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Normalized view of a tracker issue with everything needed to dispatch, prompt, and route it.
|
|
69
|
+
* Produced from raw tracker payloads; the source object is preserved on `raw`.
|
|
70
|
+
*/
|
|
71
|
+
export interface Issue {
|
|
72
|
+
/** Tracker-internal id (e.g. Linear UUID); stable primary key used everywhere. */
|
|
73
|
+
id: string;
|
|
74
|
+
/** Human-facing short code (e.g. `"ENG-123"`); used in logs, prompts, and UI. */
|
|
75
|
+
identifier: string;
|
|
76
|
+
title: string;
|
|
77
|
+
description?: string | null | undefined;
|
|
78
|
+
/** Display name of the workflow state (e.g. `"In Progress"`). Used as a lookup key for per-state setting overrides. */
|
|
79
|
+
state: string;
|
|
80
|
+
/** Category bucket from the tracker: `"unstarted" | "started" | "completed" | "canceled" | "backlog" | "triage"`. All trackers must provide this. */
|
|
81
|
+
stateType: IssueStateType;
|
|
82
|
+
branchName?: string | null | undefined;
|
|
83
|
+
url?: string | null | undefined;
|
|
84
|
+
priority?: Priority | null | undefined;
|
|
85
|
+
/** ISO-8601 timestamp string as returned by the tracker; not parsed into a Date. */
|
|
86
|
+
createdAt?: string | null | undefined;
|
|
87
|
+
/** ISO-8601 timestamp string as returned by the tracker; not parsed into a Date. */
|
|
88
|
+
updatedAt?: string | null | undefined;
|
|
89
|
+
/** Lower-cased label names; ensemble size is encoded as `ensemble:<n>`. */
|
|
90
|
+
labels: string[];
|
|
91
|
+
blockers: IssueRef[];
|
|
92
|
+
assigneeId?: string | null | undefined;
|
|
93
|
+
/** True when the issue is assigned to the configured worker assignee (or no assignee filter is set). Gates dispatch. */
|
|
94
|
+
assignedToWorker?: boolean | null | undefined;
|
|
95
|
+
/** Untouched tracker payload kept for debugging and downstream consumers; do not rely on its shape. */
|
|
96
|
+
raw?: unknown;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Rules for which tracker issues this Symphony instance picks up based on label routing.
|
|
100
|
+
* Routing lets multiple instances cooperate on the same project by claiming disjoint label sets.
|
|
101
|
+
*/
|
|
102
|
+
export interface DispatchSettings {
|
|
103
|
+
/** When true, issues with no label matching `routeLabelPrefix` are eligible for this instance. */
|
|
104
|
+
acceptUnrouted: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Whitelist of route names (the suffix after `routeLabelPrefix`) this instance handles.
|
|
107
|
+
* `null` accepts any routed issue, `[]` accepts none, a non-empty list accepts only matching routes.
|
|
108
|
+
*/
|
|
109
|
+
onlyRoutes: string[] | null;
|
|
110
|
+
/**
|
|
111
|
+
* Label prefix that designates a route. Labels starting with this prefix have the prefix stripped
|
|
112
|
+
* and the remainder (trimmed, lowercased) used as the route name; e.g. `"Symphony:"` turns
|
|
113
|
+
* `Symphony:backend` into route `backend`.
|
|
114
|
+
*/
|
|
115
|
+
routeLabelPrefix: string;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Connection and filtering rules for the issue tracker that feeds work into this instance.
|
|
119
|
+
*
|
|
120
|
+
* Only fields every backend shares live here. Provider-specific keys from the selected
|
|
121
|
+
* tracker bundle (e.g. Linear's `project_slug`, the local board's `path`) are normalized
|
|
122
|
+
* and validated by the registered tracker provider and carried opaquely in {@link options}.
|
|
123
|
+
*/
|
|
124
|
+
export interface TrackerSettings {
|
|
125
|
+
/** Backend adapter selector. `"memory"` is an in-process fixture used for tests. */
|
|
126
|
+
kind?: TrackerKind | undefined;
|
|
127
|
+
/** Tracker API endpoint; when unset, the provider's default endpoint applies. */
|
|
128
|
+
endpoint?: string | undefined;
|
|
129
|
+
/** Tracker credential; supports `$VAR` and `op://` references plus provider env fallbacks. */
|
|
130
|
+
apiKey?: string | undefined;
|
|
131
|
+
/** Tracker assignee identity (or `$VAR`) used to scope candidate queries to one user. */
|
|
132
|
+
assignee?: string | undefined;
|
|
133
|
+
/** Tracker state names considered eligible for dispatch (case-insensitive match). */
|
|
134
|
+
activeStates: string[];
|
|
135
|
+
/** Tracker state names that mark an issue as finished; running agents on these issues are stopped and their workspaces cleaned up. */
|
|
136
|
+
terminalStates: string[];
|
|
137
|
+
dispatch: DispatchSettings;
|
|
138
|
+
/**
|
|
139
|
+
* Provider-specific settings, normalized and validated by the tracker provider registered
|
|
140
|
+
* for {@link kind}. Read through the provider package's typed accessor (e.g.
|
|
141
|
+
* `linearTrackerOptions(settings)`), never by key from core code.
|
|
142
|
+
*/
|
|
143
|
+
options: Record<string, unknown>;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Configuration for the embedded warm worker/executor worker pool. When present and `enabled`,
|
|
147
|
+
* the runtime leases an SSH-addressable worker per run (producing the run's `workerHost`) instead
|
|
148
|
+
* of selecting from a static {@link WorkerSettings.sshHosts} list. Absent or disabled means the
|
|
149
|
+
* pool is off and behavior is identical to the static-host path. Durations are milliseconds;
|
|
150
|
+
* spend caps are seconds (matching {@link UsageTotals.secondsRunning}).
|
|
151
|
+
*/
|
|
152
|
+
export interface WorkerPoolSettings {
|
|
153
|
+
/** Master switch. When false the pool is constructed-but-inert (or not constructed at all). */
|
|
154
|
+
enabled: boolean;
|
|
155
|
+
/** Worker driver backend that provisions, probes, and destroys workers. */
|
|
156
|
+
driver: WorkerDriverKind;
|
|
157
|
+
/** Floor on warm inventory the reaper keeps alive (never reaped below this count). */
|
|
158
|
+
min: number;
|
|
159
|
+
/** Ceiling on total workers the pool may provision at once. */
|
|
160
|
+
max: number;
|
|
161
|
+
/** Target number of pre-warmed idle workers the reaper tops up toward, within budget. */
|
|
162
|
+
warm: number;
|
|
163
|
+
/**
|
|
164
|
+
* Concurrent run slots a single machine may serve. Defaults to `1`. Values `> 1` are
|
|
165
|
+
* safe once each RunSlot owns its own MCP endpoint (token + local-server + tunnel); `> 1`
|
|
166
|
+
* is gated by a runtime capability + an explicit co-residence opt-in.
|
|
167
|
+
*
|
|
168
|
+
* This is the single canonical own field. {@link WorkerPoolSettings.maxInFlight} is a derived,
|
|
169
|
+
* read-only getter over this value (installed by {@link withDerivedMaxInFlight}) so the two
|
|
170
|
+
* can never drift: there is no second writable field a fixture could set independently.
|
|
171
|
+
*/
|
|
172
|
+
slotsPerMachine: number;
|
|
173
|
+
/**
|
|
174
|
+
* @deprecated Read-only alias of {@link WorkerPoolSettings.slotsPerMachine}. Declared as a get
|
|
175
|
+
* accessor (not a writable field) and installed by {@link withDerivedMaxInFlight}, so it always
|
|
176
|
+
* mirrors `slotsPerMachine` and can never drift. Assigning it is a type error; write
|
|
177
|
+
* `slotsPerMachine` instead.
|
|
178
|
+
*/
|
|
179
|
+
get maxInFlight(): number;
|
|
180
|
+
/** Hard lifetime (ms) of a worker before it is recycled, even while idle. */
|
|
181
|
+
ttlMs: number;
|
|
182
|
+
/** Idle window (ms) after which a warm worker above `min` is reaped. */
|
|
183
|
+
idleReapMs: number;
|
|
184
|
+
/** How long (ms) `acquire` blocks for capacity before returning `no_capacity:acquire_timeout`. */
|
|
185
|
+
acquireTimeoutMs: number;
|
|
186
|
+
/** Cadence (ms) of the single serial reaper tick. */
|
|
187
|
+
reapIntervalMs: number;
|
|
188
|
+
/** Heartbeat staleness threshold (ms) past which a lease whose run is gone is treated as orphaned. */
|
|
189
|
+
staleHeartbeatMs: number;
|
|
190
|
+
/** Deadline (ms) `drain` waits for in-flight leases before force-destroying all workers on shutdown. */
|
|
191
|
+
drainDeadlineMs: number;
|
|
192
|
+
/** Optional fairness cap on how many workers one issue's slots may hold, so an ensemble cannot monopolize the pool. */
|
|
193
|
+
maxWorkersPerIssue?: number | undefined;
|
|
194
|
+
/**
|
|
195
|
+
* Explicit operator opt-in for co-residence (multiple run slots sharing one machine). Required
|
|
196
|
+
* alongside the runtime per-run-endpoint capability before {@link WorkerPoolSettings.slotsPerMachine}
|
|
197
|
+
* may exceed `1`: a single poisoned worker fails every co-resident run on recycle, so widening the
|
|
198
|
+
* blast radius is an explicit operator tradeoff, not just a capability. Absent (the default) keeps
|
|
199
|
+
* the single-tenant layout. Enforced by the post-construction gate in the CLI, never here.
|
|
200
|
+
*/
|
|
201
|
+
coResidence?: boolean | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Optional ceiling on concurrent per-run MCP tunnels (reverse `ssh -N` children / remote ports).
|
|
204
|
+
* When the pool fans out N run slots per machine the tunnel count grows from `1/host` to `N/host`;
|
|
205
|
+
* exhausting this ceiling surfaces as a typed `no_capacity` rather than an unhandled throw. Absent
|
|
206
|
+
* lets the worker-host-pool derive a default from its remote-port range.
|
|
207
|
+
*/
|
|
208
|
+
maxConcurrentTunnels?: number | undefined;
|
|
209
|
+
/** Optional spend caps. Worker counts are absolute; worker-seconds are wall-clock seconds. */
|
|
210
|
+
spend?: {
|
|
211
|
+
/** Maximum workers that may exist concurrently (independent of `max`). */
|
|
212
|
+
maxConcurrentWorkers?: number;
|
|
213
|
+
/** Maximum cumulative worker-seconds for the process lifetime. */
|
|
214
|
+
maxWorkerSeconds?: number;
|
|
215
|
+
/** Maximum worker-seconds per UTC day; persisted across restart via a `spend.json` sidecar. */
|
|
216
|
+
dailyWorkerSeconds?: number;
|
|
217
|
+
} | undefined;
|
|
218
|
+
/**
|
|
219
|
+
* Driver-specific options from the selected `workers.<name>` profile, passed through
|
|
220
|
+
* un-normalized without the profile's `driver`. Example: `workers.static.ssh_hosts` becomes
|
|
221
|
+
* `{ ssh_hosts: ["user@host:22"] }`.
|
|
222
|
+
*/
|
|
223
|
+
driverOptions?: Record<string, unknown> | undefined;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Shape callers construct: all of {@link WorkerPoolSettings} except the derived `maxInFlight`
|
|
227
|
+
* getter, which {@link withDerivedMaxInFlight} installs. Use this for the literal you hand to
|
|
228
|
+
* {@link withDerivedMaxInFlight} so you set `slotsPerMachine` only and never the derived alias.
|
|
229
|
+
*/
|
|
230
|
+
export type WorkerPoolSettingsInput = Omit<WorkerPoolSettings, "maxInFlight">;
|
|
231
|
+
/**
|
|
232
|
+
* Installs the derived, read-only `maxInFlight` getter over `slotsPerMachine` so the two can
|
|
233
|
+
* never drift. This is the single sanctioned constructor for {@link WorkerPoolSettings}: the input
|
|
234
|
+
* carries `slotsPerMachine` as its only own field, and the returned object exposes `maxInFlight`
|
|
235
|
+
* as an enumerable accessor that re-reads `slotsPerMachine` on every access (so it tracks any
|
|
236
|
+
* later mutation of `slotsPerMachine` and can never hold a stale, drifted copy).
|
|
237
|
+
*
|
|
238
|
+
* Mutates `input` in place (and returns it) rather than allocating a wrapper, so the object stays
|
|
239
|
+
* structurally a plain `WorkerPoolSettings` for callers that spread or snapshot it.
|
|
240
|
+
*
|
|
241
|
+
* Clone interaction (documented per task note): the accessor is defined `enumerable: true`, so a
|
|
242
|
+
* shallow spread (`{ ...workerPool }`, as used by `cloneSettings`/`cloneWorkerPool`) or
|
|
243
|
+
* `structuredClone` copies `maxInFlight` as a *plain data property* holding the current value -
|
|
244
|
+
* it does not copy the getter. That is fine and stays drift-proof: the clone path is expected to
|
|
245
|
+
* re-run `withDerivedMaxInFlight` on the cloned `slotsPerMachine` to re-install the accessor (the
|
|
246
|
+
* config clone helper owns that). The derived value is identical either way because cloning copies
|
|
247
|
+
* `slotsPerMachine` unchanged, so the byte-identity deep-equal-clone regression is unaffected.
|
|
248
|
+
*/
|
|
249
|
+
export declare function withDerivedMaxInFlight(input: WorkerPoolSettingsInput): WorkerPoolSettings;
|
|
250
|
+
/**
|
|
251
|
+
* Where agent runs execute. With no hosts configured, runs happen on the local machine;
|
|
252
|
+
* with hosts configured, work is sharded over SSH onto remote workers.
|
|
253
|
+
*/
|
|
254
|
+
export interface WorkerSettings {
|
|
255
|
+
/** Optional named worker profile selected from top-level `workers.<name>`. */
|
|
256
|
+
kind?: string | undefined;
|
|
257
|
+
/**
|
|
258
|
+
* SSH destinations in standard OpenSSH form, e.g. `host`, `user@host`, `user@host:2222`,
|
|
259
|
+
* or any `Host` alias resolved via `~/.ssh/config` (or `$SYMPHONY_SSH_CONFIG`).
|
|
260
|
+
* Empty list means runs happen locally.
|
|
261
|
+
*/
|
|
262
|
+
sshHosts: string[];
|
|
263
|
+
/** Timeout (ms) for each individual SSH command used in worker setup, execution, and cleanup. */
|
|
264
|
+
sshTimeoutMs: number;
|
|
265
|
+
/**
|
|
266
|
+
* Per-host cap on concurrent agent runs. When every host is at capacity, dispatch waits
|
|
267
|
+
* instead of running locally. Undefined means the global {@link AgentSettings.maxConcurrentAgents} applies per host.
|
|
268
|
+
*/
|
|
269
|
+
maxConcurrentAgentsPerHost?: number | undefined;
|
|
270
|
+
/**
|
|
271
|
+
* Optional embedded worker-pool configuration. Absent (the default) leaves the static-host path
|
|
272
|
+
* unchanged. When `enabled`, the pool leases SSH-addressable workers to produce each run's
|
|
273
|
+
* `workerHost`; it cannot be combined with a non-empty {@link WorkerSettings.sshHosts}.
|
|
274
|
+
*/
|
|
275
|
+
workerPool?: WorkerPoolSettings | undefined;
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* Global scheduling knobs shared by every agent backend (independent of which executor runs).
|
|
279
|
+
*/
|
|
280
|
+
export interface AgentSettings {
|
|
281
|
+
/** Default backend name to launch (e.g. `"codex"`, `"claude"`); must key into {@link Settings.agents}. */
|
|
282
|
+
kind: AgentKind;
|
|
283
|
+
/** Upper bound on concurrent agent runs across the whole instance. */
|
|
284
|
+
maxConcurrentAgents: number;
|
|
285
|
+
/** Maximum back-to-back turns a single worker session may run before exiting and yielding. */
|
|
286
|
+
maxTurns: number;
|
|
287
|
+
/** Cap (ms) on exponential retry backoff between attempts on the same issue. */
|
|
288
|
+
maxRetryBackoffMs: number;
|
|
289
|
+
/**
|
|
290
|
+
* Default number of independent parallel slots dispatched per issue.
|
|
291
|
+
* Overridden per-issue by an `ensemble:<n>` label.
|
|
292
|
+
*/
|
|
293
|
+
ensembleSize: number;
|
|
294
|
+
/**
|
|
295
|
+
* Local skill directories overlaid into each prepared workspace before the agent process
|
|
296
|
+
* starts. Entries are absolute paths resolved from workflow configuration; the active
|
|
297
|
+
* executor decides the in-workspace destination (e.g. `.codex/skills` or `.claude/skills`).
|
|
298
|
+
* Mounted tool packs contribute their bundled skills on top of this list at dispatch time.
|
|
299
|
+
*/
|
|
300
|
+
skills: string[];
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Per-kind agent record: how to run sessions for one entry of {@link Settings.agents}.
|
|
304
|
+
*
|
|
305
|
+
* `executor` selects the runtime driver by name and is open-ended - the supported set is
|
|
306
|
+
* whatever the composition root registered in its agent executor registry. Only fields every
|
|
307
|
+
* executor shares live here; executor-specific keys of an `agents.<kind>` config record
|
|
308
|
+
* (e.g. the ACP executor's `bridge_command`) are normalized and validated by the registered
|
|
309
|
+
* executor provider and carried opaquely in {@link options}.
|
|
310
|
+
*/
|
|
311
|
+
export interface AgentConfig {
|
|
312
|
+
/** Runtime driver selector (e.g. `"acp"`), resolved through the agent executor registry. */
|
|
313
|
+
executor: string;
|
|
314
|
+
/** Hard limit (ms) on a single agent turn before it is force-cancelled. */
|
|
315
|
+
turnTimeoutMs: number;
|
|
316
|
+
/** Inactivity window (ms) after which a session with no agent events is treated as stalled and aborted. `<= 0` disables stall detection. */
|
|
317
|
+
stallTimeoutMs: number;
|
|
318
|
+
/**
|
|
319
|
+
* Executor-specific settings, normalized and validated by the executor provider registered
|
|
320
|
+
* for {@link executor}. Read through the executor package's typed accessor (e.g.
|
|
321
|
+
* `acpAgentOptions(config)`), never by key from core code.
|
|
322
|
+
*/
|
|
323
|
+
options: Record<string, unknown>;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Operator-facing dashboard and refresh cadence. Must not influence orchestrator correctness.
|
|
327
|
+
*/
|
|
328
|
+
export interface ObservabilitySettings {
|
|
329
|
+
dashboardEnabled: boolean;
|
|
330
|
+
/** How often (ms) status snapshots are refreshed from the orchestrator. */
|
|
331
|
+
refreshMs: number;
|
|
332
|
+
/** Minimum interval (ms) between successive UI redraws; throttles render-side work. */
|
|
333
|
+
renderIntervalMs: number;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Bind address for the optional HTTP observability/control server.
|
|
337
|
+
*/
|
|
338
|
+
export interface ServerSettings {
|
|
339
|
+
/** Interface to bind on. Defaults to loopback to keep the API local-only unless explicitly opened up. */
|
|
340
|
+
host: string;
|
|
341
|
+
/**
|
|
342
|
+
* TCP port to bind. Undefined disables the server unless the active agent backend requires it
|
|
343
|
+
* (e.g. Claude, which needs the MCP endpoint). `0` requests an ephemeral local port.
|
|
344
|
+
*/
|
|
345
|
+
port?: number | undefined;
|
|
346
|
+
/** Directory containing JSONL trace files (same directory TraceEmitter writes to). */
|
|
347
|
+
traceDir?: string | undefined;
|
|
348
|
+
/** Built frontend assets directory (override for dashboard SPA). */
|
|
349
|
+
staticDir?: string | undefined;
|
|
350
|
+
}
|
|
351
|
+
/**
|
|
352
|
+
* Where structured runtime logs are written. The path is a stable symlink pointed at the
|
|
353
|
+
* current rolling segment; older segments live next to it.
|
|
354
|
+
*/
|
|
355
|
+
export interface LoggingSettings {
|
|
356
|
+
logFile: string;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Shell hooks that run at well-defined points in the workspace and run lifecycle.
|
|
360
|
+
* Each hook executes via `bash -lc` with the workspace as cwd, locally or over SSH on a worker.
|
|
361
|
+
*/
|
|
362
|
+
export interface HooksSettings {
|
|
363
|
+
/**
|
|
364
|
+
* Runs once, immediately after a workspace directory is freshly created.
|
|
365
|
+
* Failure or timeout aborts workspace creation.
|
|
366
|
+
*/
|
|
367
|
+
afterCreate?: string | null | undefined;
|
|
368
|
+
/**
|
|
369
|
+
* Runs before each agent attempt, after workspace preparation and before the agent process launches.
|
|
370
|
+
* Failure aborts the attempt.
|
|
371
|
+
*/
|
|
372
|
+
beforeRun?: string | null | undefined;
|
|
373
|
+
/**
|
|
374
|
+
* Runs after every agent attempt regardless of outcome, as long as the workspace still exists.
|
|
375
|
+
* Failure is logged and ignored.
|
|
376
|
+
*/
|
|
377
|
+
afterRun?: string | null | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* Runs immediately before a workspace directory is deleted, if it still exists.
|
|
380
|
+
* Failure is logged but does not block cleanup.
|
|
381
|
+
*/
|
|
382
|
+
beforeRemove?: string | null | undefined;
|
|
383
|
+
/** Per-hook execution timeout (ms) applied to all four hooks above. */
|
|
384
|
+
timeoutMs: number;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Root directory under which per-issue workspace folders are created.
|
|
388
|
+
* Each issue becomes `<root>/<safe-identifier>/`, with ensemble slots appended as `/<slotIndex>`.
|
|
389
|
+
*/
|
|
390
|
+
export interface WorkspaceSettings {
|
|
391
|
+
/** Resolved local filesystem path with `~` and `$VAR` already expanded; what local code touches. */
|
|
392
|
+
root: string;
|
|
393
|
+
/**
|
|
394
|
+
* Unexpanded form of `root` (e.g. `"~/work"` or `"$HOME/work"`) preserved for use on remote workers,
|
|
395
|
+
* where home-directory and env-var expansion must happen on the worker host, not locally.
|
|
396
|
+
*/
|
|
397
|
+
rootExpression?: string | undefined;
|
|
398
|
+
/**
|
|
399
|
+
* Controls whether each agent run gets its own `<root>/<safe-identifier>` subfolder
|
|
400
|
+
* (`"per-agent"`, the default) or all runs share `root` directly (`"none"`). Selected via the
|
|
401
|
+
* `workspace.isolation` config key. With `"none"`, session resumption is disabled and the
|
|
402
|
+
* shared folder is never auto-removed; intended for high-touchpoint setups where co-located
|
|
403
|
+
* agents are desired.
|
|
404
|
+
*/
|
|
405
|
+
isolation: "per-agent" | "none";
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Root configuration for a Symphony runtime instance. Built from the YAML front matter of a
|
|
409
|
+
* workflow file plus environment-variable fallbacks, then held immutable for the lifetime of
|
|
410
|
+
* the process. Every subsystem reads its slice from here. State-specific tweaks live in
|
|
411
|
+
* `statusOverrides` and are layered on top per issue.
|
|
412
|
+
*/
|
|
413
|
+
export interface Settings {
|
|
414
|
+
tracker: TrackerSettings;
|
|
415
|
+
/** Cadence at which the tracker is polled for candidate issues, in milliseconds. */
|
|
416
|
+
polling: {
|
|
417
|
+
intervalMs: number;
|
|
418
|
+
};
|
|
419
|
+
workspace: WorkspaceSettings;
|
|
420
|
+
worker: WorkerSettings;
|
|
421
|
+
hooks: HooksSettings;
|
|
422
|
+
agent: AgentSettings;
|
|
423
|
+
/**
|
|
424
|
+
* Per-kind executor configuration keyed by agent kind (the same string used as
|
|
425
|
+
* {@link AgentSettings.kind}). When an issue is dispatched to kind `K`, `agents[K]` is the
|
|
426
|
+
* single source of truth for how to run the executor. The top-level `codex:` / `claude:`
|
|
427
|
+
* workflow sections are parse-time conveniences that merge into `agents.codex` /
|
|
428
|
+
* `agents.claude`; they do not exist at runtime.
|
|
429
|
+
*/
|
|
430
|
+
agents: Record<string, AgentConfig>;
|
|
431
|
+
/**
|
|
432
|
+
* Per-pack options from the workflow's `tools:` map, keyed by pack name. Runtime always
|
|
433
|
+
* mounts the provider-neutral `tracker` pack, mounts the dispatch tracker's declared
|
|
434
|
+
* default packs, and mounts any additional packs named here. Each configured pack validates
|
|
435
|
+
* its own option bag.
|
|
436
|
+
*/
|
|
437
|
+
toolOptions?: Record<string, Record<string, unknown>> | undefined;
|
|
438
|
+
observability: ObservabilitySettings;
|
|
439
|
+
server: ServerSettings;
|
|
440
|
+
logging: LoggingSettings;
|
|
441
|
+
/**
|
|
442
|
+
* Partial settings layered on top of the base config while an issue sits in a given tracker
|
|
443
|
+
* state. Keys are normalized state names (trimmed, lowercased, e.g. `"in progress"`); a
|
|
444
|
+
* matching entry's `agent` scheduling fragment and per-kind `agents` record fragments are
|
|
445
|
+
* merged over the defaults for the duration of that issue's stay in the state.
|
|
446
|
+
*/
|
|
447
|
+
statusOverrides: Map<string, PartialRuntimeSettings>;
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Sparse overlay applied to a base {@link Settings} to produce the effective config for a
|
|
451
|
+
* single issue. Resolved per state transition: the issue's current tracker state is looked up
|
|
452
|
+
* in {@link Settings.statusOverrides}, and any present fragments are merged over the defaults
|
|
453
|
+
* before the next dispatch decision or agent turn.
|
|
454
|
+
*/
|
|
455
|
+
export interface PartialRuntimeSettings {
|
|
456
|
+
agent?: Partial<AgentSettings> | undefined;
|
|
457
|
+
/** Per-kind overrides merged into the matching {@link Settings.agents} records. */
|
|
458
|
+
agents?: Record<string, Partial<AgentConfig>> | undefined;
|
|
459
|
+
}
|
|
460
|
+
export interface WorkflowContentStamp {
|
|
461
|
+
mtimeMs: number;
|
|
462
|
+
size: number;
|
|
463
|
+
contentHash: string;
|
|
464
|
+
}
|
|
465
|
+
/**
|
|
466
|
+
* Opaque parsed representation of a prompt template. Produced by workflow loading and
|
|
467
|
+
* consumed by prompt rendering so callers can avoid reparsing the same template.
|
|
468
|
+
*/
|
|
469
|
+
export type ParsedPromptTemplate = unknown[];
|
|
470
|
+
/**
|
|
471
|
+
* Parsed contents of a workflow file - a Markdown document with YAML front matter delimited
|
|
472
|
+
* by `---` lines. The front matter becomes `config` (and is normalized into `settings`); the
|
|
473
|
+
* body becomes `promptTemplate`.
|
|
474
|
+
*/
|
|
475
|
+
export interface WorkflowDefinition {
|
|
476
|
+
/** Absolute path of the workflow file on disk. */
|
|
477
|
+
path: string;
|
|
478
|
+
/** Raw YAML front matter as a plain object, before normalization into `settings`. */
|
|
479
|
+
config: Record<string, unknown>;
|
|
480
|
+
/**
|
|
481
|
+
* Liquid template (liquidjs) rendered into the first prompt sent to the agent. Receives an
|
|
482
|
+
* `issue` object, an `attempt` number for retries, and an `ensemble` context describing the
|
|
483
|
+
* slot index and size. Empty bodies fall back to a built-in default.
|
|
484
|
+
*/
|
|
485
|
+
promptTemplate: string;
|
|
486
|
+
/** Parsed form of the effective prompt template, cached for prompt rendering. */
|
|
487
|
+
parsedPromptTemplate?: ParsedPromptTemplate | undefined;
|
|
488
|
+
/** Last observed file stamp used to skip unchanged reload work. */
|
|
489
|
+
stamp?: WorkflowContentStamp | undefined;
|
|
490
|
+
/** Normalized, validated runtime settings derived from `config` plus env. */
|
|
491
|
+
settings: Settings;
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Minimum interface the runtime needs from any issue tracker backend. Lets the in-process
|
|
495
|
+
* memory tracker stand in for the real Linear-backed client without further coupling.
|
|
496
|
+
*/
|
|
497
|
+
export interface RuntimeTrackerClient {
|
|
498
|
+
/**
|
|
499
|
+
* Returns issues currently eligible for dispatch: those whose state is in
|
|
500
|
+
* {@link TrackerSettings.activeStates}, filtered by the configured assignee where the backend
|
|
501
|
+
* supports it. Downstream dispatch rules (routing labels, blockers, concurrency caps) are
|
|
502
|
+
* applied by the runtime, not here.
|
|
503
|
+
*/
|
|
504
|
+
fetchCandidateIssues(): Promise<Issue[]>;
|
|
505
|
+
/** Re-fetches specific issues by tracker id, preserving the requested order. */
|
|
506
|
+
fetchIssuesByIds(ids: string[]): Promise<Issue[]>;
|
|
507
|
+
/**
|
|
508
|
+
* Lists issues currently in any of the given states. Optional because it is only exercised
|
|
509
|
+
* by best-effort flows (notably terminal-state workspace cleanup at startup); backends that
|
|
510
|
+
* cannot answer state queries cheaply may omit it and the caller will skip those flows.
|
|
511
|
+
*/
|
|
512
|
+
fetchIssuesByStates?(states: string[]): Promise<Issue[]>;
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Per-slot ensemble information injected into the Liquid prompt template as `ensemble`.
|
|
516
|
+
* Field names are snake_case because they're exposed directly to template authors.
|
|
517
|
+
*/
|
|
518
|
+
export interface EnsembleContext {
|
|
519
|
+
/** True when more than one slot is running for the same issue. */
|
|
520
|
+
enabled: boolean;
|
|
521
|
+
/** Zero-based index of this slot within the ensemble; range is `[0, size)`. */
|
|
522
|
+
slot_index: number;
|
|
523
|
+
/** Total number of parallel slots for the issue; at least 1. */
|
|
524
|
+
size: number;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Scheduled retry or continuation for an issue that just finished a run.
|
|
528
|
+
* Held in the orchestrator until the monotonic deadline elapses, then the issue becomes dispatchable again.
|
|
529
|
+
*/
|
|
530
|
+
export interface RetryEntry {
|
|
531
|
+
issueId: string;
|
|
532
|
+
identifier: string;
|
|
533
|
+
/** 1-based attempt counter; bumped each time a failure retry is recorded, reset to 1 for continuation retries. */
|
|
534
|
+
attempt: number;
|
|
535
|
+
/** Monotonic clock deadline (ms) — drives timer scheduling; immune to wall-clock adjustments. */
|
|
536
|
+
monotonicDeadlineMs: number;
|
|
537
|
+
/** Wall-clock estimate (ISO-8601) for display/serialization only. */
|
|
538
|
+
dueAtIso: string;
|
|
539
|
+
/** Last error message, when the previous run failed. */
|
|
540
|
+
error?: string | undefined;
|
|
541
|
+
/** Slot this retry prefers to reclaim so ensemble slots stay stable across attempts. */
|
|
542
|
+
slotIndex?: number | undefined;
|
|
543
|
+
workerHost?: string | null | undefined;
|
|
544
|
+
workspacePath?: string | null | undefined;
|
|
545
|
+
issueUrl?: string | null | undefined;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Why an otherwise eligible issue was held back from dispatch this tick.
|
|
549
|
+
* - `global_concurrency_cap`: total running agents reached {@link AgentSettings.maxConcurrentAgents}.
|
|
550
|
+
* - `local_concurrency_cap`: per-state cap from {@link Settings.statusOverrides} was reached.
|
|
551
|
+
* - `worker_host_capacity`: every configured SSH worker host is at {@link WorkerSettings.maxConcurrentAgentsPerHost}.
|
|
552
|
+
*/
|
|
553
|
+
export type DispatchBlockReason = "global_concurrency_cap" | "local_concurrency_cap" | "worker_host_capacity";
|
|
554
|
+
/**
|
|
555
|
+
* Record of an issue that was skipped during a dispatch tick along with why.
|
|
556
|
+
* Surfaced to operators (TUI, HTTP snapshot) so capacity pressure is visible; rebuilt each tick.
|
|
557
|
+
*/
|
|
558
|
+
export interface DispatchBlockEntry {
|
|
559
|
+
issueId: string;
|
|
560
|
+
identifier: string;
|
|
561
|
+
/** Snapshot of {@link Issue.state} at the time the dispatch attempt was blocked. */
|
|
562
|
+
state: string;
|
|
563
|
+
reason: DispatchBlockReason;
|
|
564
|
+
workerHost?: string | null | undefined;
|
|
565
|
+
issueUrl?: string | null | undefined;
|
|
566
|
+
}
|
|
567
|
+
/**
|
|
568
|
+
* Cumulative token and runtime totals, either for a single run or aggregated across all runs.
|
|
569
|
+
* Token counters are monotonic; runtime is accumulated when a run ends.
|
|
570
|
+
*/
|
|
571
|
+
export interface UsageTotals {
|
|
572
|
+
inputTokens: number;
|
|
573
|
+
outputTokens: number;
|
|
574
|
+
totalTokens: number;
|
|
575
|
+
/** Wall-clock runtime accumulated in seconds (note: unlike timeout settings which use ms). */
|
|
576
|
+
secondsRunning: number;
|
|
577
|
+
}
|
|
578
|
+
export type UsageTokenUpdate = Partial<Pick<UsageTotals, "inputTokens" | "outputTokens" | "totalTokens">>;
|
|
579
|
+
export type UsageUpdateKind = "cumulative" | "delta";
|
|
580
|
+
/**
|
|
581
|
+
* Live state of one agent slot currently executing an issue. Mutated as agent updates stream in.
|
|
582
|
+
*/
|
|
583
|
+
export interface RunningEntry {
|
|
584
|
+
issue: Issue;
|
|
585
|
+
identifier: string;
|
|
586
|
+
/** Zero-based slot within the ensemble; always less than `ensembleSize`. */
|
|
587
|
+
slotIndex: number;
|
|
588
|
+
/** Resolved ensemble size for this run; from the `ensemble:<n>` label or {@link AgentSettings.ensembleSize}. */
|
|
589
|
+
ensembleSize: number;
|
|
590
|
+
/** Backend selected for this run (resolved against per-state setting overrides at claim time). */
|
|
591
|
+
agentKind: AgentKind;
|
|
592
|
+
/** SSH host the agent runs on; `null` for local execution. Always concrete or null. */
|
|
593
|
+
workerHost?: string | null | undefined;
|
|
594
|
+
/** Absolute workspace path on the worker; set once the executor emits `workspace_prepared`. */
|
|
595
|
+
workspacePath?: string | null | undefined;
|
|
596
|
+
/** Provider session id reported by the executor (Codex/Claude side). */
|
|
597
|
+
sessionId?: string | null | undefined;
|
|
598
|
+
/** OS process id of the agent child process, as a string; `null` if not yet spawned or unavailable. */
|
|
599
|
+
executorPid?: string | null | undefined;
|
|
600
|
+
/** Number of completed turns; incremented on each `turn_completed` update. */
|
|
601
|
+
turnCount: number;
|
|
602
|
+
startedAt: Date;
|
|
603
|
+
/** Discriminator of the most recent {@link AgentUpdate} (see {@link AgentUpdate.type}). */
|
|
604
|
+
lastAgentEvent?: AgentUpdateType | null | undefined;
|
|
605
|
+
lastAgentMessage?: unknown;
|
|
606
|
+
lastAgentTimestamp?: Date | null | undefined;
|
|
607
|
+
/** Monotonic per-run totals, kept in sync as usage updates arrive. */
|
|
608
|
+
usageTotals: UsageTotals;
|
|
609
|
+
/** Highwater mark of input tokens already folded into the orchestrator-wide totals; used to compute deltas. */
|
|
610
|
+
lastReportedInputTokens: number;
|
|
611
|
+
/** Highwater mark of output tokens already folded into the orchestrator-wide totals. */
|
|
612
|
+
lastReportedOutputTokens: number;
|
|
613
|
+
/** Highwater mark of total tokens already folded into the orchestrator-wide totals. */
|
|
614
|
+
lastReportedTotalTokens: number;
|
|
615
|
+
/** 1-based attempt number when this run is a retry; `null` for the first attempt. */
|
|
616
|
+
retryAttempt: number | null;
|
|
617
|
+
}
|
|
618
|
+
/**
|
|
619
|
+
* Common fields present on every agent update.
|
|
620
|
+
*/
|
|
621
|
+
export interface AgentUpdateBase {
|
|
622
|
+
sessionUpdate?: unknown;
|
|
623
|
+
workspacePath?: string | null | undefined;
|
|
624
|
+
sessionId?: string | null | undefined;
|
|
625
|
+
executorPid?: string | null | undefined;
|
|
626
|
+
timestamp?: Date | undefined;
|
|
627
|
+
message?: unknown;
|
|
628
|
+
usage?: UsageTokenUpdate | undefined;
|
|
629
|
+
/** Whether usage fields are cumulative session high-water marks or per-update deltas. */
|
|
630
|
+
usageKind?: UsageUpdateKind | undefined;
|
|
631
|
+
rateLimits?: unknown;
|
|
632
|
+
}
|
|
633
|
+
export interface AgentSessionNotificationUpdate extends AgentUpdateBase {
|
|
634
|
+
type: "session_notification";
|
|
635
|
+
message: SessionNotification;
|
|
636
|
+
}
|
|
637
|
+
export type StringMessageUpdateType = "stderr" | "process_exit" | "session_started" | "workspace_prepared" | "rate_limit" | "turn_input_required" | "tool_input_auto_answered" | "malformed";
|
|
638
|
+
export interface StringMessageUpdate extends AgentUpdateBase {
|
|
639
|
+
type: StringMessageUpdateType;
|
|
640
|
+
message: string;
|
|
641
|
+
}
|
|
642
|
+
export type WorkspaceHookName = "after_create" | "before_run" | "after_run" | "before_remove";
|
|
643
|
+
export type HookExecutionStatus = "started" | "completed" | "failed";
|
|
644
|
+
export interface HookExecutionMessage {
|
|
645
|
+
status: HookExecutionStatus;
|
|
646
|
+
command: string;
|
|
647
|
+
cwd: string;
|
|
648
|
+
hookName?: WorkspaceHookName | undefined;
|
|
649
|
+
workerHost?: string | null | undefined;
|
|
650
|
+
exitCode?: number | null | undefined;
|
|
651
|
+
output?: string | undefined;
|
|
652
|
+
outputTruncated?: boolean | undefined;
|
|
653
|
+
error?: string | undefined;
|
|
654
|
+
errorTruncated?: boolean | undefined;
|
|
655
|
+
}
|
|
656
|
+
export interface HookExecutionUpdate extends AgentUpdateBase {
|
|
657
|
+
type: "hook_execution";
|
|
658
|
+
message: HookExecutionMessage;
|
|
659
|
+
}
|
|
660
|
+
export interface TurnStartedUpdate extends AgentUpdateBase {
|
|
661
|
+
type: "turn_started";
|
|
662
|
+
message: {
|
|
663
|
+
prompt: Array<{
|
|
664
|
+
type: string;
|
|
665
|
+
text: string;
|
|
666
|
+
}>;
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
export interface TurnCompletedUpdate extends AgentUpdateBase {
|
|
670
|
+
type: "turn_completed";
|
|
671
|
+
message: {
|
|
672
|
+
response: PromptResponse;
|
|
673
|
+
};
|
|
674
|
+
usage?: UsageTokenUpdate;
|
|
675
|
+
}
|
|
676
|
+
export interface TurnCancelledUpdate extends AgentUpdateBase {
|
|
677
|
+
type: "turn_cancelled";
|
|
678
|
+
message: {
|
|
679
|
+
response: PromptResponse;
|
|
680
|
+
};
|
|
681
|
+
usage?: UsageTokenUpdate;
|
|
682
|
+
}
|
|
683
|
+
export interface TurnFailedUpdate extends AgentUpdateBase {
|
|
684
|
+
type: "turn_failed";
|
|
685
|
+
message: string | {
|
|
686
|
+
response: PromptResponse;
|
|
687
|
+
};
|
|
688
|
+
usage?: UsageTokenUpdate;
|
|
689
|
+
}
|
|
690
|
+
export interface ApprovalRequiredUpdate extends AgentUpdateBase {
|
|
691
|
+
type: "approval_required";
|
|
692
|
+
message: {
|
|
693
|
+
request: RequestPermissionRequest;
|
|
694
|
+
selected: PermissionOption | null;
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
export interface ApprovalAutoApprovedUpdate extends AgentUpdateBase {
|
|
698
|
+
type: "approval_auto_approved";
|
|
699
|
+
message: {
|
|
700
|
+
request: RequestPermissionRequest;
|
|
701
|
+
selected: PermissionOption;
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
export interface FsWriteUpdate extends AgentUpdateBase {
|
|
705
|
+
type: "fs_write";
|
|
706
|
+
message: {
|
|
707
|
+
path: string;
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
/**
|
|
711
|
+
* Single event from an agent executor: session lifecycle, turn progress, usage, errors, or raw notifications.
|
|
712
|
+
* Streamed via the `onUpdate` callback and also returned in batches from {@link AgentExecutor.runTurn}.
|
|
713
|
+
*
|
|
714
|
+
* Discriminated on `type`.
|
|
715
|
+
*/
|
|
716
|
+
export type AgentUpdate = AgentSessionNotificationUpdate | StringMessageUpdate | HookExecutionUpdate | TurnStartedUpdate | TurnCompletedUpdate | TurnCancelledUpdate | TurnFailedUpdate | ApprovalRequiredUpdate | ApprovalAutoApprovedUpdate | FsWriteUpdate;
|
|
717
|
+
export type AgentUpdateType = AgentUpdate["type"];
|
|
718
|
+
export declare const AGENT_UPDATE_TYPES: readonly ["workspace_prepared", "session_started", "turn_started", "turn_completed", "turn_failed", "turn_cancelled", "turn_input_required", "approval_required", "approval_auto_approved", "tool_input_auto_answered", "rate_limit", "stderr", "malformed", "process_exit", "fs_write", "hook_execution", "session_notification"];
|
|
719
|
+
type AgentUpdateMessage<K extends AgentUpdateType> = K extends "session_notification" ? SessionNotification : K extends StringMessageUpdateType ? string : Extract<AgentUpdate, {
|
|
720
|
+
type: K;
|
|
721
|
+
}> extends {
|
|
722
|
+
message: infer M;
|
|
723
|
+
} ? M : undefined;
|
|
724
|
+
/**
|
|
725
|
+
* Wire format of a single JSONL trace line as written by TraceEmitter.
|
|
726
|
+
* Mapped union: switching on `type` narrows `message` to the variant's specific shape.
|
|
727
|
+
*/
|
|
728
|
+
export type TraceEvent = {
|
|
729
|
+
[K in AgentUpdateType]: {
|
|
730
|
+
type: K;
|
|
731
|
+
issueId: string;
|
|
732
|
+
issueIdentifier: string;
|
|
733
|
+
timestamp: string | null;
|
|
734
|
+
message: AgentUpdateMessage<K> | null;
|
|
735
|
+
usage: UsageTokenUpdate | null;
|
|
736
|
+
workspacePath: string | null;
|
|
737
|
+
sessionId: string | null;
|
|
738
|
+
executorPid: string | null;
|
|
739
|
+
};
|
|
740
|
+
}[AgentUpdateType];
|
|
741
|
+
/**
|
|
742
|
+
* Handle to a started agent process, returned by {@link AgentExecutor.startSession}.
|
|
743
|
+
* The same instance is passed back into `runTurn` for each prompt and closed via `stop`.
|
|
744
|
+
*/
|
|
745
|
+
export interface AgentSession {
|
|
746
|
+
agentKind: AgentKind;
|
|
747
|
+
/** Provider session id; populated once the executor receives it from the backend. */
|
|
748
|
+
sessionId?: string | null | undefined;
|
|
749
|
+
/** OS pid of the agent child as a string; `null` if not applicable. */
|
|
750
|
+
executorPid?: string | null | undefined;
|
|
751
|
+
/** Closes the session and tears down the underlying process; must be safe to call from a `finally` block. */
|
|
752
|
+
stop(): Promise<void>;
|
|
753
|
+
}
|
|
754
|
+
/**
|
|
755
|
+
* Backend driver for a specific agent kind - knows how to spawn the agent process and run turns against it.
|
|
756
|
+
*/
|
|
757
|
+
export interface AgentExecutor {
|
|
758
|
+
/** Agent kind this executor serves; matches {@link AgentSettings.kind}. */
|
|
759
|
+
kind: AgentKind;
|
|
760
|
+
/**
|
|
761
|
+
* Spawns the agent process and prepares it for the first turn.
|
|
762
|
+
* `onUpdate` receives every event as it arrives.
|
|
763
|
+
*/
|
|
764
|
+
startSession(input: {
|
|
765
|
+
workspace: string;
|
|
766
|
+
workerHost?: string | null | undefined;
|
|
767
|
+
issue?: Issue;
|
|
768
|
+
settings: Settings;
|
|
769
|
+
onUpdate?: (update: AgentUpdate) => void;
|
|
770
|
+
}): Promise<AgentSession>;
|
|
771
|
+
/** Sends one prompt to the session and resolves with the updates produced during that turn. */
|
|
772
|
+
runTurn(session: AgentSession, prompt: string, issue?: Issue): Promise<AgentUpdate[]>;
|
|
773
|
+
}
|
|
774
|
+
export {};
|
|
775
|
+
//# sourceMappingURL=index.d.ts.map
|