@c4a/context 0.7.1 → 0.7.5

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 (119) hide show
  1. package/README.md +67 -171
  2. package/README.zh-CN.md +53 -130
  3. package/docs/README.md +9 -10
  4. package/docs/README.zh-CN.md +6 -7
  5. package/docs/getting-started.md +73 -428
  6. package/docs/guides/agent-guide.md +104 -518
  7. package/docs/guides/code-indexer-skill-authoring.md +38 -13
  8. package/docs/guides/indexer-provider-and-customization.md +32 -20
  9. package/docs/guides/markdown-indexer-skill-authoring.md +22 -13
  10. package/docs/reference/code-extractors.md +29 -121
  11. package/docs/reference/indexer-provider-protocol.md +43 -110
  12. package/docs/reference/package-templates.md +2 -3
  13. package/docs/reference/project-api.md +52 -986
  14. package/index.d.ts +10 -8
  15. package/index.js +13132 -15249
  16. package/indexerAgentStepProtocol.d.ts +1326 -8429
  17. package/indexerArtifact.d.ts +225 -0
  18. package/indexerArtifactDependencies.d.ts +43 -39
  19. package/indexerArtifactResult.d.ts +219 -252
  20. package/indexerAuthorizedWorksetView.d.ts +368 -0
  21. package/indexerBaseQuestionAmendment.d.ts +484 -280
  22. package/indexerBenchmark.d.ts +16 -16
  23. package/indexerCandidateCompile.d.ts +66 -60
  24. package/indexerCapabilityGroupEvidence.d.ts +6 -6
  25. package/indexerCatalogFallback.d.ts +122 -128
  26. package/indexerCollectionMapping.d.ts +13 -13
  27. package/indexerCompositionFactDependencies.d.ts +16 -0
  28. package/indexerContentLayers.d.ts +8 -8
  29. package/indexerContractOverlay.d.ts +10 -10
  30. package/indexerControlledInvocation.d.ts +12 -12
  31. package/indexerControlledProgram.d.ts +2467 -2797
  32. package/indexerCoreExports.d.ts +6 -6
  33. package/indexerCustomizationDraft.d.ts +3315 -2091
  34. package/indexerCustomizationLadder.d.ts +2 -2
  35. package/indexerDependencyView.d.ts +108 -108
  36. package/indexerEffectiveArtifact.d.ts +1134 -0
  37. package/indexerEvidenceAdapterAuthorityMerge.d.ts +48 -0
  38. package/indexerEvidenceAdapterResult.d.ts +52 -52
  39. package/indexerExampleDecision.d.ts +128 -128
  40. package/indexerExampleIdentity.d.ts +6 -6
  41. package/indexerGeneratedAuthoringAudit.d.ts +18 -18
  42. package/indexerIncrementalImpact.d.ts +16 -16
  43. package/indexerInspectorWorksetProjection.d.ts +6 -0
  44. package/indexerInventoryDisposition.d.ts +70 -70
  45. package/indexerLayerComposition.d.ts +2139 -373
  46. package/indexerLayoutChange.d.ts +10 -10
  47. package/indexerLayoutProposalSet.d.ts +71 -66
  48. package/indexerLayoutResolver.d.ts +53 -48
  49. package/indexerLayoutTransition.d.ts +0 -50
  50. package/indexerLifecycle.d.ts +0 -13
  51. package/indexerMainLifecycle.d.ts +10 -0
  52. package/indexerMainRunLedger.d.ts +142 -11
  53. package/indexerMainRunProtocol.d.ts +1406 -785
  54. package/indexerMainWorkset.d.ts +460 -206
  55. package/indexerMaterialGapLedger.d.ts +13 -2904
  56. package/indexerOverlayQuestionAmendment.d.ts +491 -287
  57. package/indexerOverlayQuestionApplyProposal.d.ts +1022 -614
  58. package/indexerParserCapabilityCatalog.d.ts +136 -0
  59. package/indexerParserCoordinate.d.ts +16 -16
  60. package/indexerParserDependencyIntent.d.ts +22 -0
  61. package/indexerParserExecutionPlan.d.ts +388 -0
  62. package/indexerParserFactView.d.ts +42 -22
  63. package/indexerPartitionConvergence.d.ts +0 -3
  64. package/indexerPartitionInventory.d.ts +2 -0
  65. package/indexerPartitionPlan.d.ts +101 -99
  66. package/indexerPhysicalArtifactManifest.d.ts +8 -8
  67. package/indexerPostAuthorComposition.d.ts +116 -1156
  68. package/indexerPostAuthorRunLedger.d.ts +1434 -280
  69. package/indexerPrimaryProjection.d.ts +10 -10
  70. package/indexerPrimaryResultView.d.ts +435 -0
  71. package/indexerProfileContract.d.ts +181 -181
  72. package/indexerProgramExecutionAuthorization.d.ts +12 -12
  73. package/indexerProgramRunProtocol.d.ts +2141 -2749
  74. package/indexerProjectProposal.d.ts +496 -292
  75. package/indexerProjectedArtifactFanOutAudit.d.ts +0 -3
  76. package/indexerProtocolCommon.d.ts +4 -1
  77. package/indexerProvider.d.ts +134 -218
  78. package/indexerProviderComposition.d.ts +53 -53
  79. package/indexerProviderResolution.d.ts +12 -12
  80. package/indexerProviderResolutionAction.d.ts +14 -14
  81. package/indexerProviderRouting.d.ts +923 -515
  82. package/indexerProviderSelectionProposal.d.ts +893 -485
  83. package/indexerQuestionAuthority.d.ts +46 -47
  84. package/indexerReaderTargetInventory.d.ts +8 -8
  85. package/indexerRegistry.d.ts +765 -357
  86. package/indexerRequirementConfirmation.d.ts +98 -98
  87. package/indexerRequirementLifecycle.d.ts +224 -224
  88. package/indexerResultReconciliation.d.ts +204 -5919
  89. package/indexerResultReconciliationRun.d.ts +0 -1
  90. package/indexerRunEnvelope.d.ts +20 -20
  91. package/indexerSemanticInput.d.ts +5794 -0
  92. package/indexerStructuredDeclaration.d.ts +57 -53
  93. package/indexerSubjectCatalog.d.ts +14 -14
  94. package/indexerSubjectIdentity.d.ts +2 -2
  95. package/indexerSubjectKeyAuthority.d.ts +31 -30
  96. package/indexerTemplateRendering.d.ts +64 -64
  97. package/indexerToolSnapshot.d.ts +8 -8
  98. package/package.json +1 -1
  99. package/phases.d.ts +3 -183
  100. package/codeIndexPlan.d.ts +0 -158
  101. package/indexerAuditFacts.d.ts +0 -66
  102. package/indexerAuditOverrideReadiness.d.ts +0 -27
  103. package/indexerAuditProtocol.d.ts +0 -238
  104. package/indexerAuditRevision.d.ts +0 -726
  105. package/indexerAuditRevisionActions.d.ts +0 -236
  106. package/indexerMaterialAnswer.d.ts +0 -738
  107. package/indexerMaterialAnswerActualization.d.ts +0 -91
  108. package/indexerMaterialAnswerExecutionPlan.d.ts +0 -2887
  109. package/indexerMaterialAnswerFlow.d.ts +0 -63
  110. package/indexerMaterialAnswerLayout.d.ts +0 -76
  111. package/indexerMaterialAnswerReview.d.ts +0 -217
  112. package/indexerMaterialAnswerReviewRoute.d.ts +0 -6145
  113. package/indexerMaterialAnswerRunLedger.d.ts +0 -918
  114. package/indexerMaterialAnswerRunProtocol.d.ts +0 -1253
  115. package/indexerMaterialQuestionExclusion.d.ts +0 -129
  116. package/indexerMaterialQuestionWorkset.d.ts +0 -508
  117. package/indexerPlannedMaterialAnswer.d.ts +0 -116
  118. package/indexerProfileMetricAudit.d.ts +0 -218
  119. package/indexerWorksetRead.d.ts +0 -287
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ import { type IndexerEvidenceAdapterFact, type IndexerEvidenceAdapterFile } from "./indexerEvidenceAdapterResult.js";
2
3
  import type { IndexerJson } from "./indexerRegistry.js";
