@vibe-commit/capture 0.7.0 → 0.9.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 (152) hide show
  1. package/README.md +238 -7
  2. package/dist/account_not_here.d.ts +15 -0
  3. package/dist/account_not_here.js +25 -0
  4. package/dist/account_not_here.js.map +1 -0
  5. package/dist/agents/claude_code.js +13 -0
  6. package/dist/agents/claude_code.js.map +1 -1
  7. package/dist/agents/codex_cli.js +11 -0
  8. package/dist/agents/codex_cli.js.map +1 -1
  9. package/dist/agents/cursor.js +7 -1
  10. package/dist/agents/cursor.js.map +1 -1
  11. package/dist/agents/registry.d.ts +7 -0
  12. package/dist/agents/registry.js +9 -0
  13. package/dist/agents/registry.js.map +1 -1
  14. package/dist/agents/types.d.ts +32 -0
  15. package/dist/agents/types.js.map +1 -1
  16. package/dist/bounded_id.d.ts +29 -0
  17. package/dist/bounded_id.js +42 -0
  18. package/dist/bounded_id.js.map +1 -0
  19. package/dist/codex_folders.d.ts +340 -0
  20. package/dist/codex_folders.js +1448 -0
  21. package/dist/codex_folders.js.map +1 -0
  22. package/dist/commands/auth.d.ts +7 -0
  23. package/dist/commands/auth.js +21 -0
  24. package/dist/commands/auth.js.map +1 -1
  25. package/dist/commands/backfill.d.ts +29 -7
  26. package/dist/commands/backfill.js +387 -109
  27. package/dist/commands/backfill.js.map +1 -1
  28. package/dist/commands/browser_credential.d.ts +4 -2
  29. package/dist/commands/browser_credential.js +5 -2
  30. package/dist/commands/browser_credential.js.map +1 -1
  31. package/dist/commands/connect.d.ts +10 -1
  32. package/dist/commands/connect.js +14 -9
  33. package/dist/commands/connect.js.map +1 -1
  34. package/dist/commands/connect_account.d.ts +135 -0
  35. package/dist/commands/connect_account.js +321 -0
  36. package/dist/commands/connect_account.js.map +1 -0
  37. package/dist/commands/connect_picker.js +204 -29
  38. package/dist/commands/connect_picker.js.map +1 -1
  39. package/dist/commands/device_credential.d.ts +3 -1
  40. package/dist/commands/device_credential.js +1 -0
  41. package/dist/commands/device_credential.js.map +1 -1
  42. package/dist/commands/finalize.d.ts +67 -0
  43. package/dist/commands/finalize.js +450 -114
  44. package/dist/commands/finalize.js.map +1 -1
  45. package/dist/commands/finish_mint.d.ts +28 -0
  46. package/dist/commands/finish_mint.js +16 -4
  47. package/dist/commands/finish_mint.js.map +1 -1
  48. package/dist/commands/scan.d.ts +28 -0
  49. package/dist/commands/scan.js +11 -0
  50. package/dist/commands/scan.js.map +1 -1
  51. package/dist/commands/status.d.ts +19 -1
  52. package/dist/commands/status.js +123 -14
  53. package/dist/commands/status.js.map +1 -1
  54. package/dist/commands/status_machine.d.ts +12 -3
  55. package/dist/commands/status_machine.js +111 -13
  56. package/dist/commands/status_machine.js.map +1 -1
  57. package/dist/commands/sync_reason.d.ts +17 -0
  58. package/dist/commands/sync_reason.js +25 -0
  59. package/dist/commands/sync_reason.js.map +1 -0
  60. package/dist/consent.d.ts +131 -3
  61. package/dist/consent.js +248 -14
  62. package/dist/consent.js.map +1 -1
  63. package/dist/copy/strings.d.ts +165 -4
  64. package/dist/copy/strings.js +190 -7
  65. package/dist/copy/strings.js.map +1 -1
  66. package/dist/folder_grants.d.ts +44 -0
  67. package/dist/folder_grants.js +101 -0
  68. package/dist/folder_grants.js.map +1 -0
  69. package/dist/git.d.ts +26 -4
  70. package/dist/git.js +82 -11
  71. package/dist/git.js.map +1 -1
  72. package/dist/grants_sync.d.ts +165 -0
  73. package/dist/grants_sync.js +289 -0
  74. package/dist/grants_sync.js.map +1 -0
  75. package/dist/grants_verb.d.ts +70 -0
  76. package/dist/grants_verb.js +121 -0
  77. package/dist/grants_verb.js.map +1 -0
  78. package/dist/hooks/entry.d.ts +30 -50
  79. package/dist/hooks/entry.js +601 -561
  80. package/dist/hooks/entry.js.map +1 -1
  81. package/dist/hooks/fire_lock.d.ts +31 -0
  82. package/dist/hooks/fire_lock.js +120 -12
  83. package/dist/hooks/fire_lock.js.map +1 -1
  84. package/dist/hooks/session_grants.d.ts +59 -0
  85. package/dist/hooks/session_grants.js +91 -0
  86. package/dist/hooks/session_grants.js.map +1 -0
  87. package/dist/hooks/session_start.d.ts +28 -7
  88. package/dist/hooks/session_start.js +55 -11
  89. package/dist/hooks/session_start.js.map +1 -1
  90. package/dist/index.js +22 -5
  91. package/dist/index.js.map +1 -1
  92. package/dist/machine_state.d.ts +44 -1
  93. package/dist/machine_state.js +75 -12
  94. package/dist/machine_state.js.map +1 -1
  95. package/dist/oauth/discovery.js +2 -1
  96. package/dist/oauth/discovery.js.map +1 -1
  97. package/dist/oauth/pkce.js +2 -1
  98. package/dist/oauth/pkce.js.map +1 -1
  99. package/dist/oauth/retire.d.ts +10 -0
  100. package/dist/oauth/retire.js +13 -0
  101. package/dist/oauth/retire.js.map +1 -1
  102. package/dist/paths.d.ts +54 -1
  103. package/dist/paths.js +88 -12
  104. package/dist/paths.js.map +1 -1
  105. package/dist/pending_revoke.d.ts +117 -0
  106. package/dist/pending_revoke.js +233 -0
  107. package/dist/pending_revoke.js.map +1 -0
  108. package/dist/pending_revoke_file.d.ts +55 -0
  109. package/dist/pending_revoke_file.js +74 -0
  110. package/dist/pending_revoke_file.js.map +1 -0
  111. package/dist/physical_path.d.ts +46 -0
  112. package/dist/physical_path.js +151 -0
  113. package/dist/physical_path.js.map +1 -0
  114. package/dist/picker.d.ts +82 -5
  115. package/dist/picker.js +183 -10
  116. package/dist/picker.js.map +1 -1
  117. package/dist/picker_checklist.d.ts +27 -3
  118. package/dist/picker_checklist.js +81 -6
  119. package/dist/picker_checklist.js.map +1 -1
  120. package/dist/policy.d.ts +24 -1
  121. package/dist/policy.js +30 -2
  122. package/dist/policy.js.map +1 -1
  123. package/dist/post.d.ts +55 -2
  124. package/dist/post.js +72 -22
  125. package/dist/post.js.map +1 -1
  126. package/dist/project.d.ts +89 -0
  127. package/dist/project.js +123 -0
  128. package/dist/project.js.map +1 -1
  129. package/dist/redact.d.ts +77 -2
  130. package/dist/redact.js +713 -47
  131. package/dist/redact.js.map +1 -1
  132. package/dist/session_targets.d.ts +713 -0
  133. package/dist/session_targets.js +2602 -0
  134. package/dist/session_targets.js.map +1 -0
  135. package/dist/spool.d.ts +12 -0
  136. package/dist/spool.js +29 -1
  137. package/dist/spool.js.map +1 -1
  138. package/dist/spool_union.d.ts +51 -0
  139. package/dist/spool_union.js +57 -0
  140. package/dist/spool_union.js.map +1 -0
  141. package/dist/state.d.ts +5 -0
  142. package/dist/state.js +19 -1
  143. package/dist/state.js.map +1 -1
  144. package/dist/system_message.d.ts +25 -2
  145. package/dist/system_message.js +29 -5
  146. package/dist/system_message.js.map +1 -1
  147. package/dist/text_tail.d.ts +8 -0
  148. package/dist/text_tail.js +19 -0
  149. package/dist/text_tail.js.map +1 -0
  150. package/dist/version.d.ts +1 -1
  151. package/dist/version.js +1 -1
  152. package/package.json +3 -3
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Why a stopped sync stopped, as muted lines (capture 0.8.0, "truth fixes" R2-1). `connect` says it under "Capture is on" and `off`
3
+ * says it after "Stopped here …"; both call this, so the words and the layout are one thing.
4
+ *
5
+ * - a 400 (our own bug; the queue is kept and will be refused again): the status row's wording, "didn't accept · report this";
6
+ * - a 401 (the credential is no longer accepted): `ERRORS.authFatal` and the channel's `auth` command.
7
+ *
8
+ * ⛔ **HOOK-SAFE ON PURPOSE.** `status.ts` is on the hook's static import graph (status → grants_verb), so `off` — which lives there —
9
+ * cannot import `connect_account.ts` (which holds `pending_revoke`). This module imports only copy, terminal and install-channel
10
+ * helpers; `connect_account.ts` imports it too.
11
+ */
12
+ import { ERRORS, STATUS } from "../copy/index.js";
13
+ import { authCommandFor } from "../install.js";
14
+ import { paint, wrap } from "../term.js";
15
+ /** The reason lines for a sync answer that STOPPED the write, or `null` when the kind has no reason line of its own. */
16
+ export function stoppedSyncReason(ctx, result) {
17
+ if (result.kind === "rejected") {
18
+ return wrap(STATUS.pendingRejectedValue(Math.max(1, result.pendingRejected ?? 0)), 2).map((line) => paint(ctx.colour, "muted", line));
19
+ }
20
+ if (result.kind === "unauthorized") {
21
+ return [paint(ctx.colour, "muted", ` ${ERRORS.authFatal}`), ` ${paint(ctx.colour, "accent", authCommandFor(ctx.env, ctx.selfPath))}`];
22
+ }
23
+ return null;
24
+ }
25
+ //# sourceMappingURL=sync_reason.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync_reason.js","sourceRoot":"","sources":["../../src/commands/sync_reason.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAGzC,wHAAwH;AACxH,MAAM,UAAU,iBAAiB,CAC/B,GAAmB,EACnB,MAAoE;IAEpE,IAAI,MAAM,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,eAAe,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;IACxI,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,cAAc,EAAE,CAAC;QACnC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,cAAc,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC;IAC5I,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
package/dist/consent.d.ts CHANGED
@@ -70,7 +70,14 @@ export declare function revokeProject(home: string, consentKey: string): boolean
70
70
  * slug minus its last segment: `alexvibecommit`, or `gitlab.example.com/team`.
