@code-yeongyu/senpi 2026.6.10 → 2026.6.13

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 (285) hide show
  1. package/CHANGELOG.md +68 -1
  2. package/README.md +21 -21
  3. package/dist/cli/startup-ui.d.ts +10 -0
  4. package/dist/cli/startup-ui.d.ts.map +1 -1
  5. package/dist/cli/startup-ui.js +72 -1
  6. package/dist/cli/startup-ui.js.map +1 -1
  7. package/dist/core/agent-session.d.ts.map +1 -1
  8. package/dist/core/agent-session.js +3 -2
  9. package/dist/core/agent-session.js.map +1 -1
  10. package/dist/core/bash-executor.d.ts.map +1 -1
  11. package/dist/core/bash-executor.js +31 -7
  12. package/dist/core/bash-executor.js.map +1 -1
  13. package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts +0 -1
  14. package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
  15. package/dist/core/extensions/builtin/compaction/degradation-monitor.js +0 -1
  16. package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
  17. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  18. package/dist/core/extensions/builtin/compaction/index.js +4 -4
  19. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  20. package/dist/core/extensions/builtin/compaction/policy.d.ts +0 -5
  21. package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
  22. package/dist/core/extensions/builtin/compaction/policy.js +0 -4
  23. package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
  24. package/dist/core/extensions/builtin/compaction/speculative.d.ts +0 -6
  25. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  26. package/dist/core/extensions/builtin/compaction/speculative.js +0 -3
  27. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  28. package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts +1 -1
  29. package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
  30. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +10 -2
  31. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
  32. package/dist/core/extensions/builtin/permission-system/cli.d.ts +0 -3
  33. package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
  34. package/dist/core/extensions/builtin/permission-system/cli.js +0 -13
  35. package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
  36. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.d.ts +3 -0
  37. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.d.ts.map +1 -0
  38. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js +10 -0
  39. package/dist/core/extensions/builtin/prompt-preset/kimi-k2-7.js.map +1 -0
  40. package/dist/core/extensions/builtin/prompt-preset/presets.d.ts.map +1 -1
  41. package/dist/core/extensions/builtin/prompt-preset/presets.js +12 -0
  42. package/dist/core/extensions/builtin/prompt-preset/presets.js.map +1 -1
  43. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
  44. package/dist/core/extensions/builtin/prompt-preset/settings.d.ts.map +1 -1
  45. package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
  46. package/dist/core/extensions/builtin/prompt-preset/settings.js.map +1 -1
  47. package/dist/core/extensions/types.d.ts +1 -0
  48. package/dist/core/extensions/types.d.ts.map +1 -1
  49. package/dist/core/extensions/types.js.map +1 -1
  50. package/dist/core/model-registry.d.ts +0 -3
  51. package/dist/core/model-registry.d.ts.map +1 -1
  52. package/dist/core/model-registry.js +3 -3
  53. package/dist/core/model-registry.js.map +1 -1
  54. package/dist/core/model-resolver.d.ts +1 -0
  55. package/dist/core/model-resolver.d.ts.map +1 -1
  56. package/dist/core/model-resolver.js +43 -6
  57. package/dist/core/model-resolver.js.map +1 -1
  58. package/dist/core/project-trust.js +2 -2
  59. package/dist/core/project-trust.js.map +1 -1
  60. package/dist/core/resolve-config-value.d.ts +0 -4
  61. package/dist/core/resolve-config-value.d.ts.map +1 -1
  62. package/dist/core/resolve-config-value.js +0 -15
  63. package/dist/core/resolve-config-value.js.map +1 -1
  64. package/dist/core/session-manager.d.ts.map +1 -1
  65. package/dist/core/session-manager.js +11 -2
  66. package/dist/core/session-manager.js.map +1 -1
  67. package/dist/core/settings-manager.d.ts +6 -0
  68. package/dist/core/settings-manager.d.ts.map +1 -1
  69. package/dist/core/settings-manager.js +17 -0
  70. package/dist/core/settings-manager.js.map +1 -1
  71. package/dist/core/tools/edit-diff.d.ts +0 -5
  72. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  73. package/dist/core/tools/edit-diff.js +0 -7
  74. package/dist/core/tools/edit-diff.js.map +1 -1
  75. package/dist/core/tools/index.d.ts +0 -5
  76. package/dist/core/tools/index.d.ts.map +1 -1
  77. package/dist/core/tools/index.js +0 -67
  78. package/dist/core/tools/index.js.map +1 -1
  79. package/dist/core/tools/output-accumulator.d.ts +3 -5
  80. package/dist/core/tools/output-accumulator.d.ts.map +1 -1
  81. package/dist/core/tools/output-accumulator.js +38 -34
  82. package/dist/core/tools/output-accumulator.js.map +1 -1
  83. package/dist/core/tools/tail-window.d.ts +15 -0
  84. package/dist/core/tools/tail-window.d.ts.map +1 -0
  85. package/dist/core/tools/tail-window.js +75 -0
  86. package/dist/core/tools/tail-window.js.map +1 -0
  87. package/dist/core/trust-manager.d.ts +8 -3
  88. package/dist/core/trust-manager.d.ts.map +1 -1
  89. package/dist/core/trust-manager.js +26 -11
  90. package/dist/core/trust-manager.js.map +1 -1
  91. package/dist/index.d.ts +1 -1
  92. package/dist/index.d.ts.map +1 -1
  93. package/dist/index.js +1 -1
  94. package/dist/index.js.map +1 -1
  95. package/dist/main.d.ts.map +1 -1
  96. package/dist/main.js +17 -6
  97. package/dist/main.js.map +1 -1
  98. package/dist/modes/interactive/aborted-error-label.d.ts +2 -0
  99. package/dist/modes/interactive/aborted-error-label.d.ts.map +1 -0
  100. package/dist/modes/interactive/aborted-error-label.js +8 -0
  101. package/dist/modes/interactive/aborted-error-label.js.map +1 -0
  102. package/dist/modes/interactive/components/first-time-setup.d.ts +25 -0
  103. package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -0
  104. package/dist/modes/interactive/components/first-time-setup.js +101 -0
  105. package/dist/modes/interactive/components/first-time-setup.js.map +1 -0
  106. package/dist/modes/interactive/components/index.d.ts +1 -0
  107. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  108. package/dist/modes/interactive/components/index.js +1 -0
  109. package/dist/modes/interactive/components/index.js.map +1 -1
  110. package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
  111. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  112. package/dist/modes/interactive/components/tool-execution.js +45 -0
  113. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  114. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
  115. package/dist/modes/interactive/components/trust-selector.js +4 -4
  116. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  117. package/dist/modes/interactive/interactive-mode.d.ts +1 -0
  118. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  119. package/dist/modes/interactive/interactive-mode.js +18 -18
  120. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  121. package/dist/modes/interactive/theme/theme.d.ts +0 -4
  122. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  123. package/dist/modes/interactive/theme/theme.js +0 -7
  124. package/dist/modes/interactive/theme/theme.js.map +1 -1
  125. package/dist/modes/print-mode.d.ts.map +1 -1
  126. package/dist/modes/print-mode.js +1 -1
  127. package/dist/modes/print-mode.js.map +1 -1
  128. package/dist/modes/rpc/event-output-buffer.d.ts +10 -0
  129. package/dist/modes/rpc/event-output-buffer.d.ts.map +1 -0
  130. package/dist/modes/rpc/event-output-buffer.js +27 -0
  131. package/dist/modes/rpc/event-output-buffer.js.map +1 -0
  132. package/dist/modes/rpc/jsonl.d.ts.map +1 -1
  133. package/dist/modes/rpc/jsonl.js +9 -11
  134. package/dist/modes/rpc/jsonl.js.map +1 -1
  135. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  136. package/dist/modes/rpc/rpc-mode.js +17 -7
  137. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  138. package/dist/modes/rpc/rpc-types.d.ts +0 -1
  139. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  140. package/dist/modes/rpc/rpc-types.js.map +1 -1
  141. package/dist/package-manager-cli.d.ts.map +1 -1
  142. package/dist/package-manager-cli.js +10 -3
  143. package/dist/package-manager-cli.js.map +1 -1
  144. package/dist/utils/shell.d.ts.map +1 -1
  145. package/dist/utils/shell.js +14 -0
  146. package/dist/utils/shell.js.map +1 -1
  147. package/docs/compaction-guide.md +9 -9
  148. package/docs/compaction.md +2 -2
  149. package/docs/containerization.md +22 -22
  150. package/docs/custom-provider.md +13 -13
  151. package/docs/development.md +4 -2
  152. package/docs/extensions.md +18 -19
  153. package/docs/index.md +4 -4
  154. package/docs/json.md +21 -15
  155. package/docs/keybindings.md +6 -3
  156. package/docs/models.md +6 -6
  157. package/docs/packages.md +11 -11
  158. package/docs/prompt-templates.md +2 -2
  159. package/docs/providers.md +9 -9
  160. package/docs/rpc.md +14 -13
  161. package/docs/sdk.md +13 -9
  162. package/docs/security.md +14 -10
  163. package/docs/session-format.md +4 -4
  164. package/docs/sessions.md +14 -14
  165. package/docs/settings.md +14 -12
  166. package/docs/skills.md +8 -8
  167. package/docs/terminal-setup.md +2 -2
  168. package/docs/termux.md +3 -3
  169. package/docs/tui.md +4 -4
  170. package/docs/usage.md +52 -59
  171. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  172. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  173. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  174. package/examples/extensions/gondolin/package-lock.json +2 -2
  175. package/examples/extensions/gondolin/package.json +1 -1
  176. package/examples/extensions/sandbox/package-lock.json +2 -2
  177. package/examples/extensions/sandbox/package.json +1 -1
  178. package/examples/extensions/with-deps/package-lock.json +2 -2
  179. package/examples/extensions/with-deps/package.json +1 -1
  180. package/node_modules/@earendil-works/pi-agent-core/README.md +4 -3
  181. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +8 -0
  182. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  183. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +0 -2
  184. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  185. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -4
  186. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  187. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +7 -2
  188. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  189. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  190. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  191. package/node_modules/@earendil-works/pi-ai/README.md +2 -4
  192. package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts +0 -1
  193. package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
  194. package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -3
  195. package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
  196. package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
  197. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +252 -470
  198. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  199. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +533 -740
  200. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  201. package/node_modules/@earendil-works/pi-ai/dist/models.js +12 -5
  202. package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
  203. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  204. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +11 -2
  205. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  206. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  207. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +29 -16
  208. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  209. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts +0 -4
  210. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
  211. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js +0 -13
  212. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
  213. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js +3 -1
  215. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex-responses.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +0 -6
  217. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +0 -14
  219. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +7 -0
  221. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  222. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts +4 -1
  224. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.d.ts.map +1 -1
  225. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js +59 -19
  226. package/node_modules/@earendil-works/pi-ai/dist/utils/event-stream.js.map +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +1 -5
  228. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +3 -8
  230. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  231. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  232. package/node_modules/@earendil-works/pi-tui/README.md +1 -2
  233. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +2 -0
  234. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  235. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +93 -9
  236. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  237. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts +3 -1
  238. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.d.ts.map +1 -1
  239. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js +89 -2
  240. package/node_modules/@earendil-works/pi-tui/dist/components/markdown.js.map +1 -1
  241. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts +1 -1
  242. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +2 -2
  243. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
  244. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +2 -2
  245. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  246. package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -2
  247. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  248. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts +1 -0
  249. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js +15 -8
  251. package/node_modules/@earendil-works/pi-tui/dist/stdin-buffer.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -1
  253. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  254. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -7
  255. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  256. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  257. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +0 -1
  258. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  259. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts +2 -1
  260. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  261. package/node_modules/@earendil-works/pi-tui/dist/tui.js +72 -16
  262. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  263. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +1 -4
  264. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  265. package/node_modules/@earendil-works/pi-tui/dist/utils.js +1 -7
  266. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  267. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  268. package/npm-shrinkwrap.json +12 -12
  269. package/package.json +5 -5
  270. package/dist/core/experimental.d.ts +0 -2
  271. package/dist/core/experimental.d.ts.map +0 -1
  272. package/dist/core/experimental.js +0 -4
  273. package/dist/core/experimental.js.map +0 -1
  274. package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts +0 -11
  275. package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +0 -1
  276. package/dist/core/extensions/builtin/compaction/overflow-detection.js +0 -40
  277. package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +0 -1
  278. package/dist/core/extensions/builtin/system-messages.d.ts +0 -47
  279. package/dist/core/extensions/builtin/system-messages.d.ts.map +0 -1
  280. package/dist/core/extensions/builtin/system-messages.js +0 -117
  281. package/dist/core/extensions/builtin/system-messages.js.map +0 -1
  282. package/dist/core/index.d.ts +0 -13
  283. package/dist/core/index.d.ts.map +0 -1
  284. package/dist/core/index.js +0 -13
  285. package/dist/core/index.js.map +0 -1
