@code-yeongyu/senpi 2026.6.6-3 → 2026.6.10-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 (342) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +102 -100
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +1 -2
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/cli/project-trust.d.ts +10 -0
  7. package/dist/cli/project-trust.d.ts.map +1 -0
  8. package/dist/cli/project-trust.js +48 -0
  9. package/dist/cli/project-trust.js.map +1 -0
  10. package/dist/cli/startup-ui.d.ts +7 -0
  11. package/dist/cli/startup-ui.d.ts.map +1 -0
  12. package/dist/cli/startup-ui.js +59 -0
  13. package/dist/cli/startup-ui.js.map +1 -0
  14. package/dist/cli.js +10 -1
  15. package/dist/cli.js.map +1 -1
  16. package/dist/core/agent-session-runtime.d.ts +3 -1
  17. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  18. package/dist/core/agent-session-runtime.js +4 -1
  19. package/dist/core/agent-session-runtime.js.map +1 -1
  20. package/dist/core/agent-session-services.d.ts +2 -1
  21. package/dist/core/agent-session-services.d.ts.map +1 -1
  22. package/dist/core/agent-session-services.js +2 -2
  23. package/dist/core/agent-session-services.js.map +1 -1
  24. package/dist/core/agent-session.d.ts +1 -0
  25. package/dist/core/agent-session.d.ts.map +1 -1
  26. package/dist/core/agent-session.js +6 -0
  27. package/dist/core/agent-session.js.map +1 -1
  28. package/dist/core/compaction/utils.d.ts +1 -1
  29. package/dist/core/compaction/utils.d.ts.map +1 -1
  30. package/dist/core/compaction/utils.js +1 -1
  31. package/dist/core/compaction/utils.js.map +1 -1
  32. package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts +0 -1
  33. package/dist/core/extensions/builtin/compaction/degradation-monitor.d.ts.map +1 -1
  34. package/dist/core/extensions/builtin/compaction/degradation-monitor.js +0 -1
  35. package/dist/core/extensions/builtin/compaction/degradation-monitor.js.map +1 -1
  36. package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
  37. package/dist/core/extensions/builtin/compaction/index.js +4 -4
  38. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  39. package/dist/core/extensions/builtin/compaction/policy.d.ts +0 -5
  40. package/dist/core/extensions/builtin/compaction/policy.d.ts.map +1 -1
  41. package/dist/core/extensions/builtin/compaction/policy.js +0 -4
  42. package/dist/core/extensions/builtin/compaction/policy.js.map +1 -1
  43. package/dist/core/extensions/builtin/compaction/speculative.d.ts +0 -6
  44. package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
  45. package/dist/core/extensions/builtin/compaction/speculative.js +0 -3
  46. package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
  47. package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts +1 -1
  48. package/dist/core/extensions/builtin/gpt-apply-patch/extension.d.ts.map +1 -1
  49. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js +10 -2
  50. package/dist/core/extensions/builtin/gpt-apply-patch/extension.js.map +1 -1
  51. package/dist/core/extensions/builtin/permission-system/cli.d.ts +0 -3
  52. package/dist/core/extensions/builtin/permission-system/cli.d.ts.map +1 -1
  53. package/dist/core/extensions/builtin/permission-system/cli.js +0 -13
  54. package/dist/core/extensions/builtin/permission-system/cli.js.map +1 -1
  55. package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
  56. package/dist/core/extensions/builtin/todotools/index.js +0 -2
  57. package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
  58. package/dist/core/extensions/builtin/todotools/prompt.d.ts +1 -1
  59. package/dist/core/extensions/builtin/todotools/prompt.d.ts.map +1 -1
  60. package/dist/core/extensions/builtin/todotools/prompt.js +0 -2
  61. package/dist/core/extensions/builtin/todotools/prompt.js.map +1 -1
  62. package/dist/core/extensions/index.d.ts +1 -1
  63. package/dist/core/extensions/index.d.ts.map +1 -1
  64. package/dist/core/extensions/index.js.map +1 -1
  65. package/dist/core/extensions/loader.d.ts +1 -1
  66. package/dist/core/extensions/loader.d.ts.map +1 -1
  67. package/dist/core/extensions/loader.js +4 -4
  68. package/dist/core/extensions/loader.js.map +1 -1
  69. package/dist/core/extensions/runner.d.ts +7 -2
  70. package/dist/core/extensions/runner.d.ts.map +1 -1
  71. package/dist/core/extensions/runner.js +34 -0
  72. package/dist/core/extensions/runner.js.map +1 -1
  73. package/dist/core/extensions/types.d.ts +21 -1
  74. package/dist/core/extensions/types.d.ts.map +1 -1
  75. package/dist/core/extensions/types.js.map +1 -1
  76. package/dist/core/model-registry.d.ts +3 -4
  77. package/dist/core/model-registry.d.ts.map +1 -1
  78. package/dist/core/model-registry.js +23 -6
  79. package/dist/core/model-registry.js.map +1 -1
  80. package/dist/core/project-trust.d.ts +15 -0
  81. package/dist/core/project-trust.d.ts.map +1 -0
  82. package/dist/core/project-trust.js +58 -0
  83. package/dist/core/project-trust.js.map +1 -0
  84. package/dist/core/prompt-templates.d.ts +2 -1
  85. package/dist/core/prompt-templates.d.ts.map +1 -1
  86. package/dist/core/prompt-templates.js +24 -26
  87. package/dist/core/prompt-templates.js.map +1 -1
  88. package/dist/core/resolve-config-value.d.ts +0 -4
  89. package/dist/core/resolve-config-value.d.ts.map +1 -1
  90. package/dist/core/resolve-config-value.js +0 -15
  91. package/dist/core/resolve-config-value.js.map +1 -1
  92. package/dist/core/resource-loader.d.ts +14 -3
  93. package/dist/core/resource-loader.d.ts.map +1 -1
  94. package/dist/core/resource-loader.js +128 -58
  95. package/dist/core/resource-loader.js.map +1 -1
  96. package/dist/core/session-manager.d.ts +3 -0
  97. package/dist/core/session-manager.d.ts.map +1 -1
  98. package/dist/core/session-manager.js +34 -17
  99. package/dist/core/session-manager.js.map +1 -1
  100. package/dist/core/session-resident-store.d.ts +16 -0
  101. package/dist/core/session-resident-store.d.ts.map +1 -0
  102. package/dist/core/session-resident-store.js +48 -0
  103. package/dist/core/session-resident-store.js.map +1 -0
  104. package/dist/core/settings-manager.d.ts +4 -0
  105. package/dist/core/settings-manager.d.ts.map +1 -1
  106. package/dist/core/settings-manager.js +9 -0
  107. package/dist/core/settings-manager.js.map +1 -1
  108. package/dist/core/tools/edit-diff.d.ts +0 -5
  109. package/dist/core/tools/edit-diff.d.ts.map +1 -1
  110. package/dist/core/tools/edit-diff.js +0 -7
  111. package/dist/core/tools/edit-diff.js.map +1 -1
  112. package/dist/core/tools/index.d.ts +0 -5
  113. package/dist/core/tools/index.d.ts.map +1 -1
  114. package/dist/core/tools/index.js +0 -67
  115. package/dist/core/tools/index.js.map +1 -1
  116. package/dist/core/trust-manager.d.ts +22 -0
  117. package/dist/core/trust-manager.d.ts.map +1 -1
  118. package/dist/core/trust-manager.js +75 -22
  119. package/dist/core/trust-manager.js.map +1 -1
  120. package/dist/index.d.ts +5 -5
  121. package/dist/index.d.ts.map +1 -1
  122. package/dist/index.js +2 -2
  123. package/dist/index.js.map +1 -1
  124. package/dist/main.d.ts.map +1 -1
  125. package/dist/main.js +92 -129
  126. package/dist/main.js.map +1 -1
  127. package/dist/migrations.d.ts.map +1 -1
  128. package/dist/migrations.js +39 -34
  129. package/dist/migrations.js.map +1 -1
  130. package/dist/modes/index.d.ts +1 -1
  131. package/dist/modes/index.d.ts.map +1 -1
  132. package/dist/modes/index.js.map +1 -1
  133. package/dist/modes/interactive/components/login-dialog.d.ts +1 -0
  134. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  135. package/dist/modes/interactive/components/login-dialog.js +7 -1
  136. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  137. package/dist/modes/interactive/components/settings-selector.d.ts +3 -1
  138. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  139. package/dist/modes/interactive/components/settings-selector.js +20 -0
  140. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  141. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  142. package/dist/modes/interactive/components/tool-execution.js +26 -4
  143. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  144. package/dist/modes/interactive/components/trust-selector.d.ts +6 -3
  145. package/dist/modes/interactive/components/trust-selector.d.ts.map +1 -1
  146. package/dist/modes/interactive/components/trust-selector.js +22 -18
  147. package/dist/modes/interactive/components/trust-selector.js.map +1 -1
  148. package/dist/modes/interactive/interactive-mode.d.ts +15 -0
  149. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  150. package/dist/modes/interactive/interactive-mode.js +158 -19
  151. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  152. package/dist/modes/interactive/theme/theme.d.ts +0 -4
  153. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  154. package/dist/modes/interactive/theme/theme.js +0 -7
  155. package/dist/modes/interactive/theme/theme.js.map +1 -1
  156. package/dist/modes/interactive/working-status.d.ts +2 -0
  157. package/dist/modes/interactive/working-status.d.ts.map +1 -1
  158. package/dist/modes/interactive/working-status.js +34 -0
  159. package/dist/modes/interactive/working-status.js.map +1 -1
  160. package/dist/modes/rpc/rpc-types.d.ts +0 -1
  161. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  162. package/dist/modes/rpc/rpc-types.js.map +1 -1
  163. package/dist/package-manager-cli.d.ts +6 -2
  164. package/dist/package-manager-cli.d.ts.map +1 -1
  165. package/dist/package-manager-cli.js +58 -11
  166. package/dist/package-manager-cli.js.map +1 -1
  167. package/dist/senpi +10 -1
  168. package/dist/utils/changelog.d.ts +1 -0
  169. package/dist/utils/changelog.d.ts.map +1 -1
  170. package/dist/utils/changelog.js +78 -0
  171. package/dist/utils/changelog.js.map +1 -1
  172. package/docs/compaction-guide.md +9 -9
  173. package/docs/compaction.md +2 -2
  174. package/docs/containerization.md +22 -22
  175. package/docs/custom-provider.md +13 -13
  176. package/docs/development.md +4 -2
  177. package/docs/docs.json +4 -0
  178. package/docs/extensions.md +46 -18
  179. package/docs/index.md +5 -4
  180. package/docs/json.md +21 -15
  181. package/docs/keybindings.md +6 -3
  182. package/docs/models.md +10 -43
  183. package/docs/packages.md +11 -13
  184. package/docs/prompt-templates.md +10 -3
  185. package/docs/providers.md +9 -9
  186. package/docs/rpc.md +14 -13
  187. package/docs/sdk.md +18 -9
  188. package/docs/security.md +55 -0
  189. package/docs/session-format.md +4 -4
  190. package/docs/sessions.md +14 -14
  191. package/docs/settings.md +14 -11
  192. package/docs/skills.md +8 -8
  193. package/docs/terminal-setup.md +38 -4
  194. package/docs/termux.md +3 -3
  195. package/docs/tmux.md +4 -2
  196. package/docs/tui.md +4 -4
  197. package/docs/usage.md +55 -57
  198. package/examples/extensions/README.md +1 -0
  199. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  200. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  201. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  202. package/examples/extensions/gondolin/package-lock.json +2 -2
  203. package/examples/extensions/gondolin/package.json +1 -1
  204. package/examples/extensions/project-trust.ts +64 -0
  205. package/examples/extensions/sandbox/package-lock.json +2 -2
  206. package/examples/extensions/sandbox/package.json +1 -1
  207. package/examples/extensions/with-deps/package-lock.json +2 -2
  208. package/examples/extensions/with-deps/package.json +1 -1
  209. package/node_modules/@earendil-works/pi-agent-core/README.md +4 -3
  210. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +125 -77
  211. package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
  212. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts +1 -1
  213. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.d.ts.map +1 -1
  214. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +1 -1
  215. package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js.map +1 -1
  216. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts +0 -2
  217. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.d.ts.map +1 -1
  218. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js +0 -4
  219. package/node_modules/@earendil-works/pi-agent-core/dist/harness/types.js.map +1 -1
  220. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +7 -4
  221. package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
  222. package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
  223. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  224. package/node_modules/@earendil-works/pi-ai/README.md +4 -5
  225. package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts +0 -1
  226. package/node_modules/@earendil-works/pi-ai/dist/api-registry.d.ts.map +1 -1
  227. package/node_modules/@earendil-works/pi-ai/dist/api-registry.js +0 -3
  228. package/node_modules/@earendil-works/pi-ai/dist/api-registry.js.map +1 -1
  229. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.d.ts +2 -2
  230. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +6 -6
  231. package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js.map +1 -1
  232. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts +355 -313
  233. package/node_modules/@earendil-works/pi-ai/dist/models.generated.d.ts.map +1 -1
  234. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js +376 -431
  235. package/node_modules/@earendil-works/pi-ai/dist/models.generated.js.map +1 -1
  236. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.d.ts.map +1 -1
  237. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js +15 -7
  238. package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.js.map +1 -1
  239. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts +1 -1
  240. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
  241. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +17 -7
  242. package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js.map +1 -1
  243. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js +1 -0
  244. package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
  245. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts +0 -4
  246. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.d.ts.map +1 -1
  247. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js +0 -13
  248. package/node_modules/@earendil-works/pi-ai/dist/providers/google-shared.js.map +1 -1
  249. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
  250. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js +4 -3
  251. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-completions.js.map +1 -1
  252. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.d.ts.map +1 -1
  253. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js +2 -1
  254. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses-shared.js.map +1 -1
  255. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
  256. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js +3 -2
  257. package/node_modules/@earendil-works/pi-ai/dist/providers/openai-responses.js.map +1 -1
  258. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts +1 -7
  259. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.d.ts.map +1 -1
  260. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js +2 -16
  261. package/node_modules/@earendil-works/pi-ai/dist/providers/simple-options.js.map +1 -1
  262. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +5 -1
  263. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  265. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +0 -4
  266. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +0 -6
  268. package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
  269. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  270. package/node_modules/@earendil-works/pi-tui/README.md +1 -2
  271. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts +2 -0
  272. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.d.ts.map +1 -1
  273. package/node_modules/@earendil-works/pi-tui/dist/autocomplete.js.map +1 -1
  274. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +6 -1
  275. package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
  276. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +89 -39
  277. package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
  278. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts +5 -0
  279. package/node_modules/@earendil-works/pi-tui/dist/components/loader.d.ts.map +1 -1
  280. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js +18 -4
  281. package/node_modules/@earendil-works/pi-tui/dist/components/loader.js.map +1 -1
  282. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.d.ts.map +1 -1
  283. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js +131 -61
  284. package/node_modules/@earendil-works/pi-tui/dist/fuzzy.js.map +1 -1
  285. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -1
  286. package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
  287. package/node_modules/@earendil-works/pi-tui/dist/index.js +1 -1
  288. package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
  289. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts +0 -1
  290. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.d.ts.map +1 -1
  291. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js +4 -7
  292. package/node_modules/@earendil-works/pi-tui/dist/terminal-image.js.map +1 -1
  293. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts +4 -7
  294. package/node_modules/@earendil-works/pi-tui/dist/terminal.d.ts.map +1 -1
  295. package/node_modules/@earendil-works/pi-tui/dist/terminal.js +38 -76
  296. package/node_modules/@earendil-works/pi-tui/dist/terminal.js.map +1 -1
  297. package/node_modules/@earendil-works/pi-tui/dist/tui.d.ts.map +1 -1
  298. package/node_modules/@earendil-works/pi-tui/dist/tui.js +14 -4
  299. package/node_modules/@earendil-works/pi-tui/dist/tui.js.map +1 -1
  300. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts +0 -4
  301. package/node_modules/@earendil-works/pi-tui/dist/utils.d.ts.map +1 -1
  302. package/node_modules/@earendil-works/pi-tui/dist/utils.js +43 -21
  303. package/node_modules/@earendil-works/pi-tui/dist/utils.js.map +1 -1
  304. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  305. package/npm-shrinkwrap.json +12 -12
  306. package/package.json +4 -8
  307. package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts +0 -11
  308. package/dist/core/extensions/builtin/compaction/overflow-detection.d.ts.map +0 -1
  309. package/dist/core/extensions/builtin/compaction/overflow-detection.js +0 -40
  310. package/dist/core/extensions/builtin/compaction/overflow-detection.js.map +0 -1
  311. package/dist/core/extensions/builtin/system-messages.d.ts +0 -47
  312. package/dist/core/extensions/builtin/system-messages.d.ts.map +0 -1
  313. package/dist/core/extensions/builtin/system-messages.js +0 -117
  314. package/dist/core/extensions/builtin/system-messages.js.map +0 -1
  315. package/dist/core/extensions/builtin/todotools/continuation/config.d.ts +0 -10
  316. package/dist/core/extensions/builtin/todotools/continuation/config.d.ts.map +0 -1
  317. package/dist/core/extensions/builtin/todotools/continuation/config.js +0 -33
  318. package/dist/core/extensions/builtin/todotools/continuation/config.js.map +0 -1
  319. package/dist/core/extensions/builtin/todotools/continuation/index.d.ts +0 -2
  320. package/dist/core/extensions/builtin/todotools/continuation/index.d.ts.map +0 -1
  321. package/dist/core/extensions/builtin/todotools/continuation/index.js +0 -2
  322. package/dist/core/extensions/builtin/todotools/continuation/index.js.map +0 -1
  323. package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts +0 -5
  324. package/dist/core/extensions/builtin/todotools/continuation/prompt.d.ts.map +0 -1
  325. package/dist/core/extensions/builtin/todotools/continuation/prompt.js +0 -34
  326. package/dist/core/extensions/builtin/todotools/continuation/prompt.js.map +0 -1
  327. package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts +0 -11
  328. package/dist/core/extensions/builtin/todotools/continuation/runtime.d.ts.map +0 -1
  329. package/dist/core/extensions/builtin/todotools/continuation/runtime.js +0 -201
  330. package/dist/core/extensions/builtin/todotools/continuation/runtime.js.map +0 -1
  331. package/dist/core/extensions/builtin/todotools/settings.d.ts +0 -6
  332. package/dist/core/extensions/builtin/todotools/settings.d.ts.map +0 -1
  333. package/dist/core/extensions/builtin/todotools/settings.js +0 -58
  334. package/dist/core/extensions/builtin/todotools/settings.js.map +0 -1
  335. package/dist/core/extensions/builtin/todotools/system-messages.d.ts +0 -34
  336. package/dist/core/extensions/builtin/todotools/system-messages.d.ts.map +0 -1
  337. package/dist/core/extensions/builtin/todotools/system-messages.js +0 -82
  338. package/dist/core/extensions/builtin/todotools/system-messages.js.map +0 -1
  339. package/dist/core/index.d.ts +0 -12
  340. package/dist/core/index.d.ts.map +0 -1
  341. package/dist/core/index.js +0 -12
  342. package/dist/core/index.js.map +0 -1
