taskwindow 0.2.13 → 0.2.15

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 (3) hide show
  1. package/README.md +17 -5
  2. package/package.json +2 -2
  3. package/src/tools.js +21 -4
package/README.md CHANGED
@@ -142,9 +142,13 @@ in the mouse-dynamics literature, so do not build on it as camouflage.
142
142
  - **Your focus is never taken**: nothing the agent does brings a tab or window
143
143
  forward on you. Chrome's `tabs.create` makes a new tab active by default and
144
144
  `windows.create` focuses the new window by default; TaskWindow always opens
145
- tabs in the background (a background tab still renders, so screenshots and
146
- page reads work), creates the agent window unfocused, and hands focus back if
147
- Chrome raises a window anyway. A background tab also takes mouse, wheel and
145
+ tabs in the background, creates the agent window unfocused, and hands focus
146
+ back if Chrome raises a window anyway. Chrome barely paints a background
147
+ tab, which most pages don't mind; one that fetches or draws only while
148
+ watched stays on a skeleton or an empty chart. For those the agent passes
149
+ `render: true` to `tabs_create`, `navigate` or `reload`, and TaskWindow runs
150
+ a one-frame DevTools screencast on the tab, which Chrome treats as a capture
151
+ and keeps painting at full rate, without activating the tab. A background tab also takes mouse, wheel and
148
152
  keyboard input over the DevTools protocol (checked in Chrome: click, scroll
149
153
  and type all land in a tab that is not its window's active tab, and it stays
150
154
  that way), so nothing ever brings a tab forward. Clicking a group in the
@@ -158,8 +162,16 @@ in the mouse-dynamics literature, so do not build on it as camouflage.
158
162
  folder; manual codes are available with `taskwindow pair`.
159
163
  - **Agent actions are visible**: a phantom cursor and glow show where the
160
164
  agent is acting; while it does, Chrome shows a
161
- *"started debugging this browser"* infobar — an unavoidable Chrome policy
162
- for this capability, same as Claude's own extension.
165
+ *"started debugging this browser"* infobar. Ordinary tabs disconnect after
166
+ 10 seconds with no browser tool calls running, and Chrome dismisses the banner
167
+ about five seconds later. Tabs stay open and reconnect automatically on use.
168
+ Tabs with `render: true` and responsive fallback tabs keep their connection
169
+ while open, since rendering and viewport emulation depend on it; those keep
170
+ the banner visible.
171
+ - **Debug capture**: collected console messages and network requests survive
172
+ an idle disconnect, but capture pauses while disconnected. Navigate or reload
173
+ to capture a fresh page load. For continuous capture between calls, reload
174
+ with `render: true`; this also keeps Chrome's debugging banner visible.
163
175
 
164
176
  ## Requirements & limits
165
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskwindow",
3
- "version": "0.2.13",
3
+ "version": "0.2.15",
4
4
  "description": "TaskWindow local daemon: bridges the TaskWindow Chrome extension to any MCP client over Streamable HTTP",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "start": "node src/index.js",
12
- "test": "node --test test/agents.test.mjs test/pairing.test.mjs test/extension-bootstrap.test.mjs test/extension-connection.test.mjs test/extension-idle.test.mjs test/extension-tabs.test.mjs test/extension-responsive.test.mjs test/extension-human.test.mjs test/bridge.test.mjs test/tool-contract.test.mjs test/updates.test.mjs && node test/run.mjs"
12
+ "test": "node --test test/agents.test.mjs test/pairing.test.mjs test/extension-bootstrap.test.mjs test/extension-connection.test.mjs test/extension-idle.test.mjs test/extension-cdp.test.mjs test/extension-tabs.test.mjs test/extension-responsive.test.mjs test/extension-human.test.mjs test/bridge.test.mjs test/tool-contract.test.mjs test/updates.test.mjs && node test/run.mjs"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">=18"
package/src/tools.js CHANGED
@@ -17,6 +17,18 @@ const sessionToken = z
17
17
  "Session token returned by tabs_create — pass it in every browser tool call so the call acts only on your session's tabs (sessions are isolated from each other). Every result restates it as a trailing \"session: ...\" line, so the latest one is always at hand."
18
18
  );
19
19
 
