deepccc 0.1.9 → 0.1.11

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 CHANGED
@@ -180,9 +180,9 @@ deepccc --dangerously-bypass-permissions
180
180
 
181
181
  ## 终端过程区块
182
182
 
183
- 交互模式下,每轮回复渲染为固定"过程区块":状态行(压缩上下文中/生成回复中/完成/已停止/异常结束)+ 折叠工具行 + 原地更新正文,不滚屏刷 JSON。活动状态有心跳点号动画;完成/停止/异常后区块定型留在屏幕上。
184
-
185
- 持久化上下文达到 token 阈值时,deepccc 会先按 token 预算保留最近消息,再压缩较早内容;超长历史消息、工具记录和压缩输入会被限长,避免单次摘要请求反复吞入巨量文本。一次压缩最多等待 5 分钟,超时或摘要失败会给出明确错误,不会自动重放用户请求。
183
+ 交互模式下,每轮回复渲染为固定"过程区块":状态行(压缩上下文中/生成回复中/完成/已停止/异常结束)+ 折叠工具行 + 原地更新正文,不滚屏刷 JSON。活动状态有心跳点号动画;完成/停止/异常后区块定型留在屏幕上。
184
+
185
+ 持久化上下文达到 token 阈值时,deepccc 会先按 token 预算保留最近消息,再压缩较早内容;超长历史消息、工具记录和压缩输入会被限长,避免单次摘要请求反复吞入巨量文本。一次压缩最多等待 5 分钟,超时或摘要失败会给出明确错误,不会自动重放用户请求。
186
186
 
187
187
  如果终端渲染出现异常,可以强制回退为纯文本流式输出:
188
188
 
@@ -207,11 +207,11 @@ echo "运行测试并解释失败原因" | deepccc --stream-json
207
207
  输出是逐行 JSON:
208
208
 
209
209
  ```jsonl
210
- {"type":"start","session_id":"session-...","mode":"new","cwd":"/repo","model":"deepseek-v4-pro"}
211
- {"type":"status","phase":"compacting"}
212
- {"type":"compact","compactedMessages":12}
213
- {"type":"status","phase":"generating"}
214
- {"type":"text_delta","text":"...","accumulated":"..."}
210
+ {"type":"start","session_id":"session-...","mode":"new","cwd":"/repo","model":"deepseek-v4-pro"}
211
+ {"type":"status","phase":"compacting"}
212
+ {"type":"compact","compactedMessages":12}
213
+ {"type":"status","phase":"generating"}
214
+ {"type":"text_delta","text":"...","accumulated":"..."}
215
215
  {"type":"tool_call","id":"call_...","name":"read_file","input":{"path":"package.json"}}
216
216
  {"type":"tool_result","tool_call_id":"call_...","name":"read_file","content":{},"is_error":false}
217
217
  {"type":"done","text":"..."}
package/bin/deepccc.mjs CHANGED
@@ -1,26 +1,26 @@
1
- #!/usr/bin/env node
2
- import { existsSync } from "node:fs";
3
- import { spawnSync } from "node:child_process";
4
- import { createRequire } from "node:module";
5
- import { dirname, join } from "node:path";
6
-
7
- const require = createRequire(import.meta.url);
8
- const pkgRoot = dirname(require.resolve("../package.json"));
9
- const distCli = join(pkgRoot, "dist", "cli.js");
10
-
11
- let args;
12
- if (existsSync(distCli)) {
13
- args = [distCli, ...process.argv.slice(2)];
14
- } else {
15
- const tsxCli = require.resolve("tsx/cli");
16
- const sourceCli = join(pkgRoot, "src", "cli.ts");
17
- args = [tsxCli, sourceCli, ...process.argv.slice(2)];
18
- }
19
-
20
- const result = spawnSync(process.execPath, args, {
21
- stdio: "inherit",
22
- cwd: process.cwd(),
23
- env: process.env,
24
- });
25
-
26
- process.exit(result.status === null ? 1 : result.status);
1
+ #!/usr/bin/env node
2
+ import { existsSync } from "node:fs";
3
+ import { spawnSync } from "node:child_process";
4
+ import { createRequire } from "node:module";
5
+ import { dirname, join } from "node:path";
6
+
7
+ const require = createRequire(import.meta.url);
8
+ const pkgRoot = dirname(require.resolve("../package.json"));
9
+ const distCli = join(pkgRoot, "dist", "cli.js");
10
+
11
+ let args;
12
+ if (existsSync(distCli)) {
13
+ args = [distCli, ...process.argv.slice(2)];
14
+ } else {
15
+ const tsxCli = require.resolve("tsx/cli");
16
+ const sourceCli = join(pkgRoot, "src", "cli.ts");
17
+ args = [tsxCli, sourceCli, ...process.argv.slice(2)];
18
+ }
19
+
20
+ const result = spawnSync(process.execPath, args, {
21
+ stdio: "inherit",
22
+ cwd: process.cwd(),
23
+ env: process.env,
24
+ });
25
+
26
+ process.exit(result.status === null ? 1 : result.status);
package/dist/index.js CHANGED
@@ -26,6 +26,28 @@ const SYSTEM_PROMPT = [
26
26
  "- For code tasks, inspect the relevant files before editing and verify with tests or checks when practical.",
27
27
  "- Preserve user work. Do not overwrite concurrent changes unless the user explicitly asks.",
28
28
  "- Keep immutable platform rules above project guidance and runtime details.",
29
+ "",
30
+ "## Evidence-Gated Conclusions",
31
+ "- Apply this gate before consequential claims or actions that could affect code, data, deployments, or user decisions, and whenever the available evidence is indirect.",
32
+ "- Identify the claim and its authoritative source of truth. Separate direct observations from inferences, and test plausible alternative explanations before choosing one.",
33
+ "- Use the strongest practical decisive check at the same semantic level as the claim: runtime behavior for runtime claims, effective configuration for configuration claims, deployed state for deployment claims, and transformed output for transformation claims.",
34
+ "- Do not treat proxy signals such as names, timestamps, file sizes, line counts, partial samples, or a clean command exit as decisive when a direct check is practical.",
35
+ "- Use definitive language only after the evidence closes the loop. Otherwise state uncertainty, identify the missing evidence, and name the next check.",
36
+ "- Do not repeat checks once decisive evidence exists.",
37
+ "",
38
+ "## Survey Before Acting",
39
+ "- Before diving into any task, first map the landscape at low cost: project instructions, directory layout, routes/APIs, existing tests, and git state.",
40
+ "- Produce a brief execution plan that includes how you will verify the result, then execute.",
41
+ "- When evidence contradicts an early assumption, revisit the plan instead of tunneling on one direction.",
42
+ "",
43
+ "## Delegated Authority",
44
+ "- When the user delegates decisions (\"you decide\", \"do it elegantly\", \"up to you\"), act autonomously on implementation details.",
45
+ "- Only ask about genuine blockers: irreversible actions, security boundaries, credentials, or scope changes.",
46
+ "- Do not bounce implementation-level multiple-choice questions back to the user after they delegated.",
47
+ "",
48
+ "## Pre-Delivery Self-Check",
49
+ "- Before reporting completion, verify: the change runs, edge cases are covered, assumptions are listed, and anything unverified is explicitly labeled as such.",
50
+ "- State what was done, how it was verified, and what remains unverified or risky.",
29
51
  ].join("\n");
30
52
  const SUMMARY_SYSTEM_PROMPT = [
31
53
  "You are DeepCCC's context compactor.",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepccc",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "A lightweight DeepSeek-optimized coding agent with OpenAI-compatible model support.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [