@openagt/dashboard 0.40.0 → 0.42.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/built-in.d.ts +5 -0
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +7 -0
- package/dist/built-in.js.map +1 -1
- package/dist/clone-project.d.ts +11 -0
- package/dist/clone-project.d.ts.map +1 -1
- package/dist/clone-project.js +38 -12
- package/dist/clone-project.js.map +1 -1
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +216 -63
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +6 -2
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/activity.d.ts +2 -2
- package/dist/dashboard/activity.d.ts.map +1 -1
- package/dist/dashboard/activity.js +2 -2
- package/dist/dashboard/activity.js.map +1 -1
- package/dist/dashboard/computers-sync.d.ts +104 -0
- package/dist/dashboard/computers-sync.d.ts.map +1 -0
- package/dist/dashboard/computers-sync.js +179 -0
- package/dist/dashboard/computers-sync.js.map +1 -0
- package/dist/dashboard/elsewhere.d.ts +92 -0
- package/dist/dashboard/elsewhere.d.ts.map +1 -0
- package/dist/dashboard/elsewhere.js +155 -0
- package/dist/dashboard/elsewhere.js.map +1 -0
- package/dist/dashboard/interventions.d.ts +6 -0
- package/dist/dashboard/interventions.d.ts.map +1 -1
- package/dist/dashboard/interventions.js.map +1 -1
- package/dist/dashboard/machine-interventions.d.ts +52 -0
- package/dist/dashboard/machine-interventions.d.ts.map +1 -0
- package/dist/dashboard/machine-interventions.js +117 -0
- package/dist/dashboard/machine-interventions.js.map +1 -0
- package/dist/dashboard/models.d.ts +2 -1
- package/dist/dashboard/models.d.ts.map +1 -1
- package/dist/dashboard/models.js +1 -1
- package/dist/dashboard/models.js.map +1 -1
- package/dist/dashboard/module-serve.d.ts +6 -0
- package/dist/dashboard/module-serve.d.ts.map +1 -1
- package/dist/dashboard/module-serve.js +11 -1
- package/dist/dashboard/module-serve.js.map +1 -1
- package/dist/dashboard/overview.d.ts +20 -5
- package/dist/dashboard/overview.d.ts.map +1 -1
- package/dist/dashboard/overview.js +28 -8
- package/dist/dashboard/overview.js.map +1 -1
- package/dist/dashboard/projects.d.ts +11 -2
- package/dist/dashboard/projects.d.ts.map +1 -1
- package/dist/dashboard/projects.js +3 -2
- package/dist/dashboard/projects.js.map +1 -1
- package/dist/dashboard/relay-endpoints.d.ts +2 -0
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
- package/dist/dashboard/relay-endpoints.js +4 -2
- package/dist/dashboard/relay-endpoints.js.map +1 -1
- package/dist/dashboard/rpc-serve.d.ts +21 -1
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js +9 -3
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/server.d.ts +2 -0
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +6 -4
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/types.d.ts +3 -1
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard-bundle/assets/host/module-BWXIkXv5.js +1 -0
- package/dist/dashboard-bundle/assets/main-CA55XzlS.js +148 -0
- package/dist/dashboard-bundle/assets/main-Ca6eaXat.css +2 -0
- package/dist/dashboard-bundle/assets/{module-C8GDq0nb.js → module-CXKv8UKd.js} +5 -5
- package/dist/dashboard-bundle/index.html +4 -4
- package/dist/dashboard-rpc/computers.d.ts +27 -0
- package/dist/dashboard-rpc/computers.d.ts.map +1 -0
- package/dist/dashboard-rpc/computers.js +90 -0
- package/dist/dashboard-rpc/computers.js.map +1 -0
- package/dist/dashboard-rpc/context.js +1 -1
- package/dist/dashboard-rpc/context.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/machines.d.ts +22 -3
- package/dist/dashboard-rpc/machines.d.ts.map +1 -1
- package/dist/dashboard-rpc/machines.js +102 -22
- package/dist/dashboard-rpc/machines.js.map +1 -1
- package/dist/dashboard-rpc/modules.d.ts.map +1 -1
- package/dist/dashboard-rpc/modules.js +19 -3
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +14 -0
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +48 -5
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/dashboard-rpc/reads.d.ts +6 -0
- package/dist/dashboard-rpc/reads.d.ts.map +1 -1
- package/dist/dashboard-rpc/reads.js +48 -14
- package/dist/dashboard-rpc/reads.js.map +1 -1
- package/dist/dashboard-rpc/relay-dispatch.d.ts +12 -0
- package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -1
- package/dist/dashboard-rpc/relay-dispatch.js +44 -8
- package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
- package/dist/dashboard-rpc/runs-changed.d.ts.map +1 -1
- package/dist/dashboard-rpc/runs-changed.js +14 -6
- package/dist/dashboard-rpc/runs-changed.js.map +1 -1
- package/dist/dashboard-rpc/test-context.d.ts +3 -1
- package/dist/dashboard-rpc/test-context.d.ts.map +1 -1
- package/dist/dashboard-rpc/test-context.js +13 -1
- package/dist/dashboard-rpc/test-context.js.map +1 -1
- package/dist/module-types/dashboard/components/MachineMark.d.ts +14 -0
- package/dist/module-types/dashboard/lib/models.d.ts +11 -1
- package/dist/module-types/dashboard/rpc/machines.d.ts +35 -0
- package/dist/module-types/src/built-in.d.ts +5 -0
- package/dist/module-types/src/clone-project.d.ts +11 -0
- package/dist/module-types/src/dashboard/activity.d.ts +2 -2
- package/dist/module-types/src/dashboard/computers-sync.d.ts +103 -0
- package/dist/module-types/src/dashboard/elsewhere.d.ts +91 -0
- package/dist/module-types/src/dashboard/interventions.d.ts +6 -0
- package/dist/module-types/src/dashboard/machine-interventions.d.ts +51 -0
- package/dist/module-types/src/dashboard/models.d.ts +2 -1
- package/dist/module-types/src/dashboard/module-serve.d.ts +6 -0
- package/dist/module-types/src/dashboard/overview.d.ts +20 -5
- package/dist/module-types/src/dashboard/projects.d.ts +11 -2
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +21 -1
- package/dist/module-types/src/dashboard/types.d.ts +3 -1
- package/dist/module-types/src/dashboard-rpc/computers.d.ts +26 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +1 -1
- package/dist/module-types/src/dashboard-rpc/machines.d.ts +22 -3
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +14 -0
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +6 -0
- package/dist/module-types/src/dashboard-rpc/relay-dispatch.d.ts +28 -0
- package/dist/module-types/src/project-modules.d.ts +19 -0
- package/dist/module-types/src/registry.d.ts +28 -0
- package/dist/module-types/src/repository-address.d.ts +6 -0
- package/dist/project-modules.d.ts +19 -0
- package/dist/project-modules.d.ts.map +1 -1
- package/dist/project-modules.js +42 -2
- package/dist/project-modules.js.map +1 -1
- package/dist/registry.d.ts +28 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +60 -4
- package/dist/registry.js.map +1 -1
- package/dist/repository-address.d.ts +6 -0
- package/dist/repository-address.d.ts.map +1 -1
- package/dist/repository-address.js +9 -0
- package/dist/repository-address.js.map +1 -1
- package/package.json +20 -20
- package/dist/dashboard-bundle/assets/host/module-JRfd42hf.js +0 -1
- package/dist/dashboard-bundle/assets/main-BhC5aJ1h.css +0 -2
- package/dist/dashboard-bundle/assets/main-Bo8Pao9A.js +0 -148
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"relay-dispatch.js","sourceRoot":"","sources":["../../src/dashboard-rpc/relay-dispatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,cAA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C;AAED,iGAAiG;AACjG,mGAAmG;AACnG,gGAAgG;AAChG,2EAA2E;AAC3E,MAAM,aAAa,GAAG,EAAE,cAAc,EAAE,aAAa,EAAE,kBAAkB,EAAE,cAAc,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AACnH,MAAM,YAAY,GAAG,EAAE,eAAe,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,eAAe,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,EAAE,CAAA;AAC7J,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAA4B,EAAE,aAAa,EAAE,YAAY,CAAuC,CAAA;AAEpJ,wDAAwD;AACxD,MAAM,CAAC,MAAM,iBAAiB,GAAsB,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;AAE5E,8FAA8F;AAC9F,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,EAAE,CAAC,CAAA;AACzC,CAAC;AAED,wGAAwG;AACxG,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,EAAU,EAAE,IAAe;IAClE,MAAM,IAAI,GAAG,WAAW,CAAC,EAAE,CAAC,CAAA;IAC5B,IAAI,CAAC,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAA;IACxD,OAAO,IAAI,CAAC,GAAG,IAAI,CAAC,CAAA;AACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs-changed.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/runs-changed.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runs-changed.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/runs-changed.ts"],"names":[],"mappings":"AAQA,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;CAClB;AAOD,kGAAkG;AAClG,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,GAAG,MAAM,IAAI,CAyDjF"}
|
|
@@ -19,11 +19,17 @@ export function followRunsChanged(send) {
|
|
|
19
19
|
}, TOGETHER_MS));
|
|
20
20
|
};
|
|
21
21
|
const follow = async () => {
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
const [own, elsewhere] = await Promise.all([
|
|
23
|
+
contextProjects()
|
|
24
|
+
.list()
|
|
25
|
+
.catch(() => undefined),
|
|
26
|
+
contextRemote()
|
|
27
|
+
.elsewhere()
|
|
28
|
+
.catch(() => []),
|
|
29
|
+
]);
|
|
30
|
+
if (stopped || own === undefined)
|
|
26
31
|
return;
|
|
32
|
+
const projects = [...own, ...elsewhere];
|
|
27
33
|
const paths = new Map(projects.map(project => [project.id, project.path]));
|
|
28
34
|
for (const [id, one] of followed) {
|
|
29
35
|
if (paths.get(id) === one.path)
|
|
@@ -34,8 +40,10 @@ export function followRunsChanged(send) {
|
|
|
34
40
|
for (const project of projects) {
|
|
35
41
|
if (followed.has(project.id))
|
|
36
42
|
continue;
|
|
37
|
-
|
|
38
|
-
const
|
|
43
|
+
// Another computer's project has no runs here: that computer's are all it has.
|
|
44
|
+
const elsewhere = project.machine !== undefined;
|
|
45
|
+
const own = elsewhere ? () => { } : ownRunsWatch.follow(project.path, () => tell(project.id));
|
|
46
|
+
const machines = elsewhere ? contextRemote().followElsewhereRuns(project.id, () => tell(project.id)) : contextRemote().followRuns(project.path, () => tell(project.id));
|
|
39
47
|
followed.set(project.id, {
|
|
40
48
|
path: project.path,
|
|
41
49
|
stop: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs-changed.js","sourceRoot":"","sources":["../../src/dashboard-rpc/runs-changed.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAA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EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAA;YACvK,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE;gBACvB,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,IAAI,EAAE,GAAG,EAAE;oBACT,GAAG,EAAE,CAAA;oBACL,QAAQ,EAAE,CAAA;gBACZ,CAAC;aACF,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAA;IACD,KAAK,MAAM,EAAE,CAAA;IACb,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,KAAK,MAAM,EAAE,EAAE,iBAAiB,CAAC,CAAA;IACjE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAA;IACf,OAAO,GAAG,EAAE;QACV,OAAO,GAAG,IAAI,CAAA;QACd,aAAa,CAAC,KAAK,CAAC,CAAA;QACpB,KAAK,MAAM,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE;YAAE,GAAG,CAAC,IAAI,EAAE,CAAA;QAC/C,QAAQ,CAAC,KAAK,EAAE,CAAA;QAChB,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,MAAM,EAAE;YAAE,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1D,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashboardContext } from '../dashboard/rpc-serve.js';
|
|
1
|
+
import type { DashboardContext, RemoteAgents } from '../dashboard/rpc-serve.js';
|
|
2
2
|
import type { DashboardOptions } from '../dashboard/server.js';
|
|
3
3
|
/**
|
|
4
4
|
* What the dashboard host wires (D3), as a test would have it: every capability present, the two
|
|
@@ -7,6 +7,8 @@ import type { DashboardOptions } from '../dashboard/server.js';
|
|
|
7
7
|
* it throws. That makes this the one place a test says what the host would have wired, with only
|
|
8
8
|
* the parts it cares about overridden.
|
|
9
9
|
*/
|
|
10
|
+
/** No other computer of the person's: what a test that builds its own `remote` spreads in when it is about none. */
|
|
11
|
+
export declare const NO_ELSEWHERE: Pick<RemoteAgents, 'elsewhere' | 'elsewhereRuns' | 'followElsewhereRuns' | 'elsewhereHome' | 'bringHere' | 'forward' | 'machinesQueue'>;
|
|
10
12
|
export declare function testDashboardContext(over?: Partial<DashboardContext>): DashboardContext;
|
|
11
13
|
/**
|
|
12
14
|
* The same wiring as {@link testDashboardContext}, in the shape {@link startDashboard} takes: a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-context.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/test-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"test-context.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/test-context.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAE9D;;;;;;GAMG;AACH,oHAAoH;AACpH,eAAO,MAAM,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,GAAG,eAAe,GAAG,qBAAqB,GAAG,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,eAAe,CAUhK,CAAA;AAED,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,gBAAgB,CAe3F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,gBAAgB,CAG3F;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,GAAE,OAAO,CAAC,gBAAgB,CAAM,GAAG,IAAI,CAE7E"}
|
|
@@ -8,6 +8,18 @@ import { defaultQuotaSource } from '../dashboard/quota.js';
|
|
|
8
8
|
* it throws. That makes this the one place a test says what the host would have wired, with only
|
|
9
9
|
* the parts it cares about overridden.
|
|
10
10
|
*/
|
|
11
|
+
/** No other computer of the person's: what a test that builds its own `remote` spreads in when it is about none. */
|
|
12
|
+
export const NO_ELSEWHERE = {
|
|
13
|
+
elsewhere: async () => [],
|
|
14
|
+
machinesQueue: async () => ({ said: [], unread: [] }),
|
|
15
|
+
elsewhereRuns: async () => [],
|
|
16
|
+
followElsewhereRuns: () => () => { },
|
|
17
|
+
elsewhereHome: async () => undefined,
|
|
18
|
+
bringHere: async () => ({ state: 'missing' }),
|
|
19
|
+
forward: async () => {
|
|
20
|
+
throw new Error('no other computer is wired in this test');
|
|
21
|
+
},
|
|
22
|
+
};
|
|
11
23
|
export function testDashboardContext(over = {}) {
|
|
12
24
|
return {
|
|
13
25
|
startAgent: () => ({ ok: false, error: 'not wired in this test' }),
|
|
@@ -15,7 +27,7 @@ export function testDashboardContext(over = {}) {
|
|
|
15
27
|
startedIn: () => ({ ok: false, error: 'not wired in this test' }),
|
|
16
28
|
removeProject: () => ({ ok: false, error: 'not wired in this test' }),
|
|
17
29
|
eventsSource: () => undefined,
|
|
18
|
-
remote: { target: () => undefined, list: () => [], working: () => false, rekey: () => { }, sent: () => true, home: async () => undefined, follow: async () => { }, machineNames: async () => () => undefined, machineRuns: async () => [], followRuns: () => () => { } },
|
|
30
|
+
remote: { target: () => undefined, list: () => [], working: () => false, rekey: () => { }, sent: () => true, home: async () => undefined, follow: async () => { }, machineNames: async () => () => undefined, machineRuns: async () => [], followRuns: () => () => { }, ...NO_ELSEWHERE },
|
|
19
31
|
preferences: registryPreferencesStore(),
|
|
20
32
|
quota: defaultQuotaSource(),
|
|
21
33
|
models: { read: async () => ({ 'claude-code': { models: [] }, codex: { models: [] } }) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-context.js","sourceRoot":"","sources":["../../src/dashboard-rpc/test-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB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AU,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"}
|
|
@@ -17,3 +17,17 @@ export declare function MachineMark({ kind, online, labelled, className }: {
|
|
|
17
17
|
labelled?: boolean;
|
|
18
18
|
className?: string | undefined;
|
|
19
19
|
}): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Where a row's run runs, when that is another of the person's computers: the icon of its kind (a
|
|
22
|
+
* laptop for a computer whose kind is not known) and its name, as the project picker marks a
|
|
23
|
+
* project of another computer's. The name is the first part of the row to give up width. A row
|
|
24
|
+
* with no room for it (`named` off) draws the icon alone, as the list of runs does, and says the
|
|
25
|
+
* name to a screen reader; the row's own hover says it in words.
|
|
26
|
+
*/
|
|
27
|
+
export declare function OnComputer({ computer, named }: {
|
|
28
|
+
computer: {
|
|
29
|
+
name: string;
|
|
30
|
+
kind?: MachineKind | undefined;
|
|
31
|
+
};
|
|
32
|
+
named?: boolean;
|
|
33
|
+
}): import("react").JSX.Element;
|
|
@@ -6,12 +6,22 @@ import { type DriverModels, type ModelsView } from '../rpc/models.js';
|
|
|
6
6
|
* the names from its first frame rather than the ids for a moment.
|
|
7
7
|
*/
|
|
8
8
|
export declare function useModels(): ModelsView | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The models a run started on the machine picked in "Run on" can be given: that machine's own, as
|
|
11
|
+
* it asked its agents, which need not be this computer's (`theirs`). `undefined` while it is asked; this
|
|
12
|
+
* computer's when none is picked, or the machine does not say (an OpenAgent that is not asked this).
|
|
13
|
+
*/
|
|
14
|
+
export declare function useModelsOn(machineId: string | undefined): {
|
|
15
|
+
models: ModelsView | undefined;
|
|
16
|
+
theirs: boolean;
|
|
17
|
+
};
|
|
9
18
|
/**
|
|
10
19
|
* Every coding agent with the models it listed, by the names it gives them, or a line saying why
|
|
11
20
|
* there are none: the one list every surface that picks a model offers (the start menu, Settings),
|
|
12
21
|
* so the two can never disagree on what a pick may be. No icons: those are the menu's own.
|
|
22
|
+
* `on` names the computer the models are another's of, for an agent not installed there.
|
|
13
23
|
*/
|
|
14
|
-
export declare function driverOptions(models: ModelsView | undefined): DriverOption[];
|
|
24
|
+
export declare function driverOptions(models: ModelsView | undefined, on?: string): DriverOption[];
|
|
15
25
|
/**
|
|
16
26
|
* A model's name as its agent shows it ("Opus 5.5" for `opus`, and for `claude-opus-5-5`, the full
|
|
17
27
|
* id `opus` runs today). A model the agent does not list, or a list not answered yet, is named by
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type * as impl from '../../src/dashboard-rpc/machines.js';
|
|
2
|
+
export type * from '../../src/dashboard-rpc/machines.js';
|
|
3
|
+
export declare const onMachines: () => Promise<impl.Machine[]>;
|
|
4
|
+
export declare const sendAddMachine: (pasted: string, label?: string | undefined, owner?: string | undefined) => Promise<impl.AddMachineResult>;
|
|
5
|
+
export declare const sendRemoveMachine: (id: string) => Promise<impl.RemoveMachineResult>;
|
|
6
|
+
export declare const onMachinesReachable: () => Promise<Record<string, boolean>>;
|
|
7
|
+
export declare const onMachineVersions: () => Promise<impl.MachineVersions>;
|
|
8
|
+
export declare const sendProjectToMachine: (projectId: string, machineId: string) => Promise<impl.ProjectOnMachine>;
|
|
9
|
+
export declare const onProjectOnMachine: (projectId: string, machineId: string) => Promise<impl.ProjectOnMachine>;
|
|
10
|
+
export declare const sendProjectHere: (projectId: string) => Promise<impl.ProjectOnMachine>;
|
|
11
|
+
export declare const onProjectHere: (projectId: string) => Promise<impl.ProjectOnMachine>;
|
|
12
|
+
export declare const onMachineStartCheck: (projectId: string, machineId: string, driver?: string | undefined) => Promise<import("../../src/project-hooks.js").StartReadiness | null>;
|
|
13
|
+
export declare const onMachineModels: (machineId: string) => Promise<import("./models.js").ModelsView | null>;
|
|
14
|
+
export declare const onComputersThrough: (machineId: string) => Promise<impl.ComputersThrough>;
|
|
15
|
+
export declare const sendAddComputerThrough: (machineId: string, computerId: string) => Promise<impl.AddMachineResult>;
|
|
16
|
+
export declare const onMachinePerson: (machineId: string) => Promise<impl.MachinePerson>;
|
|
17
|
+
export declare const sendRemoveMachineDevice: (machineId: string, deviceId: string) => Promise<impl.MachinePerson>;
|
|
18
|
+
export declare const sendRenameMachine: (id: string, label: string) => Promise<impl.AddMachineResult>;
|
|
19
|
+
export declare const sendLetMachineIn: (machineId: string, link: string) => Promise<{
|
|
20
|
+
ok: true;
|
|
21
|
+
} | {
|
|
22
|
+
ok: false;
|
|
23
|
+
error: string;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const sendMachineCode: (machineId: string) => Promise<{
|
|
26
|
+
ok: true;
|
|
27
|
+
value: impl.MachineCode;
|
|
28
|
+
} | {
|
|
29
|
+
ok: false;
|
|
30
|
+
error: string;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const sendMachineTold: (machineId: string) => Promise<{
|
|
33
|
+
ok: boolean;
|
|
34
|
+
}>;
|
|
35
|
+
export declare const onMachineLogins: (machineId: string) => Promise<impl.MachineLoginsResult>;
|
|
@@ -39,6 +39,11 @@ export declare function builtInPackages(): Promise<ProjectPackage[]>;
|
|
|
39
39
|
export declare function builtInPackagesOf(root: string): Promise<ProjectPackage[]>;
|
|
40
40
|
/** The project's own installed packages, less the names OpenAgent brings itself. */
|
|
41
41
|
export declare function ownPackages(root: string): Promise<ProjectPackage[]>;
|
|
42
|
+
/**
|
|
43
|
+
* Every package OpenAgent brings to projects, the picked ones too, whatever a project holds: the
|
|
44
|
+
* copy a module's page is served from on a computer where no project of its own has the module.
|
|
45
|
+
*/
|
|
46
|
+
export declare function broughtToProjects(): Promise<ProjectPackage[]>;
|
|
42
47
|
/** The packages that are this computer's: see {@link COMPUTER_PACKAGES}. */
|
|
43
48
|
export declare function computerPackages(): Promise<ProjectPackage[]>;
|
|
44
49
|
/**
|
|
@@ -66,3 +66,14 @@ export interface CloneOptions {
|
|
|
66
66
|
* folder a second ask could take for the project.
|
|
67
67
|
*/
|
|
68
68
|
export declare function cloneProject(typed: string, opts?: CloneOptions): Promise<Cloned>;
|
|
69
|
+
/**
|
|
70
|
+
* Whether this computer's logins read the repository at the address, asked of its host without
|
|
71
|
+
* cloning anything: what a run of a project cloned here first would hit before it starts. The
|
|
72
|
+
* answer is the clone's own words when they cannot.
|
|
73
|
+
*/
|
|
74
|
+
export declare function canRead(typed: string, opts?: CloneOptions, subject?: string): Promise<{
|
|
75
|
+
ok: true;
|
|
76
|
+
} | {
|
|
77
|
+
ok: false;
|
|
78
|
+
error: string;
|
|
79
|
+
}>;
|
|
@@ -22,8 +22,8 @@ export interface Activity {
|
|
|
22
22
|
}
|
|
23
23
|
/** Injectable seam so {@link buildActivity} is unit-testable off disk. */
|
|
24
24
|
export interface ActivityDeps {
|
|
25
|
-
/** A project's runs, live prepended to the archived history, newest-first
|
|
26
|
-
readAgents?: (
|
|
25
|
+
/** A project's runs, live prepended to the archived history, newest-first: off its folder by default, as its computer says them for another computer's. */
|
|
26
|
+
readAgents?: (project: ProjectSummary) => Promise<AgentMeta[]>;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Build the cross-project activity feed: for each registered project's most recent agents, one
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { type ForgottenMachine, type MachineRecord } from '../registry.js';
|
|
2
|
+
/**
|
|
3
|
+
* The person's computers, the same on every one of them: a computer one of them saves, the others
|
|
4
|
+
* save too, and one the person removes on one of them, the others take out. So every computer's
|
|
5
|
+
* page reaches every other, whichever page the person opens.
|
|
6
|
+
*
|
|
7
|
+
* Each computer, now and then, asks each of the person's computers it reaches at an address (a
|
|
8
|
+
* server, or a computer on Tailscale) what it has and what it removed. What that computer lacks,
|
|
9
|
+
* this one hands it: for each of its other computers reached at an address, and for itself when
|
|
10
|
+
* it has one, a code that computer gets in with, fetched from the door it is for, so every
|
|
11
|
+
* computer holds a key of its own. What that computer removed after it was saved here is taken out
|
|
12
|
+
* here, and what was removed here, it takes out. A computer that keeps a line to a server of the
|
|
13
|
+
* person's is saved through that server, by every computer that is in there.
|
|
14
|
+
*
|
|
15
|
+
* Only the person's own computers: a computer of another person's, shared on a server, is never
|
|
16
|
+
* handed on. Each computer still says only its own projects and runs; it only knows the others.
|
|
17
|
+
*/
|
|
18
|
+
/** One of the person's computers another computer reaches at its address, as a computer says it has it. */
|
|
19
|
+
export interface OwnComputer {
|
|
20
|
+
url: string;
|
|
21
|
+
label: string;
|
|
22
|
+
/** The computer's own name, as it first said it. */
|
|
23
|
+
host?: string;
|
|
24
|
+
/** When it was saved there, ISO: a removal after this one stands. */
|
|
25
|
+
added?: string;
|
|
26
|
+
}
|
|
27
|
+
/** What a computer says of the person's computers: the ones it reaches at their addresses, the ones the person removed there, and its own door's address. */
|
|
28
|
+
export interface OwnComputers {
|
|
29
|
+
/** Where this computer's own door is reached, when it has an address: a server's, or its name on Tailscale. */
|
|
30
|
+
door?: string;
|
|
31
|
+
computers: OwnComputer[];
|
|
32
|
+
forgotten: ForgottenMachine[];
|
|
33
|
+
}
|
|
34
|
+
/** Whether a saved machine is one another computer reaches at the same address: a server, or a computer on Tailscale. Not one saved through a server, on a Wi-Fi, or on a line at this server. */
|
|
35
|
+
export declare function reachedAtAddress(machine: Pick<MachineRecord, 'url'>): boolean;
|
|
36
|
+
/** Whether a saved machine is a server of the person's with a door of its own: one other computers keep lines to. A computer on Tailscale keeps none. */
|
|
37
|
+
export declare function isServer(machine: Pick<MachineRecord, 'url'>): boolean;
|
|
38
|
+
/** What a computer answered as its computers, the ones that read as such: anything else is dropped. */
|
|
39
|
+
export declare function ownComputersOf(said: unknown): OwnComputers;
|
|
40
|
+
/** Whether a removal at `at` stands over a computer saved at `added`: one with no time of its own was saved before any. */
|
|
41
|
+
export declare function removedSince(added: string | undefined, at: string): boolean;
|
|
42
|
+
/** A computer to hand another: one of this computer's others, or this computer itself. */
|
|
43
|
+
export type Handed = {
|
|
44
|
+
self: true;
|
|
45
|
+
url: string;
|
|
46
|
+
} | {
|
|
47
|
+
self?: undefined;
|
|
48
|
+
machine: MachineRecord;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* What computer `there` lacks of what this one reaches at an address: each of this computer's
|
|
52
|
+
* others but `there` itself, and this computer when its door has an address. One `there` has by
|
|
53
|
+
* its address or its own name is not handed, nor one it removed since this computer saved it.
|
|
54
|
+
*/
|
|
55
|
+
export declare function lacking(there: MachineRecord, theirs: OwnComputers, mine: readonly MachineRecord[], door: string | undefined): Handed[];
|
|
56
|
+
/** What this computer's own door says of itself: its address, and its id among the devices of each server it keeps a line to. */
|
|
57
|
+
export interface OwnDoor {
|
|
58
|
+
address?: string;
|
|
59
|
+
lines: {
|
|
60
|
+
url: string;
|
|
61
|
+
id: string;
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
/** A computer on a line at a server, as the server lists it. */
|
|
65
|
+
export interface LineComputer {
|
|
66
|
+
id: string;
|
|
67
|
+
name: string;
|
|
68
|
+
added: boolean;
|
|
69
|
+
owner?: string;
|
|
70
|
+
}
|
|
71
|
+
/** What a round reaches through: the real ones, unless a test says otherwise. */
|
|
72
|
+
export declare const computersWiring: {
|
|
73
|
+
env: NodeJS.ProcessEnv;
|
|
74
|
+
machines: () => Promise<MachineRecord[]>;
|
|
75
|
+
forgotten: () => Promise<ForgottenMachine[]>;
|
|
76
|
+
call: (machine: MachineRecord, fn: string, args: unknown[]) => Promise<{
|
|
77
|
+
ok: true;
|
|
78
|
+
ret: unknown;
|
|
79
|
+
} | {
|
|
80
|
+
ok: false;
|
|
81
|
+
error: string;
|
|
82
|
+
}>;
|
|
83
|
+
door: () => Promise<OwnDoor>;
|
|
84
|
+
/** A link one more device of the person gets in with: at this computer's own door, or at a saved machine's. */
|
|
85
|
+
ownCode: () => Promise<string | undefined>;
|
|
86
|
+
codeAt: (machine: MachineRecord) => Promise<string | undefined>;
|
|
87
|
+
/** This computer's name, as a computer it is handed to saves it by. */
|
|
88
|
+
name: () => string;
|
|
89
|
+
/** Take out here what the person removed on another of their computers. */
|
|
90
|
+
forget: (gone: readonly ForgottenMachine[]) => Promise<void>;
|
|
91
|
+
/** The computers on a line at a saved server, and how one is saved through it. */
|
|
92
|
+
lineComputers: (server: MachineRecord) => Promise<LineComputer[] | undefined>;
|
|
93
|
+
saveThrough: (server: MachineRecord, id: string) => Promise<void>;
|
|
94
|
+
now: () => number;
|
|
95
|
+
};
|
|
96
|
+
/** One round: each of the person's computers reached at an address is brought up to this one's, and this one to theirs. */
|
|
97
|
+
export declare function syncComputers(): Promise<void>;
|
|
98
|
+
/** A round in a moment, when the computers sync at all: the person just saved or removed one. */
|
|
99
|
+
export declare function syncComputersSoon(): void;
|
|
100
|
+
/** Keep the person's computers the same on all of them, from now on: a round every few minutes, the first a moment after the start. */
|
|
101
|
+
export declare function startComputersSync(env: NodeJS.ProcessEnv): () => void;
|
|
102
|
+
/** Take out here the computers the person removed on another of theirs, after each was saved here: through-saved ones with the server they go through. */
|
|
103
|
+
export declare function forgetHere(gone: readonly ForgottenMachine[], remove: (machine: MachineRecord) => Promise<boolean>): Promise<void>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import type { ProjectSummary } from './projects.js';
|
|
2
|
+
/**
|
|
3
|
+
* The projects of the person's other computers, as this one lists them beside its own: a
|
|
4
|
+
* laptop's on its server, a server's on the laptop. Each computer says its own projects only
|
|
5
|
+
* ({@link OwnProject}), over the relay of the saved machine it is, and only a computer that is
|
|
6
|
+
* the person's own is asked: a computer of another person's, shared on a server, keeps its
|
|
7
|
+
* projects to its person.
|
|
8
|
+
*
|
|
9
|
+
* A project this computer has too, by its repository's address, is listed once, as this
|
|
10
|
+
* computer's: a run of it goes to any computer that has it, by "Run on". One only another
|
|
11
|
+
* computer has is listed as that computer's, under an id of its own ({@link elsewhereId}): what
|
|
12
|
+
* the page asks of it is asked of that computer, and a run of it starts there unless another
|
|
13
|
+
* computer is picked, which clones it first. What a computer said last is kept, so its projects
|
|
14
|
+
* stay listed while it is off.
|
|
15
|
+
*/
|
|
16
|
+
/** What a computer says of one of its own projects to another computer of the person's. */
|
|
17
|
+
export interface OwnProject {
|
|
18
|
+
/** Its id there. */
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
/** Its folder there. */
|
|
22
|
+
path: string;
|
|
23
|
+
/** Its repository's address ({@link import('../repository-address.js').repositoryAddress}), when it has one. */
|
|
24
|
+
address?: string;
|
|
25
|
+
/** The same address in the letters its `origin` is written with: what another computer clones it from. */
|
|
26
|
+
spelling?: string;
|
|
27
|
+
/** Whether the agents' records of it go to its repository's remote: a copy cloned from it takes the same answer. */
|
|
28
|
+
share: boolean;
|
|
29
|
+
gitHost: boolean;
|
|
30
|
+
activated: boolean;
|
|
31
|
+
lastActivityAt?: string;
|
|
32
|
+
/** The packages that bring it a module's pages there (Queue, Tickets, Automations): the pages it has here too. */
|
|
33
|
+
modules?: string[];
|
|
34
|
+
}
|
|
35
|
+
/** What a computer answered as its projects, the ones that read as projects: anything else is dropped. */
|
|
36
|
+
export declare function ownProjectsOf(said: unknown): OwnProject[];
|
|
37
|
+
/** The id here of a project of another computer's: its id there, and the mark of the saved machine it is. */
|
|
38
|
+
export declare function elsewhereId(projectId: string, machineId: string): string;
|
|
39
|
+
/** Whether an id is that of another computer's project, not one of this computer's own. */
|
|
40
|
+
export declare function isElsewhereId(id: unknown): id is string;
|
|
41
|
+
/** How a call about the project names it to its computer: its repository's address, or its id there when it has none. */
|
|
42
|
+
export declare function lineNameOf(project: Pick<OwnProject, 'id' | 'address'>): string;
|
|
43
|
+
/** The project's id on its computer, from how a call named it there: undefined for an address. */
|
|
44
|
+
export declare function idInLineName(name: string): string | undefined;
|
|
45
|
+
/** A saved machine of the person's own, with what it said of its projects last. */
|
|
46
|
+
export interface OwnMachine {
|
|
47
|
+
id: string;
|
|
48
|
+
projects?: OwnProject[];
|
|
49
|
+
}
|
|
50
|
+
/** A project of another computer's: the saved machine it is on, and the project as that computer said it. */
|
|
51
|
+
export interface ElsewhereHome<M extends OwnMachine = OwnMachine> {
|
|
52
|
+
machine: M;
|
|
53
|
+
project: OwnProject;
|
|
54
|
+
}
|
|
55
|
+
/** The listing of another computer's project, as the page lists projects: marked with the saved machine it is on. */
|
|
56
|
+
export declare function elsewhereSummary(home: ElsewhereHome): ProjectSummary;
|
|
57
|
+
/**
|
|
58
|
+
* The projects of the person's other computers that this one does not have, each listed once:
|
|
59
|
+
* one whose repository's address is a project here is this computer's, and of two computers
|
|
60
|
+
* with the same repository the first one listed has it. A project with no address is only its
|
|
61
|
+
* own computer's, and listed for it.
|
|
62
|
+
*/
|
|
63
|
+
export declare function elsewhereHomes<M extends OwnMachine>(machines: readonly M[], ownAddresses: ReadonlySet<string>): ElsewhereHome<M>[];
|
|
64
|
+
/** The project of another computer's with this id, among the saved machines, whether it is listed here or not. */
|
|
65
|
+
export declare function homeOf<M extends OwnMachine>(machines: readonly M[], id: string): ElsewhereHome<M> | undefined;
|
|
66
|
+
/** How long a computer's word on its projects is taken before it is asked again. */
|
|
67
|
+
export declare const PROJECTS_KEPT_MS = 20000;
|
|
68
|
+
/** How long a list waits for a computer never answered before: what it says after comes at the next list. */
|
|
69
|
+
export declare const FIRST_WAIT_MS = 3000;
|
|
70
|
+
/**
|
|
71
|
+
* Each of the person's computers asked for its projects at most every {@link PROJECTS_KEPT_MS}, and
|
|
72
|
+
* what it said kept by `keep` (the saved machine's record), so a list is made of what each said
|
|
73
|
+
* last: at once, while each is asked again behind it. One never answered yet is waited for a
|
|
74
|
+
* little, the first time.
|
|
75
|
+
*/
|
|
76
|
+
export declare class OwnProjectsAsked<M extends OwnMachine> {
|
|
77
|
+
/** Ask the machine for its projects. */
|
|
78
|
+
private readonly ask;
|
|
79
|
+
/** Keep what the machine said, when it answered and said otherwise than it had. */
|
|
80
|
+
private readonly keep;
|
|
81
|
+
private readonly now;
|
|
82
|
+
private readonly asked;
|
|
83
|
+
constructor(
|
|
84
|
+
/** Ask the machine for its projects. */
|
|
85
|
+
ask: (machine: M) => Promise<unknown>,
|
|
86
|
+
/** Keep what the machine said, when it answered and said otherwise than it had. */
|
|
87
|
+
keep: (machine: M, projects: OwnProject[]) => Promise<void>, now?: () => number);
|
|
88
|
+
/** Ask each machine whose word is old, and wait for the ones never heard from, a little. */
|
|
89
|
+
refresh(machines: readonly M[]): Promise<void>;
|
|
90
|
+
private askOne;
|
|
91
|
+
}
|
|
@@ -4,6 +4,7 @@ import type { ProjectSummary, ProjectionRead } from './projects.js';
|
|
|
4
4
|
import { type BranchesFor } from '../store/branches.js';
|
|
5
5
|
import { type PrLister } from './pull-requests.js';
|
|
6
6
|
import { type BridgeQuestion } from './bridge-question.js';
|
|
7
|
+
import type { MachineKind } from '../reached-by-line.js';
|
|
7
8
|
export { interventionKey } from './keys.js';
|
|
8
9
|
/**
|
|
9
10
|
* One item awaiting the human: an open `pr` to review and merge or close, a run `awaiting` the
|
|
@@ -42,6 +43,11 @@ export interface Intervention {
|
|
|
42
43
|
files?: number;
|
|
43
44
|
/** When the PR was opened (`pr`) or the agent last updated (the other two), ISO, for ordering. */
|
|
44
45
|
createdAt?: string;
|
|
46
|
+
/** The computer the run it is about runs on, when that is one of the person's other computers: the saved machine's name and kind. */
|
|
47
|
+
computer?: {
|
|
48
|
+
name: string;
|
|
49
|
+
kind: MachineKind;
|
|
50
|
+
};
|
|
45
51
|
}
|
|
46
52
|
/** Injectable seam so {@link buildInterventions} is unit-testable off disk. */
|
|
47
53
|
export interface InterventionsDeps {
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Intervention } from './interventions.js';
|
|
2
|
+
import type { ProjectionRead } from './projects.js';
|
|
3
|
+
/**
|
|
4
|
+
* The Human Queue of the person's other computers, beside this one's own: what needs the person in
|
|
5
|
+
* a run there (its question, the work it left unpublished, the PR it opened) and the PRs of a
|
|
6
|
+
* project only another computer has. Each computer says the items of its own projects only, never
|
|
7
|
+
* the ones it lists of other computers', so two computers never ask each other in a circle. Here
|
|
8
|
+
* each item is named by the project as it is listed here: this computer's own of the same
|
|
9
|
+
* repository, else the other computer's under its id here; and an item of a run there is marked
|
|
10
|
+
* with that computer.
|
|
11
|
+
*/
|
|
12
|
+
/** What the person's other computers said of their Human Queues, each as named here, and the projects here that one which did not answer has. */
|
|
13
|
+
export interface MachinesQueue {
|
|
14
|
+
said: ProjectionRead<Intervention>[];
|
|
15
|
+
/** Projects here whose items on a computer that did not answer are not known: none of them is read whole. */
|
|
16
|
+
unread: string[];
|
|
17
|
+
}
|
|
18
|
+
/** What a computer answered as its Human Queue, the items that read as items, each in the fields an item has: anything else is dropped. */
|
|
19
|
+
export declare function interventionsOf(said: unknown): ProjectionRead<Intervention>;
|
|
20
|
+
/**
|
|
21
|
+
* A computer's Human Queue as named here: each item by `idHere` of its project's id there, and one
|
|
22
|
+
* about a run marked with the computer it runs on. An item of a project not listed here is dropped.
|
|
23
|
+
*/
|
|
24
|
+
export declare function namedHere(said: ProjectionRead<Intervention>, idHere: (theirs: string) => string | undefined, computer: NonNullable<Intervention['computer']>): ProjectionRead<Intervention>;
|
|
25
|
+
/**
|
|
26
|
+
* This computer's Human Queue with what the other computers said: each item named as its project is
|
|
27
|
+
* here (`names`, by id: one not listed is dropped), once, newest first. Of a PR both list, the one
|
|
28
|
+
* a run opened is kept: its row opens the run. A project is read whole when every computer that has
|
|
29
|
+
* it answered.
|
|
30
|
+
*/
|
|
31
|
+
export declare function withMachinesQueue(own: ProjectionRead<Intervention>, machines: MachinesQueue, names: ReadonlyMap<string, string>): ProjectionRead<Intervention>;
|
|
32
|
+
/** How long a computer's Human Queue is taken before it is asked again: a page asks every few seconds. */
|
|
33
|
+
export declare const QUEUE_KEPT_MS = 10000;
|
|
34
|
+
/** How long a Human Queue waits for a computer never answered before: what it says after comes at the next read. */
|
|
35
|
+
export declare const QUEUE_FIRST_WAIT_MS = 3000;
|
|
36
|
+
/**
|
|
37
|
+
* Each machine asked at most every {@link QUEUE_KEPT_MS}, and what it said last kept: a read is
|
|
38
|
+
* answered at once with that while the machine is asked again behind it. One never answered yet is
|
|
39
|
+
* waited for a little; one whose last ask failed has nothing kept, so its items are not taken as
|
|
40
|
+
* still there.
|
|
41
|
+
*/
|
|
42
|
+
export declare class AnswersKept<M extends {
|
|
43
|
+
id: string;
|
|
44
|
+
}, T> {
|
|
45
|
+
private readonly ask;
|
|
46
|
+
private readonly now;
|
|
47
|
+
private readonly kept;
|
|
48
|
+
constructor(ask: (machine: M) => Promise<T>, now?: () => number);
|
|
49
|
+
/** What each machine said last, by its id: one that never answered, or whose last ask failed, has none. */
|
|
50
|
+
of(machines: readonly M[]): Promise<Map<string, T>>;
|
|
51
|
+
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Driver, DriverModel } from '@openagt/agent-driver';
|
|
2
2
|
import { type DriverName } from '../driver-names.js';
|
|
3
|
-
/** What one coding agent offers: its models, or why it could not say. */
|
|
3
|
+
/** What one coding agent offers: its models, or why it could not say; `missing` when its CLI is not on the computer at all. */
|
|
4
4
|
export type DriverModels = {
|
|
5
5
|
models: DriverModel[];
|
|
6
6
|
} | {
|
|
7
7
|
models: [];
|
|
8
8
|
error: string;
|
|
9
|
+
missing?: true;
|
|
9
10
|
};
|
|
10
11
|
/** The models of every coding agent a person can pick, by driver. */
|
|
11
12
|
export type ModelsView = Record<DriverName, DriverModels>;
|
|
@@ -5,10 +5,14 @@ import { type ProjectModule } from '../project-modules.js';
|
|
|
5
5
|
export declare const MODULES_PREFIX = "/_modules";
|
|
6
6
|
/** Where the files of the computer's modules are served, which are no project's: `/_computer-modules/<package>/<file>`. */
|
|
7
7
|
export declare const COMPUTER_MODULES_PREFIX = "/_computer-modules";
|
|
8
|
+
/** Where the files of the modules OpenAgent brings to projects are served from its own copy: `/_brought-modules/<package>/<file>`. */
|
|
9
|
+
export declare const BROUGHT_MODULES_PREFIX = "/_brought-modules";
|
|
8
10
|
/** The URL a module's browser part is served at from one project. */
|
|
9
11
|
export declare function moduleUrl(projectId: string, module: Pick<ProjectModule, 'package' | 'entry'>): string;
|
|
10
12
|
/** The URL the browser part of one of the computer's modules is served at. */
|
|
11
13
|
export declare function computerModuleUrl(module: Pick<ProjectModule, 'package' | 'entry'>): string;
|
|
14
|
+
/** The URL the browser part of a module OpenAgent brings to projects is served at from its own copy. */
|
|
15
|
+
export declare function broughtModuleUrl(module: Pick<ProjectModule, 'package' | 'entry'>): string;
|
|
12
16
|
/**
|
|
13
17
|
* A module's URL with its entry file's version (`?v=`): a browser keeps that file for good, and
|
|
14
18
|
* the next version of the module is another URL. Without the file there to read, the URL as it is.
|
|
@@ -27,3 +31,5 @@ export declare function versionedModuleUrl(url: string, module: Pick<ProjectModu
|
|
|
27
31
|
export declare function serveModuleFile(req: IncomingMessage, res: ServerResponse, pathname: string, projects?: ProjectsProvider): Promise<void>;
|
|
28
32
|
/** Serve one file of a module that is the computer's: as {@link serveModuleFile}, with no project to be registered. */
|
|
29
33
|
export declare function serveComputerModuleFile(req: IncomingMessage, res: ServerResponse, pathname: string): Promise<void>;
|
|
34
|
+
/** Serve one file of a module OpenAgent brings to projects, from its own copy: as {@link serveComputerModuleFile}. */
|
|
35
|
+
export declare function serveBroughtModuleFile(req: IncomingMessage, res: ServerResponse, pathname: string): Promise<void>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type LiveAgent, type AgentMeta, type AgentStatus } from '../store/index.js';
|
|
2
2
|
import type { ProjectSummary } from './projects.js';
|
|
3
3
|
import { type ProjectQueue } from './queue.js';
|
|
4
|
+
import type { MachineKind } from '../reached-by-line.js';
|
|
4
5
|
/** One project's in-flight run, surfaced in the Overview's "working now" list. */
|
|
5
6
|
export interface ActiveAgent {
|
|
6
7
|
projectId: string;
|
|
@@ -21,8 +22,14 @@ export interface ActiveAgent {
|
|
|
21
22
|
* cloud side is the agent, and "no agents working" over a waiting cloud session was a lie.
|
|
22
23
|
*/
|
|
23
24
|
cloud?: 'in-cloud' | 'waiting';
|
|
24
|
-
/**
|
|
25
|
-
|
|
25
|
+
/**
|
|
26
|
+
* The computer it runs on, only when that is not this one: the saved machine's name and kind for
|
|
27
|
+
* a run of one of the person's other computers, else the computer its record names (#1648).
|
|
28
|
+
*/
|
|
29
|
+
computer?: {
|
|
30
|
+
name: string;
|
|
31
|
+
kind?: MachineKind;
|
|
32
|
+
};
|
|
26
33
|
}
|
|
27
34
|
/** One recently active project, most-recent first. */
|
|
28
35
|
export interface RecentProject {
|
|
@@ -47,7 +54,8 @@ export interface RecentAgent {
|
|
|
47
54
|
}
|
|
48
55
|
/** Injectable reader so {@link buildRecentAgents} is unit-testable off disk. */
|
|
49
56
|
export interface RecentAgentsDeps {
|
|
50
|
-
|
|
57
|
+
/** A project's runs: off its folder for one of this computer's, as its computer says them for another's. */
|
|
58
|
+
agents?: (project: ProjectSummary) => Promise<AgentMeta[]>;
|
|
51
59
|
}
|
|
52
60
|
/**
|
|
53
61
|
* Every project's sessions pooled and sorted newest-first (capped), so the shared sidebar (#shared-
|
|
@@ -65,13 +73,20 @@ export interface OverviewDeps {
|
|
|
65
73
|
/** Whether the bridge holds a question for that cloud session (default: the daemon's bridge store). */
|
|
66
74
|
waiting?: (sessionId: string) => boolean;
|
|
67
75
|
now?: () => number;
|
|
76
|
+
/**
|
|
77
|
+
* The runs the person's other computers say they run of a project, each marked with the saved
|
|
78
|
+
* machine it is (`remoteLabel`): of a project this computer has too, and of one only they have.
|
|
79
|
+
*/
|
|
80
|
+
machineRuns?: (project: ProjectSummary) => Promise<AgentMeta[]>;
|
|
68
81
|
/** This machine's hostname; `node:os` in production. */
|
|
69
82
|
host?: string;
|
|
70
83
|
}
|
|
71
84
|
/**
|
|
72
85
|
* Build the cross-project Overview: the running agents (every live agent of each project, one per
|
|
73
|
-
* worktree since #736
|
|
74
|
-
*
|
|
86
|
+
* worktree since #736, and every run the person's other computers say is running), the total of
|
|
87
|
+
* open queue entries (from {@link collectQueue}), and the most recently active projects (by
|
|
88
|
+
* {@link ProjectSummary.lastActivityAt}). A project of another computer's ({@link ProjectSummary.machine})
|
|
89
|
+
* has no folder here: only what its computer says of its runs is read. Forgiving — a project
|
|
75
90
|
* with no live run, or none running, simply contributes nothing to `active`.
|
|
76
91
|
*/
|
|
77
92
|
export declare function buildOverview(projects: ProjectSummary[], deps?: OverviewDeps): Promise<Overview>;
|