@c4a/context 0.6.18 → 0.7.0

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 (130) hide show
  1. package/README.md +5 -5
  2. package/README.zh-CN.md +5 -5
  3. package/codeIndexPlan.d.ts +84 -0
  4. package/contracts.d.ts +2 -1
  5. package/docs/README.md +7 -0
  6. package/docs/README.zh-CN.md +5 -0
  7. package/docs/getting-started.md +12 -12
  8. package/docs/guides/agent-guide.md +18 -9
  9. package/docs/guides/code-indexer-skill-authoring.md +124 -0
  10. package/docs/guides/indexer-provider-and-customization.md +140 -0
  11. package/docs/guides/lark-resources.md +7 -0
  12. package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
  13. package/docs/guides/package-outputs.md +3 -3
  14. package/docs/reference/code-extractors.md +7 -6
  15. package/docs/reference/indexer-provider-protocol.md +819 -0
  16. package/docs/reference/package-templates.md +18 -10
  17. package/docs/reference/project-api.md +49 -24
  18. package/index.d.ts +48 -2
  19. package/index.js +28239 -3948
  20. package/indexerAgentStepProtocol.d.ts +9391 -0
  21. package/indexerArtifactDependencies.d.ts +689 -0
  22. package/indexerArtifactPolicy.d.ts +335 -0
  23. package/indexerArtifactResult.d.ts +2010 -0
  24. package/indexerAuditFacts.d.ts +66 -0
  25. package/indexerAuditOverrideReadiness.d.ts +27 -0
  26. package/indexerAuditProtocol.d.ts +238 -0
  27. package/indexerAuditRevision.d.ts +726 -0
  28. package/indexerAuditRevisionActions.d.ts +236 -0
  29. package/indexerAuthoringFixture.d.ts +152 -0
  30. package/indexerBaseQuestionAmendment.d.ts +2403 -0
  31. package/indexerBenchmark.d.ts +1062 -0
  32. package/indexerCandidateCompile.d.ts +801 -0
  33. package/indexerCapabilityGroupEvidence.d.ts +129 -0
  34. package/indexerCatalogFallback.d.ts +1262 -0
  35. package/indexerCollectionMapping.d.ts +75 -0
  36. package/indexerContentLayers.d.ts +137 -0
  37. package/indexerControlledInvocation.d.ts +512 -0
  38. package/indexerControlledProgram.d.ts +12535 -0
  39. package/indexerCoreExports.d.ts +21 -0
  40. package/indexerCustomizationDraft.d.ts +13800 -0
  41. package/indexerCustomizationLadder.d.ts +103 -0
  42. package/indexerDependencyView.d.ts +1610 -0
  43. package/indexerEvidenceAdapterResult.d.ts +504 -0
  44. package/indexerExampleDecision.d.ts +1606 -0
  45. package/indexerExampleIdentity.d.ts +132 -0
  46. package/indexerExampleIdentityAudit.d.ts +70 -0
  47. package/indexerExampleLinkageAudit.d.ts +80 -0
  48. package/indexerGeneratedAuthoringAudit.d.ts +208 -0
  49. package/indexerIncrementalImpact.d.ts +221 -0
  50. package/indexerInventoryDisposition.d.ts +443 -0
  51. package/indexerLayerComposition.d.ts +1652 -0
  52. package/indexerLayoutChange.d.ts +329 -0
  53. package/indexerLayoutProposalSet.d.ts +447 -0
  54. package/indexerLayoutResolver.d.ts +342 -0
  55. package/indexerLayoutTransition.d.ts +247 -0
  56. package/indexerLifecycle.d.ts +53 -0
  57. package/indexerMainLifecycle.d.ts +258 -0
  58. package/indexerMainRunLedger.d.ts +888 -0
  59. package/indexerMainRunProtocol.d.ts +6471 -0
  60. package/indexerMainWorkset.d.ts +2141 -0
  61. package/indexerMaterialAnswer.d.ts +738 -0
  62. package/indexerMaterialAnswerActualization.d.ts +91 -0
  63. package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
  64. package/indexerMaterialAnswerFlow.d.ts +63 -0
  65. package/indexerMaterialAnswerLayout.d.ts +76 -0
  66. package/indexerMaterialAnswerReview.d.ts +217 -0
  67. package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
  68. package/indexerMaterialAnswerRunLedger.d.ts +918 -0
  69. package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
  70. package/indexerMaterialGapLedger.d.ts +3111 -0
  71. package/indexerMaterialQuestionExclusion.d.ts +129 -0
  72. package/indexerMaterialQuestionWorkset.d.ts +508 -0
  73. package/indexerNavigationArtifactGraph.d.ts +5 -0
  74. package/indexerNavigationArtifactPlan.d.ts +39 -0
  75. package/indexerOverlayQuestionAmendment.d.ts +2551 -0
  76. package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
  77. package/indexerOverlayTrust.d.ts +1425 -0
  78. package/indexerParserCoordinate.d.ts +222 -0
  79. package/indexerParserFactView.d.ts +503 -0
  80. package/indexerPartitionConvergence.d.ts +496 -0
  81. package/indexerPartitionPlan.d.ts +919 -0
  82. package/indexerPartitionStrategyResolution.d.ts +594 -0
  83. package/indexerPhysicalArtifactAudit.d.ts +247 -0
  84. package/indexerPhysicalArtifactManifest.d.ts +449 -0
  85. package/indexerPlannedMaterialAnswer.d.ts +116 -0
  86. package/indexerPostAuthorComposition.d.ts +2000 -0
  87. package/indexerPostAuthorRunLedger.d.ts +1972 -0
  88. package/indexerPrimaryProjection.d.ts +262 -0
  89. package/indexerProfileContract.d.ts +3034 -0
  90. package/indexerProfileMetricAudit.d.ts +218 -0
  91. package/indexerProgramExecutionAuthorization.d.ts +227 -0
  92. package/indexerProgramRunProtocol.d.ts +7642 -0
  93. package/indexerProjectProposal.d.ts +2807 -0
  94. package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
  95. package/indexerProjectedArtifactPlan.d.ts +217 -0
  96. package/indexerProtocolCommon.d.ts +29 -0
  97. package/indexerProvider.d.ts +2573 -0
  98. package/indexerProviderComposition.d.ts +1357 -0
  99. package/indexerProviderContractReferences.d.ts +13 -0
  100. package/indexerProviderProfileResolution.d.ts +20 -0
  101. package/indexerProviderResolution.d.ts +752 -0
  102. package/indexerProviderResolutionAction.d.ts +678 -0
  103. package/indexerProviderRouting.d.ts +3909 -0
  104. package/indexerProviderSelectionProposal.d.ts +3311 -0
  105. package/indexerQuestionAuthority.d.ts +419 -0
  106. package/indexerReaderTargetInventory.d.ts +161 -0
  107. package/indexerReferenceOnlyAudit.d.ts +90 -0
  108. package/indexerRegistry.d.ts +3019 -0
  109. package/indexerRequirementComparison.d.ts +44 -0
  110. package/indexerRequirementConfirmation.d.ts +1193 -0
  111. package/indexerRequirementLifecycle.d.ts +3314 -0
  112. package/indexerRestrictedSelector.d.ts +63 -0
  113. package/indexerResultReconciliation.d.ts +6844 -0
  114. package/indexerResultReconciliationRun.d.ts +15 -0
  115. package/indexerRunEnvelope.d.ts +384 -0
  116. package/indexerRunProtocolCommon.d.ts +21 -0
  117. package/indexerSharedArtifactFingerprint.d.ts +33 -0
  118. package/indexerStructuredDeclaration.d.ts +513 -0
  119. package/indexerSubjectCatalog.d.ts +230 -0
  120. package/indexerSubjectIdentity.d.ts +19 -0
  121. package/indexerSubjectKeyAuthority.d.ts +785 -0
  122. package/indexerTemplateRendering.d.ts +485 -0
  123. package/indexerToolSnapshot.d.ts +431 -0
  124. package/indexerWorksetRead.d.ts +287 -0
  125. package/package.json +1 -1
  126. package/phases.d.ts +11 -9
  127. package/templates/package-templates/kb/AGENTS.md +1 -1
  128. package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +1 -1
  129. package/templates/package-templates.zh-CN/kb/AGENTS.md +1 -1
  130. package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context",
