@agentskit/doc-bridge 1.6.4 → 1.7.45

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 (64) hide show
  1. package/CHANGELOG.md +249 -0
  2. package/CONTRIBUTING.md +6 -4
  3. package/action.yml +1 -1
  4. package/dist/cli/program.js +1139 -294
  5. package/dist/cli/program.js.map +1 -1
  6. package/dist/config/index.d.ts +1 -1
  7. package/dist/config/index.js +43 -5
  8. package/dist/config/index.js.map +1 -1
  9. package/dist/index-BUL0q7s8.d.ts +660 -0
  10. package/dist/index.d.ts +817 -2134
  11. package/dist/index.js +1154 -244
  12. package/dist/index.js.map +1 -1
  13. package/docs/PRD-enterprise-hardening.md +288 -0
  14. package/docs/RELEASE.md +22 -8
  15. package/docs/adr/0001-enterprise-verification-contract.md +35 -0
  16. package/docs/agent-corpus/INDEX.md +2 -2
  17. package/docs/agent-corpus/chat.md +2 -2
  18. package/docs/agent-corpus/cli.md +2 -2
  19. package/docs/agent-corpus/conformance.md +2 -2
  20. package/docs/agent-corpus/doc-bridge.md +1 -1
  21. package/docs/agent-corpus/doctor.md +2 -2
  22. package/docs/agent-corpus/gates.md +2 -2
  23. package/docs/agent-corpus/mcp.md +2 -2
  24. package/docs/agent-corpus/memory.md +2 -2
  25. package/docs/agent-corpus/query.md +2 -2
  26. package/docs/knowledge-engine-runbook.md +30 -2
  27. package/docs/spec/analyzer-plugin-v1.md +24 -0
  28. package/docs/spec/benchmark-v1.md +36 -0
  29. package/docs/spec/config-v1.md +156 -0
  30. package/docs/validation-cycle-plan.md +255 -0
  31. package/docs/verification-harness.md +37 -4
  32. package/mcpb/manifest.json +1 -1
  33. package/package.json +68 -70
  34. package/scripts/check-ecosystem-upstream.mjs +3 -2
  35. package/scripts/report-visual-check.mjs +64 -12
  36. package/scripts/verification-harness.mjs +216 -14
  37. package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
  38. package/src/agents/registry-adapter.ts +31 -7
  39. package/src/cli/demo.ts +2 -2
  40. package/src/cli/program.ts +59 -16
  41. package/src/config/index.ts +2 -0
  42. package/src/config/load-config.ts +7 -1
  43. package/src/config/schema.ts +60 -2
  44. package/src/conformance/documentation-standard-v1.ts +14 -8
  45. package/src/discovery/documentation.ts +90 -23
  46. package/src/discovery/repository.ts +147 -19
  47. package/src/doctor/run-doctor.ts +2 -15
  48. package/src/federation/llms.ts +72 -20
  49. package/src/fixes/proposals.ts +4 -3
  50. package/src/index-builder/human-adapters/fumadocs.ts +1 -1
  51. package/src/index-builder/watch-index.ts +1 -1
  52. package/src/index.ts +29 -0
  53. package/src/lib/bounded-text.ts +15 -10
  54. package/src/metrics/benchmark.ts +176 -0
  55. package/src/plugins/contract.ts +89 -0
  56. package/src/reconciliation/reconcile.ts +181 -5
  57. package/src/report/html.ts +318 -88
  58. package/src/rules/engine.ts +15 -2
  59. package/src/safety/repository.ts +1 -1
  60. package/src/schemas/knowledge.ts +21 -3
  61. package/src/validate.ts +7 -1
  62. package/src/version.ts +1 -1
  63. package/src/workflow/engine.ts +65 -9
  64. package/dist/index-DudNuwI5.d.ts +0 -2060
package/dist/index.d.ts CHANGED
@@ -1,43 +1,47 @@
1
- import { D as DocBridgeConfigV1, R as RulesConfig, a as RuleId, b as RuleSeverity, c as DocumentationStandardRuleId } from './index-DudNuwI5.js';
2
- export { A as AgentCorpusConfig, C as ConfigNotFoundError, d as DocBridgeConfigV1Schema, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, h as LoadConfigResult, i as RepositorySafetyConfig, j as RepositorySafetyConfigSchema, k as RuleIdSchema, l as RuleSeveritySchema, m as RulesConfigSchema, W as WorkflowConfig, n as WorkflowConfigSchema, o as applyConfigDefaults, p as defineConfig, q as loadConfig, r as projectRootFromConfigPath, s as resolveProjectRoot } from './index-DudNuwI5.js';
1
+ import { D as DocBridgeConfigV1, R as RulesConfig, a as RuleId, b as RuleSeverity, c as DocumentationStandardRuleId } from './index-BUL0q7s8.js';
2
+ export { A as AgentCorpusConfig, C as ConfigNotFoundError, d as DocBridgeConfigV1Schema, e as DocumentationStandardRuleIdSchema, f as DocumentationStandardV1Config, g as DocumentationStandardV1ConfigSchema, E as EcosystemContractEvidenceSchema, L as LoadConfigOptions, h as LoadConfigResult, i as ReportConfig, j as ReportConfigSchema, k as RepositorySafetyConfig, l as RepositorySafetyConfigSchema, m as RuleIdSchema, n as RuleSeveritySchema, o as RulesConfigSchema, W as WorkflowConfig, p as WorkflowConfigSchema, q as applyConfigDefaults, r as defineConfig, s as loadConfig, t as projectRootFromConfigPath, u as resolveProjectRoot } from './index-BUL0q7s8.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const HANDOFF_SCHEMA_VERSION: 1;
6
- declare const HandoffTargetTypeSchema: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
6
+ declare const HandoffTargetTypeSchema: z.ZodEnum<{
7
+ module: "module";
8
+ package: "package";
9
+ search: "search";
10
+ app: "app";
11
+ screen: "screen";
12
+ flow: "flow";
13
+ component: "component";
14
+ intent: "intent";
15
+ change: "change";
16
+ }>;
7
17
  type HandoffTargetType = z.infer<typeof HandoffTargetTypeSchema>;
8
18
  declare const HandoffTargetSchema: z.ZodObject<{
9
- type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
19
+ type: z.ZodEnum<{
20
+ module: "module";
21
+ package: "package";
22
+ search: "search";
23
+ app: "app";
24
+ screen: "screen";
25
+ flow: "flow";
26
+ component: "component";
27
+ intent: "intent";
28
+ change: "change";
29
+ }>;
10
30
  id: z.ZodString;
11
31
  path: z.ZodOptional<z.ZodString>;
12
32
  group: z.ZodOptional<z.ZodString>;
13
33
  layer: z.ZodOptional<z.ZodString>;
14
- }, "strict", z.ZodTypeAny, {
15
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
16
- id: string;
17
- path?: string | undefined;
18
- group?: string | undefined;
19
- layer?: string | undefined;
20
- }, {
21
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
22
- id: string;
23
- path?: string | undefined;
24
- group?: string | undefined;
25
- layer?: string | undefined;
26
- }>;
34
+ }, z.core.$strict>;
27
35
  type HandoffTarget = z.infer<typeof HandoffTargetSchema>;
28
36
  declare const HandoffBridgeSchema: z.ZodObject<{
29
- humanDoc: z.ZodEnum<["linked", "missing", "external"]>;
37
+ humanDoc: z.ZodEnum<{
38
+ linked: "linked";
39
+ missing: "missing";
40
+ external: "external";
41
+ }>;
30
42
  action: z.ZodOptional<z.ZodString>;
31
43
  bootstrap: z.ZodOptional<z.ZodString>;
32
- }, "strict", z.ZodTypeAny, {
33
- humanDoc: "linked" | "missing" | "external";
34
- action?: string | undefined;
35
- bootstrap?: string | undefined;
36
- }, {
37
- humanDoc: "linked" | "missing" | "external";
38
- action?: string | undefined;
39
- bootstrap?: string | undefined;
40
- }>;
44
+ }, z.core.$strict>;
41
45
  type HandoffBridge = z.infer<typeof HandoffBridgeSchema>;
42
46
  /** v1 — canonical AgentHandoff. Legacy payloads may omit schemaVersion. */
43
47
  declare const AgentHandoffV1Schema: z.ZodObject<{
@@ -45,185 +49,79 @@ declare const AgentHandoffV1Schema: z.ZodObject<{
45
49
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
46
50
  source: z.ZodString;
47
51
  target: z.ZodObject<{
48
- type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
52
+ type: z.ZodEnum<{
53
+ module: "module";
54
+ package: "package";
55
+ search: "search";
56
+ app: "app";
57
+ screen: "screen";
58
+ flow: "flow";
59
+ component: "component";
60
+ intent: "intent";
61
+ change: "change";
62
+ }>;
49
63
  id: z.ZodString;
50
64
  path: z.ZodOptional<z.ZodString>;
51
65
  group: z.ZodOptional<z.ZodString>;
52
66
  layer: z.ZodOptional<z.ZodString>;
53
- }, "strict", z.ZodTypeAny, {
54
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
55
- id: string;
56
- path?: string | undefined;
57
- group?: string | undefined;
58
- layer?: string | undefined;
59
- }, {
60
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
61
- id: string;
62
- path?: string | undefined;
63
- group?: string | undefined;
64
- layer?: string | undefined;
65
- }>;
67
+ }, z.core.$strict>;
66
68
  startHere: z.ZodString;
67
- readBeforeEditing: z.ZodArray<z.ZodString, "many">;
68
- editRoots: z.ZodArray<z.ZodString, "many">;
69
- checks: z.ZodArray<z.ZodString, "many">;
69
+ readBeforeEditing: z.ZodArray<z.ZodString>;
70
+ editRoots: z.ZodArray<z.ZodString>;
71
+ checks: z.ZodArray<z.ZodString>;
70
72
  humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
71
73
  bridge: z.ZodOptional<z.ZodObject<{
72
- humanDoc: z.ZodEnum<["linked", "missing", "external"]>;
74
+ humanDoc: z.ZodEnum<{
75
+ linked: "linked";
76
+ missing: "missing";
77
+ external: "external";
78
+ }>;
73
79
  action: z.ZodOptional<z.ZodString>;
74
80
  bootstrap: z.ZodOptional<z.ZodString>;
75
- }, "strict", z.ZodTypeAny, {
76
- humanDoc: "linked" | "missing" | "external";
77
- action?: string | undefined;
78
- bootstrap?: string | undefined;
79
- }, {
80
- humanDoc: "linked" | "missing" | "external";
81
- action?: string | undefined;
82
- bootstrap?: string | undefined;
83
- }>>;
84
- playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
85
- notes: z.ZodArray<z.ZodString, "many">;
86
- }, "strict", z.ZodTypeAny, {
87
- type: "agent-handoff";
88
- checks: string[];
89
- startHere: string;
90
- schemaVersion: 1;
91
- source: string;
92
- target: {
93
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
94
- id: string;
95
- path?: string | undefined;
96
- group?: string | undefined;
97
- layer?: string | undefined;
98
- };
99
- readBeforeEditing: string[];
100
- editRoots: string[];
101
- notes: string[];
102
- humanDoc?: string | null | undefined;
103
- bridge?: {
104
- humanDoc: "linked" | "missing" | "external";
105
- action?: string | undefined;
106
- bootstrap?: string | undefined;
107
- } | undefined;
108
- playbookPatterns?: string[] | undefined;
109
- }, {
110
- type: "agent-handoff";
111
- checks: string[];
112
- startHere: string;
113
- source: string;
114
- target: {
115
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
116
- id: string;
117
- path?: string | undefined;
118
- group?: string | undefined;
119
- layer?: string | undefined;
120
- };
121
- readBeforeEditing: string[];
122
- editRoots: string[];
123
- notes: string[];
124
- humanDoc?: string | null | undefined;
125
- schemaVersion?: 1 | undefined;
126
- bridge?: {
127
- humanDoc: "linked" | "missing" | "external";
128
- action?: string | undefined;
129
- bootstrap?: string | undefined;
130
- } | undefined;
131
- playbookPatterns?: string[] | undefined;
132
- }>;
81
+ }, z.core.$strict>>;
82
+ playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ notes: z.ZodArray<z.ZodString>;
84
+ }, z.core.$strict>;
133
85
  type AgentHandoffV1 = z.infer<typeof AgentHandoffV1Schema>;
134
86
  /** Accept legacy handoffs without schemaVersion. */
135
- declare const AgentHandoffLegacySchema: z.ZodObject<Omit<{
87
+ declare const AgentHandoffLegacySchema: z.ZodObject<{
136
88
  type: z.ZodLiteral<"agent-handoff">;
137
- schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
138
- source: z.ZodString;
89
+ checks: z.ZodArray<z.ZodString>;
90
+ humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ startHere: z.ZodString;
139
92
  target: z.ZodObject<{
140
- type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
93
+ type: z.ZodEnum<{
94
+ module: "module";
95
+ package: "package";
96
+ search: "search";
97
+ app: "app";
98
+ screen: "screen";
99
+ flow: "flow";
100
+ component: "component";
101
+ intent: "intent";
102
+ change: "change";
103
+ }>;
141
104
  id: z.ZodString;
142
105
  path: z.ZodOptional<z.ZodString>;
143
106
  group: z.ZodOptional<z.ZodString>;
144
107
  layer: z.ZodOptional<z.ZodString>;
145
- }, "strict", z.ZodTypeAny, {
146
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
147
- id: string;
148
- path?: string | undefined;
149
- group?: string | undefined;
150
- layer?: string | undefined;
151
- }, {
152
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
153
- id: string;
154
- path?: string | undefined;
155
- group?: string | undefined;
156
- layer?: string | undefined;
157
- }>;
158
- startHere: z.ZodString;
159
- readBeforeEditing: z.ZodArray<z.ZodString, "many">;
160
- editRoots: z.ZodArray<z.ZodString, "many">;
161
- checks: z.ZodArray<z.ZodString, "many">;
162
- humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, z.core.$strict>;
109
+ source: z.ZodString;
110
+ readBeforeEditing: z.ZodArray<z.ZodString>;
111
+ editRoots: z.ZodArray<z.ZodString>;
163
112
  bridge: z.ZodOptional<z.ZodObject<{
164
- humanDoc: z.ZodEnum<["linked", "missing", "external"]>;
113
+ humanDoc: z.ZodEnum<{
114
+ linked: "linked";
115
+ missing: "missing";
116
+ external: "external";
117
+ }>;
165
118
  action: z.ZodOptional<z.ZodString>;
166
119
  bootstrap: z.ZodOptional<z.ZodString>;
167
- }, "strict", z.ZodTypeAny, {
168
- humanDoc: "linked" | "missing" | "external";
169
- action?: string | undefined;
170
- bootstrap?: string | undefined;
171
- }, {
172
- humanDoc: "linked" | "missing" | "external";
173
- action?: string | undefined;
174
- bootstrap?: string | undefined;
175
- }>>;
176
- playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
177
- notes: z.ZodArray<z.ZodString, "many">;
178
- }, "schemaVersion"> & {
120
+ }, z.core.$strict>>;
121
+ playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ notes: z.ZodArray<z.ZodString>;
179
123
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
180
- }, "strict", z.ZodTypeAny, {
181
- type: "agent-handoff";
182
- checks: string[];
183
- startHere: string;
184
- source: string;
185
- target: {
186
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
187
- id: string;
188
- path?: string | undefined;
189
- group?: string | undefined;
190
- layer?: string | undefined;
191
- };
192
- readBeforeEditing: string[];
193
- editRoots: string[];
194
- notes: string[];
195
- humanDoc?: string | null | undefined;
196
- schemaVersion?: 1 | undefined;
197
- bridge?: {
198
- humanDoc: "linked" | "missing" | "external";
199
- action?: string | undefined;
200
- bootstrap?: string | undefined;
201
- } | undefined;
202
- playbookPatterns?: string[] | undefined;
203
- }, {
204
- type: "agent-handoff";
205
- checks: string[];
206
- startHere: string;
207
- source: string;
208
- target: {
209
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
210
- id: string;
211
- path?: string | undefined;
212
- group?: string | undefined;
213
- layer?: string | undefined;
214
- };
215
- readBeforeEditing: string[];
216
- editRoots: string[];
217
- notes: string[];
218
- humanDoc?: string | null | undefined;
219
- schemaVersion?: 1 | undefined;
220
- bridge?: {
221
- humanDoc: "linked" | "missing" | "external";
222
- action?: string | undefined;
223
- bootstrap?: string | undefined;
224
- } | undefined;
225
- playbookPatterns?: string[] | undefined;
226
- }>;
124
+ }, z.core.$strict>;
227
125
  declare const AgentSearchV1Schema: z.ZodObject<{
228
126
  type: z.ZodLiteral<"agent-search">;
229
127
  schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
@@ -237,21 +135,7 @@ declare const AgentSearchV1Schema: z.ZodObject<{
237
135
  summary: z.ZodOptional<z.ZodString>;
238
136
  score: z.ZodOptional<z.ZodNumber>;
239
137
  refs: z.ZodOptional<z.ZodNumber>;
240
- }, "strict", z.ZodTypeAny, {
241
- path: string;
242
- type: string;
243
- id: string;
244
- summary?: string | undefined;
245
- score?: number | undefined;
246
- refs?: number | undefined;
247
- }, {
248
- path: string;
249
- type: string;
250
- id: string;
251
- summary?: string | undefined;
252
- score?: number | undefined;
253
- refs?: number | undefined;
254
- }>>;
138
+ }, z.core.$strict>>;
255
139
  matches: z.ZodArray<z.ZodObject<{
256
140
  type: z.ZodString;
257
141
  id: z.ZodString;
@@ -259,69 +143,9 @@ declare const AgentSearchV1Schema: z.ZodObject<{
259
143
  summary: z.ZodOptional<z.ZodString>;
260
144
  score: z.ZodOptional<z.ZodNumber>;
261
145
  refs: z.ZodOptional<z.ZodNumber>;
262
- }, "strict", z.ZodTypeAny, {
263
- path: string;
264
- type: string;
265
- id: string;
266
- summary?: string | undefined;
267
- score?: number | undefined;
268
- refs?: number | undefined;
269
- }, {
270
- path: string;
271
- type: string;
272
- id: string;
273
- summary?: string | undefined;
274
- score?: number | undefined;
275
- refs?: number | undefined;
276
- }>, "many">;
277
- nextCommands: z.ZodArray<z.ZodString, "many">;
278
- }, "strict", z.ZodTypeAny, {
279
- type: "agent-search";
280
- schemaVersion: 1;
281
- source: string;
282
- term: string;
283
- count: number;
284
- bestMatch: {
285
- path: string;
286
- type: string;
287
- id: string;
288
- summary?: string | undefined;
289
- score?: number | undefined;
290
- refs?: number | undefined;
291
- } | null;
292
- matches: {
293
- path: string;
294
- type: string;
295
- id: string;
296
- summary?: string | undefined;
297
- score?: number | undefined;
298
- refs?: number | undefined;
299
- }[];
300
- nextCommands: string[];
301
- }, {
302
- type: "agent-search";
303
- source: string;
304
- term: string;
305
- count: number;
306
- bestMatch: {
307
- path: string;
308
- type: string;
309
- id: string;
310
- summary?: string | undefined;
311
- score?: number | undefined;
312
- refs?: number | undefined;
313
- } | null;
314
- matches: {
315
- path: string;
316
- type: string;
317
- id: string;
318
- summary?: string | undefined;
319
- score?: number | undefined;
320
- refs?: number | undefined;
321
- }[];
322
- nextCommands: string[];
323
- schemaVersion?: 1 | undefined;
324
- }>;
146
+ }, z.core.$strict>>;
147
+ nextCommands: z.ZodArray<z.ZodString>;
148
+ }, z.core.$strict>;
325
149
  type AgentSearchV1 = z.infer<typeof AgentSearchV1Schema>;
