@hearsay-tools/squawk 0.19.0-dev.9160 → 0.19.0-dev.9168

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/dist/delegation/routes.d.ts +78 -78
  2. package/dist/delegation/workspace-removal.d.ts +1 -1
  3. package/dist/delegation/workspace-removal.js +1 -1
  4. package/dist/delegation/workspace-removal.js.map +1 -1
  5. package/dist/features/hosts/routes.d.ts +44 -44
  6. package/dist/features/webhooks/routes.d.ts +38 -38
  7. package/dist/git-command.d.ts +11 -0
  8. package/dist/git-command.js +14 -0
  9. package/dist/git-command.js.map +1 -1
  10. package/dist/git-worktree-claims.d.ts +96 -0
  11. package/dist/git-worktree-claims.js +219 -0
  12. package/dist/git-worktree-claims.js.map +1 -0
  13. package/dist/git-worktree-lock.d.ts +4 -3
  14. package/dist/git-worktree-lock.js +220 -66
  15. package/dist/git-worktree-lock.js.map +1 -1
  16. package/dist/server/models-routes.d.ts +12 -12
  17. package/dist/server/providers-routes.d.ts +58 -58
  18. package/dist/server/repo-routes.d.ts +13 -13
  19. package/dist/server/runners-routes.d.ts +10 -10
  20. package/dist/server/runs-routes.d.ts +16 -16
  21. package/dist/server/server.d.ts +58 -58
  22. package/dist/server/workspace-live-routes.d.ts +5 -5
  23. package/dist/server/workspace-routes.d.ts +85 -85
  24. package/package.json +4 -4
  25. package/web/dist/assets/{accounts-section-m_1ntZJh.js → accounts-section-Bnr89jmC.js} +1 -1
  26. package/web/dist/assets/{activity-motion-DDqgr8eF.js → activity-motion-BW0tAmYF.js} +1 -1
  27. package/web/dist/assets/{activity-route-BlEZZxyI.js → activity-route-C2zP5vVV.js} +1 -1
  28. package/web/dist/assets/{agent-config-section-wICtFVks.js → agent-config-section-CwK_izpU.js} +1 -1
  29. package/web/dist/assets/{agent-defaults-section-BC9Ypg0g.js → agent-defaults-section-RyEogH0g.js} +1 -1
  30. package/web/dist/assets/{appearance-fkDdWPlG.js → appearance-DvoRcoRX.js} +1 -1
  31. package/web/dist/assets/{archive-on-merge-field-B6kX09p-.js → archive-on-merge-field-DWPtF9dh.js} +1 -1
  32. package/web/dist/assets/ask-card-D-om0EtP.js +9 -0
  33. package/web/dist/assets/{automations-route-BfOpJjLK.js → automations-route-DfGE4xWT.js} +1 -1
  34. package/web/dist/assets/{commit-list-StLehTiQ.js → commit-list-CPJLP4DU.js} +1 -1
  35. package/web/dist/assets/{diff-DEw-tkVq.js → diff-BQJN6jzN.js} +2 -2
  36. package/web/dist/assets/{diff-controls-CSO8HgZ0.js → diff-controls-AsSX7gfO.js} +1 -1
  37. package/web/dist/assets/{diff-view-BcU4Rnuo.js → diff-view-BW5bbiaq.js} +1 -1
  38. package/web/dist/assets/{discard-changes-dialog-BEsdWdyJ.js → discard-changes-dialog-Bv4yc0N1.js} +1 -1
  39. package/web/dist/assets/{file-preview-_4nAs_Ai.js → file-preview-CnrFxbea.js} +1 -1
  40. package/web/dist/assets/{git-toolbar-DXnIUFi1.js → git-toolbar-C7iolhIi.js} +1 -1
  41. package/web/dist/assets/{github-g-Ykk4uE.js → github-DGElvfMU.js} +1 -1
  42. package/web/dist/assets/{global-activity-route-OsAvUny-.js → global-activity-route-Dijwg4OL.js} +1 -1
  43. package/web/dist/assets/index-BVRdRJAN.css +1 -0
  44. package/web/dist/assets/{index-Dp7K74Jw.js → index-DPfg7xSB.js} +4 -4
  45. package/web/dist/assets/{markdown-BB-PN03o.js → markdown-Cljq4S1h.js} +1 -1
  46. package/web/dist/assets/{option-select-Bmm4ktgQ.js → option-select-BcTkv-7t.js} +1 -1
  47. package/web/dist/assets/{preferences-section-dKDCZSWD.js → preferences-section-CEKXGhEj.js} +1 -1
  48. package/web/dist/assets/{preview-pane-connected-DBbCXW1b.js → preview-pane-connected-CKRBfx7t.js} +1 -1
  49. package/web/dist/assets/{project-location-DJjcFmsE.js → project-location-hufc_p8y.js} +1 -1
  50. package/web/dist/assets/{projects-section-CVFyzORg.js → projects-section-vOFZ4lbx.js} +1 -1
  51. package/web/dist/assets/{prompt-templates-section-Jj1YbCwG.js → prompt-templates-section-Caash2nq.js} +1 -1
  52. package/web/dist/assets/{remote-settings-notice-Czl9yS5W.js → remote-settings-notice-fNgh5LdN.js} +1 -1
  53. package/web/dist/assets/{repo-git-C9N9wa5l.js → repo-git-5MK_RAR6.js} +1 -1
  54. package/web/dist/assets/{report-reader-Ci4sWoe1.js → report-reader-CK1WDtEH.js} +1 -1
  55. package/web/dist/assets/{reports-CQPRtR5G.js → reports-B-GImLAo.js} +1 -1
  56. package/web/dist/assets/{resources-section-lLpdP6MD.js → resources-section-ApF3gXrw.js} +1 -1
  57. package/web/dist/assets/{review-notes-drafts-BjXqp0gY.js → review-notes-drafts-BdjEFs1G.js} +1 -1
  58. package/web/dist/assets/{review-panel-B4dp-Rol.js → review-panel-D4zmYH8O.js} +1 -1
  59. package/web/dist/assets/{review-strip-BE71YjB6.js → review-strip-BpHXklAn.js} +1 -1
  60. package/web/dist/assets/{run-header-DvbVw3uo.js → run-header-BUe92WWr.js} +1 -1
  61. package/web/dist/assets/{select-CYo1lo6a.js → select-CwDhRDtw.js} +1 -1
  62. package/web/dist/assets/{session-context-section-B_NEOGby.js → session-context-section-C87jx7RB.js} +1 -1
  63. package/web/dist/assets/{settings-agent-picker-DeAST7qR.js → settings-agent-picker-Dk8yJ57U.js} +1 -1
  64. package/web/dist/assets/{settings-save-bar-Dd3bTznK.js → settings-save-bar-cu8BKCGT.js} +1 -1
  65. package/web/dist/assets/{settings-shell-Bt7NYun7.js → settings-shell-mhQfQKf1.js} +1 -1
  66. package/web/dist/assets/{sidebar-section-DdrFJBTL.js → sidebar-section-DOQ5N1L6.js} +1 -1
  67. package/web/dist/assets/{skills-DNCuhhKf.js → skills-DXJ1gQBD.js} +1 -1
  68. package/web/dist/assets/{task-changes-CdAzeh9M.js → task-changes-D9Sdmpmw.js} +1 -1
  69. package/web/dist/assets/{task-commits-CzZJZj2x.js → task-commits-A0UIqxpL.js} +1 -1
  70. package/web/dist/assets/{task-file-scope-BuFeMG6a.js → task-file-scope-ID220XKo.js} +1 -1
  71. package/web/dist/assets/{task-files-BFdMVAb3.js → task-files-Id2tuAAG.js} +1 -1
  72. package/web/dist/assets/{task-github-item-Dv0Uflz7.js → task-github-item-YKUcwp2o.js} +1 -1
  73. package/web/dist/assets/task-thread-A_vkygGX.js +2 -0
  74. package/web/dist/assets/{task-thread-a6CXLxwn.css → task-thread-BObu0KsD.css} +1 -1
  75. package/web/dist/assets/{thread-state-DqBwIoCM.js → thread-state-6-BzRrJ_.js} +1 -1
  76. package/web/dist/assets/{use-finish-run-CFEVvqeg.js → use-finish-run-DO-nnAaa.js} +1 -1
  77. package/web/dist/assets/{use-hand-to-agent-state-BYN578_s.js → use-hand-to-agent-state-CADaL8U8.js} +1 -1
  78. package/web/dist/assets/use-path-bases-CFAmFn_E.js +1 -0
  79. package/web/dist/assets/{workflows-IT5WTfLr.js → workflows-DOLG-Rns.js} +1 -1
  80. package/web/dist/assets/{workspace-tools-D_opTe6D.js → workspace-tools-DTCJVDTE.js} +1 -1
  81. package/web/dist/assets/{worktrees-section-B8ycJMoK.js → worktrees-section-BOHDbywt.js} +1 -1
  82. package/web/dist/index.html +2 -2
  83. package/dist/git-worktree-lock-helper.d.ts +0 -30
  84. package/dist/git-worktree-lock-helper.js +0 -300
  85. package/dist/git-worktree-lock-helper.js.map +0 -1
  86. package/web/dist/assets/ask-card-Cue5EajQ.js +0 -9
  87. package/web/dist/assets/index-D_WkVdwL.css +0 -1
  88. package/web/dist/assets/task-thread-C98mqSie.js +0 -2
  89. package/web/dist/assets/use-path-bases-B238cLk1.js +0 -1