3
- "version": "0.6.18",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Declarative SDK for Context knowledge sources, workflows, review, and package outputs",
6
6
  "license": "MIT",
package/phases.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { type FileCaptureProcessorDefinition, type KnowledgeCollection, type MarkdownTransform, type PackageKind, type PackageSelectDefinition, type DocumentMainlineCollection } from "./contracts.js";
1
+ import { type FileCaptureProcessorDefinition, type CodeIndexCollection, type KnowledgeCollection, type MarkdownTransform, type PackageKind, type PackageSelectDefinition, type DocumentMainlineCollection } from "./contracts.js";
2
2
  import { DOCUMENT_COMPILE_ACTION_SCHEMA_VERSION } from "./documentEvidence.js";
3
3
  import { type CodeIndexCoverageKind, type CodeIndexInspectionAdapter, type CodeIndexUnitPlan } from "./codeIndexPlan.js";
4
4
  export { CODE_INDEX_CAPABILITIES, CODE_INDEX_COVERAGE_KINDS, CODE_INDEX_LIFECYCLES, CODE_INDEX_MODULE_FACETS, CODE_INDEX_MODULE_TYPES, CODE_INDEX_OUTPUT_PROFILES, ExtractTsConfigurationError, NO_ENTRY_DETECTED, requiredCodeIndexCoverage, } from "./codeIndexPlan.js";