326
150
  declare const normalizeAgentHandoff: (input: unknown) => AgentHandoffV1;
327
151
 
@@ -332,29 +156,10 @@ declare const KnowledgeEntrySchema: z.ZodObject<{
332
156
  title: z.ZodString;
333
157
  path: z.ZodString;
334
158
  description: z.ZodOptional<z.ZodString>;
335
- /** Flattened body excerpt for full-text search (not for display). */
336
159
  body: z.ZodOptional<z.ZodString>;
337
- links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
338
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
339
- }, "strict", z.ZodTypeAny, {
340
- path: string;
341
- type: string;
342
- id: string;
343
- title: string;
344
- links?: string[] | undefined;
345
- description?: string | undefined;
346
- body?: string | undefined;
347
- tags?: string[] | undefined;
348
- }, {
349
- path: string;
350
- type: string;
351
- id: string;
352
- title: string;
353
- links?: string[] | undefined;
354
- description?: string | undefined;
355
- body?: string | undefined;
356
- tags?: string[] | undefined;
357
- }>;
160
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
161
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
162
+ }, z.core.$strict>;
358
163
  declare const DocBridgeIndexV1Schema: z.ZodObject<{
359
164
  schemaVersion: z.ZodLiteral<1>;
360
165
  contentHash: z.ZodString;
@@ -363,433 +168,92 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
363
168
  project: z.ZodOptional<z.ZodObject<{
364
169
  name: z.ZodString;
365
170
  root: z.ZodOptional<z.ZodString>;
366
- }, "strict", z.ZodTypeAny, {
367
- name: string;
368
- root?: string | undefined;
369
- }, {
370
- name: string;
371
- root?: string | undefined;
372
- }>>;
171
+ }, z.core.$strict>>;
373
172
  properties: z.ZodOptional<z.ZodArray<z.ZodObject<{
374
173
  id: z.ZodString;
375
174
  name: z.ZodString;
376
175
  url: z.ZodOptional<z.ZodString>;
377
176
  llms: z.ZodOptional<z.ZodString>;
378
- }, "strict", z.ZodTypeAny, {
379
- id: string;
380
- name: string;
381
- url?: string | undefined;
382
- llms?: string | undefined;
383
- }, {
384
- id: string;
385
- name: string;
386
- url?: string | undefined;
387
- llms?: string | undefined;
388
- }>, "many">>;
177
+ }, z.core.$strict>>>;
389
178
  knowledge: z.ZodArray<z.ZodObject<{
390
179
  id: z.ZodString;
391
180
  type: z.ZodString;
392
181
  title: z.ZodString;
393
182
  path: z.ZodString;
394
183
  description: z.ZodOptional<z.ZodString>;
395
- /** Flattened body excerpt for full-text search (not for display). */
396
184
  body: z.ZodOptional<z.ZodString>;
397
- links: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
398
- tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
399
- }, "strict", z.ZodTypeAny, {
400
- path: string;
401
- type: string;
402
- id: string;
403
- title: string;
404
- links?: string[] | undefined;
405
- description?: string | undefined;
406
- body?: string | undefined;
407
- tags?: string[] | undefined;
408
- }, {
409
- path: string;
410
- type: string;
411
- id: string;
412
- title: string;
413
- links?: string[] | undefined;
414
- description?: string | undefined;
415
- body?: string | undefined;
416
- tags?: string[] | undefined;
417
- }>, "many">;
185
+ links: z.ZodOptional<z.ZodArray<z.ZodString>>;
186
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ }, z.core.$strict>>;
418
188
  capabilities: z.ZodOptional<z.ZodArray<z.ZodObject<{
419
189
  id: z.ZodString;
420
190
  kind: z.ZodString;
421
191
  description: z.ZodOptional<z.ZodString>;
422
- }, "strict", z.ZodTypeAny, {
423
- id: string;
424
- kind: string;
425
- description?: string | undefined;
426
- }, {
427
- id: string;
428
- kind: string;
429
- description?: string | undefined;
430
- }>, "many">>;
431
- handoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<Omit<{
192
+ }, z.core.$strict>>>;
193
+ handoffs: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
432
194
  type: z.ZodLiteral<"agent-handoff">;
433
- schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
434
- source: z.ZodString;
195
+ checks: z.ZodArray<z.ZodString>;
196
+ humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
197
+ startHere: z.ZodString;
435
198
  target: z.ZodObject<{
436
- type: z.ZodEnum<["package", "module", "app", "screen", "flow", "component", "intent", "change", "search"]>;
199
+ type: z.ZodEnum<{
200
+ module: "module";
201
+ package: "package";
202
+ search: "search";
203
+ app: "app";
204
+ screen: "screen";
205
+ flow: "flow";
206
+ component: "component";
207
+ intent: "intent";
208
+ change: "change";
209
+ }>;
437
210
  id: z.ZodString;
438
211
  path: z.ZodOptional<z.ZodString>;
439
212
  group: z.ZodOptional<z.ZodString>;
440
213
  layer: z.ZodOptional<z.ZodString>;
441
- }, "strict", z.ZodTypeAny, {
442
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
443
- id: string;
444
- path?: string | undefined;
445
- group?: string | undefined;
446
- layer?: string | undefined;
447
- }, {
448
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
449
- id: string;
450
- path?: string | undefined;
451
- group?: string | undefined;
452
- layer?: string | undefined;
453
- }>;
454
- startHere: z.ZodString;
455
- readBeforeEditing: z.ZodArray<z.ZodString, "many">;
456
- editRoots: z.ZodArray<z.ZodString, "many">;
457
- checks: z.ZodArray<z.ZodString, "many">;
458
- humanDoc: z.ZodOptional<z.ZodNullable<z.ZodString>>;
214
+ }, z.core.$strict>;
215
+ source: z.ZodString;
216
+ readBeforeEditing: z.ZodArray<z.ZodString>;
217
+ editRoots: z.ZodArray<z.ZodString>;
459
218
  bridge: z.ZodOptional<z.ZodObject<{
460
- humanDoc: z.ZodEnum<["linked", "missing", "external"]>;
219
+ humanDoc: z.ZodEnum<{
220
+ linked: "linked";
221
+ missing: "missing";
222
+ external: "external";
223
+ }>;
461
224
  action: z.ZodOptional<z.ZodString>;
462
225
  bootstrap: z.ZodOptional<z.ZodString>;
463
- }, "strict", z.ZodTypeAny, {
464
- humanDoc: "linked" | "missing" | "external";
465
- action?: string | undefined;
466
- bootstrap?: string | undefined;
467
- }, {
468
- humanDoc: "linked" | "missing" | "external";
469
- action?: string | undefined;
470
- bootstrap?: string | undefined;
471
- }>>;
472
- playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
473
- notes: z.ZodArray<z.ZodString, "many">;
474
- }, "schemaVersion"> & {
226
+ }, z.core.$strict>>;
227
+ playbookPatterns: z.ZodOptional<z.ZodArray<z.ZodString>>;
228
+ notes: z.ZodArray<z.ZodString>;
475
229
  schemaVersion: z.ZodOptional<z.ZodLiteral<1>>;
476
- }, "strict", z.ZodTypeAny, {
477
- type: "agent-handoff";
478
- checks: string[];
479
- startHere: string;
480
- source: string;
481
- target: {
482
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
483
- id: string;
484
- path?: string | undefined;
485
- group?: string | undefined;
486
- layer?: string | undefined;
487
- };
488
- readBeforeEditing: string[];
489
- editRoots: string[];
490
- notes: string[];
491
- humanDoc?: string | null | undefined;
492
- schemaVersion?: 1 | undefined;
493
- bridge?: {
494
- humanDoc: "linked" | "missing" | "external";
495
- action?: string | undefined;
496
- bootstrap?: string | undefined;
497
- } | undefined;
498
- playbookPatterns?: string[] | undefined;
499
- }, {
500
- type: "agent-handoff";
501
- checks: string[];
502
- startHere: string;
503
- source: string;
504
- target: {
505
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
506
- id: string;
507
- path?: string | undefined;
508
- group?: string | undefined;
509
- layer?: string | undefined;
510
- };
511
- readBeforeEditing: string[];
512
- editRoots: string[];
513
- notes: string[];
514
- humanDoc?: string | null | undefined;
515
- schemaVersion?: 1 | undefined;
516
- bridge?: {
517
- humanDoc: "linked" | "missing" | "external";
518
- action?: string | undefined;
519
- bootstrap?: string | undefined;
520
- } | undefined;
521
- playbookPatterns?: string[] | undefined;
522
- }>>>;
230
+ }, z.core.$strict>>>;
523
231
  lookup: z.ZodOptional<z.ZodObject<{
524
- packages: z.ZodArray<z.ZodString, "many">;
232
+ packages: z.ZodArray<z.ZodString>;
525
233
  ownership: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
526
234
  id: z.ZodString;
527
235
  path: z.ZodString;
528
236
  group: z.ZodOptional<z.ZodString>;
529
237
  layer: z.ZodOptional<z.ZodString>;
530
238
  purpose: z.ZodOptional<z.ZodString>;
531
- checks: z.ZodArray<z.ZodString, "many">;
239
+ checks: z.ZodArray<z.ZodString>;
532
240
  agentDoc: z.ZodOptional<z.ZodString>;
533
241
  humanDoc: z.ZodOptional<z.ZodString>;
534
242
  readme: z.ZodOptional<z.ZodString>;
535
- }, "strict", z.ZodTypeAny, {
536
- path: string;
537
- checks: string[];
538
- id: string;
539
- group?: string | undefined;
540
- layer?: string | undefined;
541
- purpose?: string | undefined;
542
- agentDoc?: string | undefined;
543
- humanDoc?: string | undefined;
544
- readme?: string | undefined;
545
- }, {
546
- path: string;
547
- checks: string[];
548
- id: string;
549
- group?: string | undefined;
550
- layer?: string | undefined;
551
- purpose?: string | undefined;
552
- agentDoc?: string | undefined;
553
- humanDoc?: string | undefined;
554
- readme?: string | undefined;
555
- }>>>;
243
+ }, z.core.$strict>>>;
556
244
  intents: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
557
245
  id: z.ZodString;
558
246
  title: z.ZodString;
559
- paths: z.ZodArray<z.ZodString, "many">;
560
- }, "strict", z.ZodTypeAny, {
561
- id: string;
562
- title: string;
563
- paths: string[];
564
- }, {
565
- id: string;
566
- title: string;
567
- paths: string[];
568
- }>>>;
247
+ paths: z.ZodArray<z.ZodString>;
248
+ }, z.core.$strict>>>;
569
249
  changes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
570
250
  id: z.ZodString;
571
251
  title: z.ZodString;
572
252
  startHere: z.ZodString;
573
- relatedPackages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
574
- }, "strict", z.ZodTypeAny, {
575
- id: string;
576
- title: string;
577
- startHere: string;
578
- relatedPackages?: string[] | undefined;
579
- }, {
580
- id: string;
581
- title: string;
582
- startHere: string;
583
- relatedPackages?: string[] | undefined;
584
- }>>>;
585
- }, "strict", z.ZodTypeAny, {
586
- packages: string[];
587
- ownership?: Record<string, {
588
- path: string;
589
- checks: string[];
590
- id: string;
591
- group?: string | undefined;
592
- layer?: string | undefined;
593
- purpose?: string | undefined;
594
- agentDoc?: string | undefined;
595
- humanDoc?: string | undefined;
596
- readme?: string | undefined;
597
- }> | undefined;
598
- intents?: Record<string, {
599
- id: string;
600
- title: string;
601
- paths: string[];
602
- }> | undefined;
603
- changes?: Record<string, {
604
- id: string;
605
- title: string;
606
- startHere: string;
607
- relatedPackages?: string[] | undefined;
608
- }> | undefined;
609
- }, {
610
- packages: string[];
611
- ownership?: Record<string, {
612
- path: string;
613
- checks: string[];
614
- id: string;
615
- group?: string | undefined;
616
- layer?: string | undefined;
617
- purpose?: string | undefined;
618
- agentDoc?: string | undefined;
619
- humanDoc?: string | undefined;
620
- readme?: string | undefined;
621
- }> | undefined;
622
- intents?: Record<string, {
623
- id: string;
624
- title: string;
625
- paths: string[];
626
- }> | undefined;
627
- changes?: Record<string, {
628
- id: string;
629
- title: string;
630
- startHere: string;
631
- relatedPackages?: string[] | undefined;
632
- }> | undefined;
633
- }>>;
634
- }, "strict", z.ZodTypeAny, {
635
- contentHash: string;
636
- schemaVersion: 1;
637
- contentHashAlgo: "sha256-normalized-v1";
638
- knowledge: {
639
- path: string;
640
- type: string;
641
- id: string;
642
- title: string;
643
- links?: string[] | undefined;
644
- description?: string | undefined;
645
- body?: string | undefined;
646
- tags?: string[] | undefined;
647
- }[];
648
- capabilities?: {
649
- id: string;
650
- kind: string;
651
- description?: string | undefined;
652
- }[] | undefined;
653
- project?: {
654
- name: string;
655
- root?: string | undefined;
656
- } | undefined;
657
- generatedAt?: string | undefined;
658
- properties?: {
659
- id: string;
660
- name: string;
661
- url?: string | undefined;
662
- llms?: string | undefined;
663
- }[] | undefined;
664
- handoffs?: Record<string, {
665
- type: "agent-handoff";
666
- checks: string[];
667
- startHere: string;
668
- source: string;
669
- target: {
670
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
671
- id: string;
672
- path?: string | undefined;
673
- group?: string | undefined;
674
- layer?: string | undefined;
675
- };
676
- readBeforeEditing: string[];
677
- editRoots: string[];
678
- notes: string[];
679
- humanDoc?: string | null | undefined;
680
- schemaVersion?: 1 | undefined;
681
- bridge?: {
682
- humanDoc: "linked" | "missing" | "external";
683
- action?: string | undefined;
684
- bootstrap?: string | undefined;
685
- } | undefined;
686
- playbookPatterns?: string[] | undefined;
687
- }> | undefined;
688
- lookup?: {
689
- packages: string[];
690
- ownership?: Record<string, {
691
- path: string;
692
- checks: string[];
693
- id: string;
694
- group?: string | undefined;
695
- layer?: string | undefined;
696
- purpose?: string | undefined;
697
- agentDoc?: string | undefined;
698
- humanDoc?: string | undefined;
699
- readme?: string | undefined;
700
- }> | undefined;
701
- intents?: Record<string, {
702
- id: string;
703
- title: string;
704
- paths: string[];
705
- }> | undefined;
706
- changes?: Record<string, {
707
- id: string;
708
- title: string;
709
- startHere: string;
710
- relatedPackages?: string[] | undefined;
711
- }> | undefined;
712
- } | undefined;
713
- }, {
714
- contentHash: string;
715
- schemaVersion: 1;
716
- contentHashAlgo: "sha256-normalized-v1";
717
- knowledge: {
718
- path: string;
719
- type: string;
720
- id: string;
721
- title: string;
722
- links?: string[] | undefined;
723
- description?: string | undefined;
724
- body?: string | undefined;
725
- tags?: string[] | undefined;
726
- }[];
727
- capabilities?: {
728
- id: string;
729
- kind: string;
730
- description?: string | undefined;
731
- }[] | undefined;
732
- project?: {
733
- name: string;
734
- root?: string | undefined;
735
- } | undefined;
736
- generatedAt?: string | undefined;
737
- properties?: {
738
- id: string;
739
- name: string;
740
- url?: string | undefined;
741
- llms?: string | undefined;
742
- }[] | undefined;
743
- handoffs?: Record<string, {
744
- type: "agent-handoff";
745
- checks: string[];
746
- startHere: string;
747
- source: string;
748
- target: {
749
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
750
- id: string;
751
- path?: string | undefined;
752
- group?: string | undefined;
753
- layer?: string | undefined;
754
- };
755
- readBeforeEditing: string[];
756
- editRoots: string[];
757
- notes: string[];
758
- humanDoc?: string | null | undefined;
759
- schemaVersion?: 1 | undefined;
760
- bridge?: {
761
- humanDoc: "linked" | "missing" | "external";
762
- action?: string | undefined;
763
- bootstrap?: string | undefined;
764
- } | undefined;
765
- playbookPatterns?: string[] | undefined;
766
- }> | undefined;
767
- lookup?: {
768
- packages: string[];
769
- ownership?: Record<string, {
770
- path: string;
771
- checks: string[];
772
- id: string;
773
- group?: string | undefined;
774
- layer?: string | undefined;
775
- purpose?: string | undefined;
776
- agentDoc?: string | undefined;
777
- humanDoc?: string | undefined;
778
- readme?: string | undefined;
779
- }> | undefined;
780
- intents?: Record<string, {
781
- id: string;
782
- title: string;
783
- paths: string[];
784
- }> | undefined;
785
- changes?: Record<string, {
786
- id: string;
787
- title: string;
788
- startHere: string;
789
- relatedPackages?: string[] | undefined;
790
- }> | undefined;
791
- } | undefined;
792
- }>;
253
+ relatedPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ }, z.core.$strict>>>;
255
+ }, z.core.$strict>>;
256
+ }, z.core.$strict>;
793
257
  type DocBridgeIndexV1 = z.infer<typeof DocBridgeIndexV1Schema>;