71
71
  * - `repos` — single repos granted one by one.
72
72
  * - `excluded` — `vibecommit off`. **Wins over every other basis**, a surviving common-dir entry included.
73
- * - `refused` — slice 2's server refusals, kept apart from `excluded` on purpose. Nothing writes it yet.
73
+ * - `refused` — 0.7.0's field for server refusals, kept so a 0.7.0 client can still read a 0.8.0 file. ⛔ Nothing writes it:
74
+ * slice 2's refusals are written by hooks, and hooks never write this file (see `grants-account.json` below).
75
+ * It is still honoured as a denial if something is in it.
76
+ * - `pending` — slice 2: grant writes this machine has not yet delivered to the account `{ op, kind, value, at }`. The next
77
+ * CLI verb that syncs sends and clears them (`grants_sync.ts`). Absent in a 0.7.0 file, which reads as none.
78
+ *
79
+ * ⛔ **THIS FILE IS CLI-ONLY.** `updateGrants` is an unlocked read-modify-write, so a hook that wrote here could race
80
+ * `vibecommit off` and restore the repo `off` had just turned off. What a hook has to remember lives in `grants-account.json`.
74
81
  *
75
82
  * `disclosed_at` is when the D65 disclosure was last answered yes for a grant; `null` until then.
76
83
  */
