@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
@@ -428,6 +428,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
428
428
  protocol: z.ZodLiteral<"context.indexer.registry/v1">;
429
429
  requirements: z.ZodArray<z.ZodEffects<z.ZodObject<{
430
430
  id: z.ZodEffects<z.ZodString, string, string>;
431
+ purpose: z.ZodOptional<z.ZodString>;
431
432
  reader_goals: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
432
433
  coverage_domains: z.ZodRecord<z.ZodEffects<z.ZodString, string, string>, z.ZodEnum<["required", "optional", "out-of-scope"]>>;
433
434
  questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
@@ -583,6 +584,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
583
584
  }[];
584
585
  }>;
585
586
  reason: z.ZodString;
587
+ paths: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
586
588
  }, "strict", z.ZodTypeAny, {
587
589
  id: string;
588
590
  scope: {
@@ -592,6 +594,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
592
594
  }[];
593
595
  };
594
596
  reason: string;
597
+ paths?: string[] | undefined;
595
598
  }, {
596
599
  id: string;
597
600
  scope: {
@@ -601,6 +604,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
601
604
  }[];
602
605
  };
603
606
  reason: string;
607
+ paths?: string[] | undefined;
604
608
  }>, "many">>;
605
609
  }, "strict", z.ZodTypeAny, {
606
610
  id: string;
@@ -618,6 +622,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
618
622
  module_refs: string[];
619
623
  }[];
620
624
  };
625
+ purpose?: string | undefined;
621
626
  questions?: {
622
627
  ref: string;
623
628
  authority: {
@@ -637,6 +642,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
637
642
  }[];
638
643
  };
639
644
  reason: string;
645
+ paths?: string[] | undefined;
640
646
  }[] | undefined;
641
647
  }, {
642
648
  id: string;
@@ -654,6 +660,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
654
660
  module_refs?: string[] | undefined;
655
661
  }[];
656
662
  };
663
+ purpose?: string | undefined;
657
664
  questions?: {
658
665
  ref: string;
659
666
  authority: {
@@ -673,6 +680,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
673
680
  }[];
674
681
  };
675
682
  reason: string;
683
+ paths?: string[] | undefined;
676
684
  }[] | undefined;
677
685
  }>, {
678
686
  id: string;
@@ -690,6 +698,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
690
698
  module_refs: string[];
691
699
  }[];
692
700
  };
701
+ purpose?: string | undefined;
693
702
  questions?: {
694
703
  ref: string;
695
704
  authority: {
@@ -709,6 +718,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
709
718
  }[];
710
719
  };
711
720
  reason: string;
721
+ paths?: string[] | undefined;
712
722
  }[] | undefined;
713
723
  }, {
714
724
  id: string;
@@ -726,6 +736,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
726
736
  module_refs?: string[] | undefined;
727
737
  }[];
728
738
  };
739
+ purpose?: string | undefined;
729
740
  questions?: {
730
741
  ref: string;
731
742
  authority: {
@@ -745,6 +756,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
745
756
  }[];
746
757
  };
747
758
  reason: string;
759
+ paths?: string[] | undefined;
748
760
  }[] | undefined;
749
761
  }>, "many">;
750
762
  indexers: z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
@@ -1638,6 +1650,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1638
1650
  module_refs: string[];
1639
1651
  }[];
1640
1652
  };
1653
+ purpose?: string | undefined;
1641
1654
  questions?: {
1642
1655
  ref: string;
1643
1656
  authority: {
@@ -1657,6 +1670,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1657
1670
  }[];
1658
1671
  };
1659
1672
  reason: string;
1673
+ paths?: string[] | undefined;
1660
1674
  }[] | undefined;
1661
1675
  }[];
1662
1676
  indexers: {
@@ -1745,6 +1759,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1745
1759
  module_refs?: string[] | undefined;
1746
1760
  }[];
1747
1761
  };
1762
+ purpose?: string | undefined;
1748
1763
  questions?: {
1749
1764
  ref: string;
1750
1765
  authority: {
@@ -1764,6 +1779,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1764
1779
  }[];
1765
1780
  };