794
258
  type KnowledgeEntry = z.infer<typeof KnowledgeEntrySchema>;
795
259
 
@@ -797,37 +261,28 @@ declare const MEMORY_CANDIDATE_SCHEMA_VERSION: 1;
797
261
  declare const MemoryCandidateV1Schema: z.ZodObject<{
798
262
  schemaVersion: z.ZodLiteral<1>;
799
263
  id: z.ZodString;
800
- source: z.ZodEnum<["cursor", "claude", "codex", "copilot", "agent-memory", "manual"]>;
264
+ source: z.ZodEnum<{
265
+ cursor: "cursor";
266
+ claude: "claude";
267
+ codex: "codex";
268
+ copilot: "copilot";
269
+ "agent-memory": "agent-memory";
270
+ manual: "manual";
271
+ }>;
801
272
  rawPath: z.ZodOptional<z.ZodString>;
802
273
  fact: z.ZodString;
803
274
  why: z.ZodOptional<z.ZodString>;
804
275
  howToApply: z.ZodOptional<z.ZodString>;
805
- suggestedType: z.ZodEnum<["user", "feedback", "project", "reference", "unknown"]>;
276
+ suggestedType: z.ZodEnum<{
277
+ unknown: "unknown";
278
+ project: "project";
279
+ user: "user";
280
+ feedback: "feedback";
281
+ reference: "reference";
282
+ }>;
806
283
  confidence: z.ZodNumber;
807
- references: z.ZodArray<z.ZodString, "many">;
808
- }, "strict", z.ZodTypeAny, {
809
- id: string;
810
- schemaVersion: 1;
811
- source: "cursor" | "claude" | "codex" | "copilot" | "agent-memory" | "manual";
812
- fact: string;
813
- suggestedType: "unknown" | "project" | "user" | "feedback" | "reference";
814
- confidence: number;
815
- references: string[];
816
- rawPath?: string | undefined;
817
- why?: string | undefined;
818
- howToApply?: string | undefined;
819
- }, {
820
- id: string;
821
- schemaVersion: 1;
822
- source: "cursor" | "claude" | "codex" | "copilot" | "agent-memory" | "manual";
823
- fact: string;
824
- suggestedType: "unknown" | "project" | "user" | "feedback" | "reference";
825
- confidence: number;
826
- references: string[];
827
- rawPath?: string | undefined;
828
- why?: string | undefined;
829
- howToApply?: string | undefined;
830
- }>;
284
+ references: z.ZodArray<z.ZodString>;
285
+ }, z.core.$strict>;
831
286
  type MemoryCandidateV1 = z.infer<typeof MemoryCandidateV1Schema>;
832
287
 
833
288
  type JsonSchema = {
@@ -1376,205 +831,107 @@ declare const DocBridgeJsonSchemas: {
1376
831
 
1377
832
  declare const KNOWLEDGE_SCHEMA_VERSION: 1;
1378
833
  declare const KNOWLEDGE_CONTENT_HASH_ALGO: "sha256-normalized-v1";
1379
- declare const ProvenanceSchema: z.ZodEnum<["observed", "declared", "proposed"]>;
834
+ declare const ProvenanceSchema: z.ZodEnum<{
835
+ observed: "observed";
836
+ declared: "declared";
837
+ proposed: "proposed";
838
+ }>;
1380
839
  type Provenance = z.infer<typeof ProvenanceSchema>;
1381
- declare const FindingStatusSchema: z.ZodEnum<["confirmed", "undocumented", "stale-or-unverified", "conflict", "unresolved", "not-analyzed"]>;
840
+ declare const FindingStatusSchema: z.ZodEnum<{
841
+ confirmed: "confirmed";
842
+ undocumented: "undocumented";
843
+ "stale-or-unverified": "stale-or-unverified";
844
+ conflict: "conflict";
845
+ unresolved: "unresolved";
846
+ "not-analyzed": "not-analyzed";
847
+ }>;
1382
848
  type FindingStatus = z.infer<typeof FindingStatusSchema>;
1383
- declare const DiagnosticSeveritySchema: z.ZodEnum<["off", "info", "warn", "error"]>;
849
+ declare const DiagnosticSeveritySchema: z.ZodEnum<{
850
+ error: "error";
851
+ off: "off";
852
+ info: "info";
853
+ warn: "warn";
854
+ }>;
1384
855
  type DiagnosticSeverity = z.infer<typeof DiagnosticSeveritySchema>;
1385
- declare const EvidenceSourceSchema: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
1386
- declare const EvidenceSchema: z.ZodEffects<z.ZodObject<{
1387
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
856
+ declare const EvidenceSourceSchema: z.ZodEnum<{
857
+ agent: "agent";
858
+ code: "code";
859
+ configuration: "configuration";
860
+ documentation: "documentation";
861
+ derived: "derived";
862
+ }>;
863
+ declare const EvidenceSchema: z.ZodObject<{
864
+ source: z.ZodEnum<{
865
+ agent: "agent";
866
+ code: "code";
867
+ configuration: "configuration";
868
+ documentation: "documentation";
869
+ derived: "derived";
870
+ }>;
1388
871
  path: z.ZodString;
1389
872
  lineStart: z.ZodOptional<z.ZodNumber>;
1390
873
  lineEnd: z.ZodOptional<z.ZodNumber>;
1391
874
  contentHash: z.ZodOptional<z.ZodString>;
1392
875
  context: z.ZodOptional<z.ZodString>;
1393
- }, "strict", z.ZodTypeAny, {
1394
- path: string;
1395
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1396
- contentHash?: string | undefined;
1397
- lineStart?: number | undefined;
1398
- lineEnd?: number | undefined;
1399
- context?: string | undefined;
1400
- }, {
1401
- path: string;
1402
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1403
- contentHash?: string | undefined;
1404
- lineStart?: number | undefined;
1405
- lineEnd?: number | undefined;
1406
- context?: string | undefined;
1407
- }>, {
1408
- path: string;
1409
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1410
- contentHash?: string | undefined;
1411
- lineStart?: number | undefined;
1412
- lineEnd?: number | undefined;
1413
- context?: string | undefined;
1414
- }, {
1415
- path: string;
1416
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1417
- contentHash?: string | undefined;
1418
- lineStart?: number | undefined;
1419
- lineEnd?: number | undefined;
1420
- context?: string | undefined;
1421
- }>;
876
+ }, z.core.$strict>;
1422
877
  type Evidence = z.infer<typeof EvidenceSchema>;
1423
878
  declare const CoverageSchema: z.ZodObject<{
1424
879
  analyzer: z.ZodString;
880
+ analyzerVersion: z.ZodOptional<z.ZodString>;
1425
881
  scope: z.ZodString;
1426
- status: z.ZodEnum<["complete", "partial", "not-analyzed"]>;
882
+ status: z.ZodEnum<{
883
+ "not-analyzed": "not-analyzed";
884
+ complete: "complete";
885
+ partial: "partial";
886
+ "not-applicable": "not-applicable";
887
+ }>;
1427
888
  reason: z.ZodOptional<z.ZodString>;
1428
- evidence: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
1429
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
889
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
890
+ source: z.ZodEnum<{
891
+ agent: "agent";
892
+ code: "code";
893
+ configuration: "configuration";
894
+ documentation: "documentation";
895
+ derived: "derived";
896
+ }>;
1430
897
  path: z.ZodString;
1431
898
  lineStart: z.ZodOptional<z.ZodNumber>;
1432
899
  lineEnd: z.ZodOptional<z.ZodNumber>;
1433
900
  contentHash: z.ZodOptional<z.ZodString>;
1434
901
  context: z.ZodOptional<z.ZodString>;
1435
- }, "strict", z.ZodTypeAny, {
1436
- path: string;
1437
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1438
- contentHash?: string | undefined;
1439
- lineStart?: number | undefined;
1440
- lineEnd?: number | undefined;
1441
- context?: string | undefined;
1442
- }, {
1443
- path: string;
1444
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1445
- contentHash?: string | undefined;
1446
- lineStart?: number | undefined;
1447
- lineEnd?: number | undefined;
1448
- context?: string | undefined;
1449
- }>, {
1450
- path: string;
1451
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1452
- contentHash?: string | undefined;
1453
- lineStart?: number | undefined;
1454
- lineEnd?: number | undefined;
1455
- context?: string | undefined;
1456
- }, {
1457
- path: string;
1458
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1459
- contentHash?: string | undefined;
1460
- lineStart?: number | undefined;
1461
- lineEnd?: number | undefined;
1462
- context?: string | undefined;
1463
- }>, "many">>;
1464
- }, "strict", z.ZodTypeAny, {
1465
- status: "partial" | "not-analyzed" | "complete";
1466
- analyzer: string;
1467
- scope: string;
1468
- reason?: string | undefined;
1469
- evidence?: {
1470
- path: string;
1471
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1472
- contentHash?: string | undefined;
1473
- lineStart?: number | undefined;
1474
- lineEnd?: number | undefined;
1475
- context?: string | undefined;
1476
- }[] | undefined;
1477
- }, {
1478
- status: "partial" | "not-analyzed" | "complete";
1479
- analyzer: string;
1480
- scope: string;
1481
- reason?: string | undefined;
1482
- evidence?: {
1483
- path: string;
1484
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1485
- contentHash?: string | undefined;
1486
- lineStart?: number | undefined;
1487
- lineEnd?: number | undefined;
1488
- context?: string | undefined;
1489
- }[] | undefined;
1490
- }>;
902
+ }, z.core.$strict>>>;
903
+ }, z.core.$strict>;
1491
904
  declare const ProjectIdentitySchema: z.ZodObject<{
1492
905
  name: z.ZodString;
1493
906
  root: z.ZodOptional<z.ZodString>;
1494
- }, "strict", z.ZodTypeAny, {
1495
- name: string;
1496
- root?: string | undefined;
1497
- }, {
1498
- name: string;
1499
- root?: string | undefined;
1500
- }>;
907
+ }, z.core.$strict>;
1501
908
  declare const EntitySchema: z.ZodObject<{
1502
909
  id: z.ZodString;
1503
910
  kind: z.ZodString;
1504
911
  name: z.ZodString;
1505
912
  path: z.ZodOptional<z.ZodString>;
1506
- aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1507
- provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
1508
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
1509
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
913
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
914
+ provenance: z.ZodEnum<{
915
+ observed: "observed";
916
+ declared: "declared";
917
+ proposed: "proposed";
918
+ }>;
919
+ evidence: z.ZodArray<z.ZodObject<{
920
+ source: z.ZodEnum<{
921
+ agent: "agent";
922
+ code: "code";
923
+ configuration: "configuration";
924
+ documentation: "documentation";
925
+ derived: "derived";
926
+ }>;
1510
927
  path: z.ZodString;
1511
928
  lineStart: z.ZodOptional<z.ZodNumber>;
1512
929
  lineEnd: z.ZodOptional<z.ZodNumber>;
1513
930
  contentHash: z.ZodOptional<z.ZodString>;
1514
931
  context: z.ZodOptional<z.ZodString>;
1515
- }, "strict", z.ZodTypeAny, {
1516
- path: string;
1517
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1518
- contentHash?: string | undefined;
1519
- lineStart?: number | undefined;
1520
- lineEnd?: number | undefined;
1521
- context?: string | undefined;
1522
- }, {
1523
- path: string;
1524
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1525
- contentHash?: string | undefined;
1526
- lineStart?: number | undefined;
1527
- lineEnd?: number | undefined;
1528
- context?: string | undefined;
1529
- }>, {
1530
- path: string;
1531
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1532
- contentHash?: string | undefined;
1533
- lineStart?: number | undefined;
1534
- lineEnd?: number | undefined;
1535
- context?: string | undefined;
1536
- }, {
1537
- path: string;
1538
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1539
- contentHash?: string | undefined;
1540
- lineStart?: number | undefined;
1541
- lineEnd?: number | undefined;
1542
- context?: string | undefined;
1543
- }>, "many">;
932
+ }, z.core.$strict>>;
1544
933
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1545
- }, "strict", z.ZodTypeAny, {
1546
- id: string;
1547
- name: string;
1548
- kind: string;
1549
- evidence: {
1550
- path: string;
1551
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1552
- contentHash?: string | undefined;
1553
- lineStart?: number | undefined;
1554
- lineEnd?: number | undefined;
1555
- context?: string | undefined;
1556
- }[];
1557
- provenance: "observed" | "declared" | "proposed";
1558
- path?: string | undefined;
1559
- metadata?: Record<string, unknown> | undefined;
1560
- aliases?: string[] | undefined;
1561
- }, {
1562
- id: string;
1563
- name: string;
1564
- kind: string;
1565
- evidence: {
1566
- path: string;
1567
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1568
- contentHash?: string | undefined;
1569
- lineStart?: number | undefined;
1570
- lineEnd?: number | undefined;
1571
- context?: string | undefined;
1572
- }[];
1573
- provenance: "observed" | "declared" | "proposed";
1574
- path?: string | undefined;
1575
- metadata?: Record<string, unknown> | undefined;
1576
- aliases?: string[] | undefined;
1577
- }>;
934
+ }, z.core.$strict>;
1578
935
  type KnowledgeEntity = z.infer<typeof EntitySchema>;
1579
936
  declare const RelationSchema: z.ZodObject<{
1580
937
  id: z.ZodString;
@@ -1582,1443 +939,524 @@ declare const RelationSchema: z.ZodObject<{
1582
939
  from: z.ZodString;
1583
940
  to: z.ZodString;
1584
941
  discriminator: z.ZodOptional<z.ZodString>;
1585
- provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
1586
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
1587
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
942
+ provenance: z.ZodEnum<{
943
+ observed: "observed";
944
+ declared: "declared";
945
+ proposed: "proposed";
946
+ }>;
947
+ evidence: z.ZodArray<z.ZodObject<{
948
+ source: z.ZodEnum<{
949
+ agent: "agent";
950
+ code: "code";
951
+ configuration: "configuration";
952
+ documentation: "documentation";
953
+ derived: "derived";
954
+ }>;
1588
955
  path: z.ZodString;
1589
956
  lineStart: z.ZodOptional<z.ZodNumber>;
1590
957
  lineEnd: z.ZodOptional<z.ZodNumber>;
1591
958
  contentHash: z.ZodOptional<z.ZodString>;
1592
959
  context: z.ZodOptional<z.ZodString>;
1593
- }, "strict", z.ZodTypeAny, {
1594
- path: string;
1595
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1596
- contentHash?: string | undefined;
1597
- lineStart?: number | undefined;
1598
- lineEnd?: number | undefined;
1599
- context?: string | undefined;
1600
- }, {
1601
- path: string;
1602
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1603
- contentHash?: string | undefined;
1604
- lineStart?: number | undefined;
1605
- lineEnd?: number | undefined;
1606
- context?: string | undefined;
1607
- }>, {
1608
- path: string;
1609
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1610
- contentHash?: string | undefined;
1611
- lineStart?: number | undefined;
1612
- lineEnd?: number | undefined;
1613
- context?: string | undefined;
1614
- }, {
1615
- path: string;
1616
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1617
- contentHash?: string | undefined;
1618
- lineStart?: number | undefined;
1619
- lineEnd?: number | undefined;
1620
- context?: string | undefined;
1621
- }>, "many">;
960
+ }, z.core.$strict>>;
1622
961
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1623
- }, "strict", z.ZodTypeAny, {
1624
- id: string;
1625
- kind: string;
1626
- evidence: {
1627
- path: string;
1628
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1629
- contentHash?: string | undefined;
1630
- lineStart?: number | undefined;
1631
- lineEnd?: number | undefined;
1632
- context?: string | undefined;
1633
- }[];
1634
- provenance: "observed" | "declared" | "proposed";
1635
- from: string;
1636
- to: string;
1637
- metadata?: Record<string, unknown> | undefined;
1638
- discriminator?: string | undefined;
1639
- }, {
1640
- id: string;
1641
- kind: string;
1642
- evidence: {
1643
- path: string;
1644
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1645
- contentHash?: string | undefined;
1646
- lineStart?: number | undefined;
1647
- lineEnd?: number | undefined;
1648
- context?: string | undefined;
1649
- }[];
1650
- provenance: "observed" | "declared" | "proposed";
1651
- from: string;
1652
- to: string;
1653
- metadata?: Record<string, unknown> | undefined;
1654
- discriminator?: string | undefined;
1655
- }>;
962
+ }, z.core.$strict>;
1656
963
  type KnowledgeRelation = z.infer<typeof RelationSchema>;
