@vibe-commit/capture 0.10.0 → 0.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -1
- package/dist/agent_hooks.js +2 -2
- package/dist/cli.d.ts +35 -0
- package/dist/cli.js +412 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/backfill.js +19 -2
- package/dist/commands/backfill.js.map +1 -1
- package/dist/commands/finalize.d.ts +37 -1
- package/dist/commands/finalize.js +129 -29
- package/dist/commands/finalize.js.map +1 -1
- package/dist/commands/status.js +7 -0
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/status_machine.js +5 -0
- package/dist/commands/status_machine.js.map +1 -1
- package/dist/commands/upload_worker.d.ts +65 -0
- package/dist/commands/upload_worker.js +337 -0
- package/dist/commands/upload_worker.js.map +1 -0
- package/dist/copy/strings.d.ts +25 -8
- package/dist/copy/strings.js +43 -9
- package/dist/copy/strings.js.map +1 -1
- package/dist/drain.d.ts +68 -0
- package/dist/drain.js +234 -0
- package/dist/drain.js.map +1 -0
- package/dist/firing.d.ts +169 -0
- package/dist/firing.js +334 -0
- package/dist/firing.js.map +1 -0
- package/dist/hooks/entry.d.ts +171 -26
- package/dist/hooks/entry.js +337 -508
- package/dist/hooks/entry.js.map +1 -1
- package/dist/hooks/fire_lock.d.ts +36 -87
- package/dist/hooks/fire_lock.js +40 -99
- package/dist/hooks/fire_lock.js.map +1 -1
- package/dist/hooks/post_commit.d.ts +2 -0
- package/dist/hooks/post_commit.js +7 -3
- package/dist/hooks/post_commit.js.map +1 -1
- package/dist/hooks/session_start.d.ts +18 -0
- package/dist/hooks/session_start.js +29 -0
- package/dist/hooks/session_start.js.map +1 -1
- package/dist/identity.d.ts +32 -0
- package/dist/identity.js +38 -0
- package/dist/identity.js.map +1 -0
- package/dist/index.d.ts +3 -17
- package/dist/index.js +59 -450
- package/dist/index.js.map +1 -1
- package/dist/paths.d.ts +18 -0
- package/dist/paths.js +31 -0
- package/dist/paths.js.map +1 -1
- package/dist/pending_prune.d.ts +2 -2
- package/dist/pending_prune.js +2 -2
- package/dist/policy.d.ts +17 -0
- package/dist/policy.js +7 -0
- package/dist/policy.js.map +1 -1
- package/dist/post.d.ts +52 -4
- package/dist/post.js +59 -21
- package/dist/post.js.map +1 -1
- package/dist/replay.d.ts +172 -0
- package/dist/replay.js +302 -0
- package/dist/replay.js.map +1 -0
- package/dist/session_targets.d.ts +12 -0
- package/dist/session_targets.js +6 -1
- package/dist/session_targets.js.map +1 -1
- package/dist/spool.d.ts +44 -16
- package/dist/spool.js +174 -33
- package/dist/spool.js.map +1 -1
- package/dist/spool_union.d.ts +18 -2
- package/dist/spool_union.js +23 -2
- package/dist/spool_union.js.map +1 -1
- package/dist/state.js +21 -14
- package/dist/state.js.map +1 -1
- package/dist/stdin.d.ts +2 -0
- package/dist/stdin.js +13 -0
- package/dist/stdin.js.map +1 -0
- package/dist/uploader_status.d.ts +34 -0
- package/dist/uploader_status.js +25 -0
- package/dist/uploader_status.js.map +1 -0
- package/dist/uploader_view.d.ts +39 -0
- package/dist/uploader_view.js +106 -0
- package/dist/uploader_view.js.map +1 -0
- package/dist/verbs.d.ts +11 -0
- package/dist/verbs.js +13 -0
- package/dist/verbs.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE UPLOAD WORKER — U5a of the detached uploader (plan §3.3, §3.9, §3.12).
|
|
3
|
+
*
|
|
4
|
+
* `vibecommit __upload-worker`: a hidden verb (not in `VERBS`, not in help), spawned detached by the hook when it has recorded a firing and
|
|
5
|
+
* no worker is alive (U6 spawns it; until then nothing does). ONE worker per machine and identity (`identity.ts`) holds
|
|
6
|
+
* `uploader.<id>.lock`, walks every session that has a firing log, and replays each session's oldest unconsumed firing ALONE through
|
|
7
|
+
* `replayStep`. The hook never waits for the network again; this process does, with a fixed request timeout and no deadline.
|
|
8
|
+
*
|
|
9
|
+
* ## What bounds it
|
|
10
|
+
* - **One request at a time**, and after each step that made requests a sleep of `max(250 ms, the step's elapsed time)` capped at 30 s
|
|
11
|
+
* (D9), so about half the wall clock is server work. A step is one delta per target, so it is a handful of requests at most.
|
|
12
|
+
* - **Backoff per session** on `later`: 5 s, doubling to 5 min, with jitter. Sessions back off independently; one failing session does not
|
|
13
|
+
* slow the rest.
|
|
14
|
+
* - **No idle linger.** It exits when nothing is owed (release the lock, look at the queue again, and take the lock back only if
|
|
15
|
+
* something arrived in between), after 30 min with no progress and after 60 min in all, so an upgrade takes effect and a stuck worker
|
|
16
|
+
* cannot live on. The next hook respawns it.
|
|
17
|
+
* - **It never waits for a session's writer lock** (a busy session is revisited) and sleeps at least 25 ms after every step that held one,
|
|
18
|
+
* longer than a waiting `finalize` polls, so a waiter can win.
|
|
19
|
+
* - **A newer firing version** stops it after the step in hand: a newer build owns those lines.
|
|
20
|
+
* - **A revoked or missing credential** stops it (`fatal`); the cursor stays, so nothing is lost and the next hook retries.
|
|
21
|
+
*
|
|
22
|
+
* ## What it reports: `uploader.<id>.status`
|
|
23
|
+
* Counts, classes and times only: never a body, a path or a credential. Written atomically after every step. `status` reads it (U7), and
|
|
24
|
+
* the hook reads it for notices (U6). "Behind" is NEVER taken from the worker's own claim; `status` recomputes it from the firing logs.
|
|
25
|
+
*
|
|
26
|
+
* ## ⛔ Static imports are the worker's own. `index.ts` loads this file with a dynamic `import()` that fails closed to exit 0.
|
|
27
|
+
*/
|
|
28
|
+
import { writeFileAtomic } from "../atomic_write.js";
|
|
29
|
+
import { drainIdleStep } from "../drain.js";
|
|
30
|
+
import { firingSessions, readCursor, readFirings } from "../firing.js";
|
|
31
|
+
import { unboundedPaceMs } from "../hooks/entry.js";
|
|
32
|
+
import { claimUploader, UPLOADER_BEAT_MS } from "../hooks/fire_lock.js";
|
|
33
|
+
import { identityDigest } from "../identity.js";
|
|
34
|
+
import { uploaderStatusPath } from "../paths.js";
|
|
35
|
+
import { ingestUrl } from "../post.js";
|
|
36
|
+
import { replayStep, REQUEST_TIMEOUT_MS } from "../replay.js";
|
|
37
|
+
/** Backoff on `later` (plan §3.12). */
|
|
38
|
+
export const BACKOFF_FIRST_MS = 5_000;
|
|
39
|
+
export const BACKOFF_MAX_MS = 5 * 60_000;
|
|
40
|
+
/** Pacing (D9): sleep after a step that made requests. The constants and `unboundedPaceMs` live in `hooks/entry.ts`, beside the loops that must honour them. */
|
|
41
|
+
/** Yield after a step that held a session lock: longer than `WRITER_POLL_MS` (20 ms) so a waiter can win. */
|
|
42
|
+
export const YIELD_MS = 25;
|
|
43
|
+
/** Lifetime bounds (plan §3.9). */
|
|
44
|
+
export const NO_PROGRESS_MS = 30 * 60_000;
|
|
45
|
+
export const TOTAL_MS = 60 * 60_000;
|
|
46
|
+
/** How long a pass with nothing to do but wait (busy sessions, backoff) sleeps before looking again. */
|
|
47
|
+
const IDLE_POLL_MS = 1_000;
|
|
48
|
+
/** The last outcomes kept in the status file. */
|
|
49
|
+
const OUTCOMES_KEPT = 20;
|
|
50
|
+
const realSleep = (ms) => new Promise((resolve) => {
|
|
51
|
+
setTimeout(resolve, ms);
|
|
52
|
+
});
|
|
53
|
+
/** `5 s, 10 s, ... 5 min`, with ±25 % jitter. Pure given `random`. */
|
|
54
|
+
export function backoffMs(failures, random) {
|
|
55
|
+
const base = Math.min(BACKOFF_MAX_MS, BACKOFF_FIRST_MS * 2 ** Math.max(0, failures - 1));
|
|
56
|
+
return Math.floor(base * (0.75 + random() * 0.5));
|
|
57
|
+
}
|
|
58
|
+
/** `Retry-After` wins when it is longer than our own backoff, and nothing waits past the backoff ceiling. Pure. */
|
|
59
|
+
export function waitAfterLaterMs(failures, retryAfterMs, random) {
|
|
60
|
+
return Math.min(BACKOFF_MAX_MS, Math.max(backoffMs(failures, random), retryAfterMs ?? 0));
|
|
61
|
+
}
|
|
62
|
+
/** The sleep after a step that made requests: `max(250 ms, elapsed)`, capped. Pure. */
|
|
63
|
+
export function paceMs(elapsedMs) {
|
|
64
|
+
return unboundedPaceMs(elapsedMs);
|
|
65
|
+
}
|
|
66
|
+
/** Did this step put requests on the wire? (`done:nothing-granted` and friends resolved targets and sent nothing.) */
|
|
67
|
+
function madeRequests(step) {
|
|
68
|
+
switch (step.kind) {
|
|
69
|
+
case "more":
|
|
70
|
+
case "later":
|
|
71
|
+
case "threw":
|
|
72
|
+
return true;
|
|
73
|
+
case "fatal":
|
|
74
|
+
return step.why === "rejected";
|
|
75
|
+
case "done":
|
|
76
|
+
// U6b (F2b): a HELD step that put a request on the wire (a 403 capture_not_approved) is paced like any other; `requested` says so.
|
|
77
|
+
return step.class === "delivered" || (step.class === "held" && step.requested === true);
|
|
78
|
+
default:
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
/** Does `stem` still owe a firing of this identity? A read, no lock. */
|
|
83
|
+
function owes(cfg, stem) {
|
|
84
|
+
return readFirings(cfg.home, stem, readCursor(cfg.home, stem).offset).firings.some((r) => r.firing.id === cfg.identity);
|
|
85
|
+
}
|
|
86
|
+
export async function runUploadWorker(opts) {
|
|
87
|
+
const now = opts.now ?? Date.now;
|
|
88
|
+
const sleep = opts.sleep ?? realSleep;
|
|
89
|
+
const random = opts.random ?? Math.random;
|
|
90
|
+
const noProgressMs = opts.noProgressMs ?? NO_PROGRESS_MS;
|
|
91
|
+
const totalMs = opts.totalMs ?? TOTAL_MS;
|
|
92
|
+
const url = ingestUrl(opts.env);
|
|
93
|
+
if (url === null)
|
|
94
|
+
return "no-url";
|
|
95
|
+
const identity = identityDigest({ url, env: opts.env });
|
|
96
|
+
const cfg = {
|
|
97
|
+
home: opts.home,
|
|
98
|
+
env: opts.env,
|
|
99
|
+
nodeVersion: opts.nodeVersion,
|
|
100
|
+
identity,
|
|
101
|
+
url,
|
|
102
|
+
requestTimeoutMs: opts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS,
|
|
103
|
+
...(opts.selfPath === undefined ? {} : { selfPath: opts.selfPath }),
|
|
104
|
+
};
|
|
105
|
+
const startedAt = now();
|
|
106
|
+
let lastProgressAt = startedAt;
|
|
107
|
+
const counts = {};
|
|
108
|
+
const outcomes = [];
|
|
109
|
+
// Set when the server rejects a credential; cleared by the next delivery. Read by the hook's `credential_revoked` notice.
|
|
110
|
+
let rejected;
|
|
111
|
+
const failures = new Map();
|
|
112
|
+
const notBefore = new Map();
|
|
113
|
+
// The idle drain (U5c): bytes sent this worker life, and one backoff for the drain as a whole (a failing session rotates to the back).
|
|
114
|
+
const drain = { bytes: 0 };
|
|
115
|
+
let drainFailures = 0;
|
|
116
|
+
let drainNotBefore = 0;
|
|
117
|
+
const writeStatus = (state, exit) => {
|
|
118
|
+
const status = {
|
|
119
|
+
v: 1,
|
|
120
|
+
pid: process.pid,
|
|
121
|
+
startedAt,
|
|
122
|
+
heartbeatAt: now(),
|
|
123
|
+
state,
|
|
124
|
+
...(exit === undefined ? {} : { exit }),
|
|
125
|
+
counts,
|
|
126
|
+
outcomes,
|
|
127
|
+
...(rejected === undefined ? {} : { rejected }),
|
|
128
|
+
};
|
|
129
|
+
try {
|
|
130
|
+
writeFileAtomic(uploaderStatusPath(opts.home, identity), `${JSON.stringify(status)}\n`, 0o600);
|
|
131
|
+
}
|
|
132
|
+
catch {
|
|
133
|
+
// A status file that cannot be written must not stop the uploading it reports on.
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
const record = (stem, klass, elapsedMs) => {
|
|
137
|
+
counts[klass] = (counts[klass] ?? 0) + 1;
|
|
138
|
+
outcomes.push({ at: now(), class: klass, elapsedMs, session: stem });
|
|
139
|
+
if (outcomes.length > OUTCOMES_KEPT)
|
|
140
|
+
outcomes.splice(0, outcomes.length - OUTCOMES_KEPT);
|
|
141
|
+
};
|
|
142
|
+
for (;;) {
|
|
143
|
+
const claim = claimUploader(opts.home, identity);
|
|
144
|
+
if (claim === null)
|
|
145
|
+
return "not-claimed";
|
|
146
|
+
let lockLost = false;
|
|
147
|
+
// The lock is beaten from a timer, so a live worker is never judged dead however long one request runs.
|
|
148
|
+
const beat = setInterval(() => {
|
|
149
|
+
if (!claim.refresh())
|
|
150
|
+
lockLost = true;
|
|
151
|
+
}, UPLOADER_BEAT_MS);
|
|
152
|
+
beat.unref();
|
|
153
|
+
let exit = null;
|
|
154
|
+
try {
|
|
155
|
+
writeStatus("running");
|
|
156
|
+
while (exit === null) {
|
|
157
|
+
if (lockLost) {
|
|
158
|
+
exit = "lock-lost";
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
161
|
+
if (now() - startedAt >= totalMs) {
|
|
162
|
+
exit = "total";
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
if (now() - lastProgressAt >= noProgressMs) {
|
|
166
|
+
exit = "no-progress";
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
let worked = false;
|
|
170
|
+
let waiting = false;
|
|
171
|
+
let newer = false;
|
|
172
|
+
for (const stem of firingSessions(opts.home)) {
|
|
173
|
+
if ((notBefore.get(stem) ?? 0) > now()) {
|
|
174
|
+
waiting = true;
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
let step;
|
|
178
|
+
try {
|
|
179
|
+
step = await replayStep(cfg, stem);
|
|
180
|
+
}
|
|
181
|
+
catch {
|
|
182
|
+
// `replayStep` counts its own throws; one that escapes it is a bug, and a worker that dies on it would crash-loop the machine.
|
|
183
|
+
record(stem, "escaped", 0);
|
|
184
|
+
continue;
|
|
185
|
+
}
|
|
186
|
+
switch (step.kind) {
|
|
187
|
+
case "idle":
|
|
188
|
+
case "foreign":
|
|
189
|
+
continue;
|
|
190
|
+
case "busy":
|
|
191
|
+
waiting = true;
|
|
192
|
+
continue;
|
|
193
|
+
case "newer":
|
|
194
|
+
newer = true;
|
|
195
|
+
continue;
|
|
196
|
+
case "done":
|
|
197
|
+
if (step.class === "delivered")
|
|
198
|
+
rejected = undefined;
|
|
199
|
+
record(stem, `done:${step.class}`, step.elapsedMs);
|
|
200
|
+
failures.delete(stem);
|
|
201
|
+
notBefore.delete(stem);
|
|
202
|
+
worked = true;
|
|
203
|
+
lastProgressAt = now();
|
|
204
|
+
break;
|
|
205
|
+
case "more":
|
|
206
|
+
record(stem, "more", step.elapsedMs);
|
|
207
|
+
failures.delete(stem);
|
|
208
|
+
worked = true;
|
|
209
|
+
lastProgressAt = now();
|
|
210
|
+
break;
|
|
211
|
+
case "later": {
|
|
212
|
+
const n = (failures.get(stem) ?? 0) + 1;
|
|
213
|
+
failures.set(stem, n);
|
|
214
|
+
notBefore.set(stem, now() + waitAfterLaterMs(n, step.retryAfterMs, random));
|
|
215
|
+
record(stem, "later", step.elapsedMs);
|
|
216
|
+
waiting = true;
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
case "threw":
|
|
220
|
+
record(stem, `threw:${step.class}`, step.elapsedMs);
|
|
221
|
+
if (step.class === "cursor-unwritable") {
|
|
222
|
+
// U6b (F9c): a cursor that cannot be written re-ran the resolver every ~250 ms for the worker's whole life. Back off like a `later`.
|
|
223
|
+
const n = (failures.get(stem) ?? 0) + 1;
|
|
224
|
+
failures.set(stem, n);
|
|
225
|
+
notBefore.set(stem, now() + waitAfterLaterMs(n, undefined, random));
|
|
226
|
+
waiting = true;
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
worked = true;
|
|
230
|
+
}
|
|
231
|
+
break;
|
|
232
|
+
case "fatal":
|
|
233
|
+
if (step.why === "rejected" && step.fingerprint !== undefined)
|
|
234
|
+
rejected = { at: now(), fingerprint: step.fingerprint };
|
|
235
|
+
record(stem, `fatal:${step.why}`, step.elapsedMs);
|
|
236
|
+
exit = "fatal";
|
|
237
|
+
break;
|
|
238
|
+
case "lost":
|
|
239
|
+
record(stem, "lock-lost", 0);
|
|
240
|
+
exit = "lock-lost";
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
writeStatus("running");
|
|
244
|
+
if (exit !== null)
|
|
245
|
+
break;
|
|
246
|
+
// D9 pacing after requests; otherwise just yield the session lock long enough for a waiter to take it.
|
|
247
|
+
await sleep(madeRequests(step) ? paceMs("elapsedMs" in step ? step.elapsedMs : 0) : YIELD_MS);
|
|
248
|
+
if (lockLost)
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
if (exit !== null)
|
|
252
|
+
break;
|
|
253
|
+
if (newer) {
|
|
254
|
+
exit = "newer-firing";
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
// LIVE FIRINGS OUTRANK THE DRAIN: it runs only when this pass had no live work, and one delta at a time, so the queue is looked at again
|
|
258
|
+
// before the next one.
|
|
259
|
+
if (!worked && !newer) {
|
|
260
|
+
if (drainNotBefore > now()) {
|
|
261
|
+
waiting = true;
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
const step = await drainIdleStep(cfg, drain, now);
|
|
265
|
+
switch (step.kind) {
|
|
266
|
+
case "delivered":
|
|
267
|
+
record("drain", "drain:delivered", step.elapsedMs);
|
|
268
|
+
drainFailures = 0;
|
|
269
|
+
worked = true;
|
|
270
|
+
lastProgressAt = now();
|
|
271
|
+
writeStatus("running");
|
|
272
|
+
await sleep(paceMs(step.elapsedMs));
|
|
273
|
+
break;
|
|
274
|
+
case "later":
|
|
275
|
+
drainFailures += 1;
|
|
276
|
+
drainNotBefore = now() + waitAfterLaterMs(drainFailures, step.retryAfterMs, random);
|
|
277
|
+
record("drain", "drain:later", step.elapsedMs);
|
|
278
|
+
waiting = true;
|
|
279
|
+
writeStatus("running");
|
|
280
|
+
break;
|
|
281
|
+
case "held":
|
|
282
|
+
// F2a/c: a held (403) session costs one request, then the whole drain backs off like a `later`: the same session asked again
|
|
283
|
+
// every second was the flood. The backoff resets on a delivery.
|
|
284
|
+
drainFailures += 1;
|
|
285
|
+
drainNotBefore = now() + waitAfterLaterMs(drainFailures, undefined, random);
|
|
286
|
+
record("drain", "drain:held", step.elapsedMs);
|
|
287
|
+
waiting = true;
|
|
288
|
+
writeStatus("running");
|
|
289
|
+
await sleep(paceMs(step.elapsedMs));
|
|
290
|
+
break;
|
|
291
|
+
case "fatal":
|
|
292
|
+
record("drain", "drain:fatal", step.elapsedMs);
|
|
293
|
+
exit = "fatal";
|
|
294
|
+
break;
|
|
295
|
+
case "idle":
|
|
296
|
+
break;
|
|
297
|
+
}
|
|
298
|
+
if (exit !== null)
|
|
299
|
+
break;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
if (!worked) {
|
|
303
|
+
if (!waiting && ![...firingSessions(opts.home)].some((stem) => owes(cfg, stem))) {
|
|
304
|
+
exit = "idle";
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
await sleep(IDLE_POLL_MS);
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
// ⛔ "EXITED" IS WRITTEN WHILE THE LOCK IS STILL OURS (P1's F3). Written after the release, a successor that claimed in the gap and wrote
|
|
311
|
+
// "running" would be overwritten by this stale "exited", and the hook's notices and `status` read this file. Then the test seam, then the release.
|
|
312
|
+
writeStatus("exited", exit ?? "idle");
|
|
313
|
+
opts.beforeRelease?.();
|
|
314
|
+
}
|
|
315
|
+
finally {
|
|
316
|
+
clearInterval(beat);
|
|
317
|
+
// Release FIRST, look at the queue SECOND: the hook appends first and checks the lock second, so at least one side sees the other.
|
|
318
|
+
claim.release();
|
|
319
|
+
}
|
|
320
|
+
if (exit === "idle" && firingSessions(opts.home).some((stem) => owes(cfg, stem))) {
|
|
321
|
+
// A firing arrived between the last look and the release, and the hook that wrote it saw our lock still held and did not spawn.
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
return exit ?? "idle";
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
/** The process entry for `__upload-worker`: real clock, real env. Never throws, never prints, always exits 0. */
|
|
328
|
+
export async function runUploadWorkerMain(env, home, selfPath = process.argv[1] ?? "") {
|
|
329
|
+
try {
|
|
330
|
+
await runUploadWorker({ home, env, nodeVersion: process.versions.node, selfPath });
|
|
331
|
+
}
|
|
332
|
+
catch {
|
|
333
|
+
// A detached process has nobody to tell.
|
|
334
|
+
}
|
|
335
|
+
return 0;
|
|
336
|
+
}
|
|
337
|
+
//# sourceMappingURL=upload_worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload_worker.js","sourceRoot":"","sources":["../../src/commands/upload_worker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAmB,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAsC,MAAM,cAAc,CAAC;AAElG,uCAAuC;AACvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC;AACtC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,MAAM,CAAC;AACzC,gKAAgK;AAChK,6GAA6G;AAC7G,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,CAAC;AAC3B,mCAAmC;AACnC,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,GAAG,MAAM,CAAC;AAC1C,MAAM,CAAC,MAAM,QAAQ,GAAG,EAAE,GAAG,MAAM,CAAC;AACpC,wGAAwG;AACxG,MAAM,YAAY,GAAG,KAAK,CAAC;AAC3B,iDAAiD;AACjD,MAAM,aAAa,GAAG,EAAE,CAAC;A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AI,EAAE;IACtH,IAAI,CAAC;QACH,MAAM,eAAe,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrF,CAAC;IAAC,MAAM,CAAC;QACP,yCAAyC;IAC3C,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC"}
|
package/dist/copy/strings.d.ts
CHANGED
|
@@ -139,6 +139,21 @@ export declare const STATUS: {
|
|
|
139
139
|
* changed them to match the screen rather than changing the screen.
|
|
140
140
|
*/
|
|
141
141
|
readonly repoLabel: "repo";
|
|
142
|
+
/**
|
|
143
|
+
* U7 (plan §3.8): the background uploader's row, machine-wide, under `last sent`. COMPUTED from the firing logs against the ledgers and from the
|
|
144
|
+
* worker's lock, never from the worker's own say-so, so a dead worker with bytes behind is "not running", never "up to date".
|
|
145
|
+
*/
|
|
146
|
+
readonly uploadLabel: "upload";
|
|
147
|
+
readonly uploadValue: (view: {
|
|
148
|
+
readonly state: "up_to_date" | "sending" | "waiting_to_retry" | "not_running";
|
|
149
|
+
readonly sessions: number;
|
|
150
|
+
readonly bytes: number;
|
|
151
|
+
readonly ackAge: string | null;
|
|
152
|
+
readonly attemptAge: string | null;
|
|
153
|
+
readonly problem: "no_answer" | "credential" | "error" | null;
|
|
154
|
+
}) => string;
|
|
155
|
+
/** The line under a "not running" row. */
|
|
156
|
+
readonly uploadNotRunning: "It retries on your next agent turn.";
|
|
142
157
|
/** 0.7.0, D6 · 2A: why this repo is on. One row under `repo`, only inside a repo that is on. */
|
|
143
158
|
readonly basisLabel: "basis";
|
|
144
159
|
readonly basisOwner: (owner: string) => string;
|
|
@@ -223,7 +238,8 @@ export declare const STATUS: {
|
|
|
223
238
|
/**
|
|
224
239
|
* 0.7.0, `SessionStart` (T21). `npm i -g` alone never adds the event to an agent's config, so a 0.6.x machine is
|
|
225
240
|
* missing it until `connect` runs. Only said on the npm channel: the plugin ships its own `hooks.json`, and its
|
|
226
|
-
* contract (no `SessionStart`, no git hooks) is unchanged.
|
|
241
|
+
* contract (no `SessionStart`, no git hooks) is unchanged. U10: without `SessionStart` a new granted clone still gets its commit hooks, from the
|
|
242
|
+
* background upload process the first time it delivers a session to that clone, so the line says "only after its first upload", not "will not".
|
|
227
243
|
*/
|
|
228
244
|
readonly sessionStartMissing: (agents: string, connect: string) => string;
|
|
229
245
|
/** 0.7.0, D4 · A. A hook the user deleted stays deleted; `connect` is the watched way back. */
|
|
@@ -378,18 +394,17 @@ export declare const CONNECT: {
|
|
|
378
394
|
/**
|
|
379
395
|
* ⚠ THE NUMBER AND ITS QUALIFIER ARE ONE UNIT.
|
|
380
396
|
*
|
|
381
|
-
* **
|
|
382
|
-
* recounted: the patterns live in `vibecommit-mcp/src/scrubber/patterns.ts`,
|
|
383
|
-
*
|
|
384
|
-
*
|
|
385
|
-
* from code.
|
|
397
|
+
* **13 is the server's counted figure since mcp #174** (a PEM `private_key` pattern joined the twelve `CR-042` counted, merged `6d8ec68`,
|
|
398
|
+
* so the earlier text said 12). Taken rather than recounted: the patterns live in `vibecommit-mcp/src/scrubber/patterns.ts`, which is closed
|
|
399
|
+
* source and another chain's repo. `CR-042` exists precisely because the draft said 10 — a number is a claim, and this one is counted from
|
|
400
|
+
* code. Alexander's OK for the change: 2026-11-06 04:35Z (relayed by P1); the web copy (`disclosure.ts`, digest-pinned) changes in lockstep.
|
|
386
401
|
*
|
|
387
402
|
* The qualifier is as load-bearing as the number. Without *"it is a pattern
|
|
388
403
|
* list, not a general secret detector"* and *"a secret it has no pattern for
|
|
389
404
|
* is uploaded"*, the count reads as PROTECTION — which is the reassurance D65
|
|
390
405
|
* §DR7 bans, arriving as arithmetic instead of as an adjective.
|
|
391
406
|
*/
|
|
392
|
-
readonly consentScrubber: "A scrubber removes
|
|
407
|
+
readonly consentScrubber: "A scrubber removes 13 known secret formats (AWS keys, GitHub tokens, and similar). It is a pattern list, not a general secret detector: a secret it has no pattern for is uploaded. Command output is not path-filtered.";
|
|
393
408
|
/**
|
|
394
409
|
* ⛔ **THE SECOND DATA CLASS, AND THE DISCLOSURE DID NOT MENTION IT AT ALL —
|
|
395
410
|
* `T15`, `D190`.**
|
|
@@ -415,7 +430,7 @@ export declare const CONNECT: {
|
|
|
415
430
|
* rightly: `post_commit.ts` gathered the list and it stayed in the spool. From 0.10.0 `capSpool` also returns `files` and the
|
|
416
431
|
* delta that carries `x-commits` carries the list too, for a GRANTED REPOSITORY only (never a folder). The paths are git's own
|
|
417
432
|
* (`git diff-tree -z --name-only`), unchanged, and the transcript scrubber does not run on them, which the sentence says
|
|
418
|
-
* because "a scrubber removes
|
|
433
|
+
* because "a scrubber removes 13 known secret formats" two paragraphs up would otherwise read as covering them. **Not
|
|
419
434
|
* describing the paths as uploaded would now be the FALSE DISCLOSURE, which is as much a claims defect as describing what
|
|
420
435
|
* does not leave.** The committer DATE still stays local.
|
|
421
436
|
*
|
|
@@ -898,6 +913,8 @@ export declare const BACKFILL: {
|
|
|
898
913
|
readonly parentLabel: "outside a repository";
|
|
899
914
|
readonly parentTouchedNothing: "touched nothing you chose";
|
|
900
915
|
readonly parentBusy: "another process was writing it";
|
|
916
|
+
/** U5b: an earlier turn of the session was recorded but could not be sent yet, so the session is not closed over it. */
|
|
917
|
+
readonly replayStopped: "an earlier turn could not be sent yet";
|
|
901
918
|
readonly parentFolderRefused: "the folder's repository belongs to someone else";
|
|
902
919
|
/** Skip reasons. */
|
|
903
920
|
readonly overSize: "over 50 MiB";
|
package/dist/copy/strings.js
CHANGED
|
@@ -233,6 +233,38 @@ export const STATUS = {
|
|
|
233
233
|
* changed them to match the screen rather than changing the screen.
|
|
234
234
|
*/
|
|
235
235
|
repoLabel: "repo",
|
|
236
|
+
/**
|
|
237
|
+
* U7 (plan §3.8): the background uploader's row, machine-wide, under `last sent`. COMPUTED from the firing logs against the ledgers and from the
|
|
238
|
+
* worker's lock, never from the worker's own say-so, so a dead worker with bytes behind is "not running", never "up to date".
|
|
239
|
+
*/
|
|
240
|
+
uploadLabel: "upload",
|
|
241
|
+
uploadValue: (view) => {
|
|
242
|
+
const size = view.bytes < 1024 ? `${view.bytes} ${view.bytes === 1 ? "byte" : "bytes"}` : view.bytes < 1048576 ? `${(view.bytes / 1024).toFixed(1)} KiB` : `${(view.bytes / 1048576).toFixed(1)} MiB`;
|
|
243
|
+
// "Behind" is RECORDED turns not yet sent (firings the hooks wrote that no worker has consumed): not the idle-drain backlog of sessions with no
|
|
244
|
+
// unconsumed firing, which this row does not count, and it includes firings of another server or credential.
|
|
245
|
+
const behind = `${view.sessions} ${view.sessions === 1 ? "session" : "sessions"} with unsent turns, ${size}`;
|
|
246
|
+
const ack = view.ackAge === null ? "nothing acknowledged yet" : `last acknowledged ${view.ackAge}`;
|
|
247
|
+
const why = view.problem === "no_answer"
|
|
248
|
+
? "the server did not answer"
|
|
249
|
+
: view.problem === "credential"
|
|
250
|
+
? "the server did not accept this machine's credential"
|
|
251
|
+
: view.problem === "error"
|
|
252
|
+
? "it stopped on an error"
|
|
253
|
+
: null;
|
|
254
|
+
const attempt = view.attemptAge === null || why === null ? null : `last attempt ${view.attemptAge}: ${why}`;
|
|
255
|
+
switch (view.state) {
|
|
256
|
+
case "up_to_date":
|
|
257
|
+
return view.ackAge === null ? "up to date" : `up to date · ${ack}`;
|
|
258
|
+
case "sending":
|
|
259
|
+
return `sending · ${behind} · ${ack}`;
|
|
260
|
+
case "waiting_to_retry":
|
|
261
|
+
return `waiting to retry · ${behind} · ${attempt ?? ack}`;
|
|
262
|
+
case "not_running":
|
|
263
|
+
return `not running · ${behind} · ${attempt ?? ack}`;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
/** The line under a "not running" row. */
|
|
267
|
+
uploadNotRunning: "It retries on your next agent turn.",
|
|
236
268
|
/** 0.7.0, D6 · 2A: why this repo is on. One row under `repo`, only inside a repo that is on. */
|
|
237
269
|
basisLabel: "basis",
|
|
238
270
|
basisOwner: (owner) => `owner grant ${owner}/`,
|
|
@@ -320,9 +352,10 @@ export const STATUS = {
|
|
|
320
352
|
/**
|
|
321
353
|
* 0.7.0, `SessionStart` (T21). `npm i -g` alone never adds the event to an agent's config, so a 0.6.x machine is
|
|
322
354
|
* missing it until `connect` runs. Only said on the npm channel: the plugin ships its own `hooks.json`, and its
|
|
323
|
-
* contract (no `SessionStart`, no git hooks) is unchanged.
|
|
355
|
+
* contract (no `SessionStart`, no git hooks) is unchanged. U10: without `SessionStart` a new granted clone still gets its commit hooks, from the
|
|
356
|
+
* background upload process the first time it delivers a session to that clone, so the line says "only after its first upload", not "will not".
|
|
324
357
|
*/
|
|
325
|
-
sessionStartMissing: (agents, connect) => `${agents} will
|
|
358
|
+
sessionStartMissing: (agents, connect) => `${agents} will add commit hooks to a new clone only after its first upload: VibeCommit's SessionStart hook is not registered there. Run \`${connect}\` to register it.`,
|
|
326
359
|
/** 0.7.0, D4 · A. A hook the user deleted stays deleted; `connect` is the watched way back. */
|
|
327
360
|
commitHooksOff: (connect) => `Commit hooks are off in this repository: sessions are captured, commits are not linked to them. Run \`${connect}\` here to add them.`,
|
|
328
361
|
commitHooksForeign: (connect) => `This clone has its own commit hook, so VibeCommit's is not installed here. Run \`${connect}\` here to chain it.`,
|
|
@@ -522,18 +555,17 @@ export const CONNECT = {
|
|
|
522
555
|
/**
|
|
523
556
|
* ⚠ THE NUMBER AND ITS QUALIFIER ARE ONE UNIT.
|
|
524
557
|
*
|
|
525
|
-
* **
|
|
526
|
-
* recounted: the patterns live in `vibecommit-mcp/src/scrubber/patterns.ts`,
|
|
527
|
-
*
|
|
528
|
-
*
|
|
529
|
-
* from code.
|
|
558
|
+
* **13 is the server's counted figure since mcp #174** (a PEM `private_key` pattern joined the twelve `CR-042` counted, merged `6d8ec68`,
|
|
559
|
+
* so the earlier text said 12). Taken rather than recounted: the patterns live in `vibecommit-mcp/src/scrubber/patterns.ts`, which is closed
|
|
560
|
+
* source and another chain's repo. `CR-042` exists precisely because the draft said 10 — a number is a claim, and this one is counted from
|
|
561
|
+
* code. Alexander's OK for the change: 2026-11-06 04:35Z (relayed by P1); the web copy (`disclosure.ts`, digest-pinned) changes in lockstep.
|
|
530
562
|
*
|
|
531
563
|
* The qualifier is as load-bearing as the number. Without *"it is a pattern
|
|
532
564
|
* list, not a general secret detector"* and *"a secret it has no pattern for
|
|
533
565
|
* is uploaded"*, the count reads as PROTECTION — which is the reassurance D65
|
|
534
566
|
* §DR7 bans, arriving as arithmetic instead of as an adjective.
|
|
535
567
|
*/
|
|
536
|
-
consentScrubber: "A scrubber removes
|
|
568
|
+
consentScrubber: "A scrubber removes 13 known secret formats (AWS keys, GitHub tokens, and similar). It is a pattern list, not a general secret detector: a secret it has no pattern for is uploaded. Command output is not path-filtered.",
|
|
537
569
|
/**
|
|
538
570
|
* ⛔ **THE SECOND DATA CLASS, AND THE DISCLOSURE DID NOT MENTION IT AT ALL —
|
|
539
571
|
* `T15`, `D190`.**
|
|
@@ -559,7 +591,7 @@ export const CONNECT = {
|
|
|
559
591
|
* rightly: `post_commit.ts` gathered the list and it stayed in the spool. From 0.10.0 `capSpool` also returns `files` and the
|
|
560
592
|
* delta that carries `x-commits` carries the list too, for a GRANTED REPOSITORY only (never a folder). The paths are git's own
|
|
561
593
|
* (`git diff-tree -z --name-only`), unchanged, and the transcript scrubber does not run on them, which the sentence says
|
|
562
|
-
* because "a scrubber removes
|
|
594
|
+
* because "a scrubber removes 13 known secret formats" two paragraphs up would otherwise read as covering them. **Not
|
|
563
595
|
* describing the paths as uploaded would now be the FALSE DISCLOSURE, which is as much a claims defect as describing what
|
|
564
596
|
* does not leave.** The committer DATE still stays local.
|
|
565
597
|
*
|
|
@@ -1066,6 +1098,8 @@ export const BACKFILL = {
|
|
|
1066
1098
|
parentLabel: "outside a repository",
|
|
1067
1099
|
parentTouchedNothing: "touched nothing you chose",
|
|
1068
1100
|
parentBusy: "another process was writing it",
|
|
1101
|
+
/** U5b: an earlier turn of the session was recorded but could not be sent yet, so the session is not closed over it. */
|
|
1102
|
+
replayStopped: "an earlier turn could not be sent yet",
|
|
1069
1103
|
parentFolderRefused: "the folder's repository belongs to someone else",
|
|
1070
1104
|
/** Skip reasons. */
|
|
1071
1105
|
overSize: "over 50 MiB",
|