@mariozechner/pi-coding-agent 0.34.1 → 0.34.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +20 -18
  2. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.34.2] - 2026-01-04
4
+
3
5
  ## [0.34.1] - 2026-01-04
4
6
 
5
7
  ### Added
@@ -14,8 +16,26 @@
14
16
 
15
17
  ### Added
16
18
 
19
+ - Hook API: `pi.getActiveTools()` and `pi.setActiveTools(toolNames)` for dynamically enabling/disabling tools from hooks
20
+ - Hook API: `pi.getAllTools()` to enumerate all configured tools (built-in via --tools or default, plus custom tools)
21
+ - Hook API: `pi.registerFlag(name, options)` and `pi.getFlag(name)` for hooks to register custom CLI flags (parsed automatically)
22
+ - Hook API: `pi.registerShortcut(shortcut, options)` for hooks to register custom keyboard shortcuts using `KeyId` (e.g., `Key.shift("p")`). Conflicts with built-in shortcuts are skipped, conflicts between hooks logged as warnings.
23
+ - Hook API: `ctx.ui.setWidget(key, content)` for status displays above the editor. Accepts either a string array or a component factory function.
24
+ - Hook API: `theme.strikethrough(text)` for strikethrough text styling
17
25
  - Hook API: `before_agent_start` handlers can now return `systemPromptAppend` to dynamically append text to the system prompt for that turn. Multiple hooks' appends are concatenated.
18
26
  - Hook API: `before_agent_start` handlers can now return multiple messages (all are injected, not just the first)
27
+ - `/hotkeys` command now shows hook-registered shortcuts in a separate "Hooks" section
28
+ - New example hook: `plan-mode.ts` - Claude Code-style read-only exploration mode:
29
+ - Toggle via `/plan` command, `Shift+P` shortcut, or `--plan` CLI flag
30
+ - Read-only tools: `read`, `bash`, `grep`, `find`, `ls` (no `edit`/`write`)
31
+ - Bash commands restricted to non-destructive operations (blocks `rm`, `mv`, `git commit`, `npm install`, etc.)
32
+ - Interactive prompt after each response: execute plan, stay in plan mode, or refine
33
+ - Todo list widget showing progress with checkboxes and strikethrough for completed items
34
+ - Each todo has a unique ID; agent marks items done by outputting `[DONE:id]`
35
+ - Progress updates via `agent_end` hook (parses completed items from final message)
36
+ - `/todos` command to view current plan progress
37
+ - Shows `⏸ plan` indicator in footer when in plan mode, `📋 2/5` when executing
38
+ - State persists across sessions (including todo progress)
19
39
  - New example hook: `tools.ts` - Interactive `/tools` command to enable/disable tools with session persistence
20
40
  - New example hook: `pirate.ts` - Demonstrates `systemPromptAppend` to make the agent speak like a pirate
21
41
  - Tool registry now contains all built-in tools (read, bash, edit, write, grep, find, ls) even when `--tools` limits the initially active set. Hooks can enable any tool from the registry via `pi.setActiveTools()`.
@@ -61,24 +81,6 @@
61
81
  ### Added
62
82
 
63
83
  - `$ARGUMENTS` syntax for custom slash commands as alternative to `$@` for all arguments joined. Aligns with patterns used by Claude, Codex, and OpenCode. Both syntaxes remain fully supported. ([#418](https://github.com/badlogic/pi-mono/pull/418) by [@skuridin](https://github.com/skuridin))
64
- - Hook API: `pi.getActiveTools()` and `pi.setActiveTools(toolNames)` for dynamically enabling/disabling tools from hooks
65
- - Hook API: `pi.getAllTools()` to enumerate all configured tools (built-in via --tools or default, plus custom tools)
66
- - Hook API: `pi.registerFlag(name, options)` and `pi.getFlag(name)` for hooks to register custom CLI flags (parsed automatically)
67
- - Hook API: `pi.registerShortcut(shortcut, options)` for hooks to register custom keyboard shortcuts using `KeyId` (e.g., `Key.shift("p")`). Conflicts with built-in shortcuts are skipped, conflicts between hooks logged as warnings.
68
- - Hook API: `ctx.ui.setWidget(key, content)` for status displays above the editor. Accepts either a string array or a component factory function.
69
- - Hook API: `theme.strikethrough(text)` for strikethrough text styling
70
- - `/hotkeys` command now shows hook-registered shortcuts in a separate "Hooks" section
71
- - New example hook: `plan-mode.ts` - Claude Code-style read-only exploration mode:
72
- - Toggle via `/plan` command, `Shift+P` shortcut, or `--plan` CLI flag
73
- - Read-only tools: `read`, `bash`, `grep`, `find`, `ls` (no `edit`/`write`)
74
- - Bash commands restricted to non-destructive operations (blocks `rm`, `mv`, `git commit`, `npm install`, etc.)
75
- - Interactive prompt after each response: execute plan, stay in plan mode, or refine
76
- - Todo list widget showing progress with checkboxes and strikethrough for completed items
77
- - Each todo has a unique ID; agent marks items done by outputting `[DONE:id]`
78
- - Progress updates via `agent_end` hook (parses completed items from final message)
79
- - `/todos` command to view current plan progress
80
- - Shows `⏸ plan` indicator in footer when in plan mode, `📋 2/5` when executing
81
- - State persists across sessions (including todo progress)
82
84
 
83
85
  ### Changed
84
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mariozechner/pi-coding-agent",
3
- "version": "0.34.1",
3
+ "version": "0.34.2",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "piConfig": {
@@ -39,9 +39,9 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@crosscopy/clipboard": "^0.2.8",
42
- "@mariozechner/pi-agent-core": "^0.34.1",
43
- "@mariozechner/pi-ai": "^0.34.1",
44
- "@mariozechner/pi-tui": "^0.34.1",
42
+ "@mariozechner/pi-agent-core": "^0.34.2",
43
+ "@mariozechner/pi-ai": "^0.34.2",
44
+ "@mariozechner/pi-tui": "^0.34.2",
45
45
  "chalk": "^5.5.0",
46
46
  "cli-highlight": "^2.1.11",
47
47
  "diff": "^8.0.2",