taskwindow 0.2.0 → 0.2.2
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 +5 -4
- package/package.json +2 -2
- package/src/index.js +1 -1
- package/src/tools.js +37 -19
package/README.md
CHANGED
|
@@ -36,8 +36,9 @@ connected.
|
|
|
36
36
|
|
|
37
37
|
Ask your agent: *"Open example.com in a new tab and take a screenshot."*
|
|
38
38
|
|
|
39
|
-
A green tab group named after your task appears in
|
|
40
|
-
the
|
|
39
|
+
A green tab group named after your task appears in a separate TaskWindow
|
|
40
|
+
window — the agents' workspace, shared by every task and every agent, and kept
|
|
41
|
+
open by a pinned tab no agent can close. Screenshot done. Now try:
|
|
41
42
|
*"Find the sign-up link and read the page's headings."*
|
|
42
43
|
|
|
43
44
|
### Repair and advanced commands
|
|
@@ -45,7 +46,7 @@ the agent's workspace. Screenshot done. Now try:
|
|
|
45
46
|
```bash
|
|
46
47
|
taskwindow doctor # diagnose daemon, extension, versions, and agents
|
|
47
48
|
taskwindow pair # create a manual one-time pairing code
|
|
48
|
-
taskwindow install
|
|
49
|
+
taskwindow install # re-run setup; also repairs and updates the extension
|
|
49
50
|
taskwindow install --claude # add Claude Code without repeating setup
|
|
50
51
|
taskwindow install --cursor # add Cursor without repeating setup
|
|
51
52
|
taskwindow install --opencode # add OpenCode without repeating setup
|
|
@@ -60,7 +61,7 @@ agents. For another MCP client, connect to `http://127.0.0.1:9377/mcp` with
|
|
|
60
61
|
| Area | Tools |
|
|
61
62
|
|---|---|
|
|
62
63
|
| Status | `taskwindow_status` (daemon/extension readiness and recovery guidance) |
|
|
63
|
-
| Tabs | `tabs_list`, `tabs_create`, `tabs_close`, `navigate` |
|
|
64
|
+
| Tabs | `tabs_list`, `tabs_create`, `tabs_close`, `navigate`, `reload` |
|
|
64
65
|
| See | `computer` (screenshot + click/type/key/scroll), `read_page`, `find`, `get_page_text` |
|
|
65
66
|
| Act | `form_input`, `file_upload`, `upload_image`, `javascript_execute` |
|
|
66
67
|
| Debug | `read_console_messages`, `read_network_requests` |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taskwindow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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/pairing.test.mjs test/extension-bootstrap.test.mjs test/extension-tabs.test.mjs && node test/run.mjs"
|
|
12
|
+
"test": "node --test test/pairing.test.mjs test/extension-bootstrap.test.mjs test/extension-tabs.test.mjs test/tool-contract.test.mjs && node test/run.mjs"
|
|
13
13
|
},
|
|
14
14
|
"engines": {
|
|
15
15
|
"node": ">=18"
|
package/src/index.js
CHANGED
|
@@ -186,7 +186,7 @@ async function runDoctor(config) {
|
|
|
186
186
|
console.log("✗ Daemon not running — run: taskwindow install");
|
|
187
187
|
}
|
|
188
188
|
if (installedVersion) console.log(`✓ Extension files installed (v${installedVersion}, ${extensionInstallDir()})`);
|
|
189
|
-
else console.log("✗ Extension files not installed — run: taskwindow install
|
|
189
|
+
else console.log("✗ Extension files not installed — run: taskwindow install");
|
|
190
190
|
if (health?.extensionConnected) {
|
|
191
191
|
const versionNote = installedVersion && health.extensionVersion && installedVersion !== health.extensionVersion
|
|
192
192
|
? ` — installed files are v${installedVersion}; reload the extension in Chrome`
|
package/src/tools.js
CHANGED
|
@@ -2,6 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
|
|
3
3
|
const tabId = z.number().int().describe("Tab ID from tabs_list. Defaults to the active tab in your session's task groups.");
|
|
4
4
|
|
|
5
|
+
// Injected into every browser tool below (see toolDefs) rather than spread by
|
|
6
|
+
// hand into each schema: one missed spread made read_network_requests
|
|
7
|
+
// uncallable in v0.2.0.
|
|
5
8
|
const sessionToken = z
|
|
6
9
|
.string()
|
|
7
10
|
.optional()
|
|
@@ -13,7 +16,7 @@ const sessionToken = z
|
|
|
13
16
|
// The MCP layer turns `image` into an image content block and everything else
|
|
14
17
|
// into text blocks.
|
|
15
18
|
|
|
16
|
-
const
|
|
19
|
+
const rawDefs = [
|
|
17
20
|
{
|
|
18
21
|
name: "taskwindow_status",
|
|
19
22
|
description:
|
|
@@ -25,7 +28,7 @@ const toolDefs = [
|
|
|
25
28
|
name: "tabs_list",
|
|
26
29
|
description:
|
|
27
30
|
"List the tabs in your session (id, title, URL, active state) — by default only the tabs it created, grouped by task. Pass the sessionToken returned by tabs_create.",
|
|
28
|
-
inputSchema: {
|
|
31
|
+
inputSchema: {},
|
|
29
32
|
timeoutMs: 10_000,
|
|
30
33
|
},
|
|
31
34
|
{
|
|
@@ -33,14 +36,15 @@ const toolDefs = [
|
|
|
33
36
|
description:
|
|
34
37
|
"Open a new tab in a task-named tab group (in the agent's own window). Requires a \"task\" name saying what the group is about; " +
|
|
35
38
|
"same task name in the same session reuses that group. Returns a sessionToken — pass it as \"sessionToken\" in every subsequent " +
|
|
36
|
-
"browser tool call; concurrent agents' sessions never share tabs."
|
|
39
|
+
"browser tool call; concurrent agents' sessions never share tabs. Don't open a second tab for a page you already have: " +
|
|
40
|
+
"use reload or navigate on the existing tab (see tabs_list).",
|
|
37
41
|
inputSchema: {
|
|
38
42
|
url: z.string().url().describe("URL to open (include the scheme, e.g. https://...)"),
|
|
39
43
|
task: z
|
|
40
44
|
.string()
|
|
41
45
|
.min(1)
|
|
42
46
|
.describe('Task name for the tab group — required; says what the group is about, e.g. "Research competitors".'),
|
|
43
|
-
active: z.boolean().optional().describe("
|
|
47
|
+
active: z.boolean().optional().describe("Make it the active tab of the agent window (default true). Never focuses that window: the user's window and app keep focus."),
|
|
44
48
|
sessionToken: z
|
|
45
49
|
.string()
|
|
46
50
|
.optional()
|
|
@@ -51,14 +55,25 @@ const toolDefs = [
|
|
|
51
55
|
{
|
|
52
56
|
name: "tabs_close",
|
|
53
57
|
description: "Close a tab.",
|
|
54
|
-
inputSchema: { tabId
|
|
58
|
+
inputSchema: { tabId },
|
|
55
59
|
timeoutMs: 10_000,
|
|
56
60
|
},
|
|
57
61
|
{
|
|
58
62
|
name: "navigate",
|
|
59
63
|
description:
|
|
60
64
|
"Navigate a tab to a URL. Waits (up to 10s) for the load event, then returns the tab's URL and title.",
|
|
61
|
-
inputSchema: { url: z.string().url(), tabId: tabId.optional()
|
|
65
|
+
inputSchema: { url: z.string().url(), tabId: tabId.optional() },
|
|
66
|
+
timeoutMs: 30_000,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "reload",
|
|
70
|
+
description:
|
|
71
|
+
"Reload a tab in place, like the browser's reload button, and wait (up to 10s) for the load event. " +
|
|
72
|
+
"Use this — not tabs_create — to refresh a page you already have open.",
|
|
73
|
+
inputSchema: {
|
|
74
|
+
tabId: tabId.optional(),
|
|
75
|
+
bypassCache: z.boolean().optional().describe("Skip the HTTP cache, like a hard reload (default false)"),
|
|
76
|
+
},
|
|
62
77
|
timeoutMs: 30_000,
|
|
63
78
|
},
|
|
64
79
|
{
|
|
@@ -84,7 +99,6 @@ const toolDefs = [
|
|
|
84
99
|
dy: z.number().int().optional().describe("Vertical scroll delta in pixels (positive scrolls down)"),
|
|
85
100
|
ms: z.number().int().min(0).max(10_000).optional().describe('Milliseconds for the "wait" action (max 10000)'),
|
|
86
101
|
fullPage: z.boolean().optional().describe('For "screenshot": capture the whole scrollable page instead of the viewport'),
|
|
87
|
-
sessionToken,
|
|
88
102
|
},
|
|
89
103
|
timeoutMs: 30_000,
|
|
90
104
|
},
|
|
@@ -102,7 +116,6 @@ const toolDefs = [
|
|
|
102
116
|
})).min(1).max(4).optional().describe("Sizes to render side by side, e.g. [{\"width\":390,\"height\":844},{\"width\":1280,\"height\":800}]. Omit to close the responsive view."),
|
|
103
117
|
url: z.string().url().optional().describe("Page to render (defaults to the current tab's URL)"),
|
|
104
118
|
tabId: tabId.optional(),
|
|
105
|
-
sessionToken,
|
|
106
119
|
},
|
|
107
120
|
timeoutMs: 30_000,
|
|
108
121
|
},
|
|
@@ -112,7 +125,7 @@ const toolDefs = [
|
|
|
112
125
|
"Structured accessibility-style snapshot of the page: a text tree of interactive elements and content, " +
|
|
113
126
|
"each labelled with a ref (e.g. e42) you can pass to form_input / file_upload. Cheaper and more reliable " +
|
|
114
127
|
"than a screenshot for forms and navigation.",
|
|
115
|
-
inputSchema: { tabId: tabId.optional()
|
|
128
|
+
inputSchema: { tabId: tabId.optional() },
|
|
116
129
|
timeoutMs: 20_000,
|
|
117
130
|
},
|
|
118
131
|
{
|
|
@@ -120,7 +133,7 @@ const toolDefs = [
|
|
|
120
133
|
description:
|
|
121
134
|
"Find elements on the page matching a query (matches role, accessible name and visible text, case-insensitive). " +
|
|
122
135
|
"Returns matching refs plus enough context to pick between them.",
|
|
123
|
-
inputSchema: { query: z.string().min(1), tabId: tabId.optional()
|
|
136
|
+
inputSchema: { query: z.string().min(1), tabId: tabId.optional() },
|
|
124
137
|
timeoutMs: 20_000,
|
|
125
138
|
},
|
|
126
139
|
{
|
|
@@ -129,7 +142,6 @@ const toolDefs = [
|
|
|
129
142
|
inputSchema: {
|
|
130
143
|
tabId: tabId.optional(),
|
|
131
144
|
maxLength: z.number().int().min(100).max(500_000).optional().describe("Truncate output to this many characters (default 50000)"),
|
|
132
|
-
sessionToken,
|
|
133
145
|
},
|
|
134
146
|
timeoutMs: 20_000,
|
|
135
147
|
},
|
|
@@ -144,7 +156,6 @@ const toolDefs = [
|
|
|
144
156
|
selector: z.string().optional().describe("CSS selector as fallback when no ref is available"),
|
|
145
157
|
clear: z.boolean().optional().describe("Clear the field before typing (default true for text fields)"),
|
|
146
158
|
tabId: tabId.optional(),
|
|
147
|
-
sessionToken,
|
|
148
159
|
},
|
|
149
160
|
timeoutMs: 20_000,
|
|
150
161
|
},
|
|
@@ -162,7 +173,6 @@ const toolDefs = [
|
|
|
162
173
|
ref: z.string().optional(),
|
|
163
174
|
selector: z.string().optional(),
|
|
164
175
|
tabId: tabId.optional(),
|
|
165
|
-
sessionToken,
|
|
166
176
|
},
|
|
167
177
|
timeoutMs: 60_000,
|
|
168
178
|
},
|
|
@@ -179,7 +189,6 @@ const toolDefs = [
|
|
|
179
189
|
ref: z.string().optional(),
|
|
180
190
|
selector: z.string().optional(),
|
|
181
191
|
tabId: tabId.optional(),
|
|
182
|
-
sessionToken,
|
|
183
192
|
},
|
|
184
193
|
timeoutMs: 30_000,
|
|
185
194
|
},
|
|
@@ -192,7 +201,6 @@ const toolDefs = [
|
|
|
192
201
|
code: z.string().describe("JavaScript source to evaluate, e.g. \"document.title\""),
|
|
193
202
|
awaitPromise: z.boolean().optional().describe("Wait for a returned Promise to settle (default true)"),
|
|
194
203
|
tabId: tabId.optional(),
|
|
195
|
-
sessionToken,
|
|
196
204
|
},
|
|
197
205
|
timeoutMs: 30_000,
|
|
198
206
|
},
|
|
@@ -206,7 +214,6 @@ const toolDefs = [
|
|
|
206
214
|
pattern: z.string().optional().describe("Only messages matching this regular expression"),
|
|
207
215
|
level: z.enum(["log", "info", "warning", "error"]).optional().describe("Minimum severity to include"),
|
|
208
216
|
limit: z.number().int().min(1).max(1000).optional().describe("Max messages to return (default 200, newest last)"),
|
|
209
|
-
sessionToken,
|
|
210
217
|
},
|
|
211
218
|
timeoutMs: 20_000,
|
|
212
219
|
},
|
|
@@ -232,7 +239,6 @@ const toolDefs = [
|
|
|
232
239
|
tool: z.string(),
|
|
233
240
|
params: z.record(z.any()).optional().default({}),
|
|
234
241
|
})).min(1).max(20),
|
|
235
|
-
sessionToken,
|
|
236
242
|
},
|
|
237
243
|
timeoutMs: 300_000,
|
|
238
244
|
},
|
|
@@ -246,7 +252,6 @@ const toolDefs = [
|
|
|
246
252
|
duration: z.number().min(0.5).max(30).describe("Seconds to record (max 30)"),
|
|
247
253
|
fps: z.number().min(1).max(10).optional().describe("Frames per second (default 5)"),
|
|
248
254
|
maxWidth: z.number().int().min(100).max(1280).optional().describe("Downscale frames to at most this width (default 800)"),
|
|
249
|
-
sessionToken,
|
|
250
255
|
},
|
|
251
256
|
timeoutMs: 180_000,
|
|
252
257
|
},
|
|
@@ -254,16 +259,29 @@ const toolDefs = [
|
|
|
254
259
|
name: "shortcuts_list",
|
|
255
260
|
description: "List the extension-defined shortcut macros (named sequences of tool actions).",
|
|
256
261
|
inputSchema: {},
|
|
262
|
+
noSession: true, // reads the macro registry, never a tab
|
|
257
263
|
timeoutMs: 10_000,
|
|
258
264
|
},
|
|
259
265
|
{
|
|
260
266
|
name: "shortcuts_execute",
|
|
261
267
|
description: "Run a shortcut macro defined in the extension and return each action's result.",
|
|
262
|
-
inputSchema: { name: z.string().min(1)
|
|
268
|
+
inputSchema: { name: z.string().min(1) },
|
|
263
269
|
timeoutMs: 120_000,
|
|
264
270
|
},
|
|
265
271
|
];
|
|
266
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Every tool that reaches a tab is session-scoped, so `sessionToken` is added
|
|
275
|
+
* here instead of being spread by hand into each schema — a tool whose handler
|
|
276
|
+
* scopes by session but whose schema omitted the param is uncallable, which is
|
|
277
|
+
* how read_network_requests shipped broken in v0.2.0. A tool that never touches
|
|
278
|
+
* a tab opts out with `noSession`; a tool that declares its own sessionToken
|
|
279
|
+
* (tabs_create's has different semantics) keeps it.
|
|
280
|
+
*/
|
|
281
|
+
const toolDefs = rawDefs.map((def) =>
|
|
282
|
+
def.local || def.noSession ? def : { ...def, inputSchema: { sessionToken, ...def.inputSchema } }
|
|
283
|
+
);
|
|
284
|
+
|
|
267
285
|
const toolNames = new Set(toolDefs.filter((tool) => !tool.local).map((tool) => tool.name));
|
|
268
286
|
|
|
269
287
|
function toMcpResult(result) {
|