@openagt/dashboard 0.33.1 → 0.35.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.
Files changed (130) hide show
  1. package/dist/built-in.d.ts.map +1 -1
  2. package/dist/built-in.js +1 -1
  3. package/dist/built-in.js.map +1 -1
  4. package/dist/daemon.d.ts.map +1 -1
  5. package/dist/daemon.js +3 -0
  6. package/dist/daemon.js.map +1 -1
  7. package/dist/dashboard/copy-logins.js +5 -5
  8. package/dist/dashboard/copy-logins.js.map +1 -1
  9. package/dist/dashboard/git-hosts.d.ts +38 -0
  10. package/dist/dashboard/git-hosts.d.ts.map +1 -0
  11. package/dist/dashboard/git-hosts.js +53 -0
  12. package/dist/dashboard/git-hosts.js.map +1 -0
  13. package/dist/dashboard/machine-logins.d.ts +2 -2
  14. package/dist/dashboard/machine-logins.js +2 -2
  15. package/dist/dashboard/person.d.ts +1 -1
  16. package/dist/dashboard/person.js +1 -1
  17. package/dist/dashboard/relay-endpoints.d.ts +4 -3
  18. package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
  19. package/dist/dashboard/relay-endpoints.js +13 -5
  20. package/dist/dashboard/relay-endpoints.js.map +1 -1
  21. package/dist/dashboard/remote-run.d.ts +16 -4
  22. package/dist/dashboard/remote-run.d.ts.map +1 -1
  23. package/dist/dashboard/remote-run.js +41 -8
  24. package/dist/dashboard/remote-run.js.map +1 -1
  25. package/dist/dashboard/send-skills.js +1 -1
  26. package/dist/dashboard/send-skills.js.map +1 -1
  27. package/dist/dashboard/start-branch.js +1 -1
  28. package/dist/dashboard/start-branch.js.map +1 -1
  29. package/dist/dashboard-bundle/assets/main-DN0tccor.css +2 -0
  30. package/dist/dashboard-bundle/assets/main-DRAtR1K3.js +148 -0
  31. package/dist/dashboard-bundle/assets/module-BO3UMgK4.js +14 -0
  32. package/dist/dashboard-bundle/host/module.js +1 -1
  33. package/dist/dashboard-bundle/index.html +3 -3
  34. package/dist/dashboard-rpc/accounts.d.ts +82 -0
  35. package/dist/dashboard-rpc/accounts.d.ts.map +1 -0
  36. package/dist/dashboard-rpc/accounts.js +224 -0
  37. package/dist/dashboard-rpc/accounts.js.map +1 -0
  38. package/dist/dashboard-rpc/index.d.ts +3 -1
  39. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  40. package/dist/dashboard-rpc/index.js +6 -2
  41. package/dist/dashboard-rpc/index.js.map +1 -1
  42. package/dist/dashboard-rpc/logins.d.ts +98 -0
  43. package/dist/dashboard-rpc/logins.d.ts.map +1 -0
  44. package/dist/dashboard-rpc/logins.js +203 -0
  45. package/dist/dashboard-rpc/logins.js.map +1 -0
  46. package/dist/dashboard-rpc/machines.d.ts +24 -2
  47. package/dist/dashboard-rpc/machines.d.ts.map +1 -1
  48. package/dist/dashboard-rpc/machines.js +37 -7
  49. package/dist/dashboard-rpc/machines.js.map +1 -1
  50. package/dist/dashboard-rpc/projects.js +1 -1
  51. package/dist/dashboard-rpc/projects.js.map +1 -1
  52. package/dist/dashboard-rpc/skills.d.ts +3 -4
  53. package/dist/dashboard-rpc/skills.d.ts.map +1 -1
  54. package/dist/dashboard-rpc/skills.js +4 -1
  55. package/dist/dashboard-rpc/skills.js.map +1 -1
  56. package/dist/local-bin.d.ts +8 -0
  57. package/dist/local-bin.d.ts.map +1 -0
  58. package/dist/local-bin.js +16 -0
  59. package/dist/local-bin.js.map +1 -0
  60. package/dist/module-types/dashboard/components/Waiting.d.ts +10 -0
  61. package/dist/module-types/dashboard/lib/machines.d.ts +2 -0
  62. package/dist/module-types/dashboard/lib/settings-crumb.d.ts +15 -0
  63. package/dist/module-types/dashboard/lib/use-narrow.d.ts +3 -0
  64. package/dist/module-types/dashboard/module/index.d.ts +22 -7
  65. package/dist/module-types/dashboard/rpc/machines.d.ts +7 -0
  66. package/dist/module-types/src/dashboard/git-hosts.d.ts +37 -0
  67. package/dist/module-types/src/dashboard/machine-logins.d.ts +2 -2
  68. package/dist/module-types/src/dashboard/person.d.ts +1 -1
  69. package/dist/module-types/src/dashboard/remote-run.d.ts +16 -4
  70. package/dist/module-types/src/dashboard-rpc/accounts.d.ts +81 -0
  71. package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -1
  72. package/dist/module-types/src/dashboard-rpc/logins.d.ts +97 -0
  73. package/dist/module-types/src/dashboard-rpc/machines.d.ts +24 -2
  74. package/dist/module-types/src/dashboard-rpc/skills.d.ts +3 -4
  75. package/dist/module-types/src/project-hooks.d.ts +5 -0
  76. package/dist/module-types/src/project-skills/apply.d.ts +35 -0
  77. package/dist/module-types/src/project-skills/branch.d.ts +29 -0
  78. package/dist/module-types/src/project-skills/catalogue.d.ts +39 -0
  79. package/dist/module-types/src/project-skills/change.d.ts +29 -0
  80. package/dist/module-types/src/project-skills/commit.d.ts +16 -0
  81. package/dist/module-types/src/project-skills/project.d.ts +42 -0
  82. package/dist/module-types/src/project-skills/skill-file.d.ts +16 -0
  83. package/dist/module-types/src/registry.d.ts +15 -0
  84. package/dist/project-hooks.d.ts +5 -0
  85. package/dist/project-hooks.d.ts.map +1 -1
  86. package/dist/project-hooks.js +4 -1
  87. package/dist/project-hooks.js.map +1 -1
  88. package/dist/project-skills/apply.d.ts +36 -0
  89. package/dist/project-skills/apply.d.ts.map +1 -0
  90. package/dist/project-skills/apply.js +89 -0
  91. package/dist/project-skills/apply.js.map +1 -0
  92. package/dist/project-skills/branch.d.ts +30 -0
  93. package/dist/project-skills/branch.d.ts.map +1 -0
  94. package/dist/project-skills/branch.js +82 -0
  95. package/dist/project-skills/branch.js.map +1 -0
  96. package/dist/project-skills/catalogue.d.ts +40 -0
  97. package/dist/project-skills/catalogue.d.ts.map +1 -0
  98. package/dist/project-skills/catalogue.js +39 -0
  99. package/dist/project-skills/catalogue.js.map +1 -0
  100. package/dist/project-skills/change.d.ts +30 -0
  101. package/dist/project-skills/change.d.ts.map +1 -0
  102. package/dist/project-skills/change.js +29 -0
  103. package/dist/project-skills/change.js.map +1 -0
  104. package/dist/project-skills/commit.d.ts +17 -0
  105. package/dist/project-skills/commit.d.ts.map +1 -0
  106. package/dist/project-skills/commit.js +40 -0
  107. package/dist/project-skills/commit.js.map +1 -0
  108. package/dist/project-skills/project.d.ts +43 -0
  109. package/dist/project-skills/project.d.ts.map +1 -0
  110. package/dist/project-skills/project.js +60 -0
  111. package/dist/project-skills/project.js.map +1 -0
  112. package/dist/project-skills/skill-file.d.ts +17 -0
  113. package/dist/project-skills/skill-file.d.ts.map +1 -0
  114. package/dist/project-skills/skill-file.js +39 -0
  115. package/dist/project-skills/skill-file.js.map +1 -0
  116. package/dist/project-skills/test-project.d.ts +6 -0
  117. package/dist/project-skills/test-project.d.ts.map +1 -0
  118. package/dist/project-skills/test-project.js +31 -0
  119. package/dist/project-skills/test-project.js.map +1 -0
  120. package/dist/quota-boundary.d.ts.map +1 -1
  121. package/dist/quota-boundary.js +7 -3
  122. package/dist/quota-boundary.js.map +1 -1
  123. package/dist/registry.d.ts +15 -0
  124. package/dist/registry.d.ts.map +1 -1
  125. package/dist/registry.js +36 -2
  126. package/dist/registry.js.map +1 -1
  127. package/package.json +32 -16
  128. package/dist/dashboard-bundle/assets/main-BJEMTscF.js +0 -144
  129. package/dist/dashboard-bundle/assets/main-aHhLUwxc.css +0 -2
  130. package/dist/dashboard-bundle/assets/module-D7LI75mm.js +0 -14
