@trusty-squire/mcp 1.1.13 → 1.1.14-rc.1

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/README.md CHANGED
@@ -349,13 +349,16 @@ still return only a current handle. `detail:"full"` keeps the V2 format. Maintai
349
349
  live `text=…`/`css=…` locator; that one-off fallback is not replayable.
350
350
  Compact V2 accepts only a handle from its current sealed action map.
351
351
  When a `click` or `js_click` opens a new tab or popup (`target=_blank`, a
352
- `window.open` control), the operator follows it the way a person would: the
353
- newly opened page becomes the active page, so the next `operate_observe` or
354
- `operate_act` reads it. This is how an emailed verification or magic link is
355
- followed. Do not try to `extract` the link's href instead a single-use login
356
- token is sealed and is never returned as text; following the tab navigates the
357
- browser without exposing it. Payment is excluded: during a sealed card fill or
358
- a live place-order/3-D Secure approval the active page never changes.
352
+ `window.open` control), the operator follows it the way a person would only
353
+ when the browser attributes its creation to the session's active page. That
354
+ owned popup becomes the active page, so the next `operate_observe` or
355
+ `operate_act` reads it. An unrelated or no-opener page in the browser context
356
+ stays unassigned and cannot become the working page. This is how an emailed
357
+ verification or magic link is followed. Do not try to `extract` the link's href
358
+ instead — a single-use login token is sealed and is never returned as text;
359
+ following the tab navigates the browser without exposing it. Payment is
360
+ excluded: during a sealed card fill or a live place-order/3-D Secure approval
361
+ the active page never changes.
359
362
  In a live operator session, in-page XHR/fetch calls to merchant API sibling
360
363
  subdomains are automatically in scope only when they share the registrable
361
364
  domain of a host trusted at session start. Calls outside the session scope fail
@@ -0,0 +1,75 @@
1
+ import type { BrowserContext } from "playwright";
2
+ import { type ProfileCloseState } from "./profile.js";
3
+ import { type StealthProfile } from "./browser-process-runtime.js";
4
+ import type { PageDriver } from "./page-driver.js";
5
+ /** Exclusive Chrome custody. Page setup is awaited at the original startup boundary. */
6
+ export declare class BrowserProcessOwner {
7
+ private readonly pages;
8
+ private readonly initializePages;
9
+ context: BrowserContext | null;
10
+ private childChrome;
11
+ private childChromeIdentity;
12
+ private childChromeProcessGroup;
13
+ private ownedDisplayRig;
14
+ private ownedChromeProcessTreeProof;
15
+ private operatorProcessMarker;
16
+ private ownerLaunchTracked;
17
+ private cdpBrowser;
18
+ private launchedContext;
19
+ private launchedProfileHolderIdentity;
20
+ private startPromise;
21
+ private closePromise;
22
+ private startCancellationRequested;
23
+ private startLaunchCommitted;
24
+ private startSettled;
25
+ private persistentFallbackLaunchInFlight;
26
+ private persistentFallbackOwnershipMonitor;
27
+ private persistentFallbackCancellationState;
28
+ private resolveStartCancellation;
29
+ private readonly startCancellation;
30
+ private cancelledStartReaper;
31
+ private launchedChannel;
32
+ private proxyServer;
33
+ private readonly profileDir;
34
+ private readonly proxyOverride;
35
+ launchedMode: "headed" | "headless" | "remote" | "unknown";
36
+ constructor(opts: {
37
+ profileDir?: string;
38
+ proxyUrl?: string;
39
+ }, pages: PageDriver, initializePages: (context: BrowserContext, hardened: boolean, remoteMode: boolean) => Promise<void>);
40
+ operatorBrowserMarker(): string;
41
+ private ownedHeadedBrowserEnvironment;
42
+ private teardownOwnedDisplay;
43
+ private adoptOwnedChromeProcessTree;
44
+ private signalCurrentSelfManagedChrome;
45
+ isConnected(): boolean;
46
+ get channel(): string | null;
47
+ get proxied(): string | null;
48
+ get stealthProfile(): StealthProfile;
49
+ get launchMode(): "headed" | "headless" | "remote" | "unknown";
50
+ private launchSelfManagedContext;
51
+ private cancelSpawnedSelfManagedChrome;
52
+ start(): Promise<void>;
53
+ private startOnce;
54
+ private throwIfStartCancelled;
55
+ private commitProfileLaunch;
56
+ private startBrowser;
57
+ private probeEgressGeo;
58
+ private resolveProxy;
59
+ close(options?: {
60
+ cancelStart?: boolean;
61
+ }): Promise<ProfileCloseState>;
62
+ waitForCancelledStartQuiescence(): Promise<void>;
63
+ forceCloseOwnedProcessTree(): Promise<ProfileCloseState>;
64
+ private closeCancelledStart;
65
+ private reapCancelledStartProcess;
66
+ private monitorCancelledStartProcess;
67
+ private currentOwnedProfileIdentity;
68
+ private waitForPersistentFallbackIdentity;
69
+ private requirePersistentFallbackOwnership;
70
+ private startPersistentFallbackOwnershipMonitor;
71
+ private waitForOwnedProfileExit;
72
+ private closeAfterStart;
73
+ private closeBrowser;
74
+ }
75
+ //# sourceMappingURL=browser-process-owner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser-process-owner.d.ts","sourceRoot":"","sources":["../../src/bot/browser-process-owner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAW,cAAc,EAAE,MAAM,YAAY,CAAC;AAI1D,OAAO,EAQL,KAAK,iBAAiB,EAEvB,MAAM,cAAc,CAAC;AAatB,OAAO,EAiCL,KAAK,cAAc,EACpB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,wFAAwF;AACxF,qBAAa,mBAAmB;IA4E5B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,eAAe;IA3ElC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAQ;IAKtC,OAAO,CAAC,WAAW,CAA6B;IAEhD,OAAO,CAAC,mBAAmB,CAAuC;IAElE,OAAO,CAAC,uBAAuB,CAAS;IAExC,OAAO,CAAC,eAAe,CAA+B;IAEtD,OAAO,CAAC,2BAA2B,CAA4C;IAE/E,OAAO,CAAC,qBAAqB,CAAuB;IAEpD,OAAO,CAAC,kBAAkB,CAAS;IAEnC,OAAO,CAAC,UAAU,CAAwB;IAG1C,OAAO,CAAC,eAAe,CAAS;IAEhC,OAAO,CAAC,6BAA6B,CAAuC;IAE5E,OAAO,CAAC,YAAY,CAA8B;IAElD,OAAO,CAAC,YAAY,CAA2C;IAE/D,OAAO,CAAC,0BAA0B,CAAS;IAE3C,OAAO,CAAC,oBAAoB,CAAS;IAErC,OAAO,CAAC,YAAY,CAAS;IAE7B,OAAO,CAAC,gCAAgC,CAAS;IAEjD,OAAO,CAAC,kCAAkC,CAA8B;IAExE,OAAO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