1766
1781
  reason: string;
1782
+ paths?: string[] | undefined;
1767
1783
  }[] | undefined;
1768
1784
  }[];
1769
1785
  indexers: {
@@ -1852,6 +1868,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1852
1868
  module_refs: string[];
1853
1869
  }[];
1854
1870
  };
1871
+ purpose?: string | undefined;
1855
1872
  questions?: {
1856
1873
  ref: string;
1857
1874
  authority: {
@@ -1871,6 +1888,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1871
1888
  }[];
1872
1889
  };
1873
1890
  reason: string;
1891
+ paths?: string[] | undefined;
1874
1892
  }[] | undefined;
1875
1893
  }[];
1876
1894
  indexers: {
@@ -1959,6 +1977,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1959
1977
  module_refs?: string[] | undefined;
1960
1978
  }[];
1961
1979
  };
1980
+ purpose?: string | undefined;
1962
1981
  questions?: {
1963
1982
  ref: string;
1964
1983
  authority: {
@@ -1978,6 +1997,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
1978
1997
  }[];
1979
1998
  };
1980
1999
  reason: string;
2000
+ paths?: string[] | undefined;
1981
2001
  }[] | undefined;
1982
2002
  }[];
1983
2003
  indexers: {
@@ -2057,25 +2077,25 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2057
2077
  content: z.ZodOptional<z.ZodString>;
2058
2078
  }, "strict", z.ZodTypeAny, {
2059
2079
  path: string;
2060
- operation: "write" | "delete";
2080
+ operation: "delete" | "write";
2061
2081
  base_digest: string | null;
2062
2082
  target_digest: string | null;
2063
2083
  content?: string | undefined;
2064
2084
  }, {
2065
2085
  path: string;
2066
- operation: "write" | "delete";
2086
+ operation: "delete" | "write";
2067
2087
  base_digest: string | null;
2068
2088
  target_digest: string | null;
2069
2089
  content?: string | undefined;
2070
2090
  }>, {
2071
2091
  path: string;
2072
- operation: "write" | "delete";
2092
+ operation: "delete" | "write";
2073
2093
  base_digest: string | null;
2074
2094
  target_digest: string | null;
2075
2095
  content?: string | undefined;
2076
2096
  }, {
2077
2097
  path: string;
2078
- operation: "write" | "delete";
2098
+ operation: "delete" | "write";
2079
2099
  base_digest: string | null;
2080
2100
  target_digest: string | null;
2081
2101
  content?: string | undefined;
@@ -2330,7 +2350,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2330
2350
  }, "strict", z.ZodTypeAny, {
2331
2351
  targets: {
2332
2352
  path: string;
2333
- operation: "write" | "delete";
2353
+ operation: "delete" | "write";
2334
2354
  base_digest: string | null;
2335
2355
  target_digest: string | null;
2336
2356
  content?: string | undefined;
@@ -2398,6 +2418,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2398
2418
  module_refs: string[];
2399
2419
  }[];
2400
2420
  };
2421
+ purpose?: string | undefined;
2401
2422
  questions?: {
2402
2423
  ref: string;
2403
2424
  authority: {
@@ -2417,6 +2438,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2417
2438
  }[];
2418
2439
  };
2419
2440
  reason: string;
2441
+ paths?: string[] | undefined;
2420
2442
  }[] | undefined;
2421
2443
  }[];
2422
2444
  indexers: {
@@ -2495,7 +2517,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2495
2517
  }, {
2496
2518
  targets: {
2497
2519
  path: string;
2498
- operation: "write" | "delete";
2520
+ operation: "delete" | "write";
2499
2521
  base_digest: string | null;
2500
2522
  target_digest: string | null;
2501
2523
  content?: string | undefined;
@@ -2563,6 +2585,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2563
2585
  module_refs?: string[] | undefined;
2564
2586
  }[];
2565
2587
  };
2588
+ purpose?: string | undefined;
2566
2589
  questions?: {
2567
2590
  ref: string;
2568
2591
  authority: {
@@ -2582,6 +2605,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2582
2605
  }[];
2583
2606
  };