1657
- declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
964
+ declare const DiscoverySnapshotV1Schema: z.ZodObject<{
1658
965
  entities: z.ZodArray<z.ZodObject<{
1659
966
  id: z.ZodString;
1660
967
  kind: z.ZodString;
1661
968
  name: z.ZodString;
1662
969
  path: z.ZodOptional<z.ZodString>;
1663
- aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1664
- provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
1665
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
1666
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
970
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
971
+ provenance: z.ZodEnum<{
972
+ observed: "observed";
973
+ declared: "declared";
974
+ proposed: "proposed";
975
+ }>;
976
+ evidence: z.ZodArray<z.ZodObject<{
977
+ source: z.ZodEnum<{
978
+ agent: "agent";
979
+ code: "code";
980
+ configuration: "configuration";
981
+ documentation: "documentation";
982
+ derived: "derived";
983
+ }>;
1667
984
  path: z.ZodString;
1668
985
  lineStart: z.ZodOptional<z.ZodNumber>;
1669
986
  lineEnd: z.ZodOptional<z.ZodNumber>;
1670
987
  contentHash: z.ZodOptional<z.ZodString>;
1671
988
  context: z.ZodOptional<z.ZodString>;
1672
- }, "strict", z.ZodTypeAny, {
1673
- path: string;
1674
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1675
- contentHash?: string | undefined;
1676
- lineStart?: number | undefined;
1677
- lineEnd?: number | undefined;
1678
- context?: string | undefined;
1679
- }, {
1680
- path: string;
1681
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1682
- contentHash?: string | undefined;
1683
- lineStart?: number | undefined;
1684
- lineEnd?: number | undefined;
1685
- context?: string | undefined;
1686
- }>, {
1687
- path: string;
1688
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1689
- contentHash?: string | undefined;
1690
- lineStart?: number | undefined;
1691
- lineEnd?: number | undefined;
1692
- context?: string | undefined;
1693
- }, {
1694
- path: string;
1695
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1696
- contentHash?: string | undefined;
1697
- lineStart?: number | undefined;
1698
- lineEnd?: number | undefined;
1699
- context?: string | undefined;
1700
- }>, "many">;
989
+ }, z.core.$strict>>;
1701
990
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1702
- }, "strict", z.ZodTypeAny, {
1703
- id: string;
1704
- name: string;
1705
- kind: string;
1706
- evidence: {
1707
- path: string;
1708
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1709
- contentHash?: string | undefined;
1710
- lineStart?: number | undefined;
1711
- lineEnd?: number | undefined;
1712
- context?: string | undefined;
1713
- }[];
1714
- provenance: "observed" | "declared" | "proposed";
1715
- path?: string | undefined;
1716
- metadata?: Record<string, unknown> | undefined;
1717
- aliases?: string[] | undefined;
1718
- }, {
1719
- id: string;
1720
- name: string;
1721
- kind: string;
1722
- evidence: {
1723
- path: string;
1724
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1725
- contentHash?: string | undefined;
1726
- lineStart?: number | undefined;
1727
- lineEnd?: number | undefined;
1728
- context?: string | undefined;
1729
- }[];
1730
- provenance: "observed" | "declared" | "proposed";
1731
- path?: string | undefined;
1732
- metadata?: Record<string, unknown> | undefined;
1733
- aliases?: string[] | undefined;
1734
- }>, "many">;
991
+ }, z.core.$strict>>;
1735
992
  relations: z.ZodArray<z.ZodObject<{
1736
993
  id: z.ZodString;
1737
994
  kind: z.ZodString;
1738
995
  from: z.ZodString;
1739
996
  to: z.ZodString;
1740
997
  discriminator: z.ZodOptional<z.ZodString>;
1741
- provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
1742
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
1743
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
998
+ provenance: z.ZodEnum<{
999
+ observed: "observed";
1000
+ declared: "declared";
1001
+ proposed: "proposed";
1002
+ }>;
1003
+ evidence: z.ZodArray<z.ZodObject<{
1004
+ source: z.ZodEnum<{
1005
+ agent: "agent";
1006
+ code: "code";
1007
+ configuration: "configuration";
1008
+ documentation: "documentation";
1009
+ derived: "derived";
1010
+ }>;
1744
1011
  path: z.ZodString;
1745
1012
  lineStart: z.ZodOptional<z.ZodNumber>;
1746
1013
  lineEnd: z.ZodOptional<z.ZodNumber>;
1747
1014
  contentHash: z.ZodOptional<z.ZodString>;
1748
1015
  context: z.ZodOptional<z.ZodString>;
1749
- }, "strict", z.ZodTypeAny, {
1750
- path: string;
1751
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1752
- contentHash?: string | undefined;
1753
- lineStart?: number | undefined;
1754
- lineEnd?: number | undefined;
1755
- context?: string | undefined;
1756
- }, {
1757
- path: string;
1758
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1759
- contentHash?: string | undefined;
1760
- lineStart?: number | undefined;
1761
- lineEnd?: number | undefined;
1762
- context?: string | undefined;
1763
- }>, {
1764
- path: string;
1765
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1766
- contentHash?: string | undefined;
1767
- lineStart?: number | undefined;
1768
- lineEnd?: number | undefined;
1769
- context?: string | undefined;
1770
- }, {
1771
- path: string;
1772
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1773
- contentHash?: string | undefined;
1774
- lineStart?: number | undefined;
1775
- lineEnd?: number | undefined;
1776
- context?: string | undefined;
1777
- }>, "many">;
1016
+ }, z.core.$strict>>;
1778
1017
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1779
- }, "strict", z.ZodTypeAny, {
1780
- id: string;
1781
- kind: string;
1782
- evidence: {
1783
- path: string;
1784
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1785
- contentHash?: string | undefined;
1786
- lineStart?: number | undefined;
1787
- lineEnd?: number | undefined;
1788
- context?: string | undefined;
1789
- }[];
1790
- provenance: "observed" | "declared" | "proposed";
1791
- from: string;
1792
- to: string;
1793
- metadata?: Record<string, unknown> | undefined;
1794
- discriminator?: string | undefined;
1795
- }, {
1796
- id: string;
1797
- kind: string;
1798
- evidence: {
1799
- path: string;
1800
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1801
- contentHash?: string | undefined;
1802
- lineStart?: number | undefined;
1803
- lineEnd?: number | undefined;
1804
- context?: string | undefined;
1805
- }[];
1806
- provenance: "observed" | "declared" | "proposed";
1807
- from: string;
1808
- to: string;
1809
- metadata?: Record<string, unknown> | undefined;
1810
- discriminator?: string | undefined;
1811
- }>, "many">;
1018
+ }, z.core.$strict>>;
1812
1019
  coverage: z.ZodArray<z.ZodObject<{
1813
1020
  analyzer: z.ZodString;
1021
+ analyzerVersion: z.ZodOptional<z.ZodString>;
1814
1022
  scope: z.ZodString;
1815
- status: z.ZodEnum<["complete", "partial", "not-analyzed"]>;
1023
+ status: z.ZodEnum<{
1024
+ "not-analyzed": "not-analyzed";
1025
+ complete: "complete";
1026
+ partial: "partial";
1027
+ "not-applicable": "not-applicable";
1028
+ }>;
1816
1029
  reason: z.ZodOptional<z.ZodString>;
1817
- evidence: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
1818
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
1030
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
1031
+ source: z.ZodEnum<{
1032
+ agent: "agent";
1033
+ code: "code";
1034
+ configuration: "configuration";
1035
+ documentation: "documentation";
1036
+ derived: "derived";
1037
+ }>;
1819
1038
  path: z.ZodString;
1820
1039
  lineStart: z.ZodOptional<z.ZodNumber>;
1821
1040
  lineEnd: z.ZodOptional<z.ZodNumber>;
1822
1041
  contentHash: z.ZodOptional<z.ZodString>;
1823
1042
  context: z.ZodOptional<z.ZodString>;
1824
- }, "strict", z.ZodTypeAny, {
1825
- path: string;
1826
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1827
- contentHash?: string | undefined;
1828
- lineStart?: number | undefined;
1829
- lineEnd?: number | undefined;
1830
- context?: string | undefined;
1831
- }, {
1832
- path: string;
1833
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1834
- contentHash?: string | undefined;
1835
- lineStart?: number | undefined;
1836
- lineEnd?: number | undefined;
1837
- context?: string | undefined;
1838
- }>, {
1839
- path: string;
1840
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1841
- contentHash?: string | undefined;
1842
- lineStart?: number | undefined;
1843
- lineEnd?: number | undefined;
1844
- context?: string | undefined;
1845
- }, {
1846
- path: string;
1847
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1848
- contentHash?: string | undefined;
1849
- lineStart?: number | undefined;
1850
- lineEnd?: number | undefined;
1851
- context?: string | undefined;
1852
- }>, "many">>;
1853
- }, "strict", z.ZodTypeAny, {
1854
- status: "partial" | "not-analyzed" | "complete";
1855
- analyzer: string;
1856
- scope: string;
1857
- reason?: string | undefined;
1858
- evidence?: {
1859
- path: string;
1860
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1861
- contentHash?: string | undefined;
1862
- lineStart?: number | undefined;
1863
- lineEnd?: number | undefined;
1864
- context?: string | undefined;
1865
- }[] | undefined;
1866
- }, {
1867
- status: "partial" | "not-analyzed" | "complete";
1868
- analyzer: string;
1869
- scope: string;
1870
- reason?: string | undefined;
1871
- evidence?: {
1872
- path: string;
1873
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1874
- contentHash?: string | undefined;
1875
- lineStart?: number | undefined;
1876
- lineEnd?: number | undefined;
1877
- context?: string | undefined;
1878
- }[] | undefined;
1879
- }>, "many">;
1043
+ }, z.core.$strict>>>;
1044
+ }, z.core.$strict>>;
1880
1045
  schemaVersion: z.ZodLiteral<1>;
1881
1046
  contentHash: z.ZodString;
1882
1047
  contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
1883
1048
  project: z.ZodObject<{
1884
1049
  name: z.ZodString;
1885
1050
  root: z.ZodOptional<z.ZodString>;
1886
- }, "strict", z.ZodTypeAny, {
1887
- name: string;
1888
- root?: string | undefined;
1889
- }, {
1890
- name: string;
1891
- root?: string | undefined;
1892
- }>;
1051
+ }, z.core.$strict>;
1893
1052
  sourceRevision: z.ZodString;
1894
- sourceRevisionKind: z.ZodEnum<["git", "content"]>;
1053
+ sourceRevisionKind: z.ZodEnum<{
1054
+ git: "git";
1055
+ content: "content";
1056
+ }>;
1895
1057
  configurationHash: z.ZodString;
1896
1058
  pipelineVersion: z.ZodString;
1897
1059
  analyzerVersions: z.ZodRecord<z.ZodString, z.ZodString>;
1898
1060
  type: z.ZodLiteral<"discovery-snapshot">;
1899
- }, "strict", z.ZodTypeAny, {
1900
- type: "discovery-snapshot";
1901
- contentHash: string;
1902
- schemaVersion: 1;
1903
- project: {
1904
- name: string;
1905
- root?: string | undefined;
1906
- };
1907
- contentHashAlgo: "sha256-normalized-v1";
1908
- entities: {
1909
- id: string;
1910
- name: string;
1911
- kind: string;
1912
- evidence: {
1913
- path: string;
1914
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1915
- contentHash?: string | undefined;
1916
- lineStart?: number | undefined;
1917
- lineEnd?: number | undefined;
1918
- context?: string | undefined;
1919
- }[];
1920
- provenance: "observed" | "declared" | "proposed";
1921
- path?: string | undefined;
1922
- metadata?: Record<string, unknown> | undefined;
1923
- aliases?: string[] | undefined;
1924
- }[];
1925
- relations: {
1926
- id: string;
1927
- kind: string;
1928
- evidence: {
1929
- path: string;
1930
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1931
- contentHash?: string | undefined;
1932
- lineStart?: number | undefined;
1933
- lineEnd?: number | undefined;
1934
- context?: string | undefined;
1935
- }[];
1936
- provenance: "observed" | "declared" | "proposed";
1937
- from: string;
1938
- to: string;
1939
- metadata?: Record<string, unknown> | undefined;
1940
- discriminator?: string | undefined;
1941
- }[];
1942
- coverage: {
1943
- status: "partial" | "not-analyzed" | "complete";
1944
- analyzer: string;
1945
- scope: string;
1946
- reason?: string | undefined;
1947
- evidence?: {
1948
- path: string;
1949
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1950
- contentHash?: string | undefined;
1951
- lineStart?: number | undefined;
1952
- lineEnd?: number | undefined;
1953
- context?: string | undefined;
1954
- }[] | undefined;
1955
- }[];
1956
- sourceRevision: string;
1957
- sourceRevisionKind: "git" | "content";
1958
- configurationHash: string;
1959
- pipelineVersion: string;
1960
- analyzerVersions: Record<string, string>;
1961
- }, {
1962
- type: "discovery-snapshot";
1963
- contentHash: string;
1964
- schemaVersion: 1;
1965
- project: {
1966
- name: string;
1967
- root?: string | undefined;
1968
- };
1969
- contentHashAlgo: "sha256-normalized-v1";
1970
- entities: {
1971
- id: string;
1972
- name: string;
1973
- kind: string;
1974
- evidence: {
1975
- path: string;
1976
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1977
- contentHash?: string | undefined;
1978
- lineStart?: number | undefined;
1979
- lineEnd?: number | undefined;
1980
- context?: string | undefined;
1981
- }[];
1982
- provenance: "observed" | "declared" | "proposed";
1983
- path?: string | undefined;
1984
- metadata?: Record<string, unknown> | undefined;
1985
- aliases?: string[] | undefined;
1986
- }[];
1987
- relations: {
1988
- id: string;
1989
- kind: string;
1990
- evidence: {
1991
- path: string;
1992
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
1993
- contentHash?: string | undefined;
1994
- lineStart?: number | undefined;
1995
- lineEnd?: number | undefined;
1996
- context?: string | undefined;
1997
- }[];
1998
- provenance: "observed" | "declared" | "proposed";
1999
- from: string;
2000
- to: string;
2001
- metadata?: Record<string, unknown> | undefined;
2002
- discriminator?: string | undefined;
2003
- }[];
2004
- coverage: {
2005
- status: "partial" | "not-analyzed" | "complete";
2006
- analyzer: string;
2007
- scope: string;
2008
- reason?: string | undefined;
2009
- evidence?: {
2010
- path: string;
2011
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2012
- contentHash?: string | undefined;
2013
- lineStart?: number | undefined;
2014
- lineEnd?: number | undefined;
2015
- context?: string | undefined;
2016
- }[] | undefined;
2017
- }[];
2018
- sourceRevision: string;
2019
- sourceRevisionKind: "git" | "content";
2020
- configurationHash: string;
2021
- pipelineVersion: string;
2022
- analyzerVersions: Record<string, string>;
2023
- }>, {
2024
- type: "discovery-snapshot";
2025
- contentHash: string;
2026
- schemaVersion: 1;
2027
- project: {
2028
- name: string;
2029
- root?: string | undefined;
2030
- };
2031
- contentHashAlgo: "sha256-normalized-v1";
2032
- entities: {
2033
- id: string;
2034
- name: string;
2035
- kind: string;
2036
- evidence: {
2037
- path: string;
2038
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2039
- contentHash?: string | undefined;
2040
- lineStart?: number | undefined;
2041
- lineEnd?: number | undefined;
2042
- context?: string | undefined;
2043
- }[];
2044
- provenance: "observed" | "declared" | "proposed";
2045
- path?: string | undefined;
2046
- metadata?: Record<string, unknown> | undefined;
2047
- aliases?: string[] | undefined;
2048
- }[];
2049
- relations: {
2050
- id: string;
2051
- kind: string;
2052
- evidence: {
2053
- path: string;
2054
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2055
- contentHash?: string | undefined;
2056
- lineStart?: number | undefined;
2057
- lineEnd?: number | undefined;
2058
- context?: string | undefined;
2059
- }[];
2060
- provenance: "observed" | "declared" | "proposed";
2061
- from: string;
2062
- to: string;
2063
- metadata?: Record<string, unknown> | undefined;
2064
- discriminator?: string | undefined;
2065
- }[];
2066
- coverage: {
2067
- status: "partial" | "not-analyzed" | "complete";
2068
- analyzer: string;
2069
- scope: string;
2070
- reason?: string | undefined;
2071
- evidence?: {
2072
- path: string;
2073
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2074
- contentHash?: string | undefined;
2075
- lineStart?: number | undefined;
2076
- lineEnd?: number | undefined;
2077
- context?: string | undefined;
2078
- }[] | undefined;
2079
- }[];
2080
- sourceRevision: string;
2081
- sourceRevisionKind: "git" | "content";
2082
- configurationHash: string;
2083
- pipelineVersion: string;
2084
- analyzerVersions: Record<string, string>;
2085
- }, {
2086
- type: "discovery-snapshot";
2087
- contentHash: string;
2088
- schemaVersion: 1;
2089
- project: {
2090
- name: string;
2091
- root?: string | undefined;
2092
- };
2093
- contentHashAlgo: "sha256-normalized-v1";
2094
- entities: {
2095
- id: string;
2096
- name: string;
2097
- kind: string;
2098
- evidence: {
2099
- path: string;
2100
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2101
- contentHash?: string | undefined;
2102
- lineStart?: number | undefined;
2103
- lineEnd?: number | undefined;
2104
- context?: string | undefined;
2105
- }[];
2106
- provenance: "observed" | "declared" | "proposed";
2107
- path?: string | undefined;
2108
- metadata?: Record<string, unknown> | undefined;
2109
- aliases?: string[] | undefined;
2110
- }[];
2111
- relations: {
2112
- id: string;
2113
- kind: string;
2114
- evidence: {
2115
- path: string;
2116
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2117
- contentHash?: string | undefined;
2118
- lineStart?: number | undefined;
2119
- lineEnd?: number | undefined;
2120
- context?: string | undefined;
2121
- }[];
2122
- provenance: "observed" | "declared" | "proposed";
2123
- from: string;
2124
- to: string;
2125
- metadata?: Record<string, unknown> | undefined;
2126
- discriminator?: string | undefined;
2127
- }[];
2128
- coverage: {
2129
- status: "partial" | "not-analyzed" | "complete";
2130
- analyzer: string;
2131
- scope: string;
2132
- reason?: string | undefined;
2133
- evidence?: {
2134
- path: string;
2135
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2136
- contentHash?: string | undefined;
2137
- lineStart?: number | undefined;
2138
- lineEnd?: number | undefined;
2139
- context?: string | undefined;
2140
- }[] | undefined;
2141
- }[];
2142
- sourceRevision: string;
2143
- sourceRevisionKind: "git" | "content";
2144
- configurationHash: string;
2145
- pipelineVersion: string;
2146
- analyzerVersions: Record<string, string>;
2147
- }>;
1061
+ }, z.core.$strict>;
2148
1062
  type DiscoverySnapshotV1 = z.infer<typeof DiscoverySnapshotV1Schema>;
