webhands 0.0.0 → 0.1.6
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/LICENSE +661 -0
- package/README.md +112 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +14 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli.d.ts +79 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +639 -0
- package/dist/cli.js.map +1 -0
- package/dist/errors.d.ts +45 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +69 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/session-provider.d.ts +52 -0
- package/dist/session-provider.d.ts.map +1 -0
- package/dist/session-provider.js +28 -0
- package/dist/session-provider.js.map +1 -0
- package/dist/version.d.ts +11 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +12 -0
- package/dist/version.js.map +1 -0
- package/package.json +58 -2
- package/src/bin.ts +14 -0
- package/src/cli.ts +797 -0
- package/src/errors.ts +114 -0
- package/src/index.ts +36 -0
- package/src/session-provider.ts +70 -0
- package/src/version.ts +12 -0
package/dist/cli.js
ADDED
|
@@ -0,0 +1,639 @@
|
|
|
1
|
+
import { Cli, z } from 'incur';
|
|
2
|
+
import { buildPrompt, resolveProfileLocation, serializeCookies, deserializeCookies, locator, PlaywrightAttachTransport, PlaywrightLaunchTransport, readSessionEndpoint, clearSessionEndpoint, SessionAlreadyActiveError, startSessionServer, } from '@webhands/core';
|
|
3
|
+
import { readFile, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { mapControllerError } from './errors.js';
|
|
5
|
+
import { createDefaultSessionProvider, } from './session-provider.js';
|
|
6
|
+
import { setupProfile } from '@webhands/core';
|
|
7
|
+
import { VERSION } from './version.js';
|
|
8
|
+
/**
|
|
9
|
+
* The CLI binary name. Used both as the `incur` CLI name and (echoed back from
|
|
10
|
+
* `c.name`) inside every fix-command message, so a suggested command always
|
|
11
|
+
* matches how the user invoked the tool.
|
|
12
|
+
*/
|
|
13
|
+
export const CLI_NAME = 'webhands';
|
|
14
|
+
const DESCRIPTION = 'Drive a real, logged-in browser (launch or attach) and run page verbs ' +
|
|
15
|
+
'(goto, snapshot, click, type, eval, wait, cookies) with structured output.';
|
|
16
|
+
/**
|
|
17
|
+
* The default profile name a page verb / launch / setup-profile targets when
|
|
18
|
+
* the user does not name one. A single, predictable default keeps the common
|
|
19
|
+
* case a one-word command; a user with several sessions passes `--profile`.
|
|
20
|
+
*/
|
|
21
|
+
export const DEFAULT_PROFILE = 'default';
|
|
22
|
+
// --- shared schema fragments ----------------------------------------------
|
|
23
|
+
/**
|
|
24
|
+
* Connection options shared by the page verbs and `serve`: WHICH browser the
|
|
25
|
+
* single session targets. In the ADR-0005 model the `serve` command consumes
|
|
26
|
+
* these to bring the ONE long-lived session up (launch a profile, or attach to
|
|
27
|
+
* an endpoint); the page VERBS are thin clients that drive whatever session is
|
|
28
|
+
* already live, so for them these options are vestigial selectors of the launch
|
|
29
|
+
* mode only when `serve` reads them. They live here as ONE shared fragment so
|
|
30
|
+
* `serve` and the verbs describe the open the same way.
|
|
31
|
+
*/
|
|
32
|
+
const connectionOptions = z.object({
|
|
33
|
+
profile: z
|
|
34
|
+
.string()
|
|
35
|
+
.default(DEFAULT_PROFILE)
|
|
36
|
+
.describe('Dedicated profile to launch against (launch mode).'),
|
|
37
|
+
endpoint: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Remote-debugging endpoint of a browser you already started ' +
|
|
41
|
+
'(attach mode, Chromium-only). When set, attach is used instead of launch.'),
|
|
42
|
+
});
|
|
43
|
+
/** Resolve the {@link OpenTarget} for a page verb from its connection options. */
|
|
44
|
+
function targetFrom(options) {
|
|
45
|
+
if (options.endpoint !== undefined && options.endpoint !== '') {
|
|
46
|
+
return { mode: 'attach', endpoint: options.endpoint };
|
|
47
|
+
}
|
|
48
|
+
return { mode: 'launch', profile: options.profile };
|
|
49
|
+
}
|
|
50
|
+
/** The structured output schema shared by verbs that act on a page but return no data. */
|
|
51
|
+
const actionOutput = z.object({
|
|
52
|
+
ok: z.literal(true).describe('The verb completed.'),
|
|
53
|
+
verb: z.string().describe('The verb that ran.'),
|
|
54
|
+
});
|
|
55
|
+
// --- cta wording (one source of truth) ------------------------------------
|
|
56
|
+
/**
|
|
57
|
+
* Call-to-action hints suggesting likely NEXT verbs after a run (PRD story 13),
|
|
58
|
+
* so an agent can chain navigate -> snapshot -> click without extra prompting.
|
|
59
|
+
* The chain mirrors how a human reads then acts on a page: after navigating or
|
|
60
|
+
* waiting you SNAPSHOT to see the page; after a snapshot you CLICK/TYPE/EVAL;
|
|
61
|
+
* after acting you snapshot again to observe the effect. Kept in one map so the
|
|
62
|
+
* suggested chain is consistent across commands.
|
|
63
|
+
*/
|
|
64
|
+
function nextSnapshot() {
|
|
65
|
+
return {
|
|
66
|
+
command: 'snapshot',
|
|
67
|
+
description: 'Read the page (accessibility tree + text) to decide what to do next.',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function nextAct() {
|
|
71
|
+
return [
|
|
72
|
+
{
|
|
73
|
+
command: 'click',
|
|
74
|
+
description: 'Click an element addressed by a Playwright locator string.',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
command: 'type',
|
|
78
|
+
description: 'Type into an element addressed by a Playwright locator string.',
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
command: 'eval',
|
|
82
|
+
description: 'Run JavaScript in the page as an escape hatch.',
|
|
83
|
+
},
|
|
84
|
+
];
|
|
85
|
+
}
|
|
86
|
+
// --- session helper --------------------------------------------------------
|
|
87
|
+
/**
|
|
88
|
+
* Open a session, run `fn` against its page, and ALWAYS close the session.
|
|
89
|
+
* Centralises the open/close lifecycle so every verb command is just its verb
|
|
90
|
+
* body, and a typed `core` open error (missing binary / missing profile)
|
|
91
|
+
* propagates to the command's catch for mapping.
|
|
92
|
+
*/
|
|
93
|
+
async function withSession(provider, target, fn) {
|
|
94
|
+
const session = await provider.call(undefined, target);
|
|
95
|
+
try {
|
|
96
|
+
return await fn(session);
|
|
97
|
+
}
|
|
98
|
+
finally {
|
|
99
|
+
await session.close();
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Build the `incur` CLI that wraps `core`'s verb surface (PRD Implementation
|
|
104
|
+
* Decisions — `cli`; stories 12-14, 17).
|
|
105
|
+
*
|
|
106
|
+
* Because it is built on `incur`, the SAME binary is also an MCP server
|
|
107
|
+
* (`--mcp` / `mcp add`) and emits a skills / `--llms` manifest with NO bespoke
|
|
108
|
+
* MCP code: those come from incur for free. Each command declares zod
|
|
109
|
+
* `args`/`options`/`output` schemas (so input is validated and output has a
|
|
110
|
+
* known shape), returns the structured TOON/JSON envelope, and attaches `cta`
|
|
111
|
+
* next-verb hints. Typed `core` errors (missing binary / missing profile) are
|
|
112
|
+
* mapped to the user-facing message + exact fix command via
|
|
113
|
+
* {@link mapControllerError}.
|
|
114
|
+
*
|
|
115
|
+
* Returns the built `Cli` WITHOUT calling `.serve()`, so a test can drive it via
|
|
116
|
+
* `serve(argv, {stdout, exit})` or `cli.fetch(req)` and the bin entry owns the
|
|
117
|
+
* real `.serve()`.
|
|
118
|
+
*/
|
|
119
|
+
export function createCli(deps = {}) {
|
|
120
|
+
const binary = CLI_NAME;
|
|
121
|
+
const provider = deps.sessionProvider ?? createDefaultSessionProvider(deps.home ?? {});
|
|
122
|
+
const runSetupProfile = deps.setupProfile ?? setupProfile;
|
|
123
|
+
const serveSession = deps.serveSession ?? defaultServeSession;
|
|
124
|
+
const home = deps.home ?? {};
|
|
125
|
+
const cli = Cli.create(binary, {
|
|
126
|
+
description: DESCRIPTION,
|
|
127
|
+
version: deps.version ?? VERSION,
|
|
128
|
+
// `outputPolicy: 'all'` (the default) — humans and agents both see output.
|
|
129
|
+
});
|
|
130
|
+
// --- mode commands: setup-profile / launch / attach --------------------
|
|
131
|
+
cli.command('setup-profile', {
|
|
132
|
+
description: 'Open the dedicated profile HEADED so you log in / clear a challenge ONCE; ' +
|
|
133
|
+
'later launch --headless reuses the saved session.',
|
|
134
|
+
options: z.object({
|
|
135
|
+
profile: z
|
|
136
|
+
.string()
|
|
137
|
+
.default(DEFAULT_PROFILE)
|
|
138
|
+
.describe('Name of the dedicated profile to set up.'),
|
|
139
|
+
}),
|
|
140
|
+
output: z.object({
|
|
141
|
+
profile: z.string().describe('The profile that was set up.'),
|
|
142
|
+
profileDir: z
|
|
143
|
+
.string()
|
|
144
|
+
.describe('Its dedicated user-data directory on disk.'),
|
|
145
|
+
}),
|
|
146
|
+
async run(c) {
|
|
147
|
+
try {
|
|
148
|
+
const { session, location } = await runSetupProfile({
|
|
149
|
+
profile: c.options.profile,
|
|
150
|
+
...(deps.home ?? {}),
|
|
151
|
+
});
|
|
152
|
+
// `setup-profile` HOLDS the headed window open for the human's login:
|
|
153
|
+
// block until the user closes the browser (or it otherwise ends),
|
|
154
|
+
// THEN report success. (Earlier this closed the session immediately,
|
|
155
|
+
// so the window opened and vanished in the same tick.) On close the
|
|
156
|
+
// persistent context has flushed the new state to the profile dir, so
|
|
157
|
+
// the profile is set up and `launch` is the right next step.
|
|
158
|
+
await session.waitForClose();
|
|
159
|
+
return c.ok({ profile: location.profile, profileDir: location.profileDir }, {
|
|
160
|
+
cta: {
|
|
161
|
+
commands: [
|
|
162
|
+
{
|
|
163
|
+
command: 'launch',
|
|
164
|
+
options: { profile: location.profile },
|
|
165
|
+
description: 'Launch this profile headless now that it is set up.',
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
},
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
catch (cause) {
|
|
172
|
+
return fail(c, cause, binary);
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
cli.command('launch', {
|
|
177
|
+
description: 'Launch a browser the controller spawns (headed or headless) against the dedicated profile.',
|
|
178
|
+
options: z.object({
|
|
179
|
+
profile: z
|
|
180
|
+
.string()
|
|
181
|
+
.default(DEFAULT_PROFILE)
|
|
182
|
+
.describe('Dedicated profile to launch against.'),
|
|
183
|
+
headed: z
|
|
184
|
+
.boolean()
|
|
185
|
+
.default(false)
|
|
186
|
+
.describe('Show the browser window (default: headless).'),
|
|
187
|
+
}),
|
|
188
|
+
output: z.object({
|
|
189
|
+
mode: z.literal('launch'),
|
|
190
|
+
profile: z.string(),
|
|
191
|
+
headed: z.boolean(),
|
|
192
|
+
}),
|
|
193
|
+
async run(c) {
|
|
194
|
+
try {
|
|
195
|
+
return await withSession(provider, {
|
|
196
|
+
mode: 'launch',
|
|
197
|
+
profile: c.options.profile,
|
|
198
|
+
headed: c.options.headed,
|
|
199
|
+
}, async () => c.ok({
|
|
200
|
+
mode: 'launch',
|
|
201
|
+
profile: c.options.profile,
|
|
202
|
+
headed: c.options.headed,
|
|
203
|
+
}, {
|
|
204
|
+
cta: {
|
|
205
|
+
commands: [
|
|
206
|
+
{
|
|
207
|
+
command: 'goto',
|
|
208
|
+
description: 'Navigate the launched page to a URL.',
|
|
209
|
+
},
|
|
210
|
+
nextSnapshot(),
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
}));
|
|
214
|
+
}
|
|
215
|
+
catch (cause) {
|
|
216
|
+
return fail(c, cause, binary);
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
});
|
|
220
|
+
// --- lifecycle: serve / stop (ADR-0005, cross-invocation persistence) ----
|
|
221
|
+
cli.command('serve', {
|
|
222
|
+
description: 'Start the long-lived session server: launch (or attach) the ONE browser ' +
|
|
223
|
+
'and keep it alive so later verb invocations drive the SAME live page. ' +
|
|
224
|
+
'Runs until stopped (Ctrl-C or `stop`).',
|
|
225
|
+
options: connectionOptions.extend({
|
|
226
|
+
headed: z
|
|
227
|
+
.boolean()
|
|
228
|
+
.default(false)
|
|
229
|
+
.describe('Show the browser window (default: headless).'),
|
|
230
|
+
}),
|
|
231
|
+
output: z.object({
|
|
232
|
+
ok: z.literal(true),
|
|
233
|
+
verb: z.literal('serve'),
|
|
234
|
+
url: z.string().describe('The endpoint client verbs discover and call.'),
|
|
235
|
+
pid: z
|
|
236
|
+
.number()
|
|
237
|
+
.describe('The served process PID (for `stop` / signals).'),
|
|
238
|
+
}),
|
|
239
|
+
async run(c) {
|
|
240
|
+
try {
|
|
241
|
+
// Single session in v1: refuse to bring up a second while one is live.
|
|
242
|
+
const existing = await readSessionEndpoint(home);
|
|
243
|
+
if (existing !== undefined) {
|
|
244
|
+
throw new SessionAlreadyActiveError();
|
|
245
|
+
}
|
|
246
|
+
const target = c.options.endpoint !== undefined && c.options.endpoint !== ''
|
|
247
|
+
? { mode: 'attach', endpoint: c.options.endpoint }
|
|
248
|
+
: {
|
|
249
|
+
mode: 'launch',
|
|
250
|
+
profile: c.options.profile,
|
|
251
|
+
headed: c.options.headed,
|
|
252
|
+
};
|
|
253
|
+
const server = await serveSession(target, home);
|
|
254
|
+
// Explicit teardown on signal: closing the browser + clearing the
|
|
255
|
+
// endpoint file is the server's `stop`. We DO NOT auto-spawn and we DO
|
|
256
|
+
// NOT auto-teardown on anything but an explicit stop/signal (ADR-0005).
|
|
257
|
+
const onSignal = () => {
|
|
258
|
+
void server.stop().finally(() => process.exit(0));
|
|
259
|
+
};
|
|
260
|
+
process.once('SIGINT', onSignal);
|
|
261
|
+
process.once('SIGTERM', onSignal);
|
|
262
|
+
return c.ok({
|
|
263
|
+
ok: true,
|
|
264
|
+
verb: 'serve',
|
|
265
|
+
url: server.endpoint.url,
|
|
266
|
+
pid: server.endpoint.pid,
|
|
267
|
+
}, {
|
|
268
|
+
cta: {
|
|
269
|
+
commands: [
|
|
270
|
+
{
|
|
271
|
+
command: 'goto',
|
|
272
|
+
description: 'Navigate the served live page (from a separate invocation).',
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
command: 'stop',
|
|
276
|
+
description: 'Tear the served session down.',
|
|
277
|
+
},
|
|
278
|
+
],
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
catch (cause) {
|
|
283
|
+
return fail(c, cause, binary);
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
});
|
|
287
|
+
cli.command('stop', {
|
|
288
|
+
description: 'Tear down the long-lived session server: close the browser and stop serving.',
|
|
289
|
+
output: z.object({
|
|
290
|
+
ok: z.literal(true),
|
|
291
|
+
verb: z.literal('stop'),
|
|
292
|
+
stopped: z
|
|
293
|
+
.boolean()
|
|
294
|
+
.describe('Whether a live server was found and signalled to stop.'),
|
|
295
|
+
}),
|
|
296
|
+
async run(c) {
|
|
297
|
+
try {
|
|
298
|
+
const endpoint = await readSessionEndpoint(home);
|
|
299
|
+
if (endpoint === undefined) {
|
|
300
|
+
// Nothing to stop: report it plainly rather than error. Idempotent
|
|
301
|
+
// teardown is friendlier than a failure on a second `stop`.
|
|
302
|
+
return c.ok({
|
|
303
|
+
ok: true,
|
|
304
|
+
verb: 'stop',
|
|
305
|
+
stopped: false,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
// The served session lives in a SEPARATE process; signal it to run its
|
|
309
|
+
// own clean teardown (close browser + clear endpoint file). Then clear
|
|
310
|
+
// the endpoint file here too so discovery reflects the stop even if the
|
|
311
|
+
// process was already gone (stale endpoint).
|
|
312
|
+
try {
|
|
313
|
+
process.kill(endpoint.pid, 'SIGTERM');
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
// The process is already gone; clearing the file below suffices.
|
|
317
|
+
}
|
|
318
|
+
await clearSessionEndpoint(home);
|
|
319
|
+
return c.ok({
|
|
320
|
+
ok: true,
|
|
321
|
+
verb: 'stop',
|
|
322
|
+
stopped: true,
|
|
323
|
+
});
|
|
324
|
+
}
|
|
325
|
+
catch (cause) {
|
|
326
|
+
return fail(c, cause, binary);
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
});
|
|
330
|
+
cli.command('attach', {
|
|
331
|
+
description: 'Attach to a browser you already started with remote debugging (Chromium-only), reusing live tabs.',
|
|
332
|
+
options: z.object({
|
|
333
|
+
endpoint: z
|
|
334
|
+
.string()
|
|
335
|
+
.describe('Remote-debugging endpoint of the running browser (e.g. http://127.0.0.1:9222).'),
|
|
336
|
+
}),
|
|
337
|
+
output: z.object({
|
|
338
|
+
mode: z.literal('attach'),
|
|
339
|
+
endpoint: z.string(),
|
|
340
|
+
}),
|
|
341
|
+
async run(c) {
|
|
342
|
+
try {
|
|
343
|
+
return await withSession(provider, { mode: 'attach', endpoint: c.options.endpoint }, async () => c.ok({ mode: 'attach', endpoint: c.options.endpoint }, {
|
|
344
|
+
cta: {
|
|
345
|
+
commands: [
|
|
346
|
+
{
|
|
347
|
+
command: 'goto',
|
|
348
|
+
description: 'Navigate the attached page to a URL.',
|
|
349
|
+
},
|
|
350
|
+
nextSnapshot(),
|
|
351
|
+
],
|
|
352
|
+
},
|
|
353
|
+
}));
|
|
354
|
+
}
|
|
355
|
+
catch (cause) {
|
|
356
|
+
return fail(c, cause, binary);
|
|
357
|
+
}
|
|
358
|
+
},
|
|
359
|
+
});
|
|
360
|
+
// --- page verbs --------------------------------------------------------
|
|
361
|
+
cli.command('goto', {
|
|
362
|
+
description: 'Navigate the active page to a URL and let it settle.',
|
|
363
|
+
args: z.object({ url: z.string().describe('The URL to navigate to.') }),
|
|
364
|
+
options: connectionOptions,
|
|
365
|
+
output: z.object({
|
|
366
|
+
ok: z.literal(true),
|
|
367
|
+
verb: z.literal('goto'),
|
|
368
|
+
url: z.string().describe('The URL that was navigated to.'),
|
|
369
|
+
}),
|
|
370
|
+
async run(c) {
|
|
371
|
+
try {
|
|
372
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
373
|
+
await s.page.navigate(c.args.url);
|
|
374
|
+
return c.ok({ ok: true, verb: 'goto', url: c.args.url }, { cta: { commands: [nextSnapshot()] } });
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
catch (cause) {
|
|
378
|
+
return fail(c, cause, binary);
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
});
|
|
382
|
+
cli.command('snapshot', {
|
|
383
|
+
description: 'Return a token-cheap structured view of the page (accessibility tree + text, or --full raw DOM).',
|
|
384
|
+
options: connectionOptions.extend({
|
|
385
|
+
full: z
|
|
386
|
+
.boolean()
|
|
387
|
+
.default(false)
|
|
388
|
+
.describe('Return the raw DOM instead of the accessibility view.'),
|
|
389
|
+
}),
|
|
390
|
+
output: z.object({
|
|
391
|
+
url: z.string().describe('The page URL at snapshot time.'),
|
|
392
|
+
view: z
|
|
393
|
+
.enum(['accessibility', 'full'])
|
|
394
|
+
.describe('Which view this snapshot carries.'),
|
|
395
|
+
content: z
|
|
396
|
+
.string()
|
|
397
|
+
.describe('The structured, agent-readable page content.'),
|
|
398
|
+
}),
|
|
399
|
+
async run(c) {
|
|
400
|
+
try {
|
|
401
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
402
|
+
const snap = await s.page.snapshot({ full: c.options.full });
|
|
403
|
+
return c.ok(snap, { cta: { commands: nextAct() } });
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
catch (cause) {
|
|
407
|
+
return fail(c, cause, binary);
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
});
|
|
411
|
+
cli.command('click', {
|
|
412
|
+
description: 'Click the element addressed by a raw Playwright locator string.',
|
|
413
|
+
args: z.object({
|
|
414
|
+
locator: z
|
|
415
|
+
.string()
|
|
416
|
+
.describe("A raw Playwright locator expression, e.g. getByRole('button', { name: 'Search' })."),
|
|
417
|
+
}),
|
|
418
|
+
options: connectionOptions,
|
|
419
|
+
output: actionOutput.extend({ verb: z.literal('click') }),
|
|
420
|
+
async run(c) {
|
|
421
|
+
try {
|
|
422
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
423
|
+
await s.page.click(locator(c.args.locator));
|
|
424
|
+
return c.ok({ ok: true, verb: 'click' }, { cta: { commands: [nextSnapshot()] } });
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
catch (cause) {
|
|
428
|
+
return fail(c, cause, binary);
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
});
|
|
432
|
+
cli.command('type', {
|
|
433
|
+
description: 'Type text into the element addressed by a raw Playwright locator string.',
|
|
434
|
+
args: z.object({
|
|
435
|
+
locator: z
|
|
436
|
+
.string()
|
|
437
|
+
.describe('A raw Playwright locator expression for the target input.'),
|
|
438
|
+
text: z.string().describe('The text to type into the element.'),
|
|
439
|
+
}),
|
|
440
|
+
options: connectionOptions,
|
|
441
|
+
output: actionOutput.extend({ verb: z.literal('type') }),
|
|
442
|
+
async run(c) {
|
|
443
|
+
try {
|
|
444
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
445
|
+
await s.page.type(locator(c.args.locator), c.args.text);
|
|
446
|
+
return c.ok({ ok: true, verb: 'type' }, { cta: { commands: [nextSnapshot()] } });
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
catch (cause) {
|
|
450
|
+
return fail(c, cause, binary);
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
});
|
|
454
|
+
cli.command('eval', {
|
|
455
|
+
description: 'Run a JavaScript EXPRESSION in the active page and return its serializable result.',
|
|
456
|
+
args: z.object({
|
|
457
|
+
expression: z
|
|
458
|
+
.string()
|
|
459
|
+
.describe('A JS expression evaluated in the page context (e.g. document.title).'),
|
|
460
|
+
}),
|
|
461
|
+
options: connectionOptions,
|
|
462
|
+
output: z.object({
|
|
463
|
+
ok: z.literal(true),
|
|
464
|
+
verb: z.literal('eval'),
|
|
465
|
+
result: z
|
|
466
|
+
.unknown()
|
|
467
|
+
.describe('The expression result, structurally cloned by value.'),
|
|
468
|
+
}),
|
|
469
|
+
async run(c) {
|
|
470
|
+
try {
|
|
471
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
472
|
+
const result = await s.page.eval(c.args.expression);
|
|
473
|
+
return c.ok({ ok: true, verb: 'eval', result }, { cta: { commands: [nextSnapshot()] } });
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
catch (cause) {
|
|
477
|
+
return fail(c, cause, binary);
|
|
478
|
+
}
|
|
479
|
+
},
|
|
480
|
+
});
|
|
481
|
+
cli.command('wait', {
|
|
482
|
+
description: 'Pace actions by waiting for a timeout, a locator to appear, or the next navigation.',
|
|
483
|
+
options: connectionOptions.extend({
|
|
484
|
+
ms: z.coerce
|
|
485
|
+
.number()
|
|
486
|
+
.optional()
|
|
487
|
+
.describe('Wait this many milliseconds (timeout form).'),
|
|
488
|
+
locator: z
|
|
489
|
+
.string()
|
|
490
|
+
.optional()
|
|
491
|
+
.describe('Wait until this Playwright locator appears (locator form).'),
|
|
492
|
+
navigation: z
|
|
493
|
+
.boolean()
|
|
494
|
+
.default(false)
|
|
495
|
+
.describe('Wait until the next navigation settles (navigation form).'),
|
|
496
|
+
}),
|
|
497
|
+
output: actionOutput.extend({
|
|
498
|
+
verb: z.literal('wait'),
|
|
499
|
+
kind: z.enum(['timeout', 'locator', 'navigation']),
|
|
500
|
+
}),
|
|
501
|
+
async run(c) {
|
|
502
|
+
const condition = waitConditionFrom(c.options);
|
|
503
|
+
if (condition === undefined) {
|
|
504
|
+
return c.error({
|
|
505
|
+
code: 'invalid-wait',
|
|
506
|
+
message: 'wait needs exactly one of --ms <n>, --locator <expr>, or --navigation.',
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
try {
|
|
510
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
511
|
+
await s.page.wait(condition);
|
|
512
|
+
return c.ok({ ok: true, verb: 'wait', kind: condition.kind }, { cta: { commands: [nextSnapshot()] } });
|
|
513
|
+
});
|
|
514
|
+
}
|
|
515
|
+
catch (cause) {
|
|
516
|
+
return fail(c, cause, binary);
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
});
|
|
520
|
+
// `cookies` is a group (export/import), mirroring the verb's two directions.
|
|
521
|
+
const cookies = Cli.create('cookies', {
|
|
522
|
+
description: 'Export or import the active session cookies (move/back up/seed a session).',
|
|
523
|
+
});
|
|
524
|
+
cookies.command('export', {
|
|
525
|
+
description: 'Write the active session cookies to a file.',
|
|
526
|
+
args: z.object({
|
|
527
|
+
file: z.string().describe('Path to write the cookies export to.'),
|
|
528
|
+
}),
|
|
529
|
+
options: connectionOptions,
|
|
530
|
+
output: z.object({
|
|
531
|
+
ok: z.literal(true),
|
|
532
|
+
verb: z.literal('cookies export'),
|
|
533
|
+
file: z.string(),
|
|
534
|
+
count: z.number().describe('Number of cookies exported.'),
|
|
535
|
+
}),
|
|
536
|
+
async run(c) {
|
|
537
|
+
try {
|
|
538
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
539
|
+
const all = await s.page.cookies();
|
|
540
|
+
await writeFile(c.args.file, serializeCookies(all), 'utf8');
|
|
541
|
+
return c.ok({
|
|
542
|
+
ok: true,
|
|
543
|
+
verb: 'cookies export',
|
|
544
|
+
file: c.args.file,
|
|
545
|
+
count: all.length,
|
|
546
|
+
});
|
|
547
|
+
});
|
|
548
|
+
}
|
|
549
|
+
catch (cause) {
|
|
550
|
+
return fail(c, cause, binary);
|
|
551
|
+
}
|
|
552
|
+
},
|
|
553
|
+
});
|
|
554
|
+
cookies.command('import', {
|
|
555
|
+
description: 'Load cookies from an export file into the active session.',
|
|
556
|
+
args: z.object({
|
|
557
|
+
file: z.string().describe('Path to a cookies export file to import.'),
|
|
558
|
+
}),
|
|
559
|
+
options: connectionOptions,
|
|
560
|
+
output: z.object({
|
|
561
|
+
ok: z.literal(true),
|
|
562
|
+
verb: z.literal('cookies import'),
|
|
563
|
+
file: z.string(),
|
|
564
|
+
count: z.number().describe('Number of cookies imported.'),
|
|
565
|
+
}),
|
|
566
|
+
async run(c) {
|
|
567
|
+
try {
|
|
568
|
+
const text = await readFile(c.args.file, 'utf8');
|
|
569
|
+
const parsed = deserializeCookies(text);
|
|
570
|
+
return await withSession(provider, targetFrom(c.options), async (s) => {
|
|
571
|
+
await s.page.setCookies(parsed);
|
|
572
|
+
return c.ok({
|
|
573
|
+
ok: true,
|
|
574
|
+
verb: 'cookies import',
|
|
575
|
+
file: c.args.file,
|
|
576
|
+
count: parsed.length,
|
|
577
|
+
});
|
|
578
|
+
});
|
|
579
|
+
}
|
|
580
|
+
catch (cause) {
|
|
581
|
+
return fail(c, cause, binary);
|
|
582
|
+
}
|
|
583
|
+
},
|
|
584
|
+
});
|
|
585
|
+
cli.command(cookies);
|
|
586
|
+
return cli;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* The default {@link ServeSession}: bring up the ONE long-lived session through
|
|
590
|
+
* `core`'s {@link startSessionServer}, wired to the v1 Playwright transports.
|
|
591
|
+
* `launch` targets use the launch transport (raising the typed missing-profile /
|
|
592
|
+
* missing-binary errors the CLI maps to fix commands); `attach` targets use the
|
|
593
|
+
* attach transport. Kept here (not in the provider) because `serve` is the ONE
|
|
594
|
+
* place a real browser is launched in the ADR-0005 model; verb commands are thin
|
|
595
|
+
* clients and never launch.
|
|
596
|
+
*/
|
|
597
|
+
async function defaultServeSession(target, home) {
|
|
598
|
+
const launch = new PlaywrightLaunchTransport(home);
|
|
599
|
+
const attach = new PlaywrightAttachTransport();
|
|
600
|
+
const transport = {
|
|
601
|
+
open(t) {
|
|
602
|
+
return t.mode === 'attach' ? attach.open(t) : launch.open(t);
|
|
603
|
+
},
|
|
604
|
+
};
|
|
605
|
+
const options = { ...home, transport };
|
|
606
|
+
return startSessionServer(target, options);
|
|
607
|
+
}
|
|
608
|
+
/**
|
|
609
|
+
* Turn the three `wait` option forms into the seam's {@link WaitCondition}, or
|
|
610
|
+
* `undefined` if zero or more than one form was given (the command reports that
|
|
611
|
+
* as a clear error). Mirrors the seam's three-form `wait` verb.
|
|
612
|
+
*/
|
|
613
|
+
function waitConditionFrom(options) {
|
|
614
|
+
const forms = [];
|
|
615
|
+
if (options.ms !== undefined)
|
|
616
|
+
forms.push({ kind: 'timeout', ms: options.ms });
|
|
617
|
+
if (options.locator !== undefined && options.locator !== '')
|
|
618
|
+
forms.push({ kind: 'locator', target: locator(options.locator) });
|
|
619
|
+
if (options.navigation)
|
|
620
|
+
forms.push({ kind: 'navigation' });
|
|
621
|
+
return forms.length === 1 ? forms[0] : undefined;
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* The shared failure path. Map a typed `core` error to its user-facing message
|
|
625
|
+
* + exact fix command (PRD story 17); fall back to a generic error otherwise.
|
|
626
|
+
* Always goes through incur's `c.error(...)` so the failure is in the
|
|
627
|
+
* structured output envelope with a machine-readable `code`.
|
|
628
|
+
*/
|
|
629
|
+
function fail(c, cause, binary) {
|
|
630
|
+
const mapped = mapControllerError(cause, binary);
|
|
631
|
+
if (mapped !== undefined) {
|
|
632
|
+
return c.error({ code: mapped.code, message: mapped.message });
|
|
633
|
+
}
|
|
634
|
+
const message = cause instanceof Error ? cause.message : String(cause);
|
|
635
|
+
return c.error({ code: 'unknown', message });
|
|
636
|
+
}
|
|
637
|
+
// Re-export so the bin entry and tests can reach the builder's helpers.
|
|
638
|
+
export { buildPrompt, resolveProfileLocation };
|
|
639
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAE,CAAC,EAAC,MAAM,OAAO,CAAC;AAC7B,OAAO,EACN,WAAW,EACX,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,EACP,yBAAyB,EACzB,yBAAyB,EACzB,mBAAmB,EACnB,oBAAoB,EACpB,yBAAyB,EACzB,kBAAkB,GAQlB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,kBAAkB,CAA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