@openagt/dashboard 0.36.0 → 0.38.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 (159) hide show
  1. package/dist/client.d.ts +1 -0
  2. package/dist/client.d.ts.map +1 -1
  3. package/dist/client.js +1 -0
  4. package/dist/client.js.map +1 -1
  5. package/dist/computer-name.d.ts +3 -0
  6. package/dist/computer-name.d.ts.map +1 -0
  7. package/dist/computer-name.js +6 -0
  8. package/dist/computer-name.js.map +1 -0
  9. package/dist/daemon-runtime.d.ts.map +1 -1
  10. package/dist/daemon-runtime.js +37 -6
  11. package/dist/daemon-runtime.js.map +1 -1
  12. package/dist/daemon.d.ts.map +1 -1
  13. package/dist/daemon.js +4 -0
  14. package/dist/daemon.js.map +1 -1
  15. package/dist/dashboard/compress.d.ts +11 -0
  16. package/dist/dashboard/compress.d.ts.map +1 -0
  17. package/dist/dashboard/compress.js +40 -0
  18. package/dist/dashboard/compress.js.map +1 -0
  19. package/dist/dashboard/copied-logins.d.ts +54 -0
  20. package/dist/dashboard/copied-logins.d.ts.map +1 -0
  21. package/dist/dashboard/copied-logins.js +60 -0
  22. package/dist/dashboard/copied-logins.js.map +1 -0
  23. package/dist/dashboard/copy-logins.d.ts +5 -1
  24. package/dist/dashboard/copy-logins.d.ts.map +1 -1
  25. package/dist/dashboard/copy-logins.js +9 -3
  26. package/dist/dashboard/copy-logins.js.map +1 -1
  27. package/dist/dashboard/git-hosts.d.ts +2 -0
  28. package/dist/dashboard/git-hosts.d.ts.map +1 -1
  29. package/dist/dashboard/git-hosts.js +1 -1
  30. package/dist/dashboard/git-hosts.js.map +1 -1
  31. package/dist/dashboard/logins-sync.d.ts +146 -0
  32. package/dist/dashboard/logins-sync.d.ts.map +1 -0
  33. package/dist/dashboard/logins-sync.js +344 -0
  34. package/dist/dashboard/logins-sync.js.map +1 -0
  35. package/dist/dashboard/machine-runs.d.ts +78 -0
  36. package/dist/dashboard/machine-runs.d.ts.map +1 -0
  37. package/dist/dashboard/machine-runs.js +154 -0
  38. package/dist/dashboard/machine-runs.js.map +1 -0
  39. package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
  40. package/dist/dashboard/relay-endpoints.js +5 -2
  41. package/dist/dashboard/relay-endpoints.js.map +1 -1
  42. package/dist/dashboard/remote-run.d.ts +17 -3
  43. package/dist/dashboard/remote-run.d.ts.map +1 -1
  44. package/dist/dashboard/remote-run.js +31 -5
  45. package/dist/dashboard/remote-run.js.map +1 -1
  46. package/dist/dashboard/rpc-serve.d.ts +3 -0
  47. package/dist/dashboard/rpc-serve.d.ts.map +1 -1
  48. package/dist/dashboard/rpc-serve.js +8 -9
  49. package/dist/dashboard/rpc-serve.js.map +1 -1
  50. package/dist/dashboard/static.d.ts.map +1 -1
  51. package/dist/dashboard/static.js +4 -2
  52. package/dist/dashboard/static.js.map +1 -1
  53. package/dist/dashboard-bundle/assets/main-BrPlt--h.js +149 -0
  54. package/dist/dashboard-bundle/assets/main-DgwPb5zO.css +2 -0
  55. package/dist/dashboard-bundle/assets/module-D0SUS0dF.js +14 -0
  56. package/dist/dashboard-bundle/host/module.js +1 -1
  57. package/dist/dashboard-bundle/index.html +5 -4
  58. package/dist/dashboard-rpc/accounts.d.ts +17 -1
  59. package/dist/dashboard-rpc/accounts.d.ts.map +1 -1
  60. package/dist/dashboard-rpc/accounts.js +46 -8
  61. package/dist/dashboard-rpc/accounts.js.map +1 -1
  62. package/dist/dashboard-rpc/context.js +1 -1
  63. package/dist/dashboard-rpc/context.js.map +1 -1
  64. package/dist/dashboard-rpc/copied-logins.d.ts +49 -0
  65. package/dist/dashboard-rpc/copied-logins.d.ts.map +1 -0
  66. package/dist/dashboard-rpc/copied-logins.js +179 -0
  67. package/dist/dashboard-rpc/copied-logins.js.map +1 -0
  68. package/dist/dashboard-rpc/index.d.ts +4 -1
  69. package/dist/dashboard-rpc/index.d.ts.map +1 -1
  70. package/dist/dashboard-rpc/index.js +8 -2
  71. package/dist/dashboard-rpc/index.js.map +1 -1
  72. package/dist/dashboard-rpc/logins.d.ts +22 -1
  73. package/dist/dashboard-rpc/logins.d.ts.map +1 -1
  74. package/dist/dashboard-rpc/logins.js +80 -11
  75. package/dist/dashboard-rpc/logins.js.map +1 -1
  76. package/dist/dashboard-rpc/machines.d.ts +7 -2
  77. package/dist/dashboard-rpc/machines.d.ts.map +1 -1
  78. package/dist/dashboard-rpc/machines.js +7 -5
  79. package/dist/dashboard-rpc/machines.js.map +1 -1
  80. package/dist/dashboard-rpc/people.d.ts +16 -0
  81. package/dist/dashboard-rpc/people.d.ts.map +1 -0
  82. package/dist/dashboard-rpc/people.js +32 -0
  83. package/dist/dashboard-rpc/people.js.map +1 -0
  84. package/dist/dashboard-rpc/reads.d.ts +20 -1
  85. package/dist/dashboard-rpc/reads.d.ts.map +1 -1
  86. package/dist/dashboard-rpc/reads.js +74 -8
  87. package/dist/dashboard-rpc/reads.js.map +1 -1
  88. package/dist/dashboard-rpc/relay-dispatch.js +2 -2
  89. package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
  90. package/dist/dashboard-rpc/server-logins.d.ts +22 -0
  91. package/dist/dashboard-rpc/server-logins.d.ts.map +1 -0
  92. package/dist/dashboard-rpc/server-logins.js +26 -0
  93. package/dist/dashboard-rpc/server-logins.js.map +1 -0
  94. package/dist/dashboard-rpc/test-context.js +1 -1
  95. package/dist/dashboard-rpc/test-context.js.map +1 -1
  96. package/dist/health.d.ts +20 -0
  97. package/dist/health.d.ts.map +1 -0
  98. package/dist/health.js +98 -0
  99. package/dist/health.js.map +1 -0
  100. package/dist/index.d.ts +1 -0
  101. package/dist/index.d.ts.map +1 -1
  102. package/dist/module-types/dashboard/components/FilterChips.d.ts +12 -0
  103. package/dist/module-types/dashboard/components/Page.d.ts +12 -0
  104. package/dist/module-types/dashboard/components/SidebarToggle.d.ts +4 -0
  105. package/dist/module-types/dashboard/components/StatTile.d.ts +15 -0
  106. package/dist/module-types/dashboard/components/ui/sheet.d.ts +10 -0
  107. package/dist/module-types/dashboard/components/ui/sidebar.d.ts +71 -0
  108. package/dist/module-types/dashboard/lib/host-services.d.ts +7 -1
  109. package/dist/module-types/dashboard/lib/use-mobile.d.ts +4 -0
  110. package/dist/module-types/dashboard/lib/use-modules.d.ts +3 -1
  111. package/dist/module-types/dashboard/module/index.d.ts +51 -1
  112. package/dist/module-types/src/client.d.ts +1 -0
  113. package/dist/module-types/src/computer-name.d.ts +2 -0
  114. package/dist/module-types/src/dashboard/compress.d.ts +10 -0
  115. package/dist/module-types/src/dashboard/copied-logins.d.ts +53 -0
  116. package/dist/module-types/src/dashboard/git-hosts.d.ts +2 -0
  117. package/dist/module-types/src/dashboard/logins-sync.d.ts +145 -0
  118. package/dist/module-types/src/dashboard/machine-runs.d.ts +77 -0
  119. package/dist/module-types/src/dashboard/remote-run.d.ts +17 -3
  120. package/dist/module-types/src/dashboard/rpc-serve.d.ts +3 -0
  121. package/dist/module-types/src/dashboard-rpc/accounts.d.ts +17 -1
  122. package/dist/module-types/src/dashboard-rpc/copied-logins.d.ts +48 -0
  123. package/dist/module-types/src/dashboard-rpc/index.d.ts +4 -1
  124. package/dist/module-types/src/dashboard-rpc/logins.d.ts +22 -1
  125. package/dist/module-types/src/dashboard-rpc/machines.d.ts +7 -2
  126. package/dist/module-types/src/dashboard-rpc/people.d.ts +15 -0
  127. package/dist/module-types/src/dashboard-rpc/reads.d.ts +20 -1
  128. package/dist/module-types/src/dashboard-rpc/server-logins.d.ts +21 -0
  129. package/dist/module-types/src/health.d.ts +19 -0
  130. package/dist/module-types/src/index.d.ts +1 -0
  131. package/dist/module-types/src/overview-layout.d.ts +37 -0
  132. package/dist/module-types/src/registry.d.ts +14 -0
  133. package/dist/module-types/src/store/agent-store.d.ts +15 -1
  134. package/dist/module-types/src/store/git-host.d.ts +6 -0
  135. package/dist/module-types/src/store/runs.d.ts +3 -1
  136. package/dist/module.css +1 -1
  137. package/dist/overview-layout.d.ts +38 -0
  138. package/dist/overview-layout.d.ts.map +1 -0
  139. package/dist/overview-layout.js +61 -0
  140. package/dist/overview-layout.js.map +1 -0
  141. package/dist/registry.d.ts +14 -0
  142. package/dist/registry.d.ts.map +1 -1
  143. package/dist/registry.js +31 -2
  144. package/dist/registry.js.map +1 -1
  145. package/dist/store/agent-store.d.ts +15 -1
  146. package/dist/store/agent-store.d.ts.map +1 -1
  147. package/dist/store/agent-store.js.map +1 -1
  148. package/dist/store/git-host.d.ts +6 -0
  149. package/dist/store/git-host.d.ts.map +1 -1
  150. package/dist/store/git-host.js +14 -0
  151. package/dist/store/git-host.js.map +1 -1
  152. package/dist/store/runs.d.ts +3 -1
  153. package/dist/store/runs.d.ts.map +1 -1
  154. package/dist/store/runs.js +1 -1
  155. package/dist/store/runs.js.map +1 -1
  156. package/package.json +20 -20
  157. package/dist/dashboard-bundle/assets/main-COZtHuZ-.css +0 -2
  158. package/dist/dashboard-bundle/assets/main-DDfoDyfa.js +0 -148
  159. package/dist/dashboard-bundle/assets/module-BXxdqTpP.js +0 -14
