@c4a/context 0.7.13 → 0.7.14-beta.1

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.
@@ -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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context",
3
- "version": "0.7.13",
3
+ "version": "0.7.14-beta.1",
4
4
  "type": "module",
5
5
  "description": "Declarative SDK for Context knowledge sources, workflows, review, and package outputs",
6
6
  "license": "MIT",
@@ -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
+ 记录的链接不证明线上内容与本地版本一致,不声称已验证网站。