@oh-my-pi/pi-coding-agent 14.5.8 → 14.5.9

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 (37) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +7 -7
  3. package/src/config/settings-schema.ts +3 -3
  4. package/src/edit/modes/atom.lark +7 -5
  5. package/src/edit/modes/atom.ts +462 -56
  6. package/src/edit/modes/hashline.ts +21 -1
  7. package/src/lsp/index.ts +2 -4
  8. package/src/lsp/render.ts +0 -3
  9. package/src/lsp/types.ts +1 -4
  10. package/src/lsp/utils.ts +18 -14
  11. package/src/modes/controllers/command-controller.ts +17 -0
  12. package/src/modes/controllers/input-controller.ts +7 -1
  13. package/src/modes/interactive-mode.ts +30 -23
  14. package/src/modes/types.ts +4 -2
  15. package/src/modes/utils/context-usage.ts +294 -0
  16. package/src/prompts/tools/atom.md +99 -44
  17. package/src/prompts/tools/exit-plan-mode.md +5 -39
  18. package/src/prompts/tools/lsp.md +2 -3
  19. package/src/prompts/tools/{run-command.md → recipe.md} +1 -1
  20. package/src/prompts/tools/task.md +34 -147
  21. package/src/prompts/tools/todo-write.md +22 -64
  22. package/src/session/compaction/compaction.ts +35 -22
  23. package/src/session/session-dump-format.ts +1 -0
  24. package/src/slash-commands/builtin-registry.ts +12 -5
  25. package/src/tools/debug.ts +57 -70
  26. package/src/tools/index.ts +7 -7
  27. package/src/tools/{run-command → recipe}/index.ts +19 -19
  28. package/src/tools/recipe/render.ts +19 -0
  29. package/src/tools/{run-command → recipe}/runner.ts +28 -7
  30. package/src/tools/{run-command → recipe}/runners/pkg.ts +23 -53
  31. package/src/tools/renderers.ts +2 -2
  32. package/src/tools/run-command/render.ts +0 -18
  33. /package/src/tools/{run-command → recipe}/runners/cargo.ts +0 -0
  34. /package/src/tools/{run-command → recipe}/runners/index.ts +0 -0
  35. /package/src/tools/{run-command → recipe}/runners/just.ts +0 -0
  36. /package/src/tools/{run-command → recipe}/runners/make.ts +0 -0
  37. /package/src/tools/{run-command → recipe}/runners/task.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,28 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [14.5.9] - 2026-04-30
6
+
7
+ ### Added
8
+
9
+ - Added the `/context` slash command to display an estimated context-usage breakdown panel for the current session
10
+ - Added `-LidA..LidB` syntax to delete inclusive line ranges in a single atom operation
11
+ - Added `LidA..LidB=TEXT` range-replace syntax with `\TEXT` and `\` continuation lines for multi-line replacement blocks
12
+ - Added shorthand cursor+insert operations in atom edits, including `^Lid` (insert before anchor), `^+TEXT`, `$+TEXT`, and `Lid+TEXT`/`@Lid+TEXT`
13
+ - Added standalone file-op fallback so `!rm` and `!mv DEST` inputs can be normalized into sections when using split input parsing
14
+
15
+ ### Changed
16
+
17
+ - Changed token counting to use tokenizer-based estimates instead of a character-per-4 heuristic for context and compaction calculations
18
+ - Changed hashline anchor auto-rebase tolerance from ±2 lines to ±5 lines for stale Lid recovery
19
+ - Changed atom input handling so `#`-prefixed lines are treated as comments and ignored
20
+ - Changed execution when all edits are no-op `Lid=TEXT` replacements to return success with a no-change explanation instead of throwing
21
+
22
+ ### Fixed
23
+
24
+ - Fixed malformed range and unified-diff-like atom syntax by rejecting reversed ranges, mismatched range endpoint hashes, and forms like `+Lid|TEXT`, `+Lid=TEXT`, and `-LidA..LidB|TEXT` with explicit actionable errors
25
+ - Fixed hash mismatch errors to include likely-shifted anchor hints when a unique matching line is found elsewhere in the file
26
+
5
27
  ## [14.5.8] - 2026-04-29
