@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.
Files changed (143) hide show
  1. package/README.md +80 -5
  2. package/dist/agent_hooks.d.ts +8 -0
  3. package/dist/agent_hooks.js +31 -1
  4. package/dist/agent_hooks.js.map +1 -1
  5. package/dist/agents/claude_code.d.ts +34 -0
  6. package/dist/agents/claude_code.js +141 -8
  7. package/dist/agents/claude_code.js.map +1 -1
  8. package/dist/agents/codex_cli.d.ts +13 -0
  9. package/dist/agents/codex_cli.js +241 -2
  10. package/dist/agents/codex_cli.js.map +1 -1
  11. package/dist/agents/cursor.d.ts +34 -0
  12. package/dist/agents/cursor.js +115 -1
  13. package/dist/agents/cursor.js.map +1 -1
  14. package/dist/agents/session_listing.d.ts +29 -0
  15. package/dist/agents/session_listing.js +49 -0
  16. package/dist/agents/session_listing.js.map +1 -0
  17. package/dist/agents/types.d.ts +118 -8
  18. package/dist/agents/types.js +17 -3
  19. package/dist/agents/types.js.map +1 -1
  20. package/dist/commands/approval_pending.d.ts +9 -0
  21. package/dist/commands/approval_pending.js +23 -0
  22. package/dist/commands/approval_pending.js.map +1 -0
  23. package/dist/commands/auth.js +31 -11
  24. package/dist/commands/auth.js.map +1 -1
  25. package/dist/commands/backfill.d.ts +160 -0
  26. package/dist/commands/backfill.js +748 -0
  27. package/dist/commands/backfill.js.map +1 -0
  28. package/dist/commands/browser_credential.d.ts +2 -0
  29. package/dist/commands/browser_credential.js +31 -14
  30. package/dist/commands/browser_credential.js.map +1 -1
  31. package/dist/commands/connect.d.ts +137 -0
  32. package/dist/commands/connect.js +203 -109
  33. package/dist/commands/connect.js.map +1 -1
  34. package/dist/commands/connect_picker.d.ts +27 -0
  35. package/dist/commands/connect_picker.js +415 -0
  36. package/dist/commands/connect_picker.js.map +1 -0
  37. package/dist/commands/context.d.ts +16 -0
  38. package/dist/commands/context.js +27 -0
  39. package/dist/commands/context.js.map +1 -1
  40. package/dist/commands/credential_problem.d.ts +15 -4
  41. package/dist/commands/credential_problem.js +29 -22
  42. package/dist/commands/credential_problem.js.map +1 -1
  43. package/dist/commands/device_credential.d.ts +2 -0
  44. package/dist/commands/device_credential.js +16 -14
  45. package/dist/commands/device_credential.js.map +1 -1
  46. package/dist/commands/finalize.d.ts +95 -0
  47. package/dist/commands/finalize.js +249 -74
  48. package/dist/commands/finalize.js.map +1 -1
  49. package/dist/commands/finish_mint.d.ts +2 -6
  50. package/dist/commands/finish_mint.js +10 -2
  51. package/dist/commands/finish_mint.js.map +1 -1
  52. package/dist/commands/report.js +38 -30
  53. package/dist/commands/report.js.map +1 -1
  54. package/dist/commands/scan.d.ts +162 -0
  55. package/dist/commands/scan.js +507 -0
  56. package/dist/commands/scan.js.map +1 -0
  57. package/dist/commands/status.js +119 -22
  58. package/dist/commands/status.js.map +1 -1
  59. package/dist/commands/status_hooks.d.ts +14 -0
  60. package/dist/commands/status_hooks.js +81 -0
  61. package/dist/commands/status_hooks.js.map +1 -0
  62. package/dist/commands/status_machine.d.ts +18 -0
  63. package/dist/commands/status_machine.js +149 -0
  64. package/dist/commands/status_machine.js.map +1 -0
  65. package/dist/commands/why.js +44 -31
  66. package/dist/commands/why.js.map +1 -1
  67. package/dist/consent.d.ts +111 -0
  68. package/dist/consent.js +203 -1
  69. package/dist/consent.js.map +1 -1
  70. package/dist/copy/error_codes.d.ts +222 -0
  71. package/dist/copy/error_codes.js +105 -0
  72. package/dist/copy/error_codes.js.map +1 -0
  73. package/dist/copy/index.d.ts +2 -2
  74. package/dist/copy/index.js +2 -2
  75. package/dist/copy/index.js.map +1 -1
  76. package/dist/copy/strings.d.ts +497 -29
  77. package/dist/copy/strings.js +601 -35
  78. package/dist/copy/strings.js.map +1 -1
  79. package/dist/copy/time.d.ts +11 -0
  80. package/dist/copy/time.js +18 -0
  81. package/dist/copy/time.js.map +1 -1
  82. package/dist/credential.d.ts +5 -1
  83. package/dist/credential.js +2 -2
  84. package/dist/credential.js.map +1 -1
  85. package/dist/git.d.ts +43 -0
  86. package/dist/git.js +95 -0
  87. package/dist/git.js.map +1 -1
  88. package/dist/hooks/entry.d.ts +18 -1
  89. package/dist/hooks/entry.js +110 -13
  90. package/dist/hooks/entry.js.map +1 -1
  91. package/dist/hooks/post_commit.js +3 -3
  92. package/dist/hooks/post_commit.js.map +1 -1
  93. package/dist/hooks/post_rewrite.js +6 -4
  94. package/dist/hooks/post_rewrite.js.map +1 -1
  95. package/dist/hooks/session_start.d.ts +93 -0
  96. package/dist/hooks/session_start.js +199 -0
  97. package/dist/hooks/session_start.js.map +1 -0
  98. package/dist/index.d.ts +1 -1
  99. package/dist/index.js +56 -8
  100. package/dist/index.js.map +1 -1
  101. package/dist/install.d.ts +57 -0
  102. package/dist/install.js +54 -20
  103. package/dist/install.js.map +1 -1
  104. package/dist/json.d.ts +32 -9
  105. package/dist/json.js +35 -8
  106. package/dist/json.js.map +1 -1
  107. package/dist/machine_state.d.ts +52 -0
  108. package/dist/machine_state.js +63 -0
  109. package/dist/machine_state.js.map +1 -0
  110. package/dist/oauth/session.d.ts +1 -0
  111. package/dist/org_pending.d.ts +52 -0
  112. package/dist/org_pending.js +109 -0
  113. package/dist/org_pending.js.map +1 -0
  114. package/dist/paths.d.ts +50 -0
  115. package/dist/paths.js +64 -0
  116. package/dist/paths.js.map +1 -1
  117. package/dist/picker.d.ts +180 -0
  118. package/dist/picker.js +477 -0
  119. package/dist/picker.js.map +1 -0
  120. package/dist/picker_checklist.d.ts +125 -0
  121. package/dist/picker_checklist.js +375 -0
  122. package/dist/picker_checklist.js.map +1 -0
  123. package/dist/policy.d.ts +54 -0
  124. package/dist/policy.js +47 -0
  125. package/dist/policy.js.map +1 -1
  126. package/dist/post.d.ts +50 -16
  127. package/dist/post.js +220 -16
  128. package/dist/post.js.map +1 -1
  129. package/dist/state.d.ts +6 -0
  130. package/dist/state.js +38 -1
  131. package/dist/state.js.map +1 -1
  132. package/dist/system_message.d.ts +8 -1
  133. package/dist/system_message.js +19 -1
  134. package/dist/system_message.js.map +1 -1
  135. package/dist/term.d.ts +28 -2
  136. package/dist/term.js +23 -2
  137. package/dist/term.js.map +1 -1
  138. package/dist/verb_help.d.ts +13 -0
  139. package/dist/verb_help.js +40 -0
  140. package/dist/verb_help.js.map +1 -0
  141. package/dist/version.d.ts +1 -1
  142. package/dist/version.js +1 -1
  143. package/package.json +5 -9
