patchwarden 0.4.0 → 0.6.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 (189) hide show
  1. package/PatchWarden.cmd +51 -0
  2. package/README.en.md +1022 -0
  3. package/README.md +897 -358
  4. package/dist/assessments/agentAssessor.d.ts +15 -0
  5. package/dist/assessments/agentAssessor.js +293 -0
  6. package/dist/assessments/assessmentStore.d.ts +133 -0
  7. package/dist/assessments/assessmentStore.js +238 -0
  8. package/dist/assessments/confirmCli.d.ts +9 -0
  9. package/dist/assessments/confirmCli.js +26 -0
  10. package/dist/config.d.ts +22 -1
  11. package/dist/config.js +156 -3
  12. package/dist/direct/directAudit.d.ts +23 -0
  13. package/dist/direct/directAudit.js +309 -0
  14. package/dist/direct/directGuards.d.ts +20 -0
  15. package/dist/direct/directGuards.js +137 -0
  16. package/dist/direct/directPatch.d.ts +17 -0
  17. package/dist/direct/directPatch.js +113 -0
  18. package/dist/direct/directSessionStore.d.ts +63 -0
  19. package/dist/direct/directSessionStore.js +192 -0
  20. package/dist/direct/directVerification.d.ts +12 -0
  21. package/dist/direct/directVerification.js +96 -0
  22. package/dist/doctor.js +73 -5
  23. package/dist/logging.d.ts +52 -0
  24. package/dist/logging.js +123 -0
  25. package/dist/runner/agentInvocation.d.ts +23 -0
  26. package/dist/runner/agentInvocation.js +106 -0
  27. package/dist/runner/changeCapture.d.ts +70 -0
  28. package/dist/runner/changeCapture.js +278 -6
  29. package/dist/runner/runTask.js +271 -65
  30. package/dist/runner/simpleProcess.d.ts +21 -0
  31. package/dist/runner/simpleProcess.js +206 -0
  32. package/dist/runner/watch.js +17 -2
  33. package/dist/security/commandGuard.d.ts +2 -1
  34. package/dist/security/commandGuard.js +25 -3
  35. package/dist/security/riskEngine.d.ts +27 -0
  36. package/dist/security/riskEngine.js +118 -0
  37. package/dist/security/runtimeGuard.d.ts +6 -0
  38. package/dist/security/runtimeGuard.js +28 -0
  39. package/dist/smoke-test.js +1353 -7
  40. package/dist/test/unit/android-doctor.test.d.ts +1 -0
  41. package/dist/test/unit/android-doctor.test.js +118 -0
  42. package/dist/test/unit/chinese-path.test.d.ts +1 -0
  43. package/dist/test/unit/chinese-path.test.js +91 -0
  44. package/dist/test/unit/command-guard.test.d.ts +1 -0
  45. package/dist/test/unit/command-guard.test.js +160 -0
  46. package/dist/test/unit/direct-guards.test.d.ts +1 -0
  47. package/dist/test/unit/direct-guards.test.js +213 -0
  48. package/dist/test/unit/logging.test.d.ts +1 -0
  49. package/dist/test/unit/logging.test.js +275 -0
  50. package/dist/test/unit/path-guard.test.d.ts +1 -0
  51. package/dist/test/unit/path-guard.test.js +109 -0
  52. package/dist/test/unit/safe-status.test.d.ts +1 -0
  53. package/dist/test/unit/safe-status.test.js +165 -0
  54. package/dist/test/unit/sensitive-guard.test.d.ts +1 -0
  55. package/dist/test/unit/sensitive-guard.test.js +104 -0
  56. package/dist/test/unit/sync-file.test.d.ts +1 -0
  57. package/dist/test/unit/sync-file.test.js +154 -0
  58. package/dist/test/unit/watcher-status.test.d.ts +1 -0
  59. package/dist/test/unit/watcher-status.test.js +169 -0
  60. package/dist/tools/androidDoctor.d.ts +38 -0
  61. package/dist/tools/androidDoctor.js +391 -0
  62. package/dist/tools/applyPatch.d.ts +16 -0
  63. package/dist/tools/applyPatch.js +41 -0
  64. package/dist/tools/auditSession.d.ts +5 -0
  65. package/dist/tools/auditSession.js +12 -0
  66. package/dist/tools/auditTask.d.ts +7 -0
  67. package/dist/tools/auditTask.js +105 -7
  68. package/dist/tools/createDirectSession.d.ts +14 -0
  69. package/dist/tools/createDirectSession.js +54 -0
  70. package/dist/tools/createTask.d.ts +48 -1
  71. package/dist/tools/createTask.js +298 -47
  72. package/dist/tools/finalizeDirectSession.d.ts +19 -0
  73. package/dist/tools/finalizeDirectSession.js +84 -0
  74. package/dist/tools/getTaskSummary.d.ts +50 -0
  75. package/dist/tools/getTaskSummary.js +79 -2
  76. package/dist/tools/healthCheck.d.ts +27 -12
  77. package/dist/tools/healthCheck.js +44 -6
  78. package/dist/tools/readWorkspaceFile.d.ts +7 -1
  79. package/dist/tools/readWorkspaceFile.js +48 -2
  80. package/dist/tools/registry.js +270 -19
  81. package/dist/tools/runVerification.d.ts +16 -0
  82. package/dist/tools/runVerification.js +32 -0
  83. package/dist/tools/safeStatus.d.ts +19 -0
  84. package/dist/tools/safeStatus.js +72 -0
  85. package/dist/tools/savePlan.d.ts +1 -0
  86. package/dist/tools/savePlan.js +38 -7
  87. package/dist/tools/searchWorkspace.d.ts +19 -0
  88. package/dist/tools/searchWorkspace.js +205 -0
  89. package/dist/tools/syncFile.d.ts +18 -0
  90. package/dist/tools/syncFile.js +65 -0
  91. package/dist/tools/taskOutputs.d.ts +2 -2
  92. package/dist/tools/taskTemplates.js +2 -1
  93. package/dist/tools/toolCatalog.d.ts +4 -3
  94. package/dist/tools/toolCatalog.js +34 -5
  95. package/dist/tools/waitForTask.d.ts +2 -2
  96. package/dist/tools/waitForTask.js +1 -1
  97. package/dist/version.d.ts +2 -2
  98. package/dist/version.js +2 -2
  99. package/dist/watcherStatus.d.ts +1 -0
  100. package/dist/watcherStatus.js +96 -4
  101. package/docs/chatgpt-usage.md +101 -0
  102. package/docs/performance-notes.md +55 -0
  103. package/docs/release-checklist.md +14 -0
  104. package/docs/release-v0.6.0.md +71 -0
  105. package/docs/release-v0.6.1.md +75 -0
  106. package/examples/config.example.json +5 -0
  107. package/examples/openai-tunnel/README.md +11 -4
  108. package/examples/openai-tunnel/chatgpt-test-prompt.md +18 -14
  109. package/examples/openai-tunnel/tunnel-client.example.yaml +8 -0
  110. package/package.json +13 -8
  111. package/scripts/brand-check.js +58 -12
  112. package/scripts/control-smoke.js +206 -0
  113. package/scripts/http-mcp-smoke.js +10 -2
  114. package/scripts/launchers/Check-PatchWarden-Health.cmd +6 -0
  115. package/scripts/launchers/Reset-PatchWarden-Tunnel-Key.cmd +6 -0
  116. package/scripts/launchers/Restart-PatchWarden.cmd +6 -0
  117. package/scripts/launchers/Start-PatchWarden-Direct-Tunnel.cmd +7 -0
  118. package/scripts/launchers/Start-PatchWarden-Tunnel.cmd +7 -0
  119. package/scripts/lifecycle-smoke.js +402 -8
  120. package/scripts/manage-patchwarden.ps1 +639 -0
  121. package/scripts/mcp-manifest-check.js +123 -58
  122. package/scripts/mcp-smoke.js +160 -2
  123. package/scripts/pack-clean.js +160 -5
  124. package/scripts/package-manifest-check.js +78 -0
  125. package/scripts/patchwarden-mcp-direct.cmd +7 -0
  126. package/scripts/patchwarden-mcp-stdio.cmd +1 -1
  127. package/scripts/restart-patchwarden.ps1 +5 -4
  128. package/scripts/start-patchwarden-tunnel.ps1 +261 -30
  129. package/scripts/tunnel-supervisor-smoke.js +36 -4
  130. package/scripts/unit-tests.js +36 -0
  131. package/scripts/watcher-supervisor-smoke.js +10 -6
  132. package/src/assessments/agentAssessor.ts +324 -0
  133. package/src/assessments/assessmentStore.ts +426 -0
  134. package/src/assessments/confirmCli.ts +29 -0
  135. package/src/config.ts +178 -4
  136. package/src/direct/directAudit.ts +400 -0
  137. package/src/direct/directGuards.ts +279 -0
  138. package/src/direct/directPatch.ts +258 -0
  139. package/src/direct/directSessionStore.ts +345 -0
  140. package/src/direct/directVerification.ts +138 -0
  141. package/src/doctor.ts +103 -7
  142. package/src/logging.ts +152 -0
  143. package/src/runner/agentInvocation.ts +125 -0
  144. package/src/runner/changeCapture.ts +352 -6
  145. package/src/runner/runTask.ts +279 -63
  146. package/src/runner/simpleProcess.ts +223 -0
  147. package/src/runner/watch.ts +18 -2
  148. package/src/security/commandGuard.ts +46 -4
  149. package/src/security/riskEngine.ts +160 -0
  150. package/src/security/runtimeGuard.ts +41 -0
  151. package/src/smoke-test.ts +1291 -4
  152. package/src/test/unit/android-doctor.test.ts +158 -0
  153. package/src/test/unit/chinese-path.test.ts +106 -0
  154. package/src/test/unit/command-guard.test.ts +221 -0
  155. package/src/test/unit/direct-guards.test.ts +297 -0
  156. package/src/test/unit/logging.test.ts +325 -0
  157. package/src/test/unit/path-guard.test.ts +150 -0
  158. package/src/test/unit/safe-status.test.ts +187 -0
  159. package/src/test/unit/sensitive-guard.test.ts +124 -0
  160. package/src/test/unit/sync-file.test.ts +231 -0
  161. package/src/test/unit/watcher-status.test.ts +190 -0
  162. package/src/tools/androidDoctor.ts +424 -0
  163. package/src/tools/applyPatch.ts +86 -0
  164. package/src/tools/auditSession.ts +28 -0
  165. package/src/tools/auditTask.ts +111 -7
  166. package/src/tools/createDirectSession.ts +113 -0
  167. package/src/tools/createTask.ts +405 -55
  168. package/src/tools/finalizeDirectSession.ts +144 -0
  169. package/src/tools/getTaskSummary.ts +133 -2
  170. package/src/tools/healthCheck.ts +45 -6
  171. package/src/tools/readWorkspaceFile.ts +85 -2
  172. package/src/tools/registry.ts +305 -19
  173. package/src/tools/runVerification.ts +58 -0
  174. package/src/tools/safeStatus.ts +96 -0
  175. package/src/tools/savePlan.ts +57 -7
  176. package/src/tools/searchWorkspace.ts +275 -0
  177. package/src/tools/syncFile.ts +122 -0
  178. package/src/tools/taskTemplates.ts +2 -1
  179. package/src/tools/toolCatalog.ts +37 -6
  180. package/src/tools/waitForTask.ts +3 -3
  181. package/src/version.ts +2 -2
  182. package/src/watcherStatus.ts +101 -4
  183. package/tsconfig.json +18 -17
  184. package/Check-PatchWarden-Health.cmd +0 -6
  185. package/Reset-PatchWarden-Tunnel-Key.cmd +0 -6
  186. package/Restart-PatchWarden.cmd +0 -19
  187. package/Start-PatchWarden-Tunnel.cmd +0 -7
  188. package/docs/release-v0.3.0.md +0 -43
  189. package/docs/release-v0.4.0.md +0 -74