@@ -2,11 +2,11 @@
2
2
 
3
3
  All keyboard shortcuts can be customized via `~/.senpi/agent/keybindings.json`. Each action can be bound to one or more keys.
4
4
 
5
- The config file uses the same namespaced keybinding ids that pi uses internally and that extension authors use in `keyHint()` and injected `keybindings` managers.
5
+ The config file uses the same namespaced keybinding ids that senpi uses internally and that extension authors use in `keyHint()` and injected `keybindings` managers.
6
6
 
7
7
  Older configs using pre-namespaced ids such as `cursorUp` or `expandTools` are migrated automatically to the namespaced ids on startup.
8
8
 
9
- After editing `keybindings.json`, run `/reload` in pi to apply the changes without restarting the session.
9
+ After editing `keybindings.json`, run `/reload` in senpi to apply the changes without restarting the session.
10
10
 
11
11
  ## Key Format
12
12
 
@@ -88,6 +88,8 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
88
88
  | `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
89
89
  | `app.editor.external` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
90
90
  | `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image from clipboard |
91
+ | `app.history.search` | `ctrl+r` | Search prompt history across sessions |
92
+ | `app.sessions.observe` | `ctrl+s` | Observe session transcripts |
91
93
 
92
94
  ### Sessions
93
95
 