2149
1063
  declare const DiagnosticSchema: z.ZodObject<{
2150
1064
  id: z.ZodString;
2151
1065
  code: z.ZodString;
2152
- status: z.ZodEnum<["confirmed", "undocumented", "stale-or-unverified", "conflict", "unresolved", "not-analyzed"]>;
2153
- severity: z.ZodEnum<["off", "info", "warn", "error"]>;
1066
+ status: z.ZodEnum<{
1067
+ confirmed: "confirmed";
1068
+ undocumented: "undocumented";
1069
+ "stale-or-unverified": "stale-or-unverified";
1070
+ conflict: "conflict";
1071
+ unresolved: "unresolved";
1072
+ "not-analyzed": "not-analyzed";
1073
+ }>;
1074
+ severity: z.ZodEnum<{
1075
+ error: "error";
1076
+ off: "off";
1077
+ info: "info";
1078
+ warn: "warn";
1079
+ }>;
2154
1080
  message: z.ZodString;
2155
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
2156
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
1081
+ evidence: z.ZodArray<z.ZodObject<{
1082
+ source: z.ZodEnum<{
1083
+ agent: "agent";
1084
+ code: "code";
1085
+ configuration: "configuration";
1086
+ documentation: "documentation";
1087
+ derived: "derived";
1088
+ }>;
2157
1089
  path: z.ZodString;
2158
1090
  lineStart: z.ZodOptional<z.ZodNumber>;
2159
1091
  lineEnd: z.ZodOptional<z.ZodNumber>;
2160
1092
  contentHash: z.ZodOptional<z.ZodString>;
2161
1093
  context: z.ZodOptional<z.ZodString>;
2162
- }, "strict", z.ZodTypeAny, {
2163
- path: string;
2164
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2165
- contentHash?: string | undefined;
2166
- lineStart?: number | undefined;
2167
- lineEnd?: number | undefined;
2168
- context?: string | undefined;
2169
- }, {
2170
- path: string;
2171
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2172
- contentHash?: string | undefined;
2173
- lineStart?: number | undefined;
2174
- lineEnd?: number | undefined;
2175
- context?: string | undefined;
2176
- }>, {
2177
- path: string;
2178
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2179
- contentHash?: string | undefined;
2180
- lineStart?: number | undefined;
2181
- lineEnd?: number | undefined;
2182
- context?: string | undefined;
2183
- }, {
2184
- path: string;
2185
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2186
- contentHash?: string | undefined;
2187
- lineStart?: number | undefined;
2188
- lineEnd?: number | undefined;
2189
- context?: string | undefined;
2190
- }>, "many">;
2191
- entityIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2192
- relationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1094
+ }, z.core.$strict>>;
1095
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1096
+ relationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2193
1097
  remediation: z.ZodOptional<z.ZodString>;
2194
- }, "strict", z.ZodTypeAny, {
2195
- code: string;
2196
- message: string;
2197
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2198
- id: string;
2199
- severity: "off" | "info" | "warn" | "error";
2200
- evidence: {
2201
- path: string;
2202
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2203
- contentHash?: string | undefined;
2204
- lineStart?: number | undefined;
2205
- lineEnd?: number | undefined;
2206
- context?: string | undefined;
2207
- }[];
2208
- entityIds?: string[] | undefined;
2209
- relationIds?: string[] | undefined;
2210
- remediation?: string | undefined;
2211
- }, {
2212
- code: string;
2213
- message: string;
2214
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2215
- id: string;
2216
- severity: "off" | "info" | "warn" | "error";
2217
- evidence: {
2218
- path: string;
2219
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2220
- contentHash?: string | undefined;
2221
- lineStart?: number | undefined;
2222
- lineEnd?: number | undefined;
2223
- context?: string | undefined;
2224
- }[];
2225
- entityIds?: string[] | undefined;
2226
- relationIds?: string[] | undefined;
2227
- remediation?: string | undefined;
2228
- }>;
1098
+ }, z.core.$strict>;
2229
1099
  type KnowledgeDiagnostic = z.infer<typeof DiagnosticSchema>;
2230
1100
  declare const ReconciliationReportV1Schema: z.ZodObject<{
2231
1101
  snapshotHash: z.ZodString;
2232
1102
  diagnostics: z.ZodArray<z.ZodObject<{
2233
1103
  id: z.ZodString;
2234
1104
  code: z.ZodString;
2235
- status: z.ZodEnum<["confirmed", "undocumented", "stale-or-unverified", "conflict", "unresolved", "not-analyzed"]>;
2236
- severity: z.ZodEnum<["off", "info", "warn", "error"]>;
1105
+ status: z.ZodEnum<{
1106
+ confirmed: "confirmed";
1107
+ undocumented: "undocumented";
1108
+ "stale-or-unverified": "stale-or-unverified";
1109
+ conflict: "conflict";
1110
+ unresolved: "unresolved";
1111
+ "not-analyzed": "not-analyzed";
1112
+ }>;
1113
+ severity: z.ZodEnum<{
1114
+ error: "error";
1115
+ off: "off";
1116
+ info: "info";
1117
+ warn: "warn";
1118
+ }>;
2237
1119
  message: z.ZodString;
2238
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
2239
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
1120
+ evidence: z.ZodArray<z.ZodObject<{
1121
+ source: z.ZodEnum<{
1122
+ agent: "agent";
1123
+ code: "code";
1124
+ configuration: "configuration";
1125
+ documentation: "documentation";
1126
+ derived: "derived";
1127
+ }>;
2240
1128
  path: z.ZodString;
2241
1129
  lineStart: z.ZodOptional<z.ZodNumber>;
2242
1130
  lineEnd: z.ZodOptional<z.ZodNumber>;
2243
1131
  contentHash: z.ZodOptional<z.ZodString>;
2244
1132
  context: z.ZodOptional<z.ZodString>;
2245
- }, "strict", z.ZodTypeAny, {
2246
- path: string;
2247
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2248
- contentHash?: string | undefined;
2249
- lineStart?: number | undefined;
2250
- lineEnd?: number | undefined;
2251
- context?: string | undefined;
2252
- }, {
2253
- path: string;
2254
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2255
- contentHash?: string | undefined;
2256
- lineStart?: number | undefined;
2257
- lineEnd?: number | undefined;
2258
- context?: string | undefined;
2259
- }>, {
2260
- path: string;
2261
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2262
- contentHash?: string | undefined;
2263
- lineStart?: number | undefined;
2264
- lineEnd?: number | undefined;
2265
- context?: string | undefined;
2266
- }, {
2267
- path: string;
2268
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2269
- contentHash?: string | undefined;
2270
- lineStart?: number | undefined;
2271
- lineEnd?: number | undefined;
2272
- context?: string | undefined;
2273
- }>, "many">;
2274
- entityIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2275
- relationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1133
+ }, z.core.$strict>>;
1134
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1135
+ relationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2276
1136
  remediation: z.ZodOptional<z.ZodString>;
2277
- }, "strict", z.ZodTypeAny, {
2278
- code: string;
2279
- message: string;
2280
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2281
- id: string;
2282
- severity: "off" | "info" | "warn" | "error";
2283
- evidence: {
2284
- path: string;
2285
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2286
- contentHash?: string | undefined;
2287
- lineStart?: number | undefined;
2288
- lineEnd?: number | undefined;
2289
- context?: string | undefined;
2290
- }[];
2291
- entityIds?: string[] | undefined;
2292
- relationIds?: string[] | undefined;
2293
- remediation?: string | undefined;
2294
- }, {
2295
- code: string;
2296
- message: string;
2297
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2298
- id: string;
2299
- severity: "off" | "info" | "warn" | "error";
2300
- evidence: {
2301
- path: string;
2302
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2303
- contentHash?: string | undefined;
2304
- lineStart?: number | undefined;
2305
- lineEnd?: number | undefined;
2306
- context?: string | undefined;
2307
- }[];
2308
- entityIds?: string[] | undefined;
2309
- relationIds?: string[] | undefined;
2310
- remediation?: string | undefined;
2311
- }>, "many">;
1137
+ }, z.core.$strict>>;
2312
1138
  summary: z.ZodObject<{
2313
1139
  entityCount: z.ZodNumber;
2314
1140
  relationCount: z.ZodNumber;
2315
1141
  diagnosticCount: z.ZodNumber;
2316
- requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2317
- }, "strict", z.ZodTypeAny, {
2318
- entityCount: number;
2319
- relationCount: number;
2320
- diagnosticCount: number;
2321
- requiredRelationKinds?: string[] | undefined;
2322
- }, {
2323
- entityCount: number;
2324
- relationCount: number;
2325
- diagnosticCount: number;
2326
- requiredRelationKinds?: string[] | undefined;
2327
- }>;
1142
+ scope: z.ZodOptional<z.ZodEnum<{
1143
+ file: "file";
1144
+ module: "module";
1145
+ package: "package";
1146
+ }>>;
1147
+ requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString>>;
1148
+ requiredRelationTargets: z.ZodOptional<z.ZodEnum<{
1149
+ all: "all";
1150
+ internal: "internal";
1151
+ }>>;
1152
+ diagnosticsByCode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1153
+ diagnosticsByStatus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1154
+ documentation: z.ZodOptional<z.ZodObject<{
1155
+ documentCount: z.ZodNumber;
1156
+ documentedDocumentCount: z.ZodNumber;
1157
+ documentClassificationCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
1158
+ documentedDocumentClassificationCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
1159
+ packageCount: z.ZodNumber;
1160
+ packageStatus: z.ZodObject<{
1161
+ fresh: z.ZodNumber;
1162
+ stale: z.ZodNumber;
1163
+ missing: z.ZodNumber;
1164
+ unverified: z.ZodNumber;
1165
+ }, z.core.$strict>;
1166
+ }, z.core.$strict>>;
1167
+ }, z.core.$strict>;
2328
1168
  schemaVersion: z.ZodLiteral<1>;
2329
1169
  contentHash: z.ZodString;
2330
1170
  contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
2331
1171
  project: z.ZodObject<{
2332
1172
  name: z.ZodString;
2333
1173
  root: z.ZodOptional<z.ZodString>;
2334
- }, "strict", z.ZodTypeAny, {
2335
- name: string;
2336
- root?: string | undefined;
2337
- }, {
2338
- name: string;
2339
- root?: string | undefined;
2340
- }>;
1174
+ }, z.core.$strict>;
2341
1175
  sourceRevision: z.ZodString;
2342
- sourceRevisionKind: z.ZodEnum<["git", "content"]>;
1176
+ sourceRevisionKind: z.ZodEnum<{
1177
+ git: "git";
1178
+ content: "content";
1179
+ }>;
2343
1180
  configurationHash: z.ZodString;
2344
1181
  pipelineVersion: z.ZodString;
2345
1182
  analyzerVersions: z.ZodRecord<z.ZodString, z.ZodString>;
2346
1183
  type: z.ZodLiteral<"reconciliation-report">;
2347
- }, "strict", z.ZodTypeAny, {
2348
- type: "reconciliation-report";
2349
- contentHash: string;
2350
- schemaVersion: 1;
2351
- project: {
2352
- name: string;
2353
- root?: string | undefined;
2354
- };
2355
- summary: {
2356
- entityCount: number;
2357
- relationCount: number;
2358
- diagnosticCount: number;
2359
- requiredRelationKinds?: string[] | undefined;
2360
- };
2361
- contentHashAlgo: "sha256-normalized-v1";
2362
- sourceRevision: string;
2363
- sourceRevisionKind: "git" | "content";
2364
- configurationHash: string;
2365
- pipelineVersion: string;
2366
- analyzerVersions: Record<string, string>;
2367
- snapshotHash: string;
2368
- diagnostics: {
2369
- code: string;
2370
- message: string;
2371
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2372
- id: string;
2373
- severity: "off" | "info" | "warn" | "error";
2374
- evidence: {
2375
- path: string;
2376
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2377
- contentHash?: string | undefined;
2378
- lineStart?: number | undefined;
2379
- lineEnd?: number | undefined;
2380
- context?: string | undefined;
2381
- }[];
2382
- entityIds?: string[] | undefined;
2383
- relationIds?: string[] | undefined;
2384
- remediation?: string | undefined;
2385
- }[];
2386
- }, {
2387
- type: "reconciliation-report";
2388
- contentHash: string;
2389
- schemaVersion: 1;
2390
- project: {
2391
- name: string;
2392
- root?: string | undefined;
2393
- };
2394
- summary: {
2395
- entityCount: number;
2396
- relationCount: number;
2397
- diagnosticCount: number;
2398
- requiredRelationKinds?: string[] | undefined;
2399
- };
2400
- contentHashAlgo: "sha256-normalized-v1";
2401
- sourceRevision: string;
2402
- sourceRevisionKind: "git" | "content";
2403
- configurationHash: string;
2404
- pipelineVersion: string;
2405
- analyzerVersions: Record<string, string>;
2406
- snapshotHash: string;
2407
- diagnostics: {
2408
- code: string;
2409
- message: string;
2410
- status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
2411
- id: string;
2412
- severity: "off" | "info" | "warn" | "error";
2413
- evidence: {
2414
- path: string;
2415
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2416
- contentHash?: string | undefined;
2417
- lineStart?: number | undefined;
2418
- lineEnd?: number | undefined;
2419
- context?: string | undefined;
2420
- }[];
2421
- entityIds?: string[] | undefined;
2422
- relationIds?: string[] | undefined;
2423
- remediation?: string | undefined;
2424
- }[];
2425
- }>;
1184
+ }, z.core.$strict>;
2426
1185
  type ReconciliationReportV1 = z.infer<typeof ReconciliationReportV1Schema>;
2427
- declare const WorkflowStateSchema: z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>;
1186
+ declare const WorkflowStateSchema: z.ZodEnum<{
1187
+ proposed: "proposed";
1188
+ stale: "stale";
1189
+ created: "created";
1190
+ discovering: "discovering";
1191
+ analyzed: "analyzed";
1192
+ compared: "compared";
1193
+ "awaiting-agent": "awaiting-agent";
1194
+ "awaiting-approval": "awaiting-approval";
1195
+ validating: "validating";
1196
+ delivered: "delivered";
1197
+ failed: "failed";
1198
+ cancelled: "cancelled";
1199
+ superseded: "superseded";
1200
+ }>;
2428
1201
  type WorkflowState = z.infer<typeof WorkflowStateSchema>;
2429
1202
  declare const WorkflowStepSchema: z.ZodObject<{
2430
1203
  name: z.ZodString;
2431
- status: z.ZodEnum<["pending", "running", "completed", "failed", "skipped"]>;
1204
+ status: z.ZodEnum<{
1205
+ failed: "failed";
1206
+ pending: "pending";
1207
+ running: "running";
1208
+ completed: "completed";
1209
+ skipped: "skipped";
1210
+ }>;
2432
1211
  inputHash: z.ZodString;
2433
1212
  outputHash: z.ZodOptional<z.ZodString>;
2434
- artifactRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2435
- }, "strict", z.ZodTypeAny, {
2436
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2437
- name: string;
2438
- inputHash: string;
2439
- outputHash?: string | undefined;
2440
- artifactRefs?: string[] | undefined;
2441
- }, {
2442
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2443
- name: string;
2444
- inputHash: string;
2445
- outputHash?: string | undefined;
2446
- artifactRefs?: string[] | undefined;
2447
- }>;
1213
+ artifactRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
1214
+ }, z.core.$strict>;
2448
1215
  declare const WorkflowTransitionSchema: z.ZodObject<{
2449
- from: z.ZodNullable<z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>>;
2450
- to: z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>;
1216
+ from: z.ZodNullable<z.ZodEnum<{
1217
+ proposed: "proposed";
1218
+ stale: "stale";
1219
+ created: "created";
1220
+ discovering: "discovering";
1221
+ analyzed: "analyzed";
1222
+ compared: "compared";
1223
+ "awaiting-agent": "awaiting-agent";
1224
+ "awaiting-approval": "awaiting-approval";
1225
+ validating: "validating";
1226
+ delivered: "delivered";
1227
+ failed: "failed";
1228
+ cancelled: "cancelled";
1229
+ superseded: "superseded";
1230
+ }>>;
1231
+ to: z.ZodEnum<{
1232
+ proposed: "proposed";
1233
+ stale: "stale";
1234
+ created: "created";
1235
+ discovering: "discovering";
1236
+ analyzed: "analyzed";
1237
+ compared: "compared";
1238
+ "awaiting-agent": "awaiting-agent";
1239
+ "awaiting-approval": "awaiting-approval";
1240
+ validating: "validating";
1241
+ delivered: "delivered";
1242
+ failed: "failed";
1243
+ cancelled: "cancelled";
1244
+ superseded: "superseded";
1245
+ }>;
2451
1246
  at: z.ZodString;
2452
1247
  reason: z.ZodOptional<z.ZodString>;
2453
- }, "strict", z.ZodTypeAny, {
2454
- at: string;
2455
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2456
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2457
- reason?: string | undefined;
2458
- }, {
2459
- at: string;
2460
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2461
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2462
- reason?: string | undefined;
2463
- }>;
1248
+ }, z.core.$strict>;
2464
1249
  declare const WorkflowRunV1Schema: z.ZodObject<{
2465
1250
  runId: z.ZodString;
2466
- state: z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>;
1251
+ state: z.ZodEnum<{
1252
+ proposed: "proposed";
1253
+ stale: "stale";
1254
+ created: "created";
1255
+ discovering: "discovering";
1256
+ analyzed: "analyzed";
1257
+ compared: "compared";
1258
+ "awaiting-agent": "awaiting-agent";
1259
+ "awaiting-approval": "awaiting-approval";
1260
+ validating: "validating";
1261
+ delivered: "delivered";
1262
+ failed: "failed";
1263
+ cancelled: "cancelled";
1264
+ superseded: "superseded";
1265
+ }>;
2467
1266
  steps: z.ZodArray<z.ZodObject<{
2468
1267
  name: z.ZodString;
2469
- status: z.ZodEnum<["pending", "running", "completed", "failed", "skipped"]>;
1268
+ status: z.ZodEnum<{
1269
+ failed: "failed";
1270
+ pending: "pending";
1271
+ running: "running";
1272
+ completed: "completed";
1273
+ skipped: "skipped";
1274
+ }>;
2470
1275
  inputHash: z.ZodString;
2471
1276
  outputHash: z.ZodOptional<z.ZodString>;
2472
- artifactRefs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2473
- }, "strict", z.ZodTypeAny, {
2474
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2475
- name: string;
2476
- inputHash: string;
2477
- outputHash?: string | undefined;
2478
- artifactRefs?: string[] | undefined;
2479
- }, {
2480
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2481
- name: string;
2482
- inputHash: string;
2483
- outputHash?: string | undefined;
2484
- artifactRefs?: string[] | undefined;
2485
- }>, "many">;
1277
+ artifactRefs: z.ZodOptional<z.ZodArray<z.ZodString>>;
1278
+ }, z.core.$strict>>;
2486
1279
  transitions: z.ZodArray<z.ZodObject<{
2487
- from: z.ZodNullable<z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>>;
2488
- to: z.ZodEnum<["created", "discovering", "analyzed", "compared", "awaiting-agent", "proposed", "awaiting-approval", "validating", "delivered", "failed", "cancelled", "stale", "superseded"]>;
1280
+ from: z.ZodNullable<z.ZodEnum<{
1281
+ proposed: "proposed";
1282
+ stale: "stale";
1283
+ created: "created";
1284
+ discovering: "discovering";
1285
+ analyzed: "analyzed";
1286
+ compared: "compared";
1287
+ "awaiting-agent": "awaiting-agent";
1288
+ "awaiting-approval": "awaiting-approval";
1289
+ validating: "validating";
1290
+ delivered: "delivered";
1291
+ failed: "failed";
1292
+ cancelled: "cancelled";
1293
+ superseded: "superseded";
1294
+ }>>;
1295
+ to: z.ZodEnum<{
1296
+ proposed: "proposed";
1297
+ stale: "stale";
1298
+ created: "created";
1299
+ discovering: "discovering";
1300
+ analyzed: "analyzed";
1301
+ compared: "compared";
1302
+ "awaiting-agent": "awaiting-agent";
1303
+ "awaiting-approval": "awaiting-approval";
1304
+ validating: "validating";
1305
+ delivered: "delivered";
1306
+ failed: "failed";
1307
+ cancelled: "cancelled";
1308
+ superseded: "superseded";
1309
+ }>;
2489
1310
  at: z.ZodString;
2490
1311
  reason: z.ZodOptional<z.ZodString>;
2491
- }, "strict", z.ZodTypeAny, {
2492
- at: string;
2493
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2494
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2495
- reason?: string | undefined;
2496
- }, {
2497
- at: string;
2498
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2499
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2500
- reason?: string | undefined;
2501
- }>, "many">;
2502
- artifactRefs: z.ZodArray<z.ZodString, "many">;
1312
+ }, z.core.$strict>>;
1313
+ artifactRefs: z.ZodArray<z.ZodString>;
2503
1314
  schemaVersion: z.ZodLiteral<1>;