package/dist/json.d.ts CHANGED
@@ -49,20 +49,21 @@
49
49
  *
50
50
  * ## What is NOT here, deliberately
51
51
  *
52
- * **A failure taxonomy.** A verb that could not do its job renders §13.6's
53
- * what/why/fix block to **stderr** and writes **nothing** to stdout, exactly as
54
- * it does without the flag — clause 1 holds trivially, the exit code already
55
- * carries the branch a wrapper needs (§13.7 gives five distinct codes), and
56
- * minting a parallel error vocabulary would be a contract nobody asked for.
57
- * **Absence is not a failure** and DOES emit a document: `why` on a commit with
58
- * no edge and `report` on an empty window are ANSWERS (exit 4 says so), and a
59
- * machine surface that went silent on them would lose the state that matters.
52
+ * **A failure is not an answer to the question asked** — but since 0.7.0 (PR 7) it is no longer silent either. A verb that
53
+ * could not do its job writes ONE failure document (`renderJsonError`: `outcome: "error"`, the stable `code`, the
54
+ * what/why and the fix) to stdout and NOTHING to stderr, with the same exit code as the text block. Before PR 7 it
55
+ * rendered the block to stderr and left stdout empty, and the exit code alone could not tell a wrapper which failure;
56
+ * the stable codes (`src/copy/error_codes.ts`) can, so the parallel vocabulary the older text declined to mint is now
57
+ * the same one. **Absence is not a failure** and DOES emit an ordinary document: `why` on a commit with
58
+ * no edge and `report` on an empty window are ANSWERS (exit 4 says so), and a machine surface that went silent on them
59
+ * would lose the state that matters.
60
60
  *
61
61
  * ⚠ §13.3 does not settle that split in either direction. It is reported as an
62
62
  * open question rather than smoothed over — `DESIGN.md` is orchestrator-owned
63
63
  * (D66 §3) and this module's reading of it is a builder's, not a ruling.
64
64
  */
65
65
  import type { Writable } from "node:stream";
66
+ import type { ErrorBlock } from "./term.js";
66
67
  /**
67
68
  * The document format version, and it is the FIRST key so a wrapper can branch
68
69
  * before it parses anything else. Bumped only when a field changes meaning —
@@ -70,7 +71,7 @@ import type { Writable } from "node:stream";
70
71
  */
71
72
  export declare const JSON_SCHEMA_VERSION = 1;
72
73
  /** The read verbs. `connect` is an install moment and `off` is a mutation. */
73
- export type JsonVerb = "status" | "why" | "report";
74
+ export type JsonVerb = "status" | "why" | "report" | "scan";
74
75
  /**
75
76
  * The document, minus the two keys every document carries.
76
77
  *
@@ -91,6 +92,28 @@ export type JsonBody = Readonly<Record<string, unknown>>;
91
92
  * copy; `JSON.parse` ignores trailing whitespace, so it cannot break a consumer.
92
93
  */
93
94
  export declare function renderJson(verb: JsonVerb, outcome: string, body: JsonBody): string;
