@metaobjectsdev/sdk 0.5.0-rc.1

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 (118) hide show
  1. package/LICENSE +189 -0
  2. package/README.md +32 -0
  3. package/dist/agent-docs/body.d.ts +2 -0
  4. package/dist/agent-docs/body.d.ts.map +1 -0
  5. package/dist/agent-docs/body.js +563 -0
  6. package/dist/agent-docs/body.js.map +1 -0
  7. package/dist/agent-docs/content-hash.d.ts +8 -0
  8. package/dist/agent-docs/content-hash.d.ts.map +1 -0
  9. package/dist/agent-docs/content-hash.js +23 -0
  10. package/dist/agent-docs/content-hash.js.map +1 -0
  11. package/dist/agent-docs/index.d.ts +3 -0
  12. package/dist/agent-docs/index.d.ts.map +1 -0
  13. package/dist/agent-docs/index.js +4 -0
  14. package/dist/agent-docs/index.js.map +1 -0
  15. package/dist/config.d.ts +113 -0
  16. package/dist/config.d.ts.map +1 -0
  17. package/dist/config.js +53 -0
  18. package/dist/config.js.map +1 -0
  19. package/dist/forge-types.d.ts +47 -0
  20. package/dist/forge-types.d.ts.map +1 -0
  21. package/dist/forge-types.js +133 -0
  22. package/dist/forge-types.js.map +1 -0
  23. package/dist/index.d.ts +20 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +39 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/memory.d.ts +30 -0
  28. package/dist/memory.d.ts.map +1 -0
  29. package/dist/memory.js +105 -0
  30. package/dist/memory.js.map +1 -0
  31. package/dist/package.d.ts +65 -0
  32. package/dist/package.d.ts.map +1 -0
  33. package/dist/package.js +105 -0
  34. package/dist/package.js.map +1 -0
  35. package/dist/paths.d.ts +5 -0
  36. package/dist/paths.d.ts.map +1 -0
  37. package/dist/paths.js +26 -0
  38. package/dist/paths.js.map +1 -0
  39. package/dist/records/any.d.ts +467 -0
  40. package/dist/records/any.d.ts.map +1 -0
  41. package/dist/records/any.js +14 -0
  42. package/dist/records/any.js.map +1 -0
  43. package/dist/records/convention.d.ts +90 -0
  44. package/dist/records/convention.d.ts.map +1 -0
  45. package/dist/records/convention.js +9 -0
  46. package/dist/records/convention.js.map +1 -0
  47. package/dist/records/core.d.ts +84 -0
  48. package/dist/records/core.d.ts.map +1 -0
  49. package/dist/records/core.js +47 -0
  50. package/dist/records/core.js.map +1 -0
  51. package/dist/records/decision.d.ts +90 -0
  52. package/dist/records/decision.d.ts.map +1 -0
  53. package/dist/records/decision.js +9 -0
  54. package/dist/records/decision.js.map +1 -0
  55. package/dist/records/failure.d.ts +93 -0
  56. package/dist/records/failure.d.ts.map +1 -0
  57. package/dist/records/failure.js +10 -0
  58. package/dist/records/failure.js.map +1 -0
  59. package/dist/records/glossary.d.ts +111 -0
  60. package/dist/records/glossary.d.ts.map +1 -0
  61. package/dist/records/glossary.js +14 -0
  62. package/dist/records/glossary.js.map +1 -0
  63. package/dist/records/principle.d.ts +99 -0
  64. package/dist/records/principle.d.ts.map +1 -0
  65. package/dist/records/principle.js +12 -0
  66. package/dist/records/principle.js.map +1 -0
  67. package/dist/storage/errors.d.ts +14 -0
  68. package/dist/storage/errors.d.ts.map +1 -0
  69. package/dist/storage/errors.js +27 -0
  70. package/dist/storage/errors.js.map +1 -0
  71. package/dist/storage/index.d.ts +7 -0
  72. package/dist/storage/index.d.ts.map +1 -0
  73. package/dist/storage/index.js +6 -0
  74. package/dist/storage/index.js.map +1 -0
  75. package/dist/storage/lifecycle.d.ts +5 -0
  76. package/dist/storage/lifecycle.d.ts.map +1 -0
  77. package/dist/storage/lifecycle.js +27 -0
  78. package/dist/storage/lifecycle.js.map +1 -0
  79. package/dist/storage/list.d.ts +8 -0
  80. package/dist/storage/list.d.ts.map +1 -0
  81. package/dist/storage/list.js +42 -0
  82. package/dist/storage/list.js.map +1 -0
  83. package/dist/storage/read.d.ts +9 -0
  84. package/dist/storage/read.d.ts.map +1 -0
  85. package/dist/storage/read.js +43 -0
  86. package/dist/storage/read.js.map +1 -0
  87. package/dist/storage/write.d.ts +8 -0
  88. package/dist/storage/write.d.ts.map +1 -0
  89. package/dist/storage/write.js +20 -0
  90. package/dist/storage/write.js.map +1 -0
  91. package/dist/workspace.d.ts +49 -0
  92. package/dist/workspace.d.ts.map +1 -0
  93. package/dist/workspace.js +280 -0
  94. package/dist/workspace.js.map +1 -0
  95. package/package.json +48 -0
  96. package/src/agent-docs/body.ts +562 -0
  97. package/src/agent-docs/content-hash.ts +25 -0
  98. package/src/agent-docs/index.ts +8 -0
  99. package/src/config.ts +69 -0
  100. package/src/forge-types.ts +167 -0
  101. package/src/index.ts +98 -0
  102. package/src/memory.ts +116 -0
  103. package/src/package.ts +120 -0
  104. package/src/paths.ts +30 -0
  105. package/src/records/any.ts +15 -0
  106. package/src/records/convention.ts +10 -0
  107. package/src/records/core.ts +55 -0
  108. package/src/records/decision.ts +10 -0
  109. package/src/records/failure.ts +11 -0
  110. package/src/records/glossary.ts +15 -0
  111. package/src/records/principle.ts +13 -0
  112. package/src/storage/errors.ts +23 -0
  113. package/src/storage/index.ts +10 -0
  114. package/src/storage/lifecycle.ts +38 -0
  115. package/src/storage/list.ts +53 -0
  116. package/src/storage/read.ts +54 -0
  117. package/src/storage/write.ts +32 -0
  118. package/src/workspace.ts +342 -0