6
28
  ### Breaking Changes
7
29
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-coding-agent",
4
- "version": "14.5.8",
4
+ "version": "14.5.9",
5
5
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Boluk",
@@ -46,12 +46,12 @@
46
46
  "dependencies": {
47
47
  "@agentclientprotocol/sdk": "0.20.0",
48
48
  "@mozilla/readability": "^0.6.0",
49
- "@oh-my-pi/omp-stats": "14.5.8",
50
- "@oh-my-pi/pi-agent-core": "14.5.8",
51
- "@oh-my-pi/pi-ai": "14.5.8",
52
- "@oh-my-pi/pi-natives": "14.5.8",
53
- "@oh-my-pi/pi-tui": "14.5.8",
54
- "@oh-my-pi/pi-utils": "14.5.8",
49
+ "@oh-my-pi/omp-stats": "14.5.9",
50
+ "@oh-my-pi/pi-agent-core": "14.5.9",
51
+ "@oh-my-pi/pi-ai": "14.5.9",
52
+ "@oh-my-pi/pi-natives": "14.5.9",
53
+ "@oh-my-pi/pi-tui": "14.5.9",
54
+ "@oh-my-pi/pi-utils": "14.5.9",
55
55
  "@puppeteer/browsers": "^2.13.0",
56
56
  "@sinclair/typebox": "^0.34.49",
57
57
  "@xterm/headless": "^6.0.0",
@@ -1306,14 +1306,14 @@ export const SETTINGS_SCHEMA = {
1306
1306
  },
1307
1307
  },
1308
1308
 
1309
- "runCommand.enabled": {
1309
+ "recipe.enabled": {
1310
1310
  type: "boolean",
1311
1311
  default: true,
1312
1312
  ui: {
1313
1313
  tab: "tools",
1314
- label: "Run command",
1314
+ label: "Recipe",
1315
1315
  description:
1316
- "Enable the run_command tool when a justfile / package.json / Cargo.toml / Makefile / Taskfile is present",
1316
+ "Enable the recipe tool when a justfile / package.json / Cargo.toml / Makefile / Taskfile is present",
1317
1317
  },
1318
1318
  },
1319
1319
 
@@ -8,8 +8,8 @@ file_header: "---" filename LF
8
8
  filename: /(.+)/
9
9
 
10
10
  line_change: line* mutation_line line*
11
- line: insert_line | delete_line | set_line | move_line | blank
12
- mutation_line: insert_line | delete_line | set_line
11
+ line: insert_line | delete_line | set_block | move_line | blank
12
+ mutation_line: insert_line | delete_line | set_block
13
13
 
14
14
  whole_file_change: blank* whole_file_line blank*
15
15
  whole_file_line: remove_file | move_file
@@ -18,9 +18,11 @@ move_file: "!mv" WS destination LF
18
18
  destination: /(?:[^ \t\r\n]+|"[^"\r\n]+"|'[^'\r\n]+')/
19
19
 
20
20
  insert_line: "+" /(.*)/ LF
21
- delete_line: "-" LID LF
22
- set_line: LID "=" /(.*)/ LF
23
- move_line: ("@" LID | "$" | "^") LF
21
+ delete_line: "-" (LID ".." LID | LID) LF
22
+ set_line: (LID ".." LID | LID) WS? "=" /(.*)/ LF
23
+ set_block: set_line continuation_line*
24
+ continuation_line: "\\" /(.*)/ LF
25
+ move_line: ("@" LID | "^" LID | "^" | "$") LF
24
26
 
25
27
  LID: /[1-9][0-9]*[a-z]{2}/
26
28
  WS: /[ \t]+/