agentic-browser 2.5.0 → 2.6.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/AGENTS.md +1 -1
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +6 -5
- package/dist/index.d.mts +75 -88
- package/dist/index.mjs +1 -1
- package/dist/mcp/index.mjs +112 -24
- package/dist/{runtime-C3Y-UgC1.mjs → runtime-BzdbtFF4.mjs} +461 -171
- package/package.json +19 -19
- /package/dist/{setup-BP0YyerC.mjs → setup-DUAjdbQ3.mjs} +0 -0
package/AGENTS.md
CHANGED
|
@@ -37,7 +37,7 @@ src/
|
|
|
37
37
|
chrome-launcher.ts — Chrome executable discovery & launch
|
|
38
38
|
transport/
|
|
39
39
|
control-api.ts — ControlApi facade (delegates to SessionManager)
|
|
40
|
-
|
|
40
|
+
auth-middleware.ts — verifyBearerAuth() token check helper
|
|
41
41
|
memory/
|
|
42
42
|
memory-service.ts — Task memory coordination
|
|
43
43
|
memory-index.ts — Search/ranking (fuzzy match + freshness + domain)
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export {}
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { r as createCliRuntime } from "../runtime-
|
|
2
|
+
import { r as createCliRuntime } from "../runtime-BzdbtFF4.mjs";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import crypto from "node:crypto";
|
|
@@ -242,7 +242,7 @@ async function runCommand(runtime, input) {
|
|
|
242
242
|
payload: input.payload
|
|
243
243
|
});
|
|
244
244
|
} catch (error) {
|
|
245
|
-
throw new Error(`Command rejected: ${error.message}
|
|
245
|
+
throw new Error(`Command rejected: ${error.message}`, { cause: error });
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
//#endregion
|
|
@@ -279,11 +279,11 @@ async function runMemoryStats(runtime) {
|
|
|
279
279
|
}
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/cli/index.ts
|
|
282
|
+
const collect = (value, previous = []) => [...previous, value];
|
|
282
283
|
async function main() {
|
|
283
284
|
const runtime = createCliRuntime();
|
|
284
285
|
const program = new Command();
|
|
285
286
|
program.name("agentic-browser").description("Agentic browser CLI");
|
|
286
|
-
const collect = (value, previous = []) => [...previous, value];
|
|
287
287
|
program.command("session:start").option("--cdp-url <url>", "connect to existing Chrome via CDP endpoint URL").option("--user-profile <path>", "use 'default' for system Chrome profile or an absolute path").option("--headless", "run Chrome in headless mode (no visible window)").option("--user-agent <string>", "override the browser user-agent string").action(async (options) => {
|
|
288
288
|
if (options.cdpUrl) runtime.context.config.cdpUrl = options.cdpUrl;
|
|
289
289
|
if (options.userProfile) runtime.context.config.userProfileDir = options.userProfile === "true" || options.userProfile === "default" ? "default" : options.userProfile;
|
|
@@ -323,6 +323,7 @@ async function main() {
|
|
|
323
323
|
payload: JSON.parse(payloadJson)
|
|
324
324
|
});
|
|
325
325
|
console.log(JSON.stringify(result));
|
|
326
|
+
if (result.resultStatus === "failed" || result.resultStatus === "timed_out") process.exitCode = 1;
|
|
326
327
|
});
|
|
327
328
|
program.command("page:content").argument("<sessionId>").option("--mode <mode>", "title|text|html|a11y|summary", "summary").option("--selector <selector>", "optional CSS selector").option("--max-chars <n>", "max characters for text/html/a11y modes").action(async (sessionId, options) => {
|
|
328
329
|
const result = await runPageContent(runtime, {
|
|
@@ -512,14 +513,14 @@ async function main() {
|
|
|
512
513
|
await startMcpServer();
|
|
513
514
|
});
|
|
514
515
|
program.command("setup").description("Configure agentic-browser as MCP server for your AI tool").action(async () => {
|
|
515
|
-
const { runSetup } = await import("../setup-
|
|
516
|
+
const { runSetup } = await import("../setup-DUAjdbQ3.mjs");
|
|
516
517
|
await runSetup();
|
|
517
518
|
});
|
|
518
519
|
await program.parseAsync(process.argv);
|
|
519
520
|
return keepAlive;
|
|
520
521
|
}
|
|
521
522
|
main().then((keepAlive) => {
|
|
522
|
-
if (!keepAlive) process.exit(0);
|
|
523
|
+
if (!keepAlive) process.exit(process.exitCode ?? 0);
|
|
523
524
|
}).catch((error) => {
|
|
524
525
|
const message = error instanceof Error ? error.message : String(error);
|
|
525
526
|
console.error(JSON.stringify({ error: message }));
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import WebSocket
|
|
2
|
+
import WebSocket from "ws";
|
|
3
3
|
import { z } from "zod";
|
|
4
|
-
|
|
5
4
|
//#region src/session/browser-controller.d.ts
|
|
6
5
|
type InteractAction = "click" | "type" | "press" | "waitFor" | "evaluate" | "scroll" | "hover" | "select" | "toggle" | "goBack" | "goForward" | "refresh" | "dialog";
|
|
7
6
|
interface InteractPayload {
|
|
@@ -99,19 +98,20 @@ interface BrowserController {
|
|
|
99
98
|
getCurrentUrl(targetWsUrl: string): Promise<string>;
|
|
100
99
|
terminate(pid: number): void;
|
|
101
100
|
closeConnection?(targetWsUrl: string): void;
|
|
101
|
+
dispose?(): void;
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
104
|
//#region src/memory/memory-schemas.d.ts
|
|
105
105
|
declare const InsightFreshnessSchema: z.ZodEnum<{
|
|
106
106
|
fresh: "fresh";
|
|
107
|
-
suspect: "suspect";
|
|
108
107
|
stale: "stale";
|
|
108
|
+
suspect: "suspect";
|
|
109
109
|
}>;
|
|
110
110
|
declare const TaskStepSchema: z.ZodObject<{
|
|
111
111
|
type: z.ZodEnum<{
|
|
112
|
-
navigate: "navigate";
|
|
113
|
-
interact: "interact";
|
|
114
112
|
assert: "assert";
|
|
113
|
+
interact: "interact";
|
|
114
|
+
navigate: "navigate";
|
|
115
115
|
}>;
|
|
116
116
|
summary: z.ZodString;
|
|
117
117
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -129,9 +129,9 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
129
129
|
sitePathPattern: z.ZodString;
|
|
130
130
|
actionRecipe: z.ZodArray<z.ZodObject<{
|
|
131
131
|
type: z.ZodEnum<{
|
|
132
|
-
navigate: "navigate";
|
|
133
|
-
interact: "interact";
|
|
134
132
|
assert: "assert";
|
|
133
|
+
interact: "interact";
|
|
134
|
+
navigate: "navigate";
|
|
135
135
|
}>;
|
|
136
136
|
summary: z.ZodString;
|
|
137
137
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -144,8 +144,8 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
144
144
|
useCount: z.ZodNumber;
|
|
145
145
|
freshness: z.ZodEnum<{
|
|
146
146
|
fresh: "fresh";
|
|
147
|
-
suspect: "suspect";
|
|
148
147
|
stale: "stale";
|
|
148
|
+
suspect: "suspect";
|
|
149
149
|
}>;
|
|
150
150
|
staleStrikeCount: z.ZodNumber;
|
|
151
151
|
lastVerifiedAt: z.ZodString;
|
|
@@ -156,8 +156,8 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
156
156
|
evidenceId: z.ZodString;
|
|
157
157
|
commandId: z.ZodString;
|
|
158
158
|
result: z.ZodEnum<{
|
|
159
|
-
success: "success";
|
|
160
159
|
failure: "failure";
|
|
160
|
+
success: "success";
|
|
161
161
|
}>;
|
|
162
162
|
reason: z.ZodOptional<z.ZodString>;
|
|
163
163
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -236,25 +236,25 @@ interface MemorySearchResult {
|
|
|
236
236
|
//#endregion
|
|
237
237
|
//#region src/lib/domain-schemas.d.ts
|
|
238
238
|
declare const SessionStatusSchema: z.ZodEnum<{
|
|
239
|
-
starting: "starting";
|
|
240
|
-
ready: "ready";
|
|
241
239
|
disconnected: "disconnected";
|
|
242
240
|
failed: "failed";
|
|
241
|
+
ready: "ready";
|
|
242
|
+
starting: "starting";
|
|
243
243
|
terminated: "terminated";
|
|
244
244
|
}>;
|
|
245
245
|
declare const CommandTypeSchema: z.ZodEnum<{
|
|
246
|
-
navigate: "navigate";
|
|
247
246
|
interact: "interact";
|
|
247
|
+
navigate: "navigate";
|
|
248
248
|
restart: "restart";
|
|
249
249
|
terminate: "terminate";
|
|
250
250
|
}>;
|
|
251
251
|
declare const SessionSchema: z.ZodObject<{
|
|
252
252
|
sessionId: z.ZodString;
|
|
253
253
|
status: z.ZodEnum<{
|
|
254
|
-
starting: "starting";
|
|
255
|
-
ready: "ready";
|
|
256
254
|
disconnected: "disconnected";
|
|
257
255
|
failed: "failed";
|
|
256
|
+
ready: "ready";
|
|
257
|
+
starting: "starting";
|
|
258
258
|
terminated: "terminated";
|
|
259
259
|
}>;
|
|
260
260
|
browserType: z.ZodLiteral<"chrome">;
|
|
@@ -266,8 +266,8 @@ declare const CommandSchema: z.ZodObject<{
|
|
|
266
266
|
commandId: z.ZodString;
|
|
267
267
|
sessionId: z.ZodString;
|
|
268
268
|
type: z.ZodEnum<{
|
|
269
|
-
navigate: "navigate";
|
|
270
269
|
interact: "interact";
|
|
270
|
+
navigate: "navigate";
|
|
271
271
|
restart: "restart";
|
|
272
272
|
terminate: "terminate";
|
|
273
273
|
}>;
|
|
@@ -285,9 +285,9 @@ declare const SessionEventSchema: z.ZodObject<{
|
|
|
285
285
|
eventId: z.ZodString;
|
|
286
286
|
sessionId: z.ZodString;
|
|
287
287
|
category: z.ZodEnum<{
|
|
288
|
+
command: "command";
|
|
288
289
|
lifecycle: "lifecycle";
|
|
289
290
|
security: "security";
|
|
290
|
-
command: "command";
|
|
291
291
|
}>;
|
|
292
292
|
message: z.ZodString;
|
|
293
293
|
createdAt: z.ZodString;
|
|
@@ -305,11 +305,8 @@ type SessionEvent = z.infer<typeof SessionEventSchema>;
|
|
|
305
305
|
//#endregion
|
|
306
306
|
//#region src/lib/config.d.ts
|
|
307
307
|
interface AppConfig {
|
|
308
|
-
host: string;
|
|
309
|
-
wsPort: number;
|
|
310
308
|
dataDir: string;
|
|
311
309
|
browserExecutablePath?: string;
|
|
312
|
-
commandTimeoutMs: number;
|
|
313
310
|
cdpUrl?: string;
|
|
314
311
|
userProfileDir?: string;
|
|
315
312
|
headless?: boolean;
|
|
@@ -336,8 +333,15 @@ declare class EventStore {
|
|
|
336
333
|
private readonly filePath;
|
|
337
334
|
private readonly bufferedLines;
|
|
338
335
|
private flushTimer;
|
|
336
|
+
private pendingFlushDelayMs;
|
|
339
337
|
private flushInFlight;
|
|
340
338
|
constructor(baseDir: string);
|
|
339
|
+
/**
|
|
340
|
+
* Remove the process exit handlers and flush any buffered lines.
|
|
341
|
+
* Call when discarding a store (repeated context creation in tests/embedders
|
|
342
|
+
* would otherwise leak a listener pair per instance).
|
|
343
|
+
*/
|
|
344
|
+
dispose(): void;
|
|
341
345
|
append(event: SessionEvent): void;
|
|
342
346
|
list(sessionId: string, limit?: number): SessionEvent[];
|
|
343
347
|
clear(sessionId: string): void;
|
|
@@ -356,21 +360,6 @@ declare class SessionTokenService {
|
|
|
356
360
|
seed(sessionId: string, token: string): void;
|
|
357
361
|
}
|
|
358
362
|
//#endregion
|
|
359
|
-
//#region src/transport/ws-server.d.ts
|
|
360
|
-
interface WsServerOptions {
|
|
361
|
-
host: string;
|
|
362
|
-
port: number;
|
|
363
|
-
tokenService: SessionTokenService;
|
|
364
|
-
}
|
|
365
|
-
declare class AuthenticatedWsServer {
|
|
366
|
-
private readonly options;
|
|
367
|
-
private readonly logger;
|
|
368
|
-
private server?;
|
|
369
|
-
constructor(options: WsServerOptions);
|
|
370
|
-
start(onMessage: (socket: WebSocket$1, data: unknown) => void): void;
|
|
371
|
-
stop(): void;
|
|
372
|
-
}
|
|
373
|
-
//#endregion
|
|
374
363
|
//#region src/memory/memory-service.d.ts
|
|
375
364
|
interface MemorySearchInput {
|
|
376
365
|
taskIntent: string;
|
|
@@ -444,7 +433,6 @@ interface AppContext {
|
|
|
444
433
|
logger: Logger;
|
|
445
434
|
eventStore: EventStore;
|
|
446
435
|
tokenService: SessionTokenService;
|
|
447
|
-
wsServer: AuthenticatedWsServer;
|
|
448
436
|
memoryService: MemoryService;
|
|
449
437
|
}
|
|
450
438
|
//#endregion
|
|
@@ -508,36 +496,36 @@ declare class SessionManager {
|
|
|
508
496
|
siteDomain: string;
|
|
509
497
|
sitePathPattern: string;
|
|
510
498
|
actionRecipe: {
|
|
511
|
-
type: "
|
|
499
|
+
type: "assert" | "interact" | "navigate";
|
|
512
500
|
summary: string;
|
|
513
|
-
payload: Record<string, unknown>;
|
|
514
501
|
selector?: string | undefined;
|
|
502
|
+
payload: Record<string, unknown>;
|
|
515
503
|
}[];
|
|
516
504
|
expectedOutcome: string;
|
|
517
505
|
confidence: number;
|
|
518
506
|
successCount: number;
|
|
519
507
|
failureCount: number;
|
|
520
508
|
useCount: number;
|
|
521
|
-
freshness: "fresh" | "
|
|
509
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
522
510
|
staleStrikeCount: number;
|
|
523
511
|
lastVerifiedAt: string;
|
|
524
512
|
createdAt: string;
|
|
525
513
|
updatedAt: string;
|
|
514
|
+
supersedes?: string | undefined;
|
|
526
515
|
evidence: {
|
|
527
516
|
evidenceId: string;
|
|
528
517
|
commandId: string;
|
|
529
|
-
result: "
|
|
530
|
-
recordedAt: string;
|
|
518
|
+
result: "failure" | "success";
|
|
531
519
|
reason?: string | undefined;
|
|
532
520
|
selector?: string | undefined;
|
|
533
521
|
url?: string | undefined;
|
|
522
|
+
recordedAt: string;
|
|
534
523
|
}[];
|
|
535
524
|
selectorAliases: {
|
|
536
525
|
alias: string;
|
|
537
526
|
selector: string;
|
|
538
527
|
fallbackSelectors: string[];
|
|
539
528
|
}[];
|
|
540
|
-
supersedes?: string | undefined;
|
|
541
529
|
};
|
|
542
530
|
verifyMemory(insightId: string): {
|
|
543
531
|
insightId: string;
|
|
@@ -545,36 +533,36 @@ declare class SessionManager {
|
|
|
545
533
|
siteDomain: string;
|
|
546
534
|
sitePathPattern: string;
|
|
547
535
|
actionRecipe: {
|
|
548
|
-
type: "
|
|
536
|
+
type: "assert" | "interact" | "navigate";
|
|
549
537
|
summary: string;
|
|
550
|
-
payload: Record<string, unknown>;
|
|
551
538
|
selector?: string | undefined;
|
|
539
|
+
payload: Record<string, unknown>;
|
|
552
540
|
}[];
|
|
553
541
|
expectedOutcome: string;
|
|
554
542
|
confidence: number;
|
|
555
543
|
successCount: number;
|
|
556
544
|
failureCount: number;
|
|
557
545
|
useCount: number;
|
|
558
|
-
freshness: "fresh" | "
|
|
546
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
559
547
|
staleStrikeCount: number;
|
|
560
548
|
lastVerifiedAt: string;
|
|
561
549
|
createdAt: string;
|
|
562
550
|
updatedAt: string;
|
|
551
|
+
supersedes?: string | undefined;
|
|
563
552
|
evidence: {
|
|
564
553
|
evidenceId: string;
|
|
565
554
|
commandId: string;
|
|
566
|
-
result: "
|
|
567
|
-
recordedAt: string;
|
|
555
|
+
result: "failure" | "success";
|
|
568
556
|
reason?: string | undefined;
|
|
569
557
|
selector?: string | undefined;
|
|
570
558
|
url?: string | undefined;
|
|
559
|
+
recordedAt: string;
|
|
571
560
|
}[];
|
|
572
561
|
selectorAliases: {
|
|
573
562
|
alias: string;
|
|
574
563
|
selector: string;
|
|
575
564
|
fallbackSelectors: string[];
|
|
576
565
|
}[];
|
|
577
|
-
supersedes?: string | undefined;
|
|
578
566
|
};
|
|
579
567
|
memoryStats(): {
|
|
580
568
|
total: number;
|
|
@@ -600,25 +588,24 @@ declare class SessionManager {
|
|
|
600
588
|
//#region src/transport/control-api.d.ts
|
|
601
589
|
declare class ControlApi {
|
|
602
590
|
private readonly sessions;
|
|
603
|
-
|
|
604
|
-
constructor(sessions: SessionManager, eventStore: EventStore);
|
|
591
|
+
constructor(sessions: SessionManager);
|
|
605
592
|
createSession(input: {
|
|
606
593
|
browser: "chrome";
|
|
607
594
|
}): Promise<{
|
|
608
595
|
sessionId: string;
|
|
609
|
-
status: "
|
|
596
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
610
597
|
browserType: "chrome";
|
|
611
598
|
startedAt: string;
|
|
612
|
-
authTokenRef: string;
|
|
613
599
|
endedAt?: string | undefined;
|
|
600
|
+
authTokenRef: string;
|
|
614
601
|
}>;
|
|
615
602
|
getSession(sessionId: string): {
|
|
616
603
|
sessionId: string;
|
|
617
|
-
status: "
|
|
604
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
618
605
|
browserType: "chrome";
|
|
619
606
|
startedAt: string;
|
|
620
|
-
authTokenRef: string;
|
|
621
607
|
endedAt?: string | undefined;
|
|
608
|
+
authTokenRef: string;
|
|
622
609
|
};
|
|
623
610
|
terminateSession(sessionId: string): Promise<void>;
|
|
624
611
|
executeCommand(sessionId: string, input: {
|
|
@@ -628,7 +615,7 @@ declare class ControlApi {
|
|
|
628
615
|
}): Promise<{
|
|
629
616
|
commandId: string;
|
|
630
617
|
sessionId: string;
|
|
631
|
-
type: "
|
|
618
|
+
type: "interact" | "navigate" | "restart" | "terminate";
|
|
632
619
|
payload: Record<string, unknown>;
|
|
633
620
|
submittedAt: string;
|
|
634
621
|
completedAt?: string | undefined;
|
|
@@ -637,11 +624,11 @@ declare class ControlApi {
|
|
|
637
624
|
}>;
|
|
638
625
|
restartSession(sessionId: string): Promise<{
|
|
639
626
|
sessionId: string;
|
|
640
|
-
status: "
|
|
627
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
641
628
|
browserType: "chrome";
|
|
642
629
|
startedAt: string;
|
|
643
|
-
authTokenRef: string;
|
|
644
630
|
endedAt?: string | undefined;
|
|
631
|
+
authTokenRef: string;
|
|
645
632
|
}>;
|
|
646
633
|
rotateSessionToken(sessionId: string): string;
|
|
647
634
|
getContent(sessionId: string, options: {
|
|
@@ -657,7 +644,7 @@ declare class ControlApi {
|
|
|
657
644
|
events: {
|
|
658
645
|
eventId: string;
|
|
659
646
|
sessionId: string;
|
|
660
|
-
category: "
|
|
647
|
+
category: "command" | "lifecycle" | "security";
|
|
661
648
|
message: string;
|
|
662
649
|
createdAt: string;
|
|
663
650
|
severity: "error" | "info" | "warning";
|
|
@@ -676,36 +663,36 @@ declare class ControlApi {
|
|
|
676
663
|
siteDomain: string;
|
|
677
664
|
sitePathPattern: string;
|
|
678
665
|
actionRecipe: {
|
|
679
|
-
type: "
|
|
666
|
+
type: "assert" | "interact" | "navigate";
|
|
680
667
|
summary: string;
|
|
681
|
-
payload: Record<string, unknown>;
|
|
682
668
|
selector?: string | undefined;
|
|
669
|
+
payload: Record<string, unknown>;
|
|
683
670
|
}[];
|
|
684
671
|
expectedOutcome: string;
|
|
685
672
|
confidence: number;
|
|
686
673
|
successCount: number;
|
|
687
674
|
failureCount: number;
|
|
688
675
|
useCount: number;
|
|
689
|
-
freshness: "fresh" | "
|
|
676
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
690
677
|
staleStrikeCount: number;
|
|
691
678
|
lastVerifiedAt: string;
|
|
692
679
|
createdAt: string;
|
|
693
680
|
updatedAt: string;
|
|
681
|
+
supersedes?: string | undefined;
|
|
694
682
|
evidence: {
|
|
695
683
|
evidenceId: string;
|
|
696
684
|
commandId: string;
|
|
697
|
-
result: "
|
|
698
|
-
recordedAt: string;
|
|
685
|
+
result: "failure" | "success";
|
|
699
686
|
reason?: string | undefined;
|
|
700
687
|
selector?: string | undefined;
|
|
701
688
|
url?: string | undefined;
|
|
689
|
+
recordedAt: string;
|
|
702
690
|
}[];
|
|
703
691
|
selectorAliases: {
|
|
704
692
|
alias: string;
|
|
705
693
|
selector: string;
|
|
706
694
|
fallbackSelectors: string[];
|
|
707
695
|
}[];
|
|
708
|
-
supersedes?: string | undefined;
|
|
709
696
|
};
|
|
710
697
|
verifyMemory(insightId: string): {
|
|
711
698
|
insightId: string;
|
|
@@ -713,36 +700,36 @@ declare class ControlApi {
|
|
|
713
700
|
siteDomain: string;
|
|
714
701
|
sitePathPattern: string;
|
|
715
702
|
actionRecipe: {
|
|
716
|
-
type: "
|
|
703
|
+
type: "assert" | "interact" | "navigate";
|
|
717
704
|
summary: string;
|
|
718
|
-
payload: Record<string, unknown>;
|
|
719
705
|
selector?: string | undefined;
|
|
706
|
+
payload: Record<string, unknown>;
|
|
720
707
|
}[];
|
|
721
708
|
expectedOutcome: string;
|
|
722
709
|
confidence: number;
|
|
723
710
|
successCount: number;
|
|
724
711
|
failureCount: number;
|
|
725
712
|
useCount: number;
|
|
726
|
-
freshness: "fresh" | "
|
|
713
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
727
714
|
staleStrikeCount: number;
|
|
728
715
|
lastVerifiedAt: string;
|
|
729
716
|
createdAt: string;
|
|
730
717
|
updatedAt: string;
|
|
718
|
+
supersedes?: string | undefined;
|
|
731
719
|
evidence: {
|
|
732
720
|
evidenceId: string;
|
|
733
721
|
commandId: string;
|
|
734
|
-
result: "
|
|
735
|
-
recordedAt: string;
|
|
722
|
+
result: "failure" | "success";
|
|
736
723
|
reason?: string | undefined;
|
|
737
724
|
selector?: string | undefined;
|
|
738
725
|
url?: string | undefined;
|
|
726
|
+
recordedAt: string;
|
|
739
727
|
}[];
|
|
740
728
|
selectorAliases: {
|
|
741
729
|
alias: string;
|
|
742
730
|
selector: string;
|
|
743
731
|
fallbackSelectors: string[];
|
|
744
732
|
}[];
|
|
745
|
-
supersedes?: string | undefined;
|
|
746
733
|
};
|
|
747
734
|
memoryStats(): {
|
|
748
735
|
total: number;
|
|
@@ -780,24 +767,24 @@ declare class AgenticBrowserCore {
|
|
|
780
767
|
browser: "chrome";
|
|
781
768
|
}): Promise<{
|
|
782
769
|
sessionId: string;
|
|
783
|
-
status: "
|
|
770
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
784
771
|
browserType: "chrome";
|
|
785
772
|
startedAt: string;
|
|
786
|
-
authTokenRef: string;
|
|
787
773
|
endedAt?: string | undefined;
|
|
774
|
+
authTokenRef: string;
|
|
788
775
|
}>;
|
|
789
776
|
getSession(sessionId: string): {
|
|
790
777
|
sessionId: string;
|
|
791
|
-
status: "
|
|
778
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
792
779
|
browserType: "chrome";
|
|
793
780
|
startedAt: string;
|
|
794
|
-
authTokenRef: string;
|
|
795
781
|
endedAt?: string | undefined;
|
|
782
|
+
authTokenRef: string;
|
|
796
783
|
};
|
|
797
784
|
runCommand(input: ExecuteCommandInput): Promise<{
|
|
798
785
|
commandId: string;
|
|
799
786
|
sessionId: string;
|
|
800
|
-
type: "
|
|
787
|
+
type: "interact" | "navigate" | "restart" | "terminate";
|
|
801
788
|
payload: Record<string, unknown>;
|
|
802
789
|
submittedAt: string;
|
|
803
790
|
completedAt?: string | undefined;
|
|
@@ -822,11 +809,11 @@ declare class AgenticBrowserCore {
|
|
|
822
809
|
getCurrentUrl(sessionId: string): Promise<string>;
|
|
823
810
|
restartSession(sessionId: string): Promise<{
|
|
824
811
|
sessionId: string;
|
|
825
|
-
status: "
|
|
812
|
+
status: "disconnected" | "failed" | "ready" | "starting" | "terminated";
|
|
826
813
|
browserType: "chrome";
|
|
827
814
|
startedAt: string;
|
|
828
|
-
authTokenRef: string;
|
|
829
815
|
endedAt?: string | undefined;
|
|
816
|
+
authTokenRef: string;
|
|
830
817
|
}>;
|
|
831
818
|
stopSession(sessionId: string): Promise<void>;
|
|
832
819
|
rotateSessionToken(sessionId: string): string;
|
|
@@ -843,36 +830,36 @@ declare class AgenticBrowserCore {
|
|
|
843
830
|
siteDomain: string;
|
|
844
831
|
sitePathPattern: string;
|
|
845
832
|
actionRecipe: {
|
|
846
|
-
type: "
|
|
833
|
+
type: "assert" | "interact" | "navigate";
|
|
847
834
|
summary: string;
|
|
848
|
-
payload: Record<string, unknown>;
|
|
849
835
|
selector?: string | undefined;
|
|
836
|
+
payload: Record<string, unknown>;
|
|
850
837
|
}[];
|
|
851
838
|
expectedOutcome: string;
|
|
852
839
|
confidence: number;
|
|
853
840
|
successCount: number;
|
|
854
841
|
failureCount: number;
|
|
855
842
|
useCount: number;
|
|
856
|
-
freshness: "fresh" | "
|
|
843
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
857
844
|
staleStrikeCount: number;
|
|
858
845
|
lastVerifiedAt: string;
|
|
859
846
|
createdAt: string;
|
|
860
847
|
updatedAt: string;
|
|
848
|
+
supersedes?: string | undefined;
|
|
861
849
|
evidence: {
|
|
862
850
|
evidenceId: string;
|
|
863
851
|
commandId: string;
|
|
864
|
-
result: "
|
|
865
|
-
recordedAt: string;
|
|
852
|
+
result: "failure" | "success";
|
|
866
853
|
reason?: string | undefined;
|
|
867
854
|
selector?: string | undefined;
|
|
868
855
|
url?: string | undefined;
|
|
856
|
+
recordedAt: string;
|
|
869
857
|
}[];
|
|
870
858
|
selectorAliases: {
|
|
871
859
|
alias: string;
|
|
872
860
|
selector: string;
|
|
873
861
|
fallbackSelectors: string[];
|
|
874
862
|
}[];
|
|
875
|
-
supersedes?: string | undefined;
|
|
876
863
|
};
|
|
877
864
|
verifyMemory(insightId: string): {
|
|
878
865
|
insightId: string;
|
|
@@ -880,36 +867,36 @@ declare class AgenticBrowserCore {
|
|
|
880
867
|
siteDomain: string;
|
|
881
868
|
sitePathPattern: string;
|
|
882
869
|
actionRecipe: {
|
|
883
|
-
type: "
|
|
870
|
+
type: "assert" | "interact" | "navigate";
|
|
884
871
|
summary: string;
|
|
885
|
-
payload: Record<string, unknown>;
|
|
886
872
|
selector?: string | undefined;
|
|
873
|
+
payload: Record<string, unknown>;
|
|
887
874
|
}[];
|
|
888
875
|
expectedOutcome: string;
|
|
889
876
|
confidence: number;
|
|
890
877
|
successCount: number;
|
|
891
878
|
failureCount: number;
|
|
892
879
|
useCount: number;
|
|
893
|
-
freshness: "fresh" | "
|
|
880
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
894
881
|
staleStrikeCount: number;
|
|
895
882
|
lastVerifiedAt: string;
|
|
896
883
|
createdAt: string;
|
|
897
884
|
updatedAt: string;
|
|
885
|
+
supersedes?: string | undefined;
|
|
898
886
|
evidence: {
|
|
899
887
|
evidenceId: string;
|
|
900
888
|
commandId: string;
|
|
901
|
-
result: "
|
|
902
|
-
recordedAt: string;
|
|
889
|
+
result: "failure" | "success";
|
|
903
890
|
reason?: string | undefined;
|
|
904
891
|
selector?: string | undefined;
|
|
905
892
|
url?: string | undefined;
|
|
893
|
+
recordedAt: string;
|
|
906
894
|
}[];
|
|
907
895
|
selectorAliases: {
|
|
908
896
|
alias: string;
|
|
909
897
|
selector: string;
|
|
910
898
|
fallbackSelectors: string[];
|
|
911
899
|
}[];
|
|
912
|
-
supersedes?: string | undefined;
|
|
913
900
|
};
|
|
914
901
|
memoryStats(): {
|
|
915
902
|
total: number;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { i as createMockAgenticBrowserCore, n as createAgenticBrowserCore, t as AgenticBrowserCore } from "./runtime-
|
|
2
|
+
import { i as createMockAgenticBrowserCore, n as createAgenticBrowserCore, t as AgenticBrowserCore } from "./runtime-BzdbtFF4.mjs";
|
|
3
3
|
export { AgenticBrowserCore, createAgenticBrowserCore, createMockAgenticBrowserCore };
|