@c4a/context 0.7.5 → 0.7.9

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 (98) hide show
  1. package/README.md +12 -4
  2. package/README.zh-CN.md +11 -4
  3. package/docs/README.md +13 -1
  4. package/docs/README.zh-CN.md +13 -1
  5. package/docs/getting-started.md +95 -69
  6. package/docs/guides/agent-dialogue.md +20 -9
  7. package/docs/guides/agent-guide.md +48 -10
  8. package/docs/guides/code-indexer-skill-authoring.md +42 -11
  9. package/docs/guides/indexer-manifest-example.md +103 -0
  10. package/docs/guides/indexer-provider-and-customization.md +334 -15
  11. package/docs/guides/indexer-skill-creation.md +99 -0
  12. package/docs/guides/knowledge-updates.md +422 -0
  13. package/docs/guides/lark-resources.md +5 -1
  14. package/docs/guides/markdown-indexer-skill-authoring.md +16 -7
  15. package/docs/guides/note.md +37 -0
  16. package/docs/guides/package-outputs.md +231 -60
  17. package/docs/guides/sessions.md +50 -0
  18. package/docs/guides/workspace-commit.md +45 -0
  19. package/docs/guides/workspace-prepare.md +72 -0
  20. package/docs/guides/workspace-restore.md +59 -0
  21. package/docs/reference/code-extractors.md +23 -11
  22. package/docs/reference/indexer-provider-protocol.md +135 -22
  23. package/docs/reference/package-templates.md +10 -9
  24. package/docs/reference/project-api.md +100 -13
  25. package/docs/reference/template-variables.md +7 -7
  26. package/index.d.ts +15 -0
  27. package/index.js +1708 -626
  28. package/indexerAgentStepProtocol.d.ts +44 -0
  29. package/indexerApprovedKnowledge.d.ts +371 -0
  30. package/indexerArticlePlan.d.ts +83 -0
  31. package/indexerArtifact.d.ts +10 -7
  32. package/indexerArtifactDependencies.d.ts +5 -5
  33. package/indexerArtifactPolicy.d.ts +12 -12
  34. package/indexerArtifactResult.d.ts +76 -69
  35. package/indexerAuthoringFixture.d.ts +8 -8
  36. package/indexerAuthorizedWorksetView.d.ts +14 -14
  37. package/indexerBaseQuestionAmendment.d.ts +40 -0
  38. package/indexerCandidateCompile.d.ts +46 -36
  39. package/indexerCatalogFallback.d.ts +566 -48
  40. package/indexerContentLayers.d.ts +6 -4
  41. package/indexerContractDeclaration.d.ts +3 -0
  42. package/indexerControlledProgram.d.ts +1039 -238
  43. package/indexerCustomizationDraft.d.ts +188 -0
  44. package/indexerDependencyView.d.ts +17 -17
  45. package/indexerEffectiveArtifact.d.ts +26 -15
  46. package/indexerExampleFactDependencies.d.ts +17 -0
  47. package/indexerExampleIdentityAudit.d.ts +2 -2
  48. package/indexerInventoryDisposition.d.ts +44 -44
  49. package/indexerKnowledgeDependency.d.ts +46 -0
  50. package/indexerLayerComposition.d.ts +92 -54
  51. package/indexerLayoutChange.d.ts +8 -8
  52. package/indexerLayoutProposalSet.d.ts +15 -10
  53. package/indexerLayoutResolver.d.ts +15 -6
  54. package/indexerLayoutTransition.d.ts +8 -8
  55. package/indexerLifecycle.d.ts +1 -1
  56. package/indexerMainRunLedger.d.ts +3 -0
  57. package/indexerMainRunProtocol.d.ts +872 -196
  58. package/indexerMainWorkset.d.ts +50 -0
  59. package/indexerNavigationArtifactPlan.d.ts +2 -2
  60. package/indexerOverlayQuestionAmendment.d.ts +56 -16
  61. package/indexerOverlayQuestionApplyProposal.d.ts +98 -26
  62. package/indexerPartitionPlan.d.ts +585 -40
  63. package/indexerPhysicalArtifactAudit.d.ts +2 -2
  64. package/indexerPhysicalArtifactManifest.d.ts +24 -24
  65. package/indexerPostAuthorRunLedger.d.ts +60 -34
  66. package/indexerPrimaryProjection.d.ts +2 -2
  67. package/indexerProfileContract.d.ts +28 -28
  68. package/indexerProgramRunProtocol.d.ts +868 -194
  69. package/indexerProjectProposal.d.ts +36 -8
  70. package/indexerProjectedArtifactFanOutAudit.d.ts +2 -2
  71. package/indexerProtocolHash.d.ts +2 -0
  72. package/indexerProvider.d.ts +102 -58
  73. package/indexerProviderComposition.d.ts +4 -4
  74. package/indexerProviderRouting.d.ts +52 -0
  75. package/indexerProviderSelectionProposal.d.ts +48 -0
  76. package/indexerPublicContractFacts.d.ts +7 -0
  77. package/indexerPublicContractTable.d.ts +11 -0
  78. package/indexerReaderTargetInventory.d.ts +6 -6
  79. package/indexerReferenceOnlyAudit.d.ts +2 -2
  80. package/indexerRegistry.d.ts +658 -0
  81. package/indexerRequirementConfirmation.d.ts +48 -16
  82. package/indexerRequirementLifecycle.d.ts +154 -42
  83. package/indexerResultReconciliation.d.ts +12 -11
  84. package/indexerSemanticInput.d.ts +27168 -3813
  85. package/{indexerGeneratedAuthoringAudit.d.ts → indexerStructuredClaims.d.ts} +0 -84
  86. package/indexerStructuredDeclaration.d.ts +8 -8
  87. package/indexerTemplateRendering.d.ts +7 -7
  88. package/indexerToolSnapshot.d.ts +16 -16
  89. package/knowledgeMap.d.ts +188 -0
  90. package/managedSources.d.ts +15 -0
  91. package/package.json +1 -1
  92. package/packageSite.d.ts +25 -0
  93. package/phases.d.ts +0 -3
  94. package/processedScopes.d.ts +75 -0
  95. package/sessionMetadata.d.ts +49 -0
  96. package/sources.d.ts +9 -3
  97. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +15 -10
  98. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +8 -8