20
+ // Opt-in: it costs what a visible tab costs, so only when the page needs it.
21
+ const render = z
22
+ .boolean()
23
+ .optional()
24
+ .describe(
25
+ "Keep this tab painting at full rate while it stays in the background, as if someone were watching it. Off by default: a background " +
26
+ "tab paints barely at all, which most pages don't mind. Some only fetch or draw once seen, so turn this on if you suspect the page " +
27
+ "needs a viewer: skeleton placeholders or spinners that never resolve, a chart area that stays empty, an animation stuck mid-way, " +
28
+ "or a screenshot that times out. On a page already showing that, reload with render: true. It stays on for the tab, across " +
29
+ "navigations. This keeps Chrome's debugging banner visible until the tab closes. The tab is still never made active and never takes focus."
30
+ );
31
+
20
32
  // Result contract with the extension: {text?, image?: {data, mimeType}, data?}.
21
33
  // The MCP layer turns `image` into an image content block and everything else
22
34
  // into text blocks.
@@ -65,6 +77,7 @@ const rawDefs = [
65
77
  .string()
66
78
  .optional()
67
79
  .describe("Your existing session token from an earlier tabs_create, to keep using that session's groups. Omit on your first call — a fresh token is minted and returned."),
80
+ render,
68
81
  },
69
82
  timeoutMs: 15_000,
70
83
  },
@@ -78,7 +91,7 @@ const rawDefs = [
78
91
  name: "navigate",
79
92
  description:
80
93
  "Navigate a tab to a URL. Waits (up to 10s) for the load event, then returns the tab's URL and title.",
81
- inputSchema: { url: z.string().url(), tabId: tabId.optional() },
94
+ inputSchema: { url: z.string().url(), tabId: tabId.optional(), render },
82
95
  timeoutMs: 30_000,
83
96
  },
84
97
  {
@@ -89,6 +102,7 @@ const rawDefs = [
89
102
  inputSchema: {
90
103
  tabId: tabId.optional(),
91
104
  bypassCache: z.boolean().optional().describe("Skip the HTTP cache, like a hard reload (default false)"),
105
+ render,
92
106
  },
93
107
  timeoutMs: 30_000,
94
108
  },
@@ -108,7 +122,7 @@ const rawDefs = [
108
122
  "speed matters more than realism. A native <select> opens a browser menu that clicks and keys cannot drive: " +
109
123
  "set it with form_input. A scroll result reports how far the content actually moved, which on an infinite list " +
110
124
  "can be less than asked. NOTE: while attached, Chrome shows a " +
111
- '"TaskWindow started debugging this browser" infobar — this is unavoidable with CDP-based control.',
125
+ '"TaskWindow started debugging this browser" infobar. Ordinary tabs disconnect after 10 seconds with no running browser calls; rendering and emulated-viewport tabs stay connected.',
112
126
  inputSchema: {
113
127
  action: z.enum([
114
128
  "screenshot", "left_click", "right_click", "middle_click", "double_click", "triple_click",
@@ -260,7 +274,8 @@ const rawDefs = [
260
274
  name: "read_console_messages",
261
275
  description:
262
276
  "Read console output (console.*, errors, warnings) captured from the tab. Capture is CDP-based, so it covers " +
263
- "messages emitted while TaskWindow has been driving the tab.",
277
+ "messages emitted while TaskWindow is attached. Capture pauses after 10 seconds with no running browser calls; " +
278
+ "previously captured messages are kept. For continuous capture, reload with render:true (keeps Chrome's debugging banner visible).",
264
279
  inputSchema: {
265
280
  tabId: tabId.optional(),
266
281
  pattern: z.string().optional().describe("Only messages matching this regular expression"),
@@ -272,7 +287,9 @@ const rawDefs = [
272
287
  {
273
288
  name: "read_network_requests",
274
289
  description:
275
- "Read network requests observed in the tab while TaskWindow was attached: method, URL, status, type and size.",
290
+ "Read network requests observed in the tab while TaskWindow was attached: method, URL, status, type and size. " +
291
+ "Capture pauses after 10 seconds with no running browser calls; previously captured requests are kept. " +
292
+ "Navigate or reload to capture a fresh load; for continuous capture, reload with render:true (keeps Chrome's debugging banner visible).",
276
293
  inputSchema: {
277
294
  tabId: tabId.optional(),
278
295
  pattern: z.string().optional().describe("Only requests whose URL matches this regular expression"),