@vibe-commit/capture 0.4.5 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +57 -1
  2. package/dist/atomic_write.d.ts +14 -0
  3. package/dist/atomic_write.js +33 -0
  4. package/dist/atomic_write.js.map +1 -0
  5. package/dist/commands/auth.d.ts +26 -2
  6. package/dist/commands/auth.js +68 -13
  7. package/dist/commands/auth.js.map +1 -1
  8. package/dist/commands/browser_credential.d.ts +39 -12
  9. package/dist/commands/browser_credential.js +84 -11
  10. package/dist/commands/browser_credential.js.map +1 -1
  11. package/dist/commands/connect.d.ts +6 -2
  12. package/dist/commands/connect.js +140 -42
  13. package/dist/commands/connect.js.map +1 -1
  14. package/dist/commands/credential_problem.d.ts +43 -0
  15. package/dist/commands/credential_problem.js +81 -0
  16. package/dist/commands/credential_problem.js.map +1 -0
  17. package/dist/commands/device_credential.d.ts +47 -0
  18. package/dist/commands/device_credential.js +275 -0
  19. package/dist/commands/device_credential.js.map +1 -0
  20. package/dist/commands/finish_mint.d.ts +73 -0
  21. package/dist/commands/finish_mint.js +140 -0
  22. package/dist/commands/finish_mint.js.map +1 -0
  23. package/dist/commands/probe.d.ts +14 -0
  24. package/dist/commands/probe.js +29 -0
  25. package/dist/commands/probe.js.map +1 -0
  26. package/dist/commands/status.js +36 -52
  27. package/dist/commands/status.js.map +1 -1
  28. package/dist/copy/index.d.ts +1 -1
  29. package/dist/copy/index.js +1 -1
  30. package/dist/copy/index.js.map +1 -1
  31. package/dist/copy/strings.d.ts +183 -4
  32. package/dist/copy/strings.js +192 -6
  33. package/dist/copy/strings.js.map +1 -1
  34. package/dist/credential.d.ts +25 -0
  35. package/dist/credential.js +41 -3
  36. package/dist/credential.js.map +1 -1
  37. package/dist/credential_meta.d.ts +66 -0
  38. package/dist/credential_meta.js +164 -0
  39. package/dist/credential_meta.js.map +1 -0
  40. package/dist/device_mode.d.ts +18 -0
  41. package/dist/device_mode.js +28 -0
  42. package/dist/device_mode.js.map +1 -0
  43. package/dist/hooks/entry.d.ts +5 -0
  44. package/dist/hooks/entry.js +40 -5
  45. package/dist/hooks/entry.js.map +1 -1
  46. package/dist/index.js +33 -2
  47. package/dist/index.js.map +1 -1
  48. package/dist/install.d.ts +37 -0
  49. package/dist/install.js +29 -2
  50. package/dist/install.js.map +1 -1
  51. package/dist/oauth/device.d.ts +129 -0
  52. package/dist/oauth/device.js +194 -0
  53. package/dist/oauth/device.js.map +1 -0
  54. package/dist/oauth/discovery.d.ts +5 -0
  55. package/dist/oauth/discovery.js +6 -0
  56. package/dist/oauth/discovery.js.map +1 -1
  57. package/dist/oauth/mint.d.ts +18 -5
  58. package/dist/oauth/mint.js +18 -5
  59. package/dist/oauth/mint.js.map +1 -1
  60. package/dist/oauth/retire.d.ts +64 -0
  61. package/dist/oauth/retire.js +106 -0
  62. package/dist/oauth/retire.js.map +1 -0
  63. package/dist/oauth/signin.d.ts +12 -0
  64. package/dist/oauth/signin.js +5 -1
  65. package/dist/oauth/signin.js.map +1 -1
  66. package/dist/oauth/token.d.ts +1 -0
  67. package/dist/oauth/token.js +5 -0
  68. package/dist/oauth/token.js.map +1 -1
  69. package/dist/oauth/whoami.d.ts +55 -0
  70. package/dist/oauth/whoami.js +77 -0
  71. package/dist/oauth/whoami.js.map +1 -0
  72. package/dist/paths.d.ts +19 -0
  73. package/dist/paths.js +25 -0
  74. package/dist/paths.js.map +1 -1
  75. package/dist/post.d.ts +39 -4
  76. package/dist/post.js +103 -16
  77. package/dist/post.js.map +1 -1
  78. package/dist/state.d.ts +11 -0
  79. package/dist/state.js +33 -0
  80. package/dist/state.js.map +1 -1
  81. package/dist/system_message.d.ts +21 -2
  82. package/dist/system_message.js +37 -7
  83. package/dist/system_message.js.map +1 -1
  84. package/dist/term.d.ts +6 -0
  85. package/dist/term.js +15 -0
  86. package/dist/term.js.map +1 -1
  87. package/dist/update_nudge.d.ts +31 -0
  88. package/dist/update_nudge.js +127 -0
  89. package/dist/update_nudge.js.map +1 -0
  90. package/dist/version.d.ts +1 -1
  91. package/dist/version.js +1 -1
  92. package/package.json +3 -3