@@ -0,0 +1,15 @@
1
+ /** The page inside an entry, as its header shows it. */
2
+ export interface SettingsCrumb {
3
+ /** What the page is about: "Studio Mac". */
4
+ title: string;
5
+ /** Back to the entry itself. */
6
+ back: () => void;
7
+ }
8
+ /** Set by the Settings dialog around an entry: how its page inside says it is open, and closed. */
9
+ export declare const SettingsCrumbContext: import("react").Context<((crumb: SettingsCrumb | undefined) => void) | null>;
10
+ /**
11
+ * Show a page inside a Settings entry: the header says its title after the entry's, and its back
12
+ * arrow calls `back`. Nothing while `crumb` is undefined. Answers whether a header shows it: outside
13
+ * the Settings dialog none does, and the page draws its own way back.
14
+ */
15
+ export declare function useSettingsCrumb(crumb: SettingsCrumb | undefined): boolean;
@@ -2,5 +2,8 @@
2
2
  * Whether an element is narrower than `width` pixels, followed as it is resized: a pane beside the
3
3
  * chat is as wide as the person drags it, not as the window is. Pass the element through a state
4
4
  * setter used as its `ref`. Wide where the browser cannot measure.
5
+ *
6
+ * Measured before the page is drawn, so a pane opened narrow never shows for a frame as a wide one
7
+ * would (a file tree beside the file, then gone).
5
8
  */
6
9
  export declare function useNarrow(element: HTMLElement | null, width: number): boolean;