3
4
  declare const parserFactSchema: z.ZodObject<{
4
5
  fact_ref: z.ZodString;
@@ -34,9 +35,9 @@ declare const parserFactSchema: z.ZodObject<{
34
35
  qualified_item_path: string;
35
36
  signature_digest: string;
36
37
  };
38
+ fact_ref: string;
37
39
  payload: IndexerJson;
38
40
  payload_digest: string;
39
- fact_ref: string;
40
41
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
41
42
  }, {
42
43
  kind: string;
@@ -47,9 +48,9 @@ declare const parserFactSchema: z.ZodObject<{
47
48
  qualified_item_path: string;
48
49
  signature_digest: string;
49
50
  };
51
+ fact_ref: string;
50
52
  payload: IndexerJson;
51
53
  payload_digest: string;
52
- fact_ref: string;
53
54
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
54
55
  }>;
55
56
  declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
@@ -92,9 +93,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
92
93
  qualified_item_path: string;
93
94
  signature_digest: string;
94
95
  };
96
+ fact_ref: string;
95
97
  payload: IndexerJson;
96
98
  payload_digest: string;
97
- fact_ref: string;
98
99
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
99
100
  }, {
100
101
  kind: string;
@@ -105,9 +106,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
105
106
  qualified_item_path: string;
106
107
  signature_digest: string;
107
108
  };
