tauri-agent-tools 0.6.0 → 0.7.1

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.
Files changed (89) hide show
  1. package/.agents/skills/tauri-agent-tools/SKILL.md +94 -5
  2. package/.agents/skills/tauri-bridge-setup/SKILL.md +45 -13
  3. package/.agents/skills/tauri-debug-quickstart/SKILL.md +80 -0
  4. package/README.md +72 -4
  5. package/dist/bridge/client.d.ts +17 -1
  6. package/dist/bridge/client.js +82 -1
  7. package/dist/bridge/client.js.map +1 -1
  8. package/dist/bridge/tokenDiscovery.js +29 -29
  9. package/dist/bridge/tokenDiscovery.js.map +1 -1
  10. package/dist/cli.js +25 -0
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/appPaths.d.ts +2 -0
  13. package/dist/commands/appPaths.js +97 -0
  14. package/dist/commands/appPaths.js.map +1 -0
  15. package/dist/commands/capabilitiesAudit.d.ts +2 -0
  16. package/dist/commands/capabilitiesAudit.js +105 -0
  17. package/dist/commands/capabilitiesAudit.js.map +1 -0
  18. package/dist/commands/capture.js +1 -1
  19. package/dist/commands/configInspect.d.ts +2 -0
  20. package/dist/commands/configInspect.js +223 -0
  21. package/dist/commands/configInspect.js.map +1 -0
  22. package/dist/commands/diagnose.d.ts +2 -0
  23. package/dist/commands/diagnose.js +311 -0
  24. package/dist/commands/diagnose.js.map +1 -0
  25. package/dist/commands/forensics.d.ts +2 -0
  26. package/dist/commands/forensics.js +331 -0
  27. package/dist/commands/forensics.js.map +1 -0
  28. package/dist/commands/health.d.ts +2 -0
  29. package/dist/commands/health.js +39 -0
  30. package/dist/commands/health.js.map +1 -0
  31. package/dist/commands/invoke.js +14 -4
  32. package/dist/commands/invoke.js.map +1 -1
  33. package/dist/commands/ipcMonitor.d.ts +3 -0
  34. package/dist/commands/ipcMonitor.js +22 -10
  35. package/dist/commands/ipcMonitor.js.map +1 -1
  36. package/dist/commands/osLogs.d.ts +2 -0
  37. package/dist/commands/osLogs.js +130 -0
  38. package/dist/commands/osLogs.js.map +1 -0
  39. package/dist/commands/pageState.d.ts +1 -0
  40. package/dist/commands/pageState.js +2 -2
  41. package/dist/commands/pageState.js.map +1 -1
  42. package/dist/commands/processTree.d.ts +2 -0
  43. package/dist/commands/processTree.js +45 -0
  44. package/dist/commands/processTree.js.map +1 -0
  45. package/dist/commands/sidecarReplay.d.ts +7 -0
  46. package/dist/commands/sidecarReplay.js +93 -0
  47. package/dist/commands/sidecarReplay.js.map +1 -0
  48. package/dist/commands/sidecarTap.d.ts +2 -0
  49. package/dist/commands/sidecarTap.js +118 -0
  50. package/dist/commands/sidecarTap.js.map +1 -0
  51. package/dist/commands/snapshot.js +1 -1
  52. package/dist/commands/webviewAttach.d.ts +2 -0
  53. package/dist/commands/webviewAttach.js +64 -0
  54. package/dist/commands/webviewAttach.js.map +1 -0
  55. package/dist/platform/oslog/darwin.d.ts +21 -0
  56. package/dist/platform/oslog/darwin.js +72 -0
  57. package/dist/platform/oslog/darwin.js.map +1 -0
  58. package/dist/platform/oslog/linux.d.ts +16 -0
  59. package/dist/platform/oslog/linux.js +47 -0
  60. package/dist/platform/oslog/linux.js.map +1 -0
  61. package/dist/platform/oslog/windows.d.ts +15 -0
  62. package/dist/platform/oslog/windows.js +16 -0
  63. package/dist/platform/oslog/windows.js.map +1 -0
  64. package/dist/schemas/bridge.d.ts +222 -0
  65. package/dist/schemas/bridge.js +44 -0
  66. package/dist/schemas/bridge.js.map +1 -1
  67. package/dist/schemas/osLog.d.ts +34 -0
  68. package/dist/schemas/osLog.js +18 -0
  69. package/dist/schemas/osLog.js.map +1 -0
  70. package/dist/schemas/sidecar.d.ts +33 -0
  71. package/dist/schemas/sidecar.js +17 -0
  72. package/dist/schemas/sidecar.js.map +1 -0
  73. package/dist/schemas/tauriConfig.d.ts +825 -0
  74. package/dist/schemas/tauriConfig.js +102 -0
  75. package/dist/schemas/tauriConfig.js.map +1 -0
  76. package/dist/util/ndjson.d.ts +37 -0
  77. package/dist/util/ndjson.js +82 -0
  78. package/dist/util/ndjson.js.map +1 -0
  79. package/dist/util/tauriConfig.d.ts +63 -0
  80. package/dist/util/tauriConfig.js +235 -0
  81. package/dist/util/tauriConfig.js.map +1 -0
  82. package/examples/frontend-stub/index.html +1 -0
  83. package/examples/tauri-bridge/Cargo.toml +6 -0
  84. package/examples/tauri-bridge/build.rs +3 -0
  85. package/examples/tauri-bridge/icons/icon.png +0 -0
  86. package/examples/tauri-bridge/src/dev_bridge.rs +536 -43
  87. package/examples/tauri-bridge/tauri.conf.json +25 -0
  88. package/package.json +3 -1
  89. package/rust-bridge/README.md +10 -1
@@ -0,0 +1,25 @@
1
+ {
2
+ "$schema": "https://schema.tauri.app/config/2",
3
+ "productName": "tauri-dev-bridge-example",
4
+ "version": "0.1.0",
5
+ "identifier": "com.tauri-agent-tools.bridge-example",
6
+ "build": {
7
+ "frontendDist": "../frontend-stub"
8
+ },
9
+ "app": {
10
+ "windows": [
11
+ {
12
+ "label": "main",
13
+ "title": "Bridge Example",
14
+ "width": 800,
15
+ "height": 600
16
+ }
17
+ ],
18
+ "security": {
19
+ "csp": null
20
+ }
21
+ },
22
+ "bundle": {
23
+ "active": false
24
+ }
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tauri-agent-tools",
3
- "version": "0.6.0",
3
+ "version": "0.7.1",
4
4
  "description": "Agent-driven inspection toolkit for Tauri desktop apps",
5
5
  "type": "module",
6
6
  "bin": {
@@ -44,6 +44,8 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
+ "ajv": "^8.20.0",
48
+ "ajv-formats": "^3.0.1",
47
49
  "commander": "^14.0.0",
48
50
  "zod": "^3.25.76"
49
51
  },
@@ -16,6 +16,9 @@ rand = "0.8"
16
16
  uuid = { version = "1", features = ["v4"] }
17
17
  tracing = "0.1"
18
18
  tracing-subscriber = "0.3"
19
+
20
+ [target.'cfg(unix)'.dependencies]
21
+ libc = "0.2"
19
22
  ```
20
23
 
21
24
  ### 2. Copy the bridge module
@@ -84,7 +87,7 @@ tauri-agent-tools eval "document.title"
84
87
  3. `tauri-agent-tools` discovers the token file and authenticates via the token
85
88
  4. The bridge exposes four endpoints: `POST /eval` (JS evaluation), `POST /logs` (Rust log retrieval), `POST /describe` (bridge metadata), and `GET /version` (unauthenticated health check)
86
89
  5. `/eval` accepts an optional `window` field to target specific webview windows (defaults to `"main"`)
87
- 6. The injected JS evaluates the expression, then calls back into Rust via `window.__TAURI__.core.invoke("__dev_bridge_result", { id, value })` to deliver the result
90
+ 6. The injected JS evaluates the expression, then calls back into Rust via `window.__TAURI_INTERNALS__.invoke("__dev_bridge_result", { id, value })` to deliver the result, falling back to `window.__TAURI__.core.invoke()` for older/global-enabled apps
88
91
  7. The HTTP handler thread waits for the result (up to 5 seconds) and returns it as JSON
89
92
  8. `/logs` drains the ring buffer of captured `tracing` events and returns them as JSON
90
93
  9. `/describe` returns PID, window labels, and capabilities
@@ -98,6 +101,12 @@ tauri-agent-tools eval "document.title"
98
101
  - **Inspection is read-only** — inspection commands only read DOM state
99
102
  - **Interaction is debug-only** — interaction commands use eval-based DOM dispatch, sandboxed to the webview
100
103
 
104
+ ## Troubleshooting
105
+
106
+ ### `Eval timeout: no result callback received`
107
+
108
+ Re-copy `examples/tauri-bridge/src/dev_bridge.rs` from the latest package. Current bridge code uses Tauri 2's always-present `window.__TAURI_INTERNALS__.invoke()` callback path and does **not** require `app.withGlobalTauri: true`. Older copied bridge files used `window.__TAURI__.core.invoke()` and can time out in apps that keep Tauri's global API disabled.
109
+
101
110
  ## Agent-Assisted Setup
102
111
 
103
112
  If you're using an AI coding agent (Claude Code, Codex, Cursor, etc.), the `tauri-bridge-setup` skill can guide automated setup. See `.agents/skills/tauri-bridge-setup/SKILL.md` or run: