@openagt/dashboard 0.0.0-stage → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +125 -2
- 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-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-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/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-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/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 +38 -0
- package/dist/built-in.d.ts.map +1 -0
- package/dist/built-in.js +119 -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/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/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/daemon-runtime.d.ts +42 -0
- package/dist/daemon-runtime.d.ts.map +1 -0
- package/dist/daemon-runtime.js +183 -0
- package/dist/daemon-runtime.js.map +1 -0
- package/dist/daemon-services.d.ts +37 -0
- package/dist/daemon-services.d.ts.map +1 -0
- package/dist/daemon-services.js +126 -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.d.ts +65 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +202 -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/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/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/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/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/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 +101 -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 +106 -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-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/server.d.ts +105 -0
- package/dist/dashboard/server.d.ts.map +1 -0
- package/dist/dashboard/server.js +231 -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/types.d.ts +135 -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-bundle/assets/client-CbBRB9m4.js +9 -0
- package/dist/dashboard-bundle/assets/jsx-runtime-By8HlURe.js +1 -0
- package/dist/dashboard-bundle/assets/main-B98UOA3_.js +140 -0
- package/dist/dashboard-bundle/assets/main-ByRjbCiA.css +2 -0
- package/dist/dashboard-bundle/assets/module-v213KWfH.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-rpc/context.d.ts +56 -0
- package/dist/dashboard-rpc/context.d.ts.map +1 -0
- package/dist/dashboard-rpc/context.js +106 -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/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/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/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 +45 -0
- package/dist/dashboard-rpc/modules.d.ts.map +1 -0
- package/dist/dashboard-rpc/modules.js +79 -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/projects.d.ts +85 -0
- package/dist/dashboard-rpc/projects.d.ts.map +1 -0
- package/dist/dashboard-rpc/projects.js +129 -0
- package/dist/dashboard-rpc/projects.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/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/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/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/test-context.d.ts +23 -0
- package/dist/dashboard-rpc/test-context.d.ts.map +1 -0
- package/dist/dashboard-rpc/test-context.js +43 -0
- package/dist/dashboard-rpc/test-context.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/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/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/index.d.ts +42 -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 +31 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +54 -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/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/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 +38 -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 +79 -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 +37 -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/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/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 +100 -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 +105 -0
- package/dist/module-types/src/dashboard/run-inbox.d.ts +30 -0
- package/dist/module-types/src/dashboard/types.d.ts +134 -0
- package/dist/module-types/src/dashboard-rpc/context.d.ts +55 -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 +44 -0
- package/dist/module-types/src/dashboard-rpc/preferences.d.ts +40 -0
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +84 -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/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/has-remote.d.ts +7 -0
- package/dist/module-types/src/index.d.ts +41 -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/openagent-dir.d.ts +10 -0
- package/dist/module-types/src/openagent-gitignore.d.ts +11 -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 +59 -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 +226 -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/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/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/openagent-dir.d.ts +11 -0
- package/dist/openagent-dir.d.ts.map +1 -0
- package/dist/openagent-dir.js +11 -0
- package/dist/openagent-dir.js.map +1 -0
- package/dist/openagent-gitignore.d.ts +12 -0
- package/dist/openagent-gitignore.d.ts.map +1 -0
- package/dist/openagent-gitignore.js +19 -0
- package/dist/openagent-gitignore.js.map +1 -0
- package/dist/pick-directory.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/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/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 +60 -0
- package/dist/project-errors.d.ts.map +1 -0
- package/dist/project-errors.js +51 -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.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/publish-levels.d.ts +33 -0
- package/dist/publish-levels.d.ts.map +1 -0
- package/dist/publish-levels.js +53 -0
- package/dist/publish-levels.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 +227 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +364 -0
- package/dist/registry.js.map +1 -0
- package/dist/remove-files.d.ts +24 -0
- package/dist/remove-files.d.ts.map +1 -0
- package/dist/remove-files.js +98 -0
- package/dist/remove-files.js.map +1 -0
- package/dist/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/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/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-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/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/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/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/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/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,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The checkouts and the branches, as OpenAgent reads and acts on them (#1774). OpenAgent
|
|
3
|
+
* keeps no checkout and imports no branches package: a project's checkouts come from whichever of
|
|
4
|
+
* its packages declares that it provides them — `"openagent": { "branches": "<command>" }` in the
|
|
5
|
+
* package's own package.json — and OpenAgent reads and moves them by running that command.
|
|
6
|
+
* Swap the package for another that answers the same command line and prints the same shapes,
|
|
7
|
+
* and nothing here changes. No package declares it: the project has no checkouts, so no run with
|
|
8
|
+
* one, no branch to hand off, nothing to remove.
|
|
9
|
+
*
|
|
10
|
+
* The command line a provider answers, each printing one JSON document and exiting 0 (a refusal
|
|
11
|
+
* exits 1 with its reason on stderr):
|
|
12
|
+
* `<command> list [--sizes]` every checkout, as an array of {@link Checkout}
|
|
13
|
+
* `<command> show [--from <commit>] <branch>...` what each branch holds and where it stands, as an array of {@link BranchState}, in the order asked;
|
|
14
|
+
* measured from `<commit>`, where the branches started, in place of the default branch;
|
|
15
|
+
* a full commit id in place of a branch is read as a branch that ends there
|
|
16
|
+
* `<command> merge <b>` merge the branch into the default branch, on this machine, then delete it
|
|
17
|
+
* `<command> push --branch <b>` push the branch to the remote; a branch only the remote has is answered as it is
|
|
18
|
+
* `<command> remove <id> [--from <commit>] [--discard]` reclaim a run's checkout once its branch holds everything, pushing nothing, its branch measured from the commit it started from; `--discard` drops uncommitted work
|
|
19
|
+
* `list` and `show` read this machine, no network: OpenAgent polls. `show` answers the branch's
|
|
20
|
+
* git facts only; its pull request is the git host provider's (`git-host.ts`), as every pull request is.
|
|
21
|
+
*
|
|
22
|
+
* That is the whole contract: git, and nothing beyond it (#1820). OpenAgent reads checkouts to
|
|
23
|
+
* find the runs that have one, and a branch's state for what it composes: the run page's handoff,
|
|
24
|
+
* the Human Queue's unpushed rows. Opening a pull request is the push here, then the git host
|
|
25
|
+
* provider's `open`. What a checkout is, where it lives, how a branch is pushed is the package's.
|
|
26
|
+
*
|
|
27
|
+
* The shapes, owned here: {@link Checkout}, {@link BranchState}.
|
|
28
|
+
*/
|
|
29
|
+
/** A run's checkout: where it works, as a provider lists it. */
|
|
30
|
+
export interface Checkout {
|
|
31
|
+
/** The run's id. */
|
|
32
|
+
id: string;
|
|
33
|
+
/** The checkout's directory, absolute. */
|
|
34
|
+
path: string;
|
|
35
|
+
/** The branch it is on; absent for a checkout on none, or one git no longer knows. */
|
|
36
|
+
branch?: string;
|
|
37
|
+
/** The name the agent gave its work, as the provider answers it; absent while the run has not named it. Drawn where a branch would be drawn as a name. */
|
|
38
|
+
name?: string;
|
|
39
|
+
/** Its size on disk, when sizes were asked for. */
|
|
40
|
+
sizeBytes?: number;
|
|
41
|
+
}
|
|
42
|
+
/** One commit a branch holds beyond its base. */
|
|
43
|
+
export interface BranchCommit {
|
|
44
|
+
sha: string;
|
|
45
|
+
subject: string;
|
|
46
|
+
}
|
|
47
|
+
/** One file a branch changed against its base. */
|
|
48
|
+
export interface BranchFile {
|
|
49
|
+
path: string;
|
|
50
|
+
insertions: number;
|
|
51
|
+
deletions: number;
|
|
52
|
+
/** A binary file, where line counts mean nothing. */
|
|
53
|
+
binary: boolean;
|
|
54
|
+
}
|
|
55
|
+
/** What a branch holds and where it stands, as a provider answers `show`: git facts, no pull request. */
|
|
56
|
+
export interface BranchState {
|
|
57
|
+
branch: string;
|
|
58
|
+
/** The name the agent gave its work, as the provider answers it; absent while the run has not named it. */
|
|
59
|
+
name?: string;
|
|
60
|
+
/** The branch exists on this machine. Gone: every list below is empty, and only the remote can say more. */
|
|
61
|
+
exists: boolean;
|
|
62
|
+
/** What it is measured against: the commit asked with `--from`, else the project's default branch, when one was found. */
|
|
63
|
+
base?: string;
|
|
64
|
+
/** The branch's own commits beyond the base, newest first. */
|
|
65
|
+
commits: BranchCommit[];
|
|
66
|
+
/** What it changed since it left the base. */
|
|
67
|
+
files: BranchFile[];
|
|
68
|
+
/** The project has a remote to push to. */
|
|
69
|
+
hasRemote: boolean;
|
|
70
|
+
/** The remote has the branch at this same tip. */
|
|
71
|
+
pushed: boolean;
|
|
72
|
+
/** The base already contains it. */
|
|
73
|
+
merged: boolean;
|
|
74
|
+
/** The uncommitted paths in the checkout that is on this branch; absent when no checkout is. */
|
|
75
|
+
pendingFiles?: string[];
|
|
76
|
+
}
|
|
77
|
+
/** What pushing a branch did: `pushed` is false when only the remote had it, so there was nothing here to push. */
|
|
78
|
+
export type PushOutcome = {
|
|
79
|
+
ok: true;
|
|
80
|
+
pushed: boolean;
|
|
81
|
+
} | {
|
|
82
|
+
ok: false;
|
|
83
|
+
error: string;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* What merging a branch into the project's default branch did: `into` names that branch, `commit`
|
|
87
|
+
* is the merged branch's last commit and `from` the commit its work began at, and `deleted` says
|
|
88
|
+
* the branch went once its work was in.
|
|
89
|
+
*/
|
|
90
|
+
export type MergeOutcome = {
|
|
91
|
+
ok: true;
|
|
92
|
+
into: string;
|
|
93
|
+
commit: string;
|
|
94
|
+
from: string;
|
|
95
|
+
deleted: boolean;
|
|
96
|
+
} | {
|
|
97
|
+
ok: false;
|
|
98
|
+
error: string;
|
|
99
|
+
};
|
|
100
|
+
/** What reclaiming a checkout did: done, with the branches that went with it when any did, or the provider's reason it stayed. */
|
|
101
|
+
export type RemoveOutcome = {
|
|
102
|
+
ok: true;
|
|
103
|
+
branchesDeleted?: string[];
|
|
104
|
+
} | {
|
|
105
|
+
ok: false;
|
|
106
|
+
error: string;
|
|
107
|
+
};
|
|
108
|
+
/** A project's checkouts and branches: what a provider answers, read and moved by OpenAgent. */
|
|
109
|
+
export interface BranchesSource {
|
|
110
|
+
/**
|
|
111
|
+
* Every checkout; `[]` when none can be read. `fresh` asks past a list read within the window:
|
|
112
|
+
* the caller is looking for a checkout that may have just appeared. A list read less than
|
|
113
|
+
* {@link FRESH_MS} ago still answers, so a caller asking every second for a run that has no
|
|
114
|
+
* checkout is not a process every second.
|
|
115
|
+
*/
|
|
116
|
+
list(opts?: {
|
|
117
|
+
sizes?: boolean;
|
|
118
|
+
fresh?: boolean;
|
|
119
|
+
}): Promise<Checkout[]>;
|
|
120
|
+
/**
|
|
121
|
+
* Each branch's state, in the order asked; a branch the provider did not answer for is missing.
|
|
122
|
+
* `[]` when nothing can be read. `from` is the commit the branches started from, which their
|
|
123
|
+
* commits and files are then measured from. A full commit id in place of a branch reads what a
|
|
124
|
+
* branch that ended there held.
|
|
125
|
+
*/
|
|
126
|
+
show(branches: readonly string[], from?: string): Promise<BranchState[]>;
|
|
127
|
+
/** Push a branch to the remote: the checkout on it under its clean rule, else the branch itself. */
|
|
128
|
+
push(branch: string): Promise<PushOutcome>;
|
|
129
|
+
/** Merge a branch into the project's default branch, on this machine, then delete it; a merge that conflicts changes nothing. */
|
|
130
|
+
merge(branch: string): Promise<MergeOutcome>;
|
|
131
|
+
/**
|
|
132
|
+
* Reclaim a run's checkout, or why it stayed. `from` is the commit the run's branch started
|
|
133
|
+
* from, when that is not the default branch: what tells a branch with nothing of its own.
|
|
134
|
+
* `discard` drops its uncommitted work instead of refusing over it.
|
|
135
|
+
*/
|
|
136
|
+
remove(id: string, opts?: {
|
|
137
|
+
discard?: boolean;
|
|
138
|
+
from?: string;
|
|
139
|
+
}): Promise<RemoveOutcome>;
|
|
140
|
+
}
|
|
141
|
+
/** The checkouts of the project at `root`, or `undefined` when none of its packages provides them. */
|
|
142
|
+
export type BranchesFor = (root: string) => Promise<BranchesSource | undefined>;
|
|
143
|
+
/** A {@link BranchesFor} that also forgets what it read of one project, for when a module or a run just wrote there. */
|
|
144
|
+
export type BranchesReader = BranchesFor & {
|
|
145
|
+
changed(root: string): void;
|
|
146
|
+
};
|
|
147
|
+
/** The rows read back from a provider's `list`: the objects with an id and a path, everything else as printed; anything else is no checkout. */
|
|
148
|
+
export declare function parseCheckouts(output: unknown): Checkout[];
|
|
149
|
+
/** The states read back from a provider's `show`: the objects with a branch and the three verdicts, lists cleaned; anything else is no state. */
|
|
150
|
+
export declare function parseBranchStates(output: unknown): BranchState[];
|
|
151
|
+
/**
|
|
152
|
+
* The production {@link BranchesReader}: the project's provider, looked up by its package.json,
|
|
153
|
+
* one source per project kept while the same command provides — so the cache holds across the
|
|
154
|
+
* many reads of one poll, and a project that installs, swaps or drops its provider is read the new
|
|
155
|
+
* way within {@link CACHE_MS}. `changed(root)` forgets that project's reads, so the next read runs
|
|
156
|
+
* the command again: a run just started there, or a module's command just ran, and a checkout may
|
|
157
|
+
* have come or gone.
|
|
158
|
+
*/
|
|
159
|
+
export declare function providedBranches(now?: () => number): BranchesReader;
|
|
160
|
+
/** OpenAgent's one reader of the checkouts, shared by every caller so they share its cache. */
|
|
161
|
+
export declare const projectBranches: BranchesReader;
|
|
162
|
+
/** A {@link BranchesFor} for a project with no provider: no checkouts. */
|
|
163
|
+
export declare const noBranches: BranchesFor;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The project's git host, as OpenAgent reads and acts on it (#1820): the pull requests of the
|
|
3
|
+
* project, opening one, landing one, and the project's page there. OpenAgent names no git host
|
|
4
|
+
* and runs no git host tool: a project's git host comes from whichever of its packages declares that it
|
|
5
|
+
* provides it — `"openagent": { "git-host": "<command>" }` in the package's own package.json — and
|
|
6
|
+
* OpenAgent asks by running that command. Swap the package for another that answers the same
|
|
7
|
+
* command line and prints the same shapes, and nothing here changes. No package declares it: the
|
|
8
|
+
* project has no git host, so no pull requests, and a finished run's last step is the push. A
|
|
9
|
+
* built-in package's git host is the project's only when it answers the project's page there: a
|
|
10
|
+
* project whose remote is on another host, or that has no remote, has none.
|
|
11
|
+
*
|
|
12
|
+
* The command line a provider answers, each printing one JSON document and exiting 0 (a refusal
|
|
13
|
+
* exits 1 with its reason on stderr):
|
|
14
|
+
* `<command> requests [--branch <b>] [--state open|merged|all] [--since <iso>]`
|
|
15
|
+
* the project's pull requests, newest first, as an array of {@link GitHostRequest}
|
|
16
|
+
* `<command> open --branch <b> --title <t> [--body <text>] [--draft]`
|
|
17
|
+
* open the branch's pull request; an open one is answered as it is (`existing`)
|
|
18
|
+
* `<command> merge <number>` land the pull request: armed to merge on green, or merged at once
|
|
19
|
+
* `<command> home` the project's page on the git host, and the git host's name
|
|
20
|
+
* The branch `open` is asked for must already be on the remote: pushing is the branches
|
|
21
|
+
* provider's step, and OpenAgent runs it first.
|
|
22
|
+
*
|
|
23
|
+
* The shapes, owned here: {@link GitHostRequest}, {@link GitHostHome}.
|
|
24
|
+
*/
|
|
25
|
+
/** A pull request, as a provider lists it. */
|
|
26
|
+
export interface GitHostRequest {
|
|
27
|
+
number: number;
|
|
28
|
+
url: string;
|
|
29
|
+
state: 'open' | 'merged' | 'closed';
|
|
30
|
+
title: string;
|
|
31
|
+
draft: boolean;
|
|
32
|
+
/** The branch the request is from. */
|
|
33
|
+
branch: string;
|
|
34
|
+
/** The commit the request's head is at. */
|
|
35
|
+
head: string;
|
|
36
|
+
/** ISO creation time. */
|
|
37
|
+
createdAt: string;
|
|
38
|
+
/** ISO merge time, for a merged request. */
|
|
39
|
+
mergedAt?: string;
|
|
40
|
+
/** The commit a merged request landed as on the base branch. */
|
|
41
|
+
mergeCommit?: string;
|
|
42
|
+
}
|
|
43
|
+
/** The project's page on the git host, and what the git host is called: what a link is drawn from. */
|
|
44
|
+
export interface GitHostHome {
|
|
45
|
+
url: string;
|
|
46
|
+
name: string;
|
|
47
|
+
}
|
|
48
|
+
/** What asking for requests answered: the list, or why there is none: "none" and "could not tell" are different answers. */
|
|
49
|
+
export type RequestsOutcome = {
|
|
50
|
+
ok: true;
|
|
51
|
+
requests: GitHostRequest[];
|
|
52
|
+
} | {
|
|
53
|
+
ok: false;
|
|
54
|
+
error: string;
|
|
55
|
+
};
|
|
56
|
+
/** What opening a pull request left: the request, and whether it was open already. */
|
|
57
|
+
export type OpenOutcome = {
|
|
58
|
+
ok: true;
|
|
59
|
+
request: {
|
|
60
|
+
number: number;
|
|
61
|
+
url: string;
|
|
62
|
+
};
|
|
63
|
+
existing: boolean;
|
|
64
|
+
} | {
|
|
65
|
+
ok: false;
|
|
66
|
+
error: string;
|
|
67
|
+
};
|
|
68
|
+
/** What landing a pull request did: armed to merge on green, merged at once, or the provider watching its checks. */
|
|
69
|
+
export type MergeOutcome = {
|
|
70
|
+
ok: true;
|
|
71
|
+
outcome: 'auto-armed' | 'merged' | 'watching';
|
|
72
|
+
} | {
|
|
73
|
+
ok: false;
|
|
74
|
+
error: string;
|
|
75
|
+
};
|
|
76
|
+
/** A project's git host: what a provider answers, read and moved by OpenAgent. */
|
|
77
|
+
export interface GitHostSource {
|
|
78
|
+
/** The project's pull requests, newest first: all, or one branch's, or by state, or since a time. */
|
|
79
|
+
requests(opts?: {
|
|
80
|
+
branch?: string;
|
|
81
|
+
state?: 'open' | 'merged' | 'all';
|
|
82
|
+
since?: string;
|
|
83
|
+
}): Promise<RequestsOutcome>;
|
|
84
|
+
/** Open a branch's pull request, or answer the open one. */
|
|
85
|
+
open(branch: string, opts: {
|
|
86
|
+
title: string;
|
|
87
|
+
body?: string;
|
|
88
|
+
draft?: boolean;
|
|
89
|
+
}): Promise<OpenOutcome>;
|
|
90
|
+
/** Land a pull request. */
|
|
91
|
+
merge(number: number): Promise<MergeOutcome>;
|
|
92
|
+
/** The project's page on the git host; `undefined` when the provider cannot tell (no remote there). */
|
|
93
|
+
home(): Promise<GitHostHome | undefined>;
|
|
94
|
+
}
|
|
95
|
+
/** The git host of the project at `root`, or `undefined` when none of its packages provides one. */
|
|
96
|
+
export type GitHostFor = (root: string) => Promise<GitHostSource | undefined>;
|
|
97
|
+
/** A {@link GitHostFor} that also forgets what it knows of one project. */
|
|
98
|
+
export type GitHostReader = GitHostFor & {
|
|
99
|
+
changed(root: string): void;
|
|
100
|
+
};
|
|
101
|
+
/** The rows read back from a provider's `requests`: the objects with the facts a request needs; anything else is no request. */
|
|
102
|
+
export declare function parseRequests(output: unknown): GitHostRequest[];
|
|
103
|
+
/**
|
|
104
|
+
* The production {@link GitHostReader}: the project's provider, looked up by its package.json, one
|
|
105
|
+
* source per project kept while the same command provides, so a project that installs, swaps or
|
|
106
|
+
* drops its git host is read the new way within {@link CACHE_MS}. `changed(root)` forgets the
|
|
107
|
+
* project, so the next ask looks its provider up again.
|
|
108
|
+
*/
|
|
109
|
+
export declare function providedGitHost(now?: () => number): GitHostReader;
|
|
110
|
+
/** OpenAgent's one reader of the git host, shared by every caller. */
|
|
111
|
+
export declare const projectGitHost: GitHostReader;
|
|
112
|
+
/** A {@link GitHostFor} for a project with no git host package. */
|
|
113
|
+
export declare const noGitHost: GitHostFor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { nodeStoreFs, listAgents, readAllAgents, findAgent, isPidAlive, readLiveMeta, loadAgentEvents, readLiveMetas, readDoing, readFinishedDiary, type StoreFs, type AgentMeta, type LiveAgent, type AgentStatus, } from './agent-store.js';
|
|
2
|
+
export { findCheckout, resolveAgentCheckout, resolveAgentDiary, type AgentDiarySource } from './agent-checkout.js';
|
|
3
|
+
export { projectRuns, providedRuns, noRuns, parseRunCard, isRunId, type RunsFor, type RunsReader, type RunsSource, type RunsWrite, type RunCard, type RunPatch, type RunStatus, type AnyDiaryLine, type FinishedRun } from './runs.js';
|
|
4
|
+
export { projectBranches, providedBranches, noBranches, parseCheckouts, parseBranchStates, type BranchesFor, type BranchesReader, type BranchesSource, type RemoveOutcome as BranchRemoveOutcome, type Checkout, type BranchState, type BranchCommit, type BranchFile, type PushOutcome as BranchPushOutcome } from './branches.js';
|
|
5
|
+
export { projectGitHost, providedGitHost, noGitHost, parseRequests, type GitHostFor, type GitHostReader, type GitHostSource, type GitHostRequest, type GitHostHome, type RequestsOutcome as GitHostRequestsOutcome, type OpenOutcome as GitHostOpenOutcome, type MergeOutcome as GitHostMergeOutcome } from './git-host.js';
|
|
6
|
+
export { projectQueue, providedQueue, noQueue, parseQueueEntries, type QueueFor, type QueueReader, type QueueSource } from './queue.js';
|
|
7
|
+
export { providedDataChanged } from './provided.js';
|
|
8
|
+
export { fromRunCard, fromDiaryLine, eventsOf } from './run-record.js';
|
|
9
|
+
export { agentIdFromStartedAt, startedAtFromAgentId } from '../agent-id.js';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A package's command just ran in the project at `root` (a module's, through the dashboard), and
|
|
3
|
+
* may have written what one of OpenAgent's provided readers caches: every provided reader
|
|
4
|
+
* forgets that project, so its next read runs the provider again. OpenAgent never knows which
|
|
5
|
+
* command writes what; forgetting is cheap and re-reading is what it does anyway.
|
|
6
|
+
*/
|
|
7
|
+
export declare function providedDataChanged(root: string): void;
|
|
8
|
+
/** The kinds of OpenAgent's data a project's package may provide, one reader each (`git-host` is `git-host.ts`). */
|
|
9
|
+
export declare const PROVIDED_KINDS: readonly ['tickets', 'queue', 'runs', 'branches', 'git-host', 'repository'];
|
|
10
|
+
/**
|
|
11
|
+
* Why a kind of the project's data has no provider although packages declare it (#1820): two or
|
|
12
|
+
* more declare the kind and the project's package.json names none, or names one that does not
|
|
13
|
+
* declare it. One sentence per such kind, for the project's error banner; none when every kind is
|
|
14
|
+
* settled. Nobody declaring a kind is not a problem: the project has none of that data.
|
|
15
|
+
*/
|
|
16
|
+
export declare function providerProblems(root: string): Promise<string[]>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The agent queue, as OpenAgent reads it (#1774). OpenAgent keeps no queue and imports no
|
|
3
|
+
* queue package: a project's queue comes from whichever of its packages declares that it provides
|
|
4
|
+
* it — `"openagent": { "queue": "<command>" }` in the package's own package.json — and
|
|
5
|
+
* OpenAgent reads it by running that command. Swap the package for another that answers the same
|
|
6
|
+
* command line and prints the same shape, and nothing here changes. No package declares it: the
|
|
7
|
+
* project has no queue, and the dashboard shows it none.
|
|
8
|
+
*
|
|
9
|
+
* The command line a provider answers, printing one JSON document and exiting 0:
|
|
10
|
+
* `<command> --local` the open entries, in order of work, as an array of strings
|
|
11
|
+
* `--local` reads the copy on this machine, no network: OpenAgent polls.
|
|
12
|
+
*
|
|
13
|
+
* That is the whole contract. Writing the queue is not OpenAgent's: a module the queue package
|
|
14
|
+
* brings acts on it through its own command (`@openagt/dashboard/module`'s link actions), and OpenAgent
|
|
15
|
+
* only re-reads.
|
|
16
|
+
*
|
|
17
|
+
* The shape, owned here: an entry is one string, the task a future agent is started with, as the
|
|
18
|
+
* queue's own command prints it. A markdown link at its start names the work and where it points;
|
|
19
|
+
* how a dashboard reads that is the queue package's module's.
|
|
20
|
+
*/
|
|
21
|
+
/** A project's queue: what a provider answers, read by OpenAgent. */
|
|
22
|
+
export interface QueueSource {
|
|
23
|
+
/** The open entries, in order of work; `[]` when none can be read. */
|
|
24
|
+
list(): Promise<string[]>;
|
|
25
|
+
}
|
|
26
|
+
/** The queue of the project at `root`, or `undefined` when none of its packages provides one. */
|
|
27
|
+
export type QueueFor = (root: string) => Promise<QueueSource | undefined>;
|
|
28
|
+
/** A {@link QueueFor} that also forgets what it read of one project, for when a module just wrote there. */
|
|
29
|
+
export type QueueReader = QueueFor & {
|
|
30
|
+
changed(root: string): void;
|
|
31
|
+
};
|
|
32
|
+
/** Entries read back from a provider's output: the non-empty strings of an array, trimmed; anything else is no entries. */
|
|
33
|
+
export declare function parseQueueEntries(output: unknown): string[];
|
|
34
|
+
/**
|
|
35
|
+
* The production {@link QueueReader}: the project's provider, looked up by its package.json, one
|
|
36
|
+
* source per project kept while the same command provides — so the cache holds across the many
|
|
37
|
+
* reads of one poll, and a project that installs, swaps or drops its provider is read the new way
|
|
38
|
+
* within {@link CACHE_MS}. `changed(root)` forgets that project's read, so the next read runs the
|
|
39
|
+
* command again: a module's command just ran there, and may have written.
|
|
40
|
+
*/
|
|
41
|
+
export declare function providedQueue(now?: () => number): QueueReader;
|
|
42
|
+
/** OpenAgent's one reader of the queue, shared by every caller so they share its cache. */
|
|
43
|
+
export declare const projectQueue: QueueReader;
|
|
44
|
+
/** A {@link QueueFor} for a project with no provider: no queue. */
|
|
45
|
+
export declare const noQueue: QueueFor;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creating a project's repository on a host, for a project that lives on this machine only. Like
|
|
3
|
+
* every provided kind, OpenAgent names no host: the package that declares
|
|
4
|
+
* `"openagent": { "repository": "<command>" }` creates it, and OpenAgent asks by running that
|
|
5
|
+
* command.
|
|
6
|
+
*
|
|
7
|
+
* The command line a provider answers, each printing one JSON document and exiting 0 (a refusal
|
|
8
|
+
* exits 1 with its reason on stderr):
|
|
9
|
+
* `<command> create --check` the repository the project would become, `{ repository, name }`
|
|
10
|
+
* (`name` is the host's), creating nothing; refused when the
|
|
11
|
+
* project has a remote already or the host cannot be reached
|
|
12
|
+
* `<command> create` create it private, set it as the project's origin and push;
|
|
13
|
+
* `{ repository, url, name }`
|
|
14
|
+
*/
|
|
15
|
+
/** The repository a project would become, and the host it would be on. */
|
|
16
|
+
export interface RepositoryOffer {
|
|
17
|
+
/** `<account>/<name>`, as the host names it. */
|
|
18
|
+
repository: string;
|
|
19
|
+
/** The host's name, for a button: `GitHub`. */
|
|
20
|
+
name: string;
|
|
21
|
+
}
|
|
22
|
+
export type CreateRepositoryResult = {
|
|
23
|
+
ok: true;
|
|
24
|
+
url: string;
|
|
25
|
+
} | {
|
|
26
|
+
ok: false;
|
|
27
|
+
error: string;
|
|
28
|
+
};
|
|
29
|
+
/** What the project's repository provider offers to create, or undefined: no provider, a remote already there, or a host that cannot be reached. */
|
|
30
|
+
export declare function repositoryOffer(root: string): Promise<RepositoryOffer | undefined>;
|
|
31
|
+
/** Create the project's repository through its provider; a refusal is the provider's own line. */
|
|
32
|
+
export declare function createRepository(root: string): Promise<CreateRepositoryResult>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { AnyDiaryLine, RunCard } from './runs.js';
|
|
2
|
+
import type { OpenAgentEvent } from '../events.js';
|
|
3
|
+
import type { AgentMeta } from './agent-store.js';
|
|
4
|
+
/**
|
|
5
|
+
* A run's card and diary (`runs.ts`), read as OpenAgent's own shapes (#1769): the card as the
|
|
6
|
+
* meta every list shows, the diary as the events the run page replays and tails. The card's
|
|
7
|
+
* eleven plain fields and four kinds of diary line are the shape; whoever ran the agent keeps the
|
|
8
|
+
* rest of what it knows under one key, `caller`, and writes its other lines as they are.
|
|
9
|
+
* OpenAgent records no run of its own (#1774), so there is no writing half.
|
|
10
|
+
*/
|
|
11
|
+
/** A card as OpenAgent's meta: `caller` unfolded, the card's own fields winning. */
|
|
12
|
+
export declare function fromRunCard(card: RunCard): AgentMeta;
|
|
13
|
+
/**
|
|
14
|
+
* One diary line as one OpenAgent event: what the agent said, its result, the run's end and its
|
|
15
|
+
* cost are the shape's four kinds; a line of any other kind is an OpenAgent event as written, and
|
|
16
|
+
* one whose kind is no longer an event (the kinds of runs recorded before OpenAgent stopped
|
|
17
|
+
* running agents) reads as nothing. The line's time, `at`, is the event's, whatever the kind.
|
|
18
|
+
*/
|
|
19
|
+
export declare function fromDiaryLine(line: AnyDiaryLine): OpenAgentEvent | undefined;
|
|
20
|
+
/** A diary as the run's events, for a reader that replays them. */
|
|
21
|
+
export declare function eventsOf(lines: readonly AnyDiaryLine[]): OpenAgentEvent[];
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Finished runs, as OpenAgent reads them (#1774). OpenAgent keeps no run and imports no
|
|
3
|
+
* records package: a project's finished runs come from whichever of its packages declares that it
|
|
4
|
+
* provides them — `"openagent": { "runs": "<command>" }` in the package's own package.json — and
|
|
5
|
+
* OpenAgent reads them by running that command. Swap the package for another that answers
|
|
6
|
+
* the same command line and prints the same shapes, and nothing here changes. No package declares
|
|
7
|
+
* it: the project has no finished runs, only the ones still running in a checkout.
|
|
8
|
+
*
|
|
9
|
+
* The command line a provider answers, each printing one JSON document and exiting 0:
|
|
10
|
+
* `<command> --local --full --limit N` the runs, newest first, whole cards
|
|
11
|
+
* `<command> show <id> --local --full` one run: the whole card plus `diary`, every line
|
|
12
|
+
* `<command> delete <id>` remove a run
|
|
13
|
+
* `<command> patch <id> [--branch <b>] [--pr <n> --pr-url <url>] [--landed <commit> --from <commit>]` the late facts
|
|
14
|
+
* `--local` reads the copy on this machine, no network: OpenAgent polls.
|
|
15
|
+
*
|
|
16
|
+
* The shapes, owned here: {@link RunCard} and {@link AnyDiaryLine}. A running agent's own card in
|
|
17
|
+
* its checkout is the same shape, written by the tool that runs it.
|
|
18
|
+
*/
|
|
19
|
+
/** How a run stands: still going, or how it ended. */
|
|
20
|
+
export type RunStatus = 'running' | 'done' | 'stopped' | 'failed' | 'waiting';
|
|
21
|
+
/**
|
|
22
|
+
* A run's card: what was asked, where the work went, how it ended, what it cost. `caller` is the
|
|
23
|
+
* bookkeeping of the program that ran the agent (its pid, host, session id, …), one key.
|
|
24
|
+
*/
|
|
25
|
+
export interface RunCard {
|
|
26
|
+
id: string;
|
|
27
|
+
startedAt: string;
|
|
28
|
+
endedAt?: string;
|
|
29
|
+
status: RunStatus;
|
|
30
|
+
intent?: string;
|
|
31
|
+
driver?: string;
|
|
32
|
+
model?: string;
|
|
33
|
+
branch?: string;
|
|
34
|
+
pr?: {
|
|
35
|
+
number: number;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
ticket?: string;
|
|
39
|
+
cost?: number;
|
|
40
|
+
caller?: Record<string, unknown>;
|
|
41
|
+
}
|
|
42
|
+
/** The two late facts a finished run's card may still learn: the branch its work landed on, its pull request. */
|
|
43
|
+
export type RunPatch = Partial<Pick<RunCard, 'branch' | 'pr'>> & {
|
|
44
|
+
/** The run's work was merged and its branch deleted: its last commit, and the commit its work began at. */
|
|
45
|
+
landed?: {
|
|
46
|
+
commit: string;
|
|
47
|
+
from: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/** One line of a run's diary: a JSON object with a `kind`. */
|
|
51
|
+
export type AnyDiaryLine = {
|
|
52
|
+
kind: string;
|
|
53
|
+
} & Record<string, unknown>;
|
|
54
|
+
/** A finished run: its card and its whole diary. */
|
|
55
|
+
export interface FinishedRun {
|
|
56
|
+
card: RunCard;
|
|
57
|
+
diary: AnyDiaryLine[];
|
|
58
|
+
}
|
|
59
|
+
/** A project's finished runs: what a provider answers, read by OpenAgent. */
|
|
60
|
+
export interface RunsSource {
|
|
61
|
+
/**
|
|
62
|
+
* Every finished run's card, newest first; `[]` when none can be read. `fresh` skips a list read
|
|
63
|
+
* a moment ago: the caller knows the runs changed since.
|
|
64
|
+
*/
|
|
65
|
+
list(opts?: {
|
|
66
|
+
fresh?: boolean;
|
|
67
|
+
}): Promise<RunCard[]>;
|
|
68
|
+
/** One run with its diary; `undefined` for no such run, or none readable. */
|
|
69
|
+
show(id: string): Promise<FinishedRun | undefined>;
|
|
70
|
+
/** Remove a run, or why it could not be. */
|
|
71
|
+
remove(id: string): Promise<RunsWrite>;
|
|
72
|
+
/** Set a run's late facts, or why they could not be. */
|
|
73
|
+
patch(id: string, patch: RunPatch): Promise<RunsWrite>;
|
|
74
|
+
}
|
|
75
|
+
/** What a change to the runs did: done, or the provider's reason it was not. */
|
|
76
|
+
export type RunsWrite = {
|
|
77
|
+
ok: true;
|
|
78
|
+
} | {
|
|
79
|
+
ok: false;
|
|
80
|
+
error: string;
|
|
81
|
+
};
|
|
82
|
+
/** The finished runs of the project at `root`, or `undefined` when none of its packages provides them. */
|
|
83
|
+
export type RunsFor = (root: string) => Promise<RunsSource | undefined>;
|
|
84
|
+
/** A {@link RunsFor} that also forgets what it read of one project, for when a module just wrote there. */
|
|
85
|
+
export type RunsReader = RunsFor & {
|
|
86
|
+
changed(root: string): void;
|
|
87
|
+
};
|
|
88
|
+
/** Whether a string can name a run: letters, digits, `-` and `_`, nothing a path can climb out with. */
|
|
89
|
+
export declare function isRunId(id: string): boolean;
|
|
90
|
+
/**
|
|
91
|
+
* A card read back: the fields of the shape, each kept only when it has the right type, plus
|
|
92
|
+
* `caller` as it is. `undefined` for anything that is not a card — not an object, or missing an
|
|
93
|
+
* id, a start or a status. Takes a card's JSON text or an already-parsed value.
|
|
94
|
+
*/
|
|
95
|
+
export declare function parseRunCard(input: unknown): RunCard | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* The production {@link RunsFor}: the project's provider, looked up by its package.json, one
|
|
98
|
+
* source per project kept while the same command provides — so the cache holds across the many
|
|
99
|
+
* reads of one poll, and a project that installs, swaps or drops its provider is read the new way
|
|
100
|
+
* within {@link CACHE_MS}. `changed(root)` forgets that project's reads, so the next read runs the
|
|
101
|
+
* command again: a module's command just ran there, and may have written.
|
|
102
|
+
*/
|
|
103
|
+
export declare function providedRuns(now?: () => number): RunsReader;
|
|
104
|
+
/** OpenAgent's one reader of finished runs, shared by every caller so they share its cache. */
|
|
105
|
+
export declare const projectRuns: RunsReader;
|
|
106
|
+
/** A {@link RunsFor} for a project with no provider: no finished runs. */
|
|
107
|
+
export declare const noRuns: RunsFor;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tickets, as OpenAgent reads them (#1774). OpenAgent keeps no ticket and imports no
|
|
3
|
+
* tickets package: a project's tickets come from whichever of its packages declares that it
|
|
4
|
+
* provides them — `"openagent": { "tickets": "<command>" }` in the package's own package.json —
|
|
5
|
+
* and OpenAgent reads them by running that command. Swap the package for another that answers
|
|
6
|
+
* the same command line and prints the same shape, and nothing here changes. No package declares
|
|
7
|
+
* it: the project has no tickets, and the dashboard shows it none.
|
|
8
|
+
*
|
|
9
|
+
* The command line a provider answers, printing one JSON document and exiting 0:
|
|
10
|
+
* `<command> list --local` every open ticket, as an array of {@link Ticket}
|
|
11
|
+
* `--local` reads the copy on this machine, no network: OpenAgent polls.
|
|
12
|
+
*
|
|
13
|
+
* That is the whole contract. OpenAgent reads tickets for what it composes across skills: the
|
|
14
|
+
* onboarding step, a queued link's title. Showing them, planning them, claiming and releasing them,
|
|
15
|
+
* and the Overview's hot-tickets card, are the tickets package's own module, through its own command.
|
|
16
|
+
*
|
|
17
|
+
* The shape, owned here: {@link Ticket}, the row a ticket lists as.
|
|
18
|
+
*/
|
|
19
|
+
/** A ticket's row, as a provider prints it. Everything but the five plain facts is optional. */
|
|
20
|
+
export interface Ticket {
|
|
21
|
+
/** The ticket's file name, its identity: `tickets/<file>` is the path a link to it carries. */
|
|
22
|
+
file: string;
|
|
23
|
+
title: string;
|
|
24
|
+
/** One line of what it is about; empty when the ticket says nothing beyond its title. */
|
|
25
|
+
summary: string;
|
|
26
|
+
/** `0`–`10` as written, `10` acting at once; absent when unset, and not checked here. */
|
|
27
|
+
priority?: string;
|
|
28
|
+
topics?: string[];
|
|
29
|
+
/** The issue it tracks in the project's tracker, and the pull request that closes it: a label and where it points. */
|
|
30
|
+
issue?: {
|
|
31
|
+
label: string;
|
|
32
|
+
url: string;
|
|
33
|
+
};
|
|
34
|
+
pr?: {
|
|
35
|
+
label: string;
|
|
36
|
+
url: string;
|
|
37
|
+
};
|
|
38
|
+
/** ISO 8601: the file's date. */
|
|
39
|
+
date: string;
|
|
40
|
+
/** Whether a plan sits beside it. */
|
|
41
|
+
planned: boolean;
|
|
42
|
+
/** Whether someone holds it, and who: a run's id, or a branch. */
|
|
43
|
+
locked?: boolean;
|
|
44
|
+
lockedBy?: string;
|
|
45
|
+
effort?: number;
|
|
46
|
+
uncertainty?: number;
|
|
47
|
+
}
|
|
48
|
+
/** A project's tickets: what a provider answers, read by OpenAgent. */
|
|
49
|
+
export interface TicketsSource {
|
|
50
|
+
/** Every open ticket; `[]` when none can be read. */
|
|
51
|
+
list(): Promise<Ticket[]>;
|
|
52
|
+
}
|
|
53
|
+
/** The tickets of the project at `root`, or `undefined` when none of its packages provides them. */
|
|
54
|
+
export type TicketsFor = (root: string) => Promise<TicketsSource | undefined>;
|
|
55
|
+
/** A {@link TicketsFor} that also forgets what it read of one project, for when a module just wrote there. */
|
|
56
|
+
export type TicketsReader = TicketsFor & {
|
|
57
|
+
changed(root: string): void;
|
|
58
|
+
};
|
|
59
|
+
/** The rows read back from a provider's output: the objects with the five plain facts, everything else as printed; anything else is no ticket. */
|
|
60
|
+
export declare function parseTickets(output: unknown): Ticket[];
|
|
61
|
+
/**
|
|
62
|
+
* The production {@link TicketsReader}: the project's provider, looked up by its package.json, one
|
|
63
|
+
* source per project kept while the same command provides — so the cache holds across the many
|
|
64
|
+
* reads of one poll, and a project that installs, swaps or drops its provider is read the new way
|
|
65
|
+
* within {@link CACHE_MS}. `changed(root)` forgets that project's read, so the next read runs the
|
|
66
|
+
* command again: a module's command just ran there, and may have written.
|
|
67
|
+
*/
|
|
68
|
+
export declare function providedTickets(now?: () => number): TicketsReader;
|
|
69
|
+
/** OpenAgent's one reader of the tickets, shared by every caller so they share its cache. */
|
|
70
|
+
export declare const projectTickets: TicketsReader;
|
|
71
|
+
/** A {@link TicketsFor} for a project with no provider: no tickets. */
|
|
72
|
+
export declare const noTickets: TicketsFor;
|