109
+ fact_ref: string;
108
110
  payload: IndexerJson;
109
111
  payload_digest: string;
110
- fact_ref: string;
111
112
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
112
113
  }>, "many">;
113
114
  }, "strict", z.ZodTypeAny, {
@@ -121,9 +122,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
121
122
  qualified_item_path: string;
122
123
  signature_digest: string;
123
124
  };
125
+ fact_ref: string;
124
126
  payload: IndexerJson;
125
127
  payload_digest: string;
126
- fact_ref: string;
127
128
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
128
129
  }[];
129
130
  module_ref: string | null;
@@ -141,9 +142,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
141
142
  qualified_item_path: string;
142
143
  signature_digest: string;
143
144
  };
145
+ fact_ref: string;
144
146
  payload: IndexerJson;
145
147
  payload_digest: string;
146
- fact_ref: string;
147
148
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
148
149
  }[];
149
150
  module_ref: string | null;
@@ -161,9 +162,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
161
162
  qualified_item_path: string;
162
163
  signature_digest: string;
163
164
  };
165
+ fact_ref: string;
164
166
  payload: IndexerJson;
165
167
  payload_digest: string;
166
- fact_ref: string;
167
168
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
168
169
  }[];
169
170
  module_ref: string | null;
@@ -181,9 +182,9 @@ declare const parserFactFileSchema: z.ZodEffects<z.ZodObject<{
181
182
  qualified_item_path: string;
182
183
  signature_digest: string;
183
184
  };
185
+ fact_ref: string;
184
186
  payload: IndexerJson;
185
187
  payload_digest: string;
186
- fact_ref: string;
187
188
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
188
189
  }[];
189
190
  module_ref: string | null;
@@ -248,9 +249,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
248
249
  qualified_item_path: string;
249
250
  signature_digest: string;
250
251
  };
252
+ fact_ref: string;
251
253
  payload: IndexerJson;
252
254
  payload_digest: string;
253
- fact_ref: string;
254
255
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
255
256
  }, {
256
257
  kind: string;
@@ -261,9 +262,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
261
262
  qualified_item_path: string;
262
263
  signature_digest: string;
263
264
  };
265
+ fact_ref: string;
264
266
  payload: IndexerJson;
265
267
  payload_digest: string;
266
- fact_ref: string;
267
268
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
268
269
  }>, "many">;
269
270
  }, "strict", z.ZodTypeAny, {
@@ -277,9 +278,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
277
278
  qualified_item_path: string;
278
279
  signature_digest: string;
279
280
  };