@@ -26,7 +26,7 @@
26
26
  *
27
27
  * @provenance vibecommit-mcp src/transport/server.ts — POST /oauth/ingest-credential now mints one, verified
28
28
  */
29
- import { AUTH, CONNECT, COMMANDS, AGENT_HOOKS, COMMIT_HOOK, ERRORS, HELP, PATH_CLASH, RUNTIME, URLS, } from "../copy/index.js";
29
+ import { AUTH, CONNECT, COMMANDS, AGENT_HOOKS, COMMIT_HOOK, ERRORS, HELP, PATH_CLASH, REJECTED, DEVICE, RUNTIME, URLS, } from "../copy/index.js";
30
30
  import { dialectFor } from "../agents/registry.js";
31
31
  import { grantProject, isAffirmative, isProjectAllowed } from "../consent.js";
32
32
  import { loadCredential } from "../credential.js";
@@ -34,12 +34,14 @@ import { EXIT } from "../exit.js";
34
34
  import { resolveRepoSlug } from "../git.js";
35
35
  import { confinementRoots, readSpan, DEFAULT_HOOK_BUDGET_MS } from "../hooks/entry.js";
36
36
  import { installAgentHooks } from "../agent_install.js";
37
- import { classifyInstall, installPostCommitHook } from "../install.js";
38
- import { CAPTURE_NOT_APPROVED, deliver, ingestUrl, } from "../post.js";
37
+ import { authCommandFor, classifyInstall, installPostCommitHook } from "../install.js";
38
+ import { CAPTURE_NOT_APPROVED, deliver, credentialFingerprint, ingestUrl, } from "../post.js";
39
39
  import { resolveProjectKeys } from "../project.js";
40
40
  import { meetsNodeFloor, NODE_FLOOR_TEXT } from "../runtime.js";
41
41
  import { credentialsPath } from "../paths.js";
42
42
  import { paint, renderErrorBlock, tildePath, truncatePath, wrap } from "../term.js";
43
+ import { credentialProblem, rejectedCredentialBlock } from "./credential_problem.js";
44
+ import { probeCredential } from "./probe.js";
43
45
  import { writeLines } from "./context.js";
44
46
  import { signInBeat } from "./browser_credential.js";
