mtech-ai-local-runner 0.1.62 → 0.1.64
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/dist/src/adapters/claude-code/adapter.js +52 -36
- package/dist/src/adapters/claude-code/runtime-options.js +5 -1
- package/dist/src/asks/routing.js +12 -1
- package/dist/src/asks/store.js +5 -1
- package/dist/src/asks/templates.js +18 -1
- package/dist/src/cli.js +4 -0
- package/dist/src/commands/claude-release.js +105 -0
- package/dist/src/safety/claude-production-host.js +2 -2
- package/dist/src/safety/claude-release-copy.js +61 -25
- package/dist/src/safety/claude-release.js +18 -1
- package/dist/src/safety/claude-review-campaign.js +123 -0
- package/dist/src/safety/claude-review-evidence.js +96 -0
- package/dist/src/safety/claude-review-fetch.js +72 -0
- package/dist/src/safety/claude-review-layout.js +92 -0
- package/dist/src/safety/claude-review-provider.js +144 -0
- package/dist/src/safety/claude-review-run.js +148 -0
- package/dist/src/safety/claude-review-sandbox.js +35 -0
- package/package.json +1 -1
- package/dist/src/daemon/job-poller.js +0 -42
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export class JobPoller {
|
|
2
|
-
deps;
|
|
3
|
-
stopped = false;
|
|
4
|
-
failures = 0;
|
|
5
|
-
constructor(deps) {
|
|
6
|
-
this.deps = deps;
|
|
7
|
-
}
|
|
8
|
-
stop() { this.stopped = true; }
|
|
9
|
-
async tick() {
|
|
10
|
-
if (this.stopped)
|
|
11
|
-
return;
|
|
12
|
-
let stage = "heartbeat";
|
|
13
|
-
try {
|
|
14
|
-
await this.deps.heartbeat?.();
|
|
15
|
-
stage = "wait";
|
|
16
|
-
const claim = await this.deps.wait();
|
|
17
|
-
stage = "execute";
|
|
18
|
-
if (claim.status === "claimed" && claim.job)
|
|
19
|
-
await this.deps.execute(claim.job);
|
|
20
|
-
this.failures = 0;
|
|
21
|
-
}
|
|
22
|
-
catch {
|
|
23
|
-
try {
|
|
24
|
-
this.deps.reportError?.({ stage, code: stage === "execute" ? "EXECUTION_UNACKNOWLEDGED" : "GATEWAY_UNAVAILABLE" });
|
|
25
|
-
}
|
|
26
|
-
catch { /* Observational logging cannot bypass stop/backoff or discard recovery state. */ }
|
|
27
|
-
// Unknown execution/terminal outcomes must reconcile before any new claim.
|
|
28
|
-
if (stage === "execute") {
|
|
29
|
-
this.stop();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
this.failures += 1;
|
|
33
|
-
const base = Math.min(30_000, 1000 * (2 ** Math.min(5, this.failures - 1)));
|
|
34
|
-
const jitter = Math.floor(base * 0.2 * (this.deps.random ?? Math.random)());
|
|
35
|
-
await this.deps.delay(base + jitter);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
async run() {
|
|
39
|
-
while (!this.stopped)
|
|
40
|
-
await this.tick();
|
|
41
|
-
}
|
|
42
|
-
}
|