5
- export type { CodeIndexCapability, CodeIndexCapabilityGap, CodeIndexCoverageKind, CodeIndexInspectionAdapter, CodeIndexInspectionContext, CodeIndexInspectionFinding, CodeIndexInspectionFindingKind, CodeIndexInspectionResult, CodeIndexLifecycle, CodeIndexModuleFacet, CodeIndexModuleType, CodeIndexOutputProfile, CodeIndexUnitPlan, } from "./codeIndexPlan.js";
5
+ export type { CodeIndexCapability, CodeIndexCapabilityGap, CodeIndexCoverageKind, CodeIndexInspectionAdapter, CodeIndexInspectionContext, CodeIndexInspectionFinding, CodeIndexInspectionFindingKind, CodeIndexInspectionInventory, CodeIndexInspectionResult, CodeIndexIdentityGroup, CodeIndexChainCandidate, CodeIndexChainCandidateDecision, CodeIndexChainCandidateFamily, CodeIndexLifecycle, CodeIndexModuleFacet, CodeIndexModuleType, CodeIndexOutputProfile, CodeIndexUnitPlan, } from "./codeIndexPlan.js";
6
6
  import type { DocumentSourceDefinition, DocumentSourceType, FileSourceDefinition, FileSourceReference, LarkSourceDefinition, LarkSourceReference, RepoProjectSourceDefinition, SourceCollectionReference, SourceDefinition } from "./sources.js";
