@c4a/context-cli 0.7.1 → 0.7.5

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 (161) hide show
  1. package/README.md +18 -39
  2. package/README.zh-CN.md +13 -27
  3. package/cli.js +64945 -81995
  4. package/indexers/bundles/context-code-indexer/SKILL.md +30 -3
  5. package/indexers/bundles/context-code-indexer/context-indexer.yaml +3 -8
  6. package/indexers/bundles/context-code-indexer/references/indexer.md +110 -7
  7. package/indexers/bundles/context-code-indexer/references/metrics.md +143 -37
  8. package/indexers/bundles/context-code-indexer/templates/adapter-integration.md +2 -2
  9. package/indexers/bundles/context-code-indexer/templates/component-library.md +8 -0
  10. package/indexers/bundles/context-code-indexer/templates/gateway-facade.md +16 -0
  11. package/indexers/bundles/context-markdown-indexer/SKILL.md +13 -3
  12. package/indexers/bundles/context-markdown-indexer/context-indexer.yaml +20 -7
  13. package/indexers/bundles/context-markdown-indexer/references/indexer.md +33 -4
  14. package/indexers/bundles/context-markdown-indexer/references/semantic-planning.md +30 -14
  15. package/indexers/bundles/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  16. package/indexers/bundles/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  17. package/indexers/bundles/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  18. package/indexers/bundles/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  19. package/indexers/contracts/operator-contract.json +2 -2
  20. package/indexers/contracts/profile-contract.json +3819 -454
  21. package/indexers/release-manifest.json +22 -22
  22. package/package.json +12 -2
  23. package/plugins/VERSION +1 -1
  24. package/plugins/claude/.claude-plugin/plugin.json +1 -1
  25. package/plugins/claude/commands/context.md +56 -107
  26. package/plugins/codex/.codex-plugin/plugin.json +2 -2
  27. package/plugins/codex/skills/context/SKILL.md +56 -107
  28. package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
  29. package/plugins/cursor/commands/c4a-context.md +56 -107
  30. package/plugins/skills/context/SKILL.md +56 -107
  31. package/plugins/skills/context-code-indexer/SKILL.md +30 -3
  32. package/plugins/skills/context-code-indexer/context-indexer.yaml +3 -8
  33. package/plugins/skills/context-code-indexer/references/indexer.md +110 -7
  34. package/plugins/skills/context-code-indexer/references/metrics.md +143 -37
  35. package/plugins/skills/context-code-indexer/templates/adapter-integration.md +2 -2
  36. package/plugins/skills/context-code-indexer/templates/component-library.md +8 -0
  37. package/plugins/skills/context-code-indexer/templates/gateway-facade.md +16 -0
  38. package/plugins/skills/context-markdown-indexer/SKILL.md +13 -3
  39. package/plugins/skills/context-markdown-indexer/context-indexer.yaml +20 -7
  40. package/plugins/skills/context-markdown-indexer/references/indexer.md +33 -4
  41. package/plugins/skills/context-markdown-indexer/references/semantic-planning.md +30 -14
  42. package/plugins/skills/context-markdown-indexer/references/structure-and-artifacts.md +6 -0
  43. package/plugins/skills/context-markdown-indexer/tests/fixtures/anonymous.json +1 -1
  44. package/plugins/skills/context-markdown-indexer/tests/fixtures/profiles.json +13 -13
  45. package/plugins/skills/context-markdown-indexer/tests/fixtures/routing.json +122 -0
  46. package/providers/context/actions/advance-current-indexer-lifecycle.yaml +6 -0
  47. package/providers/context/actions/authorize-current-indexer-provider-program.yaml +6 -0
  48. package/providers/context/actions/configure-indexer-providers.yaml +1 -1
  49. package/providers/context/actions/finalize-current-indexer-provider-selection.yaml +5 -0
  50. package/providers/context/actions/materialize-indexer-workset-view.yaml +7 -0
  51. package/providers/context/actions/resolve-current-indexer-gate.yaml +6 -0
  52. package/providers/context/actions/resolve-current-indexer-provider.yaml +6 -0
  53. package/providers/context/actions/run-indexer-lifecycle.yaml +0 -1
  54. package/providers/context/actions/run-indexer-post-author-composer.yaml +2 -2
  55. package/providers/context/codes.yaml +8 -22
  56. package/providers/context/graphs/indexer.yaml +95 -564
  57. package/providers/context/graphs/workspace.yaml +5 -43
  58. package/providers/context/manifest.json +119 -678
  59. package/providers/context/provider.yaml +1 -1
  60. package/providers/context/resources/dialogue/human-gates.md +3 -3
  61. package/providers/context/resources/dialogue/knowledge-review.md +6 -3
  62. package/providers/context/resources/manuals/reference/package-templates.md +2 -3
  63. package/providers/context/resources/manuals/reference/project-api.md +52 -986
  64. package/providers/context/resources/procedures/close-and-build.md +8 -23
  65. package/providers/context/resources/procedures/knowledge-review.md +17 -5
  66. package/providers/context/resources/procedures/source-capture-detailed.md +6 -8
  67. package/providers/context/resources/views/authorized-indexer-workset-view.yaml +15 -0
  68. package/providers/context/resources/views/resolved-indexer-instructions.yaml +2 -4
  69. package/providers/context/schemas/indexer-agent-step-input.schema.json +71 -21
  70. package/providers/context/schemas/indexer-agent-step-result.schema.json +385 -32
  71. package/providers/context/schemas/indexer-authorized-workset-view.schema.json +65 -0
  72. package/providers/context/schemas/indexer-main-lifecycle-input.schema.json +13 -20
  73. package/providers/context/schemas/indexer-main-lifecycle-output.schema.json +17 -2
  74. package/providers/context/schemas/indexer-materialize-request.schema.json +4 -8
  75. package/providers/context/schemas/indexer-materialized-resource.schema.json +8 -1
  76. package/providers/context/schemas/indexer-overlay-question-proposal-input.schema.json +51 -2
  77. package/providers/context/schemas/indexer-workset-view-materialization-request.schema.json +35 -0
  78. package/providers/context/skills/authorize-current-indexer-provider-program/SKILL.md +20 -0
  79. package/providers/context/skills/configure-indexer-providers/SKILL.md +47 -33
  80. package/providers/context/skills/resolve-current-indexer-gate/SKILL.md +27 -0
  81. package/providers/context/skills/resolve-current-indexer-provider/SKILL.md +20 -0
  82. package/providers/context/skills/run-indexer-agent-step/SKILL.md +49 -10
  83. package/providers/context/skills/run-indexer-lifecycle/SKILL.md +19 -13
  84. package/providers/context/skills/run-indexer-post-author-composer/SKILL.md +52 -11
  85. package/docs/document-optimization.md +0 -82
  86. package/docs/document-optimization.zh-CN.md +0 -70
  87. package/indexers/capability-manifest.json +0 -35
  88. package/indexers/contracts/hard-rule-conformance.json +0 -2644
  89. package/providers/context/actions/accept-main-index-run.yaml +0 -7
  90. package/providers/context/actions/accept-material-answer-run.yaml +0 -7
  91. package/providers/context/actions/accept-post-author-composer-run.yaml +0 -7
  92. package/providers/context/actions/actualize-material-answer-bindings.yaml +0 -8
  93. package/providers/context/actions/audit-material-gap-state.yaml +0 -8
  94. package/providers/context/actions/audit-projected-artifact-fan-out.yaml +0 -8
  95. package/providers/context/actions/build-main-index-author-worksets.yaml +0 -7
  96. package/providers/context/actions/build-main-index-catalog-fallback.yaml +0 -7
  97. package/providers/context/actions/build-main-index-partition-worksets.yaml +0 -7
  98. package/providers/context/actions/build-material-question-workset.yaml +0 -7
  99. package/providers/context/actions/build-post-author-composer-worksets.yaml +0 -7
  100. package/providers/context/actions/build-question-target-inventory.yaml +0 -7
  101. package/providers/context/actions/build-subject-catalog.yaml +0 -7
  102. package/providers/context/actions/build-target-resolution-views.yaml +0 -7
  103. package/providers/context/actions/checkpoint-material-answer-review.yaml +0 -8
  104. package/providers/context/actions/checkpoint-material-gaps.yaml +0 -8
  105. package/providers/context/actions/close-indexer-approved-knowledge.yaml +0 -8
  106. package/providers/context/actions/compose-indexer-post-author-fragments.yaml +0 -7
  107. package/providers/context/actions/converge-main-index-partition-run.yaml +0 -7
  108. package/providers/context/actions/evaluate-material-gaps.yaml +0 -8
  109. package/providers/context/actions/fail-main-index-run.yaml +0 -7
  110. package/providers/context/actions/fail-material-answer-run.yaml +0 -7
  111. package/providers/context/actions/fail-post-author-composer-run.yaml +0 -7
  112. package/providers/context/actions/inspect-index-candidate-review-readiness.yaml +0 -8
  113. package/providers/context/actions/inspect-index-profile-failure.yaml +0 -7
  114. package/providers/context/actions/inspect-material-answer-review.yaml +0 -8
  115. package/providers/context/actions/observe-main-index-run-ledger.yaml +0 -7
  116. package/providers/context/actions/observe-material-answer-runs.yaml +0 -7
  117. package/providers/context/actions/observe-post-author-composer-worksets.yaml +0 -7
  118. package/providers/context/actions/override-index-profile-audit.yaml +0 -7
  119. package/providers/context/actions/prepare-main-index-run-ledger.yaml +0 -7
  120. package/providers/context/actions/prepare-material-answer-runs.yaml +0 -7
  121. package/providers/context/actions/reconcile-indexer-results.yaml +0 -7
  122. package/providers/context/actions/reconcile-review-identities.yaml +0 -5
  123. package/providers/context/actions/record-index-profile-revision.yaml +0 -7
  124. package/providers/context/actions/report-index-profile-failure.yaml +0 -7
  125. package/providers/context/actions/resolve-effective-composers.yaml +0 -7
  126. package/providers/context/actions/review-material-answer-candidate.yaml +0 -8
  127. package/providers/context/actions/revise-document.yaml +0 -5
  128. package/providers/context/actions/revise-index-output.yaml +0 -7
  129. package/providers/context/actions/run-material-answer-indexers.yaml +0 -7
  130. package/providers/context/actions/start-main-index-run.yaml +0 -7
  131. package/providers/context/actions/start-material-answer-run.yaml +0 -7
  132. package/providers/context/actions/start-post-author-composer-run.yaml +0 -7
  133. package/providers/context/resources/procedures/document-revision.md +0 -36
  134. package/providers/context/resources/views/document-optimization-current.yaml +0 -6
  135. package/providers/context/schemas/indexer-candidate-review-readiness-input.schema.json +0 -46
  136. package/providers/context/schemas/indexer-candidate-review-readiness-output.schema.json +0 -104
  137. package/providers/context/schemas/indexer-lifecycle-continuation.schema.json +0 -15
  138. package/providers/context/schemas/indexer-material-answer-lifecycle-input.schema.json +0 -90
  139. package/providers/context/schemas/indexer-material-answer-lifecycle-output.schema.json +0 -80
  140. package/providers/context/schemas/indexer-material-answer-review-inspection-input.schema.json +0 -32
  141. package/providers/context/schemas/indexer-material-answer-review-inspection-output.schema.json +0 -32
  142. package/providers/context/schemas/indexer-material-answer-review-resolution-input.schema.json +0 -19
  143. package/providers/context/schemas/indexer-material-answer-review-resolution-output.schema.json +0 -87
  144. package/providers/context/schemas/indexer-material-gap-lifecycle-input.schema.json +0 -86
  145. package/providers/context/schemas/indexer-material-gap-lifecycle-output.schema.json +0 -19
  146. package/providers/context/schemas/indexer-post-author-fragment-request.schema.json +0 -26
  147. package/providers/context/schemas/indexer-post-author-fragment-result.schema.json +0 -18
  148. package/providers/context/schemas/indexer-post-author-lifecycle-input.schema.json +0 -94
  149. package/providers/context/schemas/indexer-post-author-lifecycle-output.schema.json +0 -72
  150. package/providers/context/schemas/indexer-profile-failure-inspection-input.schema.json +0 -13
  151. package/providers/context/schemas/indexer-profile-failure-inspection-result.schema.json +0 -19
  152. package/providers/context/schemas/indexer-profile-failure-report-input.schema.json +0 -22
  153. package/providers/context/schemas/indexer-profile-failure-report-result.schema.json +0 -49
  154. package/providers/context/schemas/indexer-profile-override-decision.schema.json +0 -20
  155. package/providers/context/schemas/indexer-profile-override-result.schema.json +0 -49
  156. package/providers/context/schemas/indexer-profile-revision-agent-input.schema.json +0 -18
  157. package/providers/context/schemas/indexer-profile-revision-record-input.schema.json +0 -31
  158. package/providers/context/schemas/indexer-profile-revision-record-result.schema.json +0 -45
  159. package/providers/context/schemas/indexer-result-reconciliation-input.schema.json +0 -59
  160. package/providers/context/schemas/indexer-result-reconciliation-output.schema.json +0 -43
  161. package/providers/context/skills/revise-index-output/SKILL.md +0 -12
