@openagt/dashboard 0.24.0 → 0.26.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/dist/bridge-browser.d.ts +6 -4
- package/dist/bridge-browser.d.ts.map +1 -1
- package/dist/bridge-browser.js +68 -21
- package/dist/bridge-browser.js.map +1 -1
- package/dist/browser-stream.d.ts.map +1 -1
- package/dist/browser-stream.js +11 -0
- package/dist/browser-stream.js.map +1 -1
- package/dist/daemon-runtime.d.ts +8 -1
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +19 -2
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon.d.ts +5 -6
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +68 -33
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/agent-handoff.d.ts +2 -1
- package/dist/dashboard/agent-handoff.d.ts.map +1 -1
- package/dist/dashboard/agent-handoff.js +30 -4
- package/dist/dashboard/agent-handoff.js.map +1 -1
- package/dist/dashboard/cache.js +4 -1
- package/dist/dashboard/cache.js.map +1 -1
- package/dist/dashboard/index.d.ts +1 -1
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/interventions.d.ts +8 -11
- package/dist/dashboard/interventions.d.ts.map +1 -1
- package/dist/dashboard/interventions.js +106 -133
- package/dist/dashboard/interventions.js.map +1 -1
- package/dist/dashboard/keys.d.ts +2 -2
- package/dist/dashboard/keys.js +4 -4
- package/dist/dashboard/keys.js.map +1 -1
- package/dist/dashboard/overview.d.ts.map +1 -1
- package/dist/dashboard/overview.js +5 -6
- package/dist/dashboard/overview.js.map +1 -1
- package/dist/dashboard/pull-requests.d.ts +27 -1
- package/dist/dashboard/pull-requests.d.ts.map +1 -1
- package/dist/dashboard/pull-requests.js +55 -1
- package/dist/dashboard/pull-requests.js.map +1 -1
- package/dist/dashboard/rpc-serve.d.ts +4 -1
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/server.d.ts +3 -1
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +1 -0
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/types.d.ts +18 -0
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard/unpublished.d.ts +43 -0
- package/dist/dashboard/unpublished.d.ts.map +1 -0
- package/dist/dashboard/unpublished.js +74 -0
- package/dist/dashboard/unpublished.js.map +1 -0
- package/dist/dashboard-bundle/assets/main-CTqah6if.js +145 -0
- package/dist/dashboard-bundle/assets/main-iqtcpdTX.css +2 -0
- package/dist/dashboard-bundle/assets/module-Dy8zK3Qd.js +14 -0
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +3 -3
- package/dist/dashboard-rpc/context.d.ts +2 -0
- package/dist/dashboard-rpc/context.d.ts.map +1 -1
- package/dist/dashboard-rpc/context.js +4 -0
- package/dist/dashboard-rpc/context.js.map +1 -1
- package/dist/dashboard-rpc/control.d.ts.map +1 -1
- package/dist/dashboard-rpc/control.js +17 -2
- package/dist/dashboard-rpc/control.js.map +1 -1
- package/dist/dashboard-rpc/index.d.ts +1 -1
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +1 -1
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +11 -1
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +15 -1
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/dashboard-rpc/reads.d.ts +18 -1
- package/dist/dashboard-rpc/reads.d.ts.map +1 -1
- package/dist/dashboard-rpc/reads.js +40 -2
- package/dist/dashboard-rpc/reads.js.map +1 -1
- package/dist/dashboard-rpc/relay-agent.d.ts +2 -0
- package/dist/dashboard-rpc/relay-agent.d.ts.map +1 -1
- package/dist/dashboard-rpc/relay-agent.js +2 -0
- package/dist/dashboard-rpc/relay-agent.js.map +1 -1
- package/dist/dashboard-rpc/test-context.d.ts.map +1 -1
- package/dist/dashboard-rpc/test-context.js +3 -2
- package/dist/dashboard-rpc/test-context.js.map +1 -1
- package/dist/join-dashboard.d.ts +21 -0
- package/dist/join-dashboard.d.ts.map +1 -0
- package/dist/join-dashboard.js +22 -0
- package/dist/join-dashboard.js.map +1 -0
- package/dist/module-types/dashboard/components/ui/card.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/checkbox.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/context-menu.d.ts +2 -2
- package/dist/module-types/dashboard/components/ui/dropdown-menu.d.ts +2 -2
- package/dist/module-types/dashboard/components/ui/popover.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/radio-group.d.ts +2 -2
- package/dist/module-types/dashboard/components/ui/scroll-area.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/select.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/separator.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/switch.d.ts +1 -1
- package/dist/module-types/dashboard/components/ui/tooltip.d.ts +3 -3
- package/dist/module-types/dashboard/lib/data-link.d.ts +1 -1
- package/dist/module-types/dashboard/lib/route.d.ts +11 -24
- package/dist/module-types/dashboard/module/index.d.ts +15 -8
- package/dist/module-types/src/bridge-browser.d.ts +6 -4
- package/dist/module-types/src/dashboard/agent-handoff.d.ts +2 -1
- package/dist/module-types/src/dashboard/interventions.d.ts +8 -11
- package/dist/module-types/src/dashboard/keys.d.ts +2 -2
- package/dist/module-types/src/dashboard/pull-requests.d.ts +27 -1
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +4 -1
- package/dist/module-types/src/dashboard/types.d.ts +18 -0
- package/dist/module-types/src/dashboard/unpublished.d.ts +42 -0
- package/dist/module-types/src/dashboard-rpc/context.d.ts +2 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +11 -1
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +18 -1
- package/dist/module-types/src/dashboard-rpc/relay-agent.d.ts +2 -0
- package/dist/module-types/src/project-address.d.ts +32 -0
- package/dist/module-types/src/store/agent-store.d.ts +13 -0
- package/dist/module-types/src/store/branches.d.ts +28 -2
- package/dist/module-types/src/store/index.d.ts +1 -1
- package/dist/module.css +1 -0
- package/dist/project-address.d.ts +33 -0
- package/dist/project-address.d.ts.map +1 -0
- package/dist/project-address.js +57 -0
- package/dist/project-address.js.map +1 -0
- package/dist/serve.d.ts +2 -0
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +1 -0
- package/dist/serve.js.map +1 -1
- package/dist/store/agent-store.d.ts +13 -0
- package/dist/store/agent-store.d.ts.map +1 -1
- package/dist/store/agent-store.js.map +1 -1
- package/dist/store/branches.d.ts +28 -2
- package/dist/store/branches.d.ts.map +1 -1
- package/dist/store/branches.js +38 -22
- package/dist/store/branches.js.map +1 -1
- package/dist/store/index.d.ts +1 -1
- package/dist/store/index.d.ts.map +1 -1
- package/dist/store/index.js +1 -1
- package/dist/store/index.js.map +1 -1
- package/dist/store/test-branches.d.ts.map +1 -1
- package/dist/store/test-branches.js +6 -0
- package/dist/store/test-branches.js.map +1 -1
- package/package.json +14 -14
- package/dist/dashboard-bundle/assets/main-CvaxZfR1.css +0 -2
- package/dist/dashboard-bundle/assets/main-DjBIKKEF.js +0 -141
- package/dist/dashboard-bundle/assets/module-DpIObawb.js +0 -25
|
@@ -12,6 +12,7 @@ export function testDashboardContext(over = {}) {
|
|
|
12
12
|
return {
|
|
13
13
|
startAgent: () => ({ ok: false, error: 'not wired in this test' }),
|
|
14
14
|
addProject: () => ({ ok: false, error: 'not wired in this test' }),
|
|
15
|
+
startedIn: () => ({ ok: false, error: 'not wired in this test' }),
|
|
15
16
|
removeProject: () => ({ ok: false, error: 'not wired in this test' }),
|
|
16
17
|
eventsSource: () => undefined,
|
|
17
18
|
remote: { target: () => undefined, list: () => [], working: () => false, rekey: () => { }, sent: () => true, home: async () => undefined, follow: async () => { }, machineNames: async () => () => undefined },
|
|
@@ -28,8 +29,8 @@ export function testDashboardContext(over = {}) {
|
|
|
28
29
|
* test asserting one route still stands up the same server the product does.
|
|
29
30
|
*/
|
|
30
31
|
export function testDashboardOptions(over = {}) {
|
|
31
|
-
const { startAgent, addProject, removeProject, ...rest } = testDashboardContext();
|
|
32
|
-
return { port: 0, onStart: startAgent, onAddProject: addProject, onRemoveProject: removeProject, ...rest, ...over };
|
|
32
|
+
const { startAgent, addProject, startedIn, removeProject, ...rest } = testDashboardContext();
|
|
33
|
+
return { port: 0, onStart: startAgent, onAddProject: addProject, onStartedIn: startedIn, onRemoveProject: removeProject, ...rest, ...over };
|
|
33
34
|
}
|
|
34
35
|
/**
|
|
35
36
|
* Wire the dashboard's capabilities for a test that calls an RPC directly.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-context.js","sourceRoot":"","sources":["../../src/dashboard-rpc/test-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAI1D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAI,GAA8B,EAAE;IACvE,OAAO;QACL,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QAClE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QAClE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QACrE,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;QAC7B,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE;QAC5M,WAAW,EAAE,wBAAwB,EAAE;QACvC,KAAK,EAAE,kBAAkB,EAAE;QAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE;QACxF,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACrC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE;QAC3H,GAAG,IAAI;KACR,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAI,GAA8B,EAAE;IACvE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,oBAAoB,EAAE,CAAA;
|
|
1
|
+
{"version":3,"file":"test-context.js","sourceRoot":"","sources":["../../src/dashboard-rpc/test-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAA;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAI1D;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAI,GAA8B,EAAE;IACvE,OAAO;QACL,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QAClE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QAClE,SAAS,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QACjE,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,wBAAwB,EAAE,CAAC;QACrE,YAAY,EAAE,GAAG,EAAE,CAAC,SAAS;QAC7B,MAAM,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,CAAC,GAAG,EAAE,CAAC,SAAS,EAAE;QAC5M,WAAW,EAAE,wBAAwB,EAAE;QACvC,KAAK,EAAE,kBAAkB,EAAE;QAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,aAAa,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE;QACxF,aAAa,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QACrC,aAAa,EAAE,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,IAAI,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE,GAAG,EAAE,KAAK,IAAI,EAAE,GAAE,CAAC,EAAE;QAC3H,GAAG,IAAI;KACR,CAAA;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAI,GAA8B,EAAE;IACvE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,oBAAoB,EAAE,CAAA;IAC5F,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,CAAA;AAC7I,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAI,GAA8B,EAAE;IACrE,mBAAmB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StartedInResult } from './dashboard/types.js';
|
|
2
|
+
/**
|
|
3
|
+
* A second `openagent` on a port a dashboard already listens on (#2141): it asks that port whether
|
|
4
|
+
* it is OpenAgent's, and if it is, hands it the folder it was started in. Binding first and asking
|
|
5
|
+
* only on `EADDRINUSE` leaves the common start as it was, with no race between a look and a bind.
|
|
6
|
+
*
|
|
7
|
+
* The call is a plain RPC: with no `Origin` and a loopback `Host`, the dashboard's guards let it
|
|
8
|
+
* by, as they let any program on this computer call `sendAddProject`.
|
|
9
|
+
*/
|
|
10
|
+
/** What the port answered: OpenAgent's dashboard, its version and the folder's project; or something else. */
|
|
11
|
+
export type JoinedDashboard = {
|
|
12
|
+
joined: true;
|
|
13
|
+
url: string;
|
|
14
|
+
version: string;
|
|
15
|
+
project?: StartedInResult;
|
|
16
|
+
} | {
|
|
17
|
+
joined: false;
|
|
18
|
+
};
|
|
19
|
+
/** Hand `folder` (undefined outside a repository) to the dashboard on `port` of this computer. */
|
|
20
|
+
export declare function joinRunningDashboard(port: number, folder: string | undefined): Promise<JoinedDashboard>;
|
|
21
|
+
//# sourceMappingURL=join-dashboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join-dashboard.d.ts","sourceRoot":"","sources":["../src/join-dashboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D;;;;;;;GAOG;AAEH,8GAA8G;AAC9G,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,eAAe,CAAA;CAAE,GACzE;IAAE,MAAM,EAAE,KAAK,CAAA;CAAE,CAAA;AAErB,kGAAkG;AAClG,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,eAAe,CAAC,CAgB7G"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** Hand `folder` (undefined outside a repository) to the dashboard on `port` of this computer. */
|
|
2
|
+
export async function joinRunningDashboard(port, folder) {
|
|
3
|
+
const url = `http://127.0.0.1:${port}`;
|
|
4
|
+
try {
|
|
5
|
+
const res = await fetch(`${url}/_rpc/sendStartedAgain`, {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
headers: { 'content-type': 'application/json' },
|
|
8
|
+
body: JSON.stringify([folder ?? null]),
|
|
9
|
+
});
|
|
10
|
+
if (!res.ok)
|
|
11
|
+
return { joined: false };
|
|
12
|
+
const { ret } = (await res.json());
|
|
13
|
+
if (typeof ret?.version !== 'string')
|
|
14
|
+
return { joined: false };
|
|
15
|
+
return { joined: true, url, version: ret.version, ...(ret.project ? { project: ret.project } : {}) };
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
// Refused, or not JSON: no OpenAgent dashboard answers there.
|
|
19
|
+
return { joined: false };
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=join-dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"join-dashboard.js","sourceRoot":"","sources":["../src/join-dashboard.ts"],"names":[],"mappings":"AAgBA,kGAAkG;AAClG,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,IAAY,EAAE,MAA0B;IACjF,MAAM,GAAG,GAAG,oBAAoB,IAAI,EAAE,CAAA;IACtC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,GAAG,wBAAwB,EAAE;YACtD,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;YAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC;SACvC,CAAC,CAAA;QACF,IAAI,CAAC,GAAG,CAAC,EAAE;YAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;QACrC,MAAM,EAAE,GAAG,EAAE,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,EAAE,CAA+D,CAAA;QAChG,IAAI,OAAO,GAAG,EAAE,OAAO,KAAK,QAAQ;YAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;QAC9D,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;IACtG,CAAC;IAAC,MAAM,CAAC;QACP,8DAA8D;QAC9D,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;IAC1B,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
export declare function Card({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
3
3
|
export declare function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
4
4
|
export declare function CardTitle({ className, ...props }: HTMLAttributes<HTMLHeadingElement>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Checkbox as CheckboxPrimitive } from '@base-ui
|
|
2
|
+
import { Checkbox as CheckboxPrimitive } from '@base-ui/react/checkbox';
|
|
3
3
|
type CheckboxProps = Omit<ComponentProps<typeof CheckboxPrimitive.Root>, 'disabled'> & {
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
5
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ContextMenu as BaseContextMenu } from '@base-ui
|
|
1
|
+
import { ContextMenu as BaseContextMenu } from '@base-ui/react/context-menu';
|
|
2
2
|
export declare const ContextMenu: typeof BaseContextMenu.Root;
|
|
3
|
-
export declare const ContextMenuTrigger: import("react").ForwardRefExoticComponent<import("@base-ui
|
|
3
|
+
export declare const ContextMenuTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuTriggerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Menu } from '@base-ui
|
|
1
|
+
import { Menu } from '@base-ui/react/menu';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
export declare const DropdownMenu: typeof Menu.Root;
|
|
4
|
-
export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<import("@base-ui
|
|
4
|
+
export declare const DropdownMenuGroup: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
5
|
export declare const DropdownMenuSub: typeof Menu.SubmenuRoot;
|
|
6
6
|
export declare function DropdownMenuTrigger({ className, ...props }: ComponentProps<typeof Menu.Trigger>): import("react").JSX.Element;
|
|
7
7
|
export declare function DropdownMenuContent({ className, sideOffset, align, children, ...props }: ComponentProps<typeof Menu.Popup> & {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Popover as BasePopover } from '@base-ui
|
|
1
|
+
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
export declare const Popover: typeof BasePopover.Root;
|
|
4
4
|
export declare function PopoverTrigger({ className, ...props }: ComponentProps<typeof BasePopover.Trigger>): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
-
import { RadioGroup as RadioGroupPrimitive } from '@base-ui
|
|
3
|
-
import { Radio } from '@base-ui
|
|
2
|
+
import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
|
|
3
|
+
import { Radio } from '@base-ui/react/radio';
|
|
4
4
|
type RadioGroupProps = Omit<ComponentProps<typeof RadioGroupPrimitive>, 'disabled'> & {
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui
|
|
1
|
+
import { ScrollArea as ScrollAreaPrimitive } from '@base-ui/react/scroll-area';
|
|
2
2
|
export declare function ScrollArea({ className, children, viewportClassName, ...props }: ScrollAreaPrimitive.Root.Props & {
|
|
3
3
|
/** Extra classes on the viewport — where the height cap belongs when the Root has no definite
|
|
4
4
|
* height. A `max-h-*` on the Root only caps the box; the viewport's `h-full` cannot resolve
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Select as SelectPrimitive } from '@base-ui
|
|
2
|
+
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
3
3
|
export declare const Select: typeof SelectPrimitive.Root;
|
|
4
4
|
export declare function SelectValue(props: ComponentProps<typeof SelectPrimitive.Value>): import("react").JSX.Element;
|
|
5
5
|
export declare function SelectTrigger({ className, size, children, ...props }: ComponentProps<typeof SelectPrimitive.Trigger> & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Separator as SeparatorPrimitive } from '@base-ui
|
|
2
|
+
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
3
3
|
export declare function Separator({ className, orientation, ...props }: ComponentProps<typeof SeparatorPrimitive>): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Switch as SwitchPrimitive } from '@base-ui
|
|
2
|
+
import { Switch as SwitchPrimitive } from '@base-ui/react/switch';
|
|
3
3
|
type SwitchProps = Omit<ComponentProps<typeof SwitchPrimitive.Root>, 'disabled'> & {
|
|
4
4
|
disabled?: boolean | undefined;
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
|
-
import { Tooltip as TooltipPrimitive } from '@base-ui
|
|
3
|
-
declare const TooltipProvider: import("react").FC<import("@base-ui
|
|
4
|
-
declare const Tooltip:
|
|
2
|
+
import { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';
|
|
3
|
+
declare const TooltipProvider: import("react").FC<import("@base-ui/react").TooltipProviderProps>;
|
|
4
|
+
declare const Tooltip: <Payload>(props: TooltipPrimitive.Root.Props<Payload>) => React.JSX.Element;
|
|
5
5
|
declare function TooltipTrigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react").JSX.Element;
|
|
6
6
|
declare function TooltipContent({ className, sideOffset, side, align, children, ...props }: ComponentProps<typeof TooltipPrimitive.Popup> & {
|
|
7
7
|
sideOffset?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Route } from './route.js';
|
|
2
2
|
/** A repository path's page segment and the rest: `tickets/a.md` → `{ segment: 'tickets', rest: ['a.md'] }`; nothing for a path with no page-shaped first segment or no rest. */
|
|
3
3
|
export declare function dataLinkParts(href: string): {
|
|
4
4
|
segment: string;
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Whether a first segment names a page a module adds (#1774) rather than a project: a lowercase
|
|
3
|
-
* letter, then lowercase letters and digits. Never a project's id, which always carries a
|
|
4
|
-
* `-<hash>` suffix, so the router reserves no module's word: whichever module claims the segment
|
|
5
|
-
* gets it, and the shell says "no such page" when none does, or when the picked project
|
|
6
|
-
* has no package that adds it.
|
|
7
|
-
*/
|
|
8
|
-
export declare function isPageSegment(segment: string): boolean;
|
|
1
|
+
import { type ProjectAddresses } from '../../src/project-address.js';
|
|
9
2
|
/** What the dashboard is looking at, as carried by the URL. */
|
|
10
3
|
export interface Route {
|
|
11
4
|
/**
|
|
@@ -13,38 +6,32 @@ export interface Route {
|
|
|
13
6
|
* `''` for its first one. Absent when it is closed. Carried as `?settings=<entry>`.
|
|
14
7
|
*/
|
|
15
8
|
settings?: string;
|
|
16
|
-
/** The
|
|
9
|
+
/** The project whose agent or "New agent" page shows, by id; null for an Overview and a module's page. */
|
|
17
10
|
projectId: string | null;
|
|
18
|
-
/** The selected
|
|
11
|
+
/** The selected agent, or null for the project's "New agent" page. */
|
|
19
12
|
agentId: string | null;
|
|
20
|
-
/** A module's page (#1774), by its segment; no project
|
|
13
|
+
/** A module's page (#1774), by its segment; no project's own page shows there. */
|
|
21
14
|
page?: string;
|
|
22
15
|
/** The segments after a module page's own, decoded: `/logs/a` carries `['a']`. */
|
|
23
16
|
pagePath?: string[];
|
|
24
17
|
/**
|
|
25
|
-
* The one project every page shows (#1513), by id; absent when every project shows.
|
|
26
|
-
*
|
|
18
|
+
* The one project every page shows (#1513), by id; absent when every project shows. It is the
|
|
19
|
+
* project the address starts with. On a project's agent and "New agent" pages it is that
|
|
27
20
|
* project, or absent when `?all` is there: never another one.
|
|
28
21
|
*/
|
|
29
22
|
scope?: string;
|
|
30
23
|
}
|
|
31
24
|
/**
|
|
32
|
-
* Read the route out of a URL's path and query
|
|
33
|
-
*
|
|
34
|
-
*
|
|
25
|
+
* Read the route out of a URL's path and query, naming projects by `projects`. A first segment
|
|
26
|
+
* that names no project is a module's page when it can be one, and else a project nobody
|
|
27
|
+
* registered, whose page says so. Extra segments are ignored.
|
|
35
28
|
*/
|
|
36
|
-
export declare function parseRoute(url: string): Route;
|
|
29
|
+
export declare function parseRoute(url: string, projects: ProjectAddresses): Route;
|
|
37
30
|
/** The URL for a route, its path and its query — the inverse of {@link parseRoute}. */
|
|
38
|
-
export declare function formatRoute(route: Route): string;
|
|
31
|
+
export declare function formatRoute(route: Route, projects: ProjectAddresses): string;
|
|
39
32
|
/**
|
|
40
33
|
* `url` with the query parameters of `search` that are not the route's own added to it: what a
|
|
41
34
|
* module's page mirrored there (a list's filters) stays when only the picked project changes, or
|
|
42
35
|
* when Settings opens or closes over the page.
|
|
43
36
|
*/
|
|
44
37
|
export declare function keepPageQuery(url: string, search: string): string;
|
|
45
|
-
/**
|
|
46
|
-
* The address of a module's page as a link holds it, for a link that must also open in a new
|
|
47
|
-
* tab: the page's segment, with the one project the dashboard is showing when one is picked, so
|
|
48
|
-
* the new tab shows that project too.
|
|
49
|
-
*/
|
|
50
|
-
export declare function pageHref(segment: string, url?: string): string;
|
|
@@ -15,19 +15,21 @@ export interface ModuleProject {
|
|
|
15
15
|
* link convention below.
|
|
16
16
|
*
|
|
17
17
|
* A link into a project's files (`ModuleLink.href` such as `tickets/2026-01-01_x.md`) opens the
|
|
18
|
-
* mounted page named by its first segment, at `/<segment>/<
|
|
19
|
-
* gets
|
|
20
|
-
* segment is where every such link in the dashboard lands, and the dashboard names no page.
|
|
18
|
+
* mounted page named by its first segment in that project, at `/<project>/<segment>/<rest…>`: the
|
|
19
|
+
* page gets `projectId` and `rest` as its path. So a page that shows one project's file under its
|
|
20
|
+
* own segment is where every such link in the dashboard lands, and the dashboard names no page.
|
|
21
21
|
*/
|
|
22
22
|
export interface ModulePageProps {
|
|
23
|
-
/** The registered projects whose dependencies include the module's package, in the registry's order. */
|
|
23
|
+
/** The registered projects whose dependencies include the module's package, in the registry's order: only the picked one when one is. */
|
|
24
24
|
projects: ModuleProject[];
|
|
25
|
+
/** The project the address starts with (`/<project>/<segment>`), picked in the sidebar; null when every project shows. */
|
|
26
|
+
projectId: string | null;
|
|
25
27
|
/** The URL's segments after the page's own, decoded: `/logs/a` gives `['a']`. */
|
|
26
28
|
path: string[];
|
|
27
29
|
}
|
|
28
30
|
/** A page a module adds: its own URL segment and its row in the sidebar. */
|
|
29
31
|
export interface ModulePage {
|
|
30
|
-
/** The page's URL, `/<segment
|
|
32
|
+
/** The page's URL, `/<segment>`, and `/<project>/<segment>` with a project picked: a lowercase letter, then lowercase letters and digits, never `overview` or `settings`. A project named as a page's word is addressed by its id. */
|
|
31
33
|
segment: string;
|
|
32
34
|
/** The sidebar row's label. */
|
|
33
35
|
label: string;
|
|
@@ -339,8 +341,14 @@ export interface ModuleHost {
|
|
|
339
341
|
read(projectId: string, name: string, input?: Record<string, unknown>): Promise<ModuleReadResult>;
|
|
340
342
|
/** Open one agent's page in the dashboard: its live feed while it runs, its record after. */
|
|
341
343
|
openAgent(projectId: string, agentId: string): void;
|
|
342
|
-
/**
|
|
343
|
-
|
|
344
|
+
/**
|
|
345
|
+
* Open a page a module adds (this one's or another's), at a sub-path, in the project picked in
|
|
346
|
+
* the dashboard, or in `projectId`, which is then the one picked: `openPage('tickets', [file], projectId)`.
|
|
347
|
+
* A page the picked project's packages do not add shows "No such page".
|
|
348
|
+
*/
|
|
349
|
+
openPage(segment: string, path?: string[], projectId?: string): void;
|
|
350
|
+
/** The address of a page a module adds, with the project picked in the dashboard: a link's `href`, for a link that also opens in a new tab. */
|
|
351
|
+
pageHref(segment: string): string;
|
|
344
352
|
/**
|
|
345
353
|
* Start a run in one project with this prompt, with the person's own picks (which tool, which
|
|
346
354
|
* model, where it runs), and land on it, unless `land` is false: then the dashboard stays where
|
|
@@ -466,6 +474,5 @@ export { useNarrow } from '../lib/use-narrow.js';
|
|
|
466
474
|
export { useHighlighted, Pieces, type Piece } from '../lib/highlight.js';
|
|
467
475
|
export { useAction } from '../lib/use-action.js';
|
|
468
476
|
export { useSchedule, type Schedule } from '../lib/use-schedule.js';
|
|
469
|
-
export { pageHref } from '../lib/route.js';
|
|
470
477
|
export { useFileNames, pathsIn, type FileNames, type NamedFile } from '../lib/use-file-names.js';
|
|
471
478
|
export { ConfirmDialog } from '../components/ui/confirm-dialog.js';
|
|
@@ -168,6 +168,8 @@ export interface BridgeBrowserOptions {
|
|
|
168
168
|
extension?: BridgeExtensionSource | undefined;
|
|
169
169
|
/** Progress, one line at a time, for the dashboard to show while the launch runs. */
|
|
170
170
|
report?: ((detail: string) => void) | undefined;
|
|
171
|
+
/** Gives the launch up: a step under way is not waited for, and a Chrome already spawned is killed. */
|
|
172
|
+
signal?: AbortSignal | undefined;
|
|
171
173
|
}
|
|
172
174
|
/**
|
|
173
175
|
* Launch the bridge browser and get it ready: binary, profile, extension, developer mode, token,
|
|
@@ -204,12 +206,12 @@ export interface BridgeBrowserOwner {
|
|
|
204
206
|
stop(): Promise<void>;
|
|
205
207
|
act(action: BridgeBrowserAction): Promise<void>;
|
|
206
208
|
}
|
|
207
|
-
/** How the owner launches a browser: the daemon's real launch, or a test's fake. */
|
|
208
|
-
export type BridgeBrowserLauncher = (report: (detail: string) => void) => Promise<BridgeBrowser>;
|
|
209
|
+
/** How the owner launches a browser: the daemon's real launch, or a test's fake. `signal` aborts when a stop gives the launch up. */
|
|
210
|
+
export type BridgeBrowserLauncher = (report: (detail: string) => void, signal: AbortSignal) => Promise<BridgeBrowser>;
|
|
209
211
|
/**
|
|
210
212
|
* The one bridge browser a daemon runs. A launch is slow — the first one downloads Chrome — so
|
|
211
|
-
* the status carries the step it is on, and a stop that lands mid-launch
|
|
212
|
-
* launch
|
|
213
|
+
* the status carries the step it is on, and a stop that lands mid-launch gives the launch up, and
|
|
214
|
+
* closes the browser a launch that went on regardless hands over, rather than leaving it unowned. A browser that exits on its own
|
|
213
215
|
* (the user quit it) is reported as stopped with the reason, and not relaunched: quitting it was
|
|
214
216
|
* an act, and the dashboard offers a restart.
|
|
215
217
|
*/
|
|
@@ -272,7 +272,7 @@ export declare function openRemoteBranchPullRequest(cwd: string, agent: HandoffA
|
|
|
272
272
|
* Open a PR for a finished session, deciding from what the agent recorded which cases should not
|
|
273
273
|
* open one. Reads the branch's handoff first: a branch that no longer exists, or a session that
|
|
274
274
|
* changed nothing, is a clear error rather than an empty PR, and a branch that already has a PR
|
|
275
|
-
* returns that one. Title
|
|
275
|
+
* returns that one. Title and body say what its commits did ({@link commitsPrText}). This is the handoff decision the
|
|
276
276
|
* dashboard's open-PR button offers; the RPC layer only resolves which run it is about, and the
|
|
277
277
|
* two providers do the pushing and the opening.
|
|
278
278
|
*/
|
|
@@ -281,6 +281,7 @@ export declare function openAgentPullRequest(cwd: string, agent: AgentMeta, opti
|
|
|
281
281
|
branches?: BranchesFor;
|
|
282
282
|
gitHost?: GitHostFor;
|
|
283
283
|
pr?: BranchPrLookup;
|
|
284
|
+
git?: GitRunner;
|
|
284
285
|
}): Promise<HandoffResult>;
|
|
285
286
|
/**
|
|
286
287
|
* The little a handoff needs to know about the agent it is for: which branch, and what to say on
|
|
@@ -14,22 +14,25 @@ export interface Intervention {
|
|
|
14
14
|
projectName: string;
|
|
15
15
|
/**
|
|
16
16
|
* `pr` = an open PR to review/merge or close; `awaiting` = a run waiting on the question it ended on (#636/#1774);
|
|
17
|
-
* `
|
|
17
|
+
* `uncommitted` = a finished run whose checkout holds files it never committed; `unpushed` = a finished
|
|
18
|
+
* run whose branch has commits that were never pushed (#860).
|
|
18
19
|
*/
|
|
19
|
-
kind: 'pr' | 'awaiting' | 'unpushed';
|
|
20
|
+
kind: 'pr' | 'awaiting' | 'uncommitted' | 'unpushed';
|
|
20
21
|
title: string;
|
|
21
|
-
/** The PR on the git host (`pr` only): where a click takes the user. */
|
|
22
|
+
/** The PR on the git host (`pr` only): where a click takes the user when no run of this dashboard opened it. */
|
|
22
23
|
url?: string;
|
|
23
24
|
/** The PR number (`pr` only). */
|
|
24
25
|
number?: number;
|
|
25
26
|
/** The question's id (`awaiting` only) — its stable identity, so it notifies exactly once. */
|
|
26
27
|
awaitId?: string;
|
|
27
|
-
/** Which run this is about (`
|
|
28
|
+
/** Which run this is about (every kind but a `pr` opened outside this dashboard's runs): a project has several agents. */
|
|
28
29
|
agentId?: string;
|
|
29
|
-
/** The branch the work is sitting on (`unpushed` only). */
|
|
30
|
+
/** The branch the work is sitting on (`uncommitted` and `unpushed` only). */
|
|
30
31
|
branch?: string;
|
|
31
32
|
/** How many commits are waiting (`unpushed` only). */
|
|
32
33
|
commits?: number;
|
|
34
|
+
/** How many files were left uncommitted (`uncommitted` only). */
|
|
35
|
+
files?: number;
|
|
33
36
|
/** When the PR was opened (`pr`) or the agent last updated (the other two), ISO, for ordering. */
|
|
34
37
|
createdAt?: string;
|
|
35
38
|
}
|
|
@@ -44,12 +47,6 @@ export interface InterventionsDeps {
|
|
|
44
47
|
agents?: (cwd: string) => Promise<AgentMeta[]>;
|
|
45
48
|
/** The project's checkouts and branches (default the project's provider, {@link projectBranches}): where a branch's state is read; drives the `unpushed` source (#860). */
|
|
46
49
|
branches?: BranchesFor;
|
|
47
|
-
/**
|
|
48
|
-
* How many of a project's most recent finished agents to inspect for unpushed work. Each one costs
|
|
49
|
-
* a handful of git reads, and this runs on a poll, so old history is not re-walked every minute:
|
|
50
|
-
* work that has sat unpushed for dozens of agents is not news, and the agent list stays the record.
|
|
51
|
-
*/
|
|
52
|
-
handoffLimit?: number;
|
|
53
50
|
}
|
|
54
51
|
/**
|
|
55
52
|
* Build the cross-project interventions queue: every registered project's open PRs, plus any run
|
|
@@ -14,8 +14,8 @@ import type { Intervention } from './interventions.js';
|
|
|
14
14
|
*/
|
|
15
15
|
/**
|
|
16
16
|
* The stable identity of an intervention. A PR is its url (survives title edits and re-sorts);
|
|
17
|
-
* the
|
|
18
|
-
* the gate it is parked on, or the agent whose
|
|
17
|
+
* the others have no url and are keyed on the project plus the thing waiting — the agent and
|
|
18
|
+
* the gate it is parked on, or the agent whose work is uncommitted or unpushed.
|
|
19
19
|
*
|
|
20
20
|
* The agent is part of the awaiting key because a gate id is only unique within its own agent:
|
|
21
21
|
* every agent's first gate is `await-choices`. Two agents running in one project (#736) and both
|
|
@@ -91,8 +91,25 @@ export declare function prView(cwd: string, branch: string, gitHost?: GitHostFor
|
|
|
91
91
|
* deciding whether to offer "Open PR". A read with no branch to ask about answers nothing at once.
|
|
92
92
|
*/
|
|
93
93
|
export declare function cachedPrView(cwd: string, branch?: string): Promise<Cached<LinkedPr | undefined>>;
|
|
94
|
-
/** Forget a branch's PR, after an action that changes whether it has one. */
|
|
94
|
+
/** Forget a branch's PR, after an action that changes whether it has one, and with it how the project's PRs stand and which are open. */
|
|
95
95
|
export declare function forgetPr(cwd: string, branch?: string): void;
|
|
96
|
+
/** How a run's pull request stands, as its row in the list of runs shows it. */
|
|
97
|
+
export type PrState = 'open' | 'draft' | 'merged' | 'closed';
|
|
98
|
+
/**
|
|
99
|
+
* How each of a project's newest pull requests stands, by its address: what the list of runs marks
|
|
100
|
+
* each run's PR with. One listing of the project's requests, whatever their state, rather than one
|
|
101
|
+
* per run; a request older than what the git host lists has no state here. A listing the git host
|
|
102
|
+
* cannot answer throws.
|
|
103
|
+
*/
|
|
104
|
+
export declare function prStates(cwd: string, gitHost?: GitHostFor): Promise<Map<string, PrState>>;
|
|
105
|
+
/**
|
|
106
|
+
* The cached form of {@link prStates} (#1028): the list of runs is polled every few seconds, and a
|
|
107
|
+
* PR's state changes far less often. A listing that fails is kept like an answer, as the states
|
|
108
|
+
* last read, so a git host that cannot answer is asked again a minute later, not at every poll;
|
|
109
|
+
* and while a read is on its way, after a request was opened or merged here, the rows keep the
|
|
110
|
+
* states they had.
|
|
111
|
+
*/
|
|
112
|
+
export declare function cachedPrStates(cwd: string, read?: (cwd: string) => Promise<Map<string, PrState>>): Promise<Map<string, PrState>>;
|
|
96
113
|
/** The cached form of {@link prsForBranch}, shared through the same read-through cache (#1028). */
|
|
97
114
|
export declare function cachedPrsForBranch(cwd: string, branch: string): Promise<Cached<LinkedPr[]>>;
|
|
98
115
|
/** Forget a branch's PR history, after an action that changes it (opening one). */
|
|
@@ -124,3 +141,12 @@ export declare function pickAgentPr(prs: LinkedPr[], since?: string, order?: 'fi
|
|
|
124
141
|
* it cannot decide what it never hears about. A project with no git host package has none open.
|
|
125
142
|
*/
|
|
126
143
|
export declare function openPrs(cwd: string, gitHost?: GitHostFor): Promise<OpenPr[]>;
|
|
144
|
+
/**
|
|
145
|
+
* The cached form of {@link openPrs} (#1028), for the Human Queue: it asked the git host at every
|
|
146
|
+
* poll of every page that shows it, and the page waited. The first ask waits for the answer; after
|
|
147
|
+
* that the list last read answers at once and is read again behind it once it is
|
|
148
|
+
* {@link OPEN_PRS_TTL_MS} old. A request opened or merged here is read again at once
|
|
149
|
+
* ({@link forgetPr}). A first read that fails rejects, as {@link openPrs} does; a later one keeps
|
|
150
|
+
* the list last read.
|
|
151
|
+
*/
|
|
152
|
+
export declare function cachedOpenPrs(cwd: string, read?: (cwd: string) => Promise<OpenPr[]>): Promise<OpenPr[]>;
|
|
@@ -5,13 +5,15 @@ import type { QuotaSource } from './quota.js';
|
|
|
5
5
|
import type { ModelsSource } from './models.js';
|
|
6
6
|
import type { BridgeBrowserOwner } from '../bridge-browser.js';
|
|
7
7
|
import type { ProjectErrorsReader } from '../project-errors.js';
|
|
8
|
-
import type { AddProjectResult, RemoveProjectResult, StartAgentOptions, StartAgentResult } from './types.js';
|
|
8
|
+
import type { AddProjectResult, RemoveProjectResult, StartAgentOptions, StartAgentResult, StartedInResult } from './types.js';
|
|
9
9
|
import type { AgentMeta } from '../store/index.js';
|
|
10
10
|
import type { RemoteTarget } from './remote-run.js';
|
|
11
11
|
/** Wired by the daemon so `sendStart` can reach the daemon's own `startAgent` closure. */
|
|
12
12
|
export type StartAgentHandler = (prompt: string, options: StartAgentOptions, projectId?: string) => StartAgentResult | Promise<StartAgentResult>;
|
|
13
13
|
/** Wired by the daemon so `sendAddProject` can install + register a repo (#433). */
|
|
14
14
|
export type AddProjectHandler = (path: string, share: boolean) => AddProjectResult | Promise<AddProjectResult>;
|
|
15
|
+
/** Wired by the daemon so `sendStartedAgain` can find or add the project a second `openagent` was started in. */
|
|
16
|
+
export type StartedInHandler = (folder: string) => StartedInResult | Promise<StartedInResult>;
|
|
15
17
|
/** Wired by the daemon so `sendRemoveProject` can take a project off the list, by its id, and with `files` remove what OpenAgent left in its folder. */
|
|
16
18
|
export type RemoveProjectHandler = (projectId: string, files: boolean) => RemoveProjectResult | Promise<RemoveProjectResult>;
|
|
17
19
|
/** Resolve an agent to its live event stream: the relay feeds `onEvents` from its own in-memory stream
|
|
@@ -63,6 +65,7 @@ export interface RemoteAgents {
|
|
|
63
65
|
export interface DashboardContext {
|
|
64
66
|
startAgent: StartAgentHandler;
|
|
65
67
|
addProject: AddProjectHandler;
|
|
68
|
+
startedIn: StartedInHandler;
|
|
66
69
|
removeProject: RemoveProjectHandler;
|
|
67
70
|
/** The in-memory event stream for an agent relayed from a saved machine (#1067), else undefined. */
|
|
68
71
|
eventsSource: EventsSource;
|
|
@@ -28,6 +28,24 @@ export type AddProjectResult = {
|
|
|
28
28
|
ok: false;
|
|
29
29
|
error: string;
|
|
30
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* The project a folder `openagent` was started in is, on the dashboard's list: the listed project
|
|
33
|
+
* holding the folder, or the folder, added now. `id` always opens its page; `address` is the one
|
|
34
|
+
* the page writes (`src/project-address.ts`).
|
|
35
|
+
*/
|
|
36
|
+
export interface StartedProject {
|
|
37
|
+
id: string;
|
|
38
|
+
path: string;
|
|
39
|
+
added: boolean;
|
|
40
|
+
address: string;
|
|
41
|
+
}
|
|
42
|
+
/** The {@link StartedProject}, or why the folder could not be added. */
|
|
43
|
+
export type StartedInResult = ({
|
|
44
|
+
ok: true;
|
|
45
|
+
} & StartedProject) | {
|
|
46
|
+
ok: false;
|
|
47
|
+
error: string;
|
|
48
|
+
};
|
|
31
49
|
/**
|
|
32
50
|
* What removing OpenAgent's files from a project's folder did: what went, what stayed with the
|
|
33
51
|
* reason, and what could not be done, each line in words for a person. Paths are from the
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { AgentMeta } from '../store/index.js';
|
|
2
|
+
import { type BranchesFor } from '../store/branches.js';
|
|
3
|
+
/**
|
|
4
|
+
* A finished run's work that never left this machine: the branch it is on, the commits it holds
|
|
5
|
+
* that were never published, and the files its checkout left uncommitted. Either count may be 0,
|
|
6
|
+
* never both.
|
|
7
|
+
*/
|
|
8
|
+
export interface Unpublished {
|
|
9
|
+
branch: string;
|
|
10
|
+
commits: number;
|
|
11
|
+
uncommitted: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* The finished runs of a project whose work never left this machine (#860), by run id: what the
|
|
15
|
+
* Human Queue lists as "Not committed" and "Not published" and the list of runs marks on each row,
|
|
16
|
+
* read alike so the two never disagree.
|
|
17
|
+
*
|
|
18
|
+
* Only a branch the branches provider made for the run counts. A branch of the person's own is
|
|
19
|
+
* theirs: a run continued on it, or a branch made before the history was rewritten, which is
|
|
20
|
+
* thousands of commits past the base.
|
|
21
|
+
*
|
|
22
|
+
* Files its checkout left uncommitted wait on the person whatever else is true of the branch: the
|
|
23
|
+
* run's next step is to commit them, a pull request or none. Not for a run waiting on its question,
|
|
24
|
+
* which is that run's next step, and which keeps its checkout as it was. The checkout on a branch is
|
|
25
|
+
* the newest run's: a run continued on the branch of an earlier one works in a checkout of its own,
|
|
26
|
+
* and what it leaves there is not the earlier run's.
|
|
27
|
+
*
|
|
28
|
+
* Commits wait when they are the branch's own beyond the base, not in the default branch, never
|
|
29
|
+
* pushed, in a project with a remote to push to. A branch pushed once whose copy on the remote is
|
|
30
|
+
* gone since, as a merged pull request's is, left the machine. So did a run with a pull request: its
|
|
31
|
+
* request is what the queue and its row show, and a branch pushed without an upstream reads, once
|
|
32
|
+
* its request merged and the remote's copy went, as never pushed.
|
|
33
|
+
*
|
|
34
|
+
* Every run is asked, in one quick read of the provider (`ahead`: counts, no file lists). A run
|
|
35
|
+
* started from another branch is asked apart, from the commit it started at, or that branch's work
|
|
36
|
+
* would count as its own; a run started from the default branch is counted from it, which already
|
|
37
|
+
* leaves out whatever it took in later, so the commit it started at changes nothing and all such
|
|
38
|
+
* runs share one read. A subagent's branch is its main agent's to land, never a person's to push,
|
|
39
|
+
* and a run still working is still writing its branch. A provider that cannot be found, or does not
|
|
40
|
+
* answer for every branch asked, throws: "nothing waits" would be a false answer.
|
|
41
|
+
*/
|
|
42
|
+
export declare function unpublishedRuns(cwd: string, agents: readonly AgentMeta[], branches?: BranchesFor): Promise<Map<string, Unpublished>>;
|
|
@@ -51,5 +51,7 @@ export declare function contextBridgeBrowser(): BridgeBrowserOwner;
|
|
|
51
51
|
export declare function contextStartAgent(): DashboardContext['startAgent'];
|
|
52
52
|
/** Install + register a repo (#433), which only the daemon can do. */
|
|
53
53
|
export declare function contextAddProject(): DashboardContext['addProject'];
|
|
54
|
+
/** Find or add the project a second `openagent` was started in (#2141), which only the daemon can do. */
|
|
55
|
+
export declare function contextStartedIn(): DashboardContext['startedIn'];
|
|
54
56
|
/** Take a project off the list, which only the daemon can do: it runs the project's close hooks first. */
|
|
55
57
|
export declare function contextRemoveProject(): DashboardContext['removeProject'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { onAgents, onAgent, onAgentsDoing, onDocs, onQueue, onOverview, onRecentAgents, onInterventions, onOpenQuestions, onActivity, onDashboard, onGitHostHome, onRepositoryOffer, onGitStatus, onProjectFiles, onRetainedWorktrees, onAgentWorktree, onAgentHandoff, onBridgeQuestion, onBridgeStatus, onBridgeToken, onBridgeEvents, onBridgeAnswer, onBridgeBrowser } from './reads.js';
|
|
2
2
|
export { sendStop, sendChoice, sendBridgeAnswer, sendBridgeAnswerCancel, sendBridgeBrowser, sendMessage, sendStart, sendOpenInApp, sendRemoveWorktree, sendDeleteAgent, sendOpenPullRequest, sendPush, sendMergeBranch, sendMerge, sendCreateRepository } from './control.js';
|
|
3
3
|
export { streamAgentEvents, type LiveFeedEvent, type PartialMessage, type StreamSync } from './events.js';
|
|
4
|
-
export { onProjects, sendAddProject, onCloneTarget, sendAddProjectFromAddress, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck, type ProjectLauncher } from './projects.js';
|
|
4
|
+
export { onProjects, sendAddProject, sendStartedAgain, onCloneTarget, sendAddProjectFromAddress, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck, type ProjectLauncher } from './projects.js';
|
|
5
5
|
export { onPreferences, savePreferences, patchPreferences, onProjectPresets, saveProjectPresets, onEditors, type SavePreferencesResult, type PatchPreferencesResult, } from './preferences.js';
|
|
6
6
|
export { type EditorInfo } from '../dashboard/open-in-app.js';
|
|
7
7
|
export { onQuota } from './quota.js';
|
|
@@ -3,7 +3,7 @@ import { type BranchReach } from '@openagt/agent-data';
|
|
|
3
3
|
import { type StartReadiness } from '../project-hooks.js';
|
|
4
4
|
import { type PickDirectoryResult } from '../pick-directory.js';
|
|
5
5
|
import type { ProjectSummary } from '../dashboard/projects.js';
|
|
6
|
-
import type { AddProjectResult, OnboardingSuggestion, RemoveProjectResult } from '../dashboard/types.js';
|
|
6
|
+
import type { AddProjectResult, OnboardingSuggestion, RemoveProjectResult, StartedInResult } from '../dashboard/types.js';
|
|
7
7
|
export declare function onProjects(): Promise<ProjectSummary[]>;
|
|
8
8
|
/**
|
|
9
9
|
* Add a project from the dashboard (#396/#433): install the repo and register it so it joins the
|
|
@@ -15,6 +15,16 @@ export declare function onProjects(): Promise<ProjectSummary[]>;
|
|
|
15
15
|
* repository's remote. Nothing is pushed for a project added with `false`.
|
|
16
16
|
*/
|
|
17
17
|
export declare function sendAddProject(path: string, share: boolean): Promise<AddProjectResult>;
|
|
18
|
+
/**
|
|
19
|
+
* A second `openagent` started while this dashboard listens on its port (#2141): it serves
|
|
20
|
+
* nothing itself, and hands over the folder it was started in, if it is in a repository. The
|
|
21
|
+
* answer says which OpenAgent runs here, and the project that holds the folder, else the folder,
|
|
22
|
+
* added. A page's own call is answered the same, and adds no more than Add project.
|
|
23
|
+
*/
|
|
24
|
+
export declare function sendStartedAgain(folder: string | null): Promise<{
|
|
25
|
+
version: string;
|
|
26
|
+
project?: StartedInResult;
|
|
27
|
+
}>;
|
|
18
28
|
/** Where the repository a person typed the address of would be cloned to on this computer, or why what was typed is no address: asked before anything is cloned. */
|
|
19
29
|
export declare function onCloneTarget(address: string): Promise<{
|
|
20
30
|
ok: true;
|