@openagt/dashboard 0.8.0 → 0.9.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 +6 -6
- 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 +13 -4
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +45 -4
- 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 -9
- 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/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-om0WOAku.js → main-B98UOA3_.js} +48 -48
- package/dist/dashboard-bundle/assets/main-ByRjbCiA.css +2 -0
- package/dist/dashboard-bundle/assets/{module-jASZmfSB.js → module-v213KWfH.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 +1 -1
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +1 -1
- 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 +49 -7
- 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/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/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 +5 -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 +13 -4
- 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/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 +1 -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/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/{framework-dir.d.ts → openagent-dir.d.ts} +2 -2
- package/dist/module-types/src/openagent-gitignore.d.ts +11 -0
- package/dist/module-types/src/project-commands.d.ts +1 -1
- package/dist/module-types/src/project-errors.d.ts +11 -7
- package/dist/module-types/src/project-hooks.d.ts +4 -4
- package/dist/module-types/src/project-modules.d.ts +5 -5
- 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 +7 -7
- package/dist/module-types/src/store/git-host.d.ts +7 -7
- package/dist/module-types/src/store/provided.d.ts +3 -3
- package/dist/module-types/src/store/queue.d.ts +8 -8
- 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 +6 -6
- package/dist/module-types/src/store/tickets.d.ts +7 -7
- package/dist/module-types/src/terminal.d.ts +3 -3
- package/dist/open-choices.d.ts +2 -2
- package/dist/{framework-dir.js → openagent-dir.d.ts} +3 -3
- package/dist/openagent-dir.d.ts.map +1 -0
- package/dist/{framework-dir.d.ts → openagent-dir.js} +3 -3
- 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 +1 -1
- package/dist/project-commands.js +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 +4 -4
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +8 -8
- package/dist/project-hooks.js.map +1 -1
- package/dist/project-modules.d.ts +5 -5
- package/dist/project-modules.js +2 -2
- 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.js +6 -6
- 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 +7 -7
- package/dist/store/branches.d.ts.map +1 -1
- package/dist/store/branches.js +1 -1
- package/dist/store/branches.js.map +1 -1
- package/dist/store/git-host.d.ts +7 -7
- package/dist/store/git-host.d.ts.map +1 -1
- package/dist/store/git-host.js +1 -1
- 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 +8 -8
- package/dist/store/queue.d.ts.map +1 -1
- package/dist/store/queue.js +1 -1
- 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 +6 -6
- package/dist/store/runs.d.ts.map +1 -1
- package/dist/store/runs.js +2 -2
- package/dist/store/runs.js.map +1 -1
- package/dist/store/tickets.d.ts +7 -7
- package/dist/store/tickets.d.ts.map +1 -1
- package/dist/store/tickets.js +1 -1
- package/dist/store/tickets.js.map +1 -1
- package/dist/terminal.d.ts +3 -3
- package/dist/terminal.js +3 -3
- package/package.json +19 -19
- 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-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.map +0 -1
- 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-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/daemon-writes.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { hostname } from 'node:os';
|
|
2
|
-
import { DATA_BRANCH, nodeGitRunner, withFileBranch } from '@gemstack/agent-data';
|
|
3
|
-
/**
|
|
4
|
-
* The daemon's own writes to the `agent-data` branch, told apart from everyone else's.
|
|
5
|
-
*
|
|
6
|
-
* The daemon starts a run when the branch moved by a commit it did not write itself: someone
|
|
7
|
-
* queued work, an agent claimed or closed a ticket. Its own commits — a run's record at teardown, a
|
|
8
|
-
* routine lock, a claim minted for a plan agent — must not count, or every record it writes would
|
|
9
|
-
* start the next run, forever. And the branch is shared: another machine's daemon writes records
|
|
10
|
-
* too, and two daemons reading each other's records as work would fire empty runs at each other
|
|
11
|
-
* without end. So every automatic write goes through {@link daemonFunnel}, which signs the commit
|
|
12
|
-
* with a git trailer naming the machine, and the trigger counts only the commits that carry none.
|
|
13
|
-
*
|
|
14
|
-
* A write a person makes from the dashboard (queue an entry, release a claim) takes the skills'
|
|
15
|
-
* plain funnel and carries no trailer: a person asking for work is exactly what should start a run.
|
|
16
|
-
*/
|
|
17
|
-
/** The trailer key on every commit a daemon writes on its own: `Daemon: <machine name>`. */
|
|
18
|
-
export const DAEMON_TRAILER = 'Daemon';
|
|
19
|
-
/**
|
|
20
|
-
* The persistent checkout's write cycle on the `agent-data` branch, every commit signed
|
|
21
|
-
* `Daemon: <host>` as its last line. One per daemon; `host` is a test seam.
|
|
22
|
-
*/
|
|
23
|
-
export function daemonFunnel(host = hostname()) {
|
|
24
|
-
return (root, message, op) => withFileBranch(root, DATA_BRANCH, () => `${typeof message === 'function' ? message() : message}\n\n${DAEMON_TRAILER}: ${host}`, op);
|
|
25
|
-
}
|
|
26
|
-
/** The local head of the `agent-data` branch, or `undefined` when the repo has no such branch yet. */
|
|
27
|
-
export async function dataHead(repo, git = nodeGitRunner()) {
|
|
28
|
-
return git(['rev-parse', '--verify', '--quiet', `refs/heads/${DATA_BRANCH}`], repo).then(out => out.trim() || undefined, () => undefined);
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* How many commits `from..to` on the branch were written by something other than a daemon: the
|
|
32
|
-
* ones with no `Daemon:` trailer. A range git cannot walk (a `from` rebased away) counts as none;
|
|
33
|
-
* the daily heartbeat is the belt for that.
|
|
34
|
-
*/
|
|
35
|
-
export async function foreignCommits(repo, from, to, git = nodeGitRunner()) {
|
|
36
|
-
const out = await git(['log', `--format=%H%x1f%(trailers:key=${DAEMON_TRAILER},valueonly)`, `${from}..${to}`], repo).catch(() => '');
|
|
37
|
-
let foreign = 0;
|
|
38
|
-
for (const line of out.split('\n')) {
|
|
39
|
-
const at = line.indexOf('\x1f');
|
|
40
|
-
if (at !== -1 && line.slice(at + 1).trim() === '')
|
|
41
|
-
foreign++;
|
|
42
|
-
}
|
|
43
|
-
return foreign;
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=daemon-writes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-writes.js","sourceRoot":"","sources":["../src/daemon-writes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAA4D,MAAM,sBAAsB,CAAA;AAE3I;;;;;;;;;;;;;GAaG;AAEH,4FAA4F;AAC5F,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAA;AAKtC;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,IAAI,GAAW,QAAQ,EAAE;IACpD,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAC3B,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,OAAO,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,OAAO,cAAc,KAAK,IAAI,EAAE,EAAE,EAAE,CAAC,CAAA;AACvI,CAAC;AAED,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,GAAG,GAAc,aAAa,EAAE;IAC3E,OAAO,GAAG,CAAC,CAAC,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,IAAI,CACtF,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,SAAS,EAC9B,GAAG,EAAE,CAAC,SAAS,CAChB,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,IAAY,EAAE,IAAY,EAAE,EAAU,EAAE,GAAG,GAAc,aAAa,EAAE;IAC3G,MAAM,GAAG,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,iCAAiC,cAAc,aAAa,EAAE,GAAG,IAAI,KAAK,EAAE,EAAE,CAAC,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,CAAA;IACpI,IAAI,OAAO,GAAG,CAAC,CAAA;IACf,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACnC,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAC/B,IAAI,EAAE,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;YAAE,OAAO,EAAE,CAAA;IAC9D,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC"}
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
import { type GitRunner } from '@gemstack/agent-data';
|
|
2
|
-
import { type BranchesFor } from '../store/index.js';
|
|
3
|
-
import type { Cached } from './cache.js';
|
|
4
|
-
import { type FileGitStatus } from './file-status.js';
|
|
5
|
-
import { type FileDiff } from './file-diff.js';
|
|
6
|
-
import { type FileContent } from './file-read.js';
|
|
7
|
-
import { type LinkedPr } from './pull-requests.js';
|
|
8
|
-
/** Where a run's files are read from, and the commit its changes are measured from (`base`). */
|
|
9
|
-
export type AgentFilesAt = {
|
|
10
|
-
source: 'checkout';
|
|
11
|
-
path: string;
|
|
12
|
-
base?: string;
|
|
13
|
-
} | {
|
|
14
|
-
source: 'branch';
|
|
15
|
-
branch: string;
|
|
16
|
-
ref: string;
|
|
17
|
-
base?: string;
|
|
18
|
-
} | {
|
|
19
|
-
source: 'merge';
|
|
20
|
-
number: number;
|
|
21
|
-
ref: string;
|
|
22
|
-
base?: string;
|
|
23
|
-
}
|
|
24
|
-
/** The run changed nothing: the project's default branch, where no path is marked. */
|
|
25
|
-
| {
|
|
26
|
-
source: 'unchanged';
|
|
27
|
-
ref: string;
|
|
28
|
-
}
|
|
29
|
-
/** The run's pull request is still being looked up: the next read knows. */
|
|
30
|
-
| {
|
|
31
|
-
source: 'pending';
|
|
32
|
-
} | {
|
|
33
|
-
source: 'gone';
|
|
34
|
-
};
|
|
35
|
-
/** One changed path: what changed, and whether it is committed or only on disk in the checkout. */
|
|
36
|
-
export interface FileMark {
|
|
37
|
-
status: FileGitStatus;
|
|
38
|
-
committed: boolean;
|
|
39
|
-
}
|
|
40
|
-
/** What the Files tab shows for a run: the tree at its last state, the paths it changed marked. */
|
|
41
|
-
export type AgentTree = {
|
|
42
|
-
source: 'checkout';
|
|
43
|
-
files: string[];
|
|
44
|
-
changes: Record<string, FileMark>;
|
|
45
|
-
} | {
|
|
46
|
-
source: 'branch';
|
|
47
|
-
branch: string;
|
|
48
|
-
files: string[];
|
|
49
|
-
changes: Record<string, FileMark>;
|
|
50
|
-
} | {
|
|
51
|
-
source: 'merge';
|
|
52
|
-
number: number;
|
|
53
|
-
files: string[];
|
|
54
|
-
changes: Record<string, FileMark>;
|
|
55
|
-
} | {
|
|
56
|
-
source: 'unchanged';
|
|
57
|
-
files: string[];
|
|
58
|
-
changes: Record<string, FileMark>;
|
|
59
|
-
} | {
|
|
60
|
-
source: 'pending';
|
|
61
|
-
} | {
|
|
62
|
-
source: 'gone';
|
|
63
|
-
};
|
|
64
|
-
/** What {@link resolveAgentFiles} reads through; each defaults to the production reader. */
|
|
65
|
-
export interface AgentFilesDeps {
|
|
66
|
-
git?: GitRunner;
|
|
67
|
-
branches?: BranchesFor;
|
|
68
|
-
agent?: (root: string, agentId: string) => Promise<{
|
|
69
|
-
id: string;
|
|
70
|
-
status?: string;
|
|
71
|
-
host?: string;
|
|
72
|
-
branch?: string;
|
|
73
|
-
pr?: {
|
|
74
|
-
number: number;
|
|
75
|
-
};
|
|
76
|
-
} | undefined>;
|
|
77
|
-
/** This machine's name, against the run's `host`. */
|
|
78
|
-
host?: string;
|
|
79
|
-
prs?: (root: string, branch: string) => Promise<Cached<LinkedPr[]>>;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Where the run `agentId` of the project at `root` has its files: its checkout, else its recorded
|
|
83
|
-
* branch (local, then origin's copy), else the commit its recorded pull request merged as, else,
|
|
84
|
-
* for a run that finished `done` on this machine with no pull request, the default branch as a
|
|
85
|
-
* run that changed nothing, else gone. A branch the default branch already contains (a true merge) shows no change, so there
|
|
86
|
-
* the merge commit is preferred when this machine has it.
|
|
87
|
-
*/
|
|
88
|
-
export declare function resolveAgentFiles(root: string, agentId: string, deps?: AgentFilesDeps): Promise<AgentFilesAt>;
|
|
89
|
-
/**
|
|
90
|
-
* The Files tab's answer for a resolved source. A checkout lists every file git sees in it and
|
|
91
|
-
* marks both what the run committed since it forked and what is on disk uncommitted, the
|
|
92
|
-
* uncommitted mark winning a path marked both: it is what the file is now. A branch or a merge
|
|
93
|
-
* lists the commit's tree and marks what it changed, all committed. A run that changed nothing
|
|
94
|
-
* lists the default branch's tree and marks nothing.
|
|
95
|
-
*/
|
|
96
|
-
export declare function readAgentTree(root: string, at: AgentFilesAt, git?: GitRunner): Promise<AgentTree>;
|
|
97
|
-
/**
|
|
98
|
-
* One changed file's diff, from the same source the tree was read from. In a checkout an
|
|
99
|
-
* uncommitted file diffs as it always has (against its last commit); a committed one diffs from
|
|
100
|
-
* the fork point to the checkout's last commit. On a branch or a merge it is the commit's own
|
|
101
|
-
* change. Null for a path that is unsafe or not changed there.
|
|
102
|
-
*/
|
|
103
|
-
export declare function readAgentFileDiff(root: string, at: AgentFilesAt, path: string, git?: GitRunner): Promise<FileDiff | null>;
|
|
104
|
-
/** One unchanged file's contents, from the same source the tree was read from. */
|
|
105
|
-
export declare function readAgentFileContent(root: string, at: AgentFilesAt, path: string, git?: GitRunner): Promise<FileCont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AAS,CAAC,CAAA;IACxJ,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAA;CACpE;AA0BD;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,cAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CA4CvH;AA6BD;;;;;;GAMG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,SAAS,CAAC,CAgBxH;AAED;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAYhJ;AAED,kFAAkF;AAClF,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAStJ"}
|
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { nodeGitRunner } from '@gemstack/agent-data';
|
|
2
|
-
import { findAgent, findCheckout, projectBranches } from '../store/index.js';
|
|
3
|
-
import { crawlRepoFiles } from '../project.js';
|
|
4
|
-
import { agentBranchFor, leftNothing } from './agent-handoff.js';
|
|
5
|
-
import { readFileStatuses } from './file-status.js';
|
|
6
|
-
import { readFileDiff } from './file-diff.js';
|
|
7
|
-
import { cutToPreview, readFileContent, safeRepoPath } from './file-read.js';
|
|
8
|
-
import { cachedPrsForBranch } from './pull-requests.js';
|
|
9
|
-
/** Ask git, answering `''` for a refusal: every read here is one where "no" is an answer. */
|
|
10
|
-
function asker(git, cwd) {
|
|
11
|
-
return async (args) => (await git(args, cwd).catch(() => '')).trim();
|
|
12
|
-
}
|
|
13
|
-
/** The commit `ref` names, when this machine has it. */
|
|
14
|
-
async function commitOf(ask, ref) {
|
|
15
|
-
return (await ask(['rev-parse', '--verify', '--quiet', `${ref}^{commit}`])) || undefined;
|
|
16
|
-
}
|
|
17
|
-
/** The project's default branch: origin's HEAD, else a local `main` or `master`. */
|
|
18
|
-
async function defaultBranch(ask) {
|
|
19
|
-
const head = await ask(['symbolic-ref', '--short', 'refs/remotes/origin/HEAD']);
|
|
20
|
-
if (head)
|
|
21
|
-
return head;
|
|
22
|
-
for (const name of ['main', 'master'])
|
|
23
|
-
if (await commitOf(ask, `refs/heads/${name}`))
|
|
24
|
-
return name;
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
/** Where `tip` forked from the default branch: what the run's changes are measured from. */
|
|
28
|
-
async function forkPoint(ask, tip) {
|
|
29
|
-
const base = await defaultBranch(ask);
|
|
30
|
-
return base ? (await ask(['merge-base', base, tip])) || undefined : undefined;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Where the run `agentId` of the project at `root` has its files: its checkout, else its recorded
|
|
34
|
-
* branch (local, then origin's copy), else the commit its recorded pull request merged as, else,
|
|
35
|
-
* for a run that finished `done` on this machine with no pull request, the default branch as a
|
|
36
|
-
* run that changed nothing, else gone. A branch the default branch already contains (a true merge) shows no change, so there
|
|
37
|
-
* the merge commit is preferred when this machine has it.
|
|
38
|
-
*/
|
|
39
|
-
export async function resolveAgentFiles(root, agentId, deps = {}) {
|
|
40
|
-
const git = deps.git ?? nodeGitRunner();
|
|
41
|
-
const ask = asker(git, root);
|
|
42
|
-
const checkout = await findCheckout(root, agentId, deps.branches ?? projectBranches);
|
|
43
|
-
if (checkout) {
|
|
44
|
-
const base = await forkPoint(asker(git, checkout.path), 'HEAD');
|
|
45
|
-
return { source: 'checkout', path: checkout.path, ...(base ? { base } : {}) };
|
|
46
|
-
}
|
|
47
|
-
const agent = await (deps.agent ?? findAgent)(root, agentId).catch(() => undefined);
|
|
48
|
-
if (!agent)
|
|
49
|
-
return { source: 'gone' };
|
|
50
|
-
const branch = agentBranchFor(agent);
|
|
51
|
-
let onBranch;
|
|
52
|
-
if (branch !== undefined) {
|
|
53
|
-
for (const ref of [`refs/heads/${branch}`, `refs/remotes/origin/${branch}`]) {
|
|
54
|
-
const tip = await commitOf(ask, ref);
|
|
55
|
-
if (!tip)
|
|
56
|
-
continue;
|
|
57
|
-
const base = await forkPoint(ask, tip);
|
|
58
|
-
onBranch = { source: 'branch', branch, ref: tip, ...(base ? { base } : {}) };
|
|
59
|
-
if (base !== tip)
|
|
60
|
-
return onBranch;
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (agent.pr && branch !== undefined) {
|
|
65
|
-
const number = agent.pr.number;
|
|
66
|
-
const read = await (deps.prs ?? cachedPrsForBranch)(root, branch).catch(() => ({ value: undefined, pending: false }));
|
|
67
|
-
if (read.pending && !onBranch)
|
|
68
|
-
return { source: 'pending' };
|
|
69
|
-
const merged = read.value?.find(pr => pr.number === number)?.mergeCommit;
|
|
70
|
-
const ref = merged && (await commitOf(ask, merged));
|
|
71
|
-
if (ref) {
|
|
72
|
-
const base = await commitOf(ask, `${ref}^1`);
|
|
73
|
-
return { source: 'merge', number, ref, ...(base ? { base } : {}) };
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (onBranch)
|
|
77
|
-
return onBranch;
|
|
78
|
-
// Its branch is gone and nothing else holds its work: the one rule for a run that changed nothing.
|
|
79
|
-
if (leftNothing(agent, deps.host)) {
|
|
80
|
-
const main = await defaultBranch(ask);
|
|
81
|
-
const ref = main && (await commitOf(ask, main));
|
|
82
|
-
if (ref)
|
|
83
|
-
return { source: 'unchanged', ref };
|
|
84
|
-
}
|
|
85
|
-
return { source: 'gone' };
|
|
86
|
-
}
|
|
87
|
-
/** `git diff --name-status` between two commits, as marks; a rename reads as a deletion and an addition. */
|
|
88
|
-
async function committedChanges(git, cwd, from, to) {
|
|
89
|
-
const out = await git(['diff', '--name-status', '--no-renames', '-z', from, to], cwd).catch(() => '');
|
|
90
|
-
const parts = out.split('\0');
|
|
91
|
-
const changes = {};
|
|
92
|
-
for (let i = 0; i + 1 < parts.length; i += 2) {
|
|
93
|
-
const code = parts[i];
|
|
94
|
-
const path = parts[i + 1];
|
|
95
|
-
if (!code || !path)
|
|
96
|
-
continue;
|
|
97
|
-
changes[path] = { status: code === 'A' ? 'added' : code === 'D' ? 'deleted' : 'modified', committed: true };
|
|
98
|
-
}
|
|
99
|
-
return changes;
|
|
100
|
-
}
|
|
101
|
-
/** Every path in a commit's tree. */
|
|
102
|
-
async function treeAt(git, cwd, ref) {
|
|
103
|
-
const out = await git(['ls-tree', '-r', '--name-only', '-z', ref], cwd).catch(() => '');
|
|
104
|
-
return out.split('\0').filter(Boolean);
|
|
105
|
-
}
|
|
106
|
-
/** The tree plus the paths a change deleted, which the tree no longer holds but the tab still shows. */
|
|
107
|
-
function withDeleted(files, changes) {
|
|
108
|
-
const all = new Set(files);
|
|
109
|
-
for (const [path, mark] of Object.entries(changes))
|
|
110
|
-
if (mark.status === 'deleted')
|
|
111
|
-
all.add(path);
|
|
112
|
-
return [...all].sort();
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* The Files tab's answer for a resolved source. A checkout lists every file git sees in it and
|
|
116
|
-
* marks both what the run committed since it forked and what is on disk uncommitted, the
|
|
117
|
-
* uncommitted mark winning a path marked both: it is what the file is now. A branch or a merge
|
|
118
|
-
* lists the commit's tree and marks what it changed, all committed. A run that changed nothing
|
|
119
|
-
* lists the default branch's tree and marks nothing.
|
|
120
|
-
*/
|
|
121
|
-
export async function readAgentTree(root, at, git = nodeGitRunner()) {
|
|
122
|
-
if (at.source === 'pending' || at.source === 'gone')
|
|
123
|
-
return at;
|
|
124
|
-
if (at.source === 'checkout') {
|
|
125
|
-
const [files, committed, pending] = await Promise.all([
|
|
126
|
-
crawlRepoFiles(at.path, git),
|
|
127
|
-
at.base ? committedChanges(git, at.path, at.base, 'HEAD') : {},
|
|
128
|
-
readFileStatuses(at.path, git),
|
|
129
|
-
]);
|
|
130
|
-
const changes = { ...committed };
|
|
131
|
-
for (const [path, status] of Object.entries(pending))
|
|
132
|
-
changes[path] = { status, committed: false };
|
|
133
|
-
return { source: 'checkout', files: withDeleted(files, changes), changes };
|
|
134
|
-
}
|
|
135
|
-
if (at.source === 'unchanged')
|
|
136
|
-
return { source: 'unchanged', files: await treeAt(git, root, at.ref), changes: {} };
|
|
137
|
-
const [files, changes] = await Promise.all([treeAt(git, root, at.ref), at.base ? committedChanges(git, root, at.base, at.ref) : {}]);
|
|
138
|
-
const tree = { files: withDeleted(files, changes), changes };
|
|
139
|
-
return at.source === 'branch' ? { source: 'branch', branch: at.branch, ...tree } : { source: 'merge', number: at.number, ...tree };
|
|
140
|
-
}
|
|
141
|
-
/**
|
|
142
|
-
* One changed file's diff, from the same source the tree was read from. In a checkout an
|
|
143
|
-
* uncommitted file diffs as it always has (against its last commit); a committed one diffs from
|
|
144
|
-
* the fork point to the checkout's last commit. On a branch or a merge it is the commit's own
|
|
145
|
-
* change. Null for a path that is unsafe or not changed there.
|
|
146
|
-
*/
|
|
147
|
-
export async function readAgentFileDiff(root, at, path, git = nodeGitRunner()) {
|
|
148
|
-
if (at.source === 'pending' || at.source === 'gone' || at.source === 'unchanged' || !safeRepoPath(path))
|
|
149
|
-
return null;
|
|
150
|
-
if (at.source === 'checkout') {
|
|
151
|
-
const pending = (await readFileStatuses(at.path, git))[path];
|
|
152
|
-
if (pending)
|
|
153
|
-
return readFileDiff(at.path, path, pending, git);
|
|
154
|
-
if (!at.base)
|
|
155
|
-
return null;
|
|
156
|
-
const mark = (await committedChanges(git, at.path, at.base, 'HEAD'))[path];
|
|
157
|
-
return mark ? readFileDiff(at.path, path, mark.status, git, { from: at.base, to: 'HEAD' }) : null;
|
|
158
|
-
}
|
|
159
|
-
if (!at.base)
|
|
160
|
-
return null;
|
|
161
|
-
const mark = (await committedChanges(git, root, at.base, at.ref))[path];
|
|
162
|
-
return mark ? readFileDiff(root, path, mark.status, git, { from: at.base, to: at.ref }) : null;
|
|
163
|
-
}
|
|
164
|
-
/** One unchanged file's contents, from the same source the tree was read from. */
|
|
165
|
-
export async function readAgentFileContent(root, at, path, git = nodeGitRunner()) {
|
|
166
|
-
if (at.source === 'pending' || at.source === 'gone')
|
|
167
|
-
return null;
|
|
168
|
-
if (at.source === 'checkout')
|
|
169
|
-
return readFileContent(at.path, path);
|
|
170
|
-
if (!safeRepoPath(path))
|
|
171
|
-
return null;
|
|
172
|
-
const raw = await git(['show', `${at.ref}:${path}`], root).catch(() => undefined);
|
|
173
|
-
if (raw === undefined)
|
|
174
|
-
return null;
|
|
175
|
-
if (raw.includes('\0'))
|
|
176
|
-
return { path, text: '', truncated: false, binary: true };
|
|
177
|
-
const { body, truncated } = cutToPreview(raw.replace(/\n$/, ''));
|
|
178
|
-
return { path, text: body, truncated, binary: false };
|
|
179
|
-
}
|
|
180
|
-
//# sourceMappingURL=agent-tree.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-tree.js","sourceRoot":"","sources":["../../src/dashboard/agent-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,eAAe,EAAoB,MAAM,mBAAmB,CAAA;AAC9F,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhE,OAAO,EAAE,gBAAgB,EAAsB,MAAM,kBAAkB,CAAA;AACvE,OAAO,EAAE,YAAY,EAAiB,MAAM,gBA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CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;IACjF,IAAI,GAAG,KAAK,SAAS;QAAE,OAAO,IAAI,CAAA;IAClC,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;IACjF,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAA;IAChE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;AACvD,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type IncomingMessage, type ServerResponse } from 'node:http';
|
|
2
|
-
/**
|
|
3
|
-
* The dashboard's route to an agent's browser preview (#813).
|
|
4
|
-
*
|
|
5
|
-
* The bridge itself lives in the agent (#802) on a port the OS picks per agent. The dashboard is a
|
|
6
|
-
* different origin, on the daemon's port, so it cannot post to that bridge directly: a JSON POST
|
|
7
|
-
* would need a CORS preflight, and answering it would mean letting browser origins reach the
|
|
8
|
-
* bridge — giving up exactly the containment #802 paid for by keeping Chrome's debug port
|
|
9
|
-
* unreachable from the web.
|
|
10
|
-
*
|
|
11
|
-
* So the daemon proxies. The pane talks same-origin to the daemon, the daemon talks to loopback,
|
|
12
|
-
* and the agent's port is never named by the client: it comes from the agent's own meta. A caller
|
|
13
|
-
* cannot point this at an arbitrary port, which is what keeps it from being an open relay into
|
|
14
|
-
* anything else listening on loopback.
|
|
15
|
-
*/
|
|
16
|
-
/** Where a proxied request is headed, once the URL has been understood. */
|
|
17
|
-
export interface BrowserRoute {
|
|
18
|
-
projectId: string;
|
|
19
|
-
agentId: string;
|
|
20
|
-
/** `stream` renders in an `<img>`; `input` carries a click or a key back. */
|
|
21
|
-
leg: 'stream' | 'input';
|
|
22
|
-
}
|
|
23
|
-
/** The prefix the dashboard client posts to. */
|
|
24
|
-
export declare const BROWSER_PROXY_PREFIX = "/browser";
|
|
25
|
-
/**
|
|
26
|
-
* Parse `/browser/<projectId>/<agentId>/stream|input`, or undefined for anything else — an
|
|
27
|
-
* unrecognized shape must fall through to the bundle rather than be guessed at. Ids are taken
|
|
28
|
-
* verbatim and only ever used to look an agent up, never as a path.
|
|
29
|
-
*/
|
|
30
|
-
export declare function parseBrowserRoute(url: string | undefined): BrowserRoute | undefined;
|
|
31
|
-
/** How the proxy finds the agent's bridge. Injectable so a test needs no registry and no run. */
|
|
32
|
-
export type BrowserPortLookup = (projectId: string, agentId: string) => Promise<number | undefined>;
|
|
33
|
-
/**
|
|
34
|
-
* Proxy one request to the agent's bridge. Returns false when the URL is not a browser route, so
|
|
35
|
-
* the dashboard server can carry on to the client bundle.
|
|
36
|
-
*
|
|
37
|
-
* Streams both ways rather than buffering: `/stream` is an endless `multipart/x-mixed-replace`
|
|
38
|
-
* body, so anything that waits for it to finish never answers.
|
|
39
|
-
*/
|
|
40
|
-
export declare function handleBrowserProxy(req: IncomingMessage, res: ServerResponse, lookup?: BrowserPortLookup): Promise<boolean>;
|
|
41
|
-
//# sourceMappingURL=browser-proxy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-proxy.d.ts","sourceRoot":"","sources":["../../src/dashboard/browser-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,eAAe,EAAE,KAAK,cAAc,EAAE,MAAM,WAAW,CAAA;AAI9E;;;;;;;;;;;;;GAaG;AAEH,2EAA2E;AAC3E,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,6EAA6E;IAC7E,GAAG,EAAE,QAAQ,GAAG,OAAO,CAAA;CACxB;AAED,gDAAgD;AAChD,eAAO,MAAM,oBAAoB,aAAa,CAAA;AAE9C;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAkBnF;AAED,iGAAiG;AACjG,MAAM,MAAM,iBAAiB,GAAG,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;AAgBnG;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CACtC,GAAG,EAAE,eAAe,EACpB,GAAG,EAAE,cAAc,EACnB,MAAM,GAAE,iBAA4C,GACnD,OAAO,CAAC,OAAO,CAAC,CAyClB"}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { request } from 'node:http';
|
|
2
|
-
import { readLiveMetas } from '../store/index.js';
|
|
3
|
-
import { defaultProjectsProvider } from './projects.js';
|
|
4
|
-
/** The prefix the dashboard client posts to. */
|
|
5
|
-
export const BROWSER_PROXY_PREFIX = '/browser';
|
|
6
|
-
/**
|
|
7
|
-
* Parse `/browser/<projectId>/<agentId>/stream|input`, or undefined for anything else — an
|
|
8
|
-
* unrecognized shape must fall through to the bundle rather than be guessed at. Ids are taken
|
|
9
|
-
* verbatim and only ever used to look an agent up, never as a path.
|
|
10
|
-
*/
|
|
11
|
-
export function parseBrowserRoute(url) {
|
|
12
|
-
if (!url)
|
|
13
|
-
return undefined;
|
|
14
|
-
// Parse and decode defensively: a malformed target or escape (`/browser/p/%zz/stream`) names
|
|
15
|
-
// no run, and a throw here would escape the void-dispatched proxy handler as an unhandled
|
|
16
|
-
// rejection that kills the daemon (#938). Unparseable falls through to the bundle like any
|
|
17
|
-
// other unrecognized shape.
|
|
18
|
-
try {
|
|
19
|
-
const { pathname } = new URL(url, 'http://localhost');
|
|
20
|
-
if (!pathname.startsWith(`${BROWSER_PROXY_PREFIX}/`))
|
|
21
|
-
return undefined;
|
|
22
|
-
const parts = pathname.slice(BROWSER_PROXY_PREFIX.length + 1).split('/');
|
|
23
|
-
if (parts.length !== 3)
|
|
24
|
-
return undefined;
|
|
25
|
-
const [projectId, agentId, leg] = parts;
|
|
26
|
-
if (!projectId || !agentId)
|
|
27
|
-
return undefined;
|
|
28
|
-
if (leg !== 'stream' && leg !== 'input')
|
|
29
|
-
return undefined;
|
|
30
|
-
return { projectId, agentId: decodeURIComponent(agentId), leg };
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return undefined;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* The real lookup: the port the agent recorded on its own meta. An agent with no browser, a finished
|
|
38
|
-
* run, or an unknown id all read as undefined, which the caller turns into a 404.
|
|
39
|
-
*/
|
|
40
|
-
const defaultBrowserPortLookup = async (projectId, agentId) => {
|
|
41
|
-
const cwd = await defaultProjectsProvider().resolvePath(projectId);
|
|
42
|
-
if (!cwd)
|
|
43
|
-
return undefined;
|
|
44
|
-
const live = await readLiveMetas(cwd).catch(() => []);
|
|
45
|
-
const agent = live.find(meta => meta.id === agentId);
|
|
46
|
-
// Only a live agent: the bridge is torn down with the agent, so a port off a finished one would
|
|
47
|
-
// reach whatever the OS handed that number next.
|
|
48
|
-
return agent?.status === 'running' ? agent.browserStreamPort : undefined;
|
|
49
|
-
};
|
|
50
|
-
/**
|
|
51
|
-
* Proxy one request to the agent's bridge. Returns false when the URL is not a browser route, so
|
|
52
|
-
* the dashboard server can carry on to the client bundle.
|
|
53
|
-
*
|
|
54
|
-
* Streams both ways rather than buffering: `/stream` is an endless `multipart/x-mixed-replace`
|
|
55
|
-
* body, so anything that waits for it to finish never answers.
|
|
56
|
-
*/
|
|
57
|
-
export async function handleBrowserProxy(req, res, lookup = defaultBrowserPortLookup) {
|
|
58
|
-
const route = parseBrowserRoute(req.url);
|
|
59
|
-
if (!route)
|
|
60
|
-
return false;
|
|
61
|
-
const port = await lookup(route.projectId, route.agentId).catch(() => undefined);
|
|
62
|
-
if (!port) {
|
|
63
|
-
// The pane polls this while an agent is starting, and an agent may never have a browser at all,
|
|
64
|
-
// so a miss is ordinary rather than an error worth logging.
|
|
65
|
-
res.writeHead(404, { 'content-type': 'text/plain' }).end('no browser preview for this run');
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
const upstream = request({
|
|
69
|
-
host: '127.0.0.1',
|
|
70
|
-
port,
|
|
71
|
-
path: route.leg === 'stream' ? '/stream' : '/input',
|
|
72
|
-
method: route.leg === 'stream' ? 'GET' : 'POST',
|
|
73
|
-
headers: route.leg === 'input' ? { 'content-type': 'application/json' } : {},
|
|
74
|
-
}, proxied => {
|
|
75
|
-
res.writeHead(proxied.statusCode ?? 502, {
|
|
76
|
-
...proxied.headers,
|
|
77
|
-
// The frames are a live view of whatever the human is typing. Nothing caches this.
|
|
78
|
-
'cache-control': 'no-store',
|
|
79
|
-
});
|
|
80
|
-
proxied.pipe(res);
|
|
81
|
-
});
|
|
82
|
-
// The agent can die mid-stream, which lands here rather than as a response.
|
|
83
|
-
upstream.on('error', () => {
|
|
84
|
-
if (!res.headersSent)
|
|
85
|
-
res.writeHead(502, { 'content-type': 'text/plain' });
|
|
86
|
-
res.end();
|
|
87
|
-
});
|
|
88
|
-
// Stop pulling frames the moment the pane goes away, or the agent keeps serving a dead viewer.
|
|
89
|
-
res.on('close', () => upstream.destroy());
|
|
90
|
-
if (route.leg === 'input')
|
|
91
|
-
req.pipe(upstream);
|
|
92
|
-
else
|
|
93
|
-
upstream.end();
|
|
94
|
-
return true;
|
|
95
|
-
}
|
|
96
|
-
//# sourceMappingURL=browser-proxy.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser-proxy.js","sourceRoot":"","sources":["../../src/dashboard/browser-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA6C,MAAM,WAAW,CAAA;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA;AAy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,OAAO,EAAE,KAAK,CAAC,GAAG,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE;KAC7E,EACD,OAAO,CAAC,EAAE;QACR,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,UAAU,IAAI,GAAG,EAAE;YACvC,GAAG,OAAO,CAAC,OAAO;YAClB,mFAAmF;YACnF,eAAe,EAAE,UAAU;SAC5B,CAAC,CAAA;QACF,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IACnB,CAAC,CACF,CAAA;IAED,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE;QACxB,IAAI,CAAC,GAAG,CAAC,WAAW;YAAE,GAAG,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,YAAY,EAAE,CAAC,CAAA;QAC1E,GAAG,CAAC,GAAG,EAAE,CAAA;IACX,CAAC,CAAC,CAAA;IACF,+FAA+F;IAC/F,GAAG,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAA;IAEzC,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO;QAAE,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;;QACxC,QAAQ,CAAC,GAAG,EAAE,CAAA;IACnB,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/** Discord rejects a message over 2000 characters outright, so a long reply is trimmed. */
|
|
2
|
-
export declare const MAX_CONTENT = 2000;
|
|
3
|
-
/**
|
|
4
|
-
* The one Discord *webhook* transport (#627): a single POST of one message. The two
|
|
5
|
-
* notification posters (activity, interventions) each carried their own copy of this fetch;
|
|
6
|
-
* their line formatters rightly stay beside the types they switch on, but the transport is
|
|
7
|
-
* not per-feed. Deliberately not in discord/rest.ts — that module is the bot-token API
|
|
8
|
-
* (channels, replies), and a webhook needs no token and reaches one fixed channel — though
|
|
9
|
-
* it shares that module's clamp: Discord rejects a message over 2000 chars outright, so an
|
|
10
|
-
* unclamped "needs you" batch would silently post nothing (#940).
|
|
11
|
-
*
|
|
12
|
-
* Resolves whether Discord accepted the post. A failed delivery must never throw out of a
|
|
13
|
-
* daemon watcher, so a non-ok response and a network error both resolve `false` for the
|
|
14
|
-
* caller to log.
|
|
15
|
-
*/
|
|
16
|
-
export declare function postDiscordWebhook(webhook: string, content: string, fetchImpl?: typeof fetch): Promise<boolean>;
|
|
17
|
-
//# sourceMappingURL=discord-webhook.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discord-webhook.d.ts","sourceRoot":"","sources":["../../src/dashboard/discord-webhook.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,WAAW,OAAO,CAAA;AAS/B;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,GAAE,OAAO,KAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAW5H"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/** Discord rejects a message over 2000 characters outright, so a long reply is trimmed. */
|
|
2
|
-
export const MAX_CONTENT = 2000;
|
|
3
|
-
/** Trim to Discord's limit, marking the cut so a truncated answer never reads as a complete one. */
|
|
4
|
-
function clampContent(text) {
|
|
5
|
-
if (text.length <= MAX_CONTENT)
|
|
6
|
-
return text;
|
|
7
|
-
const notice = '\n… (truncated)';
|
|
8
|
-
return text.slice(0, MAX_CONTENT - notice.length) + notice;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* The one Discord *webhook* transport (#627): a single POST of one message. The two
|
|
12
|
-
* notification posters (activity, interventions) each carried their own copy of this fetch;
|
|
13
|
-
* their line formatters rightly stay beside the types they switch on, but the transport is
|
|
14
|
-
* not per-feed. Deliberately not in discord/rest.ts — that module is the bot-token API
|
|
15
|
-
* (channels, replies), and a webhook needs no token and reaches one fixed channel — though
|
|
16
|
-
* it shares that module's clamp: Discord rejects a message over 2000 chars outright, so an
|
|
17
|
-
* unclamped "needs you" batch would silently post nothing (#940).
|
|
18
|
-
*
|
|
19
|
-
* Resolves whether Discord accepted the post. A failed delivery must never throw out of a
|
|
20
|
-
* daemon watcher, so a non-ok response and a network error both resolve `false` for the
|
|
21
|
-
* caller to log.
|
|
22
|
-
*/
|
|
23
|
-
export async function postDiscordWebhook(webhook, content, fetchImpl = fetch) {
|
|
24
|
-
try {
|
|
25
|
-
const res = await fetchImpl(webhook, {
|
|
26
|
-
method: 'POST',
|
|
27
|
-
headers: { 'Content-Type': 'application/json' },
|
|
28
|
-
body: JSON.stringify({ content: clampContent(content) }),
|
|
29
|
-
});
|
|
30
|
-
return res.ok;
|
|
31
|
-
}
|
|
32
|
-
catch {
|
|
33
|
-
return false;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=discord-webhook.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"discord-webhook.js","sourceRoot":"","sources":["../../src/dashboard/discord-webhook.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAA;AAE/B,oGAAoG;AACpG,SAAS,YAAY,CAAC,IAAY;IAChC,IAAI,IAAI,CAAC,MAAM,IAAI,WAAW;QAAE,OAAO,IAAI,CAAA;IAC3C,MAAM,MAAM,GAAG,iBAAiB,CAAA;IAChC,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAA;AAC5D,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,OAAe,EAAE,OAAe,EAAE,SAAS,GAAiB,KAAK;IACxG,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,SAAS,CAAC,OAAO,EAAE;YACnC,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC;SACzD,CAAC,CAAA;QACF,OAAO,GAAG,CAAC,EAAE,CAAA;IACf,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAA;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { type GitRunner } from '@gemstack/agent-data';
|
|
2
|
-
import type { FileGitStatus } from './file-status.js';
|
|
3
|
-
import { safeRepoPath } from './file-read.js';
|
|
4
|
-
export { safeRepoPath };
|
|
5
|
-
/** One file's diff, capped so a hover card can render it. */
|
|
6
|
-
export interface FileDiff {
|
|
7
|
-
/** The repo-relative path asked for. */
|
|
8
|
-
path: string;
|
|
9
|
-
status: FileGitStatus;
|
|
10
|
-
/** Unified diff body, hunks only (git's `diff --git` / index preamble is dropped). */
|
|
11
|
-
patch: string;
|
|
12
|
-
added: number;
|
|
13
|
-
removed: number;
|
|
14
|
-
/** The patch hit the preview cap and was cut. */
|
|
15
|
-
truncated: boolean;
|
|
16
|
-
/** Nothing textual to show (git reports a binary change, or the file is not UTF-8 text). */
|
|
17
|
-
binary: boolean;
|
|
18
|
-
}
|
|
19
|
-
/** One changed file in a session's Changes list (#817): what moved, and by how much. */
|
|
20
|
-
export interface FileChange {
|
|
21
|
-
path: string;
|
|
22
|
-
status: FileGitStatus;
|
|
23
|
-
added: number;
|
|
24
|
-
removed: number;
|
|
25
|
-
/** Line counts are unavailable (a binary file, or an untracked one too large to count). */
|
|
26
|
-
binary: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* The diff for one changed file in the checkout at `cwd`, or, given a `range`, between two
|
|
30
|
-
* commits of the repository at `cwd` (a run's committed change, `agent-tree.ts`).
|
|
31
|
-
*
|
|
32
|
-
* Tracked files diff against `HEAD`, not the index, so a change the agent staged still shows;
|
|
33
|
-
* that also matches `git status --porcelain`, which is what dotted the file in the first place.
|
|
34
|
-
* An untracked file is rendered as all-added from its contents, since `git diff --no-index`
|
|
35
|
-
* exits non-zero on a difference and would read as a failure here.
|
|
36
|
-
*
|
|
37
|
-
* Returns null when the path is unsafe, unreadable, or has no diff to show.
|
|
38
|
-
*/
|
|
39
|
-
export declare function readFileDiff(cwd: string, path: string, status: FileGitStatus, git?: GitRunner, range?: {
|
|
40
|
-
from: string;
|
|
41
|
-
to: string;
|
|
42
|
-
}): Promise<FileDiff | null>;
|
|
43
|
-
/** One `git diff --numstat` line, parsed. */
|
|
44
|
-
export interface NumstatEntry {
|
|
45
|
-
path: string;
|
|
46
|
-
added: number;
|
|
47
|
-
removed: number;
|
|
48
|
-
binary: boolean;
|
|
49
|
-
}
|
|
50
|
-
/**
|
|
51
|
-
* Parse `git diff --numstat` output: `added<TAB>removed<TAB>path`, with `-` for both counts
|
|
52
|
-
* on a binary file. The one parser for the grammar — it was written here and in run-handoff,
|
|
53
|
-
* and the copies had already drifted on a path containing a tab (this side rejoined it, the
|
|
54
|
-
* other dropped the line).
|
|
55
|
-
*/
|
|
56
|
-
export declare function parseNumstat(out: string): NumstatEntry[];
|
|
57
|
-
/**
|
|
58
|
-
* Every changed file in the checkout at `cwd`, with its line counts: the session's Changes list
|
|
59
|
-
* (#817). One `git status` plus one `git diff --numstat`, not a diff per file, so a session that
|
|
60
|
-
* touched forty files still costs two git calls.
|
|
61
|
-
*
|
|
62
|
-
* Untracked files have no numstat entry (they are not in the diff at all), so their added count
|
|
63
|
-
* is their line count, read from disk. Sorted by path, so the list does not reshuffle as a live
|
|
64
|
-
* session edits.
|
|
65
|
-
*/
|
|
66
|
-
export declare function readFileChanges(cwd: string, statuses: Record<string, FileGitStatus>, git?: GitRunner): Promise<FileChange[]>;
|
|
67
|
-
//# sourceMappingURL=file-diff.d.ts.map
|