@openagt/dashboard 0.0.0-stage → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +125 -2
- package/dist/agent-archive.d.ts +35 -0
- package/dist/agent-archive.d.ts.map +1 -0
- package/dist/agent-archive.js +67 -0
- package/dist/agent-archive.js.map +1 -0
- package/dist/agent-commit.d.ts +140 -0
- package/dist/agent-commit.d.ts.map +1 -0
- package/dist/agent-commit.js +254 -0
- package/dist/agent-commit.js.map +1 -0
- package/dist/agent-driver.d.ts +28 -0
- package/dist/agent-driver.d.ts.map +1 -0
- package/dist/agent-driver.js +18 -0
- package/dist/agent-driver.js.map +1 -0
- package/dist/agent-id.d.ts +13 -0
- package/dist/agent-id.d.ts.map +1 -0
- package/dist/agent-id.js +20 -0
- package/dist/agent-id.js.map +1 -0
- package/dist/agent-location.d.ts +11 -0
- package/dist/agent-location.d.ts.map +1 -0
- package/dist/agent-location.js +10 -0
- package/dist/agent-location.js.map +1 -0
- package/dist/agent-locks.d.ts +3 -0
- package/dist/agent-locks.d.ts.map +1 -0
- package/dist/agent-locks.js +40 -0
- package/dist/agent-locks.js.map +1 -0
- package/dist/agent-messages.d.ts +55 -0
- package/dist/agent-messages.d.ts.map +1 -0
- package/dist/agent-messages.js +73 -0
- package/dist/agent-messages.js.map +1 -0
- package/dist/agent-names.d.ts +24 -0
- package/dist/agent-names.d.ts.map +1 -0
- package/dist/agent-names.js +33 -0
- package/dist/agent-names.js.map +1 -0
- package/dist/agent-options.d.ts +45 -0
- package/dist/agent-options.d.ts.map +1 -0
- package/dist/agent-options.js +83 -0
- package/dist/agent-options.js.map +1 -0
- package/dist/agent-spec.d.ts +56 -0
- package/dist/agent-spec.d.ts.map +1 -0
- package/dist/agent-spec.js +56 -0
- package/dist/agent-spec.js.map +1 -0
- package/dist/agent-telemetry.d.ts +88 -0
- package/dist/agent-telemetry.d.ts.map +1 -0
- package/dist/agent-telemetry.js +97 -0
- package/dist/agent-telemetry.js.map +1 -0
- package/dist/agent-view.d.ts +39 -0
- package/dist/agent-view.d.ts.map +1 -0
- package/dist/agent-view.js +45 -0
- package/dist/agent-view.js.map +1 -0
- package/dist/agent.d.ts +113 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +168 -0
- package/dist/agent.js.map +1 -0
- package/dist/archived-agent-patch.d.ts +14 -0
- package/dist/archived-agent-patch.d.ts.map +1 -0
- package/dist/archived-agent-patch.js +22 -0
- package/dist/archived-agent-patch.js.map +1 -0
- package/dist/auto-pm.d.ts +538 -0
- package/dist/auto-pm.d.ts.map +1 -0
- package/dist/auto-pm.js +707 -0
- package/dist/auto-pm.js.map +1 -0
- package/dist/await-gate.d.ts +184 -0
- package/dist/await-gate.d.ts.map +1 -0
- package/dist/await-gate.js +252 -0
- package/dist/await-gate.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +11 -0
- package/dist/bin.js.map +1 -0
- package/dist/branch-links-pass.d.ts +15 -0
- package/dist/branch-links-pass.d.ts.map +1 -0
- package/dist/branch-links-pass.js +13 -0
- package/dist/branch-links-pass.js.map +1 -0
- package/dist/branch-links.d.ts +53 -0
- package/dist/branch-links.d.ts.map +1 -0
- package/dist/branch-links.js +94 -0
- package/dist/branch-links.js.map +1 -0
- package/dist/branch-name.d.ts +8 -0
- package/dist/branch-name.d.ts.map +1 -0
- package/dist/branch-name.js +20 -0
- package/dist/branch-name.js.map +1 -0
- package/dist/branch-names.d.ts +57 -0
- package/dist/branch-names.d.ts.map +1 -0
- package/dist/branch-names.js +72 -0
- package/dist/branch-names.js.map +1 -0
- package/dist/bridge-browser.d.ts +217 -0
- package/dist/bridge-browser.d.ts.map +1 -0
- package/dist/bridge-browser.js +520 -0
- package/dist/bridge-browser.js.map +1 -0
- package/dist/browser-stream.d.ts +20 -0
- package/dist/browser-stream.d.ts.map +1 -0
- package/dist/browser-stream.js +51 -0
- package/dist/browser-stream.js.map +1 -0
- package/dist/browser.d.ts +16 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +38 -0
- package/dist/browser.js.map +1 -0
- package/dist/built-in.d.ts +29 -0
- package/dist/built-in.d.ts.map +1 -0
- package/dist/built-in.js +78 -0
- package/dist/built-in.js.map +1 -0
- package/dist/chrome-extension/background.js +532 -0
- package/dist/chrome-extension/content.js +1475 -0
- package/dist/chrome-extension/driver-plan.js +41 -0
- package/dist/chrome-extension/fingerprint.js +43 -0
- package/dist/chrome-extension/manifest.json +31 -0
- package/dist/chrome-extension/options.html +48 -0
- package/dist/chrome-extension/options.js +122 -0
- package/dist/ci-watch.d.ts +123 -0
- package/dist/ci-watch.d.ts.map +1 -0
- package/dist/ci-watch.js +228 -0
- package/dist/ci-watch.js.map +1 -0
- package/dist/claude-trust.d.ts +16 -0
- package/dist/claude-trust.d.ts.map +1 -0
- package/dist/claude-trust.js +72 -0
- package/dist/claude-trust.js.map +1 -0
- package/dist/cli-exec.d.ts +36 -0
- package/dist/cli-exec.d.ts.map +1 -0
- package/dist/cli-exec.js +44 -0
- package/dist/cli-exec.js.map +1 -0
- package/dist/cli.d.ts +43 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +186 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +16 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +30 -0
- package/dist/client.js.map +1 -0
- package/dist/closing-keywords.d.ts +28 -0
- package/dist/closing-keywords.d.ts.map +1 -0
- package/dist/closing-keywords.js +49 -0
- package/dist/closing-keywords.js.map +1 -0
- package/dist/cloud-run-state.d.ts +27 -0
- package/dist/cloud-run-state.d.ts.map +1 -0
- package/dist/cloud-run-state.js +36 -0
- package/dist/cloud-run-state.js.map +1 -0
- package/dist/cloud-scratch-refs.d.ts +85 -0
- package/dist/cloud-scratch-refs.d.ts.map +1 -0
- package/dist/cloud-scratch-refs.js +275 -0
- package/dist/cloud-scratch-refs.js.map +1 -0
- package/dist/cloud-work.d.ts +66 -0
- package/dist/cloud-work.d.ts.map +1 -0
- package/dist/cloud-work.js +204 -0
- package/dist/cloud-work.js.map +1 -0
- package/dist/config-layers.d.ts +62 -0
- package/dist/config-layers.d.ts.map +1 -0
- package/dist/config-layers.js +70 -0
- package/dist/config-layers.js.map +1 -0
- package/dist/config.d.ts +54 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +78 -0
- package/dist/config.js.map +1 -0
- package/dist/consumption-guard.d.ts +53 -0
- package/dist/consumption-guard.d.ts.map +1 -0
- package/dist/consumption-guard.js +69 -0
- package/dist/consumption-guard.js.map +1 -0
- package/dist/control.d.ts +75 -0
- package/dist/control.d.ts.map +1 -0
- package/dist/control.js +68 -0
- package/dist/control.js.map +1 -0
- package/dist/conversation-commit.d.ts +166 -0
- package/dist/conversation-commit.d.ts.map +1 -0
- package/dist/conversation-commit.js +309 -0
- package/dist/conversation-commit.js.map +1 -0
- package/dist/conversations.d.ts +93 -0
- package/dist/conversations.d.ts.map +1 -0
- package/dist/conversations.js +176 -0
- package/dist/conversations.js.map +1 -0
- package/dist/daemon-runtime.d.ts +41 -0
- package/dist/daemon-runtime.d.ts.map +1 -0
- package/dist/daemon-runtime.js +133 -0
- package/dist/daemon-runtime.js.map +1 -0
- package/dist/daemon-services.d.ts +36 -0
- package/dist/daemon-services.d.ts.map +1 -0
- package/dist/daemon-services.js +120 -0
- package/dist/daemon-services.js.map +1 -0
- package/dist/daemon-tick.d.ts +68 -0
- package/dist/daemon-tick.d.ts.map +1 -0
- package/dist/daemon-tick.js +97 -0
- package/dist/daemon-tick.js.map +1 -0
- package/dist/daemon-writes.d.ts +33 -0
- package/dist/daemon-writes.d.ts.map +1 -0
- package/dist/daemon-writes.js +45 -0
- package/dist/daemon-writes.js.map +1 -0
- package/dist/daemon.d.ts +76 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +225 -0
- package/dist/daemon.js.map +1 -0
- package/dist/dashboard/activity.d.ts +41 -0
- package/dist/dashboard/activity.d.ts.map +1 -0
- package/dist/dashboard/activity.js +56 -0
- package/dist/dashboard/activity.js.map +1 -0
- package/dist/dashboard/agent-handoff.d.ts +244 -0
- package/dist/dashboard/agent-handoff.d.ts.map +1 -0
- package/dist/dashboard/agent-handoff.js +310 -0
- package/dist/dashboard/agent-handoff.js.map +1 -0
- package/dist/dashboard/agent-tree.d.ts +106 -0
- package/dist/dashboard/agent-tree.d.ts.map +1 -0
- package/dist/dashboard/agent-tree.js +180 -0
- package/dist/dashboard/agent-tree.js.map +1 -0
- package/dist/dashboard/bridge-endpoints.d.ts +158 -0
- package/dist/dashboard/bridge-endpoints.d.ts.map +1 -0
- package/dist/dashboard/bridge-endpoints.js +382 -0
- package/dist/dashboard/bridge-endpoints.js.map +1 -0
- package/dist/dashboard/bridge-question.d.ts +33 -0
- package/dist/dashboard/bridge-question.d.ts.map +1 -0
- package/dist/dashboard/bridge-question.js +20 -0
- package/dist/dashboard/bridge-question.js.map +1 -0
- package/dist/dashboard/bridge-sessions.d.ts +25 -0
- package/dist/dashboard/bridge-sessions.d.ts.map +1 -0
- package/dist/dashboard/bridge-sessions.js +46 -0
- package/dist/dashboard/bridge-sessions.js.map +1 -0
- package/dist/dashboard/bridge-starts.d.ts +61 -0
- package/dist/dashboard/bridge-starts.d.ts.map +1 -0
- package/dist/dashboard/bridge-starts.js +94 -0
- package/dist/dashboard/bridge-starts.js.map +1 -0
- package/dist/dashboard/bridge-store.d.ts +179 -0
- package/dist/dashboard/bridge-store.d.ts.map +1 -0
- package/dist/dashboard/bridge-store.js +262 -0
- package/dist/dashboard/bridge-store.js.map +1 -0
- package/dist/dashboard/browser-proxy.d.ts +41 -0
- package/dist/dashboard/browser-proxy.d.ts.map +1 -0
- package/dist/dashboard/browser-proxy.js +96 -0
- package/dist/dashboard/browser-proxy.js.map +1 -0
- package/dist/dashboard/bundle.d.ts +12 -0
- package/dist/dashboard/bundle.d.ts.map +1 -0
- package/dist/dashboard/bundle.js +22 -0
- package/dist/dashboard/bundle.js.map +1 -0
- package/dist/dashboard/cache.d.ts +47 -0
- package/dist/dashboard/cache.d.ts.map +1 -0
- package/dist/dashboard/cache.js +87 -0
- package/dist/dashboard/cache.js.map +1 -0
- package/dist/dashboard/content-type.d.ts +3 -0
- package/dist/dashboard/content-type.d.ts.map +1 -0
- package/dist/dashboard/content-type.js +31 -0
- package/dist/dashboard/content-type.js.map +1 -0
- package/dist/dashboard/dashboard.d.ts +38 -0
- package/dist/dashboard/dashboard.d.ts.map +1 -0
- package/dist/dashboard/dashboard.js +42 -0
- package/dist/dashboard/dashboard.js.map +1 -0
- package/dist/dashboard/discord-webhook.d.ts +17 -0
- package/dist/dashboard/discord-webhook.d.ts.map +1 -0
- package/dist/dashboard/discord-webhook.js +36 -0
- package/dist/dashboard/discord-webhook.js.map +1 -0
- package/dist/dashboard/docs.d.ts +39 -0
- package/dist/dashboard/docs.d.ts.map +1 -0
- package/dist/dashboard/docs.js +59 -0
- package/dist/dashboard/docs.js.map +1 -0
- package/dist/dashboard/file-diff.d.ts +67 -0
- package/dist/dashboard/file-diff.d.ts.map +1 -0
- package/dist/dashboard/file-diff.js +132 -0
- package/dist/dashboard/file-diff.js.map +1 -0
- package/dist/dashboard/file-read.d.ts +42 -0
- package/dist/dashboard/file-read.d.ts.map +1 -0
- package/dist/dashboard/file-read.js +69 -0
- package/dist/dashboard/file-read.js.map +1 -0
- package/dist/dashboard/file-status.d.ts +21 -0
- package/dist/dashboard/file-status.d.ts.map +1 -0
- package/dist/dashboard/file-status.js +37 -0
- package/dist/dashboard/file-status.js.map +1 -0
- package/dist/dashboard/gh.d.ts +131 -0
- package/dist/dashboard/gh.d.ts.map +1 -0
- package/dist/dashboard/gh.js +150 -0
- package/dist/dashboard/gh.js.map +1 -0
- package/dist/dashboard/git-status.d.ts +44 -0
- package/dist/dashboard/git-status.d.ts.map +1 -0
- package/dist/dashboard/git-status.js +37 -0
- package/dist/dashboard/git-status.js.map +1 -0
- package/dist/dashboard/github.d.ts +11 -0
- package/dist/dashboard/github.d.ts.map +1 -0
- package/dist/dashboard/github.js +33 -0
- package/dist/dashboard/github.js.map +1 -0
- package/dist/dashboard/http.d.ts +29 -0
- package/dist/dashboard/http.d.ts.map +1 -0
- package/dist/dashboard/http.js +74 -0
- package/dist/dashboard/http.js.map +1 -0
- package/dist/dashboard/index.d.ts +24 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +23 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/dashboard/interventions.d.ts +67 -0
- package/dist/dashboard/interventions.d.ts.map +1 -0
- package/dist/dashboard/interventions.js +169 -0
- package/dist/dashboard/interventions.js.map +1 -0
- package/dist/dashboard/keyed-watcher.d.ts +29 -0
- package/dist/dashboard/keyed-watcher.d.ts.map +1 -0
- package/dist/dashboard/keyed-watcher.js +42 -0
- package/dist/dashboard/keyed-watcher.js.map +1 -0
- package/dist/dashboard/keys.d.ts +31 -0
- package/dist/dashboard/keys.d.ts.map +1 -0
- package/dist/dashboard/keys.js +37 -0
- package/dist/dashboard/keys.js.map +1 -0
- package/dist/dashboard/models.d.ts +25 -0
- package/dist/dashboard/models.d.ts.map +1 -0
- package/dist/dashboard/models.js +30 -0
- package/dist/dashboard/models.js.map +1 -0
- package/dist/dashboard/module-host.d.ts +44 -0
- package/dist/dashboard/module-host.d.ts.map +1 -0
- package/dist/dashboard/module-host.js +91 -0
- package/dist/dashboard/module-host.js.map +1 -0
- package/dist/dashboard/module-serve.d.ts +15 -0
- package/dist/dashboard/module-serve.d.ts.map +1 -0
- package/dist/dashboard/module-serve.js +45 -0
- package/dist/dashboard/module-serve.js.map +1 -0
- package/dist/dashboard/open-in-app.d.ts +43 -0
- package/dist/dashboard/open-in-app.d.ts.map +1 -0
- package/dist/dashboard/open-in-app.js +98 -0
- package/dist/dashboard/open-in-app.js.map +1 -0
- package/dist/dashboard/open-questions.d.ts +45 -0
- package/dist/dashboard/open-questions.d.ts.map +1 -0
- package/dist/dashboard/open-questions.js +62 -0
- package/dist/dashboard/open-questions.js.map +1 -0
- package/dist/dashboard/overview.d.ts +78 -0
- package/dist/dashboard/overview.d.ts.map +1 -0
- package/dist/dashboard/overview.js +87 -0
- package/dist/dashboard/overview.js.map +1 -0
- package/dist/dashboard/projects.d.ts +100 -0
- package/dist/dashboard/projects.d.ts.map +1 -0
- package/dist/dashboard/projects.js +63 -0
- package/dist/dashboard/projects.js.map +1 -0
- package/dist/dashboard/pull-requests.d.ts +127 -0
- package/dist/dashboard/pull-requests.d.ts.map +1 -0
- package/dist/dashboard/pull-requests.js +137 -0
- package/dist/dashboard/pull-requests.js.map +1 -0
- package/dist/dashboard/queue.d.ts +17 -0
- package/dist/dashboard/queue.d.ts.map +1 -0
- package/dist/dashboard/queue.js +19 -0
- package/dist/dashboard/queue.js.map +1 -0
- package/dist/dashboard/quota.d.ts +53 -0
- package/dist/dashboard/quota.d.ts.map +1 -0
- package/dist/dashboard/quota.js +42 -0
- package/dist/dashboard/quota.js.map +1 -0
- package/dist/dashboard/relay-endpoints.d.ts +32 -0
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -0
- package/dist/dashboard/relay-endpoints.js +115 -0
- package/dist/dashboard/relay-endpoints.js.map +1 -0
- package/dist/dashboard/remote-run.d.ts +95 -0
- package/dist/dashboard/remote-run.d.ts.map +1 -0
- package/dist/dashboard/remote-run.js +235 -0
- package/dist/dashboard/remote-run.js.map +1 -0
- package/dist/dashboard/rpc-serve.d.ts +103 -0
- package/dist/dashboard/rpc-serve.d.ts.map +1 -0
- package/dist/dashboard/rpc-serve.js +180 -0
- package/dist/dashboard/rpc-serve.js.map +1 -0
- package/dist/dashboard/run-handoff.d.ts +311 -0
- package/dist/dashboard/run-handoff.d.ts.map +1 -0
- package/dist/dashboard/run-handoff.js +485 -0
- package/dist/dashboard/run-handoff.js.map +1 -0
- package/dist/dashboard/run-inbox.d.ts +31 -0
- package/dist/dashboard/run-inbox.d.ts.map +1 -0
- package/dist/dashboard/run-inbox.js +51 -0
- package/dist/dashboard/run-inbox.js.map +1 -0
- package/dist/dashboard/scheduler-state.d.ts +73 -0
- package/dist/dashboard/scheduler-state.d.ts.map +1 -0
- package/dist/dashboard/scheduler-state.js +120 -0
- package/dist/dashboard/scheduler-state.js.map +1 -0
- package/dist/dashboard/server.d.ts +103 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +230 -0
- package/dist/dashboard/server.js.map +1 -0
- package/dist/dashboard/static.d.ts +9 -0
- package/dist/dashboard/static.d.ts.map +1 -0
- package/dist/dashboard/static.js +54 -0
- package/dist/dashboard/static.js.map +1 -0
- package/dist/dashboard/subagent-settings.d.ts +26 -0
- package/dist/dashboard/subagent-settings.d.ts.map +1 -0
- package/dist/dashboard/subagent-settings.js +52 -0
- package/dist/dashboard/subagent-settings.js.map +1 -0
- package/dist/dashboard/telefunc-serve.d.ts +118 -0
- package/dist/dashboard/telefunc-serve.d.ts.map +1 -0
- package/dist/dashboard/telefunc-serve.js +108 -0
- package/dist/dashboard/telefunc-serve.js.map +1 -0
- package/dist/dashboard/tickets.d.ts +29 -0
- package/dist/dashboard/tickets.d.ts.map +1 -0
- package/dist/dashboard/tickets.js +38 -0
- package/dist/dashboard/tickets.js.map +1 -0
- package/dist/dashboard/types.d.ts +109 -0
- package/dist/dashboard/types.d.ts.map +1 -0
- package/dist/dashboard/types.js +2 -0
- package/dist/dashboard/types.js.map +1 -0
- package/dist/dashboard/web-start-endpoints.d.ts +32 -0
- package/dist/dashboard/web-start-endpoints.d.ts.map +1 -0
- package/dist/dashboard/web-start-endpoints.js +75 -0
- package/dist/dashboard/web-start-endpoints.js.map +1 -0
- package/dist/dashboard/widget-serve.d.ts +15 -0
- package/dist/dashboard/widget-serve.d.ts.map +1 -0
- package/dist/dashboard/widget-serve.js +45 -0
- package/dist/dashboard/widget-serve.js.map +1 -0
- package/dist/dashboard-bundle/assets/client-CbBRB9m4.js +9 -0
- package/dist/dashboard-bundle/assets/jsx-runtime-By8HlURe.js +1 -0
- package/dist/dashboard-bundle/assets/main-B3HghPQy.css +2 -0
- package/dist/dashboard-bundle/assets/main-om0WOAku.js +140 -0
- package/dist/dashboard-bundle/assets/module-jASZmfSB.js +21 -0
- package/dist/dashboard-bundle/assets/react-CZI7_Jkm.js +1 -0
- package/dist/dashboard-bundle/assets/react-dom-cJyBB_A4.js +1 -0
- package/dist/dashboard-bundle/assets/rolldown-runtime-QTnfLwEv.js +1 -0
- package/dist/dashboard-bundle/host/module.js +1 -0
- package/dist/dashboard-bundle/host/react-dom-client.js +1 -0
- package/dist/dashboard-bundle/host/react-dom.js +1 -0
- package/dist/dashboard-bundle/host/react-jsx-runtime.js +1 -0
- package/dist/dashboard-bundle/host/react.js +1 -0
- package/dist/dashboard-bundle/index.html +42 -0
- package/dist/dashboard-bundle/logo-animated.svg +34 -0
- package/dist/dashboard-bundle/logo.svg +16 -0
- package/dist/dashboard-client/assets/chunks/chunk-BF9pJudf.js +4 -0
- package/dist/dashboard-client/assets/entries/entry-client-routing.CT1e9F0o.js +1 -0
- package/dist/dashboard-client/assets/entries/pages_index.CkW5JQ8X.js +428 -0
- package/dist/dashboard-client/assets/static/layouts_tailwind-00e65532.8OjKGAbA.css +2 -0
- package/dist/dashboard-client/index.html +27 -0
- package/dist/dashboard-client/index.pageContext.json +1 -0
- package/dist/dashboard-client/logo-animated.svg +34 -0
- package/dist/dashboard-client/logo.svg +16 -0
- package/dist/dashboard-rpc/context.d.ts +54 -0
- package/dist/dashboard-rpc/context.d.ts.map +1 -0
- package/dist/dashboard-rpc/context.js +102 -0
- package/dist/dashboard-rpc/context.js.map +1 -0
- package/dist/dashboard-rpc/control.d.ts +124 -0
- package/dist/dashboard-rpc/control.d.ts.map +1 -0
- package/dist/dashboard-rpc/control.js +284 -0
- package/dist/dashboard-rpc/control.js.map +1 -0
- package/dist/dashboard-rpc/control.telefunc.d.ts +176 -0
- package/dist/dashboard-rpc/control.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/control.telefunc.js +373 -0
- package/dist/dashboard-rpc/control.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/devices.d.ts +9 -0
- package/dist/dashboard-rpc/devices.d.ts.map +1 -0
- package/dist/dashboard-rpc/devices.js +12 -0
- package/dist/dashboard-rpc/devices.js.map +1 -0
- package/dist/dashboard-rpc/devices.telefunc.d.ts +9 -0
- package/dist/dashboard-rpc/devices.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/devices.telefunc.js +12 -0
- package/dist/dashboard-rpc/devices.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/events-tail.d.ts +68 -0
- package/dist/dashboard-rpc/events-tail.d.ts.map +1 -0
- package/dist/dashboard-rpc/events-tail.js +257 -0
- package/dist/dashboard-rpc/events-tail.js.map +1 -0
- package/dist/dashboard-rpc/events.d.ts +39 -0
- package/dist/dashboard-rpc/events.d.ts.map +1 -0
- package/dist/dashboard-rpc/events.js +47 -0
- package/dist/dashboard-rpc/events.js.map +1 -0
- package/dist/dashboard-rpc/events.telefunc.d.ts +36 -0
- package/dist/dashboard-rpc/events.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/events.telefunc.js +70 -0
- package/dist/dashboard-rpc/events.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/index.d.ts +29 -0
- package/dist/dashboard-rpc/index.d.ts.map +1 -0
- package/dist/dashboard-rpc/index.js +40 -0
- package/dist/dashboard-rpc/index.js.map +1 -0
- package/dist/dashboard-rpc/models.d.ts +4 -0
- package/dist/dashboard-rpc/models.d.ts.map +1 -0
- package/dist/dashboard-rpc/models.js +8 -0
- package/dist/dashboard-rpc/models.js.map +1 -0
- package/dist/dashboard-rpc/modules.d.ts +43 -0
- package/dist/dashboard-rpc/modules.d.ts.map +1 -0
- package/dist/dashboard-rpc/modules.js +77 -0
- package/dist/dashboard-rpc/modules.js.map +1 -0
- package/dist/dashboard-rpc/preferences.d.ts +41 -0
- package/dist/dashboard-rpc/preferences.d.ts.map +1 -0
- package/dist/dashboard-rpc/preferences.js +65 -0
- package/dist/dashboard-rpc/preferences.js.map +1 -0
- package/dist/dashboard-rpc/preferences.telefunc.d.ts +97 -0
- package/dist/dashboard-rpc/preferences.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/preferences.telefunc.js +157 -0
- package/dist/dashboard-rpc/preferences.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/projects.d.ts +59 -0
- package/dist/dashboard-rpc/projects.d.ts.map +1 -0
- package/dist/dashboard-rpc/projects.js +87 -0
- package/dist/dashboard-rpc/projects.js.map +1 -0
- package/dist/dashboard-rpc/projects.telefunc.d.ts +56 -0
- package/dist/dashboard-rpc/projects.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/projects.telefunc.js +96 -0
- package/dist/dashboard-rpc/projects.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/quota.d.ts +4 -0
- package/dist/dashboard-rpc/quota.d.ts.map +1 -0
- package/dist/dashboard-rpc/quota.js +15 -0
- package/dist/dashboard-rpc/quota.js.map +1 -0
- package/dist/dashboard-rpc/quota.telefunc.d.ts +40 -0
- package/dist/dashboard-rpc/quota.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/quota.telefunc.js +84 -0
- package/dist/dashboard-rpc/quota.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/reads.d.ts +185 -0
- package/dist/dashboard-rpc/reads.d.ts.map +1 -0
- package/dist/dashboard-rpc/reads.js +370 -0
- package/dist/dashboard-rpc/reads.js.map +1 -0
- package/dist/dashboard-rpc/reads.telefunc.d.ts +197 -0
- package/dist/dashboard-rpc/reads.telefunc.d.ts.map +1 -0
- package/dist/dashboard-rpc/reads.telefunc.js +403 -0
- package/dist/dashboard-rpc/reads.telefunc.js.map +1 -0
- package/dist/dashboard-rpc/register.d.ts +18 -0
- package/dist/dashboard-rpc/register.d.ts.map +1 -0
- package/dist/dashboard-rpc/register.js +66 -0
- package/dist/dashboard-rpc/register.js.map +1 -0
- package/dist/dashboard-rpc/relay-agent.d.ts +9 -0
- package/dist/dashboard-rpc/relay-agent.d.ts.map +1 -0
- package/dist/dashboard-rpc/relay-agent.js +21 -0
- package/dist/dashboard-rpc/relay-agent.js.map +1 -0
- package/dist/dashboard-rpc/relay-dispatch.d.ts +9 -0
- package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -0
- package/dist/dashboard-rpc/relay-dispatch.js +24 -0
- package/dist/dashboard-rpc/relay-dispatch.js.map +1 -0
- package/dist/dashboard-rpc/relay-run.d.ts +9 -0
- package/dist/dashboard-rpc/relay-run.d.ts.map +1 -0
- package/dist/dashboard-rpc/relay-run.js +21 -0
- package/dist/dashboard-rpc/relay-run.js.map +1 -0
- package/dist/dashboard-rpc/stream-channel.d.ts +23 -0
- package/dist/dashboard-rpc/stream-channel.d.ts.map +1 -0
- package/dist/dashboard-rpc/stream-channel.js +52 -0
- package/dist/dashboard-rpc/stream-channel.js.map +1 -0
- package/dist/dashboard-rpc/stream-forward.d.ts +17 -0
- package/dist/dashboard-rpc/stream-forward.d.ts.map +1 -0
- package/dist/dashboard-rpc/stream-forward.js +38 -0
- package/dist/dashboard-rpc/stream-forward.js.map +1 -0
- package/dist/dashboard-rpc/subagents.d.ts +12 -0
- package/dist/dashboard-rpc/subagents.d.ts.map +1 -0
- package/dist/dashboard-rpc/subagents.js +13 -0
- package/dist/dashboard-rpc/subagents.js.map +1 -0
- package/dist/dashboard-rpc/test-context.d.ts +23 -0
- package/dist/dashboard-rpc/test-context.d.ts.map +1 -0
- package/dist/dashboard-rpc/test-context.js +42 -0
- package/dist/dashboard-rpc/test-context.js.map +1 -0
- package/dist/dashboard-rpc/widgets.d.ts +33 -0
- package/dist/dashboard-rpc/widgets.d.ts.map +1 -0
- package/dist/dashboard-rpc/widgets.js +54 -0
- package/dist/dashboard-rpc/widgets.js.map +1 -0
- package/dist/data-branch.d.ts +120 -0
- package/dist/data-branch.d.ts.map +1 -0
- package/dist/data-branch.js +319 -0
- package/dist/data-branch.js.map +1 -0
- package/dist/discord/bot.d.ts +61 -0
- package/dist/discord/bot.d.ts.map +1 -0
- package/dist/discord/bot.js +94 -0
- package/dist/discord/bot.js.map +1 -0
- package/dist/discord/gateway.d.ts +137 -0
- package/dist/discord/gateway.d.ts.map +1 -0
- package/dist/discord/gateway.js +315 -0
- package/dist/discord/gateway.js.map +1 -0
- package/dist/discord/live-run.d.ts +31 -0
- package/dist/discord/live-run.d.ts.map +1 -0
- package/dist/discord/live-run.js +57 -0
- package/dist/discord/live-run.js.map +1 -0
- package/dist/discord/reply-mirror.d.ts +83 -0
- package/dist/discord/reply-mirror.d.ts.map +1 -0
- package/dist/discord/reply-mirror.js +84 -0
- package/dist/discord/reply-mirror.js.map +1 -0
- package/dist/discord/rest.d.ts +20 -0
- package/dist/discord/rest.d.ts.map +1 -0
- package/dist/discord/rest.js +41 -0
- package/dist/discord/rest.js.map +1 -0
- package/dist/discord/routing.d.ts +81 -0
- package/dist/discord/routing.d.ts.map +1 -0
- package/dist/discord/routing.js +91 -0
- package/dist/discord/routing.js.map +1 -0
- package/dist/discord-credentials-store.d.ts +14 -0
- package/dist/discord-credentials-store.d.ts.map +1 -0
- package/dist/discord-credentials-store.js +53 -0
- package/dist/discord-credentials-store.js.map +1 -0
- package/dist/discord-credentials.d.ts +80 -0
- package/dist/discord-credentials.d.ts.map +1 -0
- package/dist/discord-credentials.js +55 -0
- package/dist/discord-credentials.js.map +1 -0
- package/dist/driver/actions-zip.d.ts +2 -0
- package/dist/driver/actions-zip.d.ts.map +1 -0
- package/dist/driver/actions-zip.js +70 -0
- package/dist/driver/actions-zip.js.map +1 -0
- package/dist/driver/actions.d.ts +130 -0
- package/dist/driver/actions.d.ts.map +1 -0
- package/dist/driver/actions.js +261 -0
- package/dist/driver/actions.js.map +1 -0
- package/dist/driver/agent-cli.d.ts +57 -0
- package/dist/driver/agent-cli.d.ts.map +1 -0
- package/dist/driver/agent-cli.js +134 -0
- package/dist/driver/agent-cli.js.map +1 -0
- package/dist/driver/child-registry.d.ts +25 -0
- package/dist/driver/child-registry.d.ts.map +1 -0
- package/dist/driver/child-registry.js +53 -0
- package/dist/driver/child-registry.js.map +1 -0
- package/dist/driver/claude-code-quota.d.ts +40 -0
- package/dist/driver/claude-code-quota.d.ts.map +1 -0
- package/dist/driver/claude-code-quota.js +144 -0
- package/dist/driver/claude-code-quota.js.map +1 -0
- package/dist/driver/claude-code.d.ts +104 -0
- package/dist/driver/claude-code.d.ts.map +1 -0
- package/dist/driver/claude-code.js +314 -0
- package/dist/driver/claude-code.js.map +1 -0
- package/dist/driver/cli-session.d.ts +57 -0
- package/dist/driver/cli-session.d.ts.map +1 -0
- package/dist/driver/cli-session.js +134 -0
- package/dist/driver/cli-session.js.map +1 -0
- package/dist/driver/cloud.d.ts +109 -0
- package/dist/driver/cloud.d.ts.map +1 -0
- package/dist/driver/cloud.js +232 -0
- package/dist/driver/cloud.js.map +1 -0
- package/dist/driver/codex.d.ts +99 -0
- package/dist/driver/codex.d.ts.map +1 -0
- package/dist/driver/codex.js +190 -0
- package/dist/driver/codex.js.map +1 -0
- package/dist/driver/fake.d.ts +54 -0
- package/dist/driver/fake.d.ts.map +1 -0
- package/dist/driver/fake.js +73 -0
- package/dist/driver/fake.js.map +1 -0
- package/dist/driver/index.d.ts +10 -0
- package/dist/driver/index.d.ts.map +1 -0
- package/dist/driver/index.js +14 -0
- package/dist/driver/index.js.map +1 -0
- package/dist/driver/session-support.d.ts +14 -0
- package/dist/driver/session-support.d.ts.map +1 -0
- package/dist/driver/session-support.js +37 -0
- package/dist/driver/session-support.js.map +1 -0
- package/dist/driver/types.d.ts +310 -0
- package/dist/driver/types.d.ts.map +1 -0
- package/dist/driver/types.js +5 -0
- package/dist/driver/types.js.map +1 -0
- package/dist/driver-cli.d.ts +61 -0
- package/dist/driver-cli.d.ts.map +1 -0
- package/dist/driver-cli.js +66 -0
- package/dist/driver-cli.js.map +1 -0
- package/dist/driver-names.d.ts +22 -0
- package/dist/driver-names.d.ts.map +1 -0
- package/dist/driver-names.js +29 -0
- package/dist/driver-names.js.map +1 -0
- package/dist/error-message.d.ts +8 -0
- package/dist/error-message.d.ts.map +1 -0
- package/dist/error-message.js +10 -0
- package/dist/error-message.js.map +1 -0
- package/dist/event-stream.d.ts +33 -0
- package/dist/event-stream.d.ts.map +1 -0
- package/dist/event-stream.js +104 -0
- package/dist/event-stream.js.map +1 -0
- package/dist/events.d.ts +236 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +5 -0
- package/dist/events.js.map +1 -0
- package/dist/fake-script.d.ts +15 -0
- package/dist/fake-script.d.ts.map +1 -0
- package/dist/fake-script.js +58 -0
- package/dist/fake-script.js.map +1 -0
- package/dist/format-bytes.d.ts +3 -0
- package/dist/format-bytes.d.ts.map +1 -0
- package/dist/format-bytes.js +18 -0
- package/dist/format-bytes.js.map +1 -0
- package/dist/framework-dir.d.ts +11 -0
- package/dist/framework-dir.d.ts.map +1 -0
- package/dist/framework-dir.js +11 -0
- package/dist/framework-dir.js.map +1 -0
- package/dist/framework-gitignore.d.ts +12 -0
- package/dist/framework-gitignore.d.ts.map +1 -0
- package/dist/framework-gitignore.js +19 -0
- package/dist/framework-gitignore.js.map +1 -0
- package/dist/gate-keepalive.d.ts +47 -0
- package/dist/gate-keepalive.d.ts.map +1 -0
- package/dist/gate-keepalive.js +62 -0
- package/dist/gate-keepalive.js.map +1 -0
- package/dist/git-exclude.d.ts +11 -0
- package/dist/git-exclude.d.ts.map +1 -0
- package/dist/git-exclude.js +23 -0
- package/dist/git-exclude.js.map +1 -0
- package/dist/handoff-level.d.ts +56 -0
- package/dist/handoff-level.d.ts.map +1 -0
- package/dist/handoff-level.js +62 -0
- package/dist/handoff-level.js.map +1 -0
- package/dist/has-remote.d.ts +8 -0
- package/dist/has-remote.d.ts.map +1 -0
- package/dist/has-remote.js +10 -0
- package/dist/has-remote.js.map +1 -0
- package/dist/host-exec.d.ts +21 -0
- package/dist/host-exec.d.ts.map +1 -0
- package/dist/host-exec.js +30 -0
- package/dist/host-exec.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +29 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +40 -0
- package/dist/install.js.map +1 -0
- package/dist/jsonl-tail.d.ts +59 -0
- package/dist/jsonl-tail.d.ts.map +1 -0
- package/dist/jsonl-tail.js +152 -0
- package/dist/jsonl-tail.js.map +1 -0
- package/dist/layout.d.ts +41 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +69 -0
- package/dist/layout.js.map +1 -0
- package/dist/logs.d.ts +73 -0
- package/dist/logs.d.ts.map +1 -0
- package/dist/logs.js +218 -0
- package/dist/logs.js.map +1 -0
- package/dist/loopback-host.d.ts +20 -0
- package/dist/loopback-host.d.ts.map +1 -0
- package/dist/loopback-host.js +31 -0
- package/dist/loopback-host.js.map +1 -0
- package/dist/maintenance.d.ts +90 -0
- package/dist/maintenance.d.ts.map +1 -0
- package/dist/maintenance.js +141 -0
- package/dist/maintenance.js.map +1 -0
- package/dist/merged-worktrees.d.ts +74 -0
- package/dist/merged-worktrees.d.ts.map +1 -0
- package/dist/merged-worktrees.js +84 -0
- package/dist/merged-worktrees.js.map +1 -0
- package/dist/module-server.d.ts +56 -0
- package/dist/module-types/dashboard/components/DiffStat.d.ts +6 -0
- package/dist/module-types/dashboard/components/DriverModelMenu.d.ts +23 -0
- package/dist/module-types/dashboard/components/LinkActions.d.ts +26 -0
- package/dist/module-types/dashboard/components/Markdown.d.ts +4 -0
- package/dist/module-types/dashboard/components/SettingsRows.d.ts +37 -0
- package/dist/module-types/dashboard/components/StartAgentButton.d.ts +39 -0
- package/dist/module-types/dashboard/components/ui/badge.d.ts +2 -0
- package/dist/module-types/dashboard/components/ui/button.d.ts +10 -0
- package/dist/module-types/dashboard/components/ui/card.d.ts +5 -0
- package/dist/module-types/dashboard/components/ui/checkbox.d.ts +7 -0
- package/dist/module-types/dashboard/components/ui/dropdown-menu.d.ts +16 -0
- package/dist/module-types/dashboard/components/ui/input.d.ts +2 -0
- package/dist/module-types/dashboard/components/ui/option-label.d.ts +4 -0
- package/dist/module-types/dashboard/components/ui/popover.d.ts +8 -0
- package/dist/module-types/dashboard/components/ui/scroll-area.d.ts +10 -0
- package/dist/module-types/dashboard/components/ui/separator.d.ts +3 -0
- package/dist/module-types/dashboard/components/ui/skeleton.d.ts +2 -0
- package/dist/module-types/dashboard/components/ui/slider.d.ts +9 -0
- package/dist/module-types/dashboard/components/ui/tooltip.d.ts +11 -0
- package/dist/module-types/dashboard/lib/agent-settings.d.ts +2 -0
- package/dist/module-types/dashboard/lib/draft-handoff.d.ts +15 -0
- package/dist/module-types/dashboard/lib/format-date.d.ts +51 -0
- package/dist/module-types/dashboard/lib/host-services.d.ts +12 -0
- package/dist/module-types/dashboard/lib/models.d.ts +24 -0
- package/dist/module-types/dashboard/lib/route.d.ts +37 -0
- package/dist/module-types/dashboard/lib/rpc.d.ts +31 -0
- package/dist/module-types/dashboard/lib/use-action.d.ts +25 -0
- package/dist/module-types/dashboard/lib/use-async.d.ts +45 -0
- package/dist/module-types/dashboard/lib/use-modules.d.ts +78 -0
- package/dist/module-types/dashboard/lib/utils.d.ts +3 -0
- package/dist/module-types/dashboard/module/index.d.ts +335 -0
- package/dist/module-types/dashboard/rpc/models.d.ts +2 -0
- package/dist/module-types/dashboard/rpc/modules.d.ts +5 -0
- package/dist/module-types/src/agent-id.d.ts +12 -0
- package/dist/module-types/src/agent-locks.d.ts +2 -0
- package/dist/module-types/src/agent-view.d.ts +38 -0
- package/dist/module-types/src/bridge-browser.d.ts +216 -0
- package/dist/module-types/src/browser-stream.d.ts +19 -0
- package/dist/module-types/src/browser.d.ts +15 -0
- package/dist/module-types/src/built-in.d.ts +28 -0
- package/dist/module-types/src/client.d.ts +15 -0
- package/dist/module-types/src/cloud-run-state.d.ts +26 -0
- package/dist/module-types/src/dashboard/activity.d.ts +40 -0
- package/dist/module-types/src/dashboard/agent-handoff.d.ts +243 -0
- package/dist/module-types/src/dashboard/agent-tree.d.ts +105 -0
- package/dist/module-types/src/dashboard/bridge-endpoints.d.ts +157 -0
- package/dist/module-types/src/dashboard/bridge-question.d.ts +32 -0
- package/dist/module-types/src/dashboard/bridge-store.d.ts +178 -0
- package/dist/module-types/src/dashboard/cache.d.ts +46 -0
- package/dist/module-types/src/dashboard/content-type.d.ts +2 -0
- package/dist/module-types/src/dashboard/dashboard.d.ts +37 -0
- package/dist/module-types/src/dashboard/docs.d.ts +38 -0
- package/dist/module-types/src/dashboard/file-diff.d.ts +66 -0
- package/dist/module-types/src/dashboard/file-read.d.ts +41 -0
- package/dist/module-types/src/dashboard/file-status.d.ts +20 -0
- package/dist/module-types/src/dashboard/git-status.d.ts +43 -0
- package/dist/module-types/src/dashboard/http.d.ts +28 -0
- package/dist/module-types/src/dashboard/interventions.d.ts +66 -0
- package/dist/module-types/src/dashboard/keyed-watcher.d.ts +28 -0
- package/dist/module-types/src/dashboard/keys.d.ts +30 -0
- package/dist/module-types/src/dashboard/models.d.ts +24 -0
- package/dist/module-types/src/dashboard/module-host.d.ts +43 -0
- package/dist/module-types/src/dashboard/module-serve.d.ts +14 -0
- package/dist/module-types/src/dashboard/open-in-app.d.ts +42 -0
- package/dist/module-types/src/dashboard/open-questions.d.ts +44 -0
- package/dist/module-types/src/dashboard/overview.d.ts +77 -0
- package/dist/module-types/src/dashboard/projects.d.ts +99 -0
- package/dist/module-types/src/dashboard/pull-requests.d.ts +126 -0
- package/dist/module-types/src/dashboard/queue.d.ts +16 -0
- package/dist/module-types/src/dashboard/quota.d.ts +52 -0
- package/dist/module-types/src/dashboard/remote-run.d.ts +94 -0
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +102 -0
- package/dist/module-types/src/dashboard/run-inbox.d.ts +30 -0
- package/dist/module-types/src/dashboard/scheduler-state.d.ts +72 -0
- package/dist/module-types/src/dashboard/subagent-settings.d.ts +25 -0
- package/dist/module-types/src/dashboard/types.d.ts +108 -0
- package/dist/module-types/src/dashboard-rpc/context.d.ts +53 -0
- package/dist/module-types/src/dashboard-rpc/control.d.ts +123 -0
- package/dist/module-types/src/dashboard-rpc/devices.d.ts +8 -0
- package/dist/module-types/src/dashboard-rpc/events-tail.d.ts +67 -0
- package/dist/module-types/src/dashboard-rpc/events.d.ts +38 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +28 -0
- package/dist/module-types/src/dashboard-rpc/models.d.ts +3 -0
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +42 -0
- package/dist/module-types/src/dashboard-rpc/preferences.d.ts +40 -0
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +58 -0
- package/dist/module-types/src/dashboard-rpc/quota.d.ts +3 -0
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +184 -0
- package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +8 -0
- package/dist/module-types/src/dashboard-rpc/stream-forward.d.ts +16 -0
- package/dist/module-types/src/dashboard-rpc/subagents.d.ts +11 -0
- package/dist/module-types/src/driver-names.d.ts +21 -0
- package/dist/module-types/src/error-message.d.ts +7 -0
- package/dist/module-types/src/event-stream.d.ts +32 -0
- package/dist/module-types/src/events.d.ts +235 -0
- package/dist/module-types/src/format-bytes.d.ts +2 -0
- package/dist/module-types/src/framework-dir.d.ts +10 -0
- package/dist/module-types/src/framework-gitignore.d.ts +11 -0
- package/dist/module-types/src/has-remote.d.ts +7 -0
- package/dist/module-types/src/index.d.ts +40 -0
- package/dist/module-types/src/jsonl-tail.d.ts +58 -0
- package/dist/module-types/src/loopback-host.d.ts +19 -0
- package/dist/module-types/src/node-fs.d.ts +32 -0
- package/dist/module-types/src/open-choices.d.ts +14 -0
- package/dist/module-types/src/pick-directory.d.ts +29 -0
- package/dist/module-types/src/preference-defaults.d.ts +42 -0
- package/dist/module-types/src/project-commands.d.ts +23 -0
- package/dist/module-types/src/project-errors.d.ts +55 -0
- package/dist/module-types/src/project-hooks.d.ts +129 -0
- package/dist/module-types/src/project-modules.d.ts +49 -0
- package/dist/module-types/src/project-presets.d.ts +29 -0
- package/dist/module-types/src/project.d.ts +28 -0
- package/dist/module-types/src/publish-levels.d.ts +32 -0
- package/dist/module-types/src/quota-boundary.d.ts +64 -0
- package/dist/module-types/src/quota-poller.d.ts +82 -0
- package/dist/module-types/src/registry.d.ts +220 -0
- package/dist/module-types/src/store/agent-checkout.d.ts +53 -0
- package/dist/module-types/src/store/agent-store.d.ts +266 -0
- package/dist/module-types/src/store/branches.d.ts +163 -0
- package/dist/module-types/src/store/git-host.d.ts +113 -0
- package/dist/module-types/src/store/index.d.ts +9 -0
- package/dist/module-types/src/store/provided.d.ts +16 -0
- package/dist/module-types/src/store/queue.d.ts +45 -0
- package/dist/module-types/src/store/repository.d.ts +32 -0
- package/dist/module-types/src/store/run-record.d.ts +21 -0
- package/dist/module-types/src/store/runs.d.ts +107 -0
- package/dist/module-types/src/store/tickets.d.ts +72 -0
- package/dist/module-types/src/subagent-settings.d.ts +26 -0
- package/dist/module-types/src/terminal.d.ts +3 -0
- package/dist/module-types/src/worktrees.d.ts +89 -0
- package/dist/module.css +50 -0
- package/dist/node-fs.d.ts +33 -0
- package/dist/node-fs.d.ts.map +1 -0
- package/dist/node-fs.js +57 -0
- package/dist/node-fs.js.map +1 -0
- package/dist/on-before-mergeable-prompt.d.ts +32 -0
- package/dist/on-before-mergeable-prompt.d.ts.map +1 -0
- package/dist/on-before-mergeable-prompt.js +26 -0
- package/dist/on-before-mergeable-prompt.js.map +1 -0
- package/dist/open-choices.d.ts +15 -0
- package/dist/open-choices.d.ts.map +1 -0
- package/dist/open-choices.js +31 -0
- package/dist/open-choices.js.map +1 -0
- package/dist/pick-directory.d.ts +30 -0
- package/dist/pick-directory.d.ts.map +1 -0
- package/dist/pick-directory.js +102 -0
- package/dist/pick-directory.js.map +1 -0
- package/dist/planned-quick-wins.d.ts +102 -0
- package/dist/planned-quick-wins.d.ts.map +1 -0
- package/dist/planned-quick-wins.js +171 -0
- package/dist/planned-quick-wins.js.map +1 -0
- package/dist/preference-defaults.d.ts +43 -0
- package/dist/preference-defaults.d.ts.map +1 -0
- package/dist/preference-defaults.js +34 -0
- package/dist/preference-defaults.js.map +1 -0
- package/dist/preflight.d.ts +77 -0
- package/dist/preflight.d.ts.map +1 -0
- package/dist/preflight.js +91 -0
- package/dist/preflight.js.map +1 -0
- package/dist/preset-catalog.d.ts +98 -0
- package/dist/preset-catalog.d.ts.map +1 -0
- package/dist/preset-catalog.js +129 -0
- package/dist/preset-catalog.js.map +1 -0
- package/dist/preset-prompt.d.ts +81 -0
- package/dist/preset-prompt.d.ts.map +1 -0
- package/dist/preset-prompt.js +51 -0
- package/dist/preset-prompt.js.map +1 -0
- package/dist/preset-registry.d.ts +32 -0
- package/dist/preset-registry.d.ts.map +1 -0
- package/dist/preset-registry.js +35 -0
- package/dist/preset-registry.js.map +1 -0
- package/dist/presets.d.ts +20 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +33 -0
- package/dist/presets.js.map +1 -0
- package/dist/preview-runtime.d.ts +33 -0
- package/dist/preview-runtime.d.ts.map +1 -0
- package/dist/preview-runtime.js +96 -0
- package/dist/preview-runtime.js.map +1 -0
- package/dist/preview.d.ts +78 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +301 -0
- package/dist/preview.js.map +1 -0
- package/dist/project-commands.d.ts +24 -0
- package/dist/project-commands.d.ts.map +1 -0
- package/dist/project-commands.js +57 -0
- package/dist/project-commands.js.map +1 -0
- package/dist/project-errors.d.ts +56 -0
- package/dist/project-errors.d.ts.map +1 -0
- package/dist/project-errors.js +49 -0
- package/dist/project-errors.js.map +1 -0
- package/dist/project-hooks.d.ts +130 -0
- package/dist/project-hooks.d.ts.map +1 -0
- package/dist/project-hooks.js +232 -0
- package/dist/project-hooks.js.map +1 -0
- package/dist/project-modules.d.ts +50 -0
- package/dist/project-modules.d.ts.map +1 -0
- package/dist/project-modules.js +110 -0
- package/dist/project-modules.js.map +1 -0
- package/dist/project-pass.d.ts +32 -0
- package/dist/project-pass.d.ts.map +1 -0
- package/dist/project-pass.js +45 -0
- package/dist/project-pass.js.map +1 -0
- package/dist/project-presets.d.ts +30 -0
- package/dist/project-presets.d.ts.map +1 -0
- package/dist/project-presets.js +74 -0
- package/dist/project-presets.js.map +1 -0
- package/dist/project-widgets.d.ts +46 -0
- package/dist/project-widgets.d.ts.map +1 -0
- package/dist/project-widgets.js +93 -0
- package/dist/project-widgets.js.map +1 -0
- package/dist/project.d.ts +29 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +41 -0
- package/dist/project.js.map +1 -0
- package/dist/prompt-run.d.ts +104 -0
- package/dist/prompt-run.d.ts.map +1 -0
- package/dist/prompt-run.js +112 -0
- package/dist/prompt-run.js.map +1 -0
- package/dist/prompt-template.d.ts +16 -0
- package/dist/prompt-template.d.ts.map +1 -0
- package/dist/prompt-template.js +56 -0
- package/dist/prompt-template.js.map +1 -0
- package/dist/prompts.generated.d.ts +53 -0
- package/dist/prompts.generated.d.ts.map +1 -0
- package/dist/prompts.generated.js +55 -0
- package/dist/prompts.generated.js.map +1 -0
- package/dist/publish-levels.d.ts +33 -0
- package/dist/publish-levels.d.ts.map +1 -0
- package/dist/publish-levels.js +51 -0
- package/dist/publish-levels.js.map +1 -0
- package/dist/queue-promote.d.ts +70 -0
- package/dist/queue-promote.d.ts.map +1 -0
- package/dist/queue-promote.js +118 -0
- package/dist/queue-promote.js.map +1 -0
- package/dist/quota-boundary.d.ts +65 -0
- package/dist/quota-boundary.d.ts.map +1 -0
- package/dist/quota-boundary.js +135 -0
- package/dist/quota-boundary.js.map +1 -0
- package/dist/quota-poller.d.ts +83 -0
- package/dist/quota-poller.d.ts.map +1 -0
- package/dist/quota-poller.js +118 -0
- package/dist/quota-poller.js.map +1 -0
- package/dist/registry.d.ts +221 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +348 -0
- package/dist/registry.js.map +1 -0
- package/dist/relay.d.ts +84 -0
- package/dist/relay.d.ts.map +1 -0
- package/dist/relay.js +199 -0
- package/dist/relay.js.map +1 -0
- package/dist/repos-directory.d.ts +19 -0
- package/dist/repos-directory.d.ts.map +1 -0
- package/dist/repos-directory.js +23 -0
- package/dist/repos-directory.js.map +1 -0
- package/dist/request-path.d.ts +10 -0
- package/dist/request-path.d.ts.map +1 -0
- package/dist/request-path.js +16 -0
- package/dist/request-path.js.map +1 -0
- package/dist/retired-project-settings.d.ts +43 -0
- package/dist/retired-project-settings.d.ts.map +1 -0
- package/dist/retired-project-settings.js +125 -0
- package/dist/retired-project-settings.js.map +1 -0
- package/dist/routine-locks.d.ts +53 -0
- package/dist/routine-locks.d.ts.map +1 -0
- package/dist/routine-locks.js +125 -0
- package/dist/routine-locks.js.map +1 -0
- package/dist/run-driver.d.ts +26 -0
- package/dist/run-driver.d.ts.map +1 -0
- package/dist/run-driver.js +17 -0
- package/dist/run-driver.js.map +1 -0
- package/dist/run-locks.d.ts +3 -0
- package/dist/run-locks.d.ts.map +1 -0
- package/dist/run-locks.js +39 -0
- package/dist/run-locks.js.map +1 -0
- package/dist/run-messages.d.ts +64 -0
- package/dist/run-messages.d.ts.map +1 -0
- package/dist/run-messages.js +76 -0
- package/dist/run-messages.js.map +1 -0
- package/dist/run-options.d.ts +53 -0
- package/dist/run-options.d.ts.map +1 -0
- package/dist/run-options.js +110 -0
- package/dist/run-options.js.map +1 -0
- package/dist/run-telemetry.d.ts +115 -0
- package/dist/run-telemetry.d.ts.map +1 -0
- package/dist/run-telemetry.js +137 -0
- package/dist/run-telemetry.js.map +1 -0
- package/dist/run-view.d.ts +109 -0
- package/dist/run-view.d.ts.map +1 -0
- package/dist/run-view.js +118 -0
- package/dist/run-view.js.map +1 -0
- package/dist/run.d.ts +261 -0
- package/dist/run.d.ts.map +1 -0
- package/dist/run.js +420 -0
- package/dist/run.js.map +1 -0
- package/dist/runtime-keys.d.ts +17 -0
- package/dist/runtime-keys.d.ts.map +1 -0
- package/dist/runtime-keys.js +17 -0
- package/dist/runtime-keys.js.map +1 -0
- package/dist/sandbox.d.ts +27 -0
- package/dist/sandbox.d.ts.map +1 -0
- package/dist/sandbox.js +63 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/session-link.d.ts +19 -0
- package/dist/session-link.d.ts.map +1 -0
- package/dist/session-link.js +26 -0
- package/dist/session-link.js.map +1 -0
- package/dist/sessions.d.ts +77 -0
- package/dist/sessions.d.ts.map +1 -0
- package/dist/sessions.js +146 -0
- package/dist/sessions.js.map +1 -0
- package/dist/spike-locks.d.ts +75 -0
- package/dist/spike-locks.d.ts.map +1 -0
- package/dist/spike-locks.js +208 -0
- package/dist/spike-locks.js.map +1 -0
- package/dist/stale-branch.d.ts +21 -0
- package/dist/stale-branch.d.ts.map +1 -0
- package/dist/stale-branch.js +32 -0
- package/dist/stale-branch.js.map +1 -0
- package/dist/steps.d.ts +9 -0
- package/dist/steps.d.ts.map +1 -0
- package/dist/steps.js +13 -0
- package/dist/steps.js.map +1 -0
- package/dist/store/agent-checkout.d.ts +54 -0
- package/dist/store/agent-checkout.d.ts.map +1 -0
- package/dist/store/agent-checkout.js +61 -0
- package/dist/store/agent-checkout.js.map +1 -0
- package/dist/store/agent-store.d.ts +267 -0
- package/dist/store/agent-store.d.ts.map +1 -0
- package/dist/store/agent-store.js +190 -0
- package/dist/store/agent-store.js.map +1 -0
- package/dist/store/branches.d.ts +164 -0
- package/dist/store/branches.d.ts.map +1 -0
- package/dist/store/branches.js +187 -0
- package/dist/store/branches.js.map +1 -0
- package/dist/store/forge.d.ts +110 -0
- package/dist/store/forge.d.ts.map +1 -0
- package/dist/store/forge.js +97 -0
- package/dist/store/forge.js.map +1 -0
- package/dist/store/git-host.d.ts +114 -0
- package/dist/store/git-host.d.ts.map +1 -0
- package/dist/store/git-host.js +103 -0
- package/dist/store/git-host.js.map +1 -0
- package/dist/store/index.d.ts +10 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +10 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/provided.d.ts +17 -0
- package/dist/store/provided.d.ts.map +1 -0
- package/dist/store/provided.js +37 -0
- package/dist/store/provided.js.map +1 -0
- package/dist/store/queue.d.ts +46 -0
- package/dist/store/queue.d.ts.map +1 -0
- package/dist/store/queue.js +61 -0
- package/dist/store/queue.js.map +1 -0
- package/dist/store/repository.d.ts +33 -0
- package/dist/store/repository.d.ts.map +1 -0
- package/dist/store/repository.js +25 -0
- package/dist/store/repository.js.map +1 -0
- package/dist/store/run-checkout.d.ts +33 -0
- package/dist/store/run-checkout.d.ts.map +1 -0
- package/dist/store/run-checkout.js +59 -0
- package/dist/store/run-checkout.js.map +1 -0
- package/dist/store/run-record.d.ts +22 -0
- package/dist/store/run-record.d.ts.map +1 -0
- package/dist/store/run-record.js +108 -0
- package/dist/store/run-record.js.map +1 -0
- package/dist/store/run-store.d.ts +501 -0
- package/dist/store/run-store.d.ts.map +1 -0
- package/dist/store/run-store.js +806 -0
- package/dist/store/run-store.js.map +1 -0
- package/dist/store/runs.d.ts +108 -0
- package/dist/store/runs.d.ts.map +1 -0
- package/dist/store/runs.js +146 -0
- package/dist/store/runs.js.map +1 -0
- package/dist/store/suspend.d.ts +38 -0
- package/dist/store/suspend.d.ts.map +1 -0
- package/dist/store/suspend.js +45 -0
- package/dist/store/suspend.js.map +1 -0
- package/dist/store/test-branches.d.ts +18 -0
- package/dist/store/test-branches.d.ts.map +1 -0
- package/dist/store/test-branches.js +59 -0
- package/dist/store/test-branches.js.map +1 -0
- package/dist/store/test-runs.d.ts +15 -0
- package/dist/store/test-runs.d.ts.map +1 -0
- package/dist/store/test-runs.js +37 -0
- package/dist/store/test-runs.js.map +1 -0
- package/dist/store/tickets.d.ts +73 -0
- package/dist/store/tickets.d.ts.map +1 -0
- package/dist/store/tickets.js +67 -0
- package/dist/store/tickets.js.map +1 -0
- package/dist/store/worktree-deps.d.ts +30 -0
- package/dist/store/worktree-deps.d.ts.map +1 -0
- package/dist/store/worktree-deps.js +115 -0
- package/dist/store/worktree-deps.js.map +1 -0
- package/dist/store/worktree.d.ts +194 -0
- package/dist/store/worktree.d.ts.map +1 -0
- package/dist/store/worktree.js +331 -0
- package/dist/store/worktree.js.map +1 -0
- package/dist/subagent-settings.d.ts +27 -0
- package/dist/subagent-settings.d.ts.map +1 -0
- package/dist/subagent-settings.js +35 -0
- package/dist/subagent-settings.js.map +1 -0
- package/dist/system-prompt-file.d.ts +18 -0
- package/dist/system-prompt-file.d.ts.map +1 -0
- package/dist/system-prompt-file.js +28 -0
- package/dist/system-prompt-file.js.map +1 -0
- package/dist/system-prompt.d.ts +148 -0
- package/dist/system-prompt.d.ts.map +1 -0
- package/dist/system-prompt.js +170 -0
- package/dist/system-prompt.js.map +1 -0
- package/dist/target-driver.d.ts +28 -0
- package/dist/target-driver.d.ts.map +1 -0
- package/dist/target-driver.js +18 -0
- package/dist/target-driver.js.map +1 -0
- package/dist/terminal.d.ts +4 -0
- package/dist/terminal.d.ts.map +1 -0
- package/dist/terminal.js +97 -0
- package/dist/terminal.js.map +1 -0
- package/dist/ticket-locks.d.ts +61 -0
- package/dist/ticket-locks.d.ts.map +1 -0
- package/dist/ticket-locks.js +137 -0
- package/dist/ticket-locks.js.map +1 -0
- package/dist/tickets-file.d.ts +7 -0
- package/dist/tickets-file.d.ts.map +1 -0
- package/dist/tickets-file.js +21 -0
- package/dist/tickets-file.js.map +1 -0
- package/dist/tickets.d.ts +18 -0
- package/dist/tickets.d.ts.map +1 -0
- package/dist/tickets.js +23 -0
- package/dist/tickets.js.map +1 -0
- package/dist/todo-loop.d.ts +110 -0
- package/dist/todo-loop.d.ts.map +1 -0
- package/dist/todo-loop.js +175 -0
- package/dist/todo-loop.js.map +1 -0
- package/dist/turn-gate.d.ts +144 -0
- package/dist/turn-gate.d.ts.map +1 -0
- package/dist/turn-gate.js +217 -0
- package/dist/turn-gate.js.map +1 -0
- package/dist/update-check.d.ts +44 -0
- package/dist/update-check.d.ts.map +1 -0
- package/dist/update-check.js +71 -0
- package/dist/update-check.js.map +1 -0
- package/dist/usage.d.ts +32 -0
- package/dist/usage.d.ts.map +1 -0
- package/dist/usage.js +46 -0
- package/dist/usage.js.map +1 -0
- package/dist/widget-types/dashboard/components/LinkActions.d.ts +26 -0
- package/dist/widget-types/dashboard/components/Markdown.d.ts +4 -0
- package/dist/widget-types/dashboard/components/StartAgentButton.d.ts +39 -0
- package/dist/widget-types/dashboard/components/ui/badge.d.ts +2 -0
- package/dist/widget-types/dashboard/components/ui/button.d.ts +10 -0
- package/dist/widget-types/dashboard/components/ui/card.d.ts +5 -0
- package/dist/widget-types/dashboard/components/ui/checkbox.d.ts +7 -0
- package/dist/widget-types/dashboard/components/ui/dropdown-menu.d.ts +16 -0
- package/dist/widget-types/dashboard/components/ui/input.d.ts +2 -0
- package/dist/widget-types/dashboard/components/ui/option-label.d.ts +4 -0
- package/dist/widget-types/dashboard/components/ui/popover.d.ts +8 -0
- package/dist/widget-types/dashboard/components/ui/scroll-area.d.ts +10 -0
- package/dist/widget-types/dashboard/components/ui/separator.d.ts +3 -0
- package/dist/widget-types/dashboard/components/ui/skeleton.d.ts +2 -0
- package/dist/widget-types/dashboard/components/ui/slider.d.ts +9 -0
- package/dist/widget-types/dashboard/components/ui/tooltip.d.ts +11 -0
- package/dist/widget-types/dashboard/lib/draft-handoff.d.ts +15 -0
- package/dist/widget-types/dashboard/lib/format-date.d.ts +51 -0
- package/dist/widget-types/dashboard/lib/host-services.d.ts +12 -0
- package/dist/widget-types/dashboard/lib/route.d.ts +24 -0
- package/dist/widget-types/dashboard/lib/rpc.d.ts +31 -0
- package/dist/widget-types/dashboard/lib/use-action.d.ts +25 -0
- package/dist/widget-types/dashboard/lib/use-async.d.ts +39 -0
- package/dist/widget-types/dashboard/lib/use-widgets.d.ts +42 -0
- package/dist/widget-types/dashboard/lib/utils.d.ts +3 -0
- package/dist/widget-types/dashboard/rpc/widgets.d.ts +4 -0
- package/dist/widget-types/dashboard/widget/index.d.ts +207 -0
- package/dist/widget-types/src/agent-id.d.ts +12 -0
- package/dist/widget-types/src/agent-locks.d.ts +2 -0
- package/dist/widget-types/src/agent-view.d.ts +38 -0
- package/dist/widget-types/src/bridge-browser.d.ts +216 -0
- package/dist/widget-types/src/browser-stream.d.ts +19 -0
- package/dist/widget-types/src/browser.d.ts +15 -0
- package/dist/widget-types/src/cli-exec.d.ts +35 -0
- package/dist/widget-types/src/cloud-run-state.d.ts +26 -0
- package/dist/widget-types/src/dashboard/activity.d.ts +40 -0
- package/dist/widget-types/src/dashboard/agent-handoff.d.ts +211 -0
- package/dist/widget-types/src/dashboard/agent-tree.d.ts +105 -0
- package/dist/widget-types/src/dashboard/bridge-endpoints.d.ts +157 -0
- package/dist/widget-types/src/dashboard/bridge-question.d.ts +32 -0
- package/dist/widget-types/src/dashboard/bridge-store.d.ts +178 -0
- package/dist/widget-types/src/dashboard/cache.d.ts +46 -0
- package/dist/widget-types/src/dashboard/content-type.d.ts +2 -0
- package/dist/widget-types/src/dashboard/dashboard.d.ts +37 -0
- package/dist/widget-types/src/dashboard/discord-webhook.d.ts +16 -0
- package/dist/widget-types/src/dashboard/docs.d.ts +38 -0
- package/dist/widget-types/src/dashboard/file-diff.d.ts +66 -0
- package/dist/widget-types/src/dashboard/file-read.d.ts +41 -0
- package/dist/widget-types/src/dashboard/file-status.d.ts +20 -0
- package/dist/widget-types/src/dashboard/gh.d.ts +130 -0
- package/dist/widget-types/src/dashboard/git-status.d.ts +32 -0
- package/dist/widget-types/src/dashboard/github.d.ts +10 -0
- package/dist/widget-types/src/dashboard/http.d.ts +28 -0
- package/dist/widget-types/src/dashboard/interventions.d.ts +66 -0
- package/dist/widget-types/src/dashboard/keys.d.ts +30 -0
- package/dist/widget-types/src/dashboard/models.d.ts +24 -0
- package/dist/widget-types/src/dashboard/open-in-app.d.ts +42 -0
- package/dist/widget-types/src/dashboard/open-questions.d.ts +52 -0
- package/dist/widget-types/src/dashboard/overview.d.ts +77 -0
- package/dist/widget-types/src/dashboard/projects.d.ts +89 -0
- package/dist/widget-types/src/dashboard/pull-requests.d.ts +126 -0
- package/dist/widget-types/src/dashboard/queue.d.ts +16 -0
- package/dist/widget-types/src/dashboard/quota.d.ts +59 -0
- package/dist/widget-types/src/dashboard/remote-run.d.ts +94 -0
- package/dist/widget-types/src/dashboard/rpc-serve.d.ts +102 -0
- package/dist/widget-types/src/dashboard/run-inbox.d.ts +30 -0
- package/dist/widget-types/src/dashboard/scheduler-state.d.ts +64 -0
- package/dist/widget-types/src/dashboard/tickets.d.ts +28 -0
- package/dist/widget-types/src/dashboard/types.d.ts +99 -0
- package/dist/widget-types/src/dashboard/widget-serve.d.ts +14 -0
- package/dist/widget-types/src/dashboard-rpc/context.d.ts +53 -0
- package/dist/widget-types/src/dashboard-rpc/control.d.ts +108 -0
- package/dist/widget-types/src/dashboard-rpc/devices.d.ts +8 -0
- package/dist/widget-types/src/dashboard-rpc/events-tail.d.ts +53 -0
- package/dist/widget-types/src/dashboard-rpc/events.d.ts +29 -0
- package/dist/widget-types/src/dashboard-rpc/index.d.ts +28 -0
- package/dist/widget-types/src/dashboard-rpc/models.d.ts +3 -0
- package/dist/widget-types/src/dashboard-rpc/preferences.d.ts +40 -0
- package/dist/widget-types/src/dashboard-rpc/projects.d.ts +54 -0
- package/dist/widget-types/src/dashboard-rpc/quota.d.ts +26 -0
- package/dist/widget-types/src/dashboard-rpc/reads.d.ts +227 -0
- package/dist/widget-types/src/dashboard-rpc/relay-agent.d.ts +8 -0
- package/dist/widget-types/src/dashboard-rpc/stream-forward.d.ts +16 -0
- package/dist/widget-types/src/dashboard-rpc/widgets.d.ts +32 -0
- package/dist/widget-types/src/discord-credentials.d.ts +79 -0
- package/dist/widget-types/src/driver-names.d.ts +21 -0
- package/dist/widget-types/src/error-message.d.ts +7 -0
- package/dist/widget-types/src/event-stream.d.ts +32 -0
- package/dist/widget-types/src/events.d.ts +235 -0
- package/dist/widget-types/src/framework-dir.d.ts +10 -0
- package/dist/widget-types/src/framework-gitignore.d.ts +11 -0
- package/dist/widget-types/src/index.d.ts +42 -0
- package/dist/widget-types/src/jsonl-tail.d.ts +54 -0
- package/dist/widget-types/src/loopback-host.d.ts +19 -0
- package/dist/widget-types/src/node-fs.d.ts +32 -0
- package/dist/widget-types/src/open-choices.d.ts +14 -0
- package/dist/widget-types/src/pick-directory.d.ts +29 -0
- package/dist/widget-types/src/preference-defaults.d.ts +53 -0
- package/dist/widget-types/src/project-commands.d.ts +23 -0
- package/dist/widget-types/src/project-errors.d.ts +43 -0
- package/dist/widget-types/src/project-hooks.d.ts +133 -0
- package/dist/widget-types/src/project-presets.d.ts +29 -0
- package/dist/widget-types/src/project-widgets.d.ts +45 -0
- package/dist/widget-types/src/project.d.ts +28 -0
- package/dist/widget-types/src/quota-boundary.d.ts +115 -0
- package/dist/widget-types/src/quota-poller.d.ts +82 -0
- package/dist/widget-types/src/registry.d.ts +210 -0
- package/dist/widget-types/src/store/agent-checkout.d.ts +46 -0
- package/dist/widget-types/src/store/agent-store.d.ts +237 -0
- package/dist/widget-types/src/store/branches.d.ts +133 -0
- package/dist/widget-types/src/store/forge.d.ts +109 -0
- package/dist/widget-types/src/store/git-host.d.ts +111 -0
- package/dist/widget-types/src/store/index.d.ts +9 -0
- package/dist/widget-types/src/store/provided.d.ts +16 -0
- package/dist/widget-types/src/store/queue.d.ts +45 -0
- package/dist/widget-types/src/store/run-record.d.ts +21 -0
- package/dist/widget-types/src/store/runs.d.ts +101 -0
- package/dist/widget-types/src/store/tickets.d.ts +72 -0
- package/dist/widget-types/src/tickets.d.ts +17 -0
- package/dist/widget-types/src/worktrees.d.ts +89 -0
- package/dist/widget.css +50 -0
- package/dist/worktrees.d.ts +90 -0
- package/dist/worktrees.d.ts.map +1 -0
- package/dist/worktrees.js +123 -0
- package/dist/worktrees.js.map +1 -0
- package/package.json +103 -3
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
|
+
import { BRANCHES_DIR, nodeGitRunner, excludeFromGit } from '@gemstack/skill-branches';
|
|
3
|
+
import { DATA_BRANCH, DATA_CHECKOUT_DIR } from './framework-dir.js';
|
|
4
|
+
import { TICKETS_DIR, FLAT_TODO_FILE } from './tickets.js';
|
|
5
|
+
import { errorMessage } from './error-message.js';
|
|
6
|
+
export { DATA_BRANCH };
|
|
7
|
+
// The `agents-data` branch (#1582): every file The Framework itself writes — the tickets,
|
|
8
|
+
// the queue, the session archives — lives on one branch of the project repo, the way `gh-pages`
|
|
9
|
+
// holds a site's data. Main is 100% code, 0% framework data.
|
|
10
|
+
//
|
|
11
|
+
// What this buys, structurally: the branch is safe to push and pull *eagerly*, because nothing on
|
|
12
|
+
// it is anyone's working tree. That closes #1577 (an agent's stale queue copy clobbering the
|
|
13
|
+
// freshly-merged one — there is one queue, on one branch, with one local writer) and #1397 (run
|
|
14
|
+
// bookkeeping stranded on local main — data commits land on a branch whose whole job is to be
|
|
15
|
+
// pushed), and it gives every machine and cloud session the same view: fetch the branch, read the
|
|
16
|
+
// files, commit onto it, push.
|
|
17
|
+
//
|
|
18
|
+
// The daemon is the single LOCAL committer. Every local write funnels through
|
|
19
|
+
// {@link withDataBranch}, which serializes per project and runs the whole cycle — sync, apply,
|
|
20
|
+
// commit, push — so two ticks can never interleave half-written queue states. A data-writing
|
|
21
|
+
// *session* (triage, sync) is a remote writer like another machine: it commits onto this branch in
|
|
22
|
+
// its own checkout and pushes, and the race is settled by the push itself — whoever loses re-syncs
|
|
23
|
+
// and re-applies.
|
|
24
|
+
//
|
|
25
|
+
// The checkout is a plain git worktree at {@link DATA_CHECKOUT_DIR}, under `.branches/` beside
|
|
26
|
+
// the agent checkouts. The repo root keeps a `tickets` symlink into it so the roadmap stays one
|
|
27
|
+
// `ls` away for humans.
|
|
28
|
+
/** The data branch's checkout under a project. */
|
|
29
|
+
export function dataWorktreePath(cwd) {
|
|
30
|
+
return join(cwd, DATA_CHECKOUT_DIR);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* git's well-known empty tree, present in every repository without being written first. Committing
|
|
34
|
+
* it is how the branch is born parentless with no working-tree gymnastics: `git commit-tree` +
|
|
35
|
+
* `git branch` never touches any checkout, and no code commit is ever an ancestor of the data
|
|
36
|
+
* history.
|
|
37
|
+
*/
|
|
38
|
+
const EMPTY_TREE = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
|
|
39
|
+
function resolveDeps(deps) {
|
|
40
|
+
const fs = () => import('node:fs/promises');
|
|
41
|
+
return {
|
|
42
|
+
git: deps.git ?? nodeGitRunner(),
|
|
43
|
+
write: deps.write ??
|
|
44
|
+
(async (path, content) => {
|
|
45
|
+
const f = await fs();
|
|
46
|
+
await f.mkdir(dirname(path), { recursive: true });
|
|
47
|
+
await f.writeFile(path, content, 'utf8');
|
|
48
|
+
}),
|
|
49
|
+
lexists: deps.lexists ?? (path => fs().then(f => f.lstat(path)).then(() => true, () => false)),
|
|
50
|
+
symlink: deps.symlink ?? ((target, path) => fs().then(f => f.symlink(target, path))),
|
|
51
|
+
log: deps.log ?? (() => { }),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/** Whether the repo has any remote to sync the branch with. No remote is a local-only project, fine. */
|
|
55
|
+
async function hasRemote(cwd, git) {
|
|
56
|
+
try {
|
|
57
|
+
return (await git(['remote'], cwd)).trim().length > 0;
|
|
58
|
+
}
|
|
59
|
+
catch {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
/** Whether a ref exists locally. */
|
|
64
|
+
async function refExists(cwd, ref, git) {
|
|
65
|
+
return git(['rev-parse', '--verify', '--quiet', ref], cwd).then(() => true, () => false);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* One serialized cycle per project, so a writer and the eager pull can never interleave: the
|
|
69
|
+
* promise chain is the lock, and every public entry point below joins it.
|
|
70
|
+
*/
|
|
71
|
+
const chains = new Map();
|
|
72
|
+
function serialize(cwd, task) {
|
|
73
|
+
const next = (chains.get(cwd) ?? Promise.resolve()).then(task, task);
|
|
74
|
+
chains.set(cwd, next.catch(() => { }));
|
|
75
|
+
return next;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* The unserialized ensure: branch, checkout, seed, symlink. Split from {@link ensureDataWorktree}
|
|
79
|
+
* so the writer and the pull can run it inside the cycle they already hold the chain for.
|
|
80
|
+
*/
|
|
81
|
+
async function ensureCore(cwd, r) {
|
|
82
|
+
const path = dataWorktreePath(cwd);
|
|
83
|
+
// Already checked out on the right branch: done. The common case, taken on every tick.
|
|
84
|
+
const onBranch = await r.git(['rev-parse', '--abbrev-ref', 'HEAD'], path).then(out => out.trim() === DATA_BRANCH, () => false);
|
|
85
|
+
if (!onBranch) {
|
|
86
|
+
if (!(await refExists(cwd, `refs/heads/${DATA_BRANCH}`, r.git))) {
|
|
87
|
+
// Take origin's branch when there is one (the every-other-machine case); otherwise the
|
|
88
|
+
// branch is born here, parentless.
|
|
89
|
+
if (await hasRemote(cwd, r.git))
|
|
90
|
+
await r.git(['fetch', 'origin', DATA_BRANCH], cwd).catch(() => { });
|
|
91
|
+
if (await refExists(cwd, `refs/remotes/origin/${DATA_BRANCH}`, r.git)) {
|
|
92
|
+
await r.git(['branch', DATA_BRANCH, `origin/${DATA_BRANCH}`], cwd);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
const commit = (await r.git(['commit-tree', EMPTY_TREE, '-m', `[The Framework] ${DATA_BRANCH}`], cwd)).trim();
|
|
96
|
+
await r.git(['branch', DATA_BRANCH, commit], cwd);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
// A stale registration at this path (the dir was deleted by hand) blocks the add.
|
|
100
|
+
await r.git(['worktree', 'prune'], cwd).catch(() => { });
|
|
101
|
+
await r.git(['worktree', 'add', path, DATA_BRANCH], cwd);
|
|
102
|
+
// The checkout sits under `.branches/` like the agent checkouts, and is hidden the same way
|
|
103
|
+
// (git's own exclude, no tracked file) — this may be the first checkout the project gets.
|
|
104
|
+
await excludeFromGit(cwd, '/' + BRANCHES_DIR, undefined, r.git).catch(() => { });
|
|
105
|
+
}
|
|
106
|
+
// Seed the queue on a branch born empty, so readers and humans find the file, not a mystery.
|
|
107
|
+
// Committed here, so the checkout is clean between cycles and no later write's message lies
|
|
108
|
+
// about carrying the seed; the push is owed like any local commit and rides the next cycle.
|
|
109
|
+
if (!(await r.lexists(join(path, FLAT_TODO_FILE)))) {
|
|
110
|
+
await r.write(join(path, FLAT_TODO_FILE), '');
|
|
111
|
+
await r.git(['add', '-A'], path);
|
|
112
|
+
await r.git(['commit', '-m', '[The Framework] seed the queue'], path);
|
|
113
|
+
}
|
|
114
|
+
// The roadmap stays one `ls` away: `<repo>/tickets` links into the data checkout. Created only
|
|
115
|
+
// over nothing — a real `tickets/` dir (pre-migration) or a user's own file is theirs. The link
|
|
116
|
+
// is framework state, so it is hidden from git the moment it is made: uncommitted at the root,
|
|
117
|
+
// it would ride any sweeping `git add -A` onto a code branch. The exclude is a pair because the
|
|
118
|
+
// repo-level exclude speaks for every worktree at once — this checkout included, whose root
|
|
119
|
+
// holds the real `tickets/` the branch exists to carry: `/tickets` hides root entries of that
|
|
120
|
+
// name, and `!/tickets/` re-includes directories (a trailing slash never matches a symlink), so
|
|
121
|
+
// the link stays hidden while the data checkout's own directory keeps committing.
|
|
122
|
+
const rootLink = join(cwd, TICKETS_DIR);
|
|
123
|
+
if (!(await r.lexists(rootLink))) {
|
|
124
|
+
await r.symlink(join(DATA_CHECKOUT_DIR, TICKETS_DIR), rootLink).catch(() => { });
|
|
125
|
+
await excludeFromGit(cwd, '/' + TICKETS_DIR, undefined, r.git).catch(() => { });
|
|
126
|
+
await excludeFromGit(cwd, '!/' + TICKETS_DIR + '/', undefined, r.git).catch(() => { });
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Bring the checkout up to date with origin: fetch, then rebase whatever local commits exist (a
|
|
131
|
+
* push that could not land earlier) onto origin's tip. A conflict resolves toward origin — the
|
|
132
|
+
* writer re-applies the local intent afterwards, which is the "re-run on conflict" rule the whole
|
|
133
|
+
* cycle is built on.
|
|
134
|
+
*/
|
|
135
|
+
async function syncCore(cwd, r) {
|
|
136
|
+
if (!(await hasRemote(cwd, r.git)))
|
|
137
|
+
return;
|
|
138
|
+
const path = dataWorktreePath(cwd);
|
|
139
|
+
await r.git(['fetch', 'origin', DATA_BRANCH], cwd).catch(() => { });
|
|
140
|
+
if (!(await refExists(cwd, `refs/remotes/origin/${DATA_BRANCH}`, r.git)))
|
|
141
|
+
return;
|
|
142
|
+
try {
|
|
143
|
+
await r.git(['rebase', `origin/${DATA_BRANCH}`], path);
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
await r.git(['rebase', '--abort'], path).catch(() => { });
|
|
147
|
+
await r.git(['reset', '--hard', `origin/${DATA_BRANCH}`], path);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Make sure the data branch and its checkout exist, the queue file is seeded, and the root
|
|
152
|
+
* `tickets` symlink points into the checkout. Idempotent and cheap when everything is in place
|
|
153
|
+
* (one `git rev-parse` against the checkout); never throws — a project this cannot be set up in
|
|
154
|
+
* reports why and is left alone.
|
|
155
|
+
*/
|
|
156
|
+
export async function ensureDataWorktree(cwd, deps = {}) {
|
|
157
|
+
const r = resolveDeps(deps);
|
|
158
|
+
return serialize(cwd, async () => {
|
|
159
|
+
try {
|
|
160
|
+
await ensureCore(cwd, r);
|
|
161
|
+
return { ok: true };
|
|
162
|
+
}
|
|
163
|
+
catch (err) {
|
|
164
|
+
return { ok: false, error: errorMessage(err) };
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Apply one change to the data branch: sync with origin, run `op` against the checkout, commit
|
|
170
|
+
* whatever it changed, push. The single funnel every local data write goes through (#1582).
|
|
171
|
+
*
|
|
172
|
+
* `op` must be re-runnable: when the push loses a race with another machine, the cycle re-syncs
|
|
173
|
+
* and runs it again against the fresher state rather than force-fitting a stale commit — the op
|
|
174
|
+
* *is* the intent, the commit is just its serialization. Two attempts; a push that still fails
|
|
175
|
+
* (the network, most likely) keeps the commit local and reports the error — the next cycle's sync
|
|
176
|
+
* rebases it onto whatever origin has by then, and the next push carries it.
|
|
177
|
+
*
|
|
178
|
+
* Never throws: callers run on background ticks with nothing to catch it.
|
|
179
|
+
*/
|
|
180
|
+
export async function withDataBranch(cwd, message, op, deps = {}) {
|
|
181
|
+
const r = resolveDeps(deps);
|
|
182
|
+
const path = dataWorktreePath(cwd);
|
|
183
|
+
return serialize(cwd, async () => {
|
|
184
|
+
try {
|
|
185
|
+
await ensureCore(cwd, r);
|
|
186
|
+
const remote = await hasRemote(cwd, r.git);
|
|
187
|
+
for (let attempt = 0;; attempt++) {
|
|
188
|
+
await syncCore(cwd, r);
|
|
189
|
+
await op(path);
|
|
190
|
+
await r.git(['add', '-A'], path);
|
|
191
|
+
const staged = (await r.git(['status', '--porcelain'], path)).trim();
|
|
192
|
+
// The message is resolved after the op ran: a batch write only knows what it did then.
|
|
193
|
+
if (staged)
|
|
194
|
+
await r.git(['commit', '-m', typeof message === 'function' ? message() : message], path);
|
|
195
|
+
if (!remote)
|
|
196
|
+
return { ok: true, changed: Boolean(staged), pushed: false };
|
|
197
|
+
// Unpushed commits — this cycle's, or an earlier cycle's that the sync just rebased. The
|
|
198
|
+
// push is owed whenever any exist, even when this op itself wrote nothing new.
|
|
199
|
+
const ahead = (await refExists(cwd, `refs/remotes/origin/${DATA_BRANCH}`, r.git))
|
|
200
|
+
? (await r.git(['rev-list', '--count', `origin/${DATA_BRANCH}..${DATA_BRANCH}`], cwd)).trim() !== '0'
|
|
201
|
+
: true;
|
|
202
|
+
if (!ahead)
|
|
203
|
+
return { ok: true, changed: false, pushed: false };
|
|
204
|
+
try {
|
|
205
|
+
await r.git(['push', 'origin', `${DATA_BRANCH}:${DATA_BRANCH}`], path);
|
|
206
|
+
return { ok: true, changed: Boolean(staged), pushed: true };
|
|
207
|
+
}
|
|
208
|
+
catch (err) {
|
|
209
|
+
if (attempt >= 1)
|
|
210
|
+
return { ok: false, committed: true, error: `the data branch could not be pushed: ${errorMessage(err)}` };
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
catch (err) {
|
|
215
|
+
// The op's half-written files must not ride a later, unrelated commit: put the checkout
|
|
216
|
+
// back to its committed state before reporting.
|
|
217
|
+
await r.git(['reset', '--hard'], path).catch(() => { });
|
|
218
|
+
await r.git(['clean', '-fd'], path).catch(() => { });
|
|
219
|
+
return { ok: false, committed: false, error: errorMessage(err) };
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Fill in whatever a caller left out, so an operation reads the same way in tests and out. Parents
|
|
225
|
+
* are created on write because the directory itself is not a given: retiring the last file removes
|
|
226
|
+
* it (git keeps no empty dirs), and the branch is born without it.
|
|
227
|
+
*/
|
|
228
|
+
export function resolveDataFileDeps(deps) {
|
|
229
|
+
const fs = () => import('node:fs/promises');
|
|
230
|
+
return {
|
|
231
|
+
read: deps.read ?? (path => fs().then(f => f.readFile(path, 'utf8'))),
|
|
232
|
+
write: deps.write ??
|
|
233
|
+
(async (path, content) => {
|
|
234
|
+
const f = await fs();
|
|
235
|
+
await f.mkdir(dirname(path), { recursive: true });
|
|
236
|
+
await f.writeFile(path, content, 'utf8');
|
|
237
|
+
}),
|
|
238
|
+
remove: deps.remove ?? (path => fs().then(f => f.rm(path))),
|
|
239
|
+
list: deps.list ?? (dir => fs().then(f => f.readdir(dir)).catch(() => [])),
|
|
240
|
+
funnel: deps.funnel ?? withDataBranch,
|
|
241
|
+
log: deps.log ?? (() => { }),
|
|
242
|
+
};
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* The eager pull (#1582): sync the checkout with origin so this machine reads what other machines
|
|
246
|
+
* and cloud sessions committed, without waiting for the next local write — and push anything a
|
|
247
|
+
* failed cycle left stranded locally, via the same owed-push rule as the writer. Ensures the
|
|
248
|
+
* checkout exists, so a fresh clone converges on its first tick. Never throws.
|
|
249
|
+
*
|
|
250
|
+
* Reports why it could not converge (#1599): a push origin rejects, or no origin to converge with
|
|
251
|
+
* at all. The writer treats a remote-less repo as fine — the commit is safe locally — but a sync's
|
|
252
|
+
* whole job is to meet the other machines, and a repo nothing can reach is an error state the user
|
|
253
|
+
* has to fix, not a mode the framework supports (#1595). The daemon records the answer as the
|
|
254
|
+
* project's error state, so it reaches the dashboard rather than only the daemon's stdout.
|
|
255
|
+
*/
|
|
256
|
+
export async function pullDataBranch(cwd, deps = {}) {
|
|
257
|
+
const r = resolveDeps(deps);
|
|
258
|
+
const result = await withDataBranch(cwd, '[The Framework] data sync', async () => { }, deps);
|
|
259
|
+
const outcome = !result.ok
|
|
260
|
+
? { ok: false, error: result.error }
|
|
261
|
+
: (await hasRemote(cwd, r.git))
|
|
262
|
+
? { ok: true }
|
|
263
|
+
: { ok: false, error: 'the repository has no remote, so the data branch cannot be shared with other machines' };
|
|
264
|
+
if (!outcome.ok)
|
|
265
|
+
r.log(`[framework] data branch sync: ${outcome.error}`);
|
|
266
|
+
return outcome;
|
|
267
|
+
}
|
|
268
|
+
/**
|
|
269
|
+
* The project root `cwd` belongs to: the directory holding the repo's real `.git`. From the main
|
|
270
|
+
* checkout that is `cwd` itself; from an agent's worktree it is the repo the worktree was made
|
|
271
|
+
* from — where the data checkout lives, and the address every data write funnels to. `undefined`
|
|
272
|
+
* outside any repo.
|
|
273
|
+
*/
|
|
274
|
+
export async function dataProjectRoot(cwd, git = nodeGitRunner()) {
|
|
275
|
+
try {
|
|
276
|
+
const gitDir = (await git(['rev-parse', '--path-format=absolute', '--git-common-dir'], cwd)).trim();
|
|
277
|
+
return gitDir ? dirname(gitDir) : undefined;
|
|
278
|
+
}
|
|
279
|
+
catch {
|
|
280
|
+
return undefined;
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* Read one file off the data branch, from anywhere in the repo: the checkout when this `cwd` has
|
|
285
|
+
* one, else `git show` against the local branch (worktrees share the repo's refs, so an agent's
|
|
286
|
+
* checkout reads the same data without holding any of it), else against `origin/…` (a fresh
|
|
287
|
+
* clone that fetched but never branched — the cloud case). `undefined` when the file exists in
|
|
288
|
+
* none of them. Never throws.
|
|
289
|
+
*
|
|
290
|
+
* `fresh: true` fetches first and prefers origin's copy — for a reader about to act on the queue
|
|
291
|
+
* from a long-lived agent process, where the local ref may trail what other writers pushed.
|
|
292
|
+
*/
|
|
293
|
+
export async function readDataFile(cwd, rel, opts = {}, deps = {}) {
|
|
294
|
+
const r = resolveDeps(deps);
|
|
295
|
+
const remote = opts.fresh && (await hasRemote(cwd, r.git));
|
|
296
|
+
if (remote)
|
|
297
|
+
await r.git(['fetch', 'origin', DATA_BRANCH], cwd).catch(() => { });
|
|
298
|
+
const sources = [
|
|
299
|
+
...(remote ? [`origin/${DATA_BRANCH}`] : []),
|
|
300
|
+
DATA_BRANCH,
|
|
301
|
+
...(remote ? [] : [`origin/${DATA_BRANCH}`]),
|
|
302
|
+
];
|
|
303
|
+
if (!opts.fresh) {
|
|
304
|
+
const fromCheckout = await r.git(['rev-parse', '--abbrev-ref', 'HEAD'], dataWorktreePath(cwd)).then(out => out.trim() === DATA_BRANCH, () => false);
|
|
305
|
+
if (fromCheckout) {
|
|
306
|
+
const { readFile } = await import('node:fs/promises');
|
|
307
|
+
const md = await readFile(join(dataWorktreePath(cwd), rel), 'utf8').catch(() => undefined);
|
|
308
|
+
if (md !== undefined)
|
|
309
|
+
return md;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
for (const ref of sources) {
|
|
313
|
+
const md = await r.git(['show', `${ref}:${rel}`], cwd).catch(() => undefined);
|
|
314
|
+
if (md !== undefined)
|
|
315
|
+
return md;
|
|
316
|
+
}
|
|
317
|
+
return undefined;
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=data-branch.js.map
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EAAE,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,CAAA;YACrD,MAAM,EAAE,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;YAC1F,IAAI,EAAE,KAAK,SAAS;gBAAE,OAAO,EAAE,CAAA;QACjC,CAAC;IACH,CAAC;IACD,KAAK,MAAM,GAAG,IAAI,OAAO,EAAE,CAAC;QAC1B,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAA;QAC7E,IAAI,EAAE,KAAK,SAAS;YAAE,OAAO,EAAE,CAAA;IACjC,CAAC;IACD,OAAO,SAAS,CAAA;AAClB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { type DiscordMessage, type GatewayDeps } from './gateway.js';
|
|
2
|
+
import { type ProjectTarget, type RunSnapshot } from './routing.js';
|
|
3
|
+
/**
|
|
4
|
+
* The Discord chatbot (#680): chat to The Framework from Discord instead of the dashboard.
|
|
5
|
+
*
|
|
6
|
+
* Every effect is an injected function, so the whole bot is testable by handing it a fake
|
|
7
|
+
* message — the routing decisions live in `routing.ts` and are pure, and this module is only
|
|
8
|
+
* the wiring. Same seam-and-`stop()` shape as the intervention/activity watchers.
|
|
9
|
+
*
|
|
10
|
+
* Chat history is not written here: a message routed into a run reaches that run's conversation
|
|
11
|
+
* through the control channel, and the run commits it to `.the-framework/conversations/` (#908).
|
|
12
|
+
* That is the answer to the question #680 asked — the Git repo, via the run that received it.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* How a turn that arrived here is attributed in the committed conversation (#917). Named once,
|
|
16
|
+
* here, so the surface owns its own name rather than the daemon spelling it inline twice.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DISCORD_VIA = "discord";
|
|
19
|
+
/** Everything the bot needs from the daemon. */
|
|
20
|
+
export interface DiscordBotOptions {
|
|
21
|
+
/** The bot token. Distinct from the notification webhook (#627), which cannot read replies. */
|
|
22
|
+
token: string;
|
|
23
|
+
/** The project a message belongs to when no run is live. */
|
|
24
|
+
target: () => Promise<ProjectTarget | undefined>;
|
|
25
|
+
/** That project's live run, if it has one. */
|
|
26
|
+
liveRun: (projectId: string) => Promise<RunSnapshot | undefined>;
|
|
27
|
+
/** Start a new run; resolves the run id, or `undefined` when it could not start. */
|
|
28
|
+
start: (projectId: string, text: string) => Promise<string | undefined>;
|
|
29
|
+
sendMessage: (projectId: string, text: string, runId: string) => Promise<void>;
|
|
30
|
+
sendChoice: (projectId: string, gateId: string, pick: string | string[], runId: string) => Promise<void>;
|
|
31
|
+
sendStop: (projectId: string, runId: string) => Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Bind a run to the channel this message came from (#932), so the session's answers are posted
|
|
34
|
+
* back where it was asked. Awaited *before* the run is handed the message: binding first is what
|
|
35
|
+
* makes the reply reliably count as new rather than being baselined away.
|
|
36
|
+
*/
|
|
37
|
+
onRunBound?: (runId: string, channelId: string) => Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the bot should act, read per message rather than at start, so turning it off takes
|
|
40
|
+
* effect without restarting the daemon — the same contract the notification watchers follow.
|
|
41
|
+
*/
|
|
42
|
+
enabled?: () => Promise<boolean>;
|
|
43
|
+
/** Restrict the bot to one channel. Unset means it answers wherever it is addressed. */
|
|
44
|
+
channelId?: string | undefined;
|
|
45
|
+
fetchImpl?: typeof fetch;
|
|
46
|
+
onLog?: (message: string) => void;
|
|
47
|
+
/** Gateway seams, for tests. */
|
|
48
|
+
gateway?: GatewayDeps;
|
|
49
|
+
}
|
|
50
|
+
/** A running bot. `stop()` is what takes it offline on `Ctrl+C`. */
|
|
51
|
+
export interface DiscordBot {
|
|
52
|
+
stop(): void;
|
|
53
|
+
/** Handle one message. Exposed so tests drive a cycle without a socket, like the watchers' `poll()`. */
|
|
54
|
+
handleMessage(message: DiscordMessage): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Connect the bot and route messages. Never throws: a chat integration that can take the daemon
|
|
58
|
+
* down is worse than one that is quiet.
|
|
59
|
+
*/
|
|
60
|
+
export declare function startDiscordBot(opts: DiscordBotOptions): DiscordBot;
|
|
61
|
+
//# sourceMappingURL=bot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../../src/discord/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,cAAc,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAEpF,OAAO,EAAgB,KAAK,aAAa,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAA;AAGjF;;;;;;;;;;GAUG;AAEH;;;GAGG;AACH,eAAO,MAAM,WAAW,YAAY,CAAA;AAEpC,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,+FAA+F;IAC/F,KAAK,EAAE,MAAM,CAAA;IACb,4DAA4D;IAC5D,MAAM,EAAE,MAAM,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAA;IAChD,8CAA8C;IAC9C,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC,CAAA;IAChE,oFAAoF;IACpF,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IACvE,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC9E,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACxG,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC7D;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAChE;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IAChC,wFAAwF;IACxF,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC9B,SAAS,CAAC,EAAE,OAAO,KAAK,CAAA;IACxB,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gCAAgC;IAChC,OAAO,CAAC,EAAE,WAAW,CAAA;CACtB;AAED,oEAAoE;AACpE,MAAM,WAAW,UAAU;IACzB,IAAI,IAAI,IAAI,CAAA;IACZ,wGAAwG;IACxG,aAAa,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;CACtD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,iBAAiB,GAAG,UAAU,CA0EnE"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DiscordGateway } from './gateway.js';
|
|
2
|
+
import { postMessage } from './rest.js';
|
|
3
|
+
import { decideAction } from './routing.js';
|
|
4
|
+
import { errorMessage } from '../error-message.js';
|
|
5
|
+
/**
|
|
6
|
+
* The Discord chatbot (#680): chat to The Framework from Discord instead of the dashboard.
|
|
7
|
+
*
|
|
8
|
+
* Every effect is an injected function, so the whole bot is testable by handing it a fake
|
|
9
|
+
* message — the routing decisions live in `routing.ts` and are pure, and this module is only
|
|
10
|
+
* the wiring. Same seam-and-`stop()` shape as the intervention/activity watchers.
|
|
11
|
+
*
|
|
12
|
+
* Chat history is not written here: a message routed into a run reaches that run's conversation
|
|
13
|
+
* through the control channel, and the run commits it to `.the-framework/conversations/` (#908).
|
|
14
|
+
* That is the answer to the question #680 asked — the Git repo, via the run that received it.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* How a turn that arrived here is attributed in the committed conversation (#917). Named once,
|
|
18
|
+
* here, so the surface owns its own name rather than the daemon spelling it inline twice.
|
|
19
|
+
*/
|
|
20
|
+
export const DISCORD_VIA = 'discord';
|
|
21
|
+
/**
|
|
22
|
+
* Connect the bot and route messages. Never throws: a chat integration that can take the daemon
|
|
23
|
+
* down is worse than one that is quiet.
|
|
24
|
+
*/
|
|
25
|
+
export function startDiscordBot(opts) {
|
|
26
|
+
const log = (message) => opts.onLog?.(message);
|
|
27
|
+
const handleMessage = async (message) => {
|
|
28
|
+
try {
|
|
29
|
+
if (opts.channelId && message.channelId !== opts.channelId)
|
|
30
|
+
return;
|
|
31
|
+
if (opts.enabled && !(await opts.enabled()))
|
|
32
|
+
return;
|
|
33
|
+
const target = await opts.target();
|
|
34
|
+
if (!target) {
|
|
35
|
+
await reply(message, 'No project is registered with The Framework yet.');
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
const live = await opts.liveRun(target.id).catch(() => undefined);
|
|
39
|
+
const action = decideAction(message.content, { live, target });
|
|
40
|
+
switch (action.kind) {
|
|
41
|
+
case 'choice':
|
|
42
|
+
await opts.sendChoice(action.projectId, action.gateId, action.pick, action.runId);
|
|
43
|
+
break;
|
|
44
|
+
case 'message':
|
|
45
|
+
// Bind before sending (#932): the answer to this message must land after the baseline.
|
|
46
|
+
await opts.onRunBound?.(action.runId, message.channelId).catch(() => { });
|
|
47
|
+
await opts.sendMessage(action.projectId, action.text, action.runId);
|
|
48
|
+
break;
|
|
49
|
+
case 'stop':
|
|
50
|
+
await opts.sendStop(action.projectId, action.runId);
|
|
51
|
+
break;
|
|
52
|
+
case 'start': {
|
|
53
|
+
const runId = await opts.start(action.projectId, action.text);
|
|
54
|
+
if (!runId) {
|
|
55
|
+
await reply(message, 'Could not start a session. It may already be busy.');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
// A run that did not exist a moment ago has nothing to adopt, so binding after the start
|
|
59
|
+
// is still a clean baseline, and it is the first point its id is known.
|
|
60
|
+
await opts.onRunBound?.(runId, message.channelId).catch(() => { });
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
case 'reply':
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
await reply(message, action.reply);
|
|
67
|
+
}
|
|
68
|
+
catch (err) {
|
|
69
|
+
log(`Discord bot could not handle a message: ${errorMessage(err)}`);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
const reply = async (to, content) => {
|
|
73
|
+
const sent = await postMessage(opts.token, to.channelId, content, {
|
|
74
|
+
replyToId: to.id,
|
|
75
|
+
...(opts.fetchImpl ? { fetchImpl: opts.fetchImpl } : {}),
|
|
76
|
+
});
|
|
77
|
+
if (!sent)
|
|
78
|
+
log('Discord bot could not post a reply');
|
|
79
|
+
};
|
|
80
|
+
const gateway = new DiscordGateway(opts.token, {
|
|
81
|
+
onMessage: message => void handleMessage(message),
|
|
82
|
+
onReady: id => log(`Discord bot online (${id})`),
|
|
83
|
+
onLog: log,
|
|
84
|
+
}, opts.gateway ?? {});
|
|
85
|
+
gateway.connect();
|
|
86
|
+
return {
|
|
87
|
+
stop: () => {
|
|
88
|
+
gateway.stop();
|
|
89
|
+
log('Discord bot offline');
|
|
90
|
+
},
|
|
91
|
+
handleMessage,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=bot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bot.js","sourceRoot":"","sources":["../../src/discord/bot.ts"],"names":[],"mappings":"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,MAAM,KAAK,GAAG,KAAK,EAAE,EAAkB,EAAE,OAAe,EAAiB,EAAE;QACzE,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE;YAChE,SAAS,EAAE,EAAE,CAAC,EAAE;YAChB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzD,CAAC,CAAA;QACF,IAAI,CAAC,IAAI;YAAE,GAAG,CAAC,oCAAoC,CAAC,CAAA;IACtD,CAAC,CAAA;IAED,MAAM,OAAO,GAAG,IAAI,cAAc,CAChC,IAAI,CAAC,KAAK,EACV;QACE,SAAS,EAAE,OAAO,CAAC,EAAE,CAAC,KAAK,aAAa,CAAC,OAAO,CAAC;QACjD,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,uBAAuB,EAAE,GAAG,CAAC;QAChD,KAAK,EAAE,GAAG;KACX,EACD,IAAI,CAAC,OAAO,IAAI,EAAE,CACnB,CAAA;IACD,OAAO,CAAC,OAAO,EAAE,CAAA;IAEjB,OAAO;QACL,IAAI,EAAE,GAAG,EAAE;YACT,OAAO,CAAC,IAAI,EAAE,CAAA;YACd,GAAG,CAAC,qBAAqB,CAAC,CAAA;QAC5B,CAAC;QACD,aAAa;KACd,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A minimal Discord gateway client (#680): the inbound half of the Discord integration, which
|
|
3
|
+
* until now was outbound-only — a webhook `POST` can notify, but it cannot read a reply (#627).
|
|
4
|
+
*
|
|
5
|
+
* Deliberately hand-rolled over the global `WebSocket` rather than pulling in `discord.js`. The
|
|
6
|
+
* package has three runtime dependencies and builds everything else on node builtins behind
|
|
7
|
+
* injectable seams; a client library for the handful of opcodes below would be the largest
|
|
8
|
+
* dependency in the package by an order of magnitude.
|
|
9
|
+
*
|
|
10
|
+
* Implements only what a chat bot needs: identify, heartbeat, resume, and message events.
|
|
11
|
+
*/
|
|
12
|
+
/** Gateway opcodes we act on. */
|
|
13
|
+
export declare const OP: {
|
|
14
|
+
readonly dispatch: 0;
|
|
15
|
+
readonly heartbeat: 1;
|
|
16
|
+
readonly identify: 2;
|
|
17
|
+
readonly resume: 6;
|
|
18
|
+
readonly reconnect: 7;
|
|
19
|
+
readonly invalidSession: 9;
|
|
20
|
+
readonly hello: 10;
|
|
21
|
+
readonly heartbeatAck: 11;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Gateway intents. `MESSAGE_CONTENT` is privileged: it must be enabled on the application in
|
|
25
|
+
* Discord's developer portal, or the gateway connects and every message arrives with an empty
|
|
26
|
+
* `content`. That failure is silent, which is why {@link DiscordGateway} logs it explicitly.
|
|
27
|
+
*/
|
|
28
|
+
export declare const INTENTS: {
|
|
29
|
+
readonly guildMessages: number;
|
|
30
|
+
readonly directMessages: number;
|
|
31
|
+
readonly messageContent: number;
|
|
32
|
+
};
|
|
33
|
+
/** The intents a chat bot needs: messages in channels and DMs, plus their text. */
|
|
34
|
+
export declare const CHAT_INTENTS: number;
|
|
35
|
+
/**
|
|
36
|
+
* The socket seam. Mirrors the slice of `WebSocket` this uses, so a test drives the protocol
|
|
37
|
+
* with a fake and no network — the same shape the watchers use for `fetch`.
|
|
38
|
+
*/
|
|
39
|
+
export interface GatewaySocket {
|
|
40
|
+
send(data: string): void;
|
|
41
|
+
close(): void;
|
|
42
|
+
onMessage(handler: (data: string) => void): void;
|
|
43
|
+
onClose(handler: () => void): void;
|
|
44
|
+
onError(handler: (err: unknown) => void): void;
|
|
45
|
+
}
|
|
46
|
+
/** Opens a {@link GatewaySocket} for a url. */
|
|
47
|
+
export type SocketFactory = (url: string) => GatewaySocket;
|
|
48
|
+
/** A cancellable timer, so heartbeats are deterministic under test. */
|
|
49
|
+
export interface Timer {
|
|
50
|
+
stop(): void;
|
|
51
|
+
}
|
|
52
|
+
/** Schedules `fn` every `ms`. Default wraps `setInterval` and unrefs it. */
|
|
53
|
+
export type IntervalFactory = (fn: () => void, ms: number) => Timer;
|
|
54
|
+
/** Schedules `fn` once after `ms`. Default wraps `setTimeout` and unrefs it. */
|
|
55
|
+
export type DelayFactory = (fn: () => void, ms: number) => Timer;
|
|
56
|
+
/** One inbound chat message, narrowed to what routing needs. */
|
|
57
|
+
export interface DiscordMessage {
|
|
58
|
+
id: string;
|
|
59
|
+
channelId: string;
|
|
60
|
+
/** Message text. Empty when the privileged MESSAGE_CONTENT intent is not enabled. */
|
|
61
|
+
content: string;
|
|
62
|
+
authorId: string;
|
|
63
|
+
authorName: string;
|
|
64
|
+
/** Whether the author is a bot (including us): never act on these, or two bots loop forever. */
|
|
65
|
+
fromBot: boolean;
|
|
66
|
+
/** Set when the message replies to another, used to thread an answer back to its gate. */
|
|
67
|
+
replyToId?: string;
|
|
68
|
+
}
|
|
69
|
+
/** What {@link DiscordGateway} reports to its owner. */
|
|
70
|
+
export interface GatewayHandlers {
|
|
71
|
+
onMessage(message: DiscordMessage): void;
|
|
72
|
+
/** Connected and identified; carries our own user id so we can ignore our own messages. */
|
|
73
|
+
onReady?(selfId: string): void;
|
|
74
|
+
/** Non-fatal diagnostics (a failed resume, a missing intent). */
|
|
75
|
+
onLog?(message: string): void;
|
|
76
|
+
}
|
|
77
|
+
/** Injectable seams for {@link DiscordGateway}. */
|
|
78
|
+
export interface GatewayDeps {
|
|
79
|
+
socket?: SocketFactory;
|
|
80
|
+
interval?: IntervalFactory;
|
|
81
|
+
delay?: DelayFactory;
|
|
82
|
+
url?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* A connected Discord bot session. Owns the socket, the heartbeat, and the resume state; hands
|
|
86
|
+
* every chat message to its {@link GatewayHandlers}.
|
|
87
|
+
*
|
|
88
|
+
* Errors are swallowed into `onLog` rather than thrown: a notifier must never take the daemon
|
|
89
|
+
* down, which is the same contract the intervention/activity watchers follow.
|
|
90
|
+
*/
|
|
91
|
+
export declare class DiscordGateway {
|
|
92
|
+
private readonly token;
|
|
93
|
+
private readonly handlers;
|
|
94
|
+
private readonly deps;
|
|
95
|
+
private socket;
|
|
96
|
+
private heartbeat;
|
|
97
|
+
private sequence;
|
|
98
|
+
private sessionId;
|
|
99
|
+
private resumeUrl;
|
|
100
|
+
private acked;
|
|
101
|
+
private selfId;
|
|
102
|
+
/** Set by {@link stop}, so a socket closing on our own terms never reconnects. */
|
|
103
|
+
private stopped;
|
|
104
|
+
/** Consecutive reconnects, for the backoff. Reset once a connection actually works. */
|
|
105
|
+
private attempts;
|
|
106
|
+
private pendingReconnect;
|
|
107
|
+
constructor(token: string, handlers: GatewayHandlers, deps?: GatewayDeps);
|
|
108
|
+
/** Open the connection and identify. Safe to call once; use {@link stop} to end it. */
|
|
109
|
+
connect(): void;
|
|
110
|
+
/**
|
|
111
|
+
* Close the connection for good. This is what takes the bot offline on `Ctrl+C` (#680): the
|
|
112
|
+
* daemon calls it from its shutdown block, and no reconnect follows.
|
|
113
|
+
*/
|
|
114
|
+
stop(): void;
|
|
115
|
+
/** Our own user id once READY has landed. */
|
|
116
|
+
get userId(): string | undefined;
|
|
117
|
+
private open;
|
|
118
|
+
/**
|
|
119
|
+
* A closed socket we did not close ourselves: resume if we can, else identify fresh.
|
|
120
|
+
*
|
|
121
|
+
* Backed off, and that is not a nicety: a connection that fails immediately (offline, a bad
|
|
122
|
+
* token) closes as fast as it opens, so reconnecting inline is a tight loop that pins a core
|
|
123
|
+
* and gets the bot rate-limited. Doubles to a cap, and resets once a connection works.
|
|
124
|
+
*/
|
|
125
|
+
private reopen;
|
|
126
|
+
private receive;
|
|
127
|
+
private onHello;
|
|
128
|
+
private identify;
|
|
129
|
+
private resume;
|
|
130
|
+
private sendHeartbeat;
|
|
131
|
+
private onDispatch;
|
|
132
|
+
private send;
|
|
133
|
+
private log;
|
|
134
|
+
}
|
|
135
|
+
/** Narrow a MESSAGE_CREATE payload; `undefined` when it is not a shape we can use. */
|
|
136
|
+
export declare function parseMessage(data: unknown): DiscordMessage | undefined;
|
|
137
|
+
//# sourceMappingURL=gateway.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gateway.d.ts","sourceRoot":"","sources":["../../src/discord/gateway.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH,iCAAiC;AACjC,eAAO,MAAM,EAAE;;;;;;;;;CASL,CAAA;AAEV;;;;GAIG;AACH,eAAO,MAAM,OAAO;;;;CAIV,CAAA;AAEV,mFAAmF;AACnF,eAAO,MAAM,YAAY,QAA0E,CAAA;AAKnG;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,IAAI,IAAI,CAAA;IACb,SAAS,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAA;IAChD,OAAO,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,IAAI,CAAA;IAClC,OAAO,CAAC,OAAO,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,GAAG,IAAI,CAAA;CAC/C;AAED,+CAA+C;AAC/C,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,aAAa,CAAA;AAE1D,uEAAuE;AACvE,MAAM,WAAW,KAAK;IACpB,IAAI,IAAI,IAAI,CAAA;CACb;AAED,4EAA4E;AAC5E,MAAM,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,KAAK,CAAA;AAEnE,gFAAgF;AAChF,MAAM,MAAM,YAAY,GAAG,CAAC,EAAE,EAAE,MAAM,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,KAAK,CAAA;AAMhE,gEAAgE;AAChE,MAAM,WAAW,cAAc;IAC7B,EAAE,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