@te-river/opencode-team-mode 1.7.2 → 1.7.3
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 +1009 -849
- package/README.zh-CN.md +906 -756
- package/dist/host/v2-browser-gate.d.ts +4 -1
- package/dist/host/v2-browser-gate.d.ts.map +1 -1
- package/dist/host/v2-browser-gate.js +1 -1
- package/dist/host/v2-browser-gate.js.map +1 -1
- package/dist/host/v2-capabilities.js +1 -1
- package/dist/host/v2-capabilities.js.map +1 -1
- package/dist/host/v2-guard.d.ts +3 -1
- package/dist/host/v2-guard.d.ts.map +1 -1
- package/dist/host/v2-guard.js +2 -2
- package/dist/host/v2-guard.js.map +1 -1
- package/dist/host/v2-offload.d.ts +12 -2
- package/dist/host/v2-offload.d.ts.map +1 -1
- package/dist/host/v2-offload.js +9 -9
- package/dist/host/v2-offload.js.map +1 -1
- package/dist/host/v2-probe-chain.d.ts +5 -1
- package/dist/host/v2-probe-chain.d.ts.map +1 -1
- package/dist/host/v2-probe-chain.js +4 -6
- package/dist/host/v2-probe-chain.js.map +1 -1
- package/dist/host/v2-probe.d.ts.map +1 -1
- package/dist/host/v2-probe.js +2 -1
- package/dist/host/v2-probe.js.map +1 -1
- package/dist/host/v2-prune.d.ts +5 -1
- package/dist/host/v2-prune.d.ts.map +1 -1
- package/dist/host/v2-prune.js +8 -14
- package/dist/host/v2-prune.js.map +1 -1
- package/dist/host/v2-retry.d.ts +9 -2
- package/dist/host/v2-retry.d.ts.map +1 -1
- package/dist/host/v2-retry.js +13 -15
- package/dist/host/v2-retry.js.map +1 -1
- package/dist/host/v2-session.d.ts +6 -2
- package/dist/host/v2-session.d.ts.map +1 -1
- package/dist/host/v2-session.js +7 -13
- package/dist/host/v2-session.js.map +1 -1
- package/dist/host/v2.d.ts +7 -2
- package/dist/host/v2.d.ts.map +1 -1
- package/dist/host/v2.js +38 -35
- package/dist/host/v2.js.map +1 -1
- package/dist/prompts/lead.d.ts +1 -1
- package/dist/prompts/lead.d.ts.map +1 -1
- package/dist/prompts/lead.js +23 -7
- package/dist/prompts/lead.js.map +1 -1
- package/dist/prompts/specialists.d.ts +1 -1
- package/dist/prompts/specialists.d.ts.map +1 -1
- package/dist/prompts/specialists.js +1 -1
- package/dist/tm/args-schema.d.ts +1 -1
- package/dist/tm/args-schema.js +6 -6
- package/dist/tm/args-schema.js.map +1 -1
- package/dist/tm/board.js +2 -2
- package/dist/tm/board.js.map +1 -1
- package/dist/tm/config-files.d.ts +41 -17
- package/dist/tm/config-files.d.ts.map +1 -1
- package/dist/tm/config-files.js +68 -73
- package/dist/tm/config-files.js.map +1 -1
- package/dist/tm/config-layers.d.ts +65 -33
- package/dist/tm/config-layers.d.ts.map +1 -1
- package/dist/tm/config-layers.js +165 -81
- package/dist/tm/config-layers.js.map +1 -1
- package/dist/tm/config-template.d.ts +32 -0
- package/dist/tm/config-template.d.ts.map +1 -0
- package/dist/tm/config-template.js +74 -0
- package/dist/tm/config-template.js.map +1 -0
- package/dist/tm/config.d.ts +115 -140
- package/dist/tm/config.d.ts.map +1 -1
- package/dist/tm/config.js +100 -200
- package/dist/tm/config.js.map +1 -1
- package/dist/tm/index.d.ts +11 -3
- package/dist/tm/index.d.ts.map +1 -1
- package/dist/tm/index.js +46 -16
- package/dist/tm/index.js.map +1 -1
- package/dist/tm/ledger.d.ts +7 -3
- package/dist/tm/ledger.d.ts.map +1 -1
- package/dist/tm/ledger.js +5 -4
- package/dist/tm/ledger.js.map +1 -1
- package/dist/tm/memory.js +3 -3
- package/dist/tm/pipelines.js +1 -1
- package/dist/tm/search.js +6 -6
- package/dist/tm/search.js.map +1 -1
- package/dist/tm/stats.js +2 -2
- package/dist/tm/stats.js.map +1 -1
- package/dist/tm/tools.js +2 -2
- package/dist/tm/webfetch.d.ts +5 -2
- package/dist/tm/webfetch.d.ts.map +1 -1
- package/dist/tm/webfetch.js +24 -18
- package/dist/tm/webfetch.js.map +1 -1
- package/docs/installation-v2.md +59 -38
- package/docs/installation.md +4 -4
- package/package.json +1 -1
- package/dist/approval-gate.d.ts +0 -205
- package/dist/approval-gate.d.ts.map +0 -1
- package/dist/approval-gate.js +0 -627
- package/dist/approval-gate.js.map +0 -1
- package/dist/host/v1.d.ts +0 -14
- package/dist/host/v1.d.ts.map +0 -1
- package/dist/host/v1.js +0 -340
- package/dist/host/v1.js.map +0 -1
- package/dist/host/v2-client.d.ts +0 -53
- package/dist/host/v2-client.d.ts.map +0 -1
- package/dist/host/v2-client.js +0 -193
- package/dist/host/v2-client.js.map +0 -1
- package/dist/host/v2-transcript.d.ts +0 -73
- package/dist/host/v2-transcript.d.ts.map +0 -1
- package/dist/host/v2-transcript.js +0 -151
- package/dist/host/v2-transcript.js.map +0 -1
- package/dist/host-hooks.d.ts +0 -126
- package/dist/host-hooks.d.ts.map +0 -1
- package/dist/host-hooks.js +0 -284
- package/dist/host-hooks.js.map +0 -1
- package/dist/tm/bash-timeout.d.ts +0 -72
- package/dist/tm/bash-timeout.d.ts.map +0 -1
- package/dist/tm/bash-timeout.js +0 -100
- package/dist/tm/bash-timeout.js.map +0 -1
- package/dist/tm/browser.d.ts +0 -642
- package/dist/tm/browser.d.ts.map +0 -1
- package/dist/tm/browser.js +0 -2836
- package/dist/tm/browser.js.map +0 -1
- package/dist/tm/ptc/budgets.d.ts +0 -59
- package/dist/tm/ptc/budgets.d.ts.map +0 -1
- package/dist/tm/ptc/budgets.js +0 -138
- package/dist/tm/ptc/budgets.js.map +0 -1
- package/dist/tm/ptc/contract.d.ts +0 -171
- package/dist/tm/ptc/contract.d.ts.map +0 -1
- package/dist/tm/ptc/contract.js +0 -85
- package/dist/tm/ptc/contract.js.map +0 -1
- package/dist/tm/ptc/driver.d.ts +0 -40
- package/dist/tm/ptc/driver.d.ts.map +0 -1
- package/dist/tm/ptc/driver.js +0 -213
- package/dist/tm/ptc/driver.js.map +0 -1
- package/dist/tm/ptc/engines.d.ts +0 -43
- package/dist/tm/ptc/engines.d.ts.map +0 -1
- package/dist/tm/ptc/engines.js +0 -454
- package/dist/tm/ptc/engines.js.map +0 -1
- package/dist/tm/ptc/gate.d.ts +0 -28
- package/dist/tm/ptc/gate.d.ts.map +0 -1
- package/dist/tm/ptc/gate.js +0 -130
- package/dist/tm/ptc/gate.js.map +0 -1
- package/dist/tm/ptc/index.d.ts +0 -19
- package/dist/tm/ptc/index.d.ts.map +0 -1
- package/dist/tm/ptc/index.js +0 -15
- package/dist/tm/ptc/index.js.map +0 -1
- package/dist/tm/ptc/pscan.d.ts +0 -30
- package/dist/tm/ptc/pscan.d.ts.map +0 -1
- package/dist/tm/ptc/pscan.js +0 -341
- package/dist/tm/ptc/pscan.js.map +0 -1
- package/dist/tm/ptc/summary.d.ts +0 -17
- package/dist/tm/ptc/summary.d.ts.map +0 -1
- package/dist/tm/ptc/summary.js +0 -134
- package/dist/tm/ptc/summary.js.map +0 -1
- package/dist/tm/ptc/tool.d.ts +0 -66
- package/dist/tm/ptc/tool.d.ts.map +0 -1
- package/dist/tm/ptc/tool.js +0 -231
- package/dist/tm/ptc/tool.js.map +0 -1
- package/dist/tm/ptc.d.ts +0 -298
- package/dist/tm/ptc.d.ts.map +0 -1
- package/dist/tm/ptc.js +0 -865
- package/dist/tm/ptc.js.map +0 -1
- package/dist/tm/pty.d.ts +0 -70
- package/dist/tm/pty.d.ts.map +0 -1
- package/dist/tm/pty.js +0 -245
- package/dist/tm/pty.js.map +0 -1
- package/dist/tool-coerce.d.ts +0 -24
- package/dist/tool-coerce.d.ts.map +0 -1
- package/dist/tool-coerce.js +0 -63
- package/dist/tool-coerce.js.map +0 -1
package/dist/tm/browser.d.ts
DELETED
|
@@ -1,642 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* tm_browser — governed interactive browser (Plan C: the user's own
|
|
3
|
-
* Chromium-family browser, headful by default on desktops).
|
|
4
|
-
*
|
|
5
|
-
* T5 engine split (design board ② "TM_BROWSER_ENGINE" + R2 verdict):
|
|
6
|
-
* - PRIMARY engine: playwright-core — dynamic import ONLY (the package is
|
|
7
|
-
* declared in dependencies but NOT installed at build time; a static
|
|
8
|
-
* import would break tsc). A failed import or node < 20 degrades the
|
|
9
|
-
* session to the cdp-legacy engine automatically, per plugin instance.
|
|
10
|
-
* - cdp-legacy engine: the original hand-rolled CDP pipe transport
|
|
11
|
-
* (JSON + NUL framing over fds 3/4, zero deps — smoke-proven) kept
|
|
12
|
-
* verbatim as the fallback. On cdp-legacy only the core subset works
|
|
13
|
-
* (open/navigate/read/screenshot/close + navigate_page/take_screenshot/
|
|
14
|
-
* list_pages/evaluate_script aliases); the snapshot-first actions
|
|
15
|
-
* (take_snapshot + uid addressing, 18-verb chrome-devtools-mcp surface)
|
|
16
|
-
* require the playwright engine.
|
|
17
|
-
*
|
|
18
|
-
* Action surface aligns with chrome-devtools-mcp's 18 verbs (R2 mapping):
|
|
19
|
-
* navigate_page · take_snapshot · click · fill · hover · drag ·
|
|
20
|
-
* press_key · select_page · upload_file · wait_for · evaluate_script ·
|
|
21
|
-
* list_console_messages · list_network_requests · list_pages ·
|
|
22
|
-
* take_screenshot · handle_dialog
|
|
23
|
-
* plus the legacy compatibility verbs open / navigate / read /
|
|
24
|
-
* screenshot / close. Snapshot-first discipline: take_snapshot returns
|
|
25
|
-
* the ariaSnapshot YAML with an INJECTED [uid=eN] per node (playwright has
|
|
26
|
-
* no uid concept — SnapshotIndex below is our own snapshot→locator
|
|
27
|
-
* registry); follow-up actions address nodes by that uid (or an explicit
|
|
28
|
-
* selector escape hatch) instead of guessed locators.
|
|
29
|
-
*
|
|
30
|
-
* Hardening (unchanged from the CDP era, ported to both engines):
|
|
31
|
-
* - isolated temp profile (never the user's real browser profile);
|
|
32
|
-
* persistent login is ONLY via an explicit TM_BROWSER_USER_DATA_DIR;
|
|
33
|
-
* - domain allowlist enforced at the NETWORK layer on the NAVIGATION
|
|
34
|
-
* (playwright context.route / CDP Fetch interception), re-checked on
|
|
35
|
-
* every redirect hop; SUBRESOURCES then follow TM_BROWSER_SUBRESOURCE
|
|
36
|
-
* (default same-site: passive types load, an executable resource loads
|
|
37
|
-
* when it belongs to a site this session opened). Gating every request
|
|
38
|
-
* by the content allowlist is what made pages render picture-less — the
|
|
39
|
-
* 21 seeded hosts contain no CDN, so img/css/js died silently;
|
|
40
|
-
* - out-of-allowlist open/navigate routes through the OFFICIAL dialog
|
|
41
|
-
* BEFORE any spawn; approved hosts also pass the network layer;
|
|
42
|
-
* - hardened context: real-Chrome UA + zh-CN Accept-Language,
|
|
43
|
-
* no-first-run / no-extensions / mute launch flags, 3 s default action
|
|
44
|
-
* timeout (the prompt's "3000 ms budget" is the tool's default, not an
|
|
45
|
-
* aspiration), no networkidle waits anywhere;
|
|
46
|
-
* - dispose AWAITS the close, and an idle session reaps itself
|
|
47
|
-
* (TM_BROWSER_IDLE_MS) — an orphaned visible window is a user-facing bug.
|
|
48
|
-
*
|
|
49
|
-
* Environment adaptivity (different OpenCode hosts):
|
|
50
|
-
* - headful by default (Plan C); display-less Linux (no DISPLAY/
|
|
51
|
-
* WAYLAND_DISPLAY) automatically falls back to headless; TM_BROWSER_
|
|
52
|
-
* HEADLESS=1|0 forces either way;
|
|
53
|
-
* - browser discovery (SHARED by both engines): TM_BROWSER_PATH
|
|
54
|
-
* override, then the USER'S DEFAULT browser (Windows registry / Linux
|
|
55
|
-
* xdg-settings) when it is Chromium-family — CDP is Chromium-proprietary
|
|
56
|
-
* and playwright channels only speak Chromium too, so a Firefox default
|
|
57
|
-
* falls through — then per-OS candidate paths (Edge first on Windows;
|
|
58
|
-
* Chrome/Chromium elsewhere). No browser → structured error, the agent
|
|
59
|
-
* falls back to tm_webfetch / user MCP tools.
|
|
60
|
-
*
|
|
61
|
-
* Role access mirrors tm_webfetch: network roles (team + researcher) only,
|
|
62
|
-
* tester browser-only (UI verification).
|
|
63
|
-
*/
|
|
64
|
-
import type { ToolAttachment, ToolResult } from "../types.js";
|
|
65
|
-
import type { TmConfig } from "./config.js";
|
|
66
|
-
import type { TmPipelines } from "./pipelines.js";
|
|
67
|
-
/** Subprocess runner for the shell/registry probes; injectable for tests. */
|
|
68
|
-
export type CommandRunner = (cmd: string, args: string[]) => string;
|
|
69
|
-
export declare function isChromiumFamily(exePath: string): boolean;
|
|
70
|
-
/** Parse `reg query "...UrlAssociations\http\UserChoice" /v ProgId` output. */
|
|
71
|
-
export declare function parseProgId(stdout: string): string | null;
|
|
72
|
-
/** Parse `reg query "...\shell\open\command" /ve` output → exe path.
|
|
73
|
-
* The quoted capture stops at the closing quote, so the `" -- %1"` style
|
|
74
|
-
* URL-template tail never leaks into the returned path. */
|
|
75
|
-
export declare function parseRegCommand(stdout: string): string | null;
|
|
76
|
-
/** Parse the Exec= line of an xdg .desktop file. */
|
|
77
|
-
export declare function parseDesktopExec(text: string): string | null;
|
|
78
|
-
/** The user's DEFAULT browser, when it is Chromium-family and present.
|
|
79
|
-
* null → the caller falls back to the per-OS probe list (detection is
|
|
80
|
-
* best-effort and must never throw into tool discovery). */
|
|
81
|
-
export declare function defaultBrowserExecutable(env?: Record<string, string | undefined>, run?: CommandRunner): string | null;
|
|
82
|
-
/** Playwright's `channel` launch IGNORES the executable we discovered —
|
|
83
|
-
* `channel:"msedge"` resolves whatever playwright thinks the stable Edge is,
|
|
84
|
-
* so a correct Edge-Beta discovery still opened stable (the decisive half of
|
|
85
|
-
* the 2026-09-18 report). The channel spelling is therefore only correct
|
|
86
|
-
* for the exact stable-channel install dir; everything else (Beta/Dev/
|
|
87
|
-
* Canary, portable, an explicit TM_BROWSER_PATH) rides on executablePath. */
|
|
88
|
-
export declare function playwrightLaunchTarget(executable: string, opts?: {
|
|
89
|
-
explicitOverride?: boolean;
|
|
90
|
-
}): {
|
|
91
|
-
executablePath: string;
|
|
92
|
-
channel?: string;
|
|
93
|
-
};
|
|
94
|
-
/** Resolve the browser executable: TM_BROWSER_PATH override → the user's
|
|
95
|
-
* DEFAULT browser (Chromium-family only) → per-OS candidate paths.
|
|
96
|
-
* %LOCALAPPDATA% style vars are expanded on win32. */
|
|
97
|
-
export declare function findBrowserExecutable(env?: Record<string, string | undefined>): string | null;
|
|
98
|
-
/**
|
|
99
|
-
* Headless resolution (Plan C = headful by default):
|
|
100
|
-
* TM_BROWSER_HEADLESS=1|true|force → headless (servers/CI)
|
|
101
|
-
* TM_BROWSER_HEADLESS=0|false|never → headful
|
|
102
|
-
* auto (default) → headless ONLY when there is no
|
|
103
|
-
* display possible (Linux without DISPLAY/WAYLAND_DISPLAY).
|
|
104
|
-
*/
|
|
105
|
-
/** Decide what profile directory TM_BROWSER_USER_DATA_DIR asks for.
|
|
106
|
-
*
|
|
107
|
-
* The tool description has claimed for a long time that "the real profile is
|
|
108
|
-
* never touched" while nothing enforced it: the string went straight into
|
|
109
|
-
* `launchPersistentContext`. Pointing it at the user's own browser data dir is
|
|
110
|
-
* not a neutral choice — with the browser open, the new process hands its URL
|
|
111
|
-
* to the running instance and exits (the confusing "本机已有同品牌浏览器在跑"
|
|
112
|
-
* failure), and with it closed the agent browses AS THE USER, with every cookie
|
|
113
|
-
* and saved session, while our orphan reaper force-kills (`taskkill /T /F`) any
|
|
114
|
-
* browser whose owner died — a real route to corrupting a profile.
|
|
115
|
-
*
|
|
116
|
-
* So: a real browser data dir is refused with the fix named, anything else is
|
|
117
|
-
* honored, and an unset value keeps the isolated temp profile (the default).
|
|
118
|
-
* Pure, so both engines and the tests share one answer. */
|
|
119
|
-
export declare function classifyProfileDir(env?: Record<string, string | undefined>): {
|
|
120
|
-
dir: string | null;
|
|
121
|
-
refusal: string | null;
|
|
122
|
-
};
|
|
123
|
-
export declare function resolveHeadless(env?: Record<string, string | undefined>): boolean;
|
|
124
|
-
/** Approximate registrable site (eTLD+1) of a hostname. */
|
|
125
|
-
export declare function siteOf(host: string): string;
|
|
126
|
-
/** playwright and CDP spell resource types differently (`Image` vs `image`,
|
|
127
|
-
* `Stylesheet` vs `stylesheet`) — one normalizer keeps both engines on the
|
|
128
|
-
* same verdict table. */
|
|
129
|
-
export declare function normalizeResourceType(raw: unknown): string;
|
|
130
|
-
export declare function isPassiveResource(raw: unknown): boolean;
|
|
131
|
-
/**
|
|
132
|
-
* One subresource verdict, shared VERBATIM by both engines so playwright and
|
|
133
|
-
* cdp-legacy can never drift. `allowedSites` holds the registrable sites of
|
|
134
|
-
* every host this session actually navigated to (allowlist hit or dialog
|
|
135
|
-
* approval), which is what makes a page's own JS/CSS work without opening
|
|
136
|
-
* the whole internet: the governance boundary moves from "21 content domains"
|
|
137
|
-
* to "the site you approved", and an off-site SCRIPT still needs a dialog.
|
|
138
|
-
*/
|
|
139
|
-
export declare function subresourcePass(opts: {
|
|
140
|
-
url: string;
|
|
141
|
-
resourceType: unknown;
|
|
142
|
-
policy: "same-site" | "passive" | "off";
|
|
143
|
-
allowlistHit: boolean;
|
|
144
|
-
approvedHost: boolean;
|
|
145
|
-
allowedSites: ReadonlySet<string>;
|
|
146
|
-
}): {
|
|
147
|
-
pass: boolean;
|
|
148
|
-
via: string;
|
|
149
|
-
};
|
|
150
|
-
/** A navigation (or a host the dialog approved) widens the subresource
|
|
151
|
-
* footprint to its own site. Called for EVERY top-level/document request
|
|
152
|
-
* that passed the allowlist side. */
|
|
153
|
-
export declare function rememberSite(allowedSites: Set<string>, url: string): void;
|
|
154
|
-
/**
|
|
155
|
-
* Human-verification walls. This exists because "0 个可寻址节点" and "this
|
|
156
|
-
* site wants a human to prove it is one" look identical to the agent, and the
|
|
157
|
-
* two have opposite next moves: an empty page is worth retrying, a wall never
|
|
158
|
-
* is — retrying just spends rounds on a captcha. Measured on baike.baidu.com
|
|
159
|
-
* item pages, where every arm (raw playwright included, all resources allowed)
|
|
160
|
-
* returns 0–6 nodes titled 百度安全验证, and the agent reported "该网站没有内容".
|
|
161
|
-
*
|
|
162
|
-
* Deliberately narrow: signatures we observed live, plus the unambiguous
|
|
163
|
-
* English ones. Callers consult it ONLY when the page came back thin, so an
|
|
164
|
-
* article that merely mentions 验证码 is never mislabelled as a wall.
|
|
165
|
-
*/
|
|
166
|
-
export declare const CHALLENGE_WALL_SIGNS: ReadonlyArray<{
|
|
167
|
-
readonly re: RegExp;
|
|
168
|
-
readonly label: string;
|
|
169
|
-
}>;
|
|
170
|
-
/** Which wall this thin page actually is, or null when it is just empty. */
|
|
171
|
-
export declare function challengeWallOf(...texts: ReadonlyArray<string | null | undefined>): string | null;
|
|
172
|
-
/** One hostname for `allow_host`, or "" when the argument is not a single bare
|
|
173
|
-
* domain. Strict on purpose: this value becomes the pattern in an official
|
|
174
|
-
* consent dialog, and a user approving "bkssl.bdimg.com" must not be getting a
|
|
175
|
-
* wildcard, a URL with a path, or a port. */
|
|
176
|
-
export declare function normalizeApprovalHost(raw: unknown): string;
|
|
177
|
-
/**
|
|
178
|
-
* The launch pid, asked more than once.
|
|
179
|
-
*
|
|
180
|
-
* Why this exists: `childProcRows` folds EVERY OS-query failure (PowerShell
|
|
181
|
-
* exiting non-zero, the 6 s timeout killing it mid-flight, a JSON parse miss)
|
|
182
|
-
* into an empty list, and the launcher used to ask exactly once. Under load —
|
|
183
|
-
* this plugin's own parallel test runner reproduces it, four suites hammering
|
|
184
|
-
* CIM at once — one such query fails now and then, and a single failed query
|
|
185
|
-
* used to cost the session two things permanently: the orphan-ledger entry (so
|
|
186
|
-
* the next boot could not reclaim that browser) and `close`'s process
|
|
187
|
-
* verification. Worse, an exception escaping the lookup failed `open` itself,
|
|
188
|
-
* reporting a browser that had launched fine as an error.
|
|
189
|
-
*
|
|
190
|
-
* So: a failed or empty answer is retried a bounded number of times, and any
|
|
191
|
-
* throw is swallowed into the retry counter — the pid is diagnostic and
|
|
192
|
-
* reclamation metadata, never a reason to lose the session. When it still
|
|
193
|
-
* cannot be resolved, `via: "none"` says so and close keeps refusing the
|
|
194
|
-
* 已确认关闭 sentence (pinned by §25).
|
|
195
|
-
*/
|
|
196
|
-
export declare const LAUNCH_PID_ATTEMPTS = 3;
|
|
197
|
-
export declare const LAUNCH_PID_RETRY_MS = 250;
|
|
198
|
-
export declare function resolveLaunchPid(opts: {
|
|
199
|
-
/** playwright's own accessor — it does not exist on 1.63, so this is usually 0 */
|
|
200
|
-
playwrightPid?: () => number;
|
|
201
|
-
executablePath: string;
|
|
202
|
-
/** may throw, may answer empty, may answer undefined (let the scanner query) */
|
|
203
|
-
rows: () => ChildProcRow[] | undefined;
|
|
204
|
-
sleep?: (ms: number) => Promise<void>;
|
|
205
|
-
attempts?: number;
|
|
206
|
-
}): Promise<{
|
|
207
|
-
pid: number;
|
|
208
|
-
via: "playwright" | "child-scan" | "none";
|
|
209
|
-
failures: number;
|
|
210
|
-
}>;
|
|
211
|
-
/** `evaluate_script` is the one browser verb the network gate cannot cover:
|
|
212
|
-
* the allowlist limits where we NAVIGATE, not what an already-loaded page
|
|
213
|
-
* hands back. In a `TM_BROWSER_USER_DATA_DIR` profile that page may be a
|
|
214
|
-
* signed-in session, and `document.cookie` / `localStorage` / a token in the
|
|
215
|
-
* DOM is one expression away — and its value would then ride into the model
|
|
216
|
-
* context, the run store and the trajectory. So: ask once per browser
|
|
217
|
-
* session (the OFFICIAL dialog), and name-anchor the result on the shapes
|
|
218
|
-
* that are secrets, not on "looks random" (which would blank legitimate
|
|
219
|
-
* JSON and teach the agent to distrust every read). */
|
|
220
|
-
export declare const EVAL_SECRET_SHAPES: ReadonlyArray<{
|
|
221
|
-
name: string;
|
|
222
|
-
re: RegExp;
|
|
223
|
-
}>;
|
|
224
|
-
/** Mask every known secret shape in an in-page result. Returns the masked
|
|
225
|
-
* text plus WHICH kinds were masked (counted, never the values). */
|
|
226
|
-
export declare function redactEvalResult(text: string): {
|
|
227
|
-
text: string;
|
|
228
|
-
masked: string[];
|
|
229
|
-
};
|
|
230
|
-
export interface BrowserLedgerEntry {
|
|
231
|
-
pid: number;
|
|
232
|
-
ownerPid: number;
|
|
233
|
-
engine: string;
|
|
234
|
-
at: number;
|
|
235
|
-
/** The executable we launched, recorded so a pid that has been recycled to
|
|
236
|
-
* an unrelated program is never force-killed. */
|
|
237
|
-
exe?: string;
|
|
238
|
-
}
|
|
239
|
-
export declare function browserLedgerFile(storeRoot: string): string;
|
|
240
|
-
/** Best-effort append: a ledger that cannot be written must never cost the
|
|
241
|
-
* user their browser session. */
|
|
242
|
-
export declare function appendBrowserLedger(file: string, rec: BrowserLedgerEntry): void;
|
|
243
|
-
/** Read the ledger, terminate the orphans, and rewrite what is still live.
|
|
244
|
-
* Returns the counts so the caller can log them; never throws. */
|
|
245
|
-
export declare function reapOrphanBrowsers(file: string, opts?: {
|
|
246
|
-
now?: number;
|
|
247
|
-
alive?: (pid: number) => boolean;
|
|
248
|
-
kill?: (pid: number) => void;
|
|
249
|
-
/** seam for tests — what a pid currently IS (name + command line) */
|
|
250
|
-
identity?: (pid: number) => {
|
|
251
|
-
name: string;
|
|
252
|
-
cmdline: string;
|
|
253
|
-
} | null;
|
|
254
|
-
}): {
|
|
255
|
-
reaped: number[];
|
|
256
|
-
kept: number;
|
|
257
|
-
dropped: number;
|
|
258
|
-
};
|
|
259
|
-
/** Is this OS pid still alive? `process.kill(pid, 0)` is the portable probe:
|
|
260
|
-
* ESRCH means gone, EPERM means alive but owned by someone else — both are
|
|
261
|
-
* answers, and "no answer" is never one of them. */
|
|
262
|
-
export declare function pidAlive(pid: number): boolean;
|
|
263
|
-
/** Wait up to `ms` for a pid to disappear, then terminate it once and give it
|
|
264
|
-
* a short grace. Returns whether the process is GONE — the only honest basis
|
|
265
|
-
* for a "已确认关闭" claim. */
|
|
266
|
-
export declare function waitForPidExit(pid: number, ms?: number, kill?: (p: number) => void): Promise<boolean>;
|
|
267
|
-
/** One row of the OS process table, as far as the pid lookup below needs it. */
|
|
268
|
-
export interface ChildProcRow {
|
|
269
|
-
pid: number;
|
|
270
|
-
name: string;
|
|
271
|
-
cmdline: string;
|
|
272
|
-
}
|
|
273
|
-
/** Does this identity look like the executable we launched? Compared on the
|
|
274
|
-
* file NAME: the command line's quoting and path form can differ from ours
|
|
275
|
-
* (8.3-short vs long path, escaped quotes), while a pid recycled by an
|
|
276
|
-
* unrelated program almost never carries the same image name. A missing
|
|
277
|
-
* identity counts as NO — the safe answer before a force-kill. */
|
|
278
|
-
export declare function identityMatchesExecutable(exePath: string, ident: {
|
|
279
|
-
name: string;
|
|
280
|
-
cmdline: string;
|
|
281
|
-
} | null): boolean;
|
|
282
|
-
/** The same question asked of a live pid (see identityMatchesExecutable). */
|
|
283
|
-
export declare function pidMatchesExecutable(pid: number, exePath: string): boolean;
|
|
284
|
-
export interface KillTreeOpts {
|
|
285
|
-
platform?: NodeJS.Platform;
|
|
286
|
-
/** seam for tests — how the platform tool gets invoked */
|
|
287
|
-
run?: (cmd: string, args: string[]) => void;
|
|
288
|
-
/** seam for tests — the POSIX child enumeration */
|
|
289
|
-
children?: (pid: number) => ChildProcRow[];
|
|
290
|
-
/** seam for tests — how a single process gets signalled */
|
|
291
|
-
signal?: (pid: number) => void;
|
|
292
|
-
}
|
|
293
|
-
/** Terminate a browser process AND everything it spawned.
|
|
294
|
-
*
|
|
295
|
-
* `process.kill(pid)` signals the ROOT only. Measured on the desktop host the
|
|
296
|
-
* day this was written: the orphan reaper's default kill took the msedge root
|
|
297
|
-
* down and left all NINE of its child processes running — which is exactly the
|
|
298
|
-
* leftover the reaper exists to remove. The graceful path does not have this
|
|
299
|
-
* problem (playwright's `browser.close()` shuts its children down first, and
|
|
300
|
-
* the real-host leg verifies it), so this is the fallback's job.
|
|
301
|
-
*
|
|
302
|
-
* win32: `taskkill /T /F` walks the tree for us.
|
|
303
|
-
* POSIX: no tree flag, so descendants are enumerated and killed deepest-first.
|
|
304
|
-
* Best-effort throughout: a process that vanishes mid-walk is not an error.
|
|
305
|
-
*/
|
|
306
|
-
export declare function killBrowserTree(pid: number, opts?: KillTreeOpts): void;
|
|
307
|
-
/** The OS pid behind a playwright-launched browser.
|
|
308
|
-
*
|
|
309
|
-
* playwright-core has NO `Browser.process()` — that accessor belongs to
|
|
310
|
-
* ElectronApplication and BrowserServer. Measured on the desktop host with a
|
|
311
|
-
* real 1.63 session: `typeof browser.process === "undefined"`, so the pid
|
|
312
|
-
* stayed 0, the orphan ledger recorded nothing, and close printed 已确认关闭
|
|
313
|
-
* over a browser process it had never checked.
|
|
314
|
-
*
|
|
315
|
-
* The only exact anchor available is that the browser is a DIRECT CHILD of
|
|
316
|
-
* this process, started from the executable WE resolved. That matters: this
|
|
317
|
-
* machine carries a dozen unrelated msedge trees (the user's own windows,
|
|
318
|
-
* msedgewebview2 under SearchHost.exe and under a vendor utility), so matching
|
|
319
|
-
* by process name would be a loaded gun pointed at them.
|
|
320
|
-
*
|
|
321
|
-
* 0 = not found, and every caller treats 0 as "no verification" — never as
|
|
322
|
-
* "verified gone".
|
|
323
|
-
*/
|
|
324
|
-
export declare function launchedBrowserPid(executablePath: string, opts?: {
|
|
325
|
-
ppid?: number;
|
|
326
|
-
rows?: ChildProcRow[];
|
|
327
|
-
}): number;
|
|
328
|
-
/** Consent is per BROWSER SESSION, not per call: one dialog when the lead
|
|
329
|
-
* decides to script the page, then the round stops paying for it. */
|
|
330
|
-
export declare function needsEvalConsent(policy: "on" | "off", alreadyApproved: boolean | undefined): boolean;
|
|
331
|
-
/** A function-shaped source has to be INVOKED. Every browser MCP documents
|
|
332
|
-
* `function: "() => …"`, but evaluate() treats a STRING as an expression: a
|
|
333
|
-
* function source evaluates to a function object, which is not serializable,
|
|
334
|
-
* so the call resolves to undefined and the agent reads "null" and goes
|
|
335
|
-
* looking for a bug that is in our call rather than in the page (measured
|
|
336
|
-
* live 2026-09-21 — six rounds lost this way). An expression the model
|
|
337
|
-
* already wrapped, or a bare `document.title`, passes through untouched. */
|
|
338
|
-
export declare function evalExpression(src: string): string;
|
|
339
|
-
/** `null` is not a diagnosis. The render names the type, so "the page has no
|
|
340
|
-
* such links" and "your function returned nothing" and "it was not called"
|
|
341
|
-
* stop looking like the same answer. */
|
|
342
|
-
export declare function renderEvalResult(value: unknown): string;
|
|
343
|
-
/** Host only — the consent line in the dialog and in the trajectory never
|
|
344
|
-
* carries a query string (a search URL can hold the very token we guard). */
|
|
345
|
-
export declare function hostOnly(url: string): string;
|
|
346
|
-
/** What a click can be observed to change, read in ONE round-trip. */
|
|
347
|
-
export interface ClickProbe {
|
|
348
|
-
attrs: Record<string, string>;
|
|
349
|
-
url: string;
|
|
350
|
-
ready: string;
|
|
351
|
-
nodes: number;
|
|
352
|
-
}
|
|
353
|
-
/** What differs between two probes, in the order a reader cares about. */
|
|
354
|
-
export declare function describeClickChange(before: ClickProbe, after: ClickProbe): string[];
|
|
355
|
-
/** The reply. Pure, so the wording is pinnable without a browser: a click that
|
|
356
|
-
* observably did something says what changed; one that did not says so and
|
|
357
|
-
* names the next move instead of reporting success. */
|
|
358
|
-
export declare function clickVerdict(target: string, before: ClickProbe | null, changed: string[], opts: {
|
|
359
|
-
retried: boolean;
|
|
360
|
-
dialog: boolean;
|
|
361
|
-
blocked?: {
|
|
362
|
-
count: number;
|
|
363
|
-
hosts: string[];
|
|
364
|
-
};
|
|
365
|
-
}): string;
|
|
366
|
-
export type BrowserEngineKind = "playwright" | "cdp-legacy";
|
|
367
|
-
/** playwright-core 1.63 targets node >= 20; on anything older we refuse the
|
|
368
|
-
* engine up-front and stay on the zero-dependency CDP pipe (the node>=18
|
|
369
|
-
* package floor keeps the plugin itself loadable — only the playwright
|
|
370
|
-
* PRIMARY is gated here, cdp-legacy carries node 18/19 hosts). */
|
|
371
|
-
export declare const PLAYWRIGHT_MIN_NODE_MAJOR = 20;
|
|
372
|
-
/** "v22.3.1" / "20" -> major number; unparseable -> 0 (fail toward the
|
|
373
|
-
* always-available cdp-legacy engine). */
|
|
374
|
-
export declare function nodeMajorOf(version: string): number;
|
|
375
|
-
export interface EngineSelection {
|
|
376
|
-
kind: BrowserEngineKind;
|
|
377
|
-
/** The imported playwright-core namespace (present iff kind=playwright). */
|
|
378
|
-
pw?: PwModule;
|
|
379
|
-
/** Why this kind was chosen (preference / node gate / import failure). */
|
|
380
|
-
reason?: string;
|
|
381
|
-
}
|
|
382
|
-
/** The REAL loader — a VARIABLE specifier so tsc never tries to resolve
|
|
383
|
-
* "playwright-core" at build time (types ship inside the package, which may
|
|
384
|
-
* be absent from node_modules). Under ESM, import(variable) yields the
|
|
385
|
-
* module namespace typed as any. */
|
|
386
|
-
export declare function defaultImportPlaywright(): Promise<unknown>;
|
|
387
|
-
/** Pure engine-selection seam (exported for test-browser.mjs):
|
|
388
|
-
* cdp-legacy preference → legacy WITHOUT ever importing; node < 20 →
|
|
389
|
-
* legacy without importing; playwright preference → import, verify the
|
|
390
|
-
* chromium.launch shape, degrade to legacy on ANY failure. */
|
|
391
|
-
export declare function selectBrowserEngine(opts: {
|
|
392
|
-
preference: string | undefined;
|
|
393
|
-
nodeMajor: number;
|
|
394
|
-
importPlaywright: () => Promise<unknown>;
|
|
395
|
-
}): Promise<EngineSelection>;
|
|
396
|
-
export interface PwModule {
|
|
397
|
-
chromium: {
|
|
398
|
-
launch(opts: Record<string, unknown>): Promise<PwBrowser>;
|
|
399
|
-
launchPersistentContext(userDataDir: string, opts: Record<string, unknown>): Promise<PwBrowserContext>;
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
export interface PwBrowser {
|
|
403
|
-
newContext(opts?: Record<string, unknown>): Promise<PwBrowserContext>;
|
|
404
|
-
close(): Promise<void>;
|
|
405
|
-
}
|
|
406
|
-
export interface PwBrowserContext {
|
|
407
|
-
route(pattern: string, handler: (route: PwRoute, request: PwRequestInfo) => Promise<void> | void): Promise<void> | void;
|
|
408
|
-
pages(): PwPage[];
|
|
409
|
-
newPage(): Promise<PwPage>;
|
|
410
|
-
close(): Promise<void>;
|
|
411
|
-
}
|
|
412
|
-
export interface PwPage {
|
|
413
|
-
goto(url: string, opts?: Record<string, unknown>): Promise<unknown>;
|
|
414
|
-
locator(selector: string): PwLocator;
|
|
415
|
-
getByRole(role: string, opts?: Record<string, unknown>): PwLocator;
|
|
416
|
-
getByText(text: string): PwLocator;
|
|
417
|
-
keyboard: {
|
|
418
|
-
press(key: string): Promise<unknown>;
|
|
419
|
-
};
|
|
420
|
-
evaluate(pageFunction: string): Promise<unknown>;
|
|
421
|
-
screenshot(opts?: Record<string, unknown>): Promise<Uint8Array>;
|
|
422
|
-
on(event: string, handler: (...args: any[]) => void): void;
|
|
423
|
-
url(): string;
|
|
424
|
-
title?(): Promise<string>;
|
|
425
|
-
bringToFront?(): Promise<void>;
|
|
426
|
-
/** Bounded settle before retrying an action that changed nothing. */
|
|
427
|
-
waitForLoadState?(state: string, opts?: Record<string, unknown>): Promise<unknown>;
|
|
428
|
-
/** close_page — the tab only; the browser session survives it. */
|
|
429
|
-
close?(): Promise<unknown>;
|
|
430
|
-
}
|
|
431
|
-
export interface PwLocator {
|
|
432
|
-
ariaSnapshot(): Promise<string>;
|
|
433
|
-
click(): Promise<unknown>;
|
|
434
|
-
fill(value: string): Promise<unknown>;
|
|
435
|
-
hover(): Promise<unknown>;
|
|
436
|
-
pressKey(key: string): Promise<unknown>;
|
|
437
|
-
setInputFiles(files: string | string[]): Promise<unknown>;
|
|
438
|
-
waitFor(opts?: Record<string, unknown>): Promise<unknown>;
|
|
439
|
-
nth(index: number): PwLocator;
|
|
440
|
-
/** Optional on the seam: a mock without them takes the single-match path. */
|
|
441
|
-
first?(): PwLocator;
|
|
442
|
-
count?(): Promise<number>;
|
|
443
|
-
dragTo(target: PwLocator): Promise<unknown>;
|
|
444
|
-
/** Read the element's own state in ONE round-trip, so verifying an action
|
|
445
|
-
* costs less than the action. Optional: a locator without it cannot be
|
|
446
|
-
* verified, and then the reply must claim no more than it knows. */
|
|
447
|
-
evaluate?(fn: unknown): Promise<unknown>;
|
|
448
|
-
}
|
|
449
|
-
export interface PwRoute {
|
|
450
|
-
continue(): Promise<unknown>;
|
|
451
|
-
abort(): Promise<unknown>;
|
|
452
|
-
}
|
|
453
|
-
export interface PwRequestInfo {
|
|
454
|
-
url(): string;
|
|
455
|
-
method?(): string;
|
|
456
|
-
/** playwright resource type ("document"|"script"|"image"|…). Optional on
|
|
457
|
-
* the seam so a stale mock cannot break the gate — an absent type is
|
|
458
|
-
* treated as EXECUTABLE (the strict side of the subresource policy). */
|
|
459
|
-
resourceType?(): string;
|
|
460
|
-
}
|
|
461
|
-
export interface PwConsoleMessage {
|
|
462
|
-
type(): string;
|
|
463
|
-
text(): string;
|
|
464
|
-
}
|
|
465
|
-
export interface PwResponseInfo {
|
|
466
|
-
url(): string;
|
|
467
|
-
status(): number;
|
|
468
|
-
request(): PwRequestInfo;
|
|
469
|
-
}
|
|
470
|
-
export interface PwDialog {
|
|
471
|
-
type(): string;
|
|
472
|
-
message(): string;
|
|
473
|
-
accept(promptText?: string): Promise<unknown>;
|
|
474
|
-
dismiss(): Promise<unknown>;
|
|
475
|
-
}
|
|
476
|
-
export interface SnapshotEntry {
|
|
477
|
-
role: string;
|
|
478
|
-
name?: string;
|
|
479
|
-
nth: number;
|
|
480
|
-
}
|
|
481
|
-
/** ariaSnapshot yields plain YAML with NO addressable id, while the
|
|
482
|
-
* chrome-devtools-mcp muscle memory this tool aligns to is uid-addressed.
|
|
483
|
-
* The missing layer is built here: each take_snapshot re-indexes every YAML
|
|
484
|
-
* node (`- <role> "<name>" …`), injects `[uid=eN]` inline, and remembers
|
|
485
|
-
* (role, name, nth-of-kind); later actions resolve uid →
|
|
486
|
-
* `page.getByRole(role, { name, exact: true }).nth(nth)`. Uids are
|
|
487
|
-
* renumbered on every snapshot (one action, one observation); an
|
|
488
|
-
* unknown/stale uid errors back to take_snapshot instead of falling back
|
|
489
|
-
* to guessed locators. */
|
|
490
|
-
export declare class SnapshotIndex {
|
|
491
|
-
private entries;
|
|
492
|
-
private next;
|
|
493
|
-
get size(): number;
|
|
494
|
-
/** Reset + parse + annotate the ariaSnapshot YAML in one pass. */
|
|
495
|
-
annotate(yaml: string): string;
|
|
496
|
-
get(uid: string): SnapshotEntry | undefined;
|
|
497
|
-
/** uid → playwright locator; null = unknown uid / role the engine cannot
|
|
498
|
-
* address (the caller renders the take_snapshot-first guidance). */
|
|
499
|
-
locatorFor(page: PwPage, uid: string): PwLocator | null;
|
|
500
|
-
}
|
|
501
|
-
/** ariaSnapshot escapes whitespace/quotes inside names (\s \n \t \" \\). */
|
|
502
|
-
export declare function unescapeAriaName(raw: string): string;
|
|
503
|
-
/** The 18 canonical verbs, named byte-identical to chrome-devtools-mcp. */
|
|
504
|
-
export declare const BROWSER_PLAYWRIGHT_ACTIONS: readonly ["navigate_page", "take_snapshot", "click", "fill", "hover", "drag", "press_key", "select_page", "new_page", "close_page", "upload_file", "wait_for", "evaluate_script", "list_console_messages", "list_network_requests", "list_pages", "take_screenshot", "handle_dialog"];
|
|
505
|
-
/** Legacy compat verbs that ride on top of the 18 (both engines). */
|
|
506
|
-
export declare const BROWSER_COMPAT_ACTIONS: readonly ["open", "navigate", "read", "screenshot", "close"];
|
|
507
|
-
/** Verbs of our own that act on the GATE rather than the DOM: no page is
|
|
508
|
-
* involved, so both engines serve them and neither can drift. */
|
|
509
|
-
export declare const BROWSER_GATE_ACTIONS: readonly ["allow_host"];
|
|
510
|
-
/** Every verb the execute layer accepts — the ONE table the refusal menu and
|
|
511
|
-
* the args schema are both built from. The hand-written copies drifted the
|
|
512
|
-
* day `new_page` landed (§6o/unknown-action menu), and a schema that omits a
|
|
513
|
-
* verb is a capability no agent knows it has. */
|
|
514
|
-
export declare const ALL_BROWSER_ACTIONS: readonly string[];
|
|
515
|
-
export declare const BROWSER_ACTION_MENU: string;
|
|
516
|
-
/** What the cdp-legacy fallback can still do (R2: degradation must keep the
|
|
517
|
-
* §6o behavior; everything snapshot-shaped is playwright-only). */
|
|
518
|
-
export declare const BROWSER_LEGACY_ACTIONS: readonly ["open", "navigate", "navigate_page", "read", "screenshot", "take_screenshot", "list_pages", "evaluate_script", "close"];
|
|
519
|
-
export declare const BROWSER_DENY_PERMISSIONS_ARG = "--deny-permission-prompts";
|
|
520
|
-
interface ActiveSession {
|
|
521
|
-
kind: BrowserEngineKind;
|
|
522
|
-
currentUrl: string;
|
|
523
|
-
/** The mode the session was ACTUALLY launched in. Reported back to the
|
|
524
|
-
* agent from here — never from the caller's request — so a reused
|
|
525
|
-
* (sticky) session cannot be described as something it is not. */
|
|
526
|
-
headless: boolean;
|
|
527
|
-
/** The profile this session was ACTUALLY launched with, or null for the
|
|
528
|
-
* isolated temp one. Reported from here for the same reason `headless` is:
|
|
529
|
-
* reading TM_BROWSER_USER_DATA_DIR again at reply time lets a cdp-legacy
|
|
530
|
-
* session (which used a temp dir) be described as 持久登录配置. */
|
|
531
|
-
persistentProfile: string | null;
|
|
532
|
-
/** Engine/profile identity for the open + close lines the agent quotes. */
|
|
533
|
-
label: string;
|
|
534
|
-
/** Screenshot pixels the model asked for, drained by execute() into the
|
|
535
|
-
* ToolResult's `attachments`. act() pushes; nothing else reads it. */
|
|
536
|
-
attachments: ToolAttachment[];
|
|
537
|
-
/** Subresource verdicts since the last observation, for the "page looks
|
|
538
|
-
* empty" note (count + distinct blocked hosts). */
|
|
539
|
-
blocked: {
|
|
540
|
-
count: number;
|
|
541
|
-
hosts: Set<string>;
|
|
542
|
-
};
|
|
543
|
-
/** Registrable sites this session navigated to (same-site subresources). */
|
|
544
|
-
allowedSites: Set<string>;
|
|
545
|
-
/** evaluate_script consent was granted for THIS browser session (see
|
|
546
|
-
* needsEvalConsent) — one dialog per session, not per call. */
|
|
547
|
-
evalApproved?: boolean;
|
|
548
|
-
/** Engine action dispatch; throws Error with an agent-actionable message
|
|
549
|
-
* (the execute() catch renders it as phase=execute). */
|
|
550
|
-
act(action: string, args: Record<string, unknown>, stepId: string): Promise<string>;
|
|
551
|
-
/** Is the BROWSER still there? "Target page, context or browser has been
|
|
552
|
-
* closed" is one string covering two very different facts — a tab the user
|
|
553
|
-
* closed and a browser that died. Only the second one may cost the caller
|
|
554
|
-
* their lease, or a window the plugin walked away from stays on the user's
|
|
555
|
-
* screen with nothing holding it. */
|
|
556
|
-
alive?(): boolean;
|
|
557
|
-
/** Closes the session and reports VERBATIM what it managed to close — a
|
|
558
|
-
* close that failed must not read like a success (issue #3 of 2026-09-18:
|
|
559
|
-
* an agent told the user the window was gone while it was still up). */
|
|
560
|
-
close(): Promise<{
|
|
561
|
-
text: string;
|
|
562
|
-
closed: boolean;
|
|
563
|
-
}>;
|
|
564
|
-
}
|
|
565
|
-
/** Who is calling. The host gives a tool ctx `{agent, sessionID, directory,
|
|
566
|
-
* ask}`; sessionID is the identity a browser lease belongs to. */
|
|
567
|
-
export interface BrowserCaller {
|
|
568
|
-
owner: string;
|
|
569
|
-
agent: string;
|
|
570
|
-
}
|
|
571
|
-
/** ONE BROWSER PER CALLER.
|
|
572
|
-
*
|
|
573
|
-
* This tool used to hold a single session for the whole plugin process, and
|
|
574
|
-
* three agents carry it (lead + researcher for the web, tester for UI
|
|
575
|
-
* verification) — with host `task` children running in the SAME process. So
|
|
576
|
-
* they shared one window, one "current tab" and ONE uid registry: a
|
|
577
|
-
* `take_snapshot` from A renumbered every uid B was holding (`SnapshotIndex
|
|
578
|
-
* .annotate` clears and restarts at e1), and B's next `click {uid}` landed on
|
|
579
|
-
* a different element while still reporting success. Nothing in the reply
|
|
580
|
-
* could show it, because the browser was the same browser.
|
|
581
|
-
*
|
|
582
|
-
* A lease per owner removes the sharing: separate window, separate uid
|
|
583
|
-
* namespace, separate dialog-approved hosts. The `id` is what the model
|
|
584
|
-
* carries, and it is checked against the owner — an id is not a capability
|
|
585
|
-
* token, it is a name, so guessing `b1` must not let a second agent drive the
|
|
586
|
-
* first one's window.
|
|
587
|
-
*/
|
|
588
|
-
export interface BrowserLease {
|
|
589
|
-
id: string;
|
|
590
|
-
owner: string;
|
|
591
|
-
agent: string;
|
|
592
|
-
session: ActiveSession;
|
|
593
|
-
at: number;
|
|
594
|
-
lastActivity: number;
|
|
595
|
-
}
|
|
596
|
-
export declare function callerOf(ctx: unknown): BrowserCaller;
|
|
597
|
-
export declare function buildTmBrowserTool(deps: {
|
|
598
|
-
pipelines: TmPipelines;
|
|
599
|
-
cfg: TmConfig;
|
|
600
|
-
env?: Record<string, string | undefined>;
|
|
601
|
-
args?: Record<string, unknown>;
|
|
602
|
-
/** Test seam: replace the dynamic playwright-core import. */
|
|
603
|
-
importPlaywright?: () => Promise<unknown>;
|
|
604
|
-
/** Test seam: pretend node major version for the engine gate. */
|
|
605
|
-
nodeMajor?: number;
|
|
606
|
-
/** Best-effort user notification (host toast) — used by the idle reaper,
|
|
607
|
-
* which closes a window the agent forgot and must say so out loud. */
|
|
608
|
-
notify?: (message: string) => void;
|
|
609
|
-
/** Test seam for the DISCOVERY result (not the TM_BROWSER_PATH override —
|
|
610
|
-
* the override is read from env so the channel-substitution rule stays
|
|
611
|
-
* honest in tests too). */
|
|
612
|
-
findExecutable?: (env: Record<string, string | undefined>) => string | null;
|
|
613
|
-
/** seam for tests — the OS child listing the launch-pid scan reads. Without
|
|
614
|
-
* it a mocked playwright (which has no `process()` accessor, exactly like
|
|
615
|
-
* the real 1.63) would make every unit test scan the developer's real
|
|
616
|
-
* process table and possibly adopt a live browser's pid. */
|
|
617
|
-
listChildren?: (ppid: number) => ChildProcRow[];
|
|
618
|
-
}): {
|
|
619
|
-
description: string;
|
|
620
|
-
args: Record<string, unknown>;
|
|
621
|
-
execute: (rawArgs: Record<string, unknown>, ctx: unknown) => Promise<ToolResult>;
|
|
622
|
-
/** Async on purpose: the host's `dispose` hook is `() => Promise<void>`,
|
|
623
|
-
* and a fire-and-forget close could exit before the browser child was
|
|
624
|
-
* killed (leaving a visible orphan window). */
|
|
625
|
-
dispose: () => Promise<void>;
|
|
626
|
-
engineInfo: () => {
|
|
627
|
-
kind: BrowserEngineKind | null;
|
|
628
|
-
reason: string | null;
|
|
629
|
-
};
|
|
630
|
-
/** Which browsers are alive right now and who owns each. tm_join reads this
|
|
631
|
-
* to tell the lead that a child settled while still holding a window — the
|
|
632
|
-
* close duty is otherwise a prompt rule, and a prompt rule the agent forgets
|
|
633
|
-
* leaves a window on the user's screen with nothing said about it. */
|
|
634
|
-
leases: () => {
|
|
635
|
-
id: string;
|
|
636
|
-
owner: string;
|
|
637
|
-
agent: string;
|
|
638
|
-
idleMs: number;
|
|
639
|
-
}[];
|
|
640
|
-
};
|
|
641
|
-
export {};
|
|
642
|
-
//# sourceMappingURL=browser.d.ts.map
|
package/dist/tm/browser.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/tm/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AAWH,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAqDjD,6EAA6E;AAC7E,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,MAAM,CAAA;AAWnE,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEzD;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGzD;AAED;;4DAE4D;AAC5D,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG7D;AAED,oDAAoD;AACpD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D;AA2CD;;6DAE6D;AAC7D,wBAAgB,wBAAwB,CACtC,GAAG,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAe,EACrD,GAAG,GAAE,aAA6B,GACjC,MAAM,GAAG,IAAI,CAuDf;AAED;;;;;8EAK8E;AAC9E,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;I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