@@ -80,6 +87,23 @@ export interface Grants {
80
87
  readonly repos: readonly string[];
81
88
  readonly excluded: readonly string[];
82
89
  readonly refused: readonly string[];
90
+ readonly pending: readonly PendingOp[];
91
+ /**
92
+ * ISO 8601, set ONCE, when this machine's first sync got a 200; `null` before. ⛔ **This is what makes a sync a "first sync"** (it
93
+ * uploads everything this machine already named), and it lives here and not in `grants-account.json` on purpose: that file is
94
+ * ignored when unreadable, and a deleted one must not make the next sync re-grant what was revoked elsewhere. CLI-only.
95
+ * Absent in a 0.7.0 file, which reads as `null`.
96
+ */
97
+ readonly synced_at: string | null;
98
+ }
99
+ /** One queued write to the account's grants — the shape the server's sync endpoint takes, plus when it was queued. */
100
+ export interface PendingOp {
101
+ readonly op: "grant" | "revoke" | "exclude" | "include";
102
+ /** `exclude` and `include` are repo-only. The kind cannot be read off the value (`acme/api` and `gitlab.example.com/team` are both one slash). */
103
+ readonly kind: "owner" | "repo";
104
+ readonly value: string;
105
+ /** ISO 8601, when it was queued. */
106
+ readonly at: string;
83
107
  }
84
108
  export declare const EMPTY_GRANTS: Grants;
85
109
  /**
@@ -116,8 +140,74 @@ export type GrantsRead = {
116
140
  export declare function readGrants(home: string): GrantsRead;
117
141
  /** True when a `grants.json` is present and unusable — the state `status` reports and a SessionStart notice names. */
118
142
  export declare function grantsUnreadable(home: string): boolean;
143
+ /**
144
+ * The account's grants as the last sync or GET returned them. ⛔ **It never admits anything** (R3-22): a repo the account
145
+ * grants is captured on this machine only once THIS machine names it, in `grants.json`. `excluded` here does DENY — a repo
146
+ * turned off from another machine or the dashboard stops here too.
147
+ */
148
+ export interface AccountGrants {
149
+ readonly owners: readonly string[];
150
+ readonly repos: readonly string[];
151
+ readonly excluded: readonly string[];
152
+ /** The server's `epoch` for the user's grants when this was read. */
153
+ readonly epoch: number;
154
+ /** ISO 8601, when this machine got it. */
155
+ readonly synced_at: string;
156
+ }
157
+ /**
158
+ * `grants-account.json`.
159
+ *
160
+ * - `account` — the last synced account state, or `null` before the first sync.
161
+ * - `refused` — slugs the server refused with `repository_excluded` since the last sync. Denied here; a sync clears it.
162
+ * - `stale` — an `X-Grant-Epoch` differed from `account.epoch` (`noteGrantEpoch`); SessionStart's one GET reads it and clears it.
163
+ * - `last_get_at` — when SessionStart last did that GET, for its hourly limit.
164
+ *
165
+ * ⛔ **HOOKS WRITE THIS FILE AND NEVER `grants.json`.** It is written WHOLE and atomically (temp file + rename, 0600) and never
166
+ * through `updateGrants`. Two writers can still lose each other's update (the same unlocked read-modify-write), and that is
167
+ * safe by design: a lost `refused` slug means the server refuses it once more, and a lost `account` is read back by the next
168
+ * sync. Nothing in here can admit a repo, so nothing a race loses can capture one.
169
+ *
170
+ * ⛔ **An unreadable or corrupt file is IGNORED — it reads as empty, never as deny-all.** The opposite of `grants.json`, for the
171
+ * opposite reason: `grants.json` holds the user's own exclusions, which a deny-all protects; this file holds a cache and a
172
+ * server's refusals, and a machine that can't read it just asks the server again.
173
+ */
174
+ export interface AccountState {
175
+ readonly account: AccountGrants | null;
176
+ readonly refused: readonly string[];
177
+ readonly stale: boolean;
178
+ readonly last_get_at: string | null;
179
+ }
180
+ export declare const EMPTY_ACCOUNT_STATE: AccountState;
181
+ /** Read it. **NEVER THROWS, and any failure — missing, unreadable, not JSON, any field off-shape — is the empty state.** */
182
+ export declare function readAccountState(home: string): AccountState;
183
+ /** Write it whole: normalized, atomic, 0600. Throws on an I/O failure (the destination is then untouched). */
184
+ export declare function writeAccountState(home: string, state: AccountState): void;
185
+ /**
186
+ * A hook saw `repository_excluded` for this slug: remember it, so this machine stops reading that repo's transcripts until
187
+ * the next sync says otherwise. **NEVER THROWS** — it runs on the hook's path, where a failed write only means the server
188
+ * refuses the next upload too. `local:` slugs are never recorded (there is no repo identity to refuse).
189
+ */
190
+ export declare function recordRefused(home: string, slug: string): void;
191
+ /**
192
+ * A hook saw `X-Grant-Epoch` on a server answer (an ingest 2xx, or a grants refusal): if it is not the epoch this machine last
193
+ * recorded, mark the account state `stale`, which is what SessionStart's one bounded `GET` looks for (`session_grants.ts`).
194
+ * A machine with no recorded account state counts as epoch 0, as the server does when a user has no grants row.
195
+ *
196
+ * Writes `grants-account.json` and never `grants.json` (see `AccountState`), only when something changed — so a Stop hook that sees
197
+ * the same epoch every turn does no file write at all — and only ever sets `stale`; the GET (or a sync) clears it. **NEVER THROWS**:
198
+ * it runs on the hook's path, and a lost mark only means the next answer marks it again.
199
+ */
200
+ export declare function noteGrantEpoch(home: string, epoch: number | null | undefined): void;
119
201
  /** A slug now, or a way to get it. The thunk is for the hooks: see `isCaptureAllowed`. */