@@ -21,13 +21,32 @@ export declare const loginsWiring: {
21
21
  /** The project's git host package's command. */
22
22
  gitHost: (root: string) => Promise<ProvidedCommand | undefined>;
23
23
  run: typeof runPackageCommand;
24
+ /** Where a git host's package is asked when no project is on its host: the person's home folder. */
25
+ home: () => string;
24
26
  ready: (driver: DriverName) => Promise<DriverReadiness>;
25
27
  /** Run a fix's command to its end; rejects with its last lines. */
26
28
  fix: (command: string) => Promise<void>;
27
29
  driver: () => Promise<DriverName>;
28
30
  };
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. */
31
+ /**
32
+ * The hosts the projects' remotes are on, in the projects' order, each with its package's answer:
33
+ * the last answer when there is one for the same projects, the hosts being read again behind it.
34
+ */
30
35
  export declare function onGitHosts(): Promise<GitHostsView>;
36
+ /**
37
+ * A git host's package command for `host`, run where the host was last found, with `input` on its
38
+ * standard input. An object, not a function: what the RPC table is built of are this module's
39
+ * functions, and this is no call a page makes.
40
+ */
41
+ export declare const gitHostPackages: {
42
+ run(host: string, args: string[], input?: string): Promise<{
43
+ ok: true;
44
+ output: unknown;
45
+ } | {
46
+ ok: false;
47
+ error: string;
48
+ }>;
49
+ };
31
50
  /** Runs use `login` at `host` from now on; the terminal's own account stays as it is. */