@@ -145,6 +147,7 @@ Used inside the favorite models selector (opened via `/favorite-models`).
145
147
  | Keybinding id | Default | Description |
146
148
  |--------|---------|-------------|
147
149
  | `app.models.save` | `ctrl+s` | Save current favorite model selection to settings |
150
+ | `app.models.toggleFavorite` | `ctrl+f` | Toggle favorite status of the selected model |
148
151
  | `app.models.enableAll` | `ctrl+a` | Favorite all models (or all matching the current search) |
149
152
  | `app.models.clearAll` | `ctrl+x` | Clear all models (or all matching the current search) |
150
153
  | `app.models.toggleProvider` | `ctrl+p` | Toggle favorite models for the current provider |
@@ -165,7 +168,7 @@ Create `~/.senpi/agent/keybindings.json`:
165
168
 
166
169
  Each action can have a single key or an array of keys. User config overrides defaults.
167
170
 
168
- On native Windows, `app.suspend` has no default binding because Windows terminals do not support Unix job control. If you bind it manually, pi shows a status message instead of suspending. In WSL, the normal Linux `ctrl+z`/`fg` behavior still applies.
171
+ On native Windows, `app.suspend` has no default binding because Windows terminals do not support Unix job control. If you bind it manually, senpi shows a status message instead of suspending. In WSL, the normal Linux `ctrl+z`/`fg` behavior still applies.
169
172
 
