@cogitator-ai/bridge 0.6.1 → 0.8.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.
- package/README.md +102 -19
- package/dist/adapters/claude.d.ts +13 -0
- package/dist/adapters/claude.d.ts.map +1 -1
- package/dist/adapters/claude.js +11 -1
- package/dist/adapters/claude.js.map +1 -1
- package/dist/board.d.ts +76 -0
- package/dist/board.d.ts.map +1 -0
- package/dist/board.js +19 -0
- package/dist/board.js.map +1 -0
- package/dist/checks.d.ts +31 -0
- package/dist/checks.d.ts.map +1 -0
- package/dist/checks.js +202 -0
- package/dist/checks.js.map +1 -0
- package/dist/client.d.ts +17 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +29 -0
- package/dist/client.js.map +1 -1
- package/dist/dispatcher.d.ts +187 -2
- package/dist/dispatcher.d.ts.map +1 -1
- package/dist/dispatcher.js +930 -18
- package/dist/dispatcher.js.map +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/handover.d.ts +72 -0
- package/dist/handover.d.ts.map +1 -0
- package/dist/handover.js +225 -0
- package/dist/handover.js.map +1 -0
- package/dist/host.d.ts +7 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +1 -0
- package/dist/host.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/inputs.d.ts +166 -0
- package/dist/inputs.d.ts.map +1 -1
- package/dist/inputs.js +65 -0
- package/dist/inputs.js.map +1 -1
- package/dist/job-record.d.ts +42 -1
- package/dist/job-record.d.ts.map +1 -1
- package/dist/job-record.js +39 -1
- package/dist/job-record.js.map +1 -1
- package/dist/letters.d.ts +3 -1
- package/dist/letters.d.ts.map +1 -1
- package/dist/letters.js +38 -5
- package/dist/letters.js.map +1 -1
- package/dist/memory/index.d.ts +35 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +192 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/paths.d.ts +7 -0
- package/dist/paths.d.ts.map +1 -1
- package/dist/paths.js +9 -0
- package/dist/paths.js.map +1 -1
- package/dist/protocol.d.ts +6 -0
- package/dist/protocol.d.ts.map +1 -1
- package/dist/protocol.js +6 -0
- package/dist/protocol.js.map +1 -1
- package/dist/registry.d.ts +7 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +8 -5
- package/dist/registry.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +6 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/guidance.d.ts.map +1 -1
- package/dist/tools/guidance.js +4 -0
- package/dist/tools/guidance.js.map +1 -1
- package/dist/tools/tools.d.ts.map +1 -1
- package/dist/tools/tools.js +292 -2
- package/dist/tools/tools.js.map +1 -1
- package/dist/types.d.ts +105 -5
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +27 -2
- package/dist/types.js.map +1 -1
- package/dist/worktree.d.ts +131 -0
- package/dist/worktree.d.ts.map +1 -0
- package/dist/worktree.js +278 -0
- package/dist/worktree.js.map +1 -0
- package/fakes/claude.mjs +53 -3
- package/fakes/lib.mjs +24 -9
- package/package.json +11 -1
package/dist/checks.js
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { spawn } from 'node:child_process';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { formatDuration } from './guards.js';
|
|
4
|
+
/** How much of what a check printed is kept: its end, where a failure says what went wrong. */
|
|
5
|
+
const OUTPUT_KEPT = 4_000;
|
|
6
|
+
/** How much of the output of a failed check a letter shows. */
|
|
7
|
+
const OUTPUT_SHOWN = 1_200;
|
|
8
|
+
/**
|
|
9
|
+
* How long the output of a command that exited is still read, in ms. A command that leaves a
|
|
10
|
+
* process of its own behind, holding the same pipes, would otherwise never be done.
|
|
11
|
+
*/
|
|
12
|
+
const DRAIN_MS = 250;
|
|
13
|
+
/** How long a check waits for what it killed to be gone, in ms. */
|
|
14
|
+
const KILL_WAIT_MS = 1_000;
|
|
15
|
+
/** How long a command that was told to stop gets before it is killed, in ms. */
|
|
16
|
+
const STOP_GRACE_MS = 2_000;
|
|
17
|
+
/** The name a check goes by: its own, else its command. */
|
|
18
|
+
export function checkName(check) {
|
|
19
|
+
return check.name ?? check.command;
|
|
20
|
+
}
|
|
21
|
+
/** The end of `text`, with a mark where the start was cut off. */
|
|
22
|
+
function tail(text, max) {
|
|
23
|
+
const trimmed = text.trimEnd();
|
|
24
|
+
return trimmed.length > max ? `...${trimmed.slice(trimmed.length - max)}` : trimmed;
|
|
25
|
+
}
|
|
26
|
+
/** A check the bridge did not run, and why. It does not confirm anything. */
|
|
27
|
+
export function skippedCheck(check, why) {
|
|
28
|
+
return { name: checkName(check), command: check.command, ok: false, skipped: why };
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Runs one check of a job: its command, through the shell, in `cwd`. It passes when the command
|
|
32
|
+
* exits with 0. A command that runs longer than `timeoutMs`, or whose run is aborted, is ended
|
|
33
|
+
* with everything it started, and the check fails only once all of it is gone. A process a
|
|
34
|
+
* command that ended by itself left behind does not keep the check waiting. It never throws: a command that cannot be started is a failed check
|
|
35
|
+
* that says why.
|
|
36
|
+
*/
|
|
37
|
+
export function runCheck(check, options) {
|
|
38
|
+
const base = { name: checkName(check), command: check.command };
|
|
39
|
+
if (!existsSync(options.cwd)) {
|
|
40
|
+
return Promise.resolve({
|
|
41
|
+
...base,
|
|
42
|
+
ok: false,
|
|
43
|
+
skipped: `the folder ${options.cwd} is not there`,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
if (options.signal?.aborted) {
|
|
47
|
+
return Promise.resolve({ ...base, ok: false, skipped: 'the checks were stopped' });
|
|
48
|
+
}
|
|
49
|
+
const started = Date.now();
|
|
50
|
+
return new Promise((resolve) => {
|
|
51
|
+
const group = process.platform !== 'win32';
|
|
52
|
+
let output = '';
|
|
53
|
+
let timedOut = false;
|
|
54
|
+
let stopped = false;
|
|
55
|
+
let stopping = false;
|
|
56
|
+
let done = false;
|
|
57
|
+
let child;
|
|
58
|
+
const timers = [];
|
|
59
|
+
const finish = (result) => {
|
|
60
|
+
if (done)
|
|
61
|
+
return;
|
|
62
|
+
done = true;
|
|
63
|
+
for (const timer of timers)
|
|
64
|
+
clearTimeout(timer);
|
|
65
|
+
options.signal?.removeEventListener('abort', onAbort);
|
|
66
|
+
child?.stdout?.destroy();
|
|
67
|
+
child?.stderr?.destroy();
|
|
68
|
+
const said = tail(output, OUTPUT_KEPT);
|
|
69
|
+
resolve({
|
|
70
|
+
...base,
|
|
71
|
+
...result,
|
|
72
|
+
...(timedOut && { timedOut: true }),
|
|
73
|
+
durationMs: Date.now() - started,
|
|
74
|
+
...(said && { output: said }),
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const ended = (code) => {
|
|
78
|
+
if (stopped)
|
|
79
|
+
finish({ ok: false, code, skipped: 'the checks were stopped' });
|
|
80
|
+
else
|
|
81
|
+
finish({ ok: code === 0 && !timedOut, code });
|
|
82
|
+
};
|
|
83
|
+
try {
|
|
84
|
+
child = spawn(check.command, {
|
|
85
|
+
cwd: options.cwd,
|
|
86
|
+
env: options.env ?? process.env,
|
|
87
|
+
shell: true,
|
|
88
|
+
detached: group,
|
|
89
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
catch (error) {
|
|
93
|
+
finish({
|
|
94
|
+
ok: false,
|
|
95
|
+
skipped: `it could not be started: ${error instanceof Error ? error.message : String(error)}`,
|
|
96
|
+
});
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const running = child;
|
|
100
|
+
const signalAll = (signal) => {
|
|
101
|
+
try {
|
|
102
|
+
if (group && running.pid !== undefined)
|
|
103
|
+
return process.kill(-running.pid, signal);
|
|
104
|
+
return signal === 0 ? running.exitCode === null : running.kill(signal);
|
|
105
|
+
}
|
|
106
|
+
catch {
|
|
107
|
+
return false;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
/** Whether anything the command started is still there */
|
|
111
|
+
const alive = () => signalAll(0);
|
|
112
|
+
const stop = () => {
|
|
113
|
+
stopping = true;
|
|
114
|
+
signalAll('SIGTERM');
|
|
115
|
+
timers.push(setTimeout(() => {
|
|
116
|
+
signalAll('SIGKILL');
|
|
117
|
+
const until = Date.now() + KILL_WAIT_MS;
|
|
118
|
+
const gone = () => {
|
|
119
|
+
if (!alive() || Date.now() >= until)
|
|
120
|
+
ended(null);
|
|
121
|
+
else
|
|
122
|
+
timers.push(setTimeout(gone, 20));
|
|
123
|
+
};
|
|
124
|
+
gone();
|
|
125
|
+
}, STOP_GRACE_MS));
|
|
126
|
+
};
|
|
127
|
+
function onAbort() {
|
|
128
|
+
stopped = true;
|
|
129
|
+
stop();
|
|
130
|
+
}
|
|
131
|
+
timers.push(setTimeout(() => {
|
|
132
|
+
timedOut = true;
|
|
133
|
+
stop();
|
|
134
|
+
}, options.timeoutMs));
|
|
135
|
+
options.signal?.addEventListener('abort', onAbort, { once: true });
|
|
136
|
+
const keep = (chunk) => {
|
|
137
|
+
output = (output + chunk).slice(-2 * OUTPUT_KEPT);
|
|
138
|
+
};
|
|
139
|
+
running.stdout?.setEncoding('utf8').on('data', keep);
|
|
140
|
+
running.stderr?.setEncoding('utf8').on('data', keep);
|
|
141
|
+
running.once('error', (error) => {
|
|
142
|
+
finish({ ok: false, skipped: `it could not be started: ${error.message}` });
|
|
143
|
+
});
|
|
144
|
+
/**
|
|
145
|
+
* A command that ended by itself is done once its output is read, whatever it left running.
|
|
146
|
+
* One that was told to stop is done when nothing it started is left: what ignores the
|
|
147
|
+
* request is killed when the grace is over, and the check waits for that.
|
|
148
|
+
*/
|
|
149
|
+
const exited = (code) => {
|
|
150
|
+
if (stopping && alive())
|
|
151
|
+
return;
|
|
152
|
+
ended(code);
|
|
153
|
+
};
|
|
154
|
+
running.once('exit', (code) => {
|
|
155
|
+
timers.push(setTimeout(() => exited(code), DRAIN_MS));
|
|
156
|
+
});
|
|
157
|
+
running.once('close', (code) => exited(code));
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
/** How long a check ran, to the tenth of a second while that says something. */
|
|
161
|
+
function tookOf(ms) {
|
|
162
|
+
if (ms < 10_000)
|
|
163
|
+
return `${(ms / 1000).toFixed(1)} s`;
|
|
164
|
+
if (ms < 120_000)
|
|
165
|
+
return `${Math.round(ms / 1000)} s`;
|
|
166
|
+
return formatDuration(ms);
|
|
167
|
+
}
|
|
168
|
+
function lineOf(result) {
|
|
169
|
+
const took = result.durationMs === undefined ? '' : ` (${tookOf(result.durationMs)})`;
|
|
170
|
+
if (result.skipped)
|
|
171
|
+
return `- not run: ${result.name}: ${result.skipped}`;
|
|
172
|
+
if (result.ok)
|
|
173
|
+
return `- passed: ${result.name}${took}`;
|
|
174
|
+
const how = result.timedOut
|
|
175
|
+
? `did not end in time${took}`
|
|
176
|
+
: result.code === null || result.code === undefined
|
|
177
|
+
? `was ended by a signal${took}`
|
|
178
|
+
: `exit code ${result.code}${took}`;
|
|
179
|
+
return `- failed: ${result.name}: ${how}`;
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* What the checks of a job showed, for its record and for the letter that carries its report:
|
|
183
|
+
* the result is verified only when every check ran and passed. A failed check comes with the
|
|
184
|
+
* end of what it printed.
|
|
185
|
+
*/
|
|
186
|
+
export function summarizeChecks(results) {
|
|
187
|
+
const verified = results.length > 0 && results.every((result) => result.ok);
|
|
188
|
+
const passed = results.filter((result) => result.ok).length;
|
|
189
|
+
const lines = [
|
|
190
|
+
verified
|
|
191
|
+
? `Verified: ${passed === 1 ? 'the check' : `all ${passed} checks`} passed.`
|
|
192
|
+
: `Not verified: ${passed} of ${results.length} ${results.length === 1 ? 'check' : 'checks'} passed.`,
|
|
193
|
+
...results.map(lineOf),
|
|
194
|
+
];
|
|
195
|
+
for (const result of results) {
|
|
196
|
+
if (result.ok || result.skipped || !result.output)
|
|
197
|
+
continue;
|
|
198
|
+
lines.push(`The end of what "${result.name}" printed:`, tail(result.output, OUTPUT_SHOWN));
|
|
199
|
+
}
|
|
200
|
+
return { verified, summary: lines.join('\n') };
|
|
201
|
+
}
|
|
202
|
+
//# sourceMappingURL=checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checks.js","sourceRoot":"","sources":["../src/checks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,+FAA+F;AAC/F,MAAM,WAAW,GAAG,KAAK,CAAC;AAE1B,+DAA+D;AAC/D,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B;;;GAGG;AACH,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB,mEAAmE;AACnE,MAAM,YAAY,GAAG,KAAK,CAAC;AAE3B,gFAAgF;AAChF,MAAM,aAAa,GAAG,KAAK,CAAC;AAW5B,2DAA2D;AAC3D,MAAM,UAAU,SAAS,CAAC,KAAyC;IACjE,OAAO,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC;AACrC,CAAC;AAED,kEAAkE;AAClE,SAAS,IAAI,CAAC,IAAY,EAAE,GAAW;IACrC,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;IAC/B,OAAO,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,MAAM,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;AACtF,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,YAAY,CAAC,KAAe,EAAE,GAAW;IACvD,OAAO,EAAE,IAAI,EAAE,SAA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dist/client.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { BoardFact } from './board.js';
|
|
2
|
+
import { type AcceptInput, type AcceptResult, type CreateJobInput, type CreateJobResult, type DiffInput, type EscalateInput, type ForgetInput, type InboxInput, type JobDiff, type PersonAnswerInput, type RecallInput, type RejectInput, type RememberInput, type SendLetterInput, type SendLetterResult, type StuckInput, type VerdictInput, type VerdictResult, type WaitInput, type WaitResult, type WithdrawInput, type WithdrawResult } from './inputs.js';
|
|
2
3
|
import { type BridgeStatus, type DispatcherInfo } from './protocol.js';
|
|
3
4
|
import type { AgentFilter, JobTaskFilter, JournalQuery, LetterFilter } from './store/store.js';
|
|
4
5
|
import type { AgentRecord, BridgeJob, CallerIdentity, JournalEntry, Letter, RenderedLetter } from './types.js';
|
|
@@ -80,6 +81,21 @@ export declare class BridgeClient {
|
|
|
80
81
|
*/
|
|
81
82
|
personAnswer(input: PersonAnswerInput): Promise<SendLetterResult>;
|
|
82
83
|
cancel(job: number, reason?: string): Promise<BridgeJob>;
|
|
84
|
+
/**
|
|
85
|
+
* Puts a note on the board of a project, see `BridgeDispatcher.remember`. A connection that
|
|
86
|
+
* named no session speaks as the person, and names the project
|
|
87
|
+
*/
|
|
88
|
+
remember(input: RememberInput): Promise<BoardFact>;
|
|
89
|
+
/** Looks at the board of a project, see `BridgeDispatcher.recall` */
|
|
90
|
+
recall(input?: RecallInput): Promise<BoardFact[]>;
|
|
91
|
+
/** Lets a note of the board go, see `BridgeDispatcher.forget` */
|
|
92
|
+
forget(input: ForgetInput): Promise<BoardFact>;
|
|
93
|
+
/** What a job changed in its worktree so far, see `BridgeDispatcher.diff` */
|
|
94
|
+
diff(input: DiffInput): Promise<JobDiff>;
|
|
95
|
+
/** Takes the work of a finished job out of its worktree, see `BridgeDispatcher.accept` */
|
|
96
|
+
accept(input: AcceptInput): Promise<AcceptResult>;
|
|
97
|
+
/** Drops the work of a finished job with its worktree, see `BridgeDispatcher.reject` */
|
|
98
|
+
reject(input: RejectInput): Promise<BridgeJob>;
|
|
83
99
|
job(number: number): Promise<BridgeJob>;
|
|
84
100
|
jobs(filter?: JobTaskFilter): Promise<BridgeJob[]>;
|
|
85
101
|
agents(filter?: AgentFilter): Promise<AgentRecord[]>;
|
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE5C,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,SAAS,EACd,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,OAAO,EACZ,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,cAAc,EAEpB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC/F,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,cAAc,EACd,YAAY,EACZ,MAAM,EACN,cAAc,EACf,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC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M,GAAE,YAAiB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAIrD,WAAW,CAAC,KAAK,GAAE,YAAiB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAI9D,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC;IAI/B;;;OAGG;IACG,SAAS,CACb,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,EACvC,OAAO,GAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAA;KAAO,GAC7B,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAc/B;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAgBxB,oEAAoE;IAC9D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YASd,IAAI;CAOnB"}
|
package/dist/client.js
CHANGED
|
@@ -4,6 +4,8 @@ import { BridgeError } from './errors.js';
|
|
|
4
4
|
import { DEFAULT_VERDICT_WAIT_MS, DEFAULT_WAIT_MS, } from './inputs.js';
|
|
5
5
|
import { BRIDGE_METHODS, BRIDGE_NOTIFICATIONS, BRIDGE_PROTOCOL_VERSION, fromJsonRpcError, } from './protocol.js';
|
|
6
6
|
const DEFAULT_TIMEOUT_MS = 30_000;
|
|
7
|
+
/** How much longer a call that has git read or move the work of a job may take, in ms. */
|
|
8
|
+
const GIT_CALL_MS = 300_000;
|
|
7
9
|
const NO_DISPATCHER_CODES = new Set(['ENOENT', 'ECONNREFUSED', 'ENOTSOCK']);
|
|
8
10
|
function open(socketPath) {
|
|
9
11
|
return new Promise((resolve, reject) => {
|
|
@@ -173,6 +175,33 @@ export class BridgeClient {
|
|
|
173
175
|
cancel(job, reason) {
|
|
174
176
|
return this.call(BRIDGE_METHODS.cancelJob, { job, ...(reason !== undefined && { reason }) });
|
|
175
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Puts a note on the board of a project, see `BridgeDispatcher.remember`. A connection that
|
|
180
|
+
* named no session speaks as the person, and names the project
|
|
181
|
+
*/
|
|
182
|
+
remember(input) {
|
|
183
|
+
return this.call(BRIDGE_METHODS.remember, input);
|
|
184
|
+
}
|
|
185
|
+
/** Looks at the board of a project, see `BridgeDispatcher.recall` */
|
|
186
|
+
recall(input = {}) {
|
|
187
|
+
return this.call(BRIDGE_METHODS.recall, input);
|
|
188
|
+
}
|
|
189
|
+
/** Lets a note of the board go, see `BridgeDispatcher.forget` */
|
|
190
|
+
forget(input) {
|
|
191
|
+
return this.call(BRIDGE_METHODS.forget, input);
|
|
192
|
+
}
|
|
193
|
+
/** What a job changed in its worktree so far, see `BridgeDispatcher.diff` */
|
|
194
|
+
diff(input) {
|
|
195
|
+
return this.call(BRIDGE_METHODS.diff, input, GIT_CALL_MS + this.timeoutMs);
|
|
196
|
+
}
|
|
197
|
+
/** Takes the work of a finished job out of its worktree, see `BridgeDispatcher.accept` */
|
|
198
|
+
accept(input) {
|
|
199
|
+
return this.call(BRIDGE_METHODS.accept, input, GIT_CALL_MS + this.timeoutMs);
|
|
200
|
+
}
|
|
201
|
+
/** Drops the work of a finished job with its worktree, see `BridgeDispatcher.reject` */
|
|
202
|
+
reject(input) {
|
|
203
|
+
return this.call(BRIDGE_METHODS.reject, input, GIT_CALL_MS + this.timeoutMs);
|
|
204
|
+
}
|
|
176
205
|
job(number) {
|
|
177
206
|
return this.call(BRIDGE_METHODS.getJob, { job: number });
|
|
178
207
|
}
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,UAAU,GAEX,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAe,MAAM,UAAU,CAAC;AAChD,OAAO,EACL,WAAW,EACX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H,CAAC;CACF"}
|
package/dist/dispatcher.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'node:events';
|
|
2
|
+
import { type BoardFact, type FactBoard } from './board.js';
|
|
2
3
|
import { type BridgeLimitsInput } from './guards.js';
|
|
3
|
-
import { type CreateJobInput, type CreateJobResult, type EscalateInput, type InboxInput, type PersonAnswerInput, type SendLetterInput, type SendLetterResult, type StuckInput, type VerdictInput, type VerdictResult, type WaitInput, type WaitResult, type WithdrawInput, type WithdrawResult } from './inputs.js';
|
|
4
|
+
import { type AcceptInput, type AcceptResult, type CreateJobInput, type DiffInput, type ForgetInput, type JobDiff, type RecallInput, type RejectInput, type RememberInput, type CreateJobResult, type EscalateInput, type InboxInput, type PersonAnswerInput, type SendLetterInput, type SendLetterResult, type StuckInput, type VerdictInput, type VerdictResult, type WaitInput, type WaitResult, type WithdrawInput, type WithdrawResult } from './inputs.js';
|
|
4
5
|
import type { AgentFilter, BridgeStore, JobTaskFilter, JournalQuery, LetterFilter } from './store/store.js';
|
|
5
6
|
import { type AgentRecord, type BridgeJob, type BridgeLimits, type CallerIdentity, type JobVerification, type JournalEntry, type Letter, type RenderedLetter } from './types.js';
|
|
6
7
|
import type { BridgeAdapter, BridgeCalls } from './adapter.js';
|
|
@@ -20,6 +21,12 @@ export interface BridgeDispatcherOptions {
|
|
|
20
21
|
* the person, and a call only they could allow is refused
|
|
21
22
|
*/
|
|
22
23
|
person?: PersonRoute;
|
|
24
|
+
/**
|
|
25
|
+
* The board of facts agents and the person share, such as `memoryBoard()` of
|
|
26
|
+
* `@cogitator-ai/bridge/memory`. Without it nothing is remembered, and a job is handed over
|
|
27
|
+
* with what its caller named alone
|
|
28
|
+
*/
|
|
29
|
+
board?: FactBoard;
|
|
23
30
|
/** Ms since the epoch, `Date.now` by default */
|
|
24
31
|
now?: () => number;
|
|
25
32
|
/** The id of a letter whose sender gave none */
|
|
@@ -87,12 +94,24 @@ export declare class BridgeDispatcher extends EventEmitter<BridgeDispatcherEvent
|
|
|
87
94
|
private readonly assertWritable;
|
|
88
95
|
private readonly rights;
|
|
89
96
|
private readonly person;
|
|
97
|
+
private readonly board;
|
|
90
98
|
/** When each agent's other parties were last told it waits at its window, see `stuck` */
|
|
91
99
|
private readonly stuckTold;
|
|
92
100
|
/** Those waiting for the verdict of a permission request, by its id, see `verdict` */
|
|
93
101
|
private readonly verdictWaiters;
|
|
94
102
|
/** What the person route is told, one thing after another */
|
|
95
103
|
private personNews;
|
|
104
|
+
/** The checks that run or wait their turn, by job, each with what stops it */
|
|
105
|
+
private readonly checkRuns;
|
|
106
|
+
/** The checks of one job after those of another: they build and test, and memory is short */
|
|
107
|
+
private checkQueue;
|
|
108
|
+
/** The last work on each checkout something is being brought into, see `oneAtATimeIn` */
|
|
109
|
+
private readonly checkouts;
|
|
110
|
+
/** Jobs whose worktree is being taken, dropped or put away right now */
|
|
111
|
+
private readonly taking;
|
|
112
|
+
/** Whether what a dispatcher before this one left unfinished was picked up */
|
|
113
|
+
private recovered;
|
|
114
|
+
private worktreesSweptAt;
|
|
96
115
|
private queue;
|
|
97
116
|
private readonly deliveries;
|
|
98
117
|
private readonly background;
|
|
@@ -313,6 +332,172 @@ export declare class BridgeDispatcher extends EventEmitter<BridgeDispatcherEvent
|
|
|
313
332
|
* must not be the one to say its result holds.
|
|
314
333
|
*/
|
|
315
334
|
recordVerification(number: number, verification: Pick<JobVerification, 'verified' | 'summary'>): Promise<BridgeJob>;
|
|
335
|
+
/**
|
|
336
|
+
* Refuses a job that asks for a worktree of its own and cannot have one: the folder is in no
|
|
337
|
+
* git repository, the session that would carry it out is open somewhere else already, or the
|
|
338
|
+
* project has as many such jobs in progress as it may.
|
|
339
|
+
*/
|
|
340
|
+
private checkWorktreeAsked;
|
|
341
|
+
/**
|
|
342
|
+
* Where a session that is about to be started for a job works: the worktree of the job, made
|
|
343
|
+
* now, when the job asked for one. Resolves with the job as it is once it has its worktree and
|
|
344
|
+
* with its first letter, which says so, and with nothing for a job that works where it was
|
|
345
|
+
* handed over.
|
|
346
|
+
*
|
|
347
|
+
* @throws when git cannot make the worktree: the job then fails with what git said
|
|
348
|
+
*/
|
|
349
|
+
private placeOf;
|
|
350
|
+
/** The worktree of a job while its work is still in it. */
|
|
351
|
+
private liveWorktree;
|
|
352
|
+
/**
|
|
353
|
+
* What a job changed in its worktree, counted as its report comes in, for the report to say.
|
|
354
|
+
* Nothing for a job without a worktree, and nothing when git cannot tell: the report goes
|
|
355
|
+
* through all the same.
|
|
356
|
+
*/
|
|
357
|
+
private changesAtReport;
|
|
358
|
+
private startChecks;
|
|
359
|
+
/**
|
|
360
|
+
* Runs the checks of a job that was reported on, where the job was done, and hands its report
|
|
361
|
+
* over with what they showed. The bridge runs a command itself, outside any sandbox, so it
|
|
362
|
+
* runs only what the rules of whoever handed the job over allow without asking: the rest is
|
|
363
|
+
* left out, and the result then does not count as verified. A dispatcher that closes in the
|
|
364
|
+
* middle leaves the job as it is, and the next one runs its checks again.
|
|
365
|
+
*/
|
|
366
|
+
private runChecks;
|
|
367
|
+
/**
|
|
368
|
+
* Picks up what a dispatcher before this one left in the middle: the checks of jobs that were
|
|
369
|
+
* reported on and never got their verdict.
|
|
370
|
+
*/
|
|
371
|
+
private recover;
|
|
372
|
+
/**
|
|
373
|
+
* What a job changed in its worktree so far: the files, how much, and the patch. For the two
|
|
374
|
+
* agents of the job, while it runs and after, as long as its worktree is there.
|
|
375
|
+
*
|
|
376
|
+
* @throws BridgeError `unknown_job`, `not_a_party`, `no_worktree` for a job without a worktree
|
|
377
|
+
* of its own or whose work was taken or dropped already
|
|
378
|
+
*/
|
|
379
|
+
diff(caller: string, input: DiffInput): Promise<JobDiff>;
|
|
380
|
+
/**
|
|
381
|
+
* Takes the work of a finished job out of its worktree, as the agent that handed the job over.
|
|
382
|
+
* The changes, committed there or not, come into the checkout the caller works in as one
|
|
383
|
+
* change that is staged and not committed: the commit is the caller's to make. With
|
|
384
|
+
* `asBranch` they are left as a branch instead, for work that goes on as a pull request. The
|
|
385
|
+
* worktree is removed either way. When the changes would leave files in conflict nothing is
|
|
386
|
+
* touched, the answer names the files, and the worktree stays for another try. The bridge
|
|
387
|
+
* never merges into a branch nobody is working on.
|
|
388
|
+
*
|
|
389
|
+
* @throws BridgeError `unknown_job`, `not_a_party` (only who handed the job over takes its
|
|
390
|
+
* work), `invalid_input` (the job still runs, its checks do, the caller is in another
|
|
391
|
+
* repository, or git refused), `no_worktree`
|
|
392
|
+
*/
|
|
393
|
+
accept(caller: string, input: AcceptInput): Promise<AcceptResult>;
|
|
394
|
+
/**
|
|
395
|
+
* Drops the work of a finished job, as the agent that handed the job over: its worktree and
|
|
396
|
+
* the branch of it are removed with everything in them.
|
|
397
|
+
*
|
|
398
|
+
* @throws BridgeError `unknown_job`, `not_a_party`, `invalid_input` (the job still runs, or
|
|
399
|
+
* its checks do), `no_worktree`
|
|
400
|
+
*/
|
|
401
|
+
reject(caller: string, input: RejectInput): Promise<BridgeJob>;
|
|
402
|
+
/**
|
|
403
|
+
* Work on one checkout after the other work on it: looking whether it is free, merging into
|
|
404
|
+
* it and taking a failed merge back are one step, and two jobs taken into the same checkout
|
|
405
|
+
* at once would each undo what the other staged.
|
|
406
|
+
*/
|
|
407
|
+
private oneAtATimeIn;
|
|
408
|
+
/** The worktree of a job whose work is still in it, or why there is none. */
|
|
409
|
+
private requireWorktree;
|
|
410
|
+
/** The job, its worktree and the caller, for the one who may take or drop its work. */
|
|
411
|
+
private requireTaker;
|
|
412
|
+
/** One taking, dropping or putting away of a job's worktree at a time. */
|
|
413
|
+
private whileTaking;
|
|
414
|
+
private readChanges;
|
|
415
|
+
/**
|
|
416
|
+
* Leaves the work of a worktree as the branch `branch`, at `commit`, and removes the worktree.
|
|
417
|
+
* The branch is set first: whatever goes wrong after that, the work is on it.
|
|
418
|
+
*/
|
|
419
|
+
private leaveBranch;
|
|
420
|
+
/** Records how the work in a job's worktree ended. */
|
|
421
|
+
private endWorktree;
|
|
422
|
+
/**
|
|
423
|
+
* Takes the session that was started in a worktree for gone once the worktree is: the folder
|
|
424
|
+
* it works in is not there any more, so it is no session to hand another job to.
|
|
425
|
+
*/
|
|
426
|
+
private retireFrom;
|
|
427
|
+
/**
|
|
428
|
+
* Puts away the worktrees nobody came for: those of jobs that finished longer ago than
|
|
429
|
+
* `limits.worktreeKeepMs`. What such a worktree holds is kept as a commit under a ref of its
|
|
430
|
+
* own, the worktree and its branch are removed, and whoever handed the job over is told
|
|
431
|
+
* where the work is. Looked at once an hour.
|
|
432
|
+
*/
|
|
433
|
+
private sweepWorktrees;
|
|
434
|
+
/**
|
|
435
|
+
* Puts the worktree of a job away. Nothing is removed before its work is kept: when git
|
|
436
|
+
* cannot read the worktree because its folder is gone, the commits on its branch are kept,
|
|
437
|
+
* and when it cannot for another reason, the worktree stays and the next look tries again.
|
|
438
|
+
*/
|
|
439
|
+
private putAway;
|
|
440
|
+
/** The board of this bridge, or the refusal of a bridge that was given none. */
|
|
441
|
+
private requireBoard;
|
|
442
|
+
/** The project a call about the board is for: the caller's own, or the one the person names. */
|
|
443
|
+
private boardProject;
|
|
444
|
+
/** The jobs whose own notes a caller may see: an agent's are those it is a party of. */
|
|
445
|
+
private jobsSeenBy;
|
|
446
|
+
/**
|
|
447
|
+
* Puts a note on the board of a project, for the agents that work there to find: a fact, or
|
|
448
|
+
* what a job taught. The note carries who said it, on which job and when. `caller` is the
|
|
449
|
+
* agent that says it, or `null` for the person, who names the project. A note kept to a job
|
|
450
|
+
* (`jobOnly`) is seen by the two agents of that job only.
|
|
451
|
+
*
|
|
452
|
+
* @throws BridgeError `no_board`, `not_registered`, `unknown_job`, `not_a_party` (the job named
|
|
453
|
+
* is not the caller's), `invalid_input`
|
|
454
|
+
*/
|
|
455
|
+
remember(caller: string | null, input: RememberInput): Promise<BoardFact>;
|
|
456
|
+
/**
|
|
457
|
+
* Writes down that a note went on the board, and who said it this time. Everybody can read
|
|
458
|
+
* the journal, so the text of a note kept to one job is left out of it.
|
|
459
|
+
*/
|
|
460
|
+
private journalNote;
|
|
461
|
+
/**
|
|
462
|
+
* Looks at the board of a project: the notes that fit `text` best, or the newest. An agent
|
|
463
|
+
* sees the notes of its project and those kept to the jobs it is a party of, the person
|
|
464
|
+
* (`caller` is `null`) every note of the project they name.
|
|
465
|
+
*
|
|
466
|
+
* @throws BridgeError `no_board`, `not_registered`, `invalid_input`
|
|
467
|
+
*/
|
|
468
|
+
recall(caller: string | null, input?: RecallInput): Promise<BoardFact[]>;
|
|
469
|
+
/**
|
|
470
|
+
* Lets a note of the board go: it is found no more, and is not deleted. An agent lets go what
|
|
471
|
+
* it said itself, the person (`caller` is `null`) any note of the project they name.
|
|
472
|
+
*
|
|
473
|
+
* @throws BridgeError `no_board`, `not_registered`, `invalid_input` (no such note there),
|
|
474
|
+
* `not_a_party` (the note is another's)
|
|
475
|
+
*/
|
|
476
|
+
forget(caller: string | null, input: ForgetInput): Promise<BoardFact>;
|
|
477
|
+
/** The text of a job as its caller wrote it: its first letter without what the bridge added. */
|
|
478
|
+
private taskText;
|
|
479
|
+
/**
|
|
480
|
+
* Whether the rules of an agent let it read a file without asking: its own, and those of every
|
|
481
|
+
* agent up the chain of the jobs it carries out. True on a bridge that was given no judge:
|
|
482
|
+
* what an agent names in its own project it could read itself.
|
|
483
|
+
*/
|
|
484
|
+
private mayRead;
|
|
485
|
+
/**
|
|
486
|
+
* The block the bridge puts under the text of a job, see `buildHandover`: what the caller
|
|
487
|
+
* named, the lines of the files it pointed at, and the notes of the board that fit the job.
|
|
488
|
+
* Undefined when there is nothing to add. It never fails the hand-over and never holds it up
|
|
489
|
+
* for long: what cannot be read or found in time is left out, and the block is kept small
|
|
490
|
+
* enough for the letter to take it.
|
|
491
|
+
*/
|
|
492
|
+
private handoverFor;
|
|
493
|
+
/**
|
|
494
|
+
* Notes how a job ended on the board of its project, in the bridge's own name: who did it for
|
|
495
|
+
* whom, how it ended, what its checks showed and the start of what was reported. A later job
|
|
496
|
+
* like it finds the note in its handover.
|
|
497
|
+
*/
|
|
498
|
+
private noteOutcome;
|
|
499
|
+
/** Puts on the board what a call left for it, after the call is stored. */
|
|
500
|
+
private keepNotes;
|
|
316
501
|
/** @throws BridgeError `unknown_job` */
|
|
317
502
|
job(number: number): Promise<BridgeJob>;
|
|
318
503
|
/** Jobs, newest first, 200 at most unless `limit` says otherwise */
|
|
@@ -410,7 +595,7 @@ export declare class BridgeDispatcher extends EventEmitter<BridgeDispatcherEvent
|
|
|
410
595
|
* with, and no letter of it is due any more.
|
|
411
596
|
*/
|
|
412
597
|
private closeLetters;
|
|
413
|
-
private
|
|
598
|
+
private acceptLetter;
|
|
414
599
|
/** A letter the bridge writes itself. It costs the job nothing and is never held back as a repeat. */
|
|
415
600
|
private systemNote;
|
|
416
601
|
private answeredLetter;
|
package/dist/dispatcher.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,
|
|
1
|
+
{"version":3,"file":"dispatcher.d.ts","sourceRoot":"","sources":["../src/dispatcher.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAK3C,OAAO,EAAoB,KAAK,SAAS,EAAE,KAAK,SAAS,EAAqB,MAAM,YAAY,CAAC;AAGjG,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EA0BL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,cAAc,EACnB,KAAK,SAAS,EACd,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,UAAU,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