120
202
  export type SlugSource = string | (() => string);
203
+ /**
204
+ * Does the hold of `isCaptureAllowed` (step 3) apply to ANYTHING on this machine right now? True when the machine has synced
205
+ * (`synced_at` is set) and a queued `grant` op names an owner or a repo the last synced account state does not already grant
206
+ * (the same two conditions the per-slug hold uses: a synced machine, and the account not already admitting it). "0.8.0 truth
207
+ * fixes" R2-2: `connect`'s untold line says sessions wait only when something actually waits. Reads `grants.json` and
208
+ * `grants-account.json`; an unreadable `grants.json` holds nothing here (the gate denies for its own reason).
209
+ */
210
+ export declare function holdsAny(home: string): boolean;
121
211
  /**
122
212
  * ⛔ **THE ONE ADMISSION DECISION.** Every gate calls this; `entry.ts`, `post_commit.ts`, `post_rewrite.ts` (twice),
123
213
  * `finalize.ts`, `status.ts` and `connect.ts` are the seven call sites. Absence is a NO and every error path denies.
@@ -125,12 +215,28 @@ export type SlugSource = string | (() => string);
125
215
  * Precedence:
126
216
  * 1. A MISSING `grants.json` is empty (0.6.x machines keep capturing on their common-dir consent). A PRESENT file
127
217
  * that cannot be read denies every clone that has a slug, whatever `projects.json` says.
128
- * 2. An excluded slug is denied, whatever the basis.
129
- * 3. Otherwise: admitted on the common-dir consent, or on a slug matched by `owners` or `repos`.
218
+ * 2. A denied slug is denied, whatever the basis: `grants.json`'s `excluded` (and its legacy `refused`), the account file's
219
+ * `refused`, or the account's own `excluded`.
220
+ * 3. On a machine that HAS SYNCED (`grants.synced_at` is set), a slug with a `grant` still PENDING (queued, not yet delivered to
221
+ * the account) is held back when that grant is the slug's ONLY local basis, i.e. the clone has no common-dir consent: its
222
+ * spans stay unsent with their offset unchanged, and go once a sync delivers the grant. It is not held either when the last
223
+ * synced account state already grants the repo or its owner (the server admits it, so a queued grant that was refused must
224
+ * not hold it for ever).
225
+ * ⭐ **A MACHINE THAT HAS NEVER SYNCED HOLDS NOTHING** (VQ, "0.8.0 truth fixes" F1): the server refuses only a credential that
226
+ * has synced (`grants_synced_at`), so before the first sync the hold protects nothing and would only defer uploads, for ever
227
+ * against a server without the routes. Such a machine decides capture by its own choices, as under 0.7.0.
228
+ * ⭐ **WHY A COMMON-DIR CONSENT LIFTS THE HOLD** (VQ's ruling): a remote repo gets a common-dir consent only from pre-0.8.0
229
+ * flows (0.8.0's in-repo `connect` pre-ticks the picker, which writes GRANTS). The first sync uploads those consented slugs, so
230
+ * either this credential has not synced, and the server never refuses anything for it, or the first sync already granted the
231
+ * slug, and holding it would only delay bytes the server accepts.
232
+ * 4. Otherwise: admitted on the common-dir consent, or on a slug matched by `owners` or `repos`. ⛔ The account's own
233
+ * `owners`/`repos` are NOT consulted — a repo only the account grants is not captured on this machine (per-machine naming).
130
234
  *
131
235
  * `local:` slugs never match a grant and keep common-dir consent alone. They are also not subject to
132
236
  * exclusion or to an unreadable file: there is no repo identity to exclude.
133
237
  *
238
+ * `grants-account.json` is read on every call and an unreadable one is the empty state, never a denial (`AccountState`).
239
+ *
134
240
  * ⚠ **`slug` MAY BE A THUNK, and the hooks pass one.** Computing a slug can spawn `git remote get-url` and `ssh -G`,
135
241
  * which is real time on a hook's budget; a machine with no `grants.json` (every 0.6.x machine) needs none of it, and
136
242
  * neither does a clone with no consent and no grants to match. The slug is asked for only when the answer depends on it.
@@ -140,6 +246,28 @@ export type SlugSource = string | (() => string);
140
246
  * come from the very resolution this gate used (`D184 §3`).
141
247
  */
142
248
  export declare function isCaptureAllowed(home: string, keys: ProjectKeys | null, slug: SlugSource): boolean;