170
173
  ### Emacs Example
171
174
 
package/docs/models.md CHANGED
@@ -36,7 +36,7 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model:
36
36
 
37
37
  The `apiKey` is required but Ollama ignores it, so any value works.
38
38
 
39
- Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so pi sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
39
+ Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so senpi sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too.
40
40
 
41
41
  You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers.
42
42
 
@@ -168,7 +168,7 @@ The `apiKey` and `headers` fields support command execution, environment interpo
168
168
 
169
169
  Legacy uppercase env-var-like values such as `MY_API_KEY` are migrated to `$MY_API_KEY` on startup.
170
170
 
171
- For `models.json`, shell commands are resolved at request time. pi intentionally does not apply built-in TTL, stale reuse, or recovery logic for arbitrary commands. Different commands need different caching and failure strategies, and pi cannot infer the right one.
171
+ For `models.json`, shell commands are resolved at request time. senpi intentionally does not apply built-in TTL, stale reuse, or recovery logic for arbitrary commands. Different commands need different caching and failure strategies, and senpi cannot infer the right one.
172
172
 
173
173
  If your command is slow, expensive, rate-limited, or should keep using a previous value on transient failures, wrap it in your own script or command that implements the caching or TTL behavior you want.
174
174
 
@@ -198,11 +198,10 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
198
198
  | Field | Required | Default | Description |
199
199
  |-------|----------|---------|-------------|
200
200
  | `id` | Yes | — | Model identifier (passed to the API) |
201
- | `name` | No | `id` | Human-readable model label. Used for matching (`--model` patterns) and shown in model details/status text. |
202
- | `promptPreset` | No | auto-detected | System prompt preset for this model. Use this when a provider-specific model ID should force a known preset, such as `"kimi-k2-6"`. |
201
+ | `name` | No | `id` | Human-readable model label. Used for matching (`--model` patterns) and shown as secondary model detail text. |
203
202
  | `api` | No | provider's `api` | Override provider's API for this model |
204
203
  | `reasoning` | No | `false` | Supports extended thinking |
205
- | `thinkingLevelMap` | No | omitted | Maps pi thinking levels to provider values and marks unsupported levels (see below) |
204
+ | `thinkingLevelMap` | No | omitted | Maps senpi thinking levels to provider values and marks unsupported levels (see below) |
206
205
  | `input` | No | `["text"]` | Input types: `["text"]` or `["text", "image"]` |
207
206
  | `contextWindow` | No | `128000` | Context window size in tokens |
208
207
  | `maxTokens` | No | `16384` | Maximum output tokens |
@@ -210,36 +209,12 @@ If your command is slow, expensive, rate-limited, or should keep using a previou
210
209
  | `compat` | No | provider `compat` | Provider compatibility overrides. Merged with provider-level `compat` when both are set. |
211
210
 
212
211
  Current behavior:
213
- - `/model` and `--list-models` list entries by model `id`.
214
- - The configured `name` is used for model matching and detail/status text.
215
-
216
- ### Prompt Preset
217
-
218
- Use `promptPreset` on a model when auto-detection cannot infer the right system prompt preset from the provider's model ID.
219
-
220
- ```json
221
- {
222
- "providers": {
223
- "moonshot": {
224
- "baseUrl": "https://api.moonshot.ai/v1",
225
- "api": "openai-responses",
226
- "apiKey": "MOONSHOT_API_KEY",
227
- "models": [
228
- {
229
- "id": "kimi-k2p6-turbo",
230
- "promptPreset": "kimi-k2-6"
231
- }
232
- ]
233
- }
234
- }
235
- }
236
- ```
237
-
238
- If `settings.json` sets `promptPreset` to anything other than `"auto"`, that settings override wins. Model-level `promptPreset` is used when settings remain on `"auto"`.
212
+ - `/model`, `--list-models`, and the interactive footer display entries by model `id`.
213
+ - The configured `name` is used for model matching and secondary model detail text. It does not replace the footer/status-bar model id.
239
214
 
240
215
  ### Thinking Level Map
241
216
 
242
- Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are pi thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`.
217
+ Use `thinkingLevelMap` on a model to describe model-specific thinking controls. Keys are senpi thinking levels: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`.
243
218
 
244
219
  Values are tristate:
245
220
 
@@ -339,19 +314,20 @@ Use `modelOverrides` to customize specific built-in models without replacing the
339
314
  }
340
315
  ```
341
316
 
342
- `modelOverrides` supports these fields per model: `name`, `promptPreset`, `reasoning`, `input`, `cost` (partial), `contextWindow`, `maxTokens`, `headers`, `compat`.
317
+ `modelOverrides` supports these fields per model: `name`, `reasoning`, `input`, `cost` (partial), `contextWindow`, `maxTokens`, `headers`, `compat`.
343
318
 
344
319
  Behavior notes:
345
320
  - `modelOverrides` are applied to built-in provider models.
346
321
  - Unknown model IDs are ignored.
347
322
  - You can combine provider-level `baseUrl`/`headers` with `modelOverrides`.
323
+ - Overriding `name` changes model matching and secondary detail text only; the footer and primary model lists continue to show the model `id`.
348
324
  - If `models` is also defined for a provider, custom models are merged after built-in overrides. A custom model with the same `id` replaces the overridden built-in model entry.
349
325
 
350
326
  ## Anthropic Messages Compatibility
351
327
 
352
328
  For providers or proxies using `api: "anthropic-messages"`, use `compat` to control Anthropic-specific request compatibility.
353
329
 
354
- By default pi sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Pi will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
330
+ By default senpi sends per-tool `eager_input_streaming: true`. If a proxy or Anthropic-compatible backend rejects that field, set `supportsEagerToolInputStreaming` to `false`. Senpi will omit `tools[].eager_input_streaming` and send the legacy `fine-grained-tool-streaming-2025-05-14` beta header for tool-enabled requests instead.
355
331
 
356
332
  Some Anthropic models require adaptive thinking (`thinking.type: "adaptive"` plus `output_config.effort`) instead of the legacy budget-based thinking payload. Built-in models set this automatically. For custom providers or aliases that route to those models, set `forceAdaptiveThinking` to `true`.
357
333
 
@@ -432,15 +408,6 @@ For providers with partial OpenAI compatibility, use the `compat` field.
432
408
  | `openRouterRouting` | OpenRouter provider routing preferences. This object is sent as-is in the `provider` field of the [OpenRouter API request](https://openrouter.ai/docs/guides/routing/provider-selection). |
433
409
  | `vercelGatewayRouting` | Vercel AI Gateway routing config for provider selection (`only`, `order`) |
434
410
 
435
- For `api: "openai-responses"` models, only Responses-specific `compat` fields apply:
436
-
437
- | Field | Description |
438
- |-------|-------------|
439
- | `sendSessionIdHeader` | Send the OpenAI cache-affinity `session_id` header from `sessionId`. Default: `true`. |
440
- | `supportsLongCacheRetention` | Accepts `prompt_cache_retention: "24h"` when cache retention is `long`. Default: `true`. |
441
- | `supportsWebSocket` | Supports OpenAI Responses WebSocket transport. Default: `true` only for `api.openai.com`. |
442
- | `supportsWebSearchPreview` | Supports OpenAI-native `web_search_preview` tools. Default: `true` only for `api.openai.com`; custom Responses proxies must opt in. |
443
-
444
411
  `openrouter` uses `reasoning: { effort }`. `together` uses `reasoning: { enabled }` and also `reasoning_effort` when `supportsReasoningEffort` is enabled. `qwen` uses top-level `enable_thinking`. Use `qwen-chat-template` for local Qwen-compatible servers that require `chat_template_kwargs.enable_thinking`.
445
412
 
446
413
  `cacheControlFormat: "anthropic"` is for OpenAI-compatible providers that expose Anthropic-style prompt caching through `cache_control` markers on text content and tool definitions.
package/docs/packages.md CHANGED
@@ -26,27 +26,25 @@ senpi install https://github.com/user/repo # raw URLs work too
26
26
  senpi install /absolute/path/to/package
27
27
  senpi install ./relative/path/to/package
28
28
 
29
- pi remove npm:@foo/bar
30
- pi list # show installed packages from settings
31
- pi update # update pi, update packages, and reconcile pinned git refs
32
- pi update --extensions # update packages and reconcile pinned git refs only
33
- pi update --self # update pi only
34
- pi update --self --force # reinstall pi even if current
35
- pi update npm:@foo/bar # update one package
36
- pi update --extension npm:@foo/bar
29
+ senpi remove npm:@foo/bar
30
+ senpi list # show installed packages from settings
31
+ senpi update # update senpi, update packages, and reconcile pinned git refs
32
+ senpi update --extensions # update packages and reconcile pinned git refs only
33
+ senpi update --self # update senpi only
34
+ senpi update --self --force # reinstall senpi even if current
35
+ senpi update npm:@foo/bar # update one package
36
+ senpi update --extension npm:@foo/bar
37
37
  ```
38
38
 
39
39
  These commands manage senpi packages, not the senpi CLI installation. To uninstall senpi itself, see [Quickstart](quickstart.md#uninstall).
40
40
 
41
41
  By default, `install` and `remove` write to global settings (`~/.senpi/agent/settings.json`). Use `-l` to write to project settings (`.senpi/settings.json`) instead. Project settings can be shared with your team, and senpi installs any missing packages automatically on startup after the project is trusted.
42
42
 
43
- Project package commands read project settings only when the project is trusted. Use `--approve` to trust project-local files for one command, or `--no-approve` to ignore them for one command.
44
-
45
43
  To try a package without installing it, use `--extension` or `-e`. This installs to a temporary directory for the current run only:
46
44
 
47
45
  ```bash
48
- pi -e npm:@foo/bar
49
- pi -e git:github.com/user/repo
46
+ senpi -e npm:@foo/bar
47
+ senpi -e git:github.com/user/repo
50
48
  ```
51
49
 
52
50
  ## Package Sources
@@ -60,7 +58,7 @@ npm:@scope/pkg@1.2.3
60
58
  npm:pkg
61
59
  ```
62
60
 
63
- - Versioned specs are pinned and skipped by package updates (`pi update`, `pi update --extensions`).
61
+ - Versioned specs are pinned and skipped by package updates (`senpi update`, `senpi update --extensions`).
64
62
  - Global installs use `npm install -g`.
65
63
  - Project installs go under `.senpi/npm/`.
66
64
  - Set `npmCommand` in `settings.json` to pin npm package lookup and install operations to a specific wrapper command such as `mise` or `asdf`.
@@ -1,4 +1,4 @@
1
- > pi can create prompt templates. Ask it to build one for your workflow.
1
+ > senpi can create prompt templates. Ask it to build one for your workflow.
2
2
 
3
3
  # Prompt Templates
4
4
 
@@ -6,7 +6,7 @@ Prompt templates are Markdown snippets that expand into full prompts. Type `/nam
6
6
 
7
7
  ## Locations
8
8
 
9
- Pi loads prompt templates from:
9
+ Senpi loads prompt templates from:
10
10
 
11
11
  - Global: `~/.senpi/agent/prompts/*.md`
12
12
  - Project: `.senpi/prompts/*.md` (only after the project is trusted)
@@ -64,10 +64,11 @@ Type `/` followed by the template name in the editor. Autocomplete shows availab
64
64
 
65
65
  ## Arguments
66
66
 
67
- Templates support positional arguments and simple slicing:
67
+ Templates support positional arguments, defaults, and simple slicing:
68
68
 
69
69
  - `$1`, `$2`, ... positional args
70
70
  - `$@` or `$ARGUMENTS` for all args joined
71
+ - `${1:-default}` uses arg 1 when present/non-empty, otherwise `default`
71
72
  - `${@:N}` for args from the Nth position (1-indexed)
72
73
  - `${@:N:L}` for `L` args starting at N
73
74
 
@@ -80,6 +81,12 @@ description: Create a component
80
81
  Create a React component named $1 with features: $@
81
82
  ```
82
83
 
84
+ Default values are useful for optional arguments:
85
+
86
+ ```markdown
87
+ Summarize the current state in ${1:-7} bullet points.
88
+ ```
89
+
83
90
  Usage: `/component Button "onClick handler" "disabled support"`
84
91
 
85
92
  ## Loading Rules
package/docs/providers.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Providers
2
2
 
3
- Pi supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, pi knows all available models. The list is updated with every pi release.
3
+ Senpi supports subscription-based providers via OAuth and API key providers via environment variables or auth file. For each provider, senpi knows all available models. The list is updated with every senpi release.
4
4
 
5
5
  ## Table of Contents
6
6
 
@@ -43,7 +43,7 @@ Use `/login` in interactive mode and select a provider to store an API key in `a
43
43
 
44
44
  ```bash
45
45
  export ANTHROPIC_API_KEY=sk-ant-...
46
- pi
46
+ senpi
47
47
  ```
48
48
 
49
49
  | Provider | Environment Variable | `auth.json` key |
@@ -78,7 +78,7 @@ pi
78
78
  | Xiaomi MiMo Token Plan (Amsterdam) | `XIAOMI_TOKEN_PLAN_AMS_API_KEY` | `xiaomi-token-plan-ams` |
79
79
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
80
80
 
81
- Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/earendil-works/pi-mono/blob/main/packages/ai/src/env-api-keys.ts).
81
+ Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/code-yeongyu/senpi/blob/main/packages/ai/src/env-api-keys.ts).
82
82
 
