patchwarden 0.6.0 → 0.6.4

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 (134) hide show
  1. package/PatchWarden-Control-Tray.cmd +11 -0
  2. package/PatchWarden-Control.cmd +6 -0
  3. package/PatchWarden-Desktop.cmd +5 -0
  4. package/PatchWarden.cmd +1 -1
  5. package/README.en.md +106 -18
  6. package/README.md +30 -19
  7. package/Restart-PatchWarden-Control.cmd +6 -0
  8. package/Stop-PatchWarden.cmd +11 -0
  9. package/dist/controlCenter.d.ts +14 -0
  10. package/dist/controlCenter.js +2002 -0
  11. package/dist/doctor.js +4 -4
  12. package/dist/logging.d.ts +52 -0
  13. package/dist/logging.js +123 -0
  14. package/dist/runner/changeCapture.d.ts +41 -0
  15. package/dist/runner/changeCapture.js +171 -1
  16. package/dist/runner/runTask.js +204 -24
  17. package/dist/smoke-test.js +8 -8
  18. package/dist/test/unit/android-doctor.test.d.ts +1 -0
  19. package/dist/test/unit/android-doctor.test.js +118 -0
  20. package/dist/test/unit/chinese-path.test.d.ts +1 -0
  21. package/dist/test/unit/chinese-path.test.js +91 -0
  22. package/dist/test/unit/command-guard.test.d.ts +1 -0
  23. package/dist/test/unit/command-guard.test.js +160 -0
  24. package/dist/test/unit/direct-guards.test.d.ts +1 -0
  25. package/dist/test/unit/direct-guards.test.js +213 -0
  26. package/dist/test/unit/logging.test.d.ts +1 -0
  27. package/dist/test/unit/logging.test.js +275 -0
  28. package/dist/test/unit/path-guard.test.d.ts +1 -0
  29. package/dist/test/unit/path-guard.test.js +109 -0
  30. package/dist/test/unit/safe-status.test.d.ts +1 -0
  31. package/dist/test/unit/safe-status.test.js +165 -0
  32. package/dist/test/unit/sensitive-guard.test.d.ts +1 -0
  33. package/dist/test/unit/sensitive-guard.test.js +104 -0
  34. package/dist/test/unit/sync-file.test.d.ts +1 -0
  35. package/dist/test/unit/sync-file.test.js +154 -0
  36. package/dist/test/unit/watcher-status.test.d.ts +1 -0
  37. package/dist/test/unit/watcher-status.test.js +169 -0
  38. package/dist/tools/androidDoctor.d.ts +38 -0
  39. package/dist/tools/androidDoctor.js +391 -0
  40. package/dist/tools/auditTask.js +11 -5
  41. package/dist/tools/getTaskSummary.d.ts +3 -0
  42. package/dist/tools/getTaskSummary.js +15 -1
  43. package/dist/tools/healthCheck.d.ts +5 -0
  44. package/dist/tools/healthCheck.js +21 -0
  45. package/dist/tools/registry.js +53 -0
  46. package/dist/tools/safeStatus.d.ts +19 -0
  47. package/dist/tools/safeStatus.js +72 -0
  48. package/dist/tools/syncFile.d.ts +18 -0
  49. package/dist/tools/syncFile.js +65 -0
  50. package/dist/tools/taskOutputs.d.ts +2 -2
  51. package/dist/tools/toolCatalog.d.ts +2 -2
  52. package/dist/tools/toolCatalog.js +2 -0
  53. package/dist/version.d.ts +2 -2
  54. package/dist/version.js +2 -2
  55. package/dist/watcherStatus.d.ts +1 -0
  56. package/dist/watcherStatus.js +96 -4
  57. package/docs/control-center/README.md +33 -0
  58. package/docs/control-center/control-center-daily-driver.md +211 -0
  59. package/docs/control-center/control-center-mvp.md +205 -0
  60. package/docs/control-center/control-center-phase2.md +159 -0
  61. package/docs/demo.md +3 -0
  62. package/docs/performance-notes.md +55 -0
  63. package/docs/release-v0.6.1.md +75 -0
  64. package/docs/release-v0.6.4.md +45 -0
  65. package/examples/openai-tunnel/README.md +5 -5
  66. package/examples/openai-tunnel/tunnel-client.example.yaml +3 -3
  67. package/package.json +23 -14
  68. package/scripts/README.md +47 -0
  69. package/scripts/{brand-check.js → checks/brand-check.js} +2 -2
  70. package/scripts/checks/control-center-smoke.js +1098 -0
  71. package/scripts/{control-smoke.js → checks/control-smoke.js} +17 -3
  72. package/scripts/{doctor-smoke.js → checks/doctor-smoke.js} +1 -1
  73. package/scripts/{http-mcp-smoke.js → checks/http-mcp-smoke.js} +12 -4
  74. package/scripts/{lifecycle-smoke.js → checks/lifecycle-smoke.js} +347 -13
  75. package/scripts/{mcp-manifest-check.js → checks/mcp-manifest-check.js} +32 -9
  76. package/scripts/{mcp-smoke.js → checks/mcp-smoke.js} +14 -9
  77. package/scripts/{package-manifest-check.js → checks/package-manifest-check.js} +2 -1
  78. package/scripts/{tunnel-supervisor-smoke.js → checks/tunnel-supervisor-smoke.js} +2 -2
  79. package/scripts/checks/unit-tests.js +36 -0
  80. package/scripts/{watcher-supervisor-smoke.js → checks/watcher-supervisor-smoke.js} +11 -5
  81. package/scripts/control/control-center-tray.ps1 +281 -0
  82. package/scripts/{get-patchwarden-health.ps1 → control/get-patchwarden-health.ps1} +3 -3
  83. package/scripts/{manage-patchwarden.ps1 → control/manage-patchwarden.ps1} +30 -4
  84. package/scripts/control/restart-control-center.ps1 +173 -0
  85. package/scripts/{restart-patchwarden.ps1 → control/restart-patchwarden.ps1} +1 -1
  86. package/scripts/control/start-control-center.ps1 +263 -0
  87. package/scripts/{start-patchwarden-tunnel.ps1 → control/start-patchwarden-tunnel.ps1} +48 -6
  88. package/scripts/control/stop-patchwarden.ps1 +114 -0
  89. package/scripts/launchers/Check-PatchWarden-Health.cmd +1 -1
  90. package/scripts/launchers/Reset-PatchWarden-Tunnel-Key.cmd +1 -1
  91. package/scripts/launchers/Restart-PatchWarden.cmd +1 -1
  92. package/scripts/launchers/Start-PatchWarden-Direct-Tunnel.cmd +1 -1
  93. package/scripts/launchers/Start-PatchWarden-Tunnel.cmd +1 -1
  94. package/scripts/{patchwarden-mcp-direct.cmd → mcp/patchwarden-mcp-direct.cmd} +1 -1
  95. package/scripts/{patchwarden-mcp-stdio.cmd → mcp/patchwarden-mcp-stdio.cmd} +1 -1
  96. package/scripts/release/pack-clean.js +305 -0
  97. package/src/controlCenter.ts +2152 -0
  98. package/src/doctor.ts +5 -5
  99. package/src/logging.ts +152 -0
  100. package/src/runner/changeCapture.ts +212 -1
  101. package/src/runner/runTask.ts +220 -22
  102. package/src/smoke-test.ts +5 -5
  103. package/src/test/unit/android-doctor.test.ts +158 -0
  104. package/src/test/unit/chinese-path.test.ts +106 -0
  105. package/src/test/unit/command-guard.test.ts +221 -0
  106. package/src/test/unit/direct-guards.test.ts +297 -0
  107. package/src/test/unit/logging.test.ts +325 -0
  108. package/src/test/unit/path-guard.test.ts +150 -0
  109. package/src/test/unit/safe-status.test.ts +187 -0
  110. package/src/test/unit/sensitive-guard.test.ts +124 -0
  111. package/src/test/unit/sync-file.test.ts +231 -0
  112. package/src/test/unit/watcher-status.test.ts +190 -0
  113. package/src/tools/androidDoctor.ts +424 -0
  114. package/src/tools/auditTask.ts +11 -5
  115. package/src/tools/getTaskSummary.ts +22 -1
  116. package/src/tools/healthCheck.ts +22 -0
  117. package/src/tools/registry.ts +63 -0
  118. package/src/tools/safeStatus.ts +96 -0
  119. package/src/tools/syncFile.ts +122 -0
  120. package/src/tools/toolCatalog.ts +2 -0
  121. package/src/version.ts +2 -2
  122. package/src/watcherStatus.ts +101 -4
  123. package/ui/colors_and_type.css +141 -0
  124. package/ui/pages/audit.html +743 -0
  125. package/ui/pages/dashboard.html +1154 -0
  126. package/ui/pages/direct-sessions.html +652 -0
  127. package/ui/pages/logs.html +502 -0
  128. package/ui/pages/task-detail.html +1229 -0
  129. package/ui/pages/tasks.html +702 -0
  130. package/ui/pages/workspace.html +947 -0
  131. package/ui/partials/project-shell.html +362 -0
  132. package/ui/vendor/lucide.js +12 -0
  133. package/ui/vendor/tailwindcss-browser.js +947 -0
  134. package/scripts/pack-clean.js +0 -141
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchwarden",
3
- "version": "0.6.0",
3
+ "version": "0.6.4",
4
4
  "description": "A secure local MCP bridge: clients save plans, local agents execute tasks, and results are returned through workspace-scoped files.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -17,9 +17,16 @@
17
17
  "src/",
18
18
  "examples/",
19
19
  "scripts/",
20
- "!scripts/kill-patchwarden.ps1",
20
+ "!scripts/control/kill-patchwarden.ps1",
21
21
  "!scripts/launchers/Kill-PatchWarden.cmd",
22
+ "!.local/",
23
+ "ui/",
22
24
  "PatchWarden.cmd",
25
+ "PatchWarden-Control.cmd",
26
+ "PatchWarden-Control-Tray.cmd",
27
+ "PatchWarden-Desktop.cmd",
28
+ "Restart-PatchWarden-Control.cmd",
29
+ "Stop-PatchWarden.cmd",
23
30
  "README.md",
24
31
  "README.en.md",
25
32
  "LICENSE",
@@ -29,24 +36,26 @@
29
36
  "build": "node ./node_modules/typescript/bin/tsc",
30
37
  "start": "node dist/index.js",
31
38
  "start:http": "node dist/httpServer.js",
39
+ "start:control": "node dist/controlCenter.js",
32
40
  "dev": "npm run build && node dist/index.js",
33
41
  "runner": "node dist/runner/cli.js",
34
42
  "watch": "node dist/runner/watch.js",
35
43
  "doctor": "node dist/doctor.js",
36
44
  "doctor:ci": "node dist/doctor.js --allow-default-config",
37
- "test": "node dist/smoke-test.js && node scripts/lifecycle-smoke.js && node scripts/doctor-smoke.js && node scripts/tunnel-supervisor-smoke.js && node scripts/watcher-supervisor-smoke.js && node scripts/control-smoke.js && node scripts/mcp-manifest-check.js && node scripts/brand-check.js",
38
- "test:lifecycle": "npm run build && node scripts/lifecycle-smoke.js",
39
- "test:doctor": "npm run build && node scripts/doctor-smoke.js",
40
- "test:tunnel-supervisor": "npm run build && node scripts/tunnel-supervisor-smoke.js",
41
- "test:watcher-supervisor": "npm run build && node scripts/watcher-supervisor-smoke.js",
42
- "check:tool-manifest": "npm run build && node scripts/mcp-manifest-check.js",
43
- "check:direct-tool-manifest": "npm run build && node scripts/mcp-manifest-check.js --profile chatgpt_direct",
44
- "check:brand": "node scripts/brand-check.js",
45
- "test:mcp": "npm run build && node scripts/mcp-smoke.js",
46
- "test:http-mcp": "npm run build && node scripts/http-mcp-smoke.js",
45
+ "test:unit": "node scripts/checks/unit-tests.js",
46
+ "test": "node dist/smoke-test.js && node scripts/checks/unit-tests.js && node scripts/checks/lifecycle-smoke.js && node scripts/checks/doctor-smoke.js && node scripts/checks/tunnel-supervisor-smoke.js && node scripts/checks/watcher-supervisor-smoke.js && node scripts/checks/control-smoke.js && node scripts/checks/mcp-manifest-check.js && node scripts/checks/brand-check.js && node scripts/checks/control-center-smoke.js",
47
+ "test:lifecycle": "npm run build && node scripts/checks/lifecycle-smoke.js",
48
+ "test:doctor": "npm run build && node scripts/checks/doctor-smoke.js",
49
+ "test:tunnel-supervisor": "npm run build && node scripts/checks/tunnel-supervisor-smoke.js",
50
+ "test:watcher-supervisor": "npm run build && node scripts/checks/watcher-supervisor-smoke.js",
51
+ "check:tool-manifest": "npm run build && node scripts/checks/mcp-manifest-check.js",
52
+ "check:direct-tool-manifest": "npm run build && node scripts/checks/mcp-manifest-check.js --profile chatgpt_direct",
53
+ "check:brand": "node scripts/checks/brand-check.js",
54
+ "test:mcp": "npm run build && node scripts/checks/mcp-smoke.js",
55
+ "test:http-mcp": "npm run build && node scripts/checks/http-mcp-smoke.js",
47
56
  "pretest": "npm run build",
