@te-river/opencode-team-mode 1.5.12 → 1.5.14

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.
Files changed (88) hide show
  1. package/README.md +30 -6
  2. package/README.zh-CN.md +28 -4
  3. package/dist/agents.d.ts +5 -1
  4. package/dist/agents.d.ts.map +1 -1
  5. package/dist/agents.js +24 -2
  6. package/dist/agents.js.map +1 -1
  7. package/dist/capabilities.d.ts +66 -0
  8. package/dist/capabilities.d.ts.map +1 -0
  9. package/dist/capabilities.js +165 -0
  10. package/dist/capabilities.js.map +1 -0
  11. package/dist/host-hooks.d.ts +115 -0
  12. package/dist/host-hooks.d.ts.map +1 -0
  13. package/dist/host-hooks.js +270 -0
  14. package/dist/host-hooks.js.map +1 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +103 -4
  17. package/dist/index.js.map +1 -1
  18. package/dist/prompts/lead.d.ts +1 -1
  19. package/dist/prompts/lead.d.ts.map +1 -1
  20. package/dist/prompts/lead.js +71 -8
  21. package/dist/prompts/lead.js.map +1 -1
  22. package/dist/prompts/shared.d.ts +1 -1
  23. package/dist/prompts/shared.d.ts.map +1 -1
  24. package/dist/prompts/shared.js +51 -2
  25. package/dist/prompts/shared.js.map +1 -1
  26. package/dist/prompts/specialists.d.ts +1 -1
  27. package/dist/prompts/specialists.d.ts.map +1 -1
  28. package/dist/prompts/specialists.js +38 -17
  29. package/dist/prompts/specialists.js.map +1 -1
  30. package/dist/tm/args-schema.d.ts +7 -1
  31. package/dist/tm/args-schema.d.ts.map +1 -1
  32. package/dist/tm/args-schema.js +9 -3
  33. package/dist/tm/args-schema.js.map +1 -1
  34. package/dist/tm/bash-timeout.d.ts +72 -0
  35. package/dist/tm/bash-timeout.d.ts.map +1 -0
  36. package/dist/tm/bash-timeout.js +100 -0
  37. package/dist/tm/bash-timeout.js.map +1 -0
  38. package/dist/tm/browser.d.ts +91 -5
  39. package/dist/tm/browser.d.ts.map +1 -1
  40. package/dist/tm/browser.js +564 -89
  41. package/dist/tm/browser.js.map +1 -1
  42. package/dist/tm/cache.d.ts +68 -0
  43. package/dist/tm/cache.d.ts.map +1 -0
  44. package/dist/tm/cache.js +157 -0
  45. package/dist/tm/cache.js.map +1 -0
  46. package/dist/tm/config.d.ts +87 -0
  47. package/dist/tm/config.d.ts.map +1 -1
  48. package/dist/tm/config.js +66 -0
  49. package/dist/tm/config.js.map +1 -1
  50. package/dist/tm/dispatch.d.ts +123 -0
  51. package/dist/tm/dispatch.d.ts.map +1 -0
  52. package/dist/tm/dispatch.js +476 -0
  53. package/dist/tm/dispatch.js.map +1 -0
  54. package/dist/tm/dupe-guard.d.ts +58 -0
  55. package/dist/tm/dupe-guard.d.ts.map +1 -0
  56. package/dist/tm/dupe-guard.js +105 -0
  57. package/dist/tm/dupe-guard.js.map +1 -0
  58. package/dist/tm/index.d.ts +32 -4
  59. package/dist/tm/index.d.ts.map +1 -1
  60. package/dist/tm/index.js +58 -5
  61. package/dist/tm/index.js.map +1 -1
  62. package/dist/tm/perm-ask.d.ts +1 -0
  63. package/dist/tm/perm-ask.d.ts.map +1 -1
  64. package/dist/tm/perm-ask.js +15 -1
  65. package/dist/tm/perm-ask.js.map +1 -1
  66. package/dist/tm/pipelines.d.ts.map +1 -1
  67. package/dist/tm/pipelines.js +11 -0
  68. package/dist/tm/pipelines.js.map +1 -1
  69. package/dist/tm/pty.d.ts +70 -0
  70. package/dist/tm/pty.d.ts.map +1 -0
  71. package/dist/tm/pty.js +242 -0
  72. package/dist/tm/pty.js.map +1 -0
  73. package/dist/tm/search.d.ts +56 -7
  74. package/dist/tm/search.d.ts.map +1 -1
  75. package/dist/tm/search.js +195 -41
  76. package/dist/tm/search.js.map +1 -1
  77. package/dist/tm/stats.d.ts +117 -0
  78. package/dist/tm/stats.d.ts.map +1 -0
  79. package/dist/tm/stats.js +296 -0
  80. package/dist/tm/stats.js.map +1 -0
  81. package/dist/tm/webfetch.d.ts +23 -0
  82. package/dist/tm/webfetch.d.ts.map +1 -1
  83. package/dist/tm/webfetch.js +97 -8
  84. package/dist/tm/webfetch.js.map +1 -1
  85. package/dist/types.d.ts +16 -0
  86. package/dist/types.d.ts.map +1 -1
  87. package/docs/installation.md +216 -17
  88. package/package.json +2 -2
