@hyperwindmill/caretaker-cli 0.33.0 → 0.35.0

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 (47) hide show
  1. package/dist/cli/index.d.ts.map +1 -1
  2. package/dist/cli/index.js +25 -1
  3. package/dist/cli/orchestrator_demo.d.ts +39 -0
  4. package/dist/cli/orchestrator_demo.d.ts.map +1 -0
  5. package/dist/cli/orchestrator_demo.js +98 -0
  6. package/dist/cli/web/api_access.d.ts +38 -0
  7. package/dist/cli/web/api_access.d.ts.map +1 -0
  8. package/dist/cli/web/api_access.js +125 -0
  9. package/dist/cli/web/openapi.d.ts +12 -0
  10. package/dist/cli/web/openapi.d.ts.map +1 -0
  11. package/dist/cli/web/openapi.js +526 -0
  12. package/dist/cli/web/orchestrator.d.ts +51 -0
  13. package/dist/cli/web/orchestrator.d.ts.map +1 -0
  14. package/dist/cli/web/orchestrator.js +596 -0
  15. package/dist/cli/web/orchestrator_core.d.ts +83 -0
  16. package/dist/cli/web/orchestrator_core.d.ts.map +1 -0
  17. package/dist/cli/web/orchestrator_core.js +219 -0
  18. package/dist/cli/web/save_config.d.ts +8 -0
  19. package/dist/cli/web/save_config.d.ts.map +1 -0
  20. package/dist/cli/web/save_config.js +9 -0
  21. package/dist/cli/web/scheduler/task_review.d.ts +8 -0
  22. package/dist/cli/web/scheduler/task_review.d.ts.map +1 -1
  23. package/dist/cli/web/scheduler/task_review.js +17 -1
  24. package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
  25. package/dist/cli/web/scheduler/task_strategy.js +62 -16
  26. package/dist/cli/web/server.d.ts +7 -1
  27. package/dist/cli/web/server.d.ts.map +1 -1
  28. package/dist/cli/web/server.js +44 -25
  29. package/dist/harness/tools/builtin/task_tools.d.ts.map +1 -1
  30. package/dist/harness/tools/builtin/task_tools.js +5 -17
  31. package/dist/lib/task_git.d.ts +3 -0
  32. package/dist/lib/task_git.d.ts.map +1 -1
  33. package/dist/lib/task_git.js +29 -0
  34. package/dist/store/db.d.ts +12 -0
  35. package/dist/store/db.d.ts.map +1 -1
  36. package/dist/store/db.js +37 -0
  37. package/dist/store/json.d.ts +29 -0
  38. package/dist/store/json.d.ts.map +1 -1
  39. package/dist/store/json.js +54 -0
  40. package/dist/store/orchestrator.d.ts +50 -0
  41. package/dist/store/orchestrator.d.ts.map +1 -0
  42. package/dist/store/orchestrator.js +127 -0
  43. package/dist/webview/standalone.css +159 -1
  44. package/dist/webview/standalone.css.map +2 -2
  45. package/dist/webview/standalone.js +933 -495
  46. package/dist/webview/standalone.js.map +4 -4
  47. package/package.json +3 -3
