@actagent/diffs 2026.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@actagent/diffs",
3
+ "version": "2026.6.2",
4
+ "description": "ACTAgent read-only diff viewer plugin and file renderer for agents.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/actagent/actagent"
8
+ },
9
+ "type": "module",
10
+ "dependencies": {
11
+ "@pierre/diffs": "1.2.4",
12
+ "@pierre/theme": "1.0.3",
13
+ "@shikijs/langs": "4.1.0",
14
+ "playwright-core": "1.60.0",
15
+ "typebox": "1.1.39",
16
+ "zod": "4.4.3"
17
+ },
18
+ "devDependencies": {
19
+ "@actagent/plugin-sdk": "workspace:*"
20
+ },
21
+ "actagent": {
22
+ "extensions": [
23
+ "./index.ts"
24
+ ],
25
+ "install": {
26
+ "npmSpec": "@actagent/diffs",
27
+ "localPath": "extensions/diffs",
28
+ "defaultChoice": "npm",
29
+ "minHostVersion": ">=2026.4.30"
30
+ },
31
+ "compat": {
32
+ "pluginApi": ">=2026.6.2"
33
+ },
34
+ "assetScripts": {
35
+ "build": "node ../../scripts/build-diffs-viewer-runtime.mjs curated"
36
+ },
37
+ "build": {
38
+ "actagentVersion": "2026.6.2",
39
+ "staticAssets": [
40
+ {
41
+ "source": "./assets/viewer-runtime.js",
42
+ "output": "assets/viewer-runtime.js"
43
+ }
44
+ ]
45
+ },
46
+ "release": {
47
+ "publishToACTAgentHub": true,
48
+ "publishToNpm": true
49
+ }
50
+ }
51
+ }
package/runtime-api.ts ADDED
@@ -0,0 +1,2 @@
1
+ // Diffs API module exposes the plugin public contract.
2
+ export { resolveRequestClientIp } from "actagent/plugin-sdk/webhook-ingress";
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: diffs
3
+ description: Use the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
4
+ ---
5
+
6
+ When you need to show edits as a real diff, prefer the `diffs` tool instead of writing a manual summary.
7
+
8
+ The `diffs` tool accepts either `before` + `after` text, or a unified `patch` string.
9
+
10
+ Use `mode=view` when you want an interactive gateway-hosted viewer. After the tool returns, use `details.viewerUrl` with the canvas tool via `canvas present` or `canvas navigate`.
11
+ If the deployment uses a loopback trusted proxy (for example Tailscale Serve with `gateway.trustedProxies` including `127.0.0.1`), raw loopback viewer requests can fail closed without forwarded client-IP headers. In that topology, prefer `mode=file` / `mode=both`, or use a configured `viewerBaseUrl` / explicit proxy/public `baseUrl` when you need a shareable viewer URL.
12
+
13
+ Use `mode=file` when you need a rendered file artifact. Set `fileFormat=png` (default) or `fileFormat=pdf`. The tool result includes `details.filePath`.
14
+
15
+ For large or high-fidelity files, use `fileQuality` (`standard`|`hq`|`print`) and optionally override `fileScale`/`fileMaxWidth`.
16
+
17
+ When you need to deliver the rendered file to a user or channel, do not rely on the raw tool-result renderer. Instead, call the `message` tool and pass `details.filePath` through `path` or `filePath`.
18
+
19
+ Use `mode=both` when you want both the gateway viewer URL and the rendered artifact.
20
+
21
+ If the user has configured diffs plugin defaults, prefer omitting `mode`, `theme`, `layout`, and related presentation options unless you need to override them for this specific diff.
22
+
23
+ Include `path` for before/after text when you know the file name.