7
7
  export type PhaseResourceReference = {
8
8
  kind: "source";
@@ -64,7 +64,7 @@ export type ExtractTsPhaseDefinition = {
64
64
  reads: readonly PhaseResourceReference[];
65
65
  writes: readonly PhaseResourceReference[];
66
66
  source: RepoProjectSourceDefinition;
67
- collection: "codegraph";
67
+ collection: CodeIndexCollection;
68
68
  include: readonly string[];
69
69
  mode: "exports" | "scan";
70
70
  entries?: readonly string[];
@@ -82,7 +82,9 @@ export type ExtractTsPhaseDefinition = {
82
82
  export interface CustomCodeEvidence {
83
83
  source: string;
84
84
  file: string;
85
+ /** Stable canonical-ref token. Do not include ':' or '@'; keep exact signatures in Section prose. */
85
86
  symbol: string;
87
+ /** Stable canonical-ref token. Do not include ':' or '@'. */
86
88
  kind: string;
87
89
  digest: string;
88
90
  line?: number;
@@ -106,6 +108,7 @@ export interface CustomCodeCandidateSection {
106
108
  id: string;
107
109
  kind: CodeIndexCoverageKind;
108
110
  title: string;
111
+ /** Reader-facing Section body only. Context renders the heading from title. */
109
112
  markdown: string;
110
113
  evidence: readonly CustomCodeEvidence[];
111
114
  }
@@ -114,9 +117,8 @@ export interface CustomCodeCandidateDraft {
114
117
  kind: string;
115
118
  visibility: string;
116
119
  module: string;
117
- markdown?: string;
118
- /** Evidence-scoped aggregate sections used to prove output-profile coverage. */
119
- sections?: readonly CustomCodeCandidateSection[];
120
+ /** Required evidence-scoped sections used to render the page and prove output-profile coverage. */
121
+ sections: readonly CustomCodeCandidateSection[];
120
122
  evidence: readonly CustomCodeEvidence[];
121
123
  review: CustomCodeCandidateReview;
122
124
  edges?: readonly CustomCodeCandidateEdge[];
@@ -141,7 +143,7 @@ export type ExtractCustomPhaseDefinition = {
141
143
  reads: readonly PhaseResourceReference[];
142
144
  writes: readonly PhaseResourceReference[];
143
145
  sources: readonly RepoProjectSourceDefinition[];
144
- collection: "codegraph";
146
+ collection: CodeIndexCollection;
145
147
  indexPlan: "declared" | "inferred";
146
148
  indexUnits: readonly CodeIndexUnitPlan[];
147
149
  inspect?: CodeIndexInspectionAdapter;
@@ -239,7 +241,7 @@ export declare const compileProse: (definition: {
239
241
  }) => CompileProsePhaseDefinition;
240
242
  export declare const extractTs: (definition: {
241
243
  source: RepoProjectSourceDefinition;
242
- collection: "codegraph";
244
+ collection: CodeIndexCollection;
243
245
  include?: readonly string[];
244
246
  mode?: "exports" | "scan";
245
247
  entries?: readonly string[];
@@ -250,7 +252,7 @@ export declare const extractTs: (definition: {
250
252
  export declare const extractCustom: (definition: {
251
253
  id: string;
252
254
  sources: readonly RepoProjectSourceDefinition[];
253
- collection: "codegraph";
255
+ collection: CodeIndexCollection;
254
256
  indexUnits?: readonly CodeIndexUnitPlan[];
255
257
  inspect?: CodeIndexInspectionAdapter;
256
258
  extract: CustomCodeExtractor;
@@ -18,7 +18,7 @@ Selected OKF root directories such as `{{wikisRoot}}/`, `{{guidesRoot}}/`,
18
18
  `{{rulesRoot}}/`, and `{{featsRoot}}/` follow an OKF-compatible Context profile:
19
19
  OKF fields and Context extension fields stay at the top level, and no `context`
20
20
  or `schema` field is emitted. Root mapping:
21
- `{{wikisRoot}}/` maps from structured `codegraph`, `business`, and `product` knowledge;
21
+ `{{wikisRoot}}/` maps from structured `codeindex`, `business`, and `product` knowledge;
22
22
  `{{guidesRoot}}/` maps from `architecture`, `sop`, `faq`, `decision`, and `incident`;
23
23
  `{{rulesRoot}}/` maps from `standards` and `test`; `{{featsRoot}}/` maps from `feats`. Treat
24
24
  `{{wikisRoot}}/` as the entity-and-relationship layer; guides and rules may
@@ -29,7 +29,7 @@ as evidence rather than relying on memory or frontmatter summaries.
29
29
 
30
30
  | Root | Use |
31
31
  |---|---|
32
- | `{{wikisRoot}}/` | Structured entities and relationships from codegraph, business, and product knowledge. |
32
+ | `{{wikisRoot}}/` | Structured entities and relationships from codeindex, business, and product knowledge. |
33
33
  | `{{guidesRoot}}/` | Architecture, procedures, FAQs, decisions, incidents, and troubleshooting. |
34
34
  | `{{rulesRoot}}/` | Standards, constraints, acceptance criteria, and test scenarios. |
35
35
  | `{{featsRoot}}/` | Feature knowledge when selected into the package. |
@@ -14,7 +14,7 @@
14
14
 
15
15
  包内可能包含以下 OKF 根目录:
16
16
 
17
- - `{{wikisRoot}}/`:结构化实体和关系,对应 codegraph、business、product。
17
+ - `{{wikisRoot}}/`:结构化实体和关系,对应 codeindex、business、product。
18
18
  - `{{guidesRoot}}/`:架构、流程、FAQ、决策和故障记录。
19
19
  - `{{rulesRoot}}/`:标准、约束、验收条件和测试场景。
20
20
  - `{{featsRoot}}/`:被选择进入包内的功能知识。
@@ -20,7 +20,7 @@ description: 查询 {{displayName}} 中经过审核、可追溯来源的知识
20
20
 
21
21
  | 根目录 | 用途 |
22
22
  |---|---|
23
- | `{{wikisRoot}}/` | 来自 codegraph、business、product 的结构化实体和关系。 |
23
+ | `{{wikisRoot}}/` | 来自 codeindex、business、product 的结构化实体和关系。 |
24
24
  | `{{guidesRoot}}/` | 架构、流程、FAQ、决策、故障和排障说明。 |
25
25
  | `{{rulesRoot}}/` | 标准、约束、验收条件和测试场景。 |
26
26
  | `{{featsRoot}}/` | 被选择进入包内的功能知识。 |