@c4a/context 0.7.0 → 0.7.4

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 (117) hide show
  1. package/README.md +65 -170
  2. package/README.zh-CN.md +52 -129
  3. package/docs/README.md +9 -10
  4. package/docs/README.zh-CN.md +6 -7
  5. package/docs/getting-started.md +73 -422
  6. package/docs/guides/agent-guide.md +94 -523
  7. package/docs/guides/code-indexer-skill-authoring.md +24 -13
  8. package/docs/guides/markdown-indexer-skill-authoring.md +14 -14
  9. package/docs/reference/code-extractors.md +29 -136
  10. package/docs/reference/indexer-provider-protocol.md +60 -138
  11. package/docs/reference/package-templates.md +2 -3
  12. package/docs/reference/project-api.md +52 -985
  13. package/index.d.ts +12 -10
  14. package/index.js +12749 -15335
  15. package/indexerAgentStepProtocol.d.ts +1366 -7649
  16. package/indexerArtifact.d.ts +225 -0
  17. package/indexerArtifactDependencies.d.ts +41 -39
  18. package/indexerArtifactResult.d.ts +221 -255
  19. package/indexerAuthorizedWorksetView.d.ts +368 -0
  20. package/indexerBaseQuestionAmendment.d.ts +484 -280
  21. package/indexerBenchmark.d.ts +16 -16
  22. package/indexerCandidateCompile.d.ts +206 -16
  23. package/indexerCapabilityGroupEvidence.d.ts +6 -6
  24. package/indexerCatalogFallback.d.ts +122 -128
  25. package/indexerCollectionMapping.d.ts +13 -13
  26. package/indexerContentLayers.d.ts +8 -8
  27. package/{indexerOverlayTrust.d.ts → indexerContractOverlay.d.ts} +23 -569
  28. package/indexerControlledInvocation.d.ts +12 -12
  29. package/indexerControlledProgram.d.ts +2467 -2797
  30. package/indexerCoreExports.d.ts +6 -6
  31. package/indexerCustomizationDraft.d.ts +3315 -2091
  32. package/indexerCustomizationLadder.d.ts +2 -2
  33. package/indexerDependencyView.d.ts +108 -108
  34. package/indexerEffectiveArtifact.d.ts +1134 -0
  35. package/indexerEvidenceAdapterAuthorityMerge.d.ts +48 -0
  36. package/indexerEvidenceAdapterResult.d.ts +52 -52
  37. package/indexerExampleDecision.d.ts +128 -128
  38. package/indexerExampleIdentity.d.ts +6 -6
  39. package/indexerGeneratedAuthoringAudit.d.ts +18 -18
  40. package/indexerIncrementalImpact.d.ts +16 -16
  41. package/indexerInspectorWorksetProjection.d.ts +6 -0
  42. package/indexerInventoryDisposition.d.ts +70 -70
  43. package/indexerLayerComposition.d.ts +2139 -373
  44. package/indexerLayoutChange.d.ts +10 -10
  45. package/indexerLayoutProposalSet.d.ts +71 -66
  46. package/indexerLayoutResolver.d.ts +53 -48
  47. package/indexerLayoutTransition.d.ts +0 -50
  48. package/indexerLifecycle.d.ts +0 -13
  49. package/indexerMainLifecycle.d.ts +10 -0
  50. package/indexerMainRunLedger.d.ts +138 -11
  51. package/indexerMainRunProtocol.d.ts +1406 -785
  52. package/indexerMainWorkset.d.ts +460 -206
  53. package/indexerMaterialGapLedger.d.ts +13 -2904
  54. package/indexerOverlayQuestionAmendment.d.ts +497 -293
  55. package/indexerOverlayQuestionApplyProposal.d.ts +1030 -622
  56. package/indexerParserCapabilityCatalog.d.ts +136 -0
  57. package/indexerParserCoordinate.d.ts +16 -16
  58. package/indexerParserDependencyIntent.d.ts +22 -0
  59. package/indexerParserExecutionPlan.d.ts +388 -0
  60. package/indexerParserFactView.d.ts +42 -22
  61. package/indexerPartitionConvergence.d.ts +0 -3
  62. package/indexerPartitionInventory.d.ts +2 -0
  63. package/indexerPartitionPlan.d.ts +101 -99
  64. package/indexerPhysicalArtifactManifest.d.ts +8 -8
  65. package/indexerPostAuthorComposition.d.ts +116 -1156
  66. package/indexerPostAuthorRunLedger.d.ts +1434 -280
  67. package/indexerPrimaryProjection.d.ts +10 -10
  68. package/indexerPrimaryResultView.d.ts +435 -0
  69. package/indexerProfileContract.d.ts +181 -181
  70. package/indexerProgramExecutionAuthorization.d.ts +12 -12
  71. package/indexerProgramRunProtocol.d.ts +2141 -2749
  72. package/indexerProjectProposal.d.ts +496 -292
  73. package/indexerProjectedArtifactFanOutAudit.d.ts +0 -3
  74. package/indexerProtocolCommon.d.ts +4 -1
  75. package/indexerProvider.d.ts +134 -281
  76. package/indexerProviderComposition.d.ts +53 -53
  77. package/indexerProviderResolution.d.ts +12 -12
  78. package/indexerProviderResolutionAction.d.ts +14 -14
  79. package/indexerProviderRouting.d.ts +923 -515
  80. package/indexerProviderSelectionProposal.d.ts +893 -485
  81. package/indexerQuestionAuthority.d.ts +46 -47
  82. package/indexerReaderTargetInventory.d.ts +8 -8
  83. package/indexerRegistry.d.ts +765 -357
  84. package/indexerRequirementConfirmation.d.ts +98 -98
  85. package/indexerRequirementLifecycle.d.ts +224 -224
  86. package/indexerResultReconciliation.d.ts +204 -5919
  87. package/indexerResultReconciliationRun.d.ts +0 -1
  88. package/indexerRunEnvelope.d.ts +20 -20
  89. package/indexerSemanticInput.d.ts +3678 -0
  90. package/indexerStructuredDeclaration.d.ts +57 -53
  91. package/indexerSubjectCatalog.d.ts +14 -14
  92. package/indexerSubjectIdentity.d.ts +2 -2
  93. package/indexerSubjectKeyAuthority.d.ts +31 -30
  94. package/indexerTemplateRendering.d.ts +64 -64
  95. package/indexerToolSnapshot.d.ts +8 -8
  96. package/package.json +1 -1
  97. package/phases.d.ts +3 -183
  98. package/codeIndexPlan.d.ts +0 -158
  99. package/indexerAuditFacts.d.ts +0 -66
  100. package/indexerAuditOverrideReadiness.d.ts +0 -27
  101. package/indexerAuditProtocol.d.ts +0 -238
  102. package/indexerAuditRevision.d.ts +0 -726
  103. package/indexerAuditRevisionActions.d.ts +0 -236
  104. package/indexerMaterialAnswer.d.ts +0 -738
  105. package/indexerMaterialAnswerActualization.d.ts +0 -91
  106. package/indexerMaterialAnswerExecutionPlan.d.ts +0 -2887
  107. package/indexerMaterialAnswerFlow.d.ts +0 -63
  108. package/indexerMaterialAnswerLayout.d.ts +0 -76
  109. package/indexerMaterialAnswerReview.d.ts +0 -217
  110. package/indexerMaterialAnswerReviewRoute.d.ts +0 -6145
  111. package/indexerMaterialAnswerRunLedger.d.ts +0 -918
  112. package/indexerMaterialAnswerRunProtocol.d.ts +0 -1253
  113. package/indexerMaterialQuestionExclusion.d.ts +0 -129
  114. package/indexerMaterialQuestionWorkset.d.ts +0 -508
  115. package/indexerPlannedMaterialAnswer.d.ts +0 -116
  116. package/indexerProfileMetricAudit.d.ts +0 -218
  117. 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[];