@@ -1,9 +1,7 @@
1
- import { spawn } from 'node:child_process';
2
- import { realpath } from 'node:fs/promises';
1
+ import { open, readFile, realpath, stat, writeFile } from 'node:fs/promises';
3
2
  import { join } from 'node:path';
4
- import { fileURLToPath } from 'node:url';
5
- import { gitEnv, runGit } from './git-command.js';
6
- import { MAX_QUEUED_WAIT_MS } from './git-worktree-lock-helper.js';
3
+ import { runGit, spawnGatedGit } from './git-command.js';
4
+ import { acquireMutationClaim, claimFiles, mayExist, MAX_QUEUED_WAIT_MS, } from './git-worktree-claims.js';
7
5
  /** The holder as one phrase: `worker-destroy for <id> (pid 42)`; a claim without a label is an unknown operation. */
8
6
  export function describeMutationHolder(holder) {
9
7
  return `${holder.operation ?? 'an unknown operation'}${holder.owner ? ` for ${holder.owner}` : ''} (pid ${holder.pid})`;
@@ -15,9 +13,13 @@ export class WorktreeMutationLockTimeout extends Error {
15
13
  this.holder = holder;
16
14
  }
17
15
  }
16
+ /** The most git output a command under the lock may leave, per stream. */
17
+ const MAX_OUTPUT_BYTES = 32 * 1024 * 1024;
18
+ const CHILDREN_RUNNING = 'Git child processes of the timed-out command may still be running';
18
19
  /**
19
- * Serialize mutations by canonical Git common directory. The keeper retains its claim until its
20
- * Git children exit, including after caller IPC closes.
20
+ * Serialize mutations by canonical Git common directory (ADR 0003, ADR 0076). The caller holds the
21
+ * claim itself; each Git command runs in its own process group, recorded in the claim before git
22
+ * starts, so the claim outlives a caller that dies while its git still runs.
21
23
  */