48
- "pack:clean": "npm run build && node scripts/pack-clean.js",
49
- "verify:package": "npm run build && node scripts/package-manifest-check.js"
57
+ "pack:clean": "npm run build && node scripts/release/pack-clean.js",
58
+ "verify:package": "npm run build && node scripts/checks/package-manifest-check.js"
50
59
  },
51
60
  "dependencies": {
52
61
  "@modelcontextprotocol/sdk": "^1.0.0"
@@ -0,0 +1,47 @@
1
+ # PatchWarden Scripts
2
+
3
+ This directory keeps implementation scripts out of the root folder. Normal
4
+ desktop use should start from the root entrypoints:
5
+
6
+ ```powershell
7
+ .\PatchWarden-Desktop.cmd
8
+ .\PatchWarden-Control.cmd
9
+ .\PatchWarden-Control-Tray.cmd --foreground
10
+ .\Stop-PatchWarden.cmd
11
+ .\PatchWarden.cmd status all
12
+ ```
13
+
14
+ ## Control Scripts
15
+
16
+ - `control/manage-patchwarden.ps1`: backing implementation for `PatchWarden.cmd`.
17
+ - `control/start-control-center.ps1`: starts the local Web dashboard.
18
+ - `control/restart-control-center.ps1`: restarts the local Web dashboard.
19
+ - `control/control-center-tray.ps1`: Windows tray quick controls.
20
+ - `control/stop-patchwarden.ps1`: one-click shutdown for Core/Direct,
21
+ Control Center, and tray.
22
+ - `control/start-patchwarden-tunnel.ps1`: starts Core or Direct tunnel supervision.
23
+ - `control/restart-patchwarden.ps1`: compatibility restart helper.
24
+
25
+ ## MCP Entrypoints
26
+
27
+ - `mcp/patchwarden-mcp-stdio.cmd`: Core stdio MCP launcher.
28
+ - `mcp/patchwarden-mcp-direct.cmd`: Direct stdio MCP launcher.
29
+
30
+ ## Smoke Tests And Checks
31
+
32
+ - `checks/*-smoke.js`: targeted smoke tests.
33
+ - `checks/unit-tests.js`: Node unit test entry.
34
+ - `checks/mcp-manifest-check.js`: validates MCP manifest expectations.
35
+ - `brand-check.js`: checks public brand strings.
36
+ - `checks/package-manifest-check.js`: verifies package contents.
37
+
38
+ ## Release Helpers
39
+
40
+ - `release/pack-clean.js`: rebuilds `release/`, `patchwarden-release.tar.gz`, and the
41
+ versioned `PatchWarden-v*.zip` artifact.
42
+
43
+ ## Compatibility Launchers
44
+
45
+ Compatibility `.cmd` files live under `scripts/launchers/`. User-private local
46
+ launchers belong under `.local/` and must stay out of Git and release packages.
47
+
@@ -12,8 +12,8 @@ const allowedLegacyFiles = new Set([
12
12
  "docs/release-v0.3.0.md",
13
13
  "docs/release-v0.4.0.md",
14
14
  "docs/release-v0.6.0.md",
15
- "scripts/brand-check.js",
16
- "scripts/pack-clean.js",
15
+ "scripts/checks/brand-check.js",
16
+ "scripts/release/pack-clean.js",
17
17
  ]);
18
18
  const legacyPattern = /safe-bifrost|Safe-Bifrost|SAFE_BIFROST|SafeBifrost|safe_bifrost/;
19
19