@izhimu/pi-caveman 0.4.1 → 0.5.0
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/CHANGELOG.md +5 -0
- package/README.md +3 -5
- package/extensions/caveman.ts +0 -30
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@izhimu/pi-caveman` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.5.0] - 2026-10-24
|
|
6
|
+
|
|
7
|
+
### Removed
|
|
8
|
+
- **Standalone `/ultracave` and `/megacave` slash commands** (including their plugin-namespaced `/caveman:ultracave` / `/caveman:megacave` forms and the `input` interception branches). The modes themselves are unchanged and remain reachable via `/caveman ultracave`, `/caveman megacave` (plus legacy aliases `ultra`, `wenyan*`) and natural-language triggers.
|
|
9
|
+
|
|
5
10
|
## [0.4.1] - 2026-10-24
|
|
6
11
|
|
|
7
12
|
### Fixed
|
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Upstream: [JuliusBrussee/caveman](https://github.com/JuliusBrussee/caveman)
|
|
|
15
15
|
- **9 core upstream 3.2.0 rules** — answer first, kill ceremony, STE clarity, preserved comments, bounded tool runs
|
|
16
16
|
- **Per-turn reinforcement** keeps the model concise without prompt bloat or cache misses
|
|
17
17
|
- **Natural language triggers** — "talk like caveman", "be brief", "stop caveman", "normal mode" (with negation guard and gap whitelist)
|
|
18
|
-
- **Direct persistence & aliases** — `/caveman
|
|
18
|
+
- **Direct persistence & aliases** — `/caveman <mode>` instantly applies and persists; legacy aliases (`full`, `lite`, `ultra`, `wenyan`) seamlessly mapped
|
|
19
19
|
- **Token savings stats** — tracks session output tokens and estimated savings via `/caveman status` or `/caveman-status`
|
|
20
20
|
## Install
|
|
21
21
|
|
|
@@ -55,13 +55,11 @@ omp -e ./extensions/caveman.ts
|
|
|
55
55
|
|---------|--------|
|
|
56
56
|
| `/caveman` | Activate default caveman mode (persists) |
|
|
57
57
|
| `/caveman <mode>` | Switch mode: `caveman`, `ultracave`, `megacave`, `off`, `status` (persists) |
|
|
58
|
-
| `/ultracave` | Switch directly to ultracave mode (maximum compression, fragments only) |
|
|
59
|
-
| `/megacave` | Switch directly to megacave mode (Classical Chinese 文言文) |
|
|
60
58
|
| `/caveman status` | Show current mode, session token usage, and config paths |
|
|
61
59
|
| `/caveman-status` | Alias for `/caveman status` |
|
|
62
60
|
| `/caveman off` | Deactivate caveman mode (persists) |
|
|
63
61
|
|
|
64
|
-
All `/caveman
|
|
62
|
+
All `/caveman` mode switches automatically persist to user config (`~/.config/caveman/config.json` or `%APPDATA%\caveman\config.json`). Legacy aliases (`full`, `lite`, `ultra`, `wenyan*`) are transparently mapped.
|
|
65
63
|
|
|
66
64
|
Natural-language triggers also work: "talk like caveman", "be brief", "less tokens", "stop caveman", "normal mode".
|
|
67
65
|
|
|
@@ -104,7 +102,7 @@ pi and oh-my-pi load extensions and skills declared in `package.json` (`pi` / `o
|
|
|
104
102
|
|
|
105
103
|
1. **`session_start`** — writes mode flag, notifies user via toast, preserves mid-session modes across compactions/reloads
|
|
106
104
|
2. **`before_agent_start`** — injects full skill ruleset on activation/mode-switch, and lightweight reminders on subsequent turns
|
|
107
|
-
3. **`input`** — intercepts `/caveman
|
|
105
|
+
3. **`input`** — intercepts `/caveman` commands and natural-language triggers (with negation and clause-boundary guards)
|
|
108
106
|
4. **`turn_end`** — accumulates token usage and savings stats
|
|
109
107
|
|
|
110
108
|
## Project Structure
|
package/extensions/caveman.ts
CHANGED
|
@@ -480,12 +480,6 @@ export function parseModeChange(promptRaw: string): Mode | "off" | null {
|
|
|
480
480
|
const cmd = parts[0].toLowerCase();
|
|
481
481
|
const rawArg = parts[1] || "";
|
|
482
482
|
|
|
483
|
-
if (cmd === "/ultracave" || cmd === "/caveman:ultracave") {
|
|
484
|
-
return "ultracave";
|
|
485
|
-
}
|
|
486
|
-
if (cmd === "/megacave" || cmd === "/caveman:megacave") {
|
|
487
|
-
return "megacave";
|
|
488
|
-
}
|
|
489
483
|
if (cmd === "/caveman" || cmd === "/caveman:caveman") {
|
|
490
484
|
const res = resolveModeArg(rawArg, resolveDefault);
|
|
491
485
|
if (res.action === "set" && res.mode) return res.mode;
|
|
@@ -681,30 +675,6 @@ export default function cavemanExtension(pi: ExtensionAPI) {
|
|
|
681
675
|
},
|
|
682
676
|
});
|
|
683
677
|
|
|
684
|
-
// ── /ultracave command ────────────────────────────────────────────────
|
|
685
|
-
pi.registerCommand("ultracave", {
|
|
686
|
-
description: "Switch to ultracave mode (maximum compression, fragments only)",
|
|
687
|
-
handler: async (_args, ctx) => {
|
|
688
|
-
sessionExplicitOff = false;
|
|
689
|
-
lastInjectedMode = null;
|
|
690
|
-
applyMode("ultracave");
|
|
691
|
-
saveUserConfigMode("ultracave");
|
|
692
|
-
notifyMode(ctx, "ultracave");
|
|
693
|
-
},
|
|
694
|
-
});
|
|
695
|
-
|
|
696
|
-
// ── /megacave command ─────────────────────────────────────────────────
|
|
697
|
-
pi.registerCommand("megacave", {
|
|
698
|
-
description: "Switch to megacave mode (Classical Chinese 文言文)",
|
|
699
|
-
handler: async (_args, ctx) => {
|
|
700
|
-
sessionExplicitOff = false;
|
|
701
|
-
lastInjectedMode = null;
|
|
702
|
-
applyMode("megacave");
|
|
703
|
-
saveUserConfigMode("megacave");
|
|
704
|
-
notifyMode(ctx, "megacave");
|
|
705
|
-
},
|
|
706
|
-
});
|
|
707
|
-
|
|
708
678
|
// ── /caveman-status command ────────────────────────────────────────────
|
|
709
679
|
pi.registerCommand("caveman-status", {
|
|
710
680
|
description: "Show current caveman mode and config",
|