@agentskit/doc-bridge 1.6.4 → 1.7.44

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 (38) hide show
  1. package/CHANGELOG.md +243 -0
  2. package/action.yml +1 -1
  3. package/dist/cli/program.js +793 -137
  4. package/dist/cli/program.js.map +1 -1
  5. package/dist/config/index.d.ts +1 -1
  6. package/dist/config/index.js +38 -2
  7. package/dist/config/index.js.map +1 -1
  8. package/dist/{index-DudNuwI5.d.ts → index-C2PCQSrB.d.ts} +216 -25
  9. package/dist/index.d.ts +837 -67
  10. package/dist/index.js +858 -127
  11. package/dist/index.js.map +1 -1
  12. package/docs/PRD-enterprise-hardening.md +288 -0
  13. package/docs/adr/0001-enterprise-verification-contract.md +35 -0
  14. package/docs/knowledge-engine-runbook.md +18 -2
  15. package/docs/spec/analyzer-plugin-v1.md +24 -0
  16. package/docs/spec/benchmark-v1.md +30 -0
  17. package/docs/spec/config-v1.md +111 -0
  18. package/docs/validation-cycle-plan.md +236 -0
  19. package/docs/verification-harness.md +33 -4
  20. package/mcpb/manifest.json +1 -1
  21. package/package.json +1 -1
  22. package/scripts/report-visual-check.mjs +45 -10
  23. package/scripts/verification-harness.mjs +216 -13
  24. package/skills/doc-bridge-handoff/scripts/resolve-handoff.mjs +1 -1
  25. package/src/agents/registry-adapter.ts +31 -7
  26. package/src/cli/program.ts +44 -11
  27. package/src/config/index.ts +2 -0
  28. package/src/config/schema.ts +56 -0
  29. package/src/discovery/documentation.ts +46 -5
  30. package/src/discovery/repository.ts +95 -16
  31. package/src/index.ts +29 -0
  32. package/src/metrics/benchmark.ts +176 -0
  33. package/src/plugins/contract.ts +89 -0
  34. package/src/reconciliation/reconcile.ts +137 -3
  35. package/src/report/html.ts +302 -78
  36. package/src/schemas/knowledge.ts +16 -1
  37. package/src/version.ts +1 -1
  38. package/src/workflow/engine.ts +65 -9
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
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-C2PCQSrB.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-C2PCQSrB.js';
3
3
  import { z } from 'zod';
4
4
 
5
5
  declare const HANDOFF_SCHEMA_VERSION: 1;
