@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
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
import { CONVERSATIONS_DIR } from './conversations.js';
|
|
3
|
-
import { SESSIONS_DIR } from './store/index.js';
|
|
4
|
-
import { THE_FRAMEWORK_DIR } from './framework-dir.js';
|
|
5
|
-
import { nodeGitRunner } from './project.js';
|
|
6
|
-
import { errorMessage } from './error-message.js';
|
|
7
|
-
/**
|
|
8
|
-
* Committing the conversations the daemon records (#912) into the project checkout.
|
|
9
|
-
*
|
|
10
|
-
* #908 made `.the-framework/conversations/<runId>.md` tracked files, and the paths that already
|
|
11
|
-
* commit pick them up: a run's worktree sweeps its own on teardown (`store/worktree.ts`). The main
|
|
12
|
-
* checkout has no such path — `install.ts` commits once at activation and nothing after — so a
|
|
13
|
-
* conversation held there sat as a working-tree change until a human happened to commit it. That
|
|
14
|
-
* is the one gap between "the chat is in Git" (#857) and "the chat reaches Git by itself".
|
|
15
|
-
*
|
|
16
|
-
* Two rules shape the whole module, both about writing into a repo somebody else is using.
|
|
17
|
-
*
|
|
18
|
-
* Path-scoped, never `git add -A`. The pathspec names the conversations directory and nothing
|
|
19
|
-
* else, the way `queue-promote.ts` names the queue file, so whatever the user has in progress
|
|
20
|
-
* cannot ride along in our commit. A pathspec commit also leaves their index alone: what they had
|
|
21
|
-
* staged is still staged afterwards. Scoped down further at commit time to the pathspecs that
|
|
22
|
-
* actually have something pending — see {@link pathspecsFor}.
|
|
23
|
-
*
|
|
24
|
-
* Debounced on an idle window rather than committed per turn. A chat turn is seconds apart, and a
|
|
25
|
-
* commit each would bury the project's real history under transcript noise. A poll that sees the
|
|
26
|
-
* same pending set twice running treats the conversation as settled and commits the batch; a burst
|
|
27
|
-
* keeps resetting it. {@link ConversationCommitterOptions.maxWaitMs} caps that, so a conversation
|
|
28
|
-
* that never goes idle still lands instead of being starved forever.
|
|
29
|
-
*
|
|
30
|
-
* Tolerates not being alone (the #605 question this waited on). One daemon per machine is the rule
|
|
31
|
-
* today (#393), but the committer never assumes it: a locked index or a rebase/merge in progress
|
|
32
|
-
* means somebody else is mid-operation, so it skips rather than commits into their work, and a
|
|
33
|
-
* failed commit is swallowed and retried on the next window. That way #605's eventual answer about
|
|
34
|
-
* who owns the chat bot does not invalidate any of this.
|
|
35
|
-
*/
|
|
36
|
-
/** The pathspec the conversations live under. Posix separators: it is a git pathspec, not a path. */
|
|
37
|
-
export const CONVERSATIONS_PATHSPEC = `${THE_FRAMEWORK_DIR}/${CONVERSATIONS_DIR}`;
|
|
38
|
-
/**
|
|
39
|
-
* The committed session archives (#1179), under every user's own directory.
|
|
40
|
-
*
|
|
41
|
-
* `:(glob)` magic so the `*` stops at a path separator — a plain pathspec wildcard matches `/` too,
|
|
42
|
-
* and would reach further down `.the-framework/` than this means to.
|
|
43
|
-
*
|
|
44
|
-
* The trailing `/**` is load-bearing, and its absence is silent: glob magic matches the pattern
|
|
45
|
-
* against each file's whole path rather than treating a directory as a prefix, so
|
|
46
|
-
* `.the-framework/*/sessions` matches no *file* and `git add` fails with "did not match any files"
|
|
47
|
-
* — a committer that commits nothing, every time. Only a real repo shows this.
|
|
48
|
-
*/
|
|
49
|
-
export const SESSIONS_PATHSPEC = `:(glob)${THE_FRAMEWORK_DIR}/*/${SESSIONS_DIR}/**`;
|
|
50
|
-
/**
|
|
51
|
-
* Everything this committer is scoped to. Both are records the daemon writes into the repo and
|
|
52
|
-
* nobody would think to commit by hand: the chat of a run (#908) and the run's own archived history
|
|
53
|
-
* (#1179). They share one debounce because they are written by the same events and a commit each
|
|
54
|
-
* would double the noise in the project's log.
|
|
55
|
-
*/
|
|
56
|
-
export const COMMITTED_PATHSPECS = [CONVERSATIONS_PATHSPEC, SESSIONS_PATHSPEC];
|
|
57
|
-
/**
|
|
58
|
-
* Which pending file belongs to which pathspec, so a pathspec with nothing under it can be left out
|
|
59
|
-
* of `add`/`commit` (see {@link pathspecsFor}). Kept beside the pathspecs themselves: a predicate
|
|
60
|
-
* that drifts from the pattern it mirrors would silently drop a file from every commit.
|
|
61
|
-
*/
|
|
62
|
-
const PATHSPEC_MEMBERSHIP = [
|
|
63
|
-
[CONVERSATIONS_PATHSPEC, file => file.startsWith(`${CONVERSATIONS_PATHSPEC}/`)],
|
|
64
|
-
[SESSIONS_PATHSPEC, file => file.startsWith(`${THE_FRAMEWORK_DIR}/`) && file.includes(`/${SESSIONS_DIR}/`)],
|
|
65
|
-
];
|
|
66
|
-
/**
|
|
67
|
-
* The subset of {@link COMMITTED_PATHSPECS} that `files` actually has something under.
|
|
68
|
-
*
|
|
69
|
-
* `git add` and `git commit` are all-or-nothing about their pathspecs: one that matches no file
|
|
70
|
-
* aborts the whole command with "pathspec ... did not match any files", so passing both patterns
|
|
71
|
-
* unconditionally means a project that has sessions but has never recorded a conversation — every
|
|
72
|
-
* project, until its first chat — fails to commit and puts that failure in the daemon log on every
|
|
73
|
-
* poll. Nothing to commit under a pattern is the ordinary state, not an error, so the pattern is
|
|
74
|
-
* dropped instead.
|
|
75
|
-
*
|
|
76
|
-
* This covers the empty directory as well as the missing one, and the two fail in different places:
|
|
77
|
-
* `git add` tolerates an existing-but-empty directory, and then `git commit` rejects it, because by
|
|
78
|
-
* then the pathspec has to match a file git knows about.
|
|
79
|
-
*/
|
|
80
|
-
export function pathspecsFor(files) {
|
|
81
|
-
return PATHSPEC_MEMBERSHIP.filter(([, holds]) => files.some(holds)).map(([pathspec]) => pathspec);
|
|
82
|
-
}
|
|
83
|
-
/** How often the committer looks for settled conversations. */
|
|
84
|
-
export const COMMIT_POLL_MS = 30_000;
|
|
85
|
-
/** How long a conversation may keep changing before it is committed anyway. */
|
|
86
|
-
export const COMMIT_MAX_WAIT_MS = 5 * 60_000;
|
|
87
|
-
/** A {@link PathProbe} over `fs.access`. */
|
|
88
|
-
export function nodePathProbe() {
|
|
89
|
-
return async (path) => {
|
|
90
|
-
const { access } = await import('node:fs/promises');
|
|
91
|
-
return access(path).then(() => true, () => false);
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* The commit message a batch writes. Names what moved, so the log line stands alone.
|
|
96
|
-
*
|
|
97
|
-
* Sessions are counted by run, not by file: one archived run is a `<id>.json` and a `<id>.jsonl`,
|
|
98
|
-
* and "2 sessions" for a single session would be a lie told by the batch's own commit message.
|
|
99
|
-
*/
|
|
100
|
-
export function commitMessage(files) {
|
|
101
|
-
const sessionFiles = files.filter(file => file.includes(`/${SESSIONS_DIR}/`));
|
|
102
|
-
const runs = new Set(sessionFiles.map(file => file.replace(/\.[^./]+$/, ''))).size;
|
|
103
|
-
const conversations = files.length - sessionFiles.length;
|
|
104
|
-
const parts = [];
|
|
105
|
-
if (conversations > 0)
|
|
106
|
-
parts.push(conversations === 1 ? 'a conversation' : `${conversations} conversations`);
|
|
107
|
-
if (runs > 0)
|
|
108
|
-
parts.push(runs === 1 ? 'a session' : `${runs} sessions`);
|
|
109
|
-
return `[The Framework] ${parts.join(' and ')}`;
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* The conversation files with uncommitted changes, as repo-relative paths, sorted so the result is
|
|
113
|
-
* a stable fingerprint the debounce can compare across polls.
|
|
114
|
-
*
|
|
115
|
-
* `--porcelain` v1 is parsed rather than `--short` because its two status columns are fixed-width
|
|
116
|
-
* and its paths are quoted consistently. A rename (`R old -> new`) reports the destination, which
|
|
117
|
-
* is the path we would commit. Anything unreadable — not a repo, no git — reads as no changes.
|
|
118
|
-
*
|
|
119
|
-
* `-uall` is load-bearing, not a detail. By default git collapses a wholly-untracked directory into
|
|
120
|
-
* one entry (`?? .the-framework/conversations/`) instead of naming the files under it, which makes
|
|
121
|
-
* the fingerprint identical whether one conversation is being written or ten. The debounce compares
|
|
122
|
-
* fingerprints, so without this the idle window could never see a burst and would commit straight
|
|
123
|
-
* through the middle of one. Only a real repo shows this; a per-file fake does not.
|
|
124
|
-
*/
|
|
125
|
-
export async function pendingConversations(cwd, git = nodeGitRunner()) {
|
|
126
|
-
const out = await git(['status', '--porcelain', '-uall', '--', ...COMMITTED_PATHSPECS], cwd).catch(() => '');
|
|
127
|
-
const files = new Set();
|
|
128
|
-
for (const line of out.split('\n')) {
|
|
129
|
-
if (line.length < 4)
|
|
130
|
-
continue;
|
|
131
|
-
// Columns 0-1 are the status codes, 2 is a space, the path starts at 3.
|
|
132
|
-
const entry = line.slice(3);
|
|
133
|
-
const arrow = entry.indexOf(' -> ');
|
|
134
|
-
files.add(unquotePath(arrow === -1 ? entry : entry.slice(arrow + ' -> '.length)));
|
|
135
|
-
}
|
|
136
|
-
return [...files].sort();
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Undo git's C-style quoting of a path holding non-ASCII or special characters. Only the escapes
|
|
140
|
-
* git actually emits are handled; anything else is left as written rather than mangled.
|
|
141
|
-
*/
|
|
142
|
-
function unquotePath(entry) {
|
|
143
|
-
if (!entry.startsWith('"') || !entry.endsWith('"'))
|
|
144
|
-
return entry;
|
|
145
|
-
return entry
|
|
146
|
-
.slice(1, -1)
|
|
147
|
-
.replace(/\\([\\"])/g, '$1')
|
|
148
|
-
.replace(/\\t/g, '\t')
|
|
149
|
-
.replace(/\\n/g, '\n');
|
|
150
|
-
}
|
|
151
|
-
/** The markers that mean another git operation owns this repo right now. */
|
|
152
|
-
const BUSY_MARKERS = [
|
|
153
|
-
['index.lock', 'another git process holds the index lock'],
|
|
154
|
-
['rebase-merge', 'a rebase is in progress'],
|
|
155
|
-
['rebase-apply', 'a rebase is in progress'],
|
|
156
|
-
['MERGE_HEAD', 'a merge is in progress'],
|
|
157
|
-
['CHERRY_PICK_HEAD', 'a cherry-pick is in progress'],
|
|
158
|
-
['REVERT_HEAD', 'a revert is in progress'],
|
|
159
|
-
['BISECT_LOG', 'a bisect is in progress'],
|
|
160
|
-
];
|
|
161
|
-
/**
|
|
162
|
-
* Why the repo is in no state to be committed into, or `undefined` when it is fine.
|
|
163
|
-
*
|
|
164
|
-
* The git dir is resolved through git rather than assumed to be `<cwd>/.git`, so this is right in a
|
|
165
|
-
* linked worktree, where `.git` is a file pointing elsewhere and the markers live in the real dir.
|
|
166
|
-
*/
|
|
167
|
-
export async function gitBusy(cwd, git = nodeGitRunner(), exists = nodePathProbe()) {
|
|
168
|
-
const gitDir = await git(['rev-parse', '--absolute-git-dir'], cwd).then(out => out.trim(), () => '');
|
|
169
|
-
if (!gitDir)
|
|
170
|
-
return 'not a git repository';
|
|
171
|
-
for (const [name, reason] of BUSY_MARKERS) {
|
|
172
|
-
if (await exists(join(gitDir, name)))
|
|
173
|
-
return reason;
|
|
174
|
-
}
|
|
175
|
-
return undefined;
|
|
176
|
-
}
|
|
177
|
-
/** The everyday no-op outcome. Named so the poller can tell it apart from a real failure. */
|
|
178
|
-
const NOTHING_PENDING = 'no conversation changes';
|
|
179
|
-
/**
|
|
180
|
-
* Stage and commit the pending conversations under `cwd`, scoped to {@link COMMITTED_PATHSPECS}.
|
|
181
|
-
*
|
|
182
|
-
* `add` before `commit` because a brand-new conversation is untracked, and `git commit -- <path>`
|
|
183
|
-
* only knows paths git already knows. Both are pathspec-scoped, so the staging is as narrow as the
|
|
184
|
-
* commit and the user's own staged work is neither swept in nor disturbed, and both are narrowed to
|
|
185
|
-
* the pathspecs that have something pending ({@link pathspecsFor}) — a pathspec matching nothing is
|
|
186
|
-
* a hard error to git, and "no conversation has been recorded here yet" is not an error at all.
|
|
187
|
-
*
|
|
188
|
-
* Never throws: this runs on a background tick with nothing to catch it.
|
|
189
|
-
*/
|
|
190
|
-
export async function commitConversations(cwd, git = nodeGitRunner(), exists = nodePathProbe()) {
|
|
191
|
-
const busy = await gitBusy(cwd, git, exists);
|
|
192
|
-
if (busy)
|
|
193
|
-
return { committed: false, reason: busy };
|
|
194
|
-
const files = await pendingConversations(cwd, git);
|
|
195
|
-
if (files.length === 0)
|
|
196
|
-
return { committed: false, reason: NOTHING_PENDING };
|
|
197
|
-
// Only the pathspecs that have something pending, or git aborts on the one that matches nothing.
|
|
198
|
-
// An empty result should be unreachable — `status` was scoped to these same pathspecs — but an
|
|
199
|
-
// empty pathspec list means "everything", which would sweep the user's whole checkout into our
|
|
200
|
-
// commit, so it reads as nothing pending rather than as a commit.
|
|
201
|
-
const pathspecs = pathspecsFor(files);
|
|
202
|
-
if (pathspecs.length === 0)
|
|
203
|
-
return { committed: false, reason: NOTHING_PENDING };
|
|
204
|
-
try {
|
|
205
|
-
await git(['add', '--', ...pathspecs], cwd);
|
|
206
|
-
await git(['commit', '-m', commitMessage(files), '--', ...pathspecs], cwd);
|
|
207
|
-
return { committed: true, files };
|
|
208
|
-
}
|
|
209
|
-
catch (err) {
|
|
210
|
-
return { committed: false, reason: errorMessage(err) };
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Start committing settled conversations, and return the handle that stops it.
|
|
215
|
-
*
|
|
216
|
-
* The idle window is the poll itself: a project whose pending set is byte-identical to the previous
|
|
217
|
-
* poll's has stopped being written to, so its batch is committed. Anything still moving is recorded
|
|
218
|
-
* and reconsidered next time, unless it has been dirty past `maxWaitMs`, which forces it through.
|
|
219
|
-
*
|
|
220
|
-
* Forgiving throughout — a failed project scan, a busy repo or a rejected commit costs one window
|
|
221
|
-
* and is retried, never a throw. Runs immediately, then every `intervalMs`; the timer is unref'd so
|
|
222
|
-
* it never keeps the daemon alive past shutdown.
|
|
223
|
-
*/
|
|
224
|
-
export function startConversationCommitter(opts) {
|
|
225
|
-
const git = opts.git ?? nodeGitRunner();
|
|
226
|
-
const exists = opts.exists ?? nodePathProbe();
|
|
227
|
-
const now = opts.now ?? Date.now;
|
|
228
|
-
const intervalMs = opts.intervalMs ?? COMMIT_POLL_MS;
|
|
229
|
-
const maxWaitMs = opts.maxWaitMs ?? COMMIT_MAX_WAIT_MS;
|
|
230
|
-
const pending = new Map();
|
|
231
|
-
let stopped = false;
|
|
232
|
-
let running = false;
|
|
233
|
-
const poll = async () => {
|
|
234
|
-
if (stopped || running)
|
|
235
|
-
return;
|
|
236
|
-
running = true;
|
|
237
|
-
try {
|
|
238
|
-
const projects = await opts.projects().catch(() => []);
|
|
239
|
-
const seen = new Set();
|
|
240
|
-
for (const project of projects) {
|
|
241
|
-
if (stopped)
|
|
242
|
-
break;
|
|
243
|
-
seen.add(project.path);
|
|
244
|
-
const files = await pendingConversations(project.path, git).catch(() => []);
|
|
245
|
-
if (files.length === 0) {
|
|
246
|
-
pending.delete(project.path);
|
|
247
|
-
continue;
|
|
248
|
-
}
|
|
249
|
-
const fingerprint = files.join('\n');
|
|
250
|
-
const previous = pending.get(project.path);
|
|
251
|
-
const since = previous?.since ?? now();
|
|
252
|
-
// Settled (nothing changed since the last poll), or dirty long enough that waiting for
|
|
253
|
-
// quiet is no longer worth it.
|
|
254
|
-
const settled = previous?.fingerprint === fingerprint || now() - since >= maxWaitMs;
|
|
255
|
-
const loggedReason = previous?.loggedReason;
|
|
256
|
-
if (!settled) {
|
|
257
|
-
pending.set(project.path, { fingerprint, since, loggedReason });
|
|
258
|
-
continue;
|
|
259
|
-
}
|
|
260
|
-
const outcome = await commitConversations(project.path, git, exists);
|
|
261
|
-
if (outcome.committed) {
|
|
262
|
-
pending.delete(project.path);
|
|
263
|
-
opts.log?.(`[framework] committed ${outcome.files.length} conversation(s) in ${project.name}`);
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
// A busy repo or a rejected commit keeps its place, so the next window retries it
|
|
267
|
-
// rather than starting the idle count over.
|
|
268
|
-
const reason = outcome.reason === NOTHING_PENDING ? undefined : outcome.reason;
|
|
269
|
-
// Announced on change only: this is a poll, so logging every failure would repeat the
|
|
270
|
-
// same line forever while a project stays stuck.
|
|
271
|
-
if (reason !== undefined && reason !== loggedReason) {
|
|
272
|
-
opts.log?.(`[framework] conversation commit failed in ${project.name}: ${reason}`);
|
|
273
|
-
}
|
|
274
|
-
pending.set(project.path, { fingerprint, since, loggedReason: reason });
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
// Drop state for projects that went away, so the map cannot grow without bound.
|
|
278
|
-
for (const path of [...pending.keys()])
|
|
279
|
-
if (!seen.has(path))
|
|
280
|
-
pending.delete(path);
|
|
281
|
-
}
|
|
282
|
-
finally {
|
|
283
|
-
running = false;
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
const flush = async () => {
|
|
287
|
-
let committed = 0;
|
|
288
|
-
for (const project of await opts.projects().catch(() => [])) {
|
|
289
|
-
const outcome = await commitConversations(project.path, git, exists);
|
|
290
|
-
if (outcome.committed) {
|
|
291
|
-
pending.delete(project.path);
|
|
292
|
-
committed++;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
return committed;
|
|
296
|
-
};
|
|
297
|
-
void poll();
|
|
298
|
-
const timer = setInterval(() => void poll(), intervalMs);
|
|
299
|
-
timer.unref?.();
|
|
300
|
-
return {
|
|
301
|
-
stop: () => {
|
|
302
|
-
stopped = true;
|
|
303
|
-
clearInterval(timer);
|
|
304
|
-
},
|
|
305
|
-
poll,
|
|
306
|
-
flush,
|
|
307
|
-
};
|
|
308
|
-
}
|
|
309
|
-
//# sourceMappingURL=conversation-commit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversation-commit.js","sourceRoot":"","sources":["../src/conversation-commit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,qGAAqG;AACrG,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,iBAAiB,IAAI,iBAAiB,EAAE,CAAA;AAEjF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,iBAAiB,MAAM,YAAY,KAAK,CAAA;AAEnF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAsB,CAAC,sBAAsB,EAAE,iBAAiB,CAAC,CAAA;AAEjG;;;;GAIG;AACH,MAAM,mBAAmB,GAAiF;IACxG,CAAC,sBAAsB,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,sBAAsB,GAAG,CAAC,CAAC;IAC/E,CAAC,iBAAiB,EAAE,IAAI,CAAC,EAAE,CAAC,IA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,CAAC,GAAG,EAAE,CAAC,KAAK,IAAI,EAAE,EAAE,UAAU,CAAC,CAAA;IACxD,KAAK,CAAC,KAAK,EAAE,EAAE,CAAA;IACf,OAAO;QACL,IAAI,EAAE,GAAG,EAAE;YACT,OAAO,GAAG,IAAI,CAAA;YACd,aAAa,CAAC,KAAK,CAAC,CAAA;QACtB,CAAC;QACD,IAAI;QACJ,KAAK;KACN,CAAA;AACH,CAAC"}
|
package/dist/conversations.d.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { type StoreFs } from './store/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* The committed conversations (#908): the human turns and the agent's replies of a run, kept in
|
|
4
|
-
* the Git repo so a clone carries the chat and not just the fact a run happened (#857).
|
|
5
|
-
*
|
|
6
|
-
* Deliberately not the verbose transcript — #857 leaves the tool-call-level log to the model
|
|
7
|
-
* provider, which is also the standing policy in run-store.ts. What lands here is what a person
|
|
8
|
-
* would reread: what was asked, and what came back.
|
|
9
|
-
*
|
|
10
|
-
* One file per run rather than one shared file, because run worktrees are live concurrently and
|
|
11
|
-
* each auto-commits its own pending work on teardown; a shared file would be a merge conflict
|
|
12
|
-
* every time two runs chatted at once. The run id is the join key back to the `- run:` field
|
|
13
|
-
* LOGS.md records (#898), so the committed session list and the committed chat line up.
|
|
14
|
-
*
|
|
15
|
-
* Pure core over the same {@link StoreFs} seam as logs.ts.
|
|
16
|
-
*/
|
|
17
|
-
/** The directory, under `.the-framework/`, that holds one markdown file per conversation. */
|
|
18
|
-
export declare const CONVERSATIONS_DIR = "conversations";
|
|
19
|
-
/**
|
|
20
|
-
* The `.the-framework/.gitignore` that keeps run state transient while committing the DB. The
|
|
21
|
-
* conversations rules need both entries: the `*` rule makes git skip the directory without ever
|
|
22
|
-
* descending into it, so un-ignoring the files alone would never be reached.
|
|
23
|
-
*/
|
|
24
|
-
export declare const CONVERSATIONS_GITIGNORE = "!conversations/\n!conversations/**\n";
|
|
25
|
-
/** Who said it. The transport is {@link ConversationMessage.via}, not this. */
|
|
26
|
-
export type ConversationRole = 'user' | 'agent';
|
|
27
|
-
/** One turn in a conversation. */
|
|
28
|
-
export interface ConversationMessage {
|
|
29
|
-
/** ISO timestamp. */
|
|
30
|
-
at: string;
|
|
31
|
-
role: ConversationRole;
|
|
32
|
-
/**
|
|
33
|
-
* The surface the turn came through — `dashboard`, `discord`, … Recorded so a conversation
|
|
34
|
-
* read back shows where it happened, while this module stays free of any transport.
|
|
35
|
-
*/
|
|
36
|
-
via: string;
|
|
37
|
-
/** The message. Multi-line and kept that way; only line-leading markers are escaped. */
|
|
38
|
-
text: string;
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* Whether a transport name is safe to record. Exported because #917 lets a surface name itself
|
|
42
|
-
* over the control channel, so the name now arrives from outside this module: a `via` carrying
|
|
43
|
-
* the heading separator, a newline or a `#` would forge structure in a file whose entries are
|
|
44
|
-
* line-parsed, exactly the way #897 forged a LOGS.md title. Checked at the boundary rather than
|
|
45
|
-
* trusted, and the same predicate {@link parseConversation} reads back with.
|
|
46
|
-
*/
|
|
47
|
-
export declare function isSafeVia(via: unknown): via is string;
|
|
48
|
-
/**
|
|
49
|
-
* Escape a message body so it cannot forge structure (#897's threat model, applied to a
|
|
50
|
-
* transcript). LOGS.md collapses free text to one line, which is right for a line-parsed record
|
|
51
|
-
* and wrong here: a multi-paragraph reply has to stay readable in a `git diff`. So the text stays
|
|
52
|
-
* as written and only a line's leading `#` or `\` is escaped, which is enough — an entry is only
|
|
53
|
-
* ever started by a line beginning `## `. Reversed by {@link unescapeBody}.
|
|
54
|
-
*/
|
|
55
|
-
export declare function escapeBody(text: string): string;
|
|
56
|
-
/** Reverse {@link escapeBody}. */
|
|
57
|
-
export declare function unescapeBody(text: string): string;
|
|
58
|
-
/** The directory holding every conversation under `cwd`. */
|
|
59
|
-
export declare function conversationsDir(cwd: string): string;
|
|
60
|
-
/**
|
|
61
|
-
* One conversation's path. `undefined` for an unsafe run id: the id reaches this from a run
|
|
62
|
-
* store and, once #680 lands, indirectly from a chat surface, so it is checked rather than
|
|
63
|
-
* trusted into a path.
|
|
64
|
-
*/
|
|
65
|
-
export declare function conversationPath(cwd: string, runId: string): string | undefined;
|
|
66
|
-
/** Markdown for one message, starting at `## ` (no file header, no blank lines around it). */
|
|
67
|
-
export declare function renderMessage(message: ConversationMessage): string;
|
|
68
|
-
/**
|
|
69
|
-
* Parse every message out of the markdown, in file order (append order, so oldest-first — a
|
|
70
|
-
* transcript reads forwards, unlike the newest-first project log). Forgiving: a malformed or
|
|
71
|
-
* torn message is skipped, never thrown.
|
|
72
|
-
*/
|
|
73
|
-
export declare function parseConversation(md: string): ConversationMessage[];
|
|
74
|
-
/**
|
|
75
|
-
* Make sure `.the-framework/.gitignore` un-ignores the conversations dir, returning whether it
|
|
76
|
-
* wrote. Done lazily on append rather than only at install time: the seeded ignore file is
|
|
77
|
-
* written once and only when absent (`install.ts`), so every repo activated before this feature
|
|
78
|
-
* still carries the old three-line allow-list and would silently drop its own conversations.
|
|
79
|
-
*
|
|
80
|
-
* Only ours is upgraded — a file we do not recognize is left alone rather than appended to.
|
|
81
|
-
*/
|
|
82
|
-
export declare function ensureConversationsIgnored(cwd: string, fs?: StoreFs): Promise<boolean>;
|
|
83
|
-
/**
|
|
84
|
-
* Append one message to `.the-framework/conversations/<runId>.md`, creating the dir, the
|
|
85
|
-
* one-time file header, and the ignore rule when absent. A raw write (may reject); the caller
|
|
86
|
-
* decides best-effort. A no-op for an unsafe run id.
|
|
87
|
-
*/
|
|
88
|
-
export declare function appendMessage(cwd: string, runId: string, message: ConversationMessage, fs?: StoreFs): Promise<void>;
|
|
89
|
-
/** Read one conversation, oldest-first. Missing file (or unsafe id) yields `[]`. */
|
|
90
|
-
export declare function readConversation(cwd: string, runId: string, fs?: StoreFs): Promise<ConversationMessage[]>;
|
|
91
|
-
/** The run ids that have a committed conversation, sorted. Missing dir yields `[]`. */
|
|
92
|
-
export declare function listConversations(cwd: string, fs?: StoreFs): Promise<string[]>;
|
|
93
|
-
//# sourceMappingURL=conversations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../src/conversations.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAEzE;;;;;;;;;;;;;;GAcG;AAEH,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,kBAAkB,CAAA;AAEhD;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,yCAAuD,CAAA;AAE3F,+EAA+E;AAC/E,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,CAAA;AAE/C,kCAAkC;AAClC,MAAM,WAAW,mBAAmB;IAClC,qBAAqB;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,gBAAgB,CAAA;IACtB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;IACX,wFAAwF;IACxF,IAAI,EAAE,MAAM,CAAA;CACb;AAUD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAErD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE/C;AAED,kCAAkC;AAClC,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEjD;AAOD,4DAA4D;AAC5D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG/E;AAED,8FAA8F;AAC9F,wBAAgB,aAAa,CAAC,OAAO,EAAE,mBAAmB,GAAG,MAAM,CAElE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,EAAE,CAmBnE;AAoBD;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAE,OAAuB,GAAG,OAAO,CAAC,OAAO,CAAC,CAW3G;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,mBAAmB,EAC5B,EAAE,GAAE,OAAuB,GAC1B,OAAO,CAAC,IAAI,CAAC,CAOf;AAED,oFAAoF;AACpF,wBAAsB,gBAAgB,CACpC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,EAAE,GAAE,OAAuB,GAC1B,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAIhC;AAED,uFAAuF;AACvF,wBAAsB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,GAAE,OAAuB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAOnG"}
|
package/dist/conversations.js
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { join } from 'node:path';
|
|
2
|
-
import { THE_FRAMEWORK_DIR } from './framework-dir.js';
|
|
3
|
-
import { gitignorePath, LOGS_GITIGNORE } from './logs.js';
|
|
4
|
-
import { isSafeRunId, nodeStoreFs } from './store/index.js';
|
|
5
|
-
/**
|
|
6
|
-
* The committed conversations (#908): the human turns and the agent's replies of a run, kept in
|
|
7
|
-
* the Git repo so a clone carries the chat and not just the fact a run happened (#857).
|
|
8
|
-
*
|
|
9
|
-
* Deliberately not the verbose transcript — #857 leaves the tool-call-level log to the model
|
|
10
|
-
* provider, which is also the standing policy in run-store.ts. What lands here is what a person
|
|
11
|
-
* would reread: what was asked, and what came back.
|
|
12
|
-
*
|
|
13
|
-
* One file per run rather than one shared file, because run worktrees are live concurrently and
|
|
14
|
-
* each auto-commits its own pending work on teardown; a shared file would be a merge conflict
|
|
15
|
-
* every time two runs chatted at once. The run id is the join key back to the `- run:` field
|
|
16
|
-
* LOGS.md records (#898), so the committed session list and the committed chat line up.
|
|
17
|
-
*
|
|
18
|
-
* Pure core over the same {@link StoreFs} seam as logs.ts.
|
|
19
|
-
*/
|
|
20
|
-
/** The directory, under `.the-framework/`, that holds one markdown file per conversation. */
|
|
21
|
-
export const CONVERSATIONS_DIR = 'conversations';
|
|
22
|
-
/**
|
|
23
|
-
* The `.the-framework/.gitignore` that keeps run state transient while committing the DB. The
|
|
24
|
-
* conversations rules need both entries: the `*` rule makes git skip the directory without ever
|
|
25
|
-
* descending into it, so un-ignoring the files alone would never be reached.
|
|
26
|
-
*/
|
|
27
|
-
export const CONVERSATIONS_GITIGNORE = `!${CONVERSATIONS_DIR}/\n!${CONVERSATIONS_DIR}/**\n`;
|
|
28
|
-
const ROLES = ['user', 'agent'];
|
|
29
|
-
/** Heading field separator, matching LOGS.md: a middle dot (U+00B7) with a space on each side. */
|
|
30
|
-
const SEP = ' · ';
|
|
31
|
-
/** A transport name is a plain word, so it can never carry the heading separator into a heading. */
|
|
32
|
-
const VIA = /^[A-Za-z0-9_-]+$/;
|
|
33
|
-
/**
|
|
34
|
-
* Whether a transport name is safe to record. Exported because #917 lets a surface name itself
|
|
35
|
-
* over the control channel, so the name now arrives from outside this module: a `via` carrying
|
|
36
|
-
* the heading separator, a newline or a `#` would forge structure in a file whose entries are
|
|
37
|
-
* line-parsed, exactly the way #897 forged a LOGS.md title. Checked at the boundary rather than
|
|
38
|
-
* trusted, and the same predicate {@link parseConversation} reads back with.
|
|
39
|
-
*/
|
|
40
|
-
export function isSafeVia(via) {
|
|
41
|
-
return typeof via === 'string' && VIA.test(via);
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Escape a message body so it cannot forge structure (#897's threat model, applied to a
|
|
45
|
-
* transcript). LOGS.md collapses free text to one line, which is right for a line-parsed record
|
|
46
|
-
* and wrong here: a multi-paragraph reply has to stay readable in a `git diff`. So the text stays
|
|
47
|
-
* as written and only a line's leading `#` or `\` is escaped, which is enough — an entry is only
|
|
48
|
-
* ever started by a line beginning `## `. Reversed by {@link unescapeBody}.
|
|
49
|
-
*/
|
|
50
|
-
export function escapeBody(text) {
|
|
51
|
-
return text.replace(/^([\\#])/gm, '\\$1');
|
|
52
|
-
}
|
|
53
|
-
/** Reverse {@link escapeBody}. */
|
|
54
|
-
export function unescapeBody(text) {
|
|
55
|
-
return text.replace(/^\\([\\#])/gm, '$1');
|
|
56
|
-
}
|
|
57
|
-
/** The one-time first line of a conversation file. */
|
|
58
|
-
function conversationHeader(runId) {
|
|
59
|
-
return `# Conversation ${runId}\n`;
|
|
60
|
-
}
|
|
61
|
-
/** The directory holding every conversation under `cwd`. */
|
|
62
|
-
export function conversationsDir(cwd) {
|
|
63
|
-
return join(cwd, THE_FRAMEWORK_DIR, CONVERSATIONS_DIR);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* One conversation's path. `undefined` for an unsafe run id: the id reaches this from a run
|
|
67
|
-
* store and, once #680 lands, indirectly from a chat surface, so it is checked rather than
|
|
68
|
-
* trusted into a path.
|
|
69
|
-
*/
|
|
70
|
-
export function conversationPath(cwd, runId) {
|
|
71
|
-
if (!isSafeRunId(runId))
|
|
72
|
-
return undefined;
|
|
73
|
-
return join(conversationsDir(cwd), `${runId}.md`);
|
|
74
|
-
}
|
|
75
|
-
/** Markdown for one message, starting at `## ` (no file header, no blank lines around it). */
|
|
76
|
-
export function renderMessage(message) {
|
|
77
|
-
return `## ${message.at}${SEP}${message.role}${SEP}${message.via}\n\n${escapeBody(message.text)}`;
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Parse every message out of the markdown, in file order (append order, so oldest-first — a
|
|
81
|
-
* transcript reads forwards, unlike the newest-first project log). Forgiving: a malformed or
|
|
82
|
-
* torn message is skipped, never thrown.
|
|
83
|
-
*/
|
|
84
|
-
export function parseConversation(md) {
|
|
85
|
-
const messages = [];
|
|
86
|
-
let block;
|
|
87
|
-
const flush = () => {
|
|
88
|
-
const message = block && parseMessage(block);
|
|
89
|
-
if (message)
|
|
90
|
-
messages.push(message);
|
|
91
|
-
block = undefined;
|
|
92
|
-
};
|
|
93
|
-
for (const line of md.split('\n')) {
|
|
94
|
-
if (line.startsWith('## ')) {
|
|
95
|
-
flush();
|
|
96
|
-
block = [line];
|
|
97
|
-
}
|
|
98
|
-
else if (block) {
|
|
99
|
-
block.push(line);
|
|
100
|
-
}
|
|
101
|
-
// Anything before the first `## ` (the file header) is ignored.
|
|
102
|
-
}
|
|
103
|
-
flush();
|
|
104
|
-
return messages;
|
|
105
|
-
}
|
|
106
|
-
/** Parse one `## `-headed block; `undefined` when a required field is missing/invalid. */
|
|
107
|
-
function parseMessage(lines) {
|
|
108
|
-
const heading = lines[0]?.slice('## '.length) ?? '';
|
|
109
|
-
const parts = heading.split(SEP);
|
|
110
|
-
const at = parts[0];
|
|
111
|
-
const role = parts[1];
|
|
112
|
-
const via = parts[2];
|
|
113
|
-
if (!at || !role || !via || !ROLES.includes(role) || !VIA.test(via))
|
|
114
|
-
return undefined;
|
|
115
|
-
// A heading carries exactly three fields; anything more is not one of ours.
|
|
116
|
-
if (parts.length !== 3)
|
|
117
|
-
return undefined;
|
|
118
|
-
// Drop the blank line the renderer puts under the heading, and any trailing blank lines that
|
|
119
|
-
// are really the separator before the next message.
|
|
120
|
-
const body = lines.slice(1).join('\n').replace(/^\n/, '').replace(/\n+$/, '');
|
|
121
|
-
return { at, role: role, via, text: unescapeBody(body) };
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Make sure `.the-framework/.gitignore` un-ignores the conversations dir, returning whether it
|
|
125
|
-
* wrote. Done lazily on append rather than only at install time: the seeded ignore file is
|
|
126
|
-
* written once and only when absent (`install.ts`), so every repo activated before this feature
|
|
127
|
-
* still carries the old three-line allow-list and would silently drop its own conversations.
|
|
128
|
-
*
|
|
129
|
-
* Only ours is upgraded — a file we do not recognize is left alone rather than appended to.
|
|
130
|
-
*/
|
|
131
|
-
export async function ensureConversationsIgnored(cwd, fs = nodeStoreFs()) {
|
|
132
|
-
const path = gitignorePath(cwd);
|
|
133
|
-
if (!(await fs.exists(path))) {
|
|
134
|
-
await fs.write(path, LOGS_GITIGNORE + CONVERSATIONS_GITIGNORE);
|
|
135
|
-
return true;
|
|
136
|
-
}
|
|
137
|
-
const current = await fs.read(path);
|
|
138
|
-
if (current.includes(`!${CONVERSATIONS_DIR}/**`))
|
|
139
|
-
return false;
|
|
140
|
-
if (!current.includes('!LOGS.md'))
|
|
141
|
-
return false;
|
|
142
|
-
await fs.write(path, current.endsWith('\n') ? current + CONVERSATIONS_GITIGNORE : current + '\n' + CONVERSATIONS_GITIGNORE);
|
|
143
|
-
return true;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Append one message to `.the-framework/conversations/<runId>.md`, creating the dir, the
|
|
147
|
-
* one-time file header, and the ignore rule when absent. A raw write (may reject); the caller
|
|
148
|
-
* decides best-effort. A no-op for an unsafe run id.
|
|
149
|
-
*/
|
|
150
|
-
export async function appendMessage(cwd, runId, message, fs = nodeStoreFs()) {
|
|
151
|
-
const path = conversationPath(cwd, runId);
|
|
152
|
-
if (!path)
|
|
153
|
-
return;
|
|
154
|
-
await fs.mkdir(conversationsDir(cwd));
|
|
155
|
-
await ensureConversationsIgnored(cwd, fs);
|
|
156
|
-
if (!(await fs.exists(path)))
|
|
157
|
-
await fs.write(path, conversationHeader(runId));
|
|
158
|
-
await fs.append(path, '\n' + renderMessage(message) + '\n');
|
|
159
|
-
}
|
|
160
|
-
/** Read one conversation, oldest-first. Missing file (or unsafe id) yields `[]`. */
|
|
161
|
-
export async function readConversation(cwd, runId, fs = nodeStoreFs()) {
|
|
162
|
-
const path = conversationPath(cwd, runId);
|
|
163
|
-
if (!path || !(await fs.exists(path)))
|
|
164
|
-
return [];
|
|
165
|
-
return parseConversation(await fs.read(path));
|
|
166
|
-
}
|
|
167
|
-
/** The run ids that have a committed conversation, sorted. Missing dir yields `[]`. */
|
|
168
|
-
export async function listConversations(cwd, fs = nodeStoreFs()) {
|
|
169
|
-
const names = await fs.readdir(conversationsDir(cwd)).catch(() => []);
|
|
170
|
-
return names
|
|
171
|
-
.filter(name => name.endsWith('.md'))
|
|
172
|
-
.map(name => name.slice(0, -'.md'.length))
|
|
173
|
-
.filter(isSafeRunId)
|
|
174
|
-
.sort();
|
|
175
|
-
}
|
|
176
|
-
//# sourceMappingURL=conversations.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversations.js","sourceRoot":"","sources":["../src/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAgB,MAAM,kBAAkB,CAAA;AAEzE;;;;;;;;;;;;;;GAcG;AAEH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAA;AAEhD;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,iBAAiB,OAAO,iBAAiB,OAAO,CAAA;AAmB3F,MAAM,KAAK,GAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAElD,kGAAkG;AAClG,MAAM,GAAG,GAAG,KAAK,CAAA;AAEjB,oGAAoG;AACpG,MAAM,GAAG,GAAG,kBAAkB,CAAA;AAE9B;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAY;IACpC,OAAO,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,CAAA;AAC3C,CAAC;AAED,kCA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type FileBranchWrite, type GitRunner } from '@gemstack/agent-data';
|
|
2
|
-
/**
|
|
3
|
-
* The daemon's own writes to the `agent-data` branch, told apart from everyone else's.
|
|
4
|
-
*
|
|
5
|
-
* The daemon starts a run when the branch moved by a commit it did not write itself: someone
|
|
6
|
-
* queued work, an agent claimed or closed a ticket. Its own commits — a run's record at teardown, a
|
|
7
|
-
* routine lock, a claim minted for a plan agent — must not count, or every record it writes would
|
|
8
|
-
* start the next run, forever. And the branch is shared: another machine's daemon writes records
|
|
9
|
-
* too, and two daemons reading each other's records as work would fire empty runs at each other
|
|
10
|
-
* without end. So every automatic write goes through {@link daemonFunnel}, which signs the commit
|
|
11
|
-
* with a git trailer naming the machine, and the trigger counts only the commits that carry none.
|
|
12
|
-
*
|
|
13
|
-
* A write a person makes from the dashboard (queue an entry, release a claim) takes the skills'
|
|
14
|
-
* plain funnel and carries no trailer: a person asking for work is exactly what should start a run.
|
|
15
|
-
*/
|
|
16
|
-
/** The trailer key on every commit a daemon writes on its own: `Daemon: <machine name>`. */
|
|
17
|
-
export declare const DAEMON_TRAILER = "Daemon";
|
|
18
|
-
/** A write funnel to the data branch, the shape every skill library accepts. */
|
|
19
|
-
export type DataFunnel = (root: string, message: CommitMessage, op: (dir: string) => Promise<void>) => Promise<FileBranchWrite>;
|
|
20
|
-
/**
|
|
21
|
-
* The persistent checkout's write cycle on the `agent-data` branch, every commit signed
|
|
22
|
-
* `Daemon: <host>` as its last line. One per daemon; `host` is a test seam.
|
|
23
|
-
*/
|
|
24
|
-
export declare function daemonFunnel(host?: string): DataFunnel;
|
|
25
|
-
/** The local head of the `agent-data` branch, or `undefined` when the repo has no such branch yet. */
|
|
26
|
-
export declare function dataHead(repo: string, git?: GitRunner): Promise<string | undefined>;
|
|
27
|
-
/**
|
|
28
|
-
* How many commits `from..to` on the branch were written by something other than a daemon: the
|
|
29
|
-
* ones with no `Daemon:` trailer. A range git cannot walk (a `from` rebased away) counts as none;
|
|
30
|
-
* the daily heartbeat is the belt for that.
|
|
31
|
-
*/
|
|
32
|
-
export declare function foreignCommits(repo: string, from: string, to: string, git?: GitRunner): Promise<number>;
|
|
33
|
-
//# sourceMappingURL=daemon-writes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daemon-writes.d.ts","sourceRoot":"","sources":["../src/daemon-writes.ts"],"names":[],"mappings":"AACA,OAAO,EAA8C,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAE3I;;;;;;;;;;;;;GAaG;AAEH,4FAA4F;AAC5F,eAAO,MAAM,cAAc,WAAW,CAAA;AAEtC,gFAAgF;AAChF,MAAM,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,eAAe,CAAC,CAAA;AAE/H;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,MAAmB,GAAG,UAAU,CAGlE;AAED,sGAAsG;AACtG,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAK1G;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,GAAE,SAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,CAQ9H"}
|