@onepointfour-packs/flaredeck-agent 0.2.37 → 0.2.39
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/agent.d.ts +42 -3
- package/dist/agent.js +84 -6
- package/dist/agent.js.map +1 -1
- package/dist/automode.js +43 -3
- package/dist/automode.js.map +1 -1
- package/dist/boards.d.ts +72 -0
- package/dist/boards.js +136 -0
- package/dist/boards.js.map +1 -0
- package/dist/branches.d.ts +12 -1
- package/dist/branches.js +13 -3
- package/dist/branches.js.map +1 -1
- package/dist/browser.d.ts +59 -0
- package/dist/browser.js +260 -26
- package/dist/browser.js.map +1 -1
- package/dist/config.d.ts +22 -0
- package/dist/config.js +37 -2
- package/dist/config.js.map +1 -1
- package/dist/credentials.d.ts +217 -0
- package/dist/credentials.js +332 -0
- package/dist/credentials.js.map +1 -0
- package/dist/engine-antigravity.js +2 -0
- package/dist/engine-antigravity.js.map +1 -1
- package/dist/engine-claude.js +14 -2
- package/dist/engine-claude.js.map +1 -1
- package/dist/engine.d.ts +19 -0
- package/dist/engine.js.map +1 -1
- package/dist/environment.d.ts +15 -3
- package/dist/environment.js +79 -9
- package/dist/environment.js.map +1 -1
- package/dist/envtools.d.ts +58 -0
- package/dist/envtools.js +151 -0
- package/dist/envtools.js.map +1 -0
- package/dist/flaredeck-proxy.d.ts +11 -1
- package/dist/flaredeck-proxy.js +27 -1
- package/dist/flaredeck-proxy.js.map +1 -1
- package/dist/flaredeck.d.ts +24 -0
- package/dist/flaredeck.js +20 -0
- package/dist/flaredeck.js.map +1 -1
- package/dist/github.d.ts +2 -0
- package/dist/github.js +4 -0
- package/dist/github.js.map +1 -1
- package/dist/githubauth.d.ts +11 -1
- package/dist/githubauth.js +82 -16
- package/dist/githubauth.js.map +1 -1
- package/dist/hydrate.d.ts +76 -0
- package/dist/hydrate.js +77 -0
- package/dist/hydrate.js.map +1 -0
- package/dist/limits.d.ts +184 -0
- package/dist/limits.js +251 -0
- package/dist/limits.js.map +1 -0
- package/dist/main.js +177 -33
- package/dist/main.js.map +1 -1
- package/dist/picker.d.ts +10 -0
- package/dist/picker.js +150 -0
- package/dist/picker.js.map +1 -0
- package/dist/preflight.d.ts +43 -0
- package/dist/preflight.js +133 -19
- package/dist/preflight.js.map +1 -1
- package/dist/repopicker.js +8 -96
- package/dist/repopicker.js.map +1 -1
- package/dist/runs.d.ts +19 -4
- package/dist/runs.js +74 -9
- package/dist/runs.js.map +1 -1
- package/dist/serve.d.ts +6 -0
- package/dist/serve.js +1152 -138
- package/dist/serve.js.map +1 -1
- package/dist/session.d.ts +51 -0
- package/dist/session.js +145 -0
- package/dist/session.js.map +1 -0
- package/dist/settle.d.ts +18 -0
- package/dist/settle.js +39 -0
- package/dist/settle.js.map +1 -0
- package/dist/signin.d.ts +47 -0
- package/dist/signin.js +331 -0
- package/dist/signin.js.map +1 -0
- package/dist/stream.d.ts +8 -0
- package/dist/stream.js +44 -3
- package/dist/stream.js.map +1 -1
- package/dist/subscriptions.d.ts +115 -0
- package/dist/subscriptions.js +140 -0
- package/dist/subscriptions.js.map +1 -0
- package/dist/team.js +7 -1
- package/dist/team.js.map +1 -1
- package/dist/tmux.d.ts +1 -0
- package/dist/tmux.js +47 -0
- package/dist/tmux.js.map +1 -0
- package/dist/ui.d.ts +13 -0
- package/dist/ui.js +7 -2
- package/dist/ui.js.map +1 -1
- package/dist/usage.d.ts +105 -0
- package/dist/usage.js +348 -0
- package/dist/usage.js.map +1 -0
- package/dist/wall.d.ts +35 -0
- package/dist/wall.js +94 -0
- package/dist/wall.js.map +1 -0
- package/dist/workspace.d.ts +15 -1
- package/dist/workspace.js +25 -1
- package/dist/workspace.js.map +1 -1
- package/dist/worktree.d.ts +19 -0
- package/dist/worktree.js +179 -4
- package/dist/worktree.js.map +1 -1
- package/package.json +1 -1
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
+
import { type SavedSession } from './session.js';
|
|
1
2
|
import type { EnvContract } from './environment.js';
|
|
2
3
|
export declare const BROWSER_TOOL_NAMES: string[];
|
|
4
|
+
/**
|
|
5
|
+
* Keep a session a person just signed in with, where the browser tools will find it: FlareDeck.
|
|
6
|
+
*
|
|
7
|
+
* Exported because the sign-in happens OUTSIDE a card — a person runs it when an agent asks —
|
|
8
|
+
* and it has to land under the same identity `open_page` reads. It is keyed centrally, by the
|
|
9
|
+
* HOST when the session is for a real site, so one sign-in serves every agent in the workspace
|
|
10
|
+
* that needs that site. The session is asked where it came from rather than the caller being made
|
|
11
|
+
* to say, which is why this needs no new argument.
|
|
12
|
+
*
|
|
13
|
+
* STILL SYNCHRONOUS, and that is now a compromise rather than a free win. The vault write is
|
|
14
|
+
* necessarily asynchronous, so this starts it and returns the id for the caller to print; if the
|
|
15
|
+
* write ultimately fails, nothing is saved anywhere, because there is no longer a local copy by
|
|
16
|
+
* design. The card then meets the sign-in wall again on its next look and the existing machinery
|
|
17
|
+
* asks for a fresh one — the same path an expired session takes, so the failure degrades into a
|
|
18
|
+
* case that is already handled rather than a new one.
|
|
19
|
+
*
|
|
20
|
+
* `rememberSignInNow` is the same thing awaited, for a caller that wants to report the outcome.
|
|
21
|
+
* Both of this function's callers (main.ts, serve.ts) belong to other work; switching them over
|
|
22
|
+
* is a one-line change each and would turn "Signed in." into the truth rather than a hope.
|
|
23
|
+
*/
|
|
24
|
+
export declare function rememberSignIn(repo: string, part: string, session: SavedSession): string;
|
|
25
|
+
/** `rememberSignIn`, awaited: the credential id and whether it actually reached FlareDeck. */
|
|
26
|
+
export declare function rememberSignInNow(repo: string, part: string, session: SavedSession, onNote?: (t: string) => void): Promise<{
|
|
27
|
+
id: string;
|
|
28
|
+
ok: boolean;
|
|
29
|
+
message?: string;
|
|
30
|
+
}>;
|
|
3
31
|
/** What this page is, independent of where it happens to be today. See the note on this module. */
|
|
4
32
|
export declare function siteIdentity(repo: string, part: string): string;
|
|
5
33
|
export type BrowserDeps = {
|
|
@@ -7,13 +35,44 @@ export type BrowserDeps = {
|
|
|
7
35
|
repo: string;
|
|
8
36
|
/** Addresses the environment reported, so the agent names a part rather than a port. */
|
|
9
37
|
endpoints: () => Record<string, string>;
|
|
38
|
+
/**
|
|
39
|
+
* Deployed addresses the BOARD declared — the dev or UAT site, not production. A card is often
|
|
40
|
+
* about code that is already live, and an agent that can only see what it started locally
|
|
41
|
+
* cannot tell "my change is wrong" from "it was already like that".
|
|
42
|
+
*/
|
|
43
|
+
sites?: () => Record<string, string>;
|
|
44
|
+
/** The part found to serve the app's page, when the harness could tell (see webPart). */
|
|
45
|
+
defaultPart?: () => string | undefined;
|
|
10
46
|
/** Credentials the project published, so nobody types a password into a model. */
|
|
11
47
|
contract: () => EnvContract | undefined;
|
|
12
48
|
/** Where a screenshot should land so the agent can attach it to a card. */
|
|
13
49
|
cwd: string;
|
|
14
50
|
onNote: (text: string) => void;
|
|
15
51
|
};
|
|
52
|
+
/**
|
|
53
|
+
* How every browser here is launched.
|
|
54
|
+
*
|
|
55
|
+
* `headless: true` on its own picks `chromium-headless-shell` whenever that build is present,
|
|
56
|
+
* and a Google sign-in cannot be completed in it — see installChromium. `channel: 'chromium'`
|
|
57
|
+
* asks for the full browser and still runs it with no window, which is the combination measured
|
|
58
|
+
* to work. Without this line the installer change below fixes nothing on any machine that
|
|
59
|
+
* already has the shell.
|
|
60
|
+
*/
|
|
61
|
+
export declare const HEADLESS_FULL: {
|
|
62
|
+
readonly headless: true;
|
|
63
|
+
readonly channel: "chromium";
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Make sure the browser is on this machine, once.
|
|
67
|
+
*
|
|
68
|
+
* Called at startup so the download happens while the agent is idle rather than in the middle of
|
|
69
|
+
* the first card that needs eyes — 186MB is a long pause to take with a card in hand. Memoised,
|
|
70
|
+
* because the lazy path still calls it: a card arriving mid-download must wait for the download
|
|
71
|
+
* in flight, not start a second one.
|
|
72
|
+
*/
|
|
73
|
+
export declare function ensureBrowser(onNote?: (t: string) => void): Promise<boolean>;
|
|
16
74
|
export declare function browserTools(deps: BrowserDeps): {
|
|
17
75
|
server: unknown;
|
|
18
76
|
toolNames: string[];
|
|
77
|
+
close: () => Promise<void>;
|
|
19
78
|
};
|
package/dist/browser.js
CHANGED
|
@@ -23,11 +23,15 @@
|
|
|
23
23
|
* and hands, and remembers.
|
|
24
24
|
*/
|
|
25
25
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
26
|
+
import { captureSession, contextFor, restoreIndexedDb } from './session.js';
|
|
27
|
+
import { settle } from './settle.js';
|
|
28
|
+
import { signInWall, wallBrief } from './wall.js';
|
|
26
29
|
import { dirname, join } from 'node:path';
|
|
27
30
|
import { z } from 'zod';
|
|
28
31
|
import { tool } from '@anthropic-ai/claude-agent-sdk';
|
|
29
32
|
import { sdkServer } from './localmcp.js';
|
|
30
33
|
import { configDir } from './config.js';
|
|
34
|
+
import { credentialsFor, getJson, putInsistently, sessionOrigin, siteCredentialId, } from './credentials.js';
|
|
31
35
|
export const BROWSER_TOOL_NAMES = [
|
|
32
36
|
'mcp__browser__open_page',
|
|
33
37
|
'mcp__browser__look',
|
|
@@ -49,6 +53,35 @@ const memoryDir = () => {
|
|
|
49
53
|
const safe = (s) => s.replace(/[^A-Za-z0-9._-]/g, '_');
|
|
50
54
|
const memoryFile = (site) => join(memoryDir(), `${safe(site)}.json`);
|
|
51
55
|
const sessionFile = (site) => join(memoryDir(), `${safe(site)}.session.json`);
|
|
56
|
+
/**
|
|
57
|
+
* Sessions live in the FlareDeck vault and nowhere else — not on this disk, not as a cache.
|
|
58
|
+
*
|
|
59
|
+
* That is the whole point of moving them: one sign-in by one person serves every agent in the
|
|
60
|
+
* workspace, and twenty machines each holding a copy of a credential is the situation being
|
|
61
|
+
* escaped rather than the design. It also makes revocation honest, since there is no stale copy
|
|
62
|
+
* anywhere to keep working after the fact. See credentials.ts.
|
|
63
|
+
*/
|
|
64
|
+
const sessionStore = (repo, onNote = () => { }) => credentialsFor(repo, onNote);
|
|
65
|
+
/**
|
|
66
|
+
* The stored session, or an explanation.
|
|
67
|
+
*
|
|
68
|
+
* `{ ok: true, value: null }` and `{ ok: false }` must not be collapsed: no session means ask for
|
|
69
|
+
* a sign-in (the wall machinery does that), while a vault that could not be reached means stop
|
|
70
|
+
* and say so. There is nothing local to fall back to.
|
|
71
|
+
*/
|
|
72
|
+
async function loadSession(repo, id, onNote) {
|
|
73
|
+
return getJson(sessionStore(repo, onNote), id);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Keep a captured session, with retries.
|
|
77
|
+
*
|
|
78
|
+
* It has nowhere else to go, so one network blip must not cost a person another trip through a
|
|
79
|
+
* sign-in form. If it is lost anyway, the card hits the wall again on its next look and the
|
|
80
|
+
* existing machinery asks for a fresh one — the same path an expired session takes.
|
|
81
|
+
*/
|
|
82
|
+
async function saveSession(repo, id, s, onNote = () => { }) {
|
|
83
|
+
return putInsistently(sessionStore(repo, onNote), id, Buffer.from(JSON.stringify(s), 'utf8'), { kind: 'browser-session', label: id.replace(/^session:(host|repo):/, '') }, onNote);
|
|
84
|
+
}
|
|
52
85
|
function loadMemory(site) {
|
|
53
86
|
try {
|
|
54
87
|
return JSON.parse(readFileSync(memoryFile(site), 'utf8'));
|
|
@@ -63,14 +96,101 @@ function saveMemory(site, m) {
|
|
|
63
96
|
}
|
|
64
97
|
catch { /* not worth failing for */ }
|
|
65
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Keep a session a person just signed in with, where the browser tools will find it: FlareDeck.
|
|
101
|
+
*
|
|
102
|
+
* Exported because the sign-in happens OUTSIDE a card — a person runs it when an agent asks —
|
|
103
|
+
* and it has to land under the same identity `open_page` reads. It is keyed centrally, by the
|
|
104
|
+
* HOST when the session is for a real site, so one sign-in serves every agent in the workspace
|
|
105
|
+
* that needs that site. The session is asked where it came from rather than the caller being made
|
|
106
|
+
* to say, which is why this needs no new argument.
|
|
107
|
+
*
|
|
108
|
+
* STILL SYNCHRONOUS, and that is now a compromise rather than a free win. The vault write is
|
|
109
|
+
* necessarily asynchronous, so this starts it and returns the id for the caller to print; if the
|
|
110
|
+
* write ultimately fails, nothing is saved anywhere, because there is no longer a local copy by
|
|
111
|
+
* design. The card then meets the sign-in wall again on its next look and the existing machinery
|
|
112
|
+
* asks for a fresh one — the same path an expired session takes, so the failure degrades into a
|
|
113
|
+
* case that is already handled rather than a new one.
|
|
114
|
+
*
|
|
115
|
+
* `rememberSignInNow` is the same thing awaited, for a caller that wants to report the outcome.
|
|
116
|
+
* Both of this function's callers (main.ts, serve.ts) belong to other work; switching them over
|
|
117
|
+
* is a one-line change each and would turn "Signed in." into the truth rather than a hope.
|
|
118
|
+
*/
|
|
119
|
+
export function rememberSignIn(repo, part, session) {
|
|
120
|
+
const id = siteCredentialId(repo, part, sessionOrigin(session));
|
|
121
|
+
void rememberSignInNow(repo, part, session);
|
|
122
|
+
return id;
|
|
123
|
+
}
|
|
124
|
+
/** `rememberSignIn`, awaited: the credential id and whether it actually reached FlareDeck. */
|
|
125
|
+
export async function rememberSignInNow(repo, part, session, onNote = () => { }) {
|
|
126
|
+
const id = siteCredentialId(repo, part, sessionOrigin(session));
|
|
127
|
+
const r = await saveSession(repo, id, session, onNote);
|
|
128
|
+
if (!r.ok) {
|
|
129
|
+
onNote(`the sign-in could NOT be saved to FlareDeck (${r.message}). Nothing was kept on this ` +
|
|
130
|
+
`machine — credentials live only in FlareDeck — so a sign-in will be requested again.`);
|
|
131
|
+
}
|
|
132
|
+
return { id, ...r };
|
|
133
|
+
}
|
|
66
134
|
/** What this page is, independent of where it happens to be today. See the note on this module. */
|
|
67
135
|
export function siteIdentity(repo, part) {
|
|
68
136
|
return `${repo.split('/').pop() || repo}/${part || 'ui'}`;
|
|
69
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* How every browser here is launched.
|
|
140
|
+
*
|
|
141
|
+
* `headless: true` on its own picks `chromium-headless-shell` whenever that build is present,
|
|
142
|
+
* and a Google sign-in cannot be completed in it — see installChromium. `channel: 'chromium'`
|
|
143
|
+
* asks for the full browser and still runs it with no window, which is the combination measured
|
|
144
|
+
* to work. Without this line the installer change below fixes nothing on any machine that
|
|
145
|
+
* already has the shell.
|
|
146
|
+
*/
|
|
147
|
+
export const HEADLESS_FULL = { headless: true, channel: 'chromium' };
|
|
70
148
|
/**
|
|
71
149
|
* Fetch the browser Playwright expects. Once per machine, and never asked of the agent: an
|
|
72
150
|
* instruction to run an installer is setup, and the point of this is that there is none.
|
|
151
|
+
*
|
|
152
|
+
* The FULL chromium, not `chromium-headless-shell`. The shell is smaller and reads pages
|
|
153
|
+
* perfectly well, and it was what this installed — but it is a stripped build, and a Google
|
|
154
|
+
* sign-in cannot be completed in it: the opener-to-popup channel Firebase needs does not
|
|
155
|
+
* survive, so the login runs to the end and then fails with "the popup has been closed by the
|
|
156
|
+
* user", which is false. Measured on 2026-10-09 across three configurations:
|
|
157
|
+
*
|
|
158
|
+
* full chromium, headed sign-in completed
|
|
159
|
+
* full chromium, HEADLESS sign-in completed
|
|
160
|
+
* headless shell, headless auth/popup-closed-by-user
|
|
161
|
+
*
|
|
162
|
+
* So headless is fine and the shell is not. One build for everything, because two means a
|
|
163
|
+
* machine where ordinary page reading works and signing in mysteriously does not. It also means
|
|
164
|
+
* no Xvfb and no virtual display anywhere: the full build runs headless like any other.
|
|
73
165
|
*/
|
|
166
|
+
let installing = null;
|
|
167
|
+
/**
|
|
168
|
+
* Make sure the browser is on this machine, once.
|
|
169
|
+
*
|
|
170
|
+
* Called at startup so the download happens while the agent is idle rather than in the middle of
|
|
171
|
+
* the first card that needs eyes — 186MB is a long pause to take with a card in hand. Memoised,
|
|
172
|
+
* because the lazy path still calls it: a card arriving mid-download must wait for the download
|
|
173
|
+
* in flight, not start a second one.
|
|
174
|
+
*/
|
|
175
|
+
export function ensureBrowser(onNote = () => { }) {
|
|
176
|
+
if (!installing) {
|
|
177
|
+
installing = (async () => {
|
|
178
|
+
const { chromium } = await import('playwright-core');
|
|
179
|
+
// Already there: nothing to say and nothing to fetch.
|
|
180
|
+
try {
|
|
181
|
+
const b = await chromium.launch(HEADLESS_FULL);
|
|
182
|
+
await b.close();
|
|
183
|
+
return true;
|
|
184
|
+
}
|
|
185
|
+
catch { /* fetch it */ }
|
|
186
|
+
onNote('fetching Chromium (first use on this machine, ~186MB)');
|
|
187
|
+
const ok = await installChromium();
|
|
188
|
+
onNote(ok ? 'Chromium ready' : 'could not fetch Chromium — a card needing a browser will say so');
|
|
189
|
+
return ok;
|
|
190
|
+
})();
|
|
191
|
+
}
|
|
192
|
+
return installing;
|
|
193
|
+
}
|
|
74
194
|
async function installChromium() {
|
|
75
195
|
const { execFile } = await import('node:child_process');
|
|
76
196
|
const { fileURLToPath } = await import('node:url');
|
|
@@ -78,10 +198,52 @@ async function installChromium() {
|
|
|
78
198
|
if (!existsSync(cli))
|
|
79
199
|
return false;
|
|
80
200
|
return new Promise((resolve) => {
|
|
81
|
-
execFile(process.execPath, [cli, 'install', 'chromium
|
|
201
|
+
execFile(process.execPath, [cli, 'install', 'chromium'], { timeout: 15 * 60_000 }, (err) => resolve(!err));
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* Somewhere this browser may go.
|
|
206
|
+
*
|
|
207
|
+
* An agent that has just written and started its own start script knows a URL the harness does
|
|
208
|
+
* not, so refusing everything but a named part leaves it unable to look at what it just brought
|
|
209
|
+
* up. Allowing anything, though, would make a project tool into a web browser — and a page is
|
|
210
|
+
* input: whatever is written on it arrives in the agent's turn. So: this machine, a private
|
|
211
|
+
* network, or a site the board itself named. Nothing else.
|
|
212
|
+
*/
|
|
213
|
+
function addressable(url, declared) {
|
|
214
|
+
let u;
|
|
215
|
+
try {
|
|
216
|
+
u = new URL(url);
|
|
217
|
+
}
|
|
218
|
+
catch {
|
|
219
|
+
return `"${url}" is not a URL.`;
|
|
220
|
+
}
|
|
221
|
+
if (!/^https?:$/.test(u.protocol))
|
|
222
|
+
return `Only http and https. "${u.protocol}" is neither.`;
|
|
223
|
+
const h = u.hostname.toLowerCase();
|
|
224
|
+
const local = h === 'localhost' || h.endsWith('.localhost') || h === '::1' || h === '[::1]' ||
|
|
225
|
+
/^127\./.test(h) || /^10\./.test(h) || /^192\.168\./.test(h) ||
|
|
226
|
+
/^172\.(1[6-9]|2\d|3[01])\./.test(h);
|
|
227
|
+
if (local)
|
|
228
|
+
return null;
|
|
229
|
+
const named = declared.some((d) => {
|
|
230
|
+
try {
|
|
231
|
+
return new URL(d).origin === u.origin;
|
|
232
|
+
}
|
|
233
|
+
catch {
|
|
234
|
+
return false;
|
|
235
|
+
}
|
|
82
236
|
});
|
|
237
|
+
if (named)
|
|
238
|
+
return null;
|
|
239
|
+
return (`${u.origin} is not this project's. A URL is allowed when it is on this machine or private ` +
|
|
240
|
+
`network, or when the board declared it as a site. Open a part by name instead` +
|
|
241
|
+
(declared.length ? `, or one of the sites the board named: ${declared.join(', ')}.` : '.'));
|
|
83
242
|
}
|
|
84
243
|
export function browserTools(deps) {
|
|
244
|
+
// `site` names the project's page and keys the local notes; `credential` is the central
|
|
245
|
+
// identity the SESSION is stored under, which is the host for a real site. They differ on
|
|
246
|
+
// purpose — see siteCredentialId in credentials.ts.
|
|
85
247
|
let live = null;
|
|
86
248
|
const closeQuietly = async () => {
|
|
87
249
|
try {
|
|
@@ -116,28 +278,51 @@ export function browserTools(deps) {
|
|
|
116
278
|
name: 'browser',
|
|
117
279
|
version: '1.0.0',
|
|
118
280
|
tools: [
|
|
119
|
-
tool('open_page', 'Open a page in a real browser
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'learned about this project.', {
|
|
123
|
-
part: z.string().optional().describe('Which part
|
|
281
|
+
tool('open_page', 'Open a page in a real browser. Name a part THIS card\'s environment reported (for ' +
|
|
282
|
+
'example "ui") rather than a port — several worktrees run at once and the ports differ. ' +
|
|
283
|
+
'A deployed site the board declared can be named the same way. Returns what is on the ' +
|
|
284
|
+
'page, and anything earlier sessions learned about this project.', {
|
|
285
|
+
part: z.string().optional().describe('Which part, e.g. "ui". Defaults to the app\'s own page when the harness found it, else the first one.'),
|
|
124
286
|
path: z.string().optional().describe('A path on that part, e.g. "/admin/learning".'),
|
|
287
|
+
url: z.string().optional().describe('A full address, for something you started yourself that no part names yet. ' +
|
|
288
|
+
'This machine, a private network, or a site the board declared.'),
|
|
125
289
|
}, async (args) => {
|
|
126
|
-
const { part, path } = args;
|
|
290
|
+
const { part, path, url: asked } = args;
|
|
127
291
|
const ends = deps.endpoints();
|
|
128
|
-
const
|
|
129
|
-
|
|
292
|
+
const declared = deps.sites?.() ?? {};
|
|
293
|
+
// Both sources answer to a name. A part the environment started wins a name collision,
|
|
294
|
+
// because that is this card's own code and the deployed one is not.
|
|
295
|
+
const all = { ...declared, ...ends };
|
|
296
|
+
let name = part || deps.defaultPart?.() || (all['ui'] ? 'ui' : Object.keys(all)[0] ?? '');
|
|
297
|
+
let base = all[name];
|
|
298
|
+
if (asked) {
|
|
299
|
+
const no = addressable(asked, Object.values(declared));
|
|
300
|
+
if (no)
|
|
301
|
+
return say(no, true);
|
|
302
|
+
base = asked;
|
|
303
|
+
// Named parts keep their saved session; a bare URL is identified by its host, so
|
|
304
|
+
// coming back to the same place twice is still the same place.
|
|
305
|
+
if (!part)
|
|
306
|
+
name = new URL(asked).host;
|
|
307
|
+
}
|
|
130
308
|
if (!base) {
|
|
131
|
-
|
|
132
|
-
|
|
309
|
+
const have = Object.entries(all).map(([k, v]) => ` · ${k}: ${v}`).join('\n');
|
|
310
|
+
return say(have
|
|
311
|
+
? `Nothing here is called "${name}". What there is:\n${have}`
|
|
312
|
+
: `Nothing is running that this card knows about, and the board declared no site.\n\n` +
|
|
313
|
+
`If you started something yourself, pass its \`url\` — this machine or a private ` +
|
|
314
|
+
`network is allowed. If this project has no way to come up at all, that is worth ` +
|
|
315
|
+
`fixing once: a \`${'.flaredeck/start.sh'}\` that brings it up and prints ` +
|
|
316
|
+
`\`name=url\` lines gives every future card on this board a browser.`, true);
|
|
133
317
|
}
|
|
134
318
|
const site = siteIdentity(deps.repo, name);
|
|
319
|
+
const credential = siteCredentialId(deps.repo, name, base);
|
|
135
320
|
const memory = loadMemory(site);
|
|
136
321
|
await closeQuietly();
|
|
137
322
|
const { chromium } = await import('playwright-core');
|
|
138
323
|
let browser;
|
|
139
324
|
try {
|
|
140
|
-
browser = await chromium.launch(
|
|
325
|
+
browser = await chromium.launch(HEADLESS_FULL);
|
|
141
326
|
}
|
|
142
327
|
catch (first) {
|
|
143
328
|
// No browser on this machine yet, or Playwright moved to a newer build than the one
|
|
@@ -146,22 +331,35 @@ export function browserTools(deps) {
|
|
|
146
331
|
if (!/executable doesn't exist|please run.*install/i.test(String(first))) {
|
|
147
332
|
return say(`Could not start a browser: ${first instanceof Error ? first.message : String(first)}`, true);
|
|
148
333
|
}
|
|
149
|
-
deps.onNote(
|
|
150
|
-
const ok = await installChromium();
|
|
334
|
+
const ok = await ensureBrowser((t) => deps.onNote(`browser: ${t}`));
|
|
151
335
|
if (!ok) {
|
|
152
336
|
return say('This machine has no browser and it could not be fetched. Say so on the card — ' +
|
|
153
337
|
'do not try to install anything yourself.', true);
|
|
154
338
|
}
|
|
155
339
|
try {
|
|
156
|
-
browser = await chromium.launch(
|
|
340
|
+
browser = await chromium.launch(HEADLESS_FULL);
|
|
157
341
|
}
|
|
158
342
|
catch (e) {
|
|
159
343
|
return say(`Browser still will not start: ${e instanceof Error ? e.message : String(e)}`, true);
|
|
160
344
|
}
|
|
161
345
|
}
|
|
162
|
-
// A session
|
|
163
|
-
|
|
164
|
-
|
|
346
|
+
// A session signed in by an earlier card, on this machine or on any OTHER agent's — it
|
|
347
|
+
// comes from FlareDeck, so one sign-in serves the whole workspace. Read whole, because
|
|
348
|
+
// being signed in is not only cookies: see session.ts.
|
|
349
|
+
const got = await loadSession(deps.repo, credential, (t) => deps.onNote(`browser: ${t}`));
|
|
350
|
+
if (!got.ok) {
|
|
351
|
+
// Sessions are in FlareDeck and nowhere else, so there is nothing to fall back to and
|
|
352
|
+
// nothing to be gained by opening the page anyway: it would come up signed out, the
|
|
353
|
+
// sign-in wall would be detected, and the request for a sign-in would then fail for
|
|
354
|
+
// the same reason. Stopping here says the true thing once.
|
|
355
|
+
await closeQuietly();
|
|
356
|
+
return say(`FlareDeck could not be reached, so the sign-in for this site is not available: ${got.why}\n\n` +
|
|
357
|
+
`Sign-in sessions are kept in FlareDeck and nowhere else, so there is no local copy ` +
|
|
358
|
+
`to fall back to. Nothing is wrong with the card — say so on it and try again once ` +
|
|
359
|
+
`FlareDeck is reachable.`, true);
|
|
360
|
+
}
|
|
361
|
+
const stored = got.value;
|
|
362
|
+
const context = await contextFor(browser, stored);
|
|
165
363
|
const page = await context.newPage();
|
|
166
364
|
const url = `${base.replace(/\/+$/, '')}${path ? (path.startsWith('/') ? path : `/${path}`) : ''}`;
|
|
167
365
|
try {
|
|
@@ -171,19 +369,43 @@ export function browserTools(deps) {
|
|
|
171
369
|
await closeQuietly();
|
|
172
370
|
return say(`Could not open ${url}: ${e instanceof Error ? e.message : String(e)}`, true);
|
|
173
371
|
}
|
|
174
|
-
|
|
175
|
-
|
|
372
|
+
// IndexedDB can only be written once the databases exist, so it goes back AFTER the
|
|
373
|
+
// first navigation, and the reload inside is what lets the app read it on init.
|
|
374
|
+
// Without this a Firebase app restores silently as nobody — measured, not assumed.
|
|
375
|
+
if (await restoreIndexedDb(page, stored)) {
|
|
376
|
+
await page.waitForLoadState('domcontentloaded', { timeout: 10_000 }).catch(() => { });
|
|
377
|
+
}
|
|
378
|
+
await settle(page);
|
|
379
|
+
live = { browser, context, page, site, credential };
|
|
380
|
+
deps.onNote(`browser: ${url}${stored ? ' (signed in from an earlier session)' : ''}`);
|
|
176
381
|
const creds = Object.entries(deps.contract()?.credentials ?? {})
|
|
177
382
|
.map(([who, v]) => typeof v === 'string' ? ` · ${who}: ${v}` : ` · ${who}: ${v.username ?? ''} / ${v.password ?? ''}`)
|
|
178
383
|
.join('\n');
|
|
179
384
|
const learned = Object.entries(memory.recipes)
|
|
180
385
|
.map(([about, how]) => ` · ${about}: ${how}`).join('\n');
|
|
181
|
-
|
|
386
|
+
// A login page looks, from inside a snapshot, exactly like "the thing I was sent to
|
|
387
|
+
// find is not here". Saying so outright is what stops the next twenty minutes being
|
|
388
|
+
// spent on it. Leads the answer, because it changes what the whole turn should do.
|
|
389
|
+
const wall = await signInWall(page);
|
|
390
|
+
if (wall.wall) {
|
|
391
|
+
deps.onNote(`browser: ${url} is a sign-in wall (${wall.how})`);
|
|
392
|
+
return say(`${wallBrief(wall, url)}\n\nWhat is on it:\n${await describe(page)}`);
|
|
393
|
+
}
|
|
394
|
+
return say(`Open at ${url}${stored ? ', already signed in from an earlier session' : ''}.\n\n` +
|
|
182
395
|
`${await describe(page)}\n` +
|
|
183
396
|
(learned ? `\nWhat earlier sessions learned about ${site}:\n${learned}\n` : '') +
|
|
184
|
-
(!
|
|
397
|
+
(!stored && creds ? `\nSign-ins this project published:\n${creds}\n` : ''));
|
|
398
|
+
}),
|
|
399
|
+
tool('look', 'What is on the page now. Use after an action to see what changed.', {}, async () => {
|
|
400
|
+
const { page } = needPage();
|
|
401
|
+
await settle(page);
|
|
402
|
+
// A session can die mid-turn as easily as before it — a revoked token, an expiry, a
|
|
403
|
+
// sign-out elsewhere. An agent that walked into a wall between two clicks would
|
|
404
|
+
// otherwise carry on reading a login form as though it were the app.
|
|
405
|
+
const wall = await signInWall(page);
|
|
406
|
+
const seen = await describe(page);
|
|
407
|
+
return say(wall.wall ? `${wallBrief(wall, page.url())}\n\nWhat is on it:\n${seen}` : seen);
|
|
185
408
|
}),
|
|
186
|
-
tool('look', 'What is on the page now. Use after an action to see what changed.', {}, async () => say(await describe(needPage().page))),
|
|
187
409
|
tool('click', 'Click something by what it IS, as the page describes it — a role and its name, taken ' +
|
|
188
410
|
'from the snapshot you were given. Never a CSS selector.', {
|
|
189
411
|
role: z.string().describe('The role, e.g. "button", "link", "checkbox".'),
|
|
@@ -199,6 +421,8 @@ export function browserTools(deps) {
|
|
|
199
421
|
`What is actually on the page:\n${await describe(page)}`, true);
|
|
200
422
|
}
|
|
201
423
|
await page.waitForLoadState('domcontentloaded', { timeout: 10_000 }).catch(() => { });
|
|
424
|
+
// What a click DID is usually drawn after the navigation settles, not with it.
|
|
425
|
+
await settle(page);
|
|
202
426
|
return say(`Clicked ${role} "${name}".\n\n${await describe(page)}`);
|
|
203
427
|
}),
|
|
204
428
|
tool('fill', 'Type into a field, named the way the page describes it.', {
|
|
@@ -244,10 +468,15 @@ export function browserTools(deps) {
|
|
|
244
468
|
const memory = loadMemory(site);
|
|
245
469
|
memory.recipes[about.trim().toLowerCase()] = how.trim();
|
|
246
470
|
saveMemory(site, memory);
|
|
247
|
-
// Signed in once, signed in for every card after this
|
|
471
|
+
// Signed in once, signed in for every card after this — and, since the session goes to
|
|
472
|
+
// FlareDeck rather than this disk, for every other agent in the workspace that needs
|
|
473
|
+
// the same site. Awaited so a failure is reported rather than lost: there is no local
|
|
474
|
+
// copy behind it any more.
|
|
248
475
|
if (live) {
|
|
249
476
|
try {
|
|
250
|
-
await live.context.
|
|
477
|
+
const kept = await saveSession(deps.repo, live.credential, await captureSession(live.context, live.page), (t) => deps.onNote(`browser: ${t}`));
|
|
478
|
+
if (!kept.ok)
|
|
479
|
+
deps.onNote(`browser: the signed-in session was NOT saved (${kept.message})`);
|
|
251
480
|
}
|
|
252
481
|
catch { /* best effort */ }
|
|
253
482
|
}
|
|
@@ -256,6 +485,11 @@ export function browserTools(deps) {
|
|
|
256
485
|
}),
|
|
257
486
|
],
|
|
258
487
|
});
|
|
259
|
-
|
|
488
|
+
// A turn's browser must go when the turn does. Nothing used to close it: a new tool set is
|
|
489
|
+
// built per turn, so the last one's Chromium became unreachable AND still running — one leaked
|
|
490
|
+
// browser tree for every turn that looked at anything, on a daemon that runs for days. This is
|
|
491
|
+
// the same shape as the start scripts nobody took down, which left a build box at 106 node
|
|
492
|
+
// processes and 276 MB free.
|
|
493
|
+
return { server, toolNames: BROWSER_TOOL_NAMES, close: closeQuietly };
|
|
260
494
|
}
|
|
261
495
|
//# sourceMappingURL=browser.js.map
|
package/dist/browser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.js","sourceRoot":"","sources":["../src/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,yBAAyB;IACzB,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,0BAA0B;IAC1B,wBAAwB;CACzB,CAAC;AAEF,iGAAiG;AACjG,MAAM,YAAY,GAAG,IAAI,CAAC;AAI1B,MAAM,SAAS,GAAG,GAAW,EAAE;IAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,SAAS,EAAE,EAAE,SAAS,CAAC,CAAC;IACvC,IAAI,CAAC;QAAC,SAAS,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAAC,CAAC;IAAC,MAAM,CAAC,CAAC,+BAA+B,CAAC,CAAC;IACpF,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,MAAM,IAAI,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,CAAC;AAC/D,MAAM,UAAU,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAA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AAO,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC;AACxE,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -19,6 +19,22 @@ export type Config = {
|
|
|
19
19
|
* folder grants nothing — and empty or absent means every repo found there.
|
|
20
20
|
*/
|
|
21
21
|
repos?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* The boards this agent works, ticked at login. Empty or absent means every board the account
|
|
24
|
+
* can see, which is what every install did before this existed.
|
|
25
|
+
*
|
|
26
|
+
* An agent was only ever bound to a TENANT, so one signed in as a person — or as an account
|
|
27
|
+
* with broad access — woke for every card and every message on every board in it. The cost is
|
|
28
|
+
* not the noise: it is a turn. A test agent spent 23k of context deciding that a two-week-old
|
|
29
|
+
* message on another team's board needed no reply. Scope is cheaper than judgement.
|
|
30
|
+
*
|
|
31
|
+
* The name is kept beside the key so `whoami` can say which boards without a round trip, and
|
|
32
|
+
* so a board that is renamed still reads sensibly until the next login.
|
|
33
|
+
*/
|
|
34
|
+
boards?: {
|
|
35
|
+
key: string;
|
|
36
|
+
name: string;
|
|
37
|
+
}[];
|
|
22
38
|
/**
|
|
23
39
|
* Git-ignored files a project needs in order to RUN, carried into each card's worktree.
|
|
24
40
|
*
|
|
@@ -133,8 +149,14 @@ export declare const configDir: () => string;
|
|
|
133
149
|
export declare const configPath: (repo: string) => string;
|
|
134
150
|
export declare function loadConfig(repo?: string): Config | null;
|
|
135
151
|
export declare function saveConfig(config: Config): string;
|
|
152
|
+
type GitHubLogin = NonNullable<Config['github']>;
|
|
153
|
+
export declare function loadGitHub(): GitHubLogin | null;
|
|
154
|
+
export declare function saveGitHub(login: GitHubLogin): void;
|
|
155
|
+
/** Forget the machine's GitHub login, so the next one is a fresh sign-in rather than a reuse. */
|
|
156
|
+
export declare function forgetGitHub(): void;
|
|
136
157
|
export declare function loadMe(): Tokens | null;
|
|
137
158
|
export declare function saveMe(tokens: Tokens): string;
|
|
138
159
|
export declare function forgetConfig(repo: string): boolean;
|
|
139
160
|
/** Config with defaults filled in — for commands that can run before `login` has written one. */
|
|
140
161
|
export declare function configOrDefaults(repo?: string): Config;
|
|
162
|
+
export {};
|