@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.
- package/README.md +5 -5
- package/README.zh-CN.md +5 -5
- package/codeIndexPlan.d.ts +84 -0
- package/contracts.d.ts +2 -1
- package/docs/README.md +7 -0
- package/docs/README.zh-CN.md +5 -0
- package/docs/getting-started.md +12 -12
- package/docs/guides/agent-guide.md +18 -9
- package/docs/guides/code-indexer-skill-authoring.md +124 -0
- package/docs/guides/indexer-provider-and-customization.md +140 -0
- package/docs/guides/lark-resources.md +7 -0
- package/docs/guides/markdown-indexer-skill-authoring.md +118 -0
- package/docs/guides/package-outputs.md +3 -3
- package/docs/reference/code-extractors.md +7 -6
- package/docs/reference/indexer-provider-protocol.md +819 -0
- package/docs/reference/package-templates.md +18 -10
- package/docs/reference/project-api.md +49 -24
- package/index.d.ts +48 -2
- package/index.js +28239 -3948
- package/indexerAgentStepProtocol.d.ts +9391 -0
- package/indexerArtifactDependencies.d.ts +689 -0
- package/indexerArtifactPolicy.d.ts +335 -0
- package/indexerArtifactResult.d.ts +2010 -0
- package/indexerAuditFacts.d.ts +66 -0
- package/indexerAuditOverrideReadiness.d.ts +27 -0
- package/indexerAuditProtocol.d.ts +238 -0
- package/indexerAuditRevision.d.ts +726 -0
- package/indexerAuditRevisionActions.d.ts +236 -0
- package/indexerAuthoringFixture.d.ts +152 -0
- package/indexerBaseQuestionAmendment.d.ts +2403 -0
- package/indexerBenchmark.d.ts +1062 -0
- package/indexerCandidateCompile.d.ts +801 -0
- package/indexerCapabilityGroupEvidence.d.ts +129 -0
- package/indexerCatalogFallback.d.ts +1262 -0
- package/indexerCollectionMapping.d.ts +75 -0
- package/indexerContentLayers.d.ts +137 -0
- package/indexerControlledInvocation.d.ts +512 -0
- package/indexerControlledProgram.d.ts +12535 -0
- package/indexerCoreExports.d.ts +21 -0
- package/indexerCustomizationDraft.d.ts +13800 -0
- package/indexerCustomizationLadder.d.ts +103 -0
- package/indexerDependencyView.d.ts +1610 -0
- package/indexerEvidenceAdapterResult.d.ts +504 -0
- package/indexerExampleDecision.d.ts +1606 -0
- package/indexerExampleIdentity.d.ts +132 -0
- package/indexerExampleIdentityAudit.d.ts +70 -0
- package/indexerExampleLinkageAudit.d.ts +80 -0
- package/indexerGeneratedAuthoringAudit.d.ts +208 -0
- package/indexerIncrementalImpact.d.ts +221 -0
- package/indexerInventoryDisposition.d.ts +443 -0
- package/indexerLayerComposition.d.ts +1652 -0
- package/indexerLayoutChange.d.ts +329 -0
- package/indexerLayoutProposalSet.d.ts +447 -0
- package/indexerLayoutResolver.d.ts +342 -0
- package/indexerLayoutTransition.d.ts +247 -0
- package/indexerLifecycle.d.ts +53 -0
- package/indexerMainLifecycle.d.ts +258 -0
- package/indexerMainRunLedger.d.ts +888 -0
- package/indexerMainRunProtocol.d.ts +6471 -0
- package/indexerMainWorkset.d.ts +2141 -0
- package/indexerMaterialAnswer.d.ts +738 -0
- package/indexerMaterialAnswerActualization.d.ts +91 -0
- package/indexerMaterialAnswerExecutionPlan.d.ts +2887 -0
- package/indexerMaterialAnswerFlow.d.ts +63 -0
- package/indexerMaterialAnswerLayout.d.ts +76 -0
- package/indexerMaterialAnswerReview.d.ts +217 -0
- package/indexerMaterialAnswerReviewRoute.d.ts +6145 -0
- package/indexerMaterialAnswerRunLedger.d.ts +918 -0
- package/indexerMaterialAnswerRunProtocol.d.ts +1253 -0
- package/indexerMaterialGapLedger.d.ts +3111 -0
- package/indexerMaterialQuestionExclusion.d.ts +129 -0
- package/indexerMaterialQuestionWorkset.d.ts +508 -0
- package/indexerNavigationArtifactGraph.d.ts +5 -0
- package/indexerNavigationArtifactPlan.d.ts +39 -0
- package/indexerOverlayQuestionAmendment.d.ts +2551 -0
- package/indexerOverlayQuestionApplyProposal.d.ts +4697 -0
- package/indexerOverlayTrust.d.ts +1425 -0
- package/indexerParserCoordinate.d.ts +222 -0
- package/indexerParserFactView.d.ts +503 -0
- package/indexerPartitionConvergence.d.ts +496 -0
- package/indexerPartitionPlan.d.ts +919 -0
- package/indexerPartitionStrategyResolution.d.ts +594 -0
- package/indexerPhysicalArtifactAudit.d.ts +247 -0
- package/indexerPhysicalArtifactManifest.d.ts +449 -0
- package/indexerPlannedMaterialAnswer.d.ts +116 -0
- package/indexerPostAuthorComposition.d.ts +2000 -0
- package/indexerPostAuthorRunLedger.d.ts +1972 -0
- package/indexerPrimaryProjection.d.ts +262 -0
- package/indexerProfileContract.d.ts +3034 -0
- package/indexerProfileMetricAudit.d.ts +218 -0
- package/indexerProgramExecutionAuthorization.d.ts +227 -0
- package/indexerProgramRunProtocol.d.ts +7642 -0
- package/indexerProjectProposal.d.ts +2807 -0
- package/indexerProjectedArtifactFanOutAudit.d.ts +159 -0
- package/indexerProjectedArtifactPlan.d.ts +217 -0
- package/indexerProtocolCommon.d.ts +29 -0
- package/indexerProvider.d.ts +2573 -0
- package/indexerProviderComposition.d.ts +1357 -0
- package/indexerProviderContractReferences.d.ts +13 -0
- package/indexerProviderProfileResolution.d.ts +20 -0
- package/indexerProviderResolution.d.ts +752 -0
- package/indexerProviderResolutionAction.d.ts +678 -0
- package/indexerProviderRouting.d.ts +3909 -0
- package/indexerProviderSelectionProposal.d.ts +3311 -0
- package/indexerQuestionAuthority.d.ts +419 -0
- package/indexerReaderTargetInventory.d.ts +161 -0
- package/indexerReferenceOnlyAudit.d.ts +90 -0
- package/indexerRegistry.d.ts +3019 -0
- package/indexerRequirementComparison.d.ts +44 -0
- package/indexerRequirementConfirmation.d.ts +1193 -0
- package/indexerRequirementLifecycle.d.ts +3314 -0
- package/indexerRestrictedSelector.d.ts +63 -0
- package/indexerResultReconciliation.d.ts +6844 -0
- package/indexerResultReconciliationRun.d.ts +15 -0
- package/indexerRunEnvelope.d.ts +384 -0
- package/indexerRunProtocolCommon.d.ts +21 -0
- package/indexerSharedArtifactFingerprint.d.ts +33 -0
- package/indexerStructuredDeclaration.d.ts +513 -0
- package/indexerSubjectCatalog.d.ts +230 -0
- package/indexerSubjectIdentity.d.ts +19 -0
- package/indexerSubjectKeyAuthority.d.ts +785 -0
- package/indexerTemplateRendering.d.ts +485 -0
- package/indexerToolSnapshot.d.ts +431 -0
- package/indexerWorksetRead.d.ts +287 -0
- package/package.json +1 -1
- package/phases.d.ts +11 -9
- package/templates/package-templates/kb/AGENTS.md +1 -1
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +1 -1
- package/templates/package-templates.zh-CN/kb/AGENTS.md +1 -1
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +1 -1
|
@@ -41,7 +41,7 @@ kbPackage({
|
|
|
41
41
|
llmsPackage({
|
|
42
42
|
name: "component-lib-llms",
|
|
43
43
|
template: "src/package-templates/llms",
|
|
44
|
-
select: { include: ["
|
|
44
|
+
select: { include: ["codeindex/component-lib/**"] },
|
|
45
45
|
});
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -259,7 +259,7 @@ its pages instead of producing one index per path segment.
|
|
|
259
259
|
The generated
|
|
260
260
|
`dist/<package-name>/wikis/` tree is the required default
|
|
261
261
|
KB entry surface. Internal collections are mapped into OKF roots during build:
|
|
262
|
-
`
|
|
262
|
+
`codeindex`, `business`, and `product` go to `wikis/`; `architecture`, `sop`,
|
|
263
263
|
`faq`, `decision`, and `incident` go to `guides/`; `standards` and `test` go to
|
|
264
264
|
`rules/`; and `feats` goes to `feats/`. Treat `wikis/` as the structured
|
|
265
265
|
entity-and-relationship layer. Guides and rules may explain, operationalize,
|
|
@@ -307,17 +307,25 @@ wants project-specific behavior beyond knowledge lookup.
|
|
|
307
307
|
|
|
308
308
|
## Context OKF Profiles
|
|
309
309
|
|
|
310
|
-
Approved Markdown under `knowledge/`
|
|
310
|
+
Approved Markdown under `knowledge/` and its deterministic
|
|
311
|
+
`knowledge/structure.yaml` projection form the authoring source of truth:
|
|
311
312
|
|
|
312
313
|
- top-level YAML frontmatter uses OKF fields such as `type`, `title`,
|
|
313
314
|
`description`, `tags`, `timestamp`, and `resource`;
|
|
314
|
-
-
|
|
315
|
-
`
|
|
316
|
-
|
|
315
|
+
- each Markdown page keeps reader fields, stable page identity, `sources`, and a
|
|
316
|
+
small recovery capsule (`resource`, `node_type`, containment fields, and
|
|
317
|
+
relationship mode);
|
|
318
|
+
- large or repeated machine state such as complete `code_symbols`, code
|
|
319
|
+
evidence, relationship records, candidate fingerprints, and optimization
|
|
320
|
+
decisions lives once in the corresponding `structure.yaml` view record;
|
|
321
|
+
- Context readers hydrate that machine state in memory before verify, audit,
|
|
322
|
+
revision, or build. Do not copy a compact page as a new page without using a
|
|
323
|
+
Context authoring command;
|
|
317
324
|
- do not nest Context production metadata under `context`; fields such as
|
|
318
325
|
`context.sources` and `context.code_symbols` are not part of the 0.6 profile;
|
|
319
326
|
- section provenance lives in `<!-- context:section ... source_ref="..." -->`
|
|
320
|
-
comments
|
|
327
|
+
comments. When a Section needs more than one citation, the CLI preserves the
|
|
328
|
+
complete set in its adjacent `context:source_refs` block;
|
|
321
329
|
- do not add frontmatter `source_refs`; page-level provenance is derived from
|
|
322
330
|
section source refs when needed;
|
|
323
331
|
- do not add `context` or `schema` fields.
|
|
@@ -340,7 +348,7 @@ src-N#span:<heading-hint> L<start>-<end>@<span-hash>
|
|
|
340
348
|
|
|
341
349
|
The code symbol form includes the source-relative file so same-name symbols in
|
|
342
350
|
different files resolve to one exact symbol-index row. Consumers should still
|
|
343
|
-
treat the complete `source_ref` as opaque. Production
|
|
351
|
+
treat the complete `source_ref` as opaque. Production codeindex pages keep
|
|
344
352
|
`candidate_fingerprint` at the top level and do not duplicate this evidence in
|
|
345
353
|
`code_origin`.
|
|
346
354
|
|
|
@@ -392,8 +400,8 @@ current closed state.
|
|
|
392
400
|
|
|
393
401
|
Before writing output, `context build` validates that rendered template paths
|
|
394
402
|
are safe, unique, and do not collide with copied knowledge paths. For example,
|
|
395
|
-
a template file that renders to `wikis/
|
|
396
|
-
selected knowledge such as `knowledge/
|
|
403
|
+
a template file that renders to `wikis/codeindex/foo.md` is rejected if
|
|
404
|
+
selected knowledge such as `knowledge/codeindex/foo.md` maps to that same OKF
|
|
397
405
|
output path. Rename the template file or use `select.exclude` when the
|
|
398
406
|
collision is intentional.
|
|
399
407
|
|
|
@@ -29,7 +29,7 @@ the date:
|
|
|
29
29
|
```text
|
|
30
30
|
knowledge/<collection>/<slug>.md
|
|
31
31
|
knowledge/<collection>/<containment>/<slug>.md # only for an intentional hierarchy
|
|
32
|
-
knowledge/
|
|
32
|
+
knowledge/codeindex/<module>/symbol/<slug>.md
|
|
33
33
|
repo:<date>/<module>#symbol:...
|
|
34
34
|
file:<date>/<module>/<document>#span:...
|
|
35
35
|
lark:<date>/<module>/<document>#span:...
|
|
@@ -41,12 +41,12 @@ dist/<source-name>-kb/...
|
|
|
41
41
|
Choose the module boundary before extraction. In a monorepo, register each
|
|
42
42
|
confirmed package/subdirectory under the same date batch. A repo root that
|
|
43
43
|
resolves to multiple modules is for inspection; it is not an extraction unit.
|
|
44
|
-
Approved
|
|
44
|
+
Approved codeindex paths use the stable module name; the date remains only in
|
|
45
45
|
source selectors, phase ids, and evidence refs:
|
|
46
46
|
|
|
47
47
|
```text
|
|
48
|
-
knowledge/
|
|
49
|
-
knowledge/
|
|
48
|
+
knowledge/codeindex/module-a/...
|
|
49
|
+
knowledge/codeindex/module-b/...
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
For prose Views, provide a stable filename `slug` and omit `path`; the CLI
|
|
@@ -57,7 +57,7 @@ it is not a required source/module wrapper.
|
|
|
57
57
|
|
|
58
58
|
The registry stores this as one date entry containing several `modules` entries,
|
|
59
59
|
and materializes each module at `sources/repo/<date>/<module>`.
|
|
60
|
-
Repo module names are project-wide
|
|
60
|
+
Repo module names are project-wide codeindex identities and therefore cannot be
|
|
61
61
|
reused under another date batch. Refresh an existing module through its original
|
|
62
62
|
date/module selector.
|
|
63
63
|
When a repo module and the Context workspace share the same Git root, the CLI
|
|
@@ -402,7 +402,7 @@ alignProse({
|
|
|
402
402
|
```
|
|
403
403
|
|
|
404
404
|
`collection` is an internal knowledge classification, not a package directory.
|
|
405
|
-
Package build maps `
|
|
405
|
+
Package build maps `codeindex`/`business`/`product` to `wikis/`,
|
|
406
406
|
`architecture`/`sop`/`faq`/`decision`/`incident` to `guides/`,
|
|
407
407
|
`standards`/`test` to `rules/`, and `feats` to `feats/`. The complete output
|
|
408
408
|
contract is documented in [Package Outputs](../guides/package-outputs.md).
|
|
@@ -587,12 +587,12 @@ does not infer relationships or inject relation markers into verbatim body.
|
|
|
587
587
|
|
|
588
588
|
### `extractTs`
|
|
589
589
|
|
|
590
|
-
Extract exported TypeScript / TSX symbols into draft candidates:
|
|
590
|
+
Extract exported TypeScript / JavaScript / TSX / JSX symbols into draft candidates:
|
|
591
591
|
|
|
592
592
|
```ts
|
|
593
593
|
extractTs({
|
|
594
594
|
source: componentLib,
|
|
595
|
-
collection: "
|
|
595
|
+
collection: "codeindex",
|
|
596
596
|
});
|
|
597
597
|
```
|
|
598
598
|
|
|
@@ -601,8 +601,8 @@ Options:
|
|
|
601
601
|
| Field | Meaning |
|
|
602
602
|
|---|---|
|
|
603
603
|
| `source` | `source("date", "module")` for one repo module |
|
|
604
|
-
| `collection` | Code extraction uses `"
|
|
605
|
-
| `include` | Optional glob list inside the selected source; default is `["src/**/*.{ts,tsx}"]` |
|
|
604
|
+
| `collection` | Code extraction uses `"codeindex"` |
|
|
605
|
+
| `include` | Optional glob list inside the selected source; default is `["src/**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}"]` |
|
|
606
606
|
| `mode` | `"exports"` (default) traces public exports from automatic or configured entries; `"scan"` uses every file matched by `include` as an entry root |
|
|
607
607
|
| `entries` | Optional source-relative entry files for `"exports"` mode. They override `package.json` entry detection and live only in the Context project configuration |
|
|
608
608
|
| `exportedOnly` | Defaults to `true` in `"exports"` mode and `false` in `"scan"` mode |
|
|
@@ -614,7 +614,7 @@ An explicit index unit records production intent rather than parser settings:
|
|
|
614
614
|
```ts
|
|
615
615
|
extractTs({
|
|
616
616
|
source: componentLib,
|
|
617
|
-
collection: "
|
|
617
|
+
collection: "codeindex",
|
|
618
618
|
indexUnits: [{
|
|
619
619
|
id: "component-public-api",
|
|
620
620
|
inputSources: ["20260712/component-lib"],
|
|
@@ -623,6 +623,7 @@ extractTs({
|
|
|
623
623
|
moduleTypes: ["sdk-library"],
|
|
624
624
|
facets: ["public-api", "plugin-extension"],
|
|
625
625
|
moduleTypeEvidence: ["package.json exports and src/index.ts public entry"],
|
|
626
|
+
documents: ["README.md", "docs/public-api.md"],
|
|
626
627
|
outputProfile: "public-api-reference",
|
|
627
628
|
responsibility: "Document stable exported component contracts.",
|
|
628
629
|
entries: ["src/index.ts"],
|
|
@@ -649,6 +650,9 @@ behaviors such as routing, protocol consumption, events, persistence, plugins,
|
|
|
649
650
|
release, or cross-module chains. `moduleTypeEvidence` records the inspected
|
|
650
651
|
paths that support the classification. Classify first, then read the matching
|
|
651
652
|
Route-provided code-index templates, and only then finish the extraction plan.
|
|
653
|
+
`documents` contains exact source-relative Markdown paths read for that plan;
|
|
654
|
+
Context compares it with discovered module documents instead of treating a
|
|
655
|
+
source-code comment as documentation coverage.
|
|
652
656
|
`lifecycle` is `"authoritative"`, `"generated"`, `"mirrored"`, `"legacy"`,
|
|
653
657
|
or `"vendored"`; derived sources normally use `"provenance-only"` rather
|
|
654
658
|
than duplicating reader-facing pages. These are generic project facts, not
|
|
@@ -674,7 +678,7 @@ editing the source repository:
|
|
|
674
678
|
```ts
|
|
675
679
|
extractTs({
|
|
676
680
|
source: componentLib,
|
|
677
|
-
collection: "
|
|
681
|
+
collection: "codeindex",
|
|
678
682
|
include: ["src/**/*.ts"],
|
|
679
683
|
entries: ["src/api.ts"],
|
|
680
684
|
});
|
|
@@ -734,7 +738,7 @@ remain report signals and do not create another Gate.
|
|
|
734
738
|
Phase id shape:
|
|
735
739
|
|
|
736
740
|
```text
|
|
737
|
-
extract:<source-name-or-repo>:
|
|
741
|
+
extract:<source-name-or-repo>:codeindex
|
|
738
742
|
```
|
|
739
743
|
|
|
740
744
|
Codegraph extraction has two execution policies:
|
|
@@ -745,7 +749,7 @@ Codegraph extraction has two execution policies:
|
|
|
745
749
|
the Agent re-evaluates `context status --format json`; only
|
|
746
750
|
`workflow.current` decides whether Review is now required.
|
|
747
751
|
- `context run <phase-id> --auto-promote` is the explicit CI/CD path. It is valid
|
|
748
|
-
only for `phase.extract.ts`
|
|
752
|
+
only for `phase.extract.ts` codeindex phases, applies deterministic code deltas
|
|
749
753
|
without Review, refreshes deterministic close when approved knowledge changed,
|
|
750
754
|
then runs project verification. Close or verification errors make the command
|
|
751
755
|
fail; JSON output reports applied/materialized/removed counts plus a `close`
|
|
@@ -757,7 +761,7 @@ other semantic knowledge. Agents must not infer a human gate from a phase-local
|
|
|
757
761
|
result. Human gates and their inspection/resolution Actions are exposed only by
|
|
758
762
|
`workflow.current`.
|
|
759
763
|
|
|
760
|
-
Approved
|
|
764
|
+
Approved codeindex sections use the local evidence form
|
|
761
765
|
`src-N#symbol:<file>:<symbol>:<kind>@<digest>`. The file segment makes reverse
|
|
762
766
|
lookup exact when multiple files contain the same symbol name, kind, and digest;
|
|
763
767
|
the complete ref remains opaque to agents. New pages keep only top-level
|
|
@@ -773,7 +777,7 @@ aggregated repository protocol:
|
|
|
773
777
|
extractCustom({
|
|
774
778
|
id: "extract:service:protocol",
|
|
775
779
|
sources: [service],
|
|
776
|
-
collection: "
|
|
780
|
+
collection: "codeindex",
|
|
777
781
|
indexUnits: [{
|
|
778
782
|
id: "service-protocol",
|
|
779
783
|
inputSources: ["20260811/service"],
|
|
@@ -844,6 +848,12 @@ least one source-backed structured edge. `context status` therefore treats this
|
|
|
844
848
|
pending code extraction target, and Review can verify snapshot freshness
|
|
845
849
|
without a placeholder `extractTs` phase.
|
|
846
850
|
|
|
851
|
+
Each `sections[].markdown` value is Section body content only; do not copy the
|
|
852
|
+
template heading into it. Context renders `sections[].title` and rejects nested
|
|
853
|
+
reader headings at the SDK boundary so empty template chapters cannot leak into
|
|
854
|
+
knowledge. Evidence `symbol` and `kind` are canonical-ref tokens and cannot
|
|
855
|
+
contain `:` or `@`; exact qualified signatures remain reader-facing prose.
|
|
856
|
+
|
|
847
857
|
`indexUnits` is also the batch scale and ownership contract. Candidate
|
|
848
858
|
`module` must match one declared unit id or output owner. Older callbacks that
|
|
849
859
|
omit `indexUnits` remain compatible: Context groups candidates by `module` and
|
|
@@ -873,6 +883,21 @@ output profile. Coverage is based on source-backed evidence paths, not Markdown
|
|
|
873
883
|
page count, so one aggregate page can pass while an entry-only static module
|
|
874
884
|
card cannot.
|
|
875
885
|
|
|
886
|
+
For a single-source index unit, Context also scans every represented language
|
|
887
|
+
family and Markdown/MDX file after the unit's declared exclusions. The adapter's
|
|
888
|
+
`eligibleFileTargets` and `eligibleLoc` must cover that independent baseline.
|
|
889
|
+
Configuration files may be evidence, but a hand-picked evidence list cannot be
|
|
890
|
+
reused as the source or LOC denominator. Cross-module-flow units remain scored
|
|
891
|
+
against their declared entry, protocol, operation, and handoff boundaries rather
|
|
892
|
+
than treating several repositories as one source-code page.
|
|
893
|
+
|
|
894
|
+
The same baseline discovers conventional sibling page entries, route-register
|
|
895
|
+
calls in Go router files, and exported receiver operations when a Go handler is
|
|
896
|
+
the declared service source of truth. Every discovered identity must appear in
|
|
897
|
+
the target-symbol and boundary denominators. An aggregate page may summarize
|
|
898
|
+
these identities, but an adapter cannot list one representative sibling and
|
|
899
|
+
silently omit the rest.
|
|
900
|
+
|
|
876
901
|
The extractor returns knowledge semantics (`nodeRef`, rendered Markdown,
|
|
877
902
|
Review summary and source-backed evidence). It must not write `knowledge/`,
|
|
878
903
|
`.tmp/context-runtime/lifecycle/candidates.jsonl`, extraction fingerprints or
|
|
@@ -893,9 +918,9 @@ import { indexGoRepository } from "@c4a/extract-go";
|
|
|
893
918
|
import { extractCustom } from "@c4a/context";
|
|
894
919
|
|
|
895
920
|
extractCustom({
|
|
896
|
-
id: "extract:service:
|
|
921
|
+
id: "extract:service:codeindex",
|
|
897
922
|
sources: [service],
|
|
898
|
-
collection: "
|
|
923
|
+
collection: "codeindex",
|
|
899
924
|
extract: async ({ projectRoot }) => {
|
|
900
925
|
const facts = await indexGoRepository(resolveServiceCheckout(projectRoot));
|
|
901
926
|
return { candidates: buildServiceCandidates(facts) };
|
|
@@ -921,7 +946,7 @@ and its evidence coverage auditable before candidate writes.
|
|
|
921
946
|
Declare the review step for a collection:
|
|
922
947
|
|
|
923
948
|
```ts
|
|
924
|
-
reviewValidity({ collection: "
|
|
949
|
+
reviewValidity({ collection: "codeindex" });
|
|
925
950
|
```
|
|
926
951
|
|
|
927
952
|
Declare one review gate for all current draft collections:
|
|
@@ -933,7 +958,7 @@ reviewValidity({ scope: "all" });
|
|
|
933
958
|
Phase id:
|
|
934
959
|
|
|
935
960
|
```text
|
|
936
|
-
review:
|
|
961
|
+
review:codeindex:validity
|
|
937
962
|
review:all:validity
|
|
938
963
|
```
|
|
939
964
|
|
|
@@ -959,7 +984,7 @@ continue wording does not invoke it.
|
|
|
959
984
|
|
|
960
985
|
The gate is batch-scoped: prose waits for every planned View across all active
|
|
961
986
|
structure slots and every declared `pendingStructureTargets` item in the round;
|
|
962
|
-
|
|
987
|
+
codeindex waits for every pending extract phase in the confirmed module round.
|
|
963
988
|
Candidate count/hash therefore describes the complete current batch rather than
|
|
964
989
|
one page, source slot, or module. Deterministic close later merges all active
|
|
965
990
|
slots into `knowledge/structure.yaml`, retains only their source, collection,
|
|
@@ -989,13 +1014,13 @@ const sample = source("20260712", "sample");
|
|
|
989
1014
|
|
|
990
1015
|
customPhase("custom:20260712/sample:review", async (ctx) => {
|
|
991
1016
|
await ctx.ensureSources({ source: sample });
|
|
992
|
-
await ctx.extract.ts(extractTs({ source: sample, collection: "
|
|
993
|
-
await ctx.review.html(reviewValidity({ collection: "
|
|
1017
|
+
await ctx.extract.ts(extractTs({ source: sample, collection: "codeindex" }));
|
|
1018
|
+
await ctx.review.html(reviewValidity({ collection: "codeindex" }));
|
|
994
1019
|
});
|
|
995
1020
|
```
|
|
996
1021
|
|
|
997
1022
|
Custom phases are an orchestration escape hatch. Use `extractCustom()` instead
|
|
998
|
-
when project code needs to publish
|
|
1023
|
+
when project code needs to publish codeindex candidates. The supported runtime
|
|
999
1024
|
helpers are:
|
|
1000
1025
|
|
|
1001
1026
|
- `ctx.ensureSources(...)` for repo source readiness.
|
package/index.d.ts
CHANGED
|
@@ -1,12 +1,58 @@
|
|
|
1
1
|
import type { PackageNavigationDefinition, PackageSelectDefinition } from "./contracts.js";
|
|
2
2
|
import type { PhaseDefinition, PhaseResourceReference } from "./phases.js";
|
|
3
3
|
import type { ProjectSourceDefinition } from "./sources.js";
|
|
4
|
-
export
|
|
4
|
+
export * from "./indexerCoreExports.js";
|
|
5
|
+
export { indexerComposerContractSchema, indexerComposerDeclarationSchema, indexerExecutionSchema, indexerProviderLayerFragmentSchema, indexerProviderManifestSchema, indexerProviderOperationSchema, indexerToolSourceDeclarationSchema, isIndexerLayerFragmentKind, isIndexerProviderProtocol, loadIndexerProviderManifest, parseIndexerProviderManifest, } from "./indexerProvider.js";
|
|
6
|
+
export type { IndexerComposerContract, IndexerComposerDeclaration, IndexerExecution, IndexerProviderLayerFragment, IndexerProviderManifest, IndexerProviderOperation, IndexerToolSourceDeclaration, } from "./indexerProvider.js";
|
|
7
|
+
export { canonicalOwnerCellRef, indexRequirementSchema, indexRequirementSetSchema, indexerRegistryDigests, indexerDistributionSchema, indexerRegistryEntrySchema, indexerRegistrySchema, loadIndexerRegistry, parseIndexerRegistry, requirementSetFromRegistry, validateFinalizedIndexerRegistry, } from "./indexerRegistry.js";
|
|
8
|
+
export type { IndexRequirement, IndexRequirementSet, IndexerJson, IndexerDistribution, IndexerRegistry, IndexerRegistryEntry, IndexerScopeTarget, LoadedIndexerRegistry, } from "./indexerRegistry.js";
|
|
9
|
+
export { compareIndexRequirementContraction } from "./indexerRequirementComparison.js";
|
|
10
|
+
export type { RequirementComparisonChange, RequirementContractionComparatorOptions, RequirementContractionComparison, RequirementContractionRelation, ResolvedQuestionContractView, } from "./indexerRequirementComparison.js";
|
|
11
|
+
export * from "./indexerRequirementConfirmation.js";
|
|
12
|
+
export * from "./indexerRequirementLifecycle.js";
|
|
13
|
+
export { deriveIndexerProgramExecutionPolicy, indexerCliReleaseManifestSchema, indexerHostExecutionCapabilitiesSchema, indexerProviderBundleIntegrity, indexerProgramAuthorizationSchema, indexerProgramIdentityDigest, resolvedProviderBundleSchema, resolvedProviderReceiptDigest, resolvedProviderStableFingerprint, validateIndexerProgramAuthorization, validateResolvedProviderBundle, } from "./indexerProviderResolution.js";
|
|
14
|
+
export * from "./indexerProviderResolutionAction.js";
|
|
15
|
+
export type { ExpectedProviderResolution, IndexerCliReleaseManifest, IndexerHostExecutionCapabilities, IndexerProgramAuthorization, IndexerProgramExecutionLevel, IndexerProgramExecutionPolicy, ProviderResolutionRequest, ResolvedProviderBundle, } from "./indexerProviderResolution.js";
|
|
16
|
+
export * from "./indexerProviderComposition.js";
|
|
17
|
+
export * from "./indexerProviderSelectionProposal.js";
|
|
18
|
+
export * from "./indexerCustomizationLadder.js";
|
|
19
|
+
export { indexerMetricContractSchema, indexerArtifactPolicyVariantSchema, indexerInventoryDomainSchema, indexerOperatorContractDigest, indexerOperatorContractSchema, indexerProfileContractDigest, indexerProfileContractEntrySchema, indexerProfileContractSchema, indexerProfileSubjectKeySchema, indexerQuestionTargetDomainSchema, indexerReaderQuestionContractSchema, indexerSubjectKeyContractSchema, inflationSensitiveHardMaximum, validateIndexerOperatorContract, validateIndexerProfileContract, } from "./indexerProfileContract.js";
|
|
20
|
+
export type { IndexerMetricContract, IndexerOperatorContract, IndexerProfileContract, IndexerProfileContractEntry, IndexerProfileSubjectKey, IndexerReaderQuestionContract, IndexerSubjectKeyContract, } from "./indexerProfileContract.js";
|
|
21
|
+
export { authorizeProjectIndexerOverlay, indexerContractOverlayDigest, indexerContractOverlaySchema, indexerOverlayAttestationDigest, indexerOverlayAttestationSchema, indexerOverlayAttestationSigningPayload, indexerOverlayProjectAuthorizationDigest, indexerOverlayProjectAuthorizationSchema, indexerOverlayTrustBundleDigest, indexerOverlayTrustBundleEnvelopeSchema, indexerOverlayTrustBundleSchema, indexerOverlayTrustReceiptDigest, indexerOverlayTrustReceiptSchema, validateIndexerContractOverlay, validateIndexerOverlayAttestation, validateIndexerOverlayTrustBundleEnvelope, verifyEnterpriseIndexerOverlayTrust, } from "./indexerOverlayTrust.js";
|
|
22
|
+
export type { IndexerContractOverlay, IndexerOverlayAttestation, IndexerOverlayConformanceReport, IndexerOverlayProjectAuthorization, IndexerOverlayTrustBundle, IndexerOverlayTrustBundleEnvelope, IndexerOverlayTrustReceipt, } from "./indexerOverlayTrust.js";
|
|
23
|
+
export * from "./indexerOverlayQuestionAmendment.js";
|
|
24
|
+
export * from "./indexerOverlayQuestionApplyProposal.js";
|
|
25
|
+
export * from "./indexerBaseQuestionAmendment.js";
|
|
26
|
+
export { composeIndexerLayerInput, DEFAULT_INDEXER_LAYER_FRAGMENT_LIMITS, indexerCanonicalRefSchema, indexerComposerRefSchema, indexerEvidenceRefSchema, indexerLayerCompositionInputDigest, indexerLayerCompositionInputSchema, indexerLayerFragmentDigest, indexerLayerFragmentPayloadSchema, indexerLayerFragmentSchema, indexerMaterializedLayerFragmentSchema, indexerProviderLayerRefSchema, validateAndMaterializeIndexerLayerFragment, validateIndexerLayerCompositionInput, validateIndexerMaterializedLayerFragment, } from "./indexerLayerComposition.js";
|
|
27
|
+
export type { IndexerEvidenceRef, IndexerLayerCompositionInput, IndexerLayerFragment, IndexerLayerFragmentLimits, IndexerLayerFragmentPayload, IndexerMaterializedLayerFragment, } from "./indexerLayerComposition.js";
|
|
28
|
+
export { canonicalIndexerNodeRef, indexerSubjectKeySchema, } from "./indexerSubjectIdentity.js";
|
|
29
|
+
export type { IndexerSubjectKey } from "./indexerSubjectIdentity.js";
|
|
30
|
+
export * from "./indexerSubjectKeyAuthority.js";
|
|
31
|
+
export { buildIndexerPostAuthorFragmentRequest, composeIndexerPostAuthorEnvelope, indexerComposedResultEnvelopeSchema, indexerComposerInvocationReceiptSchema, indexerEffectiveComposerSchema, indexerEffectiveComposerSetSchema, indexerLayerFragmentRunResultSchema, indexerPostAuthorFragmentRequestSchema, indexerPostAuthorWorksetDigest, indexerPostAuthorWorksetSchema, indexerPostAuthorWorksetSetDigest, indexerPostAuthorWorksetSetSchema, indexerPrimaryResultViewDigest, indexerPrimaryResultViewSchema, materializeIndexerPrimaryResultView, planIndexerPostAuthorComposition, resolveEffectiveIndexerComposers, validateIndexerPostAuthorFragmentResult, validateIndexerPostAuthorFragmentRequest, validateIndexerEffectiveComposerSet, validateIndexerPrimaryResultView, } from "./indexerPostAuthorComposition.js";
|
|
32
|
+
export type { IndexerComposedResultEnvelope, IndexerComposerInvocationReceipt, IndexerEffectiveComposer, IndexerEffectiveComposerSet, IndexerLayerFragmentRunResult, IndexerPostAuthorFragmentRequest, IndexerPostAuthorPlan, IndexerPostAuthorWorkset, IndexerPostAuthorWorksetSet, IndexerPrimaryArtifactView, IndexerPrimaryFactView, IndexerPrimaryResultView, } from "./indexerPostAuthorComposition.js";
|
|
33
|
+
export { buildIndexerMainWorkset, buildIndexerMainWorksetSet, buildIndexerMainTransportBatch, buildIndexerTargetResolutionView, indexerMainWorksetDigest, indexerMainWorksetSchema, indexerMainWorksetSetDigest, indexerMainWorksetSetSchema, indexerMainTransportBatchSchema, indexerOwnerCohortRef, indexerTargetResolutionViewDigest, indexerTargetResolutionViewSchema, validateIndexerMainWorkset, validateIndexerMainWorksetSet, validateIndexerTargetResolutionView, } from "./indexerMainWorkset.js";
|
|
34
|
+
export type { IndexerMainAuthorWorkset, IndexerMainPartitionWorkset, IndexerMainWorkset, IndexerMainWorksetSet, IndexerMainTransportBatch, IndexerTargetResolutionView, } from "./indexerMainWorkset.js";
|
|
35
|
+
export { indexerPartitionGroupProjectionDigest, indexerPartitionPlanBindingDigest, indexerPartitionPlanCanonicalHash, indexerPartitionPlanSchema, indexerPartitionStrategySchema, indexerPartitionStrategySetDigest, validateIndexerPartitionPlan, } from "./indexerPartitionPlan.js";
|
|
36
|
+
export type { IndexerMemberDisposition, IndexerPartitionGroup, IndexerPartitionPlan, IndexerPartitionStrategy, } from "./indexerPartitionPlan.js";
|
|
37
|
+
export * from "./indexerPartitionConvergence.js";
|
|
38
|
+
export * from "./indexerArtifactDependencies.js";
|
|
39
|
+
export * from "./indexerDependencyView.js";
|
|
40
|
+
export * from "./indexerRunEnvelope.js";
|
|
41
|
+
export * from "./indexerSharedArtifactFingerprint.js";
|
|
42
|
+
export * from "./indexerIncrementalImpact.js";
|
|
43
|
+
export * from "./indexerMainRunProtocol.js";
|
|
44
|
+
export * from "./indexerMainLifecycle.js";
|
|
45
|
+
export * from "./indexerSubjectCatalog.js";
|
|
46
|
+
export * from "./indexerMaterialAnswerRunProtocol.js";
|
|
47
|
+
export * from "./indexerProgramRunProtocol.js";
|
|
48
|
+
export * from "./indexerAgentStepProtocol.js";
|
|
49
|
+
export * from "./indexerLifecycle.js";
|
|
50
|
+
export type { CodegraphCollection, CodeIndexCollection, DocumentMainlineCollection, EntityStatus, KnowledgeCollection, MainlineCollection, MarkdownTransform, FileCaptureProcessorDefinition, OkfRoot, PackageKind, PackageNavigationDefinition, PackageSelectDefinition, TopLevelNamespace, } from "./contracts.js";
|
|
5
51
|
export { assertDocumentMainlineCollection, assertKnowledgeCollection, assertMainlineCollection, assertOkfRoot, assertTopLevelNamespace, DOC_MAINLINE_COLLECTIONS, DEFAULT_PACKAGE_NAVIGATION, KNOWLEDGE_COLLECTIONS, MAINLINE_COLLECTIONS, OKF_ROOTS, TOP_LEVEL_NAMESPACES, } from "./contracts.js";
|
|
6
52
|
export { assertDocumentEvidenceSectionMetadata, DOCUMENT_COMPILE_ACTION_SCHEMA_VERSION, DOCUMENT_EVIDENCE_SECTION_VALIDATION_STAGES, DOCUMENT_SECTION_CONTENT_MODES, DOCUMENT_STRUCTURE_SCHEMA_VERSION, } from "./documentEvidence.js";
|
|
7
53
|
export type { DocumentEvidenceSectionMetadata, DocumentEvidenceSectionValidationOptions, DocumentEvidenceSectionValidationStage, DocumentSectionContentMode, } from "./documentEvidence.js";
|
|
8
54
|
export { alignProse, captureFile, captureLark, compileProse, CODE_INDEX_CAPABILITIES, CODE_INDEX_COVERAGE_KINDS, CODE_INDEX_LIFECYCLES, CODE_INDEX_MODULE_FACETS, CODE_INDEX_MODULE_TYPES, CODE_INDEX_OUTPUT_PROFILES, customPhase, extractCustom, extractTs, ExtractTsConfigurationError, NO_ENTRY_DETECTED, requiredCodeIndexCoverage, mdxJsonDocs, reviewValidity, } from "./phases.js";
|
|
9
|
-
export type { AlignProsePhaseDefinition, CaptureFilePhaseDefinition, CaptureLarkPhaseDefinition, CompileProsePhaseDefinition, ContextPhase, ContextPhaseContext, CustomPhaseDefinition, CustomCodeCandidateDraft, CustomCodeCandidateEdge, CustomCodeCandidateSection, CustomCodeCandidateReview, CustomCodeEvidence, CustomCodeExtractionContext, CustomCodeExtractionResult, CustomCodeExtractor, CodeIndexCapability, CodeIndexCapabilityGap, CodeIndexCoverageKind, CodeIndexInspectionAdapter, CodeIndexInspectionContext, CodeIndexInspectionFinding, CodeIndexInspectionFindingKind, CodeIndexInspectionResult, CodeIndexLifecycle, CodeIndexModuleFacet, CodeIndexModuleType, CodeIndexOutputProfile, CodeIndexUnitPlan, ExtractCustomPhaseDefinition, ExtractTsPhaseDefinition, PhaseDefinition, PhaseResourceReference, ReviewValidityPhaseDefinition, ReviewValidityScope, } from "./phases.js";
|
|
55
|
+
export type { AlignProsePhaseDefinition, CaptureFilePhaseDefinition, CaptureLarkPhaseDefinition, CompileProsePhaseDefinition, ContextPhase, ContextPhaseContext, CustomPhaseDefinition, CustomCodeCandidateDraft, CustomCodeCandidateEdge, CustomCodeCandidateSection, CustomCodeCandidateReview, CustomCodeEvidence, CustomCodeExtractionContext, CustomCodeExtractionResult, CustomCodeExtractor, CodeIndexCapability, CodeIndexCapabilityGap, CodeIndexCoverageKind, CodeIndexInspectionAdapter, CodeIndexInspectionContext, CodeIndexInspectionFinding, CodeIndexInspectionFindingKind, CodeIndexInspectionInventory, CodeIndexInspectionResult, CodeIndexIdentityGroup, CodeIndexChainCandidate, CodeIndexChainCandidateDecision, CodeIndexChainCandidateFamily, CodeIndexLifecycle, CodeIndexModuleFacet, CodeIndexModuleType, CodeIndexOutputProfile, CodeIndexUnitPlan, ExtractCustomPhaseDefinition, ExtractTsPhaseDefinition, PhaseDefinition, PhaseResourceReference, ReviewValidityPhaseDefinition, ReviewValidityScope, } from "./phases.js";
|
|
10
56
|
export { allSources, DEFAULT_FILE_SOURCES_REGISTRY_PATH, DEFAULT_LARK_SOURCES_REGISTRY_PATH, DEFAULT_REPO_SOURCES_REGISTRY_PATH, loadSourcesRegistry, resolveSourceReference, source, } from "./sources.js";
|
|
11
57
|
export type { DocumentSourceDefinition, DocumentSourceReference, DocumentSourceType, FileSourceDefinition, FileSourceReference, FileSourceRegistryEntry, LarkSourceDefinition, LarkSourceReference, LarkSourceRegistryEntry, LoadSourcesRegistryOptions, ProjectSourceDefinition, RepoProjectSourceDefinition, RepoSourceDefinition, RepoSourceReference, RepoSourceRegistryEntry, RepoSourcesRegistry, SourceCollectionReference, SourceDefinition, SourceReference, SourcesRegistry, SourceType, } from "./sources.js";
|
|
12
58
|
export type TemplateVarValue = string | number | boolean | null | Record<string, unknown> | readonly Record<string, unknown>[];
|