45
47
  export async function connect(ctx, options = {}, deps = {}) {
@@ -50,6 +52,17 @@ export async function connect(ctx, options = {}, deps = {}) {
50
52
  writeLines(ctx.stdout, [HELP.commands.connect]);
51
53
  return EXIT.ok;
52
54
  }
55
+ // `CR-234d`: sign-in by code waits on a person and ends in a question — a terminal or nothing.
56
+ if (options.device === true && !ctx.stdinIsTty) {
57
+ writeLines(ctx.stderr, renderErrorBlock({
58
+ kind: "bad",
59
+ what: DEVICE.needsTerminalWhat,
60
+ why: [DEVICE.needsTerminalWhy],
61
+ fixLabel: DEVICE.needsTerminalFix,
62
+ fixes: [DEVICE.needsTerminalCommand(authCommandFor(ctx.env, ctx.selfPath))],
63
+ }, ctx.colour));
64
+ return EXIT.usage;
65
+ }
53
66
  // (1) The runtime floor refuses LOUDLY here, unlike in the hook: the user is
54
67
  // watching and can act, and D57 §DX11 asks for exactly that asymmetry.
55
68
  if (!meetsNodeFloor(ctx.nodeVersion)) {
@@ -120,11 +133,13 @@ export async function connect(ctx, options = {}, deps = {}) {
120
133
  */
121
134
  async function afterConsent(ctx, keys, options, deps) {
122
135
  if (options.signIn === true) {
123
- const code = await signInBeat(ctx, { retry: "sign-in" });
136
+ // `G8a`: `verify` — a session file that loads but that the server refuses to renew is expired,
137
+ // and "already signed in" over it was the bug.
138
+ const code = await signInBeat(ctx, { retry: "sign-in", verify: true, ...(deps.fetch === undefined ? {} : { fetch: deps.fetch }) });
124
139
  if (code !== EXIT.ok)
125
140
  return code;
126
141
  }
127
- return await credentialBeat(ctx, keys, deps);
142
+ return await credentialBeat(ctx, keys, deps, options);
128
143
  }
129
144
  /**
130
145
  * The disclosure block — `CR-111d`, style guide §10.2 transcribed.
@@ -184,10 +199,29 @@ function disclosure(ctx) {
184
199
  * name, and on npm >= 7 the clash surfaces as EEXIST during the first install of
185
200
  * exactly the population that installs commit tooling.
186
201
  */
187
- async function credentialBeat(ctx, keys, deps) {
202
+ async function credentialBeat(ctx, keys, deps, options = {}) {
188
203
  const load = loadCredential({ env: ctx.env, home: ctx.home });
189
204
  if (load.kind === "ok") {
190
- return await captureBeat(ctx, keys, load.credential);
205
+ // ⛔ ASK THE SERVER BEFORE SENDING — `R12` (D13 = A), G1. `connect` used to send whatever loaded
206
+ // and print "Recording… Connected." over the 401, and the hook's own 401 copy sent users here to
207
+ // reconnect. The probe runs FIRST so a dead credential never writes a stop (the send is skipped
208
+ // and the turns stay held), and so nothing below can say "Connected" without the server's yes.
209
+ const probe = await probeCredential(ctx, load.credential, deps.fetch);
210
+ if (probe.kind === "unauthorized") {
211
+ writeLines(ctx.stderr, rejectedCredentialBlock({
212
+ home: ctx.home,
213
+ fingerprint: credentialFingerprint(load.credential),
214
+ nowMs: ctx.now().getTime(),
215
+ authCommand: authCommandFor(ctx.env, ctx.selfPath),
216
+ colour: ctx.colour,
217
+ standing: false,
218
+ }));
219
+ return EXIT.notConnected;
220
+ }
221
+ // Only a 401 proves the credential dead. A 5xx, a 404 from a server that predates the route, a
222
+ // timeout or a network error says nothing about it — and "a blip is not a failed install" is the
223
+ // rule `captureBeat` already keeps for the send. So: today's ending, plus one muted line.
224
+ return await captureBeat(ctx, keys, load.credential, probe.kind === "unavailable");
191
225
  }
192
226
  // ⛔ ONLY FOR `absent`, AND ONLY WITH A HUMAN AT THE TERMINAL (`CR-226`).
193
227
  // - `absent`: a credential that is present but wrong-class, unreadable or
@@ -197,20 +231,30 @@ async function credentialBeat(ctx, keys, deps) {
197
231
  // opened there waits five minutes for nobody. The old warning is the
198
232
  // right answer for them, and it is what they still get.
199
233
  if (load.kind === "absent" && ctx.stdinIsTty && deps.browser !== undefined) {
200
- const minted = await deps.browser(ctx, "connect");
234
+ const minted = await deps.browser(ctx, "connect", { device: options.device === true });
201
235
  if (minted.kind === "saved") {
202
236
  writeLines(ctx.stdout, [
203
237
  "",
204
238
  ...renderErrorBlock({
205
239
  kind: "ok",
206
240
  what: AUTH.savedWhat,
207
- why: [AUTH.savedWhy(tildePath(credentialsPath(ctx.home), ctx.home))],
241
+ why: [AUTH.savedWhy(tildePath(credentialsPath(ctx.home), ctx.home)), ...(minted.notes ?? [])],
208
242
  }, ctx.colour),
209
243
  ]);
210
- return await captureBeat(ctx, keys, minted.credential);
244
+ // Already probed by the mint (`finishMint`), so no second probe here.
245
+ return await captureBeat(ctx, keys, minted.credential, false);
211
246
  }
247
+ // Declined at the replace confirmation: the reason is already on screen, and the user said NO.
248
+ if (minted.kind === "declined")
249
+ return EXIT.failure;
212
250
  // Failed: the reason is already on stderr. Fall through to the paste path.
213
251
  }
252
+ // ⛔ R15: a FAULTY file is named as the fault it is, not as "no credential". The fix for a fault is
253
+ // `auth` (or a `chmod`), and `connect` still never mints over one (D206 §5).
254
+ if (load.kind !== "absent") {
255
+ writeLines(ctx.stderr, credentialProblem(load, ctx.colour, authCommandFor(ctx.env, ctx.selfPath)));
256
+ return EXIT.notConnected;
257
+ }
214
258
  writeLines(ctx.stderr, renderErrorBlock({
215
259
  kind: "warn",
216
260
  what: CONNECT.credentialNeededWhat,
@@ -226,17 +270,36 @@ async function credentialBeat(ctx, keys, deps) {
226
270
  * The install does not end on "configured", it ends on EVIDENCE: record this
227
271
  * session, then hand over a URL that resolves. §10.2 draws it.
228
272
  *
273
+ * ## Order: setup first, payoff last (`DX D9`)
274
+ *
275
+ * The git hook and the agent hooks are installed and REPORTED FIRST, on every
276
+ * branch — no transcript, approval pending, or the normal ending — so the last
277
+ * thing a new user sees is "Connected." and the session link, not ten lines of
278
+ * hook paths that scrolled it away. After the outcome come, in this order, the
279
+ * unconfirmed note and `pathClash`, which runs EXACTLY ONCE, here, and not in
280
+ * any branch (`approvalPendingBeat` used to end in its own call; with a shared
281
+ * tail the clash block would print twice on the pending path).
282
+ *
283
+ * ⚠ Both pre-existing holes this closes were the same shape: the two hook beats
284
+ * sat AFTER two early returns (no transcript, approval pending), so an org
285
+ * awaiting approval, and a repo Claude Code had never run in, got NO hooks while
286
+ * the screen said "Capture is armed" / "Capture starts on its own". Neither was
287
+ * true on the npm channel.
288
+ *
229
289
  * Two things §10.2 draws that are deliberately NOT here:
230
290
  * - **`4 turns · 1 commit`.** Counting turns means parsing the transcript, and
231
291
  * the client may render but may not analyze (D60 §D6). It is not obtainable
232
- * from the server either: `send()` returns a status and discards the body,
233
- * so no id, sha or count exists on this side of the wire.
292
+ * from the server either: `send()` returns a status, and on `connect`'s opt-in
293
+ * reads ONE field of a 2xx body — the `conversation_id` for the session link
294
+ * (`DX D8`) — so no sha or count exists on this side of the wire.
234
295
  * - **`Opening your browser to sign in...`.** That beat runs BEFORE this one
235
296
  * now (`credentialBeat` → `browser_credential.ts`, `CR-226`), and only when
236
297
  * there was no credential to start with — by the time this function runs,
237
298
  * the credential exists however it arrived.
238
299
  */
239
- async function captureBeat(ctx, keys, credential) {
300
+ async function captureBeat(ctx, keys, credential,
301
+ /** The probe could not answer (`R12`): say so once, last, and carry on. Never changes the exit. */
302
+ unconfirmed) {
240
303
  // ⚠ EVERY USE BELOW BUT ONE IS THE TOPLEVEL ROLE — locating the transcript,
241
304
  // the `repoKey` binding, the slug, the hook install and the copy the user
242
305
  // reads. The exception is the redaction root set at `readSpan`, which takes
@@ -244,6 +307,16 @@ async function captureBeat(ctx, keys, credential) {
244
307
  // throughout, so the diff shows the line whose ROLE changed and not fourteen
245
308
  // that did not.
246
309
  const projectKey = keys.worktree;
310
+ // ⛔ COMMIT CAPTURE IS INSTALLED AND REPORTED HERE (`CR-170`, D154), BEFORE ANY BRANCH — see "Order"
311
+ // in the docblock. Three of its failure modes are silent no-ops, so every outcome prints — including
312
+ // success, which is the only place the PER-CLONE cost can be stated at a moment the user can act on it.
313
+ commitHookBeat(ctx, projectKey);
314
+ // ⛔ SESSION CAPTURE IS REGISTERED AND REPORTED NEXT (`CR-195`/U4b). This is the beat `/install` has
315
+ // been describing since before it existed — until it, `connect` wrote GIT hooks only and the npm path
316
+ // gave a user no session capture at all. It runs AFTER the commit beat because the two are independent
317
+ // and the commit one is per-clone: reporting the per-clone thing beside the global one, in that order,
318
+ // is what makes the scope difference legible rather than a detail in a sentence.
319
+ agentHookBeat(ctx);
247
320
  // ⛔ SKIPPED ENTIRELY ON A DIALECT WITH NO LOCATOR — `CR-183`. `connect` is
248
321
  // typed by a human and is handed no `transcript_path`, so finding the running
249
322
  // session is a per-agent capability rather than something this verb can do.
@@ -254,14 +327,26 @@ async function captureBeat(ctx, keys, credential) {
254
327
  const locate = dialectFor(ctx.agentId).locateCurrentTranscript;
255
328
  const found = locate === undefined ? null : locate(ctx.home, ctx.env, projectKey);
256
329
  if (locate !== undefined && found === null) {
257
- writeLines(ctx.stderr, renderErrorBlock({
258
- kind: "warn",
259
- what: CONNECT.noTranscriptWhat,
260
- why: [CONNECT.noTranscriptWhy],
261
- fixLabel: CONNECT.noTranscriptFix,
262
- fixes: [COMMANDS.status],
263
- }, ctx.colour));
264
- return EXIT.failure;
330
+ // ⛔ STDOUT AND EXIT `pathClash`'s — `eng-review D4 = A`. The hooks are installed above, so this is
331
+ // no longer "a silent nothing": setup is complete and capture starts on its own the next time Claude
332
+ // Code runs here. This file's stream rule (`approvalPendingBeat`) puts stderr with a NON-ZERO exit
333
+ // and an install's OUTCOME on stdout.
334
+ // ⚠ This REVERSES the W6 brief rule "When there is no transcript, say so and exit non-zero"
335
+ // (`AGENT_BRIEFS/capture-refactor/_drafts/w6-capture-plugin.py:620`). Its reason — a plain-shell run
336
+ // doing nothing, silently — no longer holds: the warning still prints and the hooks are installed.
337
+ // And a fresh user's first `vibecommit auth` in a new repo (which now chains here) lands on exactly
338
+ // this path and must not report failure after a complete setup. A PATH clash still exits 1.
339
+ writeLines(ctx.stdout, [
340
+ "",
341
+ ...renderErrorBlock({
342
+ kind: "warn",
343
+ what: CONNECT.noTranscriptWhat,
344
+ why: [CONNECT.noTranscriptWhy],
345
+ fixLabel: CONNECT.noTranscriptFix,
346
+ fixes: [COMMANDS.status],
347
+ }, ctx.colour),
348
+ ]);
349
+ return tail(ctx, unconfirmed);
265
350
  }
266
351
  const url = ingestUrl(ctx.env);
267
352
  let delivery = null;
@@ -289,6 +374,9 @@ async function captureBeat(ctx, keys, credential) {
289
374
  // ⛔ NOT A HOOK. `connect` backfills the located transcript, which is not evidence that the session is alive: it
290
375
  // would otherwise rewrite an old session's state file and (under the mtime clock) make it "live" — the D2 shape.
291
376
  byHook: false,
377
+ // ⛔ THE ONLY CALLER THAT READS A 2xx BODY (`eng-2 D2 = A`): for the session link. Hooks and
378
+ // `finalize` leave this unset, so the hook's hot path never reads, awaits or parses one.
379
+ readConversationId: true,
292
380
  }, found.size,
293
381
  // ⛔ THE ROOT SET, and it is `confinementRoots` — THE SAME FUNCTION THE
294
382
  // HOOK PATH CALLS (`entry.ts`), not a set built here. `D184 §3`: the
@@ -310,33 +398,43 @@ async function captureBeat(ctx, keys, credential) {
310
398
  // below still stands: `later` and `never` are transient or per-payload (D58)
311
399
  // and the offset holds, so a 503 must still print the ordinary ending.
312
400
  const pending = approvalPending(delivery);
313
- if (pending !== null)
314
- return approvalPendingBeat(ctx, projectKey, pending.ownersNotified);
401
+ if (pending !== null) {
402
+ approvalPendingBeat(ctx, projectKey, pending.ownersNotified);
403
+ return tail(ctx, unconfirmed);
404
+ }
315
405
  // The beat, then the URL on its own line, then what-now. Every OTHER outcome
316
406
  // of the send is deliberately not branched on: telling a user their install
317
407
  // failed because one POST 503'd would be false.
408
+ //
409
+ // The URL is the recorded session's own page when the 2xx carried its id (`DX D8`) and the captures
410
+ // index otherwise: a missing, malformed, stalled or `nothing-to-send` delivery all land on the index,
411
+ // and never on `/conversations/undefined`. `conversationId` is only ever set on an `ok` attempt.
412
+ const conversationId = delivery?.kind === "attempted" ? delivery.conversationId : undefined;
318
413
  writeLines(ctx.stdout, [
319
414
  "",
320
415
  ...wrap(`${CONNECT.capturing} ${CONNECT.doneHeading}`, 2),
321
416
  "",
322
- ` ${paint(ctx.colour, "accent", URLS.commits)}`,
417
+ ` ${paint(ctx.colour, "accent", conversationId === undefined ? URLS.commits : URLS.conversation(conversationId))}`,
323
418
  "",
324
419
  ...wrap(CONNECT.doneForRepo(truncatePath(projectKey, 52)), 2),
325
420
  ...wrap(`${CONNECT.stopLabel}: ${COMMANDS.off}`, 2),
326
421
  ]);
327
- // ⛔ COMMIT CAPTURE IS INSTALLED AND REPORTED HERE (`CR-170`, D154). Three of
328
- // its failure modes are silent no-ops, so every outcome prints — including
329
- // success, which is the only place the PER-CLONE cost can be stated at a
330
- // moment the user can act on it.
331
- commitHookBeat(ctx, projectKey);
332
- // ⛔ SESSION CAPTURE IS REGISTERED AND REPORTED HERE (`CR-195`/U4b). This is
333
- // the beat `/install` has been describing since before it existed — until it,
334
- // `connect` wrote GIT hooks only and the npm path gave a user no session
335
- // capture at all. It runs AFTER the commit beat because the two are
336
- // independent and the commit one is per-clone: reporting the per-clone thing
337
- // beside the global one, in that order, is what makes the scope difference
338
- // legible rather than a detail in a sentence.
339
- agentHookBeat(ctx);
422
+ return tail(ctx, unconfirmed);
423
+ }
424
+ /**
425
+ * What follows the outcome on EVERY branch of `captureBeat`, in this order: the unconfirmed note, then
426
+ * the PATH-clash check. The one place `pathClash` is called — a branch that called it too would print
427
+ * the clash block twice.
428
+ */
429
+ function tail(ctx, unconfirmed) {
430
+ if (unconfirmed) {
431
+ writeLines(ctx.stdout, [
432
+ "",
433
+ // Two short lines, never one wrapped: the backticked command must not be split (see `REJECTED`).
434
+ ` ${paint(ctx.colour, "muted", REJECTED.unconfirmedWhat)}`,
435
+ ` ${paint(ctx.colour, "muted", REJECTED.unconfirmedFix)}`,
436
+ ]);
437
+ }
340
438
  return pathClash(ctx);
341
439
  }
342
440
  /**
@@ -473,8 +571,9 @@ function approvalPending(delivery) {
473
571
  /**
474
572
  * The fifth beat — style guide §10.2, D65 §DR6, D81.
475
573
  *
476
- * ⚠ `warn`, never `bad`. ⚠ **`EXIT.ok`, never `EXIT.failure` and never
477
- * `EXIT.notConnected`** — the user is correctly installed and capture is armed.
574
+ * ⚠ `warn`, never `bad`. ⚠ **The exit is `captureBeat`'s `tail`'s — `EXIT.ok` unless a PATH clash, never
575
+ * `EXIT.failure` for the 403 and never `EXIT.notConnected`** — the user is correctly installed and capture
576
+ * is armed (the hooks were installed before this beat, so "armed" is true on the npm channel).
478
577
  * That 403 means *later*, not *failed*: `policy.ts` classes it `later`, so the
479
578
  * offset holds and the backlog uploads in order once an owner approves. A red
480
579
  * exit here tells a correctly-installed user they broke something.
@@ -510,9 +609,8 @@ function approvalPendingBeat(ctx, projectKey, ownersNotified) {
510
609
  "",
511
610
  ...wrap(CONNECT.pendingArmed(truncatePath(projectKey, 52)), 2),
512
611
  ]);
513
- // The PATH clash still runs — it is about the verbs a human types and is
514
- // orthogonal to whether capture is approved. It can still exit 1.
515
- return pathClash(ctx);
612
+ // No `pathClash` here: `captureBeat`'s `tail` runs it once for every branch. It is about the verbs a
613
+ // human types and orthogonal to whether capture is approved, and it can still exit 1.
516
614
  }
517
615
  /**
518
616
  * Does the `vibecommit` a user types belong to us? — `DESIGN.md` §13.6's worked
@@ -1 +1 @@
1
- {"version":3,"file":"connect.js","sourceRoot":"","sources":["../../src/commands/connect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EACL,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,WAAW,EACX,WAAW,EACX,MAAM,EACN,IAAI,EACJ,UAAU,EACV,OAAO,EACP,IAAI,GACL,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AACzE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,E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U,CAAC,SAAS;SACzB;QACD,QAAQ,EAAE,UAAU,CAAC,QAAQ;QAC7B,KAAK,EAAE;YACL,OAAO,CAAC,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU;YAC1E,UAAU,CAAC,cAAc;YACzB,UAAU,CAAC,SAAS;SACrB;KACF,EACD,GAAG,CAAC,MAAM,CACX,CACF,CAAC;IACF,OAAO,IAAI,CAAC,OAAO,CAAC;AACtB,CAAC"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * The credential faults, one block each — shared by `status` and `connect` (`R15`).
3
+ *
4
+ * `connect` used to fall through to "This machine has no ingest credential." for a wrong-class,
5
+ * unreadable or insecure file: false, and the real fix (`chmod 600`, or `auth`) was one line away.
6
+ * It still never MINTS over a fault (D206 §5) — it only names the fault correctly.
7
+ */
8
+ /**
9
+ * The three credential problems that are worth four different fixes on an
10
+ * interactive surface. The hook collapses them to one `systemMessage`; here the
11
+ * user can act, so §13.6 gets its full what / why / fix.
12
+ *
13
+ * None of these lines can carry credential bytes: the plaintext leaves
14
+ * `IngestCredential` only through `expose()`, and no copy path calls it.
15
+ */
16
+ export declare function credentialProblem(load: {
17
+ kind: "wrong-class";
18
+ source: "env" | "file";
19
+ } | {
20
+ kind: "insecure-file";
21
+ path: string;
22
+ mode: string;
23
+ } | {
24
+ kind: "unreadable";
25
+ path: string;
26
+ }, colour: boolean,
27
+ /** The channel's `auth` (`installChannel`) — `vibecommit auth` on npm, `node <path> auth` for the plugin. */
28
+ authCommand?: string): string[];
29
+ /**
30
+ * The credential-rejected block (`11A`) — §13.6 what / why / fix, fix LAST, for `connect` (after a
31
+ * 401 from the probe) and `status` (a standing stop). The `why` says "expired" outright only when
32
+ * the sidecar knows an `expires_at` that has passed; otherwise it names both causes, because the
33
+ * server's 401 is opaque and a guess would read as an accusation.
34
+ */
35
+ export declare function rejectedCredentialBlock(input: {
36
+ readonly home: string;
37
+ readonly fingerprint: string;
38
+ readonly nowMs: number;
39
+ readonly authCommand: string;
40
+ readonly colour: boolean;
41
+ /** True for a STANDING stop that `status` reports (a warning); false for a verdict `connect` just got (an error). */
42
+ readonly standing: boolean;
43
+ }): string[];
@@ -0,0 +1,81 @@
1
+ /**
2
+ * The credential faults, one block each — shared by `status` and `connect` (`R15`).
3
+ *
4
+ * `connect` used to fall through to "This machine has no ingest credential." for a wrong-class,
5
+ * unreadable or insecure file: false, and the real fix (`chmod 600`, or `auth`) was one line away.
6
+ * It still never MINTS over a fault (D206 §5) — it only names the fault correctly.
7
+ */
8
+ import { COMMANDS, CREDENTIAL, REJECTED } from "../copy/index.js";
9
+ import { metaFor } from "../credential_meta.js";
10
+ import { renderErrorBlock, truncatePath } from "../term.js";
11
+ /**
12
+ * The three credential problems that are worth four different fixes on an
13
+ * interactive surface. The hook collapses them to one `systemMessage`; here the
14
+ * user can act, so §13.6 gets its full what / why / fix.
15
+ *
16
+ * None of these lines can carry credential bytes: the plaintext leaves
17
+ * `IngestCredential` only through `expose()`, and no copy path calls it.
18
+ */
19
+ export function credentialProblem(load, colour,
20
+ /** The channel's `auth` (`installChannel`) — `vibecommit auth` on npm, `node <path> auth` for the plugin. */
21
+ authCommand = COMMANDS.auth) {
22
+ switch (load.kind) {
23
+ case "wrong-class":
24
+ return renderErrorBlock({
25
+ kind: "bad",
26
+ what: CREDENTIAL.wrongClassWhat,
27
+ why: [
28
+ load.source === "env"
29
+ ? CREDENTIAL.wrongClassEnvWhy
30
+ : CREDENTIAL.wrongClassFileWhy,
31
+ ],
32
+ fixLabel: CREDENTIAL.wrongClassFix,
33
+ fixes: [authCommand],
34
+ }, colour);
35
+ case "insecure-file":
36
+ return renderErrorBlock({
37
+ kind: "bad",
38
+ what: CREDENTIAL.insecureFileWhat,
39
+ why: [
40
+ `${CREDENTIAL.insecureFileWhyLabel} ${truncatePath(load.path, 60)}`,
41
+ `${CREDENTIAL.insecureFileModeLabel} ${load.mode}`,
42
+ CREDENTIAL.insecureFileWhy,
43
+ ],
44
+ fixLabel: CREDENTIAL.insecureFileFix,
45
+ fixes: [COMMANDS.chmodCredentials],
46
+ }, colour);
47
+ case "unreadable":
48
+ return renderErrorBlock({
49
+ kind: "bad",
50
+ what: CREDENTIAL.unreadableWhat,
51
+ why: [
52
+ `${CREDENTIAL.insecureFileWhyLabel} ${truncatePath(load.path, 60)}`,
53
+ CREDENTIAL.unreadableWhy,
54
+ ],
55
+ fixLabel: CREDENTIAL.unreadableFix,
56
+ fixes: [authCommand],
57
+ }, colour);
58
+ }
59
+ }
60
+ /**
61
+ * The credential-rejected block (`11A`) — §13.6 what / why / fix, fix LAST, for `connect` (after a
62
+ * 401 from the probe) and `status` (a standing stop). The `why` says "expired" outright only when
63
+ * the sidecar knows an `expires_at` that has passed; otherwise it names both causes, because the
64
+ * server's 401 is opaque and a guess would read as an accusation.
65
+ */
66
+ export function rejectedCredentialBlock(input) {
67
+ const expires = metaFor(input.home, input.fingerprint)?.expires_at ?? null;
68
+ const expiredAt = expires === null ? Number.NaN : Date.parse(expires);
69
+ return renderErrorBlock({
70
+ kind: input.standing ? "warn" : "bad",
71
+ what: REJECTED.what,
72
+ why: [
73
+ Number.isFinite(expiredAt) && expiredAt <= input.nowMs
74
+ ? REJECTED.whyExpired((expires ?? "").slice(0, 10))
75
+ : REJECTED.why,
76
+ ],
77
+ fixLabel: REJECTED.fixLabel,
78
+ fixes: [input.authCommand],
79
+ }, input.colour);
80
+ }
81
+ //# sourceMappingURL=credential_problem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credential_problem.js","sourceRoot":"","sources":["../../src/commands/credential_problem.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,YAA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U,CAAC,aAAa;gBAClC,KAAK,EAAE,CAAC,WAAW,CAAC;aACrB,EACD,MAAM,CACP,CAAC;IACN,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAQvC;IACC,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,WAAW,CAAC,EAAE,UAAU,IAAI,IAAI,CAAC;IAC3E,MAAM,SAAS,GAAG,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACtE,OAAO,gBAAgB,CACrB;QACE,IAAI,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK;QACrC,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,GAAG,EAAE;YACH,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,SAAS,IAAI,KAAK,CAAC,KAAK;gBACpD,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACnD,CAAC,CAAC,QAAQ,CAAC,GAAG;SACjB;QACD,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,KAAK,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC;KAC3B,EACD,KAAK,CAAC,MAAM,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The device sign-in beat — `CR-234d`, D219, plan item 7 (capture half), T8/T9.
3
+ *
4
+ * `browserCredential`'s sibling for a machine whose browser is not on this machine: it asks for a code,
5
+ * shows it, polls while the person approves elsewhere, spends the resulting mint ticket on ONE credential,
6
+ * and hands the credential to the SAME `finishMint` the loopback flow ends in.
7
+ *
8
+ * ```
9
+ * discover → POST device_authorization → print URL + code (always) → [open the prefilled link]
10
+ * → poll /oauth/token ─ pending / slow_down ─┐
11
+ * ├ denied | expired | rate-limited → a §13.6 block, nothing changed
12
+ * └ ticket → mint (Bearer vcmt_) → finishMint({ confirm: "always", ticket })
13
+ * ```
14
+ *
15
+ * ## ⛔ What the shared tail guarantees, and why the device flow is the case it exists for
16
+ *
17
+ * In the loopback flow the approver IS the person at this terminal. Here they are not — the code may have
18
+ * been typed by someone a phishing script sent it to (the reverse attack, RFC 8628 §5.4). So the CLI's own
19
+ * confirmation (`account / workspace`, one default-NO question) is the control, and `confirm: "always"`
20
+ * means it is never skipped: not by an unanswered probe, not by a missing handle. The ticket response's
21
+ * `account` and `org_name` stand in when whoami(new) is not answered, and if there is nothing to show at
22
+ * all `finishMint` FAILS CLOSED (A4 §3).
23
+ *
24
+ * ## ⚠ Nothing here writes `session.json`
25
+ *
26
+ * A ticket buys a machine credential, not a read session (D219). The read lane is still `--sign-in`.
27
+ *
28
+ * ## ⚠ The wait is STATIC
29
+ *
30
+ * No spinner and no ticking countdown (DESIGN.md §13.8): the waiting line is printed once, and the expiry is
31
+ * an absolute local time so the screen stays true in a scrollback. The poll loop's clock and sleep are
32
+ * injected — a test advances a virtual clock rather than waiting out five-second intervals.
33
+ */
34
+ import type { BrowserDeps } from "./browser_credential.js";
35
+ import { type BrowserCredential, type Prior } from "./finish_mint.js";
36
+ import { type CommandContext } from "./context.js";
37
+ /** `14:32`, local time, 24-hour — an absolute clock reading, never "in 5 minutes". */
38
+ export declare function clockTime(date: Date): string;
39
+ export interface DeviceInput {
40
+ /** The `/mcp` endpoint, resolved once by the caller so session and credential cannot come from two servers. */
41
+ readonly endpoint: string;
42
+ /** The credential this one replaces — file only, never env — and what the server said about it. */
43
+ readonly prior: Prior | null;
44
+ /** Open the prefilled link? False where no browser is on this machine (SSH, no display). */
45
+ readonly openLink: boolean;
46
+ }
47
+ export declare function deviceCredential(ctx: CommandContext, input: DeviceInput, deps?: BrowserDeps): Promise<BrowserCredential>;