taskwindow 0.2.13 → 0.2.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.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskwindow",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
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",
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. 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
  },