cdp-toolkit 1.1.0 → 1.4.0
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/CHANGELOG.md +203 -9
- package/CONTRACT.md +7 -5
- package/README.md +113 -33
- package/dist/cli.js +764 -64
- package/dist/index.js +650 -42
- package/dist/mcp.js +1091 -77
- package/package.json +4 -3
- package/src/bidi/driver.ts +167 -4
- package/src/capabilities.ts +1 -1
- package/src/cdp/driver.ts +145 -1
- package/src/cli.ts +47 -22
- package/src/client.ts +25 -7
- package/src/driver.ts +107 -1
- package/src/firefox-tools.ts +6 -3
- package/src/index.ts +14 -2
- package/src/leases-tools.ts +107 -0
- package/src/leases.ts +541 -0
- package/src/manifest.ts +339 -15
- package/src/mcp.ts +27 -19
- package/src/origins.ts +266 -0
- package/src/shared-tools.ts +365 -14
- package/src/tools/console.ts +3 -3
- package/src/tools/evaluate.ts +2 -2
- package/src/tools/heap.ts +3 -3
- package/src/tools/lighthouse.ts +4 -4
- package/src/tools/navigation.ts +1 -1
- package/src/tools/network.ts +7 -7
- package/src/tools/network_mock.ts +8 -8
- package/src/tools/performance.ts +11 -11
- package/src/tools/recorder.ts +5 -5
- package/src/tools/snapshot.ts +2 -2
package/src/manifest.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* MCP tool manifest
|
|
2
|
+
* MCP tool manifest: the JSON Schemas the cdp-toolkit MCP server advertises via
|
|
3
3
|
* `tools/list`. Each entry's `name` matches a key in the TOOLS registry
|
|
4
4
|
* (src/index.ts) and its `inputSchema` mirrors that tool's TypeScript Args.
|
|
5
5
|
*
|
|
@@ -25,10 +25,14 @@ export interface ToolSpec {
|
|
|
25
25
|
export const MANIFEST: ToolSpec[] = [
|
|
26
26
|
{
|
|
27
27
|
"name": "list_pages",
|
|
28
|
-
"description": "Enumerate browser page targets via the CDP browser endpoint (GET /json/list). By default returns only page-type tabs; set 'all' to also include workers and background pages. Each entry carries the targetId used as a target selector elsewhere.",
|
|
28
|
+
"description": "Enumerate browser page targets via the CDP browser endpoint (GET /json/list). By default returns only page-type tabs; set 'all' to also include workers and background pages. Each entry carries the targetId used as a target selector elsewhere, plus an 'origin' field recording where the tab came from: 'agent' means this toolkit created it (the entry then also carries the creating 'label' and 'createdAt'), and this stays true after the creating agent releases its lease or dies, which is what makes a stray agent tab findable later. 'unknown' means there is no creation record. It never says 'human': the toolkit cannot prove a person opened a tab, so 'unknown' is the honest word for a tab it did not create, one opened before the toolkit ran, or one whose record could not be written. A tab whose record exists but could not be read reports origin 'unknown' plus 'originUnreadable', so a broken record is never mistaken for no record.",
|
|
29
29
|
"inputSchema": {
|
|
30
30
|
"type": "object",
|
|
31
31
|
"properties": {
|
|
32
|
+
"lease": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
35
|
+
},
|
|
32
36
|
"all": {
|
|
33
37
|
"type": "boolean",
|
|
34
38
|
"description": "Include non-page targets (service/shared workers, background pages) when true; otherwise only page-type tabs are listed."
|
|
@@ -44,9 +48,25 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
44
48
|
"inputSchema": {
|
|
45
49
|
"type": "object",
|
|
46
50
|
"properties": {
|
|
51
|
+
"lease": {
|
|
52
|
+
"type": "string",
|
|
53
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
54
|
+
},
|
|
47
55
|
"url": {
|
|
48
56
|
"type": "string",
|
|
49
57
|
"description": "URL to open in the new tab; defaults to about:blank."
|
|
58
|
+
},
|
|
59
|
+
"claim": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"description": "Claim the new tab atomically as part of creating it and return a lease token alongside {targetId,url}. Default false, which is byte-identical to the pre-1.2 behavior."
|
|
62
|
+
},
|
|
63
|
+
"label": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "Agent label recorded on the lease when claim:true, surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
66
|
+
},
|
|
67
|
+
"ttlMs": {
|
|
68
|
+
"type": "number",
|
|
69
|
+
"description": "How long the lease taken by claim:true survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (15 minutes). Every checked call refreshes it, so an active agent never expires. Ignored without claim:true."
|
|
50
70
|
}
|
|
51
71
|
},
|
|
52
72
|
"required": [],
|
|
@@ -59,6 +79,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
59
79
|
"inputSchema": {
|
|
60
80
|
"type": "object",
|
|
61
81
|
"properties": {
|
|
82
|
+
"lease": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
85
|
+
},
|
|
62
86
|
"target": {
|
|
63
87
|
"type": "string",
|
|
64
88
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -76,6 +100,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
76
100
|
"inputSchema": {
|
|
77
101
|
"type": "object",
|
|
78
102
|
"properties": {
|
|
103
|
+
"lease": {
|
|
104
|
+
"type": "string",
|
|
105
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
106
|
+
},
|
|
79
107
|
"target": {
|
|
80
108
|
"type": "string",
|
|
81
109
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -93,6 +121,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
93
121
|
"inputSchema": {
|
|
94
122
|
"type": "object",
|
|
95
123
|
"properties": {
|
|
124
|
+
"lease": {
|
|
125
|
+
"type": "string",
|
|
126
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
127
|
+
},
|
|
96
128
|
"target": {
|
|
97
129
|
"type": "string",
|
|
98
130
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -127,10 +159,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
127
159
|
},
|
|
128
160
|
{
|
|
129
161
|
"name": "wait_for",
|
|
130
|
-
"description": "Poll a target page until the given substring appears in document.body.innerText (Runtime.evaluate on a fixed interval), or throw on timeout. Text-substring waiting only
|
|
162
|
+
"description": "Poll a target page until the given substring appears in document.body.innerText (Runtime.evaluate on a fixed interval), or throw on timeout. Text-substring waiting only: no aria/role/selector or event variants; throws rather than returning {found:false}.",
|
|
131
163
|
"inputSchema": {
|
|
132
164
|
"type": "object",
|
|
133
165
|
"properties": {
|
|
166
|
+
"lease": {
|
|
167
|
+
"type": "string",
|
|
168
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
169
|
+
},
|
|
134
170
|
"target": {
|
|
135
171
|
"type": "string",
|
|
136
172
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -156,10 +192,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
156
192
|
},
|
|
157
193
|
{
|
|
158
194
|
"name": "evaluate_script",
|
|
159
|
-
"description": "Run arbitrary JavaScript in the target page's main-world context over raw CDP and return the evaluated value (returnByValue). With no 'args' the 'expression' is evaluated as a raw expression; when 'args' is provided 'expression' must be a function literal (arrow or classic) invoked on globalThis with the args passed positionally. A thrown exception surfaces as an error; non-serializable returns (DOM nodes, functions) come back as their CDP description string.",
|
|
195
|
+
"description": "Run arbitrary JavaScript in the target page's main-world context over raw CDP and return the evaluated value (returnByValue). With no 'args' the 'expression' is evaluated as a raw expression; when 'args' is provided 'expression' must be a function literal (arrow or classic) invoked on globalThis with the args passed positionally. A thrown exception surfaces as an error; non-serializable returns (DOM nodes, functions) come back as their CDP description string. Pass 'savePath' to write the evaluated value to a JSON file instead: the response then carries only {path,bytes,type,target} and the value itself never appears in it, in any form. That is the way to read a credential (a JWT or session token out of localStorage, for example) without putting the secret into the caller's transcript.",
|
|
160
196
|
"inputSchema": {
|
|
161
197
|
"type": "object",
|
|
162
198
|
"properties": {
|
|
199
|
+
"lease": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
202
|
+
},
|
|
163
203
|
"target": {
|
|
164
204
|
"type": "string",
|
|
165
205
|
"description": "Page selector: 'active' (or omit) -> first page-type target | '<32-hex targetId>' -> exact target by id | 'index:N' -> Nth page-type target (0-based) | 'url:<substring>' -> first page whose url contains substring | 'title:<substring>' -> first page whose title contains substring."
|
|
@@ -175,6 +215,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
175
215
|
"args": {
|
|
176
216
|
"type": "array",
|
|
177
217
|
"description": "Positional JSON-serializable arguments to pass to the expression, treating it as a function. No live element/page handle is bound."
|
|
218
|
+
},
|
|
219
|
+
"savePath": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "Write the evaluated value to this file as JSON and KEEP IT OUT OF THE RESPONSE: with savePath set the result is {path,bytes,type,target} only, with no copy, preview or truncation of the value. Use it to read credentials without putting them in a transcript. An absolute path (starting with /) is used as-is; a relative path is resolved under the artifact dir (/tmp/cdp-toolkit). Missing parent directories are created. Omit it to get the value back inline, exactly as before."
|
|
178
222
|
}
|
|
179
223
|
},
|
|
180
224
|
"required": [
|
|
@@ -183,12 +227,138 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
183
227
|
"additionalProperties": false
|
|
184
228
|
}
|
|
185
229
|
},
|
|
230
|
+
{
|
|
231
|
+
"name": "list_cookies",
|
|
232
|
+
"description": "Read the cookie store for the target page, INCLUDING httpOnly cookies, which document.cookie cannot see and an evaluate_script call therefore cannot reach. Each cookie carries name, value, domain, path, expires (Unix seconds, -1 for a session cookie), size, httpOnly, secure, sameSite ('strict'|'lax'|'none'|'default') and session. The read is page-scoped, not browser-wide: it returns the cookies of the resolved tab (Chrome: Network.getCookies; Firefox: storage.getCookies partitioned by that browsing context), so point at a page on the site whose cookies you want. Filter with 'domain' and/or 'name'. Pass 'savePath' to write the cookie array to a JSON file instead: the response is then {path,bytes,count,target} only, with no cookie value in it in any form, which is how to capture a session cookie without putting the credential in the caller's transcript.",
|
|
233
|
+
"inputSchema": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"properties": {
|
|
236
|
+
"lease": {
|
|
237
|
+
"type": "string",
|
|
238
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs."
|
|
239
|
+
},
|
|
240
|
+
"target": {
|
|
241
|
+
"type": "string",
|
|
242
|
+
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
243
|
+
},
|
|
244
|
+
"domain": {
|
|
245
|
+
"type": "string",
|
|
246
|
+
"description": "Keep only cookies for this domain. A leading dot is ignored on both sides and subdomains of the given domain match too, so 'example.test' matches '.example.test' and 'app.example.test'. No wildcards."
|
|
247
|
+
},
|
|
248
|
+
"name": {
|
|
249
|
+
"type": "string",
|
|
250
|
+
"description": "Keep only the cookie with exactly this name. Exact match, not a substring."
|
|
251
|
+
},
|
|
252
|
+
"savePath": {
|
|
253
|
+
"type": "string",
|
|
254
|
+
"description": "Write the cookie array to this file as JSON and KEEP THE VALUES OUT OF THE RESPONSE: with savePath set the result is {path,bytes,count,target} only, with no copy, preview or truncation of any cookie value. An absolute path (starting with /) is used as-is; a relative path is resolved under the artifact dir (/tmp/cdp-toolkit). Missing parent directories are created. Omit it to get the cookies back inline."
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"required": [],
|
|
258
|
+
"additionalProperties": false
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "set_cookie",
|
|
263
|
+
"description": "Write one cookie into the target page's cookie store, INCLUDING an httpOnly or secure cookie, which document.cookie cannot create and an evaluate_script call therefore cannot either. Chrome uses Network.setCookie, Firefox uses storage.setCookie partitioned by the resolved browsing context. Either 'url' or 'domain' is REQUIRED: a cookie has to be attributed to a site and the call is refused with an error when neither is given, rather than guessing the current page's origin. The response is {set:true,target} and never echoes the value back, so a credential you just supplied does not land in the transcript twice. A 'set:true' is earned, not assumed: Chrome answers Network.setCookie with success:false when it declines a cookie (a domain the url does not belong to, a secure cookie on an insecure origin, an oversized value) and that refusal is raised as an error. On Firefox, 'domain' is derived from 'url' when only the url was given, because BiDi has no url parameter; a url with no host, such as about:blank or a data URL, is an error rather than a silent no-op. Read the result back with list_cookies when you need proof.",
|
|
264
|
+
"inputSchema": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"properties": {
|
|
267
|
+
"lease": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs."
|
|
270
|
+
},
|
|
271
|
+
"target": {
|
|
272
|
+
"type": "string",
|
|
273
|
+
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
274
|
+
},
|
|
275
|
+
"name": {
|
|
276
|
+
"type": "string",
|
|
277
|
+
"description": "Cookie name. Required and non-empty."
|
|
278
|
+
},
|
|
279
|
+
"value": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "Cookie value. Required. It is not echoed back in the response."
|
|
282
|
+
},
|
|
283
|
+
"url": {
|
|
284
|
+
"type": "string",
|
|
285
|
+
"description": "The URL the cookie is set for, for example 'https://example.com/'. Chrome derives domain, path and secure from it. Firefox derives only the domain from its host. Give this or 'domain'."
|
|
286
|
+
},
|
|
287
|
+
"domain": {
|
|
288
|
+
"type": "string",
|
|
289
|
+
"description": "Cookie domain, for example 'example.com' or '.example.com' for subdomains. Give this or 'url'. When both are given, this wins on Firefox and Chrome applies its own url plus domain consistency rule."
|
|
290
|
+
},
|
|
291
|
+
"path": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"description": "Cookie path. Passed through exactly as given and NOT defaulted to '/': with a 'url' Chrome derives the path from it, so an invented default here would widen a cookie you meant to scope narrowly."
|
|
294
|
+
},
|
|
295
|
+
"expires": {
|
|
296
|
+
"type": "number",
|
|
297
|
+
"description": "Expiry as Unix time in SECONDS, matching what list_cookies reports. Omit it for a session cookie, which is what both backends do when no expiry is supplied."
|
|
298
|
+
},
|
|
299
|
+
"httpOnly": {
|
|
300
|
+
"type": "boolean",
|
|
301
|
+
"description": "Set the httpOnly flag, making the cookie invisible to document.cookie. Only a protocol write like this one can create such a cookie."
|
|
302
|
+
},
|
|
303
|
+
"secure": {
|
|
304
|
+
"type": "boolean",
|
|
305
|
+
"description": "Set the secure flag. Chrome declines a secure cookie on an insecure origin, and that refusal surfaces as an error."
|
|
306
|
+
},
|
|
307
|
+
"sameSite": {
|
|
308
|
+
"type": "string",
|
|
309
|
+
"enum": ["strict", "lax", "none", "default"],
|
|
310
|
+
"description": "SameSite attribute, lowercase, matching what list_cookies reports. 'default' means the attribute is not set at all."
|
|
311
|
+
}
|
|
312
|
+
},
|
|
313
|
+
"required": ["name", "value"],
|
|
314
|
+
"additionalProperties": false
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"name": "delete_cookies",
|
|
319
|
+
"description": "Delete the named cookie from the target page's cookie store, httpOnly cookies included. Chrome uses Network.deleteCookies, Firefox uses storage.deleteCookies with a filter, partitioned by the resolved browsing context. Both 'name' and one of 'url' or 'domain' are REQUIRED: without a site constraint the call would delete by name across the whole partition, so it is refused with an error instead. Narrow further with 'path'. The response is {deleted:true,target} and carries NO count, because neither protocol reports how many cookies it removed and a number here would be invented; call list_cookies before and after when you need a real count. 'deleted:true' means the backend accepted and performed the deletion, not that a matching cookie existed, since deleting an absent cookie is a success on both backends.",
|
|
320
|
+
"inputSchema": {
|
|
321
|
+
"type": "object",
|
|
322
|
+
"properties": {
|
|
323
|
+
"lease": {
|
|
324
|
+
"type": "string",
|
|
325
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs."
|
|
326
|
+
},
|
|
327
|
+
"target": {
|
|
328
|
+
"type": "string",
|
|
329
|
+
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
330
|
+
},
|
|
331
|
+
"name": {
|
|
332
|
+
"type": "string",
|
|
333
|
+
"description": "Exact cookie name to delete. Required and non-empty. No wildcards: this removes a named cookie, not a swathe of them."
|
|
334
|
+
},
|
|
335
|
+
"url": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"description": "Delete cookies matching this URL, for example 'https://example.com/'. Give this or 'domain'. On Firefox only the host is used, because BiDi's filter has no url field."
|
|
338
|
+
},
|
|
339
|
+
"domain": {
|
|
340
|
+
"type": "string",
|
|
341
|
+
"description": "Delete cookies with this exact domain. Give this or 'url'."
|
|
342
|
+
},
|
|
343
|
+
"path": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "Narrow the deletion to cookies with this exact path. Omit to match any path allowed by the other constraints."
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"required": ["name"],
|
|
349
|
+
"additionalProperties": false
|
|
350
|
+
}
|
|
351
|
+
},
|
|
186
352
|
{
|
|
187
353
|
"name": "take_snapshot",
|
|
188
|
-
"description": "Capture the page's accessibility tree (Accessibility.getFullAXTree) as a compact indented text tree where each line is prefixed with [uid]
|
|
354
|
+
"description": "Capture the page's accessibility tree (Accessibility.getFullAXTree) as a compact indented text tree where each line is prefixed with [uid], the node's CDP backendDOMNodeId. These uids are the stateless element references that every interaction tool (click/hover/fill/etc.) feeds back to resolve a live DOM node (via DOM.resolveNode({ backendNodeId: uid })), so run this first to discover uids.",
|
|
189
355
|
"inputSchema": {
|
|
190
356
|
"type": "object",
|
|
191
357
|
"properties": {
|
|
358
|
+
"lease": {
|
|
359
|
+
"type": "string",
|
|
360
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
361
|
+
},
|
|
192
362
|
"target": {
|
|
193
363
|
"type": "string",
|
|
194
364
|
"description": "Target page selector: 'active' (default, = first page-type target) | 'index:N' (Nth page-type target, 0-based) | 'url:<substring>' | 'title:<substring>' | '<32-hex targetId>' (exact target by id)."
|
|
@@ -208,6 +378,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
208
378
|
"inputSchema": {
|
|
209
379
|
"type": "object",
|
|
210
380
|
"properties": {
|
|
381
|
+
"lease": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
384
|
+
},
|
|
211
385
|
"target": {
|
|
212
386
|
"type": "string",
|
|
213
387
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -244,6 +418,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
244
418
|
"inputSchema": {
|
|
245
419
|
"type": "object",
|
|
246
420
|
"properties": {
|
|
421
|
+
"lease": {
|
|
422
|
+
"type": "string",
|
|
423
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
424
|
+
},
|
|
247
425
|
"target": {
|
|
248
426
|
"type": "string",
|
|
249
427
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -267,6 +445,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
267
445
|
"inputSchema": {
|
|
268
446
|
"type": "object",
|
|
269
447
|
"properties": {
|
|
448
|
+
"lease": {
|
|
449
|
+
"type": "string",
|
|
450
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
451
|
+
},
|
|
270
452
|
"target": {
|
|
271
453
|
"type": "string",
|
|
272
454
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -315,6 +497,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
315
497
|
"inputSchema": {
|
|
316
498
|
"type": "object",
|
|
317
499
|
"properties": {
|
|
500
|
+
"lease": {
|
|
501
|
+
"type": "string",
|
|
502
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
503
|
+
},
|
|
318
504
|
"target": {
|
|
319
505
|
"type": "string",
|
|
320
506
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -344,6 +530,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
344
530
|
"inputSchema": {
|
|
345
531
|
"type": "object",
|
|
346
532
|
"properties": {
|
|
533
|
+
"lease": {
|
|
534
|
+
"type": "string",
|
|
535
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
536
|
+
},
|
|
347
537
|
"target": {
|
|
348
538
|
"type": "string",
|
|
349
539
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -386,6 +576,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
386
576
|
"inputSchema": {
|
|
387
577
|
"type": "object",
|
|
388
578
|
"properties": {
|
|
579
|
+
"lease": {
|
|
580
|
+
"type": "string",
|
|
581
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
582
|
+
},
|
|
389
583
|
"target": {
|
|
390
584
|
"type": "string",
|
|
391
585
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -415,6 +609,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
415
609
|
"inputSchema": {
|
|
416
610
|
"type": "object",
|
|
417
611
|
"properties": {
|
|
612
|
+
"lease": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
615
|
+
},
|
|
418
616
|
"target": {
|
|
419
617
|
"type": "string",
|
|
420
618
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -443,6 +641,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
443
641
|
"inputSchema": {
|
|
444
642
|
"type": "object",
|
|
445
643
|
"properties": {
|
|
644
|
+
"lease": {
|
|
645
|
+
"type": "string",
|
|
646
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
647
|
+
},
|
|
446
648
|
"target": {
|
|
447
649
|
"type": "string",
|
|
448
650
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -474,10 +676,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
474
676
|
},
|
|
475
677
|
{
|
|
476
678
|
"name": "take_screenshot",
|
|
477
|
-
"description": "Capture the viewport (default), the full scrollable page (fullPage), or a single element (uid or selector
|
|
679
|
+
"description": "Capture the viewport (default), the full scrollable page (fullPage), or a single element (uid or selector, exactly one and mutually exclusive) via raw CDP Page.captureScreenshot. Writes a PNG/JPEG under /tmp/cdp-toolkit (override with savePath) and returns {path,bytes,format,target}; raw base64 is only included when returnBase64 is set. quality applies to jpeg only.",
|
|
478
680
|
"inputSchema": {
|
|
479
681
|
"type": "object",
|
|
480
682
|
"properties": {
|
|
683
|
+
"lease": {
|
|
684
|
+
"type": "string",
|
|
685
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
686
|
+
},
|
|
481
687
|
"target": {
|
|
482
688
|
"type": "string",
|
|
483
689
|
"description": "Target page selector. undefined or 'active' -> first page target; '<32-hex targetId>' -> exact target by id; 'index:N' -> Nth page target (0-based); 'url:<substring>' -> first page whose url contains substring; 'title:<substring>' -> first page whose title contains substring."
|
|
@@ -500,7 +706,7 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
500
706
|
},
|
|
501
707
|
"uid": {
|
|
502
708
|
"type": "number",
|
|
503
|
-
"description": "Element to clip to
|
|
709
|
+
"description": "Element to clip to: a CDP backendDOMNodeId obtained from take_snapshot. Mutually exclusive with selector."
|
|
504
710
|
},
|
|
505
711
|
"selector": {
|
|
506
712
|
"type": "string",
|
|
@@ -525,6 +731,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
525
731
|
"inputSchema": {
|
|
526
732
|
"type": "object",
|
|
527
733
|
"properties": {
|
|
734
|
+
"lease": {
|
|
735
|
+
"type": "string",
|
|
736
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
737
|
+
},
|
|
528
738
|
"target": {
|
|
529
739
|
"type": "string",
|
|
530
740
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -621,6 +831,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
621
831
|
"inputSchema": {
|
|
622
832
|
"type": "object",
|
|
623
833
|
"properties": {
|
|
834
|
+
"lease": {
|
|
835
|
+
"type": "string",
|
|
836
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
837
|
+
},
|
|
624
838
|
"target": {
|
|
625
839
|
"type": "string",
|
|
626
840
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -655,6 +869,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
655
869
|
"inputSchema": {
|
|
656
870
|
"type": "object",
|
|
657
871
|
"properties": {
|
|
872
|
+
"lease": {
|
|
873
|
+
"type": "string",
|
|
874
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
875
|
+
},
|
|
658
876
|
"target": {
|
|
659
877
|
"type": "string",
|
|
660
878
|
"description": "Target page selector: 'active' (or omitted) for the first page-type target | 'index:N' (0-based) | 'url:<substring>' | 'title:<substring>' | a 32-hex <targetId>."
|
|
@@ -688,6 +906,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
688
906
|
"inputSchema": {
|
|
689
907
|
"type": "object",
|
|
690
908
|
"properties": {
|
|
909
|
+
"lease": {
|
|
910
|
+
"type": "string",
|
|
911
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
912
|
+
},
|
|
691
913
|
"target": {
|
|
692
914
|
"type": "string",
|
|
693
915
|
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
@@ -707,10 +929,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
707
929
|
},
|
|
708
930
|
{
|
|
709
931
|
"name": "get_console_message",
|
|
710
|
-
"description": "Return a single console entry by zero-based index from the target's existing console buffer. Throws if the index is out of range
|
|
932
|
+
"description": "Return a single console entry by zero-based index from the target's existing console buffer. Throws if the index is out of range; run list_console_messages (optionally with reload:true) first to populate the buffer.",
|
|
711
933
|
"inputSchema": {
|
|
712
934
|
"type": "object",
|
|
713
935
|
"properties": {
|
|
936
|
+
"lease": {
|
|
937
|
+
"type": "string",
|
|
938
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
939
|
+
},
|
|
714
940
|
"target": {
|
|
715
941
|
"type": "string",
|
|
716
942
|
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
@@ -730,6 +956,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
730
956
|
"inputSchema": {
|
|
731
957
|
"type": "object",
|
|
732
958
|
"properties": {
|
|
959
|
+
"lease": {
|
|
960
|
+
"type": "string",
|
|
961
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
962
|
+
},
|
|
733
963
|
"target": {
|
|
734
964
|
"type": "string",
|
|
735
965
|
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
@@ -753,17 +983,21 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
753
983
|
},
|
|
754
984
|
{
|
|
755
985
|
"name": "get_network_request",
|
|
756
|
-
"description": "Return one network request (matched by exact requestId, else by url substring) including status/headers. Requires at least one of requestId or url (throws otherwise). With includeBody:true the body fetch drives a fresh reload capture and is matched by url ONLY (reload re-mints requestIds, so a carried-over requestId cannot fetch a body
|
|
986
|
+
"description": "Return one network request (matched by exact requestId, else by url substring) including status/headers. Requires at least one of requestId or url (throws otherwise). With includeBody:true the body fetch drives a fresh reload capture and is matched by url ONLY (reload re-mints requestIds, so a carried-over requestId cannot fetch a body, so it returns metadata plus bodyUnavailableReason).",
|
|
757
987
|
"inputSchema": {
|
|
758
988
|
"type": "object",
|
|
759
989
|
"properties": {
|
|
990
|
+
"lease": {
|
|
991
|
+
"type": "string",
|
|
992
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
993
|
+
},
|
|
760
994
|
"target": {
|
|
761
995
|
"type": "string",
|
|
762
996
|
"description": "Target page selector: 'active' (default) | '<targetId>' | 'index:N' | 'url:<substring>' | 'title:<substring>'."
|
|
763
997
|
},
|
|
764
998
|
"requestId": {
|
|
765
999
|
"type": "string",
|
|
766
|
-
"description": "Match by exact requestId (metadata only
|
|
1000
|
+
"description": "Match by exact requestId (metadata only, cannot fetch a body, since reload re-mints requestIds)."
|
|
767
1001
|
},
|
|
768
1002
|
"url": {
|
|
769
1003
|
"type": "string",
|
|
@@ -788,6 +1022,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
788
1022
|
"inputSchema": {
|
|
789
1023
|
"type": "object",
|
|
790
1024
|
"properties": {
|
|
1025
|
+
"lease": {
|
|
1026
|
+
"type": "string",
|
|
1027
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1028
|
+
},
|
|
791
1029
|
"target": {
|
|
792
1030
|
"type": "string",
|
|
793
1031
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -806,10 +1044,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
806
1044
|
},
|
|
807
1045
|
{
|
|
808
1046
|
"name": "performance_stop_trace",
|
|
809
|
-
"description": "Stop the in-process trace started by performance_start_trace, drain buffered Tracing.dataCollected events, write the trace JSON under /tmp/cdp-toolkit, and return {path,bytes,events,metrics}. Throws if no live trace exists in this process (e.g. start ran in a different process)
|
|
1047
|
+
"description": "Stop the in-process trace started by performance_start_trace, drain buffered Tracing.dataCollected events, write the trace JSON under /tmp/cdp-toolkit, and return {path,bytes,events,metrics}. Throws if no live trace exists in this process (e.g. start ran in a different process); use performance_trace instead. The 'target' arg is accepted only for API symmetry; at most one trace is ever live per process.",
|
|
810
1048
|
"inputSchema": {
|
|
811
1049
|
"type": "object",
|
|
812
1050
|
"properties": {
|
|
1051
|
+
"lease": {
|
|
1052
|
+
"type": "string",
|
|
1053
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1054
|
+
},
|
|
813
1055
|
"target": {
|
|
814
1056
|
"type": "string",
|
|
815
1057
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -821,10 +1063,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
821
1063
|
},
|
|
822
1064
|
{
|
|
823
1065
|
"name": "performance_analyze_insight",
|
|
824
|
-
"description": "CDP-native approximation of the DevTools insight analyzer: read a trace JSON file (bare array or {traceEvents:[...]}) at the given tracePath and return headline metrics (FCP/LCP/CLS/TBT, long tasks, layout shifts). Requires an explicit tracePath returned by performance_trace/performance_stop_trace
|
|
1066
|
+
"description": "CDP-native approximation of the DevTools insight analyzer: read a trace JSON file (bare array or {traceEvents:[...]}) at the given tracePath and return headline metrics (FCP/LCP/CLS/TBT, long tasks, layout shifts). Requires an explicit tracePath returned by performance_trace/performance_stop_trace; there is no implicit 'latest trace'. Numbers approximate DevTools (no main-thread attribution or frame-scoped LCP).",
|
|
825
1067
|
"inputSchema": {
|
|
826
1068
|
"type": "object",
|
|
827
1069
|
"properties": {
|
|
1070
|
+
"lease": {
|
|
1071
|
+
"type": "string",
|
|
1072
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1073
|
+
},
|
|
828
1074
|
"tracePath": {
|
|
829
1075
|
"type": "string",
|
|
830
1076
|
"description": "Filesystem path to a trace JSON file written by performance_trace or performance_stop_trace (bare array OR {traceEvents:[...]}). Required."
|
|
@@ -836,10 +1082,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
836
1082
|
},
|
|
837
1083
|
{
|
|
838
1084
|
"name": "performance_trace",
|
|
839
|
-
"description": "PRIMARY one-shot trace: start tracing, optionally reload or navigate the page, wait durationMs (default 3000), end the trace, write the trace JSON under /tmp/cdp-toolkit, and return {path,bytes,events,metrics,target}. Holds one connection open for the whole window, so it is immune to the cross-process limitation of start/stop
|
|
1085
|
+
"description": "PRIMARY one-shot trace: start tracing, optionally reload or navigate the page, wait durationMs (default 3000), end the trace, write the trace JSON under /tmp/cdp-toolkit, and return {path,bytes,events,metrics,target}. Holds one connection open for the whole window, so it is immune to the cross-process limitation of start/stop, and it is the recommended entry point.",
|
|
840
1086
|
"inputSchema": {
|
|
841
1087
|
"type": "object",
|
|
842
1088
|
"properties": {
|
|
1089
|
+
"lease": {
|
|
1090
|
+
"type": "string",
|
|
1091
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1092
|
+
},
|
|
843
1093
|
"target": {
|
|
844
1094
|
"type": "string",
|
|
845
1095
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -874,6 +1124,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
874
1124
|
"inputSchema": {
|
|
875
1125
|
"type": "object",
|
|
876
1126
|
"properties": {
|
|
1127
|
+
"lease": {
|
|
1128
|
+
"type": "string",
|
|
1129
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1130
|
+
},
|
|
877
1131
|
"target": {
|
|
878
1132
|
"type": "string",
|
|
879
1133
|
"description": "Target page selector: 'active' (default) | 'index:N' | 'url:<substr>' | 'title:<substr>' | '<targetId>'."
|
|
@@ -893,9 +1147,13 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
893
1147
|
"inputSchema": {
|
|
894
1148
|
"type": "object",
|
|
895
1149
|
"properties": {
|
|
1150
|
+
"lease": {
|
|
1151
|
+
"type": "string",
|
|
1152
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1153
|
+
},
|
|
896
1154
|
"url": {
|
|
897
1155
|
"type": "string",
|
|
898
|
-
"description": "The URL to audit. Required
|
|
1156
|
+
"description": "The URL to audit. Required, and never points at a user tab implicitly."
|
|
899
1157
|
},
|
|
900
1158
|
"categories": {
|
|
901
1159
|
"type": "array",
|
|
@@ -929,10 +1187,14 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
929
1187
|
},
|
|
930
1188
|
{
|
|
931
1189
|
"name": "mock_request",
|
|
932
|
-
"description": "Register a mock rule on a target's persistent fake-backend session (CDP Fetch domain): intercept requests whose URL matches urlPattern and fulfill them with a canned response, fail (abort) them, or continue them
|
|
1190
|
+
"description": "Register a mock rule on a target's persistent fake-backend session (CDP Fetch domain): intercept requests whose URL matches urlPattern and fulfill them with a canned response, fail (abort) them, or continue them, optionally with fault injection (delayMs/failRate). The session survives reloads and navigations and lives until clear_mocks. Call repeatedly to mock several endpoints on the same target. Pass reload:true to apply immediately. Persistent across calls only via the MCP server (not the one-shot CLI).",
|
|
933
1191
|
"inputSchema": {
|
|
934
1192
|
"type": "object",
|
|
935
1193
|
"properties": {
|
|
1194
|
+
"lease": {
|
|
1195
|
+
"type": "string",
|
|
1196
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1197
|
+
},
|
|
936
1198
|
"target": {
|
|
937
1199
|
"type": "string",
|
|
938
1200
|
"description": "Target selector: active | index:N | url:<substr> | title:<substr> | <targetId>. Defaults to the active page."
|
|
@@ -999,6 +1261,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
999
1261
|
"inputSchema": {
|
|
1000
1262
|
"type": "object",
|
|
1001
1263
|
"properties": {
|
|
1264
|
+
"lease": {
|
|
1265
|
+
"type": "string",
|
|
1266
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1267
|
+
},
|
|
1002
1268
|
"target": {
|
|
1003
1269
|
"type": "string",
|
|
1004
1270
|
"description": "Unused filter placeholder; list_mocks returns all active sessions."
|
|
@@ -1014,6 +1280,10 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1014
1280
|
"inputSchema": {
|
|
1015
1281
|
"type": "object",
|
|
1016
1282
|
"properties": {
|
|
1283
|
+
"lease": {
|
|
1284
|
+
"type": "string",
|
|
1285
|
+
"description": "Opaque lease token from claim_page. Required only when the tab this call resolves to is leased by someone; omit it for unleased tabs, which behave exactly as before."
|
|
1286
|
+
},
|
|
1017
1287
|
"target": {
|
|
1018
1288
|
"type": "string",
|
|
1019
1289
|
"description": "Target selector whose mock session to clear. Defaults to the active page. Ignored when all:true."
|
|
@@ -1026,5 +1296,59 @@ export const MANIFEST: ToolSpec[] = [
|
|
|
1026
1296
|
"required": [],
|
|
1027
1297
|
"additionalProperties": false
|
|
1028
1298
|
}
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
"name": "claim_page",
|
|
1302
|
+
"description": "Take exclusive ownership of a browser tab and return an opaque lease token. With no targetId, opens a fresh tab (optionally at url) and claims it, so 'give me my own tab' is one call. Any later tool call against a leased tab must carry the matching token in its 'lease' argument or it is refused, naming the holder. The lease is reclaimable once its owning process dies, its ttlMs elapses without use, or its tab is closed. Refused from the CLI: a CLI invocation is one process per call, so its lease would be reclaimable immediately.",
|
|
1303
|
+
"inputSchema": {
|
|
1304
|
+
"type": "object",
|
|
1305
|
+
"properties": {
|
|
1306
|
+
"targetId": {
|
|
1307
|
+
"type": "string",
|
|
1308
|
+
"description": "Claim this already-open page target instead of opening a new tab. Must be an exact target id, not a selector."
|
|
1309
|
+
},
|
|
1310
|
+
"url": {
|
|
1311
|
+
"type": "string",
|
|
1312
|
+
"description": "When opening a fresh tab, navigate it here. Ignored when targetId is given."
|
|
1313
|
+
},
|
|
1314
|
+
"label": {
|
|
1315
|
+
"type": "string",
|
|
1316
|
+
"description": "Agent label recorded on the lease and surfaced in conflict errors and list_leases. Defaults to pid-<pid>."
|
|
1317
|
+
},
|
|
1318
|
+
"ttlMs": {
|
|
1319
|
+
"type": "number",
|
|
1320
|
+
"description": "How long the lease survives without use before it is reclaimable. Defaults to CDP_LEASE_TTL_MS, else 900000 (15 minutes). Every checked call refreshes it, so an active agent never expires."
|
|
1321
|
+
}
|
|
1322
|
+
},
|
|
1323
|
+
"required": [],
|
|
1324
|
+
"additionalProperties": false
|
|
1325
|
+
}
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"name": "release_page",
|
|
1329
|
+
"description": "Release a held lease, given its token. Idempotent: releasing an already-released, reclaimed, or expired lease reports released:false rather than erroring. Does not close the tab.",
|
|
1330
|
+
"inputSchema": {
|
|
1331
|
+
"type": "object",
|
|
1332
|
+
"properties": {
|
|
1333
|
+
"lease": {
|
|
1334
|
+
"type": "string",
|
|
1335
|
+
"description": "The opaque token claim_page (or new_page with claim:true) returned."
|
|
1336
|
+
}
|
|
1337
|
+
},
|
|
1338
|
+
"required": [
|
|
1339
|
+
"lease"
|
|
1340
|
+
],
|
|
1341
|
+
"additionalProperties": false
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
"name": "list_leases",
|
|
1346
|
+
"description": "Enumerate every active lease for diagnosis: backend, target id, agent label, pid, createdAt, lastUsedAt, ttlMs, whether the owning process is still alive, and whether the lease is reclaimable and why. Requires no token. Never returns the lease nonce, so this cannot be used to forge a token. A row for a lease file that could not be read or parsed instead carries `unreadable` (the errno, or \"unparseable\"), with label, pid, and the timestamp fields as zero placeholders and stale always false, since stale is what marks a lease free to take and an unreadable one must never read that way.",
|
|
1347
|
+
"inputSchema": {
|
|
1348
|
+
"type": "object",
|
|
1349
|
+
"properties": {},
|
|
1350
|
+
"required": [],
|
|
1351
|
+
"additionalProperties": false
|
|
1352
|
+
}
|
|
1029
1353
|
}
|
|
1030
1354
|
];
|