83
83
  #### Auth File
84
84
 
@@ -169,14 +169,14 @@ export AWS_REGION=us-west-2
169
169
  Also supports ECS task roles (`AWS_CONTAINER_CREDENTIALS_*`) and IRSA (`AWS_WEB_IDENTITY_TOKEN_FILE`).
170
170
 
171
171
  ```bash
172
- pi --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
172
+ senpi --provider amazon-bedrock --model us.anthropic.claude-sonnet-4-20250514-v1:0
173
173
  ```
174
174
 
175
175
  Prompt caching is enabled automatically for Claude models whose ID contains a recognizable model name (base models and system-defined inference profiles). For application inference profiles (whose ARNs don't contain the model name), set `AWS_BEDROCK_FORCE_CACHE=1` to enable cache points:
176
176
 
177
177
  ```bash
178
178
  export AWS_BEDROCK_FORCE_CACHE=1
179
- pi --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
179
+ senpi --provider amazon-bedrock --model arn:aws:bedrock:us-east-1:123456789012:application-inference-profile/abc123
180
180
  ```
181
181
 
182
182
  If you are connecting to a Bedrock API proxy, the following environment variables can be used:
@@ -200,7 +200,7 @@ export AWS_BEDROCK_FORCE_HTTP1=1
200
200
  export CLOUDFLARE_API_KEY=... # or use /login
201
201
  export CLOUDFLARE_ACCOUNT_ID=...
202
202
  export CLOUDFLARE_GATEWAY_ID=... # create at dash.cloudflare.com → AI → AI Gateway
203
- pi --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
203
+ senpi --provider cloudflare-ai-gateway --model "claude-sonnet-4-5"
204
204
  ```
205
205
 
206
206
  Routes to OpenAI, Anthropic, and Workers AI through Cloudflare AI Gateway. Workers AI uses the Unified API (`/compat`) and prefixed model IDs (`workers-ai/@cf/...`). OpenAI uses the OpenAI passthrough route (`/openai`) with native OpenAI model IDs such as `gpt-5.1`. Anthropic uses the Anthropic passthrough route (`/anthropic`) with native Anthropic model IDs such as `claude-sonnet-4-5`.
@@ -214,7 +214,7 @@ AI Gateway authentication uses `CLOUDFLARE_API_KEY` as `cf-aig-authorization`. U
214
214
  | Stored BYOK | Cloudflare token only | Cloudflare injects provider keys stored in the AI Gateway dashboard |
215
215
  | Inline BYOK | Cloudflare token plus upstream `Authorization` header | The request supplies the upstream provider key |
216
216
 
217
- For normal pi usage, prefer unified billing or stored BYOK. Inline BYOK requires configuring an additional upstream `Authorization` header for the Cloudflare AI Gateway provider, for example via a `models.json` provider/model override.
217
+ For normal senpi usage, prefer unified billing or stored BYOK. Inline BYOK requires configuring an additional upstream `Authorization` header for the Cloudflare AI Gateway provider, for example via a `models.json` provider/model override.
218
218
 
219
219
  ### Cloudflare Workers AI
220
220
 
@@ -223,10 +223,10 @@ For normal pi usage, prefer unified billing or stored BYOK. Inline BYOK requires
223
223
  ```bash
224
224
  export CLOUDFLARE_API_KEY=... # or use /login
225
225
  export CLOUDFLARE_ACCOUNT_ID=...
226
- pi --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
226
+ senpi --provider cloudflare-workers-ai --model "@cf/moonshotai/kimi-k2.6"
227
227
  ```
228
228
 
229
- Pi automatically sets `x-session-affinity` for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/) discounts.
229
+ Senpi automatically sets `x-session-affinity` for [prefix caching](https://developers.cloudflare.com/workers-ai/features/prompt-caching/) discounts.
230
230
 
231
231
  ### Google Vertex AI
232
232
 
package/docs/rpc.md CHANGED
@@ -7,7 +7,7 @@ RPC mode enables headless operation of the coding agent via a JSON protocol over
7
7
  ## Starting RPC Mode
8
8
 
9
9
  ```bash
10
- pi --mode rpc [options]
10
+ senpi --mode rpc [options]
11
11
  ```
12
12
 
13
13
  Common options:
@@ -695,7 +695,7 @@ Response:
695
695
  }
696
696
  ```
697
697
 
698
- The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `pi --mode rpc` process.
698
+ The current session name is available via `get_state` in the `sessionName` field. To set the initial name when starting RPC mode, pass `--name <name>` or `-n <name>` to the `senpi --mode rpc` process.
699
699
 
700
700
  ### Commands
701
701
 
@@ -715,9 +715,9 @@ Response:
715
715
  "success": true,
716
716
  "data": {
717
717
  "commands": [
718
- {"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.senpi/agent/extensions/session.ts"},
719
- {"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.senpi/agent/prompts/fix-tests.md"},
720
- {"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.senpi/agent/skills/brave-search/SKILL.md"}
718
+ {"name": "session-name", "description": "Set or clear session name", "source": "extension", "sourceInfo": {"path": "/home/user/.senpi/agent/extensions/session.ts", "source": "auto", "scope": "user", "origin": "top-level"}},
719
+ {"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "sourceInfo": {"path": "/home/user/myproject/.senpi/prompts/fix-tests.md", "source": "auto", "scope": "project", "origin": "top-level"}},
720
+ {"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "sourceInfo": {"path": "/home/user/.senpi/agent/skills/brave-search/SKILL.md", "source": "auto", "scope": "user", "origin": "top-level"}}
721
721
  ]
722
722
  }
723
723
  }
@@ -730,11 +730,12 @@ Each command has:
730
730
  - `"extension"`: Registered via `pi.registerCommand()` in an extension
731
731
  - `"prompt"`: Loaded from a prompt template `.md` file
732
732
  - `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
733
- - `location`: Where it was loaded from (optional, not present for extensions):
734
- - `"user"`: User-level (`~/.senpi/agent/`)
735
- - `"project"`: Project-level (`./.senpi/agent/`)
736
- - `"path"`: Explicit path via CLI or settings
737
- - `path`: Absolute file path to the command source (optional)
733
+ - `sourceInfo`: Provenance metadata for the owning resource (present for all sources, including extensions):
734
+ - `path`: Absolute file path to the command source
735
+ - `source`: Source identifier string (for example `"auto"` for auto-discovered locations, `"local"` for settings entries, `"cli"` for CLI paths, `"builtin"`, `"sdk"`, or a package source)
736
+ - `scope`: `"user"`, `"project"`, or `"temporary"`
737
+ - `origin`: `"package"` or `"top-level"`
738
+ - `baseDir`: Base directory of the owning resource (optional)
738
739
 
739
740
  **Note**: Built-in TUI commands (`/settings`, `/hotkeys`, etc.) are not included. They are handled only in interactive mode and would not execute if sent via `prompt`.
740
741
 
@@ -1133,7 +1134,7 @@ Set the terminal window/tab title. Fire-and-forget.
1133
1134
  "type": "extension_ui_request",
1134
1135
  "id": "uuid-8",
1135
1136
  "method": "setTitle",
1136
- "title": "pi - my project"
1137
+ "title": "senpi - my project"
1137
1138
  }
1138
1139
  ```
1139
1140
 
@@ -1320,7 +1321,7 @@ import subprocess
1320
1321
  import json
1321
1322
 
1322
1323
  proc = subprocess.Popen(
1323
- ["pi", "--mode", "rpc", "--no-session"],
1324
+ ["senpi", "--mode", "rpc", "--no-session"],
1324
1325
  stdin=subprocess.PIPE,
1325
1326
  stdout=subprocess.PIPE,
1326
1327
  text=True
@@ -1359,7 +1360,7 @@ For a complete example of handling the extension UI protocol, see [`examples/rpc
1359
1360
  const { spawn } = require("child_process");
1360
1361
  const { StringDecoder } = require("string_decoder");
1361
1362
 
1362
- const agent = spawn("pi", ["--mode", "rpc", "--no-session"]);
1363
+ const agent = spawn("senpi", ["--mode", "rpc", "--no-session"]);
1363
1364
 
1364
1365
  function attachJsonlReader(stream, onLine) {
1365
1366
  const decoder = new StringDecoder("utf8");
package/docs/sdk.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # SDK
4
4
 
5
- The SDK provides programmatic access to pi's agent capabilities. Use it to embed senpi in other applications, build custom interfaces, or integrate with automated workflows.
5
+ The SDK provides programmatic access to senpi's agent capabilities. Use it to embed senpi in other applications, build custom interfaces, or integrate with automated workflows.
6
6
 
7
7
  **Example use cases:**
8
8
  - Build a custom UI (web, desktop, mobile)
@@ -209,7 +209,7 @@ await session.prompt("What files are here?");
209
209
 
210
210
  // With images
211
211
  await session.prompt("What's in this image?", {
212
- images: [{ type: "image", source: { type: "base64", mediaType: "image/png", data: "..." } }]
212
+ images: [{ type: "image", data: "base64-encoded-data", mimeType: "image/png" }]
213
213
  });
214
214
 
215
215
  // During streaming: must specify how to queue the message
@@ -473,7 +473,7 @@ Specify which built-in tools to enable:
473
473
  - `noTools: "builtin"` disables default built-ins while keeping extension and custom tools enabled
474
474
  - `excludeTools` disables specific built-in, extension, or custom tool names after any `tools` allowlist is applied
475
475
 
476
- The `edit` tool returns `details.diff` for Pi's TUI display and `details.patch` as a standard unified patch for SDK consumers.
476
+ The `edit` tool returns `details.diff` for senpi's TUI display and `details.patch` as a standard unified patch for SDK consumers.
477
477
 
478
478
  ```typescript
479
479
  import { createAgentSession } from "@code-yeongyu/senpi";
@@ -600,6 +600,7 @@ eventBus.on("my-extension:status", (data) => console.log(data));
600
600
  ```typescript
601
601
  import {
602
602
  createAgentSession,
603
+ createSyntheticSourceInfo,
603
604
  DefaultResourceLoader,
604
605
  type Skill,
605
606
  } from "@code-yeongyu/senpi";
@@ -609,7 +610,8 @@ const customSkill: Skill = {
609
610
  description: "Custom instructions",
610
611
  filePath: "/path/to/SKILL.md",
611
612
  baseDir: "/path/to",
612
- source: "custom",
613
+ sourceInfo: createSyntheticSourceInfo("/path/to/SKILL.md", { source: "sdk" }),
614
+ disableModelInvocation: false,
613
615
  };
614
616
 
615
617
  const loader = new DefaultResourceLoader({
@@ -650,6 +652,7 @@ const { session } = await createAgentSession({ resourceLoader: loader });
650
652
  ```typescript
651
653
  import {
652
654
  createAgentSession,
655
+ createSyntheticSourceInfo,
653
656
  DefaultResourceLoader,
654
657
  type PromptTemplate,
655
658
  } from "@code-yeongyu/senpi";
@@ -657,7 +660,8 @@ import {
657
660
  const customCommand: PromptTemplate = {
658
661
  name: "deploy",
659
662
  description: "Deploy the application",
660
- source: "(custom)",
663
+ filePath: "/virtual/prompts/deploy.md",
664
+ sourceInfo: createSyntheticSourceInfo("/virtual/prompts/deploy.md", { source: "sdk" }),
661
665
  content: "# Deploy\n\n1. Build\n2. Test\n3. Deploy",
662
666
  };
663
667
 
@@ -714,7 +718,7 @@ const { session: opened } = await createAgentSession({
714
718
 
715
719
  // List sessions
716
720
  const currentProjectSessions = await SessionManager.list(process.cwd());
717
- const allSessions = await SessionManager.listAll(process.cwd());
721
+ const allSessions = await SessionManager.listAll(); // All sessions across all projects
718
722
 
719
723
  // Session replacement API for /new, /resume, /fork, /clone, and import flows.
720
724
  const createRuntime: CreateAgentSessionRuntimeFactory = async ({ cwd, sessionManager, sessionStartEvent }) => {
@@ -756,12 +760,12 @@ const sm = SessionManager.open("/path/to/session.jsonl");
756
760
 
757
761
  // Session listing
758
762
  const currentProjectSessions = await SessionManager.list(process.cwd());
759
- const allSessions = await SessionManager.listAll(process.cwd());
763
+ const allSessions = await SessionManager.listAll(); // All sessions across all projects
760
764
 
761
765
  // Tree traversal
762
766
  const entries = sm.getEntries(); // All entries (excludes header)
763
767
  const tree = sm.getTree(); // Full tree structure
764
- const path = sm.getPath(); // Path from root to current leaf
768
+ const branch = sm.getBranch(); // Entries from root to current leaf
765
769
  const leaf = sm.getLeafEntry(); // Current leaf entry
766
770
  const entry = sm.getEntry(id); // Get entry by ID
767
771
  const children = sm.getChildren(id); // Direct children of entry
@@ -1076,7 +1080,7 @@ See [RPC documentation](rpc.md) for the JSON protocol.
1076
1080
  For subprocess-based integration without building with the SDK, use the CLI directly:
1077
1081
 
1078
1082
  ```bash
1079
- pi --mode rpc --no-session
1083
+ senpi --mode rpc --no-session
1080
1084
  ```
1081
1085
 
1082
1086
  See [RPC documentation](rpc.md) for the JSON protocol.
@@ -1113,6 +1117,11 @@ createEventBus
1113
1117
 
1114
1118
  // Helpers
1115
1119
  defineTool
1120
+ getAgentDir
1121
+ getPackageDir
1122
+ getReadmePath
1123
+ getDocsPath
1124
+ getExamplesPath
1116
1125
 
1117
1126
  // Session management
1118
1127
  SessionManager
@@ -0,0 +1,55 @@
1
+ # Security
2
+
3
+ Pi is a local coding agent. It runs with the permissions of the user account that starts it, and it treats files writable by that user as inside the same local trust boundary.
4
+
5
+ ## Project Trust
6
+
7
+ Project trust controls whether pi loads project-local settings, resources, packages, and extensions. It is not a sandbox and it does not restrict what the model can ask tools to do after you start working in a directory.
8
+
9
+ Pi considers a project to have trust inputs when it finds any of these from the current working directory:
10
+
11
+ - `.senpi/` in the current directory
12
+ - `.agents/skills` in the current directory or an ancestor directory
13
+
14
+ When an interactive session starts in a project with configs in `.senpi` or `.agents/skills` and no saved decision for the current directory or a parent directory, pi follows `defaultProjectTrust` from global settings. The default value is `"ask"`, which asks whether to trust the project when UI is available. Saved decisions are stored by canonical directory in `~/.senpi/agent/trust.json`, and the closest saved decision on the current or parent path applies before the global default.
15
+
16
+ Trusting a project allows pi to load trust-gated project inputs, including:
17
+
18
+ - `.senpi/settings.json`
19
+ - `.senpi` resources such as extensions, skills, prompt templates, themes, and system prompt files
20
+ - missing project packages configured through project settings
21
+ - project-local extensions and project package-managed extensions
22
+
23
+ Declining trust skips protected resources. `AGENTS.md` and `CLAUDE.md` context files are loaded regardless of project trust unless context loading is disabled. Before trust is resolved, pi only loads context files, user/global extensions, and CLI `-e` extensions. User/global and CLI extensions can handle the `project_trust` event; the first extension that returns a yes/no decision owns the decision.
24
+
25
+ Non-interactive modes (`-p`, `--mode json`, and `--mode rpc`) do not show a trust prompt. Without an applicable saved trust decision, `defaultProjectTrust: "ask"` and `"never"` ignore such resources, while `"always"` trusts them. Use `--approve`/`-a` or `--no-approve`/`-na` to override project trust for one run.
26
+
27
+ ## No Built-in Sandbox
28
+
29
+ Pi does not include a built-in sandbox. Built-in tools can read files, write files, edit files, and run shell commands with the permissions of the pi process. Extensions are TypeScript modules that run with the same permissions. Package installs, shell commands, language servers, test commands, and other developer tools behave as ordinary local processes.
30
+
31
+ This is intentional. Pi is designed to operate on local source trees, invoke project toolchains, and integrate with the user's existing development environment. A partial in-process sandbox would be easy to misunderstand as a security boundary while still depending on the host shell, filesystem, package managers, credentials, and extension code. Real isolation needs to come from the operating system or a virtualization/container boundary.
32
+
33
+ Project trust is only an input-loading guard. It prevents a repository from silently changing pi's settings or extensions before you approve it. It does not make untrusted code, untrusted prompts, or untrusted model output safe. Prompt injection from repository files, comments, documentation, context files, or build output is expected local-agent risk and cannot be reliably prevented by pi.
34
+
35
+ ## Running Untrusted or Unmonitored Work
36
+
37
+ For untrusted repositories, generated code you do not intend to monitor closely, or unattended automation, run pi in a contained environment. Use a container, VM, micro-VM, remote sandbox, or policy-controlled sandbox with only the files and credentials required for the task.
38
+
39
+ Common patterns are documented in [Containerization](containerization.md):
40
+
41
+ - run the whole `senpi` process inside OpenShell or Docker
42
+ - run host senpi while routing built-in tool execution into a Gondolin micro-VM
43
+ - mount only the workspace paths the agent should access
44
+ - avoid mounting host `~/.senpi/agent` unless the container should access host sessions, settings, and credentials
45
+ - pass the minimum required API keys or use short-lived credentials
46
+ - restrict network access when the task does not need it
47
+ - review diffs and outputs before copying results back to trusted systems
48
+
49
+ If you bind-mount a host workspace read/write, writes from inside the container or VM can still modify host files. Use read-only mounts or copy files into and out of the sandbox when you need stronger protection from unintended writes.
50
+
51
+ ## Reporting Security Issues
52
+
53
+ To report a security issue, follow the repository [Security Policy](https://github.com/earendil-works/pi-mono/blob/main/SECURITY.md). Do not open a public issue for security-sensitive reports.
54
+
55
+ Expected local-agent behavior, lack of a built-in sandbox, prompt injection from untrusted content, and behavior of user-installed extensions or skills are generally outside the security boundary unless the report demonstrates a real privilege-boundary bypass or shows how pi grants access that the local user did not already have.
@@ -14,7 +14,7 @@ Where `<path>` is the working directory with `/` replaced by `-`.
14
14
 
15
15
  Sessions can be removed by deleting their `.jsonl` files under `~/.senpi/agent/sessions/`.
16
16
 
17
- Pi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, senpi uses the `trash` CLI to avoid permanent deletion.
17
+ Senpi also supports deleting sessions interactively from `/resume` (select a session and press `Ctrl+D`, then confirm). When available, senpi uses the `trash` CLI to avoid permanent deletion.
18
18
 
19
19
  ## Session Version
20
20
 
@@ -116,7 +116,7 @@ interface Usage {
116
116
  }
117
117
  ```
118
118
 
119
- ### Extended Message Types (from pi-coding-agent)
119
+ ### Extended Message Types (from @code-yeongyu/senpi)
120
120
 
121
121
  ```typescript
122
122
  interface BashExecutionMessage {
@@ -233,7 +233,7 @@ Created when context is compacted. Stores a summary of earlier messages.
233
233
 
234
234
  Optional fields:
235
235
  - `details`: Implementation-specific data (e.g., `{ readFiles: string[], modifiedFiles: string[] }` for default, or custom data for extensions)
236
- - `fromHook`: `true` if generated by an extension, `false`/`undefined` if pi-generated (legacy field name)
236
+ - `fromHook`: `true` if generated by an extension, `false`/`undefined` if senpi-generated (legacy field name)
237
237
 
238
238
  ### BranchSummaryEntry
239
239
 
@@ -245,7 +245,7 @@ Created when switching branches via `/tree` with an LLM generated summary of the
245
245
 
246
246
  Optional fields:
247
247
  - `details`: File tracking data (`{ readFiles: string[], modifiedFiles: string[] }`) for default, or custom data for extensions
248
- - `fromHook`: `true` if generated by an extension, `false`/`undefined` if pi-generated (legacy field name)
248
+ - `fromHook`: `true` if generated by an extension, `false`/`undefined` if senpi-generated (legacy field name)
249
249
 
250
250
  ### CustomEntry
251
251