@openagt/dashboard 0.34.0 → 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.
- package/dist/built-in.d.ts.map +1 -1
- package/dist/built-in.js +1 -1
- package/dist/built-in.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +3 -0
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/copy-logins.js +5 -5
- package/dist/dashboard/copy-logins.js.map +1 -1
- package/dist/dashboard/git-hosts.d.ts +38 -0
- package/dist/dashboard/git-hosts.d.ts.map +1 -0
- package/dist/dashboard/git-hosts.js +53 -0
- package/dist/dashboard/git-hosts.js.map +1 -0
- package/dist/dashboard/machine-logins.d.ts +2 -2
- package/dist/dashboard/machine-logins.js +2 -2
- package/dist/dashboard/person.d.ts +1 -1
- package/dist/dashboard/person.js +1 -1
- package/dist/dashboard/relay-endpoints.d.ts +4 -3
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
- package/dist/dashboard/relay-endpoints.js +13 -5
- package/dist/dashboard/relay-endpoints.js.map +1 -1
- package/dist/dashboard/remote-run.d.ts +16 -4
- package/dist/dashboard/remote-run.d.ts.map +1 -1
- package/dist/dashboard/remote-run.js +41 -8
- package/dist/dashboard/remote-run.js.map +1 -1
- package/dist/dashboard-bundle/assets/main-DN0tccor.css +2 -0
- package/dist/dashboard-bundle/assets/main-DRAtR1K3.js +148 -0
- package/dist/dashboard-bundle/assets/module-BO3UMgK4.js +14 -0
- package/dist/dashboard-bundle/host/module.js +1 -1
- package/dist/dashboard-bundle/index.html +3 -3
- package/dist/dashboard-rpc/accounts.d.ts +82 -0
- package/dist/dashboard-rpc/accounts.d.ts.map +1 -0
- package/dist/dashboard-rpc/accounts.js +224 -0
- package/dist/dashboard-rpc/accounts.js.map +1 -0
- package/dist/dashboard-rpc/index.d.ts +3 -1
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +6 -2
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/logins.d.ts +98 -0
- package/dist/dashboard-rpc/logins.d.ts.map +1 -0
- package/dist/dashboard-rpc/logins.js +203 -0
- package/dist/dashboard-rpc/logins.js.map +1 -0
- package/dist/dashboard-rpc/machines.d.ts +24 -2
- package/dist/dashboard-rpc/machines.d.ts.map +1 -1
- package/dist/dashboard-rpc/machines.js +37 -7
- package/dist/dashboard-rpc/machines.js.map +1 -1
- package/dist/dashboard-rpc/projects.js +1 -1
- package/dist/dashboard-rpc/projects.js.map +1 -1
- package/dist/local-bin.d.ts +8 -0
- package/dist/local-bin.d.ts.map +1 -0
- package/dist/local-bin.js +16 -0
- package/dist/local-bin.js.map +1 -0
- package/dist/module-types/dashboard/components/Waiting.d.ts +10 -0
- package/dist/module-types/dashboard/lib/machines.d.ts +2 -0
- package/dist/module-types/dashboard/lib/settings-crumb.d.ts +15 -0
- package/dist/module-types/dashboard/lib/use-narrow.d.ts +3 -0
- package/dist/module-types/dashboard/module/index.d.ts +22 -7
- package/dist/module-types/dashboard/rpc/machines.d.ts +7 -0
- package/dist/module-types/src/dashboard/git-hosts.d.ts +37 -0
- package/dist/module-types/src/dashboard/machine-logins.d.ts +2 -2
- package/dist/module-types/src/dashboard/person.d.ts +1 -1
- package/dist/module-types/src/dashboard/remote-run.d.ts +16 -4
- package/dist/module-types/src/dashboard-rpc/accounts.d.ts +81 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +3 -1
- package/dist/module-types/src/dashboard-rpc/logins.d.ts +97 -0
- package/dist/module-types/src/dashboard-rpc/machines.d.ts +24 -2
- package/dist/module-types/src/project-hooks.d.ts +5 -0
- package/dist/module-types/src/registry.d.ts +15 -0
- package/dist/project-hooks.d.ts +5 -0
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +4 -1
- package/dist/project-hooks.js.map +1 -1
- package/dist/quota-boundary.d.ts.map +1 -1
- package/dist/quota-boundary.js +7 -3
- package/dist/quota-boundary.js.map +1 -1
- package/dist/registry.d.ts +15 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +36 -2
- package/dist/registry.js.map +1 -1
- package/package.json +25 -26
- package/dist/dashboard-bundle/assets/main-Bmnmb8kW.js +0 -144
- package/dist/dashboard-bundle/assets/main-vGm5VAD9.css +0 -2
- package/dist/dashboard-bundle/assets/module-Bl9E9F3x.js +0 -14
|
@@ -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
|
|
216
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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,
|
|
53
|
-
* name, which the records of its runs carry
|
|
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 = "/
|
|
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
|
-
/**
|
|
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;
|
|
@@ -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 = ({
|
|
@@ -48,6 +48,11 @@ export interface MachineRecord {
|
|
|
48
48
|
owner?: string;
|
|
49
49
|
/** The person was told, once, that their logins are copied to that other person's computer. */
|
|
50
50
|
told?: true;
|
|
51
|
+
/**
|
|
52
|
+
* The ids the machine is listed under at the doors of the machines it saved, as it last said:
|
|
53
|
+
* kept, so it is known to be in at this computer's door too while it does not answer.
|
|
54
|
+
*/
|
|
55
|
+
listed?: string[];
|
|
51
56
|
}
|
|
52
57
|
/** A GitHub account as a person on a computer is known by: letters, digits and single dashes, at most 39. */
|
|
53
58
|
export declare function isAccount(value: unknown): value is string;
|
|
@@ -321,8 +326,18 @@ export declare function nameMachine(machine: {
|
|
|
321
326
|
id: string;
|
|
322
327
|
key: string;
|
|
323
328
|
}, host: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
|
|
329
|
+
/**
|
|
330
|
+
* Keep the ids a saved machine said it is listed under at the doors it saved, when they changed.
|
|
331
|
+
* `key` is the key the machine was asked with: a machine saved anew since keeps what it says itself.
|
|
332
|
+
*/
|
|
333
|
+
export declare function noteListed(machine: {
|
|
334
|
+
id: string;
|
|
335
|
+
key: string;
|
|
336
|
+
}, listed: string[], fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<void>;
|
|
324
337
|
/** Write down that the person was told their logins are copied to a saved machine of another person's. Answers whether it is saved. */
|
|
325
338
|
export declare function tellMachine(id: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<boolean>;
|
|
339
|
+
/** 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. */
|
|
340
|
+
export declare function renameMachine(id: string, label: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<MachineRecord | undefined>;
|
|
326
341
|
/** Take a saved machine off the list, by id. Answers the one that was there. */
|
|
327
342
|
export declare function removeMachine(id: string, fs?: RegistryFs, env?: NodeJS.ProcessEnv): Promise<MachineRecord | undefined>;
|
|
328
343
|
/** A {@link PreferencesStore} bound to the real registry file, wired by the daemon so the
|
package/dist/project-hooks.d.ts
CHANGED
|
@@ -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 = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-hooks.d.ts","sourceRoot":"","sources":["../src/project-hooks.ts"],"names":[],"mappings":"AAQA;;;;;;;;;;;;GAYG;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,yBAA+B,CAAA;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,eAAe,QAAS,CAAA;AAErC,yIAAyI;AACzI,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAEvC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAA;AAK5C,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,EAAE,CAAA;IACd,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAKD;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC,CAa7G;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,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AE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,GAAE,IAAI,CAAC,eAAe,EAAE,KAAK,CAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CA0B7I;AAED;;;;;GAKG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAE7F"}
|
package/dist/project-hooks.js
CHANGED
|
@@ -187,8 +187,11 @@ export async function runCheckHook(cwd, input, opts = {}) {
|
|
|
187
187
|
};
|
|
188
188
|
const problems = lines('problems');
|
|
189
189
|
const warnings = lines('warnings');
|
|
190
|
+
const fix = said && typeof said === 'object' ? said['fix'] : undefined;
|
|
191
|
+
const kind = fix?.kind === 'install' ? 'install' : fix?.kind === 'log-in' ? 'log-in' : undefined;
|
|
192
|
+
const fixed = kind !== undefined && typeof fix?.command === 'string' ? { fix: { kind, command: fix.command } } : {};
|
|
190
193
|
if (outcome.summary === 'exit 0' && problems && warnings)
|
|
191
|
-
return { ok: true, problems, warnings };
|
|
194
|
+
return { ok: true, problems, warnings, ...fixed };
|
|
192
195
|
const lastSaid = outcome.stderr.split('\n').map(s => s.trim()).filter(Boolean).at(-1);
|
|
193
196
|
return { ok: false, error: `the check hook: ${lastSaid ?? (outcome.summary === 'exit 0' ? 'it answered no problems and warnings' : outcome.summary)}` };
|
|
194
197
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-hooks.js","sourceRoot":"","sources":["../src/project-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACrD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,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AA;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quota-boundary.d.ts","sourceRoot":"","sources":["../src/quota-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE9D,6BAA6B;AAC7B,eAAO,MAAM,aAAa,QAA0B,CAAA;AAQpD,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAA;IACX,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAA;CAChB;AAuCD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6B3E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAKjF;
|
|
1
|
+
{"version":3,"file":"quota-boundary.d.ts","sourceRoot":"","sources":["../src/quota-boundary.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE9D,6BAA6B;AAC7B,eAAO,MAAM,aAAa,QAA0B,CAAA;AAQpD,gEAAgE;AAChE,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,4CAA4C;IAC5C,GAAG,EAAE,MAAM,CAAA;IACX,yEAAyE;IACzE,OAAO,EAAE,MAAM,CAAA;CAChB;AAuCD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6B3E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,CAKjF;AAQD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,SAAS,iBAAiB,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAI1G"}
|
package/dist/quota-boundary.js
CHANGED
|
@@ -119,6 +119,12 @@ export function boundaryFromResetsAt(resetsAt, now) {
|
|
|
119
119
|
const day = Math.min(WEEK_DAYS, Math.floor(elapsedMs / ONE_DAY_MS) + 1);
|
|
120
120
|
return { startsAt, resetsAt, day, percent: (elapsedMs / QUOTA_WEEK_MS) * 100 };
|
|
121
121
|
}
|
|
122
|
+
/** When the week resets: the exact time where the reading has it (a turn's rate-limit line), else read off the agent's words. */
|
|
123
|
+
function weekResetsAt(week, now) {
|
|
124
|
+
if (week.resetsAt !== undefined)
|
|
125
|
+
return week.resetsAt;
|
|
126
|
+
return week.resetsAtText ? parseResetsAt(week.resetsAtText, now) : undefined;
|
|
127
|
+
}
|
|
122
128
|
/**
|
|
123
129
|
* Where the boundary sits for the account's own week, as the agent reported it (#879).
|
|
124
130
|
*
|
|
@@ -127,9 +133,7 @@ export function boundaryFromResetsAt(resetsAt, now) {
|
|
|
127
133
|
*/
|
|
128
134
|
export function weekBoundary(windows, now) {
|
|
129
135
|
const week = windows.find(w => w.kind === 'week');
|
|
130
|
-
|
|
131
|
-
return undefined;
|
|
132
|
-
const resetsAt = parseResetsAt(week.resetsAtText, now);
|
|
136
|
+
const resetsAt = week && weekResetsAt(week, now);
|
|
133
137
|
return resetsAt === undefined ? undefined : boundaryFromResetsAt(resetsAt, now);
|
|
134
138
|
}
|
|
135
139
|
//# sourceMappingURL=quota-boundary.js.map
|