@@ -0,0 +1,206 @@
1
+ #!/usr/bin/env node
2
+ import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
3
+ import { spawn, spawnSync } from "node:child_process";
4
+ import { join, resolve } from "node:path";
5
+ import { tmpdir } from "node:os";
6
+ import { fileURLToPath } from "node:url";
7
+
8
+ if (process.platform !== "win32") {
9
+ console.log("ok - PatchWarden control smoke skipped outside Windows");
10
+ process.exit(0);
11
+ }
12
+
13
+ const scriptDir = resolve(fileURLToPath(new URL(".", import.meta.url)));
14
+ const root = resolve(scriptDir, "..");
15
+ const manager = join(scriptDir, "manage-patchwarden.ps1");
16
+ const temp = mkdtempSync(join(tmpdir(), "patchwarden-control-smoke-"));
17
+ const mockConfig = join(temp, "patchwarden.config.json");
18
+ writeFileSync(mockConfig, JSON.stringify({
19
+ workspaceRoot: temp,
20
+ plansDir: ".patchwarden/plans",
21
+ tasksDir: ".patchwarden/tasks",
22
+ }), "utf8");
23
+ const env = {
24
+ ...process.env,
25
+ LOCALAPPDATA: join(temp, "LocalAppData"),
26
+ APPDATA: join(temp, "AppData"),
27
+ TEMP: join(temp, "Temp"),
28
+ TMP: join(temp, "Temp"),
29
+ PATCHWARDEN_CONFIG: mockConfig,
30
+ };
31
+ let fakeTunnel = null;
32
+ let fakeWatcher = null;
33
+ let healthServer = null;
34
+
35
+ try {
36
+ const statusOutput = run(["status", "all", "-Json"]);
37
+ const statuses = JSON.parse(statusOutput);
38
+ if (!Array.isArray(statuses) || statuses.length !== 2) {
39
+ throw new Error(`expected two status rows, got: ${statusOutput}`);
40
+ }
41
+ const byMode = new Map(statuses.map((entry) => [entry.mode, entry]));
42
+ if (byMode.get("core")?.tool_profile !== "chatgpt_core") {
43
+ throw new Error("Core status did not report chatgpt_core");
44
+ }
45
+ if (byMode.get("direct")?.tool_profile !== "chatgpt_direct") {
46
+ throw new Error("Direct status did not report chatgpt_direct");
47
+ }
48
+
49
+ const startPlan = run(["start", "all", "-WhatIf"]);
50
+ requireText(startPlan, "start:core");
51
+ requireText(startPlan, "start:direct");
52
+
53
+ const restartPlan = run(["restart", "direct", "-WhatIf", "-SkipBuild"]);
54
+ requireText(restartPlan, "stop:direct");
55
+ requireText(restartPlan, "start:direct");
56
+
57
+ const fakeDirectory = join(temp, "fake-tunnel");
58
+ const fakeExecutable = join(fakeDirectory, "tunnel-client.exe");
59
+ const fakeScript = join(fakeDirectory, "sleep.ps1");
60
+ const systemPowerShell = join(process.env.SystemRoot || "C:\\Windows", "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
61
+ mkdirSync(fakeDirectory, { recursive: true });
62
+ copyFileSync(systemPowerShell, fakeExecutable);
63
+ writeFileSync(fakeScript, "Start-Sleep -Seconds 120\r\n", "utf8");
64
+ fakeTunnel = spawn(
65
+ fakeExecutable,
66
+ ["-NoProfile", "-File", fakeScript, "run", "--profile", "patchwarden-direct"],
67
+ { stdio: "ignore", windowsHide: true }
68
+ );
69
+ await delay(500);
70
+ if (fakeTunnel.exitCode !== null) throw new Error("fake Tunnel process exited before stop test");
71
+ const directRuntime = join(env.LOCALAPPDATA, "patchwarden", "runtime-direct");
72
+ mkdirSync(directRuntime, { recursive: true });
73
+ mkdirSync(env.TEMP, { recursive: true });
74
+ writeFileSync(join(directRuntime, "tunnel-status.json"), JSON.stringify({
75
+ status: "stopped",
76
+ ready: false,
77
+ pid: null,
78
+ tool_profile: "chatgpt_direct",
79
+ tool_count: 9,
80
+ tools_ready: true,
81
+ }), "utf8");
82
+ writeFileSync(join(directRuntime, "tunnel-client.pid"), String(fakeTunnel.pid), "utf8");
83
+ writeFileSync(join(directRuntime, "tunnel-health-url.txt"), "http://127.0.0.1:8081", "utf8");
84
+ const legacyDirectPid = join(env.TEMP, "patchwarden-direct.pid");
85
+ const legacyDirectUrl = join(env.TEMP, "patchwarden-direct-health.url");
86
+ writeFileSync(legacyDirectPid, String(fakeTunnel.pid), "utf8");
87
+ writeFileSync(legacyDirectUrl, "http://127.0.0.1:8081", "utf8");
88
+ const stopOutput = run(["stop", "direct"]);
89
+ requireText(stopOutput, `Stopped PID ${fakeTunnel.pid}`);
90
+ await waitForExit(fakeTunnel, 5000);
91
+ if (fakeTunnel.exitCode === null) throw new Error("manager did not stop the owned Direct fixture process");
92
+ for (const stalePath of [join(directRuntime, "tunnel-client.pid"), join(directRuntime, "tunnel-health-url.txt"), legacyDirectPid, legacyDirectUrl]) {
93
+ if (existsSync(stalePath)) throw new Error(`manager did not clean stale runtime file: ${stalePath}`);
94
+ }
95
+
96
+ fakeWatcher = spawn(
97
+ process.execPath,
98
+ ["-e", "setTimeout(()=>{},120000)", join(root, "dist", "runner", "watch.js")],
99
+ { stdio: "ignore", windowsHide: true }
100
+ );
101
+ await delay(500);
102
+ if (fakeWatcher.exitCode !== null) throw new Error("fake watcher exited before kill test");
103
+ const killOutput = run(["kill", "core"]);
104
+ requireText(killOutput, `Stopped PID ${fakeWatcher.pid}`);
105
+ await waitForExit(fakeWatcher, 5000);
106
+ if (fakeWatcher.exitCode === null) throw new Error("kill core did not stop the project-scoped watcher fixture");
107
+
108
+ const coreRuntime = join(env.LOCALAPPDATA, "patchwarden", "runtime");
109
+ mkdirSync(coreRuntime, { recursive: true });
110
+ writeFileSync(join(coreRuntime, "tunnel-status.json"), JSON.stringify({
111
+ status: "stopped",
112
+ ready: false,
113
+ pid: null,
114
+ reason_code: "stale_fixture",
115
+ last_error: "stale failure",
116
+ tool_profile: "chatgpt_core",
117
+ tool_count: 16,
118
+ tools_ready: true,
119
+ }), "utf8");
120
+ healthServer = spawn(
121
+ process.execPath,
122
+ ["-e", "require('http').createServer((req,res)=>{res.writeHead(200,{'content-type':'application/json'});res.end(JSON.stringify({ok:true}))}).listen(8080,'127.0.0.1')"],
123
+ { stdio: "ignore", windowsHide: true }
124
+ );
125
+ await delay(750);
126
+ if (healthServer.exitCode !== null) throw new Error("health fallback fixture could not listen on 127.0.0.1:8080");
127
+ const coreStatusRaw = run(["status", "core", "-Json"]);
128
+ const coreStatusValue = JSON.parse(coreStatusRaw);
129
+ const coreStatus = Array.isArray(coreStatusValue) ? coreStatusValue[0] : coreStatusValue;
130
+ if (coreStatus.status !== "running" || coreStatus.ready !== true || coreStatus.health_alive !== true || coreStatus.reason_code !== "health_endpoint_ready") {
131
+ throw new Error(`health fallback did not override stale runtime JSON: ${coreStatusRaw}`);
132
+ }
133
+ const conflict = runFailure(["restart", "core", "-WhatIf", "-SkipBuild"]);
134
+ requireText(`${conflict.stdout}\n${conflict.stderr}`, "Unsafe health-port conflict");
135
+ if (healthServer.exitCode !== null) throw new Error("manager killed an unrelated health-port owner");
136
+ const scopedKill = run(["kill", "core"]);
137
+ requireText(scopedKill, "No matching Core Agent process");
138
+ if (healthServer.exitCode !== null) throw new Error("kill core terminated an unrelated process");
139
+
140
+ const expectedFiles = [
141
+ "PatchWarden.cmd",
142
+ "scripts/manage-patchwarden.ps1",
143
+ "scripts/launchers/Start-PatchWarden-Tunnel.cmd",
144
+ "scripts/launchers/Start-PatchWarden-Direct-Tunnel.cmd",
145
+ ];
146
+ for (const relativePath of expectedFiles) {
147
+ if (!existsSync(join(root, relativePath))) {
148
+ throw new Error(`missing consolidated control file: ${relativePath}`);
149
+ }
150
+ }
151
+ const rootEntry = readFileSync(join(root, "PatchWarden.cmd"), "utf8");
152
+ if (!rootEntry.includes("manage-patchwarden.ps1")) {
153
+ throw new Error("PatchWarden.cmd does not invoke the consolidated manager");
154
+ }
155
+ console.log("ok - control handles orphan cleanup, scoped kill, port conflicts, health fallback, and Core/Direct lifecycle actions");
156
+ } finally {
157
+ if (fakeTunnel?.exitCode === null) fakeTunnel.kill();
158
+ if (fakeWatcher?.exitCode === null) fakeWatcher.kill();
159
+ if (healthServer?.exitCode === null) healthServer.kill();
160
+ rmSync(temp, { recursive: true, force: true });
161
+ }
162
+
163
+ function run(args) {
164
+ const result = spawnSync(
165
+ "powershell.exe",
166
+ ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", manager, ...args],
167
+ { cwd: root, env, encoding: "utf8" }
168
+ );
169
+ if (result.status !== 0) {
170
+ throw new Error(`manager failed (${args.join(" ")}):\n${result.stdout}\n${result.stderr}`);
171
+ }
172
+ return result.stdout.trim();
173
+ }
174
+
175
+ function runFailure(args) {
176
+ const result = spawnSync(
177
+ "powershell.exe",
178
+ ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", manager, ...args],
179
+ { cwd: root, env, encoding: "utf8" }
180
+ );
181
+ if (result.status === 0) {
182
+ throw new Error(`manager unexpectedly succeeded (${args.join(" ")}):\n${result.stdout}\n${result.stderr}`);
183
+ }
184
+ return result;
185
+ }
186
+
187
+ function requireText(value, expected) {
188
+ if (!value.toLowerCase().includes(expected.toLowerCase())) {
189
+ throw new Error(`expected ${JSON.stringify(expected)} in output:\n${value}`);
190
+ }
191
+ }
192
+
193
+ function delay(milliseconds) {
194
+ return new Promise((resolvePromise) => setTimeout(resolvePromise, milliseconds));
195
+ }
196
+
197
+ function waitForExit(child, timeoutMilliseconds) {
198
+ if (child.exitCode !== null) return Promise.resolve();
199
+ return new Promise((resolvePromise, rejectPromise) => {
200
+ const timer = setTimeout(() => rejectPromise(new Error("timed out waiting for fixture process to exit")), timeoutMilliseconds);
201
+ child.once("exit", () => {
202
+ clearTimeout(timer);
203
+ resolvePromise();
204
+ });
205
+ });
206
+ }
@@ -139,7 +139,7 @@ try {
139
139
  serverStderr += chunk.toString();
140
140
  });