package/docs/usage.md CHANGED
@@ -1,4 +1,4 @@
1
- # Using Pi
1
+ # Using Senpi
2
2
 
3
3
  This page collects day-to-day usage details that do not fit on the quickstart page.
4
4
 
@@ -53,7 +53,7 @@ Type `/` in the editor to open command completion. Extensions can register custo
53
53
  | `/reload` | Reload keybindings, extensions, skills, prompts, and context files |
54
54
  | `/hotkeys` | Show all keyboard shortcuts |
55
55
  | `/changelog` | Display version history |
56
- | `/quit` | Quit pi |
56
+ | `/quit` | Quit senpi |
57
57
 
58
58
  ## Message Queue
59
59
 
@@ -64,21 +64,21 @@ You can submit messages while the agent is still working:
64
64
  - **Escape** aborts and restores queued messages to the editor.
65
65
  - **Alt+Up** retrieves queued messages back to the editor.
66
66
 
67
- On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want pi to receive the shortcut.
67
+ On Windows Terminal, Alt+Enter is fullscreen by default. Remap it as described in [Terminal setup](terminal-setup.md) if you want senpi to receive the shortcut.
68
68
 
69
69
  Configure delivery in [Settings](settings.md) with `steeringMode` and `followUpMode`.
70
70
 
