chatccc 0.2.130 → 0.2.132

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.
@@ -1,53 +0,0 @@
1
- # Claude-Specific Injection Prompt
2
-
3
- Use this prompt as the Claude CLI injection prompt for this project.
4
-
5
- Project workspace:
6
-
7
- ```text
8
- f:\users\weizhangjian\feishuclauderprivate
9
- ```
10
-
11
- ## Repeated Successful Command Guard
12
-
13
- When working in this project through Claude CLI, repeated successful shell commands are a completion signal, not a reason to keep using tools.
14
-
15
- A shell command is considered the same command when all of these are true:
16
-
17
- - The command text is effectively the same.
18
- - The working directory is the same.
19
- - The current task goal has not changed.
20
- - There is no new user input that changes the task.
21
- - There is no new error output that explains why the command must be run again.
22
-
23
- If the same shell command succeeds more than once consecutively, do not call it again.
24
-
25
- After the second consecutive successful execution of the same command, the next assistant action must be a final user-facing response. Do not call another tool unless the next command is materially different and has a clear reason based on the latest output.
26
-
27
- This guard applies to all shell commands, including but not limited to:
28
-
29
- - test commands
30
- - build commands
31
- - git commands
32
- - install commands
33
- - formatting commands
34
- - project scripts
35
- - status or inspection commands
36
-
37
- Do not "verify one more time" by repeating the same successful command. If verification is needed, use a different command that checks a different fact, or explain the current result to the user.
38
-
39
- If you notice that you are about to repeat a successful command with the same arguments, stop using tools and respond to the user with the current result.
40
-
41
- If you produce or observe text like "I'm stuck in a loop", do not call any more tools. Immediately send the final user-facing response explaining:
42
-
43
- - what has completed,
44
- - what is still uncertain, if anything,
45
- - and what the user can do next, if action is needed.
46
-
47
- ## Hard Stop Rule
48
-
49
- Never execute the same successful shell command three times for the same task in this project.
50
-
51
- If the same command has already succeeded twice in a row, the next assistant action must be a final response to the user, not another tool call.
52
-
53
- Successful repeated command execution is a terminal condition. Prefer a concise final response over further tool calls.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatccc",
3
- "version": "0.2.130",
3
+ "version": "0.2.132",
4
4
  "description": "Feishu bot bridge for Claude Code",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -130,9 +130,9 @@ describe("normalizeSdkMessage", () => {
130
130
  expect((result!.blocks[0] as any).content).toEqual(content);
131
131
  });
132
132
 
133
- it("skips text blocks in user messages (replayed input from --replay-user-messages)", () => {
134
- // user 消息中的 text block 来自 --replay-user-messages 重放的用户输入
135
- // (含内嵌的 IM skill prompt),不应出现在最终回复中
133
+ it("skips text blocks in user messages", () => {
134
+ // user text is host input, not assistant output. If the CLI emits it for
135
+ // any reason, it should not appear in the final reply.
136
136
  const result = normalizeSdkMessage({
137
137
  type: "user",
138
138
  message: {
@@ -244,12 +244,12 @@ export function normalizeSdkMessage(msg: SdkMessageLike): UnifiedStreamMessage |
244
244
  type: "search_result",
245
245
  query: block.query ?? "",
246
246
  });
247
- } else if (block.type === "text" && block.text) {
248
- // 跳过 user 消息中的 text block:--replay-user-messages 会重放
249
- // 之前的用户消息(含内嵌的 IM skill prompt),这些不应出现在最终回复中
250
- if (msg.type === "user") continue;
251
- blocks.push({ type: "text", text: block.text });
252
- }
247
+ } else if (block.type === "text" && block.text) {
248
+ // user text is host input, not assistant output. Keep it out of the
249
+ // final reply if the CLI ever emits it.
250
+ if (msg.type === "user") continue;
251
+ blocks.push({ type: "text", text: block.text });
252
+ }
253
253
  }
254
254
  return { type: msg.type, blocks };
255
255
  }
@@ -471,7 +471,7 @@ class ClaudeAdapter implements ToolAdapter {
471
471
  const env = buildCliEnv(this.subagentModel, this.apiKey, this.baseUrl);
472
472
  const args = buildCliArgs(
473
473
  this.model, this.effort, this.isEmpty, mcpConfigJson,
474
- ["--resume", sessionId, "--input-format", "stream-json", "--replay-user-messages"],
474
+ ["--resume", sessionId, "--input-format", "stream-json"],
475
475
  this.maxTurn,
476
476
  options?.planMode,
477
477
  );