pi-cc-loop 0.7.0 → 0.7.2
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 +7 -7
- package/config.ts +4 -4
- package/package.json +1 -1
- package/settings.ts +2 -2
package/README.md
CHANGED
|
@@ -94,19 +94,19 @@ Ctrl+O 展开后多一行元信息(任务 id、节奏)。`compactMessages`
|
|
|
94
94
|
"footer": true, // 底部摘要:loop 的一行和 Monitor 的 `monitor N`
|
|
95
95
|
"draft": true, // pi-cc-plugins:Ctrl+C 找回
|
|
96
96
|
"turnSummary": true, // pi-cc-plugins:回合摘要一行
|
|
97
|
-
"compaction": true, // pi-cc-
|
|
98
|
-
"idleCompaction": true // pi-cc-
|
|
97
|
+
"compaction": true, // pi-cc-compaction:Claude Code 的压缩
|
|
98
|
+
"idleCompaction": true // pi-cc-compaction:空闲压缩
|
|
99
99
|
}
|
|
100
100
|
```
|
|
101
101
|
|
|
102
|
-
draft、turnSummary 只被 pi-cc-plugins 读取,compaction、idleCompaction 只被 pi-cc-
|
|
102
|
+
draft、turnSummary 只被 pi-cc-plugins 读取,compaction、idleCompaction 只被 pi-cc-compaction 读取;没装对应包的会话里,面板中的这些项不生效,值原样保留。
|
|
103
103
|
|
|
104
104
|
在 TUI 里输入 `/pi_cc` 会打开设置面板,和 pi-cc-extensions 的 `/ccstyle` 一样按页组织,每个插件一页:
|
|
105
|
-
**Loop & Monitor**(消息样式、底部摘要,两个包共用)、**Plugins**(pi-cc-plugins)、**Compact**(pi-cc-
|
|
105
|
+
**Loop & Monitor**(消息样式、底部摘要,两个包共用)、**Plugins**(pi-cc-plugins)、**Compact**(pi-cc-compaction)。
|
|
106
106
|
Tab / Shift+Tab 切换页,上下键选择,Enter/空格切换,Esc 关闭;改动立即保存,所有 pi-cc 扩展同时生效。
|
|
107
107
|
Pi 的 `/settings` 不接受扩展加项,所以 pi-cc 的设置放在 `/pi_cc` 下。
|
|
108
108
|
|
|
109
|
-
`/pi_cc` 由四个 pi-cc 包(loop、monitor、plugins、
|
|
109
|
+
`/pi_cc` 由四个 pi-cc 包(loop、monitor、plugins、compaction)共同提供:装了其中任意一个,命令就在;装了多个,也只有一个 `/pi_cc`
|
|
110
110
|
(Pi 会把不同扩展的同名命令变成 `/pi_cc:1`、`/pi_cc:2`,所以由最先加载的包认领注册,会话结束时释放,`/reload` 会重新认领)。
|
|
111
111
|
|
|
112
112
|
```text
|
|
@@ -126,7 +126,7 @@ Loop & Monitor / Plugins / Compact ~/.pi/agent/pi-cc.json
|
|
|
126
126
|
也可以用文字命令:`/pi_cc messages on|off`、`/pi_cc footer on|off`,适合脚本和 RPC;
|
|
127
127
|
非 TUI 模式下,不带参数的 `/pi_cc` 按页输出当前设置。命令只写改动的那一项,文件里的其他内容原样保留。
|
|
128
128
|
|
|
129
|
-
环境变量 `PI_CC_FOOTER`、`PI_CC_COMPACT_MESSAGES`(pi-cc-plugins 的两项是 `PI_CC_DRAFT`、`PI_CC_TURN_SUMMARY`,pi-cc-
|
|
129
|
+
环境变量 `PI_CC_FOOTER`、`PI_CC_COMPACT_MESSAGES`(pi-cc-plugins 的两项是 `PI_CC_DRAFT`、`PI_CC_TURN_SUMMARY`,pi-cc-compaction 的两项是 `PI_CC_COMPACTION`、`PI_CC_IDLE_COMPACTION`)优先于文件,但不会被写进文件。设着的时候,面板里这一项显示实际生效的值、不能切换,
|
|
130
130
|
说明里写出是哪个变量;文字输出会在对应项后面标出来(如 `hidden (PI_CC_FOOTER=0)`);用文字命令切换会写进文件,但提示会说明变量还在覆盖它。
|
|
131
131
|
|
|
132
132
|
## 底部摘要
|
|
@@ -170,7 +170,7 @@ Loop & Monitor / Plugins / Compact ~/.pi/agent/pi-cc.json
|
|
|
170
170
|
|
|
171
171
|
```bash
|
|
172
172
|
node --test tests/*.test.mjs
|
|
173
|
-
npx --yes typescript@5.9.3 tsc --noEmit -p tsconfig.json
|
|
173
|
+
npx --yes -p typescript@5.9.3 tsc --noEmit -p tsconfig.json
|
|
174
174
|
node scripts/cache-check.mjs # 真实 provider 的缓存检查,默认用免费模型,发版前跑
|
|
175
175
|
```
|
|
176
176
|
|
package/config.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared settings for the pi-cc extensions.
|
|
3
3
|
*
|
|
4
|
-
* pi-cc-loop, pi-cc-monitor, pi-cc-plugins and pi-cc-
|
|
4
|
+
* pi-cc-loop, pi-cc-monitor, pi-cc-plugins and pi-cc-compaction read the same
|
|
5
5
|
* small JSON file so a single toggle changes the whole family at once. The file is optional;
|
|
6
6
|
* when it is missing or malformed the defaults apply. It sits in Pi's agent
|
|
7
7
|
* directory (PI_CODING_AGENT_DIR, default ~/.pi/agent), next to Pi's own
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* }
|
|
19
19
|
*
|
|
20
20
|
* compactMessages and footer drive loop and monitor; draft and turnSummary
|
|
21
|
-
* drive pi-cc-plugins; compaction and idleCompaction drive pi-cc-
|
|
21
|
+
* drive pi-cc-plugins; compaction and idleCompaction drive pi-cc-compaction. A package that is not installed simply ignores its
|
|
22
22
|
* keys, and they are kept as the user left them.
|
|
23
23
|
*
|
|
24
24
|
* Environment overrides (useful for tests and quick experiments) win over the
|
|
@@ -48,9 +48,9 @@ export interface PiCcConfig {
|
|
|
48
48
|
draft: boolean;
|
|
49
49
|
/** pi-cc-plugins: one line closes every agent run. */
|
|
50
50
|
turnSummary: boolean;
|
|
51
|
-
/** pi-cc-
|
|
51
|
+
/** pi-cc-compaction: Claude Code's compaction replaces Pi's summary request. */
|
|
52
52
|
compaction: boolean;
|
|
53
|
-
/** pi-cc-
|
|
53
|
+
/** pi-cc-compaction: compact while idle, before a long prompt cache expires. */
|
|
54
54
|
idleCompaction: boolean;
|
|
55
55
|
}
|
|
56
56
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-cc-loop",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "Claude Code compatible /loop for the Pi coding agent: cron-scheduled fixed intervals, self-paced chains, and the same dispatch semantics as Claude Code.",
|
|
5
5
|
"author": "tarnish233",
|
|
6
6
|
"type": "module",
|
package/settings.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* The /pi_cc command: the settings every pi-cc package shares.
|
|
3
3
|
*
|
|
4
4
|
* This file is copied verbatim between pi-cc-loop, pi-cc-monitor,
|
|
5
|
-
* pi-cc-plugins and pi-cc-
|
|
5
|
+
* pi-cc-plugins and pi-cc-compaction (separate npm packages); each repo's tests/shared.test.mjs
|
|
6
6
|
* fails when the copies drift apart. The settings live in one pi-cc.json and
|
|
7
7
|
* apply to every pi-cc package installed. A change is announced on the
|
|
8
8
|
* "pi-cc:config" channel, so the packages repaint what the settings change
|
|
@@ -119,7 +119,7 @@ const PAGES: SettingsPage[] = [
|
|
|
119
119
|
on: "on",
|
|
120
120
|
off: "off",
|
|
121
121
|
description:
|
|
122
|
-
"Compact while idle, before a prompt cache of an hour or more expires (
|
|
122
|
+
"Compact while idle, before a prompt cache of an hour or more expires (Anthropic's 1h cache, or a model's promptCache).",
|
|
123
123
|
},
|
|
124
124
|
],
|
|
125
125
|
},
|