249
+ /**
250
+ * Does this machine hold ANY capture consent at all? The hook asks BEFORE it opens a transcript or writes a byte of state: a
251
+ * machine that has granted nothing (no `projects.json` entry, no slug or owner grant) must not read or index a single session
252
+ * (any-folder capture widens what a hook reads, never who it reads it for).
253
+ *
254
+ * ⚠ An unreadable `grants.json` counts as "yes": it may hold exclusions we cannot see, and the resolver denies on it.
255
+ */
256
+ export declare function hasAnyConsent(home: string): boolean;
257
+ /**
258
+ * Where a repo stands with this machine's consent, for the resolver (any-folder capture, R8): four facts, because "not
259
+ * captured" has three different causes and only one of them is something to tell the user about.
260
+ *
261
+ * - `granted` — `isCaptureAllowed` says yes. Capture.
262
+ * - `denied` — the user excluded or refused it (or `grants.json` is unreadable and may hold exclusions we cannot see).
263
+ * Capture nothing and say nothing: nagging about a decision already made is tool noise (DX3).
264
+ * - `held` — a basis exists but a queued grant is still being delivered (`isCaptureAllowed` step 3). Not undecided.
265
+ * - `undecided` — no basis at all and no denial: the user was never asked, or never ticked it. THIS is what `status` lists.
266
+ *
267
+ * Never writes. `isCaptureAllowed` stays the one admission decision; this only classifies its "no".
268
+ */
269
+ export type CaptureStanding = "granted" | "denied" | "held" | "undecided";
270
+ export declare function captureStanding(home: string, keys: ProjectKeys, slug: SlugSource): CaptureStanding;
143
271
  /** `updateGrants` refuses to rewrite a file it cannot read: overwriting would silently drop exclusions it never saw. */