2504
1315
  contentHash: z.ZodString;
2505
1316
  contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
2506
1317
  project: z.ZodObject<{
2507
1318
  name: z.ZodString;
2508
1319
  root: z.ZodOptional<z.ZodString>;
2509
- }, "strict", z.ZodTypeAny, {
2510
- name: string;
2511
- root?: string | undefined;
2512
- }, {
2513
- name: string;
2514
- root?: string | undefined;
2515
- }>;
1320
+ }, z.core.$strict>;
2516
1321
  sourceRevision: z.ZodString;
2517
- sourceRevisionKind: z.ZodEnum<["git", "content"]>;
1322
+ sourceRevisionKind: z.ZodEnum<{
1323
+ git: "git";
1324
+ content: "content";
1325
+ }>;
2518
1326
  configurationHash: z.ZodString;
2519
1327
  pipelineVersion: z.ZodString;
2520
1328
  analyzerVersions: z.ZodRecord<z.ZodString, z.ZodString>;
2521
1329
  type: z.ZodLiteral<"workflow-run">;
2522
- }, "strict", z.ZodTypeAny, {
2523
- type: "workflow-run";
2524
- contentHash: string;
2525
- schemaVersion: 1;
2526
- project: {
2527
- name: string;
2528
- root?: string | undefined;
2529
- };
2530
- contentHashAlgo: "sha256-normalized-v1";
2531
- sourceRevision: string;
2532
- sourceRevisionKind: "git" | "content";
2533
- configurationHash: string;
2534
- pipelineVersion: string;
2535
- analyzerVersions: Record<string, string>;
2536
- artifactRefs: string[];
2537
- runId: string;
2538
- state: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2539
- steps: {
2540
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2541
- name: string;
2542
- inputHash: string;
2543
- outputHash?: string | undefined;
2544
- artifactRefs?: string[] | undefined;
2545
- }[];
2546
- transitions: {
2547
- at: string;
2548
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2549
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2550
- reason?: string | undefined;
2551
- }[];
2552
- }, {
2553
- type: "workflow-run";
2554
- contentHash: string;
2555
- schemaVersion: 1;
2556
- project: {
2557
- name: string;
2558
- root?: string | undefined;
2559
- };
2560
- contentHashAlgo: "sha256-normalized-v1";
2561
- sourceRevision: string;
2562
- sourceRevisionKind: "git" | "content";
2563
- configurationHash: string;
2564
- pipelineVersion: string;
2565
- analyzerVersions: Record<string, string>;
2566
- artifactRefs: string[];
2567
- runId: string;
2568
- state: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2569
- steps: {
2570
- status: "failed" | "pending" | "running" | "completed" | "skipped";
2571
- name: string;
2572
- inputHash: string;
2573
- outputHash?: string | undefined;
2574
- artifactRefs?: string[] | undefined;
2575
- }[];
2576
- transitions: {
2577
- at: string;
2578
- from: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded" | null;
2579
- to: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2580
- reason?: string | undefined;
2581
- }[];
2582
- }>;
1330
+ }, z.core.$strict>;
2583
1331
  type WorkflowRunV1 = z.infer<typeof WorkflowRunV1Schema>;
2584
- declare const ProposalOriginSchema: z.ZodEffects<z.ZodObject<{
2585
- kind: z.ZodEnum<["registry-agent", "manual", "deterministic"]>;
1332
+ declare const ProposalOriginSchema: z.ZodObject<{
1333
+ kind: z.ZodEnum<{
1334
+ deterministic: "deterministic";
1335
+ manual: "manual";
1336
+ "registry-agent": "registry-agent";
1337
+ }>;
2586
1338
  id: z.ZodOptional<z.ZodString>;
2587
1339
  version: z.ZodOptional<z.ZodString>;
2588
1340
  provider: z.ZodOptional<z.ZodString>;
2589
1341
  model: z.ZodOptional<z.ZodString>;
2590
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2591
- }, "strict", z.ZodTypeAny, {
2592
- kind: "manual" | "registry-agent" | "deterministic";
2593
- capabilities?: string[] | undefined;
2594
- id?: string | undefined;
2595
- provider?: string | undefined;
2596
- model?: string | undefined;
2597
- version?: string | undefined;
2598
- }, {
2599
- kind: "manual" | "registry-agent" | "deterministic";
2600
- capabilities?: string[] | undefined;
2601
- id?: string | undefined;
2602
- provider?: string | undefined;
2603
- model?: string | undefined;
2604
- version?: string | undefined;
2605
- }>, {
2606
- kind: "manual" | "registry-agent" | "deterministic";
2607
- capabilities?: string[] | undefined;
2608
- id?: string | undefined;
2609
- provider?: string | undefined;
2610
- model?: string | undefined;
2611
- version?: string | undefined;
2612
- }, {
2613
- kind: "manual" | "registry-agent" | "deterministic";
2614
- capabilities?: string[] | undefined;
2615
- id?: string | undefined;
2616
- provider?: string | undefined;
2617
- model?: string | undefined;
2618
- version?: string | undefined;
2619
- }>;
1342
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
1343
+ }, z.core.$strict>;
2620
1344
  declare const AgentProposalV1Schema: z.ZodObject<{
2621
1345
  proposalId: z.ZodString;
2622
1346
  baseSnapshotHash: z.ZodString;
2623
1347
  baseReportHash: z.ZodString;
2624
- relatedDiagnosticIds: z.ZodArray<z.ZodString, "many">;
1348
+ relatedDiagnosticIds: z.ZodArray<z.ZodString>;
2625
1349
  rationale: z.ZodString;
2626
1350
  confidence: z.ZodNumber;
2627
- evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
2628
- source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
1351
+ evidence: z.ZodArray<z.ZodObject<{
1352
+ source: z.ZodEnum<{
1353
+ agent: "agent";
1354
+ code: "code";
1355
+ configuration: "configuration";
1356
+ documentation: "documentation";
1357
+ derived: "derived";
1358
+ }>;
2629
1359
  path: z.ZodString;
2630
1360
  lineStart: z.ZodOptional<z.ZodNumber>;
2631
1361
  lineEnd: z.ZodOptional<z.ZodNumber>;
2632
1362
  contentHash: z.ZodOptional<z.ZodString>;
2633
1363
  context: z.ZodOptional<z.ZodString>;
2634
- }, "strict", z.ZodTypeAny, {
2635
- path: string;
2636
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2637
- contentHash?: string | undefined;
2638
- lineStart?: number | undefined;
2639
- lineEnd?: number | undefined;
2640
- context?: string | undefined;
2641
- }, {
2642
- path: string;
2643
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2644
- contentHash?: string | undefined;
2645
- lineStart?: number | undefined;
2646
- lineEnd?: number | undefined;
2647
- context?: string | undefined;
2648
- }>, {
2649
- path: string;
2650
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2651
- contentHash?: string | undefined;
2652
- lineStart?: number | undefined;
2653
- lineEnd?: number | undefined;
2654
- context?: string | undefined;
2655
- }, {
2656
- path: string;
2657
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2658
- contentHash?: string | undefined;
2659
- lineStart?: number | undefined;
2660
- lineEnd?: number | undefined;
2661
- context?: string | undefined;
2662
- }>, "many">;
2663
- intendedChanges: z.ZodArray<z.ZodString, "many">;
2664
- origin: z.ZodEffects<z.ZodObject<{
2665
- kind: z.ZodEnum<["registry-agent", "manual", "deterministic"]>;
1364
+ }, z.core.$strict>>;
1365
+ intendedChanges: z.ZodArray<z.ZodString>;
1366
+ origin: z.ZodObject<{
1367
+ kind: z.ZodEnum<{
1368
+ deterministic: "deterministic";
1369
+ manual: "manual";
1370
+ "registry-agent": "registry-agent";
1371
+ }>;
2666
1372
  id: z.ZodOptional<z.ZodString>;
2667
1373
  version: z.ZodOptional<z.ZodString>;
2668
1374
  provider: z.ZodOptional<z.ZodString>;
2669
1375
  model: z.ZodOptional<z.ZodString>;
2670
- capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2671
- }, "strict", z.ZodTypeAny, {
2672
- kind: "manual" | "registry-agent" | "deterministic";
2673
- capabilities?: string[] | undefined;
2674
- id?: string | undefined;
2675
- provider?: string | undefined;
2676
- model?: string | undefined;
2677
- version?: string | undefined;
2678
- }, {
2679
- kind: "manual" | "registry-agent" | "deterministic";
2680
- capabilities?: string[] | undefined;
2681
- id?: string | undefined;
2682
- provider?: string | undefined;
2683
- model?: string | undefined;
2684
- version?: string | undefined;
2685
- }>, {
2686
- kind: "manual" | "registry-agent" | "deterministic";
2687
- capabilities?: string[] | undefined;
2688
- id?: string | undefined;
2689
- provider?: string | undefined;
2690
- model?: string | undefined;
2691
- version?: string | undefined;
2692
- }, {
2693
- kind: "manual" | "registry-agent" | "deterministic";
2694
- capabilities?: string[] | undefined;
2695
- id?: string | undefined;
2696
- provider?: string | undefined;
2697
- model?: string | undefined;
2698
- version?: string | undefined;
2699
- }>;
2700
- checks: z.ZodArray<z.ZodString, "many">;
1376
+ capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
1377
+ }, z.core.$strict>;
1378
+ checks: z.ZodArray<z.ZodString>;
2701
1379
  schemaVersion: z.ZodLiteral<1>;
2702
1380
  contentHash: z.ZodString;
2703
1381
  contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
2704
1382
  project: z.ZodObject<{
2705
1383
  name: z.ZodString;
2706
1384
  root: z.ZodOptional<z.ZodString>;
2707
- }, "strict", z.ZodTypeAny, {
2708
- name: string;
2709
- root?: string | undefined;
2710
- }, {
2711
- name: string;
2712
- root?: string | undefined;
2713
- }>;
1385
+ }, z.core.$strict>;
2714
1386
  sourceRevision: z.ZodString;
2715
- sourceRevisionKind: z.ZodEnum<["git", "content"]>;
1387
+ sourceRevisionKind: z.ZodEnum<{
1388
+ git: "git";
1389
+ content: "content";
1390
+ }>;
2716
1391
  configurationHash: z.ZodString;
2717
1392
  pipelineVersion: z.ZodString;
2718
1393
  analyzerVersions: z.ZodRecord<z.ZodString, z.ZodString>;
2719
1394
  type: z.ZodLiteral<"agent-proposal">;
2720
- }, "strict", z.ZodTypeAny, {
2721
- type: "agent-proposal";
2722
- contentHash: string;
2723
- checks: string[];
2724
- schemaVersion: 1;
2725
- project: {
2726
- name: string;
2727
- root?: string | undefined;
2728
- };
2729
- contentHashAlgo: "sha256-normalized-v1";
2730
- confidence: number;
2731
- evidence: {
2732
- path: string;
2733
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2734
- contentHash?: string | undefined;
2735
- lineStart?: number | undefined;
2736
- lineEnd?: number | undefined;
2737
- context?: string | undefined;
2738
- }[];
2739
- sourceRevision: string;
2740
- sourceRevisionKind: "git" | "content";
2741
- configurationHash: string;
2742
- pipelineVersion: string;
2743
- analyzerVersions: Record<string, string>;
2744
- proposalId: string;
2745
- baseSnapshotHash: string;
2746
- baseReportHash: string;
2747
- relatedDiagnosticIds: string[];
2748
- rationale: string;
2749
- intendedChanges: string[];
2750
- origin: {
2751
- kind: "manual" | "registry-agent" | "deterministic";
2752
- capabilities?: string[] | undefined;
2753
- id?: string | undefined;
2754
- provider?: string | undefined;
2755
- model?: string | undefined;
2756
- version?: string | undefined;
2757
- };
2758
- }, {
2759
- type: "agent-proposal";
2760
- contentHash: string;
2761
- checks: string[];
2762
- schemaVersion: 1;
2763
- project: {
2764
- name: string;
2765
- root?: string | undefined;
2766
- };
2767
- contentHashAlgo: "sha256-normalized-v1";
2768
- confidence: number;
2769
- evidence: {
2770
- path: string;
2771
- source: "code" | "agent" | "configuration" | "documentation" | "derived";
2772
- contentHash?: string | undefined;
2773
- lineStart?: number | undefined;
2774
- lineEnd?: number | undefined;
2775
- context?: string | undefined;
2776
- }[];
2777
- sourceRevision: string;
2778
- sourceRevisionKind: "git" | "content";
2779
- configurationHash: string;
2780
- pipelineVersion: string;
2781
- analyzerVersions: Record<string, string>;
2782
- proposalId: string;
2783
- baseSnapshotHash: string;
2784
- baseReportHash: string;
2785
- relatedDiagnosticIds: string[];
2786
- rationale: string;
2787
- intendedChanges: string[];
2788
- origin: {
2789
- kind: "manual" | "registry-agent" | "deterministic";
2790
- capabilities?: string[] | undefined;
2791
- id?: string | undefined;
2792
- provider?: string | undefined;
2793
- model?: string | undefined;
2794
- version?: string | undefined;
2795
- };
2796
- }>;
1395
+ }, z.core.$strict>;
2797
1396
  type AgentProposalV1 = z.infer<typeof AgentProposalV1Schema>;
2798
- declare const FixProposalStatusSchema: z.ZodEnum<["proposed", "approved", "rejected", "stale", "applied", "failed"]>;
1397
+ declare const FixProposalStatusSchema: z.ZodEnum<{
1398
+ proposed: "proposed";
1399
+ stale: "stale";
1400
+ failed: "failed";
1401
+ approved: "approved";
1402
+ rejected: "rejected";
1403
+ applied: "applied";
1404
+ }>;
2799
1405
  declare const AffectedFileSchema: z.ZodObject<{
2800
1406
  path: z.ZodString;
2801
1407
  contentHash: z.ZodString;
2802
- }, "strict", z.ZodTypeAny, {
2803
- path: string;
2804
- contentHash: string;
2805
- }, {
2806
- path: string;
2807
- contentHash: string;
2808
- }>;
1408
+ }, z.core.$strict>;
2809
1409
  declare const FixChangeSchema: z.ZodObject<{
2810
1410
  path: z.ZodString;
2811
1411
  before: z.ZodString;
2812
1412
  after: z.ZodString;
2813
- }, "strict", z.ZodTypeAny, {
2814
- path: string;
2815
- before: string;
2816
- after: string;
2817
- }, {
2818
- path: string;
2819
- before: string;
2820
- after: string;
2821
- }>;
1413
+ }, z.core.$strict>;
2822
1414
  type FixChange = z.infer<typeof FixChangeSchema>;
2823
- declare const FixProposalV1Schema: z.ZodEffects<z.ZodObject<{
1415
+ declare const FixProposalV1Schema: z.ZodObject<{
2824
1416
  proposalId: z.ZodString;
2825
1417
  baseRevision: z.ZodString;
2826
1418
  affectedFiles: z.ZodArray<z.ZodObject<{
2827
1419
  path: z.ZodString;
2828
1420
  contentHash: z.ZodString;
2829
- }, "strict", z.ZodTypeAny, {
2830
- path: string;
2831
- contentHash: string;
2832
- }, {
2833
- path: string;
2834
- contentHash: string;
2835
- }>, "many">;
1421
+ }, z.core.$strict>>;
2836
1422
  changes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2837
1423
  path: z.ZodString;
2838
1424
  before: z.ZodString;
2839
1425
  after: z.ZodString;
2840
- }, "strict", z.ZodTypeAny, {
2841
- path: string;
2842
- before: string;
2843
- after: string;
2844
- }, {
2845
- path: string;
2846
- before: string;
2847
- after: string;
2848
- }>, "many">>;
2849
- preconditions: z.ZodArray<z.ZodString, "many">;
1426
+ }, z.core.$strict>>>;
1427
+ preconditions: z.ZodArray<z.ZodString>;
2850
1428
  diff: z.ZodString;
