@openagt/dashboard 0.37.0 → 0.39.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/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +1 -0
- package/dist/client.js.map +1 -1
- package/dist/computer-name.d.ts +3 -0
- package/dist/computer-name.d.ts.map +1 -0
- package/dist/computer-name.js +6 -0
- package/dist/computer-name.js.map +1 -0
- package/dist/daemon-runtime.d.ts.map +1 -1
- package/dist/daemon-runtime.js +64 -7
- package/dist/daemon-runtime.js.map +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/daemon.js +6 -1
- package/dist/daemon.js.map +1 -1
- package/dist/dashboard/compress.d.ts +23 -0
- package/dist/dashboard/compress.d.ts.map +1 -0
- package/dist/dashboard/compress.js +55 -0
- package/dist/dashboard/compress.js.map +1 -0
- package/dist/dashboard/copied-logins.d.ts +54 -0
- package/dist/dashboard/copied-logins.d.ts.map +1 -0
- package/dist/dashboard/copied-logins.js +60 -0
- package/dist/dashboard/copied-logins.js.map +1 -0
- package/dist/dashboard/copy-logins.d.ts +5 -1
- package/dist/dashboard/copy-logins.d.ts.map +1 -1
- package/dist/dashboard/copy-logins.js +9 -3
- package/dist/dashboard/copy-logins.js.map +1 -1
- package/dist/dashboard/git-hosts.d.ts +2 -0
- package/dist/dashboard/git-hosts.d.ts.map +1 -1
- package/dist/dashboard/git-hosts.js +1 -1
- package/dist/dashboard/git-hosts.js.map +1 -1
- package/dist/dashboard/logins-sync.d.ts +146 -0
- package/dist/dashboard/logins-sync.d.ts.map +1 -0
- package/dist/dashboard/logins-sync.js +344 -0
- package/dist/dashboard/logins-sync.js.map +1 -0
- package/dist/dashboard/machine-runs.d.ts +111 -0
- package/dist/dashboard/machine-runs.d.ts.map +1 -0
- package/dist/dashboard/machine-runs.js +252 -0
- package/dist/dashboard/machine-runs.js.map +1 -0
- package/dist/dashboard/module-agents.d.ts +44 -0
- package/dist/dashboard/module-agents.d.ts.map +1 -0
- package/dist/dashboard/module-agents.js +25 -0
- package/dist/dashboard/module-agents.js.map +1 -0
- package/dist/dashboard/module-serve.d.ts +10 -1
- package/dist/dashboard/module-serve.d.ts.map +1 -1
- package/dist/dashboard/module-serve.js +25 -6
- package/dist/dashboard/module-serve.js.map +1 -1
- package/dist/dashboard/relay-endpoints.d.ts +8 -4
- package/dist/dashboard/relay-endpoints.d.ts.map +1 -1
- package/dist/dashboard/relay-endpoints.js +41 -9
- package/dist/dashboard/relay-endpoints.js.map +1 -1
- package/dist/dashboard/remote-run.d.ts +18 -3
- package/dist/dashboard/remote-run.d.ts.map +1 -1
- package/dist/dashboard/remote-run.js +32 -5
- package/dist/dashboard/remote-run.js.map +1 -1
- package/dist/dashboard/rpc-serve.d.ts +8 -2
- package/dist/dashboard/rpc-serve.d.ts.map +1 -1
- package/dist/dashboard/rpc-serve.js +41 -11
- package/dist/dashboard/rpc-serve.js.map +1 -1
- package/dist/dashboard/runs-watch.d.ts +32 -0
- package/dist/dashboard/runs-watch.d.ts.map +1 -0
- package/dist/dashboard/runs-watch.js +89 -0
- package/dist/dashboard/runs-watch.js.map +1 -0
- package/dist/dashboard/server.d.ts +4 -2
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +1 -1
- package/dist/dashboard/server.js.map +1 -1
- package/dist/dashboard/static.d.ts.map +1 -1
- package/dist/dashboard/static.js +8 -6
- package/dist/dashboard/static.js.map +1 -1
- package/dist/dashboard-bundle/assets/host/module-CUc1n2SP.js +1 -0
- package/dist/dashboard-bundle/assets/host/react-B7Fi4tYT.js +1 -0
- package/dist/dashboard-bundle/assets/host/react-dom-client-owmMVl4T.js +1 -0
- package/dist/dashboard-bundle/assets/host/react-dom-oeGwGKD7.js +1 -0
- package/dist/dashboard-bundle/assets/host/react-jsx-runtime-Dxx08tyw.js +1 -0
- package/dist/dashboard-bundle/assets/main-Cv9CrCec.css +2 -0
- package/dist/dashboard-bundle/assets/main-dejlwmyP.js +149 -0
- package/dist/dashboard-bundle/assets/module-DR2oCWs5.js +14 -0
- package/dist/dashboard-bundle/index.html +10 -9
- package/dist/dashboard-rpc/accounts.d.ts +17 -1
- package/dist/dashboard-rpc/accounts.d.ts.map +1 -1
- package/dist/dashboard-rpc/accounts.js +46 -8
- package/dist/dashboard-rpc/accounts.js.map +1 -1
- package/dist/dashboard-rpc/context.js +1 -1
- package/dist/dashboard-rpc/context.js.map +1 -1
- package/dist/dashboard-rpc/copied-logins.d.ts +49 -0
- package/dist/dashboard-rpc/copied-logins.d.ts.map +1 -0
- package/dist/dashboard-rpc/copied-logins.js +179 -0
- package/dist/dashboard-rpc/copied-logins.js.map +1 -0
- package/dist/dashboard-rpc/index.d.ts +6 -3
- package/dist/dashboard-rpc/index.d.ts.map +1 -1
- package/dist/dashboard-rpc/index.js +10 -4
- package/dist/dashboard-rpc/index.js.map +1 -1
- package/dist/dashboard-rpc/logins.d.ts +18 -0
- package/dist/dashboard-rpc/logins.d.ts.map +1 -1
- package/dist/dashboard-rpc/logins.js +51 -7
- package/dist/dashboard-rpc/logins.js.map +1 -1
- package/dist/dashboard-rpc/machines.d.ts +15 -2
- package/dist/dashboard-rpc/machines.d.ts.map +1 -1
- package/dist/dashboard-rpc/machines.js +32 -8
- package/dist/dashboard-rpc/machines.js.map +1 -1
- package/dist/dashboard-rpc/modules.d.ts +9 -9
- package/dist/dashboard-rpc/modules.d.ts.map +1 -1
- package/dist/dashboard-rpc/modules.js +14 -13
- package/dist/dashboard-rpc/modules.js.map +1 -1
- package/dist/dashboard-rpc/people.d.ts +16 -0
- package/dist/dashboard-rpc/people.d.ts.map +1 -0
- package/dist/dashboard-rpc/people.js +32 -0
- package/dist/dashboard-rpc/people.js.map +1 -0
- package/dist/dashboard-rpc/reads.d.ts +29 -1
- package/dist/dashboard-rpc/reads.d.ts.map +1 -1
- package/dist/dashboard-rpc/reads.js +111 -8
- package/dist/dashboard-rpc/reads.js.map +1 -1
- package/dist/dashboard-rpc/relay-dispatch.d.ts +6 -0
- package/dist/dashboard-rpc/relay-dispatch.d.ts.map +1 -1
- package/dist/dashboard-rpc/relay-dispatch.js +25 -2
- package/dist/dashboard-rpc/relay-dispatch.js.map +1 -1
- package/dist/dashboard-rpc/runs-changed.d.ts +8 -0
- package/dist/dashboard-rpc/runs-changed.d.ts.map +1 -0
- package/dist/dashboard-rpc/runs-changed.js +62 -0
- package/dist/dashboard-rpc/runs-changed.js.map +1 -0
- package/dist/dashboard-rpc/server-logins.d.ts +22 -0
- package/dist/dashboard-rpc/server-logins.d.ts.map +1 -0
- package/dist/dashboard-rpc/server-logins.js +26 -0
- package/dist/dashboard-rpc/server-logins.js.map +1 -0
- package/dist/dashboard-rpc/test-context.js +1 -1
- package/dist/dashboard-rpc/test-context.js.map +1 -1
- package/dist/health.d.ts +20 -0
- package/dist/health.d.ts.map +1 -0
- package/dist/health.js +98 -0
- package/dist/health.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/module-types/dashboard/components/FilterChips.d.ts +12 -0
- package/dist/module-types/dashboard/components/Page.d.ts +12 -0
- package/dist/module-types/dashboard/components/SidebarToggle.d.ts +4 -0
- package/dist/module-types/dashboard/components/StatTile.d.ts +15 -0
- package/dist/module-types/dashboard/components/ui/sheet.d.ts +10 -0
- package/dist/module-types/dashboard/components/ui/sidebar.d.ts +71 -0
- package/dist/module-types/dashboard/lib/use-async.d.ts +24 -6
- package/dist/module-types/dashboard/lib/use-mobile.d.ts +4 -0
- package/dist/module-types/dashboard/lib/use-modules.d.ts +7 -3
- package/dist/module-types/dashboard/module/index.d.ts +42 -15
- package/dist/module-types/src/client.d.ts +1 -0
- package/dist/module-types/src/computer-name.d.ts +2 -0
- package/dist/module-types/src/dashboard/compress.d.ts +22 -0
- package/dist/module-types/src/dashboard/copied-logins.d.ts +53 -0
- package/dist/module-types/src/dashboard/git-hosts.d.ts +2 -0
- package/dist/module-types/src/dashboard/logins-sync.d.ts +145 -0
- package/dist/module-types/src/dashboard/machine-runs.d.ts +110 -0
- package/dist/module-types/src/dashboard/module-agents.d.ts +43 -0
- package/dist/module-types/src/dashboard/module-serve.d.ts +10 -1
- package/dist/module-types/src/dashboard/remote-run.d.ts +18 -3
- package/dist/module-types/src/dashboard/rpc-serve.d.ts +8 -2
- package/dist/module-types/src/dashboard/runs-watch.d.ts +31 -0
- package/dist/module-types/src/dashboard-rpc/accounts.d.ts +17 -1
- package/dist/module-types/src/dashboard-rpc/copied-logins.d.ts +48 -0
- package/dist/module-types/src/dashboard-rpc/index.d.ts +6 -3
- package/dist/module-types/src/dashboard-rpc/logins.d.ts +18 -0
- package/dist/module-types/src/dashboard-rpc/machines.d.ts +15 -2
- package/dist/module-types/src/dashboard-rpc/modules.d.ts +9 -9
- package/dist/module-types/src/dashboard-rpc/people.d.ts +15 -0
- package/dist/module-types/src/dashboard-rpc/reads.d.ts +29 -1
- package/dist/module-types/src/dashboard-rpc/runs-changed.d.ts +7 -0
- package/dist/module-types/src/dashboard-rpc/server-logins.d.ts +21 -0
- package/dist/module-types/src/health.d.ts +19 -0
- package/dist/module-types/src/index.d.ts +1 -0
- package/dist/module-types/src/overview-layout.d.ts +37 -0
- package/dist/module-types/src/project-hooks.d.ts +11 -1
- package/dist/module-types/src/registry.d.ts +14 -0
- package/dist/module-types/src/store/agent-store.d.ts +15 -1
- package/dist/module-types/src/store/branches.d.ts +2 -2
- package/dist/module-types/src/store/git-host.d.ts +8 -2
- package/dist/module-types/src/store/provided.d.ts +5 -4
- package/dist/module-types/src/store/queue.d.ts +3 -2
- package/dist/module-types/src/store/runs.d.ts +6 -3
- package/dist/module-types/src/store/tickets.d.ts +3 -2
- package/dist/module.css +1 -1
- package/dist/overview-layout.d.ts +38 -0
- package/dist/overview-layout.d.ts.map +1 -0
- package/dist/overview-layout.js +61 -0
- package/dist/overview-layout.js.map +1 -0
- package/dist/project-hooks.d.ts +11 -1
- package/dist/project-hooks.d.ts.map +1 -1
- package/dist/project-hooks.js +21 -11
- package/dist/project-hooks.js.map +1 -1
- package/dist/registry.d.ts +14 -0
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +31 -2
- package/dist/registry.js.map +1 -1
- package/dist/store/agent-store.d.ts +15 -1
- package/dist/store/agent-store.d.ts.map +1 -1
- package/dist/store/agent-store.js.map +1 -1
- package/dist/store/branches.d.ts +2 -2
- package/dist/store/branches.d.ts.map +1 -1
- package/dist/store/branches.js +8 -2
- package/dist/store/branches.js.map +1 -1
- package/dist/store/git-host.d.ts +8 -2
- package/dist/store/git-host.d.ts.map +1 -1
- package/dist/store/git-host.js +21 -2
- package/dist/store/git-host.js.map +1 -1
- package/dist/store/provided.d.ts +5 -4
- package/dist/store/provided.d.ts.map +1 -1
- package/dist/store/provided.js +10 -9
- package/dist/store/provided.js.map +1 -1
- package/dist/store/queue.d.ts +3 -2
- package/dist/store/queue.d.ts.map +1 -1
- package/dist/store/queue.js +9 -2
- package/dist/store/queue.js.map +1 -1
- package/dist/store/runs.d.ts +6 -3
- package/dist/store/runs.d.ts.map +1 -1
- package/dist/store/runs.js +10 -3
- package/dist/store/runs.js.map +1 -1
- package/dist/store/tickets.d.ts +3 -2
- package/dist/store/tickets.d.ts.map +1 -1
- package/dist/store/tickets.js +9 -2
- package/dist/store/tickets.js.map +1 -1
- package/package.json +23 -23
- package/dist/dashboard-bundle/assets/main-B_YIbzfX.js +0 -148
- package/dist/dashboard-bundle/assets/main-COZtHuZ-.css +0 -2
- package/dist/dashboard-bundle/assets/module-B_KMN8r0.js +0 -14
- package/dist/dashboard-bundle/host/module.js +0 -1
- package/dist/dashboard-bundle/host/react-dom-client.js +0 -1
- package/dist/dashboard-bundle/host/react-dom.js +0 -1
- package/dist/dashboard-bundle/host/react-jsx-runtime.js +0 -1
- package/dist/dashboard-bundle/host/react.js +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type AgentMeta, type Checkout } from '../store/index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Who is told at once when this computer's runs of a project change: another computer that waits
|
|
4
|
+
* for them (machine-runs.ts), and a page that lists them (`/_rpc/changes`). Nothing tells
|
|
5
|
+
* OpenAgent when a run changes: a run's tool writes its card in the run's checkout. So while
|
|
6
|
+
* someone listens, the cards are read every second and compared by what a list shows of a run;
|
|
7
|
+
* the checkouts themselves are listed again less often, since that runs the branches provider,
|
|
8
|
+
* and at once when a run was just started here ({@link RunsWatch.poke}). Nobody listening,
|
|
9
|
+
* nothing is read.
|
|
10
|
+
*/
|
|
11
|
+
/** Where a project's runs with a checkout are read: its checkouts, and each one's card. */
|
|
12
|
+
export interface RunsWatchSource {
|
|
13
|
+
/** `fresh`: a checkout may have just come, and a list read a moment ago does not hold it. */
|
|
14
|
+
checkouts(cwd: string, fresh: boolean): Promise<readonly Checkout[]>;
|
|
15
|
+
card(checkout: Checkout): Promise<AgentMeta | undefined>;
|
|
16
|
+
}
|
|
17
|
+
export declare class RunsWatch {
|
|
18
|
+
private readonly source;
|
|
19
|
+
private readonly now;
|
|
20
|
+
private readonly everyMs;
|
|
21
|
+
private readonly watched;
|
|
22
|
+
constructor(source: RunsWatchSource, now?: () => number, everyMs?: number);
|
|
23
|
+
/** Tell `changed` each time the project's runs here change, until the answer is called. */
|
|
24
|
+
follow(cwd: string, changed: () => void): () => void;
|
|
25
|
+
/** A run of the project was just started here: its checkouts are listed again at every look for a while, from now. */
|
|
26
|
+
poke(cwd: string): void;
|
|
27
|
+
private lookIn;
|
|
28
|
+
private look;
|
|
29
|
+
}
|
|
30
|
+
/** This computer's own runs, watched for whoever listens. */
|
|
31
|
+
export declare const ownRunsWatch: RunsWatch;
|
|
@@ -16,6 +16,8 @@ export interface AccountRow {
|
|
|
16
16
|
id: string;
|
|
17
17
|
/** Its name as shown: the person's own goes by the agent's name for them until they give it one. */
|
|
18
18
|
name: string;
|
|
19
|
+
/** A login of the person's own computer, by that computer's name: a server's copy of it. */
|
|
20
|
+
from?: string;
|
|
19
21
|
/** The person's own login, which the agent keeps: it is never removed. */
|
|
20
22
|
own: boolean;
|
|
21
23
|
/** When an added one was added, ISO 8601. */
|
|
@@ -32,11 +34,19 @@ export interface AccountRow {
|
|
|
32
34
|
/** An account being added: the browser is open on the agent's page, or the login is being kept. */
|
|
33
35
|
export interface AccountAdding {
|
|
34
36
|
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. */
|
|
37
|
+
/** 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, or opens on their device where this computer has no browser. */
|
|
36
38
|
url?: string;
|
|
39
|
+
/** No browser here: the code Codex gave, which the person types at {@link url}. */
|
|
40
|
+
code?: string;
|
|
41
|
+
/** No browser here: Claude's page shows a code once the person said yes, which they paste back. */
|
|
42
|
+
paste?: true;
|
|
37
43
|
}
|
|
38
44
|
export interface AccountsView {
|
|
39
45
|
accounts: AccountRow[];
|
|
46
|
+
/** This computer's own name: what its own login's row says it is on. */
|
|
47
|
+
computer: string;
|
|
48
|
+
/** On a server: the computer of the person's whose logins it uses, by its name. */
|
|
49
|
+
from?: string;
|
|
40
50
|
adding?: AccountAdding;
|
|
41
51
|
/** Why the last add did not go through. */
|
|
42
52
|
failed?: string;
|
|
@@ -55,6 +65,10 @@ export declare const accountsWiring: {
|
|
|
55
65
|
codexFolder: (account: AgentAccount) => string;
|
|
56
66
|
codexWho: (home: string) => Promise<CodexWho>;
|
|
57
67
|
codexUsage: (home: string) => Promise<DriverRateWindow[]>;
|
|
68
|
+
/** No browser on this computer: a server's. */
|
|
69
|
+
headless: () => boolean;
|
|
70
|
+
/** This computer's own name. */
|
|
71
|
+
computer: () => string;
|
|
58
72
|
};
|
|
59
73
|
/** An agent's accounts in the order runs try them, each with how full it is and whether a limit keeps it out. */
|
|
60
74
|
export declare function onAgentAccounts(agent: AccountsAgent): Promise<AccountsView>;
|
|
@@ -70,6 +84,8 @@ export type AccountResult = {
|
|
|
70
84
|
* in {@link onAgentAccounts}.
|
|
71
85
|
*/
|
|
72
86
|
export declare function sendAddAgentAccount(agent: AccountsAgent, name: string): Promise<AccountResult>;
|
|
87
|
+
/** Hand Claude Code the code its page showed the person, on a computer with no browser of its own. */
|
|
88
|
+
export declare function sendAgentAccountCode(agent: AccountsAgent, code: string): Promise<AccountResult>;
|
|
73
89
|
/**
|
|
74
90
|
* Remove an added account. A Claude login is not ended: it is good until its year is over, or until
|
|
75
91
|
* it is taken back on claude.ai. A Codex account's folder, its login in it, goes with it.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type CopiedKind, type CopiedLogin, type GivenLogin, type UsageWindow } from '../dashboard/copied-logins.js';
|
|
2
|
+
import { type AccountResult } from './accounts.js';
|
|
3
|
+
/** What the RPCs reach for, swapped in tests. */
|
|
4
|
+
export declare const copiedWiring: {
|
|
5
|
+
/** Whether this OpenAgent is a server's: only a server takes logins. */
|
|
6
|
+
server: () => boolean;
|
|
7
|
+
/** Where a Codex account's sign-in is kept, a folder each. */
|
|
8
|
+
codexDir: () => string;
|
|
9
|
+
/** Run a git host's package command for `host`, with `input` on its standard input. */
|
|
10
|
+
gitHost: (host: string, args: string[], input?: string) => Promise<{
|
|
11
|
+
ok: true;
|
|
12
|
+
output: unknown;
|
|
13
|
+
} | {
|
|
14
|
+
ok: false;
|
|
15
|
+
error: string;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
/** What the server says it keeps, to the computer that asks. */
|
|
19
|
+
export type CopiedView = {
|
|
20
|
+
ok: true;
|
|
21
|
+
logins: Omit<CopiedLogin, 'usage'>[];
|
|
22
|
+
} | {
|
|
23
|
+
ok: false;
|
|
24
|
+
error: string;
|
|
25
|
+
};
|
|
26
|
+
/** What the server keeps from the person's computers, without how full each is: what a computer compares its own with. */
|
|
27
|
+
export declare function onCopiedLogins(): Promise<CopiedView>;
|
|
28
|
+
/**
|
|
29
|
+
* Take a login a computer of the person's handed over: it goes where its tool reads it, in place
|
|
30
|
+
* of what the same account of the same computer had here before. `secret` is the login: a
|
|
31
|
+
* Claude login, a Codex sign-in as Codex keeps it, a git host's token.
|
|
32
|
+
*/
|
|
33
|
+
export declare function sendCopiedLogin(given: GivenLogin, secret: string): Promise<AccountResult>;
|
|
34
|
+
/** Take a login a computer handed over off this server: it is deleted here, and goes on working wherever else it is. */
|
|
35
|
+
export declare function sendForgetCopiedLogin(which: Pick<CopiedLogin, 'kind' | 'host' | 'source'>): Promise<AccountResult>;
|
|
36
|
+
/**
|
|
37
|
+
* Keep a login the computer no longer has: the person said to. It is no longer that account of the
|
|
38
|
+
* computer's, so the computer's next login under the same account takes a place of its own.
|
|
39
|
+
*/
|
|
40
|
+
export declare function sendKeepCopiedLogin(which: Pick<CopiedLogin, 'kind' | 'host' | 'source'>): Promise<AccountResult>;
|
|
41
|
+
/** How full each login is, as the computer read it: shown on this server's page, whose own reading a Claude login made for it cannot make. */
|
|
42
|
+
export declare function sendCopiedUsage(readings: {
|
|
43
|
+
kind: CopiedKind;
|
|
44
|
+
host?: string;
|
|
45
|
+
source: string;
|
|
46
|
+
windows: UsageWindow[];
|
|
47
|
+
at: number;
|
|
48
|
+
}[]): Promise<AccountResult>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { onAgents, onAgent, onAgentsDoing, onDocs, onQueue, onOverview, onRecentAgents, onInterventions, onActivity, onDashboard, onGitHostHome, onRepositoryOffer, onGitStatus, onProjectFiles, onRetainedWorktrees, onAgentWorktree, onAgentHandoff, onBridgeQuestion, onBridgeStatus, onBridgeToken, onBridgeEvents, onBridgeAnswer, onBridgeBrowser } from './reads.js';
|
|
1
|
+
export { onAgents, onModuleAgents, onAgent, onAgentsDoing, onDocs, onQueue, onOverview, onRecentAgents, onInterventions, onActivity, onDashboard, onGitHostHome, onRepositoryOffer, onGitStatus, onProjectFiles, onRetainedWorktrees, onAgentWorktree, onAgentHandoff, onBridgeQuestion, onBridgeStatus, onBridgeToken, onBridgeEvents, onBridgeAnswer, onBridgeBrowser } from './reads.js';
|
|
2
2
|
export { sendStop, sendChoice, sendBridgeAnswer, sendBridgeAnswerCancel, sendBridgeBrowser, sendMessage, sendStart, sendOpenInApp, sendRemoveWorktree, sendDeleteAgent, sendOpenPullRequest, sendPush, sendMergeBranch, sendMerge, sendCreateRepository } from './control.js';
|
|
3
3
|
export { streamAgentEvents, type LiveFeedEvent, type PartialMessage, type StreamSync } from './events.js';
|
|
4
4
|
export { onProjects, sendAddProject, sendStartedAgain, onCloneTarget, sendAddProjectFromAddress, sendRemoveProject, onRecordsReach, sendShareRecords, sendPickProjectDirectory, onOnboarding, onCommands, onStartCheck, type ProjectLauncher } from './projects.js';
|
|
@@ -6,12 +6,15 @@ 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, sendRenameMachine, sendLetMachineIn, sendMachineLineLink, sendMachineCode, sendMachineTold, onMachineLogins, sendMachineLogins, type Machine, type MachineLoginsResult, type AddMachineResult, type MachineVersions, type ProjectOnMachine, type ComputersThrough, type MachinePerson, type MachineCode } from './machines.js';
|
|
9
|
+
export { onMachines, sendAddMachine, sendRemoveMachine, onMachinesReachable, onMachineVersions, sendProjectToMachine, onProjectOnMachine, onMachineStartCheck, onComputersThrough, sendAddComputerThrough, onMachinePerson, sendRemoveMachineDevice, sendRenameMachine, sendLetMachineIn, sendMachineLineLink, sendMachineCode, sendMachineTold, onMachineLogins, sendMachineLogins, type Machine, type MachineLoginsResult, type AddMachineResult, type MachineVersions, type ProjectOnMachine, type ComputersThrough, type MachinePerson, type MachineCode } 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 { onGitHostPeople, type HostPerson } from './people.js';
|
|
13
14
|
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 {
|
|
15
|
+
export { onServerLogins, sendUseLoginsOn, sendAllowLogins, sendSettleLogin, type ServerLoginsView, type ServerLogins, type LoginThere } from './server-logins.js';
|
|
16
|
+
export { onCopiedLogins, sendCopiedLogin, sendForgetCopiedLogin, sendKeepCopiedLogin, sendCopiedUsage, type CopiedView } from './copied-logins.js';
|
|
17
|
+
export { onAgentAccounts, sendAddAgentAccount, sendAgentAccountCode, sendRemoveAgentAccount, sendUseAgentAccountFirst, sendNameOwnAgentAccount, type AccountsAgent, type AccountRow, type AccountWindow, type AccountAdding, type AccountsView, type AccountResult } from './accounts.js';
|
|
15
18
|
import { streamAgentEvents } from './events.js';
|
|
16
19
|
/** One RPC: called with whatever the browser sent, answering with whatever JSON.stringify keeps. */
|
|
17
20
|
export type RpcHandler = (...args: never[]) => unknown;
|
|
@@ -21,6 +21,8 @@ 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>;
|
|
@@ -31,6 +33,20 @@ export declare const loginsWiring: {
|
|
|
31
33
|
* the last answer when there is one for the same projects, the hosts being read again behind it.
|
|
32
34
|
*/
|
|
33
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
|
+
};
|
|
34
50
|
/** Runs use `login` at `host` from now on; the terminal's own account stays as it is. */
|
|
35
51
|
export declare function sendUseGitHostAccount(host: string, login: string): Promise<AccountResult>;
|
|
36
52
|
/** Log another account in at `host`, in the browser: the code the person types, and where. */
|
|
@@ -53,6 +69,8 @@ export interface AgentState {
|
|
|
53
69
|
problem?: string;
|
|
54
70
|
/** What a press does about it, when the agent's package declared a command for it. */
|
|
55
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;
|
|
56
74
|
/** A press's fix going on. */
|
|
57
75
|
fixing?: DriverFix['kind'];
|
|
58
76
|
/** Why the last press's fix failed. */
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { type Health } from '../health.js';
|
|
1
2
|
import { type MachineLogins } from '../dashboard/machine-logins.js';
|
|
3
|
+
import { type StartReadiness } from '../project-hooks.js';
|
|
2
4
|
/** A saved machine as the browser sees it: no key. */
|
|
3
5
|
export interface Machine {
|
|
4
6
|
id: string;
|
|
@@ -151,12 +153,16 @@ export interface MachineVersions {
|
|
|
151
153
|
version: string;
|
|
152
154
|
/** This computer's own name, as another machine lists it. */
|
|
153
155
|
name: string;
|
|
156
|
+
/** How this computer stands: its memory, disk and load. */
|
|
157
|
+
health?: Health;
|
|
154
158
|
/**
|
|
155
|
-
* Each saved machine, with its version when it answers and says, the id it
|
|
156
|
-
* under among its devices, and the ids it is listed under at the doors of
|
|
159
|
+
* Each saved machine, with its version and how it stands when it answers and says, the id it
|
|
160
|
+
* lists this computer under among its devices, and the ids it is listed under at the doors of
|
|
161
|
+
* the machines it saved.
|
|
157
162
|
*/
|
|
158
163
|
machines: (Machine & {
|
|
159
164
|
version?: string;
|
|
165
|
+
health?: Health;
|
|
160
166
|
device?: string;
|
|
161
167
|
listed?: string[];
|
|
162
168
|
})[];
|
|
@@ -201,3 +207,10 @@ export type ProjectOnMachine = {
|
|
|
201
207
|
export declare function sendProjectToMachine(projectId: string, machineId: string): Promise<ProjectOnMachine>;
|
|
202
208
|
/** Whether a saved machine has the project by now, or why it will not: asked while the machine clones it. */
|
|
203
209
|
export declare function onProjectOnMachine(projectId: string, machineId: string): Promise<ProjectOnMachine>;
|
|
210
|
+
/**
|
|
211
|
+
* What would stop a run sent to a saved machine, as the machine says from its own copy of the
|
|
212
|
+
* project: its coding agent there, installed and logged in. `null` when there is nothing to say:
|
|
213
|
+
* a machine that does not answer, does not have the project yet (it clones it at the first run),
|
|
214
|
+
* or has no check.
|
|
215
|
+
*/
|
|
216
|
+
export declare function onMachineStartCheck(projectId: string, machineId: string, driver?: string): Promise<StartReadiness | null>;
|
|
@@ -6,7 +6,7 @@ export type { ModuleReadResult } from '../dashboard/module-host.js';
|
|
|
6
6
|
export interface DashboardModule {
|
|
7
7
|
/** The package that brings it. */
|
|
8
8
|
package: string;
|
|
9
|
-
/** The URL of its browser module, served from the first project that has it, or from OpenAgent's own copy for one of the computer's. */
|
|
9
|
+
/** The URL of its browser module, served from the first project that has it, or from OpenAgent's own copy for one of the computer's, with its file's version: a browser keeps it for good. */
|
|
10
10
|
url: string;
|
|
11
11
|
/** The registered projects whose packages include it, in the registry's order; none for one of the computer's, whose commands run in no project. */
|
|
12
12
|
projects: string[];
|
|
@@ -26,15 +26,15 @@ export declare function onModules(): Promise<DashboardModule[]>;
|
|
|
26
26
|
* Run one of a module package's commands in one project and answer its JSON output: how a module
|
|
27
27
|
* reads (and changes) its own data. Refused for an unknown project and for a package that is not a
|
|
28
28
|
* module of that project, so a page can run only its own package's commands, never an arbitrary
|
|
29
|
-
* program.
|
|
30
|
-
* provided data (its queue, its runs): the command may have written it, and the next read sees
|
|
31
|
-
* that at once instead of a cached copy.
|
|
29
|
+
* program.
|
|
32
30
|
*
|
|
33
|
-
* `acts` says the command is a module's action on the project (a
|
|
34
|
-
*
|
|
35
|
-
* every minute,
|
|
36
|
-
*
|
|
37
|
-
*
|
|
31
|
+
* `acts` says the command is a module's action on the project (a claim released, an entry added),
|
|
32
|
+
* not a page's read. Only then does OpenAgent converge the project's data branch with origin, as
|
|
33
|
+
* its clock does every minute, and forget what it had read of the data that package provides (the
|
|
34
|
+
* queue package's queue): in a project that shares its records a package's command writes as a
|
|
35
|
+
* remote writer, straight to origin, and the next read shows the change at once instead of at the
|
|
36
|
+
* next sync. A read writes nothing, so what was read stays: the Members card reading the logs
|
|
37
|
+
* package's people leaves the runs that package provides read.
|
|
38
38
|
*/
|
|
39
39
|
export declare function runModuleCommand(projectId: string, pkg: string, args: string[], command?: string, acts?: boolean): Promise<ModuleCommandResult>;
|
|
40
40
|
/**
|
|
@@ -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[]>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ModuleAgent, type ModuleAgentsWanted } from '../dashboard/module-agents.js';
|
|
1
2
|
import type { BridgeBrowserStatus } from '../bridge-browser.js';
|
|
2
3
|
import { type AgentDoing, type AgentMeta, type BranchesFor } from '../store/index.js';
|
|
3
4
|
import { type GitHostHome } from '../store/git-host.js';
|
|
@@ -17,6 +18,7 @@ import type { OpenAgentEvent } from '../events.js';
|
|
|
17
18
|
import type { BridgeEvent, BridgeHello, BridgeQuestion } from '../dashboard/bridge-endpoints.js';
|
|
18
19
|
import type { BridgeAnswer, BridgeContact, BridgeVersion } from '../dashboard/bridge-store.js';
|
|
19
20
|
import type { SavedMachine } from '../dashboard/rpc-serve.js';
|
|
21
|
+
import { type OwnRuns } from '../dashboard/machine-runs.js';
|
|
20
22
|
/**
|
|
21
23
|
* The project's runs, most-recent first (or `[]`). The archived (finished) runs
|
|
22
24
|
* from `agents/`, plus every live agent prepended — so the sidebar shows an in-progress
|
|
@@ -37,6 +39,31 @@ import type { SavedMachine } from '../dashboard/rpc-serve.js';
|
|
|
37
39
|
* instead of losing it.
|
|
38
40
|
*/
|
|
39
41
|
export declare function onAgents(projectId: string): Promise<AgentMeta[]>;
|
|
42
|
+
/**
|
|
43
|
+
* A project's runs as a module sees them ({@link ModuleAgent}), only the ones it asks for: a card
|
|
44
|
+
* shows a few of the hundreds a project keeps, and each run in the few fields a module reads, so
|
|
45
|
+
* what a phone downloads for it is that much smaller. The same runs as {@link onAgents}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function onModuleAgents(projectId: string, wanted?: ModuleAgentsWanted): Promise<ModuleAgent[]>;
|
|
48
|
+
/**
|
|
49
|
+
* A project's runs as its records and checkouts say them, each as recorded: the ones this
|
|
50
|
+
* computer runs, and every other computer's whose record came through the project's shared records.
|
|
51
|
+
* A run of this computer's that has no record yet is its project's git user's, as its record will be.
|
|
52
|
+
*/
|
|
53
|
+
export declare function recordedRuns(cwd: string): Promise<AgentMeta[]>;
|
|
54
|
+
/**
|
|
55
|
+
* A project's runs as the dashboard lists them: its records, with what each saved machine says of
|
|
56
|
+
* its own runs right now taking over theirs (machine-runs.ts). Not marked yet for the dashboard.
|
|
57
|
+
*/
|
|
58
|
+
export declare function projectRuns(cwd: string): Promise<AgentMeta[]>;
|
|
59
|
+
/**
|
|
60
|
+
* This computer's own runs of a project, for another computer that lists them (machine-runs.ts):
|
|
61
|
+
* the ones that changed since `since`, the answer it had last, as they stand right now. Only this
|
|
62
|
+
* computer's: what another computer's records say is that computer's to answer. With `wait` (ms,
|
|
63
|
+
* up to {@link RUNS_WAIT_MS}) and no change a list shows since `since`, the answer waits for the
|
|
64
|
+
* first such change, or says what changed otherwise once the wait is up.
|
|
65
|
+
*/
|
|
66
|
+
export declare function onOwnRuns(projectId: string, since?: unknown, wait?: unknown): Promise<OwnRuns>;
|
|
40
67
|
/**
|
|
41
68
|
* What a run's row marks beside its name, for both lists of runs, a project's and all projects'
|
|
42
69
|
* together: how its pull request stands, and the work it left on this machine.
|
|
@@ -100,7 +127,8 @@ export declare function markSaving(agent: AgentMeta, thisHost?: string, alive?:
|
|
|
100
127
|
* A run as its record may say it. A record is a file anyone with the project can write, and its
|
|
101
128
|
* tool's own words are read into the row as they are, so the words only this daemon gives a row
|
|
102
129
|
* 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
|
|
130
|
+
* computer's, that it is being saved, when its computer was last seen. A computer's name that is
|
|
131
|
+
* no name is none.
|
|
104
132
|
*/
|
|
105
133
|
export declare function asRecorded(agent: AgentMeta): AgentMeta;
|
|
106
134
|
/**
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** One thing the page is told: the runs of the project changed. */
|
|
2
|
+
export interface RunsChanged {
|
|
3
|
+
kind: 'runs';
|
|
4
|
+
projectId: string;
|
|
5
|
+
}
|
|
6
|
+
/** Tell `send` each time the runs of a project on the list change, until the answer is called. */
|
|
7
|
+
export declare function followRunsChanged(send: (change: RunsChanged) => void): () => void;
|
|
@@ -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;
|
|
@@ -120,12 +120,22 @@ export declare function runResumeHook(cwd: string, input: ResumeHookInput, opts?
|
|
|
120
120
|
export interface StartReadiness {
|
|
121
121
|
problems: string[];
|
|
122
122
|
warnings: string[];
|
|
123
|
-
/**
|
|
123
|
+
/**
|
|
124
|
+
* What a press does about a problem: install the coding agent's CLI, or log it in. The command run
|
|
125
|
+
* is the agent's package's, asked again at the press; `problem` is the line of `problems` it answers.
|
|
126
|
+
*/
|
|
124
127
|
fix?: {
|
|
125
128
|
kind: 'install' | 'log-in';
|
|
126
129
|
command: string;
|
|
130
|
+
problem: string;
|
|
127
131
|
};
|
|
128
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* A check's answer read as one, or nothing when it is not: a `check` line's, or a machine's that
|
|
135
|
+
* ran its own. Problems and warnings are lists of lines; a fix answers one of the problems said,
|
|
136
|
+
* or it is no fix to offer.
|
|
137
|
+
*/
|
|
138
|
+
export declare function readinessOf(said: unknown): StartReadiness | undefined;
|
|
129
139
|
/** How a `check` line went; `noHook` when the project's file names no such line. */
|
|
130
140
|
export type CheckHookResult = ({
|
|
131
141
|
ok: true;
|
|
@@ -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
|
-
|
|
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
|
|
@@ -166,7 +166,7 @@ export interface BranchesSource {
|
|
|
166
166
|
export type BranchesFor = (root: string) => Promise<BranchesSource | undefined>;
|
|
167
167
|
/** A {@link BranchesFor} that also forgets what it read of one project, for when a module or a run just wrote there. */
|
|
168
168
|
export type BranchesReader = BranchesFor & {
|
|
169
|
-
changed(root: string): void;
|
|
169
|
+
changed(root: string, pkg?: string): void;
|
|
170
170
|
};
|
|
171
171
|
/** The rows read back from a provider's `list`: the objects with an id and a path, everything else as printed; anything else is no checkout. */
|
|
172
172
|
export declare function parseCheckouts(output: unknown): Checkout[];
|
|
@@ -180,7 +180,7 @@ export declare function parseBranchesAhead(output: unknown): BranchAhead[];
|
|
|
180
180
|
* many reads of one poll, and a project that installs, swaps or drops its provider is read the new
|
|
181
181
|
* way within {@link CACHE_MS}. `changed(root)` forgets that project's reads, so the next read runs
|
|
182
182
|
* the command again: a run just started there, or a module's command just ran, and a checkout may
|
|
183
|
-
* have come or gone.
|
|
183
|
+
* have come or gone. `changed(root, pkg)` forgets them only when that package is the one providing.
|
|
184
184
|
*/
|
|
185
185
|
export declare function providedBranches(now?: () => number): BranchesReader;
|
|
186
186
|
/** OpenAgent's one reader of the checkouts, shared by every caller so they share its cache. */
|
|
@@ -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,12 +103,16 @@ 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>;
|
|
107
113
|
/** A {@link GitHostFor} that also forgets what it knows of one project. */
|
|
108
114
|
export type GitHostReader = GitHostFor & {
|
|
109
|
-
changed(root: string): void;
|
|
115
|
+
changed(root: string, pkg?: string): void;
|
|
110
116
|
};
|
|
111
117
|
/** The rows read back from a provider's `requests`: the objects with the facts a request needs; anything else is no request. */
|
|
112
118
|
export declare function parseRequests(output: unknown): GitHostRequest[];
|
|
@@ -114,7 +120,7 @@ export declare function parseRequests(output: unknown): GitHostRequest[];
|
|
|
114
120
|
* The production {@link GitHostReader}: the project's provider, looked up among the packages the project has (`built-in.ts`), one
|
|
115
121
|
* source per project kept while the same command provides, so a project that installs, swaps or
|
|
116
122
|
* drops its git host is read the new way within {@link CACHE_MS}. `changed(root)` forgets the
|
|
117
|
-
* project, so the next ask looks its provider up again.
|
|
123
|
+
* project, so the next ask looks its provider up again; `changed(root, pkg)` only when that package is the one providing.
|
|
118
124
|
*/
|
|
119
125
|
export declare function providedGitHost(now?: () => number): GitHostReader;
|
|
120
126
|
/** OpenAgent's one reader of the git host, shared by every caller. */
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* A package's command just ran in the project at `root` (a module's, through the dashboard), and
|
|
3
|
-
* may have written what one of OpenAgent's provided readers caches
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* may have written what one of OpenAgent's provided readers caches. Given the package, only what
|
|
4
|
+
* that package provides is forgotten: a card reading the queue leaves the runs read, so the next
|
|
5
|
+
* read of the runs is not made again for nothing. With no package, every provided reader forgets
|
|
6
|
+
* that project. Its next read runs the provider again; forgetting is cheap.
|
|
6
7
|
*/
|
|
7
|
-
export declare function providedDataChanged(root: string): void;
|
|
8
|
+
export declare function providedDataChanged(root: string, pkg?: string): void;
|
|
8
9
|
/** The kinds of OpenAgent's data a project's package may provide, one reader each (`git-host` is `git-host.ts`). */
|
|
9
10
|
export declare const PROVIDED_KINDS: readonly ['tickets', 'queue', 'runs', 'branches', 'git-host', 'repository'];
|
|
10
11
|
/**
|