@flyingrobots/graft 0.8.0 → 0.10.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 (186) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/GUIDE.md +8 -3
  3. package/README.md +134 -100
  4. package/dist/adapters/colorful-cli-prose-projector.d.ts +13 -0
  5. package/dist/adapters/colorful-cli-prose-projector.d.ts.map +1 -0
  6. package/dist/adapters/colorful-cli-prose-projector.js +89 -0
  7. package/dist/adapters/colorful-cli-prose-projector.js.map +1 -0
  8. package/dist/adapters/fake-echo-kernel-transport.d.ts +33 -0
  9. package/dist/adapters/fake-echo-kernel-transport.d.ts.map +1 -0
  10. package/dist/adapters/fake-echo-kernel-transport.js +208 -0
  11. package/dist/adapters/fake-echo-kernel-transport.js.map +1 -0
  12. package/dist/adapters/node-process-runner.d.ts.map +1 -1
  13. package/dist/adapters/node-process-runner.js +1 -0
  14. package/dist/adapters/node-process-runner.js.map +1 -1
  15. package/dist/api/index.d.ts +7 -2
  16. package/dist/api/index.d.ts.map +1 -1
  17. package/dist/api/index.js +14 -3
  18. package/dist/api/index.js.map +1 -1
  19. package/dist/cli/structural-blame-render.d.ts.map +1 -1
  20. package/dist/cli/structural-blame-render.js +4 -1
  21. package/dist/cli/structural-blame-render.js.map +1 -1
  22. package/dist/contracts/capabilities.d.ts +2 -2
  23. package/dist/contracts/capabilities.d.ts.map +1 -1
  24. package/dist/contracts/capabilities.js +14 -0
  25. package/dist/contracts/capabilities.js.map +1 -1
  26. package/dist/contracts/output-schema-cli.d.ts +3 -0
  27. package/dist/contracts/output-schema-cli.d.ts.map +1 -1
  28. package/dist/contracts/output-schema-fragments.d.ts +183 -0
  29. package/dist/contracts/output-schema-fragments.d.ts.map +1 -1
  30. package/dist/contracts/output-schema-fragments.js +38 -0
  31. package/dist/contracts/output-schema-fragments.js.map +1 -1
  32. package/dist/contracts/output-schema-mcp.d.ts +91 -0
  33. package/dist/contracts/output-schema-mcp.d.ts.map +1 -1
  34. package/dist/contracts/output-schema-mcp.js +6 -1
  35. package/dist/contracts/output-schema-mcp.js.map +1 -1
  36. package/dist/contracts/output-schema-meta.d.ts +1 -1
  37. package/dist/contracts/output-schema-meta.d.ts.map +1 -1
  38. package/dist/contracts/output-schemas.d.ts.map +1 -1
  39. package/dist/contracts/output-schemas.js +43 -0
  40. package/dist/contracts/output-schemas.js.map +1 -1
  41. package/dist/echo/canonical-cbor.d.ts +10 -0
  42. package/dist/echo/canonical-cbor.d.ts.map +1 -0
  43. package/dist/echo/canonical-cbor.js +213 -0
  44. package/dist/echo/canonical-cbor.js.map +1 -0
  45. package/dist/echo/codec-runtime.d.ts +72 -0
  46. package/dist/echo/codec-runtime.d.ts.map +1 -0
  47. package/dist/echo/codec-runtime.js +259 -0
  48. package/dist/echo/codec-runtime.js.map +1 -0
  49. package/dist/echo/structural-history-client.d.ts +68 -0
  50. package/dist/echo/structural-history-client.d.ts.map +1 -0
  51. package/dist/echo/structural-history-client.js +149 -0
  52. package/dist/echo/structural-history-client.js.map +1 -0
  53. package/dist/echo/structural-history-envelope-codec.d.ts +46 -0
  54. package/dist/echo/structural-history-envelope-codec.d.ts.map +1 -0
  55. package/dist/echo/structural-history-envelope-codec.js +121 -0
  56. package/dist/echo/structural-history-envelope-codec.js.map +1 -0
  57. package/dist/echo/structural-reading-adapter.d.ts +13 -0
  58. package/dist/echo/structural-reading-adapter.d.ts.map +1 -0
  59. package/dist/echo/structural-reading-adapter.js +120 -0
  60. package/dist/echo/structural-reading-adapter.js.map +1 -0
  61. package/dist/echo/structural-reading-generated-model.d.ts +18 -0
  62. package/dist/echo/structural-reading-generated-model.d.ts.map +1 -0
  63. package/dist/echo/structural-reading-generated-model.js +324 -0
  64. package/dist/echo/structural-reading-generated-model.js.map +1 -0
  65. package/dist/generated/graft-structural-history.codec.generated.d.ts +135 -0
  66. package/dist/generated/graft-structural-history.codec.generated.d.ts.map +1 -0
  67. package/dist/generated/graft-structural-history.codec.generated.js +549 -0
  68. package/dist/generated/graft-structural-history.codec.generated.js.map +1 -0
  69. package/dist/generated/graft-structural-history.d.ts +331 -0
  70. package/dist/generated/graft-structural-history.d.ts.map +1 -0
  71. package/dist/generated/graft-structural-history.js +47 -0
  72. package/dist/generated/graft-structural-history.js.map +1 -0
  73. package/dist/mcp/burden.d.ts.map +1 -1
  74. package/dist/mcp/burden.js +2 -0
  75. package/dist/mcp/burden.js.map +1 -1
  76. package/dist/mcp/context.d.ts +5 -1
  77. package/dist/mcp/context.d.ts.map +1 -1
  78. package/dist/mcp/context.js +11 -1
  79. package/dist/mcp/context.js.map +1 -1
  80. package/dist/mcp/control-plane/types.d.ts +8 -0
  81. package/dist/mcp/control-plane/types.d.ts.map +1 -1
  82. package/dist/mcp/daemon-control-plane.d.ts +2 -1
  83. package/dist/mcp/daemon-control-plane.d.ts.map +1 -1
  84. package/dist/mcp/daemon-control-plane.js +49 -0
  85. package/dist/mcp/daemon-control-plane.js.map +1 -1
  86. package/dist/mcp/repo-tool-worker-context.d.ts.map +1 -1
  87. package/dist/mcp/repo-tool-worker-context.js +19 -0
  88. package/dist/mcp/repo-tool-worker-context.js.map +1 -1
  89. package/dist/mcp/repo-workspace.d.ts +1 -1
  90. package/dist/mcp/repo-workspace.d.ts.map +1 -1
  91. package/dist/mcp/repo-workspace.js +5 -0
  92. package/dist/mcp/repo-workspace.js.map +1 -1
  93. package/dist/mcp/server-context.d.ts.map +1 -1
  94. package/dist/mcp/server-context.js +17 -0
  95. package/dist/mcp/server-context.js.map +1 -1
  96. package/dist/mcp/server-tool-access.d.ts.map +1 -1
  97. package/dist/mcp/server-tool-access.js +4 -0
  98. package/dist/mcp/server-tool-access.js.map +1 -1
  99. package/dist/mcp/tool-registry.d.ts.map +1 -1
  100. package/dist/mcp/tool-registry.js +5 -1
  101. package/dist/mcp/tool-registry.js.map +1 -1
  102. package/dist/mcp/tools/changed-since.d.ts.map +1 -1
  103. package/dist/mcp/tools/changed-since.js +24 -10
  104. package/dist/mcp/tools/changed-since.js.map +1 -1
  105. package/dist/mcp/tools/dead-symbols.d.ts.map +1 -1
  106. package/dist/mcp/tools/dead-symbols.js +2 -3
  107. package/dist/mcp/tools/dead-symbols.js.map +1 -1
  108. package/dist/mcp/tools/file-outline.d.ts.map +1 -1
  109. package/dist/mcp/tools/file-outline.js +10 -5
  110. package/dist/mcp/tools/file-outline.js.map +1 -1
  111. package/dist/mcp/tools/structural-blame.d.ts.map +1 -1
  112. package/dist/mcp/tools/structural-blame.js +3 -0
  113. package/dist/mcp/tools/structural-blame.js.map +1 -1
  114. package/dist/mcp/tools/structural-review.d.ts.map +1 -1
  115. package/dist/mcp/tools/structural-review.js +9 -22
  116. package/dist/mcp/tools/structural-review.js.map +1 -1
  117. package/dist/mcp/tools/workspace-list-opened.d.ts +3 -0
  118. package/dist/mcp/tools/workspace-list-opened.d.ts.map +1 -0
  119. package/dist/mcp/tools/workspace-list-opened.js +10 -0
  120. package/dist/mcp/tools/workspace-list-opened.js.map +1 -0
  121. package/dist/mcp/tools/workspace-open.d.ts +3 -0
  122. package/dist/mcp/tools/workspace-open.d.ts.map +1 -0
  123. package/dist/mcp/tools/workspace-open.js +34 -0
  124. package/dist/mcp/tools/workspace-open.js.map +1 -0
  125. package/dist/mcp/workspace-registry.d.ts +83 -0
  126. package/dist/mcp/workspace-registry.d.ts.map +1 -0
  127. package/dist/mcp/workspace-registry.js +542 -0
  128. package/dist/mcp/workspace-registry.js.map +1 -0
  129. package/dist/mcp/workspace-router-model.d.ts +27 -0
  130. package/dist/mcp/workspace-router-model.d.ts.map +1 -1
  131. package/dist/mcp/workspace-router-model.js.map +1 -1
  132. package/dist/mcp/workspace-router.d.ts +9 -2
  133. package/dist/mcp/workspace-router.d.ts.map +1 -1
  134. package/dist/mcp/workspace-router.js +145 -1
  135. package/dist/mcp/workspace-router.js.map +1 -1
  136. package/dist/operations/colorful-prose-projection.d.ts +32 -0
  137. package/dist/operations/colorful-prose-projection.d.ts.map +1 -0
  138. package/dist/operations/colorful-prose-projection.js +344 -0
  139. package/dist/operations/colorful-prose-projection.js.map +1 -0
  140. package/dist/operations/file-outline.d.ts +10 -0
  141. package/dist/operations/file-outline.d.ts.map +1 -1
  142. package/dist/operations/file-outline.js +29 -3
  143. package/dist/operations/file-outline.js.map +1 -1
  144. package/dist/operations/repo-workspace.d.ts +4 -0
  145. package/dist/operations/repo-workspace.d.ts.map +1 -1
  146. package/dist/operations/repo-workspace.js +57 -21
  147. package/dist/operations/repo-workspace.js.map +1 -1
  148. package/dist/operations/safe-read.d.ts +2 -0
  149. package/dist/operations/safe-read.d.ts.map +1 -1
  150. package/dist/operations/safe-read.js +20 -0
  151. package/dist/operations/safe-read.js.map +1 -1
  152. package/dist/operations/structured-buffer-model.d.ts +19 -15
  153. package/dist/operations/structured-buffer-model.d.ts.map +1 -1
  154. package/dist/operations/structured-buffer-model.js +6 -4
  155. package/dist/operations/structured-buffer-model.js.map +1 -1
  156. package/dist/operations/structured-buffer-query.d.ts.map +1 -1
  157. package/dist/operations/structured-buffer-query.js +64 -1
  158. package/dist/operations/structured-buffer-query.js.map +1 -1
  159. package/dist/operations/structured-buffer.d.ts +3 -1
  160. package/dist/operations/structured-buffer.d.ts.map +1 -1
  161. package/dist/operations/structured-buffer.js.map +1 -1
  162. package/dist/parser/types.d.ts +1 -1
  163. package/dist/parser/types.d.ts.map +1 -1
  164. package/dist/parser/types.js.map +1 -1
  165. package/dist/ports/echo-kernel-transport.d.ts +12 -0
  166. package/dist/ports/echo-kernel-transport.d.ts.map +1 -0
  167. package/dist/ports/echo-kernel-transport.js +13 -0
  168. package/dist/ports/echo-kernel-transport.js.map +1 -0
  169. package/dist/ports/process-runner.d.ts +1 -0
  170. package/dist/ports/process-runner.d.ts.map +1 -1
  171. package/dist/ports/structural-history.d.ts +23 -0
  172. package/dist/ports/structural-history.d.ts.map +1 -0
  173. package/dist/ports/structural-history.js +22 -0
  174. package/dist/ports/structural-history.js.map +1 -0
  175. package/dist/ports/structural-reading.d.ts +100 -0
  176. package/dist/ports/structural-reading.d.ts.map +1 -0
  177. package/dist/ports/structural-reading.js +41 -0
  178. package/dist/ports/structural-reading.js.map +1 -0
  179. package/dist/warp/structural-reading-adapter.d.ts +28 -0
  180. package/dist/warp/structural-reading-adapter.d.ts.map +1 -0
  181. package/dist/warp/structural-reading-adapter.js +98 -0
  182. package/dist/warp/structural-reading-adapter.js.map +1 -0
  183. package/docs/CLI.md +4 -4
  184. package/docs/MCP.md +10 -5
  185. package/docs/SETUP.md +12 -6
  186. package/package.json +13 -6
