@c4a/context-cli 0.6.11 → 0.6.13

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/cli.js CHANGED
@@ -18278,7 +18278,7 @@ function renderReadme(projectName, language) {
18278
18278
  "- `sources/`:来源注册信息和采集快照。",
18279
18279
  "- `knowledge/`:持久知识及其结构投影。",
18280
18280
  "- `dist/`:生成的知识包。",
18281
- "- `.tmp/agent-payloads/`:Agent 可选的临时命令输入,成功 stage/apply 后可以删除。",
18281
+ "- `.tmp/agent-payloads/`:Agent 可选的临时命令输入;初始化时会创建,被清理后可在写入前重新创建。",
18282
18282
  "- `.tmp/install/`:依赖安装使用的工作区本地临时目录。",
18283
18283
  "- `.tmp/context-runtime/`:可删除的 Context 运行时状态。",
18284
18284
  "",
@@ -18317,7 +18317,7 @@ function renderReadme(projectName, language) {
18317
18317
  "- `sources/`: registered sources and captured snapshots.",
18318
18318
  "- `knowledge/`: durable knowledge, its structural projection with minimal closed source inputs, and compact rejected-candidate fingerprints.",
18319
18319
  "- `dist/`: generated packages.",
18320
- "- `.tmp/agent-payloads/`: optional Agent-owned command inputs. These files are transient and can be removed after the corresponding stage or apply succeeds.",
18320
+ "- `.tmp/agent-payloads/`: optional Agent-owned command inputs. Initialization creates it; recreate it before writing if scratch cleanup removed it.",
18321
18321
  "- `.tmp/install/`: workspace-local temporary files used during dependency installation.",
18322
18322
  "- `.tmp/context-runtime/`: disposable runtime files, including lifecycle candidates and staged structures. Successful close removes completed lifecycle and Review state.",
18323
18323
  "",
@@ -18358,7 +18358,7 @@ function renderAgents(projectName, language) {
18358
18358
  "- 不得根据目录、文件名、URL、示例或旧会话推断用户决定;没有明确授权时不得扫描或对来源仓库执行 clone、fetch、checkout、install、build、test 或脚本。已登记仓库 checkout 缺失时,使用 Route 返回的恢复计划和恢复动作,不手工创建来源软链。",
18359
18359
  "- 生命周期写入必须使用 Context CLI,不得用临时脚本修改 `sources/`、`knowledge/`、`dist/` 或 `.tmp/context-runtime/`。",
18360
18360
  "- 飞书采集只在 `evidence_status: error` 时停止;`projection_status: generic|warning` 表示原始 XML 已保留且可继续。不得在用户工作区修补 CLI 或手改快照来增加 renderer。",
18361
- "- Agent 编写的临时输入优先放在 `.tmp/agent-payloads/`;这是推荐而非强制。不要自行创建 `inputs/` 等顶层临时目录。",
18361
+ "- Agent 编写的临时输入优先放在 `.tmp/agent-payloads/`;这是推荐而非强制。目录在初始化时创建,如果临时目录已清理则在写入前重新创建。不要自行创建 `inputs/` 等顶层临时目录。",
18362
18362
  "- Context 完成只证明知识工作流状态,不证明 Git 提交范围安全。保留任务开始前已有的工作树变更,只按明确路径暂存;不要用 `git add -A` 把无关修改、删除或未跟踪目录带入提交。",
18363
18363
  "- 调试追踪默认关闭;仅在用户明确要求时使用 `context debug enable`。追踪只写入 `.tmp/context-runtime/debug/`,属于观测数据,不能作为生命周期事实或授权依据。",
18364
18364
  "- 普通 Review 使用用户原样提供的 Payload;托管批准只能使用托管 status 返回的 revision-bound 原子命令。",
@@ -18398,7 +18398,7 @@ function renderAgents(projectName, language) {
18398
18398
  "- Never infer source or review decisions from repository layout, filenames, URLs, examples, or prior conversations. Never scan for, clone, fetch, checkout, install, build, test, or run source-repository scripts without explicit authority. When registered repository checkouts are missing, use the Route-selected recovery plan and resolution action instead of creating source links by hand.",
18399
18399
  "- Use Context CLI for lifecycle writes. Do not inspect or repair `sources/`, `knowledge/`, `dist/`, or `.tmp/context-runtime/` with ad hoc scripts.",
18400
18400
  "- Stop Lark capture only for `evidence_status: error`. A `projection_status` of `generic` or `warning` means the original XML is preserved and the route may continue. Never patch the CLI or edit snapshots in a user workspace to add a renderer.",
18401
- "- Prefer `.tmp/agent-payloads/` for Agent-authored transient command inputs. This is a recommendation, not a CLI requirement; explicit custom paths remain valid. Avoid inventing top-level scratch directories such as `inputs/`.",
18401
+ "- Prefer `.tmp/agent-payloads/` for Agent-authored transient command inputs. This is a recommendation, not a CLI requirement; explicit custom paths remain valid. Initialization creates the directory; recreate it before writing if scratch cleanup removed it. Avoid inventing top-level scratch directories such as `inputs/`.",
18402
18402
  "- Context completion proves knowledge-workflow state, not Git commit safety. Preserve worktree changes that existed before the task, stage only explicit paths, and never use `git add -A` to mix unrelated modifications, deletions, or untracked directories into the deliverable.",
18403
18403
  "- Debug tracing is off by default; use `context debug enable` only when the user explicitly requests it. Trace files stay in `.tmp/context-runtime/debug/` and are observational data, never lifecycle facts or authority.",
18404
18404
  "- Review uses the user's exact Payload in ordinary mode. Managed approval uses only the revision-bound atomic command returned by managed status.",
@@ -18474,6 +18474,9 @@ async function initContextProject(input) {
18474
18474
  for (const dir of PROJECT_DIRS) {
18475
18475
  await mkdir14(join27(projectRoot, dir), { recursive: true });
18476
18476
  }
18477
+ for (const dir of PROJECT_SCRATCH_DIRS) {
18478
+ await mkdir14(join27(projectRoot, dir), { recursive: true });
18479
+ }
18477
18480
  await mkdir14(join27(projectRoot, "sources", "repo"), { recursive: true });
18478
18481
  await mkdir14(join27(projectRoot, "sources", "file"), { recursive: true });
18479
18482
  await mkdir14(join27(projectRoot, "sources", "lark"), { recursive: true });
@@ -18558,7 +18561,7 @@ function formatProjectInitResult(result) {
18558
18561
  next
18559
18562
  });
18560
18563
  }
18561
- var PROJECT_DIRS, DEFAULT_PROJECT_DIR = "context", DEFAULT_PROJECT_ENTRY = "src/index.ts", PROJECT_LANGUAGES;
18564
+ var PROJECT_DIRS, PROJECT_SCRATCH_DIRS, DEFAULT_PROJECT_DIR = "context", DEFAULT_PROJECT_ENTRY = "src/index.ts", PROJECT_LANGUAGES;
18562
18565
  var init_workspace = __esm(() => {
18563
18566
  init_cliFeedback();
18564
18567
  init_errors();
@@ -18566,6 +18569,7 @@ var init_workspace = __esm(() => {
18566
18569
  init_packageTemplateReview();
18567
18570
  init_debugTrace();
18568
18571
  PROJECT_DIRS = ["src", "sources", "knowledge", "dist"];
18572
+ PROJECT_SCRATCH_DIRS = [join27(".tmp", "agent-payloads")];
18569
18573
  PROJECT_LANGUAGES = ["en", "zh-CN"];
18570
18574
  });
18571
18575
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c4a/context-cli",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "type": "module",
5
5
  "description": "Local runtime and Agent integration for traceable knowledge production",
6
6
  "license": "MIT",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@c4a/agent-graph": "0.2.6",
27
- "@c4a/context": "0.6.11",
27
+ "@c4a/context": "0.6.13",
28
28
  "commander": "^11.0.0",
29
29
  "fast-xml-parser": "^5.10.1",
30
30
  "handlebars": "^4.7.8",
package/plugins/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.11
1
+ 0.6.13
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
4
- "version": "0.6.11",
4
+ "version": "0.6.13",
5
5
  "author": {
6
6
  "name": "c4a"
7
7
  },
@@ -61,9 +61,13 @@ Execute only `next_action.command` returned by `context entry`:
61
61
 
62
62
  ### Conversation modes
63
63
 
64
- Enable debugging only when the user explicitly requests it. Run `context debug
65
- enable` first; debugging records traces below `.tmp/context-runtime/debug/` but
66
- does not grant workflow authority or provide source evidence.
64
+ Enable debugging only when the user explicitly requests it. If initialization
65
+ is required, pass `--debug` to `context entry` and execute its returned
66
+ `context init ... --debug` command; do not run a workspace-only debug command
67
+ before initialization. For an existing workspace, run `context debug enable`
68
+ before workflow evaluation. Debugging records traces below
69
+ `.tmp/context-runtime/debug/` but does not grant workflow authority or provide
70
+ source evidence.
67
71
 
68
72
  For explicitly authorized fully managed operation, use:
69
73
 
@@ -115,6 +119,12 @@ Explain, ask, confirm, and summarize in the user's current conversation
115
119
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
116
120
  `source_ref` values, and copied CLI tokens unchanged.
117
121
 
122
+ When the user explicitly asks to publish a completed build, treat publication
123
+ as a downstream distribution step outside the Context Route. Use only an
124
+ explicitly installed distribution tool and its documented complete-output
125
+ upload command. If no such tool is available, stop after the local build and
126
+ explain that Context itself does not publish to a hosted service.
127
+
118
128
  Do not infer repo sources, extraction scope, review decisions, or package output
119
129
  choices from surrounding files. Do not call source-repo operations such as
120
130
  clone, checkout, reset, fetch, install, build, or test without explicit user
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c4a",
3
- "version": "0.6.11",
3
+ "version": "0.6.13",
4
4
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
5
5
  "author": {
6
6
  "name": "c4a"
@@ -18,7 +18,7 @@
18
18
  "skills": "./skills/",
19
19
  "interface": {
20
20
  "displayName": "C4A Context",
21
- "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.11",
21
+ "shortDescription": "Initialize and advance a local, source-linked project knowledge workspace.\nv0.6.13",
22
22
  "longDescription": "Create a Context workspace and use agent-guided next steps to register sources, run extraction, review candidates, build package outputs, and verify health without silently mutating source repositories.",
23
23
  "developerName": "c4a",
24
24
  "category": "Productivity",
@@ -73,9 +73,13 @@ Execute only `next_action.command` returned by `context entry`:
73
73
 
74
74
  ### Conversation modes
75
75
 
76
- Enable debugging only when the user explicitly requests it. Run `context debug
77
- enable` first; debugging records traces below `.tmp/context-runtime/debug/` but
78
- does not grant workflow authority or provide source evidence.
76
+ Enable debugging only when the user explicitly requests it. If initialization
77
+ is required, pass `--debug` to `context entry` and execute its returned
78
+ `context init ... --debug` command; do not run a workspace-only debug command
79
+ before initialization. For an existing workspace, run `context debug enable`
80
+ before workflow evaluation. Debugging records traces below
81
+ `.tmp/context-runtime/debug/` but does not grant workflow authority or provide
82
+ source evidence.
79
83
 
80
84
  For explicitly authorized fully managed operation, use:
81
85
 
@@ -127,6 +131,12 @@ Explain, ask, confirm, and summarize in the user's current conversation
127
131
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
128
132
  `source_ref` values, and copied CLI tokens unchanged.
129
133
 
134
+ When the user explicitly asks to publish a completed build, treat publication
135
+ as a downstream distribution step outside the Context Route. Use only an
136
+ explicitly installed distribution tool and its documented complete-output
137
+ upload command. If no such tool is available, stop after the local build and
138
+ explain that Context itself does not publish to a hosted service.
139
+
130
140
  Do not infer repo sources, extraction scope, review decisions, or package output
131
141
  choices from surrounding files. Do not call source-repo operations such as
132
142
  clone, checkout, reset, fetch, install, build, or test without explicit user
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "c4a",
3
3
  "displayName": "C4A Context",
4
- "version": "0.6.11",
4
+ "version": "0.6.13",
5
5
  "description": "Start or continue a project-local knowledge workspace through one graph-routed entry.",
6
6
  "author": {
7
7
  "name": "Context4AI",
@@ -65,9 +65,13 @@ Execute only `next_action.command` returned by `context entry`:
65
65
 
66
66
  ### Conversation modes
67
67
 
68
- Enable debugging only when the user explicitly requests it. Run `context debug
69
- enable` first; debugging records traces below `.tmp/context-runtime/debug/` but
70
- does not grant workflow authority or provide source evidence.
68
+ Enable debugging only when the user explicitly requests it. If initialization
69
+ is required, pass `--debug` to `context entry` and execute its returned
70
+ `context init ... --debug` command; do not run a workspace-only debug command
71
+ before initialization. For an existing workspace, run `context debug enable`
72
+ before workflow evaluation. Debugging records traces below
73
+ `.tmp/context-runtime/debug/` but does not grant workflow authority or provide
74
+ source evidence.
71
75
 
72
76
  For explicitly authorized fully managed operation, use:
73
77
 
@@ -119,6 +123,12 @@ Explain, ask, confirm, and summarize in the user's current conversation
119
123
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
120
124
  `source_ref` values, and copied CLI tokens unchanged.
121
125
 
126
+ When the user explicitly asks to publish a completed build, treat publication
127
+ as a downstream distribution step outside the Context Route. Use only an
128
+ explicitly installed distribution tool and its documented complete-output
129
+ upload command. If no such tool is available, stop after the local build and
130
+ explain that Context itself does not publish to a hosted service.
131
+
122
132
  Do not infer repo sources, extraction scope, review decisions, or package output
123
133
  choices from surrounding files. Do not call source-repo operations such as
124
134
  clone, checkout, reset, fetch, install, build, or test without explicit user
@@ -73,9 +73,13 @@ Execute only `next_action.command` returned by `context entry`:
73
73
 
74
74
  ### Conversation modes
75
75
 
76
- Enable debugging only when the user explicitly requests it. Run `context debug
77
- enable` first; debugging records traces below `.tmp/context-runtime/debug/` but
78
- does not grant workflow authority or provide source evidence.
76
+ Enable debugging only when the user explicitly requests it. If initialization
77
+ is required, pass `--debug` to `context entry` and execute its returned
78
+ `context init ... --debug` command; do not run a workspace-only debug command
79
+ before initialization. For an existing workspace, run `context debug enable`
80
+ before workflow evaluation. Debugging records traces below
81
+ `.tmp/context-runtime/debug/` but does not grant workflow authority or provide
82
+ source evidence.
79
83
 
80
84
  For explicitly authorized fully managed operation, use:
81
85
 
@@ -127,6 +131,12 @@ Explain, ask, confirm, and summarize in the user's current conversation
127
131
  language. Keep commands, flags, paths, ids, status values, JSONL keys,
128
132
  `source_ref` values, and copied CLI tokens unchanged.
129
133
 
134
+ When the user explicitly asks to publish a completed build, treat publication
135
+ as a downstream distribution step outside the Context Route. Use only an
136
+ explicitly installed distribution tool and its documented complete-output
137
+ upload command. If no such tool is available, stop after the local build and
138
+ explain that Context itself does not publish to a hosted service.
139
+
130
140
  Do not infer repo sources, extraction scope, review decisions, or package output
131
141
  choices from surrounding files. Do not call source-repo operations such as
132
142
  clone, checkout, reset, fetch, install, build, or test without explicit user
@@ -2,7 +2,7 @@
2
2
  "schema": "agent-graph.bundle.v1",
3
3
  "provider": {
4
4
  "id": "c4a/context",
5
- "version": "0.6.11"
5
+ "version": "0.6.13"
6
6
  },
7
7
  "providerManifest": "provider.yaml",
8
8
  "graphs": [
@@ -532,7 +532,7 @@
532
532
  },
533
533
  {
534
534
  "path": "provider.yaml",
535
- "digest": "sha256:f89e3a74b6c752aaabbad5b5774d3687a7fb5419894f30741129b71419d234d4"
535
+ "digest": "sha256:bd0a404a8371bc9641e21e54e8ebcaf5bedfa508ee8ab378db127d91413c3930"
536
536
  },
537
537
  {
538
538
  "path": "resources/diagnostics/projection-stale.md",
@@ -750,5 +750,5 @@
750
750
  "graphDependencies": {
751
751
  "workspace": []
752
752
  },
753
- "digest": "sha256:15058859f3884290c2c88de136633c2fbfb16e1a69d1a55796d92dc9082cdb94"
753
+ "digest": "sha256:b327de9553d4b71e182a98f87dd48e39ed5d24cb4f6aeaf50b7373b75368bf9a"
754
754
  }
@@ -1,6 +1,6 @@
1
1
  schema: agent-graph.provider.v1
2
2
  id: c4a/context
3
- version: 0.6.11
3
+ version: 0.6.13
4
4
  name: Context workflow
5
5
  description: Internal work contract for Context knowledge workspaces.
6
6
  graphs: