@openagt/dashboard 0.8.0 → 0.10.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/README.md +14 -17
- package/dist/agent-view.d.ts +3 -3
- package/dist/bridge-browser.d.ts +4 -4
- package/dist/bridge-browser.d.ts.map +1 -1
- package/dist/bridge-browser.js +8 -8
- package/dist/bridge-browser.js.map +1 -1
- package/dist/built-in.d.ts +45 -14
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +122 -27
- package/dist/built-in.js.map +1 -1
- package/dist/chrome-extension/background.js +11 -11
- package/dist/chrome-extension/content.js +37 -37
- package/dist/chrome-extension/driver-plan.js +1 -1
- package/dist/chrome-extension/fingerprint.js +1 -1
- package/dist/chrome-extension/manifest.json +3 -3
- package/dist/chrome-extension/options.html +4 -4
- package/dist/chrome-extension/options.js +4 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +7 -7
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +2 -2
- package/dist/cloud-run-state.d.ts +1 -1
- package/dist/cloud-scratch-refs.js +7 -7
- package/dist/cloud-scratch-refs.js.map +1 -1
- package/dist/cloud-work.js +2 -2
- package/dist/daemon-runtime.d.ts +5 -4
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +59 -10
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon-services.d.ts +4 -3
- package/dist/daemon-services.d.ts.map +1 -1
- package/dist/daemon-services.js +14 -8
- package/dist/daemon-services.js.map +1 -1
- package/dist/daemon-tick.js +1 -1
- package/dist/daemon.d.ts +1 -12
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +9 -32
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/agent-handoff.d.ts +4 -4
- package/dist/dashboard/agent-handoff.js +7 -7
- package/dist/dashboard/agent-handoff.js.map +1 -1
- package/dist/dashboard/bridge-endpoints.d.ts +3 -3
- package/dist/dashboard/bridge-endpoints.js +3 -3
- package/dist/dashboard/content-type.js +1 -1
- package/dist/dashboard/docs.d.ts +1 -1
- package/dist/dashboard/docs.js +1 -1
- package/dist/dashboard/git-status.d.ts +1 -1
- package/dist/dashboard/index.d.ts +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/interventions.d.ts +2 -2
- package/dist/dashboard/open-in-app.d.ts +3 -3
- package/dist/dashboard/open-in-app.js +4 -4
- package/dist/dashboard/open-questions.d.ts +2 -2
- package/dist/dashboard/projects.d.ts +6 -5
- package/dist/dashboard/projects.d.ts.map +1 -1
- package/dist/dashboard/projects.js.map +1 -1
- package/dist/dashboard/pull-requests.d.ts +5 -5
- package/dist/dashboard/pull-requests.d.ts.map +1 -1
- package/dist/dashboard/pull-requests.js +2 -2
- package/dist/dashboard/pull-requests.js.map +1 -1
- package/dist/dashboard/relay-endpoints.d.ts +3 -3
- package/dist/dashboard/relay-endpoints.js +1 -1
- package/dist/dashboard/remote-run.d.ts +5 -5
- package/dist/dashboard/remote-run.js +3 -3
- package/dist/dashboard/rpc-serve.d.ts +7 -4
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/run-inbox.d.ts +2 -2
- package/dist/dashboard/run-inbox.js +4 -4
- package/dist/dashboard/run-inbox.js.map +1 -1
- package/dist/dashboard/server.d.ts +6 -4
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +3 -2
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/start-branch.d.ts +32 -0
- package/dist/dashboard/start-branch.d.ts.map +1 -0
- package/dist/dashboard/start-branch.js +47 -0
- package/dist/dashboard/start-branch.js.map +1 -0
- package/dist/dashboard/static.js +1 -1
- package/dist/dashboard/types.d.ts +29 -3
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard/web-start-endpoints.d.ts +1 -1
- package/dist/dashboard/web-start-endpoints.d.ts.map +1 -1
- package/dist/dashboard/web-start-endpoints.js +1 -1
- package/dist/dashboard/web-start-endpoints.js.map +1 -1
- package/dist/dashboard-bundle/assets/main-Q7JMdMJI.css +2 -0
- package/dist/dashboard-bundle/assets/main-fDZWGOub.js +140 -0
- package/dist/dashboard-bundle/assets/{module-jASZmfSB.js → module-gKz-ZvkG.js} +4 -4
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +6 -6
- package/dist/dashboard-rpc/context.d.ts +2 -0
- package/dist/dashboard-rpc/context.d.ts.map +1 -1
- package/dist/dashboard-rpc/context.js +4 -0
- package/dist/dashboard-rpc/context.js.map +1 -1
- package/dist/dashboard-rpc/control.d.ts +1 -1
- package/dist/dashboard-rpc/control.js +3 -3
- package/dist/dashboard-rpc/control.js.map +1 -1
- package/dist/dashboard-rpc/events.d.ts +3 -3
- package/dist/dashboard-rpc/index.d.ts +2 -1
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +4 -2
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/modules.d.ts +8 -6
- package/dist/dashboard-rpc/modules.d.ts.map +1 -1
- package/dist/dashboard-rpc/modules.js +8 -6
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/preferences.d.ts +2 -2
- package/dist/dashboard-rpc/preferences.d.ts.map +1 -1
- package/dist/dashboard-rpc/preferences.js +2 -2
- package/dist/dashboard-rpc/preferences.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +29 -3
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +57 -8
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/dashboard-rpc/reads.d.ts +3 -3
- package/dist/dashboard-rpc/reads.js +1 -1
- package/dist/dashboard-rpc/skills.d.ts +80 -0
- package/dist/dashboard-rpc/skills.d.ts.map +1 -0
- package/dist/dashboard-rpc/skills.js +84 -0
- package/dist/dashboard-rpc/skills.js.map +1 -0
- package/dist/dashboard-rpc/test-context.d.ts.map +1 -1
- package/dist/dashboard-rpc/test-context.js +4 -3
- package/dist/dashboard-rpc/test-context.js.map +1 -1
- package/dist/event-stream.d.ts +1 -1
- package/dist/event-stream.js +1 -1
- package/dist/events.d.ts +8 -8
- package/dist/events.d.ts.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/install.d.ts +9 -7
- package/dist/install.d.ts.map +1 -1
- package/dist/install.js +28 -14
- package/dist/install.js.map +1 -1
- package/dist/module-server.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/switch.d.ts +7 -0
- package/dist/module-types/dashboard/lib/route.d.ts +2 -1
- package/dist/module-types/dashboard/lib/use-modules.d.ts +4 -3
- package/dist/module-types/dashboard/module/index.d.ts +6 -5
- package/dist/module-types/src/agent-view.d.ts +3 -3
- package/dist/module-types/src/bridge-browser.d.ts +4 -4
- package/dist/module-types/src/built-in.d.ts +45 -14
- package/dist/module-types/src/client.d.ts +1 -1
- package/dist/module-types/src/cloud-run-state.d.ts +1 -1
- package/dist/module-types/src/dashboard/agent-handoff.d.ts +4 -4
- package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +3 -3
- package/dist/module-types/src/dashboard/docs.d.ts +1 -1
- package/dist/module-types/src/dashboard/git-status.d.ts +1 -1
- package/dist/module-types/src/dashboard/interventions.d.ts +2 -2
- package/dist/module-types/src/dashboard/open-in-app.d.ts +3 -3
- package/dist/module-types/src/dashboard/open-questions.d.ts +2 -2
- package/dist/module-types/src/dashboard/projects.d.ts +6 -5
- package/dist/module-types/src/dashboard/pull-requests.d.ts +5 -5
- package/dist/module-types/src/dashboard/remote-run.d.ts +5 -5
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +7 -4
- package/dist/module-types/src/dashboard/run-inbox.d.ts +2 -2
- package/dist/module-types/src/dashboard/start-branch.d.ts +31 -0
- package/dist/module-types/src/dashboard/types.d.ts +29 -3
- package/dist/module-types/src/dashboard-rpc/context.d.ts +2 -0
- package/dist/module-types/src/dashboard-rpc/control.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/events.d.ts +3 -3
- package/dist/module-types/src/dashboard-rpc/index.d.ts +2 -1
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +8 -6
- package/dist/module-types/src/dashboard-rpc/preferences.d.ts +2 -2
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +29 -3
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +3 -3
- package/dist/module-types/src/dashboard-rpc/skills.d.ts +79 -0
- package/dist/module-types/src/event-stream.d.ts +1 -1
- package/dist/module-types/src/events.d.ts +8 -8
- package/dist/module-types/src/index.d.ts +3 -2
- package/dist/module-types/src/open-choices.d.ts +2 -2
- package/dist/module-types/src/openagent-dir.d.ts +8 -0
- package/dist/module-types/src/openagent-gitignore.d.ts +11 -0
- package/dist/module-types/src/project-commands.d.ts +5 -1
- package/dist/module-types/src/project-errors.d.ts +11 -7
- package/dist/module-types/src/project-hooks.d.ts +12 -9
- package/dist/module-types/src/project-modules.d.ts +9 -7
- package/dist/module-types/src/project-presets.d.ts +4 -4
- package/dist/module-types/src/project.d.ts +6 -6
- package/dist/module-types/src/publish-levels.d.ts +4 -4
- package/dist/module-types/src/quota-boundary.d.ts +2 -2
- package/dist/module-types/src/registry.d.ts +13 -7
- package/dist/module-types/src/store/agent-checkout.d.ts +1 -1
- package/dist/module-types/src/store/agent-store.d.ts +6 -6
- package/dist/module-types/src/store/branches.d.ts +8 -8
- package/dist/module-types/src/store/git-host.d.ts +8 -8
- package/dist/module-types/src/store/provided.d.ts +3 -3
- package/dist/module-types/src/store/queue.d.ts +9 -9
- package/dist/module-types/src/store/repository.d.ts +2 -2
- package/dist/module-types/src/store/run-record.d.ts +10 -10
- package/dist/module-types/src/store/runs.d.ts +7 -7
- package/dist/module-types/src/store/tickets.d.ts +8 -8
- package/dist/module-types/src/terminal.d.ts +3 -3
- package/dist/open-choices.d.ts +2 -2
- package/dist/openagent-dir.d.ts +9 -0
- package/dist/openagent-dir.d.ts.map +1 -0
- package/dist/openagent-dir.js +9 -0
- package/dist/openagent-dir.js.map +1 -0
- package/dist/openagent-gitignore.d.ts +12 -0
- package/dist/openagent-gitignore.d.ts.map +1 -0
- package/dist/openagent-gitignore.js +19 -0
- package/dist/openagent-gitignore.js.map +1 -0
- package/dist/pick-directory.js +2 -2
- package/dist/pick-directory.js.map +1 -1
- package/dist/project-commands.d.ts +5 -1
- package/dist/project-commands.d.ts.map +1 -1
- package/dist/project-commands.js +1 -1
- package/dist/project-commands.js.map +1 -1
- package/dist/project-errors.d.ts +11 -7
- package/dist/project-errors.d.ts.map +1 -1
- package/dist/project-errors.js +10 -8
- package/dist/project-errors.js.map +1 -1
- package/dist/project-hooks.d.ts +12 -9
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +17 -14
- package/dist/project-hooks.js.map +1 -1
- package/dist/project-modules.d.ts +9 -7
- package/dist/project-modules.d.ts.map +1 -1
- package/dist/project-modules.js +7 -13
- package/dist/project-modules.js.map +1 -1
- package/dist/project-presets.d.ts +4 -4
- package/dist/project-presets.d.ts.map +1 -1
- package/dist/project-presets.js +9 -9
- package/dist/project-presets.js.map +1 -1
- package/dist/project.d.ts +6 -6
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +6 -7
- package/dist/project.js.map +1 -1
- package/dist/publish-levels.d.ts +4 -4
- package/dist/publish-levels.d.ts.map +1 -1
- package/dist/publish-levels.js +7 -5
- package/dist/publish-levels.js.map +1 -1
- package/dist/quota-boundary.d.ts +2 -2
- package/dist/quota-boundary.js +2 -2
- package/dist/registry.d.ts +13 -7
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +19 -3
- package/dist/registry.js.map +1 -1
- package/dist/remove-files.d.ts +24 -0
- package/dist/remove-files.d.ts.map +1 -0
- package/dist/remove-files.js +98 -0
- package/dist/remove-files.js.map +1 -0
- package/dist/store/agent-checkout.d.ts +1 -1
- package/dist/store/agent-checkout.js +3 -3
- package/dist/store/agent-checkout.js.map +1 -1
- package/dist/store/agent-store.d.ts +6 -6
- package/dist/store/agent-store.js +8 -8
- package/dist/store/agent-store.js.map +1 -1
- package/dist/store/branches.d.ts +8 -8
- package/dist/store/branches.d.ts.map +1 -1
- package/dist/store/branches.js +2 -2
- package/dist/store/branches.js.map +1 -1
- package/dist/store/git-host.d.ts +8 -8
- package/dist/store/git-host.d.ts.map +1 -1
- package/dist/store/git-host.js +3 -3
- package/dist/store/git-host.js.map +1 -1
- package/dist/store/provided.d.ts +3 -3
- package/dist/store/provided.d.ts.map +1 -1
- package/dist/store/provided.js +3 -3
- package/dist/store/provided.js.map +1 -1
- package/dist/store/queue.d.ts +9 -9
- package/dist/store/queue.d.ts.map +1 -1
- package/dist/store/queue.js +2 -2
- package/dist/store/queue.js.map +1 -1
- package/dist/store/repository.d.ts +2 -2
- package/dist/store/run-record.d.ts +10 -10
- package/dist/store/run-record.d.ts.map +1 -1
- package/dist/store/run-record.js +7 -7
- package/dist/store/run-record.js.map +1 -1
- package/dist/store/runs.d.ts +7 -7
- package/dist/store/runs.d.ts.map +1 -1
- package/dist/store/runs.js +3 -3
- package/dist/store/runs.js.map +1 -1
- package/dist/store/test-branches.d.ts +0 -8
- package/dist/store/test-branches.d.ts.map +1 -1
- package/dist/store/test-branches.js +0 -24
- package/dist/store/test-branches.js.map +1 -1
- package/dist/store/tickets.d.ts +8 -8
- package/dist/store/tickets.d.ts.map +1 -1
- package/dist/store/tickets.js +2 -2
- package/dist/store/tickets.js.map +1 -1
- package/dist/terminal.d.ts +3 -3
- package/dist/terminal.js +3 -3
- package/package.json +23 -20
- package/dist/agent-archive.d.ts +0 -35
- package/dist/agent-archive.d.ts.map +0 -1
- package/dist/agent-archive.js +0 -67
- package/dist/agent-archive.js.map +0 -1
- package/dist/agent-commit.d.ts +0 -140
- package/dist/agent-commit.d.ts.map +0 -1
- package/dist/agent-commit.js +0 -254
- package/dist/agent-commit.js.map +0 -1
- package/dist/agent-driver.d.ts +0 -28
- package/dist/agent-driver.d.ts.map +0 -1
- package/dist/agent-driver.js +0 -18
- package/dist/agent-driver.js.map +0 -1
- package/dist/agent-location.d.ts +0 -11
- package/dist/agent-location.d.ts.map +0 -1
- package/dist/agent-location.js +0 -10
- package/dist/agent-location.js.map +0 -1
- package/dist/agent-messages.d.ts +0 -55
- package/dist/agent-messages.d.ts.map +0 -1
- package/dist/agent-messages.js +0 -73
- package/dist/agent-messages.js.map +0 -1
- package/dist/agent-names.d.ts +0 -24
- package/dist/agent-names.d.ts.map +0 -1
- package/dist/agent-names.js +0 -33
- package/dist/agent-names.js.map +0 -1
- package/dist/agent-options.d.ts +0 -45
- package/dist/agent-options.d.ts.map +0 -1
- package/dist/agent-options.js +0 -83
- package/dist/agent-options.js.map +0 -1
- package/dist/agent-spec.d.ts +0 -56
- package/dist/agent-spec.d.ts.map +0 -1
- package/dist/agent-spec.js +0 -56
- package/dist/agent-spec.js.map +0 -1
- package/dist/agent-telemetry.d.ts +0 -88
- package/dist/agent-telemetry.d.ts.map +0 -1
- package/dist/agent-telemetry.js +0 -97
- package/dist/agent-telemetry.js.map +0 -1
- package/dist/agent.d.ts +0 -113
- package/dist/agent.d.ts.map +0 -1
- package/dist/agent.js +0 -168
- package/dist/agent.js.map +0 -1
- package/dist/archived-agent-patch.d.ts +0 -14
- package/dist/archived-agent-patch.d.ts.map +0 -1
- package/dist/archived-agent-patch.js +0 -22
- package/dist/archived-agent-patch.js.map +0 -1
- package/dist/auto-pm.d.ts +0 -538
- package/dist/auto-pm.d.ts.map +0 -1
- package/dist/auto-pm.js +0 -707
- package/dist/auto-pm.js.map +0 -1
- package/dist/await-gate.d.ts +0 -184
- package/dist/await-gate.d.ts.map +0 -1
- package/dist/await-gate.js +0 -252
- package/dist/await-gate.js.map +0 -1
- package/dist/branch-links-pass.d.ts +0 -15
- package/dist/branch-links-pass.d.ts.map +0 -1
- package/dist/branch-links-pass.js +0 -13
- package/dist/branch-links-pass.js.map +0 -1
- package/dist/branch-links.d.ts +0 -53
- package/dist/branch-links.d.ts.map +0 -1
- package/dist/branch-links.js +0 -94
- package/dist/branch-links.js.map +0 -1
- package/dist/branch-names.d.ts +0 -57
- package/dist/branch-names.d.ts.map +0 -1
- package/dist/branch-names.js +0 -72
- package/dist/branch-names.js.map +0 -1
- package/dist/ci-watch.d.ts +0 -123
- package/dist/ci-watch.d.ts.map +0 -1
- package/dist/ci-watch.js +0 -228
- package/dist/ci-watch.js.map +0 -1
- package/dist/claude-trust.d.ts +0 -16
- package/dist/claude-trust.d.ts.map +0 -1
- package/dist/claude-trust.js +0 -72
- package/dist/claude-trust.js.map +0 -1
- package/dist/cli-exec.d.ts +0 -36
- package/dist/cli-exec.d.ts.map +0 -1
- package/dist/cli-exec.js +0 -44
- package/dist/cli-exec.js.map +0 -1
- package/dist/closing-keywords.d.ts +0 -28
- package/dist/closing-keywords.d.ts.map +0 -1
- package/dist/closing-keywords.js +0 -49
- package/dist/closing-keywords.js.map +0 -1
- package/dist/config-layers.d.ts +0 -62
- package/dist/config-layers.d.ts.map +0 -1
- package/dist/config-layers.js +0 -70
- package/dist/config-layers.js.map +0 -1
- package/dist/config.d.ts +0 -54
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -78
- package/dist/config.js.map +0 -1
- package/dist/consumption-guard.d.ts +0 -53
- package/dist/consumption-guard.d.ts.map +0 -1
- package/dist/consumption-guard.js +0 -69
- package/dist/consumption-guard.js.map +0 -1
- package/dist/control.d.ts +0 -75
- package/dist/control.d.ts.map +0 -1
- package/dist/control.js +0 -68
- package/dist/control.js.map +0 -1
- package/dist/conversation-commit.d.ts +0 -166
- package/dist/conversation-commit.d.ts.map +0 -1
- package/dist/conversation-commit.js +0 -309
- package/dist/conversation-commit.js.map +0 -1
- package/dist/conversations.d.ts +0 -93
- package/dist/conversations.d.ts.map +0 -1
- package/dist/conversations.js +0 -176
- package/dist/conversations.js.map +0 -1
- package/dist/daemon-writes.d.ts +0 -33
- package/dist/daemon-writes.d.ts.map +0 -1
- package/dist/daemon-writes.js +0 -45
- package/dist/daemon-writes.js.map +0 -1
- package/dist/dashboard/agent-tree.d.ts +0 -106
- package/dist/dashboard/agent-tree.d.ts.map +0 -1
- package/dist/dashboard/agent-tree.js +0 -180
- package/dist/dashboard/agent-tree.js.map +0 -1
- package/dist/dashboard/browser-proxy.d.ts +0 -41
- package/dist/dashboard/browser-proxy.d.ts.map +0 -1
- package/dist/dashboard/browser-proxy.js +0 -96
- package/dist/dashboard/browser-proxy.js.map +0 -1
- package/dist/dashboard/discord-webhook.d.ts +0 -17
- package/dist/dashboard/discord-webhook.d.ts.map +0 -1
- package/dist/dashboard/discord-webhook.js +0 -36
- package/dist/dashboard/discord-webhook.js.map +0 -1
- package/dist/dashboard/file-diff.d.ts +0 -67
- package/dist/dashboard/file-diff.d.ts.map +0 -1
- package/dist/dashboard/file-diff.js +0 -132
- package/dist/dashboard/file-diff.js.map +0 -1
- package/dist/dashboard/file-read.d.ts +0 -42
- package/dist/dashboard/file-read.d.ts.map +0 -1
- package/dist/dashboard/file-read.js +0 -69
- package/dist/dashboard/file-read.js.map +0 -1
- package/dist/dashboard/file-status.d.ts +0 -21
- package/dist/dashboard/file-status.d.ts.map +0 -1
- package/dist/dashboard/file-status.js +0 -37
- package/dist/dashboard/file-status.js.map +0 -1
- package/dist/dashboard/gh.d.ts +0 -131
- package/dist/dashboard/gh.d.ts.map +0 -1
- package/dist/dashboard/gh.js +0 -150
- package/dist/dashboard/gh.js.map +0 -1
- package/dist/dashboard/github.d.ts +0 -11
- package/dist/dashboard/github.d.ts.map +0 -1
- package/dist/dashboard/github.js +0 -33
- package/dist/dashboard/github.js.map +0 -1
- package/dist/dashboard/run-handoff.d.ts +0 -311
- package/dist/dashboard/run-handoff.d.ts.map +0 -1
- package/dist/dashboard/run-handoff.js +0 -485
- package/dist/dashboard/run-handoff.js.map +0 -1
- package/dist/dashboard/scheduler-state.d.ts +0 -73
- package/dist/dashboard/scheduler-state.d.ts.map +0 -1
- package/dist/dashboard/scheduler-state.js +0 -120
- package/dist/dashboard/scheduler-state.js.map +0 -1
- package/dist/dashboard/subagent-settings.d.ts +0 -26
- package/dist/dashboard/subagent-settings.d.ts.map +0 -1
- package/dist/dashboard/subagent-settings.js +0 -52
- package/dist/dashboard/subagent-settings.js.map +0 -1
- package/dist/dashboard/telefunc-serve.d.ts +0 -118
- package/dist/dashboard/telefunc-serve.d.ts.map +0 -1
- package/dist/dashboard/telefunc-serve.js +0 -108
- package/dist/dashboard/telefunc-serve.js.map +0 -1
- package/dist/dashboard/tickets.d.ts +0 -29
- package/dist/dashboard/tickets.d.ts.map +0 -1
- package/dist/dashboard/tickets.js +0 -38
- package/dist/dashboard/tickets.js.map +0 -1
- package/dist/dashboard/widget-serve.d.ts +0 -15
- package/dist/dashboard/widget-serve.d.ts.map +0 -1
- package/dist/dashboard/widget-serve.js +0 -45
- package/dist/dashboard/widget-serve.js.map +0 -1
- package/dist/dashboard-bundle/assets/main-B3HghPQy.css +0 -2
- package/dist/dashboard-bundle/assets/main-om0WOAku.js +0 -140
- package/dist/dashboard-client/assets/chunks/chunk-BF9pJudf.js +0 -4
- package/dist/dashboard-client/assets/entries/entry-client-routing.CT1e9F0o.js +0 -1
- package/dist/dashboard-client/assets/entries/pages_index.CkW5JQ8X.js +0 -428
- package/dist/dashboard-client/assets/static/layouts_tailwind-00e65532.8OjKGAbA.css +0 -2
- package/dist/dashboard-client/index.html +0 -27
- package/dist/dashboard-client/index.pageContext.json +0 -1
- package/dist/dashboard-client/logo-animated.svg +0 -34
- package/dist/dashboard-client/logo.svg +0 -16
- package/dist/dashboard-rpc/control.telefunc.d.ts +0 -176
- package/dist/dashboard-rpc/control.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/control.telefunc.js +0 -373
- package/dist/dashboard-rpc/control.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/devices.telefunc.d.ts +0 -9
- package/dist/dashboard-rpc/devices.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/devices.telefunc.js +0 -12
- package/dist/dashboard-rpc/devices.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/events.telefunc.d.ts +0 -36
- package/dist/dashboard-rpc/events.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/events.telefunc.js +0 -70
- package/dist/dashboard-rpc/events.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/preferences.telefunc.d.ts +0 -97
- package/dist/dashboard-rpc/preferences.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/preferences.telefunc.js +0 -157
- package/dist/dashboard-rpc/preferences.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/projects.telefunc.d.ts +0 -56
- package/dist/dashboard-rpc/projects.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/projects.telefunc.js +0 -96
- package/dist/dashboard-rpc/projects.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/quota.telefunc.d.ts +0 -40
- package/dist/dashboard-rpc/quota.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/quota.telefunc.js +0 -84
- package/dist/dashboard-rpc/quota.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/reads.telefunc.d.ts +0 -197
- package/dist/dashboard-rpc/reads.telefunc.d.ts.map +0 -1
- package/dist/dashboard-rpc/reads.telefunc.js +0 -403
- package/dist/dashboard-rpc/reads.telefunc.js.map +0 -1
- package/dist/dashboard-rpc/register.d.ts +0 -18
- package/dist/dashboard-rpc/register.d.ts.map +0 -1
- package/dist/dashboard-rpc/register.js +0 -66
- package/dist/dashboard-rpc/register.js.map +0 -1
- package/dist/dashboard-rpc/relay-run.d.ts +0 -9
- package/dist/dashboard-rpc/relay-run.d.ts.map +0 -1
- package/dist/dashboard-rpc/relay-run.js +0 -21
- package/dist/dashboard-rpc/relay-run.js.map +0 -1
- package/dist/dashboard-rpc/stream-channel.d.ts +0 -23
- package/dist/dashboard-rpc/stream-channel.d.ts.map +0 -1
- package/dist/dashboard-rpc/stream-channel.js +0 -52
- package/dist/dashboard-rpc/stream-channel.js.map +0 -1
- package/dist/dashboard-rpc/subagents.d.ts +0 -12
- package/dist/dashboard-rpc/subagents.d.ts.map +0 -1
- package/dist/dashboard-rpc/subagents.js +0 -13
- package/dist/dashboard-rpc/subagents.js.map +0 -1
- package/dist/dashboard-rpc/widgets.d.ts +0 -33
- package/dist/dashboard-rpc/widgets.d.ts.map +0 -1
- package/dist/dashboard-rpc/widgets.js +0 -54
- package/dist/dashboard-rpc/widgets.js.map +0 -1
- package/dist/data-branch.d.ts +0 -120
- package/dist/data-branch.d.ts.map +0 -1
- package/dist/data-branch.js +0 -319
- package/dist/data-branch.js.map +0 -1
- package/dist/discord/bot.d.ts +0 -61
- package/dist/discord/bot.d.ts.map +0 -1
- package/dist/discord/bot.js +0 -94
- package/dist/discord/bot.js.map +0 -1
- package/dist/discord/gateway.d.ts +0 -137
- package/dist/discord/gateway.d.ts.map +0 -1
- package/dist/discord/gateway.js +0 -315
- package/dist/discord/gateway.js.map +0 -1
- package/dist/discord/live-run.d.ts +0 -31
- package/dist/discord/live-run.d.ts.map +0 -1
- package/dist/discord/live-run.js +0 -57
- package/dist/discord/live-run.js.map +0 -1
- package/dist/discord/reply-mirror.d.ts +0 -83
- package/dist/discord/reply-mirror.d.ts.map +0 -1
- package/dist/discord/reply-mirror.js +0 -84
- package/dist/discord/reply-mirror.js.map +0 -1
- package/dist/discord/rest.d.ts +0 -20
- package/dist/discord/rest.d.ts.map +0 -1
- package/dist/discord/rest.js +0 -41
- package/dist/discord/rest.js.map +0 -1
- package/dist/discord/routing.d.ts +0 -81
- package/dist/discord/routing.d.ts.map +0 -1
- package/dist/discord/routing.js +0 -91
- package/dist/discord/routing.js.map +0 -1
- package/dist/discord-credentials-store.d.ts +0 -14
- package/dist/discord-credentials-store.d.ts.map +0 -1
- package/dist/discord-credentials-store.js +0 -53
- package/dist/discord-credentials-store.js.map +0 -1
- package/dist/discord-credentials.d.ts +0 -80
- package/dist/discord-credentials.d.ts.map +0 -1
- package/dist/discord-credentials.js +0 -55
- package/dist/discord-credentials.js.map +0 -1
- package/dist/driver/actions-zip.d.ts +0 -2
- package/dist/driver/actions-zip.d.ts.map +0 -1
- package/dist/driver/actions-zip.js +0 -70
- package/dist/driver/actions-zip.js.map +0 -1
- package/dist/driver/actions.d.ts +0 -130
- package/dist/driver/actions.d.ts.map +0 -1
- package/dist/driver/actions.js +0 -261
- package/dist/driver/actions.js.map +0 -1
- package/dist/driver/agent-cli.d.ts +0 -57
- package/dist/driver/agent-cli.d.ts.map +0 -1
- package/dist/driver/agent-cli.js +0 -134
- package/dist/driver/agent-cli.js.map +0 -1
- package/dist/driver/child-registry.d.ts +0 -25
- package/dist/driver/child-registry.d.ts.map +0 -1
- package/dist/driver/child-registry.js +0 -53
- package/dist/driver/child-registry.js.map +0 -1
- package/dist/driver/claude-code-quota.d.ts +0 -40
- package/dist/driver/claude-code-quota.d.ts.map +0 -1
- package/dist/driver/claude-code-quota.js +0 -144
- package/dist/driver/claude-code-quota.js.map +0 -1
- package/dist/driver/claude-code.d.ts +0 -104
- package/dist/driver/claude-code.d.ts.map +0 -1
- package/dist/driver/claude-code.js +0 -314
- package/dist/driver/claude-code.js.map +0 -1
- package/dist/driver/cli-session.d.ts +0 -57
- package/dist/driver/cli-session.d.ts.map +0 -1
- package/dist/driver/cli-session.js +0 -134
- package/dist/driver/cli-session.js.map +0 -1
- package/dist/driver/cloud.d.ts +0 -109
- package/dist/driver/cloud.d.ts.map +0 -1
- package/dist/driver/cloud.js +0 -232
- package/dist/driver/cloud.js.map +0 -1
- package/dist/driver/codex.d.ts +0 -99
- package/dist/driver/codex.d.ts.map +0 -1
- package/dist/driver/codex.js +0 -190
- package/dist/driver/codex.js.map +0 -1
- package/dist/driver/fake.d.ts +0 -54
- package/dist/driver/fake.d.ts.map +0 -1
- package/dist/driver/fake.js +0 -73
- package/dist/driver/fake.js.map +0 -1
- package/dist/driver/index.d.ts +0 -10
- package/dist/driver/index.d.ts.map +0 -1
- package/dist/driver/index.js +0 -14
- package/dist/driver/index.js.map +0 -1
- package/dist/driver/session-support.d.ts +0 -14
- package/dist/driver/session-support.d.ts.map +0 -1
- package/dist/driver/session-support.js +0 -37
- package/dist/driver/session-support.js.map +0 -1
- package/dist/driver/types.d.ts +0 -310
- package/dist/driver/types.d.ts.map +0 -1
- package/dist/driver/types.js +0 -5
- package/dist/driver/types.js.map +0 -1
- package/dist/driver-cli.d.ts +0 -61
- package/dist/driver-cli.d.ts.map +0 -1
- package/dist/driver-cli.js +0 -66
- package/dist/driver-cli.js.map +0 -1
- package/dist/fake-script.d.ts +0 -15
- package/dist/fake-script.d.ts.map +0 -1
- package/dist/fake-script.js +0 -58
- package/dist/fake-script.js.map +0 -1
- package/dist/framework-dir.d.ts +0 -11
- package/dist/framework-dir.d.ts.map +0 -1
- package/dist/framework-dir.js +0 -11
- package/dist/framework-dir.js.map +0 -1
- package/dist/framework-gitignore.d.ts +0 -12
- package/dist/framework-gitignore.d.ts.map +0 -1
- package/dist/framework-gitignore.js +0 -19
- package/dist/framework-gitignore.js.map +0 -1
- package/dist/gate-keepalive.d.ts +0 -47
- package/dist/gate-keepalive.d.ts.map +0 -1
- package/dist/gate-keepalive.js +0 -62
- package/dist/gate-keepalive.js.map +0 -1
- package/dist/git-exclude.d.ts +0 -11
- package/dist/git-exclude.d.ts.map +0 -1
- package/dist/git-exclude.js +0 -23
- package/dist/git-exclude.js.map +0 -1
- package/dist/handoff-level.d.ts +0 -56
- package/dist/handoff-level.d.ts.map +0 -1
- package/dist/handoff-level.js +0 -62
- package/dist/handoff-level.js.map +0 -1
- package/dist/host-exec.d.ts +0 -21
- package/dist/host-exec.d.ts.map +0 -1
- package/dist/host-exec.js +0 -30
- package/dist/host-exec.js.map +0 -1
- package/dist/layout.d.ts +0 -41
- package/dist/layout.d.ts.map +0 -1
- package/dist/layout.js +0 -69
- package/dist/layout.js.map +0 -1
- package/dist/logs.d.ts +0 -73
- package/dist/logs.d.ts.map +0 -1
- package/dist/logs.js +0 -218
- package/dist/logs.js.map +0 -1
- package/dist/maintenance.d.ts +0 -90
- package/dist/maintenance.d.ts.map +0 -1
- package/dist/maintenance.js +0 -141
- package/dist/maintenance.js.map +0 -1
- package/dist/merged-worktrees.d.ts +0 -74
- package/dist/merged-worktrees.d.ts.map +0 -1
- package/dist/merged-worktrees.js +0 -84
- package/dist/merged-worktrees.js.map +0 -1
- package/dist/module-types/src/dashboard/agent-tree.d.ts +0 -105
- package/dist/module-types/src/dashboard/file-diff.d.ts +0 -66
- package/dist/module-types/src/dashboard/file-read.d.ts +0 -41
- package/dist/module-types/src/dashboard/file-status.d.ts +0 -20
- package/dist/module-types/src/dashboard/scheduler-state.d.ts +0 -72
- package/dist/module-types/src/dashboard/subagent-settings.d.ts +0 -25
- package/dist/module-types/src/dashboard-rpc/subagents.d.ts +0 -11
- package/dist/module-types/src/framework-dir.d.ts +0 -10
- package/dist/module-types/src/framework-gitignore.d.ts +0 -11
- package/dist/module-types/src/subagent-settings.d.ts +0 -26
- package/dist/on-before-mergeable-prompt.d.ts +0 -32
- package/dist/on-before-mergeable-prompt.d.ts.map +0 -1
- package/dist/on-before-mergeable-prompt.js +0 -26
- package/dist/on-before-mergeable-prompt.js.map +0 -1
- package/dist/planned-quick-wins.d.ts +0 -102
- package/dist/planned-quick-wins.d.ts.map +0 -1
- package/dist/planned-quick-wins.js +0 -171
- package/dist/planned-quick-wins.js.map +0 -1
- package/dist/preflight.d.ts +0 -77
- package/dist/preflight.d.ts.map +0 -1
- package/dist/preflight.js +0 -91
- package/dist/preflight.js.map +0 -1
- package/dist/preset-catalog.d.ts +0 -98
- package/dist/preset-catalog.d.ts.map +0 -1
- package/dist/preset-catalog.js +0 -129
- package/dist/preset-catalog.js.map +0 -1
- package/dist/preset-prompt.d.ts +0 -81
- package/dist/preset-prompt.d.ts.map +0 -1
- package/dist/preset-prompt.js +0 -51
- package/dist/preset-prompt.js.map +0 -1
- package/dist/preset-registry.d.ts +0 -32
- package/dist/preset-registry.d.ts.map +0 -1
- package/dist/preset-registry.js +0 -35
- package/dist/preset-registry.js.map +0 -1
- package/dist/presets.d.ts +0 -20
- package/dist/presets.d.ts.map +0 -1
- package/dist/presets.js +0 -33
- package/dist/presets.js.map +0 -1
- package/dist/preview-runtime.d.ts +0 -33
- package/dist/preview-runtime.d.ts.map +0 -1
- package/dist/preview-runtime.js +0 -96
- package/dist/preview-runtime.js.map +0 -1
- package/dist/preview.d.ts +0 -78
- package/dist/preview.d.ts.map +0 -1
- package/dist/preview.js +0 -301
- package/dist/preview.js.map +0 -1
- package/dist/project-widgets.d.ts +0 -46
- package/dist/project-widgets.d.ts.map +0 -1
- package/dist/project-widgets.js +0 -93
- package/dist/project-widgets.js.map +0 -1
- package/dist/prompt-run.d.ts +0 -104
- package/dist/prompt-run.d.ts.map +0 -1
- package/dist/prompt-run.js +0 -112
- package/dist/prompt-run.js.map +0 -1
- package/dist/prompt-template.d.ts +0 -16
- package/dist/prompt-template.d.ts.map +0 -1
- package/dist/prompt-template.js +0 -56
- package/dist/prompt-template.js.map +0 -1
- package/dist/prompts.generated.d.ts +0 -53
- package/dist/prompts.generated.d.ts.map +0 -1
- package/dist/prompts.generated.js +0 -55
- package/dist/prompts.generated.js.map +0 -1
- package/dist/queue-promote.d.ts +0 -70
- package/dist/queue-promote.d.ts.map +0 -1
- package/dist/queue-promote.js +0 -118
- package/dist/queue-promote.js.map +0 -1
- package/dist/relay.d.ts +0 -84
- package/dist/relay.d.ts.map +0 -1
- package/dist/relay.js +0 -199
- package/dist/relay.js.map +0 -1
- package/dist/repos-directory.d.ts +0 -19
- package/dist/repos-directory.d.ts.map +0 -1
- package/dist/repos-directory.js +0 -23
- package/dist/repos-directory.js.map +0 -1
- package/dist/retired-project-settings.d.ts +0 -43
- package/dist/retired-project-settings.d.ts.map +0 -1
- package/dist/retired-project-settings.js +0 -125
- package/dist/retired-project-settings.js.map +0 -1
- package/dist/routine-locks.d.ts +0 -53
- package/dist/routine-locks.d.ts.map +0 -1
- package/dist/routine-locks.js +0 -125
- package/dist/routine-locks.js.map +0 -1
- package/dist/run-driver.d.ts +0 -26
- package/dist/run-driver.d.ts.map +0 -1
- package/dist/run-driver.js +0 -17
- package/dist/run-driver.js.map +0 -1
- package/dist/run-locks.d.ts +0 -3
- package/dist/run-locks.d.ts.map +0 -1
- package/dist/run-locks.js +0 -39
- package/dist/run-locks.js.map +0 -1
- package/dist/run-messages.d.ts +0 -64
- package/dist/run-messages.d.ts.map +0 -1
- package/dist/run-messages.js +0 -76
- package/dist/run-messages.js.map +0 -1
- package/dist/run-options.d.ts +0 -53
- package/dist/run-options.d.ts.map +0 -1
- package/dist/run-options.js +0 -110
- package/dist/run-options.js.map +0 -1
- package/dist/run-telemetry.d.ts +0 -115
- package/dist/run-telemetry.d.ts.map +0 -1
- package/dist/run-telemetry.js +0 -137
- package/dist/run-telemetry.js.map +0 -1
- package/dist/run-view.d.ts +0 -109
- package/dist/run-view.d.ts.map +0 -1
- package/dist/run-view.js +0 -118
- package/dist/run-view.js.map +0 -1
- package/dist/run.d.ts +0 -261
- package/dist/run.d.ts.map +0 -1
- package/dist/run.js +0 -420
- package/dist/run.js.map +0 -1
- package/dist/runtime-keys.d.ts +0 -17
- package/dist/runtime-keys.d.ts.map +0 -1
- package/dist/runtime-keys.js +0 -17
- package/dist/runtime-keys.js.map +0 -1
- package/dist/sandbox.d.ts +0 -27
- package/dist/sandbox.d.ts.map +0 -1
- package/dist/sandbox.js +0 -63
- package/dist/sandbox.js.map +0 -1
- package/dist/session-link.d.ts +0 -19
- package/dist/session-link.d.ts.map +0 -1
- package/dist/session-link.js +0 -26
- package/dist/session-link.js.map +0 -1
- package/dist/sessions.d.ts +0 -77
- package/dist/sessions.d.ts.map +0 -1
- package/dist/sessions.js +0 -146
- package/dist/sessions.js.map +0 -1
- package/dist/spike-locks.d.ts +0 -75
- package/dist/spike-locks.d.ts.map +0 -1
- package/dist/spike-locks.js +0 -208
- package/dist/spike-locks.js.map +0 -1
- package/dist/stale-branch.d.ts +0 -21
- package/dist/stale-branch.d.ts.map +0 -1
- package/dist/stale-branch.js +0 -32
- package/dist/stale-branch.js.map +0 -1
- package/dist/steps.d.ts +0 -9
- package/dist/steps.d.ts.map +0 -1
- package/dist/steps.js +0 -13
- package/dist/steps.js.map +0 -1
- package/dist/store/forge.d.ts +0 -110
- package/dist/store/forge.d.ts.map +0 -1
- package/dist/store/forge.js +0 -97
- package/dist/store/forge.js.map +0 -1
- package/dist/store/run-checkout.d.ts +0 -33
- package/dist/store/run-checkout.d.ts.map +0 -1
- package/dist/store/run-checkout.js +0 -59
- package/dist/store/run-checkout.js.map +0 -1
- package/dist/store/run-store.d.ts +0 -501
- package/dist/store/run-store.d.ts.map +0 -1
- package/dist/store/run-store.js +0 -806
- package/dist/store/run-store.js.map +0 -1
- package/dist/store/suspend.d.ts +0 -38
- package/dist/store/suspend.d.ts.map +0 -1
- package/dist/store/suspend.js +0 -45
- package/dist/store/suspend.js.map +0 -1
- package/dist/store/worktree-deps.d.ts +0 -30
- package/dist/store/worktree-deps.d.ts.map +0 -1
- package/dist/store/worktree-deps.js +0 -115
- package/dist/store/worktree-deps.js.map +0 -1
- package/dist/store/worktree.d.ts +0 -194
- package/dist/store/worktree.d.ts.map +0 -1
- package/dist/store/worktree.js +0 -331
- package/dist/store/worktree.js.map +0 -1
- package/dist/subagent-settings.d.ts +0 -27
- package/dist/subagent-settings.d.ts.map +0 -1
- package/dist/subagent-settings.js +0 -35
- package/dist/subagent-settings.js.map +0 -1
- package/dist/system-prompt-file.d.ts +0 -18
- package/dist/system-prompt-file.d.ts.map +0 -1
- package/dist/system-prompt-file.js +0 -28
- package/dist/system-prompt-file.js.map +0 -1
- package/dist/system-prompt.d.ts +0 -148
- package/dist/system-prompt.d.ts.map +0 -1
- package/dist/system-prompt.js +0 -170
- package/dist/system-prompt.js.map +0 -1
- package/dist/target-driver.d.ts +0 -28
- package/dist/target-driver.d.ts.map +0 -1
- package/dist/target-driver.js +0 -18
- package/dist/target-driver.js.map +0 -1
- package/dist/ticket-locks.d.ts +0 -61
- package/dist/ticket-locks.d.ts.map +0 -1
- package/dist/ticket-locks.js +0 -137
- package/dist/ticket-locks.js.map +0 -1
- package/dist/tickets-file.d.ts +0 -7
- package/dist/tickets-file.d.ts.map +0 -1
- package/dist/tickets-file.js +0 -21
- package/dist/tickets-file.js.map +0 -1
- package/dist/tickets.d.ts +0 -18
- package/dist/tickets.d.ts.map +0 -1
- package/dist/tickets.js +0 -23
- package/dist/tickets.js.map +0 -1
- package/dist/todo-loop.d.ts +0 -110
- package/dist/todo-loop.d.ts.map +0 -1
- package/dist/todo-loop.js +0 -175
- package/dist/todo-loop.js.map +0 -1
- package/dist/turn-gate.d.ts +0 -144
- package/dist/turn-gate.d.ts.map +0 -1
- package/dist/turn-gate.js +0 -217
- package/dist/turn-gate.js.map +0 -1
- package/dist/usage.d.ts +0 -32
- package/dist/usage.d.ts.map +0 -1
- package/dist/usage.js +0 -46
- package/dist/usage.js.map +0 -1
- package/dist/widget-types/dashboard/components/LinkActions.d.ts +0 -26
- package/dist/widget-types/dashboard/components/Markdown.d.ts +0 -4
- package/dist/widget-types/dashboard/components/StartAgentButton.d.ts +0 -39
- package/dist/widget-types/dashboard/components/ui/badge.d.ts +0 -2
- package/dist/widget-types/dashboard/components/ui/button.d.ts +0 -10
- package/dist/widget-types/dashboard/components/ui/card.d.ts +0 -5
- package/dist/widget-types/dashboard/components/ui/checkbox.d.ts +0 -7
- package/dist/widget-types/dashboard/components/ui/dropdown-menu.d.ts +0 -16
- package/dist/widget-types/dashboard/components/ui/input.d.ts +0 -2
- package/dist/widget-types/dashboard/components/ui/option-label.d.ts +0 -4
- package/dist/widget-types/dashboard/components/ui/popover.d.ts +0 -8
- package/dist/widget-types/dashboard/components/ui/scroll-area.d.ts +0 -10
- package/dist/widget-types/dashboard/components/ui/separator.d.ts +0 -3
- package/dist/widget-types/dashboard/components/ui/skeleton.d.ts +0 -2
- package/dist/widget-types/dashboard/components/ui/slider.d.ts +0 -9
- package/dist/widget-types/dashboard/components/ui/tooltip.d.ts +0 -11
- package/dist/widget-types/dashboard/lib/draft-handoff.d.ts +0 -15
- package/dist/widget-types/dashboard/lib/format-date.d.ts +0 -51
- package/dist/widget-types/dashboard/lib/host-services.d.ts +0 -12
- package/dist/widget-types/dashboard/lib/route.d.ts +0 -24
- package/dist/widget-types/dashboard/lib/rpc.d.ts +0 -31
- package/dist/widget-types/dashboard/lib/use-action.d.ts +0 -25
- package/dist/widget-types/dashboard/lib/use-async.d.ts +0 -39
- package/dist/widget-types/dashboard/lib/use-widgets.d.ts +0 -42
- package/dist/widget-types/dashboard/lib/utils.d.ts +0 -3
- package/dist/widget-types/dashboard/rpc/widgets.d.ts +0 -4
- package/dist/widget-types/dashboard/widget/index.d.ts +0 -207
- package/dist/widget-types/src/agent-id.d.ts +0 -12
- package/dist/widget-types/src/agent-locks.d.ts +0 -2
- package/dist/widget-types/src/agent-view.d.ts +0 -38
- package/dist/widget-types/src/bridge-browser.d.ts +0 -216
- package/dist/widget-types/src/browser-stream.d.ts +0 -19
- package/dist/widget-types/src/browser.d.ts +0 -15
- package/dist/widget-types/src/cli-exec.d.ts +0 -35
- package/dist/widget-types/src/cloud-run-state.d.ts +0 -26
- package/dist/widget-types/src/dashboard/activity.d.ts +0 -40
- package/dist/widget-types/src/dashboard/agent-handoff.d.ts +0 -211
- package/dist/widget-types/src/dashboard/agent-tree.d.ts +0 -105
- package/dist/widget-types/src/dashboard/bridge-endpoints.d.ts +0 -157
- package/dist/widget-types/src/dashboard/bridge-question.d.ts +0 -32
- package/dist/widget-types/src/dashboard/bridge-store.d.ts +0 -178
- package/dist/widget-types/src/dashboard/cache.d.ts +0 -46
- package/dist/widget-types/src/dashboard/content-type.d.ts +0 -2
- package/dist/widget-types/src/dashboard/dashboard.d.ts +0 -37
- package/dist/widget-types/src/dashboard/discord-webhook.d.ts +0 -16
- package/dist/widget-types/src/dashboard/docs.d.ts +0 -38
- package/dist/widget-types/src/dashboard/file-diff.d.ts +0 -66
- package/dist/widget-types/src/dashboard/file-read.d.ts +0 -41
- package/dist/widget-types/src/dashboard/file-status.d.ts +0 -20
- package/dist/widget-types/src/dashboard/gh.d.ts +0 -130
- package/dist/widget-types/src/dashboard/git-status.d.ts +0 -32
- package/dist/widget-types/src/dashboard/github.d.ts +0 -10
- package/dist/widget-types/src/dashboard/http.d.ts +0 -28
- package/dist/widget-types/src/dashboard/interventions.d.ts +0 -66
- package/dist/widget-types/src/dashboard/keys.d.ts +0 -30
- package/dist/widget-types/src/dashboard/models.d.ts +0 -24
- package/dist/widget-types/src/dashboard/open-in-app.d.ts +0 -42
- package/dist/widget-types/src/dashboard/open-questions.d.ts +0 -52
- package/dist/widget-types/src/dashboard/overview.d.ts +0 -77
- package/dist/widget-types/src/dashboard/projects.d.ts +0 -89
- package/dist/widget-types/src/dashboard/pull-requests.d.ts +0 -126
- package/dist/widget-types/src/dashboard/queue.d.ts +0 -16
- package/dist/widget-types/src/dashboard/quota.d.ts +0 -59
- package/dist/widget-types/src/dashboard/remote-run.d.ts +0 -94
- package/dist/widget-types/src/dashboard/rpc-serve.d.ts +0 -102
- package/dist/widget-types/src/dashboard/run-inbox.d.ts +0 -30
- package/dist/widget-types/src/dashboard/scheduler-state.d.ts +0 -64
- package/dist/widget-types/src/dashboard/tickets.d.ts +0 -28
- package/dist/widget-types/src/dashboard/types.d.ts +0 -99
- package/dist/widget-types/src/dashboard/widget-serve.d.ts +0 -14
- package/dist/widget-types/src/dashboard-rpc/context.d.ts +0 -53
- package/dist/widget-types/src/dashboard-rpc/control.d.ts +0 -108
- package/dist/widget-types/src/dashboard-rpc/devices.d.ts +0 -8
- package/dist/widget-types/src/dashboard-rpc/events-tail.d.ts +0 -53
- package/dist/widget-types/src/dashboard-rpc/events.d.ts +0 -29
- package/dist/widget-types/src/dashboard-rpc/index.d.ts +0 -28
- package/dist/widget-types/src/dashboard-rpc/models.d.ts +0 -3
- package/dist/widget-types/src/dashboard-rpc/preferences.d.ts +0 -40
- package/dist/widget-types/src/dashboard-rpc/projects.d.ts +0 -54
- package/dist/widget-types/src/dashboard-rpc/quota.d.ts +0 -26
- package/dist/widget-types/src/dashboard-rpc/reads.d.ts +0 -227
- package/dist/widget-types/src/dashboard-rpc/relay-agent.d.ts +0 -8
- package/dist/widget-types/src/dashboard-rpc/stream-forward.d.ts +0 -16
- package/dist/widget-types/src/dashboard-rpc/widgets.d.ts +0 -32
- package/dist/widget-types/src/discord-credentials.d.ts +0 -79
- package/dist/widget-types/src/driver-names.d.ts +0 -21
- package/dist/widget-types/src/error-message.d.ts +0 -7
- package/dist/widget-types/src/event-stream.d.ts +0 -32
- package/dist/widget-types/src/events.d.ts +0 -235
- package/dist/widget-types/src/framework-dir.d.ts +0 -10
- package/dist/widget-types/src/framework-gitignore.d.ts +0 -11
- package/dist/widget-types/src/index.d.ts +0 -42
- package/dist/widget-types/src/jsonl-tail.d.ts +0 -54
- package/dist/widget-types/src/loopback-host.d.ts +0 -19
- package/dist/widget-types/src/node-fs.d.ts +0 -32
- package/dist/widget-types/src/open-choices.d.ts +0 -14
- package/dist/widget-types/src/pick-directory.d.ts +0 -29
- package/dist/widget-types/src/preference-defaults.d.ts +0 -53
- package/dist/widget-types/src/project-commands.d.ts +0 -23
- package/dist/widget-types/src/project-errors.d.ts +0 -43
- package/dist/widget-types/src/project-hooks.d.ts +0 -133
- package/dist/widget-types/src/project-presets.d.ts +0 -29
- package/dist/widget-types/src/project-widgets.d.ts +0 -45
- package/dist/widget-types/src/project.d.ts +0 -28
- package/dist/widget-types/src/quota-boundary.d.ts +0 -115
- package/dist/widget-types/src/quota-poller.d.ts +0 -82
- package/dist/widget-types/src/registry.d.ts +0 -210
- package/dist/widget-types/src/store/agent-checkout.d.ts +0 -46
- package/dist/widget-types/src/store/agent-store.d.ts +0 -237
- package/dist/widget-types/src/store/branches.d.ts +0 -133
- package/dist/widget-types/src/store/forge.d.ts +0 -109
- package/dist/widget-types/src/store/git-host.d.ts +0 -111
- package/dist/widget-types/src/store/index.d.ts +0 -9
- package/dist/widget-types/src/store/provided.d.ts +0 -16
- package/dist/widget-types/src/store/queue.d.ts +0 -45
- package/dist/widget-types/src/store/run-record.d.ts +0 -21
- package/dist/widget-types/src/store/runs.d.ts +0 -101
- package/dist/widget-types/src/store/tickets.d.ts +0 -72
- package/dist/widget-types/src/tickets.d.ts +0 -17
- package/dist/widget-types/src/worktrees.d.ts +0 -89
- package/dist/widget.css +0 -50
package/dist/queue-promote.d.ts
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { GitRunner } from './project.js';
|
|
2
|
-
/**
|
|
3
|
-
* Promoting the agent queue out of a finished agent's branch and into the project checkout (#852).
|
|
4
|
-
*
|
|
5
|
-
* Runs happen in their own git worktree (#736), which is right for code and wrong for the queue:
|
|
6
|
-
* `TODO_AGENTS.md` is shared mutable state, and a worktree forks it. So a quick-wins agent (#773)
|
|
7
|
-
* wrote a perfectly good queue onto a branch nobody reads, auto PM kept seeing an empty checkout,
|
|
8
|
-
* and it re-derived the same entries every cooldown, forever, spending real quota each time.
|
|
9
|
-
*
|
|
10
|
-
* Rom settled the destination on #624: the queue is a durable global `TODO_AGENTS.md` the session
|
|
11
|
-
* writes directly, unlike a *proposal* (a ticket), which is a PR for a human to accept. So the
|
|
12
|
-
* queue belongs in the checkout, and nothing should have to be merged by hand for the loop to turn.
|
|
13
|
-
*
|
|
14
|
-
* The daemon does this, not the agent. The agent stays sandboxed in its worktree with no write
|
|
15
|
-
* access to the project checkout; the daemon copies one known file across, and commits only that
|
|
16
|
-
* pathspec. Narrow enough to audit in a single log line.
|
|
17
|
-
*
|
|
18
|
-
* Conservative everywhere it is not certain: anything unexpected skips with a reason and leaves the
|
|
19
|
-
* checkout untouched. A skipped promotion costs one idle cycle; a wrong one touches a repo a human
|
|
20
|
-
* is working in.
|
|
21
|
-
*/
|
|
22
|
-
/** Why a promotion did not happen, or that it did. */
|
|
23
|
-
export type QueuePromotion = {
|
|
24
|
-
promoted: true;
|
|
25
|
-
branch: string;
|
|
26
|
-
} | {
|
|
27
|
-
promoted: false;
|
|
28
|
-
reason: string;
|
|
29
|
-
/**
|
|
30
|
-
* Worth trying again next tick: the queue file is mid-edit in the checkout, and the human's
|
|
31
|
-
* work outranks an unattended tidy-up only until they commit it. Every other skip is final
|
|
32
|
-
* for this agent. The callee owns this call — the daemon used to decide it by string-matching
|
|
33
|
-
* the prose `reason`, where a one-word copyedit would have silently turned "retry next
|
|
34
|
-
* tick" into "settled forever".
|
|
35
|
-
*/
|
|
36
|
-
retry?: true;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Copy `TODO_AGENTS.md` from a finished agent's branch into the project checkout and commit it.
|
|
40
|
-
*
|
|
41
|
-
* Skips, rather than forcing, when:
|
|
42
|
-
* - the agent recorded no branch (nothing to read from)
|
|
43
|
-
* - the branch has no queue file, or it matches the checkout already (nothing to do)
|
|
44
|
-
* - the checkout has uncommitted changes to the queue file — a human is mid-edit, and their work
|
|
45
|
-
* outranks an unattended tidy-up
|
|
46
|
-
*
|
|
47
|
-
* Never throws: this runs on a background tick with nothing to catch it.
|
|
48
|
-
*/
|
|
49
|
-
export declare function promoteQueue(projectCwd: string, agent: {
|
|
50
|
-
id: string;
|
|
51
|
-
branch?: string | undefined;
|
|
52
|
-
entry?: string | undefined;
|
|
53
|
-
}, git?: GitRunner, write?: (path: string, content: string) => Promise<void>): Promise<QueuePromotion>;
|
|
54
|
-
/**
|
|
55
|
-
* Land what a drain agent pinned to one entry actually did (#1204): retire that entry, and keep any
|
|
56
|
-
* follow-ups it queued.
|
|
57
|
-
*
|
|
58
|
-
* Additive by construction, which is what makes it safe to run concurrently: it only ever checks a
|
|
59
|
-
* box or appends a line. It never unchecks, never removes, and never reorders, so two drains
|
|
60
|
-
* landing in either order compose, and the worst a wrong guess can do is leave a duplicate line
|
|
61
|
-
* for a human to delete rather than silently send an agent to redo finished work.
|
|
62
|
-
*
|
|
63
|
-
* A follow-up is an entry the agent's branch has that `atBase` did not: written during the agent. The
|
|
64
|
-
* fork point is what tells that from an entry somebody *removed* meanwhile, which looks identical
|
|
65
|
-
* from the branch alone and which `todo_format.md` makes the ordinary way to retire an entry. With
|
|
66
|
-
* no fork point to compare against, nothing is added -- resurrecting struck-off work is worse than
|
|
67
|
-
* leaving a follow-up on the branch, and the check-off still lands either way.
|
|
68
|
-
*/
|
|
69
|
-
export declare function landPinnedEntry(inCheckout: string, fromBranch: string, entry: string, atBase: string | undefined): string;
|
|
70
|
-
//# sourceMappingURL=queue-promote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue-promote.d.ts","sourceRoot":"","sources":["../src/queue-promote.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAK7C;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,sDAAsD;AACtD,MAAM,MAAM,cAAc,GACtB;IAAE,QAAQ,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC;IACE,QAAQ,EAAE,KAAK,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;IACd;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,IAAI,CAAA;CACb,CAAA;AAOL;;;;;;;;;;GAUG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAC9E,GAAG,GAAE,SAA2B,EAChC,KAAK,GAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAuD,GAC5G,OAAO,CAAC,cAAc,CAAC,CA+CzB;AAeD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,SAAS,GACzB,MAAM,CAmBR"}
|
package/dist/queue-promote.js
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { writeFile } from 'node:fs/promises';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { nodeGitRunner } from './project.js';
|
|
4
|
-
import { FLAT_TODO_FILE } from './tickets.js';
|
|
5
|
-
import { errorMessage } from './error-message.js';
|
|
6
|
-
/** The commit message a promotion writes. Names the agent so the history says where it came from. */
|
|
7
|
-
function promotionMessage(agentId) {
|
|
8
|
-
return `[The Framework] queue updates from ${agentId}`;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Copy `TODO_AGENTS.md` from a finished agent's branch into the project checkout and commit it.
|
|
12
|
-
*
|
|
13
|
-
* Skips, rather than forcing, when:
|
|
14
|
-
* - the agent recorded no branch (nothing to read from)
|
|
15
|
-
* - the branch has no queue file, or it matches the checkout already (nothing to do)
|
|
16
|
-
* - the checkout has uncommitted changes to the queue file — a human is mid-edit, and their work
|
|
17
|
-
* outranks an unattended tidy-up
|
|
18
|
-
*
|
|
19
|
-
* Never throws: this runs on a background tick with nothing to catch it.
|
|
20
|
-
*/
|
|
21
|
-
export async function promoteQueue(projectCwd, agent, git = nodeGitRunner(), write = (path, content) => writeFile(path, content, 'utf8')) {
|
|
22
|
-
const branch = agent.branch;
|
|
23
|
-
if (!branch)
|
|
24
|
-
return { promoted: false, reason: 'the run recorded no branch' };
|
|
25
|
-
try {
|
|
26
|
-
// The queue as the agent left it. An agent that never touched it has no such path on the branch.
|
|
27
|
-
const fromBranch = await git(['show', `${branch}:${FLAT_TODO_FILE}`], projectCwd).catch(() => undefined);
|
|
28
|
-
if (fromBranch === undefined)
|
|
29
|
-
return { promoted: false, reason: 'the run left no queue file on its branch' };
|
|
30
|
-
const inCheckout = await git(['show', `HEAD:${FLAT_TODO_FILE}`], projectCwd).catch(() => '');
|
|
31
|
-
if (fromBranch === inCheckout)
|
|
32
|
-
return { promoted: false, reason: 'the queue is already up to date' };
|
|
33
|
-
// A dirty queue file means someone is editing it by hand right now. Leave it alone; the next
|
|
34
|
-
// tick will try again, and until then auto PM simply does not start more work.
|
|
35
|
-
const dirty = (await git(['status', '--porcelain', '--', FLAT_TODO_FILE], projectCwd)).trim();
|
|
36
|
-
if (dirty)
|
|
37
|
-
return { promoted: false, reason: 'the checkout has uncommitted queue changes', retry: true };
|
|
38
|
-
// An agent pinned to one entry (#1204) lands that entry, not its whole file: with several drains
|
|
39
|
-
// in flight the wholesale copy below would carry each agent's stale view of every *other* entry,
|
|
40
|
-
// and the last promotion of the tick would un-check whatever the earlier ones had just retired.
|
|
41
|
-
if (agent.entry !== undefined) {
|
|
42
|
-
// The queue where the agent forked, so an entry it *added* can be told from one somebody
|
|
43
|
-
// *removed* while it worked. Both look alike from the branch alone — present there, absent
|
|
44
|
-
// here — and `todo_format.md` makes removal the way to retire an entry, so guessing wrong
|
|
45
|
-
// resurrects work a human deliberately struck off. No merge base (a rewritten history, say)
|
|
46
|
-
// means no additions land: the check-off is the part that must not be lost.
|
|
47
|
-
const mergeBase = (await git(['merge-base', branch, 'HEAD'], projectCwd).catch(() => '')).trim();
|
|
48
|
-
const atBase = mergeBase
|
|
49
|
-
? await git(['show', `${mergeBase}:${FLAT_TODO_FILE}`], projectCwd).catch(() => undefined)
|
|
50
|
-
: undefined;
|
|
51
|
-
const landed = landPinnedEntry(inCheckout, fromBranch, agent.entry, atBase);
|
|
52
|
-
if (landed === inCheckout)
|
|
53
|
-
return { promoted: false, reason: 'the run left nothing to land on the queue' };
|
|
54
|
-
await write(join(projectCwd, FLAT_TODO_FILE), landed);
|
|
55
|
-
await git(['add', '--', FLAT_TODO_FILE], projectCwd);
|
|
56
|
-
await git(['commit', '-m', promotionMessage(agent.id), '--', FLAT_TODO_FILE], projectCwd);
|
|
57
|
-
return { promoted: true, branch };
|
|
58
|
-
}
|
|
59
|
-
// `checkout <branch> -- <path>` writes the file and stages it in one step, touching nothing
|
|
60
|
-
// else in the tree. The commit is pathspec-scoped for the same reason: whatever else is
|
|
61
|
-
// staged in the user's checkout is theirs and must not ride along.
|
|
62
|
-
await git(['checkout', branch, '--', FLAT_TODO_FILE], projectCwd);
|
|
63
|
-
await git(['commit', '-m', promotionMessage(agent.id), '--', FLAT_TODO_FILE], projectCwd);
|
|
64
|
-
return { promoted: true, branch };
|
|
65
|
-
}
|
|
66
|
-
catch (err) {
|
|
67
|
-
return { promoted: false, reason: errorMessage(err) };
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
/** One markdown list item, by the grammar `parseTodoEntries` reads. */
|
|
71
|
-
const ENTRY_LINE = /^(\s*(?:[-*]|\d+\.)\s+)(?:\[([ xX])\]\s*)?(.*)$/;
|
|
72
|
-
/** Every entry the document names, checked or not, so a re-add can tell "new" from "already there". */
|
|
73
|
-
function entryTexts(md) {
|
|
74
|
-
const texts = new Set();
|
|
75
|
-
for (const line of md.split('\n')) {
|
|
76
|
-
const text = ENTRY_LINE.exec(line)?.[3]?.trim();
|
|
77
|
-
if (text)
|
|
78
|
-
texts.add(text);
|
|
79
|
-
}
|
|
80
|
-
return texts;
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Land what a drain agent pinned to one entry actually did (#1204): retire that entry, and keep any
|
|
84
|
-
* follow-ups it queued.
|
|
85
|
-
*
|
|
86
|
-
* Additive by construction, which is what makes it safe to run concurrently: it only ever checks a
|
|
87
|
-
* box or appends a line. It never unchecks, never removes, and never reorders, so two drains
|
|
88
|
-
* landing in either order compose, and the worst a wrong guess can do is leave a duplicate line
|
|
89
|
-
* for a human to delete rather than silently send an agent to redo finished work.
|
|
90
|
-
*
|
|
91
|
-
* A follow-up is an entry the agent's branch has that `atBase` did not: written during the agent. The
|
|
92
|
-
* fork point is what tells that from an entry somebody *removed* meanwhile, which looks identical
|
|
93
|
-
* from the branch alone and which `todo_format.md` makes the ordinary way to retire an entry. With
|
|
94
|
-
* no fork point to compare against, nothing is added -- resurrecting struck-off work is worse than
|
|
95
|
-
* leaving a follow-up on the branch, and the check-off still lands either way.
|
|
96
|
-
*/
|
|
97
|
-
export function landPinnedEntry(inCheckout, fromBranch, entry, atBase) {
|
|
98
|
-
const lines = inCheckout.split('\n').map(line => {
|
|
99
|
-
const item = ENTRY_LINE.exec(line);
|
|
100
|
-
// Retire any *open* entry that matches — an empty `[ ]` box or a no-checkbox bullet alike,
|
|
101
|
-
// the same "open" grammar `parseTodoEntries` uses (#1164/#1297).
|
|
102
|
-
// Skipping the no-checkbox form left it open, so the sweep re-drained it after the PR closed.
|
|
103
|
-
if (!item || item[3]?.trim() !== entry || item[2] === 'x' || item[2] === 'X')
|
|
104
|
-
return line;
|
|
105
|
-
return `${item[1]}[x] ${item[3].trim()}`;
|
|
106
|
-
});
|
|
107
|
-
if (atBase === undefined)
|
|
108
|
-
return lines.join('\n');
|
|
109
|
-
const known = entryTexts(inCheckout);
|
|
110
|
-
const base = entryTexts(atBase);
|
|
111
|
-
const added = [...entryTexts(fromBranch)].filter(text => !known.has(text) && !base.has(text));
|
|
112
|
-
if (!added.length)
|
|
113
|
-
return lines.join('\n');
|
|
114
|
-
const body = lines.join('\n');
|
|
115
|
-
const separator = body === '' || body.endsWith('\n') ? '' : '\n';
|
|
116
|
-
return `${body}${separator}${added.map(text => `- [ ] ${text}`).join('\n')}\n`;
|
|
117
|
-
}
|
|
118
|
-
//# sourceMappingURL=queue-promote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"queue-promote.js","sourceRoot":"","sources":["../src/queue-promote.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA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E,OAAO,GAAG,IAAI,GAAG,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAA;AAChF,CAAC"}
|
package/dist/relay.d.ts
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import type { FrameworkEvent } from './events.js';
|
|
2
|
-
/**
|
|
3
|
-
* The hosted run relay (#230): the first slice toward shared team sessions. It
|
|
4
|
-
* ingests a run's {@link FrameworkEvent} stream over HTTP and re-serves the same new
|
|
5
|
-
* dashboard (#405) to N remote browsers, keyed by run id. So two people on different
|
|
6
|
-
* machines open one run URL and both watch it live.
|
|
7
|
-
*
|
|
8
|
-
* It serves the prerendered dashboard SPA and streams events over Telefunc, exactly
|
|
9
|
-
* like the daemon — except the run comes from the relay's own in-memory stream (fed by
|
|
10
|
-
* publishers over HTTP), not a file. The dashboard opens in a read-only, single-run
|
|
11
|
-
* "watch" mode (no Projects/Runs/Docs rails, no Stop/Start), and only the live event
|
|
12
|
-
* stream is exposed: an empty projects provider (#426) makes the file/registry-backed
|
|
13
|
-
* RPCs return nothing on this public host.
|
|
14
|
-
*
|
|
15
|
-
* Deliberately unauthenticated: anyone with a run's URL can watch it. Accounts, teams,
|
|
16
|
-
* RBAC, and authorized steering layer on later (via vike-auth/-rbac). The relay only
|
|
17
|
-
* projects the stream — it never runs an agent.
|
|
18
|
-
*
|
|
19
|
-
* Endpoints:
|
|
20
|
-
* - `POST /r/:id/publish` — ingest one event (JSON object) or a batch (JSON array)
|
|
21
|
-
* - `GET /?run=:id` — the dashboard SPA in read-only watch mode for that run
|
|
22
|
-
* - `GET /r/:id[/]` — redirects to `/?run=:id` (the viewer URL)
|
|
23
|
-
* - `POST /_telefunc` — the dashboard's Telefunc surface (only `onEvents` is live)
|
|
24
|
-
* - `GET /assets/…` — the SPA's static assets
|
|
25
|
-
* - `GET /healthz` — liveness probe for the host
|
|
26
|
-
*/
|
|
27
|
-
export interface RelayOptions {
|
|
28
|
-
/** Port to bind. Default `4488`; pass `0` for an ephemeral port. */
|
|
29
|
-
port?: number;
|
|
30
|
-
/**
|
|
31
|
-
* Host to bind. Default `0.0.0.0` — the relay exists to be reached from other
|
|
32
|
-
* machines. Bind `127.0.0.1` to keep it local (e.g. tests).
|
|
33
|
-
*/
|
|
34
|
-
host?: string;
|
|
35
|
-
/** Page title. Default `"The Framework"`. */
|
|
36
|
-
title?: string;
|
|
37
|
-
/** Max bytes accepted per publish request body. Default 256 KiB. */
|
|
38
|
-
maxBodyBytes?: number;
|
|
39
|
-
/**
|
|
40
|
-
* Max concurrent runs kept in memory. The relay is unauthenticated, so any
|
|
41
|
-
* request to `/r/<id>/…` would otherwise create a run that never frees — an
|
|
42
|
-
* anonymous caller could exhaust memory. On overflow the least-recently-touched
|
|
43
|
-
* run is evicted (its stream closed, its viewers dropped). Default 200.
|
|
44
|
-
*/
|
|
45
|
-
maxRuns?: number;
|
|
46
|
-
/**
|
|
47
|
-
* The prerendered dashboard bundle to serve (the SPA `index.html` + `assets/**`).
|
|
48
|
-
* Defaults to {@link resolveDashboardBundle}; pass a directory to override (tests).
|
|
49
|
-
* When no bundle is found, the SPA routes 404 while publish/telefunc/healthz still work.
|
|
50
|
-
*/
|
|
51
|
-
clientBundleDir?: string;
|
|
52
|
-
}
|
|
53
|
-
/** A running relay. Ingest events programmatically or over HTTP; browsers watch by run id. */
|
|
54
|
-
export interface Relay {
|
|
55
|
-
/** The base URL of the relay (e.g. `http://0.0.0.0:4488`). */
|
|
56
|
-
readonly url: string;
|
|
57
|
-
/** The viewer URL for a run id (`<url>/?run=<id>`). */
|
|
58
|
-
viewerUrl(runId: string): string;
|
|
59
|
-
/** Push one event into a run's stream, creating the run on first use. */
|
|
60
|
-
ingest(runId: string, event: FrameworkEvent): void;
|
|
61
|
-
/** The run ids seen so far. */
|
|
62
|
-
runIds(): string[];
|
|
63
|
-
/** Close every stream and stop the server. Idempotent. */
|
|
64
|
-
close(): Promise<void>;
|
|
65
|
-
}
|
|
66
|
-
/** Start the hosted run relay. See {@link Relay}. */
|
|
67
|
-
export declare function startRelay(opts?: RelayOptions): Promise<Relay>;
|
|
68
|
-
/** A publisher that forwards a run's events to a relay. Best-effort and ordered. */
|
|
69
|
-
export interface RelayPublisher {
|
|
70
|
-
/** The viewer URL to share (`<base>/?run=<id>`). */
|
|
71
|
-
readonly url: string;
|
|
72
|
-
/** Queue one event to POST to the relay (serialized, so the relay replays in order). */
|
|
73
|
-
publish(event: FrameworkEvent): void;
|
|
74
|
-
/** Resolve once every queued POST has been sent (or failed), for a clean shutdown. */
|
|
75
|
-
flush(): Promise<void>;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Forward a live run's {@link FrameworkEvent}s to a {@link startRelay} relay so
|
|
79
|
-
* remote browsers can watch it. POSTs are serialized (chained) so the relay's
|
|
80
|
-
* replay order matches the run, and best-effort: a failed POST is reported via
|
|
81
|
-
* `onError` but never interrupts the run.
|
|
82
|
-
*/
|
|
83
|
-
export declare function relayPublisher(base: string, runId: string, onError?: (err: unknown) => void, timeoutMs?: number): RelayPublisher;
|
|
84
|
-
//# sourceMappingURL=relay.d.ts.map
|
package/dist/relay.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"relay.d.ts","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAOjD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED,8FAA8F;AAC9F,MAAM,WAAW,KAAK;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,uDAAuD;IACvD,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IAChC,yEAAyE;IACzE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;IAClD,+BAA+B;IAC/B,MAAM,IAAI,MAAM,EAAE,CAAA;IAClB,0DAA0D;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAQD,qDAAqD;AACrD,wBAAsB,UAAU,CAAC,IAAI,GAAE,YAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,CAmDxE;AA0GD,oFAAoF;AACpF,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,wFAAwF;IACxF,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAA;IACpC,sFAAsF;IACtF,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;CACvB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,EAChC,SAAS,SAAS,GACjB,cAAc,CA8BhB"}
|
package/dist/relay.js
DELETED
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import { createServer } from 'node:http';
|
|
2
|
-
import { EventStream } from '@gemstack/ai-autopilot';
|
|
3
|
-
import { resolveDashboardBundle } from './dashboard/bundle.js';
|
|
4
|
-
import { serveClientBundle } from './dashboard/static.js';
|
|
5
|
-
import { makeTelefuncMount } from './dashboard/telefunc-serve.js';
|
|
6
|
-
import { requestPathname } from './request-path.js';
|
|
7
|
-
import { emptyProjectsProvider } from './dashboard/projects.js';
|
|
8
|
-
const RUN_PATH = /^\/r\/([^/]+)(\/[^?]*)?/;
|
|
9
|
-
/** Start the hosted run relay. See {@link Relay}. */
|
|
10
|
-
export async function startRelay(opts = {}) {
|
|
11
|
-
const host = opts.host ?? '0.0.0.0';
|
|
12
|
-
const port = opts.port ?? 4488;
|
|
13
|
-
const maxBody = opts.maxBodyBytes ?? 256 * 1024;
|
|
14
|
-
const maxRuns = opts.maxRuns ?? 200;
|
|
15
|
-
const clientBundleDir = opts.clientBundleDir ?? (await resolveDashboardBundle());
|
|
16
|
-
// Insertion-ordered as an LRU: touching a run re-inserts it at the end, so the
|
|
17
|
-
// first entry is always the least-recently-used and the eviction victim.
|
|
18
|
-
const runs = new Map();
|
|
19
|
-
const run = (id) => {
|
|
20
|
-
const existing = runs.get(id);
|
|
21
|
-
if (existing) {
|
|
22
|
-
runs.delete(id);
|
|
23
|
-
runs.set(id, existing); // touch: move to most-recently-used
|
|
24
|
-
return existing;
|
|
25
|
-
}
|
|
26
|
-
// Bound memory: evict the least-recently-used run before creating a new one.
|
|
27
|
-
while (runs.size >= maxRuns) {
|
|
28
|
-
const oldest = runs.keys().next().value;
|
|
29
|
-
if (oldest === undefined)
|
|
30
|
-
break;
|
|
31
|
-
runs.get(oldest).stream.close(); // closing drains every viewer's Channel follower
|
|
32
|
-
runs.delete(oldest);
|
|
33
|
-
}
|
|
34
|
-
const r = { stream: new EventStream() };
|
|
35
|
-
runs.set(id, r);
|
|
36
|
-
return r;
|
|
37
|
-
};
|
|
38
|
-
// The dashboard's Telefunc surface, mounted like the daemon's — but `onEvents` streams
|
|
39
|
-
// the relay's own in-memory run (create-on-access, so a viewer can connect before the
|
|
40
|
-
// publisher), and an empty projects provider neutralizes every file/registry RPC on
|
|
41
|
-
// this public host. No `startRun`, so a start is never enabled here.
|
|
42
|
-
const telefunc = makeTelefuncMount({ projects: emptyProjectsProvider(), eventsSource: id => run(id).stream });
|
|
43
|
-
const server = createServer((req, res) => handle(req, res, { run, maxBody, clientBundleDir, telefunc }));
|
|
44
|
-
return new Promise((resolvePromise, rejectPromise) => {
|
|
45
|
-
server.once('error', rejectPromise);
|
|
46
|
-
server.listen(port, host, () => {
|
|
47
|
-
server.removeListener('error', rejectPromise);
|
|
48
|
-
const address = server.address();
|
|
49
|
-
const url = `http://${host}:${address.port}`;
|
|
50
|
-
resolvePromise({
|
|
51
|
-
url,
|
|
52
|
-
viewerUrl: id => `${url}/?run=${encodeURIComponent(id)}`,
|
|
53
|
-
ingest: (id, event) => run(id).stream.push(event),
|
|
54
|
-
runIds: () => [...runs.keys()],
|
|
55
|
-
close: () => closeRelay(server, runs),
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function handle(req, res, ctx) {
|
|
61
|
-
// A public server: a request no URL parser accepts must get a 400, not crash the relay (#938).
|
|
62
|
-
const pathname = requestPathname(req);
|
|
63
|
-
if (pathname === undefined) {
|
|
64
|
-
res.writeHead(400, { 'content-type': 'text/plain' });
|
|
65
|
-
res.end('bad request');
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
if (pathname === '/healthz') {
|
|
69
|
-
res.writeHead(200, { 'content-type': 'text/plain' });
|
|
70
|
-
res.end('ok');
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
// The dashboard's live event stream (and the rest of its RPC surface, neutralized).
|
|
74
|
-
if (pathname === '/_telefunc' || pathname.startsWith('/_telefunc/')) {
|
|
75
|
-
void ctx.telefunc(req, res);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
const m = RUN_PATH.exec(pathname);
|
|
79
|
-
if (m) {
|
|
80
|
-
// A malformed escape in the id segment (`/r/%zz/`) must not throw out of the handler (#938).
|
|
81
|
-
let id;
|
|
82
|
-
try {
|
|
83
|
-
id = decodeURIComponent(m[1]);
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
res.writeHead(400, { 'content-type': 'text/plain' });
|
|
87
|
-
res.end('bad request');
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
const rest = m[2] ?? '';
|
|
91
|
-
// Ingest is the one thing still under /r/:id/ — the publisher POSTs a run's events here.
|
|
92
|
-
if (rest === '/publish') {
|
|
93
|
-
if (req.method !== 'POST') {
|
|
94
|
-
res.writeHead(405, { 'content-type': 'text/plain', allow: 'POST' });
|
|
95
|
-
res.end('method not allowed');
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
ingestBody(req, res, ctx.run(id), ctx.maxBody);
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
// Any viewer GET of a run moved to the SPA at `/?run=:id`; redirect old links there.
|
|
102
|
-
res.writeHead(302, { location: `/?run=${encodeURIComponent(id)}` });
|
|
103
|
-
res.end();
|
|
104
|
-
return;
|
|
105
|
-
}
|
|
106
|
-
// Everything else is the dashboard SPA (`/`, `/?run=:id`, `/assets/**`, SPA fallback).
|
|
107
|
-
if (ctx.clientBundleDir) {
|
|
108
|
-
void serveClientBundle(req, res, ctx.clientBundleDir);
|
|
109
|
-
return;
|
|
110
|
-
}
|
|
111
|
-
res.writeHead(404, { 'content-type': 'text/plain' });
|
|
112
|
-
res.end('dashboard bundle not built');
|
|
113
|
-
}
|
|
114
|
-
/** Read a JSON body (one event or an array) and push each event into the run's stream. */
|
|
115
|
-
function ingestBody(req, res, r, maxBody) {
|
|
116
|
-
// Collect raw bytes and decode once at the end: a per-chunk `String(chunk)` corrupts a
|
|
117
|
-
// multibyte UTF-8 codepoint split across two chunks, and the cap is in bytes, not the
|
|
118
|
-
// UTF-16 code units a string length would count.
|
|
119
|
-
const chunks = [];
|
|
120
|
-
let bytes = 0;
|
|
121
|
-
let tooBig = false;
|
|
122
|
-
req.on('data', (chunk) => {
|
|
123
|
-
if (tooBig)
|
|
124
|
-
return;
|
|
125
|
-
bytes += chunk.length;
|
|
126
|
-
if (bytes > maxBody) {
|
|
127
|
-
tooBig = true;
|
|
128
|
-
res.writeHead(413, { 'content-type': 'text/plain' });
|
|
129
|
-
res.end('payload too large');
|
|
130
|
-
req.destroy();
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
chunks.push(chunk);
|
|
134
|
-
});
|
|
135
|
-
req.on('end', () => {
|
|
136
|
-
if (tooBig)
|
|
137
|
-
return;
|
|
138
|
-
let parsed;
|
|
139
|
-
try {
|
|
140
|
-
parsed = JSON.parse(Buffer.concat(chunks).toString('utf8'));
|
|
141
|
-
}
|
|
142
|
-
catch {
|
|
143
|
-
res.writeHead(400, { 'content-type': 'text/plain' });
|
|
144
|
-
res.end('invalid json');
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
const events = (Array.isArray(parsed) ? parsed : [parsed]);
|
|
148
|
-
for (const event of events)
|
|
149
|
-
r.stream.push(event);
|
|
150
|
-
res.writeHead(202, { 'content-type': 'application/json' });
|
|
151
|
-
res.end(`{"ok":true,"received":${events.length}}`);
|
|
152
|
-
});
|
|
153
|
-
}
|
|
154
|
-
function closeRelay(server, runs) {
|
|
155
|
-
for (const { stream } of runs.values())
|
|
156
|
-
stream.close(); // closing drains each Channel follower
|
|
157
|
-
runs.clear();
|
|
158
|
-
return new Promise(resolvePromise => server.close(() => resolvePromise()));
|
|
159
|
-
}
|
|
160
|
-
/**
|
|
161
|
-
* Forward a live run's {@link FrameworkEvent}s to a {@link startRelay} relay so
|
|
162
|
-
* remote browsers can watch it. POSTs are serialized (chained) so the relay's
|
|
163
|
-
* replay order matches the run, and best-effort: a failed POST is reported via
|
|
164
|
-
* `onError` but never interrupts the run.
|
|
165
|
-
*/
|
|
166
|
-
export function relayPublisher(base, runId, onError, timeoutMs = 10_000) {
|
|
167
|
-
const origin = base.replace(/\/+$/, '');
|
|
168
|
-
const root = `${origin}/r/${encodeURIComponent(runId)}`;
|
|
169
|
-
let chain = Promise.resolve();
|
|
170
|
-
return {
|
|
171
|
-
// Share the SPA viewer URL; events still POST to the ingest route under /r/:id/.
|
|
172
|
-
url: `${origin}/?run=${encodeURIComponent(runId)}`,
|
|
173
|
-
publish(event) {
|
|
174
|
-
chain = chain.then(async () => {
|
|
175
|
-
try {
|
|
176
|
-
// Timeout so a relay that accepts but never responds can't wedge flush()
|
|
177
|
-
// (awaited on shutdown) and hang the whole CLI on exit.
|
|
178
|
-
const res = await fetch(`${root}/publish`, {
|
|
179
|
-
method: 'POST',
|
|
180
|
-
headers: { 'content-type': 'application/json' },
|
|
181
|
-
body: JSON.stringify(event),
|
|
182
|
-
signal: AbortSignal.timeout(timeoutMs),
|
|
183
|
-
});
|
|
184
|
-
// fetch only throws on a transport failure, so a rejected event (413 over
|
|
185
|
-
// the body cap, 400, or a URL that isn't a relay) would otherwise be silent.
|
|
186
|
-
if (!res.ok)
|
|
187
|
-
throw new Error(`relay answered ${res.status} ${res.statusText}`.trimEnd());
|
|
188
|
-
}
|
|
189
|
-
catch (err) {
|
|
190
|
-
onError?.(err);
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
},
|
|
194
|
-
flush() {
|
|
195
|
-
return chain;
|
|
196
|
-
},
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
//# sourceMappingURL=relay.js.map
|
package/dist/relay.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"relay.js","sourceRoot":"","sources":["../src/relay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA0D,MAAM,WAAW,CAAA;AAEhG,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAEpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,qBAAq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;wBAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;wBAC3B,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,SAAS,CAAC;qBACvC,CAAC,CAAA;oBACF,0EAA0E;oBAC1E,6EAA6E;oBAC7E,IAAI,CAAC,GAAG,CAAC,EAAE;wBAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,GAAG,CAAC,MAAM,IAAI,GAAG,CAAC,UAAU,EAAE,CAAC,OAAO,EAAE,CAAC,CAAA;gBAC1F,CAAC;gBAAC,OAAO,GAAG,EAAE,CAAC;oBACb,OAAO,EAAE,CAAC,GAAG,CAAC,CAAA;gBAChB,CAAC;YACH,CAAC,CAAC,CAAA;QACJ,CAAC;QACD,KAAK;YACH,OAAO,KAAK,CAAA;QACd,CAAC;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type NodeFs } from './node-fs.js';
|
|
2
|
-
/**
|
|
3
|
-
* The repos-directory helper (#1123): find the git repos directly inside a directory the user
|
|
4
|
-
* pointed The Framework at, so the daemon can auto-register them when the opt-in is on.
|
|
5
|
-
*
|
|
6
|
-
* The fs is a seam so this is unit-testable without touching disk, matching the rest of the package.
|
|
7
|
-
*/
|
|
8
|
-
/** The narrow fs the scan needs: list a directory and test its entries. {@link nodeFs} satisfies it. */
|
|
9
|
-
export type ReposDirectoryFs = Pick<NodeFs, 'readdir' | 'isDirectory' | 'exists'>;
|
|
10
|
-
/**
|
|
11
|
-
* The immediate subdirectories of `dir` that are git repos: a child directory holding a `.git`
|
|
12
|
-
* (a directory in a normal clone, a file in a worktree or submodule). Returns absolute paths, sorted.
|
|
13
|
-
*
|
|
14
|
-
* Only one level deep on purpose (#1123): the auto-grant's blast radius is "this directory of repos",
|
|
15
|
-
* not the whole tree beneath it. A missing `dir` yields `[]` (readdir already swallows that), so it
|
|
16
|
-
* never throws on boot.
|
|
17
|
-
*/
|
|
18
|
-
export declare function listReposInDirectory(dir: string, fs?: ReposDirectoryFs): Promise<string[]>;
|
|
19
|
-
//# sourceMappingURL=repos-directory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repos-directory.d.ts","sourceRoot":"","sources":["../src/repos-directory.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,KAAK,MAAM,EAAE,MAAM,cAAc,CAAA;AAElD;;;;;GAKG;AAEH,wGAAwG;AACxG,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,QAAQ,CAAC,CAAA;AAEjF;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAE,gBAA2B,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAS1G"}
|
package/dist/repos-directory.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
import { nodeFs } from './node-fs.js';
|
|
3
|
-
/**
|
|
4
|
-
* The immediate subdirectories of `dir` that are git repos: a child directory holding a `.git`
|
|
5
|
-
* (a directory in a normal clone, a file in a worktree or submodule). Returns absolute paths, sorted.
|
|
6
|
-
*
|
|
7
|
-
* Only one level deep on purpose (#1123): the auto-grant's blast radius is "this directory of repos",
|
|
8
|
-
* not the whole tree beneath it. A missing `dir` yields `[]` (readdir already swallows that), so it
|
|
9
|
-
* never throws on boot.
|
|
10
|
-
*/
|
|
11
|
-
export async function listReposInDirectory(dir, fs = nodeFs()) {
|
|
12
|
-
const repos = [];
|
|
13
|
-
for (const name of (await fs.readdir(dir)).sort()) {
|
|
14
|
-
const child = join(dir, name);
|
|
15
|
-
if (!(await fs.isDirectory(child)))
|
|
16
|
-
continue;
|
|
17
|
-
const git = join(child, '.git');
|
|
18
|
-
if ((await fs.exists(git)) || (await fs.isDirectory(git)))
|
|
19
|
-
repos.push(child);
|
|
20
|
-
}
|
|
21
|
-
return repos;
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=repos-directory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repos-directory.js","sourceRoot":"","sources":["../src/repos-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,MAAM,EAAe,MAAM,cAAc,CAAA;AAYlD;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,GAAW,EAAE,KAAuB,MAAM,EAAE;IACrF,MAAM,KAAK,GAAa,EAAE,CAAA;IAC1B,KAAK,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;QAClD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAA;QAC7B,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YAAE,SAAQ;QAC5C,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;QAC/B,IAAI,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC9E,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type HandoffLevel } from './handoff-level.js';
|
|
2
|
-
import { type RegistryFs } from './registry.js';
|
|
3
|
-
/** One project that had a block, as the notice needs to talk about it. */
|
|
4
|
-
export interface RetiredProjectSettings {
|
|
5
|
-
/** The repo the block was about. Its path, because a project id names nothing to a reader. */
|
|
6
|
-
path: string;
|
|
7
|
-
/** The keys the block held, in file order — so the notice can say what stopped applying. */
|
|
8
|
-
keys: string[];
|
|
9
|
-
/** Whether the block set how far this repo publishes, in any spelling. See {@link PUBLISH_KEYS}. */
|
|
10
|
-
publishes: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* The publish rung the block set, when it set one this can name. Absent for a block written
|
|
13
|
-
* before the ladder, which the reader restates by hand — `publishes` is what says to.
|
|
14
|
-
*/
|
|
15
|
-
handoff?: HandoffLevel;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* The retired blocks in the registry file, or `[]` when there are none (which is everyone who
|
|
19
|
-
* never used the tier, and everyone whose file has been written once since).
|
|
20
|
-
*
|
|
21
|
-
* Reads the raw file rather than going through `readRegistry`, which drops the block on the way in
|
|
22
|
-
* — that is the point of the removal, and it is what leaves this the only reader.
|
|
23
|
-
*/
|
|
24
|
-
export declare function readRetiredProjectSettings(fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<RetiredProjectSettings[]>;
|
|
25
|
-
/** Read the blocks and hold them for this process. Called once, first thing, by the daemon. */
|
|
26
|
-
export declare function captureRetiredProjectSettings(fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<readonly RetiredProjectSettings[]>;
|
|
27
|
-
/** What the boot read found. Empty until {@link captureRetiredProjectSettings} has run. */
|
|
28
|
-
export declare function retiredProjectSettings(): readonly RetiredProjectSettings[];
|
|
29
|
-
/**
|
|
30
|
-
* What a repo's row has to say, as both surfaces say it.
|
|
31
|
-
*
|
|
32
|
-
* A block that set publishing gets the line to write and what happens without it, because that is
|
|
33
|
-
* the direction that acts outward on its own. Everything else is told what applies instead, which
|
|
34
|
-
* is true only for a block that did *not* set publishing — hence the flag rather than the rung.
|
|
35
|
-
*/
|
|
36
|
-
export declare function retiredProjectAdvice(project: RetiredProjectSettings): string;
|
|
37
|
-
/**
|
|
38
|
-
* The notice as the daemon's log prints it: one line naming the tier, then one per project.
|
|
39
|
-
*
|
|
40
|
-
* Empty for an empty list, so the caller prints nothing rather than a heading over nothing.
|
|
41
|
-
*/
|
|
42
|
-
export declare function retiredProjectSettingsNotice(retired: readonly RetiredProjectSettings[]): string[];
|
|
43
|
-
//# sourceMappingURL=retired-project-settings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"retired-project-settings.d.ts","sourceRoot":"","sources":["../src/retired-project-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtE,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,eAAe,CAAA;AA+B7E,0EAA0E;AAC1E,MAAM,WAAW,sBAAsB;IACrC,8FAA8F;IAC9F,IAAI,EAAE,MAAM,CAAA;IACZ,4FAA4F;IAC5F,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,oGAAoG;IACpG,SAAS,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;CACvB;AAED;;;;;;GAMG;AACH,wBAAsB,0BAA0B,CAC9C,EAAE,GAAE,UAA6B,EACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,sBAAsB,EAAE,CAAC,CAmCnC;AAYD,+FAA+F;AAC/F,wBAAsB,6BAA6B,CACjD,EAAE,CAAC,EAAE,UAAU,EACf,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,SAAS,sBAAsB,EAAE,CAAC,CAG5C;AAED,2FAA2F;AAC3F,wBAAgB,sBAAsB,IAAI,SAAS,sBAAsB,EAAE,CAE1E;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,sBAAsB,GAAG,MAAM,CAI5E;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,SAAS,sBAAsB,EAAE,GAAG,MAAM,EAAE,CASjG"}
|