@@ -0,0 +1,72 @@
1
+ /**
2
+ * Built-in bash TIMEOUT discipline (issue #6 of 2026-09-18).
3
+ *
4
+ * Where the 120 s comes from: the host's shell tool resolves
5
+ * `flags.bashDefaultTimeoutMs ?? 2 * 60 * 1e3` (verified in the shipped
6
+ * desktop bundle) — so when a model omits `timeout`, 120 s is the HOST
7
+ * default, and models that do pass one routinely pass 120000+ for a
8
+ * `Get-ChildItem`. Three serialised probes then cost the user six minutes
9
+ * of dead air, and every one of them was allowed to run for a reason no
10
+ * model ever had.
11
+ *
12
+ * The plugin owns no shell timer, so the ONE non-invasive lever is the
13
+ * official `tool.execute.before` hook, whose `output.args` is explicitly
14
+ * mutable. Two ceilings, both opt-out:
15
+ * - `TM_BASH_TIMEOUT_PROBE_MS` (default 60 000) — only for a command the
16
+ * P3 read-only allowlist already accepts (ls / grep / rg / cat /
17
+ * Get-ChildItem …). A pure probe has no legitimate reason to outlive
18
+ * a minute, and this is where the wasted 120 s actually sits.
19
+ * - `TM_BASH_TIMEOUT_MAX_MS` (default 0 = OFF) — a global cap for
20
+ * everything else. Off by default on purpose: a build/test run may
21
+ * legitimately need minutes, and silently killing one is worse than a
22
+ * slow one. A user who wants the ceiling sets it.
23
+ *
24
+ * This clamps a number the model already volunteered; it never ADDS a
25
+ * timeout where the model supplied none (that would turn the host's default
26
+ * into OUR default, which is not this plugin's call to make).
27
+ */
28
+ export type BashTimeoutVerdict = {
29
+ changed: false;
30
+ via: "none" | "already-short";
31
+ } | {
32
+ changed: true;
33
+ via: "probe" | "max";
34
+ from: number;
35
+ to: number;
36
+ };
37
+ /** Parse the model-supplied timeout defensively: the host schema says a
38
+ * positive integer of MILLISECONDS, but an LLM hands us `"120000"`,
39
+ * `120000.0`, or omits it entirely. Anything unreadable means "no
40
+ * timeout was supplied" and is left alone. */
41
+ export declare function parseTimeoutArg(raw: unknown): number | null;
42
+ /**
43
+ * Decide the clamped timeout for one bash call.
44
+ * `probeMs`/`maxMs` of 0 disable that ceiling.
45
+ */
46
+ export declare function resolveBashTimeout(opts: {
47
+ command: string;
48
+ timeoutMs: number | null;
49
+ probeMs: number;
50
+ maxMs: number;
51
+ readonlyAllowed: readonly string[];
52
+ }): BashTimeoutVerdict;
53
+ /**
54
+ * The hook fragment. Returns true when it mutated `args.timeout` — the
55
+ * caller may log that, and the trajectory keeps a count so a user asking
56
+ * "why did my probe get killed at 60 s?" has an answer.
57
+ *
58
+ * Everything here is defensive by contract: `output.args` is `any` on the
59
+ * host side, a non-bash tool must be untouched, and a malformed payload
60
+ * must never turn into a thrown error inside a permission-adjacent hook.
61
+ */
62
+ export declare function createBashTimeoutHook(deps: {
63
+ probeMs: number;
64
+ maxMs: number;
65
+ readonlyAllowed: readonly string[];
66
+ onClamp?: (info: {
67
+ via: string;
68
+ from: number;
69
+ to: number;
70
+ }) => void;
71
+ }): (input: unknown, output: unknown) => boolean;
72
+ //# sourceMappingURL=bash-timeout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash-timeout.d.ts","sourceRoot":"","sources":["../../src/tm/bash-timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,MAAM,MAAM,kBAAkB,GAC1B;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,eAAe,CAAA;CAAE,GACjD;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,GAAG,EAAE,OAAO,GAAG,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAA;AAErE;;;+CAG+C;AAC/C,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAO3D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;CACnC,GAAG,kBAAkB,CAQrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,eAAe,EAAE,SAAS,MAAM,EAAE,CAAA;IAClC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACpE,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,KAAK,OAAO,CAyB/C"}
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Built-in bash TIMEOUT discipline (issue #6 of 2026-09-18).
3
+ *
4
+ * Where the 120 s comes from: the host's shell tool resolves
5
+ * `flags.bashDefaultTimeoutMs ?? 2 * 60 * 1e3` (verified in the shipped
6
+ * desktop bundle) — so when a model omits `timeout`, 120 s is the HOST
7
+ * default, and models that do pass one routinely pass 120000+ for a
8
+ * `Get-ChildItem`. Three serialised probes then cost the user six minutes
9
+ * of dead air, and every one of them was allowed to run for a reason no
10
+ * model ever had.
11
+ *
12
+ * The plugin owns no shell timer, so the ONE non-invasive lever is the
13
+ * official `tool.execute.before` hook, whose `output.args` is explicitly
14
+ * mutable. Two ceilings, both opt-out:
15
+ * - `TM_BASH_TIMEOUT_PROBE_MS` (default 60 000) — only for a command the
16
+ * P3 read-only allowlist already accepts (ls / grep / rg / cat /
17
+ * Get-ChildItem …). A pure probe has no legitimate reason to outlive
18
+ * a minute, and this is where the wasted 120 s actually sits.
19
+ * - `TM_BASH_TIMEOUT_MAX_MS` (default 0 = OFF) — a global cap for
20
+ * everything else. Off by default on purpose: a build/test run may
21
+ * legitimately need minutes, and silently killing one is worse than a
22
+ * slow one. A user who wants the ceiling sets it.
23
+ *
24
+ * This clamps a number the model already volunteered; it never ADDS a
25
+ * timeout where the model supplied none (that would turn the host's default
26
+ * into OUR default, which is not this plugin's call to make).
27
+ */
28
+ import { classifyReadonlyCommand } from "./guard.js";
29
+ /** Parse the model-supplied timeout defensively: the host schema says a
30
+ * positive integer of MILLISECONDS, but an LLM hands us `"120000"`,
31
+ * `120000.0`, or omits it entirely. Anything unreadable means "no
32
+ * timeout was supplied" and is left alone. */
33
+ export function parseTimeoutArg(raw) {
34
+ if (typeof raw === "number" && Number.isFinite(raw) && raw > 0)
35
+ return Math.trunc(raw);
36
+ if (typeof raw === "string") {
37
+ const n = Number(raw.trim());
38
+ if (Number.isFinite(n) && n > 0)
39
+ return Math.trunc(n);
40
+ }
41
+ return null;
42
+ }
43
+ /**
44
+ * Decide the clamped timeout for one bash call.
45
+ * `probeMs`/`maxMs` of 0 disable that ceiling.
46
+ */
47
+ export function resolveBashTimeout(opts) {
48
+ const t = opts.timeoutMs;
49
+ if (t === null)
50
+ return { changed: false, via: "none" };
51
+ const probe = opts.probeMs > 0 && classifyReadonlyCommand(opts.command, opts.readonlyAllowed).ok;
52
+ if (probe && t > opts.probeMs)
53
+ return { changed: true, via: "probe", from: t, to: opts.probeMs };
54
+ if (opts.maxMs > 0 && t > opts.maxMs)
55
+ return { changed: true, via: "max", from: t, to: opts.maxMs };
56
+ if (!probe && opts.maxMs === 0)
57
+ return { changed: false, via: "none" };
58
+ return { changed: false, via: "already-short" };
59
+ }
60
+ /**
61
+ * The hook fragment. Returns true when it mutated `args.timeout` — the
62
+ * caller may log that, and the trajectory keeps a count so a user asking
63
+ * "why did my probe get killed at 60 s?" has an answer.
64
+ *
65
+ * Everything here is defensive by contract: `output.args` is `any` on the
66
+ * host side, a non-bash tool must be untouched, and a malformed payload
67
+ * must never turn into a thrown error inside a permission-adjacent hook.
68
+ */
69
+ export function createBashTimeoutHook(deps) {
70
+ return (input, output) => {
71
+ try {
72
+ const tool = String(input?.tool ?? "").trim().toLowerCase();
73
+ if (tool !== "bash")
74
+ return false;
75
+ const args = output?.args;
76
+ if (!args || typeof args !== "object")
77
+ return false;
78
+ const command = typeof args.command === "string" ? args.command : "";
79
+ if (!command)
80
+ return false;
81
+ const verdict = resolveBashTimeout({
82
+ command,
83
+ timeoutMs: parseTimeoutArg(args.timeout),
84
+ probeMs: deps.probeMs,
85
+ maxMs: deps.maxMs,
86
+ readonlyAllowed: deps.readonlyAllowed,
87
+ });
88
+ if (!verdict.changed)
89
+ return false;
90
+ args.timeout = verdict.to;
91
+ deps.onClamp?.({ via: verdict.via, from: verdict.from, to: verdict.to });
92
+ return true;
93
+ }
94
+ catch {
95
+ /* a timeout clamp must never break the call it is trying to speed up */
96
+ return false;
97
+ }
98
+ };
99
+ }
100
+ //# sourceMappingURL=bash-timeout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bash-timeout.js","sourceRoot":"","sources":["../../src/tm/bash-timeout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAA;AAMpD;;;+CAG+C;AAC/C,MAAM,UAAU,eAAe,CAAC,GAAY;IAC1C,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,GAAG,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IACtF,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC5B,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAA;QAC5B,IAAI,MAAM,CAAC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,MAAM,IAAI,GAAG,MAAM,CAAE,KAAmC,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;YAC1F,IAAI,IAAI,KAAK,MAAM;gBAAE,OAAO,KAAK,CAAA;YACjC,MAAM,IAAI,GAAI,MAAoD,EAAE,IAAI,CAAA;YACxE,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,OAAO,KAAK,CAAA;YACnD,MAAM,OAAO,GAAG,OAAO,IAAI,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;YACpE,IAAI,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAA;YAC1B,MAAM,OAAO,GAAG,kBAAkB,CAAC;gBACjC,OAAO;gBACP,SAAS,EAAE,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC;gBACxC,OAAO,EAAE,IAAI,CAAC,OAAO;gBACrB,KAAK,EAAE,IAAI,CAAC,KAAK;gBACjB,eAAe,EAAE,IAAI,CAAC,eAAe;aACtC,CAAC,CAAA;YACF,IAAI,CAAC,OAAO,CAAC,OAAO;gBAAE,OAAO,KAAK,CAAA;YAClC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,CAAA;YACzB,IAAI,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,CAAA;YACxE,OAAO,IAAI,CAAA;QACb,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;YACxE,OAAO,KAAK,CAAA;QACd,CAAC;IACH,CAAC,CAAA;AACH,CAAC"}
@@ -30,16 +30,21 @@
30
30
  * Hardening (unchanged from the CDP era, ported to both engines):
31
31
  * - isolated temp profile (never the user's real browser profile);
32
32
  * persistent login is ONLY via an explicit TM_BROWSER_USER_DATA_DIR;
33
- * - domain allowlist enforced at the NETWORK layer: playwright
34
- * context.route() abort / CDP Fetch.requestPaused fail — every request
35
- * and every redirect hop re-checked (per-hop analog);
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;
36
40
  * - out-of-allowlist open/navigate routes through the OFFICIAL dialog
37
41
  * BEFORE any spawn; approved hosts also pass the network layer;
38
42
  * - hardened context: real-Chrome UA + zh-CN Accept-Language,
39
43
  * no-first-run / no-extensions / mute launch flags, 3 s default action
40
44
  * timeout (the prompt's "3000 ms budget" is the tool's default, not an
41
45
  * aspiration), no networkidle waits anywhere;
42
- * - dispose kills the child / closes the browser.
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.
43
48
  *
44
49
  * Environment adaptivity (different OpenCode hosts):
45
50
  * - headful by default (Plan C); display-less Linux (no DISPLAY/
@@ -74,6 +79,18 @@ export declare function parseDesktopExec(text: string): string | null;
74
79
  * null → the caller falls back to the per-OS probe list (detection is
75
80
  * best-effort and must never throw into tool discovery). */
76
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
+ };
77
94
  /** Resolve the browser executable: TM_BROWSER_PATH override → the user's
78
95
  * DEFAULT browser (Chromium-family only) → per-OS candidate paths.
79
96
  * %LOCALAPPDATA% style vars are expanded on win32. */
@@ -86,6 +103,61 @@ export declare function findBrowserExecutable(env?: Record<string, string | unde
86
103
  * display possible (Linux without DISPLAY/WAYLAND_DISPLAY).
87
104
  */
88
105
  export declare function resolveHeadless(env?: Record<string, string | undefined>): boolean;
106
+ /** Approximate registrable site (eTLD+1) of a hostname. */
107
+ export declare function siteOf(host: string): string;
108
+ /** playwright and CDP spell resource types differently (`Image` vs `image`,
109
+ * `Stylesheet` vs `stylesheet`) — one normalizer keeps both engines on the
110
+ * same verdict table. */
111
+ export declare function normalizeResourceType(raw: unknown): string;
112
+ export declare function isPassiveResource(raw: unknown): boolean;
113
+ /**
114
+ * One subresource verdict, shared VERBATIM by both engines so playwright and
115
+ * cdp-legacy can never drift. `allowedSites` holds the registrable sites of
116
+ * every host this session actually navigated to (allowlist hit or dialog
117
+ * approval), which is what makes a page's own JS/CSS work without opening
118
+ * the whole internet: the governance boundary moves from "21 content domains"
119
+ * to "the site you approved", and an off-site SCRIPT still needs a dialog.
120
+ */
121
+ export declare function subresourcePass(opts: {
122
+ url: string;
123
+ resourceType: unknown;
124
+ policy: "same-site" | "passive" | "off";
125
+ allowlistHit: boolean;
126
+ approvedHost: boolean;
127
+ allowedSites: ReadonlySet<string>;
128
+ }): {
129
+ pass: boolean;
130
+ via: string;
131
+ };
132
+ /** A navigation (or a host the dialog approved) widens the subresource
133
+ * footprint to its own site. Called for EVERY top-level/document request
134
+ * that passed the allowlist side. */
135
+ export declare function rememberSite(allowedSites: Set<string>, url: string): void;
136
+ /** `evaluate_script` is the one browser verb the network gate cannot cover:
137
+ * the allowlist limits where we NAVIGATE, not what an already-loaded page
138
+ * hands back. In a `TM_BROWSER_USER_DATA_DIR` profile that page may be a
139
+ * signed-in session, and `document.cookie` / `localStorage` / a token in the
140
+ * DOM is one expression away — and its value would then ride into the model
141
+ * context, the run store and the trajectory. So: ask once per browser
142
+ * session (the OFFICIAL dialog), and name-anchor the result on the shapes
143
+ * that are secrets, not on "looks random" (which would blank legitimate
144
+ * JSON and teach the agent to distrust every read). */
145
+ export declare const EVAL_SECRET_SHAPES: ReadonlyArray<{
146
+ name: string;
147
+ re: RegExp;
148
+ }>;
149
+ /** Mask every known secret shape in an in-page result. Returns the masked
150
+ * text plus WHICH kinds were masked (counted, never the values). */
151
+ export declare function redactEvalResult(text: string): {
152
+ text: string;
153
+ masked: string[];
154
+ };
155
+ /** Consent is per BROWSER SESSION, not per call: one dialog when the lead
156
+ * decides to script the page, then the round stops paying for it. */
157
+ export declare function needsEvalConsent(policy: "on" | "off", alreadyApproved: boolean | undefined): boolean;
158
+ /** Host only — the consent line in the dialog and in the trajectory never
159
+ * carries a query string (a search URL can hold the very token we guard). */
160
+ export declare function hostOnly(url: string): string;
89
161
  export type BrowserEngineKind = "playwright" | "cdp-legacy";
90
162
  /** playwright-core 1.63 targets node >= 20; on anything older we refuse the
91
163
  * engine up-front and stay on the zero-dependency CDP pipe (the node>=18
@@ -165,6 +237,10 @@ export interface PwRoute {
165
237
  export interface PwRequestInfo {
166
238
  url(): string;
167
239
  method?(): string;
240
+ /** playwright resource type ("document"|"script"|"image"|…). Optional on
241
+ * the seam so a stale mock cannot break the gate — an absent type is
242
+ * treated as EXECUTABLE (the strict side of the subresource policy). */
243
+ resourceType?(): string;
168
244
  }
169
245
  export interface PwConsoleMessage {
170
246
  type(): string;
@@ -224,11 +300,21 @@ export declare function buildTmBrowserTool(deps: {
224
300
  importPlaywright?: () => Promise<unknown>;
225
301
  /** Test seam: pretend node major version for the engine gate. */
226
302
  nodeMajor?: number;
303
+ /** Best-effort user notification (host toast) — used by the idle reaper,
304
+ * which closes a window the agent forgot and must say so out loud. */
305
+ notify?: (message: string) => void;
306
+ /** Test seam for the DISCOVERY result (not the TM_BROWSER_PATH override —
307
+ * the override is read from env so the channel-substitution rule stays
308
+ * honest in tests too). */
309
+ findExecutable?: (env: Record<string, string | undefined>) => string | null;
227
310
  }): {
228
311
  description: string;
229
312
  args: Record<string, unknown>;
230
313
  execute: (rawArgs: Record<string, unknown>, ctx: unknown) => Promise<ToolResult>;
231
- dispose: () => void;
314
+ /** Async on purpose: the host's `dispose` hook is `() => Promise<void>`,
315
+ * and a fire-and-forget close could exit before the browser child was
316
+ * killed (leaving a visible orphan window). */
317
+ dispose: () => Promise<void>;
232
318
  engineInfo: () => {
233
319
  kind: BrowserEngineKind | null;
234
320
  reason: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/tm/browser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AAUH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAE7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AA0BjD,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;AAED;;6DAE6D;AAC7D,wBAAgB,w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