agentic-browser 2.5.1 → 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 +4 -3
- package/dist/index.d.mts +73 -86
- package/dist/index.mjs +1 -1
- package/dist/mcp/index.mjs +111 -23
- package/dist/{runtime-BeD8ZcjH.mjs → runtime-BzdbtFF4.mjs} +309 -150
- package/package.json +17 -17
- /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";
|
|
@@ -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 {
|
|
@@ -105,14 +104,14 @@ interface BrowserController {
|
|
|
105
104
|
//#region src/memory/memory-schemas.d.ts
|
|
106
105
|
declare const InsightFreshnessSchema: z.ZodEnum<{
|
|
107
106
|
fresh: "fresh";
|
|
108
|
-
suspect: "suspect";
|
|
109
107
|
stale: "stale";
|
|
108
|
+
suspect: "suspect";
|
|
110
109
|
}>;
|
|
111
110
|
declare const TaskStepSchema: z.ZodObject<{
|
|
112
111
|
type: z.ZodEnum<{
|
|
113
|
-
navigate: "navigate";
|
|
114
|
-
interact: "interact";
|
|
115
112
|
assert: "assert";
|
|
113
|
+
interact: "interact";
|
|
114
|
+
navigate: "navigate";
|
|
116
115
|
}>;
|
|
117
116
|
summary: z.ZodString;
|
|
118
117
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -130,9 +129,9 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
130
129
|
sitePathPattern: z.ZodString;
|
|
131
130
|
actionRecipe: z.ZodArray<z.ZodObject<{
|
|
132
131
|
type: z.ZodEnum<{
|
|
133
|
-
navigate: "navigate";
|
|
134
|
-
interact: "interact";
|
|
135
132
|
assert: "assert";
|
|
133
|
+
interact: "interact";
|
|
134
|
+
navigate: "navigate";
|
|
136
135
|
}>;
|
|
137
136
|
summary: z.ZodString;
|
|
138
137
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -145,8 +144,8 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
145
144
|
useCount: z.ZodNumber;
|
|
146
145
|
freshness: z.ZodEnum<{
|
|
147
146
|
fresh: "fresh";
|
|
148
|
-
suspect: "suspect";
|
|
149
147
|
stale: "stale";
|
|
148
|
+
suspect: "suspect";
|
|
150
149
|
}>;
|
|
151
150
|
staleStrikeCount: z.ZodNumber;
|
|
152
151
|
lastVerifiedAt: z.ZodString;
|
|
@@ -157,8 +156,8 @@ declare const TaskInsightSchema: z.ZodObject<{
|
|
|
157
156
|
evidenceId: z.ZodString;
|
|
158
157
|
commandId: z.ZodString;
|
|
159
158
|
result: z.ZodEnum<{
|
|
160
|
-
success: "success";
|
|
161
159
|
failure: "failure";
|
|
160
|
+
success: "success";
|
|
162
161
|
}>;
|
|
163
162
|
reason: z.ZodOptional<z.ZodString>;
|
|
164
163
|
selector: z.ZodOptional<z.ZodString>;
|
|
@@ -237,25 +236,25 @@ interface MemorySearchResult {
|
|
|
237
236
|
//#endregion
|
|
238
237
|
//#region src/lib/domain-schemas.d.ts
|
|
239
238
|
declare const SessionStatusSchema: z.ZodEnum<{
|
|
240
|
-
starting: "starting";
|
|
241
|
-
ready: "ready";
|
|
242
239
|
disconnected: "disconnected";
|
|
243
240
|
failed: "failed";
|
|
241
|
+
ready: "ready";
|
|
242
|
+
starting: "starting";
|
|
244
243
|
terminated: "terminated";
|
|
245
244
|
}>;
|
|
246
245
|
declare const CommandTypeSchema: z.ZodEnum<{
|
|
247
|
-
navigate: "navigate";
|
|
248
246
|
interact: "interact";
|
|
247
|
+
navigate: "navigate";
|
|
249
248
|
restart: "restart";
|
|
250
249
|
terminate: "terminate";
|
|
251
250
|
}>;
|
|
252
251
|
declare const SessionSchema: z.ZodObject<{
|
|
253
252
|
sessionId: z.ZodString;
|
|
254
253
|
status: z.ZodEnum<{
|
|
255
|
-
starting: "starting";
|
|
256
|
-
ready: "ready";
|
|
257
254
|
disconnected: "disconnected";
|
|
258
255
|
failed: "failed";
|
|
256
|
+
ready: "ready";
|
|
257
|
+
starting: "starting";
|
|
259
258
|
terminated: "terminated";
|
|
260
259
|
}>;
|
|
261
260
|
browserType: z.ZodLiteral<"chrome">;
|
|
@@ -267,8 +266,8 @@ declare const CommandSchema: z.ZodObject<{
|
|
|
267
266
|
commandId: z.ZodString;
|
|
268
267
|
sessionId: z.ZodString;
|
|
269
268
|
type: z.ZodEnum<{
|
|
270
|
-
navigate: "navigate";
|
|
271
269
|
interact: "interact";
|
|
270
|
+
navigate: "navigate";
|
|
272
271
|
restart: "restart";
|
|
273
272
|
terminate: "terminate";
|
|
274
273
|
}>;
|
|
@@ -286,9 +285,9 @@ declare const SessionEventSchema: z.ZodObject<{
|
|
|
286
285
|
eventId: z.ZodString;
|
|
287
286
|
sessionId: z.ZodString;
|
|
288
287
|
category: z.ZodEnum<{
|
|
288
|
+
command: "command";
|
|
289
289
|
lifecycle: "lifecycle";
|
|
290
290
|
security: "security";
|
|
291
|
-
command: "command";
|
|
292
291
|
}>;
|
|
293
292
|
message: z.ZodString;
|
|
294
293
|
createdAt: z.ZodString;
|
|
@@ -306,11 +305,8 @@ type SessionEvent = z.infer<typeof SessionEventSchema>;
|
|
|
306
305
|
//#endregion
|
|
307
306
|
//#region src/lib/config.d.ts
|
|
308
307
|
interface AppConfig {
|
|
309
|
-
host: string;
|
|
310
|
-
wsPort: number;
|
|
311
308
|
dataDir: string;
|
|
312
309
|
browserExecutablePath?: string;
|
|
313
|
-
commandTimeoutMs: number;
|
|
314
310
|
cdpUrl?: string;
|
|
315
311
|
userProfileDir?: string;
|
|
316
312
|
headless?: boolean;
|
|
@@ -337,8 +333,15 @@ declare class EventStore {
|
|
|
337
333
|
private readonly filePath;
|
|
338
334
|
private readonly bufferedLines;
|
|
339
335
|
private flushTimer;
|
|
336
|
+
private pendingFlushDelayMs;
|
|
340
337
|
private flushInFlight;
|
|
341
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;
|
|
342
345
|
append(event: SessionEvent): void;
|
|
343
346
|
list(sessionId: string, limit?: number): SessionEvent[];
|
|
344
347
|
clear(sessionId: string): void;
|
|
@@ -357,21 +360,6 @@ declare class SessionTokenService {
|
|
|
357
360
|
seed(sessionId: string, token: string): void;
|
|
358
361
|
}
|
|
359
362
|
//#endregion
|
|
360
|
-
//#region src/transport/ws-server.d.ts
|
|
361
|
-
interface WsServerOptions {
|
|
362
|
-
host: string;
|
|
363
|
-
port: number;
|
|
364
|
-
tokenService: SessionTokenService;
|
|
365
|
-
}
|
|
366
|
-
declare class AuthenticatedWsServer {
|
|
367
|
-
private readonly options;
|
|
368
|
-
private readonly logger;
|
|
369
|
-
private server?;
|
|
370
|
-
constructor(options: WsServerOptions);
|
|
371
|
-
start(onMessage: (socket: WebSocket$1, data: unknown) => void): void;
|
|
372
|
-
stop(): void;
|
|
373
|
-
}
|
|
374
|
-
//#endregion
|
|
375
363
|
//#region src/memory/memory-service.d.ts
|
|
376
364
|
interface MemorySearchInput {
|
|
377
365
|
taskIntent: string;
|
|
@@ -445,7 +433,6 @@ interface AppContext {
|
|
|
445
433
|
logger: Logger;
|
|
446
434
|
eventStore: EventStore;
|
|
447
435
|
tokenService: SessionTokenService;
|
|
448
|
-
wsServer: AuthenticatedWsServer;
|
|
449
436
|
memoryService: MemoryService;
|
|
450
437
|
}
|
|
451
438
|
//#endregion
|
|
@@ -509,36 +496,36 @@ declare class SessionManager {
|
|
|
509
496
|
siteDomain: string;
|
|
510
497
|
sitePathPattern: string;
|
|
511
498
|
actionRecipe: {
|
|
512
|
-
type: "
|
|
499
|
+
type: "assert" | "interact" | "navigate";
|
|
513
500
|
summary: string;
|
|
514
|
-
payload: Record<string, unknown>;
|
|
515
501
|
selector?: string | undefined;
|
|
502
|
+
payload: Record<string, unknown>;
|
|
516
503
|
}[];
|
|
517
504
|
expectedOutcome: string;
|
|
518
505
|
confidence: number;
|
|
519
506
|
successCount: number;
|
|
520
507
|
failureCount: number;
|
|
521
508
|
useCount: number;
|
|
522
|
-
freshness: "fresh" | "
|
|
509
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
523
510
|
staleStrikeCount: number;
|
|
524
511
|
lastVerifiedAt: string;
|
|
525
512
|
createdAt: string;
|
|
526
513
|
updatedAt: string;
|
|
514
|
+
supersedes?: string | undefined;
|
|
527
515
|
evidence: {
|
|
528
516
|
evidenceId: string;
|
|
529
517
|
commandId: string;
|
|
530
|
-
result: "
|
|
531
|
-
recordedAt: string;
|
|
518
|
+
result: "failure" | "success";
|
|
532
519
|
reason?: string | undefined;
|
|
533
520
|
selector?: string | undefined;
|
|
534
521
|
url?: string | undefined;
|
|
522
|
+
recordedAt: string;
|
|
535
523
|
}[];
|
|
536
524
|
selectorAliases: {
|
|
537
525
|
alias: string;
|
|
538
526
|
selector: string;
|
|
539
527
|
fallbackSelectors: string[];
|
|
540
528
|
}[];
|
|
541
|
-
supersedes?: string | undefined;
|
|
542
529
|
};
|
|
543
530
|
verifyMemory(insightId: string): {
|
|
544
531
|
insightId: string;
|
|
@@ -546,36 +533,36 @@ declare class SessionManager {
|
|
|
546
533
|
siteDomain: string;
|
|
547
534
|
sitePathPattern: string;
|
|
548
535
|
actionRecipe: {
|
|
549
|
-
type: "
|
|
536
|
+
type: "assert" | "interact" | "navigate";
|
|
550
537
|
summary: string;
|
|
551
|
-
payload: Record<string, unknown>;
|
|
552
538
|
selector?: string | undefined;
|
|
539
|
+
payload: Record<string, unknown>;
|
|
553
540
|
}[];
|
|
554
541
|
expectedOutcome: string;
|
|
555
542
|
confidence: number;
|
|
556
543
|
successCount: number;
|
|
557
544
|
failureCount: number;
|
|
558
545
|
useCount: number;
|
|
559
|
-
freshness: "fresh" | "
|
|
546
|
+
freshness: "fresh" | "stale" | "suspect";
|
|
560
547
|
staleStrikeCount: number;
|
|
561
548
|
lastVerifiedAt: string;
|
|
562
549
|
createdAt: string;
|
|
563
550
|
updatedAt: string;
|
|
551
|
+
supersedes?: string | undefined;
|
|
564
552
|
evidence: {
|
|
565
553
|
evidenceId: string;
|
|
566
554
|
commandId: string;
|
|
567
|
-
result: "
|
|
568
|
-
recordedAt: string;
|
|
555
|
+
result: "failure" | "success";
|
|
569
556
|
reason?: string | undefined;
|
|
570
557
|
selector?: string | undefined;
|
|
571
558
|
url?: string | undefined;
|
|
559
|
+
recordedAt: string;
|
|
572
560
|
}[];
|
|
573
561
|
selectorAliases: {
|
|
574
562
|
alias: string;
|
|
575
563
|
selector: string;
|
|
576
564
|
fallbackSelectors: string[];
|
|
577
565
|
}[];
|
|
578
|
-
supersedes?: string | undefined;
|
|
579
566
|
};
|
|
580
567
|
memoryStats(): {
|
|
581
568
|
total: number;
|
|
@@ -606,19 +593,19 @@ declare class ControlApi {
|
|
|
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 };
|