@@ -6,6 +6,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
6
6
  project_ref: z.ZodString;
7
7
  old_requirement: z.ZodEffects<z.ZodObject<{
8
8
  id: z.ZodEffects<z.ZodString, string, string>;
9
+ purpose: z.ZodOptional<z.ZodString>;
9
10
  reader_goals: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
10
11
  coverage_domains: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["required", "optional", "out-of-scope"]>>;
11
12
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -161,6 +162,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
161
162
  }[];
162
163
  }>;
163
164
  reason: z.ZodString;
165
+ paths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
164
166
  }, "strict", z.ZodTypeAny, {
165
167
  id: string;
166
168
  scope: {
@@ -170,6 +172,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
170
172
  }[];
171
173
  };
172
174
  reason: string;
175
+ paths?: string[] | undefined;
173
176
  }, {
174
177
  id: string;
175
178
  scope: {
@@ -179,6 +182,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
179
182
  }[];
180
183
  };
181
184
  reason: string;
185
+ paths?: string[] | undefined;
182
186
  }>, "many">>;
183
187
  }, "strict", z.ZodTypeAny, {
184
188
  id: string;
@@ -196,6 +200,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
196
200
  module_refs: string[];
197
201
  }[];
198
202
  };
203
+ purpose?: string | undefined;
199
204
  questions?: {
200
205
  ref: string;
201
206
  authority: {
@@ -215,6 +220,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
215
220
  }[];
216
221
  };
217
222
  reason: string;
223
+ paths?: string[] | undefined;
218
224
  }[] | undefined;
219
225
  }, {
220
226
  id: string;
@@ -232,6 +238,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
232
238
  module_refs?: string[] | undefined;
233
239
  }[];
234
240
  };
241
+ purpose?: string | undefined;
235
242
  questions?: {
236
243
  ref: string;
237
244
  authority: {
@@ -251,6 +258,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
251
258
  }[];
252
259
  };
253
260
  reason: string;
261
+ paths?: string[] | undefined;
254
262
  }[] | undefined;
255
263
  }>, {
256
264
  id: string;
@@ -268,6 +276,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
268
276
  module_refs: string[];
269
277
  }[];
270
278
  };
279
+ purpose?: string | undefined;
271
280
  questions?: {
272
281
  ref: string;
273
282
  authority: {
@@ -287,6 +296,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
287
296
  }[];
288
297
  };
289
298
  reason: string;
299
+ paths?: string[] | undefined;
290
300
  }[] | undefined;
291
301
  }, {
292
302
  id: string;
@@ -304,6 +314,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
304
314
  module_refs?: string[] | undefined;
305
315
  }[];
306
316
  };
317
+ purpose?: string | undefined;
307
318
  questions?: {
308
319
  ref: string;
309
320
  authority: {
@@ -323,10 +334,12 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
323
334
  }[];
324
335
  };
325
336
  reason: string;
337
+ paths?: string[] | undefined;
326
338
  }[] | undefined;
327
339
  }>;
328
340
  new_requirement: z.ZodEffects<z.ZodObject<{
329
341
  id: z.ZodEffects<z.ZodString, string, string>;
342
+ purpose: z.ZodOptional<z.ZodString>;
330
343
  reader_goals: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
331
344
  coverage_domains: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["required", "optional", "out-of-scope"]>>;
332
345
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -482,6 +495,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
482
495
  }[];
483
496
  }>;
484
497
  reason: z.ZodString;
498
+ paths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
485
499
  }, "strict", z.ZodTypeAny, {
486
500
  id: string;
487
501
  scope: {
@@ -491,6 +505,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
491
505
  }[];
492
506
  };
493
507
  reason: string;
508
+ paths?: string[] | undefined;
494
509
  }, {
495
510
  id: string;
496
511
  scope: {
@@ -500,6 +515,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
500
515
  }[];
501
516
  };
502
517
  reason: string;
518
+ paths?: string[] | undefined;
503
519
  }>, "many">>;
504
520
  }, "strict", z.ZodTypeAny, {
505
521
  id: string;
@@ -517,6 +533,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
517
533
  module_refs: string[];
518
534
  }[];
519
535
  };
536
+ purpose?: string | undefined;
520
537
  questions?: {
521
538
  ref: string;
522
539
  authority: {
@@ -536,6 +553,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
536
553
  }[];
537
554
  };
538
555
  reason: string;
556
+ paths?: string[] | undefined;
539
557
  }[] | undefined;
540
558
  }, {
541
559
  id: string;
@@ -553,6 +571,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
553
571
  module_refs?: string[] | undefined;
554
572
  }[];
555
573
  };
574
+ purpose?: string | undefined;
556
575
  questions?: {
557
576
  ref: string;
558
577
  authority: {
@@ -572,6 +591,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
572
591
  }[];
573
592
  };
574
593
  reason: string;
594
+ paths?: string[] | undefined;
575
595
  }[] | undefined;
576
596
  }>, {
577
597
  id: string;
@@ -589,6 +609,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
589
609
  module_refs: string[];
590
610
  }[];
591
611
  };
612
+ purpose?: string | undefined;
592
613
  questions?: {
593
614
  ref: string;
594
615
  authority: {
@@ -608,6 +629,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
608
629
  }[];
609
630
  };
610
631
  reason: string;
632
+ paths?: string[] | undefined;
611
633
  }[] | undefined;
612
634
  }, {
613
635
  id: string;
@@ -625,6 +647,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
625
647
  module_refs?: string[] | undefined;
626
648
  }[];
627
649
  };
650
+ purpose?: string | undefined;
628
651
  questions?: {
629
652
  ref: string;
630
653
  authority: {
@@ -644,6 +667,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
644
667
  }[];
645
668
  };
646
669
  reason: string;
670
+ paths?: string[] | undefined;
647
671
  }[] | undefined;
648
672
  }>;
649
673
  old_requirement_digest: z.ZodString;
@@ -847,29 +871,29 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
847
871
  detail: string;
848
872
  }>, "many">;
849
873
  }, "strict", z.ZodTypeAny, {
850
- protocol: "context.indexer.requirement-contraction-comparison/v1";
851
- requirementRef: string;
852
- evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
853
- relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
854
- requiresHumanConfirmation: boolean;
855
874
  changes: {
856
875
  path: string;
857
876
  area: "exclusions" | "target-scope" | "reader-goals" | "coverage-domain" | "question" | "question-semantic" | "question-selector" | "question-domain" | "question-evidence";
858
877
  relation: "strengthening" | "contraction" | "incomparable";
859
878
  detail: string;
860
879
  }[];
861
- }, {
862
880
  protocol: "context.indexer.requirement-contraction-comparison/v1";
863
881
  requirementRef: string;
864
882
  evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
865
883
  relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
866
884
  requiresHumanConfirmation: boolean;
885
+ }, {
867
886
  changes: {
868
887
  path: string;
869
888
  area: "exclusions" | "target-scope" | "reader-goals" | "coverage-domain" | "question" | "question-semantic" | "question-selector" | "question-domain" | "question-evidence";
870
889
  relation: "strengthening" | "contraction" | "incomparable";
871
890
  detail: string;
872
891
  }[];
892
+ protocol: "context.indexer.requirement-contraction-comparison/v1";
893
+ requirementRef: string;
894
+ evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
895
+ relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
896
+ requiresHumanConfirmation: boolean;
873
897
  }>;
