@c4a/context-cli 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.
- package/README.md +18 -39
- package/README.zh-CN.md +13 -27
- package/cli.js +59230 -80555
- package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
- package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
- package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
- package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
- package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
- package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
- package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
- package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
- package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
- package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
- package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/indexers/contracts/operator-contract.json +2 -2
- package/indexers/contracts/profile-contract.json +3819 -454
- package/indexers/release-manifest.json +22 -22
- package/package.json +13 -3
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/claude/commands/context.md +44 -85
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/codex/skills/context/SKILL.md +44 -85
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/plugins/cursor/commands/c4a-context.md +44 -85
- package/plugins/skills/context/SKILL.md +44 -85
- package/plugins/skills/context-code-indexer/SKILL.md +30 -3
- package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
- package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
- package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
- package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
- package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
- package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
- package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
- package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
- package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
- package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
- package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
- package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
- package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
- package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
- package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
- package/providers/context/actions/configure-indexer-providers.yaml +1 -1
- package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
- package/providers/context/actions/run-indexer-lifecycle.yaml +7 -0
- package/providers/context/actions/run-indexer-post-author-composer.yaml +1 -1
- package/providers/context/codes.yaml +9 -49
- package/providers/context/graphs/indexer.yaml +75 -592
- package/providers/context/graphs/workspace.yaml +25 -500
- package/providers/context/manifest.json +110 -1199
- package/providers/context/provider.yaml +2 -2
- package/providers/context/resources/diagnostics/projection-stale.md +0 -1
- package/providers/context/resources/dialogue/human-gates.md +3 -3
- package/providers/context/resources/manuals/reference/package-templates.md +2 -3
- package/providers/context/resources/manuals/reference/project-api.md +52 -985
- package/providers/context/resources/procedures/close-and-build.md +8 -23
- package/providers/context/resources/procedures/knowledge-review.md +13 -4
- package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
- package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
- package/providers/context/resources/views/package-current.yaml +1 -1
- package/providers/context/resources/views/resolved-indexer-instructions.yaml +1 -1
- package/providers/context/resources/views/review-current.yaml +1 -1
- package/providers/context/resources/views/source-boundary.yaml +1 -1
- package/providers/context/resources/views/source-current.yaml +1 -1
- package/providers/context/resources/views/verification-current.yaml +1 -1
- package/providers/context/resources/views/workspace-current.yaml +1 -1
- package/providers/context/schemas/indexer-agent-step-input.schema.json +2 -2
- package/providers/context/schemas/indexer-agent-step-result.schema.json +298 -32
- package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
- package/providers/context/schemas/indexer-contract-overlay-validation-input.schema.json +0 -42
- package/providers/context/schemas/indexer-contract-overlay-validation-result.schema.json +27 -122
- package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +15 -0
- package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
- package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
- package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
- package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +55 -6
- package/providers/context/schemas/indexer-overlay-question-rebind-input.schema.json +4 -4
- package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +32 -0
- package/providers/context/skills/configure-indexer-providers/SKILL.md +40 -27
- package/providers/context/skills/run-indexer-agent-step/SKILL.md +34 -8
- package/providers/context/skills/run-indexer-lifecycle/SKILL.md +37 -0
- package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +38 -9
- package/docs/document-optimization.md +0 -82
- package/docs/document-optimization.zh-CN.md +0 -70
- package/indexers/capability-manifest.json +0 -40
- package/indexers/contracts/hard-rule-conformance.json +0 -2644
- package/providers/context/actions/accept-main-index-run.yaml +0 -7
- package/providers/context/actions/accept-material-answer-run.yaml +0 -7
- package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
- package/providers/context/actions/align-next.yaml +0 -6
- package/providers/context/actions/apply-code-index-guidance.yaml +0 -5
- package/providers/context/actions/apply-document-optimization-guidance.yaml +0 -5
- package/providers/context/actions/apply-structure-confirmation.yaml +0 -5
- package/providers/context/actions/audit-material-gap-state.yaml +0 -8
- package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
- package/providers/context/actions/authorize-indexer-contract-overlay.yaml +0 -7
- package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
- package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
- package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
- package/providers/context/actions/build-material-question-workset.yaml +0 -7
- package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/build-question-target-inventory.yaml +0 -7
- package/providers/context/actions/build-subject-catalog.yaml +0 -7
- package/providers/context/actions/build-target-resolution-views.yaml +0 -7
- package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
- package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
- package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
- package/providers/context/actions/compile-next.yaml +0 -5
- package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
- package/providers/context/actions/configure-code-extraction.yaml +0 -5
- package/providers/context/actions/configure-prose-lifecycle.yaml +0 -5
- package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
- package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
- package/providers/context/actions/extract-next.yaml +0 -5
- package/providers/context/actions/fail-main-index-run.yaml +0 -7
- package/providers/context/actions/fail-material-answer-run.yaml +0 -7
- package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/inspect-code-extraction.yaml +0 -5
- package/providers/context/actions/inspect-document-classification.yaml +0 -5
- package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
- package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
- package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
- package/providers/context/actions/inspect-structure.yaml +0 -5
- package/providers/context/actions/migrate-codeindex.yaml +0 -5
- package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
- package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
- package/providers/context/actions/optimize-documents.yaml +0 -6
- package/providers/context/actions/override-index-profile-audit.yaml +0 -7
- package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
- package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
- package/providers/context/actions/preview-extraction-batch.yaml +0 -5
- package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
- package/providers/context/actions/reconcile-review-identities.yaml +0 -5
- package/providers/context/actions/record-index-profile-revision.yaml +0 -7
- package/providers/context/actions/report-index-profile-failure.yaml +0 -7
- package/providers/context/actions/resolve-effective-composers.yaml +0 -7
- package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
- package/providers/context/actions/revise-code-index-audit.yaml +0 -5
- package/providers/context/actions/revise-document.yaml +0 -5
- package/providers/context/actions/revise-index-output.yaml +0 -7
- package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
- package/providers/context/actions/start-main-index-run.yaml +0 -7
- package/providers/context/actions/start-material-answer-run.yaml +0 -7
- package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
- package/providers/context/actions/submit-code-index-audit.yaml +0 -6
- package/providers/context/resources/dialogue/code-extraction.md +0 -87
- package/providers/context/resources/dialogue/document-classification.md +0 -33
- package/providers/context/resources/dialogue/structure-confirmation.md +0 -44
- package/providers/context/resources/dialogue/workflow-mode-after-capture.md +0 -25
- package/providers/context/resources/manuals/reference/code-extractors.md +0 -152
- package/providers/context/resources/procedures/code-extraction.md +0 -188
- package/providers/context/resources/procedures/code-index-audit.md +0 -113
- package/providers/context/resources/procedures/document-classification.md +0 -22
- package/providers/context/resources/procedures/document-optimization.md +0 -110
- package/providers/context/resources/procedures/document-revision.md +0 -36
- package/providers/context/resources/procedures/prose-align.md +0 -68
- package/providers/context/resources/procedures/prose-compile.md +0 -23
- package/providers/context/resources/semantic/align/candidate-resolution.md +0 -106
- package/providers/context/resources/semantic/align/density-profile.md +0 -41
- package/providers/context/resources/semantic/align/gates.md +0 -276
- package/providers/context/resources/semantic/align/structure-planning.md +0 -337
- package/providers/context/resources/semantic/code-index/classification.md +0 -270
- package/providers/context/resources/semantic/code-index/templates/adapter.md +0 -118
- package/providers/context/resources/semantic/code-index/templates/api-service.md +0 -116
- package/providers/context/resources/semantic/code-index/templates/background-runtime.md +0 -109
- package/providers/context/resources/semantic/code-index/templates/cli-tool.md +0 -129
- package/providers/context/resources/semantic/code-index/templates/contract-source.md +0 -73
- package/providers/context/resources/semantic/code-index/templates/contracts-and-chains.md +0 -81
- package/providers/context/resources/semantic/code-index/templates/cross-module-chain.md +0 -78
- package/providers/context/resources/semantic/code-index/templates/derived-source.md +0 -116
- package/providers/context/resources/semantic/code-index/templates/domain-service.md +0 -109
- package/providers/context/resources/semantic/code-index/templates/event-flow.md +0 -62
- package/providers/context/resources/semantic/code-index/templates/monorepo-container.md +0 -124
- package/providers/context/resources/semantic/code-index/templates/persistence-boundary.md +0 -56
- package/providers/context/resources/semantic/code-index/templates/plugin-extension.md +0 -52
- package/providers/context/resources/semantic/code-index/templates/protocol-boundary.md +0 -88
- package/providers/context/resources/semantic/code-index/templates/sdk-library.md +0 -132
- package/providers/context/resources/semantic/code-index/templates/web-application.md +0 -145
- package/providers/context/resources/semantic/compile/index.md +0 -31
- package/providers/context/resources/views/code-index-audit.yaml +0 -6
- package/providers/context/resources/views/document-optimization-current.yaml +0 -6
- package/providers/context/resources/views/extraction-preview.yaml +0 -6
- package/providers/context/resources/views/structure-current.yaml +0 -6
- package/providers/context/schemas/code-index-audit-decision.schema.json +0 -94
- package/providers/context/schemas/document-optimization-decisions.schema.json +0 -57
- package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
- package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
- package/providers/context/schemas/indexer-contract-overlay-authorization-input.schema.json +0 -32
- package/providers/context/schemas/indexer-contract-overlay-authorization-result.schema.json +0 -121
- package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
- package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
- package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
- package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
- package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
- package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
- package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
- package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
- package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
- package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
- package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
- package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
- package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
- package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
- package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
- package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
- package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
- package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
- package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
- package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
- package/providers/context/schemas/prose-structure-batch.schema.json +0 -35
- package/providers/context/skills/revise-index-output/SKILL.md +0 -12
|
@@ -6,29 +6,23 @@ mediaType: text/markdown
|
|
|
6
6
|
|
|
7
7
|
# Close and build
|
|
8
8
|
|
|
9
|
-
Close deterministically reconciles approved Markdown
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
source, collection, and consumed snapshot hash under `source_inputs`.
|
|
9
|
+
Close deterministically reconciles approved Markdown and current relationship
|
|
10
|
+
inputs into `knowledge/structure.yaml`. It compacts repeated machine fields out
|
|
11
|
+
of each Markdown page and validates the hydrated result. When an approved page
|
|
12
|
+
still points at a captured source asset, close may mechanically replace that
|
|
13
|
+
target with its content-addressed `knowledge/assets` path; it does not rewrite
|
|
14
|
+
reader-visible prose. Candidate fingerprints, Section mappings, old prose
|
|
15
|
+
`source_inputs`, and Review receipts remain outside long-lived knowledge.
|
|
17
16
|
|
|
18
17
|
Do not hand-edit, duplicate, or move fields between Markdown and
|
|
19
18
|
`structure.yaml`. The CLI owns compaction and hydration. A compact Markdown page
|
|
20
19
|
remains readable and keeps enough identity for projection diagnostics; complete
|
|
21
|
-
code
|
|
20
|
+
code lifecycle metadata is intentionally not duplicated.
|
|
22
21
|
|
|
23
22
|
Build runs only after close and verification are current. It writes declared
|
|
24
23
|
packages under `dist/` and records an inventory receipt with added, updated,
|
|
25
24
|
removed, and index changes.
|
|
26
25
|
|
|
27
|
-
When document optimization is enabled, its current revision batch must also be
|
|
28
|
-
resolved before build. Build compiles each approved page through its optional
|
|
29
|
-
`__revision.md` sidecar and records the policy and decision counts in the
|
|
30
|
-
package inventory. Revision sidecars are never emitted as separate knowledge.
|
|
31
|
-
|
|
32
26
|
Run only the current route command, then evaluate again. A successful build
|
|
33
27
|
means the currently declared scope is current; newly captured or newly declared
|
|
34
28
|
targets can reopen earlier graph nodes.
|
|
@@ -40,12 +34,3 @@ review decision in this conversation, together with its reviewed scope. Omit
|
|
|
40
34
|
the section when no report was user-reviewed. Do not reconstruct it by scanning
|
|
41
35
|
`.tmp`, invent a shareable URL, or classify fully managed or force approval as
|
|
42
36
|
user review.
|
|
43
|
-
# Code-index audit record
|
|
44
|
-
|
|
45
|
-
When a package selects approved `codeindex` pages, build requires the current
|
|
46
|
-
batch-level Agent audit to be accepted. The complete report and decision state
|
|
47
|
-
are runtime data below `.tmp/context-runtime/code-index-audit/`; deleting
|
|
48
|
-
`.tmp/` causes Context to recompute and re-audit them. They are not copied into
|
|
49
|
-
`dist/`, uploaded with the package, or committed as knowledge. The package
|
|
50
|
-
inventory stores only the report digest, decision, and compact summary needed
|
|
51
|
-
to identify the audited build.
|
|
@@ -23,7 +23,7 @@ authorization.
|
|
|
23
23
|
Without explicit session-managed authority:
|
|
24
24
|
|
|
25
25
|
- open the report returned by the route;
|
|
26
|
-
- let the user
|
|
26
|
+
- let the user publish or durably omit candidates;
|
|
27
27
|
- apply the exact returned decision payload; and
|
|
28
28
|
- retain the exact report reference and reviewed scope in this conversation for
|
|
29
29
|
the final completion summary.
|
|
@@ -34,10 +34,19 @@ Use it only after the user cannot use the report and explicitly replies with
|
|
|
34
34
|
the exact phrase `强制批准` in the current conversation. It approves the complete
|
|
35
35
|
current scope atomically; no candidate-specific decisions are inferred.
|
|
36
36
|
|
|
37
|
-
With explicit session-managed authority,
|
|
38
|
-
|
|
37
|
+
With explicit session-managed authority, first run the read-only Review HTML
|
|
38
|
+
command, then read the complete generated report and every reader-facing
|
|
39
|
+
Candidate in its current scope. Only after deciding that the whole batch is
|
|
40
|
+
publishable may the Agent run the managed atomic approval command. If any page
|
|
41
|
+
needs repair, do not approve the batch; reopen the owning Author or Composer
|
|
42
|
+
through the current repair route. The authority exists only in the current
|
|
39
43
|
conversation. It does not bypass source permission, validation, close, or
|
|
40
|
-
verify.
|
|
44
|
+
verify, and it is not proof that the report was read.
|
|
41
45
|
|
|
42
46
|
After apply, re-evaluate. Do not infer that close or package output is current.
|
|
43
47
|
Do not persist a duplicate review-report ledger in the workspace.
|
|
48
|
+
|
|
49
|
+
The Review UI names the internal `rejected` decision **Omit** because it is a
|
|
50
|
+
durable content decision, not a request to rewrite the page. When a page needs
|
|
51
|
+
changes, leave the whole batch unapplied and use `context revise` so the owning
|
|
52
|
+
Author or Composer produces a new Candidate through the same lifecycle.
|
|
@@ -164,9 +164,9 @@ capture result:
|
|
|
164
164
|
nested Skill or Schema. These conditional resources are intentionally absent
|
|
165
165
|
from the Route's ordinary `resources.required`.
|
|
166
166
|
|
|
167
|
-
Never
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
Never hand-build document knowledge for a code-only source. Code sources become
|
|
168
|
+
active knowledge only through the current Indexer route returned by
|
|
169
|
+
`context status`.
|
|
170
170
|
|
|
171
171
|
If capture is rejected because another phase or write gate is active, do not
|
|
172
172
|
discard it automatically. Explain the active state from `context status`, follow
|
|
@@ -192,11 +192,9 @@ Stable structure:
|
|
|
192
192
|
summarize each as a single line naming the work and which sources are
|
|
193
193
|
affected. Omit the section entirely when there is no pending follow-up.
|
|
194
194
|
4. Next step. Single command suggestion driven by status: the returned
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
command when code projection is pending. If nothing is pending, say so
|
|
199
|
-
explicitly.
|
|
195
|
+
current Indexer command when semantic structure or authoring work is pending,
|
|
196
|
+
or the CLI-owned capture command when another confirmed source remains. If
|
|
197
|
+
nothing is pending, say so explicitly.
|
|
200
198
|
|
|
201
199
|
Do not include raw CLI diagnostics, agent_hints content, schema names, or phase
|
|
202
200
|
payload identifiers in the report. Those belong in earlier troubleshooting
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
schema: agent-graph.resource.host-action.v1
|
|
2
|
+
id: authorized-indexer-workset-view
|
|
3
|
+
kind: procedure
|
|
4
|
+
mediaType: application/json
|
|
5
|
+
materializer: actions/materialize-indexer-workset-view.yaml
|
|
6
|
+
input:
|
|
7
|
+
protocol: context.indexer.workset-view-materialization-request/v1
|
|
8
|
+
handler: context.materialize-indexer-workset-view/v1
|
|
9
|
+
resource_id: authorized-indexer-workset-view
|
|
10
|
+
workset_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
11
|
+
execution_request_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
12
|
+
view_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
13
|
+
payload_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
14
|
+
request_digest: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
|
15
|
+
description: Runtime-bound authorized evidence for one exact Indexer workset; Context replaces the reserved template before exposing the Route.
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"type": "object",
|
|
11
11
|
"required": ["protocol", "operation", "workset", "composition_input", "final_authority", "execution_request_digest"],
|
|
12
12
|
"properties": {
|
|
13
|
-
"protocol": { "const": "context.indexer.run-request/
|
|
14
|
-
"operation": { "
|
|
13
|
+
"protocol": { "const": "context.indexer.run-request/v2" },
|
|
14
|
+
"operation": { "const": "main-index" },
|
|
15
15
|
"workset": { "type": "object" },
|
|
16
16
|
"composition_input": { "type": "object" },
|
|
17
17
|
"final_authority": { "type": "object" },
|
|
@@ -1,47 +1,313 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "context.indexer.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
3
|
+
"$id": "context.indexer.current-action-input/v1",
|
|
4
|
+
"oneOf": [
|
|
5
|
+
{ "$ref": "#/$defs/providerSelection" },
|
|
6
|
+
{ "$ref": "#/$defs/providerResolution" },
|
|
7
|
+
{ "$ref": "#/$defs/providerProgramAuthorization" },
|
|
8
|
+
{ "$ref": "#/$defs/providerFinalization" },
|
|
9
|
+
{ "$ref": "#/$defs/partition" },
|
|
10
|
+
{ "$ref": "#/$defs/author" },
|
|
11
|
+
{ "$ref": "#/$defs/postAuthor" },
|
|
12
|
+
{ "$ref": "#/$defs/structureReview" },
|
|
13
|
+
{ "$ref": "#/$defs/layoutConfirmation" }
|
|
13
14
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"instruction_payload_digest": { "$ref": "#/$defs/digest" },
|
|
18
|
-
"run_result": {
|
|
15
|
+
"$defs": {
|
|
16
|
+
"string": { "type": "string", "minLength": 1 },
|
|
17
|
+
"providerSelection": {
|
|
19
18
|
"type": "object",
|
|
20
|
-
"
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": ["stage", "host_visible_skills", "indexers"],
|
|
21
21
|
"properties": {
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
22
|
+
"stage": { "const": "provider-selection" },
|
|
23
|
+
"host_visible_skills": {
|
|
24
|
+
"type": "array",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["skill", "version", "source_type"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"skill": { "$ref": "#/$defs/string" },
|
|
31
|
+
"version": { "oneOf": [{ "$ref": "#/$defs/string" }, { "type": "null" }] },
|
|
32
|
+
"source_type": {
|
|
33
|
+
"enum": ["community-plugin", "workspace", "installed-plugin", "marketplace"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"indexers": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 1,
|
|
41
|
+
"items": { "type": "object" }
|
|
42
|
+
}
|
|
25
43
|
}
|
|
26
44
|
},
|
|
27
|
-
"
|
|
45
|
+
"providerResolution": {
|
|
28
46
|
"type": "object",
|
|
29
47
|
"additionalProperties": false,
|
|
30
|
-
"required": ["
|
|
48
|
+
"required": ["stage", "result"],
|
|
31
49
|
"properties": {
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
"stage": { "const": "provider-resolution" },
|
|
51
|
+
"result": { "type": "object" },
|
|
52
|
+
"managed_output": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
"required": ["ref", "digest", "value"],
|
|
56
|
+
"properties": {
|
|
57
|
+
"ref": { "$ref": "#/$defs/string" },
|
|
58
|
+
"digest": { "$ref": "#/$defs/string" },
|
|
59
|
+
"value": {}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
37
62
|
}
|
|
38
63
|
},
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
64
|
+
"providerFinalization": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["stage"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"stage": { "const": "provider-finalization" }
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"providerProgramAuthorization": {
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"required": ["stage", "decision"],
|
|
76
|
+
"properties": {
|
|
77
|
+
"stage": { "const": "provider-program-authorization" },
|
|
78
|
+
"decision": { "enum": ["approved", "rejected"] }
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"partition": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"required": ["stage", "outcome", "unit_type", "partition_axis", "groups", "excluded", "unsupported"],
|
|
85
|
+
"properties": {
|
|
86
|
+
"stage": { "const": "partition" },
|
|
87
|
+
"outcome": { "enum": ["complete", "failed"] },
|
|
88
|
+
"unit_type": { "$ref": "#/$defs/string" },
|
|
89
|
+
"partition_axis": { "$ref": "#/$defs/string" },
|
|
90
|
+
"groups": { "type": "array", "items": { "$ref": "#/$defs/partitionGroup" } },
|
|
91
|
+
"excluded": { "type": "array", "items": { "$ref": "#/$defs/excluded" } },
|
|
92
|
+
"unsupported": { "type": "array", "items": { "$ref": "#/$defs/unsupported" } },
|
|
93
|
+
"failure": { "$ref": "#/$defs/failure" }
|
|
94
|
+
},
|
|
95
|
+
"allOf": [
|
|
96
|
+
{
|
|
97
|
+
"if": { "properties": { "outcome": { "const": "failed" } } },
|
|
98
|
+
"then": { "required": ["failure"] }
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
"partitionGroup": {
|
|
103
|
+
"type": "object",
|
|
104
|
+
"additionalProperties": false,
|
|
105
|
+
"required": ["key", "title", "reader_task", "subject", "subject_intent", "members", "questions", "question_targets", "outline"],
|
|
106
|
+
"properties": {
|
|
107
|
+
"key": { "$ref": "#/$defs/string" },
|
|
108
|
+
"title": { "$ref": "#/$defs/string" },
|
|
109
|
+
"reader_task": { "$ref": "#/$defs/string" },
|
|
110
|
+
"subject": {
|
|
111
|
+
"oneOf": [
|
|
112
|
+
{ "$ref": "#/$defs/string" },
|
|
113
|
+
{
|
|
114
|
+
"type": "object",
|
|
115
|
+
"additionalProperties": false,
|
|
116
|
+
"required": ["namespace", "kind", "local_key"],
|
|
117
|
+
"properties": {
|
|
118
|
+
"namespace": { "$ref": "#/$defs/string" },
|
|
119
|
+
"kind": { "$ref": "#/$defs/string" },
|
|
120
|
+
"local_key": { "$ref": "#/$defs/string" }
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
"subject_intent": { "enum": ["primary", "enrich-or-independent"] },
|
|
126
|
+
"members": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/string" } },
|
|
127
|
+
"questions": { "type": "array", "items": { "$ref": "#/$defs/string" } },
|
|
128
|
+
"question_targets": { "type": "array", "items": { "$ref": "#/$defs/questionTarget" } },
|
|
129
|
+
"outline": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/string" } }
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"questionTarget": {
|
|
133
|
+
"type": "object",
|
|
134
|
+
"additionalProperties": false,
|
|
135
|
+
"required": ["target", "role"],
|
|
136
|
+
"properties": {
|
|
137
|
+
"target": { "$ref": "#/$defs/string" },
|
|
138
|
+
"role": { "enum": ["primary-carrier", "enricher"] }
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"excluded": {
|
|
142
|
+
"type": "object",
|
|
143
|
+
"additionalProperties": false,
|
|
144
|
+
"required": ["item", "reason_code"],
|
|
145
|
+
"properties": {
|
|
146
|
+
"item": { "$ref": "#/$defs/string" },
|
|
147
|
+
"reason_code": { "$ref": "#/$defs/string" }
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"unsupported": {
|
|
151
|
+
"type": "object",
|
|
152
|
+
"additionalProperties": false,
|
|
153
|
+
"required": ["item", "missing_capabilities"],
|
|
154
|
+
"properties": {
|
|
155
|
+
"item": { "$ref": "#/$defs/string" },
|
|
156
|
+
"missing_capabilities": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/string" } }
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"failure": {
|
|
160
|
+
"type": "object",
|
|
161
|
+
"additionalProperties": false,
|
|
162
|
+
"required": ["code", "message", "unassigned"],
|
|
163
|
+
"properties": {
|
|
164
|
+
"code": { "enum": ["unsupported-domain", "no-stable-axis", "insufficient-identity-facts", "invalid-input", "strategy-failed"] },
|
|
165
|
+
"message": { "$ref": "#/$defs/string" },
|
|
166
|
+
"unassigned": { "type": "array", "items": { "$ref": "#/$defs/string" } },
|
|
167
|
+
"missing_capabilities": { "type": "array", "items": { "$ref": "#/$defs/string" } },
|
|
168
|
+
"missing_sources": { "type": "array", "items": { "$ref": "#/$defs/string" } }
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
"author": {
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": false,
|
|
174
|
+
"required": ["stage", "group_key", "outcome", "target_resolutions", "sections", "member_dispositions", "material_gaps", "diagnostics"],
|
|
175
|
+
"properties": {
|
|
176
|
+
"stage": { "const": "author" },
|
|
177
|
+
"group_key": { "$ref": "#/$defs/string" },
|
|
178
|
+
"outcome": { "enum": ["publish", "catalog-only", "request-material", "unsupported"] },
|
|
179
|
+
"artifact_intent": { "$ref": "#/$defs/string" },
|
|
180
|
+
"policy": { "$ref": "#/$defs/string" },
|
|
181
|
+
"target_resolutions": { "type": "array", "items": { "$ref": "#/$defs/targetResolution" } },
|
|
182
|
+
"title": { "$ref": "#/$defs/string" },
|
|
183
|
+
"summary": { "$ref": "#/$defs/string" },
|
|
184
|
+
"sections": { "type": "array", "items": { "$ref": "#/$defs/authorSection" } },
|
|
185
|
+
"member_dispositions": { "type": "array", "items": { "$ref": "#/$defs/memberDisposition" } },
|
|
186
|
+
"material_gaps": { "type": "array", "items": { "$ref": "#/$defs/materialGap" } },
|
|
187
|
+
"diagnostics": { "type": "array", "items": { "$ref": "#/$defs/diagnostic" } }
|
|
188
|
+
}
|
|
189
|
+
},
|
|
190
|
+
"targetResolution": {
|
|
191
|
+
"type": "object",
|
|
192
|
+
"additionalProperties": false,
|
|
193
|
+
"required": ["target", "disposition"],
|
|
194
|
+
"properties": {
|
|
195
|
+
"target": { "$ref": "#/$defs/string" },
|
|
196
|
+
"disposition": { "enum": ["reuse-existing", "create-independent", "unresolved"] },
|
|
197
|
+
"reason_code": { "$ref": "#/$defs/string" }
|
|
198
|
+
}
|
|
199
|
+
},
|
|
200
|
+
"authorSection": {
|
|
201
|
+
"type": "object",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"required": ["key", "heading", "markdown", "source_items", "facts", "answers"],
|
|
204
|
+
"properties": {
|
|
205
|
+
"key": { "$ref": "#/$defs/string" },
|
|
206
|
+
"heading": { "$ref": "#/$defs/string" },
|
|
207
|
+
"markdown": { "$ref": "#/$defs/string" },
|
|
208
|
+
"source_items": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/string" } },
|
|
209
|
+
"facts": { "type": "array", "items": { "$ref": "#/$defs/string" } },
|
|
210
|
+
"answers": { "type": "array", "items": { "$ref": "#/$defs/string" } }
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"memberDisposition": {
|
|
214
|
+
"type": "object",
|
|
215
|
+
"additionalProperties": false,
|
|
216
|
+
"required": ["item", "state"],
|
|
217
|
+
"properties": {
|
|
218
|
+
"item": { "$ref": "#/$defs/string" },
|
|
219
|
+
"state": { "enum": ["covered", "catalog-only", "unsupported"] },
|
|
220
|
+
"section": { "$ref": "#/$defs/string" },
|
|
221
|
+
"reason_code": { "$ref": "#/$defs/string" }
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
"materialGap": {
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"required": ["question", "source_hints"],
|
|
228
|
+
"properties": {
|
|
229
|
+
"question": { "$ref": "#/$defs/string" },
|
|
230
|
+
"source_hints": { "type": "array", "items": { "$ref": "#/$defs/string" } }
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"diagnostic": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"required": ["code", "message"],
|
|
237
|
+
"properties": {
|
|
238
|
+
"code": { "$ref": "#/$defs/string" },
|
|
239
|
+
"message": { "$ref": "#/$defs/string" },
|
|
240
|
+
"target": { "$ref": "#/$defs/string" }
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
"postAuthor": {
|
|
244
|
+
"type": "object",
|
|
245
|
+
"additionalProperties": false,
|
|
246
|
+
"required": ["stage", "outcome", "proposals", "diagnostics"],
|
|
247
|
+
"properties": {
|
|
248
|
+
"stage": { "const": "post-author" },
|
|
249
|
+
"outcome": { "enum": ["complete", "failed"] },
|
|
250
|
+
"proposals": {
|
|
251
|
+
"type": "array",
|
|
252
|
+
"items": {
|
|
253
|
+
"type": "object",
|
|
254
|
+
"additionalProperties": false,
|
|
255
|
+
"required": ["target", "artifact_kind", "title", "summary", "sections"],
|
|
256
|
+
"properties": {
|
|
257
|
+
"target": { "$ref": "#/$defs/string" },
|
|
258
|
+
"artifact_kind": { "$ref": "#/$defs/string" },
|
|
259
|
+
"title": { "$ref": "#/$defs/string" },
|
|
260
|
+
"summary": { "$ref": "#/$defs/string" },
|
|
261
|
+
"sections": {
|
|
262
|
+
"type": "array",
|
|
263
|
+
"minItems": 1,
|
|
264
|
+
"items": {
|
|
265
|
+
"type": "object",
|
|
266
|
+
"additionalProperties": false,
|
|
267
|
+
"required": ["key", "heading", "markdown", "source_refs"],
|
|
268
|
+
"properties": {
|
|
269
|
+
"key": { "$ref": "#/$defs/string" },
|
|
270
|
+
"heading": { "$ref": "#/$defs/string" },
|
|
271
|
+
"markdown": { "$ref": "#/$defs/string" },
|
|
272
|
+
"source_refs": {
|
|
273
|
+
"type": "array",
|
|
274
|
+
"minItems": 1,
|
|
275
|
+
"items": { "$ref": "#/$defs/string" }
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"diagnostics": { "type": "array", "items": { "$ref": "#/$defs/diagnostic" } }
|
|
284
|
+
},
|
|
285
|
+
"allOf": [
|
|
286
|
+
{
|
|
287
|
+
"if": { "properties": { "outcome": { "const": "failed" } } },
|
|
288
|
+
"then": { "properties": { "diagnostics": { "minItems": 1 } } }
|
|
289
|
+
}
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
"structureReview": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"additionalProperties": false,
|
|
295
|
+
"required": ["stage", "decision"],
|
|
296
|
+
"properties": {
|
|
297
|
+
"stage": { "const": "structure-review" },
|
|
298
|
+
"decision": { "enum": ["approved", "request-adjustment"] },
|
|
299
|
+
"feedback": { "$ref": "#/$defs/string" }
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"layoutConfirmation": {
|
|
303
|
+
"type": "object",
|
|
304
|
+
"additionalProperties": false,
|
|
305
|
+
"required": ["stage", "decision"],
|
|
306
|
+
"properties": {
|
|
307
|
+
"stage": { "const": "layout-confirmation" },
|
|
308
|
+
"decision": { "enum": ["approved", "rejected"] },
|
|
309
|
+
"feedback": { "$ref": "#/$defs/string" }
|
|
310
|
+
}
|
|
45
311
|
}
|
|
46
312
|
}
|
|
47
313
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "context.indexer.authorized-workset-view/v1",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"protocol",
|
|
8
|
+
"operation",
|
|
9
|
+
"stage",
|
|
10
|
+
"workset_digest",
|
|
11
|
+
"execution_request_digest",
|
|
12
|
+
"source_ref",
|
|
13
|
+
"module_ref",
|
|
14
|
+
"projection_input_digests",
|
|
15
|
+
"items",
|
|
16
|
+
"view_digest"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"protocol": { "const": "context.indexer.authorized-workset-view/v1" },
|
|
20
|
+
"operation": { "const": "main-index" },
|
|
21
|
+
"stage": { "enum": ["partition", "author"] },
|
|
22
|
+
"workset_digest": { "$ref": "#/$defs/digest" },
|
|
23
|
+
"execution_request_digest": { "$ref": "#/$defs/digest" },
|
|
24
|
+
"source_ref": { "type": "string", "minLength": 1 },
|
|
25
|
+
"module_ref": { "type": ["string", "null"] },
|
|
26
|
+
"projection_input_digests": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 1,
|
|
29
|
+
"uniqueItems": true,
|
|
30
|
+
"items": { "$ref": "#/$defs/digest" }
|
|
31
|
+
},
|
|
32
|
+
"items": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"minItems": 1,
|
|
35
|
+
"items": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"additionalProperties": false,
|
|
38
|
+
"required": ["ref", "category", "provenance", "value", "item_digest"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"ref": { "type": "string", "minLength": 1 },
|
|
41
|
+
"category": { "type": "string", "minLength": 1 },
|
|
42
|
+
"provenance": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["protocol", "digest"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"protocol": { "type": "string", "minLength": 1 },
|
|
48
|
+
"digest": { "$ref": "#/$defs/digest" },
|
|
49
|
+
"container_ref": { "type": "string", "minLength": 1 }
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"value": {},
|
|
53
|
+
"item_digest": { "$ref": "#/$defs/digest" }
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"view_digest": { "$ref": "#/$defs/digest" }
|
|
58
|
+
},
|
|
59
|
+
"$defs": {
|
|
60
|
+
"digest": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"pattern": "^sha256:[a-f0-9]{64}$"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|