@openagt/dashboard 0.11.0 → 0.13.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 +15 -6
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +25 -11
- package/dist/built-in.js.map +1 -1
- package/dist/clone-project.d.ts +69 -0
- package/dist/clone-project.d.ts.map +1 -0
- package/dist/clone-project.js +124 -0
- package/dist/clone-project.js.map +1 -0
- package/dist/daemon-runtime.d.ts +11 -1
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +56 -3
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon.js +1 -1
- package/dist/daemon.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 +24 -8
- package/dist/dashboard/module-serve.js.map +1 -1
- package/dist/dashboard/relay-endpoints.d.ts +8 -1
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
- package/dist/dashboard/relay-endpoints.js +48 -1
- package/dist/dashboard/relay-endpoints.js.map +1 -1
- package/dist/dashboard/remote-run.d.ts +31 -0
- package/dist/dashboard/remote-run.d.ts.map +1 -1
- package/dist/dashboard/remote-run.js +33 -0
- package/dist/dashboard/remote-run.js.map +1 -1
- package/dist/dashboard/rpc-serve.d.ts +9 -0
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js +15 -0
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/server.d.ts +5 -1
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +14 -5
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/types.d.ts +11 -3
- package/dist/dashboard/types.d.ts.map +1 -1
- package/dist/dashboard-bundle/assets/main-Co_A_Ebn.js +140 -0
- package/dist/dashboard-bundle/assets/main-DD99HRP9.css +2 -0
- package/dist/dashboard-bundle/assets/{module-DKd-4BTU.js → module-ZjyA5WUg.js} +2 -2
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +3 -3
- package/dist/dashboard-rpc/index.d.ts +3 -3
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +3 -3
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/machines.d.ts +17 -0
- package/dist/dashboard-rpc/machines.d.ts.map +1 -1
- package/dist/dashboard-rpc/machines.js +47 -2
- package/dist/dashboard-rpc/machines.js.map +1 -1
- package/dist/dashboard-rpc/modules.d.ts +11 -3
- package/dist/dashboard-rpc/modules.d.ts.map +1 -1
- package/dist/dashboard-rpc/modules.js +22 -3
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/projects.d.ts +16 -0
- package/dist/dashboard-rpc/projects.d.ts.map +1 -1
- package/dist/dashboard-rpc/projects.js +24 -3
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/module-types/dashboard/components/QrCode.d.ts +8 -0
- package/dist/module-types/dashboard/module/index.d.ts +11 -4
- package/dist/module-types/dashboard/rpc/modules.d.ts +1 -0
- package/dist/module-types/src/built-in.d.ts +15 -6
- package/dist/module-types/src/clone-project.d.ts +68 -0
- package/dist/module-types/src/dashboard/module-serve.d.ts +6 -0
- package/dist/module-types/src/dashboard/remote-run.d.ts +31 -0
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +9 -0
- package/dist/module-types/src/dashboard/types.d.ts +11 -3
- package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -3
- package/dist/module-types/src/dashboard-rpc/machines.d.ts +17 -0
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +11 -3
- package/dist/module-types/src/dashboard-rpc/projects.d.ts +16 -0
- package/dist/module-types/src/pick-directory.d.ts +2 -0
- package/dist/module-types/src/project-modules.d.ts +12 -3
- package/dist/module-types/src/repository-address.d.ts +8 -0
- package/dist/pick-directory.d.ts +2 -0
- package/dist/pick-directory.d.ts.map +1 -1
- package/dist/pick-directory.js +7 -1
- package/dist/pick-directory.js.map +1 -1
- package/dist/project-modules.d.ts +12 -3
- package/dist/project-modules.d.ts.map +1 -1
- package/dist/project-modules.js +20 -2
- package/dist/project-modules.js.map +1 -1
- package/dist/repository-address.d.ts +8 -0
- package/dist/repository-address.d.ts.map +1 -1
- package/dist/repository-address.js +14 -2
- package/dist/repository-address.js.map +1 -1
- package/package.json +12 -11
- package/dist/dashboard-bundle/assets/main-9Xb8Ao4p.css +0 -2
- package/dist/dashboard-bundle/assets/main-DTyyQ0jM.js +0 -140
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{$ as e,B as t,C as n,D as r,E as i,F as a,H as o,Ht as s,J as c,Jt as l,K as u,Kt as d,L as f,O as p,R as m,S as h,T as g,U as _,Ut as v,V as y,W as b,Wt as x,Y as S,Z as C,Zt as w,_ as T,a as E,an as D,b as O,c as k,fn as A,g as j,h as M,i as N,in as P,it as F,j as I,l as L,n as R,o as z,q as B,r as V,rn as H,rt as U,s as W,t as G,v as K,w as q,x as J,y as Y}from"../assets/module-ZjyA5WUg.js";export{w as Badge,H as Button,n as Card,q as CardContent,g as CardHeader,i as CardTitle,r as Checkbox,j as DiffStat,B as DropdownMenu,c as DropdownMenuCheckboxItem,S as DropdownMenuContent,C as DropdownMenuItem,e as DropdownMenuSeparator,U as DropdownMenuTrigger,o as Input,L as LinkActions,A as MAX_SPEND_OFFSET,p as Markdown,G as ModuleHostContext,Y as Popover,O as PopoverContent,J as PopoverTrigger,T as PreviewCard,E as QrCode,K as RangeSlider,F as ScrollArea,y as Separator,z as SettingsRow,W as SettingsSection,k as SettingsSelectRow,t as Skeleton,M as StartAgentButton,h as Switch,_ as Tooltip,b as TooltipContent,u as TooltipTrigger,P as buttonVariants,D as cn,R as defineModule,a as forgetRemembered,v as formatAge,x as formatDateTime,d as formatDuration,l as formatRelative,V as moduleHost,s as useAction,I as useCodingAgents,f as useLoaded,N as useModuleHost,m as usePolled};
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"@openagt/dashboard/module": "/host/module.js"
|
|
28
28
|
}
|
|
29
29
|
}</script>
|
|
30
|
-
<script type="module" crossorigin src="/assets/main-
|
|
30
|
+
<script type="module" crossorigin src="/assets/main-Co_A_Ebn.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-QTnfLwEv.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="/assets/react-CZI7_Jkm.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="/assets/react-dom-cJyBB_A4.js">
|
|
34
34
|
<link rel="modulepreload" crossorigin href="/assets/client-CbBRB9m4.js">
|
|
35
35
|
<link rel="modulepreload" crossorigin href="/assets/jsx-runtime-By8HlURe.js">
|
|
36
|
-
<link rel="modulepreload" crossorigin href="/assets/module-
|
|
37
|
-
<link rel="stylesheet" crossorigin href="/assets/main-
|
|
36
|
+
<link rel="modulepreload" crossorigin href="/assets/module-ZjyA5WUg.js">
|
|
37
|
+
<link rel="stylesheet" crossorigin href="/assets/main-DD99HRP9.css">
|
|
38
38
|
</head>
|
|
39
39
|
<body>
|
|
40
40
|
<div id="root"></div>
|
|
@@ -1,13 +1,13 @@
|
|
|
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, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck, type ProjectLauncher } from './projects.js';
|
|
4
|
+
export { onProjects, sendAddProject, 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';
|
|
8
8
|
export { onModels } from './models.js';
|
|
9
|
-
export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions, type Machine, type AddMachineResult, type MachineVersions } from './machines.js';
|
|
10
|
-
export { onModules, runModuleCommand, readModule, type DashboardModule, type ModuleCommandResult, type ModuleReadResult } from './modules.js';
|
|
9
|
+
export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions, sendProjectToMachine, onProjectOnMachine, type Machine, type AddMachineResult, type MachineVersions, type ProjectOnMachine } from './machines.js';
|
|
10
|
+
export { onModules, runModuleCommand, runComputerCommand, readModule, type DashboardModule, type ModuleCommandResult, type ModuleReadResult } from './modules.js';
|
|
11
11
|
export { onProjectSkills, sendChangeSkills, sendCommitSkills, type ProjectSkills, type ProjectSkill, type ChangeSkillsResult } from './skills.js';
|
|
12
12
|
import { streamAgentEvents } from './events.js';
|
|
13
13
|
/** One RPC: called with whatever the browser sent, answering with whatever JSON.stringify keeps. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/index.ts"],"names":[],"mappings":"AAIA,OA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jK,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAWjJ,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,oGAAoG;AACpG,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,EAAE,KAAK,EAAE,KAAK,OAAO,CAAA;AAEtD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAOnD,CAAA;AAED,8FAA8F;AAC9F,eAAO,MAAM,gBAAgB,0BAAoB,CAAA"}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
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';
|
|
6
6
|
export { sendStop, sendChoice, sendBridgeAnswer, sendBridgeAnswerCancel, sendBridgeBrowser, sendMessage, sendStart, sendOpenInApp, sendRemoveWorktree, sendDeleteAgent, sendOpenPullRequest, sendPush, sendMergeBranch, sendMerge, sendCreateRepository } from './control.js';
|
|
7
7
|
export { streamAgentEvents } from './events.js';
|
|
8
|
-
export { onProjects, sendAddProject, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck } from './projects.js';
|
|
8
|
+
export { onProjects, sendAddProject, onCloneTarget, sendAddProjectFromAddress, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck } from './projects.js';
|
|
9
9
|
export { onPreferences, savePreferences, patchPreferences, onProjectPresets, saveProjectPresets, onEditors, } from './preferences.js';
|
|
10
10
|
export { onQuota } from './quota.js';
|
|
11
11
|
export { onModels } from './models.js';
|
|
12
|
-
export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions } from './machines.js';
|
|
13
|
-
export { onModules, runModuleCommand, readModule } from './modules.js';
|
|
12
|
+
export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions, sendProjectToMachine, onProjectOnMachine } from './machines.js';
|
|
13
|
+
export { onModules, runModuleCommand, runComputerCommand, readModule } from './modules.js';
|
|
14
14
|
export { onProjectSkills, sendChangeSkills, sendCommitSkills } from './skills.js';
|
|
15
15
|
import * as reads from './reads.js';
|
|
16
16
|
import * as control from './control.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/dashboard-rpc/index.ts"],"names":[],"mappings":"AAAA,+FAA+F;AAC/F,+FAA+F;AAC/F,+FAA+F;AAC/F,oDAAoD;AACpD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,UAAU,EAAE,WAAW,EAAE,aAAa,EAAE,iBAAiB,EAAE,WAAW,EAAE,cAAc,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AAC5X,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AAC7Q,OAAO,EAAE,iBAAiB,EAA4D,MAAM,aAAa,CAAA;AACzG,OAAO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AC,CAAC,KAAK,UAAU,CAAC,CACpF,CACF,CAAA;AAED,8FAA8F;AAC9F,MAAM,CAAC,MAAM,gBAAgB,GAAG,iBAAiB,CAAA"}
|
|
@@ -49,4 +49,21 @@ export interface MachineVersions {
|
|
|
49
49
|
* that a machine fell behind this computer. One short call to each, with this computer's key.
|
|
50
50
|
*/
|
|
51
51
|
export declare function onMachineVersions(): Promise<MachineVersions>;
|
|
52
|
+
/** Whether a saved machine has a project of this computer's: `there` is false while the machine clones it. */
|
|
53
|
+
export type ProjectOnMachine = {
|
|
54
|
+
ok: true;
|
|
55
|
+
there: boolean;
|
|
56
|
+
} | {
|
|
57
|
+
ok: false;
|
|
58
|
+
error: string;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Have a saved machine clone a project of this computer's that it does not have, from the
|
|
62
|
+
* project's repository address and with the machine's own logins: what a run sent there waits
|
|
63
|
+
* for, the first time. The machine clones on its own; {@link onProjectOnMachine} says when the
|
|
64
|
+
* project is there. Nothing happens on a machine that has it, or is cloning it already.
|
|
65
|
+
*/
|
|
66
|
+
export declare function sendProjectToMachine(projectId: string, machineId: string): Promise<ProjectOnMachine>;
|
|
67
|
+
/** Whether a saved machine has the project by now, or why it will not: asked while the machine clones it. */
|
|
68
|
+
export declare function onProjectOnMachine(projectId: string, machineId: string): Promise<ProjectOnMachine>;
|
|
52
69
|
//# sourceMappingURL=machines.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machines.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/machines.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"machines.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/machines.ts"],"names":[],"mappings":"AAgBA,sDAAsD;AACtD,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,MAAM,CAAA;CACZ;AAED,MAAM,MAAM,gBAAgB,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AAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAE1G;AAED,6GAA6G;AAC7G,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAExG"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { hostname } from 'node:os';
|
|
2
|
-
import {
|
|
2
|
+
import { basename } from 'node:path';
|
|
3
|
+
import { readSharing } from '@openagt/agent-data';
|
|
4
|
+
import { enterRemote, leaveRemote, pingRemote, remoteProject, remoteVersion } from '../dashboard/remote-run.js';
|
|
3
5
|
import { errorMessage } from '../error-message.js';
|
|
4
|
-
import {
|
|
6
|
+
import { repositoryAddress, repositorySpelling } from '../repository-address.js';
|
|
7
|
+
import { contextRemote, resolveProjectPath } from './context.js';
|
|
5
8
|
import { addMachine, listMachines, removeMachine } from '../registry.js';
|
|
6
9
|
import { parseMachineLink } from '../machine-link.js';
|
|
7
10
|
import { openagentVersion } from '../version.js';
|
|
@@ -79,4 +82,46 @@ export async function onMachineVersions() {
|
|
|
79
82
|
}));
|
|
80
83
|
return { version: openagentVersion(), machines };
|
|
81
84
|
}
|
|
85
|
+
/**
|
|
86
|
+
* Have a saved machine clone a project of this computer's that it does not have, from the
|
|
87
|
+
* project's repository address and with the machine's own logins: what a run sent there waits
|
|
88
|
+
* for, the first time. The machine clones on its own; {@link onProjectOnMachine} says when the
|
|
89
|
+
* project is there. Nothing happens on a machine that has it, or is cloning it already.
|
|
90
|
+
*/
|
|
91
|
+
export async function sendProjectToMachine(projectId, machineId) {
|
|
92
|
+
return projectOnMachine(projectId, machineId, true);
|
|
93
|
+
}
|
|
94
|
+
/** Whether a saved machine has the project by now, or why it will not: asked while the machine clones it. */
|
|
95
|
+
export async function onProjectOnMachine(projectId, machineId) {
|
|
96
|
+
return projectOnMachine(projectId, machineId, false);
|
|
97
|
+
}
|
|
98
|
+
async function projectOnMachine(projectId, machineId, bring) {
|
|
99
|
+
const machine = (await listMachines()).find(saved => saved.id === machineId);
|
|
100
|
+
if (!machine)
|
|
101
|
+
return { ok: false, error: 'That machine is no longer saved. Pick another place to run.' };
|
|
102
|
+
const cwd = typeof projectId === 'string' ? await resolveProjectPath(projectId) : undefined;
|
|
103
|
+
if (!cwd)
|
|
104
|
+
return { ok: false, error: `unknown project: ${String(projectId)}` };
|
|
105
|
+
const project = await repositoryAddress(cwd);
|
|
106
|
+
if (!project)
|
|
107
|
+
return { ok: false, error: 'This project has no repository address, so it cannot be sent to another machine.' };
|
|
108
|
+
const target = { url: machine.url, key: machine.key, ...(machine.pin ? { pin: machine.pin } : {}), project };
|
|
109
|
+
const from = bring ? await repositorySpelling(cwd) : undefined;
|
|
110
|
+
const said = await remoteProject(target, bring ? { share: await readSharing(cwd), ...(from !== undefined ? { from } : {}) } : undefined);
|
|
111
|
+
const name = basename(cwd);
|
|
112
|
+
switch (said.state) {
|
|
113
|
+
case 'there':
|
|
114
|
+
return { ok: true, there: true };
|
|
115
|
+
case 'coming':
|
|
116
|
+
return { ok: true, there: false };
|
|
117
|
+
case 'missing':
|
|
118
|
+
// The machine was restarted while it cloned: what it had made is gone, and a new send starts over.
|
|
119
|
+
return { ok: false, error: `${machine.label} is no longer cloning ${name}. Send again.` };
|
|
120
|
+
case 'failed':
|
|
121
|
+
// The machine's own words: "this computer" in them is the machine.
|
|
122
|
+
return { ok: false, error: `${name} could not be cloned on ${machine.label}. ${machine.label} says: ${said.error}` };
|
|
123
|
+
case 'unasked':
|
|
124
|
+
return { ok: false, error: `${machine.label} could not be asked for ${name}: ${said.error}` };
|
|
125
|
+
}
|
|
126
|
+
}
|
|
82
127
|
//# sourceMappingURL=machines.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machines.js","sourceRoot":"","sources":["../../src/dashboard-rpc/machines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA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E,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAA;IACxI,MAAM,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC1B,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAC;QACnB,KAAK,OAAO;YACV,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;QAClC,KAAK,QAAQ;YACX,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAA;QACnC,KAAK,SAAS;YACZ,mGAAmG;YACnG,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,yBAAyB,IAAI,eAAe,EAAE,CAAA;QAC3F,KAAK,QAAQ;YACX,mEAAmE;YACnE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,IAAI,2BAA2B,OAAO,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,UAAU,IAAI,CAAC,KAAK,EAAE,EAAE,CAAA;QACtH,KAAK,SAAS;YACZ,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,2BAA2B,IAAI,KAAK,IAAI,CAAC,KAAK,EAAE,EAAE,CAAA;IACjG,CAAC;AACH,CAAC"}
|
|
@@ -6,13 +6,14 @@ export type { ModuleReadResult } from '../dashboard/module-host.js';
|
|
|
6
6
|
export interface DashboardModule {
|
|
7
7
|
/** The package that brings it. */
|
|
8
8
|
package: string;
|
|
9
|
-
/** The URL of its browser module, served from the first project that has it. */
|
|
9
|
+
/** The URL of its browser module, served from the first project that has it, or from OpenAgent's own copy for one of the computer's. */
|
|
10
10
|
url: string;
|
|
11
|
-
/** The registered projects whose packages include it, in the registry's order. */
|
|
11
|
+
/** The registered projects whose packages include it, in the registry's order; none for one of the computer's, whose commands run in no project. */
|
|
12
12
|
projects: string[];
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Every module
|
|
15
|
+
* Every module the dashboard loads (#1774), one per package. First the computer's, which are
|
|
16
|
+
* there with no project added. Then every module any registered project brings, with the projects
|
|
16
17
|
* that have it: with no project picked the sidebar and the pages are every project's, and the
|
|
17
18
|
* dashboard narrows them itself to a picked project's. A package several projects install is loaded once, from
|
|
18
19
|
* the first of them in the registry's order; its page then reads each project through that
|
|
@@ -34,6 +35,13 @@ export declare function onModules(): Promise<DashboardModule[]>;
|
|
|
34
35
|
* write only at the next sync.
|
|
35
36
|
*/
|
|
36
37
|
export declare function runModuleCommand(projectId: string, pkg: string, args: string[], command?: string, acts?: boolean): Promise<ModuleCommandResult>;
|
|
38
|
+
/**
|
|
39
|
+
* Run one of the commands of a package that is this computer's, in no project, and answer its
|
|
40
|
+
* JSON output: how the door's page and the servers' page read and change what they keep, which is
|
|
41
|
+
* in the person's home folder, where the command runs. Refused for any other package: a project's
|
|
42
|
+
* module runs its commands in its project ({@link runModuleCommand}).
|
|
43
|
+
*/
|
|
44
|
+
export declare function runComputerCommand(pkg: string, args: string[], command?: string): Promise<ModuleCommandResult>;
|
|
37
45
|
/**
|
|
38
46
|
* Call read `name` of a module's server part in one project: how a module's browser part reads
|
|
39
47
|
* what a command cannot answer fast enough. Refused for an unknown project, a package that is not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/modules.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/modules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkH,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAGhL,OAAO,EAA8B,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAI/F,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAChE,YAAY,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAA;AAEnE,6FAA6F;AAC7F,MAAM,WAAW,eAAe;IAC9B,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,wIAAwI;IACxI,GAAG,EAAE,MAAM,CAAA;IACX,oJAAoJ;IACpJ,QAAQ,EAAE,MAAM,EAAE,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAsB,SAAS,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC,CAc5D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,gBAAgB,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,UAAQ,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAUnJ;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAKpH;AAED;;;;;;GAMG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAUxH"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { homedir } from 'node:os';
|
|
1
2
|
import { contextProjects, resolveProjectPath } from './context.js';
|
|
2
|
-
import { findProjectModule, readProjectModules, runModuleCommand as runCommand } from '../project-modules.js';
|
|
3
|
-
import { moduleUrl } from '../dashboard/module-serve.js';
|
|
3
|
+
import { findComputerModule, findProjectModule, readComputerModules, readProjectModules, runModuleCommand as runCommand } from '../project-modules.js';
|
|
4
|
+
import { computerModuleUrl, moduleUrl } from '../dashboard/module-serve.js';
|
|
4
5
|
import { providedDataChanged } from '../store/provided.js';
|
|
5
6
|
import { callModuleRead, serverHost } from '../dashboard/module-host.js';
|
|
6
7
|
import { relayOr } from './relay-agent.js';
|
|
7
8
|
import { DATA_BRANCH, pullFileBranch } from '@openagt/agent-data';
|
|
8
9
|
/**
|
|
9
|
-
* Every module
|
|
10
|
+
* Every module the dashboard loads (#1774), one per package. First the computer's, which are
|
|
11
|
+
* there with no project added. Then every module any registered project brings, with the projects
|
|
10
12
|
* that have it: with no project picked the sidebar and the pages are every project's, and the
|
|
11
13
|
* dashboard narrows them itself to a picked project's. A package several projects install is loaded once, from
|
|
12
14
|
* the first of them in the registry's order; its page then reads each project through that
|
|
@@ -14,6 +16,9 @@ import { DATA_BRANCH, pullFileBranch } from '@openagt/agent-data';
|
|
|
14
16
|
*/
|
|
15
17
|
export async function onModules() {
|
|
16
18
|
const byPackage = new Map();
|
|
19
|
+
for (const module of await readComputerModules().catch(() => [])) {
|
|
20
|
+
byPackage.set(module.package, { package: module.package, url: computerModuleUrl(module), projects: [] });
|
|
21
|
+
}
|
|
17
22
|
for (const project of await contextProjects().list()) {
|
|
18
23
|
const modules = await readProjectModules(project.path).catch(() => []);
|
|
19
24
|
for (const module of modules) {
|
|
@@ -55,6 +60,20 @@ export async function runModuleCommand(projectId, pkg, args, command, acts = fal
|
|
|
55
60
|
providedDataChanged(root);
|
|
56
61
|
return result;
|
|
57
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* Run one of the commands of a package that is this computer's, in no project, and answer its
|
|
65
|
+
* JSON output: how the door's page and the servers' page read and change what they keep, which is
|
|
66
|
+
* in the person's home folder, where the command runs. Refused for any other package: a project's
|
|
67
|
+
* module runs its commands in its project ({@link runModuleCommand}).
|
|
68
|
+
*/
|
|
69
|
+
export async function runComputerCommand(pkg, args, command) {
|
|
70
|
+
if (!Array.isArray(args))
|
|
71
|
+
return { ok: false, error: 'arguments must be a list' };
|
|
72
|
+
const module = await findComputerModule(pkg);
|
|
73
|
+
if (!module)
|
|
74
|
+
return { ok: false, error: `${pkg} is not this computer's` };
|
|
75
|
+
return runCommand(homedir(), module, args, command);
|
|
76
|
+
}
|
|
58
77
|
/**
|
|
59
78
|
* Call read `name` of a module's server part in one project: how a module's browser part reads
|
|
60
79
|
* what a command cannot answer fast enough. Refused for an unknown project, a package that is not
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/dashboard-rpc/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,gBAAgB,IAAI,UAAU,EAA4B,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../../src/dashboard-rpc/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AAClE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,gBAAgB,IAAI,UAAU,EAA4B,MAAM,uBAAuB,CAAA;AAChL,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAyB,MAAM,6BAA6B,CAAA;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAejE;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,M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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
|
+
/** 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
|
+
export declare function onCloneTarget(address: string): Promise<{
|
|
20
|
+
ok: true;
|
|
21
|
+
address: string;
|
|
22
|
+
path: string;
|
|
23
|
+
} | {
|
|
24
|
+
ok: false;
|
|
25
|
+
error: string;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Add a project by its repository's address, for a computer that does not have its folder: the
|
|
29
|
+
* repository is cloned into `~/projects/<its name>` with the logins this computer has, and the
|
|
30
|
+
* folder is then added as {@link sendAddProject} adds one. A folder already there with this
|
|
31
|
+
* repository in it is added as it is. The answer says where the project is.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sendAddProjectFromAddress(address: string, share: boolean): Promise<AddProjectResult>;
|
|
18
34
|
/**
|
|
19
35
|
* Remove a project from the dashboard: it leaves the Projects list. Nothing in its folder is
|
|
20
36
|
* deleted unless `files` is true: then what OpenAgent left there is removed too, and the answer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAA+E,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACnI,OAAO,EAAsD,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/dashboard-rpc/projects.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAA+E,KAAK,WAAW,EAAE,MAAM,q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IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAU3H;AAED;;;;;GAKG;AACH,wBAAsB,wBAAwB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAE7E;AAED;;;GAGG;AACH,wBAAsB,YAAY,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAKlE;AAED,0GAA0G;AAC1G,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,cAAc,EAAE,CAAA;IAC1B,iGAAiG;IACjG,SAAS,EAAE,OAAO,CAAA;IAClB,qJAAqJ;IACrJ,OAAO,EAAE,OAAO,CAAA;IAChB,8IAA8I;IAC9I,MAAM,EAAE,OAAO,CAAA;IACf,sJAAsJ;IACtJ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB;;;;;OAKG;IACH,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;CAC5C;AAED;;;GAGG;AACH,wBAAsB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAanF;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAMrG"}
|
|
@@ -6,7 +6,9 @@ import { hasRemote } from '../has-remote.js';
|
|
|
6
6
|
import { repositoryAddress } from '../repository-address.js';
|
|
7
7
|
import { currentBranch } from '../dashboard/git-status.js';
|
|
8
8
|
import { waitingSkills } from '../dashboard/start-branch.js';
|
|
9
|
-
import {
|
|
9
|
+
import { homedir } from 'node:os';
|
|
10
|
+
import { cloneProject, cloneTargetOf } from '../clone-project.js';
|
|
11
|
+
import { canPickDirectory, pickDirectory } from '../pick-directory.js';
|
|
10
12
|
import { projectGitHost } from '../store/git-host.js';
|
|
11
13
|
// The Projects sidebar behind the new dashboard (#405): the global registry (#390) the
|
|
12
14
|
// daemon and CLI write — id, path, name, activated, last activity. The per-agent
|
|
@@ -42,6 +44,24 @@ export async function sendAddProject(path, share) {
|
|
|
42
44
|
return { ok: false, error: 'a project path is required' };
|
|
43
45
|
return addProject(trimmed, share === true);
|
|
44
46
|
}
|
|
47
|
+
/** 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. */
|
|
48
|
+
export async function onCloneTarget(address) {
|
|
49
|
+
return cloneTargetOf(typeof address === 'string' ? address : '');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Add a project by its repository's address, for a computer that does not have its folder: the
|
|
53
|
+
* repository is cloned into `~/projects/<its name>` with the logins this computer has, and the
|
|
54
|
+
* folder is then added as {@link sendAddProject} adds one. A folder already there with this
|
|
55
|
+
* repository in it is added as it is. The answer says where the project is.
|
|
56
|
+
*/
|
|
57
|
+
export async function sendAddProjectFromAddress(address, share) {
|
|
58
|
+
const addProject = contextAddProject();
|
|
59
|
+
const cloned = await cloneProject(typeof address === 'string' ? address : '');
|
|
60
|
+
if (!cloned.ok)
|
|
61
|
+
return cloned;
|
|
62
|
+
const added = await addProject(cloned.path, share === true);
|
|
63
|
+
return added.ok ? { ...added, path: cloned.path } : added;
|
|
64
|
+
}
|
|
45
65
|
/**
|
|
46
66
|
* Remove a project from the dashboard: it leaves the Projects list. Nothing in its folder is
|
|
47
67
|
* deleted unless `files` is true: then what OpenAgent left there is removed too, and the answer
|
|
@@ -95,9 +115,10 @@ export async function sendPickProjectDirectory() {
|
|
|
95
115
|
* so the first step can offer "Add {cwd} as project" without the user typing a path.
|
|
96
116
|
*/
|
|
97
117
|
export async function onOnboarding() {
|
|
98
|
-
|
|
118
|
+
// A service runs in its user's home folder, as OpenAgent does on a server: no project to offer.
|
|
119
|
+
const cwd = process.cwd() === homedir() ? null : process.cwd();
|
|
99
120
|
const registered = await contextProjects().list();
|
|
100
|
-
return { cwd, cwdProjectId: registered.find(p => p.path === cwd)?.id
|
|
121
|
+
return { cwd, cwdProjectId: (cwd !== null && registered.find(p => p.path === cwd)?.id) || null, canPickFolder: canPickDirectory() };
|
|
101
122
|
}
|
|
102
123
|
/**
|
|
103
124
|
* The project's commands (#1774), read off its skills folders, whether it has a start hook, whether
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/dashboard-rpc/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjI,OAAO,EAAE,mBAAmB,EAAuB,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAAA;AACnI,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,kBAAkB,EAAuB,MAAM,qBAAqB,CAAA;AAE7G,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,aAAa,EAA4B,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/dashboard-rpc/projects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjI,OAAO,EAAE,mBAAmB,EAAuB,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,YAAY,EAAoB,MAAM,qBAAqB,CAA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AE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;AACjL,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,SAAiB,EAAE,MAAe;IACnE,MAAM,GAAG,GAAG,MAAM,kBAAkB,CAAC,SAAS,CAAC,CAAA;IAC/C,IAAI,CAAC,GAAG;QAAE,OAAO,IAAI,CAAA;IACrB,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAA;IAC/E,IAAI,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAA;IACjF,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAA;AAC5E,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A link as a QR code. Always dark on white, whatever the page's theme: a phone's camera reads
|
|
3
|
+
* the contrast, not the colours of the page around it.
|
|
4
|
+
*/
|
|
5
|
+
export declare function QrCode({ text, label }: {
|
|
6
|
+
text: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
@@ -104,13 +104,13 @@ export interface ModuleCard {
|
|
|
104
104
|
}
|
|
105
105
|
/** What a Settings section is rendered with: the projects that have its package. */
|
|
106
106
|
export interface ModuleSettingsProps {
|
|
107
|
-
/** The registered projects whose dependencies include the module's package, in the registry's order. */
|
|
107
|
+
/** The registered projects whose dependencies include the module's package, in the registry's order; none for a package that is the computer's. */
|
|
108
108
|
projects: ModuleProject[];
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* A section a module adds to the Settings page: the package's own settings, read and written
|
|
112
|
-
* through its own command, drawn after the dashboard's own sections. A package with no
|
|
113
|
-
* registered shows none.
|
|
112
|
+
* through its own command, drawn after the dashboard's own sections. A project's package with no
|
|
113
|
+
* project registered shows none; a package that is the computer's shows its own with no project.
|
|
114
114
|
*/
|
|
115
115
|
export interface ModuleSettings {
|
|
116
116
|
/** Which section this is, for the shell's key and its error line; the section draws its own title. */
|
|
@@ -273,6 +273,12 @@ export interface ModuleHost {
|
|
|
273
273
|
* change shows at once instead of at the next sync. A link action's host runs every command so.
|
|
274
274
|
*/
|
|
275
275
|
act(projectId: string, args: string[], command?: string): Promise<ModuleCommandResult>;
|
|
276
|
+
/**
|
|
277
|
+
* Run one of the module package's own commands in no project, for a package that is this
|
|
278
|
+
* computer's (the door to it, its servers): what such a package keeps is the computer's, so
|
|
279
|
+
* its page reads and changes it with no project added. Refused for any other package.
|
|
280
|
+
*/
|
|
281
|
+
runComputerCommand(args: string[], command?: string): Promise<ModuleCommandResult>;
|
|
276
282
|
/**
|
|
277
283
|
* Call one of the module's own server reads (its package's `./server`) in one project, with
|
|
278
284
|
* `input`, a JSON object; `input.agentId` names the run the read is about, when it is about one.
|
|
@@ -337,7 +343,7 @@ export type MachineAdded = {
|
|
|
337
343
|
error: string;
|
|
338
344
|
};
|
|
339
345
|
/** What the dashboard knows about the module it is serving: every service but the commands and the reads, which it binds to the package. */
|
|
340
|
-
export type ModuleHostBase = Omit<ModuleHost, 'runCommand' | 'act' | 'read'>;
|
|
346
|
+
export type ModuleHostBase = Omit<ModuleHost, 'runCommand' | 'act' | 'runComputerCommand' | 'read'>;
|
|
341
347
|
/**
|
|
342
348
|
* The host for one module: the dashboard's services, and its commands bound to the module's own
|
|
343
349
|
* package. `acts` marks every command as an action on the project rather than a page's read: the
|
|
@@ -374,6 +380,7 @@ export { StartAgentButton } from '../components/StartAgentButton.js';
|
|
|
374
380
|
export { LinkActions, type ProjectLinks, type LinkTargets } from '../components/LinkActions.js';
|
|
375
381
|
export { cn } from '../lib/utils.js';
|
|
376
382
|
export { SettingsSection, SettingsRow, SettingsSelectRow, type SettingsOption } from '../components/SettingsRows.js';
|
|
383
|
+
export { QrCode } from '../components/QrCode.js';
|
|
377
384
|
export { useCodingAgents, type CodingAgent } from '../lib/models.js';
|
|
378
385
|
export { MAX_SPEND_OFFSET } from '../../src/preference-defaults.js';
|
|
379
386
|
export { formatRelative, formatDateTime, formatDuration, formatAge } from '../lib/format-date.js';
|
|
@@ -2,4 +2,5 @@ import type * as impl from '../../src/dashboard-rpc/modules.js';
|
|
|
2
2
|
export type * from '../../src/dashboard-rpc/modules.js';
|
|
3
3
|
export declare const onModules: () => Promise<impl.DashboardModule[]>;
|
|
4
4
|
export declare const runModuleCommand: (projectId: string, pkg: string, args: string[], command?: string | undefined, acts?: boolean | undefined) => Promise<import("@openagt/agent-data").PackageCommandResult>;
|
|
5
|
+
export declare const runComputerCommand: (pkg: string, args: string[], command?: string | undefined) => Promise<import("@openagt/agent-data").PackageCommandResult>;
|
|
5
6
|
export declare const readModule: (projectId: string, pkg: string, name: string, input: unknown) => Promise<impl.ModuleReadResult>;
|
|
@@ -5,12 +5,18 @@ import { type ProjectPackage, type ProvidedCommand, type ProvidedCommandLookup }
|
|
|
5
5
|
* own install, so a project installs nothing for them and an empty folder starts an agent and
|
|
6
6
|
* shows it. Each comes through the same contract as any package: a module by its `./dashboard`
|
|
7
7
|
* export, a provider of a kind of data and the writer of its hook lines by its `openagent` key.
|
|
8
|
-
* These
|
|
8
|
+
* These three lists are the one place OpenAgent names a package. One of these names among a
|
|
9
9
|
* project's own dependencies is not read: OpenAgent's copy, and the rules below for which
|
|
10
10
|
* project has it, are the only ones.
|
|
11
11
|
*/
|
|
12
|
-
/** The packages every project has: an agent cannot start, be shown or be put on a git host without them
|
|
12
|
+
/** The packages every project has: an agent cannot start, be shown or be put on a git host without them. */
|
|
13
13
|
export declare const BUILT_IN_PACKAGES: readonly string[];
|
|
14
|
+
/**
|
|
15
|
+
* The packages that are this computer's and no project's: the door to it, and the servers it
|
|
16
|
+
* installed OpenAgent on. Their pages show and their commands run with no project added, and
|
|
17
|
+
* what one keeps is in the person's home folder.
|
|
18
|
+
*/
|
|
19
|
+
export declare const COMPUTER_PACKAGES: readonly string[];
|
|
14
20
|
/**
|
|
15
21
|
* The packages a project has once it picked them (#2023). A skill's package is the project's
|
|
16
22
|
* when the project holds the skill's text where the coding agents read it
|
|
@@ -27,16 +33,19 @@ export declare function builtInPackages(): Promise<ProjectPackage[]>;
|
|
|
27
33
|
/**
|
|
28
34
|
* The packages OpenAgent brings to the project at `root`: the ones every project has, and
|
|
29
35
|
* each picked one the project has by its rule (see {@link PICKED_PACKAGES}). Read off the
|
|
30
|
-
* project's files each time, so a skill written or deleted a moment ago counts at once.
|
|
36
|
+
* project's files each time, so a skill written or deleted a moment ago counts at once. None of
|
|
37
|
+
* the computer's: no project has those.
|
|
31
38
|
*/
|
|
32
39
|
export declare function builtInPackagesOf(root: string): Promise<ProjectPackage[]>;
|
|
33
40
|
/** The project's own installed packages, less the names OpenAgent brings itself. */
|
|
34
41
|
export declare function ownPackages(root: string): Promise<ProjectPackage[]>;
|
|
42
|
+
/** The packages that are this computer's: see {@link COMPUTER_PACKAGES}. */
|
|
43
|
+
export declare function computerPackages(): Promise<ProjectPackage[]>;
|
|
35
44
|
/**
|
|
36
|
-
* The services of the packages
|
|
45
|
+
* The services of the computer's packages: a package declares
|
|
37
46
|
* `"openagent": { "service": "<command>" }`, and `<command> serve` runs for as long as OpenAgent
|
|
38
|
-
* runs (`package-services.ts`). Only those packages: a service is this computer's, and
|
|
39
|
-
*
|
|
47
|
+
* runs (`package-services.ts`). Only those packages: a service is this computer's, and any
|
|
48
|
+
* other package is a project's.
|
|
40
49
|
*/
|
|
41
50
|
export declare function builtInServices(): Promise<ProvidedCommand[]>;
|
|
42
51
|
/** The directories the commands of OpenAgent's packages sit in: what a hook line's PATH gains after the project's own installed tools. */
|