281
+ fact_ref: string;
280
282
  payload: IndexerJson;
281
283
  payload_digest: string;
282
- fact_ref: string;
283
284
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
284
285
  }[];
285
286
  module_ref: string | null;
@@ -297,9 +298,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
297
298
  qualified_item_path: string;
298
299
  signature_digest: string;
299
300
  };
301
+ fact_ref: string;
300
302
  payload: IndexerJson;
301
303
  payload_digest: string;
302
- fact_ref: string;
303
304
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
304
305
  }[];
305
306
  module_ref: string | null;
@@ -317,9 +318,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
317
318
  qualified_item_path: string;
318
319
  signature_digest: string;
319
320
  };
321
+ fact_ref: string;
320
322
  payload: IndexerJson;
321
323
  payload_digest: string;
322
- fact_ref: string;
323
324
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
324
325
  }[];
325
326
  module_ref: string | null;
@@ -337,9 +338,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
337
338
  qualified_item_path: string;
338
339
  signature_digest: string;
339
340
  };
341
+ fact_ref: string;
340
342
  payload: IndexerJson;
341
343
  payload_digest: string;
342
- fact_ref: string;
343
344
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
344
345
  }[];
345
346
  module_ref: string | null;
@@ -350,7 +351,6 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
350
351
  fact_set_digest: z.ZodString;
351
352
  view_digest: z.ZodString;
352
353
  }, "strict", z.ZodTypeAny, {
353
- protocol: "context.indexer.parser-fact-view/v1";
354
354
  files: {
355
355
  source_ref: string;
356
356
  facts: {
@@ -362,9 +362,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
362
362
  qualified_item_path: string;
363
363
  signature_digest: string;
364
364
  };
365
+ fact_ref: string;
365
366
  payload: IndexerJson;
366
367
  payload_digest: string;
367
- fact_ref: string;
368
368
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
369
369
  }[];
370
370
  module_ref: string | null;
@@ -372,6 +372,7 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
372
372
  file_ref: string;
373
373
  disposition: "analyzed" | "unsupported" | "excluded";
374
374
  }[];
375
+ protocol: "context.indexer.parser-fact-view/v1";
375
376
  view_digest: string;
376
377
  authorized_scope: {
377
378
  source_ref: string;
@@ -382,7 +383,6 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
382
383
  origin_result_digests: string[];
383
384
  fact_set_digest: string;
384
385
  }, {
385
- protocol: "context.indexer.parser-fact-view/v1";
386
386
  files: {
387
387
  source_ref: string;
388
388
  facts: {
@@ -394,9 +394,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
394
394
  qualified_item_path: string;
395
395
  signature_digest: string;
396
396
  };
397
+ fact_ref: string;
397
398
  payload: IndexerJson;
398
399
  payload_digest: string;
399
- fact_ref: string;
400
400
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
401
401
  }[];
402
402
  module_ref: string | null;
@@ -404,6 +404,7 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
404
404
  file_ref: string;
405
405
  disposition: "analyzed" | "unsupported" | "excluded";
406
406
  }[];
407
+ protocol: "context.indexer.parser-fact-view/v1";
407
408
  view_digest: string;
408
409
  authorized_scope: {
409
410
  source_ref: string;
@@ -414,7 +415,6 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
414
415
  origin_result_digests: string[];
415
416
  fact_set_digest: string;
416
417
  }>, {
417
- protocol: "context.indexer.parser-fact-view/v1";
418
418
  files: {
419
419
  source_ref: string;
420
420
  facts: {
@@ -426,9 +426,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
426
426
  qualified_item_path: string;
427
427
  signature_digest: string;
428
428
  };
429
+ fact_ref: string;
429
430
  payload: IndexerJson;
430
431
  payload_digest: string;
431
- fact_ref: string;
432
432
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
433
433
  }[];
434
434
  module_ref: string | null;
@@ -436,6 +436,7 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
436
436
  file_ref: string;
437
437
  disposition: "analyzed" | "unsupported" | "excluded";
438
438
  }[];
439
+ protocol: "context.indexer.parser-fact-view/v1";
439
440
  view_digest: string;