@@ -0,0 +1,324 @@
1
+ // ---------------------------------------------------------------------------
2
+ // StructuralReadingPort ↔ Wesley-generated structural-history model mapping.
3
+ //
4
+ // Pure, deterministic, no I/O. Maps git-warp-backed StructuralReadingResult
5
+ // values onto the generated (StructuralReading, StructuralReadingEvidence,
6
+ // StructuralBasis) triple and back, loss-free.
7
+ //
8
+ // Folding contract: the generated v0.2 schema has no typed columns for the
9
+ // port's translated-substrate residue (GitWarpCommittedBasis projectRoot /
10
+ // base / maxCommits, and the GitWarpEvidence discriminant). That residue is
11
+ // re-expressed verbatim as canonical JSON in the evidence `summary` field, so
12
+ // the (reading, evidence) pair alone reconstructs the port result. The same
13
+ // canonical bytes feed the evidenceId derivation, pinning the id to the
14
+ // persisted residue.
15
+ //
16
+ // Representability limits of the contract: payloads and basis facts must be
17
+ // canonical-JSON-representable (no undefined-valued keys, no non-finite
18
+ // numbers — JSON cannot carry them, so round-trip equality cannot hold for
19
+ // them); a `null` payload is refused on the forward path because the
20
+ // generated `payloadJson: Json | null` reserves null for "absent".
21
+ // `payloadJson` carries the payload object by reference — callers must not
22
+ // mutate a result after mapping it, or payloadDigest will no longer match.
23
+ //
24
+ // This mapping is the git-warp import path. It never emits ECHO_NATIVE:
25
+ // schema invariant `fallback_translated_is_not_native_continuum`.
26
+ //
27
+ // Design packet: docs/design/CORE_structural-reading-port-generated-model-parity.md
28
+ // ---------------------------------------------------------------------------
29
+ import { createHash } from "node:crypto";
30
+ import { CanonicalJsonCodec } from "../adapters/canonical-json.js";
31
+ import { isFallbackTranslatedEvidence, isGitWarpImportedEvidence, toGeneratedStructuralEvidenceKind, } from "../ports/structural-reading.js";
32
+ export class GeneratedModelMappingError extends Error {
33
+ code;
34
+ constructor(code, message) {
35
+ super(message);
36
+ this.name = "GeneratedModelMappingError";
37
+ this.code = code;
38
+ }
39
+ }
40
+ const codec = new CanonicalJsonCodec();
41
+ function sha256Hex(canonicalJson) {
42
+ return createHash("sha256").update(canonicalJson).digest("hex");
43
+ }
44
+ function deriveId(entity, facts) {
45
+ return `${entity}:${sha256Hex(codec.encode(facts))}`;
46
+ }
47
+ function normalizeBasisString(value) {
48
+ const normalized = value?.trim();
49
+ return normalized === undefined || normalized.length === 0 ? null : normalized;
50
+ }
51
+ function toGeneratedStructuralBasisKind(basis) {
52
+ if (basis.commitId !== null) {
53
+ return "GIT_COMMIT";
54
+ }
55
+ if (basis.refName !== null) {
56
+ return "GIT_REF";
57
+ }
58
+ return "UNPINNED_COMMITTED";
59
+ }
60
+ const ECHO_NATIVE_REFUSAL_MESSAGE = "The git-warp import mapping refuses to emit ECHO_NATIVE evidence: schema " +
61
+ "invariant fallback_translated_is_not_native_continuum requires native " +
62
+ "continuum witnesses to originate from Echo, never from translated substrates.";
63
+ function invertRecord(record) {
64
+ const inverted = {};
65
+ for (const [key, value] of Object.entries(record)) {
66
+ inverted[value] = key;
67
+ }
68
+ return inverted;
69
+ }
70
+ const READING_KIND_TO_GENERATED = {
71
+ "symbol-reference-count": "SYMBOL_REFERENCE_COUNT",
72
+ "dead-symbols": "DEAD_SYMBOLS",
73
+ };
74
+ const READING_KIND_FROM_GENERATED = invertRecord(READING_KIND_TO_GENERATED);
75
+ const FRESHNESS_TO_GENERATED = {
76
+ current: "CURRENT",
77
+ stale: "STALE",
78
+ incomparable: "INCOMPARABLE",
79
+ };
80
+ const FRESHNESS_FROM_GENERATED = invertRecord(FRESHNESS_TO_GENERATED);
81
+ const POSTURE_TO_GENERATED = {
82
+ complete: "COMPLETE",
83
+ partial: "PARTIAL",
84
+ plural: "PLURAL",
85
+ "budget-limited": "BUDGET_LIMITED",
86
+ "rights-limited": "RIGHTS_LIMITED",
87
+ unavailable: "UNAVAILABLE",
88
+ };
89
+ const POSTURE_FROM_GENERATED = invertRecord(POSTURE_TO_GENERATED);
90
+ const EVIDENCE_LABEL_FROM_GENERATED = {
91
+ GIT_WARP_IMPORTED: "git-warp-imported",
92
+ FALLBACK_TRANSLATED: "fallback-translated",
93
+ };
94
+ function requireTranslatedSubstrateEvidence(result) {
95
+ const evidence = result.evidence;
96
+ if (isGitWarpImportedEvidence(evidence) || isFallbackTranslatedEvidence(evidence)) {
97
+ return evidence;
98
+ }
99
+ const candidate = evidence;
100
+ if (candidate.kind === "continuum-native" ||
101
+ candidate.evidenceLabel === "echo-native" ||
102
+ candidate.nativeContinuumWitness === true) {
103
+ throw new GeneratedModelMappingError("ECHO_NATIVE_REFUSED", ECHO_NATIVE_REFUSAL_MESSAGE);
104
+ }
105
+ throw new GeneratedModelMappingError("UNSUPPORTED_EVIDENCE_LABEL", "Evidence is not a recognized git-warp translated-substrate shape " +
106
+ `(label ${String(candidate.evidenceLabel)}).`);
107
+ }
108
+ function isOptionalString(value) {
109
+ return value === undefined || typeof value === "string";
110
+ }
111
+ function isOptionalNumber(value) {
112
+ return value === undefined || typeof value === "number";
113
+ }
114
+ function parseTranslatedSubstrateFacts(summary) {
115
+ const malformed = (detail) => new GeneratedModelMappingError("MALFORMED_EVIDENCE_SUMMARY", "Evidence summary does not carry canonical-JSON translated-substrate facts " +
116
+ `({ basis: GitWarpCommittedBasis, evidence: GitWarpEvidence }): ${detail}.`);
117
+ let parsed;
118
+ try {
119
+ parsed = JSON.parse(summary);
120
+ }
121
+ catch {
122
+ throw malformed("summary is not JSON");
123
+ }
124
+ if (typeof parsed !== "object" || parsed === null) {
125
+ throw malformed("summary is not an object");
126
+ }
127
+ const candidate = parsed;
128
+ const basis = candidate.basis;
129
+ if (basis?.kind !== "git-committed-history" ||
130
+ typeof basis.projectRoot !== "string" ||
131
+ !isOptionalString(basis.ref) ||
132
+ !isOptionalString(basis.base) ||
133
+ !isOptionalString(basis.head) ||
134
+ !isOptionalNumber(basis.maxCommits)) {
135
+ throw malformed("basis facts are not a GitWarpCommittedBasis");
136
+ }
137
+ const evidence = candidate.evidence;
138
+ const validEvidence = (evidence?.kind === "symbol-reference-count" &&
139
+ (evidence.source === "warp-graph" || evidence.source === "committed-import-scan") &&
140
+ typeof evidence.symbolName === "string" &&
141
+ typeof evidence.filePath === "string") ||
142
+ (evidence?.kind === "dead-symbols" &&
143
+ evidence.source === "warp-graph" &&
144
+ isOptionalNumber(evidence.maxCommits));
145
+ if (!validEvidence) {
146
+ throw malformed("evidence facts are not a GitWarpEvidence");
147
+ }
148
+ return {
149
+ basis: candidate.basis,
150
+ evidence: candidate.evidence,
151
+ };
152
+ }
153
+ function validatePayloadShape(kind, payload) {
154
+ const malformed = (detail) => new GeneratedModelMappingError("MALFORMED_PAYLOAD", `payloadJson is not a valid ${kind} payload: ${detail}.`);
155
+ if (typeof payload !== "object" || payload === null) {
156
+ throw malformed("payload is not an object");
157
+ }
158
+ if (kind === "symbol-reference-count") {
159
+ const candidate = payload;
160
+ if (typeof candidate.symbol !== "string" ||
161
+ typeof candidate.referenceCount !== "number" ||
162
+ !Array.isArray(candidate.referencingFiles) ||
163
+ !candidate.referencingFiles.every((file) => typeof file === "string")) {
164
+ throw malformed("expected { symbol, referenceCount, referencingFiles[] }");
165
+ }
166
+ return;
167
+ }
168
+ const candidate = payload;
169
+ if (!Array.isArray(candidate.symbols) ||
170
+ typeof candidate.total !== "number" ||
171
+ !candidate.symbols.every((symbol) => {
172
+ const entry = symbol;
173
+ return (typeof entry.name === "string" &&
174
+ typeof entry.kind === "string" &&
175
+ typeof entry.filePath === "string" &&
176
+ typeof entry.exported === "boolean" &&
177
+ typeof entry.removedInCommit === "string");
178
+ })) {
179
+ throw malformed("expected { symbols: DeadSymbolReadingPayload[], total }");
180
+ }
181
+ }
182
+ export function toGeneratedStructuralReading(result, ctx) {
183
+ const sourceEvidence = requireTranslatedSubstrateEvidence(result);
184
+ const readingKind = READING_KIND_TO_GENERATED[result.kind];
185
+ if (readingKind === undefined) {
186
+ throw new GeneratedModelMappingError("UNSUPPORTED_READING_KIND", `The generated mapping has no reading kind for ${result.kind}.`);
187
+ }
188
+ const freshness = FRESHNESS_TO_GENERATED[result.freshness];
189
+ if (freshness === undefined) {
190
+ throw new GeneratedModelMappingError("UNSUPPORTED_FRESHNESS", `The generated mapping has no freshness for ${result.freshness}.`);
191
+ }
192
+ const residualPosture = POSTURE_TO_GENERATED[result.residualPosture];
193
+ if (residualPosture === undefined) {
194
+ throw new GeneratedModelMappingError("UNSUPPORTED_RESIDUAL_POSTURE", `The generated mapping has no residual posture for ${result.residualPosture}.`);
195
+ }
196
+ if (sourceEvidence.evidence.kind !== result.kind) {
197
+ throw new GeneratedModelMappingError("EVIDENCE_MISMATCH", `Reading kind ${result.kind} disagrees with evidence facts kind ` +
198
+ `${sourceEvidence.evidence.kind}.`);
199
+ }
200
+ if (result.payload === null) {
201
+ throw new GeneratedModelMappingError("UNSERIALIZABLE_PAYLOAD", "A null payload cannot enter the generated model: payloadJson null is " +
202
+ "reserved for absent payloads, so the round-trip would not be loss-free.");
203
+ }
204
+ const payloadCanonicalJson = codec.encode(result.payload);
205
+ if (payloadCanonicalJson === undefined) {
206
+ throw new GeneratedModelMappingError("UNSERIALIZABLE_PAYLOAD", "The payload is not canonical-JSON-representable.");
207
+ }
208
+ const payloadDigest = sha256Hex(payloadCanonicalJson);
209
+ const basisFacts = sourceEvidence.basis;
210
+ const residueCanonicalJson = codec.encode({
211
+ basis: basisFacts,
212
+ evidence: sourceEvidence.evidence,
213
+ });
214
+ const basisId = deriveId("basis", {
215
+ repositoryId: ctx.repositoryId,
216
+ basis: basisFacts,
217
+ });
218
+ const evidenceId = deriveId("evidence", {
219
+ repositoryId: ctx.repositoryId,
220
+ basisId,
221
+ evidenceLabel: sourceEvidence.evidenceLabel,
222
+ residue: residueCanonicalJson,
223
+ });
224
+ const commitId = normalizeBasisString(basisFacts.head);
225
+ const refName = normalizeBasisString(basisFacts.ref);
226
+ const readingId = deriveId("reading", {
227
+ repositoryId: ctx.repositoryId,
228
+ basisId,
229
+ evidenceId,
230
+ readingKind: result.kind,
231
+ freshness: result.freshness,
232
+ residualPosture: result.residualPosture,
233
+ payloadDigest,
234
+ });
235
+ const basis = {
236
+ basisId,
237
+ repositoryId: ctx.repositoryId,
238
+ basisKind: toGeneratedStructuralBasisKind({ commitId, refName }),
239
+ commitId,
240
+ refName,
241
+ echoHeadId: null,
242
+ importBatchId: null,
243
+ summary: `git-warp committed-history basis for ${basisFacts.projectRoot}`,
244
+ };
245
+ const evidence = {
246
+ evidenceId,
247
+ evidenceKind: toGeneratedStructuralEvidenceKind(sourceEvidence.evidenceLabel),
248
+ substrate: "GIT_WARP",
249
+ basisId,
250
+ sourceRef: refName,
251
+ migrationBatchId: null,
252
+ nativeContinuumWitness: false,
253
+ parity: "NOT_CHECKED",
254
+ summary: residueCanonicalJson,
255
+ };
256
+ const reading = {
257
+ readingId,
258
+ repositoryId: ctx.repositoryId,
259
+ basisId,
260
+ evidenceId,
261
+ readingKind,
262
+ freshness,
263
+ residualPosture,
264
+ payloadDigest: payloadDigest,
265
+ payloadJson: result.payload,
266
+ summary: `${result.kind} reading via git-warp (${sourceEvidence.evidenceLabel})`,
267
+ };
268
+ return { reading, evidence, basis };
269
+ }
270
+ export function fromGeneratedStructuralReading(reading, evidence) {
271
+ if (evidence.evidenceKind === "ECHO_NATIVE" || evidence.nativeContinuumWitness) {
272
+ throw new GeneratedModelMappingError("ECHO_NATIVE_REFUSED", ECHO_NATIVE_REFUSAL_MESSAGE);
273
+ }
274
+ if (evidence.substrate !== "GIT_WARP") {
275
+ throw new GeneratedModelMappingError("UNSUPPORTED_SUBSTRATE", `The git-warp import mapping cannot reconstruct ${evidence.substrate}-substrate evidence.`);
276
+ }
277
+ const evidenceLabel = EVIDENCE_LABEL_FROM_GENERATED[evidence.evidenceKind];
278
+ if (evidenceLabel === undefined) {
279
+ throw new GeneratedModelMappingError("UNSUPPORTED_EVIDENCE_LABEL", `StructuralReadingPort has no git-warp label for generated ${evidence.evidenceKind}.`);
280
+ }
281
+ if (reading.evidenceId !== evidence.evidenceId || reading.basisId !== evidence.basisId) {
282
+ throw new GeneratedModelMappingError("EVIDENCE_MISMATCH", "Reading and evidence do not reference each other " +
283
+ `(reading ${reading.readingId} expects evidence ${reading.evidenceId}).`);
284
+ }
285
+ const kind = READING_KIND_FROM_GENERATED[reading.readingKind];
286
+ if (kind === undefined) {
287
+ throw new GeneratedModelMappingError("UNSUPPORTED_READING_KIND", `StructuralReadingPort has no reading kind for generated ${reading.readingKind}.`);
288
+ }
289
+ const freshness = FRESHNESS_FROM_GENERATED[reading.freshness];
290
+ if (freshness === undefined) {
291
+ throw new GeneratedModelMappingError("UNSUPPORTED_FRESHNESS", `StructuralReadingPort has no freshness for generated ${reading.freshness}.`);
292
+ }
293
+ const residualPosture = POSTURE_FROM_GENERATED[reading.residualPosture];
294
+ if (residualPosture === undefined) {
295
+ throw new GeneratedModelMappingError("UNSUPPORTED_RESIDUAL_POSTURE", `StructuralReadingPort has no residual posture for generated ${reading.residualPosture}.`);
296
+ }
297
+ if (reading.payloadJson === null || reading.payloadJson === undefined) {
298
+ throw new GeneratedModelMappingError("MISSING_PAYLOAD_JSON", `Reading ${reading.readingId} carries no payloadJson; the port result cannot be reconstructed.`);
299
+ }
300
+ const payloadDigest = sha256Hex(codec.encode(reading.payloadJson));
301
+ if (reading.payloadDigest !== payloadDigest) {
302
+ throw new GeneratedModelMappingError("PAYLOAD_DIGEST_MISMATCH", `Reading ${reading.readingId} payloadJson does not match its payloadDigest.`);
303
+ }
304
+ validatePayloadShape(kind, reading.payloadJson);
305
+ const facts = parseTranslatedSubstrateFacts(evidence.summary);
306
+ if (facts.evidence.kind !== kind) {
307
+ throw new GeneratedModelMappingError("EVIDENCE_MISMATCH", `Reading kind ${kind} disagrees with evidence facts kind ${facts.evidence.kind}.`);
308
+ }
309
+ return {
310
+ kind,
311
+ freshness,
312
+ residualPosture,
313
+ payload: reading.payloadJson,
314
+ evidence: {
315
+ kind: "translated-substrate",
316
+ evidenceLabel,
317
+ substrate: "git-warp",
318
+ basis: facts.basis,
319
+ evidence: facts.evidence,
320
+ nativeContinuumWitness: false,
321
+ },
322
+ };
323
+ }
324
+ //# sourceMappingURL=structural-reading-generated-model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"structural-reading-generated-model.js","sourceRoot":"","sources":["../../src/echo/structural-reading-generated-model.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAC9E,6EAA6E;AAC7E,EAAE;AACF,4EAA4E;AAC5E,2EAA2E;AAC3E,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,2EAA2E;AAC3E,4EAA4E;AAC5E,8EAA8E;AAC9E,4EAA4E;AAC5E,wEAAwE;AACxE,qBAAqB;AACrB,EAAE;AACF,4EAA4E;AAC5E,wEAAwE;AACxE,2EAA2E;AAC3E,qEAAqE;AACrE,mEAAmE;AACnE,2EAA2E;AAC3E,2EAA2E;AAC3E,EAAE;AACF,wEAAwE;AACxE,kEAAkE;AAClE,EAAE;AACF,oFAAoF;AACpF,8EAA8E;AAE9E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAYnE,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,iCAAiC,GASlC,MAAM,gCAAgC,CAAC;AAgBxC,MAAM,OAAO,0BAA2B,SAAQ,KAAK;IAC1C,IAAI,CAAiC;IAE9C,YAAY,IAAoC,EAAE,OAAe;QAC/D,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,4BAA4B,CAAC;QACzC,IAAI,CAAC,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ED,OAAO;QACL,IAAI;QACJ,SAAS;QACT,eAAe;QACf,OAAO,EAAE,OAAO,CAAC,WAAW;QAC5B,QAAQ,EAAE;YACR,IAAI,EAAE,sBAAsB;YAC5B,aAAa;YACb,SAAS,EAAE,UAAU;YACrB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,sBAAsB,EAAE,KAAK;SAC9B;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,135 @@
1
+ import { Writer, Reader } from '../echo/codec-runtime.js';
2
+ export type MigrationParityStatus = 'NOT_CHECKED' | 'MATCHED' | 'MISMATCHED' | 'PARTIAL';
3
+ export declare function _encMigrationParityStatus(w: Writer, v: MigrationParityStatus): void;
4
+ export declare function _decMigrationParityStatus(r: Reader): MigrationParityStatus;
5
+ export declare function encodeMigrationParityStatus(v: MigrationParityStatus): Uint8Array;
6
+ export declare function decodeMigrationParityStatus(b: Uint8Array): MigrationParityStatus;
7
+ export interface RecordGitWarpImportBatchInput {
8
+ importBatchId: string;
9
+ repositoryId: string;
10
+ sourceRef: string;
11
+ importedBasisId: string;
12
+ parity: MigrationParityStatus;
13
+ importedReadingCount: number;
14
+ summary: string;
15
+ }
16
+ export declare function _encRecordGitWarpImportBatchInput(w: Writer, v: RecordGitWarpImportBatchInput): void;
17
+ export declare function _decRecordGitWarpImportBatchInput(r: Reader): RecordGitWarpImportBatchInput;
18
+ export type SourceSpanEncoding = 'UTF8_BYTE_RANGE' | 'UTF16_CODE_UNIT_RANGE' | 'LINE_COLUMN';
19
+ export declare function _encSourceSpanEncoding(w: Writer, v: SourceSpanEncoding): void;
20
+ export declare function _decSourceSpanEncoding(r: Reader): SourceSpanEncoding;
21
+ export declare function encodeSourceSpanEncoding(v: SourceSpanEncoding): Uint8Array;
22
+ export declare function decodeSourceSpanEncoding(b: Uint8Array): SourceSpanEncoding;
23
+ export type StructuralBasisKind = 'GIT_COMMIT' | 'GIT_REF' | 'ECHO_HEAD' | 'LIVE_FRONTIER' | 'IMPORT_BATCH' | 'UNPINNED_COMMITTED';
24
+ export declare function _encStructuralBasisKind(w: Writer, v: StructuralBasisKind): void;
25
+ export declare function _decStructuralBasisKind(r: Reader): StructuralBasisKind;
26
+ export declare function encodeStructuralBasisKind(v: StructuralBasisKind): Uint8Array;
27
+ export declare function decodeStructuralBasisKind(b: Uint8Array): StructuralBasisKind;
28
+ export type StructuralEvidenceKind = 'ECHO_NATIVE' | 'GIT_WARP_IMPORTED' | 'FALLBACK_TRANSLATED';
29
+ export declare function _encStructuralEvidenceKind(w: Writer, v: StructuralEvidenceKind): void;
30
+ export declare function _decStructuralEvidenceKind(r: Reader): StructuralEvidenceKind;
31
+ export declare function encodeStructuralEvidenceKind(v: StructuralEvidenceKind): Uint8Array;
32
+ export declare function decodeStructuralEvidenceKind(b: Uint8Array): StructuralEvidenceKind;
33
+ export type StructuralReadingFreshness = 'CURRENT' | 'STALE' | 'INCOMPARABLE' | 'UNKNOWN' | 'LIVE_FRONTIER';
34
+ export declare function _encStructuralReadingFreshness(w: Writer, v: StructuralReadingFreshness): void;
35
+ export declare function _decStructuralReadingFreshness(r: Reader): StructuralReadingFreshness;
36
+ export declare function encodeStructuralReadingFreshness(v: StructuralReadingFreshness): Uint8Array;
37
+ export declare function decodeStructuralReadingFreshness(b: Uint8Array): StructuralReadingFreshness;
38
+ export type StructuralReadingKind = 'SYMBOL_REFERENCE_COUNT' | 'DEAD_SYMBOLS' | 'SYMBOL_HISTORY' | 'REFACTOR_DIFFICULTY' | 'STRUCTURAL_LOG' | 'STRUCTURAL_CHURN' | 'PRECISION_CODE_LOOKUP';
39
+ export declare function _encStructuralReadingKind(w: Writer, v: StructuralReadingKind): void;
40
+ export declare function _decStructuralReadingKind(r: Reader): StructuralReadingKind;
41
+ export declare function encodeStructuralReadingKind(v: StructuralReadingKind): Uint8Array;
42
+ export declare function decodeStructuralReadingKind(b: Uint8Array): StructuralReadingKind;
43
+ export type StructuralReadingResidualPosture = 'COMPLETE' | 'PARTIAL' | 'PLURAL' | 'BUDGET_LIMITED' | 'RIGHTS_LIMITED' | 'UNAVAILABLE' | 'OBSTRUCTED' | 'DEGRADED';
44
+ export declare function _encStructuralReadingResidualPosture(w: Writer, v: StructuralReadingResidualPosture): void;
45
+ export declare function _decStructuralReadingResidualPosture(r: Reader): StructuralReadingResidualPosture;
46
+ export declare function encodeStructuralReadingResidualPosture(v: StructuralReadingResidualPosture): Uint8Array;
47
+ export declare function decodeStructuralReadingResidualPosture(b: Uint8Array): StructuralReadingResidualPosture;
48
+ export type StructuralSubstrateKind = 'ECHO' | 'GIT_WARP';
49
+ export declare function _encStructuralSubstrateKind(w: Writer, v: StructuralSubstrateKind): void;
50
+ export declare function _decStructuralSubstrateKind(r: Reader): StructuralSubstrateKind;
51
+ export declare function encodeStructuralSubstrateKind(v: StructuralSubstrateKind): Uint8Array;
52
+ export declare function decodeStructuralSubstrateKind(b: Uint8Array): StructuralSubstrateKind;
53
+ export type SymbolRelationKind = 'IMPORTS' | 'EXPORTS' | 'REFERENCES' | 'CALLS' | 'DEFINES' | 'REMOVES';
54
+ export declare function _encSymbolRelationKind(w: Writer, v: SymbolRelationKind): void;
55
+ export declare function _decSymbolRelationKind(r: Reader): SymbolRelationKind;
56
+ export declare function encodeSymbolRelationKind(v: SymbolRelationKind): Uint8Array;
57
+ export declare function decodeSymbolRelationKind(b: Uint8Array): SymbolRelationKind;
58
+ export type SymbolVisibility = 'LOCAL' | 'EXPORTED' | 'UNKNOWN';
59
+ export declare function _encSymbolVisibility(w: Writer, v: SymbolVisibility): void;
60
+ export declare function _decSymbolVisibility(r: Reader): SymbolVisibility;
61
+ export declare function encodeSymbolVisibility(v: SymbolVisibility): Uint8Array;
62
+ export declare function decodeSymbolVisibility(b: Uint8Array): SymbolVisibility;
63
+ /** EINT op id for query `structuralRepositories`. Stable across Rust and TypeScript emitters. */
64
+ export declare const OP_STRUCTURAL_REPOSITORIES: number;
65
+ export interface StructuralRepositoriesVars {
66
+ repositoryId: string | null;
67
+ }
68
+ export declare function encodeStructuralRepositoriesVars(v: StructuralRepositoriesVars): Uint8Array;
69
+ export declare function decodeStructuralRepositoriesVars(b: Uint8Array): StructuralRepositoriesVars;
70
+ /** EINT op id for query `structuralBases`. Stable across Rust and TypeScript emitters. */
71
+ export declare const OP_STRUCTURAL_BASES: number;
72
+ export interface StructuralBasesVars {
73
+ repositoryId: string;
74
+ basisKind: StructuralBasisKind | null;
75
+ }
76
+ export declare function encodeStructuralBasesVars(v: StructuralBasesVars): Uint8Array;
77
+ export declare function decodeStructuralBasesVars(b: Uint8Array): StructuralBasesVars;
78
+ /** EINT op id for query `structuralFileVersions`. Stable across Rust and TypeScript emitters. */
79
+ export declare const OP_STRUCTURAL_FILE_VERSIONS: number;
80
+ export interface StructuralFileVersionsVars {
81
+ basisId: string;
82
+ path: string | null;
83
+ }
84
+ export declare function encodeStructuralFileVersionsVars(v: StructuralFileVersionsVars): Uint8Array;
85
+ export declare function decodeStructuralFileVersionsVars(b: Uint8Array): StructuralFileVersionsVars;
86
+ /** EINT op id for query `structuralSymbols`. Stable across Rust and TypeScript emitters. */
87
+ export declare const OP_STRUCTURAL_SYMBOLS: number;
88
+ export interface StructuralSymbolsVars {
89
+ basisId: string;
90
+ fileVersionId: string | null;
91
+ name: string | null;
92
+ }
93
+ export declare function encodeStructuralSymbolsVars(v: StructuralSymbolsVars): Uint8Array;
94
+ export declare function decodeStructuralSymbolsVars(b: Uint8Array): StructuralSymbolsVars;
95
+ /** EINT op id for query `structuralSymbolRelations`. Stable across Rust and TypeScript emitters. */
96
+ export declare const OP_STRUCTURAL_SYMBOL_RELATIONS: number;
97
+ export interface StructuralSymbolRelationsVars {
98
+ basisId: string;
99
+ symbolId: string | null;
100
+ relationKind: SymbolRelationKind | null;
101
+ }
102
+ export declare function encodeStructuralSymbolRelationsVars(v: StructuralSymbolRelationsVars): Uint8Array;
103
+ export declare function decodeStructuralSymbolRelationsVars(b: Uint8Array): StructuralSymbolRelationsVars;
104
+ /** EINT op id for query `structuralReadings`. Stable across Rust and TypeScript emitters. */
105
+ export declare const OP_STRUCTURAL_READINGS: number;
106
+ export interface StructuralReadingsVars {
107
+ basisId: string;
108
+ readingKind: StructuralReadingKind | null;
109
+ }
110
+ export declare function encodeStructuralReadingsVars(v: StructuralReadingsVars): Uint8Array;
111
+ export declare function decodeStructuralReadingsVars(b: Uint8Array): StructuralReadingsVars;
112
+ /** EINT op id for query `structuralReadingEvidence`. Stable across Rust and TypeScript emitters. */
113
+ export declare const OP_STRUCTURAL_READING_EVIDENCE: number;
114
+ export interface StructuralReadingEvidenceVars {
115
+ evidenceId: string | null;
116
+ basisId: string | null;
117
+ }
118
+ export declare function encodeStructuralReadingEvidenceVars(v: StructuralReadingEvidenceVars): Uint8Array;
119
+ export declare function decodeStructuralReadingEvidenceVars(b: Uint8Array): StructuralReadingEvidenceVars;
120
+ /** EINT op id for query `gitWarpImportBatches`. Stable across Rust and TypeScript emitters. */
121
+ export declare const OP_GIT_WARP_IMPORT_BATCHES: number;
122
+ export interface GitWarpImportBatchesVars {
123
+ repositoryId: string;
124
+ parity: MigrationParityStatus | null;
125
+ }
126
+ export declare function encodeGitWarpImportBatchesVars(v: GitWarpImportBatchesVars): Uint8Array;
127
+ export declare function decodeGitWarpImportBatchesVars(b: Uint8Array): GitWarpImportBatchesVars;
128
+ /** EINT op id for mutation `recordGitWarpImportBatch`. Stable across Rust and TypeScript emitters. */
129
+ export declare const OP_RECORD_GIT_WARP_IMPORT_BATCH: number;
130
+ export interface RecordGitWarpImportBatchVars {
131
+ input: RecordGitWarpImportBatchInput;
132
+ }
133
+ export declare function encodeRecordGitWarpImportBatchVars(v: RecordGitWarpImportBatchVars): Uint8Array;
134
+ export declare function decodeRecordGitWarpImportBatchVars(b: Uint8Array): RecordGitWarpImportBatchVars;
135
+ //# sourceMappingURL=graft-structural-history.codec.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graft-structural-history.codec.generated.d.ts","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