95
+ /**
96
+ * A failure as a document — 0.7.0 PR 7. Under `--json` a verb that could not do its job writes ONE document to stdout
97
+ * and nothing to stderr, with the verb's own exit code:
98
+ *
99
+ * ```
100
+ * { "schema": 1, "verb": "status", "outcome": "error",
101
+ * "error": { "code": "NOT_CONNECTED", "what": "…", "why": ["…"],
102
+ * "fix": { "label": "…", "commands": ["…"] } | null } }
103
+ * ```
104
+ *
105
+ * This REPLACES the 0.6.x contract that a `--json` failure leaves stdout empty (the text above said "a failure is not
106
+ * an answer"; the exit code alone could not tell a wrapper WHICH failure, and the codes can). `fix` is `null` only when
107
+ * the block has no fix label at all (a label with nothing to type is `{ label, commands: [] }`), and its commands are the SAME strings the text block
108
+ * prints, already routed through the install channel.
109
+ */
110
+ export declare function renderJsonError(verb: JsonVerb, block: Extract<ErrorBlock, {
111
+ kind: "bad";
112
+ }>): string;
113
+ /** Write the failure document to stdout and nothing else (the caller writes nothing to stderr). */
114
+ export declare function emitJsonError(stdout: Writable, verb: JsonVerb, block: Extract<ErrorBlock, {
115
+ kind: "bad";
116
+ }>): void;
94
117
  /**
95
118
  * Write one document to stdout, and nothing else.
96
119
  *
package/dist/json.js CHANGED
@@ -49,14 +49,14 @@
49
49
  *
50
50
  * ## What is NOT here, deliberately
51
51
  *
52
- * **A failure taxonomy.** A verb that could not do its job renders §13.6's
53
- * what/why/fix block to **stderr** and writes **nothing** to stdout, exactly as
54
- * it does without the flag — clause 1 holds trivially, the exit code already
55
- * carries the branch a wrapper needs (§13.7 gives five distinct codes), and
56
- * minting a parallel error vocabulary would be a contract nobody asked for.
57
- * **Absence is not a failure** and DOES emit a document: `why` on a commit with
58
- * no edge and `report` on an empty window are ANSWERS (exit 4 says so), and a
59
- * machine surface that went silent on them would lose the state that matters.
52
+ * **A failure is not an answer to the question asked** — but since 0.7.0 (PR 7) it is no longer silent either. A verb that
53
+ * could not do its job writes ONE failure document (`renderJsonError`: `outcome: "error"`, the stable `code`, the
54
+ * what/why and the fix) to stdout and NOTHING to stderr, with the same exit code as the text block. Before PR 7 it
55
+ * rendered the block to stderr and left stdout empty, and the exit code alone could not tell a wrapper which failure;
56
+ * the stable codes (`src/copy/error_codes.ts`) can, so the parallel vocabulary the older text declined to mint is now
57
+ * the same one. **Absence is not a failure** and DOES emit an ordinary document: `why` on a commit with
58
+ * no edge and `report` on an empty window are ANSWERS (exit 4 says so), and a machine surface that went silent on them
59
+ * would lose the state that matters.
60
60
  *
61
61
  * ⚠ §13.3 does not settle that split in either direction. It is reported as an
62
62
  * open question rather than smoothed over — `DESIGN.md` is orchestrator-owned
@@ -82,6 +82,33 @@ export const JSON_SCHEMA_VERSION = 1;
82
82
  export function renderJson(verb, outcome, body) {
83
83
  return `${JSON.stringify({ schema: JSON_SCHEMA_VERSION, verb, outcome, ...body })}\n`;
84
84
  }
85
+ /**
86
+ * A failure as a document — 0.7.0 PR 7. Under `--json` a verb that could not do its job writes ONE document to stdout
87
+ * and nothing to stderr, with the verb's own exit code:
88
+ *
89
+ * ```
90
+ * { "schema": 1, "verb": "status", "outcome": "error",
91
+ * "error": { "code": "NOT_CONNECTED", "what": "…", "why": ["…"],
92
+ * "fix": { "label": "…", "commands": ["…"] } | null } }
93
+ * ```
94
+ *
95
+ * This REPLACES the 0.6.x contract that a `--json` failure leaves stdout empty (the text above said "a failure is not
96
+ * an answer"; the exit code alone could not tell a wrapper WHICH failure, and the codes can). `fix` is `null` only when
97
+ * the block has no fix label at all (a label with nothing to type is `{ label, commands: [] }`), and its commands are the SAME strings the text block
98
+ * prints, already routed through the install channel.
99
+ */
100
+ export function renderJsonError(verb, block) {
101
+ // `fix` is null only when the block has no fix label at all. A label with no command ("Run it again inside a git
102
+ // repository.") is a fix with `commands: []`; it is never a label-less list of commands.
103
+ const fix = block.fixLabel !== undefined ? { label: block.fixLabel, commands: [...(block.fixes ?? [])] } : null;
104
+ return renderJson(verb, "error", {
105
+ error: { code: block.code, what: block.what, why: [...block.why], fix },
106
+ });
107
+ }
108
+ /** Write the failure document to stdout and nothing else (the caller writes nothing to stderr). */
109
+ export function emitJsonError(stdout, verb, block) {
110
+ stdout.write(renderJsonError(verb, block));
111
+ }
85
112
  /**
86
113
  * Write one document to stdout, and nothing else.
87
114
  *
package/dist/json.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"json.js","sourceRoot":"","sources":["../src/json.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AAIH;;;;GAIG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAcrC;;;;;;;;;;GAUG;AACH,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,OAAe,EAAE,IAAc;IACxE,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC;AACxF,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CACtB,MAAgB,EAChB,IAAc,EACd,OAAe,EACf,IAAc;IAEd,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,I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G;AACH,MAAM,UAAU,QAAQ,CACtB,MAAgB,EAChB,IAAc,EACd,OAAe,EACf,IAAc;IAEd,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * What this machine captures, as the machine-level verbs need it (0.7.0, PR 3): `auth` outside a repo (D32), `status` from
3
+ * any folder (D6) and the picker's "No changes" line all say the same thing about the same facts, so they ask here.
4
+ *
5
+ * Reads `grants.json` and `projects.json` and, for each per-clone consent, the clone's remote (one `git remote get-url`
6
+ * apiece). Opens no transcript and writes nothing.
7
+ */
8
+ import { type Grants } from "./consent.js";
9
+ /** One per-clone consent (`projects.json`), resolved to the slug of its clone's remote. `null`: no remote, or gone. */
10
+ export interface PerClone {
11
+ readonly commonDir: string;
12
+ readonly slug: string | null;
13
+ }
14
+ export declare function readPerClone(home: string): PerClone[];
15
+ export type MachineCapture =
16
+ /** Nothing is granted and no clone is consented: a machine that has never connected, or has stopped everything. */
17
+ {
18
+ readonly kind: "none";
19
+ }
20
+ /** `grants.json` is there and cannot be read. It denies every clone with a remote; `status` says so. */
21
+ | {
22
+ readonly kind: "unreadable";
23
+ } | {
24
+ readonly kind: "on";
25
+ readonly grants: Grants;
26
+ readonly perClone: readonly PerClone[];
27
+ /** Owners and repos on, the way every summary line counts them. */
28
+ readonly owners: number;
29
+ readonly repos: number;
30
+ };
31
+ /**
32
+ * ⛔ **Counts what ADMITS capture, not what is written down.** An excluded slug is not on whatever else says so; a repo an
33
+ * owner grant covers is counted once, under the owner; a per-clone consent whose clone has no remote (`local:`) is still a
34
+ * repo that is on, and counts as one.
35
+ */
36
+ export declare function machineCapture(home: string): MachineCapture;
37
+ /** `1 owner and 2 repos` — or the empty string when nothing is on. */
38
+ export declare function machineSummary(capture: MachineCapture): string;
39
+ /** Why a repo that is on is on (the `basis` row of `status`, D6): the owner that grants it, a repo grant, or a per-clone consent. */
40
+ export type CaptureBasis = {
41
+ readonly kind: "owner";
42
+ readonly owner: string;
43
+ } | {
44
+ readonly kind: "repo";
45
+ } | {
46
+ readonly kind: "clone";
47
+ };
48
+ /**
49
+ * Meaningful only for a clone `isCaptureAllowed` admits. An owner grant outranks a repo grant, which outranks a per-clone
50
+ * consent — the broadest reason first, so `status` names what would have to be removed to turn the repo off by grant.
51
+ */
52
+ export declare function captureBasis(home: string, slug: string): CaptureBasis;
@@ -0,0 +1,63 @@
1
+ /**
2
+ * What this machine captures, as the machine-level verbs need it (0.7.0, PR 3): `auth` outside a repo (D32), `status` from
3
+ * any folder (D6) and the picker's "No changes" line all say the same thing about the same facts, so they ask here.
4
+ *
5
+ * Reads `grants.json` and `projects.json` and, for each per-clone consent, the clone's remote (one `git remote get-url`
6
+ * apiece). Opens no transcript and writes nothing.
7
+ */
8
+ import { EMPTY_GRANTS, normalizeSlug, ownerOfSlug, isLocalSlug, readAllowList, readGrants } from "./consent.js";
9
+ import { remoteSlugOfCommonDir } from "./git.js";
10
+ import { PICKER } from "./copy/index.js";
11
+ export function readPerClone(home) {
12
+ return Object.keys(readAllowList(home)).map((commonDir) => ({ commonDir, slug: remoteSlugOfCommonDir(commonDir) }));
13
+ }
14
+ /**
15
+ * ⛔ **Counts what ADMITS capture, not what is written down.** An excluded slug is not on whatever else says so; a repo an
16
+ * owner grant covers is counted once, under the owner; a per-clone consent whose clone has no remote (`local:`) is still a
17
+ * repo that is on, and counts as one.
18
+ */
19
+ export function machineCapture(home) {
20
+ const read = readGrants(home);
21
+ if (read.kind === "unreadable")
22
+ return { kind: "unreadable" };
23
+ const grants = read.kind === "ok" ? read.grants : EMPTY_GRANTS;
24
+ const perClone = readPerClone(home);
25
+ const excluded = new Set(grants.excluded);
26
+ const owners = grants.owners;
27
+ const repos = new Set();
28
+ for (const slug of grants.repos) {
29
+ if (!excluded.has(slug) && !owners.includes(ownerOfSlug(slug)))
30
+ repos.add(slug);
31
+ }
32
+ for (const entry of perClone) {
33
+ const slug = entry.slug === null ? null : normalizeSlug(entry.slug);
34
+ if (slug === null || isLocalSlug(slug))
35
+ repos.add(`local:${entry.commonDir}`);
36
+ else if (!excluded.has(slug) && !owners.includes(ownerOfSlug(slug)))
37
+ repos.add(slug);
38
+ }
39
+ if (owners.length === 0 && repos.size === 0)
40
+ return { kind: "none" };
41
+ return { kind: "on", grants, perClone, owners: owners.length, repos: repos.size };
42
+ }
43
+ /** `1 owner and 2 repos` — or the empty string when nothing is on. */
44
+ export function machineSummary(capture) {
45
+ return capture.kind === "on" ? PICKER.summary(capture.owners, capture.repos) : "";
46
+ }
47
+ /**
48
+ * Meaningful only for a clone `isCaptureAllowed` admits. An owner grant outranks a repo grant, which outranks a per-clone
49
+ * consent — the broadest reason first, so `status` names what would have to be removed to turn the repo off by grant.
50
+ */
51
+ export function captureBasis(home, slug) {
52
+ const read = readGrants(home);
53
+ if (read.kind === "ok" && !isLocalSlug(slug)) {
54
+ const name = normalizeSlug(slug);
55
+ const owner = ownerOfSlug(name);
56
+ if (read.grants.owners.includes(owner))
57
+ return { kind: "owner", owner };
58
+ if (read.grants.repos.includes(name))
59
+ return { kind: "repo" };
60
+ }
61
+ return { kind: "clone" };
62
+ }
63
+ //# sourceMappingURL=machine_state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"machine_state.js","sourceRoot":"","sources":["../src/machine_state.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAe,MAAM,cAAc,CAAC;AAC7H,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAQzC,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE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AAE,MAAM,EAAE,CAAC;IAChE,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAC3B,CAAC"}
@@ -40,6 +40,7 @@ export type SessionLoad = {
40
40
  readonly kind: "insecure-file";
41
41
  readonly path: string;
42
42
  readonly mode: string;
43
+ readonly target: "directory" | "file";
43
44
  } | {
44
45
  readonly kind: "unreadable";
45
46
  readonly path: string;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * "This repo's upload was refused because its org has not approved capture yet" — a one-bit memory, so `status` can say so
3
+ * (0.7.0, PR 3: VQ's claim-check-2 follow-up, Alexander's "Status lists them", and VT's review of the first design).
4
+ *
5
+ * The client already KNOWS this: a `403 capture_not_approved` is the answer to THIS repo's own upload, and `connect` prints the
6
+ * held beat for it. A hook treats the same 403 as `later` (the offset holds, the bytes stay on disk) and remembered nothing, so
7
+ * `status` could not tell a repo waiting on an owner from one that simply had not sent yet.
8
+ *
9
+ * ## ONE marker per SLUG, because an organization's approval is about the repo and not about one clone of it
10
+ *
11
+ * `<state>/org-pending/<digest of normalizeSlug(slug)>.mark`, holding the slug. The first design keyed the marker by the
12
+ * worktree, and it outlived the approval whenever a DIFFERENT clone, or a worktree since removed, was the one that delivered:
13
+ * machine `status` kept saying "the org must approve capture" about a repo that was approved. Keyed by slug, a 2xx from any clone
14
+ * removes it, and both statuses read the same file:
15
+ *
16
+ * - **in-repo `status`** reads the marker for the repo's slug (`readOrgPending`);
17
+ * - **machine `status`** lists the directory (`listOrgPending`): one small file per WAITING repo.
18
+ *
19
+ * ## The hot path stays flat
20
+ *
21
+ * Written on that 403 only; cleared on any 2xx by ONE `rmSync` of a path computed from `ctx.repoSlug`. No directory scan and no
22
+ * spawn on a delivery; the only scan is `listOrgPending`, by `status`, of this small directory. (`test/load-path.test.ts` pins
23
+ * that `clearOrgPending` and `markOrgPending` contain neither.)
24
+ *
25
+ * ## Rules
26
+ * - The slug is the CLIENT's (`ctx.repoSlug`), never anything in the response body, which names nobody.
27
+ * - `normalizeSlug` (consent.ts) on write, on clear and on both reads, so `Acme/Widget` and `acme/widget` are one marker.
28
+ * - No marker for a `local:` slug: it names a path, and no organization can hold it.
29
+ * - The file is NAMED by a digest and carries the slug inside, so a slug with `/` or anything a host allows is never a path.
30
+ * - Every function swallows its own failure: it runs on the hook's path, where nothing may throw, and a missing marker only
31
+ * means `status` says nothing extra.
32
+ *
33
+ * Old per-worktree markers (written by earlier builds of this PR) are not read and not migrated: they were never released.
34
+ */
35
+ export interface OrgPending {
36
+ /** Epoch ms of the refusal. */
37
+ readonly at: number;
38
+ /** The body's `owners_notified`, carried exactly as `connect` reads it: `null` = not determinable. */
39
+ readonly ownersNotified: number | null;
40
+ /** The repo's normalized slug, as the CLIENT resolved it. `null` if the file carries none: such a marker is never listed. */
41
+ readonly slug: string | null;
42
+ }
43
+ export declare function markOrgPending(home: string, nowMs: number, ownersNotified: number | null, slug: string): void;
44
+ /** A delivery landed, so the org approved: remove this slug's marker, whichever clone wrote it. One `rmSync`. */
45
+ export declare function clearOrgPending(home: string, slug: string): void;
46
+ /** Is THIS repo (any clone of it) waiting on an organization's approval? In-repo `status`. */
47
+ export declare function readOrgPending(home: string, slug: string): OrgPending | null;
48
+ /**
49
+ * Every repo on this machine with a standing refusal, for the machine-level `status`: the slug directory, one small file per
50
+ * waiting repo. Never `sessions/*`, and only ever called by `status`, never on a delivery. Unreadable entries are skipped.
51
+ */
52
+ export declare function listOrgPending(home: string): OrgPending[];
@@ -0,0 +1,109 @@
1
+ /**
2
+ * "This repo's upload was refused because its org has not approved capture yet" — a one-bit memory, so `status` can say so
3
+ * (0.7.0, PR 3: VQ's claim-check-2 follow-up, Alexander's "Status lists them", and VT's review of the first design).
4
+ *
5
+ * The client already KNOWS this: a `403 capture_not_approved` is the answer to THIS repo's own upload, and `connect` prints the
6
+ * held beat for it. A hook treats the same 403 as `later` (the offset holds, the bytes stay on disk) and remembered nothing, so
7
+ * `status` could not tell a repo waiting on an owner from one that simply had not sent yet.
8
+ *
9
+ * ## ONE marker per SLUG, because an organization's approval is about the repo and not about one clone of it
10
+ *
11
+ * `<state>/org-pending/<digest of normalizeSlug(slug)>.mark`, holding the slug. The first design keyed the marker by the
12
+ * worktree, and it outlived the approval whenever a DIFFERENT clone, or a worktree since removed, was the one that delivered:
13
+ * machine `status` kept saying "the org must approve capture" about a repo that was approved. Keyed by slug, a 2xx from any clone
14
+ * removes it, and both statuses read the same file:
15
+ *
16
+ * - **in-repo `status`** reads the marker for the repo's slug (`readOrgPending`);
17
+ * - **machine `status`** lists the directory (`listOrgPending`): one small file per WAITING repo.
18
+ *
19
+ * ## The hot path stays flat
20
+ *
21
+ * Written on that 403 only; cleared on any 2xx by ONE `rmSync` of a path computed from `ctx.repoSlug`. No directory scan and no
22
+ * spawn on a delivery; the only scan is `listOrgPending`, by `status`, of this small directory. (`test/load-path.test.ts` pins
23
+ * that `clearOrgPending` and `markOrgPending` contain neither.)
24
+ *
25
+ * ## Rules
26
+ * - The slug is the CLIENT's (`ctx.repoSlug`), never anything in the response body, which names nobody.
27
+ * - `normalizeSlug` (consent.ts) on write, on clear and on both reads, so `Acme/Widget` and `acme/widget` are one marker.
28
+ * - No marker for a `local:` slug: it names a path, and no organization can hold it.
29
+ * - The file is NAMED by a digest and carries the slug inside, so a slug with `/` or anything a host allows is never a path.
30
+ * - Every function swallows its own failure: it runs on the hook's path, where nothing may throw, and a missing marker only
31
+ * means `status` says nothing extra.
32
+ *
33
+ * Old per-worktree markers (written by earlier builds of this PR) are not read and not migrated: they were never released.
34
+ */
35
+ import { createHash } from "node:crypto";
36
+ import { mkdirSync, readdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
37
+ import { join } from "node:path";
38
+ import { isLocalSlug, normalizeSlug } from "./consent.js";
39
+ import { stateDir } from "./paths.js";
40
+ const SLUG_DIR = "org-pending";
41
+ function markerPath(home, slug) {
42
+ return join(stateDir(home), SLUG_DIR, `${createHash("sha256").update(normalizeSlug(slug)).digest("hex").slice(0, 32)}.mark`);
43
+ }
44
+ export function markOrgPending(home, nowMs, ownersNotified, slug) {
45
+ const name = normalizeSlug(slug);
46
+ if (name === "" || isLocalSlug(name))
47
+ return;
48
+ try {
49
+ const path = markerPath(home, name);
50
+ mkdirSync(join(path, ".."), { recursive: true, mode: 0o700 });
51
+ writeFileSync(path, `${JSON.stringify({ at: nowMs, owners_notified: ownersNotified, slug: name })}\n`, { mode: 0o600 });
52
+ }
53
+ catch {
54
+ // Nothing to remember it with; `status` says nothing extra.
55
+ }
56
+ }
57
+ /** A delivery landed, so the org approved: remove this slug's marker, whichever clone wrote it. One `rmSync`. */
58
+ export function clearOrgPending(home, slug) {
59
+ try {
60
+ rmSync(markerPath(home, slug), { force: true });
61
+ }
62
+ catch {
63
+ // A marker that cannot be removed is a stale "waiting" line at worst, and the next delivery tries again.
64
+ }
65
+ }
66
+ function parse(path) {
67
+ try {
68
+ const parsed = JSON.parse(readFileSync(path, "utf8"));
69
+ if (parsed === null || typeof parsed !== "object")
70
+ return null;
71
+ const { at, owners_notified: owners, slug } = parsed;
72
+ if (typeof at !== "number" || !Number.isFinite(at) || at <= 0)
73
+ return null;
74
+ return {
75
+ at,
76
+ ownersNotified: typeof owners === "number" && Number.isFinite(owners) ? owners : null,
77
+ slug: typeof slug === "string" && slug !== "" ? normalizeSlug(slug) : null,
78
+ };
79
+ }
80
+ catch {
81
+ return null;
82
+ }
83
+ }
84
+ /** Is THIS repo (any clone of it) waiting on an organization's approval? In-repo `status`. */
85
+ export function readOrgPending(home, slug) {
86
+ const name = normalizeSlug(slug);
87
+ if (name === "" || isLocalSlug(name))
88
+ return null;
89
+ return parse(markerPath(home, name));
90
+ }
91
+ /**
92
+ * Every repo on this machine with a standing refusal, for the machine-level `status`: the slug directory, one small file per
93
+ * waiting repo. Never `sessions/*`, and only ever called by `status`, never on a delivery. Unreadable entries are skipped.
94
+ */
95
+ export function listOrgPending(home) {
96
+ const root = join(stateDir(home), SLUG_DIR);
97
+ let names;
98
+ try {
99
+ names = readdirSync(root);
100
+ }
101
+ catch {
102
+ return [];
103
+ }
104
+ return names.flatMap((name) => {
105
+ const entry = parse(join(root, name));
106
+ return entry === null ? [] : [entry];
107
+ });
108
+ }
109
+ //# sourceMappingURL=org_pending.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"org_pending.js","sourceRoot":"","sources":["../src/org_pending.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,MAAM,QAAQ,GAAG,aAAa,CAAC;AAW/B,SAAS,UAAU,CAAC,IAAY,EAAE,IAAY;IAC5C,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;AAC/H,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,KAAa,EAAE,cAA6B,EAAE,IAAY;IACrG,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,IAAI,KAAK,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC;QAAE,OAAO;IAC7C,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACpC,SAAS,CAAC,IA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rF,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;SAC3E,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,IAAY;IACvD,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,IAAI,KAAK,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IAClD,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC5C,IAAI,KAAe,CAAC;IACpB,IAAI,CAAC;QACH,KAAK,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5B,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;QACtC,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IACvC,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/paths.d.ts CHANGED
@@ -19,6 +19,11 @@ export declare function rootDir(home: string): string;
19
19
  export declare function credentialsPath(home: string): string;
20
20
  /** The per-project consent allow list. Consulted BEFORE any transcript read (D56 §D19). */
21
21
  export declare function projectsPath(home: string): string;
22
+ /**
23
+ * The slug-keyed grant list — owners, repos, exclusions and refusals. Read next to
24
+ * `projects.json` by `consent.ts`'s `isCaptureAllowed`, BEFORE any transcript read.
25
+ */
26
+ export declare function grantsPath(home: string): string;
22
27
  /**
23
28
  * The HUMAN lane's signed-in session — `CR-084d`. Mode 0600, enforced on read by
24
29
  * the same `readSecretFile` the ingest credential goes through.
@@ -90,6 +95,19 @@ export declare function repoDayNoticePath(home: string, repoKey: string, day: st
90
95
  * `day` is a UTC `YYYY-MM-DD` supplied by the caller, never read from a local clock here.
91
96
  */
92
97
  export declare function machineDayNoticePath(home: string, day: string, key: string): string;
98
+ /**
99
+ * Once-per-CLONE marker — 0.7.0, notices 6-8 and the `SessionStart` install record (eng review D4 · A).
100
+ *
101
+ * `cloneKey` is `src/hooks/session_start.ts`'s `cloneKey`: the git common dir PLUS the clone's oldest HEAD
102
+ * reflog entry, so a fresh clone at a path that used to hold another one is a different clone and gets its own
103
+ * notice and its own install. It is hashed here for the reason `repoDigest` hashes a repo key — `sanitise`
104
+ * truncates, and two deep checkouts sharing a prefix would otherwise share a marker.
105
+ *
106
+ * `clone/<digest>/<state>.json` is a third depth under `notices/`, apart from `<session>/<state>.json`,
107
+ * `repo-day/…` and `machine-day/…`, so no session id can resolve onto one. `state` of `installed` is the
108
+ * install record, which is not a notice and is kept beside them on purpose.
109
+ */
110
+ export declare function cloneMarkerPath(home: string, cloneKey: string, state: string): string;
93
111
  /**
94
112
  * The binding key of the client's send state — `CR-017d`, the client half of
95
113
  * `CR-017`.
@@ -405,5 +423,37 @@ export declare function isInsideAny(roots: readonly string[], candidate: string)
405
423
  * would read and nothing would write.
406
424
  */
407
425
  export declare function claudeSettingsPath(home: string, env: NodeJS.ProcessEnv): string;
426
+ /**
427
+ * Codex's thread index — `D11 · A`, eng review D2, Open Question 6.
428
+ *
429
+ * ⛔ **EXACTLY `state_5.sqlite`, and no glob.** Measured by VS on 2026-10-24: every
430
+ * column `scan` selects is in upstream's first `threads` migration (rust-v0.93.0)
431
+ * and none was ever dropped, but the FILE NAME carries a schema generation —
432
+ * `state_5` first ships in rust-v0.131.0, and from there bumps are
433
+ * non-destructive. A different `state_N` is therefore a store this client has not
434
+ * been checked against, and the adapter reports it rather than reading it.
435
+ *
436
+ * Beside `codexTranscriptRoot` and not under it, for the same reason the root
437
+ * sits beside Claude's: `CODEX_HOME ?? ~/.codex` is one product's fact, and the
438
+ * sessions directory is a child of it, not a parent.
439
+ */
440
+ export declare function codexIndexDir(home: string, env: NodeJS.ProcessEnv): string;
441
+ /** The one index file name the Codex adapter accepts. See `codexIndexDir`. */
442
+ export declare const CODEX_INDEX_FILE = "state_5.sqlite";
443
+ /**
444
+ * Claude Code's own config file, whose `projects` map keys every folder it has
445
+ * been run in — `scan`'s second skip signal.
446
+ *
447
+ * `CLAUDE_CONFIG_DIR` is honoured as the other Claude paths honour it. ⚠ **That
448
+ * location is CARRIED, not measured**: the default `~/.claude.json` is the one
449
+ * this machine has. If a relocated config lives elsewhere the signal simply does
450
+ * not fire, which is the direction that skips less rather than more.
451
+ *
452
+ * ⚠ **The file holds far more than the map**
453
+ * (account and onboarding state), which is why its one reader takes the map's
454
+ * KEYS and nothing else, and never prints a parse error: Node 22's `JSON.parse`
455
+ * message quotes the text it choked on.
456
+ */
457
+ export declare function claudeConfigPath(home: string, env: NodeJS.ProcessEnv): string;
408
458
  export declare function codexHooksPath(home: string, env: NodeJS.ProcessEnv): string;
409
459
  export declare function cursorHooksPath(home: string): string;
package/dist/paths.js CHANGED
@@ -28,6 +28,13 @@ export function credentialsPath(home) {
28
28
  export function projectsPath(home) {
29
29
  return join(rootDir(home), "projects.json");
30
30
  }
31
+ /**
32
+ * The slug-keyed grant list — owners, repos, exclusions and refusals. Read next to
33
+ * `projects.json` by `consent.ts`'s `isCaptureAllowed`, BEFORE any transcript read.
34
+ */
35
+ export function grantsPath(home) {
36
+ return join(rootDir(home), "grants.json");
37
+ }
31
38
  /**
32
39
  * The HUMAN lane's signed-in session — `CR-084d`. Mode 0600, enforced on read by
33
40
  * the same `readSecretFile` the ingest credential goes through.
@@ -113,6 +120,21 @@ export function repoDayNoticePath(home, repoKey, day, state) {
113
120
  export function machineDayNoticePath(home, day, key) {
114
121
  return join(stateDir(home), "notices", "machine-day", sanitise(day), `${sanitise(key)}.json`);
115
122
  }
123
+ /**
124
+ * Once-per-CLONE marker — 0.7.0, notices 6-8 and the `SessionStart` install record (eng review D4 · A).
125
+ *
126
+ * `cloneKey` is `src/hooks/session_start.ts`'s `cloneKey`: the git common dir PLUS the clone's oldest HEAD
127
+ * reflog entry, so a fresh clone at a path that used to hold another one is a different clone and gets its own
128
+ * notice and its own install. It is hashed here for the reason `repoDigest` hashes a repo key — `sanitise`
129
+ * truncates, and two deep checkouts sharing a prefix would otherwise share a marker.
130
+ *
131
+ * `clone/<digest>/<state>.json` is a third depth under `notices/`, apart from `<session>/<state>.json`,
132
+ * `repo-day/…` and `machine-day/…`, so no session id can resolve onto one. `state` of `installed` is the
133
+ * install record, which is not a notice and is kept beside them on purpose.
134
+ */
135
+ export function cloneMarkerPath(home, cloneKey, state) {
136
+ return join(stateDir(home), "notices", "clone", repoDigest(cloneKey), `${sanitise(state)}.json`);
137
+ }
116
138
  /**
117
139
  * Per-`(repo, session)` send state — `CR-018`'s offset ledger, backlog and
118
140
  * terminal stop, keyed by `CR-017d`.
@@ -510,6 +532,48 @@ export function claudeSettingsPath(home, env) {
510
532
  : join(home, ".claude");
511
533
  return join(root, "settings.json");
512
534
  }
535
+ /**
536
+ * Codex's thread index — `D11 · A`, eng review D2, Open Question 6.
537
+ *
538
+ * ⛔ **EXACTLY `state_5.sqlite`, and no glob.** Measured by VS on 2026-10-24: every
539
+ * column `scan` selects is in upstream's first `threads` migration (rust-v0.93.0)
540
+ * and none was ever dropped, but the FILE NAME carries a schema generation —
541
+ * `state_5` first ships in rust-v0.131.0, and from there bumps are
542
+ * non-destructive. A different `state_N` is therefore a store this client has not
543
+ * been checked against, and the adapter reports it rather than reading it.
544
+ *
545
+ * Beside `codexTranscriptRoot` and not under it, for the same reason the root
546
+ * sits beside Claude's: `CODEX_HOME ?? ~/.codex` is one product's fact, and the
547
+ * sessions directory is a child of it, not a parent.
548
+ */
549
+ export function codexIndexDir(home, env) {
550
+ const configured = env.CODEX_HOME;
551
+ return configured !== undefined && configured.trim() !== ""
552
+ ? configured.trim()
553
+ : join(home, ".codex");
554
+ }
555
+ /** The one index file name the Codex adapter accepts. See `codexIndexDir`. */
556
+ export const CODEX_INDEX_FILE = "state_5.sqlite";
557
+ /**
558
+ * Claude Code's own config file, whose `projects` map keys every folder it has
559
+ * been run in — `scan`'s second skip signal.
560
+ *
561
+ * `CLAUDE_CONFIG_DIR` is honoured as the other Claude paths honour it. ⚠ **That
562
+ * location is CARRIED, not measured**: the default `~/.claude.json` is the one
563
+ * this machine has. If a relocated config lives elsewhere the signal simply does
564
+ * not fire, which is the direction that skips less rather than more.
565
+ *
566
+ * ⚠ **The file holds far more than the map**
567
+ * (account and onboarding state), which is why its one reader takes the map's
568
+ * KEYS and nothing else, and never prints a parse error: Node 22's `JSON.parse`
569
+ * message quotes the text it choked on.
570
+ */
571
+ export function claudeConfigPath(home, env) {
572
+ const configured = env.CLAUDE_CONFIG_DIR;
573
+ return configured !== undefined && configured.trim() !== ""
574
+ ? join(configured.trim(), ".claude.json")
575
+ : join(home, ".claude.json");
576
+ }
513
577
  export function codexHooksPath(home, env) {
514
578
  const configured = env.CODEX_HOME;
515
579
  const root = configured !== undefined && configured.trim() !== ""
package/dist/paths.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAEtC,0FAA0F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