@c4a/context 0.7.13 → 0.7.14
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/docs/guides/knowledge-updates.md +44 -2
- package/docs/guides/package-outputs.md +21 -0
- package/docs/reference/indexer-provider-protocol.md +4 -2
- package/index.js +4 -4
- package/package.json +1 -1
- package/templates/package-templates/kb/skills/knowledge-query/SKILL.md +17 -0
- package/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md +13 -0
|
@@ -194,6 +194,48 @@ coverage by mechanically placing every new page under an unrelated catch-all.
|
|
|
194
194
|
Build reports missing bindings for the Agent to resolve; it does not classify
|
|
195
195
|
content. Moving a menu entry does not change the article URL.
|
|
196
196
|
|
|
197
|
+
### Preserve established navigation intent
|
|
198
|
+
|
|
199
|
+
Before placing new knowledge, read the workspace's AGENTS.md, current
|
|
200
|
+
`src/knowledge-map.yaml`, existing overview pages and relevant category/article
|
|
201
|
+
bodies. Reuse any settled directory intent in the current plan. Establish what
|
|
202
|
+
each affected category helps readers do and why adjacent categories are separate;
|
|
203
|
+
do not infer this from labels alone. Read only affected branches and enough
|
|
204
|
+
neighboring content to distinguish them, not the entire library on every update.
|
|
205
|
+
If intent remains ambiguous, state the proposed interpretation in the plan.
|
|
206
|
+
|
|
207
|
+
Prefer, in order: revise an existing article; add a page to a matching category;
|
|
208
|
+
add a coherent child category; propose a top-level change only when existing
|
|
209
|
+
categories cannot serve a distinct, lasting reader need. Do not create a top-level
|
|
210
|
+
category merely because a source, repository, product, team or batch is new.
|
|
211
|
+
For example, a new assistant's usage guide, frontend integration and runtime
|
|
212
|
+
architecture can belong in existing usage, frontend and backend categories, with
|
|
213
|
+
cross-links for the shared product. Keep them together only when the site's
|
|
214
|
+
established organizing principle supports that choice.
|
|
215
|
+
|
|
216
|
+
In the work-start report or current plan, briefly state the affected articles'
|
|
217
|
+
intended placements and reused category intent. For proposed top-level additions,
|
|
218
|
+
renames, removals or changes of purpose, show the before/after tree, why reuse is
|
|
219
|
+
insufficient, affected existing pages and reading order. Present that change for
|
|
220
|
+
human review before applying it. This uses the existing report feedback where
|
|
221
|
+
available; do not add a new CLI state, schema field or routine per-article gate.
|
|
222
|
+
Explicit user approval of that concrete structure is sufficient; do not ask again.
|
|
223
|
+
General permission to write knowledge or organize batches is not approval to
|
|
224
|
+
change the site's top-level organization. If the need emerges after report
|
|
225
|
+
approval, update the same plan and ask about that structural change only; continue
|
|
226
|
+
independent work within the approved organization.
|
|
227
|
+
|
|
228
|
+
Before delivery, compare the resulting map with the approved plan: article
|
|
229
|
+
placement matches its main reader task, titles match the bodies, sibling ordering
|
|
230
|
+
is deliberate, and directories are neither empty nor accidental duplicates.
|
|
231
|
+
Honor the workspace's chosen directory depth and homogeneous sibling convention;
|
|
232
|
+
where it requires directory-only or article-only siblings, do not mix them.
|
|
233
|
+
Use an "Other" group last only for genuinely useful residual content, not to
|
|
234
|
+
avoid classification. Apply supported map adjustments through the current CLI
|
|
235
|
+
flow, retaining article identities and URLs. Record lasting category intent
|
|
236
|
+
briefly in the workspace AGENTS.md or existing organization guide; do not create
|
|
237
|
+
a separate taxonomy ledger or put planning instructions in reader articles.
|
|
238
|
+
|
|
197
239
|
### Reader tasks, names and reading order
|
|
198
240
|
|
|
199
241
|
Read the affected articles' bodies before changing their categories or titles.
|
|
@@ -251,8 +293,8 @@ change does not require a prose rewrite or file migration; changing its label do
|
|
|
251
293
|
not silently rename the approved article. Needed title or content revisions use
|
|
252
294
|
the existing revision and Review flow. Splits and merges use ordinary article
|
|
253
295
|
tasks, link repair and any explicit retirement after replacement content is
|
|
254
|
-
delivered. These are Agent editorial decisions, not new CLI checks or
|
|
255
|
-
gates.
|
|
296
|
+
delivered. These are Agent editorial decisions, not new CLI checks or routine per-article
|
|
297
|
+
approval gates. Top-level changes follow the focused review described above.
|
|
256
298
|
|
|
257
299
|
## Edit one section or review part of a batch
|
|
258
300
|
|
|
@@ -480,3 +480,24 @@ Only approved selected content is exported. A map or article change invalidates
|
|
|
480
480
|
both website and LLMS outputs; failure preserves the previous staged package.
|
|
481
481
|
Standalone `llmsPackage()` uses the same map organization and supplies the full
|
|
482
482
|
text and raw article files alongside its template-rendered `llms.txt` index.
|
|
483
|
+
|
|
484
|
+
## Links to a deployed website
|
|
485
|
+
|
|
486
|
+
After a website has been built and deployed, record its complete public root:
|
|
487
|
+
|
|
488
|
+
```bash
|
|
489
|
+
context package site-url <package-name> https://example.com/docs/
|
|
490
|
+
```
|
|
491
|
+
|
|
492
|
+
This command adds optional `site_url` to the existing `context.site-output/v1`
|
|
493
|
+
map, in both the website and knowledge package. It normalizes a trailing slash,
|
|
494
|
+
rejects credentials/query/fragment, and never contacts the URL. The address
|
|
495
|
+
includes the deployment subpath; resolve `pages[].site_path` against it without
|
|
496
|
+
adding `base` again. Rebuilds preserve the address from the previous website
|
|
497
|
+
map and distribute the refreshed mapping with the package. Deleting dist also
|
|
498
|
+
deletes this optional delivery metadata: record it again from the deployment
|
|
499
|
+
result instead of guessing a hostname. No new workspace configuration is needed.
|
|
500
|
+
|
|
501
|
+
The address is an access hint, not proof of publication or content freshness.
|
|
502
|
+
Query Skills use it only to append related links in the final summary, with no
|
|
503
|
+
network probes or version checks. Packages without the map work as before.
|
|
@@ -351,8 +351,10 @@ visible-Skill claim nor the Route report authorizes Bundle materialization.
|
|
|
351
351
|
## Contract overlay validation
|
|
352
352
|
|
|
353
353
|
`validate-indexer-contract-overlays` recomputes the complete data-only overlay
|
|
354
|
-
against the
|
|
355
|
-
|
|
354
|
+
against the current CLI base and operator contracts. Contract versions must match;
|
|
355
|
+
historical base/operator digests are provenance, not compatibility pins. Parser
|
|
356
|
+
release changes and unrelated profile changes do not require rebinding. Invalid DSL, executable
|
|
357
|
+
fields, identity redefinition, threshold weakening, invalid payload integrity or a partial
|
|
356
358
|
Provider identity fails validation. The selected Provider Bundle integrity is
|
|
357
359
|
an exact input, not a self-reported trust assertion.
|
|
358
360
|
|
package/index.js
CHANGED
|
@@ -23838,11 +23838,11 @@ function validateIndexerContractOverlay(input) {
|
|
|
23838
23838
|
if (indexerContractOverlayDigest(overlayPayload) !== overlay.overlay_digest) {
|
|
23839
23839
|
throw new TypeError("contract overlay digest does not match its canonical payload");
|
|
23840
23840
|
}
|
|
23841
|
-
if (overlay.extends.version !== base.version
|
|
23842
|
-
throw new TypeError("contract overlay
|
|
23841
|
+
if (overlay.extends.version !== base.version) {
|
|
23842
|
+
throw new TypeError("contract overlay requires another base contract version");
|
|
23843
23843
|
}
|
|
23844
|
-
if (overlay.operator_contract_version !== operators.version
|
|
23845
|
-
throw new TypeError("contract overlay
|
|
23844
|
+
if (overlay.operator_contract_version !== operators.version) {
|
|
23845
|
+
throw new TypeError("contract overlay requires another operator contract version");
|
|
23846
23846
|
}
|
|
23847
23847
|
const baseProfile = profileById(base, overlay.extends.profile);
|
|
23848
23848
|
const effectiveProfile = mergeOverlayProfile(baseProfile, overlay);
|
package/package.json
CHANGED
|
@@ -133,3 +133,20 @@ Update the description, routing table, and package-boundary guidance to match
|
|
|
133
133
|
the actual package. If the generic behavior is intentionally sufficient,
|
|
134
134
|
explicitly accept the unchanged default during Context package-template review.
|
|
135
135
|
--}}
|
|
136
|
+
|
|
137
|
+
## Website links in the final summary
|
|
138
|
+
|
|
139
|
+
After answering from the pages actually read, optionally append one or more
|
|
140
|
+
related document links in the final summary. Read `context-site-map.json` from
|
|
141
|
+
the selected package (or its sibling website output in a workspace). Match the
|
|
142
|
+
read page to `pages[].package_path` or `approved_path`; use its `title` and resolve
|
|
143
|
+
`site_path` relative to `site_url`. The URL already includes the deployment base
|
|
144
|
+
path: do not prepend `base` again. Only cite matched articles, deduplicate links,
|
|
145
|
+
and do not invent section anchors.
|
|
146
|
+
|
|
147
|
+
This is a local formatting step, not retrieval or validation. Do not probe URLs,
|
|
148
|
+
make HTTP/HEAD requests, open a browser, inspect a deployment platform, or check
|
|
149
|
+
remote versions to add links. Never build, publish or update metadata for this
|
|
150
|
+
purpose. If the map, URL or matching page is absent or malformed, keep the local
|
|
151
|
+
citation and continue silently. A configured URL does not prove that the site
|
|
152
|
+
contains the current local revision; do not claim online verification.
|
|
@@ -97,3 +97,16 @@ node <当前 knowledge-query Skill 目录>/scripts/search.mjs --query '<关键
|
|
|
97
97
|
|
|
98
98
|
这是可直接工作的通用查询 Skill。正式发布前,如果知识包存在专用术语、常见用户意图、推荐入口、已知边界或固定任务流程,作者应修改 description、路由表和包边界说明;如果通用行为已经足够,应在 Context 的包模板 Review 中明确接受未修改模板。
|
|
99
99
|
--}}
|
|
100
|
+
|
|
101
|
+
## 总结中的网站文档链接
|
|
102
|
+
|
|
103
|
+
完成正文检索和回答后,仅在最终总结中按需附上一篇或多篇实际读取过的相关文档链接。
|
|
104
|
+
从当前知识包读取 `context-site-map.json`,按命中文章的包内路径匹配
|
|
105
|
+
`pages[].package_path`,使用 `title` 作链接文字,将 `site_path` 相对
|
|
106
|
+
`site_url` 拼接。`site_url` 已包含站点子路径,不再重复拼接 `base`。
|
|
107
|
+
同一文章只列一次,不凭标题推测页面地址或章节锚点。
|
|
108
|
+
|
|
109
|
+
这是本地引用格式化,不是检索前置步骤:不要为地址发起 HTTP/HEAD 请求、打开浏览器、
|
|
110
|
+
查询部署平台或远端版本,也不触发构建、发布或元数据修改。映射、地址或匹配项缺失、
|
|
111
|
+
格式不正确时沿用本地引用即可,不阻塞回答,不要求用户补配置。
|
|
112
|
+
记录的链接不证明线上内容与本地版本一致,不声称已验证网站。
|