@@ -1,70 +0,0 @@
1
- # 文档修订页
2
-
3
- 新工作区默认开启来源约束的编辑修订。它是面向来源可追溯正文的构建阶段,在不修改
4
- 正式知识页、不补写事实的前提下,提高发布内容的知识价值和可读性。
5
-
6
- 初始化时如需关闭:
7
-
8
- ```bash
9
- context init context --no-optimize-docs
10
- ```
11
-
12
- 已有工作区保持当前设置,可显式调整:
13
-
14
- ```bash
15
- context optimize-docs enable
16
- context optimize-docs disable
17
- context status --format json
18
- ```
19
-
20
- 开启后,工作流只规划新增或发生变化的来源 Section。CLI 为每个 Section 枚举机械
21
- 信号和允许动作;Agent 可以保持不变、局部修复、在同一来源边界内重排,或在 CLI
22
- 确认其属于无知识价值内容时省略。只有实际变化的页面才在原文旁生成完整修订页:
23
-
24
- ```text
25
- knowledge/guides/setup.md
26
- knowledge/guides/setup__revision.md
27
- ```
28
-
29
- `__revision.md` 是保留后缀。默认知识发现、结构、检索和包选择都排除修订页;
30
- 校验和构建根据文件名把它关联回同目录原文,并仍按原文件名输出。修订页只额外
31
- 记录无法推导的原文摘要;原文路径和修订 Section 由文件名与正文差异推导。完整修订
32
- 页中未变化的 Section 直接推导为 `keep`;整页都不修改时,运行时只保存一个页级负
33
- 缓存键,不重复保存改写正文或 Section 元数据。
34
-
35
- 局部修复适用于 Markdown、空白、空表格行,以及来源已经说明用途的链接名称。结构
36
- 重排适用于宽表格、长单元格、图片与链接混排或过长段落,但不能跨 Section 搬运事实。
37
- 未回答的问题集合、空占位、没有结论的草稿、重复内容和只有旧稿的 Section 可以省略;
38
- 有答案的问句、有影响和动作的限制、带替代方案的废弃说明仍属于知识。链接目标、图片、
39
- 代码、命令、数字、标识符、条件和来源引用由 CLI 机械保护。事实时效、职责或敏感值不
40
- 明确时,CLI 会把相关 Section 集中列入计划的 `input_requests`,工作流只询问用户一次,
41
- 不会自动省略。
42
-
43
- 机械信号只是审阅线索,不代表最终结论,也不是完整的可读性检查。Agent 必须阅读每个
44
- Section;若对带信号的 Section 选择 `keep`,需要在本次决策中逐段说明信号为何误报,
45
- 或修改为何会损害来源忠实度,并在说明中逐一写出对应的信号 code,供 CLI 机械核对覆盖
46
- 是否完整。CLI 会拒绝没有具体说明或漏掉信号的 `keep`,但这段说明只用于当前决策审计,
47
- 不会写入正式知识、修订页或构建产物。部分信号误报也不能成为整批保持不变的理由。
48
-
49
- 时间、成本、工作量、批次规模或赶进度都不是 `keep`、跳过或延期的有效理由。全托管
50
- 模式下,Agent 应自动完成所有安全的局部修复、结构重排和允许省略,直到当前批次收敛;
51
- 只有确实无法从当前 Section 或来源证据取得的语义信息,才集中向用户询问一次。片段多
52
- 不能降低质量标准,也不能把整批默认判为 `keep`。
53
-
54
- 工作区采集、审核或构建完成后,用户可以直接通过对话要求修正某篇知识。Agent
55
- 先使用标题、正式知识路径或 ViewRef 启动修订:
56
-
57
- ```bash
58
- context revise "<标题、正式知识路径或 ViewRef>" --format json
59
- ```
60
-
61
- CLI 只在目标唯一时创建或复用该页修订,并由 Agent Graph 返回
62
- `route.document-revision.requested`。若有多个候选,Agent 必须依据当前对话选定,
63
- 否则询问用户。Agent 只在已有 `context:section` 内编辑面向读者的正文,不修改来源
64
- 信息、Section 边界和受保护值,随后运行 `context optimize-docs validate`。校验成功后,
65
- 请求自动结束;若产物因此过期,下一条 Route 会直接提示重新构建。即使工作区
66
- 此前关闭了整库文档编译优化,这个入口也只激活目标页面,不会让其他页面进入
67
- 待优化队列。上游内容变化后,旧修订页会成为冲突,不会被静默应用。
68
-
69
- 关闭后,修订页会被移动到 Context 的运行时恢复目录,下一次构建直接使用正式
70
- 知识。
@@ -1,35 +0,0 @@
1
- {
2
- "protocol": "context.indexer.release-capability-manifest/v1",
3
- "package": "@c4a/context-cli",
4
- "version": "0.7.1",
5
- "channel": "latest",
6
- "dist_tag": "latest",
7
- "capabilities": [
8
- {
9
- "id": "resource-protocols",
10
- "state": "ready",
11
- "required_milestone": "0.7.1"
12
- },
13
- {
14
- "id": "provider-lifecycle",
15
- "state": "ready",
16
- "required_milestone": "0.7.0-preview.1"
17
- },
18
- {
19
- "id": "code-indexer",
20
- "state": "ready",
21
- "required_milestone": "0.7.0-preview.2"
22
- },
23
- {
24
- "id": "markdown-indexer",
25
- "state": "ready",
26
- "required_milestone": "0.7.0-preview.3"
27
- },
28
- {
29
- "id": "phase-g-cutover",
30
- "state": "ready",
31
- "required_milestone": "0.7.0"
32
- }
33
- ],
34
- "manifest_digest": "sha256:afb293c86a9c82d8f26a542b0ae6547faa661015354e1cf31892ce6f3853dcbc"
35
- }