144
272
  export declare class GrantsUnreadableError extends Error {
145
273
  constructor();
package/dist/consent.js CHANGED
@@ -47,7 +47,9 @@
47
47
  import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
48
48
  import { dirname } from "node:path";
49
49
  import { writeFileAtomic } from "./atomic_write.js";
50
- import { grantsPath, projectsPath, rootDir } from "./paths.js";
50
+ import { grantedFolders } from "./folder_grants.js";
51
+ import { grantsAccountPath, grantsPath, projectsPath, rootDir } from "./paths.js";
52
+ import { stripTrailing } from "./text_tail.js";
51
53
  /**
52
54
  * Read the allow list. **Every failure returns an empty list**, which means "no
53
55
  * project is consented" — a corrupt or unreadable file must not be able to grant
@@ -116,6 +118,8 @@ export const EMPTY_GRANTS = {
116
118
  repos: [],
117
119
  excluded: [],
118
120
  refused: [],
121
+ pending: [],
122
+ synced_at: null,
119
123
  };
120
124
  /**
121
125
  * ⛔ **THE ONE NORMALIZATION.** The whole host-qualified slug, lowercased, for every host — the identity the
@@ -128,7 +132,7 @@ export function normalizeSlug(slug) {
128
132
  }
129
133
  /** An owner as stored: normalized, and without the trailing `/` the picker displays (`alexvibecommit/`). */
130
134
  export function normalizeOwner(owner) {
131
- return normalizeSlug(owner).replace(/\/+$/, "");
135
+ return stripTrailing(normalizeSlug(owner), "/");
132
136
  }
133
137
  /** `local:` slugs name a path, not a repo: no grant can match one, and their consent stays per clone. */
134
138
  export function isLocalSlug(slug) {
@@ -152,8 +156,41 @@ function stringList(value, normalize) {
152
156
  }
153
157
  return out;
154
158
  }
155
- /** The five fields this version knows; every other top-level key of `grants.json` is carried through untouched. */
156
- const KNOWN_GRANTS_KEYS = new Set(["disclosed_at", "owners", "repos", "excluded", "refused"]);
159
+ const PENDING_OPS = new Set(["grant", "revoke", "exclude", "include"]);
160
+ /**
161
+ * `pending`: ABSENT is none (every 0.7.0 file), but a field that is there and malformed is `null` — the caller reads the
162
+ * whole file as unreadable, the same rule as the other lists, since a queue we cannot read may hold a grant we are holding.
163
+ */
164
+ function parsePending(value) {
165
+ if (value === undefined)
166
+ return [];
167
+ if (!Array.isArray(value))
168
+ return null;
169
+ const out = [];
170
+ for (const item of value) {
171
+ if (item === null || typeof item !== "object" || Array.isArray(item))
172
+ return null;
173
+ const { op, kind, value: v, at } = item;
174
+ if (typeof op !== "string" || !PENDING_OPS.has(op))
175
+ return null;
176
+ if (kind !== "owner" && kind !== "repo")
177
+ return null;
178
+ if (typeof v !== "string" || typeof at !== "string")
179
+ return null;
180
+ if ((op === "exclude" || op === "include") && kind !== "repo")
181
+ return null;
182
+ const clean = kind === "owner" ? normalizeOwner(v) : normalizeSlug(v);
183
+ if (clean === "")
184
+ return null;
185
+ out.push({ op: op, kind, value: clean, at });
186
+ }
187
+ return out;
188
+ }
189
+ /**
190
+ * The seven fields this version knows and REBUILDS on every write (`pending` and `synced_at` are slice 2's); every other top-level key
191
+ * of `grants.json` is carried through untouched.
192
+ */
193
+ const KNOWN_GRANTS_KEYS = new Set(["disclosed_at", "owners", "repos", "excluded", "refused", "pending", "synced_at"]);
157
194
  /**
158
195
  * `readGrants` plus the top-level keys it does not know, in file order. One read and one parse, so `updateGrants`
159
196
  * rewrites exactly the file it read. `extras` is empty unless `read` is `ok`.
@@ -178,13 +215,18 @@ function readGrantsWithExtras(home) {
178
215
  const repos = stringList(o.repos, normalizeSlug);
179
216
  const excluded = stringList(o.excluded, normalizeSlug);
180
217
  const refused = stringList(o.refused, normalizeSlug);
218
+ const pending = parsePending(o.pending);
219
+ const syncedAt = o.synced_at === undefined ? null : o.synced_at;
181
220
  const at = o.disclosed_at;
182
- if (owners === null || repos === null || excluded === null || refused === null)
221
+ if (owners === null || repos === null || excluded === null || refused === null || pending === null) {
183
222
  return { read: { kind: "unreadable" }, extras: none };
223
+ }
184
224
  if (at !== null && typeof at !== "string")
185
225
  return { read: { kind: "unreadable" }, extras: none };
226
+ if (syncedAt !== null && typeof syncedAt !== "string")
227
+ return { read: { kind: "unreadable" }, extras: none };
186
228
  return {
187
- read: { kind: "ok", grants: { disclosed_at: at, owners, repos, excluded, refused } },
229
+ read: { kind: "ok", grants: { disclosed_at: at, owners, repos, excluded, refused, pending, synced_at: syncedAt } },
188
230
  extras: Object.entries(o).filter(([key]) => !KNOWN_GRANTS_KEYS.has(key)),
189
231
  };
190
232
  }
@@ -199,6 +241,138 @@ export function readGrants(home) {
199
241
  export function grantsUnreadable(home) {
200
242
  return readGrants(home).kind === "unreadable";
201
243
  }
244
+ export const EMPTY_ACCOUNT_STATE = { account: null, refused: [], stale: false, last_get_at: null };
245
+ function parseAccountGrants(value) {
246
+ if (value === null)
247
+ return null;
248
+ if (typeof value !== "object" || Array.isArray(value))
249
+ return undefined;
250
+ const o = value;
251
+ const owners = stringList(o.owners, normalizeOwner);
252
+ const repos = stringList(o.repos, normalizeSlug);
253
+ const excluded = stringList(o.excluded, normalizeSlug);
254
+ if (owners === null || repos === null || excluded === null)
255
+ return undefined;
256
+ if (typeof o.epoch !== "number" || !Number.isSafeInteger(o.epoch) || o.epoch < 0)
257
+ return undefined;
258
+ if (typeof o.synced_at !== "string")
259
+ return undefined;
260
+ return { owners, repos, excluded, epoch: o.epoch, synced_at: o.synced_at };
261
+ }
262
+ /** Read it. **NEVER THROWS, and any failure — missing, unreadable, not JSON, any field off-shape — is the empty state.** */
263
+ export function readAccountState(home) {
264
+ try {
265
+ const parsed = JSON.parse(readFileSync(grantsAccountPath(home), "utf8"));
266
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
267
+ return EMPTY_ACCOUNT_STATE;
268
+ const o = parsed;
269
+ const account = o.account === undefined ? null : parseAccountGrants(o.account);
270
+ const refused = o.refused === undefined ? [] : stringList(o.refused, normalizeSlug);
271
+ const last = o.last_get_at === undefined ? null : o.last_get_at;
272
+ if (account === undefined || refused === null)
273
+ return EMPTY_ACCOUNT_STATE;
274
+ if (o.stale !== undefined && typeof o.stale !== "boolean")
275
+ return EMPTY_ACCOUNT_STATE;
276
+ if (last !== null && typeof last !== "string")
277
+ return EMPTY_ACCOUNT_STATE;
278
+ return { account, refused, stale: o.stale === true, last_get_at: last };
279
+ }
280
+ catch {
281
+ return EMPTY_ACCOUNT_STATE;
282
+ }
283
+ }
284
+ /** Write it whole: normalized, atomic, 0600. Throws on an I/O failure (the destination is then untouched). */
285
+ export function writeAccountState(home, state) {
286
+ const clean = {
287
+ account: state.account === null
288
+ ? null
289
+ : {
290
+ owners: [...new Set(state.account.owners.map(normalizeOwner).filter((o) => o !== ""))],
291
+ repos: [...new Set(state.account.repos.map(normalizeSlug).filter((r) => r !== ""))],
292
+ excluded: [...new Set(state.account.excluded.map(normalizeSlug).filter((x) => x !== ""))],
293
+ epoch: state.account.epoch,
294
+ synced_at: state.account.synced_at,
295
+ },
296
+ refused: [...new Set(state.refused.map(normalizeSlug).filter((x) => x !== "" && !isLocalSlug(x)))],
297
+ stale: state.stale,
298
+ last_get_at: state.last_get_at,
299
+ };
300
+ const path = grantsAccountPath(home);
301
+ mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
302
+ writeFileAtomic(path, `${JSON.stringify(clean, null, 2)}\n`, 0o600);
303
+ }
304
+ /**
305
+ * A hook saw `repository_excluded` for this slug: remember it, so this machine stops reading that repo's transcripts until
306
+ * the next sync says otherwise. **NEVER THROWS** — it runs on the hook's path, where a failed write only means the server
307
+ * refuses the next upload too. `local:` slugs are never recorded (there is no repo identity to refuse).
308
+ */
309
+ export function recordRefused(home, slug) {
310
+ const name = normalizeSlug(slug);
311
+ if (name === "" || isLocalSlug(name))
312
+ return;
313
+ try {
314
+ const current = readAccountState(home);
315
+ if (current.refused.includes(name))
316
+ return;
317
+ writeAccountState(home, { ...current, refused: [...current.refused, name] });
318
+ }
319
+ catch {
320
+ // The hook goes on: nothing was written, and the next refusal tries again.
321
+ }
322
+ }
323
+ /**
324
+ * A hook saw `X-Grant-Epoch` on a server answer (an ingest 2xx, or a grants refusal): if it is not the epoch this machine last
325
+ * recorded, mark the account state `stale`, which is what SessionStart's one bounded `GET` looks for (`session_grants.ts`).
326
+ * A machine with no recorded account state counts as epoch 0, as the server does when a user has no grants row.
327
+ *
328
+ * Writes `grants-account.json` and never `grants.json` (see `AccountState`), only when something changed — so a Stop hook that sees
329
+ * the same epoch every turn does no file write at all — and only ever sets `stale`; the GET (or a sync) clears it. **NEVER THROWS**:
330
+ * it runs on the hook's path, and a lost mark only means the next answer marks it again.
331
+ */
332
+ export function noteGrantEpoch(home, epoch) {
333
+ if (epoch === null || epoch === undefined || !Number.isSafeInteger(epoch) || epoch < 0)
334
+ return;
335
+ try {
336
+ const current = readAccountState(home);
337
+ if (current.stale)
338
+ return;
339
+ if (epoch === (current.account?.epoch ?? 0))
340
+ return;
341
+ writeAccountState(home, { ...current, stale: true });
342
+ }
343
+ catch {
344
+ // The hook goes on: nothing was written, and the next answer marks it again.
345
+ }
346
+ }
347
+ /**
348
+ * True when the last synced account state (the last 200) already grants this repo, or its owner. ⚠ Read only to avoid a NEEDLESS
349
+ * hold — say an owner grant was queued and refused with a 400 while the server already admits this repo — and never to admit: the
350
+ * account's grants do not admit anything on this machine.
351
+ */
352
+ function accountGrants(state, name) {
353
+ const a = state.account;
354
+ return a !== null && (a.repos.includes(name) || a.owners.includes(ownerOfSlug(name)));
355
+ }
356
+ /** True when a queued `grant` op names this slug, or its owner. */
357
+ function grantPendingFor(pending, name) {
358
+ const owner = ownerOfSlug(name);
359
+ return pending.some((p) => p.op === "grant" && (p.kind === "repo" ? p.value === name : p.value === owner));
360
+ }
361
+ /**
362
+ * Does the hold of `isCaptureAllowed` (step 3) apply to ANYTHING on this machine right now? True when the machine has synced
363
+ * (`synced_at` is set) and a queued `grant` op names an owner or a repo the last synced account state does not already grant
364
+ * (the same two conditions the per-slug hold uses: a synced machine, and the account not already admitting it). "0.8.0 truth
365
+ * fixes" R2-2: `connect`'s untold line says sessions wait only when something actually waits. Reads `grants.json` and
366
+ * `grants-account.json`; an unreadable `grants.json` holds nothing here (the gate denies for its own reason).
367
+ */
368
+ export function holdsAny(home) {
369
+ const read = readGrants(home);
370
+ if (read.kind !== "ok" || read.grants.synced_at === null)
371
+ return false;
372
+ const state = readAccountState(home);
373
+ // `accountGrants` is the gate's own predicate: an owner op is asked as `owner/` (its owner is `owner`, and no account repo is spelled that way).
374
+ return read.grants.pending.some((p) => p.op === "grant" && !accountGrants(state, p.kind === "repo" ? p.value : `${p.value}/`));
375
+ }
202
376
  /**
203
377
  * ⛔ **THE ONE ADMISSION DECISION.** Every gate calls this; `entry.ts`, `post_commit.ts`, `post_rewrite.ts` (twice),
204
378
  * `finalize.ts`, `status.ts` and `connect.ts` are the seven call sites. Absence is a NO and every error path denies.
@@ -206,12 +380,28 @@ export function grantsUnreadable(home) {
206
380
  * Precedence:
207
381
  * 1. A MISSING `grants.json` is empty (0.6.x machines keep capturing on their common-dir consent). A PRESENT file
208
382
  * that cannot be read denies every clone that has a slug, whatever `projects.json` says.
209
- * 2. An excluded slug is denied, whatever the basis.
210
- * 3. Otherwise: admitted on the common-dir consent, or on a slug matched by `owners` or `repos`.
383
+ * 2. A denied slug is denied, whatever the basis: `grants.json`'s `excluded` (and its legacy `refused`), the account file's
384
+ * `refused`, or the account's own `excluded`.
385
+ * 3. On a machine that HAS SYNCED (`grants.synced_at` is set), a slug with a `grant` still PENDING (queued, not yet delivered to
386
+ * the account) is held back when that grant is the slug's ONLY local basis, i.e. the clone has no common-dir consent: its
387
+ * spans stay unsent with their offset unchanged, and go once a sync delivers the grant. It is not held either when the last
388
+ * synced account state already grants the repo or its owner (the server admits it, so a queued grant that was refused must
389
+ * not hold it for ever).
390
+ * ⭐ **A MACHINE THAT HAS NEVER SYNCED HOLDS NOTHING** (VQ, "0.8.0 truth fixes" F1): the server refuses only a credential that
391
+ * has synced (`grants_synced_at`), so before the first sync the hold protects nothing and would only defer uploads, for ever
392
+ * against a server without the routes. Such a machine decides capture by its own choices, as under 0.7.0.
393
+ * ⭐ **WHY A COMMON-DIR CONSENT LIFTS THE HOLD** (VQ's ruling): a remote repo gets a common-dir consent only from pre-0.8.0
394
+ * flows (0.8.0's in-repo `connect` pre-ticks the picker, which writes GRANTS). The first sync uploads those consented slugs, so
395
+ * either this credential has not synced, and the server never refuses anything for it, or the first sync already granted the
396
+ * slug, and holding it would only delay bytes the server accepts.
397
+ * 4. Otherwise: admitted on the common-dir consent, or on a slug matched by `owners` or `repos`. ⛔ The account's own
398
+ * `owners`/`repos` are NOT consulted — a repo only the account grants is not captured on this machine (per-machine naming).
211
399
  *
212
400
  * `local:` slugs never match a grant and keep common-dir consent alone. They are also not subject to
213
401
  * exclusion or to an unreadable file: there is no repo identity to exclude.
214
402
  *
403
+ * `grants-account.json` is read on every call and an unreadable one is the empty state, never a denial (`AccountState`).
404
+ *
215
405
  * ⚠ **`slug` MAY BE A THUNK, and the hooks pass one.** Computing a slug can spawn `git remote get-url` and `ssh -G`,
216
406
  * which is real time on a hook's budget; a machine with no `grants.json` (every 0.6.x machine) needs none of it, and
217
407
  * neither does a clone with no consent and no grants to match. The slug is asked for only when the answer depends on it.
@@ -225,20 +415,59 @@ export function isCaptureAllowed(home, keys, slug) {
225
415
  return false;
226
416
  const byClone = isProjectAllowed(home, keys.consent);
227
417
  const read = readGrants(home);
228
- if (read.kind === "missing")
229
- return byClone;
230
418
  const resolve = () => normalizeSlug(typeof slug === "function" ? slug() : slug);
231
419
  if (read.kind === "unreadable")
232
420
  return isLocalSlug(resolve()) ? byClone : false;
233
- const { owners, repos, excluded } = read.grants;
234
- if (excluded.length === 0 && (byClone || (owners.length === 0 && repos.length === 0)))
421
+ const grants = read.kind === "ok" ? read.grants : EMPTY_GRANTS;
422
+ const account = readAccountState(home);
423
+ const denyLists = [grants.excluded, grants.refused, account.refused, account.account?.excluded ?? []];
424
+ const mayDeny = denyLists.some((list) => list.length > 0);
425
+ const mayHold = !byClone && grants.synced_at !== null && grants.pending.some((p) => p.op === "grant");
426
+ if (!mayDeny && !mayHold && (byClone || (grants.owners.length === 0 && grants.repos.length === 0)))
235
427
  return byClone;
236
428
  const name = resolve();
237
429
  if (isLocalSlug(name))
238
430
  return byClone;
239
- if (excluded.includes(name))
431
+ if (denyLists.some((list) => list.includes(name)))
432
+ return false;
433
+ if (!byClone && grants.synced_at !== null && grantPendingFor(grants.pending, name) && !accountGrants(account, name))
240
434
  return false;
241
- return byClone || repos.includes(name) || owners.includes(ownerOfSlug(name));
435
+ return byClone || grants.repos.includes(name) || grants.owners.includes(ownerOfSlug(name));
436
+ }
437
+ /**
438
+ * Does this machine hold ANY capture consent at all? The hook asks BEFORE it opens a transcript or writes a byte of state: a
439
+ * machine that has granted nothing (no `projects.json` entry, no slug or owner grant) must not read or index a single session
440
+ * (any-folder capture widens what a hook reads, never who it reads it for).
441
+ *
442
+ * ⚠ An unreadable `grants.json` counts as "yes": it may hold exclusions we cannot see, and the resolver denies on it.
443
+ */
444
+ export function hasAnyConsent(home) {
445
+ if (Object.keys(readAllowList(home)).length > 0)
446
+ return true;
447
+ if (grantedFolders(home).length > 0)
448
+ return true;
449
+ const read = readGrants(home);
450
+ if (read.kind === "unreadable")
451
+ return true;
452
+ const grants = read.kind === "ok" ? read.grants : EMPTY_GRANTS;
453
+ return grants.repos.length > 0 || grants.owners.length > 0;
454
+ }
455
+ export function captureStanding(home, keys, slug) {
456
+ if (isCaptureAllowed(home, keys, slug))
457
+ return "granted";
458
+ const read = readGrants(home);
459
+ const name = normalizeSlug(typeof slug === "function" ? slug() : slug);
460
+ if (isLocalSlug(name))
461
+ return "undecided";
462
+ if (read.kind === "unreadable")
463
+ return "denied";
464
+ const grants = read.kind === "ok" ? read.grants : EMPTY_GRANTS;
465
+ const account = readAccountState(home);
466
+ const denied = [grants.excluded, grants.refused, account.refused, account.account?.excluded ?? []];
467
+ if (denied.some((list) => list.includes(name)))
468
+ return "denied";
469
+ const basis = isProjectAllowed(home, keys.consent) || grants.repos.includes(name) || grants.owners.includes(ownerOfSlug(name));
470
+ return basis ? "held" : "undecided";
242
471
  }
243
472
  /** `updateGrants` refuses to rewrite a file it cannot read: overwriting would silently drop exclusions it never saw. */
244
473
  export class GrantsUnreadableError extends Error {
@@ -269,6 +498,11 @@ export function updateGrants(home, change) {
269
498
  repos: [...new Set(next.repos.map(normalizeSlug).filter((r) => r !== ""))],
270
499
  excluded: [...new Set(next.excluded.map(normalizeSlug).filter((x) => x !== ""))],
271
500
  refused: [...new Set(next.refused.map(normalizeSlug).filter((x) => x !== ""))],
501
+ pending: next.pending.flatMap((p) => {
502
+ const value = p.kind === "owner" ? normalizeOwner(p.value) : normalizeSlug(p.value);
503
+ return value === "" ? [] : [{ ...p, value }];
504
+ }),
505
+ synced_at: next.synced_at,
272
506
  };
273
507
  const path = grantsPath(home);
274
508
  mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
@@ -1 +1 @@
1
- {"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AAEH,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAU/D;;;;GAIG;AACH,MAAM,UAAU,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