@vibe-commit/capture 0.1.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 (141) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +66 -0
  3. package/dist/agents/claude_code.d.ts +11 -0
  4. package/dist/agents/claude_code.js +162 -0
  5. package/dist/agents/claude_code.js.map +1 -0
  6. package/dist/agents/codex_cli.d.ts +15 -0
  7. package/dist/agents/codex_cli.js +67 -0
  8. package/dist/agents/codex_cli.js.map +1 -0
  9. package/dist/agents/cursor.d.ts +21 -0
  10. package/dist/agents/cursor.js +89 -0
  11. package/dist/agents/cursor.js.map +1 -0
  12. package/dist/agents/registry.d.ts +184 -0
  13. package/dist/agents/registry.js +212 -0
  14. package/dist/agents/registry.js.map +1 -0
  15. package/dist/agents/types.d.ts +279 -0
  16. package/dist/agents/types.js +67 -0
  17. package/dist/agents/types.js.map +1 -0
  18. package/dist/commands/connect.d.ts +36 -0
  19. package/dist/commands/connect.js +499 -0
  20. package/dist/commands/connect.js.map +1 -0
  21. package/dist/commands/context.d.ts +45 -0
  22. package/dist/commands/context.js +14 -0
  23. package/dist/commands/context.js.map +1 -0
  24. package/dist/commands/report.d.ts +105 -0
  25. package/dist/commands/report.js +430 -0
  26. package/dist/commands/report.js.map +1 -0
  27. package/dist/commands/status.d.ts +29 -0
  28. package/dist/commands/status.js +236 -0
  29. package/dist/commands/status.js.map +1 -0
  30. package/dist/commands/why.d.ts +349 -0
  31. package/dist/commands/why.js +937 -0
  32. package/dist/commands/why.js.map +1 -0
  33. package/dist/consent.d.ts +59 -0
  34. package/dist/consent.js +111 -0
  35. package/dist/consent.js.map +1 -0
  36. package/dist/copy/claims.d.ts +79 -0
  37. package/dist/copy/claims.js +343 -0
  38. package/dist/copy/claims.js.map +1 -0
  39. package/dist/copy/grades.d.ts +117 -0
  40. package/dist/copy/grades.js +96 -0
  41. package/dist/copy/grades.js.map +1 -0
  42. package/dist/copy/index.d.ts +12 -0
  43. package/dist/copy/index.js +13 -0
  44. package/dist/copy/index.js.map +1 -0
  45. package/dist/copy/strings.d.ts +1328 -0
  46. package/dist/copy/strings.js +1243 -0
  47. package/dist/copy/strings.js.map +1 -0
  48. package/dist/copy/time.d.ts +27 -0
  49. package/dist/copy/time.js +43 -0
  50. package/dist/copy/time.js.map +1 -0
  51. package/dist/credential.d.ts +211 -0
  52. package/dist/credential.js +298 -0
  53. package/dist/credential.js.map +1 -0
  54. package/dist/exit.d.ts +59 -0
  55. package/dist/exit.js +60 -0
  56. package/dist/exit.js.map +1 -0
  57. package/dist/git.d.ts +299 -0
  58. package/dist/git.js +653 -0
  59. package/dist/git.js.map +1 -0
  60. package/dist/hooks/entry.d.ts +277 -0
  61. package/dist/hooks/entry.js +1092 -0
  62. package/dist/hooks/entry.js.map +1 -0
  63. package/dist/hooks/post_commit.d.ts +59 -0
  64. package/dist/hooks/post_commit.js +160 -0
  65. package/dist/hooks/post_commit.js.map +1 -0
  66. package/dist/hooks/post_rewrite.d.ts +59 -0
  67. package/dist/hooks/post_rewrite.js +161 -0
  68. package/dist/hooks/post_rewrite.js.map +1 -0
  69. package/dist/hooks/session_end.d.ts +101 -0
  70. package/dist/hooks/session_end.js +120 -0
  71. package/dist/hooks/session_end.js.map +1 -0
  72. package/dist/index.d.ts +34 -0
  73. package/dist/index.js +360 -0
  74. package/dist/index.js.map +1 -0
  75. package/dist/install.d.ts +153 -0
  76. package/dist/install.js +284 -0
  77. package/dist/install.js.map +1 -0
  78. package/dist/json.d.ts +100 -0
  79. package/dist/json.js +94 -0
  80. package/dist/json.js.map +1 -0
  81. package/dist/oauth/discovery.d.ts +96 -0
  82. package/dist/oauth/discovery.js +163 -0
  83. package/dist/oauth/discovery.js.map +1 -0
  84. package/dist/oauth/lock.d.ts +100 -0
  85. package/dist/oauth/lock.js +287 -0
  86. package/dist/oauth/lock.js.map +1 -0
  87. package/dist/oauth/loopback.d.ts +85 -0
  88. package/dist/oauth/loopback.js +124 -0
  89. package/dist/oauth/loopback.js.map +1 -0
  90. package/dist/oauth/pkce.d.ts +58 -0
  91. package/dist/oauth/pkce.js +77 -0
  92. package/dist/oauth/pkce.js.map +1 -0
  93. package/dist/oauth/read.d.ts +120 -0
  94. package/dist/oauth/read.js +144 -0
  95. package/dist/oauth/read.js.map +1 -0
  96. package/dist/oauth/session.d.ts +80 -0
  97. package/dist/oauth/session.js +112 -0
  98. package/dist/oauth/session.js.map +1 -0
  99. package/dist/oauth/signin.d.ts +178 -0
  100. package/dist/oauth/signin.js +225 -0
  101. package/dist/oauth/signin.js.map +1 -0
  102. package/dist/oauth/token.d.ts +139 -0
  103. package/dist/oauth/token.js +183 -0
  104. package/dist/oauth/token.js.map +1 -0
  105. package/dist/paths.d.ts +366 -0
  106. package/dist/paths.js +460 -0
  107. package/dist/paths.js.map +1 -0
  108. package/dist/policy.d.ts +195 -0
  109. package/dist/policy.js +244 -0
  110. package/dist/policy.js.map +1 -0
  111. package/dist/post.d.ts +302 -0
  112. package/dist/post.js +384 -0
  113. package/dist/post.js.map +1 -0
  114. package/dist/project.d.ts +99 -0
  115. package/dist/project.js +192 -0
  116. package/dist/project.js.map +1 -0
  117. package/dist/redact.d.ts +175 -0
  118. package/dist/redact.js +700 -0
  119. package/dist/redact.js.map +1 -0
  120. package/dist/runtime.d.ts +30 -0
  121. package/dist/runtime.js +37 -0
  122. package/dist/runtime.js.map +1 -0
  123. package/dist/spawn_budget.d.ts +101 -0
  124. package/dist/spawn_budget.js +124 -0
  125. package/dist/spawn_budget.js.map +1 -0
  126. package/dist/spool.d.ts +390 -0
  127. package/dist/spool.js +556 -0
  128. package/dist/spool.js.map +1 -0
  129. package/dist/state.d.ts +109 -0
  130. package/dist/state.js +217 -0
  131. package/dist/state.js.map +1 -0
  132. package/dist/system_message.d.ts +101 -0
  133. package/dist/system_message.js +141 -0
  134. package/dist/system_message.js.map +1 -0
  135. package/dist/term.d.ts +112 -0
  136. package/dist/term.js +134 -0
  137. package/dist/term.js.map +1 -0
  138. package/dist/version.d.ts +16 -0
  139. package/dist/version.js +17 -0
  140. package/dist/version.js.map +1 -0
  141. package/package.json +50 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"why.js","sourceRoot":"","sources":["../../src/commands/why.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AAEH,OAAO,EACL,OAAO,EACP,QAAQ,EACR,MAAM,EACN,MAAM,EACN,GAAG,EACH,kBAAkB,EAClB,oBAAoB,GAGrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAA8B,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AACvF,OAAO,EAAE,UAAU,EAAuB,MAAM,cAAc,CAAC;AAE/D,0EAA0E;AAC1E,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,MAAM,WAAW,GAAG,CAAC,CAAC;AACtB,uEAAuE;AACvE,MAAM,cAAc,GAAG,EAAE,CAAC;AAE1B,2EAA2E;AAC3E,MAAM,eAAe,GAAG,MAAM,CAAC;AAE/B,wEAAwE;AACxE,MAAM,eAAe,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AACvC,mEAAmE;AACnE,MAAM,MAAM,GAAG,CAAC,CAAC;AAqLjB,MAAM,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AAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;YAC9B,sEAAsE;YACtE,sEAAsE;YACtE,0EAA0E;YAC1E,OAAO,IAAI,CAAC,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * The consent gate — D56 plan §D19, D65 §DR7.
3
+ *
4
+ * **It runs BEFORE anything reads `transcript_path`.** That ordering is the whole
5
+ * control: a gate that runs after the read has already read the thing it was
6
+ * gating. `hooks/entry.ts` calls `isProjectAllowed` before it touches the
7
+ * transcript, and `test/consent.test.ts` asserts the transcript file is never
8
+ * opened on the unconsented path.
9
+ *
10
+ * Three rules, in order of how easily they break (style guide §10.2):
11
+ * 1. **The default is `N`.** A consent prompt whose default is yes is not a
12
+ * consent prompt.
13
+ * 2. **Non-TTY refuses**, with exit 2 (DESIGN.md §13.7). Never proceed.
14
+ * 3. Storage is an allow list keyed on the CONSENT KEY — absence is a NO.
15
+ * Nothing here can fail open: every error path returns "not allowed".
16
+ *
17
+ * ## ⛔ The key is `resolveProjectKeys(dir).consent`, NOT the git toplevel (D184)
18
+ *
19
+ * A toplevel key differs per `git worktree`, and with no wildcards and
20
+ * absence-means-no that meant an agent session inside a worktree captured
21
+ * **nothing** — silently, by design, because an unconsented repo must not nag.
22
+ * The consent key is the canonicalised git COMMON DIR instead: shared by a main
23
+ * clone and every worktree linked to it, and `M2` shows the post-commit install
24
+ * already had that same reach.
25
+ *
26
+ * ⛔ **This file stays key-agnostic — it stores the string it is given.** The
27
+ * canonicalisation that stops `.git` from being every main clone's key lives in
28
+ * `project.ts` where the value is produced, because a key is only as good as the
29
+ * one place that can mint it. What changes here is the CONTRACT: callers pass
30
+ * `.consent`, and the parameter is named for it so a toplevel passed by habit
31
+ * reads wrong at the call site.
32
+ *
33
+ * ⚠ **No migration for allow lists written under the old key**, and that is a
34
+ * decision rather than an omission: pre-launch there are zero users and zero
35
+ * rows (`project_pre_launch_no_data`), so there is nothing to migrate. See
36
+ * `resolveProjectKeys`.
37
+ */
38
+ /** One consented project. `at` is informational; presence is the grant. */
39
+ export interface ProjectGrant {
40
+ readonly at: string;
41
+ }
42
+ export type AllowList = Readonly<Record<string, ProjectGrant>>;
43
+ /**
44
+ * Read the allow list. **Every failure returns an empty list**, which means "no
45
+ * project is consented" — a corrupt or unreadable file must not be able to grant
46
+ * capture on a repo the user never approved.
47
+ */
48
+ export declare function readAllowList(home: string): AllowList;
49
+ /** Absence is a NO. There is no wildcard and no "all projects" key. */
50
+ export declare function isProjectAllowed(home: string, consentKey: string | null): boolean;
51
+ /** Record consent for one project. 0700 on the directory, 0600 on the file. */
52
+ export declare function grantProject(home: string, consentKey: string, now: Date): void;
53
+ /** Revoke consent for one project (`vibecommit off`). */
54
+ export declare function revokeProject(home: string, consentKey: string): boolean;
55
+ /**
56
+ * Interpret an answer to the consent prompt. **Only an explicit yes is a yes.**
57
+ * Empty (the user pressed return) is NO, which is what makes `[y/N]` honest.
58
+ */
59
+ export declare function isAffirmative(answer: string): boolean;
@@ -0,0 +1,111 @@
1
+ /**
2
+ * The consent gate — D56 plan §D19, D65 §DR7.
3
+ *
4
+ * **It runs BEFORE anything reads `transcript_path`.** That ordering is the whole
5
+ * control: a gate that runs after the read has already read the thing it was
6
+ * gating. `hooks/entry.ts` calls `isProjectAllowed` before it touches the
7
+ * transcript, and `test/consent.test.ts` asserts the transcript file is never
8
+ * opened on the unconsented path.
9
+ *
10
+ * Three rules, in order of how easily they break (style guide §10.2):
11
+ * 1. **The default is `N`.** A consent prompt whose default is yes is not a
12
+ * consent prompt.
13
+ * 2. **Non-TTY refuses**, with exit 2 (DESIGN.md §13.7). Never proceed.
14
+ * 3. Storage is an allow list keyed on the CONSENT KEY — absence is a NO.
15
+ * Nothing here can fail open: every error path returns "not allowed".
16
+ *
17
+ * ## ⛔ The key is `resolveProjectKeys(dir).consent`, NOT the git toplevel (D184)
18
+ *
19
+ * A toplevel key differs per `git worktree`, and with no wildcards and
20
+ * absence-means-no that meant an agent session inside a worktree captured
21
+ * **nothing** — silently, by design, because an unconsented repo must not nag.
22
+ * The consent key is the canonicalised git COMMON DIR instead: shared by a main
23
+ * clone and every worktree linked to it, and `M2` shows the post-commit install
24
+ * already had that same reach.
25
+ *
26
+ * ⛔ **This file stays key-agnostic — it stores the string it is given.** The
27
+ * canonicalisation that stops `.git` from being every main clone's key lives in
28
+ * `project.ts` where the value is produced, because a key is only as good as the
29
+ * one place that can mint it. What changes here is the CONTRACT: callers pass
30
+ * `.consent`, and the parameter is named for it so a toplevel passed by habit
31
+ * reads wrong at the call site.
32
+ *
33
+ * ⚠ **No migration for allow lists written under the old key**, and that is a
34
+ * decision rather than an omission: pre-launch there are zero users and zero
35
+ * rows (`project_pre_launch_no_data`), so there is nothing to migrate. See
36
+ * `resolveProjectKeys`.
37
+ */
38
+ import { chmodSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
39
+ import { dirname } from "node:path";
40
+ import { projectsPath, rootDir } from "./paths.js";
41
+ /**
42
+ * Read the allow list. **Every failure returns an empty list**, which means "no
43
+ * project is consented" — a corrupt or unreadable file must not be able to grant
44
+ * capture on a repo the user never approved.
45
+ */
46
+ export function readAllowList(home) {
47
+ let raw;
48
+ try {
49
+ raw = readFileSync(projectsPath(home), "utf8");
50
+ }
51
+ catch {
52
+ return {};
53
+ }
54
+ try {
55
+ const parsed = JSON.parse(raw);
56
+ if (parsed === null || typeof parsed !== "object" || Array.isArray(parsed))
57
+ return {};
58
+ const out = {};
59
+ for (const [key, value] of Object.entries(parsed)) {
60
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
61
+ const at = value.at;
62
+ out[key] = { at: typeof at === "string" ? at : "" };
63
+ }
64
+ }
65
+ return out;
66
+ }
67
+ catch {
68
+ return {};
69
+ }
70
+ }
71
+ /** Absence is a NO. There is no wildcard and no "all projects" key. */
72
+ export function isProjectAllowed(home, consentKey) {
73
+ if (consentKey === null)
74
+ return false;
75
+ return Object.prototype.hasOwnProperty.call(readAllowList(home), consentKey);
76
+ }
77
+ /** Record consent for one project. 0700 on the directory, 0600 on the file. */
78
+ export function grantProject(home, consentKey, now) {
79
+ const path = projectsPath(home);
80
+ mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
81
+ chmodSync(rootDir(home), 0o700);
82
+ const next = {
83
+ ...readAllowList(home),
84
+ [consentKey]: { at: now.toISOString() },
85
+ };
86
+ writeFileSync(path, `${JSON.stringify(next, null, 2)}\n`, { mode: 0o600 });
87
+ // writeFileSync's `mode` is ignored when the file already exists.
88
+ chmodSync(path, 0o600);
89
+ }
90
+ /** Revoke consent for one project (`vibecommit off`). */
91
+ export function revokeProject(home, consentKey) {
92
+ const current = readAllowList(home);
93
+ if (!Object.prototype.hasOwnProperty.call(current, consentKey))
94
+ return false;
95
+ const next = { ...current };
96
+ delete next[consentKey];
97
+ const path = projectsPath(home);
98
+ mkdirSync(dirname(path), { recursive: true, mode: 0o700 });
99
+ writeFileSync(path, `${JSON.stringify(next, null, 2)}\n`, { mode: 0o600 });
100
+ chmodSync(path, 0o600);
101
+ return true;
102
+ }
103
+ /**
104
+ * Interpret an answer to the consent prompt. **Only an explicit yes is a yes.**
105
+ * Empty (the user pressed return) is NO, which is what makes `[y/N]` honest.
106
+ */
107
+ export function isAffirmative(answer) {
108
+ const a = answer.trim().toLowerCase();
109
+ return a === "y" || a === "yes";
110
+ }
111
+ //# sourceMappingURL=consent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"consent.js","sourceRoot":"","sources":["../src/consent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;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,YAAY,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AASnD;;;;GAIG;AACH,MA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,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3E,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACvB,OAAO,IAAI,CAAC;AACd,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,79 @@
1
+ /**
2
+ * Machine-readable claims block — CR-090 precondition (2).
3
+ *
4
+ * The lintable unit is a PHRASE scoped to a SURFACE, never a bare word.
5
+ * `docs/claims-register.md` §"Lintable unit" is explicit about why: "verifiable"
6
+ * is SAFE on `/app/audit/export` and BLOCKED everywhere else — one spelling, two
7
+ * statuses, differing only by surface. A word-level gate fires on approved copy
8
+ * on day one and gets disabled by the third false positive.
9
+ *
10
+ * `code/docs/claims-register.md` is the SOURCE. This file is its executable
11
+ * projection for the surfaces this package owns. When the register changes, this
12
+ * changes — never the other way round.
13
+ *
14
+ * HONESTY OF THE GATE: a pass means "no known banned phrase found". It does NOT
15
+ * mean "claims clean". The register records three misses in one file in one day
16
+ * that a four-pattern regex walked straight past, because a claim is a
17
+ * proposition and propositions have no fixed vocabulary.
18
+ *
19
+ * MATCH SEMANTICS (D113 §2, register §"Match semantics"): a phrase matches at a
20
+ * LEADING WORD BOUNDARY and NOT a trailing one — `\b` before, nothing after.
21
+ *
22
+ * - The LEADING boundary is what makes `proves` registerable at all. Under a
23
+ * bare substring rule it fires on the shipped, D81-approved disclosure
24
+ * "...once an owner approves." (`strings.ts` `CONNECT.pendingBuffered`) —
25
+ * measured, not argued: adding the row to a `.includes()` matcher turns
26
+ * `copy-claims.test.ts`'s "no shipped copy contains a phrase blocked on its
27
+ * surface" RED against correct copy. A boundary kills that by construction;
28
+ * an EXEMPT row would have to be re-added every time the sentence is
29
+ * reworded.
30
+ * - There is deliberately NO TRAILING boundary. The register depends on ROOTS:
31
+ * `attest` must go on matching `attested` and `attestation`, and the bare
32
+ * `signed receipt` must go on matching `signed receipts`. Anchoring both
33
+ * ends would silently narrow those rows to close one.
34
+ *
35
+ * The rule is strictly NARROWING against the substring rule it replaced, so it
36
+ * can only ever remove matches. WHAT FALSIFIES IT: `findClaimViolations`
37
+ * reporting a hit whose match begins mid-word. The executable statement of that
38
+ * is `copy-claims.test.ts` — the `approves` and `cannot aim` negatives, and the
39
+ * root-matching positives for `attest*` and `signed receipt(s)`. If the matcher
40
+ * ever reverts to `.includes()`, those negatives go RED; if the leading `\b`
41
+ * grows a trailing one, the root positives go RED. Neither can rot silently.
42
+ */
43
+ /** Surfaces this package renders copy on. */
44
+ export type Surface = "why" | "report" | "help" | "status" | "connect" | "off";
45
+ export interface BlockedPhrase {
46
+ /**
47
+ * Matched case-insensitively at a LEADING WORD BOUNDARY of rendered copy —
48
+ * `\b` before the phrase, nothing after, so roots match their inflections
49
+ * (`attest` → `attestation`) but no phrase matches mid-word (`proves` does
50
+ * NOT fire on `approves`). See MATCH SEMANTICS in the file header for the
51
+ * full rule and what falsifies it.
52
+ */
53
+ readonly phrase: string;
54
+ /** Surfaces the phrase is blocked on. */
55
+ readonly surfaces: readonly Surface[];
56
+ /** Why — traceable to the register row. */
57
+ readonly reason: string;
58
+ /** Whether the block can ever lift, and on what. */
59
+ readonly gate: string;
60
+ }
61
+ export declare const BLOCKED_PHRASES: readonly BlockedPhrase[];
62
+ export interface ClaimViolation {
63
+ readonly phrase: string;
64
+ readonly surface: Surface;
65
+ readonly reason: string;
66
+ readonly gate: string;
67
+ }
68
+ /**
69
+ * Scan one rendered string for phrases blocked on its surface.
70
+ *
71
+ * Matching is leading-word-boundary, case-insensitive, no trailing boundary —
72
+ * see MATCH SEMANTICS in the file header for why each half of that is load-
73
+ * bearing.
74
+ *
75
+ * A clean result means "no known banned phrase found" — never "claims clean".
76
+ * Report it that way; anything stronger reports the strength of the wordlist
77
+ * rather than the state of the copy.
78
+ */
79
+ export declare function findClaimViolations(text: string, surface: Surface): ClaimViolation[];
@@ -0,0 +1,343 @@
1
+ /**
2
+ * Machine-readable claims block — CR-090 precondition (2).
3
+ *
4
+ * The lintable unit is a PHRASE scoped to a SURFACE, never a bare word.
5
+ * `docs/claims-register.md` §"Lintable unit" is explicit about why: "verifiable"
6
+ * is SAFE on `/app/audit/export` and BLOCKED everywhere else — one spelling, two
7
+ * statuses, differing only by surface. A word-level gate fires on approved copy
8
+ * on day one and gets disabled by the third false positive.
9
+ *
10
+ * `code/docs/claims-register.md` is the SOURCE. This file is its executable
11
+ * projection for the surfaces this package owns. When the register changes, this
12
+ * changes — never the other way round.
13
+ *
14
+ * HONESTY OF THE GATE: a pass means "no known banned phrase found". It does NOT
15
+ * mean "claims clean". The register records three misses in one file in one day
16
+ * that a four-pattern regex walked straight past, because a claim is a
17
+ * proposition and propositions have no fixed vocabulary.
18
+ *
19
+ * MATCH SEMANTICS (D113 §2, register §"Match semantics"): a phrase matches at a
20
+ * LEADING WORD BOUNDARY and NOT a trailing one — `\b` before, nothing after.
21
+ *
22
+ * - The LEADING boundary is what makes `proves` registerable at all. Under a
23
+ * bare substring rule it fires on the shipped, D81-approved disclosure
24
+ * "...once an owner approves." (`strings.ts` `CONNECT.pendingBuffered`) —
25
+ * measured, not argued: adding the row to a `.includes()` matcher turns
26
+ * `copy-claims.test.ts`'s "no shipped copy contains a phrase blocked on its
27
+ * surface" RED against correct copy. A boundary kills that by construction;
28
+ * an EXEMPT row would have to be re-added every time the sentence is
29
+ * reworded.
30
+ * - There is deliberately NO TRAILING boundary. The register depends on ROOTS:
31
+ * `attest` must go on matching `attested` and `attestation`, and the bare
32
+ * `signed receipt` must go on matching `signed receipts`. Anchoring both
33
+ * ends would silently narrow those rows to close one.
34
+ *
35
+ * The rule is strictly NARROWING against the substring rule it replaced, so it
36
+ * can only ever remove matches. WHAT FALSIFIES IT: `findClaimViolations`
37
+ * reporting a hit whose match begins mid-word. The executable statement of that
38
+ * is `copy-claims.test.ts` — the `approves` and `cannot aim` negatives, and the
39
+ * root-matching positives for `attest*` and `signed receipt(s)`. If the matcher
40
+ * ever reverts to `.includes()`, those negatives go RED; if the leading `\b`
41
+ * grows a trailing one, the root positives go RED. Neither can rot silently.
42
+ */
43
+ export const BLOCKED_PHRASES = [
44
+ // --- `why`-as-assertion. Never lifts: file-scoped by design, not by maturity.
45
+ {
46
+ phrase: "why this line exists",
47
+ surfaces: ["why", "help", "report"],
48
+ reason: "Line-level assertion; commit_file_attribution has no line ranges.",
49
+ gate: "NEVER LIFTS — file-scoped by design (D61 §PS6).",
50
+ },
51
+ {
52
+ phrase: "why the agent wrote this",
53
+ surfaces: ["why", "help", "report"],
54
+ reason: "Line-level assertion plus actor attribution.",
55
+ gate: "NEVER LIFTS — file-scoped by design (D61 §PS6).",
56
+ },
57
+ {
58
+ phrase: "the reasoning behind this line",
59
+ surfaces: ["why", "help", "report"],
60
+ reason: "Line-level assertion.",
61
+ gate: "NEVER LIFTS — file-scoped by design (D61 §PS6).",
62
+ },
63
+ {
64
+ phrase: "see what prompt produced a given line",
65
+ surfaces: ["why", "help", "report"],
66
+ reason: "Register row added 2026-08-08: the concept was already blocked and a four-pattern regex still walked past it.",
67
+ gate: "NEVER LIFTS.",
68
+ },
69
+ // --- Attestation-witness-gated vocabulary. BLOCKED on every surface here;
70
+ // `verifiable` is SAFE only on /app/audit/export, which this package does
71
+ // not render.
72
+ {
73
+ phrase: "verifiable",
74
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
75
+ reason: "Not independently verifiable to a third party today.",
76
+ gate: "attestation witness GA",
77
+ },
78
+ {
79
+ phrase: "tamper-proof",
80
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
81
+ reason: "Only tamper-EVIDENT today.",
82
+ gate: "attestation witness GA",
83
+ },
84
+ {
85
+ phrase: "immutable",
86
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
87
+ reason: "Immutability is procedural — service_role BYPASSRLS can modify.",
88
+ gate: "Use 'append-only'.",
89
+ },
90
+ {
91
+ phrase: "provable",
92
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
93
+ reason: "Caught 2026-08-08 only because a human read the prose — matches no wordlist built from verifiab|attest|immutable|tamper-proof.",
94
+ gate: "attestation witness GA",
95
+ },
96
+ {
97
+ phrase: "attest",
98
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
99
+ reason: "No attestation service shipped.",
100
+ gate: "attestation witness GA",
101
+ },
102
+ // --- Durability. Blocked until the metric exists AND renders with its
103
+ // coverage % and grade mix. See PROVISIONING.md §Gates.
104
+ {
105
+ phrase: "durable",
106
+ surfaces: ["report", "help"],
107
+ reason: "The E2 durability metric is undefined.",
108
+ gate: "metric definition + coverage % + grade mix, all rendering together",
109
+ },
110
+ {
111
+ phrase: "durability",
112
+ surfaces: ["report", "help"],
113
+ reason: "The E2 durability metric is undefined.",
114
+ gate: "metric definition + coverage % + grade mix, all rendering together",
115
+ },
116
+ {
117
+ phrase: "survives",
118
+ surfaces: ["report", "help"],
119
+ reason: "The E2 durability metric is undefined.",
120
+ gate: "metric definition + coverage % + grade mix, all rendering together",
121
+ },
122
+ // --- Permanently blocked: absence of an edge is not absence of an agent.
123
+ {
124
+ phrase: "human-written",
125
+ surfaces: ["why", "report", "help", "status"],
126
+ reason: "An uncaptured session leaves no edge — the sharpest inversion risk in the set.",
127
+ gate: "BLOCKED PERMANENTLY.",
128
+ },
129
+ {
130
+ phrase: "not ai",
131
+ surfaces: ["why", "report", "help", "status"],
132
+ reason: "An uncaptured session leaves no edge.",
133
+ gate: "BLOCKED PERMANENTLY.",
134
+ },
135
+ {
136
+ phrase: "no ai involvement",
137
+ surfaces: ["why", "report", "help", "status"],
138
+ reason: "An uncaptured session leaves no edge.",
139
+ gate: "BLOCKED PERMANENTLY.",
140
+ },
141
+ // --- No human baseline exists in the schema, so no comparison can be made.
142
+ {
143
+ phrase: "ai code quality",
144
+ surfaces: ["report", "help"],
145
+ reason: "Nothing in the schema records a human-authored baseline.",
146
+ gate: "BLOCKED — needs a baseline that does not exist and is not planned.",
147
+ },
148
+ {
149
+ phrase: "wasted spend",
150
+ surfaces: ["report", "help"],
151
+ reason: "Nothing in the schema records a human-authored baseline.",
152
+ gate: "BLOCKED — needs a baseline that does not exist and is not planned.",
153
+ },
154
+ {
155
+ phrase: "signed receipts",
156
+ surfaces: ["why", "report", "help", "connect"],
157
+ reason: "D51 dropped submission_receipts; the export collapsed to a pure hash-chain bundle.",
158
+ gate: "Never lifts unless something is actually signed.",
159
+ },
160
+ // --- CR-132d (D113 §4, D123 §1): the rows the register carries and this
161
+ // projection did not. Derived by EVALUATING this array against the
162
+ // register's machine-readable block under the block's own leading-`\b`
163
+ // rule — never by comparing the two lists by eye, which is how the
164
+ // singular/plural `signed receipt` gap survived an author pass (D101:
165
+ // write the predicate, never the tally).
166
+ //
167
+ // ⚠ TWO OF THESE PREFIX-SUPERSEDE ROWS ABOVE, and that is the point of
168
+ // omitting the trailing boundary. `signed receipt` (singular) matches
169
+ // inside `signed receipts`, and bare `prompt produced` matches inside
170
+ // `see what prompt produced a given line`. The long forms are KEPT, not
171
+ // deleted: their `reason` fields carry register history the short rows
172
+ // cannot ("D51 dropped submission_receipts"; the four-pattern-regex
173
+ // miss), and this task is additive-only so a reviewer can see that no
174
+ // live protection was traded away. They are now redundant, not wrong.
175
+ {
176
+ phrase: "proves",
177
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
178
+ reason: "Register: same proposition as `provable`, no banned root — the form a rewrite reaches for.",
179
+ gate: "attestation witness GA",
180
+ },
181
+ {
182
+ phrase: "signed receipt",
183
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
184
+ reason: "Register: claims a component DELETED by D51. Singular, so it also binds the plural above.",
185
+ gate: "Never lifts unless something is actually signed.",
186
+ },
187
+ {
188
+ phrase: "signed bundle",
189
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
190
+ reason: "Register: same as `signed receipt` — the export is a hash-chain bundle, unsigned.",
191
+ gate: "Never lifts unless something is actually signed.",
192
+ },
193
+ {
194
+ phrase: "prompt produced",
195
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
196
+ reason: "Register: concept blocked, no banned word appears. Bare form — a reworded paraphrase walks past the long row above (D113 §4).",
197
+ gate: "NEVER LIFTS — file-scoped by design (D61 §PS6).",
198
+ },
199
+ {
200
+ phrase: "source-available",
201
+ surfaces: ["why", "report", "help", "status", "connect", "off"],
202
+ reason: "Register: licensing REVERSED by D60/D1 — the phrase is retired and was never a description of us.",
203
+ gate: "NEVER LIFTS — the term is retired, not gated.",
204
+ },
205
+ // --- ⛔ THE `observed` FAMILY. THE GATE BELOW HAS FIRED AND THE ROWS DO NOT
206
+ // LIFT. Register changelog 2026-08-21 (W20, D183/D184/D185).
207
+ //
208
+ // These three carried *"the producer is ABSENT, not immature"* and *"None
209
+ // exists (D111 §2)"* until W20, and BOTH became false when `CR-170` shipped
210
+ // `observe()` in `src/hooks/post_commit.ts` — false metadata sitting on copy
211
+ // that ships. This is the correction, and it is a correction of the REASON,
212
+ // never of the verdict.
213
+ //
214
+ // ⛔ THE GROUND CHANGED SPECIES; IT DID NOT GO AWAY. It was a
215
+ // signed-receipts claim — copy describing a component that is not there —
216
+ // and it is now an ordinary OVERCLAIM: a real component, described past its
217
+ // reach. The producer observes THE COMMIT EVENT and never THE AUTHORSHIP;
218
+ // these three are scoped to `why`, the one surface that answers who wrote a
219
+ // line, so on THAT surface they still assert what no mechanism produces.
220
+ //
221
+ // ⛔ A READER WHO FINDS THE GATE FIRED AND LIFTS THESE HAS READ THE GATE AND
222
+ // NOT THE CLAIM. The register says so in those words. `env_session_id` — the
223
+ // strongest rung the ladder can reach — is SAFE as command provenance and
224
+ // STILL BLOCKED as authorship, because `git commit -a` commits a human's
225
+ // working-tree edits identically.
226
+ //
227
+ // ⚠ `phrase` and `surfaces` are DELIBERATELY UNCHANGED. `test/copy-claims.test.ts:318`
228
+ // pins this projection against a hand-written list, and the register's block
229
+ // is hand-synced across repos — a phrase edit here breaks a projection that
230
+ // has no compiler.
231
+ {
232
+ phrase: "seen during the session",
233
+ surfaces: ["why"],
234
+ reason: "Register: the post-commit hook sees the COMMIT EVENT, never who wrote the line; on `why` this claims the second.",
235
+ gate: "A mechanism that establishes AUTHORSHIP. ⛔ NOT the producer gate — that one FIRED (CR-170) and these rows stayed.",
236
+ },
237
+ {
238
+ phrase: "we observed",
239
+ surfaces: ["why"],
240
+ reason: "Register: the same claim in the first person; the form a rewrite reaches for.",
241
+ gate: "A mechanism that establishes AUTHORSHIP. ⛔ NOT the producer gate — that one FIRED (CR-170) and these rows stayed.",
242
+ },
243
+ {
244
+ phrase: "watched",
245
+ surfaces: ["why"],
246
+ reason: "Register: same proposition, no registered root — and `watched` adds a continuity nothing does.",
247
+ gate: "A mechanism that establishes AUTHORSHIP. ⛔ NOT the producer gate — that one FIRED (CR-170) and these rows stayed.",
248
+ },
249
+ {
250
+ phrase: "not agent-authored",
251
+ surfaces: ["why", "report", "help", "status"],
252
+ reason: "Register: the 4th member of the absence-inversion row — an uncaptured session leaves no edge. Prose-only in BOTH directions until now.",
253
+ gate: "BLOCKED PERMANENTLY.",
254
+ },
255
+ // --- D64: this repo is PRIVATE with MIT intact. The licence is the invariant;
256
+ // the visibility is not. Register row 2026-08-09. Same failure mode as
257
+ // "signed receipts" — copy describing a mechanism that does not exist,
258
+ // not an overclaim about strength. `CR-111` owns the replacement.
259
+ {
260
+ phrase: "open source",
261
+ surfaces: ["connect", "help", "status", "off", "why", "report"],
262
+ reason: "Vibe-Commit/vibecommit-capture is PRIVATE (D64). Nobody outside the org can read it.",
263
+ gate: "D64 flipping the repo public.",
264
+ },
265
+ {
266
+ phrase: "open-source",
267
+ surfaces: ["connect", "help", "status", "off", "why", "report"],
268
+ reason: "Vibe-Commit/vibecommit-capture is PRIVATE (D64). Nobody outside the org can read it.",
269
+ gate: "D64 flipping the repo public.",
270
+ },
271
+ {
272
+ phrase: "read the source",
273
+ surfaces: ["connect", "help", "status", "off", "why", "report"],
274
+ reason: "The trust argument D64 falsified. The approved replacement links the public claude-plugin bundle — 'inspect the build' is WEAKER and may not be dressed up as this.",
275
+ gate: "D64 flipping the repo public.",
276
+ },
277
+ {
278
+ phrase: "read the client",
279
+ surfaces: ["connect", "help", "status", "off", "why", "report"],
280
+ reason: "Same row as 'read the source' — the source is not readable outside the org.",
281
+ gate: "D64 flipping the repo public.",
282
+ },
283
+ // --- D65 §DR7: no reassurance adjectives on the consent screen. Not a claims
284
+ // overclaim in the usual sense — the disclosure's job is to be accurate
285
+ // about what leaves the machine, and a reassurance sitting next to an
286
+ // accurate list is what makes the list read as marketing.
287
+ //
288
+ // D65 §DR7 lists FIVE adjectives; four are registered here. `private` is
289
+ // deliberately NOT, because the approved disclosure says "File paths
290
+ // include private-repo paths" — a substring gate on `private` fires on
291
+ // approved copy on day one, which is the exact failure the register's
292
+ // §Lintable-unit section says kills a gate by the third false positive.
293
+ // `private`-as-reassurance stays a human review item.
294
+ ...["secure", "safe", "protected", "encrypted"].map((word) => ({
295
+ phrase: word,
296
+ surfaces: ["connect"],
297
+ reason: "Reassurance adjective on the consent screen (D65 §DR7).",
298
+ gate: "NEVER LIFTS — the disclosure states what is uploaded; it does not reassure.",
299
+ })),
300
+ ];
301
+ /** Escape a phrase for literal use in a RegExp — rows carry `-` today and could carry `.` or `+`. */
302
+ function escapeForRegExp(literal) {
303
+ return literal.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
304
+ }
305
+ const MATCHERS = new Map();
306
+ /**
307
+ * The compiled form of one row: `\b` before the phrase, nothing after.
308
+ *
309
+ * ⚠ NO `g` FLAG, deliberately. A global RegExp carries `lastIndex` across
310
+ * `.test()` calls, so a cached one would alternate true/false on the same
311
+ * input — a gate that fires on every other string, which reads as flake.
312
+ */
313
+ function matcherFor(phrase) {
314
+ let matcher = MATCHERS.get(phrase);
315
+ if (matcher === undefined) {
316
+ matcher = new RegExp(`\\b${escapeForRegExp(phrase)}`, "i");
317
+ MATCHERS.set(phrase, matcher);
318
+ }
319
+ return matcher;
320
+ }
321
+ /**
322
+ * Scan one rendered string for phrases blocked on its surface.
323
+ *
324
+ * Matching is leading-word-boundary, case-insensitive, no trailing boundary —
325
+ * see MATCH SEMANTICS in the file header for why each half of that is load-
326
+ * bearing.
327
+ *
328
+ * A clean result means "no known banned phrase found" — never "claims clean".
329
+ * Report it that way; anything stronger reports the strength of the wordlist
330
+ * rather than the state of the copy.
331
+ */
332
+ export function findClaimViolations(text, surface) {
333
+ const out = [];
334
+ for (const entry of BLOCKED_PHRASES) {
335
+ if (!entry.surfaces.includes(surface))
336
+ continue;
337
+ if (matcherFor(entry.phrase).test(text)) {
338
+ out.push({ phrase: entry.phrase, surface, reason: entry.reason, gate: entry.gate });
339
+ }
340
+ }
341
+ return out;
342
+ }
343
+ //# sourceMappingURL=claims.js.map