440
441
  authorized_scope: {
441
442
  source_ref: string;
@@ -446,7 +447,6 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
446
447
  origin_result_digests: string[];
447
448
  fact_set_digest: string;
448
449
  }, {
449
- protocol: "context.indexer.parser-fact-view/v1";
450
450
  files: {
451
451
  source_ref: string;
452
452
  facts: {
@@ -458,9 +458,9 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
458
458
  qualified_item_path: string;
459
459
  signature_digest: string;
460
460
  };
461
+ fact_ref: string;
461
462
  payload: IndexerJson;
462
463
  payload_digest: string;
463
- fact_ref: string;
464
464
  denominator: "symbol" | "none" | "eligible-file" | "loc" | "protocol-item";
465
465
  }[];
466
466
  module_ref: string | null;
@@ -468,6 +468,7 @@ export declare const indexerParserFactViewSchema: z.ZodEffects<z.ZodObject<{
468
468
  file_ref: string;
469
469
  disposition: "analyzed" | "unsupported" | "excluded";
470
470
  }[];
471
+ protocol: "context.indexer.parser-fact-view/v1";
471
472
  view_digest: string;
472
473
  authorized_scope: {
473
474
  source_ref: string;
@@ -500,4 +501,23 @@ export declare function buildIndexerParserFactViewFromMaterializations(input: {
500
501
  inventory_digest: string;
501
502
  file_refs?: readonly string[];
502
503
  }): IndexerParserFactView;
504
+ export declare function buildIndexerMergedParserFactView(input: {
505
+ materializations: readonly {
506
+ result: unknown;
507
+ fact_payloads: readonly IndexerParserFactPayload[];
508
+ }[];
509
+ merged_facts: readonly (IndexerEvidenceAdapterFact & {
510
+ adapter_id: string;
511
+ authority_domain?: string;
512
+ capability?: string;
513
+ precedence?: number;
514
+ })[];
515
+ primary_owners: readonly {
516
+ source_ref: string;
517
+ module_ref: string | null;
518
+ normalized_path: string;
519
+ disposition: IndexerEvidenceAdapterFile["disposition"];
520
+ }[];
521
+ inventory_digest: string;
522
+ }): IndexerParserFactView;
503
523
  export {};
@@ -362,7 +362,6 @@ export declare const indexerPartitionConvergenceRecordSchema: z.ZodObject<{
362
362
  }>>;
363
363
  outcome: z.ZodEnum<["completed", "partial", "failed"]>;
364
364
  user_gate_required: z.ZodLiteral<false>;
365
- profile_revision_ledger_consumed: z.ZodLiteral<false>;
366
365
  convergence_digest: z.ZodString;
367
366
  }, "strict", z.ZodTypeAny, {
368
367
  decision: "accepted" | "retry-required" | "catalog-fallback-required" | "blocked-invalid-input";
@@ -415,7 +414,6 @@ export declare const indexerPartitionConvergenceRecordSchema: z.ZodObject<{
415
414
  } | null;
416
415
  outcome: "partial" | "failed" | "completed";
417
416
  user_gate_required: false;
418
- profile_revision_ledger_consumed: false;
419
417
  convergence_digest: string;
420
418
  }, {
421
419
  decision: "accepted" | "retry-required" | "catalog-fallback-required" | "blocked-invalid-input";
@@ -468,7 +466,6 @@ export declare const indexerPartitionConvergenceRecordSchema: z.ZodObject<{
468
466
  } | null;
469
467
  outcome: "partial" | "failed" | "completed";
470
468
  user_gate_required: false;
471
- profile_revision_ledger_consumed: false;
472
469
  convergence_digest: string;
473
470
  }>;
474
471
  export type IndexerPartitionConvergenceRecord = z.infer<typeof indexerPartitionConvergenceRecordSchema>;
@@ -0,0 +1,2 @@
1
+ import { type IndexerInventoryMember } from "./indexerInventoryDisposition.js";
2
+ export declare function buildIndexerPartitionInventoryFromParserFactView(value: unknown): IndexerInventoryMember[];