@c4a/context-cli 0.6.3 → 0.6.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.
- package/README.md +23 -2
- package/README.zh-CN.md +15 -1
- package/cli.js +5121 -4008
- package/docs/context-debug-event-v1.schema.json +2 -0
- package/docs/debug-tracing.md +8 -0
- package/package.json +4 -4
- package/plugins/VERSION +1 -1
- package/plugins/claude/.claude-plugin/plugin.json +1 -1
- package/plugins/codex/.codex-plugin/plugin.json +2 -2
- package/plugins/cursor/.cursor-plugin/plugin.json +1 -1
- package/providers/context/actions/inspect-code-extraction.yaml +5 -0
- package/providers/context/graphs/workspace.yaml +2 -1
- package/providers/context/manifest.json +41 -23
- package/providers/context/provider.yaml +1 -1
- package/providers/context/resources/dialogue/code-extraction.md +11 -0
- package/providers/context/resources/dialogue/package-output.md +9 -0
- package/providers/context/resources/manuals/guides/package-outputs.md +19 -5
- package/providers/context/resources/manuals/reference/code-extractors.md +94 -0
- package/providers/context/resources/manuals/reference/package-templates.md +63 -0
- package/providers/context/resources/manuals/reference/project-api.md +35 -0
- package/providers/context/resources/procedures/code-extraction.md +23 -0
- package/providers/context/resources/procedures/package-output.md +21 -0
- package/providers/context/resources/semantic/align/gates.md +2 -2
- package/providers/context/resources/semantic/align/structure-planning.md +8 -3
package/README.md
CHANGED
|
@@ -112,8 +112,14 @@ KB packages use flat, package-relative OKF roots: `wikis/`, `guides/`,
|
|
|
112
112
|
`dist/<package-name>/` directory and is not repeated inside those roots. Older
|
|
113
113
|
workspaces that still declare `distribution.knowledgeNamespace` remain
|
|
114
114
|
loadable, but the legacy value no longer changes package paths.
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
New KB setup should offer Git raw resource delivery first. Build rewrites links
|
|
116
|
+
to repository raw URLs; committing and publishing the resources remains the
|
|
117
|
+
package author's responsibility. An explicit `urlPrefix` also works when the
|
|
118
|
+
Context workspace itself is outside Git. Without Git or an explicit prefix,
|
|
119
|
+
authors can bundle resources under `others/assets/` or explicitly omit them and
|
|
120
|
+
retain unresolved references.
|
|
121
|
+
Bundled delivery may configure `kbPackage().assets.optimize`; Context itself
|
|
122
|
+
does not depend on an image processor.
|
|
117
123
|
|
|
118
124
|
See the SDK manuals for the complete configuration and template contract:
|
|
119
125
|
|
|
@@ -141,6 +147,21 @@ implementation detail; Context users and plugins consume only
|
|
|
141
147
|
Building a package completes the currently active approved state; it does not
|
|
142
148
|
freeze the workspace. New sources can be added and processed later.
|
|
143
149
|
|
|
150
|
+
With explicit current-conversation managed authority,
|
|
151
|
+
`context run --managed --until blocked-or-complete` keeps one workspace-bound
|
|
152
|
+
runtime for consecutive deterministic actions. Each action remains bound to
|
|
153
|
+
the Route revision that selected it; after the action, Context reloads the
|
|
154
|
+
project from disk and evaluates the graph again. Known local actions run in the
|
|
155
|
+
same process, while source tools and other external effects remain isolated in
|
|
156
|
+
child processes.
|
|
157
|
+
|
|
158
|
+
The runtime scope owns only short-lived resources such as output capture,
|
|
159
|
+
timers, child processes, and write locks, and releases them in reverse order.
|
|
160
|
+
Knowledge, snapshots, decisions, and package output are durable state: they
|
|
161
|
+
retain their existing revision checks, project write lock, atomic write, close,
|
|
162
|
+
and verify contracts. No execution scope rolls back or substitutes those
|
|
163
|
+
contracts, and the workspace file protocol is unchanged.
|
|
164
|
+
|
|
144
165
|
## Command Groups
|
|
145
166
|
|
|
146
167
|
```bash
|
package/README.zh-CN.md
CHANGED
|
@@ -81,7 +81,11 @@ node_modules/@c4a/context/docs/reference/package-templates.md
|
|
|
81
81
|
`wikis/`、`guides/`、`rules/` 和 `feats/` 作为包内 OKF 根目录,不再在这些目录下重复包名。
|
|
82
82
|
旧工作区即使仍声明 `distribution.knowledgeNamespace` 也可以继续加载,但该兼容字段不再改变
|
|
83
83
|
知识包输出路径。
|
|
84
|
-
|
|
84
|
+
新建 KB 时优先选择 Git raw 资源分发:构建器将链接改写到仓库 raw 地址;资源的
|
|
85
|
+
提交和发布由知识包作者负责。非 Git 工作区可以配置另一个资源仓库的显式 Raw
|
|
86
|
+
前缀;没有可用 Git 或显式前缀时,可以选择随包复制到 `others/assets/`,或显式
|
|
87
|
+
不输出资源并保留失效引用。随包模式可以安装 `sharp` 并通过
|
|
88
|
+
`kbPackage().assets.optimize` 仅优化生成文件;Context 本身不依赖图片处理器。
|
|
85
89
|
|
|
86
90
|
完整配置和模板约定参见 SDK 手册:
|
|
87
91
|
|
|
@@ -105,6 +109,16 @@ node_modules/@c4a/context/docs/reference/package-templates.md
|
|
|
105
109
|
|
|
106
110
|
一次构建只完成当前已经确认的知识状态,并不会冻结工作区。后续还可以继续添加和处理新的来源。
|
|
107
111
|
|
|
112
|
+
当前对话明确授予全托管权限后,
|
|
113
|
+
`context run --managed --until blocked-or-complete` 会在同一个工作区运行时中连续执行
|
|
114
|
+
确定性动作。每个动作仍绑定到选择它的 Route revision;动作完成后,Context 会重新从磁盘
|
|
115
|
+
加载项目并再次求值工作图。已知的本地动作在同一进程中执行,来源工具和其他外部副作用仍
|
|
116
|
+
隔离在子进程中。
|
|
117
|
+
|
|
118
|
+
执行作用域只管理输出捕获、定时器、子进程和写锁等短生命周期资源,并按注册顺序的逆序释放。
|
|
119
|
+
知识、快照、审核决定和知识包产物属于持久状态,继续使用原有的 revision 校验、项目写锁、
|
|
120
|
+
原子写入、close 和 verify 契约。执行作用域不会回滚或替代这些契约,工作区文件协议也不改变。
|
|
121
|
+
|
|
108
122
|
## 命令分组
|
|
109
123
|
|
|
110
124
|
```bash
|