874
898
  comparison_digest: z.ZodString;
875
899
  report_digest: z.ZodString;
@@ -893,6 +917,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
893
917
  module_refs: string[];
894
918
  }[];
895
919
  };
920
+ purpose?: string | undefined;
896
921
  questions?: {
897
922
  ref: string;
898
923
  authority: {
@@ -912,6 +937,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
912
937
  }[];
913
938
  };
914
939
  reason: string;
940
+ paths?: string[] | undefined;
915
941
  }[] | undefined;
916
942
  };
917
943
  new_requirement: {
@@ -930,6 +956,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
930
956
  module_refs: string[];
931
957
  }[];
932
958
  };
959
+ purpose?: string | undefined;
933
960
  questions?: {
934
961
  ref: string;
935
962
  authority: {
@@ -949,6 +976,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
949
976
  }[];
950
977
  };
951
978
  reason: string;
979
+ paths?: string[] | undefined;
952
980
  }[] | undefined;
953
981
  };
954
982
  old_requirement_digest: string;
@@ -988,17 +1016,17 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
988
1016
  selectorRelations: Record<string, "equivalent" | "strengthening" | "contraction" | "incomparable">;
989
1017
  };
990
1018
  comparison: {
991
- protocol: "context.indexer.requirement-contraction-comparison/v1";
992
- requirementRef: string;
993
- evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
994
- relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
995
- requiresHumanConfirmation: boolean;
996
1019
  changes: {
997
1020
  path: string;
998
1021
  area: "exclusions" | "target-scope" | "reader-goals" | "coverage-domain" | "question" | "question-semantic" | "question-selector" | "question-domain" | "question-evidence";
999
1022
  relation: "strengthening" | "contraction" | "incomparable";
1000
1023
  detail: string;
1001
1024
  }[];
1025
+ protocol: "context.indexer.requirement-contraction-comparison/v1";
1026
+ requirementRef: string;
1027
+ evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
1028
+ relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
1029
+ requiresHumanConfirmation: boolean;
1002
1030
  };
1003
1031
  comparison_digest: string;
1004
1032
  }, {
@@ -1021,6 +1049,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
1021
1049
  module_refs?: string[] | undefined;
1022
1050
  }[];
1023
1051
  };
1052
+ purpose?: string | undefined;
1024
1053
  questions?: {
1025
1054
  ref: string;
1026
1055
  authority: {
@@ -1040,6 +1069,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
1040
1069
  }[];
1041
1070
  };
1042
1071
  reason: string;
1072
+ paths?: string[] | undefined;
1043
1073
  }[] | undefined;
1044
1074
  };
1045
1075
  new_requirement: {
@@ -1058,6 +1088,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
1058
1088
  module_refs?: string[] | undefined;
1059
1089
  }[];
1060
1090
  };
1091
+ purpose?: string | undefined;
1061
1092
  questions?: {
1062
1093
  ref: string;
1063
1094
  authority: {
@@ -1077,6 +1108,7 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
1077
1108
  }[];
1078
1109
  };
1079
1110
  reason: string;
1111
+ paths?: string[] | undefined;
1080
1112
  }[] | undefined;
1081
1113
  };
1082
1114
  old_requirement_digest: string;
@@ -1116,17 +1148,17 @@ export declare const indexerRequirementChangeReportSchema: z.ZodObject<{
1116
1148
  selectorRelations: Record<string, "equivalent" | "strengthening" | "contraction" | "incomparable">;
1117
1149
  };
1118
1150
  comparison: {
1119
- protocol: "context.indexer.requirement-contraction-comparison/v1";
1120
- requirementRef: string;
1121
- evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
1122
- relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
1123
- requiresHumanConfirmation: boolean;
1124
1151
  changes: {
1125
1152
  path: string;
1126
1153
  area: "exclusions" | "target-scope" | "reader-goals" | "coverage-domain" | "question" | "question-semantic" | "question-selector" | "question-domain" | "question-evidence";
1127
1154
  relation: "strengthening" | "contraction" | "incomparable";
1128
1155
  detail: string;
1129
1156
  }[];
1157
+ protocol: "context.indexer.requirement-contraction-comparison/v1";
1158
+ requirementRef: string;
1159
+ evidenceSourceChange: "unchanged" | "expanded" | "reduced" | "changed";
1160
+ relation: "equivalent" | "strengthening" | "contraction" | "incomparable";
1161
+ requiresHumanConfirmation: boolean;
1130
1162
  };
1131
1163
  comparison_digest: string;
1132
1164
  }>;