kimi-webbridge-dsh 1.4.10 → 1.4.11
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 +1 -1
- package/lib/index.js +2 -2
- package/package.json +1 -1
- package/scripts/fetch-upstream-skill.mjs +3 -3
- package/skill/README.md +1 -1
- package/skill/SKILL.md +10 -6
- package/skill/UPSTREAM.json +7 -7
package/README.md
CHANGED
package/lib/index.js
CHANGED
|
@@ -514,12 +514,12 @@ function apply(ctx, config = {}) {
|
|
|
514
514
|
ctx.systemPrompt.section({
|
|
515
515
|
name: "tool:kimi-webbridge",
|
|
516
516
|
order: 105,
|
|
517
|
-
text: "kimi-webbridge: the local kimi-webbridge daemon (127.0.0.1:10086) bridges to the user's real browser with their login sessions; this plugin provisions the daemon binary, keeps it running, and registers the official upstream skill package (with its references/ directory). The `kimi_webbridge` tool is only the status health check (daemon + extension + installed skill copies). For any browser work — navigation, reading pages and iframes, clicking, typing, form filling, trusted input via CDP focus emulation, screenshots, JS/CDP, network capture, uploads, PDF export, tabs and sessions, and building a reusable CLI for a website — load the kimi-webbridge skill and drive the daemon over HTTP exactly as that skill (and its references) documents."
|
|
517
|
+
text: "kimi-webbridge: the local kimi-webbridge daemon (127.0.0.1:10086) bridges to the user's real browser with their login sessions; this plugin provisions the daemon binary, keeps it running, and registers the official upstream skill package (with its references/ directory). The `kimi_webbridge` tool is only the status health check (daemon + extension + installed skill copies). For any browser work — navigation, reading pages and iframes, clicking, typing, form filling, trusted input via CDP focus emulation, screenshots, JS/CDP, network capture, uploads, PDF export, tabs and sessions, attaching tabs the user already has open, and building a reusable CLI for a website — load the kimi-webbridge skill and drive the daemon over HTTP exactly as that skill (and its references) documents."
|
|
518
518
|
});
|
|
519
519
|
|
|
520
520
|
ctx.tools.register(defineTool({
|
|
521
521
|
name: "kimi_webbridge",
|
|
522
|
-
description: "Health check for the local kimi-webbridge bridge (daemon at " + baseUrl + " and the browser extension). The plugin auto-provisions the daemon: it installs the binary from the official Kimi CDN when missing and starts it, then retries once. Returns daemon version/uptime, extension_connected, plus version (daemon) and extension_version (extension) — a mismatch means the components have drifted (the extension likely auto-updated) — and the upstream notices skills, version_mismatch, update_available and skill_mismatch. This tool does NOT perform browser actions — for navigation, reading pages and iframes, clicking, typing, screenshots, JS/CDP, trusted input, network capture, uploads, PDF export, tabs/sessions, or building a reusable CLI for a website, load the kimi-webbridge skill, which documents the daemon's tool protocol (POST " + baseUrl + "/command) and ships its references/ alongside.",
|
|
522
|
+
description: "Health check for the local kimi-webbridge bridge (daemon at " + baseUrl + " and the browser extension). The plugin auto-provisions the daemon: it installs the binary from the official Kimi CDN when missing and starts it, then retries once. Returns daemon version/uptime, extension_connected, plus version (daemon) and extension_version (extension) — a mismatch means the components have drifted (the extension likely auto-updated) — and the upstream notices skills, version_mismatch, update_available and skill_mismatch. This tool does NOT perform browser actions — for navigation, reading pages and iframes, clicking, typing, screenshots, JS/CDP, trusted input, network capture, uploads, PDF export, tabs/sessions, attaching tabs the user already has open, or building a reusable CLI for a website, load the kimi-webbridge skill, which documents the daemon's tool protocol (POST " + baseUrl + "/command) and ships its references/ alongside.",
|
|
523
523
|
parameters: {
|
|
524
524
|
action: {
|
|
525
525
|
type: "string",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kimi-webbridge-dsh",
|
|
3
3
|
"description": "Infrastructure plugin for dsh: provisions the kimi-webbridge daemon (auto-install with SHA-256 verification, auto-start) and registers the official upstream skill package (SKILL.md + references/, vendored from the CDN and digest-pinned) as a runtime skill. Registers a thin kimi_webbridge tool (status health check only).",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.11",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* Usage:
|
|
17
17
|
* node scripts/fetch-upstream-skill.mjs # fetch latest, rewrite skill/
|
|
18
|
-
* node scripts/fetch-upstream-skill.mjs --version v2.0.
|
|
18
|
+
* node scripts/fetch-upstream-skill.mjs --version v2.0.23
|
|
19
19
|
* node scripts/fetch-upstream-skill.mjs --check # fetch and compare, never write
|
|
20
20
|
* node scripts/fetch-upstream-skill.mjs --verify-local # no network: verify vendored files
|
|
21
21
|
*
|
|
@@ -125,7 +125,7 @@ function readManifest() {
|
|
|
125
125
|
* platform-named copy for its installer, and a divergence would mean this plugin is
|
|
126
126
|
* vendoring the wrong variant.
|
|
127
127
|
*
|
|
128
|
-
* @param version - `latest` or a pinned tag such as `v2.0.
|
|
128
|
+
* @param version - `latest` or a pinned tag such as `v2.0.23`.
|
|
129
129
|
* @returns the normalised package.
|
|
130
130
|
*/
|
|
131
131
|
async function fetchPackage(version) {
|
|
@@ -254,7 +254,7 @@ async function main() {
|
|
|
254
254
|
const args = process.argv.slice(2);
|
|
255
255
|
const versionFlag = args.indexOf("--version");
|
|
256
256
|
const requested = versionFlag === -1 ? "latest" : args[versionFlag + 1];
|
|
257
|
-
if (requested === undefined) throw new Error("--version needs a value, e.g. --version v2.0.
|
|
257
|
+
if (requested === undefined) throw new Error("--version needs a value, e.g. --version v2.0.23");
|
|
258
258
|
if (args.includes("--verify-local")) {
|
|
259
259
|
const { manifest, problems } = verifyLocal();
|
|
260
260
|
if (problems.length > 0) {
|
package/skill/README.md
CHANGED
|
@@ -21,7 +21,7 @@ To update:
|
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm run fetch-skill # vendor the latest release
|
|
24
|
-
node scripts/fetch-upstream-skill.mjs --version v2.0.
|
|
24
|
+
node scripts/fetch-upstream-skill.mjs --version v2.0.23 # or pin one
|
|
25
25
|
node scripts/fetch-upstream-skill.mjs --check # report upstream drift only
|
|
26
26
|
```
|
|
27
27
|
|
package/skill/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: kimi-webbridge
|
|
|
3
3
|
description: |
|
|
4
4
|
Kimi Browser Extension(Kimi 浏览器扩展,原 Kimi WebBridge)lets AI control the user's real browser — navigate, click, type, read, screenshot, and interact with any website using the user's actual login sessions. Use this skill whenever the user wants to interact with websites, automate browser tasks, scrape web content, or perform any action requiring a real browser. Also use when the user mentions "browser", "webpage", "open URL", "screenshot", asks to read/interact with any website, or wants a reusable CLI tool or script that automates a specific website. Use even for simple-sounding browser requests — the daemon handles all complexity.
|
|
5
5
|
metadata:
|
|
6
|
-
version: "2.0.
|
|
6
|
+
version: "2.0.23"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Kimi Browser Extension (formerly Kimi WebBridge)
|
|
@@ -23,7 +23,7 @@ When the user asks to build a reusable CLI tool or script for a website (rather
|
|
|
23
23
|
|------|------|---------|------|
|
|
24
24
|
| `navigate` | `url`, `newTab`(bool), `group_title` | `{success, url, tabId}` | First call opens a tab — see [Tabs](#tabs-and-the-current-tab). `group_title` sets the group's visible label |
|
|
25
25
|
| `find_tab` | `url`, `active`(bool) | `{success, url, tabId, borrowed}` | Re-select a tab **this session** opened; `active:true` borrows the tab the **user** is viewing — see [Tabs](#tabs-and-the-current-tab) |
|
|
26
|
-
| `snapshot` |
|
|
26
|
+
| `snapshot` | optional `ref`; `format:"aria"` opts into text with optional `max_chars` (1–60000), or `cursor` to continue | Default `{url, title, tree}`; ARIA `{url, title, tree_text}` | **Accessibility tree** (text) — use this to read page content and locate elements |
|
|
27
27
|
| `click` | `selector` (@e ref or CSS) | `{success, tag, text}` | Synthetic `el.click()` |
|
|
28
28
|
| `fill` | `selector`, `value` | `{success, tag, mode}` | Works on `<input>`/`<textarea>` AND `[contenteditable]` (ProseMirror/Lexical/Slate). `mode` is `"value"` or `"contenteditable"` |
|
|
29
29
|
| `evaluate` | `code` (for `await`, wrap it in an async IIFE — top-level `await` is a SyntaxError) | `{type, value}` | |
|
|
@@ -33,16 +33,18 @@ When the user asks to build a reusable CLI tool or script for a website (rather
|
|
|
33
33
|
| `upload` | `selector`, `files`(string[]) | `{success, fileCount}` | |
|
|
34
34
|
| `save_as_pdf` | `paper_format`, `landscape`, `scale`, `print_background`, optional `path` | `{path, sizeBytes, mimeType, pageTitle}` | Render current page → PDF, returns a file path — see [Save as PDF](#save-the-current-page-as-pdf) |
|
|
35
35
|
| `list_tabs` | — | `{success, tabs:[{tabId, url, title, active, groupTitle}]}` | Inspect tabs in the current session |
|
|
36
|
+
| `list_browser_tabs` | — | `{success, tabs:[{tabId, windowId, url, title, active}]}` | Inspect all tabs visible to this WebBridge connection, across windows; does not attach or focus a tab |
|
|
37
|
+
| `attach_tab` | `tabId` | `{success, tabId, url, title, borrowed}` | Attach a specific existing tab to this session without focusing it; borrowed tabs survive `close_session` |
|
|
36
38
|
| `close_tab` | — | `{success, closed: bool}` | Close the current tab in the session |
|
|
37
|
-
| `close_session` | — | `{success, closed: int}` | Close
|
|
39
|
+
| `close_session` | — | `{success, closed: int}` | Close tabs opened by this session; borrowed tabs stay open. `closed` is the count. See [Sessions](#sessions) for when to call |
|
|
38
40
|
|
|
39
41
|
### Tabs and the current tab
|
|
40
42
|
|
|
41
|
-
Single-tab tools (`snapshot`, `click`, `fill`, `screenshot`, `save_as_pdf`) act on the **current tab** — the one you most recently opened with `navigate` or
|
|
43
|
+
Single-tab tools (`snapshot`, `click`, `fill`, `screenshot`, `save_as_pdf`) act on the **current tab** — the one you most recently opened with `navigate`, selected with `find_tab`, or attached with `attach_tab`.
|
|
42
44
|
|
|
43
45
|
- **Opening pages**: use `newTab:true` when pages should coexist (comparing, cross-referencing); omit it to send the current tab to a new URL.
|
|
44
46
|
- **Going back to an earlier tab**: call `find_tab` to make a tab **you opened earlier in this session** the current one again. Pass the tab's URL — take it from `list_tabs` or the earlier `navigate` result. Matching is by host: `kimi.com` also finds a `www.kimi.com` tab, and the path is ignored. By default `find_tab` searches **only this session's own tabs** — it never reaches into the user's other tabs or windows.
|
|
45
|
-
- **Acting on a page the user already has open**:
|
|
47
|
+
- **Acting on a page the user already has open**: call `list_browser_tabs`, choose the tab by its URL/title and `tabId`, then call `attach_tab` with that ID. This also works for tabs in other windows and does not change the user's foreground tab. The attached tab is borrowed and remains open after `close_session`. For the particular tab the user is currently viewing, `find_tab` with `active:true` still works.
|
|
46
48
|
- If `find_tab` errors with "no tab matching … in this session", the page isn't open in this session — `navigate` with `newTab:true` instead.
|
|
47
49
|
|
|
48
50
|
```bash
|
|
@@ -120,7 +122,9 @@ A caller-supplied `path` is honored verbatim (parent dirs created, existing file
|
|
|
120
122
|
|
|
121
123
|
## Prefer snapshot over CSS/JS selectors
|
|
122
124
|
|
|
123
|
-
`snapshot` returns interactive elements with `@e` refs
|
|
125
|
+
`snapshot` returns interactive elements with `@e` refs bound to the observed DOM nodes. Copy refs as opaque strings into click/fill. Re-reading a page preserves refs for the same nodes; a removed node or changed document/connection requires a fresh snapshot. Refs never automatically select a replacement by name.
|
|
126
|
+
|
|
127
|
+
For bounded text reads, call `snapshot` with `format:"aria"` and optionally `max_chars` (default 60000). This bounds `tree_text`, not metadata. If `truncated:true`, pass `next_cursor` back as `cursor` (without `ref`) to continue the same saved observation; `continued:true` identifies subsequent chunks. Concatenate `tree_text` without extra separators: chunks can split long lines, and budgets count UTF-16 code units without splitting surrogate pairs (a budget of 1 errors when the next character needs 2). Cursors expire after five minutes, cache eviction, navigation or connection reset; start a new snapshot on an expired-cursor error. Same-document content edits do not refresh saved text. The cache holds at most eight snapshots / eight million code units; observations above four million fail explicitly, so narrow the read. Alternatively, use `find` with a specific `query` to search the full main-document accessibility tree, then `snapshot` with the chosen match's `ref` to read its subtree. Search results carry ancestor paths to distinguish same-name matches. Scope and budget do not reassign existing refs; iframe content is not included in this search.
|
|
124
128
|
|
|
125
129
|
Fall back to `evaluate` (JS) only when:
|
|
126
130
|
- The target has no `@e` ref in the snapshot
|
package/skill/UPSTREAM.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"note": "Generated by scripts/fetch-upstream-skill.mjs — do not hand-edit. Vendored verbatim from the official CDN.",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"release": "v2.0.
|
|
5
|
-
"tarUrl": "https://cdn.kimi.com/webbridge/v2.0.
|
|
6
|
-
"tarSha256": "
|
|
7
|
-
"fetchedAt": "2026-
|
|
3
|
+
"version": "2.0.23",
|
|
4
|
+
"release": "v2.0.23",
|
|
5
|
+
"tarUrl": "https://cdn.kimi.com/webbridge/v2.0.23/skills/kimi-webbridge.tar.gz",
|
|
6
|
+
"tarSha256": "9a83d372612151f69ac5cd7465e61531d8316e98246ca6e7aa748766d40f1718",
|
|
7
|
+
"fetchedAt": "2026-10-12T13:45:04.953Z",
|
|
8
8
|
"files": [
|
|
9
9
|
{
|
|
10
10
|
"path": "SKILL.md",
|
|
11
|
-
"sha256": "
|
|
12
|
-
"bytes":
|
|
11
|
+
"sha256": "1e7ce8c90bcdc230036ac34a05e381c85e10efbf53d7624eb671f7cbf9e321b1",
|
|
12
|
+
"bytes": 19437
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "references/cli-creator/companion-skill-template.md",
|