@@ -12,13 +12,13 @@ declare const HandoffTargetSchema: z.ZodObject<{
12
12
  group: z.ZodOptional<z.ZodString>;
13
13
  layer: z.ZodOptional<z.ZodString>;
14
14
  }, "strict", z.ZodTypeAny, {
15
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
15
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
16
16
  id: string;
17
17
  path?: string | undefined;
18
18
  group?: string | undefined;
19
19
  layer?: string | undefined;
20
20
  }, {
21
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
21
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
22
22
  id: string;
23
23
  path?: string | undefined;
24
24
  group?: string | undefined;
@@ -51,13 +51,13 @@ declare const AgentHandoffV1Schema: z.ZodObject<{
51
51
  group: z.ZodOptional<z.ZodString>;
52
52
  layer: z.ZodOptional<z.ZodString>;
53
53
  }, "strict", z.ZodTypeAny, {
54
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
54
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
55
55
  id: string;
56
56
  path?: string | undefined;
57
57
  group?: string | undefined;
58
58
  layer?: string | undefined;
59
59
  }, {
60
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
60
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
61
61
  id: string;
62
62
  path?: string | undefined;
63
63
  group?: string | undefined;
@@ -90,7 +90,7 @@ declare const AgentHandoffV1Schema: z.ZodObject<{
90
90
  schemaVersion: 1;
91
91
  source: string;
92
92
  target: {
93
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
93
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
94
94
  id: string;
95
95
  path?: string | undefined;
96
96
  group?: string | undefined;
@@ -112,7 +112,7 @@ declare const AgentHandoffV1Schema: z.ZodObject<{
112
112
  startHere: string;
113
113
  source: string;
114
114
  target: {
115
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
115
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
116
116
  id: string;
117
117
  path?: string | undefined;
118
118
  group?: string | undefined;
@@ -143,13 +143,13 @@ declare const AgentHandoffLegacySchema: z.ZodObject<Omit<{
143
143
  group: z.ZodOptional<z.ZodString>;
144
144
  layer: z.ZodOptional<z.ZodString>;
145
145
  }, "strict", z.ZodTypeAny, {
146
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
146
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
147
147
  id: string;
148
148
  path?: string | undefined;
149
149
  group?: string | undefined;
150
150
  layer?: string | undefined;
151
151
  }, {
152
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
152
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
153
153
  id: string;
154
154
  path?: string | undefined;
155
155
  group?: string | undefined;
@@ -183,7 +183,7 @@ declare const AgentHandoffLegacySchema: z.ZodObject<Omit<{
183
183
  startHere: string;
184
184
  source: string;
185
185
  target: {
186
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
186
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
187
187
  id: string;
188
188
  path?: string | undefined;
189
189
  group?: string | undefined;
@@ -206,7 +206,7 @@ declare const AgentHandoffLegacySchema: z.ZodObject<Omit<{
206
206
  startHere: string;
207
207
  source: string;
208
208
  target: {
209
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
209
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
210
210
  id: string;
211
211
  path?: string | undefined;
212
212
  group?: string | undefined;
@@ -439,13 +439,13 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
439
439
  group: z.ZodOptional<z.ZodString>;
440
440
  layer: z.ZodOptional<z.ZodString>;
441
441
  }, "strict", z.ZodTypeAny, {
442
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
442
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
443
443
  id: string;
444
444
  path?: string | undefined;
445
445
  group?: string | undefined;
446
446
  layer?: string | undefined;
447
447
  }, {
448
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
448
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
449
449
  id: string;
450
450
  path?: string | undefined;
451
451
  group?: string | undefined;
@@ -479,7 +479,7 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
479
479
  startHere: string;
480
480
  source: string;
481
481
  target: {
482
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
482
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
483
483
  id: string;
484
484
  path?: string | undefined;
485
485
  group?: string | undefined;
@@ -502,7 +502,7 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
502
502
  startHere: string;
503
503
  source: string;
504
504
  target: {
505
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
505
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
506
506
  id: string;
507
507
  path?: string | undefined;
508
508
  group?: string | undefined;
@@ -667,7 +667,7 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
667
667
  startHere: string;
668
668
  source: string;
669
669
  target: {
670
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
670
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
671
671
  id: string;
672
672
  path?: string | undefined;
673
673
  group?: string | undefined;
@@ -746,7 +746,7 @@ declare const DocBridgeIndexV1Schema: z.ZodObject<{
746
746
  startHere: string;
747
747
  source: string;
748
748
  target: {
749
- type: "search" | "package" | "module" | "app" | "screen" | "flow" | "component" | "intent" | "change";
749
+ type: "module" | "package" | "search" | "app" | "screen" | "flow" | "component" | "intent" | "change";
750
750
  id: string;
751
751
  path?: string | undefined;
752
752
  group?: string | undefined;
@@ -1422,8 +1422,9 @@ declare const EvidenceSchema: z.ZodEffects<z.ZodObject<{
1422
1422
  type Evidence = z.infer<typeof EvidenceSchema>;
1423
1423
  declare const CoverageSchema: z.ZodObject<{
1424
1424
  analyzer: z.ZodString;
1425
+ analyzerVersion: z.ZodOptional<z.ZodString>;
1425
1426
  scope: z.ZodString;
1426
- status: z.ZodEnum<["complete", "partial", "not-analyzed"]>;
1427
+ status: z.ZodEnum<["complete", "partial", "not-analyzed", "not-applicable"]>;
1427
1428
  reason: z.ZodOptional<z.ZodString>;
1428
1429
  evidence: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
1429
1430
  source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
@@ -1462,10 +1463,11 @@ declare const CoverageSchema: z.ZodObject<{
1462
1463
  context?: string | undefined;
1463
1464
  }>, "many">>;
1464
1465
  }, "strict", z.ZodTypeAny, {
1465
- status: "partial" | "not-analyzed" | "complete";
1466
- analyzer: string;
1466
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
1467
1467
  scope: string;
1468
+ analyzer: string;
1468
1469
  reason?: string | undefined;
1470
+ analyzerVersion?: string | undefined;
1469
1471
  evidence?: {
1470
1472
  path: string;
1471
1473
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -1475,10 +1477,11 @@ declare const CoverageSchema: z.ZodObject<{
1475
1477
  context?: string | undefined;
1476
1478
  }[] | undefined;
1477
1479
  }, {
1478
- status: "partial" | "not-analyzed" | "complete";
1479
- analyzer: string;
1480
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
1480
1481
  scope: string;
1482
+ analyzer: string;
1481
1483
  reason?: string | undefined;
1484
+ analyzerVersion?: string | undefined;
1482
1485
  evidence?: {
1483
1486
  path: string;
1484
1487
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -1811,8 +1814,9 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
1811
1814
  }>, "many">;
1812
1815
  coverage: z.ZodArray<z.ZodObject<{
1813
1816
  analyzer: z.ZodString;
1817
+ analyzerVersion: z.ZodOptional<z.ZodString>;
1814
1818
  scope: z.ZodString;
1815
- status: z.ZodEnum<["complete", "partial", "not-analyzed"]>;
1819
+ status: z.ZodEnum<["complete", "partial", "not-analyzed", "not-applicable"]>;
1816
1820
  reason: z.ZodOptional<z.ZodString>;
1817
1821
  evidence: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
1818
1822
  source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
@@ -1851,10 +1855,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
1851
1855
  context?: string | undefined;
1852
1856
  }>, "many">>;
1853
1857
  }, "strict", z.ZodTypeAny, {
1854
- status: "partial" | "not-analyzed" | "complete";
1855
- analyzer: string;
1858
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
1856
1859
  scope: string;
1860
+ analyzer: string;
1857
1861
  reason?: string | undefined;
1862
+ analyzerVersion?: string | undefined;
1858
1863
  evidence?: {
1859
1864
  path: string;
1860
1865
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -1864,10 +1869,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
1864
1869
  context?: string | undefined;
1865
1870
  }[] | undefined;
1866
1871
  }, {
1867
- status: "partial" | "not-analyzed" | "complete";
1868
- analyzer: string;
1872
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
1869
1873
  scope: string;
1874
+ analyzer: string;
1870
1875
  reason?: string | undefined;
1876
+ analyzerVersion?: string | undefined;
1871
1877
  evidence?: {
1872
1878
  path: string;
1873
1879
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -1940,10 +1946,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
1940
1946
  discriminator?: string | undefined;
1941
1947
  }[];
1942
1948
  coverage: {
1943
- status: "partial" | "not-analyzed" | "complete";
1944
- analyzer: string;
1949
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
1945
1950
  scope: string;
1951
+ analyzer: string;
1946
1952
  reason?: string | undefined;
1953
+ analyzerVersion?: string | undefined;
1947
1954
  evidence?: {
1948
1955
  path: string;
1949
1956
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -2002,10 +2009,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
2002
2009
  discriminator?: string | undefined;
2003
2010
  }[];
2004
2011
  coverage: {
2005
- status: "partial" | "not-analyzed" | "complete";
2006
- analyzer: string;
2012
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
2007
2013
  scope: string;
2014
+ analyzer: string;
2008
2015
  reason?: string | undefined;
2016
+ analyzerVersion?: string | undefined;
2009
2017
  evidence?: {
2010
2018
  path: string;
2011
2019
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -2064,10 +2072,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
2064
2072
  discriminator?: string | undefined;
2065
2073
  }[];
2066
2074
  coverage: {
2067
- status: "partial" | "not-analyzed" | "complete";
2068
- analyzer: string;
2075
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
2069
2076
  scope: string;
2077
+ analyzer: string;
2070
2078
  reason?: string | undefined;
2079
+ analyzerVersion?: string | undefined;
2071
2080
  evidence?: {
2072
2081
  path: string;
2073
2082
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -2126,10 +2135,11 @@ declare const DiscoverySnapshotV1Schema: z.ZodEffects<z.ZodObject<{
2126
2135
  discriminator?: string | undefined;
2127
2136
  }[];
2128
2137
  coverage: {
2129
- status: "partial" | "not-analyzed" | "complete";
2130
- analyzer: string;
2138
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
2131
2139
  scope: string;
2140
+ analyzer: string;
2132
2141
  reason?: string | undefined;
2142
+ analyzerVersion?: string | undefined;
2133
2143
  evidence?: {
2134
2144
  path: string;
2135
2145
  source: "code" | "agent" | "configuration" | "documentation" | "derived";
@@ -2313,17 +2323,89 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
2313
2323
  entityCount: z.ZodNumber;
2314
2324
  relationCount: z.ZodNumber;
2315
2325
  diagnosticCount: z.ZodNumber;
2326
+ scope: z.ZodOptional<z.ZodEnum<["file", "module", "package"]>>;
2316
2327
  requiredRelationKinds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2328
+ diagnosticsByCode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2329
+ diagnosticsByStatus: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
2330
+ documentation: z.ZodOptional<z.ZodObject<{
2331
+ documentCount: z.ZodNumber;
2332
+ documentedDocumentCount: z.ZodNumber;
2333
+ packageCount: z.ZodNumber;
2334
+ packageStatus: z.ZodObject<{
2335
+ fresh: z.ZodNumber;
2336
+ stale: z.ZodNumber;
2337
+ missing: z.ZodNumber;
2338
+ unverified: z.ZodNumber;
2339
+ }, "strict", z.ZodTypeAny, {
2340
+ missing: number;
2341
+ fresh: number;
2342
+ stale: number;
2343
+ unverified: number;
2344
+ }, {
2345
+ missing: number;
2346
+ fresh: number;
2347
+ stale: number;
2348
+ unverified: number;
2349
+ }>;
2350
+ }, "strict", z.ZodTypeAny, {
2351
+ documentCount: number;
2352
+ documentedDocumentCount: number;
2353
+ packageCount: number;
2354
+ packageStatus: {
2355
+ missing: number;
2356
+ fresh: number;
2357
+ stale: number;
2358
+ unverified: number;
2359
+ };
2360
+ }, {
2361
+ documentCount: number;
2362
+ documentedDocumentCount: number;
2363
+ packageCount: number;
2364
+ packageStatus: {
2365
+ missing: number;
2366
+ fresh: number;
2367
+ stale: number;
2368
+ unverified: number;
2369
+ };
2370
+ }>>;
2317
2371
  }, "strict", z.ZodTypeAny, {
2318
2372
  entityCount: number;
2319
2373
  relationCount: number;
2320
2374
  diagnosticCount: number;
2375
+ scope?: "file" | "module" | "package" | undefined;
2321
2376
  requiredRelationKinds?: string[] | undefined;
2377
+ documentation?: {
2378
+ documentCount: number;
2379
+ documentedDocumentCount: number;
2380
+ packageCount: number;
2381
+ packageStatus: {
2382
+ missing: number;
2383
+ fresh: number;
2384
+ stale: number;
2385
+ unverified: number;
2386
+ };
2387
+ } | undefined;
2388
+ diagnosticsByCode?: Record<string, number> | undefined;
2389
+ diagnosticsByStatus?: Record<string, number> | undefined;
2322
2390
  }, {
2323
2391
  entityCount: number;
2324
2392
  relationCount: number;
2325
2393
  diagnosticCount: number;
2394
+ scope?: "file" | "module" | "package" | undefined;
2326
2395
  requiredRelationKinds?: string[] | undefined;
2396
+ documentation?: {
2397
+ documentCount: number;
2398
+ documentedDocumentCount: number;
2399
+ packageCount: number;
2400
+ packageStatus: {
2401
+ missing: number;
2402
+ fresh: number;
2403
+ stale: number;
2404
+ unverified: number;
2405
+ };
2406
+ } | undefined;
2407
+ diagnosticsByCode?: Record<string, number> | undefined;
2408
+ diagnosticsByStatus?: Record<string, number> | undefined;
2327
2409
  }>;
2328
2410
  schemaVersion: z.ZodLiteral<1>;
2329
2411
  contentHash: z.ZodString;
@@ -2356,7 +2438,21 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
2356
2438
  entityCount: number;
2357
2439
  relationCount: number;
2358
2440
  diagnosticCount: number;
2441
+ scope?: "file" | "module" | "package" | undefined;
2359
2442
  requiredRelationKinds?: string[] | undefined;
2443
+ documentation?: {
2444
+ documentCount: number;
2445
+ documentedDocumentCount: number;
2446
+ packageCount: number;
2447
+ packageStatus: {
2448
+ missing: number;
2449
+ fresh: number;
2450
+ stale: number;
2451
+ unverified: number;
2452
+ };
2453
+ } | undefined;
2454
+ diagnosticsByCode?: Record<string, number> | undefined;
2455
+ diagnosticsByStatus?: Record<string, number> | undefined;
2360
2456
  };
2361
2457
  contentHashAlgo: "sha256-normalized-v1";
2362
2458
  sourceRevision: string;
@@ -2395,7 +2491,21 @@ declare const ReconciliationReportV1Schema: z.ZodObject<{
2395
2491
  entityCount: number;
2396
2492
  relationCount: number;
2397
2493
  diagnosticCount: number;
2494
+ scope?: "file" | "module" | "package" | undefined;
2398
2495
  requiredRelationKinds?: string[] | undefined;
2496
+ documentation?: {
2497
+ documentCount: number;
2498
+ documentedDocumentCount: number;
2499
+ packageCount: number;
2500
+ packageStatus: {
2501
+ missing: number;
2502
+ fresh: number;
2503
+ stale: number;
2504
+ unverified: number;
2505
+ };
2506
+ } | undefined;
2507
+ diagnosticsByCode?: Record<string, number> | undefined;
2508
+ diagnosticsByStatus?: Record<string, number> | undefined;
2399
2509
  };
2400
2510
  contentHashAlgo: "sha256-normalized-v1";
2401
2511
  sourceRevision: string;
@@ -2452,13 +2562,13 @@ declare const WorkflowTransitionSchema: z.ZodObject<{
2452
2562
  reason: z.ZodOptional<z.ZodString>;
2453
2563
  }, "strict", z.ZodTypeAny, {
2454
2564
  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";
2565
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2566
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2457
2567
  reason?: string | undefined;
2458
2568
  }, {
2459
2569
  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";
2570
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2571
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2462
2572
  reason?: string | undefined;
2463
2573
  }>;
2464
2574
  declare const WorkflowRunV1Schema: z.ZodObject<{
@@ -2490,13 +2600,13 @@ declare const WorkflowRunV1Schema: z.ZodObject<{
2490
2600
  reason: z.ZodOptional<z.ZodString>;
2491
2601
  }, "strict", z.ZodTypeAny, {
2492
2602
  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";
2603
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2604
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2495
2605
  reason?: string | undefined;
2496
2606
  }, {
2497
2607
  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";
2608
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2609
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2500
2610
  reason?: string | undefined;
2501
2611
  }>, "many">;
2502
2612
  artifactRefs: z.ZodArray<z.ZodString, "many">;
@@ -2535,7 +2645,7 @@ declare const WorkflowRunV1Schema: z.ZodObject<{
2535
2645
  analyzerVersions: Record<string, string>;
2536
2646
  artifactRefs: string[];
2537
2647
  runId: string;
2538
- state: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2648
+ state: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2539
2649
  steps: {
2540
2650
  status: "failed" | "pending" | "running" | "completed" | "skipped";
2541
2651
  name: string;
@@ -2545,8 +2655,8 @@ declare const WorkflowRunV1Schema: z.ZodObject<{
2545
2655
  }[];
2546
2656
  transitions: {
2547
2657
  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";
2658
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2659
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2550
2660
  reason?: string | undefined;
2551
2661
  }[];
2552
2662
  }, {
@@ -2565,7 +2675,7 @@ declare const WorkflowRunV1Schema: z.ZodObject<{
2565
2675
  analyzerVersions: Record<string, string>;
2566
2676
  artifactRefs: string[];
2567
2677
  runId: string;
2568
- state: "proposed" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "stale" | "superseded";
2678
+ state: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2569
2679
  steps: {
2570
2680
  status: "failed" | "pending" | "running" | "completed" | "skipped";
2571
2681
  name: string;
@@ -2575,8 +2685,8 @@ declare const WorkflowRunV1Schema: z.ZodObject<{
2575
2685
  }[];
2576
2686
  transitions: {
2577
2687
  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";
2688
+ from: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded" | null;
2689
+ to: "proposed" | "stale" | "created" | "discovering" | "analyzed" | "compared" | "awaiting-agent" | "awaiting-approval" | "validating" | "delivered" | "failed" | "cancelled" | "superseded";
2580
2690
  reason?: string | undefined;
2581
2691
  }[];
2582
2692
  }>;
@@ -2589,28 +2699,28 @@ declare const ProposalOriginSchema: z.ZodEffects<z.ZodObject<{
2589
2699
  model: z.ZodOptional<z.ZodString>;
2590
2700
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2591
2701
  }, "strict", z.ZodTypeAny, {
2592
- kind: "manual" | "registry-agent" | "deterministic";
2702
+ kind: "deterministic" | "manual" | "registry-agent";
2593
2703
  capabilities?: string[] | undefined;
2594
2704
  id?: string | undefined;
2595
2705
  provider?: string | undefined;
2596
2706
  model?: string | undefined;
2597
2707
  version?: string | undefined;
2598
2708
  }, {
2599
- kind: "manual" | "registry-agent" | "deterministic";
2709
+ kind: "deterministic" | "manual" | "registry-agent";
2600
2710
  capabilities?: string[] | undefined;
2601
2711
  id?: string | undefined;
2602
2712
  provider?: string | undefined;
2603
2713
  model?: string | undefined;
2604
2714
  version?: string | undefined;
2605
2715
  }>, {
2606
- kind: "manual" | "registry-agent" | "deterministic";
2716
+ kind: "deterministic" | "manual" | "registry-agent";
2607
2717
  capabilities?: string[] | undefined;
2608
2718
  id?: string | undefined;
2609
2719
  provider?: string | undefined;
2610
2720
  model?: string | undefined;
2611
2721
  version?: string | undefined;
2612
2722
  }, {
2613
- kind: "manual" | "registry-agent" | "deterministic";
2723
+ kind: "deterministic" | "manual" | "registry-agent";
2614
2724
  capabilities?: string[] | undefined;
2615
2725
  id?: string | undefined;
2616
2726
  provider?: string | undefined;
@@ -2669,28 +2779,28 @@ declare const AgentProposalV1Schema: z.ZodObject<{
2669
2779
  model: z.ZodOptional<z.ZodString>;
2670
2780
  capabilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2671
2781
  }, "strict", z.ZodTypeAny, {
2672
- kind: "manual" | "registry-agent" | "deterministic";
2782
+ kind: "deterministic" | "manual" | "registry-agent";
2673
2783
  capabilities?: string[] | undefined;
2674
2784
  id?: string | undefined;
2675
2785
  provider?: string | undefined;
2676
2786
  model?: string | undefined;
2677
2787
  version?: string | undefined;
2678
2788
  }, {
2679
- kind: "manual" | "registry-agent" | "deterministic";
2789
+ kind: "deterministic" | "manual" | "registry-agent";
2680
2790
  capabilities?: string[] | undefined;
2681
2791
  id?: string | undefined;
2682
2792
  provider?: string | undefined;
2683
2793
  model?: string | undefined;
2684
2794
  version?: string | undefined;
2685
2795
  }>, {
2686
- kind: "manual" | "registry-agent" | "deterministic";
2796
+ kind: "deterministic" | "manual" | "registry-agent";
2687
2797
  capabilities?: string[] | undefined;
2688
2798
  id?: string | undefined;
2689
2799
  provider?: string | undefined;
2690
2800
  model?: string | undefined;
2691
2801
  version?: string | undefined;
2692
2802
  }, {
2693
- kind: "manual" | "registry-agent" | "deterministic";
2803
+ kind: "deterministic" | "manual" | "registry-agent";
2694
2804
  capabilities?: string[] | undefined;
2695
2805
  id?: string | undefined;
2696
2806
  provider?: string | undefined;
@@ -2748,7 +2858,7 @@ declare const AgentProposalV1Schema: z.ZodObject<{
2748
2858
  rationale: string;
2749
2859
  intendedChanges: string[];
2750
2860
  origin: {
2751
- kind: "manual" | "registry-agent" | "deterministic";
2861
+ kind: "deterministic" | "manual" | "registry-agent";
2752
2862
  capabilities?: string[] | undefined;
2753
2863
  id?: string | undefined;
2754
2864
  provider?: string | undefined;
@@ -2786,7 +2896,7 @@ declare const AgentProposalV1Schema: z.ZodObject<{
2786
2896
  rationale: string;
2787
2897
  intendedChanges: string[];
2788
2898
  origin: {
2789
- kind: "manual" | "registry-agent" | "deterministic";
2899
+ kind: "deterministic" | "manual" | "registry-agent";
2790
2900
  capabilities?: string[] | undefined;
2791
2901
  id?: string | undefined;
2792
2902
  provider?: string | undefined;
@@ -2884,7 +2994,7 @@ declare const FixProposalV1Schema: z.ZodEffects<z.ZodObject<{
2884
2994
  type: z.ZodLiteral<"fix-proposal">;
2885
2995
  }, "strict", z.ZodTypeAny, {
2886
2996
  type: "fix-proposal";
2887
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
2997
+ status: "proposed" | "stale" | "failed" | "approved" | "rejected" | "applied";
2888
2998
  contentHash: string;
2889
2999
  schemaVersion: 1;
2890
3000
  project: {
@@ -2918,7 +3028,7 @@ declare const FixProposalV1Schema: z.ZodEffects<z.ZodObject<{
2918
3028
  } | undefined;
2919
3029
  }, {
2920
3030
  type: "fix-proposal";
2921
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
3031
+ status: "proposed" | "stale" | "failed" | "approved" | "rejected" | "applied";
2922
3032
  contentHash: string;
2923
3033
  schemaVersion: 1;
2924
3034
  project: {
@@ -2952,7 +3062,7 @@ declare const FixProposalV1Schema: z.ZodEffects<z.ZodObject<{
2952
3062
  } | undefined;
2953
3063
  }>, {
2954
3064
  type: "fix-proposal";
2955
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
3065
+ status: "proposed" | "stale" | "failed" | "approved" | "rejected" | "applied";
2956
3066
  contentHash: string;
2957
3067
  schemaVersion: 1;
2958
3068
  project: {
@@ -2986,7 +3096,7 @@ declare const FixProposalV1Schema: z.ZodEffects<z.ZodObject<{
2986
3096
  } | undefined;
2987
3097
  }, {
2988
3098
  type: "fix-proposal";
2989
- status: "proposed" | "failed" | "stale" | "approved" | "rejected" | "applied";
3099
+ status: "proposed" | "stale" | "failed" | "approved" | "rejected" | "applied";
2990
3100
  contentHash: string;
2991
3101
  schemaVersion: 1;
2992
3102
  project: {
@@ -3115,6 +3225,7 @@ type RegistryAgentContext = {
3115
3225
  readonly capabilities: readonly ['snapshot.read', 'evidence.read', 'proposal.write'];
3116
3226
  readonly network: false;
3117
3227
  readonly shell: false;
3228
+ readonly deterministic: boolean;
3118
3229
  };
3119
3230
  type RegistryAgentRunner = (context: RegistryAgentContext) => Promise<unknown> | unknown;
3120
3231
  type RegistryAgentAdapter = {
@@ -3139,6 +3250,8 @@ type DocumentationDeclarationInput = {
3139
3250
  type DocumentationDeclarationOptions = {
3140
3251
  readonly snapshot: Pick<DiscoverySnapshotV1, 'entities'>;
3141
3252
  readonly documentId?: string;
3253
+ /** Agent corpus root used for conservative package/app path inference. */
3254
+ readonly agentRoot?: string;
3142
3255
  };
3143
3256
  type DocumentationDeclarationResult = {
3144
3257
  readonly hasDocbridge: boolean;
@@ -3151,11 +3264,15 @@ type DocumentationAnalysisResult = {
3151
3264
  readonly diagnostics: readonly DocumentationDiagnostic[];
3152
3265
  };
3153
3266
  declare const parseDocumentationDeclarations: (input: DocumentationDeclarationInput, options: DocumentationDeclarationOptions) => DocumentationDeclarationResult;
3154
- declare const applyDocumentationDeclarations: (snapshot: DiscoverySnapshotV1, documents: readonly DocumentationDeclarationInput[]) => DocumentationAnalysisResult;
3267
+ declare const applyDocumentationDeclarations: (snapshot: DiscoverySnapshotV1, documents: readonly DocumentationDeclarationInput[], options?: Pick<DocumentationDeclarationOptions, "agentRoot">) => DocumentationAnalysisResult;
3155
3268
 
3156
3269
  type ReconciliationOptions = {
3270
+ /** Compare declarations at a semantic level while retaining raw discovery evidence. */
3271
+ readonly scope?: 'file' | 'module' | 'package';
3157
3272
  /** Omit for backwards-compatible all-relation checking; [] disables missing-declaration findings. */
3158
3273
  readonly requiredRelationKinds?: readonly string[];
3274
+ /** Emit one bounded finding for each observed Markdown document without declarations. */
3275
+ readonly includeOrphanedDocuments?: boolean;
3159
3276
  };
3160
3277
  declare const reconcileKnowledge: (observed: DiscoverySnapshotV1, declared: DiscoverySnapshotV1, options?: ReconciliationOptions) => ReconciliationReportV1;
3161
3278
 
@@ -3165,6 +3282,7 @@ type OfflineReportInput = {
3165
3282
  };
3166
3283
  type OfflineReportOptions = {
3167
3284
  readonly includeSnippets?: boolean;
3285
+ readonly privacy?: 'private' | 'anonymized';
3168
3286
  };
3169
3287
  type OfflineReportArtifact = {
3170
3288
  readonly mode: 'single-file' | 'directory';
@@ -3208,10 +3326,13 @@ type WorkflowOptions = {
3208
3326
  readonly sourceRevision: string;
3209
3327
  readonly configurationHash: string;
3210
3328
  readonly toolVersion?: string;
3329
+ readonly pipelineVersion?: string;
3330
+ readonly analyzerVersions?: Readonly<Record<string, string>>;
3211
3331
  readonly runId?: string;
3212
3332
  readonly stage?: WorkflowStage | 'all';
3213
3333
  readonly inputs?: Partial<Record<WorkflowStage, unknown>>;
3214
3334
  readonly handlers: Partial<Record<WorkflowStage, WorkflowStageHandler>>;
3335
+ readonly shouldCancel?: () => boolean;
3215
3336
  };
3216
3337
  type WorkflowExecutionResult = {
3217
3338
  readonly run: WorkflowRunV1;
@@ -3734,6 +3855,655 @@ declare const contentHashForArtifactV1: <T extends {
3734
3855
  readonly contentHash: string;
3735
3856
  }>(artifact: T) => string;
3736
3857
 
3858
+ declare const ANALYZER_PLUGIN_CONTRACT_VERSION: 1;
3859
+ declare const AnalyzerPluginManifestSchema: z.ZodObject<{
3860
+ id: z.ZodString;
3861
+ version: z.ZodString;
3862
+ languages: z.ZodArray<z.ZodString, "many">;
3863
+ frameworks: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3864
+ capabilities: z.ZodArray<z.ZodString, "many">;
3865
+ knowledgeSchemaVersion: z.ZodLiteral<1>;
3866
+ compatibility: z.ZodObject<{
3867
+ pipelineMajor: z.ZodNumber;
3868
+ }, "strict", z.ZodTypeAny, {
3869
+ pipelineMajor: number;
3870
+ }, {
3871
+ pipelineMajor: number;
3872
+ }>;
3873
+ unsupportedConstructs: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3874
+ resourceLimits: z.ZodDefault<z.ZodObject<{
3875
+ maxFiles: z.ZodOptional<z.ZodNumber>;
3876
+ maxBytes: z.ZodOptional<z.ZodNumber>;
3877
+ }, "strict", z.ZodTypeAny, {
3878
+ maxFiles?: number | undefined;
3879
+ maxBytes?: number | undefined;
3880
+ }, {
3881
+ maxFiles?: number | undefined;
3882
+ maxBytes?: number | undefined;
3883
+ }>>;
3884
+ }, "strict", z.ZodTypeAny, {
3885
+ capabilities: string[];
3886
+ id: string;
3887
+ version: string;
3888
+ languages: string[];
3889
+ frameworks: string[];
3890
+ knowledgeSchemaVersion: 1;
3891
+ compatibility: {
3892
+ pipelineMajor: number;
3893
+ };
3894
+ unsupportedConstructs: string[];
3895
+ resourceLimits: {
3896
+ maxFiles?: number | undefined;
3897
+ maxBytes?: number | undefined;
3898
+ };
3899
+ }, {
3900
+ capabilities: string[];
3901
+ id: string;
3902
+ version: string;
3903
+ languages: string[];
3904
+ knowledgeSchemaVersion: 1;
3905
+ compatibility: {
3906
+ pipelineMajor: number;
3907
+ };
3908
+ frameworks?: string[] | undefined;
3909
+ unsupportedConstructs?: string[] | undefined;
3910
+ resourceLimits?: {
3911
+ maxFiles?: number | undefined;
3912
+ maxBytes?: number | undefined;
3913
+ } | undefined;
3914
+ }>;
3915
+ type AnalyzerPluginManifest = z.infer<typeof AnalyzerPluginManifestSchema>;
3916
+ declare const AnalyzerPluginOutputSchema: z.ZodObject<{
3917
+ entities: z.ZodDefault<z.ZodArray<z.ZodObject<{
3918
+ id: z.ZodString;
3919
+ kind: z.ZodString;
3920
+ name: z.ZodString;
3921
+ path: z.ZodOptional<z.ZodString>;
3922
+ aliases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3923
+ provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
3924
+ evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
3925
+ source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
3926
+ path: z.ZodString;
3927
+ lineStart: z.ZodOptional<z.ZodNumber>;
3928
+ lineEnd: z.ZodOptional<z.ZodNumber>;
3929
+ contentHash: z.ZodOptional<z.ZodString>;
3930
+ context: z.ZodOptional<z.ZodString>;
3931
+ }, "strict", z.ZodTypeAny, {
3932
+ path: string;
3933
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3934
+ contentHash?: string | undefined;
3935
+ lineStart?: number | undefined;
3936
+ lineEnd?: number | undefined;
3937
+ context?: string | undefined;
3938
+ }, {
3939
+ path: string;
3940
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3941
+ contentHash?: string | undefined;
3942
+ lineStart?: number | undefined;
3943
+ lineEnd?: number | undefined;
3944
+ context?: string | undefined;
3945
+ }>, {
3946
+ path: string;
3947
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3948
+ contentHash?: string | undefined;
3949
+ lineStart?: number | undefined;
3950
+ lineEnd?: number | undefined;
3951
+ context?: string | undefined;
3952
+ }, {
3953
+ path: string;
3954
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3955
+ contentHash?: string | undefined;
3956
+ lineStart?: number | undefined;
3957
+ lineEnd?: number | undefined;
3958
+ context?: string | undefined;
3959
+ }>, "many">;
3960
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
3961
+ }, "strict", z.ZodTypeAny, {
3962
+ id: string;
3963
+ name: string;
3964
+ kind: string;
3965
+ evidence: {
3966
+ path: string;
3967
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3968
+ contentHash?: string | undefined;
3969
+ lineStart?: number | undefined;
3970
+ lineEnd?: number | undefined;
3971
+ context?: string | undefined;
3972
+ }[];
3973
+ provenance: "observed" | "declared" | "proposed";
3974
+ path?: string | undefined;
3975
+ metadata?: Record<string, unknown> | undefined;
3976
+ aliases?: string[] | undefined;
3977
+ }, {
3978
+ id: string;
3979
+ name: string;
3980
+ kind: string;
3981
+ evidence: {
3982
+ path: string;
3983
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
3984
+ contentHash?: string | undefined;
3985
+ lineStart?: number | undefined;
3986
+ lineEnd?: number | undefined;
3987
+ context?: string | undefined;
3988
+ }[];
3989
+ provenance: "observed" | "declared" | "proposed";
3990
+ path?: string | undefined;
3991
+ metadata?: Record<string, unknown> | undefined;
3992
+ aliases?: string[] | undefined;
3993
+ }>, "many">>;
3994
+ relations: z.ZodDefault<z.ZodArray<z.ZodObject<{
3995
+ id: z.ZodString;
3996
+ kind: z.ZodString;
3997
+ from: z.ZodString;
3998
+ to: z.ZodString;
3999
+ discriminator: z.ZodOptional<z.ZodString>;
4000
+ provenance: z.ZodEnum<["observed", "declared", "proposed"]>;
4001
+ evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
4002
+ source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
4003
+ path: z.ZodString;
4004
+ lineStart: z.ZodOptional<z.ZodNumber>;
4005
+ lineEnd: z.ZodOptional<z.ZodNumber>;
4006
+ contentHash: z.ZodOptional<z.ZodString>;
4007
+ context: z.ZodOptional<z.ZodString>;
4008
+ }, "strict", z.ZodTypeAny, {
4009
+ path: string;
4010
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4011
+ contentHash?: string | undefined;
4012
+ lineStart?: number | undefined;
4013
+ lineEnd?: number | undefined;
4014
+ context?: string | undefined;
4015
+ }, {
4016
+ path: string;
4017
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4018
+ contentHash?: string | undefined;
4019
+ lineStart?: number | undefined;
4020
+ lineEnd?: number | undefined;
4021
+ context?: string | undefined;
4022
+ }>, {
4023
+ path: string;
4024
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4025
+ contentHash?: string | undefined;
4026
+ lineStart?: number | undefined;
4027
+ lineEnd?: number | undefined;
4028
+ context?: string | undefined;
4029
+ }, {
4030
+ path: string;
4031
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4032
+ contentHash?: string | undefined;
4033
+ lineStart?: number | undefined;
4034
+ lineEnd?: number | undefined;
4035
+ context?: string | undefined;
4036
+ }>, "many">;
4037
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
4038
+ }, "strict", z.ZodTypeAny, {
4039
+ id: string;
4040
+ kind: string;
4041
+ evidence: {
4042
+ path: string;
4043
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4044
+ contentHash?: string | undefined;
4045
+ lineStart?: number | undefined;
4046
+ lineEnd?: number | undefined;
4047
+ context?: string | undefined;
4048
+ }[];
4049
+ provenance: "observed" | "declared" | "proposed";
4050
+ from: string;
4051
+ to: string;
4052
+ metadata?: Record<string, unknown> | undefined;
4053
+ discriminator?: string | undefined;
4054
+ }, {
4055
+ id: string;
4056
+ kind: string;
4057
+ evidence: {
4058
+ path: string;
4059
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4060
+ contentHash?: string | undefined;
4061
+ lineStart?: number | undefined;
4062
+ lineEnd?: number | undefined;
4063
+ context?: string | undefined;
4064
+ }[];
4065
+ provenance: "observed" | "declared" | "proposed";
4066
+ from: string;
4067
+ to: string;
4068
+ metadata?: Record<string, unknown> | undefined;
4069
+ discriminator?: string | undefined;
4070
+ }>, "many">>;
4071
+ coverage: z.ZodDefault<z.ZodArray<z.ZodObject<{
4072
+ analyzer: z.ZodString;
4073
+ analyzerVersion: z.ZodOptional<z.ZodString>;
4074
+ scope: z.ZodString;
4075
+ status: z.ZodEnum<["complete", "partial", "not-analyzed", "not-applicable"]>;
4076
+ reason: z.ZodOptional<z.ZodString>;
4077
+ evidence: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
4078
+ source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
4079
+ path: z.ZodString;
4080
+ lineStart: z.ZodOptional<z.ZodNumber>;
4081
+ lineEnd: z.ZodOptional<z.ZodNumber>;
4082
+ contentHash: z.ZodOptional<z.ZodString>;
4083
+ context: z.ZodOptional<z.ZodString>;
4084
+ }, "strict", z.ZodTypeAny, {
4085
+ path: string;
4086
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4087
+ contentHash?: string | undefined;
4088
+ lineStart?: number | undefined;
4089
+ lineEnd?: number | undefined;
4090
+ context?: string | undefined;
4091
+ }, {
4092
+ path: string;
4093
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4094
+ contentHash?: string | undefined;
4095
+ lineStart?: number | undefined;
4096
+ lineEnd?: number | undefined;
4097
+ context?: string | undefined;
4098
+ }>, {
4099
+ path: string;
4100
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4101
+ contentHash?: string | undefined;
4102
+ lineStart?: number | undefined;
4103
+ lineEnd?: number | undefined;
4104
+ context?: string | undefined;
4105
+ }, {
4106
+ path: string;
4107
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4108
+ contentHash?: string | undefined;
4109
+ lineStart?: number | undefined;
4110
+ lineEnd?: number | undefined;
4111
+ context?: string | undefined;
4112
+ }>, "many">>;
4113
+ }, "strict", z.ZodTypeAny, {
4114
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
4115
+ scope: string;
4116
+ analyzer: string;
4117
+ reason?: string | undefined;
4118
+ analyzerVersion?: string | undefined;
4119
+ evidence?: {
4120
+ path: string;
4121
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4122
+ contentHash?: string | undefined;
4123
+ lineStart?: number | undefined;
4124
+ lineEnd?: number | undefined;
4125
+ context?: string | undefined;
4126
+ }[] | undefined;
4127
+ }, {
4128
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
4129
+ scope: string;
4130
+ analyzer: string;
4131
+ reason?: string | undefined;
4132
+ analyzerVersion?: string | undefined;
4133
+ evidence?: {
4134
+ path: string;
4135
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4136
+ contentHash?: string | undefined;
4137
+ lineStart?: number | undefined;
4138
+ lineEnd?: number | undefined;
4139
+ context?: string | undefined;
4140
+ }[] | undefined;
4141
+ }>, "many">>;
4142
+ diagnostics: z.ZodDefault<z.ZodArray<z.ZodObject<{
4143
+ id: z.ZodString;
4144
+ code: z.ZodString;
4145
+ status: z.ZodEnum<["confirmed", "undocumented", "stale-or-unverified", "conflict", "unresolved", "not-analyzed"]>;
4146
+ severity: z.ZodEnum<["off", "info", "warn", "error"]>;
4147
+ message: z.ZodString;
4148
+ evidence: z.ZodArray<z.ZodEffects<z.ZodObject<{
4149
+ source: z.ZodEnum<["code", "configuration", "documentation", "agent", "derived"]>;
4150
+ path: z.ZodString;
4151
+ lineStart: z.ZodOptional<z.ZodNumber>;
4152
+ lineEnd: z.ZodOptional<z.ZodNumber>;
4153
+ contentHash: z.ZodOptional<z.ZodString>;
4154
+ context: z.ZodOptional<z.ZodString>;
4155
+ }, "strict", z.ZodTypeAny, {
4156
+ path: string;
4157
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4158
+ contentHash?: string | undefined;
4159
+ lineStart?: number | undefined;
4160
+ lineEnd?: number | undefined;
4161
+ context?: string | undefined;
4162
+ }, {
4163
+ path: string;
4164
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4165
+ contentHash?: string | undefined;
4166
+ lineStart?: number | undefined;
4167
+ lineEnd?: number | undefined;
4168
+ context?: string | undefined;
4169
+ }>, {
4170
+ path: string;
4171
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4172
+ contentHash?: string | undefined;
4173
+ lineStart?: number | undefined;
4174
+ lineEnd?: number | undefined;
4175
+ context?: string | undefined;
4176
+ }, {
4177
+ path: string;
4178
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4179
+ contentHash?: string | undefined;
4180
+ lineStart?: number | undefined;
4181
+ lineEnd?: number | undefined;
4182
+ context?: string | undefined;
4183
+ }>, "many">;
4184
+ entityIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4185
+ relationIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4186
+ remediation: z.ZodOptional<z.ZodString>;
4187
+ }, "strict", z.ZodTypeAny, {
4188
+ code: string;
4189
+ message: string;
4190
+ status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
4191
+ id: string;
4192
+ severity: "off" | "info" | "warn" | "error";
4193
+ evidence: {
4194
+ path: string;
4195
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4196
+ contentHash?: string | undefined;
4197
+ lineStart?: number | undefined;
4198
+ lineEnd?: number | undefined;
4199
+ context?: string | undefined;
4200
+ }[];
4201
+ entityIds?: string[] | undefined;
4202
+ relationIds?: string[] | undefined;
4203
+ remediation?: string | undefined;
4204
+ }, {
4205
+ code: string;
4206
+ message: string;
4207
+ status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
4208
+ id: string;
4209
+ severity: "off" | "info" | "warn" | "error";
4210
+ evidence: {
4211
+ path: string;
4212
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4213
+ contentHash?: string | undefined;
4214
+ lineStart?: number | undefined;
4215
+ lineEnd?: number | undefined;
4216
+ context?: string | undefined;
4217
+ }[];
4218
+ entityIds?: string[] | undefined;
4219
+ relationIds?: string[] | undefined;
4220
+ remediation?: string | undefined;
4221
+ }>, "many">>;
4222
+ }, "strict", z.ZodTypeAny, {
4223
+ entities: {
4224
+ id: string;
4225
+ name: string;
4226
+ kind: string;
4227
+ evidence: {
4228
+ path: string;
4229
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4230
+ contentHash?: string | undefined;
4231
+ lineStart?: number | undefined;
4232
+ lineEnd?: number | undefined;
4233
+ context?: string | undefined;
4234
+ }[];
4235
+ provenance: "observed" | "declared" | "proposed";
4236
+ path?: string | undefined;
4237
+ metadata?: Record<string, unknown> | undefined;
4238
+ aliases?: string[] | undefined;
4239
+ }[];
4240
+ relations: {
4241
+ id: string;
4242
+ kind: string;
4243
+ evidence: {
4244
+ path: string;
4245
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4246
+ contentHash?: string | undefined;
4247
+ lineStart?: number | undefined;
4248
+ lineEnd?: number | undefined;
4249
+ context?: string | undefined;
4250
+ }[];
4251
+ provenance: "observed" | "declared" | "proposed";
4252
+ from: string;
4253
+ to: string;
4254
+ metadata?: Record<string, unknown> | undefined;
4255
+ discriminator?: string | undefined;
4256
+ }[];
4257
+ coverage: {
4258
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
4259
+ scope: string;
4260
+ analyzer: string;
4261
+ reason?: string | undefined;
4262
+ analyzerVersion?: string | undefined;
4263
+ evidence?: {
4264
+ path: string;
4265
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4266
+ contentHash?: string | undefined;
4267
+ lineStart?: number | undefined;
4268
+ lineEnd?: number | undefined;
4269
+ context?: string | undefined;
4270
+ }[] | undefined;
4271
+ }[];
4272
+ diagnostics: {
4273
+ code: string;
4274
+ message: string;
4275
+ status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
4276
+ id: string;
4277
+ severity: "off" | "info" | "warn" | "error";
4278
+ evidence: {
4279
+ path: string;
4280
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4281
+ contentHash?: string | undefined;
4282
+ lineStart?: number | undefined;
4283
+ lineEnd?: number | undefined;
4284
+ context?: string | undefined;
4285
+ }[];
4286
+ entityIds?: string[] | undefined;
4287
+ relationIds?: string[] | undefined;
4288
+ remediation?: string | undefined;
4289
+ }[];
4290
+ }, {
4291
+ entities?: {
4292
+ id: string;
4293
+ name: string;
4294
+ kind: string;
4295
+ evidence: {
4296
+ path: string;
4297
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4298
+ contentHash?: string | undefined;
4299
+ lineStart?: number | undefined;
4300
+ lineEnd?: number | undefined;
4301
+ context?: string | undefined;
4302
+ }[];
4303
+ provenance: "observed" | "declared" | "proposed";
4304
+ path?: string | undefined;
4305
+ metadata?: Record<string, unknown> | undefined;
4306
+ aliases?: string[] | undefined;
4307
+ }[] | undefined;
4308
+ relations?: {
4309
+ id: string;
4310
+ kind: string;
4311
+ evidence: {
4312
+ path: string;
4313
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4314
+ contentHash?: string | undefined;
4315
+ lineStart?: number | undefined;
4316
+ lineEnd?: number | undefined;
4317
+ context?: string | undefined;
4318
+ }[];
4319
+ provenance: "observed" | "declared" | "proposed";
4320
+ from: string;
4321
+ to: string;
4322
+ metadata?: Record<string, unknown> | undefined;
4323
+ discriminator?: string | undefined;
4324
+ }[] | undefined;
4325
+ coverage?: {
4326
+ status: "partial" | "not-analyzed" | "complete" | "not-applicable";
4327
+ scope: string;
4328
+ analyzer: string;
4329
+ reason?: string | undefined;
4330
+ analyzerVersion?: string | undefined;
4331
+ evidence?: {
4332
+ path: string;
4333
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4334
+ contentHash?: string | undefined;
4335
+ lineStart?: number | undefined;
4336
+ lineEnd?: number | undefined;
4337
+ context?: string | undefined;
4338
+ }[] | undefined;
4339
+ }[] | undefined;
4340
+ diagnostics?: {
4341
+ code: string;
4342
+ message: string;
4343
+ status: "confirmed" | "undocumented" | "stale-or-unverified" | "conflict" | "unresolved" | "not-analyzed";
4344
+ id: string;
4345
+ severity: "off" | "info" | "warn" | "error";
4346
+ evidence: {
4347
+ path: string;
4348
+ source: "code" | "agent" | "configuration" | "documentation" | "derived";
4349
+ contentHash?: string | undefined;
4350
+ lineStart?: number | undefined;
4351
+ lineEnd?: number | undefined;
4352
+ context?: string | undefined;
4353
+ }[];
4354
+ entityIds?: string[] | undefined;
4355
+ relationIds?: string[] | undefined;
4356
+ remediation?: string | undefined;
4357
+ }[] | undefined;
4358
+ }>;
4359
+ type AnalyzerPluginOutput = z.infer<typeof AnalyzerPluginOutputSchema>;
4360
+ type AnalyzerPluginInput = {
4361
+ readonly language: string;
4362
+ readonly framework?: string;
4363
+ readonly files: readonly {
4364
+ readonly path: string;
4365
+ readonly bytes: number;
4366
+ }[];
4367
+ readonly value?: unknown;
4368
+ };
4369
+ type AnalyzerPlugin = {
4370
+ readonly manifest: AnalyzerPluginManifest;
4371
+ readonly analyze: (input: AnalyzerPluginInput) => Promise<unknown> | unknown;
4372
+ };
4373
+ type AnalyzerRegistry = {
4374
+ readonly register: (plugin: AnalyzerPlugin) => void;
4375
+ readonly list: () => readonly AnalyzerPluginManifest[];
4376
+ readonly analyze: (id: string, input: AnalyzerPluginInput) => Promise<AnalyzerPluginOutput>;
4377
+ };
4378
+ declare const createAnalyzerRegistry: (options?: {
4379
+ readonly pipelineVersion?: string;
4380
+ readonly maxPlugins?: number;
4381
+ }) => AnalyzerRegistry;
4382
+
4383
+ declare const BENCHMARK_SCHEMA_VERSION: 1;
4384
+ declare const BenchmarkFixtureV1Schema: z.ZodObject<{
4385
+ schemaVersion: z.ZodLiteral<1>;
4386
+ supported: z.ZodObject<{
4387
+ entities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4388
+ relations: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4389
+ findings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4390
+ }, "strict", z.ZodTypeAny, {
4391
+ entities: string[];
4392
+ relations: string[];
4393
+ findings: string[];
4394
+ }, {
4395
+ entities?: string[] | undefined;
4396
+ relations?: string[] | undefined;
4397
+ findings?: string[] | undefined;
4398
+ }>;
4399
+ excluded: z.ZodOptional<z.ZodObject<{
4400
+ entities: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4401
+ relations: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4402
+ findings: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4403
+ }, "strict", z.ZodTypeAny, {
4404
+ entities: string[];
4405
+ relations: string[];
4406
+ findings: string[];
4407
+ }, {
4408
+ entities?: string[] | undefined;
4409
+ relations?: string[] | undefined;
4410
+ findings?: string[] | undefined;
4411
+ }>>;
4412
+ }, "strict", z.ZodTypeAny, {
4413
+ schemaVersion: 1;
4414
+ supported: {
4415
+ entities: string[];
4416
+ relations: string[];
4417
+ findings: string[];
4418
+ };
4419
+ excluded?: {
4420
+ entities: string[];
4421
+ relations: string[];
4422
+ findings: string[];
4423
+ } | undefined;
4424
+ }, {
4425
+ schemaVersion: 1;
4426
+ supported: {
4427
+ entities?: string[] | undefined;
4428
+ relations?: string[] | undefined;
4429
+ findings?: string[] | undefined;
4430
+ };
4431
+ excluded?: {
4432
+ entities?: string[] | undefined;
4433
+ relations?: string[] | undefined;
4434
+ findings?: string[] | undefined;
4435
+ } | undefined;
4436
+ }>;
4437
+ type BenchmarkFixtureV1 = z.infer<typeof BenchmarkFixtureV1Schema>;
4438
+ type BenchmarkObservation = {
4439
+ readonly entities: readonly string[];
4440
+ readonly relations: readonly string[];
4441
+ readonly findings: readonly string[];
4442
+ readonly evidenced?: readonly string[];
4443
+ readonly findingCategories?: Readonly<Record<string, number>>;
4444
+ };
4445
+ type BenchmarkSetMetrics = {
4446
+ readonly truePositives: number;
4447
+ readonly falsePositives: number;
4448
+ readonly falseNegatives: number;
4449
+ readonly precision: number;
4450
+ readonly recall: number;
4451
+ readonly duplicateCount: number;
4452
+ };
4453
+ type BenchmarkResult = {
4454
+ readonly schemaVersion: typeof BENCHMARK_SCHEMA_VERSION;
4455
+ readonly quality: {
4456
+ readonly entities: BenchmarkSetMetrics;
4457
+ readonly relations: BenchmarkSetMetrics;
4458
+ readonly findings: BenchmarkSetMetrics;
4459
+ };
4460
+ readonly evidenceRatio: number;
4461
+ readonly findingDensity: number;
4462
+ readonly findingCategoryDistribution: Readonly<Record<string, number>>;
4463
+ readonly excludedCaseCount: number;
4464
+ readonly excludedCaseIds: Readonly<{
4465
+ entities: number;
4466
+ relations: number;
4467
+ findings: number;
4468
+ }>;
4469
+ readonly thresholds: {
4470
+ readonly precision: number;
4471
+ readonly recall: number;
4472
+ };
4473
+ readonly regressions: readonly string[];
4474
+ };
4475
+ declare const benchmarkFixture: (fixture: unknown) => BenchmarkFixtureV1;
4476
+ declare const measureBenchmark: (observation: BenchmarkObservation, fixture: BenchmarkFixtureV1, thresholds?: {
4477
+ readonly precision?: number;
4478
+ readonly recall?: number;
4479
+ }) => BenchmarkResult;
4480
+ type BenchmarkSnapshot = Readonly<Record<string, string>>;
4481
+ type BenchmarkSnapshotDiff = {
4482
+ readonly added: number;
4483
+ readonly removed: number;
4484
+ readonly unchanged: number;
4485
+ readonly reclassified: number;
4486
+ readonly unchangedEvidence: number;
4487
+ };
4488
+ declare const compareBenchmarkSnapshots: (previous: BenchmarkSnapshot, current: BenchmarkSnapshot) => BenchmarkSnapshotDiff;
4489
+ type AgentEfficiencyObservation = {
4490
+ readonly hits: number;
4491
+ readonly queries: number;
4492
+ readonly latencyMs: readonly number[];
4493
+ readonly responseBytes: readonly number[];
4494
+ readonly estimatedTokens: readonly number[];
4495
+ readonly corpusBytes: number;
4496
+ };
4497
+ declare const measureAgentEfficiency: (observation: AgentEfficiencyObservation) => {
4498
+ hitRate: number;
4499
+ latencyP95Ms: number;
4500
+ responseBytesP95: number;
4501
+ estimatedTokensP95: number;
4502
+ corpusBytes: number;
4503
+ contextReduction: number;
4504
+ };
4505
+ declare const formatBenchmarkText: (result: BenchmarkResult) => string;
4506
+
3737
4507
  declare class IndexNotFoundError extends Error {
3738
4508
  readonly path: string;
3739
4509
  constructor(path: string);
@@ -3802,7 +4572,7 @@ declare const chunksFromMarkdown: (property: string, raw: string, sourceUrl: str
3802
4572
  declare const loadFederatedChunks: (root: string, config: DocBridgeConfigV1, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
3803
4573
  declare const retrieveHybridChunks: (root: string, config: DocBridgeConfigV1, index: DocBridgeIndexV1, query: string, options?: FederatedRetrieverOptions) => Promise<DocBridgeRetrievedChunk[]>;
3804
4574
 
3805
- declare const PACKAGE_VERSION = "1.6.4";
4575
+ declare const PACKAGE_VERSION = "1.7.44";
3806
4576
 
3807
4577
  type FrontmatterValue = string | boolean | readonly string[];
3808
4578
  type FrontmatterData = Record<string, FrontmatterValue>;
@@ -3919,4 +4689,4 @@ declare const docBridgePatternPayload: () => {
3919
4689
  cli: "ak-docs";
3920
4690
  };
3921
4691
 
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 };
4692
+ 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 };