32
51
  export declare function sendUseGitHostAccount(host: string, login: string): Promise<AccountResult>;
33
52
  /** Log another account in at `host`, in the browser: the code the person types, and where. */
@@ -50,6 +69,8 @@ export interface AgentState {
50
69
  problem?: string;
51
70
  /** What a press does about it, when the agent's package declared a command for it. */
52
71
  fix?: DriverFix;
72
+ /** The agent's own login is out, and runs use an added account: the own login is no account to show. */
73
+ ownLoggedOut?: true;
53
74
  /** A press's fix going on. */
54
75
  fixing?: DriverFix['kind'];
55
76
  /** Why the last press's fix failed. */
@@ -1,3 +1,4 @@
1
+ import { type Health } from '../health.js';
1
2
  import { type MachineLogins } from '../dashboard/machine-logins.js';
2
3
  /** A saved machine as the browser sees it: no key. */
3
4
  export interface Machine {
@@ -151,12 +152,16 @@ export interface MachineVersions {
151
152
  version: string;
152
153
  /** This computer's own name, as another machine lists it. */
153
154
  name: string;
155
+ /** How this computer stands: its memory, disk and load. */
156
+ health?: Health;
154
157
  /**
155
- * Each saved machine, with its version when it answers and says, the id it lists this computer
156
- * under among its devices, and the ids it is listed under at the doors of the machines it saved.
158
+ * Each saved machine, with its version and how it stands when it answers and says, the id it
159
+ * lists this computer under among its devices, and the ids it is listed under at the doors of
160
+ * the machines it saved.
157
161
  */
158
162
  machines: (Machine & {
159
163
  version?: string;
164
+ health?: Health;
160
165
  device?: string;
161
166
  listed?: string[];
162
167
  })[];
@@ -0,0 +1,15 @@
1
+ import { type GitHostFor, type GitHostPerson } from '../store/git-host.js';
2
+ /** A person of a project, as its git host knows them: their email, login and picture. */
3
+ export type HostPerson = GitHostPerson & {
4
+ email: string;
5
+ };
6
+ /**
7
+ * The git host's accounts behind these emails of a project's (`people` of its git host): what a
8
+ * card shows as each person's picture. What it said of an email is kept a day, a miss too, so a
9
+ * card that asks every minute asks the host once a day per person. No git host: nobody.
10
+ */
11
+ export declare function onGitHostPeople(projectId: string, emails: string[], deps?: {
12
+ gitHost?: GitHostFor;
13
+ now?: () => number;
14
+ resolve?: (projectId: string) => Promise<string | undefined>;
15
+ }): Promise<HostPerson[]>;
@@ -17,6 +17,7 @@ import type { OpenAgentEvent } from '../events.js';
17
17
  import type { BridgeEvent, BridgeHello, BridgeQuestion } from '../dashboard/bridge-endpoints.js';
18
18
  import type { BridgeAnswer, BridgeContact, BridgeVersion } from '../dashboard/bridge-store.js';
19
19
  import type { SavedMachine } from '../dashboard/rpc-serve.js';
20
+ import { type OwnRuns } from '../dashboard/machine-runs.js';
20
21
  /**
21
22
  * The project's runs, most-recent first (or `[]`). The archived (finished) runs
22
23
  * from `agents/`, plus every live agent prepended — so the sidebar shows an in-progress
@@ -37,6 +38,23 @@ import type { SavedMachine } from '../dashboard/rpc-serve.js';
37
38
  * instead of losing it.
38
39
  */
39
40
  export declare function onAgents(projectId: string): Promise<AgentMeta[]>;
41
+ /**
42
+ * A project's runs as its records and checkouts say them, each as recorded: the ones this
43
+ * computer runs, and every other computer's whose record came through the project's shared records.
44
+ * A run of this computer's that has no record yet is its project's git user's, as its record will be.
45
+ */
46
+ export declare function recordedRuns(cwd: string): Promise<AgentMeta[]>;
47
+ /**
48
+ * A project's runs as the dashboard lists them: its records, with what each saved machine says of
49
+ * its own runs right now taking over theirs (machine-runs.ts). Not marked yet for the dashboard.
50
+ */
51
+ export declare function projectRuns(cwd: string): Promise<AgentMeta[]>;
52
+ /**
53
+ * This computer's own runs of a project, for another computer that lists them (machine-runs.ts):
54
+ * the ones that changed since `since`, the answer it had last, as they stand right now. Only this
55
+ * computer's: what another computer's records say is that computer's to answer.
56
+ */
57
+ export declare function onOwnRuns(projectId: string, since?: unknown): Promise<OwnRuns>;
40
58
  /**
41
59
  * What a run's row marks beside its name, for both lists of runs, a project's and all projects'
42
60
  * together: how its pull request stands, and the work it left on this machine.
@@ -100,7 +118,8 @@ export declare function markSaving(agent: AgentMeta, thisHost?: string, alive?:
100
118
  * A run as its record may say it. A record is a file anyone with the project can write, and its
101
119
  * tool's own words are read into the row as they are, so the words only this daemon gives a row
102
120
  * are taken off it first: that it runs on a saved machine and which, that it is another
103
- * computer's, that it is being saved. A computer's name that is no name is none.
121
+ * computer's, that it is being saved, when its computer was last seen. A computer's name that is
122
+ * no name is none.
104
123
  */
105
124
  export declare function asRecorded(agent: AgentMeta): AgentMeta;
106
125
  /**
@@ -0,0 +1,21 @@
1
+ import { type ServerLogins } from '../dashboard/logins-sync.js';
2
+ import type { CopiedKind } from '../dashboard/copied-logins.js';
3
+ import type { AccountResult } from './accounts.js';
4
+ export type { ServerLogins, LoginThere } from '../dashboard/logins-sync.js';
5
+ export interface ServerLoginsView {
6
+ /** This computer's own name: what a server says its logins are from. */
7
+ computer: string;
8
+ servers: ServerLogins[];
9
+ }
10
+ /** Each saved server of the person's, and how this computer's logins stand there. */
11
+ export declare function onServerLogins(): Promise<ServerLoginsView>;
12
+ /** A server uses this computer's logins from now on: what can go there goes now. */
13
+ export declare function sendUseLoginsOn(machineId: string): Promise<AccountResult>;
14
+ /** The press: a login of the server's own for each account that waits for one, made in this computer's browser. */
15
+ export declare function sendAllowLogins(machineId: string): Promise<AccountResult>;
16
+ /** A login the server has of this computer's that this computer no longer has: kept there, or taken off. */
17
+ export declare function sendSettleLogin(machineId: string, which: {
18
+ kind: CopiedKind;
19
+ host?: string;
20
+ source: string;
21
+ }, keep: boolean): Promise<AccountResult>;
@@ -0,0 +1,19 @@
1
+ /** A computer's memory, disk and load, as it says them. */
2
+ export interface Health {
3
+ /** Memory, in bytes: all of it, and how much is in use, the cache a system gives back on demand not counted. */
4
+ memory: {
5
+ total: number;
6
+ used: number;
7
+ };
8
+ /** The disk of its user's home, in bytes: all of it, and how much is in use. */
9
+ disk?: {
10
+ total: number;
11
+ used: number;
12
+ };
13
+ /** How busy its processors are, in percent of all of them: the time they were not idle since the reading before. */
14
+ load?: number;
15
+ }
16
+ /** This computer's health, read at most every {@link KEPT_MS}. */
17
+ export declare function computerHealth(now?: number): Promise<Health>;
18
+ /** What another computer said of its health, kept only as well-formed: whole, finite, used no more than all. */
19
+ export declare function readHealth(said: unknown): Health | undefined;
@@ -38,3 +38,4 @@ export type { ProjectQueue } from './dashboard/queue.js';
38
38
  export type { QuotaView } from './dashboard/quota.js';
39
39
  export type { Ticket } from './store/tickets.js';
40
40
  export type { AgentWorktree, CleanupReport, OnboardingSuggestion } from './dashboard/types.js';
41
+ export type { CardPlace, CardWidth, OverviewLayouts } from './overview-layout.js';
@@ -0,0 +1,37 @@
1
+ /** How wide a card stands, as a share of the Overview's column. */
2
+ export declare const CARD_WIDTHS: readonly ['1/4', '1/3', '1/2', '2/3', '3/4', '1'];
3
+ export type CardWidth = (typeof CARD_WIDTHS)[number];
4
+ /** One card's place in a layout: its id, and what was picked for it. */
5
+ export interface CardPlace {
6
+ id: string;
7
+ /** Picked to be hidden. */
8
+ hidden?: true;
9
+ /** Picked to stand at this width; its own default when unsaid. */
10
+ width?: CardWidth;
11
+ }
12
+ /** The layouts, by project id, and {@link ALL_PROJECTS} for the Overview of every project. */
13
+ export type OverviewLayouts = Record<string, CardPlace[]>;
14
+ /** The key of the layout of the Overview of every project. */
15
+ export declare const ALL_PROJECTS = "*";
16
+ /** What a card says of itself to be laid out: its id, and the widths it stands at. */
17
+ export interface LayoutCard {
18
+ id: string;
19
+ /** Its width until one is picked. */
20
+ width: CardWidth;
21
+ /** The narrowest it fits: a narrower pick is not offered, and a saved one is not kept. */
22
+ minWidth: CardWidth;
23
+ }
24
+ /** The widths a card fits, narrowest first. */
25
+ export declare function widthsFor(card: Pick<LayoutCard, 'minWidth'>): CardWidth[];
26
+ /**
27
+ * The cards in their order, each with its width and whether it is hidden, by the layout of `key`
28
+ * (else the all-projects one, else none): the cards it names first, in its order, then the rest in
29
+ * their own. A name no card has any more is passed over.
30
+ */
31
+ export declare function arrangeCards<C extends LayoutCard>(cards: readonly C[], layouts: OverviewLayouts | undefined, key: string): {
32
+ card: C;
33
+ width: CardWidth;
34
+ hidden: boolean;
35
+ }[];
36
+ /** Keep only well-formed layouts: string keys, each a list of places with a card id; a malformed place is dropped, not thrown. */
37
+ export declare function sanitizeOverviewLayouts(value: unknown): OverviewLayouts;
@@ -1,3 +1,4 @@
1
+ import { type OverviewLayouts } from './overview-layout.js';
1
2
  import { type PublishPick } from './publish-levels.js';
2
3
  /**
3
4
  * The multi-project registry (#390): the list of projects the user has
@@ -48,11 +49,15 @@ export interface MachineRecord {
48
49
  owner?: string;
49
50
  /** The person was told, once, that their logins are copied to that other person's computer. */
50
51
  told?: true;
52
+ /** A server of the person's own that uses this computer's logins: they said so once (`logins-sync.ts`). */
53
+ logins?: true;
51
54
  /**
52
55
  * The ids the machine is listed under at the doors of the machines it saved, as it last said:
53
56
  * kept, so it is known to be in at this computer's door too while it does not answer.
54
57
  */
55
58
  listed?: string[];
59
+ /** When the machine last answered for its runs, ISO, kept to the minute: what its runs say while it does not answer. */
60
+ seenAt?: string;
56
61
  }
57
62
  /** A GitHub account's name: letters, digits and single dashes, at most 39. */
58
63
  export declare function isAccount(value: unknown): value is string;
@@ -167,6 +172,8 @@ export interface Preferences {
167
172
  * Appearance clears it.
168
173
  */
169
174
  onboardingDismissed?: boolean;
175
+ /** How the Overview lays out its cards, per project and for all projects ({@link OverviewLayouts}); absent = each card in its own order and width. */
176
+ overviewLayouts?: OverviewLayouts;
170
177
  }
171
178
  /** The persisted registry file shape (#410): the project list plus the user preferences. */
172
179
  export interface Registry {
@@ -336,8 +343,15 @@ export declare function noteListed(machine: {
336
343
  id: string;
337
344
  key: string;
338
345
  }, listed: string[], fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
346
+ /** Keep when a saved machine last answered, once a minute at most: the file is not written at each answer. */
347
+ export declare function noteSeen(machine: {
348
+ id: string;
349
+ key: string;
350
+ }, at: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
339
351
  /** Write down that the person was told their logins are copied to a saved machine of another person's. Answers whether it is saved. */
340
352
  export declare function tellMachine(id: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
353
+ /** Say whether a saved server uses this computer's logins. Answers whether it is saved. */
354
+ export declare function useLoginsOn(id: string, on: boolean, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
341
355
  /** Give a saved machine the name the person picked. Answers the machine as saved; nothing when it is not saved, or the name is empty. */
342
356
  export declare function renameMachine(id: string, label: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<MachineRecord | undefined>;
343
357
  /** Take a saved machine off the list, by id. Answers the one that was there. */
@@ -8,7 +8,11 @@ import { type AnyDiaryLine, type RunsFor } from './runs.js';
8
8
  * provider answers (`runs.ts`), when one of its packages provides them. The dashboard is a
9
9
  * projection of those files and that answer.
10
10
  */
11
- export type AgentStatus = 'running' | 'done' | 'stopped' | 'failed' | 'waiting';
11
+ /**
12
+ * How a run stands. `unknown` is never recorded: it is how a run of another computer reads while
13
+ * that computer does not answer, whatever its record last said, so it is never taken for working.
14
+ */
15
+ export type AgentStatus = 'running' | 'done' | 'stopped' | 'failed' | 'waiting' | 'unknown';
12
16
  /**
13
17
  * A queryable snapshot of the agent, derived entirely from the event log. Lets the
14
18
  * dashboard render a header (and a future agent list) without parsing every line.
@@ -33,6 +37,11 @@ export interface AgentMeta {
33
37
  pid?: number;
34
38
  /** The host the owning {@link pid} lives on, so a pid probe only trusts a match (#716). */
35
39
  host?: string;
40
+ /**
41
+ * Whose run it is, by the email its record is kept under: the git user of the computer that
42
+ * ran it. A run of this computer's that has no record yet is its project's git user's.
43
+ */
44
+ person?: string;
36
45
  /** What this session was asked for (from the `intent` event). */
37
46
  intent?: string;
38
47
  /** The session's short name, as a list shows it: two to five words a small model gave it. */
@@ -197,6 +206,11 @@ export interface AgentMeta {
197
206
  remoteLabel?: string;
198
207
  /** That saved machine is a person's own computer, reached by the line it keeps open here (reached-by-line.ts): the run is drawn with a computer, not a server. */
199
208
  remoteByLine?: true;
209
+ /**
210
+ * While the run's status is `unknown`: when its computer last answered this one, ISO, when it
211
+ * did since this computer knows it. Not stored: annotated on the way to the dashboard.
212
+ */
213
+ seenAt?: string;
200
214
  /**
201
215
  * The flow this agent started under (#1467): `build` for the scope→build orchestration, `prompt`
202
216
  * for the direct-prompt path (research and transparent runs record `prompt` too). Persisted so a
@@ -18,6 +18,8 @@
18
18
  * `<command> merge <number>` land the pull request: armed to merge on green, or merged at once
19
19
  * `<command> home` the project's page on the git host, and the git host's name
20
20
  * `<command> me` who is signed in there: {@link GitHostPerson}
21
+ * `<command> people <email>...` the accounts behind the project's commit emails: an array of
22
+ * {@link GitHostPerson} each with its `email`, one per email the host knows
21
23
  * The branch `open` is asked for must already be on the remote: pushing is the branches
22
24
  * provider's step, and OpenAgent runs it first.
23
25
  *
@@ -101,6 +103,10 @@ export interface GitHostSource {
101
103
  home(): Promise<GitHostHome | undefined>;
102
104
  /** Who is signed in at the git host; `undefined` when nobody is, or the provider cannot tell. */
103
105
  me(): Promise<GitHostPerson | undefined>;
106
+ /** The accounts behind these commit emails, each with its email; an email the host knows no account for is left out. */
107
+ people(emails: readonly string[]): Promise<(GitHostPerson & {
108
+ email: string;
109
+ })[]>;
104
110
  }
105
111
  /** The git host of the project at `root`, or `undefined` when none of its packages provides one. */
106
112
  export type GitHostFor = (root: string) => Promise<GitHostSource | undefined>;
@@ -7,7 +7,7 @@
7
7
  * it: the project has no finished runs, only the ones still running in a checkout.
8
8
  *
9
9
  * The command line a provider answers, each printing one JSON document and exiting 0:
10
- * `<command> --local --full --limit N` the runs, newest first, whole cards
10
+ * `<command> --local --full --limit N` the runs, newest first, whole cards, each with the `person` it is kept under
11
11
  * `<command> show <id> --local --full` one run: the whole card plus `diary`, every line
12
12
  * `<command> delete <id>` remove a run
13
13
  * `<command> patch <id> [--branch <b>] [--pr <n> --pr-url <url>] [--landed <commit> --from <commit>]` the late facts
@@ -44,6 +44,8 @@ export interface RunCard {
44
44
  /** How much of the model's context the conversation filled at the run's last turn. */
45
45
  contextTokens?: number;
46
46
  caller?: Record<string, unknown>;
47
+ /** Whom the run is kept under, by their email: said by a provider's list, never written on a card. */
48
+ person?: string;
47
49
  }
48
50
  /** The two late facts a finished run's card may still learn: the branch its work landed on, its pull request. */
49
51
  export type RunPatch = Partial<Pick<RunCard, 'branch' | 'pr'>> & {
package/dist/module.css CHANGED
@@ -37,7 +37,7 @@
37
37
  --color-merged: var(--merged);
38
38
 
39
39
  /* The shadcn sidebar reads its own `--sidebar-*` family so a sidebar can be themed apart from
40
- the page. Its background is its own (`--sidebar`: in the dark theme a step below the page, as
40
+ the page. Its background is its own (`--sidebar`: in the dark theme a step above the page, as
41
41
  Claude Code's); the rest keeps in step with the palette: accent for the hover/active fill, the
42
42
  shared border and the primary ring. */
43
43
  --color-sidebar: var(--sidebar);
@@ -0,0 +1,38 @@
1
+ /** How wide a card stands, as a share of the Overview's column. */
2
+ export declare const CARD_WIDTHS: readonly ['1/4', '1/3', '1/2', '2/3', '3/4', '1'];
3
+ export type CardWidth = (typeof CARD_WIDTHS)[number];
4
+ /** One card's place in a layout: its id, and what was picked for it. */
5
+ export interface CardPlace {
6
+ id: string;
7
+ /** Picked to be hidden. */
8
+ hidden?: true;
9
+ /** Picked to stand at this width; its own default when unsaid. */
10
+ width?: CardWidth;
11
+ }
12
+ /** The layouts, by project id, and {@link ALL_PROJECTS} for the Overview of every project. */
13
+ export type OverviewLayouts = Record<string, CardPlace[]>;
14
+ /** The key of the layout of the Overview of every project. */
15
+ export declare const ALL_PROJECTS = "*";
16
+ /** What a card says of itself to be laid out: its id, and the widths it stands at. */
17
+ export interface LayoutCard {
18
+ id: string;
19
+ /** Its width until one is picked. */
20
+ width: CardWidth;
21
+ /** The narrowest it fits: a narrower pick is not offered, and a saved one is not kept. */
22
+ minWidth: CardWidth;
23
+ }
24
+ /** The widths a card fits, narrowest first. */
25
+ export declare function widthsFor(card: Pick<LayoutCard, 'minWidth'>): CardWidth[];
26
+ /**
27
+ * The cards in their order, each with its width and whether it is hidden, by the layout of `key`
28
+ * (else the all-projects one, else none): the cards it names first, in its order, then the rest in
29
+ * their own. A name no card has any more is passed over.
30
+ */
31
+ export declare function arrangeCards<C extends LayoutCard>(cards: readonly C[], layouts: OverviewLayouts | undefined, key: string): {
32
+ card: C;
33
+ width: CardWidth;
34
+ hidden: boolean;
35
+ }[];
36
+ /** Keep only well-formed layouts: string keys, each a list of places with a card id; a malformed place is dropped, not thrown. */
37
+ export declare function sanitizeOverviewLayouts(value: unknown): OverviewLayouts;
38
+ //# sourceMappingURL=overview-layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-layout.d.ts","sourceRoot":"","sources":["../src/overview-layout.ts"],"names":[],"mappings":"AAOA,mEAAmE;AACnE,eAAO,MAAM,WAAW,YAAI,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAU,CAAA;AAC5E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAA;AAEpD,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,2BAA2B;IAC3B,MAAM,CAAC,EAAE,IAAI,CAAA;IACb,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAA;CAClB;AAED,8FAA8F;AAC9F,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;AAEzD,8DAA8D;AAC9D,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,sFAAsF;AACtF,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,qCAAqC;IACrC,KAAK,EAAE,SAAS,CAAA;IAChB,0FAA0F;IAC1F,QAAQ,EAAE,SAAS,CAAA;CACpB;AAID,+CAA+C;AAC/C,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,GAAG,SAAS,EAAE,CAEzE;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,UAAU,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,CAAC,CAAC;IAAC,KAAK,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,EAAE,CAW3K;AAOD,kIAAkI;AAClI,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CAiBvE"}
@@ -0,0 +1,61 @@
1
+ // How the Overview lays out its cards: which show, in what order, how wide. A layout is kept per
2
+ // project and one for "All projects" (his pick); a project never arranged is laid out as all
3
+ // projects are, without the cards it does not have. A card a layout does not name (a package
4
+ // installed after it was saved) comes after the ones it names, shown, at its own width: a new
5
+ // card is seen. Node-free: the daemon keeps the layouts with the preferences, the page arranges by
6
+ // them.
7
+ /** How wide a card stands, as a share of the Overview's column. */
8
+ export const CARD_WIDTHS = ['1/4', '1/3', '1/2', '2/3', '3/4', '1'];
9
+ /** The key of the layout of the Overview of every project. */
10
+ export const ALL_PROJECTS = '*';
11
+ const rank = (width) => CARD_WIDTHS.indexOf(width);
12
+ /** The widths a card fits, narrowest first. */
13
+ export function widthsFor(card) {
14
+ return CARD_WIDTHS.filter(width => rank(width) >= rank(card.minWidth));
15
+ }
16
+ /**
17
+ * The cards in their order, each with its width and whether it is hidden, by the layout of `key`
18
+ * (else the all-projects one, else none): the cards it names first, in its order, then the rest in
19
+ * their own. A name no card has any more is passed over.
20
+ */
21
+ export function arrangeCards(cards, layouts, key) {
22
+ const places = layouts?.[key] ?? layouts?.[ALL_PROJECTS] ?? [];
23
+ const byId = new Map(cards.map(card => [card.id, card]));
24
+ const named = places.flatMap(place => {
25
+ const card = byId.get(place.id);
26
+ if (!card)
27
+ return [];
28
+ byId.delete(place.id);
29
+ const width = place.width !== undefined && rank(place.width) >= rank(card.minWidth) ? place.width : card.width;
30
+ return [{ card, width, hidden: place.hidden === true }];
31
+ });
32
+ return [...named, ...[...byId.values()].map(card => ({ card, width: card.width, hidden: false }))];
33
+ }
34
+ /** Caps on what a layout keeps, so a hand-edited or browser-supplied one never fills the settings file. */
35
+ const MAX_LAYOUTS = 200;
36
+ const MAX_CARDS = 50;
37
+ const MAX_ID = 200;
38
+ /** Keep only well-formed layouts: string keys, each a list of places with a card id; a malformed place is dropped, not thrown. */
39
+ export function sanitizeOverviewLayouts(value) {
40
+ if (typeof value !== 'object' || value === null || Array.isArray(value))
41
+ return {};
42
+ const out = {};
43
+ for (const [key, list] of Object.entries(value).slice(0, MAX_LAYOUTS)) {
44
+ if (!key || key.length > MAX_ID || !Array.isArray(list))
45
+ continue;
46
+ const seen = new Set();
47
+ const places = [];
48
+ for (const raw of list.slice(0, MAX_CARDS)) {
49
+ if (typeof raw !== 'object' || raw === null)
50
+ continue;
51
+ const { id, hidden, width } = raw;
52
+ if (typeof id !== 'string' || !id || id.length > MAX_ID || seen.has(id))
53
+ continue;
54
+ seen.add(id);
55
+ places.push({ id, ...(hidden === true ? { hidden: true } : {}), ...(CARD_WIDTHS.includes(width) ? { width: width } : {}) });
56
+ }
57
+ out[key] = places;
58
+ }
59
+ return out;
60
+ }
61
+ //# sourceMappingURL=overview-layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"overview-layout.js","sourceRoot":"","sources":["../src/overview-layout.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,6FAA6F;AAC7F,6FAA6F;AAC7F,8FAA8F;AAC9F,mGAAmG;AACnG,QAAQ;AAER,mEAAmE;AACnE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,CAAU,CAAA;AAe5E,8DAA8D;AAC9D,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CAAA;YAC5D,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,MAAM,GAAG,MAAM,IAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;gBAAE,SAAQ;YACjF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAA;YACZ,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAE,WAAkC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,KAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;QAC3K,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAA;IACnB,CAAC;IACD,OAAO,GAAG,CAAA;AACZ,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { type OverviewLayouts } from './overview-layout.js';
1
2
  import { type PublishPick } from './publish-levels.js';
2
3
  /**
3
4
  * The multi-project registry (#390): the list of projects the user has
@@ -48,11 +49,15 @@ export interface MachineRecord {
48
49
  owner?: string;
49
50
  /** The person was told, once, that their logins are copied to that other person's computer. */
50
51
  told?: true;
52
+ /** A server of the person's own that uses this computer's logins: they said so once (`logins-sync.ts`). */
53
+ logins?: true;
51
54
  /**
52
55
  * The ids the machine is listed under at the doors of the machines it saved, as it last said:
53
56
  * kept, so it is known to be in at this computer's door too while it does not answer.
54
57
  */
55
58
  listed?: string[];
59
+ /** When the machine last answered for its runs, ISO, kept to the minute: what its runs say while it does not answer. */
60
+ seenAt?: string;
56
61
  }
57
62
  /** A GitHub account's name: letters, digits and single dashes, at most 39. */
58
63
  export declare function isAccount(value: unknown): value is string;
@@ -167,6 +172,8 @@ export interface Preferences {
167
172
  * Appearance clears it.
168
173
  */
169
174
  onboardingDismissed?: boolean;
175
+ /** How the Overview lays out its cards, per project and for all projects ({@link OverviewLayouts}); absent = each card in its own order and width. */
176
+ overviewLayouts?: OverviewLayouts;
170
177
  }
171
178
  /** The persisted registry file shape (#410): the project list plus the user preferences. */
172
179
  export interface Registry {
@@ -336,8 +343,15 @@ export declare function noteListed(machine: {
336
343
  id: string;
337
344
  key: string;
338
345
  }, listed: string[], fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
346
+ /** Keep when a saved machine last answered, once a minute at most: the file is not written at each answer. */
347
+ export declare function noteSeen(machine: {
348
+ id: string;
349
+ key: string;
350
+ }, at: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
339
351
  /** Write down that the person was told their logins are copied to a saved machine of another person's. Answers whether it is saved. */
340
352
  export declare function tellMachine(id: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
353
+ /** Say whether a saved server uses this computer's logins. Answers whether it is saved. */
354
+ export declare function useLoginsOn(id: string, on: boolean, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
341
355
  /** Give a saved machine the name the person picked. Answers the machine as saved; nothing when it is not saved, or the name is empty. */
342
356
  export declare function renameMachine(id: string, label: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<MachineRecord | undefined>;
343
357
  /** Take a saved machine off the list, by id. Answers the one that was there. */
@@ -1 +1 @@
1
- {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAGrE;;;;;;;GAOG;AAEH,8BAA8B;AAC9B,MAAM,WAAW,aAAa;IAC5B,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAA;IACV,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAA;CAChB;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa;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,CAAC,IAAI,CAAC,CAOvK;AAED,uIAAuI;AACvI,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,GAAE,UAA6B,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CASvI;AAED,2FAA2F;AAC3F,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,GAAE,UAA6B,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,OAAO,CAAC,CAUpJ;AAED,yIAAyI;AACzI,wBAAsB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,GAAE,UAA6B,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAW1K;AAED,gFAAgF;AAChF,wBAAsB,aAAa,CACjC,EAAE,EAAE,MAAM,EACV,EAAE,GAAE,UAA6B,EACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAQpC;AAWD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,EAAE,GAAE,UAA6B,EACjC,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GACxC,gBAAgB,CAclB"}
package/dist/registry.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { sanitizeOverviewLayouts } from './overview-layout.js';
1
2
  import { basename, dirname, join, resolve } from 'node:path';
2
3
  import { randomBytes } from 'node:crypto';
3
4
  import { isDriverName } from './driver-names.js';
@@ -146,6 +147,9 @@ function sanitizePreferences(value) {
146
147
  // `recentsSort` is constrained to the known set; the default, `created`, is stored as nothing.
147
148
  if (input['recentsSort'] === 'updated' || input['recentsSort'] === 'name')
148
149
  preferences.recentsSort = input['recentsSort'];
150
+ const overviewLayouts = sanitizeOverviewLayouts(input['overviewLayouts']);
151
+ if (Object.keys(overviewLayouts).length)
152
+ preferences.overviewLayouts = overviewLayouts;
149
153
  return preferences;
150
154
  }
151
155
  /**
@@ -203,14 +207,14 @@ function sanitizeMachines(value) {
203
207
  break;
204
208
  if (typeof raw !== 'object' || raw === null)
205
209
  continue;
206
- const { label, url, key, door, pin, host, owner, told, listed } = raw;
210
+ const { label, url, key, door, pin, host, owner, told, logins, listed, seenAt } = raw;
207
211
  const ids = Array.isArray(listed) ? listed.filter((id) => typeof id === 'string' && DEVICE_ID.test(id)).slice(0, MACHINE_LIMITS.count) : [];
208
212
  if (typeof label !== 'string' || typeof url !== 'string' || typeof key !== 'string' || typeof door !== 'string')
209
213
  continue;
210
214
  if (!url || !key || !door || seen.has(url))
211
215
  continue;
212
216
  seen.add(url);
213
- machines.push({ id: url, label: label.trim().slice(0, MACHINE_LIMITS.label) || url, url, key, door, ...(typeof pin === 'string' && pin ? { pin } : {}), ...(isHostName(host) ? { host } : {}), ...(isPersonName(owner) ? { owner } : {}), ...(told === true ? { told: true } : {}), ...(ids.length ? { listed: ids } : {}) });
217
+ machines.push({ id: url, label: label.trim().slice(0, MACHINE_LIMITS.label) || url, url, key, door, ...(typeof pin === 'string' && pin ? { pin } : {}), ...(isHostName(host) ? { host } : {}), ...(isPersonName(owner) ? { owner } : {}), ...(told === true ? { told: true } : {}), ...(logins === true ? { logins: true } : {}), ...(ids.length ? { listed: ids } : {}), ...(typeof seenAt === 'string' && !Number.isNaN(Date.parse(seenAt)) ? { seenAt } : {}) });
214
218
  }
215
219
  return machines;
216
220
  }
@@ -466,6 +470,18 @@ export async function noteListed(machine, listed, fs = nodeRegistryFs(), env = p
466
470
  await writeRegistry({ ...registry, machines: (registry.machines ?? []).map(candidate => (candidate.id === machine.id ? kept : candidate)) }, fs, env);
467
471
  });
468
472
  }
473
+ /** How stale the kept time a machine was last seen may be before it is written again. */
474
+ const SEEN_KEPT_MS = 60_000;
475
+ /** Keep when a saved machine last answered, once a minute at most: the file is not written at each answer. */
476
+ export async function noteSeen(machine, at, fs = nodeRegistryFs(), env = process.env) {
477
+ await serialize(async () => {
478
+ const registry = await readRegistry(fs, env);
479
+ const saved = (registry.machines ?? []).find(candidate => candidate.id === machine.id);
480
+ if (!saved || saved.key !== machine.key || (saved.seenAt !== undefined && Date.parse(at) - Date.parse(saved.seenAt) < SEEN_KEPT_MS))
481
+ return;
482
+ await writeRegistry({ ...registry, machines: (registry.machines ?? []).map(candidate => (candidate.id === machine.id ? { ...saved, seenAt: at } : candidate)) }, fs, env);
483
+ });
484
+ }
469
485
  /** Write down that the person was told their logins are copied to a saved machine of another person's. Answers whether it is saved. */
470
486
  export async function tellMachine(id, fs = nodeRegistryFs(), env = process.env) {
471
487
  return serialize(async () => {
@@ -479,6 +495,19 @@ export async function tellMachine(id, fs = nodeRegistryFs(), env = process.env)
479
495
  return true;
480
496
  });
481
497
  }
498
+ /** Say whether a saved server uses this computer's logins. Answers whether it is saved. */
499
+ export async function useLoginsOn(id, on, fs = nodeRegistryFs(), env = process.env) {
500
+ return serialize(async () => {
501
+ const registry = await readRegistry(fs, env);
502
+ const saved = (registry.machines ?? []).find(candidate => candidate.id === id);
503
+ if (!saved)
504
+ return false;
505
+ const { logins: _was, ...rest } = saved;
506
+ const next = on ? { ...rest, logins: true } : rest;
507
+ await writeRegistry({ ...registry, machines: (registry.machines ?? []).map(machine => (machine.id === id ? next : machine)) }, fs, env);
508
+ return true;
509
+ });
510
+ }
482
511
  /** Give a saved machine the name the person picked. Answers the machine as saved; nothing when it is not saved, or the name is empty. */
483
512
  export async function renameMachine(id, label, fs = nodeRegistryFs(), env = process.env) {
484
513
  const name = label.trim().slice(0, MACHINE_LIMITS.label);