@@ -0,0 +1,467 @@
1
+ import { z } from "zod";
2
+ export declare const AnyRecord: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3
+ schema_version: z.ZodLiteral<1>;
4
+ id: z.ZodString;
5
+ title: z.ZodString;
6
+ confidence: z.ZodNumber;
7
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
8
+ captured_at: z.ZodString;
9
+ last_validated_against_commit: z.ZodString;
10
+ superseded_by: z.ZodOptional<z.ZodString>;
11
+ evidence: z.ZodOptional<z.ZodObject<{
12
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
14
+ conversation_id: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ commits?: string[] | undefined;
17
+ prs?: string[] | undefined;
18
+ conversation_id?: string | undefined;
19
+ }, {
20
+ commits?: string[] | undefined;
21
+ prs?: string[] | undefined;
22
+ conversation_id?: string | undefined;
23
+ }>>;
24
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
25
+ when: z.ZodString;
26
+ why: z.ZodString;
27
+ conversation_id: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ when: string;
30
+ why: string;
31
+ conversation_id?: string | undefined;
32
+ }, {
33
+ when: string;
34
+ why: string;
35
+ conversation_id?: string | undefined;
36
+ }>, "many">>;
37
+ } & {
38
+ type: z.ZodLiteral<"convention">;
39
+ pattern_description: z.ZodString;
40
+ examples: z.ZodArray<z.ZodString, "many">;
41
+ applies_to: z.ZodArray<z.ZodString, "many">;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "convention";
44
+ schema_version: 1;
45
+ id: string;
46
+ title: string;
47
+ confidence: number;
48
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
49
+ captured_at: string;
50
+ last_validated_against_commit: string;
51
+ deviations: {
52
+ when: string;
53
+ why: string;
54
+ conversation_id?: string | undefined;
55
+ }[];
56
+ pattern_description: string;
57
+ examples: string[];
58
+ applies_to: string[];
59
+ superseded_by?: string | undefined;
60
+ evidence?: {
61
+ commits?: string[] | undefined;
62
+ prs?: string[] | undefined;
63
+ conversation_id?: string | undefined;
64
+ } | undefined;
65
+ }, {
66
+ type: "convention";
67
+ schema_version: 1;
68
+ id: string;
69
+ title: string;
70
+ confidence: number;
71
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
72
+ captured_at: string;
73
+ last_validated_against_commit: string;
74
+ pattern_description: string;
75
+ examples: string[];
76
+ applies_to: string[];
77
+ superseded_by?: string | undefined;
78
+ evidence?: {
79
+ commits?: string[] | undefined;
80
+ prs?: string[] | undefined;
81
+ conversation_id?: string | undefined;
82
+ } | undefined;
83
+ deviations?: {
84
+ when: string;
85
+ why: string;
86
+ conversation_id?: string | undefined;
87
+ }[] | undefined;
88
+ }>, z.ZodObject<{
89
+ schema_version: z.ZodLiteral<1>;
90
+ id: z.ZodString;
91
+ title: z.ZodString;
92
+ confidence: z.ZodNumber;
93
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
94
+ captured_at: z.ZodString;
95
+ last_validated_against_commit: z.ZodString;
96
+ superseded_by: z.ZodOptional<z.ZodString>;
97
+ evidence: z.ZodOptional<z.ZodObject<{
98
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
99
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
100
+ conversation_id: z.ZodOptional<z.ZodString>;
101
+ }, "strip", z.ZodTypeAny, {
102
+ commits?: string[] | undefined;
103
+ prs?: string[] | undefined;
104
+ conversation_id?: string | undefined;
105
+ }, {
106
+ commits?: string[] | undefined;
107
+ prs?: string[] | undefined;
108
+ conversation_id?: string | undefined;
109
+ }>>;
110
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
111
+ when: z.ZodString;
112
+ why: z.ZodString;
113
+ conversation_id: z.ZodOptional<z.ZodString>;
114
+ }, "strip", z.ZodTypeAny, {
115
+ when: string;
116
+ why: string;
117
+ conversation_id?: string | undefined;
118
+ }, {
119
+ when: string;
120
+ why: string;
121
+ conversation_id?: string | undefined;
122
+ }>, "many">>;
123
+ } & {
124
+ type: z.ZodLiteral<"decision">;
125
+ rationale: z.ZodString;
126
+ alternatives_considered: z.ZodArray<z.ZodString, "many">;
127
+ scope: z.ZodUnion<[z.ZodLiteral<"global">, z.ZodArray<z.ZodString, "many">]>;
128
+ }, "strip", z.ZodTypeAny, {
129
+ type: "decision";
130
+ schema_version: 1;
131
+ id: string;
132
+ title: string;
133
+ confidence: number;
134
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
135
+ captured_at: string;
136
+ last_validated_against_commit: string;
137
+ deviations: {
138
+ when: string;
139
+ why: string;
140
+ conversation_id?: string | undefined;
141
+ }[];
142
+ rationale: string;
143
+ alternatives_considered: string[];
144
+ scope: string[] | "global";
145
+ superseded_by?: string | undefined;
146
+ evidence?: {
147
+ commits?: string[] | undefined;
148
+ prs?: string[] | undefined;
149
+ conversation_id?: string | undefined;
150
+ } | undefined;
151
+ }, {
152
+ type: "decision";
153
+ schema_version: 1;
154
+ id: string;
155
+ title: string;
156
+ confidence: number;
157
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
158
+ captured_at: string;
159
+ last_validated_against_commit: string;
160
+ rationale: string;
161
+ alternatives_considered: string[];
162
+ scope: string[] | "global";
163
+ superseded_by?: string | undefined;
164
+ evidence?: {
165
+ commits?: string[] | undefined;
166
+ prs?: string[] | undefined;
167
+ conversation_id?: string | undefined;
168
+ } | undefined;
169
+ deviations?: {
170
+ when: string;
171
+ why: string;
172
+ conversation_id?: string | undefined;
173
+ }[] | undefined;
174
+ }>, z.ZodObject<{
175
+ schema_version: z.ZodLiteral<1>;
176
+ id: z.ZodString;
177
+ title: z.ZodString;
178
+ confidence: z.ZodNumber;
179
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
180
+ captured_at: z.ZodString;
181
+ last_validated_against_commit: z.ZodString;
182
+ superseded_by: z.ZodOptional<z.ZodString>;
183
+ evidence: z.ZodOptional<z.ZodObject<{
184
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
185
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
186
+ conversation_id: z.ZodOptional<z.ZodString>;
187
+ }, "strip", z.ZodTypeAny, {
188
+ commits?: string[] | undefined;
189
+ prs?: string[] | undefined;
190
+ conversation_id?: string | undefined;
191
+ }, {
192
+ commits?: string[] | undefined;
193
+ prs?: string[] | undefined;
194
+ conversation_id?: string | undefined;
195
+ }>>;
196
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
197
+ when: z.ZodString;
198
+ why: z.ZodString;
199
+ conversation_id: z.ZodOptional<z.ZodString>;
200
+ }, "strip", z.ZodTypeAny, {
201
+ when: string;
202
+ why: string;
203
+ conversation_id?: string | undefined;
204
+ }, {
205
+ when: string;
206
+ why: string;
207
+ conversation_id?: string | undefined;
208
+ }>, "many">>;
209
+ } & {
210
+ type: z.ZodLiteral<"principle">;
211
+ statement: z.ZodString;
212
+ rationale: z.ZodString;
213
+ scope: z.ZodArray<z.ZodString, "many">;
214
+ examples: z.ZodArray<z.ZodString, "many">;
215
+ counter_examples: z.ZodArray<z.ZodString, "many">;
216
+ enforcement: z.ZodDefault<z.ZodEnum<["advisory", "block"]>>;
217
+ }, "strip", z.ZodTypeAny, {
218
+ type: "principle";
219
+ schema_version: 1;
220
+ id: string;
221
+ title: string;
222
+ confidence: number;
223
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
224
+ captured_at: string;
225
+ last_validated_against_commit: string;
226
+ deviations: {
227
+ when: string;
228
+ why: string;
229
+ conversation_id?: string | undefined;
230
+ }[];
231
+ examples: string[];
232
+ rationale: string;
233
+ scope: string[];
234
+ statement: string;
235
+ counter_examples: string[];
236
+ enforcement: "advisory" | "block";
237
+ superseded_by?: string | undefined;
238
+ evidence?: {
239
+ commits?: string[] | undefined;
240
+ prs?: string[] | undefined;
241
+ conversation_id?: string | undefined;
242
+ } | undefined;
243
+ }, {
244
+ type: "principle";
245
+ schema_version: 1;
246
+ id: string;
247
+ title: string;
248
+ confidence: number;
249
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
250
+ captured_at: string;
251
+ last_validated_against_commit: string;
252
+ examples: string[];
253
+ rationale: string;
254
+ scope: string[];
255
+ statement: string;
256
+ counter_examples: string[];
257
+ superseded_by?: string | undefined;
258
+ evidence?: {
259
+ commits?: string[] | undefined;
260
+ prs?: string[] | undefined;
261
+ conversation_id?: string | undefined;
262
+ } | undefined;
263
+ deviations?: {
264
+ when: string;
265
+ why: string;
266
+ conversation_id?: string | undefined;
267
+ }[] | undefined;
268
+ enforcement?: "advisory" | "block" | undefined;
269
+ }>, z.ZodObject<{
270
+ schema_version: z.ZodLiteral<1>;
271
+ id: z.ZodString;
272
+ title: z.ZodString;
273
+ confidence: z.ZodNumber;
274
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
275
+ captured_at: z.ZodString;
276
+ last_validated_against_commit: z.ZodString;
277
+ superseded_by: z.ZodOptional<z.ZodString>;
278
+ evidence: z.ZodOptional<z.ZodObject<{
279
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
280
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
281
+ conversation_id: z.ZodOptional<z.ZodString>;
282
+ }, "strip", z.ZodTypeAny, {
283
+ commits?: string[] | undefined;
284
+ prs?: string[] | undefined;
285
+ conversation_id?: string | undefined;
286
+ }, {
287
+ commits?: string[] | undefined;
288
+ prs?: string[] | undefined;
289
+ conversation_id?: string | undefined;
290
+ }>>;
291
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
292
+ when: z.ZodString;
293
+ why: z.ZodString;
294
+ conversation_id: z.ZodOptional<z.ZodString>;
295
+ }, "strip", z.ZodTypeAny, {
296
+ when: string;
297
+ why: string;
298
+ conversation_id?: string | undefined;
299
+ }, {
300
+ when: string;
301
+ why: string;
302
+ conversation_id?: string | undefined;
303
+ }>, "many">>;
304
+ } & {
305
+ type: z.ZodLiteral<"glossary">;
306
+ term: z.ZodString;
307
+ synonyms: z.ZodArray<z.ZodString, "many">;
308
+ definition: z.ZodString;
309
+ code_anchors: z.ZodObject<{
310
+ entity: z.ZodOptional<z.ZodString>;
311
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
312
+ }, "strip", z.ZodTypeAny, {
313
+ entity?: string | undefined;
314
+ files?: string[] | undefined;
315
+ }, {
316
+ entity?: string | undefined;
317
+ files?: string[] | undefined;
318
+ }>;
319
+ see_also: z.ZodArray<z.ZodString, "many">;
320
+ }, "strip", z.ZodTypeAny, {
321
+ type: "glossary";
322
+ schema_version: 1;
323
+ id: string;
324
+ title: string;
325
+ confidence: number;
326
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
327
+ captured_at: string;
328
+ last_validated_against_commit: string;
329
+ deviations: {
330
+ when: string;
331
+ why: string;
332
+ conversation_id?: string | undefined;
333
+ }[];
334
+ term: string;
335
+ synonyms: string[];
336
+ definition: string;
337
+ code_anchors: {
338
+ entity?: string | undefined;
339
+ files?: string[] | undefined;
340
+ };
341
+ see_also: string[];
342
+ superseded_by?: string | undefined;
343
+ evidence?: {
344
+ commits?: string[] | undefined;
345
+ prs?: string[] | undefined;
346
+ conversation_id?: string | undefined;
347
+ } | undefined;
348
+ }, {
349
+ type: "glossary";
350
+ schema_version: 1;
351
+ id: string;
352
+ title: string;
353
+ confidence: number;
354
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
355
+ captured_at: string;
356
+ last_validated_against_commit: string;
357
+ term: string;
358
+ synonyms: string[];
359
+ definition: string;
360
+ code_anchors: {
361
+ entity?: string | undefined;
362
+ files?: string[] | undefined;
363
+ };
364
+ see_also: string[];
365
+ superseded_by?: string | undefined;
366
+ evidence?: {
367
+ commits?: string[] | undefined;
368
+ prs?: string[] | undefined;
369
+ conversation_id?: string | undefined;
370
+ } | undefined;
371
+ deviations?: {
372
+ when: string;
373
+ why: string;
374
+ conversation_id?: string | undefined;
375
+ }[] | undefined;
376
+ }>, z.ZodObject<{
377
+ schema_version: z.ZodLiteral<1>;
378
+ id: z.ZodString;
379
+ title: z.ZodString;
380
+ confidence: z.ZodNumber;
381
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
382
+ captured_at: z.ZodString;
383
+ last_validated_against_commit: z.ZodString;
384
+ superseded_by: z.ZodOptional<z.ZodString>;
385
+ evidence: z.ZodOptional<z.ZodObject<{
386
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
387
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
388
+ conversation_id: z.ZodOptional<z.ZodString>;
389
+ }, "strip", z.ZodTypeAny, {
390
+ commits?: string[] | undefined;
391
+ prs?: string[] | undefined;
392
+ conversation_id?: string | undefined;
393
+ }, {
394
+ commits?: string[] | undefined;
395
+ prs?: string[] | undefined;
396
+ conversation_id?: string | undefined;
397
+ }>>;
398
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
399
+ when: z.ZodString;
400
+ why: z.ZodString;
401
+ conversation_id: z.ZodOptional<z.ZodString>;
402
+ }, "strip", z.ZodTypeAny, {
403
+ when: string;
404
+ why: string;
405
+ conversation_id?: string | undefined;
406
+ }, {
407
+ when: string;
408
+ why: string;
409
+ conversation_id?: string | undefined;
410
+ }>, "many">>;
411
+ } & {
412
+ type: z.ZodLiteral<"failure">;
413
+ what_was_tried: z.ZodString;
414
+ why_it_failed: z.ZodString;
415
+ do_not_repeat_in: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
416
+ related_decisions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
417
+ }, "strip", z.ZodTypeAny, {
418
+ type: "failure";
419
+ schema_version: 1;
420
+ id: string;
421
+ title: string;
422
+ confidence: number;
423
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
424
+ captured_at: string;
425
+ last_validated_against_commit: string;
426
+ deviations: {
427
+ when: string;
428
+ why: string;
429
+ conversation_id?: string | undefined;
430
+ }[];
431
+ what_was_tried: string;
432
+ why_it_failed: string;
433
+ superseded_by?: string | undefined;
434
+ evidence?: {
435
+ commits?: string[] | undefined;
436
+ prs?: string[] | undefined;
437
+ conversation_id?: string | undefined;
438
+ } | undefined;
439
+ do_not_repeat_in?: string[] | undefined;
440
+ related_decisions?: string[] | undefined;
441
+ }, {
442
+ type: "failure";
443
+ schema_version: 1;
444
+ id: string;
445
+ title: string;
446
+ confidence: number;
447
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
448
+ captured_at: string;
449
+ last_validated_against_commit: string;
450
+ what_was_tried: string;
451
+ why_it_failed: string;
452
+ superseded_by?: string | undefined;
453
+ evidence?: {
454
+ commits?: string[] | undefined;
455
+ prs?: string[] | undefined;
456
+ conversation_id?: string | undefined;
457
+ } | undefined;
458
+ deviations?: {
459
+ when: string;
460
+ why: string;
461
+ conversation_id?: string | undefined;
462
+ }[] | undefined;
463
+ do_not_repeat_in?: string[] | undefined;
464
+ related_decisions?: string[] | undefined;
465
+ }>]>;
466
+ export type AnyRecord = z.infer<typeof AnyRecord>;
467
+ //# sourceMappingURL=any.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.d.ts","sourceRoot":"","sources":["../../src/records/any.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMpB,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { z } from "zod";
2
+ import { ConventionRecord } from "./convention.js";
3
+ import { DecisionRecord } from "./decision.js";
4
+ import { PrincipleRecord } from "./principle.js";
5
+ import { GlossaryRecord } from "./glossary.js";
6
+ import { FailureRecord } from "./failure.js";
7
+ export const AnyRecord = z.discriminatedUnion("type", [
8
+ ConventionRecord,
9
+ DecisionRecord,
10
+ PrincipleRecord,
11
+ GlossaryRecord,
12
+ FailureRecord,
13
+ ]);
14
+ //# sourceMappingURL=any.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"any.js","sourceRoot":"","sources":["../../src/records/any.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IACpD,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,cAAc;IACd,aAAa;CACd,CAAC,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { z } from "zod";
2
+ export declare const ConventionRecord: z.ZodObject<{
3
+ schema_version: z.ZodLiteral<1>;
4
+ id: z.ZodString;
5
+ title: z.ZodString;
6
+ confidence: z.ZodNumber;
7
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
8
+ captured_at: z.ZodString;
9
+ last_validated_against_commit: z.ZodString;
10
+ superseded_by: z.ZodOptional<z.ZodString>;
11
+ evidence: z.ZodOptional<z.ZodObject<{
12
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
14
+ conversation_id: z.ZodOptional<z.ZodString>;
15
+ }, "strip", z.ZodTypeAny, {
16
+ commits?: string[] | undefined;
17
+ prs?: string[] | undefined;
18
+ conversation_id?: string | undefined;
19
+ }, {
20
+ commits?: string[] | undefined;
21
+ prs?: string[] | undefined;
22
+ conversation_id?: string | undefined;
23
+ }>>;
24
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
25
+ when: z.ZodString;
26
+ why: z.ZodString;
27
+ conversation_id: z.ZodOptional<z.ZodString>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ when: string;
30
+ why: string;
31
+ conversation_id?: string | undefined;
32
+ }, {
33
+ when: string;
34
+ why: string;
35
+ conversation_id?: string | undefined;
36
+ }>, "many">>;
37
+ } & {
38
+ type: z.ZodLiteral<"convention">;
39
+ pattern_description: z.ZodString;
40
+ examples: z.ZodArray<z.ZodString, "many">;
41
+ applies_to: z.ZodArray<z.ZodString, "many">;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "convention";
44
+ schema_version: 1;
45
+ id: string;
46
+ title: string;
47
+ confidence: number;
48
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
49
+ captured_at: string;
50
+ last_validated_against_commit: string;
51
+ deviations: {
52
+ when: string;
53
+ why: string;
54
+ conversation_id?: string | undefined;
55
+ }[];
56
+ pattern_description: string;
57
+ examples: string[];
58
+ applies_to: string[];
59
+ superseded_by?: string | undefined;
60
+ evidence?: {
61
+ commits?: string[] | undefined;
62
+ prs?: string[] | undefined;
63
+ conversation_id?: string | undefined;
64
+ } | undefined;
65
+ }, {
66
+ type: "convention";
67
+ schema_version: 1;
68
+ id: string;
69
+ title: string;
70
+ confidence: number;
71
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
72
+ captured_at: string;
73
+ last_validated_against_commit: string;
74
+ pattern_description: string;
75
+ examples: string[];
76
+ applies_to: string[];
77
+ superseded_by?: string | undefined;
78
+ evidence?: {
79
+ commits?: string[] | undefined;
80
+ prs?: string[] | undefined;
81
+ conversation_id?: string | undefined;
82
+ } | undefined;
83
+ deviations?: {
84
+ when: string;
85
+ why: string;
86
+ conversation_id?: string | undefined;
87
+ }[] | undefined;
88
+ }>;
89
+ export type ConventionRecord = z.infer<typeof ConventionRecord>;
90
+ //# sourceMappingURL=convention.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convention.d.ts","sourceRoot":"","sources":["../../src/records/convention.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+ import { RecordCore } from "./core.js";
3
+ export const ConventionRecord = RecordCore.extend({
4
+ type: z.literal("convention"),
5
+ pattern_description: z.string(),
6
+ examples: z.array(z.string()),
7
+ applies_to: z.array(z.string()),
8
+ });
9
+ //# sourceMappingURL=convention.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convention.js","sourceRoot":"","sources":["../../src/records/convention.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM,CAAC;IAChD,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC;IAC7B,mBAAmB,EAAE,CAAC,CAAC,MAAM,EAAE;IAC/B,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;CAChC,CAAC,CAAC"}
@@ -0,0 +1,84 @@
1
+ import { z } from "zod";
2
+ export declare const RecordType: z.ZodEnum<["convention", "decision", "principle", "glossary", "failure"]>;
3
+ export type RecordType = z.infer<typeof RecordType>;
4
+ export declare const RecordSource: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
5
+ export type RecordSource = z.infer<typeof RecordSource>;
6
+ export declare const RecordCore: z.ZodObject<{
7
+ schema_version: z.ZodLiteral<1>;
8
+ type: z.ZodEnum<["convention", "decision", "principle", "glossary", "failure"]>;
9
+ id: z.ZodString;
10
+ title: z.ZodString;
11
+ confidence: z.ZodNumber;
12
+ source: z.ZodEnum<["ts-ast", "drizzle", "prisma", "openapi", "human", "claude", "llm-from-commits", "llm-from-prs", "ingest:ts-ast", "ingest:drizzle", "ingest:zod"]>;
13
+ captured_at: z.ZodString;
14
+ last_validated_against_commit: z.ZodString;
15
+ superseded_by: z.ZodOptional<z.ZodString>;
16
+ evidence: z.ZodOptional<z.ZodObject<{
17
+ commits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ prs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
+ conversation_id: z.ZodOptional<z.ZodString>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ commits?: string[] | undefined;
22
+ prs?: string[] | undefined;
23
+ conversation_id?: string | undefined;
24
+ }, {
25
+ commits?: string[] | undefined;
26
+ prs?: string[] | undefined;
27
+ conversation_id?: string | undefined;
28
+ }>>;
29
+ deviations: z.ZodDefault<z.ZodArray<z.ZodObject<{
30
+ when: z.ZodString;
31
+ why: z.ZodString;
32
+ conversation_id: z.ZodOptional<z.ZodString>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ when: string;
35
+ why: string;
36
+ conversation_id?: string | undefined;
37
+ }, {
38
+ when: string;
39
+ why: string;
40
+ conversation_id?: string | undefined;
41
+ }>, "many">>;
42
+ }, "strip", z.ZodTypeAny, {
43
+ type: "decision" | "principle" | "convention" | "glossary" | "failure";
44
+ schema_version: 1;
45
+ id: string;
46
+ title: string;
47
+ confidence: number;
48
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
49
+ captured_at: string;
50
+ last_validated_against_commit: string;
51
+ deviations: {
52
+ when: string;
53
+ why: string;
54
+ conversation_id?: string | undefined;
55
+ }[];
56
+ superseded_by?: string | undefined;
57
+ evidence?: {
58
+ commits?: string[] | undefined;
59
+ prs?: string[] | undefined;
60
+ conversation_id?: string | undefined;
61
+ } | undefined;
62
+ }, {
63
+ type: "decision" | "principle" | "convention" | "glossary" | "failure";
64
+ schema_version: 1;
65
+ id: string;
66
+ title: string;
67
+ confidence: number;
68
+ source: "ts-ast" | "drizzle" | "prisma" | "openapi" | "human" | "claude" | "llm-from-commits" | "llm-from-prs" | "ingest:ts-ast" | "ingest:drizzle" | "ingest:zod";
69
+ captured_at: string;
70
+ last_validated_against_commit: string;
71
+ superseded_by?: string | undefined;
72
+ evidence?: {
73
+ commits?: string[] | undefined;
74
+ prs?: string[] | undefined;
75
+ conversation_id?: string | undefined;
76
+ } | undefined;
77
+ deviations?: {
78
+ when: string;
79
+ why: string;
80
+ conversation_id?: string | undefined;
81
+ }[] | undefined;
82
+ }>;
83
+ export type RecordCore = z.infer<typeof RecordCore>;
84
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/records/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,2EAMrB,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,eAAO,MAAM,YAAY,+JAYvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BrB,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC"}