@@ -212,11 +212,12 @@ export interface ModulePanelProps {
212
212
  activity?: number;
213
213
  /**
214
214
  * On a pane that lists what a run changed (`changes`): the changed file a click in the chat
215
- * asked to see, by its path in the run's checkout. `at` tells one ask from the next for the
216
- * same file. Absent until a file is asked for.
215
+ * asked to see, by its path in the run's checkout; no path when the click asked for all of
216
+ * them, from the first. `at` tells one ask from the next for the same file. Absent until a
217
+ * file is asked for.
217
218
  */
218
219
  reveal?: {
219
- path: string;
220
+ path?: string;
220
221
  at: number;
221
222
  };
222
223
  context: ModuleContext;
@@ -230,10 +231,8 @@ export interface ModulePanelProps {
230
231
  export interface ModulePanel {
231
232
  /** Which pane this is among the module's own, for its key and for remembering that it is open. */
232
233
  id: string;
233
- /** The pane's name: on its card, and what its icon is called. */
234
+ /** The pane's name: on its card, and what its icon is called and its tooltip says. */
234
235
  label: string;
235
- /** The icon's tooltip: one sentence on what the pane shows. */
236
- help: string;
237
236
  /** The pane's icon in the top bar, drawn at the size its `className` gives. */
238
237
  icon: ComponentType<{
239
238
  className?: string;
@@ -374,7 +373,7 @@ export interface ModuleHost {
374
373
  machines(): Promise<ModuleMachines>;
375
374
  /**
376
375
  * Save the machine a link names: the link another OpenAgent gives for a new device, as a person
377
- * pastes it under Machines. This computer is let in there with it, once, and keeps its key.
376
+ * pastes it under Devices. This computer is let in there with it, once, and keeps its key.
378
377
  */
379
378
  addMachine(link: string, label?: string): Promise<MachineAdded>;
380
379
  /**
@@ -382,6 +381,13 @@ export interface ModuleHost {
382
381
  * there stops working. Refused, with the reason, while a run is at work there.
383
382
  */
384
383
  removeMachine(id: string): Promise<MachineRemoved>;
384
+ /** Give a saved machine the name the person picked. */
385
+ renameMachine(id: string, label: string): Promise<MachineAdded>;
386
+ /**
387
+ * Have a saved machine save this computer, with the link this computer's door gave for a new
388
+ * device: that machine then starts runs here too. Not for a computer reached through a server.
389
+ */
390
+ letMachineIn(machineId: string, link: string): Promise<MachineAdded>;
385
391
  /**
386
392
  * The computers that keep a line open to a saved server: computers at home a run can be sent to
387
393
  * through the server, and whether each is saved here already. None for a machine that is no server.
@@ -418,11 +424,18 @@ export interface ModuleMachine {
418
424
  device?: string;
419
425
  /** Whose computer it is, by their GitHub account, when it is another person's shared with everyone on a server. */
420
426
  owner?: string;
427
+ /**
428
+ * The ids the machine is listed under at the doors of the machines it saved, as it says: one of
429
+ * them among this computer's own door's devices is that machine, in there too.
430
+ */
431
+ listed?: string[];
421
432
  }
422
433
  /** What {@link ModuleHost.machines} answers. */
423
434
  export interface ModuleMachines {
424
435
  /** This computer's own OpenAgent. */
425
436
  version: string;
437
+ /** This computer's own name, as another machine lists it: "Suleimans-MacBook-Pro". */
438
+ name?: string;
426
439
  machines: ModuleMachine[];
427
440
  }
428
441
  /** How saving a machine went: done, or stopped, with the reason. */
@@ -513,6 +526,7 @@ export { StartAgentButton } from '../components/StartAgentButton.js';
513
526
  export { LinkActions, type ProjectLinks, type LinkTargets } from '../components/LinkActions.js';
514
527
  export { cn } from '../lib/utils.js';
515
528
  export { SettingsSection, SettingsRow, SettingsSelectRow, type SettingsOption } from '../components/SettingsRows.js';
529
+ export { useSettingsCrumb, type SettingsCrumb } from '../lib/settings-crumb.js';
516
530
  export { QrCode } from '../components/QrCode.js';
517
531
  export { AddMachineDialog } from '../components/AddMachineDialog.js';
518
532
  export { InviteDialog, type InviteCode, type InviteAnswer, type InvitePersons } from '../components/InviteDialog.js';
@@ -523,6 +537,7 @@ export { MAX_SPEND_OFFSET } from '../../src/preference-defaults.js';
523
537
  export { formatRelative, formatDateTime, formatDuration, formatAge } from '../lib/format-date.js';
524
538
  export { usePolled, useLoaded, forgetRemembered } from '../lib/use-async.js';
525
539
  export { useNarrow } from '../lib/use-narrow.js';
540
+ export { Waiting } from '../components/Waiting.js';
526
541
  export { useHighlighted, Pieces, type Piece } from '../lib/highlight.js';
527
542
  export { useAction } from '../lib/use-action.js';
528
543
  export { useSchedule, type Schedule } from '../lib/use-schedule.js';
@@ -11,6 +11,13 @@ export declare const onComputersThrough: (machineId: string) => Promise<impl.Com
11
11
  export declare const sendAddComputerThrough: (machineId: string, computerId: string) => Promise<impl.AddMachineResult>;
12
12
  export declare const onMachinePerson: (machineId: string) => Promise<impl.MachinePerson>;
13
13
  export declare const sendRemoveMachineDevice: (machineId: string, deviceId: string) => Promise<impl.MachinePerson>;
14
+ export declare const sendRenameMachine: (id: string, label: string) => Promise<impl.AddMachineResult>;
15
+ export declare const sendLetMachineIn: (machineId: string, link: string) => Promise<{
16
+ ok: true;
17
+ } | {
18
+ ok: false;
19
+ error: string;
20
+ }>;
14
21
  export declare const sendMachineTold: (machineId: string) => Promise<{
15
22
  ok: boolean;
16
23
  }>;
@@ -0,0 +1,37 @@
1
+ /** An account the git host's tool knows, as its package said it. */
2
+ export interface GitHostAccount {
3
+ login: string;
4
+ /** The terminal's: the one the tool uses when not told which. */
5
+ terminal: boolean;
6
+ /** The one OpenAgent's runs use. */
7
+ runs: boolean;
8
+ /** Whether the tool could use it when asked. */
9
+ ok: boolean;
10
+ }
11
+ /** What a git host's package answers of it. */
12
+ export interface GitHostProvider {
13
+ name: string;
14
+ /** The host's word for a pull request. */
15
+ requestWord: string;
16
+ /** Its logo, an SVG. */
17
+ logo?: string;
18
+ /** The tool it works through, by its command's name. */
19
+ tool: string;
20
+ installed: boolean;
21
+ /** The command a press installs the tool with, shown under the button. */
22
+ install: string;
23
+ accounts: GitHostAccount[];
24
+ /** A login waiting for the browser's yes: the code the person types, and where. */
25
+ loggingIn?: {
26
+ code: string;
27
+ url: string;
28
+ };
29
+ /** The install a press started is going on. */
30
+ installing?: boolean;
31
+ /** Why the last install failed, while the tool is still not here. */
32
+ installFailed?: string;
33
+ }
34
+ /** The host of a git remote's address: `git@host:path`, `ssh://user@host/path`, `https://host/path`. None for a local path. */
35
+ export declare function remoteHost(remote: string): string | undefined;
36
+ /** A package's `accounts` answer, read: none for an answer that is not one. */
37
+ export declare function readProvider(output: unknown): GitHostProvider | undefined;
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * What a computer says of a login there is only whose it is, where it came from and a mark of it:
9
9
  * the start of its SHA-256, by which the copier tells whether the copy is still its own login.
10
- * The login itself is never said. The marks are the servers package's (`own.ts`), made the same way.
10
+ * The login itself is never said. The marks are the devices package's (`servers/own.ts`), made the same way.
11
11
  */
12
12
  /** One login there, as that computer says it. */
13
13
  export interface LoginThere {
@@ -40,7 +40,7 @@ export declare function markOf(login: string): string;
40
40
  /** What another computer said of the logins there, as far as it reads as such: it is another computer's data. */
41
41
  export declare function readLogins(value: unknown): MachineLogins;
42
42
  /**
43
- * The servers package's `own` answer of a person's own OpenAgent, as that computer says it: each
43
+ * The devices package's `server own` answer of a person's own OpenAgent, as that computer says it: each
44
44
  * login that is there, a copy when it names the server it came from.
45
45
  */
46
46
  export declare function loginsOfOwn(said: unknown): MachineLogins;
@@ -14,7 +14,7 @@ export interface Person {
14
14
  avatar?: string;
15
15
  }
16
16
  /**
17
- * Who a call came from, when the door in front of OpenAgent says (remote-access): the GitHub
17
+ * Who a call came from, when the door in front of OpenAgent says (the devices package): the GitHub
18
18
  * account of the person whose device made it. Said only on a computer several persons use.
19
19
  */
20
20
  export declare const PERSON_HEADER = "x-openagent-person";
@@ -49,13 +49,14 @@ export type RelayStartResult = StartAgentResult | {
49
49
  */
50
50
  export declare function pingRemote(target: MachineAccess): Promise<boolean>;
51
51
  /**
52
- * What a saved machine says of itself in its ping: the OpenAgent it runs, and the computer's own
53
- * name, which the records of its runs carry. Nothing for a machine that does not answer, or
54
- * does not say.
52
+ * What a saved machine says of itself in its ping: the OpenAgent it runs, the computer's own
53
+ * name, which the records of its runs carry, and the ids it is listed under at the doors of the
54
+ * machines it saved. Nothing for a machine that does not answer, or does not say.
55
55
  */
56
56
  export declare function remoteFacts(target: MachineAccess): Promise<{
57
57
  version?: string;
58
58
  host?: string;
59
+ listed?: string[];
59
60
  }>;
60
61
  /** The OpenAgent a saved machine runs, as its ping tells it; nothing for a machine that does not answer, or does not say. */
61
62
  export declare function remoteVersion(target: MachineAccess): Promise<string | undefined>;
@@ -93,7 +94,7 @@ export declare function leaveRemote(machine: MachineAccess & {
93
94
  * computer at home that nothing on a network reaches is asked at this address, through the
94
95
  * server, with this computer's key at the server. To this computer it is one more machine.
95
96
  */
96
- export declare const THROUGH_PATH = "/_remote-access/via/";
97
+ export declare const THROUGH_PATH = "/_devices/via/";
97
98
  /** A computer that keeps a line open to a server, as the server's door lists it. */
98
99
  export interface ComputerOnServer {
99
100
  id: string;
@@ -246,6 +247,17 @@ export declare function remoteComputerCommand(machine: MachineAccess, pkg: strin
246
247
  ok: false;
247
248
  error: string;
248
249
  }>;
250
+ /**
251
+ * Have a saved machine save this computer, by a link this computer's door gave for a new device:
252
+ * that machine then sends its runs here too. Asked of the machine's own OpenAgent, as its page
253
+ * would add a machine; what it answers is its own words.
254
+ */
255
+ export declare function remoteAddMachine(machine: MachineAccess, link: string, label: string): Promise<{
256
+ ok: true;
257
+ } | {
258
+ ok: false;
259
+ error: string;
260
+ }>;
249
261
  /** The logins this computer's person has on a machine of another person's, as that machine says (machine-logins.ts). */
250
262
  export declare function remoteLogins(machine: MachineAccess): Promise<{
251
263
  ok: true;
@@ -0,0 +1,81 @@
1
+ import { type AgentAccount, type DriverRateWindow } from '@openagt/agent-driver';
2
+ import { type Mint } from '@openagt/agent-driver-claude';
3
+ import { type CodexLogin, type CodexLoginOptions, type CodexWho } from '@openagt/agent-driver-codex';
4
+ /** The agents with accounts: Claude Code's and Codex's. */
5
+ export type AccountsAgent = 'claude' | 'codex';
6
+ /** One of an account's usage windows, by how long it lasts. */
7
+ export interface AccountWindow {
8
+ /** `5 h`, `week`, `month`. */
9
+ label: string;
10
+ /** How much of it is gone, 0-100. */
11
+ percent: number;
12
+ }
13
+ /** One account as the page shows it. */
14
+ export interface AccountRow {
15
+ /** The account as the file names it: what the page sends back to act on it. */
16
+ id: string;
17
+ /** Its name as shown: the person's own goes by the agent's name for them until they give it one. */
18
+ name: string;
19
+ /** The person's own login, which the agent keeps: it is never removed. */
20
+ own: boolean;
21
+ /** When an added one was added, ISO 8601. */
22
+ added?: string;
23
+ /** How full it is, shortest window first; none when nothing said it yet. */
24
+ windows: AccountWindow[];
25
+ /** When those were said, epoch ms, when not now: an added Claude account is known from its last run. */
26
+ asOf?: number;
27
+ /** Until when a limit keeps it out, epoch ms. */
28
+ limitedUntil?: number;
29
+ /** `in-use`: the first one a run takes now; `next`: the one after it; `limited`: a limit keeps it out. */
30
+ state?: 'in-use' | 'next' | 'limited';
31
+ }
32
+ /** An account being added: the browser is open on the agent's page, or the login is being kept. */
33
+ export interface AccountAdding {
34
+ name: string;
35
+ /** The page to sign in at, when the agent gave one: what a person copies into a private window when the browser is signed in to another account. */
36
+ url?: string;
37
+ }
38
+ export interface AccountsView {
39
+ accounts: AccountRow[];
40
+ adding?: AccountAdding;
41
+ /** Why the last add did not go through. */
42
+ failed?: string;
43
+ /** The daemon's clock, so "free in 2 h" is counted from the same now. */
44
+ now: number;
45
+ }
46
+ /** What the RPCs reach for, swapped in tests: the logins, where each agent keeps who the person is, how full a Codex account is. */
47
+ export declare const accountsWiring: {
48
+ mint: Mint;
49
+ claudeJson: () => string;
50
+ path: (agent: AccountsAgent) => string;
51
+ now: () => number;
52
+ loginCodex: (opts: CodexLoginOptions) => Promise<CodexLogin>;
53
+ codexDir: () => string;
54
+ codexOwnHome: () => string;
55
+ codexFolder: (account: AgentAccount) => string;
56
+ codexWho: (home: string) => Promise<CodexWho>;
57
+ codexUsage: (home: string) => Promise<DriverRateWindow[]>;
58
+ };
59
+ /** An agent's accounts in the order runs try them, each with how full it is and whether a limit keeps it out. */
60
+ export declare function onAgentAccounts(agent: AccountsAgent): Promise<AccountsView>;
61
+ export type AccountResult = {
62
+ ok: true;
63
+ } | {
64
+ ok: false;
65
+ error: string;
66
+ };
67
+ /**
68
+ * Add an account: this computer's browser opens on the agent's page, the person signs in there to
69
+ * the account being added, and its login is kept under `name`. Answers at once; the page follows it
70
+ * in {@link onAgentAccounts}.
71
+ */
72
+ export declare function sendAddAgentAccount(agent: AccountsAgent, name: string): Promise<AccountResult>;
73
+ /**
74
+ * Remove an added account. A Claude login is not ended: it is good until its year is over, or until
75
+ * it is taken back on claude.ai. A Codex account's folder, its login in it, goes with it.
76
+ */
77
+ export declare function sendRemoveAgentAccount(agent: AccountsAgent, name: string): Promise<AccountResult>;
78
+ /** Runs try `name` first from now on. */
79
+ export declare function sendUseAgentAccountFirst(agent: AccountsAgent, name: string): Promise<AccountResult>;
80
+ /** The person's own login under the name they give it. */
81
+ export declare function sendNameOwnAgentAccount(agent: AccountsAgent, name: string): Promise<AccountResult>;
@@ -6,10 +6,12 @@ export { onPreferences, savePreferences, patchPreferences, onProjectPresets, sav
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, sendProjectToMachine, onProjectOnMachine, onComputersThrough, sendAddComputerThrough, onMachinePerson, sendRemoveMachineDevice, sendMachineLineLink, sendMachineTold, onMachineLogins, sendMachineLogins, type Machine, type MachineLoginsResult, type AddMachineResult, type MachineVersions, type ProjectOnMachine, type ComputersThrough, type MachinePerson } from './machines.js';
9
+ export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions, sendProjectToMachine, onProjectOnMachine, onComputersThrough, sendAddComputerThrough, onMachinePerson, sendRemoveMachineDevice, sendRenameMachine, sendLetMachineIn, sendMachineLineLink, sendMachineTold, onMachineLogins, sendMachineLogins, type Machine, type MachineLoginsResult, type AddMachineResult, type MachineVersions, type ProjectOnMachine, type ComputersThrough, type MachinePerson } from './machines.js';
10
10
  export { onModules, runModuleCommand, runComputerCommand, runComputerCommandOn, readModule, type DashboardModule, type ModuleCommandResult, type ModuleReadResult } from './modules.js';
11
11
  export { onProjectSkills, sendChangeSkills, sendProjectSkills, type ProjectSkills, type ProjectSkill, type ChangeSkillsResult } from './skills.js';
12
12
  export { onPerson, type Person } from './person.js';
13
+ export { onGitHosts, sendUseGitHostAccount, sendGitHostLogin, sendGitHostInstall, onAgentState, sendAgentFix, onProjectAccounts, sendProjectAccounts, type GitHostsView, type GitHostRow, type GitHostAccount, type GitHostProvider, type AgentState, type ProjectAccountsView, type ProjectAgentAccounts } from './logins.js';
14
+ export { onAgentAccounts, sendAddAgentAccount, sendRemoveAgentAccount, sendUseAgentAccountFirst, sendNameOwnAgentAccount, type AccountsAgent, type AccountRow, type AccountWindow, type AccountAdding, type AccountsView, type AccountResult } from './accounts.js';
13
15
  import { streamAgentEvents } from './events.js';
14
16
  /** One RPC: called with whatever the browser sent, answering with whatever JSON.stringify keeps. */
15
17
  export type RpcHandler = (...args: never[]) => unknown;
@@ -0,0 +1,97 @@
1
+ import { runPackageCommand, type ProvidedCommand } from '@openagt/agent-data';
2
+ import type { DriverFix, DriverReadiness } from '@openagt/agent-driver';
3
+ import { type DriverName } from '../driver-names.js';
4
+ import { type AccountResult } from './accounts.js';
5
+ import { type GitHostProvider } from '../dashboard/git-hosts.js';
6
+ export type { GitHostAccount, GitHostProvider } from '../dashboard/git-hosts.js';
7
+ /** One host the projects' remotes are on: which projects, and its package's answer, or none when no package answers for it. */
8
+ export interface GitHostRow {
9
+ host: string;
10
+ /** The projects whose remote is there, by name. */
11
+ projects: string[];
12
+ provider?: GitHostProvider;
13
+ }
14
+ export interface GitHostsView {
15
+ hosts: GitHostRow[];
16
+ }
17
+ /** What the RPCs reach for, swapped in tests. */
18
+ export declare const loginsWiring: {
19
+ /** The origin remote's address of the project at `root`. */
20
+ origin: (root: string) => Promise<string | undefined>;
21
+ /** The project's git host package's command. */
22
+ gitHost: (root: string) => Promise<ProvidedCommand | undefined>;
23
+ run: typeof runPackageCommand;
24
+ ready: (driver: DriverName) => Promise<DriverReadiness>;
25
+ /** Run a fix's command to its end; rejects with its last lines. */
26
+ fix: (command: string) => Promise<void>;
27
+ driver: () => Promise<DriverName>;
28
+ };
29
+ /** The hosts the projects' remotes are on, in the projects' order, each with its package's answer. A project with no remote is on none. */
30
+ export declare function onGitHosts(): Promise<GitHostsView>;
31
+ /** Runs use `login` at `host` from now on; the terminal's own account stays as it is. */
32
+ export declare function sendUseGitHostAccount(host: string, login: string): Promise<AccountResult>;
33
+ /** Log another account in at `host`, in the browser: the code the person types, and where. */
34
+ export declare function sendGitHostLogin(host: string): Promise<{
35
+ ok: true;
36
+ code: string;
37
+ url: string;
38
+ } | {
39
+ ok: false;
40
+ error: string;
41
+ }>;
42
+ /** Install the tool `host`'s package works through, with the command it declared; the card follows it. */
43
+ export declare function sendGitHostInstall(host: string): Promise<AccountResult>;
44
+ /** How the coding agent's CLI is on this computer, and what a press does about what is missing. */
45
+ export interface AgentState {
46
+ driver: DriverName;
47
+ /** Installed and logged in, or it could not say otherwise. */
48
+ ready: boolean;
49
+ /** What is in the way, in words. */
50
+ problem?: string;
51
+ /** What a press does about it, when the agent's package declared a command for it. */
52
+ fix?: DriverFix;
53
+ /** A press's fix going on. */
54
+ fixing?: DriverFix['kind'];
55
+ /** Why the last press's fix failed. */
56
+ failed?: string;
57
+ }
58
+ /** The coding agent picked in Settings, or `driver`: installed, logged in, and what a press fixes. */
59
+ export declare function onAgentState(driver?: string): Promise<AgentState>;
60
+ /**
61
+ * Fix what is in the way of `driver`: the command its package declared for it, run here, the
62
+ * install to its end, the login until the browser said yes. Answers at once; the page follows it
63
+ * in {@link onAgentState}.
64
+ */
65
+ export declare function sendAgentFix(driver: string): Promise<AccountResult>;
66
+ /** A project's own accounts, beside the computer's: shown for a kind the computer has two or more of, or that the project names already. */
67
+ export interface ProjectAccountsView {
68
+ gitHost?: {
69
+ host: string;
70
+ name: string;
71
+ /** The host's word for a pull request. */
72
+ requestWord: string;
73
+ accounts: string[];
74
+ /** The computer's runs' account. */
75
+ computer?: string;
76
+ /** The project's own, when it names one. */
77
+ project?: string;
78
+ };
79
+ claude?: ProjectAgentAccounts;
80
+ codex?: ProjectAgentAccounts;
81
+ }
82
+ /** One agent's accounts a project may pick from, and its own few. */
83
+ export interface ProjectAgentAccounts {
84
+ accounts: {
85
+ id: string;
86
+ name: string;
87
+ }[];
88
+ /** The project's own few, by id, when it names some. */
89
+ project?: string[];
90
+ }
91
+ export declare function onProjectAccounts(projectId: string): Promise<ProjectAccountsView | null>;
92
+ /** Change a project's own accounts: a value sets one, `null` goes back to the computer's. Kept on this computer, never in the repository. */
93
+ export declare function sendProjectAccounts(projectId: string, change: {
94
+ gitHost?: string | null;
95
+ claude?: string[] | null;
96
+ codex?: string[] | null;
97
+ }): Promise<AccountResult>;
@@ -129,19 +129,41 @@ export declare function onMachinesReachable(): Promise<Record<string, boolean>>;
129
129
  export interface MachineVersions {
130
130
  /** This computer's own. */
131
131
  version: string;
132
- /** Each saved machine, with its version when it answers and says, and the id it lists this computer under among its devices. */
132
+ /** This computer's own name, as another machine lists it. */
133
+ name: string;
134
+ /**
135
+ * Each saved machine, with its version when it answers and says, the id it lists this computer
136
+ * under among its devices, and the ids it is listed under at the doors of the machines it saved.
137
+ */
133
138
  machines: (Machine & {
134
139
  version?: string;
135
140
  device?: string;
141
+ listed?: string[];
136
142
  })[];
137
143
  }
138
144
  /**
139
145
  * The saved machines with the OpenAgent each runs, beside this computer's own: how a page tells
140
146
  * that a machine fell behind this computer. One short call to each, with this computer's key.
141
147
  * The key itself is never told: only the id the machine lists this computer under, which a page
142
- * that lists the machine's devices names this computer by.
148
+ * that lists the machine's devices names this computer by. A machine also says the ids it is
149
+ * listed under at the doors it saved: one of them in this computer's own door is that machine,
150
+ * in there too, so a page lists the computer once. A machine that does not answer is known by
151
+ * what it said last.
143
152
  */
144
153
  export declare function onMachineVersions(): Promise<MachineVersions>;
154
+ /** Give a saved machine the name the person picked. */
155
+ export declare function sendRenameMachine(id: string, label: string): Promise<AddMachineResult>;
156
+ /**
157
+ * Have a saved machine save this computer, with a link this computer's door gave for a new
158
+ * device: from then on it starts runs here too. Not for a computer reached through a server,
159
+ * whose runs come here through that server.
160
+ */
161
+ export declare function sendLetMachineIn(machineId: string, link: string): Promise<{
162
+ ok: true;
163
+ } | {
164
+ ok: false;
165
+ error: string;
166
+ }>;
145
167
  /** Whether a saved machine has a project of this computer's: `there` is false while the machine clones it. */
146
168
  export type ProjectOnMachine = {
147
169
  ok: true;
@@ -1,10 +1,9 @@
1
- import { type Standing } from '@openagt/init';
1
+ import { type Standing } from '../project-skills/project.js';
2
2
  import { type SendSkillsResult } from '../dashboard/send-skills.js';
3
3
  export type { SendSkillsResult } from '../dashboard/send-skills.js';
4
4
  /**
5
- * A project's skills, as the dashboard shows and changes them (#2023): the same list with ticks
6
- * `npx @openagt/init` shows in a terminal, read and written through that package's own code, so
7
- * the two cannot drift apart. A project has a skill when the skill's text is in its folder; the
5
+ * A project's skills, as the dashboard shows and changes them (#2023): the list with ticks of the
6
+ * skills a project picks beyond the defaults. A project has a skill when the skill's text is in its folder; the
8
7
  * dashboard writes and deletes those files, and sends them where agents start from.
9
8
  */
10
9
  /** One skill of the list, as it stands in the project. */
@@ -120,6 +120,11 @@ export declare function runResumeHook(cwd: string, input: ResumeHookInput, opts?
120
120
  export interface StartReadiness {
121
121
  problems: string[];
122
122
  warnings: string[];
123
+ /** What a press does about the problem: install the coding agent's CLI, or log it in. The command run is the agent's package's, asked again at the press. */
124
+ fix?: {
125
+ kind: 'install' | 'log-in';
126
+ command: string;
127
+ };
123
128
  }
124
129
  /** How a `check` line went; `noHook` when the project's file names no such line. */
125
130
  export type CheckHookResult = ({
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Writing and deleting a project's skills (#2023). A skill is one tracked file,
3
+ * `.agents/skills/<name>/SKILL.md`, where Codex reads it, and one tracked link,
4
+ * `.claude/skills/<name>`, pointing at that folder, where Claude Code reads it: the way the
5
+ * OpenAgent repository itself holds its skills. Nothing else is written: no `package.json`, no
6
+ * install, so a Node project, a PHP project and an empty folder get exactly the same.
7
+ */
8
+ /** What one write or delete touched, as paths from the project's root: what a commit of it holds. */
9
+ export interface Touched {
10
+ paths: string[];
11
+ /** A place that was left as it is, and why: something there that OpenAgent did not write. */
12
+ left: {
13
+ path: string;
14
+ reason: string;
15
+ }[];
16
+ }
17
+ /** Write (or write again) the text of skill `name` and its link. */
18
+ export declare function writeSkill(root: string, name: string): Promise<Touched>;
19
+ /** Delete the text of skill `name` and its link. A folder that holds more than the text keeps the rest. */
20
+ export declare function removeSkill(root: string, name: string): Promise<Touched>;
21
+ /** What switching the scheduler answered. */
22
+ export type SchedulerOutcome = {
23
+ ok: true;
24
+ changed: boolean;
25
+ } | {
26
+ ok: false;
27
+ error: string;
28
+ };
29
+ /**
30
+ * Switch the scheduler on or off for this project on this machine: its two lines in the project's
31
+ * hooks file, which is outside git. Switching it off also stops one that is running, since nothing
32
+ * else would. Switching it on in a folder with no `.openagent/` makes the folder a project first,
33
+ * exactly as a dashboard's "Add project" does, since the hooks file lives there.
34
+ */
35
+ export declare function setScheduler(root: string, on: boolean): Promise<SchedulerOutcome>;
@@ -0,0 +1,29 @@
1
+ import { type GitRunner } from '@openagt/agent-data';
2
+ import { type CommitOutcome } from './commit.js';
3
+ /**
4
+ * A project's skills as git has them (#2023): which are on a branch, and which stand written or
5
+ * deleted in the folder with no commit yet. An agent's checkout starts from a branch, so a skill
6
+ * written into the folder reaches agents only once it is on that branch; until then a dashboard
7
+ * says it is waiting, and offers the commit.
8
+ */
9
+ /** Which skills are on a branch: asked by name. */
10
+ export interface OnBranch {
11
+ has(name: string): boolean;
12
+ }
13
+ /**
14
+ * The skills on `ref`, in either folder: a text there, or a link named as the skill (where it
15
+ * leads is the project's own business). Read with one listing of the two folders. Where the
16
+ * listing fails, or a skills folder is itself a link to somewhere the listing does not show, the
17
+ * answer is that every skill is there: a skill is said to be waiting only when that is known.
18
+ */
19
+ export declare function skillsOn(root: string, ref: string, git?: GitRunner): Promise<OnBranch>;
20
+ /** The paths git may hold for `names`, from the project's root: each text, each link, and a text in a folder of Claude Code's own where there is no link. */
21
+ export declare function skillPaths(root: string, names: readonly string[]): Promise<string[]>;
22
+ /** The skills whose files stand written, changed or deleted in the folder with no commit yet, in the list's order. */
23
+ export declare function uncommittedSkills(root: string, git?: GitRunner): Promise<string[]>;
24
+ /**
25
+ * One commit of skill files that stand uncommitted, and nothing else. With `names`, the files of
26
+ * those skills alone: what a dashboard commits after a change. Without, every uncommitted file of
27
+ * the list's skills. Never a push.
28
+ */
29
+ export declare function commitSkills(root: string, names?: readonly string[], git?: GitRunner): Promise<CommitOutcome>;
@@ -0,0 +1,39 @@
1
+ /**
2
+ * The skills a project can pick in the dashboard's Skills list (#2023), in its groups, with what
3
+ * is ticked the first time. Every group is ticked except the skills that are useless until something of
4
+ * their own is set up. The skills every run gets by default are not here (the branches skill,
5
+ * and the ones `@openagt/start` names): they come with every run, with nothing written in the
6
+ * project.
7
+ *
8
+ * Each skill's text is its own package's `SKILL.md`, read from this package's install, so the
9
+ * dashboard carries the texts of the versions it was published with.
10
+ */
11
+ export interface SkillGroup {
12
+ title: string;
13
+ skills: readonly string[];
14
+ /** Whether the group's skills are ticked in a project that has none of them yet. */
15
+ ticked: boolean;
16
+ }
17
+ export declare const GROUPS: readonly SkillGroup[];
18
+ /** Every skill of the list, in its order. */
19
+ export declare const SKILL_NAMES: readonly string[];
20
+ /**
21
+ * The scheduler's skill: written, it also gets the two lines that start the scheduler while the
22
+ * dashboard is open, in the project's hooks file, which is this machine's and outside git; deleted,
23
+ * it takes them out. Ticked by default: every automation starts switched off, so the scheduler
24
+ * starts no agent until a person says so.
25
+ */
26
+ export declare const SCHEDULER = "scheduler";
27
+ /** One skill as the dashboard carries it. */
28
+ export interface CarriedSkill {
29
+ name: string;
30
+ /** The package the text is from, and its version: what a written text is stamped with. */
31
+ package: string;
32
+ version: string;
33
+ /** The whole `SKILL.md`. */
34
+ text: string;
35
+ /** The `description` of its front matter, in one line. */
36
+ description: string;
37
+ }
38
+ /** Every skill of the list with its text, read once from this package's own install. */
39
+ export declare function carriedSkills(): Promise<Map<string, CarriedSkill>>;
@@ -0,0 +1,29 @@
1
+ /** One change to a project's skills, from the dashboard's Skills list or its Update button. */
2
+ export interface Change {
3
+ /** Skills to write: a new one, or one written again over what is there. */
4
+ write?: readonly string[];
5
+ /** Skills to delete. */
6
+ remove?: readonly string[];
7
+ }
8
+ export interface Changed {
9
+ written: string[];
10
+ removed: string[];
11
+ /** Every tracked path the change wrote or deleted, from the project's root: what its commit holds. */
12
+ paths: string[];
13
+ /** What was left as it is, and why. */
14
+ left: {
15
+ path: string;
16
+ reason: string;
17
+ }[];
18
+ /** The scheduler after the change, when the change wrote or deleted its skill; `error` when it could not be switched. */
19
+ scheduler?: {
20
+ on: boolean;
21
+ changed: boolean;
22
+ } | {
23
+ on: boolean;
24
+ error: string;
25
+ };
26
+ }
27
+ /** Whether `name` is a skill of the list. */
28
+ export declare function isKnown(name: string): boolean;
29
+ export declare function applyChange(root: string, change: Change): Promise<Changed>;