22
24
  export async function withWorktreeMutation(repoRoot, operation, options = {}) {
23
25
  const waitMs = options.waitMs ?? 120_000;
@@ -29,71 +31,223 @@ export async function withWorktreeMutation(repoRoot, operation, options = {}) {
29
31
  // One deadline for finding the common directory and for the queue: `waitMs` bounds both together.
30
32
  const startedAt = Date.now();
31
33
  const common = await runGit(['rev-parse', '--path-format=absolute', '--git-common-dir'], { cwd: repoRoot, timeout: Math.max(1, Math.min(30_000, waitMs)) }).then(({ stdout }) => stdout.trim(), (error) => { throw new Error(`cannot resolve Git common directory: ${error.stderr.trim() || error.message}`); });
32
- const claims = join(await realpath(common), 'cezar-worktree-mutations');
33
- const source = import.meta.url.endsWith('.ts');
34
- const helper = fileURLToPath(new URL(source ? './git-worktree-lock-helper.ts' : './git-worktree-lock-helper.js', import.meta.url));
35
- const keeper = spawn(process.execPath, [...(source ? ['--import', import.meta.resolve('tsx')] : []), helper, claims, String(Math.max(0, waitMs - (Date.now() - startedAt))), String(perClaimMs), ...(options.label ? [JSON.stringify(options.label)] : [])], {
36
- stdio: ['ignore', 'ignore', 'pipe', 'ipc'],
37
- // Establish the process group before a claim or Git child can exist.
38
- detached: process.platform !== 'win32',
39
- // Do not inherit tsx loaders or the caller's Node inspector flags. The keeper's Git children
40
- // inherit this env, so it carries no repository location variables either.
41
- env: gitEnv(),
42
- });
43
- let failure;
44
- let stderr = '';
45
- keeper.stderr.on('data', data => { stderr = (stderr + String(data)).slice(-4000); });
46
- const pending = new Map();
47
- let readyResolve;
48
- let readyReject;
49
- const ready = new Promise((resolve, reject) => { readyResolve = resolve; readyReject = reject; });
50
- const fail = (error) => {
51
- failure = error;
52
- readyReject(error);
53
- for (const request of pending.values())
54
- request.reject(error);
55
- pending.clear();
34
+ const directory = join(await realpath(common), 'cezar-worktree-mutations');
35
+ const acquired = await acquireMutationClaim(directory, {
36
+ waitMs: Math.max(0, waitMs - (Date.now() - startedAt)), perClaimMs, ...(options.label ? { label: options.label } : {}),
37
+ }).catch((error) => { throw new Error(`worktree mutation coordination failed: ${String(error)}`); });
38
+ if ('holder' in acquired)
39
+ throw new WorktreeMutationLockTimeout(acquired.holder);
40
+ const session = mutationSession(acquired.claim);
41
+ try {
42
+ return await operation(session.git);
43
+ }
44
+ finally {
45
+ await session.close();
46
+ }
47
+ }
48
+ /** The `git` an operation gets: one command at a time, each published in the claim while it runs. */
49
+ function mutationSession(claim) {
50
+ let queue = Promise.resolve();
51
+ let refusal;
52
+ let survivors;
53
+ const git = (cwd, args, timeout, input) => {
54
+ const run = queue.then(async () => {
55
+ // A command whose children may still write admits no further mutation.
56
+ if (refusal)
57
+ throw refusal;
58
+ const outcome = await runClaimed(claim, { cwd, args, timeout, input }).catch((error) => {
59
+ refusal = new Error(`worktree mutation command failed: ${String(error)}`);
60
+ throw refusal;
61
+ });
62
+ if (outcome.survivors !== undefined) {
63
+ survivors = outcome.survivors;
64
+ refusal = new Error(`worktree mutation command failed: ${CHILDREN_RUNNING}`);
65
+ }
66
+ return outcome.result;
67
+ });
68
+ queue = run.catch(() => undefined);
69
+ return run;
56
70
  };
57
- keeper.on('error', fail);
58
- keeper.on('message', (message) => {
59
- if (message.kind === 'ready')
60
- readyResolve();
61
- else if (message.kind === 'error')
62
- fail(message.code === 'lock_timeout' ? new WorktreeMutationLockTimeout(message.holder) : new Error(message.error));
63
- else if (message.kind === 'result') {
64
- pending.get(message.id)?.resolve(message.result);
65
- pending.delete(message.id);
66
- }
67
- });
71
+ return {
72
+ git,
73
+ async close() {
74
+ await queue;
75
+ // The claim outlives this caller: the group probe frees it once every member is gone.
76
+ if (survivors !== undefined)
77
+ await claim.leaveToGroup(survivors);
78
+ else
79
+ await claim.release();
80
+ },
81
+ };
82
+ }
83
+ function runClaimed(claim, command) {
84
+ return process.platform === 'win32' ? runWindows(claim, command) : runGrouped(claim, command);
85
+ }
86
+ /** Windows has no process groups: the claim says git runs while it does, and a caller that dies
87
+ * meanwhile leaves a claim no reader can prove free (`readMutationClaim`). */
88
+ async function runWindows(claim, command) {
89
+ await claim.write({ gitRunning: true });
90
+ const result = await runGit(command.args, { cwd: command.cwd, maxBuffer: MAX_OUTPUT_BYTES, timeout: command.timeout, input: command.input ?? '' }).then(({ stdout, stderr }) => ({ ok: true, stdout, stderr }), (error) => ({ ok: false, stdout: error.stdout ?? '', stderr: error.stderr || error.message || '',
91
+ ...(error.killed && command.timeout ? { timedOut: true } : {}) }));
92
+ await claim.write({ gitRunning: false });
93
+ // Its children may still run, and a kept claim could never be freed here: it is released as
94
+ // usual, and only the caller's rollback and retry are skipped.
95
+ return { result: result.timedOut ? { ...result, childrenRunning: true, stderr: `${result.stderr}\n${CHILDREN_RUNNING}`.trim() } : result };
96
+ }
97
+ /**
98
+ * Run one Git command in its own process group. Its output goes to files beside the claim, so git
99
+ * finishes even when this caller dies. The claim names the group before the gate opens: no git
100
+ * runs that a reader of the claim cannot see.
101
+ */
102
+ async function runGrouped(claim, command) {
103
+ const files = claimFiles(claim.path);
104
+ const { child, exited, gate } = await startGated(files, command);
105
+ const group = child.pid;
106
+ if (group === undefined) {
107
+ const end = await exited;
108
+ return { result: { ok: false, stdout: '', stderr: 'error' in end ? end.error.message : `Command failed: git ${command.args.join(' ')}` } };
109
+ }
110
+ try {
111
+ await claim.write({ gitRunning: true, group });
112
+ }
113
+ catch (error) {
114
+ // The gate never opens: sh reads end of file and exits without starting git.
115
+ gate?.destroy();
116
+ await exited;
117
+ throw error;
118
+ }
119
+ gate?.end('\n');
120
+ const run = await superviseGroup(group, exited, files, command.timeout);
121
+ if (run.settled === 'running') {
122
+ // Survivors keep the group the claim already names: nothing below may release it.
123
+ const result = await commandResult(files, command, false, run.overran);
124
+ return { result: { ...result, childrenRunning: true, stderr: `${result.stderr}\n${CHILDREN_RUNNING}`.trim() }, survivors: group };
125
+ }
126
+ await claim.write({ gitRunning: false });
127
+ return { result: await commandResult(files, command, run.ok, run.overran) };
128
+ }
129
+ /** Open the command's files and start git held at its gate; the gate is still closed. */
130
+ async function startGated(files, command) {
131
+ if (command.input !== undefined)
132
+ await writeFile(files.in, command.input, { mode: 0o600 });
133
+ const handles = await Promise.all([
134
+ command.input === undefined ? undefined : open(files.in, 'r'),
135
+ open(files.out, 'w', 0o600),
136
+ open(files.err, 'w', 0o600),
137
+ ]);
138
+ const closeAll = () => Promise.all(handles.map(handle => handle?.close()));
139
+ let child;
140
+ try {
141
+ child = spawnGatedGit(command.args, { cwd: command.cwd, stdin: handles[0]?.fd ?? 'ignore', stdout: handles[1].fd, stderr: handles[2].fd });
142
+ }
143
+ catch (error) {
144
+ await closeAll();
145
+ throw error;
146
+ }
147
+ // Listen before the first await: a spawn failure (a missing `cwd`) emits error, never exit, on the next tick.
68
148
  const exited = new Promise(resolve => {
69
- keeper.once('exit', (code, signal) => {
70
- fail(new Error(`worktree mutation keeper exited (${signal ?? code}): ${stderr.trim()}`));
71
- resolve();
72
- });
73
- // A spawn failure emits error but never exit. Do not await close here:
74
- // explicit IPC disconnect can suppress it on supported Node versions.
75
- keeper.once('error', () => { if (keeper.pid === undefined)
76
- resolve(); });
149
+ child.once('exit', code => resolve({ code }));
150
+ child.once('error', error => { if (child.pid === undefined)
151
+ resolve({ error }); });
77
152
  });
78
- let sequence = 0;
79
- const git = (cwd, args, timeout, input) => new Promise((resolve, reject) => {
80
- if (failure) {
81
- reject(failure);
82
- return;
153
+ const gate = child.stdio[3];
154
+ // A gate closed by a sh that already exited (a failed spawn) reports EPIPE; the exit says what happened.
155
+ gate?.on('error', () => undefined);
156
+ // The child holds its own copies from here on.
157
+ await closeAll();
158
+ return { child, exited, gate };
159
+ }
160
+ /**
161
+ * Watch a started command until its whole group is gone: stop it at its timeout, or when its
162
+ * output passes the limit while it runs, as execFile's maxBuffer did.
163
+ */
164
+ async function superviseGroup(group, exited, files, timeout) {
165
+ const deadline = timeout ? Date.now() + timeout : undefined;
166
+ let timedOut = false;
167
+ let overflow = false;
168
+ // The group: git and every child it started, such as the checkout of `worktree add`.
169
+ const stop = () => { try {
170
+ process.kill(-group, 'SIGTERM');
171
+ }
172
+ catch { /* already gone */ } };
173
+ const timer = timeout ? setTimeout(() => { timedOut = true; stop(); }, timeout) : undefined;
174
+ const watch = setInterval(() => {
175
+ void outputOverLimit(files).then(over => { if (over && !overflow) {
176
+ overflow = true;
177
+ stop();
178
+ } });
179
+ }, OUTPUT_CHECK_MS);
180
+ const end = await exited;
181
+ clearTimeout(timer);
182
+ // Git's exit does not end its group: a git killed by a signal (OOM), or a hook it ran in the
183
+ // background, can leave a child that still writes. A stopped command's group gets no more time.
184
+ const settled = await settleGroup(group, deadline, () => overflow || timedOut);
185
+ clearInterval(watch);
186
+ return {
187
+ settled,
188
+ // A command whose group had to be signalled at its deadline overran its bound.
189
+ overran: timedOut || (!overflow && settled !== 'exited'),
190
+ ok: 'code' in end && end.code === 0 && settled === 'exited' && !timedOut && !overflow,
191
+ };
192
+ }
193
+ /** How often a running command's output files are measured against the limit. */
194
+ const OUTPUT_CHECK_MS = 100;
195
+ async function outputOverLimit(files) {
196
+ const sizes = await Promise.all([files.out, files.err].map(file => stat(file).then(info => info.size, () => 0)));
197
+ return sizes.some(size => size > MAX_OUTPUT_BYTES);
198
+ }
199
+ const groupProbe = (pid) => { process.kill(pid, 0); };
200
+ const pause = () => new Promise(resolve => setTimeout(resolve, 50));
201
+ /**
202
+ * Wait for every member of a command's group to exit: until the command's deadline, or at once for
203
+ * a command already stopped (timed out, or over the output limit), then SIGTERM and 10 s more.
204
+ * `exited` without that SIGTERM, `signalled` when the group ended only after it, `running` when
205
+ * members remain. Only ESRCH from the group probe proves every member gone (ADR 0003: no PID or
206
+ * `ps` snapshot).
207
+ */
208
+ async function settleGroup(group, deadline, stopped) {
209
+ // Without a deadline it waits as long as git's children run, as the wait for git's output to close did before ADR 0076.
210
+ while (mayExist(groupProbe, -group)) {
211
+ if (stopped() || (deadline !== undefined && Date.now() >= deadline)) {
212
+ try {
213
+ process.kill(-group, 'SIGTERM');
214
+ }
215
+ catch { /* already gone */ }
216
+ for (let waited = 0; waited < 10_000; waited += 50) {
217
+ if (!mayExist(groupProbe, -group))
218
+ return 'signalled';
219
+ await pause();
220
+ }
221
+ return mayExist(groupProbe, -group) ? 'running' : 'signalled';
83
222
  }
84
- const id = ++sequence;
85
- pending.set(id, { resolve, reject });
86
- keeper.send({ kind: 'git', id, cwd, args, timeout, ...(input !== undefined ? { input } : {}) }, error => { if (error)
87
- fail(error); });
88
- });
223
+ await pause();
224
+ }
225
+ return 'exited';
226
+ }
227
+ async function readOutput(path) {
228
+ return (await stat(path)).size > MAX_OUTPUT_BYTES ? undefined : readFile(path, 'utf8');
229
+ }
230
+ /** The result of a finished command; it never rejects, so a failed read cannot drop a survivor's claim. */
231
+ async function commandResult(files, command, ok, timedOut) {
232
+ let stdout;
233
+ let stderr;
89
234
  try {
90
- await ready;
91
- return await operation(git);
235
+ [stdout, stderr] = await Promise.all([readOutput(files.out), readOutput(files.err)]);
92
236
  }
93
- finally {
94
- if (keeper.connected)
95
- keeper.disconnect();
96
- await exited;
237
+ catch (error) {
238
+ return { ok: false, stdout: '', stderr: `cannot read the output of git ${command.args[0] ?? ''}: ${String(error)}`, ...(timedOut ? { timedOut: true } : {}) };
97
239
  }
240
+ if (stdout === undefined || stderr === undefined) {
241
+ return { ok: false, stdout: '', stderr: `git ${command.args[0] ?? ''} output is over the ${MAX_OUTPUT_BYTES / 1024 / 1024} MiB limit` };
242
+ }
243
+ if (ok)
244
+ return { ok, stdout, stderr };
245
+ return {
246
+ ok,
247
+ stdout,
248
+ stderr: stderr || `Command failed: git ${command.args.join(' ')}`,
249
+ // A git killed at its bound says so: its stderr alone reads like any other failure.
250
+ ...(timedOut ? { timedOut: true } : {}),
251
+ };
98
252
  }
99
253
  //# sourceMappingURL=git-worktree-lock.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"git-worktree-lock.js","sourceRoot":"","sources":["../src/git-worktree-lock.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAoB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAA2C,MAAM,+BAA+B,CAAC;AAU5G,qHAAqH;AACrH,MAAM,UAAU,sBAAsB,CAAC,MAAsB;IAC3D,OAAO,GAAG,MAAM,CAAC,SAAS,IAAI,sBAAsB,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,SAAS,MAAM,CAAC,GAAG,GAAG,CAAC;AAC1H,CAAC;AAED,MAAM,OAAO,2BAA4B,SAA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,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC;IACzK,CAAC;IACD,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACjD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,uBAAuB,gBAAgB,GAAG,IAAI,GAAG,IAAI,YAAY,EAAE,CAAC;IAC1I,CAAC;IACD,IAAI,EAAE;QAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;IACtC,OAAO;QACL,EAAE;QACF,MAAM;QACN,MAAM,EAAE,MAAM,IAAI,uBAAuB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;QACjE,oFAAoF;QACpF,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjD,CAAC;AACJ,CAAC"}
@@ -22,6 +22,18 @@ export declare function createModelsRoutes(options: {
22
22
  profileId?: string | undefined;
23
23
  };
24
24
  };
25
+ } | {
26
+ output: {
27
+ error: string;
28
+ };
29
+ outputFormat: "json";
30
+ status: 400;
31
+ input: {
32
+ query: {
33
+ runner: string | string[];
34
+ profileId?: string | undefined;
35
+ };
36
+ };
25
37
  } | {
26
38
  output: {
27
39
  runner: string;
@@ -43,18 +55,6 @@ export declare function createModelsRoutes(options: {
43
55
  profileId?: string | undefined;
44
56
  };
45
57
  };
46
- } | {
47
- output: {
48
- error: string;
49
- };
50
- outputFormat: "json";
51
- status: 400;
52
- input: {
53
- query: {
54
- runner: string | string[];
55
- profileId?: string | undefined;
56
- };
57
- };
58
58
  };
59
59
  };
60
60
  }, "/", "/models">;
@@ -70,18 +70,10 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
70
70
  };
71
71
  } | {
72
72
  output: {
73
- providers: {
74
- requiresAccountHome?: boolean | undefined;
75
- provider: string;
76
- status: "connected" | "disconnected" | "not-installed" | "unknown";
77
- enabled?: boolean | undefined;
78
- hint?: string | undefined;
79
- authFailureId?: string | undefined;
80
- profileId?: string | undefined;
81
- }[];
73
+ error: string;
82
74
  };
83
75
  outputFormat: "json";
84
- status: import("hono/utils/http-status").ContentfulStatusCode;
76
+ status: 500;
85
77
  input: {
86
78
  param: {
87
79
  provider: string;
@@ -93,10 +85,18 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
93
85
  };
94
86
  } | {
95
87
  output: {
96
- error: string;
88
+ providers: {
89
+ requiresAccountHome?: boolean | undefined;
90
+ provider: string;
91
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
92
+ enabled?: boolean | undefined;
93
+ hint?: string | undefined;
94
+ authFailureId?: string | undefined;
95
+ profileId?: string | undefined;
96
+ }[];
97
97
  };
98
98
  outputFormat: "json";
99
- status: 500;
99
+ status: import("hono/utils/http-status").ContentfulStatusCode;
100
100
  input: {
101
101
  param: {
102
102
  provider: string;
@@ -128,18 +128,10 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
128
128
  };
129
129
  } | {
130
130
  output: {
131
- providers: {
132
- requiresAccountHome?: boolean | undefined;
133
- provider: string;
134
- status: "connected" | "disconnected" | "not-installed" | "unknown";
135
- enabled?: boolean | undefined;
136
- hint?: string | undefined;
137
- authFailureId?: string | undefined;
138
- profileId?: string | undefined;
139
- }[];
131
+ error: string;
140
132
  };
141
133
  outputFormat: "json";
142
- status: import("hono/utils/http-status").ContentfulStatusCode;
134
+ status: 409;
143
135
  input: {
144
136
  param: {
145
137
  provider: string;
@@ -151,10 +143,18 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
151
143
  };
152
144
  } | {
153
145
  output: {
154
- error: string;
146
+ providers: {
147
+ requiresAccountHome?: boolean | undefined;
148
+ provider: string;
149
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
150
+ enabled?: boolean | undefined;
151
+ hint?: string | undefined;
152
+ authFailureId?: string | undefined;
153
+ profileId?: string | undefined;
154
+ }[];
155
155
  };
156
156
  outputFormat: "json";
157
- status: 409;
157
+ status: import("hono/utils/http-status").ContentfulStatusCode;
158
158
  input: {
159
159
  param: {
160
160
  provider: string;
@@ -173,7 +173,7 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
173
173
  error: string;
174
174
  };
175
175
  outputFormat: "json";
176
- status: 409;
176
+ status: 400;
177
177
  input: {
178
178
  json: {
179
179
  provider: string;
@@ -185,7 +185,7 @@ export declare function createProvidersRoutes(deps: ProvidersRouteDeps): import(
185
185
  error: string;
186
186
  };
187
187
  outputFormat: "json";
188
- status: 400;
188
+ status: 409;
189
189
  input: {
190
190
  json: {
191
191
  provider: string;
@@ -290,10 +290,28 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
290
290
  "/workspace/agent-profiles": {
291
291
  $post: {
292
292
  output: {
293
- error: string;
293
+ profile: {
294
+ id: string;
295
+ provider: string;
296
+ label: string;
297
+ configDir?: string | undefined;
298
+ path?: string | undefined;
299
+ exists: boolean;
300
+ looksValid: boolean;
301
+ isDefault: boolean;
302
+ status?: {
303
+ requiresAccountHome?: boolean | undefined;
304
+ provider: string;
305
+ status: "connected" | "disconnected" | "not-installed" | "unknown";
306
+ enabled?: boolean | undefined;
307
+ hint?: string | undefined;
308
+ authFailureId?: string | undefined;
309
+ profileId?: string | undefined;
310
+ } | undefined;
311
+ };
294
312
  };
295
313
  outputFormat: "json";
296
- status: 409;
314
+ status: 201;
297
315
  input: {
298
316
  json: {
299
317
  provider: string;
@@ -319,7 +337,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
319
337
  error: string;
320
338
  };
321
339
  outputFormat: "json";
322
- status: 500;
340
+ status: 409;
323
341
  input: {
324
342
  json: {
325
343
  provider: string;
@@ -329,28 +347,10 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
329
347
  };
330
348
  } | {
331
349
  output: {
332
- profile: {
333
- id: string;
334
- provider: string;
335
- label: string;
336
- configDir?: string | undefined;
337
- path?: string | undefined;
338
- exists: boolean;
339
- looksValid: boolean;
340
- isDefault: boolean;
341
- status?: {
342
- requiresAccountHome?: boolean | undefined;
343
- provider: string;
344
- status: "connected" | "disconnected" | "not-installed" | "unknown";
345
- enabled?: boolean | undefined;
346
- hint?: string | undefined;
347
- authFailureId?: string | undefined;
348
- profileId?: string | undefined;
349
- } | undefined;
350
- };
350
+ error: string;
351
351
  };
352
352
  outputFormat: "json";
353
- status: 201;
353
+ status: 500;
354
354
  input: {
355
355
  json: {
356
356
  provider: string;
@@ -384,7 +384,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
384
384
  error: string;
385
385
  };
386
386
  outputFormat: "json";
387
- status: 409;
387
+ status: 400;
388
388
  input: {
389
389
  param: {
390
390
  id: string;
@@ -400,7 +400,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
400
400
  error: string;
401
401
  };
402
402
  outputFormat: "json";
403
- status: 400;
403
+ status: 404;
404
404
  input: {
405
405
  param: {
406
406
  id: string;
@@ -416,7 +416,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
416
416
  error: string;
417
417
  };
418
418
  outputFormat: "json";
419
- status: 404;
419
+ status: 409;
420
420
  input: {
421
421
  param: {
422
422
  id: string;
@@ -542,10 +542,9 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
542
542
  $put: {
543
543
  output: {
544
544
  error: string;
545
- code: "no-boot-project";
546
545
  };
547
546
  outputFormat: "json";
548
- status: 409;
547
+ status: 400;
549
548
  input: {
550
549
  json: {
551
550
  projectId: string;
@@ -569,9 +568,10 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
569
568
  } | {
570
569
  output: {
571
570
  error: string;
571
+ code: "no-boot-project";
572
572
  };
573
573
  outputFormat: "json";
574
- status: 400;
574
+ status: 409;
575
575
  input: {
576
576
  json: {
577
577
  projectId: string;
@@ -635,7 +635,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
635
635
  error: string;
636
636
  };
637
637
  outputFormat: "json";
638
- status: 409;
638
+ status: 404;
639
639
  input: {
640
640
  param: {
641
641
  id: string;
@@ -646,7 +646,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
646
646
  error: string;
647
647
  };
648
648
  outputFormat: "json";
649
- status: 500;
649
+ status: 409;
650
650
  input: {
651
651
  param: {
652
652
  id: string;
@@ -657,7 +657,7 @@ export declare function createAgentProfilesRoutes(deps: AgentProfilesRouteDeps):
657
657
  error: string;
658
658
  };
659
659
  outputFormat: "json";
660
- status: 404;
660
+ status: 500;
661
661
  input: {
662
662
  param: {
663
663
  id: string;