@capyclaw/browser-workbench 0.1.0 → 0.1.19
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 +29 -7
- package/contract/browser-contract.json +484 -25
- package/demo/form.html +27 -0
- package/lib/host.mjs +1 -68
- package/node_modules/@capyclaw/asset-service/README.md +48 -0
- package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/asset-service/package.json +59 -0
- package/node_modules/@capyclaw/asset-service/src/index.mjs +304 -0
- package/node_modules/@capyclaw/document-workbench/README.md +125 -0
- package/node_modules/@capyclaw/document-workbench/package.json +44 -0
- package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
- package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
- package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
- package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
- package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
- package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
- package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
- package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
- package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
- package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
- package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
- package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +103 -0
- package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
- package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
- package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
- package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
- package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
- package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
- package/{server/shared/state-service.mjs → node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs} +6 -97
- package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
- package/node_modules/@capyclaw/foundation/README.md +51 -0
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
- package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
- package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
- package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +120 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
- package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +115 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
- package/node_modules/@capyclaw/foundation/package.json +53 -0
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
- package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
- package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +58 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +57 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
- package/node_modules/@capyclaw/service-host/README.md +86 -0
- package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
- package/node_modules/@capyclaw/service-host/package.json +60 -0
- package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
- package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
- package/node_modules/@capyclaw/tool-host/README.md +56 -0
- package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
- package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
- package/node_modules/@capyclaw/tool-host/package.json +59 -0
- package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +166 -0
- package/node_modules/@capyclaw/tool-host/src/index.mjs +416 -0
- package/package.json +28 -12
- package/plugin.mjs +1 -0
- package/server/contract.mjs +3 -3
- package/server/embedded-host.mjs +247 -0
- package/server/engine.mjs +1906 -115
- package/server/governor.mjs +189 -0
- package/server/http-utils.mjs +1 -1
- package/server/human.mjs +628 -0
- package/server/infra/http.mjs +2 -113
- package/server/infra/tuning.mjs +2 -82
- package/server/input.mjs +154 -0
- package/server/login-vault.mjs +109 -0
- package/server/mcp/handler.mjs +1 -1
- package/server/mcp/instructions.mjs +5 -2
- package/server/orphans.mjs +163 -0
- package/server/relay.mjs +160 -188
- package/server/routes/api.mjs +126 -13
- package/server/routes/assets.mjs +1 -1
- package/server/session-engines.mjs +223 -0
- package/server/shared/SHARED_MANIFEST.json +47 -24
- package/server/shared/asset-service.mjs +2 -217
- package/server/shared/editor-host.mjs +2 -125
- package/server/shared/kit/editor/lease.mjs +2 -139
- package/server/shared/kit/service/api.mjs +2 -45
- package/server/shared/kit/service/http.mjs +2 -113
- package/server/shared/kit/service/mcp-http.mjs +2 -142
- package/server/shared/kit/tools/validate.mjs +2 -115
- package/server/shared/kit/tuning.mjs +2 -82
- package/server/shared/kit/util/fs-lock.mjs +2 -132
- package/server/shared/service-host.mjs +2 -511
- package/server/shared/tool-host.mjs +2 -341
- package/server/shared/tuning.mjs +2 -63
- package/server/tools/capabilities/contract.mjs +25 -5
- package/server/tools/capabilities/interaction.mjs +113 -9
- package/server/tools/capabilities/navigation.mjs +5 -2
- package/server/tools/capabilities/screenshot.mjs +25 -8
- package/server/tools/capabilities/session.mjs +13 -7
- package/server/tools/capabilities/snapshot.mjs +1 -1
- package/server/tools/capabilities/tabs.mjs +2 -2
- package/server/tools/kernel/define.mjs +1 -1
- package/server/tools/kernel/output.mjs +8 -0
- package/server/tools/kernel/ports.mjs +12 -7
- package/server/tools/kernel/registry.mjs +1 -1
- package/server/workbench-framework.mjs +305 -0
- package/ui/app.js +409 -119
- package/ui/index.html +29 -39
- package/ui/style.css +131 -63
- package/cordis.patch.yml +0 -25
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"contractVersion": "1.
|
|
3
|
-
"packageVersion": "0.1.
|
|
4
|
-
"toolCount":
|
|
2
|
+
"contractVersion": "1.3.0",
|
|
3
|
+
"packageVersion": "0.1.19",
|
|
4
|
+
"toolCount": 18,
|
|
5
5
|
"tools": [
|
|
6
6
|
{
|
|
7
7
|
"name": "browser_capabilities",
|
|
8
8
|
"kind": "read",
|
|
9
9
|
"since": "1.0.0",
|
|
10
10
|
"capability": "contract",
|
|
11
|
-
"description": "返回工作台契约版本、工具清单、能力清单与引擎状态。skill 加载后先调用一次;工具缺失或 major
|
|
11
|
+
"description": "返回工作台契约版本、工具清单、能力清单与引擎状态。skill 加载后先调用一次;工具缺失或 major 版本不一致时停止并提示升级。默认紧凑模式(只给名字/状态,省 token);需要能力描述与 tags 时传 detail=\"full\"。",
|
|
12
12
|
"inputSchema": {
|
|
13
13
|
"type": "object",
|
|
14
|
-
"properties": {
|
|
14
|
+
"properties": {
|
|
15
|
+
"detail": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": [
|
|
18
|
+
"compact",
|
|
19
|
+
"full"
|
|
20
|
+
],
|
|
21
|
+
"description": "报告详细度,默认 compact"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
15
24
|
"additionalProperties": false
|
|
16
25
|
}
|
|
17
26
|
},
|
|
@@ -20,7 +29,7 @@
|
|
|
20
29
|
"kind": "write",
|
|
21
30
|
"since": "1.0.0",
|
|
22
31
|
"capability": "navigation",
|
|
23
|
-
"description": "打开网址(仅 http/https;URL 内嵌用户名密码会被拒绝)。首次调用会自动拉起浏览器(默认有头可见,登录态持久化)。返回新页面的元素快照,后续动作直接引用其中的 ref
|
|
32
|
+
"description": "打开网址(仅 http/https;URL 内嵌用户名密码会被拒绝)。首次调用会自动拉起浏览器(默认有头可见,登录态持久化)。返回新页面的元素快照,后续动作直接引用其中的 ref。导航超时会返回当前已渲染的快照并标注 [NAV_TIMEOUT],不是空错误。",
|
|
24
33
|
"inputSchema": {
|
|
25
34
|
"type": "object",
|
|
26
35
|
"properties": {
|
|
@@ -64,14 +73,84 @@
|
|
|
64
73
|
"kind": "write",
|
|
65
74
|
"since": "1.0.0",
|
|
66
75
|
"capability": "interaction",
|
|
67
|
-
"description": "点击元素。ref
|
|
76
|
+
"description": "点击元素。ref 来自最近一次快照(首选);快照里没有的元素(无 role 的 div 按钮等)用 selector 或 text 兜底。元素已变化时报 STALE_SNAPSHOT,重新快照后用新 ref。动作成功后返回新快照。",
|
|
68
77
|
"inputSchema": {
|
|
69
78
|
"type": "object",
|
|
70
79
|
"properties": {
|
|
71
80
|
"ref": {
|
|
72
81
|
"type": "string",
|
|
73
82
|
"maxLength": 16,
|
|
74
|
-
"description": "快照里的元素引用,如 e5"
|
|
83
|
+
"description": "快照里的元素引用,如 e5(首选)"
|
|
84
|
+
},
|
|
85
|
+
"selector": {
|
|
86
|
+
"type": "string",
|
|
87
|
+
"maxLength": 300,
|
|
88
|
+
"description": "CSS 选择器兜底,如 .next-btn"
|
|
89
|
+
},
|
|
90
|
+
"text": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"maxLength": 120,
|
|
93
|
+
"description": "可见文案兜底,如「下一步」"
|
|
94
|
+
},
|
|
95
|
+
"tab": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"maxLength": 16,
|
|
98
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"name": "browser_drag",
|
|
106
|
+
"kind": "write",
|
|
107
|
+
"since": "1.2.0",
|
|
108
|
+
"capability": "interaction",
|
|
109
|
+
"description": "拖拽:滑块验证、拖放排序。起点可以给 ref / selector / text;终点给 toRef / toSelector / toText,或直接用 dx/dy 相对位移(滑块常用 dx)。内部按多步轨迹移动再松手,比一步到位更像人。成功后返回新快照。",
|
|
110
|
+
"inputSchema": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"properties": {
|
|
113
|
+
"ref": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"maxLength": 16,
|
|
116
|
+
"description": "起点 ref(首选)"
|
|
117
|
+
},
|
|
118
|
+
"selector": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"maxLength": 300,
|
|
121
|
+
"description": "起点 CSS 选择器兜底"
|
|
122
|
+
},
|
|
123
|
+
"text": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"maxLength": 120,
|
|
126
|
+
"description": "起点可见文案兜底"
|
|
127
|
+
},
|
|
128
|
+
"toRef": {
|
|
129
|
+
"type": "string",
|
|
130
|
+
"maxLength": 16,
|
|
131
|
+
"description": "终点 ref"
|
|
132
|
+
},
|
|
133
|
+
"toSelector": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"maxLength": 300,
|
|
136
|
+
"description": "终点 CSS 选择器"
|
|
137
|
+
},
|
|
138
|
+
"toText": {
|
|
139
|
+
"type": "string",
|
|
140
|
+
"maxLength": 120,
|
|
141
|
+
"description": "终点可见文案"
|
|
142
|
+
},
|
|
143
|
+
"dx": {
|
|
144
|
+
"type": "number",
|
|
145
|
+
"description": "相对起点的横向位移(滑块向右为正)"
|
|
146
|
+
},
|
|
147
|
+
"dy": {
|
|
148
|
+
"type": "number",
|
|
149
|
+
"description": "相对起点的纵向位移"
|
|
150
|
+
},
|
|
151
|
+
"steps": {
|
|
152
|
+
"type": "number",
|
|
153
|
+
"description": "轨迹分几步(默认 24,越大越平滑)"
|
|
75
154
|
},
|
|
76
155
|
"tab": {
|
|
77
156
|
"type": "string",
|
|
@@ -79,9 +158,6 @@
|
|
|
79
158
|
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
80
159
|
}
|
|
81
160
|
},
|
|
82
|
-
"required": [
|
|
83
|
-
"ref"
|
|
84
|
-
],
|
|
85
161
|
"additionalProperties": false
|
|
86
162
|
}
|
|
87
163
|
},
|
|
@@ -184,6 +260,46 @@
|
|
|
184
260
|
"additionalProperties": false
|
|
185
261
|
}
|
|
186
262
|
},
|
|
263
|
+
{
|
|
264
|
+
"name": "browser_upload",
|
|
265
|
+
"kind": "write",
|
|
266
|
+
"since": "1.3.0",
|
|
267
|
+
"capability": "interaction",
|
|
268
|
+
"description": "给文件上传控件(<input type=\"file\">)设置本机文件。ref/selector 定位上传控件;files 是本机绝对路径数组(可多选),空数组=清空已选。闭环里 ppt 等套件产出的文件先物化成本机路径再传这里。成功后返回新快照。",
|
|
269
|
+
"inputSchema": {
|
|
270
|
+
"type": "object",
|
|
271
|
+
"properties": {
|
|
272
|
+
"ref": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"maxLength": 16,
|
|
275
|
+
"description": "上传控件的 ref(首选)"
|
|
276
|
+
},
|
|
277
|
+
"selector": {
|
|
278
|
+
"type": "string",
|
|
279
|
+
"maxLength": 300,
|
|
280
|
+
"description": "CSS 选择器兜底,如 input[type=file]"
|
|
281
|
+
},
|
|
282
|
+
"files": {
|
|
283
|
+
"type": "array",
|
|
284
|
+
"items": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"maxLength": 1000
|
|
287
|
+
},
|
|
288
|
+
"maxItems": 20,
|
|
289
|
+
"description": "本机绝对路径数组;空数组=清空已选"
|
|
290
|
+
},
|
|
291
|
+
"tab": {
|
|
292
|
+
"type": "string",
|
|
293
|
+
"maxLength": 16,
|
|
294
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
"required": [
|
|
298
|
+
"files"
|
|
299
|
+
],
|
|
300
|
+
"additionalProperties": false
|
|
301
|
+
}
|
|
302
|
+
},
|
|
187
303
|
{
|
|
188
304
|
"name": "browser_scroll",
|
|
189
305
|
"kind": "write",
|
|
@@ -214,6 +330,121 @@
|
|
|
214
330
|
"additionalProperties": false
|
|
215
331
|
}
|
|
216
332
|
},
|
|
333
|
+
{
|
|
334
|
+
"name": "browser_act",
|
|
335
|
+
"kind": "write",
|
|
336
|
+
"since": "1.1.0",
|
|
337
|
+
"capability": "interaction",
|
|
338
|
+
"description": "把同一页面上多个不跳转的动作打包成一次调用(最多 10 步),只返回一份最终快照——替代「一步一次往返」,每条消息省下多次模型往返。典型:填账号 + 填密码 + 勾选协议 + 选城市 + 拖滑块。注意:会跳转或整页重排的动作(提交、下单、翻页)放最后一步或单独调用;中途不重拍快照,ref 沿用打包前的快照。失败会停在该步并给出原因,仍返回最新快照。",
|
|
339
|
+
"inputSchema": {
|
|
340
|
+
"type": "object",
|
|
341
|
+
"properties": {
|
|
342
|
+
"steps": {
|
|
343
|
+
"type": "array",
|
|
344
|
+
"maxItems": 10,
|
|
345
|
+
"description": "按顺序执行的动作列表",
|
|
346
|
+
"items": {
|
|
347
|
+
"type": "object",
|
|
348
|
+
"properties": {
|
|
349
|
+
"op": {
|
|
350
|
+
"type": "string",
|
|
351
|
+
"enum": [
|
|
352
|
+
"click",
|
|
353
|
+
"fill",
|
|
354
|
+
"press",
|
|
355
|
+
"select",
|
|
356
|
+
"drag",
|
|
357
|
+
"scroll",
|
|
358
|
+
"wait"
|
|
359
|
+
],
|
|
360
|
+
"description": "动作类型"
|
|
361
|
+
},
|
|
362
|
+
"ref": {
|
|
363
|
+
"type": "string",
|
|
364
|
+
"maxLength": 16,
|
|
365
|
+
"description": "目标 ref(click/fill/press/select/drag 的起点)"
|
|
366
|
+
},
|
|
367
|
+
"selector": {
|
|
368
|
+
"type": "string",
|
|
369
|
+
"maxLength": 300,
|
|
370
|
+
"description": "click/fill/press 的 CSS 兜底;wait 时是等待的选择器"
|
|
371
|
+
},
|
|
372
|
+
"text": {
|
|
373
|
+
"type": "string",
|
|
374
|
+
"maxLength": 10000,
|
|
375
|
+
"description": "fill 的文字;click 时是目标文案"
|
|
376
|
+
},
|
|
377
|
+
"submit": {
|
|
378
|
+
"type": "boolean",
|
|
379
|
+
"description": "fill 之后回车提交"
|
|
380
|
+
},
|
|
381
|
+
"key": {
|
|
382
|
+
"type": "string",
|
|
383
|
+
"maxLength": 40,
|
|
384
|
+
"description": "press 的键名,如 Enter / Tab"
|
|
385
|
+
},
|
|
386
|
+
"value": {
|
|
387
|
+
"type": "string",
|
|
388
|
+
"maxLength": 300,
|
|
389
|
+
"description": "select 的选项 value 或文本"
|
|
390
|
+
},
|
|
391
|
+
"toRef": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"maxLength": 16,
|
|
394
|
+
"description": "drag 的终点 ref"
|
|
395
|
+
},
|
|
396
|
+
"toSelector": {
|
|
397
|
+
"type": "string",
|
|
398
|
+
"maxLength": 300,
|
|
399
|
+
"description": "drag 的终点选择器"
|
|
400
|
+
},
|
|
401
|
+
"dx": {
|
|
402
|
+
"type": "number",
|
|
403
|
+
"description": "drag 的相对横向位移(滑块向右为正)"
|
|
404
|
+
},
|
|
405
|
+
"dy": {
|
|
406
|
+
"type": "number",
|
|
407
|
+
"description": "drag 的相对纵向位移"
|
|
408
|
+
},
|
|
409
|
+
"direction": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"enum": [
|
|
412
|
+
"up",
|
|
413
|
+
"down"
|
|
414
|
+
],
|
|
415
|
+
"description": "scroll 方向"
|
|
416
|
+
},
|
|
417
|
+
"amount": {
|
|
418
|
+
"type": "number",
|
|
419
|
+
"description": "scroll 像素数(默认 600)"
|
|
420
|
+
},
|
|
421
|
+
"ms": {
|
|
422
|
+
"type": "number",
|
|
423
|
+
"description": "wait 毫秒数"
|
|
424
|
+
}
|
|
425
|
+
},
|
|
426
|
+
"required": [
|
|
427
|
+
"op"
|
|
428
|
+
],
|
|
429
|
+
"additionalProperties": false
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"stopOnError": {
|
|
433
|
+
"type": "boolean",
|
|
434
|
+
"description": "某步失败后是否停止(默认 true)"
|
|
435
|
+
},
|
|
436
|
+
"tab": {
|
|
437
|
+
"type": "string",
|
|
438
|
+
"maxLength": 16,
|
|
439
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
"required": [
|
|
443
|
+
"steps"
|
|
444
|
+
],
|
|
445
|
+
"additionalProperties": false
|
|
446
|
+
}
|
|
447
|
+
},
|
|
217
448
|
{
|
|
218
449
|
"name": "browser_tabs",
|
|
219
450
|
"kind": "control",
|
|
@@ -252,7 +483,7 @@
|
|
|
252
483
|
"kind": "read",
|
|
253
484
|
"since": "1.0.0",
|
|
254
485
|
"capability": "screenshot",
|
|
255
|
-
"description": "
|
|
486
|
+
"description": "当前页面截图,图片直接返回给你看(PNG,同时落盘并给出路径);不要再调 read_image 去读它。默认视口截图;fullPage=true 截整页。工作台地址可实时观察页面。",
|
|
256
487
|
"inputSchema": {
|
|
257
488
|
"type": "object",
|
|
258
489
|
"properties": {
|
|
@@ -286,7 +517,7 @@
|
|
|
286
517
|
"kind": "control",
|
|
287
518
|
"since": "1.0.0",
|
|
288
519
|
"capability": "session",
|
|
289
|
-
"description": "
|
|
520
|
+
"description": "等待指定条件后返回**等待后的新快照**(不用再单独 browser_snapshot)。selector=等元素出现(首选,如 .result),ms=固定毫秒(上限 30000),都不给=等页面 load 完成。",
|
|
290
521
|
"inputSchema": {
|
|
291
522
|
"type": "object",
|
|
292
523
|
"properties": {
|
|
@@ -340,7 +571,7 @@
|
|
|
340
571
|
"kind": "control",
|
|
341
572
|
"since": "1.0.0",
|
|
342
573
|
"capability": "session",
|
|
343
|
-
"description": "
|
|
574
|
+
"description": "关闭浏览器(所有标签页)并清空标签页记录——这是一次显式重置:登录态保留在 profile,但下次 navigate 是干净浏览器(不恢复旧标签)。空闲回收/服务重启则会自动恢复上次标签页。任务结束或页面卡死时用它重置。",
|
|
344
575
|
"inputSchema": {
|
|
345
576
|
"type": "object",
|
|
346
577
|
"properties": {},
|
|
@@ -404,10 +635,19 @@
|
|
|
404
635
|
"tools": [
|
|
405
636
|
{
|
|
406
637
|
"name": "browser_capabilities",
|
|
407
|
-
"description": "返回工作台契约版本、工具清单、能力清单与引擎状态。skill 加载后先调用一次;工具缺失或 major
|
|
638
|
+
"description": "返回工作台契约版本、工具清单、能力清单与引擎状态。skill 加载后先调用一次;工具缺失或 major 版本不一致时停止并提示升级。默认紧凑模式(只给名字/状态,省 token);需要能力描述与 tags 时传 detail=\"full\"。",
|
|
408
639
|
"inputSchema": {
|
|
409
640
|
"type": "object",
|
|
410
|
-
"properties": {
|
|
641
|
+
"properties": {
|
|
642
|
+
"detail": {
|
|
643
|
+
"type": "string",
|
|
644
|
+
"enum": [
|
|
645
|
+
"compact",
|
|
646
|
+
"full"
|
|
647
|
+
],
|
|
648
|
+
"description": "报告详细度,默认 compact"
|
|
649
|
+
}
|
|
650
|
+
},
|
|
411
651
|
"additionalProperties": false
|
|
412
652
|
},
|
|
413
653
|
"kind": "read",
|
|
@@ -433,7 +673,7 @@
|
|
|
433
673
|
"tools": [
|
|
434
674
|
{
|
|
435
675
|
"name": "browser_navigate",
|
|
436
|
-
"description": "打开网址(仅 http/https;URL 内嵌用户名密码会被拒绝)。首次调用会自动拉起浏览器(默认有头可见,登录态持久化)。返回新页面的元素快照,后续动作直接引用其中的 ref
|
|
676
|
+
"description": "打开网址(仅 http/https;URL 内嵌用户名密码会被拒绝)。首次调用会自动拉起浏览器(默认有头可见,登录态持久化)。返回新页面的元素快照,后续动作直接引用其中的 ref。导航超时会返回当前已渲染的快照并标注 [NAV_TIMEOUT],不是空错误。",
|
|
437
677
|
"inputSchema": {
|
|
438
678
|
"type": "object",
|
|
439
679
|
"properties": {
|
|
@@ -511,14 +751,24 @@
|
|
|
511
751
|
"tools": [
|
|
512
752
|
{
|
|
513
753
|
"name": "browser_click",
|
|
514
|
-
"description": "点击元素。ref
|
|
754
|
+
"description": "点击元素。ref 来自最近一次快照(首选);快照里没有的元素(无 role 的 div 按钮等)用 selector 或 text 兜底。元素已变化时报 STALE_SNAPSHOT,重新快照后用新 ref。动作成功后返回新快照。",
|
|
515
755
|
"inputSchema": {
|
|
516
756
|
"type": "object",
|
|
517
757
|
"properties": {
|
|
518
758
|
"ref": {
|
|
519
759
|
"type": "string",
|
|
520
760
|
"maxLength": 16,
|
|
521
|
-
"description": "快照里的元素引用,如 e5"
|
|
761
|
+
"description": "快照里的元素引用,如 e5(首选)"
|
|
762
|
+
},
|
|
763
|
+
"selector": {
|
|
764
|
+
"type": "string",
|
|
765
|
+
"maxLength": 300,
|
|
766
|
+
"description": "CSS 选择器兜底,如 .next-btn"
|
|
767
|
+
},
|
|
768
|
+
"text": {
|
|
769
|
+
"type": "string",
|
|
770
|
+
"maxLength": 120,
|
|
771
|
+
"description": "可见文案兜底,如「下一步」"
|
|
522
772
|
},
|
|
523
773
|
"tab": {
|
|
524
774
|
"type": "string",
|
|
@@ -526,14 +776,70 @@
|
|
|
526
776
|
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
527
777
|
}
|
|
528
778
|
},
|
|
529
|
-
"required": [
|
|
530
|
-
"ref"
|
|
531
|
-
],
|
|
532
779
|
"additionalProperties": false
|
|
533
780
|
},
|
|
534
781
|
"kind": "write",
|
|
535
782
|
"since": "1.0.0"
|
|
536
783
|
},
|
|
784
|
+
{
|
|
785
|
+
"name": "browser_drag",
|
|
786
|
+
"description": "拖拽:滑块验证、拖放排序。起点可以给 ref / selector / text;终点给 toRef / toSelector / toText,或直接用 dx/dy 相对位移(滑块常用 dx)。内部按多步轨迹移动再松手,比一步到位更像人。成功后返回新快照。",
|
|
787
|
+
"inputSchema": {
|
|
788
|
+
"type": "object",
|
|
789
|
+
"properties": {
|
|
790
|
+
"ref": {
|
|
791
|
+
"type": "string",
|
|
792
|
+
"maxLength": 16,
|
|
793
|
+
"description": "起点 ref(首选)"
|
|
794
|
+
},
|
|
795
|
+
"selector": {
|
|
796
|
+
"type": "string",
|
|
797
|
+
"maxLength": 300,
|
|
798
|
+
"description": "起点 CSS 选择器兜底"
|
|
799
|
+
},
|
|
800
|
+
"text": {
|
|
801
|
+
"type": "string",
|
|
802
|
+
"maxLength": 120,
|
|
803
|
+
"description": "起点可见文案兜底"
|
|
804
|
+
},
|
|
805
|
+
"toRef": {
|
|
806
|
+
"type": "string",
|
|
807
|
+
"maxLength": 16,
|
|
808
|
+
"description": "终点 ref"
|
|
809
|
+
},
|
|
810
|
+
"toSelector": {
|
|
811
|
+
"type": "string",
|
|
812
|
+
"maxLength": 300,
|
|
813
|
+
"description": "终点 CSS 选择器"
|
|
814
|
+
},
|
|
815
|
+
"toText": {
|
|
816
|
+
"type": "string",
|
|
817
|
+
"maxLength": 120,
|
|
818
|
+
"description": "终点可见文案"
|
|
819
|
+
},
|
|
820
|
+
"dx": {
|
|
821
|
+
"type": "number",
|
|
822
|
+
"description": "相对起点的横向位移(滑块向右为正)"
|
|
823
|
+
},
|
|
824
|
+
"dy": {
|
|
825
|
+
"type": "number",
|
|
826
|
+
"description": "相对起点的纵向位移"
|
|
827
|
+
},
|
|
828
|
+
"steps": {
|
|
829
|
+
"type": "number",
|
|
830
|
+
"description": "轨迹分几步(默认 24,越大越平滑)"
|
|
831
|
+
},
|
|
832
|
+
"tab": {
|
|
833
|
+
"type": "string",
|
|
834
|
+
"maxLength": 16,
|
|
835
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
"additionalProperties": false
|
|
839
|
+
},
|
|
840
|
+
"kind": "write",
|
|
841
|
+
"since": "1.2.0"
|
|
842
|
+
},
|
|
537
843
|
{
|
|
538
844
|
"name": "browser_fill",
|
|
539
845
|
"description": "在输入框/文本域填写文字(整体替换,兼容 React/Vue 受控输入)。submit=true 时填写后按回车提交。密码框会被快照掩码显示,但填写不受影响。",
|
|
@@ -630,6 +936,45 @@
|
|
|
630
936
|
"kind": "write",
|
|
631
937
|
"since": "1.0.0"
|
|
632
938
|
},
|
|
939
|
+
{
|
|
940
|
+
"name": "browser_upload",
|
|
941
|
+
"description": "给文件上传控件(<input type=\"file\">)设置本机文件。ref/selector 定位上传控件;files 是本机绝对路径数组(可多选),空数组=清空已选。闭环里 ppt 等套件产出的文件先物化成本机路径再传这里。成功后返回新快照。",
|
|
942
|
+
"inputSchema": {
|
|
943
|
+
"type": "object",
|
|
944
|
+
"properties": {
|
|
945
|
+
"ref": {
|
|
946
|
+
"type": "string",
|
|
947
|
+
"maxLength": 16,
|
|
948
|
+
"description": "上传控件的 ref(首选)"
|
|
949
|
+
},
|
|
950
|
+
"selector": {
|
|
951
|
+
"type": "string",
|
|
952
|
+
"maxLength": 300,
|
|
953
|
+
"description": "CSS 选择器兜底,如 input[type=file]"
|
|
954
|
+
},
|
|
955
|
+
"files": {
|
|
956
|
+
"type": "array",
|
|
957
|
+
"items": {
|
|
958
|
+
"type": "string",
|
|
959
|
+
"maxLength": 1000
|
|
960
|
+
},
|
|
961
|
+
"maxItems": 20,
|
|
962
|
+
"description": "本机绝对路径数组;空数组=清空已选"
|
|
963
|
+
},
|
|
964
|
+
"tab": {
|
|
965
|
+
"type": "string",
|
|
966
|
+
"maxLength": 16,
|
|
967
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
968
|
+
}
|
|
969
|
+
},
|
|
970
|
+
"required": [
|
|
971
|
+
"files"
|
|
972
|
+
],
|
|
973
|
+
"additionalProperties": false
|
|
974
|
+
},
|
|
975
|
+
"kind": "write",
|
|
976
|
+
"since": "1.3.0"
|
|
977
|
+
},
|
|
633
978
|
{
|
|
634
979
|
"name": "browser_scroll",
|
|
635
980
|
"description": "滚动当前页面(默认向下 600px)。懒加载页面翻内容用它。",
|
|
@@ -658,6 +1003,120 @@
|
|
|
658
1003
|
},
|
|
659
1004
|
"kind": "write",
|
|
660
1005
|
"since": "1.0.0"
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
"name": "browser_act",
|
|
1009
|
+
"description": "把同一页面上多个不跳转的动作打包成一次调用(最多 10 步),只返回一份最终快照——替代「一步一次往返」,每条消息省下多次模型往返。典型:填账号 + 填密码 + 勾选协议 + 选城市 + 拖滑块。注意:会跳转或整页重排的动作(提交、下单、翻页)放最后一步或单独调用;中途不重拍快照,ref 沿用打包前的快照。失败会停在该步并给出原因,仍返回最新快照。",
|
|
1010
|
+
"inputSchema": {
|
|
1011
|
+
"type": "object",
|
|
1012
|
+
"properties": {
|
|
1013
|
+
"steps": {
|
|
1014
|
+
"type": "array",
|
|
1015
|
+
"maxItems": 10,
|
|
1016
|
+
"description": "按顺序执行的动作列表",
|
|
1017
|
+
"items": {
|
|
1018
|
+
"type": "object",
|
|
1019
|
+
"properties": {
|
|
1020
|
+
"op": {
|
|
1021
|
+
"type": "string",
|
|
1022
|
+
"enum": [
|
|
1023
|
+
"click",
|
|
1024
|
+
"fill",
|
|
1025
|
+
"press",
|
|
1026
|
+
"select",
|
|
1027
|
+
"drag",
|
|
1028
|
+
"scroll",
|
|
1029
|
+
"wait"
|
|
1030
|
+
],
|
|
1031
|
+
"description": "动作类型"
|
|
1032
|
+
},
|
|
1033
|
+
"ref": {
|
|
1034
|
+
"type": "string",
|
|
1035
|
+
"maxLength": 16,
|
|
1036
|
+
"description": "目标 ref(click/fill/press/select/drag 的起点)"
|
|
1037
|
+
},
|
|
1038
|
+
"selector": {
|
|
1039
|
+
"type": "string",
|
|
1040
|
+
"maxLength": 300,
|
|
1041
|
+
"description": "click/fill/press 的 CSS 兜底;wait 时是等待的选择器"
|
|
1042
|
+
},
|
|
1043
|
+
"text": {
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"maxLength": 10000,
|
|
1046
|
+
"description": "fill 的文字;click 时是目标文案"
|
|
1047
|
+
},
|
|
1048
|
+
"submit": {
|
|
1049
|
+
"type": "boolean",
|
|
1050
|
+
"description": "fill 之后回车提交"
|
|
1051
|
+
},
|
|
1052
|
+
"key": {
|
|
1053
|
+
"type": "string",
|
|
1054
|
+
"maxLength": 40,
|
|
1055
|
+
"description": "press 的键名,如 Enter / Tab"
|
|
1056
|
+
},
|
|
1057
|
+
"value": {
|
|
1058
|
+
"type": "string",
|
|
1059
|
+
"maxLength": 300,
|
|
1060
|
+
"description": "select 的选项 value 或文本"
|
|
1061
|
+
},
|
|
1062
|
+
"toRef": {
|
|
1063
|
+
"type": "string",
|
|
1064
|
+
"maxLength": 16,
|
|
1065
|
+
"description": "drag 的终点 ref"
|
|
1066
|
+
},
|
|
1067
|
+
"toSelector": {
|
|
1068
|
+
"type": "string",
|
|
1069
|
+
"maxLength": 300,
|
|
1070
|
+
"description": "drag 的终点选择器"
|
|
1071
|
+
},
|
|
1072
|
+
"dx": {
|
|
1073
|
+
"type": "number",
|
|
1074
|
+
"description": "drag 的相对横向位移(滑块向右为正)"
|
|
1075
|
+
},
|
|
1076
|
+
"dy": {
|
|
1077
|
+
"type": "number",
|
|
1078
|
+
"description": "drag 的相对纵向位移"
|
|
1079
|
+
},
|
|
1080
|
+
"direction": {
|
|
1081
|
+
"type": "string",
|
|
1082
|
+
"enum": [
|
|
1083
|
+
"up",
|
|
1084
|
+
"down"
|
|
1085
|
+
],
|
|
1086
|
+
"description": "scroll 方向"
|
|
1087
|
+
},
|
|
1088
|
+
"amount": {
|
|
1089
|
+
"type": "number",
|
|
1090
|
+
"description": "scroll 像素数(默认 600)"
|
|
1091
|
+
},
|
|
1092
|
+
"ms": {
|
|
1093
|
+
"type": "number",
|
|
1094
|
+
"description": "wait 毫秒数"
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
"required": [
|
|
1098
|
+
"op"
|
|
1099
|
+
],
|
|
1100
|
+
"additionalProperties": false
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
"stopOnError": {
|
|
1104
|
+
"type": "boolean",
|
|
1105
|
+
"description": "某步失败后是否停止(默认 true)"
|
|
1106
|
+
},
|
|
1107
|
+
"tab": {
|
|
1108
|
+
"type": "string",
|
|
1109
|
+
"maxLength": 16,
|
|
1110
|
+
"description": "目标标签页 id(缺省=当前活动标签页)"
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
"required": [
|
|
1114
|
+
"steps"
|
|
1115
|
+
],
|
|
1116
|
+
"additionalProperties": false
|
|
1117
|
+
},
|
|
1118
|
+
"kind": "write",
|
|
1119
|
+
"since": "1.1.0"
|
|
661
1120
|
}
|
|
662
1121
|
]
|
|
663
1122
|
},
|
|
@@ -730,7 +1189,7 @@
|
|
|
730
1189
|
"tools": [
|
|
731
1190
|
{
|
|
732
1191
|
"name": "browser_screenshot",
|
|
733
|
-
"description": "
|
|
1192
|
+
"description": "当前页面截图,图片直接返回给你看(PNG,同时落盘并给出路径);不要再调 read_image 去读它。默认视口截图;fullPage=true 截整页。工作台地址可实时观察页面。",
|
|
734
1193
|
"inputSchema": {
|
|
735
1194
|
"type": "object",
|
|
736
1195
|
"properties": {
|
|
@@ -780,7 +1239,7 @@
|
|
|
780
1239
|
},
|
|
781
1240
|
{
|
|
782
1241
|
"name": "browser_wait",
|
|
783
|
-
"description": "
|
|
1242
|
+
"description": "等待指定条件后返回**等待后的新快照**(不用再单独 browser_snapshot)。selector=等元素出现(首选,如 .result),ms=固定毫秒(上限 30000),都不给=等页面 load 完成。",
|
|
784
1243
|
"inputSchema": {
|
|
785
1244
|
"type": "object",
|
|
786
1245
|
"properties": {
|
|
@@ -832,7 +1291,7 @@
|
|
|
832
1291
|
},
|
|
833
1292
|
{
|
|
834
1293
|
"name": "browser_close",
|
|
835
|
-
"description": "
|
|
1294
|
+
"description": "关闭浏览器(所有标签页)并清空标签页记录——这是一次显式重置:登录态保留在 profile,但下次 navigate 是干净浏览器(不恢复旧标签)。空闲回收/服务重启则会自动恢复上次标签页。任务结束或页面卡死时用它重置。",
|
|
836
1295
|
"inputSchema": {
|
|
837
1296
|
"type": "object",
|
|
838
1297
|
"properties": {},
|