141
141
 
142
- await sleep(1000);
142
+ await sleep(3000);
143
143
  if (serverProcess.exitCode !== null) {
144
144
  throw new Error(`HTTP server exited early: ${serverStderr}`);
145
145
  }
@@ -274,7 +274,15 @@ try {
274
274
  stdio: ["ignore", "ignore", "pipe"],
275
275
  });
276
276
  serverProcess.stderr.on("data", (chunk) => { serverStderr += chunk.toString(); });
277
- await sleep(1000);
277
+ await sleep(3000);
278
+ // Wait for server to be ready
279
+ for (let i = 0; i < 10; i++) {
280
+ try {
281
+ const r = await fetch(`${mcpUrl}/healthz`);
282
+ if (r.status === 200) break;
283
+ } catch {}
284
+ await sleep(500);
285
+ }
278
286
 
279
287
  await test("token: no token returns 401", async () => {
280
288
  try {
@@ -0,0 +1,6 @@
1
+ @echo off
2
+ setlocal
3
+ cd /d "%~dp0..\.."
4
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0..\manage-patchwarden.ps1" status all
5
+ echo.
6
+ pause
@@ -0,0 +1,6 @@
1
+ @echo off
2
+ setlocal
3
+ cd /d "%~dp0..\.."
4
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0..\start-patchwarden-tunnel.ps1" -ForgetSavedApiKey
5
+ echo.
6
+ pause
@@ -0,0 +1,6 @@
1
+ @echo off
2
+ setlocal
3
+ cd /d "%~dp0..\.."
4
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0..\manage-patchwarden.ps1" restart core
5
+ echo.
6
+ pause
@@ -0,0 +1,7 @@
1
+ @echo off
2
+ setlocal
3
+ cd /d "%~dp0..\.."
4
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0..\start-patchwarden-tunnel.ps1" -ToolProfile chatgpt_direct -Profile patchwarden-direct -HealthListenAddr 127.0.0.1:8081 -SkipWatcher
5
+ echo.
6
+ echo PatchWarden Direct tunnel launcher exited.
7
+ pause
@@ -0,0 +1,7 @@
1
+ @echo off
2
+ setlocal
3
+ cd /d "%~dp0..\.."
4
+ powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0..\start-patchwarden-tunnel.ps1" -ToolProfile chatgpt_core -Profile patchwarden -HealthListenAddr 127.0.0.1:8080
5
+ echo.
6
+ echo PatchWarden Core tunnel launcher exited.
7
+ pause