71
71
  ## Sessions
72
72
 
73
- Sessions are saved automatically to `~/.pi/agent/sessions/`, organized by working directory.
73
+ Sessions are saved automatically to `~/.senpi/agent/sessions/`, organized by working directory.
74
74
 
75
75
  ```bash
76
- pi -c # Continue most recent session
77
- pi -r # Browse and select a session
78
- pi --no-session # Ephemeral mode; do not save
79
- pi --name "my task" # Set session display name at startup
80
- pi --session <path|id> # Use a specific session file or session ID
81
- pi --fork <path|id> # Fork a session into a new session file
76
+ senpi -c # Continue most recent session
77
+ senpi -r # Browse and select a session
78
+ senpi --no-session # Ephemeral mode; do not save
79
+ senpi --name "my task" # Set session display name at startup
80
+ senpi --session <path|id> # Use a specific session file or session ID
81
+ senpi --fork <path|id> # Fork a session into a new session file
82
82
  ```
83
83
 
84
84
  Useful session commands:
@@ -93,36 +93,29 @@ See [Sessions](sessions.md) and [Compaction](compaction.md) for details.
93
93
 
94
94
  ## Context Files
95
95
 
96
- Pi loads `AGENTS.md` or `CLAUDE.md` at startup from:
96
+ Senpi loads `AGENTS.md` or `CLAUDE.md` at startup from:
97
97
 