2584
2607
  reason: string;
2608
+ paths?: string[] | undefined;
2585
2609
  }[] | undefined;
2586
2610
  }[];
2587
2611
  indexers: {
@@ -2660,7 +2684,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2660
2684
  }>, {
2661
2685
  targets: {
2662
2686
  path: string;
2663
- operation: "write" | "delete";
2687
+ operation: "delete" | "write";
2664
2688
  base_digest: string | null;
2665
2689
  target_digest: string | null;
2666
2690
  content?: string | undefined;
@@ -2728,6 +2752,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2728
2752
  module_refs: string[];
2729
2753
  }[];
2730
2754
  };
2755
+ purpose?: string | undefined;
2731
2756
  questions?: {
2732
2757
  ref: string;
2733
2758
  authority: {
@@ -2747,6 +2772,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2747
2772
  }[];
2748
2773
  };
2749
2774
  reason: string;
2775
+ paths?: string[] | undefined;
2750
2776
  }[] | undefined;
2751
2777
  }[];
2752
2778
  indexers: {
@@ -2825,7 +2851,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2825
2851
  }, {
2826
2852
  targets: {
2827
2853
  path: string;
2828
- operation: "write" | "delete";
2854
+ operation: "delete" | "write";
2829
2855
  base_digest: string | null;
2830
2856
  target_digest: string | null;
2831
2857
  content?: string | undefined;
@@ -2893,6 +2919,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2893
2919
  module_refs?: string[] | undefined;
2894
2920
  }[];
2895
2921
  };
2922
+ purpose?: string | undefined;
2896
2923
  questions?: {
2897
2924
  ref: string;
2898
2925
  authority: {
@@ -2912,6 +2939,7 @@ export declare const indexerProjectProposalSchema: z.ZodEffects<z.ZodObject<{
2912
2939
  }[];
2913
2940
  };
2914
2941
  reason: string;
2942
+ paths?: string[] | undefined;
2915
2943
  }[] | undefined;
2916
2944
  }[];
2917
2945
  indexers: {
@@ -77,7 +77,6 @@ export declare const indexerProjectedArtifactFanOutAuditSchema: z.ZodObject<{
77
77
  revision_above: 300;
78
78
  };
79
79
  state: "warning" | "ready" | "plan-revision-required";
80
- audit_digest: string;
81
80
  partition_plan_hash: string;
82
81
  outcome: "projected-artifact-fan-out-current" | "indexer-plan-revision-required";
83
82
  user_gate_required: false;
@@ -87,6 +86,7 @@ export declare const indexerProjectedArtifactFanOutAuditSchema: z.ZodObject<{
87
86
  legally_assigned_artifact_count: number;
88
87
  unassigned_projected_artifact_count: number;
89
88
  };
89
+ audit_digest: string;
90
90
  projected_artifact_plan_digest: string;
91
91
  artifact_bundle_set_digest: string;
92
92
  unassigned_projection_refs_digest: string;
@@ -105,7 +105,6 @@ export declare const indexerProjectedArtifactFanOutAuditSchema: z.ZodObject<{
105
105
  revision_above: 300;
106
106
  };
107
107
  state: "warning" | "ready" | "plan-revision-required";
108
- audit_digest: string;
109
108
  partition_plan_hash: string;
110
109
  outcome: "projected-artifact-fan-out-current" | "indexer-plan-revision-required";
111
110
  user_gate_required: false;
@@ -115,6 +114,7 @@ export declare const indexerProjectedArtifactFanOutAuditSchema: z.ZodObject<{
115
114
  legally_assigned_artifact_count: number;
116
115
  unassigned_projected_artifact_count: number;
117
116
  };
117
+ audit_digest: string;
118
118
  projected_artifact_plan_digest: string;
119
119
  artifact_bundle_set_digest: string;
120
120
  unassigned_projection_refs_digest: string;
@@ -0,0 +1,2 @@
1
+ /** Hash canonical JSON without retaining a second object tree and full JSON string. */
2
+ export declare function hashCanonicalIndexerJson(value: unknown, fallback: (value: unknown) => string): string;