@@ -0,0 +1,219 @@
1
+ import { decrypt, encrypt } from '../../lib/encryption.js';
2
+ import { sameHost } from './voice_proxy.js';
3
+ export const PROTOCOL_VERSION = 1;
4
+ export const MAX_BODY_BYTES = 1_048_576;
5
+ export const LEDGER_SIZE = 500;
6
+ const ALLOWED_METHODS = new Set(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']);
7
+ function isLoopbackHost(hostname) {
8
+ const h = hostname.toLowerCase();
9
+ return h === '127.0.0.1' || h === 'localhost' || h === '[::1]' || h === '::1';
10
+ }
11
+ /**
12
+ * Validates an orchestrator base URL: `https` anywhere, `http` only on loopback,
13
+ * and never with embedded userinfo. Returns null when valid, or an error string.
14
+ */
15
+ export function validateEndpoint(endpoint) {
16
+ let url;
17
+ try {
18
+ url = new URL(endpoint);
19
+ }
20
+ catch {
21
+ return 'Endpoint must be a valid URL.';
22
+ }
23
+ if (url.username || url.password) {
24
+ return 'Endpoint URL must not contain credentials.';
25
+ }
26
+ if (url.protocol === 'https:')
27
+ return null;
28
+ if (url.protocol === 'http:') {
29
+ return isLoopbackHost(url.hostname)
30
+ ? null
31
+ : 'Only https:// endpoints are allowed (http:// is allowed only for localhost, 127.0.0.1, or [::1]).';
32
+ }
33
+ return 'Endpoint must use https:// (or http:// on loopback).';
34
+ }
35
+ /**
36
+ * Clamps poll interval in seconds to 5..3600, defaulting to 15.
37
+ */
38
+ export function clampPollSeconds(value) {
39
+ const n = typeof value === 'number'
40
+ ? value
41
+ : typeof value === 'string' && value.trim() !== ''
42
+ ? Number(value)
43
+ : NaN;
44
+ if (!Number.isFinite(n))
45
+ return 15;
46
+ return Math.min(3600, Math.max(5, Math.round(n)));
47
+ }
48
+ /**
49
+ * Builds `${endpoint without trailing slashes}/${call}`.
50
+ */
51
+ export function endpointUrl(endpoint, call) {
52
+ return `${endpoint.replace(/\/+$/, '')}/${call}`;
53
+ }
54
+ /**
55
+ * Parses and normalizes an incoming orchestrator message.
56
+ * - `null`: no usable id (drop, not ledgered).
57
+ * - `{ id, error }`: ledger a 400 result.
58
+ * - `RemoteMessage`: `path` rewritten to normalized pathname + query.
59
+ */
60
+ export function parseMessage(raw) {
61
+ if (!raw || typeof raw !== 'object' || Array.isArray(raw))
62
+ return null;
63
+ const r = raw;
64
+ if (typeof r.id !== 'string' || r.id.length === 0)
65
+ return null;
66
+ const id = r.id;
67
+ if (typeof r.method !== 'string') {
68
+ return { id, error: 'Message method must be a string.' };
69
+ }
70
+ const method = r.method.toUpperCase();
71
+ if (!ALLOWED_METHODS.has(method)) {
72
+ return { id, error: `Unsupported HTTP method: ${method}` };
73
+ }
74
+ if (typeof r.path !== 'string' || !r.path.startsWith('/') || r.path.startsWith('//')) {
75
+ return { id, error: 'Message path must start with a single /.' };
76
+ }
77
+ let normalized;
78
+ try {
79
+ normalized = new URL(r.path, 'http://x');
80
+ }
81
+ catch {
82
+ return { id, error: 'Invalid message path.' };
83
+ }
84
+ if (normalized.origin !== 'http://x' || !normalized.pathname.startsWith('/')) {
85
+ return { id, error: 'Invalid message path.' };
86
+ }
87
+ const msg = {
88
+ id,
89
+ method,
90
+ path: `${normalized.pathname}${normalized.search}`,
91
+ };
92
+ if ('body' in r && r.body !== undefined) {
93
+ msg.body = r.body;
94
+ }
95
+ return msg;
96
+ }
97
+ /**
98
+ * True when the policy requires manual approval for this HTTP method.
99
+ */
100
+ export function needsApproval(policy, method) {
101
+ return policy === 'approve' && method.toUpperCase() !== 'GET';
102
+ }
103
+ /**
104
+ * Boot recovery: every `applying` record becomes `done` with a 500 result
105
+ * and its request body removed.
106
+ */
107
+ export function recoverLedger(records, now) {
108
+ const interruptedBody = encrypt(JSON.stringify({ error: 'Interrupted by a restart; outcome unknown.' }));
109
+ const resolvedAt = now.toISOString();
110
+ return records.map((r) => {
111
+ if (r.state !== 'applying')
112
+ return r;
113
+ const { body: _removed, ...rest } = r;
114
+ return {
115
+ ...rest,
116
+ state: 'done',
117
+ result: { status: 500, body: interruptedBody },
118
+ resolvedAt,
119
+ };
120
+ });
121
+ }
122
+ /**
123
+ * Keeps every record that is not (done && delivered), then the newest
124
+ * done+delivered ones until the total is LEDGER_SIZE. Order preserved.
125
+ */
126
+ export function trimLedger(records) {
127
+ if (records.length <= LEDGER_SIZE)
128
+ return records;
129
+ let pinned = 0;
130
+ let deliveredTotal = 0;
131
+ for (const r of records) {
132
+ if (r.state === 'done' && r.delivered)
133
+ deliveredTotal++;
134
+ else
135
+ pinned++;
136
+ }
137
+ const keepDelivered = Math.max(0, LEDGER_SIZE - pinned);
138
+ let toDrop = Math.max(0, deliveredTotal - keepDelivered);
139
+ if (toDrop === 0)
140
+ return records;
141
+ return records.filter((r) => {
142
+ if (r.state === 'done' && r.delivered && toDrop > 0) {
143
+ toDrop--;
144
+ return false;
145
+ }
146
+ return true;
147
+ });
148
+ }
149
+ /**
150
+ * Applies settings-save rules. A blank token keeps the stored blob unless the
151
+ * endpoint host changed (in which case the token is dropped and `purgeLedger` is true).
152
+ */
153
+ export function mergeConfigSave(saved, input) {
154
+ const endpoint = typeof input.endpoint === 'string' ? input.endpoint.trim() : '';
155
+ if (endpoint !== '') {
156
+ const err = validateEndpoint(endpoint);
157
+ if (err)
158
+ return { error: err };
159
+ }
160
+ const hostChanged = saved.endpoint !== endpoint && !sameHost(saved.endpoint, endpoint);
161
+ const typedToken = typeof input.token === 'string' ? input.token.trim() : '';
162
+ const token = typedToken !== '' ? typedToken : hostChanged ? '' : saved.token;
163
+ const policy = input.policy === 'auto' || input.policy === 'approve' ? input.policy : 'approve';
164
+ return {
165
+ config: {
166
+ enabled: Boolean(input.enabled),
167
+ name: typeof input.name === 'string' ? input.name.trim() : '',
168
+ endpoint,
169
+ token,
170
+ pollSeconds: clampPollSeconds(input.pollSeconds),
171
+ policy,
172
+ instanceId: saved.instanceId,
173
+ },
174
+ purgeLedger: hostChanged,
175
+ };
176
+ }
177
+ function maskSecrets(value) {
178
+ if (Array.isArray(value)) {
179
+ return value.map(maskSecrets);
180
+ }
181
+ if (value && typeof value === 'object') {
182
+ const out = {};
183
+ for (const [k, v] of Object.entries(value)) {
184
+ out[k] = k === 'repositoryToken' ? '••••' : maskSecrets(v);
185
+ }
186
+ return out;
187
+ }
188
+ return value;
189
+ }
190
+ /**
191
+ * Returns ledger records as view summaries (newest first).
192
+ * Request body is included only for `pending` records, with `repositoryToken` masked.
193
+ */
194
+ export function summarizeLedger(records) {
195
+ const out = [];
196
+ for (let i = records.length - 1; i >= 0; i--) {
197
+ const r = records[i];
198
+ const summary = {
199
+ id: r.id,
200
+ method: r.method,
201
+ path: r.path,
202
+ receivedAt: r.receivedAt,
203
+ state: r.state,
204
+ ...(r.result ? { status: r.result.status } : {}),
205
+ ...(r.resolvedAt ? { resolvedAt: r.resolvedAt } : {}),
206
+ delivered: r.delivered,
207
+ };
208
+ if (r.state === 'pending' && r.body !== undefined) {
209
+ try {
210
+ summary.body = maskSecrets(JSON.parse(decrypt(r.body)));
211
+ }
212
+ catch {
213
+ // Ignore unreadable body
214
+ }
215
+ }
216
+ out.push(summary);
217
+ }
218
+ return out;
219
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Keeps any project present on disk and absent from an incoming settings save,
3
+ * appended after the incoming list so incoming edits win.
4
+ */
5
+ export declare function keepMissingProjects<T extends {
6
+ id: string;
7
+ }>(onDisk: T[], incoming: T[]): T[];
8
+ //# sourceMappingURL=save_config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"save_config.d.ts","sourceRoot":"","sources":["../../../src/cli/web/save_config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAI7F"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Keeps any project present on disk and absent from an incoming settings save,
3
+ * appended after the incoming list so incoming edits win.
4
+ */
5
+ export function keepMissingProjects(onDisk, incoming) {
6
+ const incomingIds = new Set(incoming.map((p) => p.id));
7
+ const missing = onDisk.filter((p) => !incomingIds.has(p.id));
8
+ return [...incoming, ...missing];
9
+ }
@@ -2,6 +2,14 @@ import type { AgentConfig, ProviderConfig } from '../../../types.js';
2
2
  import type { Tool } from '../../../harness/tools/types.js';
3
3
  import { type CycleRecorder } from './task_cycle.js';
4
4
  export declare const MAX_REVIEW_ROUNDS = 3;
5
+ /**
6
+ * What a review verdict does to the task. Rounds are counted from the `review`
7
+ * message stream, so a task unblocked after exhausting them comes back at
8
+ * round MAX+1: each manual unblock grants exactly one more round.
9
+ */
10
+ export declare function reviewTransition(verdict: 'pass' | 'changes', round: number): 'done' | 'reopen' | 'block';
11
+ /** `2/3` within the automatic rounds, the bare number for one granted by an unblock. */
12
+ export declare function reviewRoundLabel(round: number): string;
5
13
  export declare function reviewPrompt(objective: string, branch: string, round: number): string;
6
14
  export declare function parseReviewVerdict(text: string): 'pass' | 'changes';
7
15
  export declare function runDoneReview(opts: {
@@ -1 +1 @@
1
- {"version":3,"file":"task_review.d.ts","sourceRoot":"","sources":["../../../../src/cli/web/scheduler/task_review.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAA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MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,aAAa,CAAA;CAAE,CAAC,CAsFhF"}
@@ -4,6 +4,20 @@ import { dockerDevAllowlist } from '../../../lib/docker.js';
4
4
  import { getTaskBridgeUrl, issueBridgeToken, revokeBridgeToken } from '../mcp_bridge.js';
5
5
  import { resolveCycleOutcome } from './task_cycle.js';
6
6
  export const MAX_REVIEW_ROUNDS = 3;
7
+ /**
8
+ * What a review verdict does to the task. Rounds are counted from the `review`
9
+ * message stream, so a task unblocked after exhausting them comes back at
10
+ * round MAX+1: each manual unblock grants exactly one more round.
11
+ */
12
+ export function reviewTransition(verdict, round) {
13
+ if (verdict === 'pass')
14
+ return 'done';
15
+ return round < MAX_REVIEW_ROUNDS ? 'reopen' : 'block';
16
+ }
17
+ /** `2/3` within the automatic rounds, the bare number for one granted by an unblock. */
18
+ export function reviewRoundLabel(round) {
19
+ return round <= MAX_REVIEW_ROUNDS ? `${round}/${MAX_REVIEW_ROUNDS}` : String(round);
20
+ }
7
21
  export function reviewPrompt(objective, branch, round) {
8
22
  return `You are an INDEPENDENT code reviewer. You did not write this code, and your job is to find real problems — not to be agreeable. Do not rubber-stamp.
9
23
 
@@ -26,7 +40,9 @@ Verify claims against the code — do not trust comments or commit messages.
26
40
 
27
41
  Be concrete: cite files and lines. If the work is genuinely complete and correct, say so plainly.
28
42
 
29
- This is review round ${round} of at most ${MAX_REVIEW_ROUNDS}.
43
+ ${round < MAX_REVIEW_ROUNDS
44
+ ? `This is review round ${round} of at most ${MAX_REVIEW_ROUNDS}.`
45
+ : `This is review round ${round}, the last automatic one: a CHANGES_REQUESTED verdict now hands the task back to a person instead of the developer.`}
30
46
 
31
47
  End your response with EXACTLY ONE of these two lines, and nothing after it:
32
48
  REVIEW_RESULT: PASS
@@ -1 +1 @@
1
- {"version":3,"file":"task_strategy.d.ts","sourceRoot":"","sources":["../../../../src/cli/web/scheduler/task_strategy.ts"],"names":[],"mappings":"AA8HA,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAidnE"}
1
+ {"version":3,"file":"task_strategy.d.ts","sourceRoot":"","sources":["../../../../src/cli/web/scheduler/task_strategy.ts"],"names":[],"mappings":"AA8HA,wBAAsB,oBAAoB,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAkenE"}
@@ -3,8 +3,8 @@ import * as harness from '../../../harness/index.js';
3
3
  import { loadAgents, loadConfig } from '../../../store/json.js';
4
4
  import { getTaskById, saveTask, addTaskMessage, runQuery } from '../../../store/db.js';
5
5
  import { runningTasks, runningTaskControllers, syncingProjects } from './locks.js';
6
- import { isGitRepo, ensureWorktree, agentDirIn, commitWip, finalizeDone, runBootstrap, gitCommonDir, syncProjectRepo, projectWorkingDir, pushBranch } from '../../../lib/task_git.js';
7
- import { runDoneReview, MAX_REVIEW_ROUNDS } from './task_review.js';
6
+ import { isGitRepo, ensureWorktree, BranchDivergedError, agentDirIn, commitWip, finalizeDone, runBootstrap, gitCommonDir, syncProjectRepo, projectWorkingDir, pushBranch } from '../../../lib/task_git.js';
7
+ import { runDoneReview, MAX_REVIEW_ROUNDS, reviewTransition, reviewRoundLabel } from './task_review.js';
8
8
  import { openCycle, filterHandoffMessages, resolveCycleOutcome } from './task_cycle.js';
9
9
  import { claudeCodeTaskExtras } from '../../../harness/claude_code_runner.js';
10
10
  import { acpTaskExtras } from '../../../harness/acp_policy.js';
@@ -177,7 +177,26 @@ export async function runTaskHeartbeatTick(now) {
177
177
  mountRoot = task.worktreePath;
178
178
  }
179
179
  else if (await isGitRepo(baseWorkingDir)) {
180
- const wt = await ensureWorktree(baseWorkingDir, task.id, task.title, task.branch);
180
+ let wt;
181
+ try {
182
+ wt = await ensureWorktree(baseWorkingDir, task.id, task.title, task.branch);
183
+ }
184
+ catch (wtErr) {
185
+ if (!(wtErr instanceof BranchDivergedError))
186
+ throw wtErr;
187
+ task.status = 'blocked';
188
+ task.blockedReason = wtErr.message;
189
+ task.updatedAt = new Date().toISOString();
190
+ await saveTask(task);
191
+ await addTaskMessage({
192
+ taskId: task.id,
193
+ role: 'assistant',
194
+ messageType: 'block',
195
+ content: `Task branch diverged from the remote — task blocked.\n\n${wtErr.message}`,
196
+ });
197
+ console.error(`[task_heartbeat] Task #${task.id} branch diverged, blocked:`, wtErr.message);
198
+ return;
199
+ }
181
200
  task.branch = wt.branch;
182
201
  task.worktreePath = wt.worktreePath;
183
202
  await saveTask(task);
@@ -595,6 +614,7 @@ async function runReviewCycle(opts) {
595
614
  const round = priorReviews + 1;
596
615
  let verdict = 'pass';
597
616
  let reviewText = '';
617
+ let reviewError = null;
598
618
  let cycle;
599
619
  try {
600
620
  const review = await runDoneReview({
@@ -617,9 +637,10 @@ async function runReviewCycle(opts) {
617
637
  cycle = review.cycle;
618
638
  }
619
639
  catch (reviewErr) {
620
- // A broken review must not trap the task in reviewing — finalize as pass.
621
- console.error(`[task_heartbeat] Task #${task.id} review failed, finalizing:`, reviewErr);
622
- verdict = 'pass';
640
+ // A review that could not run proves nothing about the work: it must
641
+ // neither trap the task in reviewing nor pass it. Blocked below.
642
+ reviewError = reviewErr instanceof Error ? reviewErr.message : String(reviewErr);
643
+ console.error(`[task_heartbeat] Task #${task.id} review failed:`, reviewErr);
623
644
  }
624
645
  // The review cycle's session closes once its verdict is written (the recap
625
646
  // is the review text), or at once when a Pause lands mid-review.
@@ -633,12 +654,27 @@ async function runReviewCycle(opts) {
633
654
  await closeCycle();
634
655
  return;
635
656
  }
657
+ if (reviewError !== null) {
658
+ // No review message is written, so the failed attempt uses up no round.
659
+ const reason = `The review could not run, so the task was not finalized: ${reviewError}`;
660
+ current.status = 'blocked';
661
+ current.blockedReason = reason;
662
+ current.updatedAt = new Date().toISOString();
663
+ await saveTask(current);
664
+ await addTaskMessage({
665
+ taskId: task.id,
666
+ role: 'assistant',
667
+ messageType: 'block',
668
+ content: `${reason}\n\nThe worktree and branch are kept. Fix the reviewer agent or its provider and unblock the task; the review runs again at the next completion.`,
669
+ });
670
+ return;
671
+ }
636
672
  if (reviewText) {
637
673
  await addTaskMessage({
638
674
  taskId: task.id,
639
675
  role: 'user',
640
676
  messageType: 'review',
641
- content: `[CODE REVIEW round ${round}/${MAX_REVIEW_ROUNDS}] verdict=${verdict}\n\n${reviewText}`,
677
+ content: `[CODE REVIEW round ${reviewRoundLabel(round)}] verdict=${verdict}\n\n${reviewText}`,
642
678
  // role is 'user' so the verdict replays into the agent's history as feedback,
643
679
  // but the reviewer agent produced it — capture that for the log display.
644
680
  agentLabel: `${agent.name} Ā· ${agent.model}`,
@@ -646,7 +682,8 @@ async function runReviewCycle(opts) {
646
682
  }
647
683
  await closeCycle();
648
684
  console.log(`[task_heartbeat] Task #${task.id} review round ${round}: ${verdict}`);
649
- if (verdict === 'changes' && round < MAX_REVIEW_ROUNDS) {
685
+ const transition = reviewTransition(verdict, round);
686
+ if (transition === 'reopen') {
650
687
  // Reopen: keep the worktree; the review message is replayed to the agent next cycle.
651
688
  current.status = 'active';
652
689
  current.noProgressCount = 0;
@@ -654,15 +691,24 @@ async function runReviewCycle(opts) {
654
691
  await saveTask(current);
655
692
  console.log(`[task_heartbeat] Task #${task.id} reopened by review (round ${round}).`);
656
693
  }
694
+ else if (transition === 'block') {
695
+ // Rounds exhausted with findings outstanding: a task marked done reads as
696
+ // ready to whoever verifies it, so hand it to a person instead. Worktree and
697
+ // branch are kept; unblocking resumes the developer and grants one more round.
698
+ const reason = `Review rounds exhausted (${MAX_REVIEW_ROUNDS}) with findings still outstanding.`;
699
+ current.status = 'blocked';
700
+ current.blockedReason = reason;
701
+ current.updatedAt = new Date().toISOString();
702
+ await saveTask(current);
703
+ await addTaskMessage({
704
+ taskId: task.id,
705
+ role: 'assistant',
706
+ messageType: 'block',
707
+ content: `${reason} The worktree and branch are kept; unblock the task to let the developer address the last review, which grants one more review round.`,
708
+ });
709
+ console.log(`[task_heartbeat] Task #${task.id} blocked: review rounds exhausted (round ${round}).`);
710
+ }
657
711
  else {
658
- if (verdict === 'changes') {
659
- await addTaskMessage({
660
- taskId: task.id,
661
- role: 'assistant',
662
- messageType: 'system',
663
- content: `Finished as done despite outstanding review findings after ${MAX_REVIEW_ROUNDS} rounds.`,
664
- });
665
- }
666
712
  if (!(await pushOrBlock(current, project)))
667
713
  return;
668
714
  if (current.dockerContainer) {
@@ -1,3 +1,5 @@
1
+ import { Hono } from 'hono';
2
+ import { type ApiListenerOptions } from './api_access.js';
1
3
  import * as harness from '../../harness/index.js';
2
4
  import type { AgentConfig, ProviderConfig } from '../../types.js';
3
5
  import type { ConfirmDecision } from 'webview-ui/bridge';
@@ -34,5 +36,9 @@ export declare class WebSessionController {
34
36
  }>, voiceConversation?: boolean): Promise<void>;
35
37
  abort(): void;
36
38
  }
37
- export declare function startServer(port: number, host: string): Promise<void>;
39
+ export declare function createApp(apiListener: ApiListenerOptions, fetchImpl?: typeof fetch): Hono;
40
+ export declare function startServer(port: number, host: string, api?: {
41
+ port?: number;
42
+ host?: string;
43
+ }): Promise<void>;
38
44
  //# sourceMappingURL=server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/cli/web/server.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAC;AA8ClD,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAgC,MAAM,gBAAgB,CAAC;AAChG,OAAO,KAAK,EAAe,eAAe,EAA0B,MAAM,mBAAmB,CAAC;AAuC9F,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,YAAY,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,O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AC,QAAQ,CAAC,SAAS,CAAC,CAAS;gBAGjB,IAAI,EAAE;QACrB,KAAK,EAAE,WAAW,CAAC;QACnB,QAAQ,EAAE,cAAc,CAAC;QACzB,KAAK,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC;QACtB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB;IAMH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,eAAe,IAAI,GAAG;IAIhB,KAAK,CACT,MAAM,EAAE,MAAM,EACd,EAAE,EAAE,aAAa,EACjB,cAAc,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EACtE,iBAAiB,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,IAAI,CAAC;IAsFhB,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,SAAS,CAAC,WAAW,EAAE,kBAAkB,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,GAAG,IAAI,CA8oBzF;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAO,GACzC,OAAO,CAAC,IAAI,CAAC,CAwnBf"}
@@ -2,13 +2,16 @@ import { fileURLToPath } from 'node:url';
2
2
  import path from 'node:path';
3
3
  import fs from 'node:fs';
4
4
  import { watch, existsSync, mkdirSync } from 'node:fs';
5
- import { randomUUID } from 'node:crypto';
6
5
  import { Hono } from 'hono';
6
+ import { applyApiListener, registerApiAccess } from './api_access.js';
7
+ import { registerOpenApi } from './openapi.js';
8
+ import { registerOrchestrator, startOrchestrator } from './orchestrator.js';
9
+ import { keepMissingProjects } from './save_config.js';
7
10
  import { stream } from 'hono/streaming';
8
11
  import { serve } from '@hono/node-server';
9
12
  import { WebSocketServer, WebSocket } from 'ws';
10
13
  import * as harness from '../../harness/index.js';
11
- import { getDb, getTaskById, saveTask, createTask, addTaskMessage, deleteTask, deleteTaskSessions, runQuery, tryNormalizeChecklistStatus } from '../../store/db.js';
14
+ import { getDb, getTaskById, saveTask, createTask, addTaskMessage, deleteTask, deleteTaskSessions, runQuery, tryNormalizeChecklistStatus, buildChecklist } from '../../store/db.js';
12
15
  import { discardWorktree, syncProjectRepo, projectRepoStatus, managedRepoDir } from '../../lib/task_git.js';
13
16
  import { removeContainer } from '../../lib/docker.js';
14
17
  import { validateRepositoryUrl } from '../../lib/repo_url.js';
@@ -154,13 +157,16 @@ export class WebSessionController {
154
157
  this.inflight?.abort();
155
158
  }
156
159
  }
157
- export async function startServer(port, host) {
160
+ export function createApp(apiListener, fetchImpl) {
158
161
  const app = new Hono();
162
+ registerApiAccess(app, apiListener);
163
+ registerOpenApi(app);
159
164
  app.route('/api/fs', fsRouter);
160
165
  registerTaskBridge(app);
161
166
  registerVoiceProxy(app);
162
167
  registerVoiceBackend(app);
163
168
  registerVoiceBuiltin(app);
169
+ registerOrchestrator(app, fetchImpl);
164
170
  // Pure-Node static serving with absolute path validation and fallback
165
171
  app.get('/', (c) => {
166
172
  try {
@@ -424,23 +430,21 @@ export async function startServer(port, host) {
424
430
  }
425
431
  }
426
432
  }
427
- const checklistItems = (checklist || []).map((item, idx) => ({
428
- id: randomUUID(),
429
- text: item.text,
430
- status: 'pending',
431
- order: idx,
432
- }));
433
+ // Items may arrive already ticked; one without a status starts pending.
434
+ const built = buildChecklist(checklist ?? [], 'pending');
435
+ if ('error' in built)
436
+ return c.json({ ok: false, error: built.error }, 400);
433
437
  const config = await loadConfig();
434
438
  const project = (config.projects || []).find((p) => p.id === projectId);
435
439
  const taskPlanning = typeof planningEnabled === 'boolean' ? planningEnabled : null;
436
440
  const startStatus = startActive
437
441
  ? (resolvePlanningEnabled({ planningEnabled: taskPlanning }, project) ? 'planning' : 'active')
438
442
  : 'draft';
439
- await createTask({
443
+ const task = await createTask({
440
444
  projectId,
441
445
  title,
442
446
  objective,
443
- checklist: checklistItems,
447
+ checklist: built.checklist,
444
448
  status: startStatus,
445
449
  blockedReason: null,
446
450
  noProgressCount: 0,
@@ -454,7 +458,7 @@ export async function startServer(port, host) {
454
458
  sddEnabled: typeof sddEnabled === 'boolean' ? sddEnabled : null,
455
459
  maxRunSeconds: typeof maxRunSeconds === 'number' && maxRunSeconds > 0 ? maxRunSeconds : null,
456
460
  });
457
- return c.json({ ok: true });
461
+ return c.json({ ok: true, task });
458
462
  });
459
463
  app.get('/api/tasks/:id/messages', async (c) => {
460
464
  const taskId = c.req.param('id');
@@ -649,6 +653,22 @@ export async function startServer(port, host) {
649
653
  }
650
654
  return c.json({ ok: true });
651
655
  });
656
+ // Replace the whole checklist — same semantics as mcp__task__task_update_checklist:
657
+ // items with an id keep it, the others get a new one, order follows the array.
658
+ app.put('/api/tasks/:id/checklist', async (c) => {
659
+ const taskId = c.req.param('id');
660
+ const body = await c.req.json().catch(() => null);
661
+ const built = buildChecklist(body?.checklist);
662
+ if ('error' in built)
663
+ return c.json({ ok: false, error: built.error }, 400);
664
+ const task = await getTaskById(taskId);
665
+ if (!task)
666
+ return c.json({ ok: false, error: `Task ${taskId} not found` }, 404);
667
+ task.checklist = built.checklist;
668
+ task.updatedAt = new Date().toISOString();
669
+ await saveTask(task);
670
+ return c.json({ ok: true, checklist: task.checklist });
671
+ });
652
672
  app.patch('/api/tasks/:id/agent', async (c) => {
653
673
  const taskId = c.req.param('id');
654
674
  const body = await c.req.json();
@@ -761,11 +781,19 @@ export async function startServer(port, host) {
761
781
  }
762
782
  return c.json({ ok: true, title: task.title, objective: task.objective });
763
783
  });
784
+ return app;
785
+ }
786
+ export async function startServer(port, host, api = {}) {
787
+ // Token-authenticated listener for clients outside the browser (api_access.ts).
788
+ const apiListener = { webPort: port, host: api.host ?? host, portOverride: api.port };
789
+ const app = createApp(apiListener);
764
790
  const nodeServer = serve({
765
791
  fetch: app.fetch,
766
792
  port,
767
793
  hostname: host,
768
794
  });
795
+ // Fire-and-forget: a busy API port is reported in the settings, never fatal.
796
+ void applyApiListener(app, apiListener);
769
797
  const bridgeHost = host === '0.0.0.0' || host === '::' ? '127.0.0.1' : host;
770
798
  setTaskBridgeUrl(`http://${bridgeHost}:${port}/api/mcp/task`);
771
799
  const wss = new WebSocketServer({ noServer: true });
@@ -783,6 +811,7 @@ export async function startServer(port, host) {
783
811
  console.log(`\nšŸš€ Caretaker Server running at http://${host}:${port}\n`);
784
812
  // Start the background scheduler trigger daemon
785
813
  startBackgroundScheduler();
814
+ startOrchestrator(app);
786
815
  // Opt-in: start the managed local speech backend if configured to. Never
787
816
  // awaited — a first run pulls 2.08 GB and must not hang server boot.
788
817
  maybeAutoStartBackend();
@@ -1100,20 +1129,10 @@ export async function startServer(port, host) {
1100
1129
  post({ type: 'error', message: idError });
1101
1130
  return;
1102
1131
  }
1103
- // A project that still has tasks must be deleted through DELETE /api/projects/:id
1104
- // (which removes tasks, worktrees and the managed clone) — not silently dropped
1105
- // from a config save. Also blocks id "renames", which arrive as drop+add.
1132
+ // Project deletion goes only through DELETE /api/projects/:id: a stale
1133
+ // settings form copy must not delete a project created over REST.
1106
1134
  const prev = await loadConfig();
1107
- const incomingIds = new Set((msg.config.projects || []).map((p) => p.id));
1108
- for (const old of prev.projects || []) {
1109
- if (incomingIds.has(old.id))
1110
- continue;
1111
- const remaining = (await runQuery(`SELECT * FROM tasks WHERE projectId = '${old.id}'`));
1112
- if (remaining.length > 0) {
1113
- post({ type: 'error', message: `Project "${old.name}" still has ${remaining.length} task(s) — delete it from the Projects panel instead.` });
1114
- return;
1115
- }
1116
- }
1135
+ msg.config.projects = keepMissingProjects(prev.projects || [], msg.config.projects || []);
1117
1136
  // The settings form saves the whole config through here, so this
1118
1137
  // — not POST /api/projects — is the write path that actually
1119
1138
  // needs to enforce the repository-URL rules.
@@ -1 +1 @@
1
- {"version":3,"file":"task_tools.d.ts","sourceRoot":"","sources":["../../../../src/harness/tools/builtin/task_tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAepD,eAAO,MAAM,gBAAgB,EAAE,IAmD9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IAqCrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,IAoDjC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,IAmEnC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAiC5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IAoC3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,IA2C3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IA4B7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAgG5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IA+B5B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAwC7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAoC9B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAwC7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IA+CrC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,IAkC7B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,IA8B/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IA0D5B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,IAgD9B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,IAuC5B,CAAC"}
1
+ {"version":3,"file":"task_tools.d.ts","sourceRoot":"","sources":["../../../../src/harness/tools/builtin/task_tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,aAAa,CAAC;AAepD,eAAO,MAAM,gBAAgB,EAAE,IAmD9B,CAAC;AA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