98
- - `~/.pi/agent/AGENTS.md` for global instructions
98
+ - `~/.senpi/agent/AGENTS.md` for global instructions
99
99
  - parent directories, walking up from the current working directory
100
100
  - the current directory
101
101
 
102
102
  Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
103
103
 
104
- ### System Prompt Files
105
-
106
- Replace the default system prompt with:
107
-
108
- - `.pi/SYSTEM.md` for a project
109
- - `~/.pi/agent/SYSTEM.md` globally
110
-
111
- Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
104
+ To replace or extend the default system prompt, use the `--system-prompt` and `--append-system-prompt` CLI flags described under [Other Options](#other-options).
112
105
 
113
106
  ### Project Trust
114
107
 
115
- On interactive startup, pi asks before trusting a project folder that contains project-local extensions or settings and has no saved decision for the folder or a parent folder in `~/.pi/agent/trust.json`. Trusting a project allows pi to load `.pi/settings.json` and `.pi` resources, install missing project packages, and execute project extensions.
108
+ On interactive startup, senpi asks before trusting a project folder that contains project-local settings, resources, or project `.agents/skills` and has no saved decision for the folder or a parent folder in `~/.senpi/agent/trust.json`. Trusting a project allows senpi to load `.senpi/settings.json` and `.senpi` resources, install missing project packages, and execute project extensions.
116
109
 
117
- Before the trust decision, pi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
110
+ Before the trust decision, senpi loads only context files, user/global extensions, and CLI `-e` extensions so they can handle the `project_trust` event. Project-local extensions, project package-managed extensions, and project settings are loaded only after the project is trusted. This split also applies when switching to a session from a different cwd whose trust has not been resolved in the current process.
118
111
 
119
- Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore trust-gated project inputs, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
112
+ Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, they use `defaultProjectTrust` from global settings: `ask` (default) and `never` ignore those project resources, while `always` trusts them. Pass `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
120
113
 
121
- If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.pi/agent/settings.json`, or change it with `/settings`.
114
+ If no extension or saved decision applies, `defaultProjectTrust` controls the fallback behavior. Set it to `"ask"`, `"always"`, or `"never"` in `~/.senpi/agent/settings.json`, or change it with `/settings`.
122
115
 
123
- `pi config` and package commands use the same project trust flow. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
116
+ `senpi config` and package commands use the same project trust flow, except `senpi update` never prompts. Pass `--approve` to trust project-local settings for one command or `--no-approve` to ignore them.
124
117
 
125
- Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.pi/agent/trust.json` only; the current session is not reloaded, so restart pi for changes to take effect.
118
+ Use `/trust` in interactive mode to save a project trust decision for future sessions, including trust for the immediate parent folder. It writes `~/.senpi/agent/trust.json` only; the current session is not reloaded, so restart senpi for changes to take effect.
126
119
 
127
120
 
128
121
  ## Exporting and Sharing Sessions
@@ -131,31 +124,31 @@ Use `/export [file]` to write a session to HTML.
131
124
 
132
125
  Use `/share` to upload a private GitHub gist with a shareable HTML link.
133
126
 
134
- If you use pi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
127
+ If you use senpi for open source work and want to publish sessions for model, prompt, tool, and evaluation research, see [`badlogic/pi-share-hf`](https://github.com/badlogic/pi-share-hf). It publishes sessions to Hugging Face datasets.
135
128
 
136
129
  ## CLI Reference
137
130
 
138
131
  ```bash
139
- pi [options] [@files...] [messages...]
132
+ senpi [options] [@files...] [messages...]
140
133
  ```
141
134
 
142
135
  ### Package Commands
143
136
 
144
137
  ```bash
145
- pi install <source> [-l] # Install package, -l for project-local
146
- pi remove <source> [-l] # Remove package
147
- pi uninstall <source> [-l] # Alias for remove
148
- pi update [source|self|pi] # Update pi and packages; reconcile pinned git refs
149
- pi update --extensions # Update packages only; reconcile pinned git refs
150
- pi update --self # Update pi only
151
- pi update --extension <src> # Update one package
152
- pi list # List installed packages
153
- pi config # Enable/disable package resources
138
+ senpi install <source> [-l] # Install package, -l for project-local
139
+ senpi remove <source> [-l] # Remove package
140
+ senpi uninstall <source> [-l] # Alias for remove
141
+ senpi update [source|self|senpi] # Update senpi and packages; reconcile pinned git refs
142
+ senpi update --extensions # Update packages only; reconcile pinned git refs
143
+ senpi update --self # Update senpi only
144
+ senpi update --extension <src> # Update one package
145
+ senpi list # List installed packages
146
+ senpi config # Enable/disable package resources
154
147
  ```
155
148
 
156
- These commands manage pi packages, not the pi CLI installation. To uninstall pi itself, see [Quickstart](quickstart.md#uninstall). `pi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command.
149
+ These commands manage senpi packages, not the senpi CLI installation. To uninstall senpi itself, see [Quickstart](quickstart.md#uninstall). `senpi config` and project package commands accept `--approve`/`--no-approve` to trust or ignore project-local settings for one command. `senpi update` never prompts for project trust.
157
150
 
158
- See [Pi Packages](packages.md) for package sources and security notes.
151
+ See [Senpi Packages](packages.md) for package sources and security notes.
159
152
 
160
153
  ### Modes
161
154
 
@@ -167,10 +160,10 @@ See [Pi Packages](packages.md) for package sources and security notes.
167
160
  | `--mode rpc` | RPC mode over stdin/stdout; see [RPC mode](rpc.md) |
168
161
  | `--export <in> [out]` | Export a session to HTML |
169
162
 
170
- In print mode, pi also reads piped stdin and merges it into the initial prompt:
163
+ In print mode, senpi also reads piped stdin and merges it into the initial prompt:
171
164
 
172
165
  ```bash
173
- cat README.md | pi -p "Summarize this text"
166
+ cat README.md | senpi -p "Summarize this text"
174
167
  ```
175
168
 
176
169
  ### Model Options
@@ -224,7 +217,7 @@ Built-in tools: `read`, `bash`, `edit`, `write`, `grep`, `find`, `ls`.
224
217
  Combine `--no-*` with explicit flags to load exactly what you need, ignoring settings. Example:
225
218
 
226
219
  ```bash
227
- pi --no-extensions -e ./my-extension.ts
220
+ senpi --no-extensions -e ./my-extension.ts
228
221
  ```
229
222
 
230
223
  ### Other Options
@@ -244,61 +237,61 @@ pi --no-extensions -e ./my-extension.ts
244
237
  Prefix files with `@` to include them in the message:
245
238
 
246
239
  ```bash
247
- pi @prompt.md "Answer this"
248
- pi -p @screenshot.png "What's in this image?"
249
- pi @code.ts @test.ts "Review these files"
240
+ senpi @prompt.md "Answer this"
241
+ senpi -p @screenshot.png "What's in this image?"
242
+ senpi @code.ts @test.ts "Review these files"
250
243
  ```
251
244
 
252
245
  ### Examples
253
246
 
254
247
  ```bash
255
248
  # Interactive with initial prompt
256
- pi "List all .ts files in src/"
249
+ senpi "List all .ts files in src/"
257
250
 
258
251
  # Non-interactive
259
- pi -p "Summarize this codebase"
252
+ senpi -p "Summarize this codebase"
260
253
 
261
254
  # Non-interactive with piped stdin
262
- cat README.md | pi -p "Summarize this text"
255
+ cat README.md | senpi -p "Summarize this text"
263
256
 
264
257
  # Named one-shot session
265
- pi --name "release audit" -p "Audit this repository"
258
+ senpi --name "release audit" -p "Audit this repository"
266
259
 
267
260
  # Different model
268
- pi --provider openai --model gpt-4o "Help me refactor"
261
+ senpi --provider openai --model gpt-4o "Help me refactor"
269
262
 
270
263
  # Model with provider prefix
271
- pi --model openai/gpt-4o "Help me refactor"
264
+ senpi --model openai/gpt-4o "Help me refactor"
272
265
 
273
266
  # Model with thinking level shorthand
274
- pi --model sonnet:high "Solve this complex problem"
267
+ senpi --model sonnet:high "Solve this complex problem"
275
268
 
276
269
  # Limit model cycling
277
- pi --models "claude-*,gpt-4o"
270
+ senpi --models "claude-*,gpt-4o"
278
271
 
279
272
  # Read-only mode
280
- pi --tools read,grep,find,ls -p "Review the code"
273
+ senpi --tools read,grep,find,ls -p "Review the code"
281
274
 
282
275
  # Disable one extension or built-in tool while keeping the rest available
283
- pi --exclude-tools ask_question
276
+ senpi --exclude-tools ask_question
284
277
  ```
285
278
 
286
279
  ### Environment Variables
287
280
 
288
281
  | Variable | Description |
289
282
  |----------|-------------|
290
- | `PI_CODING_AGENT_DIR` | Override config directory; default is `~/.pi/agent` |
291
- | `PI_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
283
+ | `SENPI_CODING_AGENT_DIR` | Override config directory; default is `~/.senpi/agent` |
284
+ | `SENPI_CODING_AGENT_SESSION_DIR` | Override session storage directory; overridden by `--session-dir` |
292
285
  | `PI_PACKAGE_DIR` | Override package directory, useful for Nix/Guix store paths |
293
286
  | `PI_OFFLINE` | Disable startup network operations, including update checks, package update checks, and install/update telemetry |
294
- | `PI_SKIP_VERSION_CHECK` | Skip the Pi version update check at startup. This prevents the `pi.dev` latest-version request |
287
+ | `PI_SKIP_VERSION_CHECK` | Skip the senpi version update check at startup. This prevents the npm registry latest-version request |
295
288
  | `PI_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no`. This does not disable update checks |
296
289
  | `PI_CACHE_RETENTION` | Set to `long` for extended prompt cache where supported |
297
290
  | `VISUAL`, `EDITOR` | External editor for Ctrl+G |
298
291
 
299
292
  ## Design Principles
300
293
 
301
- Pi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
294
+ Senpi keeps the core small and pushes workflow-specific behavior into extensions, skills, prompt templates, and packages.
302
295
 
303
296
  It intentionally does not include built-in MCP, permission popups, plan mode, to-dos, or long-running shell orchestration. You can build or install those workflows as extensions or packages, or use external tools such as containers and tmux.
304
297
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider",
3
- "version": "0.79.1",
3
+ "version": "0.79.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-custom-provider",
9
- "version": "0.79.1",
9
+ "version": "0.79.3",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "^0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.79.1",
4
+ "version": "0.79.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.79.1",
4
+ "version": "0.79.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
- "version": "0.79.1",
3
+ "version": "0.79.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-gondolin",
9
- "version": "0.79.1",
9
+ "version": "0.79.3",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.79.1",
4
+ "version": "0.79.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
- "version": "1.9.1",
3
+ "version": "1.9.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-sandbox",
9
- "version": "1.9.1",
9
+ "version": "1.9.3",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "^0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-sandbox",
3
3
  "private": true,
4
- "version": "1.9.1",
4
+ "version": "1.9.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
- "version": "0.79.1",
3
+ "version": "0.79.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "pi-extension-with-deps",
9
- "version": "0.79.1",
9
+ "version": "0.79.3",
10
10
  "dependencies": {
11
11
  "ms": "^2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.79.1",
4
+ "version": "0.79.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -106,7 +106,7 @@ Tool execution mode is configurable:
106
106
 
107
107
  In parallel mode, tool completion events follow tool completion order, but persisted toolResult messages still follow assistant source order.
108
108
 
109
- The mode can be set globally via `toolExecution` in the agent config, or per-tool via `executionMode` on `AgentTool`. If any tool call in a batch targets a tool with `executionMode: "sequential"`, the entire batch executes sequentially regardless of the global setting.
109
+ The mode can be set globally via `toolExecution` in the agent config, or per-tool via `executionMode` on `AgentTool`. In parallel mode, a tool call targeting a tool with `executionMode: "sequential"` runs as an exclusive barrier: it waits for all previously scheduled calls in the batch to finish, and later calls wait for it to complete. Parallel tools before or after the barrier still execute concurrently with each other.
110
110
 
111
111
  The `beforeToolCall` hook runs after `tool_execution_start` and validated argument parsing. It can block execution. The `afterToolCall` hook runs after tool execution finishes and before `tool_execution_end` and final tool result message events are emitted.
112
112
 
@@ -164,7 +164,7 @@ const agent = new Agent({
164
164
  initialState: {
165
165
  systemPrompt: string,
166
166
  model: Model<any>,
167
- thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh",
167
+ thinkingLevel: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max", // "max" is Anthropic-only adaptive thinking effort
168
168
  tools: AgentTool<any>[],
169
169
  messages: AgentMessage[],
170
170
  },
@@ -391,7 +391,8 @@ const readFileTool: AgentTool = {
391
391
  path: Type.String({ description: "File path" }),
392
392
  }),
393
393
  // Override execution mode for this tool (optional).
394
- // "sequential" forces the entire batch to run one at a time.
394
+ // "sequential" makes this tool an exclusive barrier in parallel batches:
395
+ // it runs alone, but parallel tools before or after it still run concurrently.
395
396
  // "parallel" allows concurrent execution with other tool calls.
396
397
  // If omitted, the global toolExecution config applies.
397
398
  executionMode: "sequential",
@@ -571,8 +571,11 @@ async function prepareToolCall(currentContext, assistantMessage, toolCall, confi
571
571
  }
572
572
  async function executePreparedToolCall(prepared, signal, emit) {
573
573
  const updateEvents = [];
574
+ let acceptingUpdates = true;
574
575
  try {
575
576
  const result = await prepared.tool.execute(prepared.toolCall.id, prepared.args, signal, (partialResult) => {
577
+ if (!acceptingUpdates)
578
+ return;
576
579
  updateEvents.push(Promise.resolve(emit({
577
580
  type: "tool_execution_update",
578
581
  toolCallId: prepared.toolCall.id,
@@ -581,16 +584,21 @@ async function executePreparedToolCall(prepared, signal, emit) {
581
584
  partialResult,
582
585
  })));
583
586
  });
587
+ acceptingUpdates = false;
584
588
  await Promise.all(updateEvents);
585
589
  return { result, isError: false };
586
590
  }
587
591
  catch (error) {
592
+ acceptingUpdates = false;
588
593
  await Promise.all(updateEvents);
589
594
  return {
590
595
  result: createErrorToolResult(error instanceof Error ? error.message : String(error)),
591
596
  isError: true,
592
597
  };
593
598
  }
599
+ finally {
600
+ acceptingUpdates = false;
601
+ }
594
602
  }
595
603
  async function finalizeExecutedToolCall(currentContext, assistantMessage, prepared, executed, config, signal) {
596
604
  let result = executed.result;