@openclaw/diffs 2026.8.1-beta.2 → 2026.8.1-beta.3
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 +7 -7
- package/dist/assets/viewer-runtime.js +3 -3
- package/dist/browser.runtime-_hkQDewM.js +406 -0
- package/dist/index.js +20 -578
- package/dist/viewer-assets-DKR8WLAI.js +118 -0
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Restart the Gateway after installing or updating the plugin.
|
|
|
12
12
|
|
|
13
13
|
It gives agents one tool, `diffs`, that can:
|
|
14
14
|
|
|
15
|
-
- render a gateway-hosted diff viewer
|
|
15
|
+
- render a gateway-hosted diff viewer
|
|
16
16
|
- render the same diff to a file (PNG or PDF)
|
|
17
17
|
- accept either arbitrary `before` and `after` text or a unified patch
|
|
18
18
|
|
|
@@ -21,7 +21,7 @@ It gives agents one tool, `diffs`, that can:
|
|
|
21
21
|
The tool can return:
|
|
22
22
|
|
|
23
23
|
- `details.changed`: `false` when before/after inputs are identical and no artifact was rendered; `true` for rendered results
|
|
24
|
-
- `details.viewerUrl`: a gateway URL that can be opened in the
|
|
24
|
+
- `details.viewerUrl`: a gateway URL that can be opened in the operator's browser
|
|
25
25
|
- `details.filePath`: a local rendered artifact path when file rendering is requested
|
|
26
26
|
- `details.fileFormat`: the rendered file format (`png` or `pdf`)
|
|
27
27
|
- `details.artifactId` and `details.expiresAt`: artifact identity and TTL metadata
|
|
@@ -31,7 +31,7 @@ When the plugin is enabled, it also ships a companion skill from `skills/` and p
|
|
|
31
31
|
|
|
32
32
|
This means an agent can:
|
|
33
33
|
|
|
34
|
-
- call `diffs` with `mode=view`, then
|
|
34
|
+
- call `diffs` with `mode=view`, then return `details.viewerUrl` for the operator to open
|
|
35
35
|
- call `diffs` with `mode=file`, then send the file through the normal `message` tool using `path` or `filePath`
|
|
36
36
|
- call `diffs` with `mode=both` when it wants both outputs
|
|
37
37
|
|
|
@@ -154,10 +154,10 @@ Example:
|
|
|
154
154
|
|
|
155
155
|
## Example Agent Prompts
|
|
156
156
|
|
|
157
|
-
Open in
|
|
157
|
+
Open in the browser:
|
|
158
158
|
|
|
159
159
|
```text
|
|
160
|
-
Use the `diffs` tool in `view` mode for this before and after content, then
|
|
160
|
+
Use the `diffs` tool in `view` mode for this before and after content, then return the viewer URL.
|
|
161
161
|
|
|
162
162
|
Path: docs/example.md
|
|
163
163
|
|
|
@@ -189,7 +189,7 @@ OpenClaw supports plugins and hosted diff views.
|
|
|
189
189
|
Do both:
|
|
190
190
|
|
|
191
191
|
```text
|
|
192
|
-
Use the `diffs` tool in `both` mode for this diff.
|
|
192
|
+
Use the `diffs` tool in `both` mode for this diff. Return the viewer URL and then send the rendered file by passing `details.filePath` to the `message` tool.
|
|
193
193
|
|
|
194
194
|
Path: src/demo.ts
|
|
195
195
|
|
|
@@ -203,7 +203,7 @@ const status = "new";
|
|
|
203
203
|
Patch input:
|
|
204
204
|
|
|
205
205
|
```text
|
|
206
|
-
Use the `diffs` tool with this unified patch in `view` mode.
|
|
206
|
+
Use the `diffs` tool with this unified patch in `view` mode. Return its viewer URL.
|
|
207
207
|
|
|
208
208
|
diff --git a/src/example.ts b/src/example.ts
|
|
209
209
|
--- a/src/example.ts
|