2851
- postconditions: z.ZodArray<z.ZodString, "many">;
1429
+ postconditions: z.ZodArray<z.ZodString>;
2852
1430
  approval: z.ZodOptional<z.ZodObject<{
2853
1431
  proposalHash: z.ZodString;
2854
1432
  approvedAt: z.ZodString;
2855
1433
  approvedBy: z.ZodString;
2856
- }, "strict", z.ZodTypeAny, {
2857
- approvedBy: string;
2858
- proposalHash: string;
2859
- approvedAt: string;
2860
- }, {
2861
- approvedBy: string;
2862
- proposalHash: string;
2863
- approvedAt: string;
2864
- }>>;
2865
- status: z.ZodEnum<["proposed", "approved", "rejected", "stale", "applied", "failed"]>;
1434
+ }, z.core.$strict>>;
1435
+ status: z.ZodEnum<{
1436
+ proposed: "proposed";
1437
+ stale: "stale";
1438
+ failed: "failed";
1439
+ approved: "approved";
1440
+ rejected: "rejected";
1441
+ applied: "applied";
1442
+ }>;
2866
1443
  schemaVersion: z.ZodLiteral<1>;
2867
1444
  contentHash: z.ZodString;
2868
1445
  contentHashAlgo: z.ZodLiteral<"sha256-normalized-v1">;
2869
1446
  project: z.ZodObject<{
2870
1447
  name: z.ZodString;
2871
1448
  root: z.ZodOptional<z.ZodString>;
2872
- }, "strict", z.ZodTypeAny, {
2873
- name: string;
2874
- root?: string | undefined;
2875
- }, {
2876
- name: string;
2877
- root?: string | undefined;
2878
- }>;
1449
+ }, z.core.$strict>;
2879
1450
  sourceRevision: z.ZodString;
2880
- sourceRevisionKind: z.ZodEnum<["git", "content"]>;
1451
+ sourceRevisionKind: z.ZodEnum<{
1452
+ git: "git";
1453
+ content: "content";
1454
+ }>;
2881
1455
  configurationHash: z.ZodString;
2882
1456
  pipelineVersion: z.ZodString;
2883
1457
  analyzerVersions: z.ZodRecord<z.ZodString, z.ZodString>;
2884
1458
  type: z.ZodLiteral<"fix-proposal">;
2885
- }, "strict", z.ZodTypeAny, {
2886
- type: "fix-proposal";
2887
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
2888
- contentHash: string;
2889
- schemaVersion: 1;
2890
- project: {
2891
- name: string;
2892
- root?: string | undefined;
2893
- };
2894
- contentHashAlgo: "sha256-normalized-v1";
2895
- sourceRevision: string;
2896
- sourceRevisionKind: "git" | "content";
2897
- configurationHash: string;
2898
- pipelineVersion: string;
2899
- analyzerVersions: Record<string, string>;
2900
- proposalId: string;
2901
- baseRevision: string;
2902
- affectedFiles: {
2903
- path: string;
2904
- contentHash: string;
2905
- }[];
2906
- preconditions: string[];
2907
- diff: string;
2908
- postconditions: string[];
2909
- changes?: {
2910
- path: string;
2911
- before: string;
2912
- after: string;
2913
- }[] | undefined;
2914
- approval?: {
2915
- approvedBy: string;
2916
- proposalHash: string;
2917
- approvedAt: string;
2918
- } | undefined;
2919
- }, {
2920
- type: "fix-proposal";
2921
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
2922
- contentHash: string;
2923
- schemaVersion: 1;
2924
- project: {
2925
- name: string;
2926
- root?: string | undefined;
2927
- };
2928
- contentHashAlgo: "sha256-normalized-v1";
2929
- sourceRevision: string;
2930
- sourceRevisionKind: "git" | "content";
2931
- configurationHash: string;
2932
- pipelineVersion: string;
2933
- analyzerVersions: Record<string, string>;
2934
- proposalId: string;
2935
- baseRevision: string;
2936
- affectedFiles: {
2937
- path: string;
2938
- contentHash: string;
2939
- }[];
2940
- preconditions: string[];
2941
- diff: string;
2942
- postconditions: string[];
2943
- changes?: {
2944
- path: string;
2945
- before: string;
2946
- after: string;
2947
- }[] | undefined;
2948
- approval?: {
2949
- approvedBy: string;
2950
- proposalHash: string;
2951
- approvedAt: string;
2952
- } | undefined;
2953
- }>, {
2954
- type: "fix-proposal";
2955
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
2956
- contentHash: string;
2957
- schemaVersion: 1;
2958
- project: {
2959
- name: string;
2960
- root?: string | undefined;
2961
- };
2962
- contentHashAlgo: "sha256-normalized-v1";
2963
- sourceRevision: string;
2964
- sourceRevisionKind: "git" | "content";
2965
- configurationHash: string;
2966
- pipelineVersion: string;
2967
- analyzerVersions: Record<string, string>;
2968
- proposalId: string;
2969
- baseRevision: string;
2970
- affectedFiles: {
2971
- path: string;
2972
- contentHash: string;
2973
- }[];
2974
- preconditions: string[];
2975
- diff: string;
2976
- postconditions: string[];
2977
- changes?: {
2978
- path: string;
2979
- before: string;
2980
- after: string;
2981
- }[] | undefined;
2982
- approval?: {
2983
- approvedBy: string;
2984
- proposalHash: string;
2985
- approvedAt: string;
2986
- } | undefined;
2987
- }, {
2988
- type: "fix-proposal";
2989
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
2990
- contentHash: string;
2991
- schemaVersion: 1;
2992
- project: {
2993
- name: string;
2994
- root?: string | undefined;
2995
- };
2996
- contentHashAlgo: "sha256-normalized-v1";
2997
- sourceRevision: string;
2998
- sourceRevisionKind: "git" | "content";
2999
- configurationHash: string;
3000
- pipelineVersion: string;
3001
- analyzerVersions: Record<string, string>;
3002
- proposalId: string;
3003
- baseRevision: string;
3004
- affectedFiles: {
3005
- path: string;
3006
- contentHash: string;
3007
- }[];
3008
- preconditions: string[];
3009
- diff: string;
3010
- postconditions: string[];
3011
- changes?: {
3012
- path: string;
3013
- before: string;
3014
- after: string;
3015
- }[] | undefined;
3016
- approval?: {
3017
- approvedBy: string;
3018
- proposalHash: string;
3019
- approvedAt: string;
3020
- } | undefined;
3021
- }>;
1459
+ }, z.core.$strict>;
3022
1460
  type FixProposalV1 = z.infer<typeof FixProposalV1Schema>;
3023
1461
  type KnowledgeArtifactV1 = DiscoverySnapshotV1 | ReconciliationReportV1 | WorkflowRunV1 | AgentProposalV1 | FixProposalV1;
3024
1462
 
@@ -3066,7 +1504,7 @@ type DiscoveryOptions = {
3066
1504
  };
3067
1505
  declare const discoverRepository: (opts?: DiscoveryOptions) => DiscoverySnapshotV1;
3068
1506
 
3069
- declare const DEFAULT_SAFETY_EXCLUDES: readonly ["**/.git/**", "**/node_modules/**", "**/dist/**", "**/build/**", "**/coverage/**", "**/.doc-bridge/**", "**/.turbo/**", "**/.env", "**/.env.*", "**/*secret*", "**/*credential*", "**/*.pem", "**/*.key"];
1507
+ declare const DEFAULT_SAFETY_EXCLUDES: readonly ["**/.git/**", "**/node_modules/**", "**/dist/**", "**/build/**", "**/coverage/**", "**/.doc-bridge/**", "**/.next/**", "**/out/**", "**/.turbo/**", "**/.svelte-kit/**", "**/.mcpb-build/**", "**/.mcpb-output/**", "**/.env", "**/.env.*", "**/*secret*", "**/*credential*", "**/*.pem", "**/*.key"];
3070
1508
  type SafeWalkOptions = {
3071
1509
  readonly extensions?: readonly string[];
3072
1510
  readonly exclude?: readonly string[];
@@ -3091,20 +1529,8 @@ declare const RegistryAgentMetadataSchema: z.ZodObject<{
3091
1529
  version: z.ZodString;
3092
1530
  provider: z.ZodOptional<z.ZodString>;
3093
1531
  model: z.ZodOptional<z.ZodString>;
3094
- capabilities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3095
- }, "strict", z.ZodTypeAny, {
3096
- capabilities: string[];
3097
- id: string;
3098
- version: string;
3099
- provider?: string | undefined;
3100
- model?: string | undefined;
3101
- }, {
3102
- id: string;
3103
- version: string;
3104
- capabilities?: string[] | undefined;
3105
- provider?: string | undefined;
3106
- model?: string | undefined;
3107
- }>;
1532
+ capabilities: z.ZodDefault<z.ZodArray<z.ZodString>>;
1533
+ }, z.core.$strict>;
3108
1534
  type RegistryAgentMetadata = z.infer<typeof RegistryAgentMetadataSchema> & {
3109
1535
  readonly root: string;
3110
1536
  };
@@ -3115,6 +1541,7 @@ type RegistryAgentContext = {
3115
1541
  readonly capabilities: readonly ['snapshot.read', 'evidence.read', 'proposal.write'];
3116
1542
  readonly network: false;
3117
1543
  readonly shell: false;
1544
+ readonly deterministic: boolean;
3118
1545
  };
3119
1546
  type RegistryAgentRunner = (context: RegistryAgentContext) => Promise<unknown> | unknown;
