@vibe-commit/capture 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -5
- package/dist/agent_hooks.d.ts +8 -0
- package/dist/agent_hooks.js +31 -1
- package/dist/agent_hooks.js.map +1 -1
- package/dist/agents/claude_code.d.ts +34 -0
- package/dist/agents/claude_code.js +141 -8
- package/dist/agents/claude_code.js.map +1 -1
- package/dist/agents/codex_cli.d.ts +13 -0
- package/dist/agents/codex_cli.js +241 -2
- package/dist/agents/codex_cli.js.map +1 -1
- package/dist/agents/cursor.d.ts +34 -0
- package/dist/agents/cursor.js +115 -1
- package/dist/agents/cursor.js.map +1 -1
- package/dist/agents/session_listing.d.ts +29 -0
- package/dist/agents/session_listing.js +49 -0
- package/dist/agents/session_listing.js.map +1 -0
- package/dist/agents/types.d.ts +118 -8
- package/dist/agents/types.js +17 -3
- package/dist/agents/types.js.map +1 -1
- package/dist/commands/approval_pending.d.ts +9 -0
- package/dist/commands/approval_pending.js +23 -0
- package/dist/commands/approval_pending.js.map +1 -0
- package/dist/commands/auth.js +31 -11
- package/dist/commands/auth.js.map +1 -1
- package/dist/commands/backfill.d.ts +160 -0
- package/dist/commands/backfill.js +748 -0
- package/dist/commands/backfill.js.map +1 -0
- package/dist/commands/browser_credential.d.ts +2 -0
- package/dist/commands/browser_credential.js +31 -14
- package/dist/commands/browser_credential.js.map +1 -1
- package/dist/commands/connect.d.ts +137 -0
- package/dist/commands/connect.js +203 -109
- package/dist/commands/connect.js.map +1 -1
- package/dist/commands/connect_picker.d.ts +27 -0
- package/dist/commands/connect_picker.js +415 -0
- package/dist/commands/connect_picker.js.map +1 -0
- package/dist/commands/context.d.ts +16 -0
- package/dist/commands/context.js +27 -0
- package/dist/commands/context.js.map +1 -1
- package/dist/commands/credential_problem.d.ts +15 -4
- package/dist/commands/credential_problem.js +29 -22
- package/dist/commands/credential_problem.js.map +1 -1
- package/dist/commands/device_credential.d.ts +2 -0
- package/dist/commands/device_credential.js +16 -14
- package/dist/commands/device_credential.js.map +1 -1
- package/dist/commands/finalize.d.ts +95 -0
- package/dist/commands/finalize.js +249 -74
- package/dist/commands/finalize.js.map +1 -1
- package/dist/commands/finish_mint.d.ts +2 -6
- package/dist/commands/finish_mint.js +10 -2
- package/dist/commands/finish_mint.js.map +1 -1
- package/dist/commands/report.js +38 -30
- package/dist/commands/report.js.map +1 -1
- package/dist/commands/scan.d.ts +162 -0
- package/dist/commands/scan.js +507 -0
- package/dist/commands/scan.js.map +1 -0
- package/dist/commands/status.js +119 -22
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/status_hooks.d.ts +14 -0
- package/dist/commands/status_hooks.js +81 -0
- package/dist/commands/status_hooks.js.map +1 -0
- package/dist/commands/status_machine.d.ts +18 -0
- package/dist/commands/status_machine.js +149 -0
- package/dist/commands/status_machine.js.map +1 -0
- package/dist/commands/why.js +44 -31
- package/dist/commands/why.js.map +1 -1
- package/dist/consent.d.ts +111 -0
- package/dist/consent.js +203 -1
- package/dist/consent.js.map +1 -1
- package/dist/copy/error_codes.d.ts +222 -0
- package/dist/copy/error_codes.js +105 -0
- package/dist/copy/error_codes.js.map +1 -0
- package/dist/copy/index.d.ts +2 -2
- package/dist/copy/index.js +2 -2
- package/dist/copy/index.js.map +1 -1
- package/dist/copy/strings.d.ts +497 -29
- package/dist/copy/strings.js +601 -35
- package/dist/copy/strings.js.map +1 -1
- package/dist/copy/time.d.ts +11 -0
- package/dist/copy/time.js +18 -0
- package/dist/copy/time.js.map +1 -1
- package/dist/credential.d.ts +5 -1
- package/dist/credential.js +2 -2
- package/dist/credential.js.map +1 -1
- package/dist/git.d.ts +43 -0
- package/dist/git.js +95 -0
- package/dist/git.js.map +1 -1
- package/dist/hooks/entry.d.ts +18 -1
- package/dist/hooks/entry.js +110 -13
- package/dist/hooks/entry.js.map +1 -1
- package/dist/hooks/post_commit.js +3 -3
- package/dist/hooks/post_commit.js.map +1 -1
- package/dist/hooks/post_rewrite.js +6 -4
- package/dist/hooks/post_rewrite.js.map +1 -1
- package/dist/hooks/session_start.d.ts +93 -0
- package/dist/hooks/session_start.js +199 -0
- package/dist/hooks/session_start.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +56 -8
- package/dist/index.js.map +1 -1
- package/dist/install.d.ts +57 -0
- package/dist/install.js +54 -20
- package/dist/install.js.map +1 -1
- package/dist/json.d.ts +32 -9
- package/dist/json.js +35 -8
- package/dist/json.js.map +1 -1
- package/dist/machine_state.d.ts +52 -0
- package/dist/machine_state.js +63 -0
- package/dist/machine_state.js.map +1 -0
- package/dist/oauth/session.d.ts +1 -0
- package/dist/org_pending.d.ts +52 -0
- package/dist/org_pending.js +109 -0
- package/dist/org_pending.js.map +1 -0
- package/dist/paths.d.ts +50 -0
- package/dist/paths.js +64 -0
- package/dist/paths.js.map +1 -1
- package/dist/picker.d.ts +180 -0
- package/dist/picker.js +477 -0
- package/dist/picker.js.map +1 -0
- package/dist/picker_checklist.d.ts +125 -0
- package/dist/picker_checklist.js +375 -0
- package/dist/picker_checklist.js.map +1 -0
- package/dist/policy.d.ts +54 -0
- package/dist/policy.js +47 -0
- package/dist/policy.js.map +1 -1
- package/dist/post.d.ts +50 -16
- package/dist/post.js +220 -16
- package/dist/post.js.map +1 -1
- package/dist/state.d.ts +6 -0
- package/dist/state.js +38 -1
- package/dist/state.js.map +1 -1
- package/dist/system_message.d.ts +8 -1
- package/dist/system_message.js +19 -1
- package/dist/system_message.js.map +1 -1
- package/dist/term.d.ts +28 -2
- package/dist/term.js +23 -2
- package/dist/term.js.map +1 -1
- package/dist/verb_help.d.ts +13 -0
- package/dist/verb_help.js +40 -0
- package/dist/verb_help.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +5 -9
package/dist/consent.js
CHANGED
|
@@ -30,6 +30,15 @@
|
|
|
30
30
|
* `.consent`, and the parameter is named for it so a toplevel passed by habit
|
|
31
31
|
* reads wrong at the call site.
|
|
32
32
|
*
|
|
33
|
+
* ## ⛔ A SECOND KEY, AND ONE DOOR: `isCaptureAllowed` (0.7.0, D1 · B)
|
|
34
|
+
*
|
|
35
|
+
* A repo can now also be admitted by its SLUG (`owner/repo`) through
|
|
36
|
+
* `grants.json`, so any clone of it matches, not only the one that ran
|
|
37
|
+
* `connect`. Every gate asks `isCaptureAllowed`; `isProjectAllowed` is the
|
|
38
|
+
* common-dir half of it and nothing outside this file calls it
|
|
39
|
+
* (`test/consent-gates.test.ts` scans for exactly that). Two keys behind two
|
|
40
|
+
* doors is how `post_rewrite.ts` was missed once.
|
|
41
|
+
*
|
|
33
42
|
* ⚠ **No migration for allow lists written under the old key**, and that is a
|
|
34
43
|
* decision rather than an omission: pre-launch there are zero users and zero
|
|
35
44
|
* rows (`project_pre_launch_no_data`), so there is nothing to migrate. See
|
|
@@ -37,7 +46,8 @@
|
|
|
37
46
|
*/
|
|
38
47
|
import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
39
48
|
import { dirname } from "node:path";
|
|
40
|
-
import {
|
|
49
|
+
import { writeFileAtomic } from "./atomic_write.js";
|
|
50
|
+
import { grantsPath, projectsPath, rootDir } from "./paths.js";
|
|
41
51
|
/**
|
|
42
52
|
* Read the allow list. **Every failure returns an empty list**, which means "no
|
|
43
53
|
* project is consented" — a corrupt or unreadable file must not be able to grant
|
|
@@ -100,6 +110,198 @@ export function revokeProject(home, consentKey) {
|
|
|
100
110
|
chmodSync(path, 0o600);
|
|
101
111
|
return true;
|
|
102
112
|
}
|
|
113
|
+
export const EMPTY_GRANTS = {
|
|
114
|
+
disclosed_at: null,
|
|
115
|
+
owners: [],
|
|
116
|
+
repos: [],
|
|
117
|
+
excluded: [],
|
|
118
|
+
refused: [],
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* ⛔ **THE ONE NORMALIZATION.** The whole host-qualified slug, lowercased, for every host — the identity the
|
|
122
|
+
* server already stores (`resolve_repository` sets `v_slug := lower(trim(...))`). Owners, repos, exclusions,
|
|
123
|
+
* every `grants.json` write and slice 2's server comparison all go through this, so two clones whose remotes
|
|
124
|
+
* differ only in case are one repo on both sides.
|
|
125
|
+
*/
|
|
126
|
+
export function normalizeSlug(slug) {
|
|
127
|
+
return slug.trim().toLowerCase();
|
|
128
|
+
}
|
|
129
|
+
/** An owner as stored: normalized, and without the trailing `/` the picker displays (`alexvibecommit/`). */
|
|
130
|
+
export function normalizeOwner(owner) {
|
|
131
|
+
return normalizeSlug(owner).replace(/\/+$/, "");
|
|
132
|
+
}
|
|
133
|
+
/** `local:` slugs name a path, not a repo: no grant can match one, and their consent stays per clone. */
|
|
134
|
+
export function isLocalSlug(slug) {
|
|
135
|
+
return slug.startsWith("local:");
|
|
136
|
+
}
|
|
137
|
+
/** The owner part of a slug: everything before the last `/`. `""` when there is none. */
|
|
138
|
+
export function ownerOfSlug(slug) {
|
|
139
|
+
const cut = slug.lastIndexOf("/");
|
|
140
|
+
return cut <= 0 ? "" : slug.slice(0, cut);
|
|
141
|
+
}
|
|
142
|
+
function stringList(value, normalize) {
|
|
143
|
+
if (!Array.isArray(value))
|
|
144
|
+
return null;
|
|
145
|
+
const out = [];
|
|
146
|
+
for (const item of value) {
|
|
147
|
+
if (typeof item !== "string")
|
|
148
|
+
return null;
|
|
149
|
+
const n = normalize(item);
|
|
150
|
+
if (n !== "" && !out.includes(n))
|
|
151
|
+
out.push(n);
|
|
152
|
+
}
|
|
153
|
+
return out;
|
|
154
|
+
}
|
|
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"]);
|
|
157
|
+
/**
|
|
158
|
+
* `readGrants` plus the top-level keys it does not know, in file order. One read and one parse, so `updateGrants`
|
|
159
|
+
* rewrites exactly the file it read. `extras` is empty unless `read` is `ok`.
|
|
160
|
+
*/
|
|
161
|
+
function readGrantsWithExtras(home) {
|
|
162
|
+
const none = [];
|
|
163
|
+
let raw;
|
|
164
|
+
try {
|
|
165
|
+
raw = readFileSync(grantsPath(home), "utf8");
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
return { read: error.code === "ENOENT" ? { kind: "missing" } : { kind: "unreadable" }, extras: none };
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
const parsed = JSON.parse(raw);
|
|
172
|
+
if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
|
|
173
|
+
return { read: { kind: "unreadable" }, extras: none };
|
|
174
|
+
const o = parsed;
|
|
175
|
+
// A missing list is NOT read as empty: a typo'd `exclude` key would otherwise silently drop every
|
|
176
|
+
// exclusion. All four are required, extra keys are ignored.
|
|
177
|
+
const owners = stringList(o.owners, normalizeOwner);
|
|
178
|
+
const repos = stringList(o.repos, normalizeSlug);
|
|
179
|
+
const excluded = stringList(o.excluded, normalizeSlug);
|
|
180
|
+
const refused = stringList(o.refused, normalizeSlug);
|
|
181
|
+
const at = o.disclosed_at;
|
|
182
|
+
if (owners === null || repos === null || excluded === null || refused === null)
|
|
183
|
+
return { read: { kind: "unreadable" }, extras: none };
|
|
184
|
+
if (at !== null && typeof at !== "string")
|
|
185
|
+
return { read: { kind: "unreadable" }, extras: none };
|
|
186
|
+
return {
|
|
187
|
+
read: { kind: "ok", grants: { disclosed_at: at, owners, repos, excluded, refused } },
|
|
188
|
+
extras: Object.entries(o).filter(([key]) => !KNOWN_GRANTS_KEYS.has(key)),
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch {
|
|
192
|
+
return { read: { kind: "unreadable" }, extras: none };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
export function readGrants(home) {
|
|
196
|
+
return readGrantsWithExtras(home).read;
|
|
197
|
+
}
|
|
198
|
+
/** True when a `grants.json` is present and unusable — the state `status` reports and a SessionStart notice names. */
|
|
199
|
+
export function grantsUnreadable(home) {
|
|
200
|
+
return readGrants(home).kind === "unreadable";
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* ⛔ **THE ONE ADMISSION DECISION.** Every gate calls this; `entry.ts`, `post_commit.ts`, `post_rewrite.ts` (twice),
|
|
204
|
+
* `finalize.ts`, `status.ts` and `connect.ts` are the seven call sites. Absence is a NO and every error path denies.
|
|
205
|
+
*
|
|
206
|
+
* Precedence:
|
|
207
|
+
* 1. A MISSING `grants.json` is empty (0.6.x machines keep capturing on their common-dir consent). A PRESENT file
|
|
208
|
+
* 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`.
|
|
211
|
+
*
|
|
212
|
+
* `local:` slugs never match a grant and keep common-dir consent alone. They are also not subject to
|
|
213
|
+
* exclusion or to an unreadable file: there is no repo identity to exclude.
|
|
214
|
+
*
|
|
215
|
+
* ⚠ **`slug` MAY BE A THUNK, and the hooks pass one.** Computing a slug can spawn `git remote get-url` and `ssh -G`,
|
|
216
|
+
* 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
|
+
* neither does a clone with no consent and no grants to match. The slug is asked for only when the answer depends on it.
|
|
218
|
+
* Pass a memoized thunk (`git.ts`'s `onceRepoSlug`) so the caller's own later use shares the one spawn.
|
|
219
|
+
*
|
|
220
|
+
* `keys` is the `resolveProjectKeys` result the caller already holds, so the confinement roots it derives afterwards
|
|
221
|
+
* come from the very resolution this gate used (`D184 §3`).
|
|
222
|
+
*/
|
|
223
|
+
export function isCaptureAllowed(home, keys, slug) {
|
|
224
|
+
if (keys === null)
|
|
225
|
+
return false;
|
|
226
|
+
const byClone = isProjectAllowed(home, keys.consent);
|
|
227
|
+
const read = readGrants(home);
|
|
228
|
+
if (read.kind === "missing")
|
|
229
|
+
return byClone;
|
|
230
|
+
const resolve = () => normalizeSlug(typeof slug === "function" ? slug() : slug);
|
|
231
|
+
if (read.kind === "unreadable")
|
|
232
|
+
return isLocalSlug(resolve()) ? byClone : false;
|
|
233
|
+
const { owners, repos, excluded } = read.grants;
|
|
234
|
+
if (excluded.length === 0 && (byClone || (owners.length === 0 && repos.length === 0)))
|
|
235
|
+
return byClone;
|
|
236
|
+
const name = resolve();
|
|
237
|
+
if (isLocalSlug(name))
|
|
238
|
+
return byClone;
|
|
239
|
+
if (excluded.includes(name))
|
|
240
|
+
return false;
|
|
241
|
+
return byClone || repos.includes(name) || owners.includes(ownerOfSlug(name));
|
|
242
|
+
}
|
|
243
|
+
/** `updateGrants` refuses to rewrite a file it cannot read: overwriting would silently drop exclusions it never saw. */
|
|
244
|
+
export class GrantsUnreadableError extends Error {
|
|
245
|
+
constructor() {
|
|
246
|
+
super("grants.json is present and cannot be read");
|
|
247
|
+
this.name = "GrantsUnreadableError";
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Read-modify-write `grants.json`. 0700 on the directory, 0600 on the file, atomic (a hook reading while a verb saves
|
|
252
|
+
* sees the old file or the new, never half). Entries are normalized and de-duplicated on the way out.
|
|
253
|
+
*
|
|
254
|
+
* ⛔ **Throws `GrantsUnreadableError` rather than start from empty** when the file is present and unusable: a rewrite
|
|
255
|
+
* would turn "denies everything" into "admits on common-dir consent" without the user having decided anything.
|
|
256
|
+
*
|
|
257
|
+
* ⛔ **Keeps the top-level keys it does not know**, verbatim and uninterpreted, after the five it rebuilds (which always
|
|
258
|
+
* win). A newer version's file read by this one is written back whole: dropping a key it added would silently undo its
|
|
259
|
+
* state. No lock: same read-modify-write as `projects.json`, so two simultaneous verbs can lose one write.
|
|
260
|
+
*/
|
|
261
|
+
export function updateGrants(home, change) {
|
|
262
|
+
const { read, extras } = readGrantsWithExtras(home);
|
|
263
|
+
if (read.kind === "unreadable")
|
|
264
|
+
throw new GrantsUnreadableError();
|
|
265
|
+
const next = change(read.kind === "ok" ? read.grants : EMPTY_GRANTS);
|
|
266
|
+
const clean = {
|
|
267
|
+
disclosed_at: next.disclosed_at,
|
|
268
|
+
owners: [...new Set(next.owners.map(normalizeOwner).filter((o) => o !== ""))],
|
|
269
|
+
repos: [...new Set(next.repos.map(normalizeSlug).filter((r) => r !== ""))],
|
|
270
|
+
excluded: [...new Set(next.excluded.map(normalizeSlug).filter((x) => x !== ""))],
|
|
271
|
+
refused: [...new Set(next.refused.map(normalizeSlug).filter((x) => x !== ""))],
|
|
272
|
+
};
|
|
273
|
+
const path = grantsPath(home);
|
|
274
|
+
mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
|
|
275
|
+
chmodSync(rootDir(home), 0o700);
|
|
276
|
+
// `Object.fromEntries` defines own properties, so even a key named `__proto__` is written back as data.
|
|
277
|
+
const out = Object.fromEntries([...Object.entries(clean), ...extras]);
|
|
278
|
+
writeFileAtomic(path, `${JSON.stringify(out, null, 2)}\n`, 0o600);
|
|
279
|
+
return clean;
|
|
280
|
+
}
|
|
281
|
+
/** `vibecommit off`: the slug joins `excluded`. Returns true when that changed the file. */
|
|
282
|
+
export function excludeSlug(home, slug) {
|
|
283
|
+
const name = normalizeSlug(slug);
|
|
284
|
+
let changed = false;
|
|
285
|
+
updateGrants(home, (g) => {
|
|
286
|
+
changed = !g.excluded.includes(name);
|
|
287
|
+
return changed ? { ...g, excluded: [...g.excluded, name] } : g;
|
|
288
|
+
});
|
|
289
|
+
return changed;
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* A yes at the disclosure re-includes a turned-off repo; nothing else does. `"none"` when the slug was not excluded
|
|
293
|
+
* (no file is written then), `"unreadable"` when `grants.json` cannot be read.
|
|
294
|
+
*/
|
|
295
|
+
export function clearExclusion(home, slug) {
|
|
296
|
+
const name = normalizeSlug(slug);
|
|
297
|
+
const read = readGrants(home);
|
|
298
|
+
if (read.kind === "unreadable")
|
|
299
|
+
return "unreadable";
|
|
300
|
+
if (read.kind === "missing" || !read.grants.excluded.includes(name))
|
|
301
|
+
return "none";
|
|
302
|
+
updateGrants(home, (g) => ({ ...g, excluded: g.excluded.filter((x) => x !== name) }));
|
|
303
|
+
return "cleared";
|
|
304
|
+
}
|
|
103
305
|
/**
|
|
104
306
|
* Interpret an answer to the consent prompt. **Only an explicit yes is a yes.**
|
|
105
307
|
* Empty (the user pressed return) is NO, which is what makes `[y/N]` honest.
|
package/dist/consent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA
|
|
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,aAAa,CAAC,IAAY;IACxC,IAAI,GAAW,CAAC;IAChB,IAAI,CAAC;QACH,GAAG,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAY,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACxC,IAAI,MAAM,KAAK,IAAI,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;YAAE,OAAO,EAAE,CAAC;QACtF,MAAM,GAAG,GAAiC,EAAE,CAAC;QAC7C,KAAK,MAAM,CAAC,GAAG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AC,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IACtF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACtC,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,KAAK,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stable error codes — one per CONDITION, not per call site (0.7.0, PR 7).
|
|
3
|
+
*
|
|
4
|
+
* An agent that drives `vibecommit` keys on the code, not on the sentence: the sentence is copy and
|
|
5
|
+
* may be reworded, the code is a contract. So the rules are the rules of a contract:
|
|
6
|
+
*
|
|
7
|
+
* - **A shipped code is never renamed or reused for another condition.** A retired code stays in
|
|
8
|
+
* this table, marked `retired`, so the docs page still explains it.
|
|
9
|
+
* - **Adding a code is additive; changing one is a contract change** and goes in the release
|
|
10
|
+
* paragraph (L12).
|
|
11
|
+
* - **Names the state, not the verb**, and never "you": `^[A-Z][A-Z0-9_]{2,31}$`. A verb prefix is
|
|
12
|
+
* used only where the condition exists in one verb (`FINALIZE_SEVERAL_RECENT`).
|
|
13
|
+
* - **Two conditions with different fixes get two codes**, even when they print the same sentence;
|
|
14
|
+
* one condition reached from several verbs is one code (`NOT_A_REPO`).
|
|
15
|
+
* - **No exit code lives here.** A code names the condition; the exit stays the verb's own and the
|
|
16
|
+
* README's per-verb exit lists stay the contract (VQ, Q8).
|
|
17
|
+
*
|
|
18
|
+
* `test/error-codes.golden.txt` lists every code and its summary; the docs page copies it. This file
|
|
19
|
+
* imports nothing, so `term.ts` (the renderer) and `json.ts` can both use it.
|
|
20
|
+
*/
|
|
21
|
+
export interface ErrorCodeEntry {
|
|
22
|
+
/** One line naming the condition. The docs page gives the what line, the cause and the fix. */
|
|
23
|
+
readonly summary: string;
|
|
24
|
+
/** A retired code stays listed (never reused) and is marked as retired on the docs page. */
|
|
25
|
+
readonly retired?: true;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Declared as a literal so `ErrorCode` is a union of the keys and the compiler finds every
|
|
29
|
+
* `kind: "bad"` block that has no (or a misspelt) code.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ERROR_CODES: {
|
|
32
|
+
readonly INTERNAL_ERROR: {
|
|
33
|
+
readonly summary: "VibeCommit stopped on an unexpected error.";
|
|
34
|
+
};
|
|
35
|
+
readonly NODE_TOO_OLD: {
|
|
36
|
+
readonly summary: "The Node runtime is older than this version supports.";
|
|
37
|
+
};
|
|
38
|
+
readonly UNKNOWN_COMMAND: {
|
|
39
|
+
readonly summary: "The first argument is not a vibecommit command.";
|
|
40
|
+
};
|
|
41
|
+
readonly UNRECOGNIZED_ARGUMENT: {
|
|
42
|
+
readonly summary: "An argument the command does not take.";
|
|
43
|
+
};
|
|
44
|
+
readonly NOT_A_REPO: {
|
|
45
|
+
readonly summary: "The command was run outside a git work tree.";
|
|
46
|
+
};
|
|
47
|
+
readonly NOT_CONNECTED: {
|
|
48
|
+
readonly summary: "This repository is not allowed to be captured.";
|
|
49
|
+
};
|
|
50
|
+
readonly NO_CREDENTIAL: {
|
|
51
|
+
readonly summary: "This machine has no ingest credential.";
|
|
52
|
+
};
|
|
53
|
+
readonly GRANTS_UNREADABLE: {
|
|
54
|
+
readonly summary: "The grants file exists but cannot be read, so capture is stopped.";
|
|
55
|
+
};
|
|
56
|
+
readonly CONSENT_NEEDS_TTY: {
|
|
57
|
+
readonly summary: "Consent needs a person at a terminal.";
|
|
58
|
+
};
|
|
59
|
+
readonly BACKFILL_NEEDS_TTY: {
|
|
60
|
+
readonly summary: "Backfill asks a question that needs a person at a terminal.";
|
|
61
|
+
};
|
|
62
|
+
readonly OFF_NEEDS_REPO: {
|
|
63
|
+
readonly summary: "`off` was run outside a repository.";
|
|
64
|
+
};
|
|
65
|
+
readonly CREDENTIAL_IN_ARGV: {
|
|
66
|
+
readonly summary: "A credential was passed as a command-line argument.";
|
|
67
|
+
};
|
|
68
|
+
readonly CREDENTIAL_EMPTY: {
|
|
69
|
+
readonly summary: "No credential was given to `auth`.";
|
|
70
|
+
};
|
|
71
|
+
readonly CREDENTIAL_NOT_INGEST: {
|
|
72
|
+
readonly summary: "The credential given to `auth` is not an ingest credential.";
|
|
73
|
+
};
|
|
74
|
+
readonly STORED_CREDENTIAL_NOT_INGEST: {
|
|
75
|
+
readonly summary: "The credential stored for this machine is not an ingest credential.";
|
|
76
|
+
};
|
|
77
|
+
readonly CREDENTIAL_FILE_INSECURE: {
|
|
78
|
+
readonly summary: "The credential file is readable by other accounts.";
|
|
79
|
+
};
|
|
80
|
+
readonly CREDENTIAL_FILE_UNREADABLE: {
|
|
81
|
+
readonly summary: "The credential file could not be read.";
|
|
82
|
+
};
|
|
83
|
+
readonly CREDENTIAL_REJECTED: {
|
|
84
|
+
readonly summary: "The server no longer accepts this machine's credential.";
|
|
85
|
+
};
|
|
86
|
+
readonly WORKSPACE_UNCONFIRMED: {
|
|
87
|
+
readonly summary: "The workspace for a new credential could not be confirmed.";
|
|
88
|
+
};
|
|
89
|
+
readonly NOT_SIGNED_IN: {
|
|
90
|
+
readonly summary: "This machine has never signed in.";
|
|
91
|
+
};
|
|
92
|
+
readonly SIGNIN_ENDED: {
|
|
93
|
+
readonly summary: "This machine's sign-in has ended.";
|
|
94
|
+
};
|
|
95
|
+
readonly SIGNIN_BUSY: {
|
|
96
|
+
readonly summary: "Another command is renewing this machine's sign-in.";
|
|
97
|
+
};
|
|
98
|
+
readonly SIGNIN_SERVICE_NOT_FOUND: {
|
|
99
|
+
readonly summary: "The sign-in service could not be found.";
|
|
100
|
+
};
|
|
101
|
+
readonly SIGNIN_DENIED: {
|
|
102
|
+
readonly summary: "Sign-in was declined.";
|
|
103
|
+
};
|
|
104
|
+
readonly SIGNIN_TIMED_OUT: {
|
|
105
|
+
readonly summary: "Sign-in did not finish in time.";
|
|
106
|
+
};
|
|
107
|
+
readonly SIGNIN_CLIENT_REFUSED: {
|
|
108
|
+
readonly summary: "The sign-in service refused this client.";
|
|
109
|
+
};
|
|
110
|
+
readonly SIGNIN_UNREACHABLE: {
|
|
111
|
+
readonly summary: "The sign-in service could not be reached.";
|
|
112
|
+
};
|
|
113
|
+
readonly SIGNIN_ANSWER_UNUSABLE: {
|
|
114
|
+
readonly summary: "The sign-in service answered in a way this version cannot use.";
|
|
115
|
+
};
|
|
116
|
+
readonly SIGNIN_CODE_NEEDS_TTY: {
|
|
117
|
+
readonly summary: "Sign-in by code needs a terminal.";
|
|
118
|
+
};
|
|
119
|
+
readonly SIGNIN_CODE_UNSUPPORTED: {
|
|
120
|
+
readonly summary: "The server does not offer sign-in by code.";
|
|
121
|
+
};
|
|
122
|
+
readonly SIGNIN_CODE_REFUSED: {
|
|
123
|
+
readonly summary: "The service refused to start a sign-in by code.";
|
|
124
|
+
};
|
|
125
|
+
readonly SIGNIN_CODE_INVALID: {
|
|
126
|
+
readonly summary: "The service no longer recognises the sign-in code.";
|
|
127
|
+
};
|
|
128
|
+
readonly SIGNIN_CODE_DISABLED: {
|
|
129
|
+
readonly summary: "Sign-in by code is turned off for the account.";
|
|
130
|
+
};
|
|
131
|
+
readonly SIGNIN_RATE_LIMITED: {
|
|
132
|
+
readonly summary: "Too many sign-in attempts from this network.";
|
|
133
|
+
};
|
|
134
|
+
readonly AUTH_FLAGS_CONFLICT: {
|
|
135
|
+
readonly summary: "Two `auth` flags that cannot be combined were given.";
|
|
136
|
+
};
|
|
137
|
+
readonly MINT_FAILED: {
|
|
138
|
+
readonly summary: "No credential was created through the browser.";
|
|
139
|
+
};
|
|
140
|
+
readonly MINT_NOT_A_MEMBER: {
|
|
141
|
+
readonly summary: "The signed-in account is not a member of the workspace.";
|
|
142
|
+
};
|
|
143
|
+
readonly MINT_RATE_LIMITED: {
|
|
144
|
+
readonly summary: "Too many credential requests; the service asked to wait.";
|
|
145
|
+
};
|
|
146
|
+
readonly PATH_COMMAND_FOREIGN: {
|
|
147
|
+
readonly summary: "Another program owns the `vibecommit` command.";
|
|
148
|
+
};
|
|
149
|
+
readonly PATH_COMMAND_ABSENT: {
|
|
150
|
+
readonly summary: "The `vibecommit` command is not on PATH.";
|
|
151
|
+
};
|
|
152
|
+
readonly FINALIZE_NEEDS_TARGET: {
|
|
153
|
+
readonly summary: "`finalize` was given no session to close.";
|
|
154
|
+
};
|
|
155
|
+
readonly FINALIZE_BAD_SESSION_ID: {
|
|
156
|
+
readonly summary: "The value given is not a session id.";
|
|
157
|
+
};
|
|
158
|
+
readonly FINALIZE_NO_RECENT_SESSION: {
|
|
159
|
+
readonly summary: "No session in this repository delivered anything recently.";
|
|
160
|
+
};
|
|
161
|
+
readonly FINALIZE_SEVERAL_RECENT: {
|
|
162
|
+
readonly summary: "More than one recent session; one must be named.";
|
|
163
|
+
};
|
|
164
|
+
readonly FINALIZE_UNKNOWN_SESSION: {
|
|
165
|
+
readonly summary: "This repository has no captured session with that id.";
|
|
166
|
+
};
|
|
167
|
+
readonly FINALIZE_TRANSCRIPT_MISSING: {
|
|
168
|
+
readonly summary: "The transcript for the session could not be found.";
|
|
169
|
+
};
|
|
170
|
+
readonly FINALIZE_STILL_WRITING: {
|
|
171
|
+
readonly summary: "The session's transcript changed a moment ago.";
|
|
172
|
+
};
|
|
173
|
+
readonly FINALIZE_REFUSED: {
|
|
174
|
+
readonly summary: "The server declined to close the session on this attempt.";
|
|
175
|
+
};
|
|
176
|
+
readonly DELIVERY_FAILED: {
|
|
177
|
+
readonly summary: "The session could not be delivered; nothing was closed.";
|
|
178
|
+
};
|
|
179
|
+
readonly INGEST_URL_UNAVAILABLE: {
|
|
180
|
+
readonly summary: "The ingest address from the environment is unusable.";
|
|
181
|
+
};
|
|
182
|
+
readonly RECORD_SERVICE_UNREACHABLE: {
|
|
183
|
+
readonly summary: "The record service could not be reached.";
|
|
184
|
+
};
|
|
185
|
+
readonly RECORD_SERVICE_ERROR: {
|
|
186
|
+
readonly summary: "The record service could not answer.";
|
|
187
|
+
};
|
|
188
|
+
readonly RECORD_ANSWER_UNREADABLE: {
|
|
189
|
+
readonly summary: "The record service answered in a way this version cannot read.";
|
|
190
|
+
};
|
|
191
|
+
readonly WHY_NEEDS_FILE_AND_LINE: {
|
|
192
|
+
readonly summary: "`why` needs a file and a line number.";
|
|
193
|
+
};
|
|
194
|
+
readonly BLAME_FAILED: {
|
|
195
|
+
readonly summary: "`git blame` could not attribute the line.";
|
|
196
|
+
};
|
|
197
|
+
readonly REPORT_NEEDS_SINCE: {
|
|
198
|
+
readonly summary: "`report` needs a start date.";
|
|
199
|
+
};
|
|
200
|
+
readonly REPORT_SINCE_UNREADABLE: {
|
|
201
|
+
readonly summary: "The start date could not be read.";
|
|
202
|
+
};
|
|
203
|
+
readonly REPORT_REF_UNNAMEABLE: {
|
|
204
|
+
readonly summary: "`report` needs a ref it can name.";
|
|
205
|
+
};
|
|
206
|
+
readonly REPORT_REACHABILITY_UNKNOWN: {
|
|
207
|
+
readonly summary: "Whether a captured commit is reachable could not be determined.";
|
|
208
|
+
};
|
|
209
|
+
readonly SHALLOW_CLONE: {
|
|
210
|
+
readonly summary: "The clone is shallow, so the answer cannot be trusted.";
|
|
211
|
+
};
|
|
212
|
+
readonly CLIENT_TOO_OLD: {
|
|
213
|
+
readonly summary: "The server sent an answer this version is too old to show.";
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
export type ErrorCode = keyof typeof ERROR_CODES;
|
|
217
|
+
/** What is printed after the code, without the scheme (Alexander, "Code line before the fix"). */
|
|
218
|
+
export declare const ERROR_DOCS_PATH = "vibecommit.ai/docs/errors";
|
|
219
|
+
/** The anchor on the docs page: `#` plus the code, lowercased, underscores as hyphens. */
|
|
220
|
+
export declare function errorAnchor(code: ErrorCode): string;
|
|
221
|
+
/** The one muted line under a block's why paragraphs: `NOT_A_REPO · vibecommit.ai/docs/errors#not-a-repo`. */
|
|
222
|
+
export declare function errorCodeLine(code: ErrorCode): string;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The stable error codes — one per CONDITION, not per call site (0.7.0, PR 7).
|
|
3
|
+
*
|
|
4
|
+
* An agent that drives `vibecommit` keys on the code, not on the sentence: the sentence is copy and
|
|
5
|
+
* may be reworded, the code is a contract. So the rules are the rules of a contract:
|
|
6
|
+
*
|
|
7
|
+
* - **A shipped code is never renamed or reused for another condition.** A retired code stays in
|
|
8
|
+
* this table, marked `retired`, so the docs page still explains it.
|
|
9
|
+
* - **Adding a code is additive; changing one is a contract change** and goes in the release
|
|
10
|
+
* paragraph (L12).
|
|
11
|
+
* - **Names the state, not the verb**, and never "you": `^[A-Z][A-Z0-9_]{2,31}$`. A verb prefix is
|
|
12
|
+
* used only where the condition exists in one verb (`FINALIZE_SEVERAL_RECENT`).
|
|
13
|
+
* - **Two conditions with different fixes get two codes**, even when they print the same sentence;
|
|
14
|
+
* one condition reached from several verbs is one code (`NOT_A_REPO`).
|
|
15
|
+
* - **No exit code lives here.** A code names the condition; the exit stays the verb's own and the
|
|
16
|
+
* README's per-verb exit lists stay the contract (VQ, Q8).
|
|
17
|
+
*
|
|
18
|
+
* `test/error-codes.golden.txt` lists every code and its summary; the docs page copies it. This file
|
|
19
|
+
* imports nothing, so `term.ts` (the renderer) and `json.ts` can both use it.
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Declared as a literal so `ErrorCode` is a union of the keys and the compiler finds every
|
|
23
|
+
* `kind: "bad"` block that has no (or a misspelt) code.
|
|
24
|
+
*/
|
|
25
|
+
export const ERROR_CODES = {
|
|
26
|
+
// — the process —
|
|
27
|
+
INTERNAL_ERROR: { summary: "VibeCommit stopped on an unexpected error." },
|
|
28
|
+
NODE_TOO_OLD: { summary: "The Node runtime is older than this version supports." },
|
|
29
|
+
UNKNOWN_COMMAND: { summary: "The first argument is not a vibecommit command." },
|
|
30
|
+
UNRECOGNIZED_ARGUMENT: { summary: "An argument the command does not take." },
|
|
31
|
+
// — the repository and the machine —
|
|
32
|
+
NOT_A_REPO: { summary: "The command was run outside a git work tree." },
|
|
33
|
+
NOT_CONNECTED: { summary: "This repository is not allowed to be captured." },
|
|
34
|
+
NO_CREDENTIAL: { summary: "This machine has no ingest credential." },
|
|
35
|
+
GRANTS_UNREADABLE: { summary: "The grants file exists but cannot be read, so capture is stopped." },
|
|
36
|
+
CONSENT_NEEDS_TTY: { summary: "Consent needs a person at a terminal." },
|
|
37
|
+
BACKFILL_NEEDS_TTY: { summary: "Backfill asks a question that needs a person at a terminal." },
|
|
38
|
+
OFF_NEEDS_REPO: { summary: "`off` was run outside a repository." },
|
|
39
|
+
// — credentials —
|
|
40
|
+
CREDENTIAL_IN_ARGV: { summary: "A credential was passed as a command-line argument." },
|
|
41
|
+
CREDENTIAL_EMPTY: { summary: "No credential was given to `auth`." },
|
|
42
|
+
CREDENTIAL_NOT_INGEST: { summary: "The credential given to `auth` is not an ingest credential." },
|
|
43
|
+
STORED_CREDENTIAL_NOT_INGEST: { summary: "The credential stored for this machine is not an ingest credential." },
|
|
44
|
+
CREDENTIAL_FILE_INSECURE: { summary: "The credential file is readable by other accounts." },
|
|
45
|
+
CREDENTIAL_FILE_UNREADABLE: { summary: "The credential file could not be read." },
|
|
46
|
+
CREDENTIAL_REJECTED: { summary: "The server no longer accepts this machine's credential." },
|
|
47
|
+
WORKSPACE_UNCONFIRMED: { summary: "The workspace for a new credential could not be confirmed." },
|
|
48
|
+
// — signing in —
|
|
49
|
+
NOT_SIGNED_IN: { summary: "This machine has never signed in." },
|
|
50
|
+
SIGNIN_ENDED: { summary: "This machine's sign-in has ended." },
|
|
51
|
+
SIGNIN_BUSY: { summary: "Another command is renewing this machine's sign-in." },
|
|
52
|
+
SIGNIN_SERVICE_NOT_FOUND: { summary: "The sign-in service could not be found." },
|
|
53
|
+
SIGNIN_DENIED: { summary: "Sign-in was declined." },
|
|
54
|
+
SIGNIN_TIMED_OUT: { summary: "Sign-in did not finish in time." },
|
|
55
|
+
SIGNIN_CLIENT_REFUSED: { summary: "The sign-in service refused this client." },
|
|
56
|
+
SIGNIN_UNREACHABLE: { summary: "The sign-in service could not be reached." },
|
|
57
|
+
SIGNIN_ANSWER_UNUSABLE: { summary: "The sign-in service answered in a way this version cannot use." },
|
|
58
|
+
SIGNIN_CODE_NEEDS_TTY: { summary: "Sign-in by code needs a terminal." },
|
|
59
|
+
SIGNIN_CODE_UNSUPPORTED: { summary: "The server does not offer sign-in by code." },
|
|
60
|
+
SIGNIN_CODE_REFUSED: { summary: "The service refused to start a sign-in by code." },
|
|
61
|
+
SIGNIN_CODE_INVALID: { summary: "The service no longer recognises the sign-in code." },
|
|
62
|
+
SIGNIN_CODE_DISABLED: { summary: "Sign-in by code is turned off for the account." },
|
|
63
|
+
SIGNIN_RATE_LIMITED: { summary: "Too many sign-in attempts from this network." },
|
|
64
|
+
AUTH_FLAGS_CONFLICT: { summary: "Two `auth` flags that cannot be combined were given." },
|
|
65
|
+
MINT_FAILED: { summary: "No credential was created through the browser." },
|
|
66
|
+
MINT_NOT_A_MEMBER: { summary: "The signed-in account is not a member of the workspace." },
|
|
67
|
+
MINT_RATE_LIMITED: { summary: "Too many credential requests; the service asked to wait." },
|
|
68
|
+
// — the command on PATH —
|
|
69
|
+
PATH_COMMAND_FOREIGN: { summary: "Another program owns the `vibecommit` command." },
|
|
70
|
+
PATH_COMMAND_ABSENT: { summary: "The `vibecommit` command is not on PATH." },
|
|
71
|
+
// — finalize and delivery —
|
|
72
|
+
FINALIZE_NEEDS_TARGET: { summary: "`finalize` was given no session to close." },
|
|
73
|
+
FINALIZE_BAD_SESSION_ID: { summary: "The value given is not a session id." },
|
|
74
|
+
FINALIZE_NO_RECENT_SESSION: { summary: "No session in this repository delivered anything recently." },
|
|
75
|
+
FINALIZE_SEVERAL_RECENT: { summary: "More than one recent session; one must be named." },
|
|
76
|
+
FINALIZE_UNKNOWN_SESSION: { summary: "This repository has no captured session with that id." },
|
|
77
|
+
FINALIZE_TRANSCRIPT_MISSING: { summary: "The transcript for the session could not be found." },
|
|
78
|
+
FINALIZE_STILL_WRITING: { summary: "The session's transcript changed a moment ago." },
|
|
79
|
+
FINALIZE_REFUSED: { summary: "The server declined to close the session on this attempt." },
|
|
80
|
+
DELIVERY_FAILED: { summary: "The session could not be delivered; nothing was closed." },
|
|
81
|
+
INGEST_URL_UNAVAILABLE: { summary: "The ingest address from the environment is unusable." },
|
|
82
|
+
// — why and report —
|
|
83
|
+
RECORD_SERVICE_UNREACHABLE: { summary: "The record service could not be reached." },
|
|
84
|
+
RECORD_SERVICE_ERROR: { summary: "The record service could not answer." },
|
|
85
|
+
RECORD_ANSWER_UNREADABLE: { summary: "The record service answered in a way this version cannot read." },
|
|
86
|
+
WHY_NEEDS_FILE_AND_LINE: { summary: "`why` needs a file and a line number." },
|
|
87
|
+
BLAME_FAILED: { summary: "`git blame` could not attribute the line." },
|
|
88
|
+
REPORT_NEEDS_SINCE: { summary: "`report` needs a start date." },
|
|
89
|
+
REPORT_SINCE_UNREADABLE: { summary: "The start date could not be read." },
|
|
90
|
+
REPORT_REF_UNNAMEABLE: { summary: "`report` needs a ref it can name." },
|
|
91
|
+
REPORT_REACHABILITY_UNKNOWN: { summary: "Whether a captured commit is reachable could not be determined." },
|
|
92
|
+
SHALLOW_CLONE: { summary: "The clone is shallow, so the answer cannot be trusted." },
|
|
93
|
+
CLIENT_TOO_OLD: { summary: "The server sent an answer this version is too old to show." },
|
|
94
|
+
};
|
|
95
|
+
/** What is printed after the code, without the scheme (Alexander, "Code line before the fix"). */
|
|
96
|
+
export const ERROR_DOCS_PATH = "vibecommit.ai/docs/errors";
|
|
97
|
+
/** The anchor on the docs page: `#` plus the code, lowercased, underscores as hyphens. */
|
|
98
|
+
export function errorAnchor(code) {
|
|
99
|
+
return `#${code.toLowerCase().replaceAll("_", "-")}`;
|
|
100
|
+
}
|
|
101
|
+
/** The one muted line under a block's why paragraphs: `NOT_A_REPO · vibecommit.ai/docs/errors#not-a-repo`. */
|
|
102
|
+
export function errorCodeLine(code) {
|
|
103
|
+
return `${code} · ${ERROR_DOCS_PATH}${errorAnchor(code)}`;
|
|
104
|
+
}
|
|
105
|
+
//# sourceMappingURL=error_codes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error_codes.js","sourceRoot":"","sources":["../../src/copy/error_codes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AASH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,kBAAkB;IAClB,cAAc,EAAE,EAAE,OAAO,EAAE,4CAA4C,EAAE;IACzE,YAAY,EAAE,EAAE,OAAO,EAAE,uDAAuD,EAAE;IAClF,eAAe,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE;IAC/E,qBAAqB,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE;IAE5E,qCAAqC;IACrC,UAAU,EAAE,EAAE,OAAO,EAAE,8CAA8C,EAAE;IACvE,aAAa,EAAE,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAC5E,aAAa,EAAE,EAAE,OAAO,EAAE,wCAAwC,EAAE;IACpE,iBAAiB,EAAE,EAAE,OAAO,EAAE,mEAAmE,EAAE;IACnG,iBAAiB,EAAE,EAAE,OAAO,EAAE,uCAAuC,EAAE;IACvE,kBAAkB,EAAE,EAAE,OAAO,EAAE,6DAA6D,EAAE;IAC9F,cAAc,EAAE,EAAE,OAAO,EAAE,qCAAqC,EAAE;IAElE,kBAAkB;IAClB,kBAAkB,EAAE,EAAE,OAAO,EAAE,qDAAqD,EAAE;IACtF,gBAAgB,EAAE,EAAE,OAAO,EAAE,oCAAoC,EAAE;IACnE,qBAAqB,EAAE,EAAE,OAAO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EAAE;IAC3G,aAAa,EAAE,EAAE,OAAO,EAAE,wDAAwD,EAAE;IACpF,cAAc,EAAE,EAAE,OAAO,EAAE,4DAA4D,EAAE;CAC9B,CAAC;AAI9D,kGAAkG;AAClG,MAAM,CAAC,MAAM,eAAe,GAAG,2BAA2B,CAAC;AAE3D,0FAA0F;AAC1F,MAAM,UAAU,WAAW,CAAC,IAAe;IACzC,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,aAAa,CAAC,IAAe;IAC3C,OAAO,GAAG,IAAI,MAAM,eAAe,GAAG,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC;AAC5D,CAAC"}
|
package/dist/copy/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* it describes a commit's evidence, it belongs in `grades.ts` behind the one
|
|
7
7
|
* header renderer.
|
|
8
8
|
*/
|
|
9
|
-
export { HELP, USAGE, STATUS, FINALIZE, CONNECT, SIGNIN, OFF, WHY, REPORT, ABSENCE, type AbsenceStateName, type AbsenceState, type AbsenceField, ERRORS, INTERNAL, CREDENTIAL, AUTH, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, AGENT_HOOKS, COMMIT_HOOK, PATH_CLASH, REJECTED, RETIRE, REPLACE, DEVICE, UPDATE, } from "./strings.js";
|
|
10
|
-
export { relativeAge } from "./time.js";
|
|
9
|
+
export { HELP, USAGE, STATUS, FINALIZE, CONNECT, SIGNIN, OFF, SCAN, BACKFILL, PICKER, WHY, REPORT, ABSENCE, type AbsenceStateName, type AbsenceState, type AbsenceField, ERRORS, INTERNAL, CREDENTIAL, AUTH, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, AGENT_HOOKS, COMMIT_HOOK, PATH_CLASH, REJECTED, RETIRE, REPLACE, DEVICE, UPDATE, } from "./strings.js";
|
|
10
|
+
export { relativeAge, shortDate } from "./time.js";
|
|
11
11
|
export { renderCommitHeader, renderCommitIdentity, gradeFloor, gradeCopyFor, ALL_GRADES, type BlamedCommit, type EdgeGrade, } from "./grades.js";
|
|
12
12
|
export { BLOCKED_PHRASES, findClaimViolations, type Surface, type BlockedPhrase, type ClaimViolation, } from "./claims.js";
|
package/dist/copy/index.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* it describes a commit's evidence, it belongs in `grades.ts` behind the one
|
|
7
7
|
* header renderer.
|
|
8
8
|
*/
|
|
9
|
-
export { HELP, USAGE, STATUS, FINALIZE, CONNECT, SIGNIN, OFF, WHY, REPORT, ABSENCE, ERRORS, INTERNAL, CREDENTIAL, AUTH, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, AGENT_HOOKS, COMMIT_HOOK, PATH_CLASH, REJECTED, RETIRE, REPLACE, DEVICE, UPDATE, } from "./strings.js";
|
|
10
|
-
export { relativeAge } from "./time.js";
|
|
9
|
+
export { HELP, USAGE, STATUS, FINALIZE, CONNECT, SIGNIN, OFF, SCAN, BACKFILL, PICKER, WHY, REPORT, ABSENCE, ERRORS, INTERNAL, CREDENTIAL, AUTH, RUNTIME, SYSTEM_MESSAGE, REDACTION, COMMANDS, URLS, AGENT_HOOKS, COMMIT_HOOK, PATH_CLASH, REJECTED, RETIRE, REPLACE, DEVICE, UPDATE, } from "./strings.js";
|
|
10
|
+
export { relativeAge, shortDate } from "./time.js";
|
|
11
11
|
export { renderCommitHeader, renderCommitIdentity, gradeFloor, gradeCopyFor, ALL_GRADES, } from "./grades.js";
|
|
12
12
|
export { BLOCKED_PHRASES, findClaimViolations, } from "./claims.js";
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
package/dist/copy/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/copy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,GAAG,EACH,GAAG,EACH,MAAM,EACN,OAAO,EAIP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/copy/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,OAAO,EACP,MAAM,EACN,GAAG,EACH,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,GAAG,EACH,MAAM,EACN,OAAO,EAIP,MAAM,EACN,QAAQ,EACR,UAAU,EACV,IAAI,EACJ,OAAO,EACP,cAAc,EACd,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,WAAW,EACX,WAAW,EACX,UAAU,EACV,QAAQ,EACR,MAAM,EACN,OAAO,EACP,MAAM,EACN,MAAM,GACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,EACV,YAAY,EACZ,UAAU,GAGX,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,mBAAmB,GAIpB,MAAM,aAAa,CAAC"}
|