3120
1547
  type RegistryAgentAdapter = {
@@ -3139,6 +1566,8 @@ type DocumentationDeclarationInput = {
3139
1566
  type DocumentationDeclarationOptions = {
3140
1567
  readonly snapshot: Pick<DiscoverySnapshotV1, 'entities'>;
3141
1568
  readonly documentId?: string;
1569
+ /** Agent corpus root used for conservative package/app path inference. */
1570
+ readonly agentRoot?: string;
3142
1571
  };
3143
1572
  type DocumentationDeclarationResult = {
3144
1573
  readonly hasDocbridge: boolean;
@@ -3151,11 +1580,17 @@ type DocumentationAnalysisResult = {
3151
1580
  readonly diagnostics: readonly DocumentationDiagnostic[];
3152
1581
  };
3153
1582
  declare const parseDocumentationDeclarations: (input: DocumentationDeclarationInput, options: DocumentationDeclarationOptions) => DocumentationDeclarationResult;
3154
- declare const applyDocumentationDeclarations: (snapshot: DiscoverySnapshotV1, documents: readonly DocumentationDeclarationInput[]) => DocumentationAnalysisResult;
1583
+ declare const applyDocumentationDeclarations: (snapshot: DiscoverySnapshotV1, documents: readonly DocumentationDeclarationInput[], options?: Pick<DocumentationDeclarationOptions, "agentRoot">) => DocumentationAnalysisResult;
3155
1584
 
3156
1585
  type ReconciliationOptions = {
1586
+ /** Compare declarations at a semantic level while retaining raw discovery evidence. */
1587
+ readonly scope?: 'file' | 'module' | 'package';
3157
1588
  /** Omit for backwards-compatible all-relation checking; [] disables missing-declaration findings. */
3158
1589
  readonly requiredRelationKinds?: readonly string[];
1590
+ /** Limit missing-declaration findings to relations between internal project entities. */
1591
+ readonly requiredRelationTargets?: 'all' | 'internal';
1592
+ /** Emit one bounded finding for each observed Markdown document without declarations. */
1593
+ readonly includeOrphanedDocuments?: boolean;
3159
1594
  };
3160
1595
  declare const reconcileKnowledge: (observed: DiscoverySnapshotV1, declared: DiscoverySnapshotV1, options?: ReconciliationOptions) => ReconciliationReportV1;
3161
1596
 
@@ -3165,6 +1600,7 @@ type OfflineReportInput = {
3165
1600
  };
3166
1601
  type OfflineReportOptions = {
3167
1602
  readonly includeSnippets?: boolean;
1603
+ readonly privacy?: 'private' | 'anonymized';
3168
1604
  };
3169
1605
  type OfflineReportArtifact = {
3170
1606
  readonly mode: 'single-file' | 'directory';
@@ -3208,10 +1644,13 @@ type WorkflowOptions = {
3208
1644
  readonly sourceRevision: string;
3209
1645
  readonly configurationHash: string;
3210
1646
  readonly toolVersion?: string;
1647
+ readonly pipelineVersion?: string;
1648
+ readonly analyzerVersions?: Readonly<Record<string, string>>;
3211
1649
  readonly runId?: string;
3212
1650
  readonly stage?: WorkflowStage | 'all';
3213
1651
  readonly inputs?: Partial<Record<WorkflowStage, unknown>>;
3214
1652
  readonly handlers: Partial<Record<WorkflowStage, WorkflowStageHandler>>;
1653
+ readonly shouldCancel?: () => boolean;
3215
1654
  };
3216
1655
  type WorkflowExecutionResult = {
3217
1656
  readonly run: WorkflowRunV1;
@@ -3734,6 +2173,250 @@ declare const contentHashForArtifactV1: <T extends {
3734
2173
  readonly contentHash: string;
3735
2174
  }>(artifact: T) => string;
3736
2175
 
2176
+ declare const ANALYZER_PLUGIN_CONTRACT_VERSION: 1;
2177
+ declare const AnalyzerPluginManifestSchema: z.ZodObject<{
2178
+ id: z.ZodString;
2179
+ version: z.ZodString;
2180
+ languages: z.ZodArray<z.ZodString>;
2181
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodString>>;
2182
+ capabilities: z.ZodArray<z.ZodString>;
2183
+ knowledgeSchemaVersion: z.ZodLiteral<1>;
2184
+ compatibility: z.ZodObject<{
2185
+ pipelineMajor: z.ZodNumber;
2186
+ }, z.core.$strict>;
2187
+ unsupportedConstructs: z.ZodDefault<z.ZodArray<z.ZodString>>;
2188
+ resourceLimits: z.ZodDefault<z.ZodObject<{
2189
+ maxFiles: z.ZodOptional<z.ZodNumber>;
2190
+ maxBytes: z.ZodOptional<z.ZodNumber>;
2191
+ }, z.core.$strict>>;
2192
+ }, z.core.$strict>;
2193
+ type AnalyzerPluginManifest = z.infer<typeof AnalyzerPluginManifestSchema>;
2194
+ declare const AnalyzerPluginOutputSchema: z.ZodObject<{
2195
+ entities: z.ZodDefault<z.ZodArray<z.ZodObject<{
2196
+ id: z.ZodString;
2197
+ kind: z.ZodString;
2198
+ name: z.ZodString;
2199
+ path: z.ZodOptional<z.ZodString>;
2200
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString>>;
2201
+ provenance: z.ZodEnum<{
2202
+ observed: "observed";
2203
+ declared: "declared";
2204
+ proposed: "proposed";
2205
+ }>;
2206
+ evidence: z.ZodArray<z.ZodObject<{
2207
+ source: z.ZodEnum<{
2208
+ agent: "agent";
2209
+ code: "code";
2210
+ configuration: "configuration";
2211
+ documentation: "documentation";
2212
+ derived: "derived";
2213
+ }>;
2214
+ path: z.ZodString;
2215
+ lineStart: z.ZodOptional<z.ZodNumber>;
2216
+ lineEnd: z.ZodOptional<z.ZodNumber>;
2217
+ contentHash: z.ZodOptional<z.ZodString>;
2218
+ context: z.ZodOptional<z.ZodString>;
2219
+ }, z.core.$strict>>;
2220
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2221
+ }, z.core.$strict>>>;
2222
+ relations: z.ZodDefault<z.ZodArray<z.ZodObject<{
2223
+ id: z.ZodString;
2224
+ kind: z.ZodString;
2225
+ from: z.ZodString;
2226
+ to: z.ZodString;
2227
+ discriminator: z.ZodOptional<z.ZodString>;
2228
+ provenance: z.ZodEnum<{
2229
+ observed: "observed";
2230
+ declared: "declared";
2231
+ proposed: "proposed";
2232
+ }>;
2233
+ evidence: z.ZodArray<z.ZodObject<{
2234
+ source: z.ZodEnum<{
2235
+ agent: "agent";
2236
+ code: "code";
2237
+ configuration: "configuration";
2238
+ documentation: "documentation";
2239
+ derived: "derived";
2240
+ }>;
2241
+ path: z.ZodString;
2242
+ lineStart: z.ZodOptional<z.ZodNumber>;
2243
+ lineEnd: z.ZodOptional<z.ZodNumber>;
2244
+ contentHash: z.ZodOptional<z.ZodString>;
2245
+ context: z.ZodOptional<z.ZodString>;
2246
+ }, z.core.$strict>>;
2247
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2248
+ }, z.core.$strict>>>;
2249
+ coverage: z.ZodDefault<z.ZodArray<z.ZodObject<{
2250
+ analyzer: z.ZodString;
2251
+ analyzerVersion: z.ZodOptional<z.ZodString>;
2252
+ scope: z.ZodString;
2253
+ status: z.ZodEnum<{
2254
+ "not-analyzed": "not-analyzed";
2255
+ complete: "complete";
2256
+ partial: "partial";
2257
+ "not-applicable": "not-applicable";
2258
+ }>;
2259
+ reason: z.ZodOptional<z.ZodString>;
2260
+ evidence: z.ZodOptional<z.ZodArray<z.ZodObject<{
2261
+ source: z.ZodEnum<{
2262
+ agent: "agent";
2263
+ code: "code";
2264
+ configuration: "configuration";
2265
+ documentation: "documentation";
2266
+ derived: "derived";
2267
+ }>;
2268
+ path: z.ZodString;
2269
+ lineStart: z.ZodOptional<z.ZodNumber>;
2270
+ lineEnd: z.ZodOptional<z.ZodNumber>;
2271
+ contentHash: z.ZodOptional<z.ZodString>;
2272
+ context: z.ZodOptional<z.ZodString>;
2273
+ }, z.core.$strict>>>;
2274
+ }, z.core.$strict>>>;
2275
+ diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
2276
+ id: z.ZodString;
2277
+ code: z.ZodString;
2278
+ status: z.ZodEnum<{
2279
+ confirmed: "confirmed";
2280
+ undocumented: "undocumented";
2281
+ "stale-or-unverified": "stale-or-unverified";
2282
+ conflict: "conflict";
2283
+ unresolved: "unresolved";
2284
+ "not-analyzed": "not-analyzed";
2285
+ }>;
2286
+ severity: z.ZodEnum<{
2287
+ error: "error";
2288
+ off: "off";
2289
+ info: "info";
2290
+ warn: "warn";
2291
+ }>;
2292
+ message: z.ZodString;
2293
+ evidence: z.ZodArray<z.ZodObject<{
2294
+ source: z.ZodEnum<{
2295
+ agent: "agent";
2296
+ code: "code";
2297
+ configuration: "configuration";
2298
+ documentation: "documentation";
2299
+ derived: "derived";
2300
+ }>;
2301
+ path: z.ZodString;
2302
+ lineStart: z.ZodOptional<z.ZodNumber>;
2303
+ lineEnd: z.ZodOptional<z.ZodNumber>;
2304
+ contentHash: z.ZodOptional<z.ZodString>;
2305
+ context: z.ZodOptional<z.ZodString>;
2306
+ }, z.core.$strict>>;
2307
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2308
+ relationIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
2309
+ remediation: z.ZodOptional<z.ZodString>;
2310
+ }, z.core.$strict>>>;
2311
+ }, z.core.$strict>;
2312
+ type AnalyzerPluginOutput = z.infer<typeof AnalyzerPluginOutputSchema>;
2313
+ type AnalyzerPluginInput = {
2314
+ readonly language: string;
2315
+ readonly framework?: string;
2316
+ readonly files: readonly {
2317
+ readonly path: string;
2318
+ readonly bytes: number;
2319
+ }[];
2320
+ readonly value?: unknown;
2321
+ };
2322
+ type AnalyzerPlugin = {
2323
+ readonly manifest: AnalyzerPluginManifest;
2324
+ readonly analyze: (input: AnalyzerPluginInput) => Promise<unknown> | unknown;
2325
+ };
2326
+ type AnalyzerRegistry = {
2327
+ readonly register: (plugin: AnalyzerPlugin) => void;
2328
+ readonly list: () => readonly AnalyzerPluginManifest[];
2329
+ readonly analyze: (id: string, input: AnalyzerPluginInput) => Promise<AnalyzerPluginOutput>;
2330
+ };
2331
+ declare const createAnalyzerRegistry: (options?: {
2332
+ readonly pipelineVersion?: string;
2333
+ readonly maxPlugins?: number;
2334
+ }) => AnalyzerRegistry;
2335
+
2336
+ declare const BENCHMARK_SCHEMA_VERSION: 1;
2337
+ declare const BenchmarkFixtureV1Schema: z.ZodObject<{
2338
+ schemaVersion: z.ZodLiteral<1>;
2339
+ supported: z.ZodObject<{
2340
+ entities: z.ZodDefault<z.ZodArray<z.ZodString>>;
2341
+ relations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2342
+ findings: z.ZodDefault<z.ZodArray<z.ZodString>>;
2343
+ }, z.core.$strict>;
2344
+ excluded: z.ZodOptional<z.ZodObject<{
2345
+ entities: z.ZodDefault<z.ZodArray<z.ZodString>>;
2346
+ relations: z.ZodDefault<z.ZodArray<z.ZodString>>;
2347
+ findings: z.ZodDefault<z.ZodArray<z.ZodString>>;
2348
+ }, z.core.$strict>>;
2349
+ }, z.core.$strict>;
2350
+ type BenchmarkFixtureV1 = z.infer<typeof BenchmarkFixtureV1Schema>;
2351
+ type BenchmarkObservation = {
2352
+ readonly entities: readonly string[];
2353
+ readonly relations: readonly string[];
2354
+ readonly findings: readonly string[];
2355
+ readonly evidenced?: readonly string[];
2356
+ readonly findingCategories?: Readonly<Record<string, number>>;
2357
+ };
2358
+ type BenchmarkSetMetrics = {
2359
+ readonly truePositives: number;
2360
+ readonly falsePositives: number;
2361
+ readonly falseNegatives: number;
2362
+ readonly precision: number;
2363
+ readonly recall: number;
2364
+ readonly duplicateCount: number;
2365
+ };
2366
+ type BenchmarkResult = {
2367
+ readonly schemaVersion: typeof BENCHMARK_SCHEMA_VERSION;
2368
+ readonly quality: {
2369
+ readonly entities: BenchmarkSetMetrics;
2370
+ readonly relations: BenchmarkSetMetrics;
2371
+ readonly findings: BenchmarkSetMetrics;
2372
+ };
2373
+ readonly evidenceRatio: number;
2374
+ readonly findingDensity: number;
2375
+ readonly findingCategoryDistribution: Readonly<Record<string, number>>;
2376
+ readonly excludedCaseCount: number;
2377
+ readonly excludedCaseIds: Readonly<{
2378
+ entities: number;
2379
+ relations: number;
2380
+ findings: number;
2381
+ }>;
2382
+ readonly thresholds: {
2383
+ readonly precision: number;
2384
+ readonly recall: number;
2385
+ };
2386
+ readonly regressions: readonly string[];
2387
+ };
2388
+ declare const benchmarkFixture: (fixture: unknown) => BenchmarkFixtureV1;
2389
+ declare const measureBenchmark: (observation: BenchmarkObservation, fixture: BenchmarkFixtureV1, thresholds?: {
2390
+ readonly precision?: number;
2391
+ readonly recall?: number;
2392
+ }) => BenchmarkResult;
2393
+ type BenchmarkSnapshot = Readonly<Record<string, string>>;
2394
+ type BenchmarkSnapshotDiff = {
2395
+ readonly added: number;
2396
+ readonly removed: number;
2397
+ readonly unchanged: number;
2398
+ readonly reclassified: number;
2399
+ readonly unchangedEvidence: number;
2400
+ };
2401
+ declare const compareBenchmarkSnapshots: (previous: BenchmarkSnapshot, current: BenchmarkSnapshot) => BenchmarkSnapshotDiff;
2402
+ type AgentEfficiencyObservation = {
2403
+ readonly hits: number;
2404
+ readonly queries: number;
2405
+ readonly latencyMs: readonly number[];
2406
+ readonly responseBytes: readonly number[];
2407
+ readonly estimatedTokens: readonly number[];
2408
+ readonly corpusBytes: number;
2409
+ };
2410
+ declare const measureAgentEfficiency: (observation: AgentEfficiencyObservation) => {
2411
+ hitRate: number;
2412
+ latencyP95Ms: number;
2413
+ responseBytesP95: number;
2414
+ estimatedTokensP95: number;
2415
+ corpusBytes: number;
2416
+ contextReduction: number;
2417
+ };
2418
+ declare const formatBenchmarkText: (result: BenchmarkResult) => string;
2419
+
3737
2420
  declare class IndexNotFoundError extends Error {
3738
2421
  readonly path: string;
3739
2422
  constructor(path: string);
@@ -3802,7 +2485,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
3802
2485
  declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
3803
2486
  declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
3804
2487
 
3805
- declare const PACKAGE_VERSION = "1.6.4";
2488
+ declare const PACKAGE_VERSION = "1.7.45";
3806
2489
 
3807
2490
  type FrontmatterValue = string | boolean | readonly string[];
3808
2491
  type FrontmatterData = Record<string, FrontmatterValue>;
@@ -3919,4 +2602,4 @@ declare const docBridgePatternPayload: () => {
3919
2602
  cli: "ak-docs";
3920
2603
  };
3921
2604
 
3922
- export { AffectedFileSchema, AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentProposalV1, AgentProposalV1Schema, type AgentSearchV1, AgentSearchV1Schema, type BuildIndexOptions, type BuildIndexResult, CoverageSchema, DEFAULT_LARGE_REPORT_THRESHOLD_BYTES, DEFAULT_REGISTRY_AGENT_ID, DEFAULT_SAFETY_EXCLUDES, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, type DiagnosticSeverity, DiagnosticSeveritySchema, type DiscoveryOptions, type DiscoverySnapshotV1, DiscoverySnapshotV1Schema, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationAnalysisResult, type DocumentationConformanceReportV1, type DocumentationDeclarationInput, type DocumentationDeclarationOptions, type DocumentationDeclarationResult, type DocumentationDiagnostic, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, EntitySchema, type Evidence, EvidenceSchema, EvidenceSourceSchema, type FederatedRetrieverOptions, type FetchText, type FindingStatus, FindingStatusSchema, type FixApplyOptions, type FixChange, FixChangeSchema, type FixProposalOptions, FixProposalStatusSchema, type FixProposalV1, FixProposalV1Schema, type FormatEcosystemLlmsBlockOptions, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, KNOWLEDGE_CONTENT_HASH_ALGO, KNOWLEDGE_SCHEMA_VERSION, type KnowledgeArtifactV1, type KnowledgeDiagnostic, type KnowledgeEntity, type KnowledgeEntry, KnowledgeEntrySchema, type KnowledgeRelation, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, type OfflineReportArtifact, type OfflineReportInput, type OfflineReportOptions, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, ProjectIdentitySchema, ProposalOriginSchema, type Provenance, ProvenanceSchema, type QueryKind, type QueryRequest, type QueryResult, type ReconciliationReportV1, ReconciliationReportV1Schema, type RegistryAgentAdapter, type RegistryAgentContext, type RegistryAgentMetadata, type RegistryAgentRunner, RelationSchema, type RuleEngineOptions, type RuleEvaluationResult, type RuleFinding, RuleId, type RuleMode, RuleSeverity, RulesConfig, type SafeWalkOptions, type SafeWalkResult, type SafetyFinding, type SearchMatch, WORKFLOW_STAGES, type WatchIndexOptions, type WorkflowExecutionResult, type WorkflowOptions, type WorkflowRunV1, WorkflowRunV1Schema, type WorkflowStage, type WorkflowStageContext, type WorkflowStageHandler, type WorkflowState, WorkflowStateSchema, WorkflowStepSchema, WorkflowTransitionSchema, applyDocumentationDeclarations, applyFixProposal, approveFixProposal, buildDocBridgeIndex, buildLookup, canonicalJsonV1, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, containedPath, contentHashForArtifactV1, createArtifactNormalizationProposal, createDocBridgeRag, createDocBridgeRetriever, createMarkdownLinkFixProposal, createRegistryAgentAdapter, defaultPromotionDraftPath, discoverNxProjects, discoverRepository, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, evaluateRules, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, loadRegistryAgentMetadata, loadRegistryAgentRunner, loadWorkflowManifest, loadWorkflowStepOutput, mcpSnippet, normalizeAgentHandoff, parseAgentHandoff, parseAgentProposal, parseAgentSearch, parseDiscoverySnapshot, parseDocBridgeConfig, parseDocBridgeIndex, parseDocumentationDeclarations, parseFixProposal, parseLlmsTxtLinks, parseMemoryCandidate, parseReconciliationReport, parseRuleId, parseRuleSeverity, parseWorkflowRun, persistRegistryAgentProposal, promoteMemoryToGithubPr, reconcileKnowledge, redactSecrets, redactValue, renderOfflineReport, renderOfflineReportArtifact, resolveGateIds, resolveRoot, respondMcpRequest, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, runWorkflow, safeParseAgentHandoff, safeWalkFiles, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };
2605
+ export { ANALYZER_PLUGIN_CONTRACT_VERSION, AffectedFileSchema, type AgentEfficiencyObservation, AgentHandoffLegacySchema, type AgentHandoffV1, AgentHandoffV1JsonSchema, AgentHandoffV1Schema, type AgentProposalV1, AgentProposalV1Schema, type AgentSearchV1, AgentSearchV1Schema, type AnalyzerPlugin, type AnalyzerPluginInput, type AnalyzerPluginManifest, AnalyzerPluginManifestSchema, type AnalyzerPluginOutput, AnalyzerPluginOutputSchema, type AnalyzerRegistry, BENCHMARK_SCHEMA_VERSION, type BenchmarkFixtureV1, BenchmarkFixtureV1Schema, type BenchmarkObservation, type BenchmarkResult, type BenchmarkSetMetrics, type BenchmarkSnapshot, type BenchmarkSnapshotDiff, type BuildIndexOptions, type BuildIndexResult, CoverageSchema, DEFAULT_LARGE_REPORT_THRESHOLD_BYTES, DEFAULT_REGISTRY_AGENT_ID, DEFAULT_SAFETY_EXCLUDES, DOCUMENTATION_STANDARD_V1_ID, DOCUMENTATION_STANDARD_V1_STATUS, DOC_BRIDGE_PATTERN_ID, DOC_BRIDGE_PATTERN_META, type DiagnosticSeverity, DiagnosticSeveritySchema, type DiscoveryOptions, type DiscoverySnapshotV1, DiscoverySnapshotV1Schema, DocBridgeConfigV1, type DocBridgeIndexV1, DocBridgeIndexV1JsonSchema, DocBridgeIndexV1Schema, DocBridgeJsonSchemas, type DocBridgeRetrievedChunk, type DocBridgeRetriever, type DocBridgeRetrieverOptions, type DoctorBadgeMetrics, type DoctorCoverage, type DoctorIssue, type DoctorReport, type DocumentationAnalysisResult, type DocumentationConformanceReportV1, type DocumentationDeclarationInput, type DocumentationDeclarationOptions, type DocumentationDeclarationResult, type DocumentationDiagnostic, type DocumentationStandardEvidence, type DocumentationStandardRemediation, DocumentationStandardRuleId, type DocumentationStandardRuleLevel, type DocumentationStandardRuleResult, type DocumentationStandardRuleStatus, type EcosystemLlmsProduct, EntitySchema, type Evidence, EvidenceSchema, EvidenceSourceSchema, type FederatedRetrieverOptions, type FetchText, type FindingStatus, FindingStatusSchema, type FixApplyOptions, type FixChange, FixChangeSchema, type FixProposalOptions, FixProposalStatusSchema, type FixProposalV1, FixProposalV1Schema, type FormatEcosystemLlmsBlockOptions, type GateId, type GateResult, type GateRunResult, type GithubPrOptions, type GithubPrResult, HANDOFF_SCHEMA_VERSION, type HandoffBridge, HandoffBridgeSchema, type HandoffTarget, type HandoffTargetType, HandoffTargetTypeSchema, type HumanDocMap, type HumanDocRecord, INDEX_SCHEMA_VERSION, IndexNotFoundError, KNOWLEDGE_CONTENT_HASH_ALGO, KNOWLEDGE_SCHEMA_VERSION, type KnowledgeArtifactV1, type KnowledgeDiagnostic, type KnowledgeEntity, type KnowledgeEntry, KnowledgeEntrySchema, type KnowledgeRelation, MCP_TOOLS, MEMORY_CANDIDATE_SCHEMA_VERSION, type McpInstallResult, type McpInstallTarget, type MemoryCandidateV1, MemoryCandidateV1JsonSchema, MemoryCandidateV1Schema, type MemoryClassification, type MemoryPromotionDraft, type MemoryRoute, type OfflineReportArtifact, type OfflineReportInput, type OfflineReportOptions, PACKAGE_VERSION, type ParseIssue, type ParseResult, PeerMissingError, ProjectIdentitySchema, ProposalOriginSchema, type Provenance, ProvenanceSchema, type QueryKind, type QueryRequest, type QueryResult, type ReconciliationReportV1, ReconciliationReportV1Schema, type RegistryAgentAdapter, type RegistryAgentContext, type RegistryAgentMetadata, type RegistryAgentRunner, RelationSchema, type RuleEngineOptions, type RuleEvaluationResult, type RuleFinding, RuleId, type RuleMode, RuleSeverity, RulesConfig, type SafeWalkOptions, type SafeWalkResult, type SafetyFinding, type SearchMatch, WORKFLOW_STAGES, type WatchIndexOptions, type WorkflowExecutionResult, type WorkflowOptions, type WorkflowRunV1, WorkflowRunV1Schema, type WorkflowStage, type WorkflowStageContext, type WorkflowStageHandler, type WorkflowState, WorkflowStateSchema, WorkflowStepSchema, WorkflowTransitionSchema, applyDocumentationDeclarations, applyFixProposal, approveFixProposal, benchmarkFixture, buildDocBridgeIndex, buildLookup, canonicalJsonV1, chunksFromMarkdown, classifyMemoryCandidates, collectPackages, compareBenchmarkSnapshots, containedPath, contentHashForArtifactV1, createAnalyzerRegistry, createArtifactNormalizationProposal, createDocBridgeRag, createDocBridgeRetriever, createMarkdownLinkFixProposal, createRegistryAgentAdapter, defaultPromotionDraftPath, discoverNxProjects, discoverRepository, docBridgePatternMarkdown, docBridgePatternPayload, doctorBadgeMetrics, draftMemoryPromotion, evaluateRules, formatBenchmarkText, formatDoctorBadgeJson, formatDoctorBadgeMarkdown, formatDoctorText, formatDocumentationStandardText, formatEcosystemLlmsBlock, formatEcosystemLlmsSection, handleMcpRequest, indexFilePath, ingestAgentMemory, ingestCursorRules, ingestMemoryCandidates, installMcpConfig, layer1InstallHint, loadDocBridgeIndex, loadFederatedChunks, loadRegistryAgentMetadata, loadRegistryAgentRunner, loadWorkflowManifest, loadWorkflowStepOutput, mcpSnippet, measureAgentEfficiency, measureBenchmark, normalizeAgentHandoff, parseAgentHandoff, parseAgentProposal, parseAgentSearch, parseDiscoverySnapshot, parseDocBridgeConfig, parseDocBridgeIndex, parseDocumentationDeclarations, parseFixProposal, parseLlmsTxtLinks, parseMemoryCandidate, parseReconciliationReport, parseRuleId, parseRuleSeverity, parseWorkflowRun, persistRegistryAgentProposal, promoteMemoryToGithubPr, reconcileKnowledge, redactSecrets, redactValue, renderOfflineReport, renderOfflineReportArtifact, resolveGateIds, resolveRoot, respondMcpRequest, retrieveDocBridgeChunks, retrieveHybridChunks, runChatOnce, runDoctor, runDocumentationStandardV1, runGate, runGates, runQuery, runWorkflow, safeParseAgentHandoff, safeWalkFiles, scanHumanDocRecords, scanHumanDocs, scanMemorySafety, searchIndex, sha256NormalizedV1, startInkChat, startMcpStdioServer, watchDocBridgeIndex, writePromotionDraft };