@code-yeongyu/senpi 2026.8.9 → 2026.8.11-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 (321) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/dist/brand-dir-migration.d.ts +28 -0
  3. package/dist/brand-dir-migration.d.ts.map +1 -0
  4. package/dist/brand-dir-migration.js +77 -0
  5. package/dist/brand-dir-migration.js.map +1 -0
  6. package/dist/cli/grok-neo-gate.d.ts +0 -8
  7. package/dist/cli/grok-neo-gate.d.ts.map +1 -1
  8. package/dist/cli/grok-neo-gate.js +4 -2
  9. package/dist/cli/grok-neo-gate.js.map +1 -1
  10. package/dist/cli-main.js +3 -0
  11. package/dist/cli-main.js.map +1 -1
  12. package/dist/cli.js +2 -2
  13. package/dist/cli.js.map +1 -1
  14. package/dist/config.d.ts +27 -1
  15. package/dist/config.d.ts.map +1 -1
  16. package/dist/config.js +41 -9
  17. package/dist/config.js.map +1 -1
  18. package/dist/core/agent-session.d.ts +4 -0
  19. package/dist/core/agent-session.d.ts.map +1 -1
  20. package/dist/core/agent-session.js +21 -3
  21. package/dist/core/agent-session.js.map +1 -1
  22. package/dist/core/brand.d.ts +79 -0
  23. package/dist/core/brand.d.ts.map +1 -0
  24. package/dist/core/brand.js +141 -0
  25. package/dist/core/brand.js.map +1 -0
  26. package/dist/core/dynamic-prompt/identity.d.ts.map +1 -1
  27. package/dist/core/dynamic-prompt/identity.js +2 -1
  28. package/dist/core/dynamic-prompt/identity.js.map +1 -1
  29. package/dist/core/experimental.d.ts.map +1 -1
  30. package/dist/core/experimental.js +2 -1
  31. package/dist/core/experimental.js.map +1 -1
  32. package/dist/core/extensions/builtin/cache-keepalive/index.d.ts +30 -0
  33. package/dist/core/extensions/builtin/cache-keepalive/index.d.ts.map +1 -0
  34. package/dist/core/extensions/builtin/cache-keepalive/index.js +281 -0
  35. package/dist/core/extensions/builtin/cache-keepalive/index.js.map +1 -0
  36. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.d.ts.map +1 -1
  37. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js +10 -1
  38. package/dist/core/extensions/builtin/claude-sdk-oauth/session-commit-boundary.js.map +1 -1
  39. package/dist/core/extensions/builtin/compaction/index.js +9 -9
  40. package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
  41. package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
  42. package/dist/core/extensions/builtin/compaction/log.js +2 -1
  43. package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
  44. package/dist/core/extensions/builtin/config-reload/generated-shim-filter.d.ts.map +1 -1
  45. package/dist/core/extensions/builtin/config-reload/generated-shim-filter.js +4 -4
  46. package/dist/core/extensions/builtin/config-reload/generated-shim-filter.js.map +1 -1
  47. package/dist/core/extensions/builtin/goal/cache-warm-renderer.d.ts.map +1 -1
  48. package/dist/core/extensions/builtin/goal/cache-warm-renderer.js +21 -8
  49. package/dist/core/extensions/builtin/goal/cache-warm-renderer.js.map +1 -1
  50. package/dist/core/extensions/builtin/goal/cache-warm.d.ts +11 -2
  51. package/dist/core/extensions/builtin/goal/cache-warm.d.ts.map +1 -1
  52. package/dist/core/extensions/builtin/goal/cache-warm.js +16 -0
  53. package/dist/core/extensions/builtin/goal/cache-warm.js.map +1 -1
  54. package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
  55. package/dist/core/extensions/builtin/goal/index.js +36 -1
  56. package/dist/core/extensions/builtin/goal/index.js.map +1 -1
  57. package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts +2 -2
  58. package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts.map +1 -1
  59. package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +3 -3
  60. package/dist/core/extensions/builtin/goal/lifecycle-helpers.js.map +1 -1
  61. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +2 -1
  62. package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
  63. package/dist/core/extensions/builtin/goal/monitor-continuation.js +121 -54
  64. package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
  65. package/dist/core/extensions/builtin/goal/prompt.d.ts.map +1 -1
  66. package/dist/core/extensions/builtin/goal/prompt.js +4 -4
  67. package/dist/core/extensions/builtin/goal/prompt.js.map +1 -1
  68. package/dist/core/extensions/builtin/goal/store-changed-event.d.ts +8 -0
  69. package/dist/core/extensions/builtin/goal/store-changed-event.d.ts.map +1 -0
  70. package/dist/core/extensions/builtin/goal/store-changed-event.js +9 -0
  71. package/dist/core/extensions/builtin/goal/store-changed-event.js.map +1 -0
  72. package/dist/core/extensions/builtin/goal/store.d.ts +3 -2
  73. package/dist/core/extensions/builtin/goal/store.d.ts.map +1 -1
  74. package/dist/core/extensions/builtin/goal/store.js +128 -101
  75. package/dist/core/extensions/builtin/goal/store.js.map +1 -1
  76. package/dist/core/extensions/builtin/goal/wait-progress.js +5 -5
  77. package/dist/core/extensions/builtin/goal/wait-progress.js.map +1 -1
  78. package/dist/core/extensions/builtin/help/index.d.ts.map +1 -1
  79. package/dist/core/extensions/builtin/help/index.js +3 -2
  80. package/dist/core/extensions/builtin/help/index.js.map +1 -1
  81. package/dist/core/extensions/builtin/index.d.ts.map +1 -1
  82. package/dist/core/extensions/builtin/index.js +2 -0
  83. package/dist/core/extensions/builtin/index.js.map +1 -1
  84. package/dist/core/extensions/builtin/monitor-state-event.d.ts +16 -0
  85. package/dist/core/extensions/builtin/monitor-state-event.d.ts.map +1 -1
  86. package/dist/core/extensions/builtin/monitor-state-event.js +15 -0
  87. package/dist/core/extensions/builtin/monitor-state-event.js.map +1 -1
  88. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.d.ts.map +1 -1
  89. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js +2 -1
  90. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js.map +1 -1
  91. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.d.ts.map +1 -1
  92. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js +2 -1
  93. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js.map +1 -1
  94. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.d.ts.map +1 -1
  95. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +2 -1
  96. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js.map +1 -1
  97. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.d.ts.map +1 -1
  98. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +2 -1
  99. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js.map +1 -1
  100. package/dist/core/extensions/builtin/prompt-preset/grok-4.5.d.ts.map +1 -1
  101. package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js +6 -5
  102. package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js.map +1 -1
  103. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.d.ts.map +1 -1
  104. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +2 -1
  105. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js.map +1 -1
  106. package/dist/core/extensions/builtin/terminal/extension.d.ts.map +1 -1
  107. package/dist/core/extensions/builtin/terminal/extension.js +7 -8
  108. package/dist/core/extensions/builtin/terminal/extension.js.map +1 -1
  109. package/dist/core/extensions/builtin/terminal/session-bundle.d.ts +3 -3
  110. package/dist/core/extensions/builtin/terminal/session-bundle.d.ts.map +1 -1
  111. package/dist/core/extensions/builtin/terminal/session-bundle.js.map +1 -1
  112. package/dist/core/extensions/index.d.ts +1 -1
  113. package/dist/core/extensions/index.d.ts.map +1 -1
  114. package/dist/core/extensions/index.js.map +1 -1
  115. package/dist/core/extensions/loader.d.ts.map +1 -1
  116. package/dist/core/extensions/loader.js +7 -0
  117. package/dist/core/extensions/loader.js.map +1 -1
  118. package/dist/core/extensions/runner.d.ts +4 -0
  119. package/dist/core/extensions/runner.d.ts.map +1 -1
  120. package/dist/core/extensions/runner.js +19 -2
  121. package/dist/core/extensions/runner.js.map +1 -1
  122. package/dist/core/extensions/types.d.ts +50 -0
  123. package/dist/core/extensions/types.d.ts.map +1 -1
  124. package/dist/core/extensions/types.js.map +1 -1
  125. package/dist/core/footer-data-provider.d.ts +1 -4
  126. package/dist/core/footer-data-provider.d.ts.map +1 -1
  127. package/dist/core/footer-data-provider.js +0 -7
  128. package/dist/core/footer-data-provider.js.map +1 -1
  129. package/dist/core/generated-shim-banner.d.ts +15 -0
  130. package/dist/core/generated-shim-banner.d.ts.map +1 -0
  131. package/dist/core/generated-shim-banner.js +26 -0
  132. package/dist/core/generated-shim-banner.js.map +1 -0
  133. package/dist/core/model-runtime.d.ts.map +1 -1
  134. package/dist/core/model-runtime.js +7 -3
  135. package/dist/core/model-runtime.js.map +1 -1
  136. package/dist/core/package-manager.d.ts.map +1 -1
  137. package/dist/core/package-manager.js +2 -1
  138. package/dist/core/package-manager.js.map +1 -1
  139. package/dist/core/resource-loader.d.ts +4 -0
  140. package/dist/core/resource-loader.d.ts.map +1 -1
  141. package/dist/core/resource-loader.js +9 -5
  142. package/dist/core/resource-loader.js.map +1 -1
  143. package/dist/core/session-log.d.ts.map +1 -1
  144. package/dist/core/session-log.js +4 -2
  145. package/dist/core/session-log.js.map +1 -1
  146. package/dist/core/session-manager.d.ts +1 -1
  147. package/dist/core/session-manager.d.ts.map +1 -1
  148. package/dist/core/session-manager.js.map +1 -1
  149. package/dist/core/settings-manager.d.ts +10 -0
  150. package/dist/core/settings-manager.d.ts.map +1 -1
  151. package/dist/core/settings-manager.js +17 -2
  152. package/dist/core/settings-manager.js.map +1 -1
  153. package/dist/core/telemetry.d.ts.map +1 -1
  154. package/dist/core/telemetry.js +2 -1
  155. package/dist/core/telemetry.js.map +1 -1
  156. package/dist/core/timings.d.ts +0 -4
  157. package/dist/core/timings.d.ts.map +1 -1
  158. package/dist/core/timings.js +2 -1
  159. package/dist/core/timings.js.map +1 -1
  160. package/dist/core/tools/edit.d.ts +3 -1
  161. package/dist/core/tools/edit.d.ts.map +1 -1
  162. package/dist/core/tools/edit.js +12 -0
  163. package/dist/core/tools/edit.js.map +1 -1
  164. package/dist/core/tools/filesystem-policy.d.ts +10 -0
  165. package/dist/core/tools/filesystem-policy.d.ts.map +1 -0
  166. package/dist/core/tools/filesystem-policy.js +59 -0
  167. package/dist/core/tools/filesystem-policy.js.map +1 -0
  168. package/dist/core/tools/find.d.ts +3 -1
  169. package/dist/core/tools/find.d.ts.map +1 -1
  170. package/dist/core/tools/find.js +15 -0
  171. package/dist/core/tools/find.js.map +1 -1
  172. package/dist/core/tools/grep.d.ts +3 -1
  173. package/dist/core/tools/grep.d.ts.map +1 -1
  174. package/dist/core/tools/grep.js +16 -1
  175. package/dist/core/tools/grep.js.map +1 -1
  176. package/dist/core/tools/ls.d.ts +3 -1
  177. package/dist/core/tools/ls.d.ts.map +1 -1
  178. package/dist/core/tools/ls.js +11 -0
  179. package/dist/core/tools/ls.js.map +1 -1
  180. package/dist/core/tools/read.d.ts +3 -1
  181. package/dist/core/tools/read.d.ts.map +1 -1
  182. package/dist/core/tools/read.js +13 -0
  183. package/dist/core/tools/read.js.map +1 -1
  184. package/dist/core/tools/write.d.ts +3 -1
  185. package/dist/core/tools/write.d.ts.map +1 -1
  186. package/dist/core/tools/write.js +12 -0
  187. package/dist/core/tools/write.js.map +1 -1
  188. package/dist/index.d.ts +1 -1
  189. package/dist/index.d.ts.map +1 -1
  190. package/dist/index.js.map +1 -1
  191. package/dist/inspector-policy.d.ts.map +1 -1
  192. package/dist/inspector-policy.js +2 -1
  193. package/dist/inspector-policy.js.map +1 -1
  194. package/dist/main.d.ts.map +1 -1
  195. package/dist/main.js +5 -4
  196. package/dist/main.js.map +1 -1
  197. package/dist/migrations.d.ts.map +1 -1
  198. package/dist/migrations.js +4 -0
  199. package/dist/migrations.js.map +1 -1
  200. package/dist/modes/app-server/threads/goal-handlers.d.ts.map +1 -1
  201. package/dist/modes/app-server/threads/goal-handlers.js +7 -0
  202. package/dist/modes/app-server/threads/goal-handlers.js.map +1 -1
  203. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  204. package/dist/modes/interactive/components/footer.js +1 -6
  205. package/dist/modes/interactive/components/footer.js.map +1 -1
  206. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  207. package/dist/modes/interactive/interactive-mode.js +7 -7
  208. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  209. package/dist/modes/interactive/tips/catalog/cli-tips.d.ts.map +1 -1
  210. package/dist/modes/interactive/tips/catalog/cli-tips.js +2 -1
  211. package/dist/modes/interactive/tips/catalog/cli-tips.js.map +1 -1
  212. package/dist/modes/interactive/tips/catalog/ethos-tips.d.ts.map +1 -1
  213. package/dist/modes/interactive/tips/catalog/ethos-tips.js +4 -3
  214. package/dist/modes/interactive/tips/catalog/ethos-tips.js.map +1 -1
  215. package/dist/modes/interactive/tips/catalog/model-tips.d.ts.map +1 -1
  216. package/dist/modes/interactive/tips/catalog/model-tips.js +2 -1
  217. package/dist/modes/interactive/tips/catalog/model-tips.js.map +1 -1
  218. package/dist/modes/interactive/tips/catalog/session-tips.d.ts.map +1 -1
  219. package/dist/modes/interactive/tips/catalog/session-tips.js +2 -1
  220. package/dist/modes/interactive/tips/catalog/session-tips.js.map +1 -1
  221. package/dist/modes/interactive/tips/catalog/settings-tips.d.ts.map +1 -1
  222. package/dist/modes/interactive/tips/catalog/settings-tips.js +3 -2
  223. package/dist/modes/interactive/tips/catalog/settings-tips.js.map +1 -1
  224. package/dist/modes/interactive/tips/catalog/workspace-tips.d.ts.map +1 -1
  225. package/dist/modes/interactive/tips/catalog/workspace-tips.js +4 -3
  226. package/dist/modes/interactive/tips/catalog/workspace-tips.js.map +1 -1
  227. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  228. package/dist/modes/rpc/rpc-mode.js +2 -1
  229. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  230. package/dist/nearest-parent-config.d.ts +6 -1
  231. package/dist/nearest-parent-config.d.ts.map +1 -1
  232. package/dist/nearest-parent-config.js +18 -2
  233. package/dist/nearest-parent-config.js.map +1 -1
  234. package/dist/package-manager-cli.d.ts.map +1 -1
  235. package/dist/package-manager-cli.js +13 -1
  236. package/dist/package-manager-cli.js.map +1 -1
  237. package/dist/rpc-entry.js +2 -0
  238. package/dist/rpc-entry.js.map +1 -1
  239. package/dist/self-update-bootstrap.d.ts.map +1 -1
  240. package/dist/self-update-bootstrap.js +6 -0
  241. package/dist/self-update-bootstrap.js.map +1 -1
  242. package/dist/senpi +2 -2
  243. package/dist/utils/pi-user-agent.d.ts +1 -1
  244. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  245. package/dist/utils/pi-user-agent.js +4 -3
  246. package/dist/utils/pi-user-agent.js.map +1 -1
  247. package/dist/utils/tools-manager.d.ts.map +1 -1
  248. package/dist/utils/tools-manager.js +2 -1
  249. package/dist/utils/tools-manager.js.map +1 -1
  250. package/dist/utils/version-check.d.ts +3 -0
  251. package/dist/utils/version-check.d.ts.map +1 -1
  252. package/dist/utils/version-check.js +37 -6
  253. package/dist/utils/version-check.js.map +1 -1
  254. package/docs/extensions.md +76 -0
  255. package/docs/providers.md +23 -3
  256. package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +50 -0
  257. package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
  258. package/node_modules/@code-yeongyu/senpi-codemode/src/extension/{resumption-channel.ts → wake-source-state.ts} +9 -9
  259. package/node_modules/@code-yeongyu/senpi-codemode/src/index.ts +7 -7
  260. package/node_modules/@code-yeongyu/senpi-codemode/src/tool/detached-cell-manager.ts +12 -11
  261. package/node_modules/@earendil-works/pi-agent-core/package.json +2 -2
  262. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +3 -1
  263. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
  264. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +13 -0
  265. package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
  266. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
  267. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +6 -3
  268. package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
  269. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
  270. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -2
  271. package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
  272. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
  273. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +6 -2
  274. package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
  275. package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts +17 -0
  276. package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.d.ts.map +1 -0
  277. package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js +52 -0
  278. package/node_modules/@earendil-works/pi-ai/dist/api/warm-prompt-cache.js.map +1 -0
  279. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.d.ts.map +1 -1
  280. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js +2 -1
  281. package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openai-codex.js.map +1 -1
  282. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +3 -1
  283. package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
  284. package/node_modules/@earendil-works/pi-ai/dist/index.js +3 -1
  285. package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
  286. package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
  287. package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
  288. package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
  289. package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
  290. package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
  291. package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
  292. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.d.ts.map +1 -1
  293. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js +120 -1
  294. package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/antml/recovery-stream.js.map +1 -1
  295. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +2 -0
  296. package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
  297. package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
  298. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +3 -1
  299. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
  300. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +17 -3
  301. package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
  302. package/node_modules/@earendil-works/pi-ai/dist/wire-identity.d.ts +14 -0
  303. package/node_modules/@earendil-works/pi-ai/dist/wire-identity.d.ts.map +1 -0
  304. package/node_modules/@earendil-works/pi-ai/dist/wire-identity.js +24 -0
  305. package/node_modules/@earendil-works/pi-ai/dist/wire-identity.js.map +1 -0
  306. package/node_modules/@earendil-works/pi-ai/package.json +1 -1
  307. package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.d.ts.map +1 -1
  308. package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.js +11 -3
  309. package/node_modules/@earendil-works/pi-pty/dist/pipe-fallback.js.map +1 -1
  310. package/node_modules/@earendil-works/pi-pty/native/prebuilds/darwin-arm64/senpi_pty.darwin-arm64.node +0 -0
  311. package/node_modules/@earendil-works/pi-pty/package.json +1 -1
  312. package/node_modules/@earendil-works/pi-tui/package.json +1 -1
  313. package/package.json +6 -6
  314. package/dist/core/extensions/builtin/resumption-channel-event.d.ts +0 -13
  315. package/dist/core/extensions/builtin/resumption-channel-event.d.ts.map +0 -1
  316. package/dist/core/extensions/builtin/resumption-channel-event.js +0 -13
  317. package/dist/core/extensions/builtin/resumption-channel-event.js.map +0 -1
  318. package/dist/core/omo-native-detect.d.ts +0 -3
  319. package/dist/core/omo-native-detect.d.ts.map +0 -1
  320. package/dist/core/omo-native-detect.js +0 -58
  321. package/dist/core/omo-native-detect.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"cli-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/cli-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ;;;;GAWe,CAAC"}
1
+ {"version":3,"file":"cli-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/cli-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ;;;;GAWe,CAAC"}
@@ -1,8 +1,9 @@
1
+ import { APP_NAME } from "../../../../config.js";
1
2
  export const CLI_TIPS = [
2
3
  {
3
4
  id: "print-mode",
4
5
  bindings: [],
5
- render: () => 'senpi -p "question" answers without the TUI, and piped stdin is merged into the prompt.',
6
+ render: () => `${APP_NAME} -p "question" answers without the TUI, and piped stdin is merged into the prompt.`,
6
7
  },
7
8
  {
8
9
  id: "tool-flags",
@@ -1 +1 @@
1
- {"version":3,"file":"cli-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/cli-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;QACC,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,yFAAyF;KACvG;IACD;QACC,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,2EAA2E;KACzF;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const CLI_TIPS = [\n\t{\n\t\tid: \"print-mode\",\n\t\tbindings: [],\n\t\trender: () => 'senpi -p \"question\" answers without the TUI, and piped stdin is merged into the prompt.',\n\t},\n\t{\n\t\tid: \"tool-flags\",\n\t\tbindings: [],\n\t\trender: () => \"Limit a run's tools with -t read,bash, or drop a few with -xt write,edit.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"cli-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/cli-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,QAAQ,GAAG;IACvB;QACC,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,oFAAoF;KAC7G;IACD;QACC,EAAE,EAAE,YAAY;QAChB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,2EAA2E;KACzF;CACkC,CAAC","sourcesContent":["import { APP_NAME } from \"../../../../config.ts\";\nimport type { TipDefinition } from \"./types.ts\";\n\nexport const CLI_TIPS = [\n\t{\n\t\tid: \"print-mode\",\n\t\tbindings: [],\n\t\trender: () => `${APP_NAME} -p \"question\" answers without the TUI, and piped stdin is merged into the prompt.`,\n\t},\n\t{\n\t\tid: \"tool-flags\",\n\t\tbindings: [],\n\t\trender: () => \"Limit a run's tools with -t read,bash, or drop a few with -xt write,edit.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ethos-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/ethos-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;IAsFa,CAAC"}
1
+ {"version":3,"file":"ethos-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/ethos-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;IAsFa,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { APP_NAME } from "../../../../config.js";
1
2
  export const ETHOS_TIPS = [
2
3
  {
3
4
  id: "ethos.tuning-discipline",
@@ -54,12 +55,12 @@ export const ETHOS_TIPS = [
54
55
  {
55
56
  id: "ethos.multimodal-vision",
56
57
  bindings: [],
57
- render: () => "Drop a screenshot, a PDF, a crusty whiteboard photo... senpi actually sees it, reads it, reasons about it. Your agent has eyes now. *Yes, really.*",
58
+ render: () => `Drop a screenshot, a PDF, a crusty whiteboard photo... ${APP_NAME} actually sees it, reads it, reasons about it. Your agent has eyes now. *Yes, really.*`,
58
59
  },
59
60
  {
60
61
  id: "ethos.oauth-multi-account",
61
62
  bindings: [],
62
- render: () => "Hit a rate limit, switch accounts. Wrong org, switch again. senpi treats your Claude logins like a roster, not a single lifeline. *Env vars could never.*",
63
+ render: () => `Hit a rate limit, switch accounts. Wrong org, switch again. ${APP_NAME} treats your Claude logins like a roster, not a single lifeline. *Env vars could never.*`,
63
64
  },
64
65
  {
65
66
  id: "ethos.agent-sdk-foundation",
@@ -69,7 +70,7 @@ export const ETHOS_TIPS = [
69
70
  {
70
71
  id: "ethos.tool-call-repair",
71
72
  bindings: [],
72
- render: () => "senpi catches malformed tool calls on the wire, fixes them, and salvages the turn - claude's sloppy invokes, kimi k3's leaked XTML channels, all of it. Other harnesses retry the whole thing and bill you for the privilege. *table stakes, honestly*",
73
+ render: () => `${APP_NAME} catches malformed tool calls on the wire, fixes them, and salvages the turn - claude's sloppy invokes, kimi k3's leaked XTML channels, all of it. Other harnesses retry the whole thing and bill you for the privilege. *table stakes, honestly*`,
73
74
  },
74
75
  ];
75
76
  //# sourceMappingURL=ethos-tips.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ethos-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/ethos-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0JAA0J;KAC3J;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qIAAqI;KACtI;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,+GAA+G;KAChH;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,kFAAkF;KAChG;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,4KAA4K;KAC7K;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CACZ,6JAA6J;KAC9J;IACD;QACC,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CACZ,wIAAwI;KACzI;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,uMAAuM;KACxM;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,8KAA8K;KAC/K;IACD;QACC,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qNAAqN;KACtN;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,oJAAoJ;KACrJ;IACD;QACC,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,2JAA2J;KAC5J;IACD;QACC,EAAE,EAAE,4BAA4B;QAChC,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qLAAqL;KACtL;IACD;QACC,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,wPAAwP;KACzP;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const ETHOS_TIPS = [\n\t{\n\t\tid: \"ethos.tuning-discipline\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"gpt-5.6-sol used to turn a sprint into a marathon. We tuned the system prompt and killed that habit: 5-minute jobs take 5 minutes, 12-hour jobs take 12.\",\n\t},\n\t{\n\t\tid: \"ethos.tools-transparent\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Don't study our tools. A tool that needs studying is a tool that failed. We just ride shotgun while you keep doing your actual job.\",\n\t},\n\t{\n\t\tid: \"ethos.only-harness\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"The only harness that actually knows how to drive gpt-5.6-sol. Same job, feels up to 30% faster. *we counted*\",\n\t},\n\t{\n\t\tid: \"ethos.spend-tokens\",\n\t\tbindings: [],\n\t\trender: () => \"Stop hoarding tokens. Spend them like they buy your hours back, because they do.\",\n\t},\n\t{\n\t\tid: \"ethos.deep-work\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Using our tools means your work is already the deep, valuable kind. Keep your eyes on the essence of your craft. The rest is our problem now, and we're great at problems.\",\n\t},\n\t{\n\t\tid: \"ethos.ulw-plan-sage\",\n\t\tbindings: [],\n\t\trequiresCommand: \"tasks\",\n\t\trender: () =>\n\t\t\t\"Try ulw-plan on fable-5 xhigh. A patient sage obsessed with the essence does the agonizing for you and fills in every blank you were pretending not to see.\",\n\t},\n\t{\n\t\tid: \"ethos.ulw-loop-shallow\",\n\t\tbindings: [],\n\t\trequiresCommand: \"tasks\",\n\t\trender: () =>\n\t\t\t\"For days when deep thought sounds awful, run the ulw loop with gpt-5.6-sol fast/medium. Fair warning: shallow thinking sends invoices.\",\n\t},\n\t{\n\t\tid: \"ethos.monitor-subscribe\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Subscribe to a command's stdout and forget it. CI finishes, server boots, log line lands... you're mid-edit and the news finds *you*. No sleep loops, no polling, no re-reading context like a chump.\",\n\t},\n\t{\n\t\tid: \"ethos.cache-budget\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"My harness knows the prompt cache's expiry to the second and never blocks past it. Cold re-read tax? *Refused on your behalf.* Other agents eat that cost, mine declines it.\",\n\t},\n\t{\n\t\tid: \"ethos.cache-hit-rate\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Live cache-hit rate in the footer, plus a running tab of misses, idle gaps, and model swaps. I can point at the exact moment cache broke and why. Watching tokens you never re-pay stack up? Smug doesn't cover it.\",\n\t},\n\t{\n\t\tid: \"ethos.multimodal-vision\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Drop a screenshot, a PDF, a crusty whiteboard photo... senpi actually sees it, reads it, reasons about it. Your agent has eyes now. *Yes, really.*\",\n\t},\n\t{\n\t\tid: \"ethos.oauth-multi-account\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Hit a rate limit, switch accounts. Wrong org, switch again. senpi treats your Claude logins like a roster, not a single lifeline. *Env vars could never.*\",\n\t},\n\t{\n\t\tid: \"ethos.agent-sdk-foundation\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t'Built on the official agent SDK, speaking the protocol natively. No reverse-engineered wrapper, no ToS gray zone, no \"will I get banned for this\" anxiety. *Sleep easy, ship loud.*',\n\t},\n\t{\n\t\tid: \"ethos.tool-call-repair\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"senpi catches malformed tool calls on the wire, fixes them, and salvages the turn - claude's sloppy invokes, kimi k3's leaked XTML channels, all of it. Other harnesses retry the whole thing and bill you for the privilege. *table stakes, honestly*\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"ethos-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/ethos-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0JAA0J;KAC3J;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qIAAqI;KACtI;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,+GAA+G;KAChH;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,kFAAkF;KAChG;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,4KAA4K;KAC7K;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CACZ,6JAA6J;KAC9J;IACD;QACC,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CACZ,wIAAwI;KACzI;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,uMAAuM;KACxM;IACD;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,8KAA8K;KAC/K;IACD;QACC,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qNAAqN;KACtN;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0DAA0D,QAAQ,wFAAwF;KAC3J;IACD;QACC,EAAE,EAAE,2BAA2B;QAC/B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,+DAA+D,QAAQ,0FAA0F;KAClK;IACD;QACC,EAAE,EAAE,4BAA4B;QAChC,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qLAAqL;KACtL;IACD;QACC,EAAE,EAAE,wBAAwB;QAC5B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,GAAG,QAAQ,mPAAmP;KAC/P;CACkC,CAAC","sourcesContent":["import { APP_NAME } from \"../../../../config.ts\";\nimport type { TipDefinition } from \"./types.ts\";\n\nexport const ETHOS_TIPS = [\n\t{\n\t\tid: \"ethos.tuning-discipline\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"gpt-5.6-sol used to turn a sprint into a marathon. We tuned the system prompt and killed that habit: 5-minute jobs take 5 minutes, 12-hour jobs take 12.\",\n\t},\n\t{\n\t\tid: \"ethos.tools-transparent\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Don't study our tools. A tool that needs studying is a tool that failed. We just ride shotgun while you keep doing your actual job.\",\n\t},\n\t{\n\t\tid: \"ethos.only-harness\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"The only harness that actually knows how to drive gpt-5.6-sol. Same job, feels up to 30% faster. *we counted*\",\n\t},\n\t{\n\t\tid: \"ethos.spend-tokens\",\n\t\tbindings: [],\n\t\trender: () => \"Stop hoarding tokens. Spend them like they buy your hours back, because they do.\",\n\t},\n\t{\n\t\tid: \"ethos.deep-work\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Using our tools means your work is already the deep, valuable kind. Keep your eyes on the essence of your craft. The rest is our problem now, and we're great at problems.\",\n\t},\n\t{\n\t\tid: \"ethos.ulw-plan-sage\",\n\t\tbindings: [],\n\t\trequiresCommand: \"tasks\",\n\t\trender: () =>\n\t\t\t\"Try ulw-plan on fable-5 xhigh. A patient sage obsessed with the essence does the agonizing for you and fills in every blank you were pretending not to see.\",\n\t},\n\t{\n\t\tid: \"ethos.ulw-loop-shallow\",\n\t\tbindings: [],\n\t\trequiresCommand: \"tasks\",\n\t\trender: () =>\n\t\t\t\"For days when deep thought sounds awful, run the ulw loop with gpt-5.6-sol fast/medium. Fair warning: shallow thinking sends invoices.\",\n\t},\n\t{\n\t\tid: \"ethos.monitor-subscribe\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Subscribe to a command's stdout and forget it. CI finishes, server boots, log line lands... you're mid-edit and the news finds *you*. No sleep loops, no polling, no re-reading context like a chump.\",\n\t},\n\t{\n\t\tid: \"ethos.cache-budget\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"My harness knows the prompt cache's expiry to the second and never blocks past it. Cold re-read tax? *Refused on your behalf.* Other agents eat that cost, mine declines it.\",\n\t},\n\t{\n\t\tid: \"ethos.cache-hit-rate\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Live cache-hit rate in the footer, plus a running tab of misses, idle gaps, and model swaps. I can point at the exact moment cache broke and why. Watching tokens you never re-pay stack up? Smug doesn't cover it.\",\n\t},\n\t{\n\t\tid: \"ethos.multimodal-vision\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`Drop a screenshot, a PDF, a crusty whiteboard photo... ${APP_NAME} actually sees it, reads it, reasons about it. Your agent has eyes now. *Yes, really.*`,\n\t},\n\t{\n\t\tid: \"ethos.oauth-multi-account\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`Hit a rate limit, switch accounts. Wrong org, switch again. ${APP_NAME} treats your Claude logins like a roster, not a single lifeline. *Env vars could never.*`,\n\t},\n\t{\n\t\tid: \"ethos.agent-sdk-foundation\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t'Built on the official agent SDK, speaking the protocol natively. No reverse-engineered wrapper, no ToS gray zone, no \"will I get banned for this\" anxiety. *Sleep easy, ship loud.*',\n\t},\n\t{\n\t\tid: \"ethos.tool-call-repair\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`${APP_NAME} catches malformed tool calls on the wire, fixes them, and salvages the turn - claude's sloppy invokes, kimi k3's leaked XTML channels, all of it. Other harnesses retry the whole thing and bill you for the privilege. *table stakes, honestly*`,\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"model-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/model-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;IAwDa,CAAC"}
1
+ {"version":3,"file":"model-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/model-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;IAwDa,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { APP_NAME } from "../../../../config.js";
1
2
  export const MODEL_TIPS = [
2
3
  {
3
4
  id: "thinking-level",
@@ -22,7 +23,7 @@ export const MODEL_TIPS = [
22
23
  {
23
24
  id: "model-cycling-scope",
24
25
  bindings: ["app.model.cycleForward"],
25
- render: (keys) => `Start senpi with --models "anthropic/*,gpt-5*" to limit which models ${keys("app.model.cycleForward")} cycles through.`,
26
+ render: (keys) => `Start ${APP_NAME} with --models "anthropic/*,gpt-5*" to limit which models ${keys("app.model.cycleForward")} cycles through.`,
26
27
  },
27
28
  {
28
29
  id: "thinking-budgets",
@@ -1 +1 @@
1
- {"version":3,"file":"model-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/model-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;QACC,EAAE,EAAE,gBAAgB;QACpB,QAAQ,EAAE,CAAC,oBAAoB,CAAC;QAChC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,uCAAuC;KAC1F;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;QAC/D,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,uCAAuC,IAAI,CAAC,wBAAwB,CAAC,sBAAsB,IAAI,CAAC,yBAAyB,CAAC,GAAG;KAC9H;IACD;QACC,EAAE,EAAE,0BAA0B;QAC9B,QAAQ,EAAE,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;QAC3D,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,gCAAgC,IAAI,CAAC,kBAAkB,CAAC,cAAc,IAAI,CAAC,2BAA2B,CAAC,sCAAsC;KAC9I;IACD;QACC,EAAE,EAAE,sBAAsB;QAC1B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,4FAA4F;KAC1G;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,CAAC,wBAAwB,CAAC;QACpC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,wEAAwE,IAAI,CAAC,wBAAwB,CAAC,kBAAkB;KACzH;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,6FAA6F;KAC3G;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,iGAAiG;KAC/G;IACD;QACC,EAAE,EAAE,gBAAgB;QACpB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,iGAAiG;KAC/G;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,oHAAoH;KACrH;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,UAAU;QAC3B,MAAM,EAAE,GAAG,EAAE,CAAC,qFAAqF;KACnG;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const MODEL_TIPS = [\n\t{\n\t\tid: \"thinking-level\",\n\t\tbindings: [\"app.thinking.cycle\"],\n\t\trender: (keys) => `Use ${keys(\"app.thinking.cycle\")} to cycle the model's thinking level.`,\n\t},\n\t{\n\t\tid: \"favorite-model-rotation\",\n\t\tbindings: [\"app.model.cycleForward\", \"app.model.cycleBackward\"],\n\t\trender: (keys) =>\n\t\t\t`Rotate through favorite models with ${keys(\"app.model.cycleForward\")}; go backward with ${keys(\"app.model.cycleBackward\")}.`,\n\t},\n\t{\n\t\tid: \"model-selector-favorites\",\n\t\tbindings: [\"app.model.select\", \"app.models.toggleFavorite\"],\n\t\trender: (keys) =>\n\t\t\t`Open the model selector with ${keys(\"app.model.select\")}, then use ${keys(\"app.models.toggleFavorite\")} to toggle the highlighted favorite.`,\n\t},\n\t{\n\t\tid: \"model-command-search\",\n\t\tbindings: [],\n\t\trender: () => \"Use /model to open the selector, or /model <pattern> to jump straight to a matching model.\",\n\t},\n\t{\n\t\tid: \"model-cycling-scope\",\n\t\tbindings: [\"app.model.cycleForward\"],\n\t\trender: (keys) =>\n\t\t\t`Start senpi with --models \"anthropic/*,gpt-5*\" to limit which models ${keys(\"app.model.cycleForward\")} cycles through.`,\n\t},\n\t{\n\t\tid: \"thinking-budgets\",\n\t\tbindings: [],\n\t\trender: () => \"Set thinkingBudgets in settings.json to choose the token budget behind each thinking level.\",\n\t},\n\t{\n\t\tid: \"prompt-preset\",\n\t\tbindings: [],\n\t\trender: () => \"Set promptPreset in settings.json when a model does not auto-detect the system prompt you want.\",\n\t},\n\t{\n\t\tid: \"provider-login\",\n\t\tbindings: [],\n\t\trender: () => \"Use /login to add a subscription or API-key provider, and /logout to remove stored credentials.\",\n\t},\n\t{\n\t\tid: \"fallback-chains-setting\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"retry.fallbackChains in settings.json maps a model to ordered fallbacks, so a failed turn retries on the next one.\",\n\t},\n\t{\n\t\tid: \"fallback-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"fallback\",\n\t\trender: () => \"Use /fallback to inspect and manage the retry fallback chain for the current model.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"model-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/model-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB;QACC,EAAE,EAAE,gBAAgB;QACpB,QAAQ,EAAE,CAAC,oBAAoB,CAAC;QAChC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,CAAC,oBAAoB,CAAC,uCAAuC;KAC1F;IACD;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,CAAC,wBAAwB,EAAE,yBAAyB,CAAC;QAC/D,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,uCAAuC,IAAI,CAAC,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n\t\tid: \"thinking-level\",\n\t\tbindings: [\"app.thinking.cycle\"],\n\t\trender: (keys) => `Use ${keys(\"app.thinking.cycle\")} to cycle the model's thinking level.`,\n\t},\n\t{\n\t\tid: \"favorite-model-rotation\",\n\t\tbindings: [\"app.model.cycleForward\", \"app.model.cycleBackward\"],\n\t\trender: (keys) =>\n\t\t\t`Rotate through favorite models with ${keys(\"app.model.cycleForward\")}; go backward with ${keys(\"app.model.cycleBackward\")}.`,\n\t},\n\t{\n\t\tid: \"model-selector-favorites\",\n\t\tbindings: [\"app.model.select\", \"app.models.toggleFavorite\"],\n\t\trender: (keys) =>\n\t\t\t`Open the model selector with ${keys(\"app.model.select\")}, then use ${keys(\"app.models.toggleFavorite\")} to toggle the highlighted favorite.`,\n\t},\n\t{\n\t\tid: \"model-command-search\",\n\t\tbindings: [],\n\t\trender: () => \"Use /model to open the selector, or /model <pattern> to jump straight to a matching model.\",\n\t},\n\t{\n\t\tid: \"model-cycling-scope\",\n\t\tbindings: [\"app.model.cycleForward\"],\n\t\trender: (keys) =>\n\t\t\t`Start ${APP_NAME} with --models \"anthropic/*,gpt-5*\" to limit which models ${keys(\"app.model.cycleForward\")} cycles through.`,\n\t},\n\t{\n\t\tid: \"thinking-budgets\",\n\t\tbindings: [],\n\t\trender: () => \"Set thinkingBudgets in settings.json to choose the token budget behind each thinking level.\",\n\t},\n\t{\n\t\tid: \"prompt-preset\",\n\t\tbindings: [],\n\t\trender: () => \"Set promptPreset in settings.json when a model does not auto-detect the system prompt you want.\",\n\t},\n\t{\n\t\tid: \"provider-login\",\n\t\tbindings: [],\n\t\trender: () => \"Use /login to add a subscription or API-key provider, and /logout to remove stored credentials.\",\n\t},\n\t{\n\t\tid: \"fallback-chains-setting\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"retry.fallbackChains in settings.json maps a model to ordered fallbacks, so a failed turn retries on the next one.\",\n\t},\n\t{\n\t\tid: \"fallback-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"fallback\",\n\t\trender: () => \"Use /fallback to inspect and manage the retry fallback chain for the current model.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"session-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/session-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY;;;;GAoDW,CAAC"}
1
+ {"version":3,"file":"session-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/session-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;GAoDW,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { APP_NAME } from "../../../../config.js";
1
2
  export const SESSION_TIPS = [
2
3
  {
3
4
  id: "favorite-models-command",
@@ -22,7 +23,7 @@ export const SESSION_TIPS = [
22
23
  {
23
24
  id: "continue-session",
24
25
  bindings: [],
25
- render: () => "senpi -c continues your most recent session; senpi -r opens the session picker.",
26
+ render: () => `${APP_NAME} -c continues your most recent session; ${APP_NAME} -r opens the session picker.`,
26
27
  },
27
28
  {
28
29
  id: "session-name",
@@ -1 +1 @@
1
- {"version":3,"file":"session-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/session-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,yEAAyE;KACvF;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,0EAA0E;KACxF;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,sEAAsE;KACpF;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,iFAAiF;KAC/F;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,yFAAyF;KACvG;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,4EAA4E;KAC1F;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,mGAAmG;KACjH;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0HAA0H;KAC3H;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const SESSION_TIPS = [\n\t{\n\t\tid: \"favorite-models-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /favorite-models to choose and reorder the models in your rotation.\",\n\t},\n\t{\n\t\tid: \"tree-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /tree to revisit earlier points and switch between session branches.\",\n\t},\n\t{\n\t\tid: \"fork-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /fork to create a separate session from an earlier user message.\",\n\t},\n\t{\n\t\tid: \"clone-session\",\n\t\tbindings: [],\n\t\trender: () => \"Use /clone to duplicate the current branch into its own session before trying something risky.\",\n\t},\n\t{\n\t\tid: \"continue-session\",\n\t\tbindings: [],\n\t\trender: () => \"senpi -c continues your most recent session; senpi -r opens the session picker.\",\n\t},\n\t{\n\t\tid: \"session-name\",\n\t\tbindings: [],\n\t\trender: () => \"Use /name <name> to label a session so it is easy to spot in the footer and in /resume.\",\n\t},\n\t{\n\t\tid: \"session-info\",\n\t\tbindings: [],\n\t\trender: () => \"Use /session to see the session file, id, message count, tokens, and cost.\",\n\t},\n\t{\n\t\tid: \"export-share\",\n\t\tbindings: [],\n\t\trender: () => \"Use /export to write the session to HTML or JSONL, or /share to upload it as a private gist link.\",\n\t},\n\t{\n\t\tid: \"compact-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /compact to compact context now, or /compact <prompt> to tell the summarizer what to keep.\",\n\t},\n\t{\n\t\tid: \"auto-compaction\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Auto-compaction is on by default - the (auto) marker in the footer shows it; tune it with compaction.* in settings.json.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"session-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/session-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B;QACC,EAAE,EAAE,yBAAyB;QAC7B,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,yEAAyE;KACvF;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,0EAA0E;KACxF;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,sEAAsE;KACpF;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,QAAQ,2CAA2C,QAAQ,+BAA+B;KAC3G;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,yFAAyF;KACvG;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,4EAA4E;KAC1F;IACD;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,mGAAmG;KACjH;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,iBAAiB;QACrB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0HAA0H;KAC3H;CACkC,CAAC","sourcesContent":["import { APP_NAME } from \"../../../../config.ts\";\nimport type { TipDefinition } from \"./types.ts\";\n\nexport const SESSION_TIPS = [\n\t{\n\t\tid: \"favorite-models-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /favorite-models to choose and reorder the models in your rotation.\",\n\t},\n\t{\n\t\tid: \"tree-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /tree to revisit earlier points and switch between session branches.\",\n\t},\n\t{\n\t\tid: \"fork-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /fork to create a separate session from an earlier user message.\",\n\t},\n\t{\n\t\tid: \"clone-session\",\n\t\tbindings: [],\n\t\trender: () => \"Use /clone to duplicate the current branch into its own session before trying something risky.\",\n\t},\n\t{\n\t\tid: \"continue-session\",\n\t\tbindings: [],\n\t\trender: () => `${APP_NAME} -c continues your most recent session; ${APP_NAME} -r opens the session picker.`,\n\t},\n\t{\n\t\tid: \"session-name\",\n\t\tbindings: [],\n\t\trender: () => \"Use /name <name> to label a session so it is easy to spot in the footer and in /resume.\",\n\t},\n\t{\n\t\tid: \"session-info\",\n\t\tbindings: [],\n\t\trender: () => \"Use /session to see the session file, id, message count, tokens, and cost.\",\n\t},\n\t{\n\t\tid: \"export-share\",\n\t\tbindings: [],\n\t\trender: () => \"Use /export to write the session to HTML or JSONL, or /share to upload it as a private gist link.\",\n\t},\n\t{\n\t\tid: \"compact-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /compact to compact context now, or /compact <prompt> to tell the summarizer what to keep.\",\n\t},\n\t{\n\t\tid: \"auto-compaction\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Auto-compaction is on by default - the (auto) marker in the footer shows it; tune it with compaction.* in settings.json.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"settings-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/settings-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;;;GAwCU,CAAC"}
1
+ {"version":3,"file":"settings-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/settings-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa;;;;GAwCU,CAAC"}
@@ -1,8 +1,9 @@
1
+ import { agentDirLabel, CONFIG_DIR_NAME } from "../../../../config.js";
1
2
  export const SETTINGS_TIPS = [
2
3
  {
3
4
  id: "settings-locations",
4
5
  bindings: [],
5
- render: () => "Use /settings for common options; the rest live in settings.json, with .senpi/settings.json overriding per project.",
6
+ render: () => `Use /settings for common options; the rest live in settings.json, with ${CONFIG_DIR_NAME}/settings.json overriding per project.`,
6
7
  },
7
8
  {
8
9
  id: "permission-preset",
@@ -17,7 +18,7 @@ export const SETTINGS_TIPS = [
17
18
  {
18
19
  id: "custom-themes",
19
20
  bindings: [],
20
- render: () => "Switch themes from /settings, and drop custom theme files in ~/.senpi/agent/themes.",
21
+ render: () => `Switch themes from /settings, and drop custom theme files in ${agentDirLabel()}/themes.`,
21
22
  },
22
23
  {
23
24
  id: "reload-resources",
@@ -1 +1 @@
1
- {"version":3,"file":"settings-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/settings-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,qHAAqH;KACtH;IACD;QACC,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,2GAA2G;KAC5G;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,qFAAqF;KACnG;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,gHAAgH;KACjH;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,wGAAwG;KACzG;IACD;QACC,EAAE,EAAE,aAAa;QACjB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gEAAgE;KAC9E;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const SETTINGS_TIPS = [\n\t{\n\t\tid: \"settings-locations\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Use /settings for common options; the rest live in settings.json, with .senpi/settings.json overriding per project.\",\n\t},\n\t{\n\t\tid: \"permission-preset\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t'Set permissionPreset to \"workspace\", \"read-only\", or \"ask\" to decide which tool calls need your approval.',\n\t},\n\t{\n\t\tid: \"packages-setting\",\n\t\tbindings: [],\n\t\trender: () => \"The packages setting loads skills, extensions, prompts, and themes from an npm or git package.\",\n\t},\n\t{\n\t\tid: \"custom-themes\",\n\t\tbindings: [],\n\t\trender: () => \"Switch themes from /settings, and drop custom theme files in ~/.senpi/agent/themes.\",\n\t},\n\t{\n\t\tid: \"reload-resources\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Use /reload to re-read keybindings, extensions, skills, prompts, themes, and context files without restarting.\",\n\t},\n\t{\n\t\tid: \"project-trust\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Use /trust to save a trust decision so this project's settings, skills, and extensions load next time.\",\n\t},\n\t{\n\t\tid: \"tips-toggle\",\n\t\tbindings: [],\n\t\trender: () => 'Set \"tips\": false in settings.json to stop showing these tips.',\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"settings-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/settings-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGvE,MAAM,CAAC,MAAM,aAAa,GAAG;IAC5B;QACC,EAAE,EAAE,oBAAoB;QACxB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,0EAA0E,eAAe,wCAAwC;KAClI;IACD;QACC,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,2GAA2G;KAC5G;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gGAAgG;KAC9G;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gEAAgE,aAAa,EAAE,UAAU;KACvG;IACD;QACC,EAAE,EAAE,kBAAkB;QACtB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,gHAAgH;KACjH;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CACZ,wGAAwG;KACzG;IACD;QACC,EAAE,EAAE,aAAa;QACjB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,GAAG,EAAE,CAAC,gEAAgE;KAC9E;CACkC,CAAC","sourcesContent":["import { agentDirLabel, CONFIG_DIR_NAME } from \"../../../../config.ts\";\nimport type { TipDefinition } from \"./types.ts\";\n\nexport const SETTINGS_TIPS = [\n\t{\n\t\tid: \"settings-locations\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`Use /settings for common options; the rest live in settings.json, with ${CONFIG_DIR_NAME}/settings.json overriding per project.`,\n\t},\n\t{\n\t\tid: \"permission-preset\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t'Set permissionPreset to \"workspace\", \"read-only\", or \"ask\" to decide which tool calls need your approval.',\n\t},\n\t{\n\t\tid: \"packages-setting\",\n\t\tbindings: [],\n\t\trender: () => \"The packages setting loads skills, extensions, prompts, and themes from an npm or git package.\",\n\t},\n\t{\n\t\tid: \"custom-themes\",\n\t\tbindings: [],\n\t\trender: () => `Switch themes from /settings, and drop custom theme files in ${agentDirLabel()}/themes.`,\n\t},\n\t{\n\t\tid: \"reload-resources\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Use /reload to re-read keybindings, extensions, skills, prompts, themes, and context files without restarting.\",\n\t},\n\t{\n\t\tid: \"project-trust\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Use /trust to save a trust decision so this project's settings, skills, and extensions load next time.\",\n\t},\n\t{\n\t\tid: \"tips-toggle\",\n\t\tbindings: [],\n\t\trender: () => 'Set \"tips\": false in settings.json to stop showing these tips.',\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/workspace-tips.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc;;;;;;;;;;IAoFS,CAAC"}
1
+ {"version":3,"file":"workspace-tips.d.ts","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/workspace-tips.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;IAoFS,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { APP_NAME, agentDirLabel } from "../../../../config.js";
1
2
  export const WORKSPACE_TIPS = [
2
3
  {
3
4
  id: "help-command",
@@ -13,12 +14,12 @@ export const WORKSPACE_TIPS = [
13
14
  {
14
15
  id: "agents-md-context",
15
16
  bindings: [],
16
- render: () => "senpi loads AGENTS.md from your home directory, every parent folder, and the current folder as project instructions.",
17
+ render: () => `${APP_NAME} loads AGENTS.md from your home directory, every parent folder, and the current folder as project instructions.`,
17
18
  },
18
19
  {
19
20
  id: "skills-and-prompts",
20
21
  bindings: [],
21
- render: () => "Skills run as /skill:name, and prompt templates in ~/.senpi/agent/prompts expand as /templatename.",
22
+ render: () => `Skills run as /skill:name, and prompt templates in ${agentDirLabel()}/prompts expand as /templatename.`,
22
23
  },
23
24
  {
24
25
  id: "files-command",
@@ -42,7 +43,7 @@ export const WORKSPACE_TIPS = [
42
43
  id: "goal-command",
43
44
  bindings: [],
44
45
  requiresCommand: "goal",
45
- render: () => "Use /goal to set a persistent goal senpi keeps pursuing, then pause, resume, or clear it.",
46
+ render: () => `Use /goal to set a persistent goal ${APP_NAME} keeps pursuing, then pause, resume, or clear it.`,
46
47
  },
47
48
  {
48
49
  id: "btw-command",
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/workspace-tips.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,GAAG,EAAE,CAAC,mDAAmD;KACjE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E,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CAAC,0FAA0F;KACxG;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CAAC,+DAA+D;KAC7E;IACD;QACC,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,WAAW;QAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,wEAAwE;KACtF;CACkC,CAAC","sourcesContent":["import type { TipDefinition } from \"./types.ts\";\n\nexport const WORKSPACE_TIPS = [\n\t{\n\t\tid: \"help-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"help\",\n\t\trender: () => \"Use /help to see available commands and guidance.\",\n\t},\n\t{\n\t\tid: \"keybindings-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /keybindings to review and customize keyboard shortcuts.\",\n\t},\n\t{\n\t\tid: \"agents-md-context\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"senpi loads AGENTS.md from your home directory, every parent folder, and the current folder as project instructions.\",\n\t},\n\t{\n\t\tid: \"skills-and-prompts\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t\"Skills run as /skill:name, and prompt templates in ~/.senpi/agent/prompts expand as /templatename.\",\n\t},\n\t{\n\t\tid: \"files-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"files\",\n\t\trender: () => \"Use /files to list every file this session read, wrote, or edited.\",\n\t},\n\t{\n\t\tid: \"diff-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"diff\",\n\t\trender: () => \"Use /diff to review this session's git changes and open them in a diff view.\",\n\t},\n\t{\n\t\tid: \"todo-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"todo\",\n\t\trender: () => \"Use /todo to show or edit the todo list without leaving the session.\",\n\t},\n\t{\n\t\tid: \"goal-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"goal\",\n\t\trender: () => \"Use /goal to set a persistent goal senpi keeps pursuing, then pause, resume, or clear it.\",\n\t},\n\t{\n\t\tid: \"btw-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"btw\",\n\t\trender: () => \"Use /btw to ask a side question in a parallel session without disturbing this one.\",\n\t},\n\t{\n\t\tid: \"lookat-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"lookat\",\n\t\trender: () => \"Use /lookat to manage the vision-model chain the look_at tool uses for images and screenshots.\",\n\t},\n\t{\n\t\tid: \"mcp-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"mcp\",\n\t\trender: () => \"Use /mcp to inspect and manage the MCP servers wired into this session.\",\n\t},\n\t{\n\t\tid: \"rules-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"rules\",\n\t\trender: () => \"Use /rules to see which rules are loaded, and /reload-rules to re-read them mid-session.\",\n\t},\n\t{\n\t\tid: \"hooks-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"hooks\",\n\t\trender: () => \"Use /hooks to list loaded hook sources and their diagnostics.\",\n\t},\n\t{\n\t\tid: \"websearch-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"websearch\",\n\t\trender: () => \"Use /websearch to check which web-search provider is currently active.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
1
+ {"version":3,"file":"workspace-tips.js","sourceRoot":"","sources":["../../../../../src/modes/interactive/tips/catalog/workspace-tips.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGhE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;QACC,EAAE,EAAE,cAAc;QAClB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,MAAM;QACvB,MAAM,EAAE,GAAG,EAAE,CAAC,mDAAmD;KACjE;IACD;QACC,EAAE,EAAE,qBAAqB;QACzB,QAAQ,EAAE,EAAE;QACZ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AAe;QACnB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CAAC,0FAA0F;KACxG;IACD;QACC,EAAE,EAAE,eAAe;QACnB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,OAAO;QACxB,MAAM,EAAE,GAAG,EAAE,CAAC,+DAA+D;KAC7E;IACD;QACC,EAAE,EAAE,mBAAmB;QACvB,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,WAAW;QAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,wEAAwE;KACtF;CACkC,CAAC","sourcesContent":["import { APP_NAME, agentDirLabel } from \"../../../../config.ts\";\nimport type { TipDefinition } from \"./types.ts\";\n\nexport const WORKSPACE_TIPS = [\n\t{\n\t\tid: \"help-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"help\",\n\t\trender: () => \"Use /help to see available commands and guidance.\",\n\t},\n\t{\n\t\tid: \"keybindings-command\",\n\t\tbindings: [],\n\t\trender: () => \"Use /keybindings to review and customize keyboard shortcuts.\",\n\t},\n\t{\n\t\tid: \"agents-md-context\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`${APP_NAME} loads AGENTS.md from your home directory, every parent folder, and the current folder as project instructions.`,\n\t},\n\t{\n\t\tid: \"skills-and-prompts\",\n\t\tbindings: [],\n\t\trender: () =>\n\t\t\t`Skills run as /skill:name, and prompt templates in ${agentDirLabel()}/prompts expand as /templatename.`,\n\t},\n\t{\n\t\tid: \"files-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"files\",\n\t\trender: () => \"Use /files to list every file this session read, wrote, or edited.\",\n\t},\n\t{\n\t\tid: \"diff-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"diff\",\n\t\trender: () => \"Use /diff to review this session's git changes and open them in a diff view.\",\n\t},\n\t{\n\t\tid: \"todo-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"todo\",\n\t\trender: () => \"Use /todo to show or edit the todo list without leaving the session.\",\n\t},\n\t{\n\t\tid: \"goal-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"goal\",\n\t\trender: () => `Use /goal to set a persistent goal ${APP_NAME} keeps pursuing, then pause, resume, or clear it.`,\n\t},\n\t{\n\t\tid: \"btw-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"btw\",\n\t\trender: () => \"Use /btw to ask a side question in a parallel session without disturbing this one.\",\n\t},\n\t{\n\t\tid: \"lookat-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"lookat\",\n\t\trender: () => \"Use /lookat to manage the vision-model chain the look_at tool uses for images and screenshots.\",\n\t},\n\t{\n\t\tid: \"mcp-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"mcp\",\n\t\trender: () => \"Use /mcp to inspect and manage the MCP servers wired into this session.\",\n\t},\n\t{\n\t\tid: \"rules-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"rules\",\n\t\trender: () => \"Use /rules to see which rules are loaded, and /reload-rules to re-read them mid-session.\",\n\t},\n\t{\n\t\tid: \"hooks-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"hooks\",\n\t\trender: () => \"Use /hooks to list loaded hook sources and their diagnostics.\",\n\t},\n\t{\n\t\tid: \"websearch-command\",\n\t\tbindings: [],\n\t\trequiresCommand: \"websearch\",\n\t\trender: () => \"Use /websearch to check which web-search provider is currently active.\",\n\t},\n] satisfies readonly TipDefinition[];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAa/E,YAAY,EACX,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,eAAe,GACf,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,CA+EjF"}
1
+ {"version":3,"file":"rpc-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAc/E,YAAY,EACX,UAAU,EACV,qBAAqB,EACrB,sBAAsB,EACtB,WAAW,EACX,eAAe,GACf,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,wBAAsB,UAAU,CAAC,WAAW,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,CA+EjF"}
@@ -65,6 +65,7 @@
65
65
  *
66
66
  * Full prose docs: `packages/coding-agent/docs/rpc.md` (Multi-session mode).
67
67
  */
68
+ import { envValue } from "../../core/brand.js";
68
69
  import { flushRawStdout, takeOverStdout, waitForRawStdoutBackpressure, writeRawStdout, } from "../../core/output-guard.js";
69
70
  import { killTrackedDetachedChildren } from "../../utils/shell.js";
70
71
  import { createRpcConnectionHandler } from "./connection-handler.js";
@@ -84,7 +85,7 @@ export async function runRpcMode(runtimeHost) {
84
85
  // SENPI_RPC_CLIENT_CAPABILITIES env var (comma-separated). A launcher can set
85
86
  // it from a client handshake; a plain stdio client that sets nothing gets
86
87
  // byte-identical default behavior.
87
- const capabilities = parseClientCapabilities(process.env.SENPI_RPC_CLIENT_CAPABILITIES);
88
+ const capabilities = parseClientCapabilities(envValue("RPC_CLIENT_CAPABILITIES"));
88
89
  const handler = createRpcConnectionHandler(runtimeHost, sink, { capabilities });
89
90
  let shuttingDown = false;
90
91
  const signalCleanupHandlers = [];
@@ -1 +1 @@
1
- {"version":3,"file":"rpc-mode.js","sourceRoot":"","sources":["../../../src/modes/rp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AAC;IACjB,CAAC,CAAC;IACF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEpC,WAAW,GAAG,CAAC,GAAG,EAAE;QACnB,MAAM,WAAW,GAAG,qBAAqB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YACjE,KAAK,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACX,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QACtC,CAAC,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IAEL,6BAA6B;IAC7B,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * RPC mode: Headless operation with JSON stdin/stdout protocol.\n *\n * Used for embedding the agent in other applications.\n * Receives commands as JSON on stdin, outputs events and responses as JSON on stdout.\n *\n * Protocol:\n * - Commands: JSON objects with `type` field, optional `id` for correlation\n * - Responses: JSON objects with `type: \"response\"`, `command`, `success`, and optional `data`/`error`\n * - Events: AgentSessionEvent objects streamed as they occur\n * - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response\n *\n * This is the single-connection stdio host. The RPC command loop, extension-UI\n * bridge, and event subscription live in `connection-handler.ts` so the same\n * logic can also serve a caller-owned RPC transport. This file owns exactly the\n * process-level concerns that a per-connection handler must NOT\n * touch: stdout takeover, stdin wiring, signal handlers, and process exit.\n *\n * ── Multi-session mode (`--multi-session`) ─────────────────────────────────\n *\n * Startup: `senpi --mode rpc --multi-session` → NO default session is constructed\n * (no default `AgentSessionRuntime`, no default extension/watcher load). Classic\n * `senpi --mode rpc` is byte-identical to today. Mode is fixed at process start;\n * there is no runtime transition.\n *\n * D1 normative table (multi-session mode):\n *\n * | Command | Params | Success data | Notes |\n * | ---------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------- | ----- |\n * | `get_protocol_info` | - | `{ protocolVersion: 1, capabilities: [\"multi_session\"], mode: \"classic\"|\"multi\" }` | Answered in BOTH modes; side-effect-free; THE capability probe. |\n * | `open_session` | `sessionPath?`, `cwd?`, `provider?`, `modelId?`, `thinkingLevel?`, `permissionPreset?` (all optional; paths MUST be absolute) | `{ sessionId, state: RpcSessionState }` | `sessionPath` = today's `--session` semantics (open-if-exists else create persisting there); `provider`/`modelId` applied only on create (resume restores the session's model); params form the immutable launch profile (D8). |\n * | `close_session` | `sessionId` | `{}` | Aborts active work, awaits agent idle + settled persistence, flushes queued events, detaches subscriptions; its response is the LAST record tagged with that handle — no events after (test-pinned). |\n * | `list_sessions` | - | `{ sessions: [{ sessionId, durableSessionId, sessionPath, cwd, name, status }] }` | Includes `opening`/`closing` entries with their status. |\n * | every existing command | + `sessionId` (REQUIRED in multi mode) | unchanged | Routed to that session. |\n *\n * Identities (D6): response-level `sessionId` = opaque routing handle, unique per\n * process epoch, ephemeral (dies with the child). `state.sessionId` = durable\n * JSONL session identity (what a resume cursor stores today). `list_sessions`\n * exposes both. Clients store both, discard routing handles on child exit, verify\n * only durable ids against cursors.\n *\n * Stable error codes (in the response `error` field, machine-matchable):\n * `unknown_session`, `session_closing`, `session_path_in_use`, `missing_session_id`\n * (session-scoped command without `sessionId` in multi mode), `multi_session_disabled`\n * (`open_session` in classic mode), `invalid_path` (relative `sessionPath`/`cwd`),\n * `open_failed: <detail>`.\n *\n * Tagging: every response/event/`extension_ui_request` belonging to a session\n * carries top-level `sessionId` (routing handle). `get_protocol_info`/\n * `list_sessions` responses are untagged. Classic mode: nothing tagged\n * (byte-identical).\n *\n * Ordering guarantee (D9): strict FIFO per session; one total stdout order;\n * cross-session order unspecified; fair round-robin between sessions' queued\n * complete records; NO cross-session batch coalescing (per-session event buffers;\n * the process-wide single-array coalescer in `event-output-buffer.ts` must not\n * merge records of different sessions into one write). Starvation freedom is NOT\n * promised (single pipe); a giant tool record delays others — bounded only by\n * record completion.\n *\n * Duplicate/idempotency: duplicate `open_session` while a path reservation is\n * held → `session_path_in_use`. `close_session` on unknown/already-closed →\n * `unknown_session` error. Request `id`s are client-owned; the server echoes them\n * without dedup.\n *\n * Full prose docs: `packages/coding-agent/docs/rpc.md` (Multi-session mode).\n */\n\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport {\n\tflushRawStdout,\n\ttakeOverStdout,\n\twaitForRawStdoutBackpressure,\n\twriteRawStdout,\n} from \"../../core/output-guard.ts\";\nimport { killTrackedDetachedChildren } from \"../../utils/shell.ts\";\nimport { createRpcConnectionHandler, type RpcConnectionSink } from \"./connection-handler.ts\";\nimport { parseClientCapabilities } from \"./custom-capability.ts\";\nimport { attachJsonlLineReader } from \"./jsonl.ts\";\n\n// Re-export types for consumers\nexport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n} from \"./rpc-types.ts\";\n\n/**\n * Run in RPC mode.\n * Listens for JSON commands on stdin, outputs events and responses on stdout.\n */\nexport async function runRpcMode(runtimeHost: AgentSessionRuntime): Promise<never> {\n\ttakeOverStdout();\n\n\tconst sink: RpcConnectionSink = {\n\t\twriteRaw: writeRawStdout,\n\t\twaitForBackpressure: waitForRawStdoutBackpressure,\n\t};\n\n\t// Client capability flags reach this single-connection stdio host via the\n\t// SENPI_RPC_CLIENT_CAPABILITIES env var (comma-separated). A launcher can set\n\t// it from a client handshake; a plain stdio client that sets nothing gets\n\t// byte-identical default behavior.\n\tconst capabilities = parseClientCapabilities(process.env.SENPI_RPC_CLIENT_CAPABILITIES);\n\tconst handler = createRpcConnectionHandler(runtimeHost, sink, { capabilities });\n\n\tlet shuttingDown = false;\n\tconst signalCleanupHandlers: Array<() => void> = [];\n\n\tconst registerSignalHandlers = (): void => {\n\t\tconst signals: NodeJS.Signals[] = [\"SIGTERM\"];\n\t\tif (process.platform !== \"win32\") {\n\t\t\tsignals.push(\"SIGHUP\");\n\t\t}\n\n\t\tfor (const signal of signals) {\n\t\t\tconst handler = () => {\n\t\t\t\tkillTrackedDetachedChildren();\n\t\t\t\tvoid shutdown(signal === \"SIGHUP\" ? 129 : 143, signal);\n\t\t\t};\n\t\t\tprocess.on(signal, handler);\n\t\t\tsignalCleanupHandlers.push(() => process.off(signal, handler));\n\t\t}\n\t};\n\n\tregisterSignalHandlers();\n\n\tlet detachInput = () => {};\n\n\tasync function shutdown(exitCode = 0, signal?: NodeJS.Signals): Promise<never> {\n\t\tif (shuttingDown) {\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tshuttingDown = true;\n\t\tfor (const cleanup of signalCleanupHandlers) {\n\t\t\tcleanup();\n\t\t}\n\t\tawait handler.dispose();\n\t\tdetachInput();\n\t\tprocess.stdin.pause();\n\t\tif (signal !== \"SIGTERM\") {\n\t\t\tawait flushRawStdout();\n\t\t}\n\t\tprocess.exit(exitCode);\n\t}\n\n\tconst handleInputLine = async (line: string): Promise<void> => {\n\t\tawait handler.handleInputLine(line);\n\t\tif (handler.isShutdownRequested()) {\n\t\t\tawait shutdown();\n\t\t}\n\t};\n\n\tconst onInputEnd = () => {\n\t\tvoid shutdown();\n\t};\n\tprocess.stdin.on(\"end\", onInputEnd);\n\n\tdetachInput = (() => {\n\t\tconst detachJsonl = attachJsonlLineReader(process.stdin, (line) => {\n\t\t\tvoid handleInputLine(line);\n\t\t});\n\t\treturn () => {\n\t\t\tdetachJsonl();\n\t\t\tprocess.stdin.off(\"end\", onInputEnd);\n\t\t};\n\t})();\n\n\t// Keep process alive forever\n\treturn new Promise(() => {});\n}\n"]}
1
+ {"version":3,"file":"rpc-mode.js","sourceRoot":"","sources":["../../../src/modes/rpc/rpc-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkEG;AAGH,OAAO,EAAE,QAAQ,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pC,WAAW,GAAG,CAAC,GAAG,EAAE;QACnB,MAAM,WAAW,GAAG,qBAAqB,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE;YACjE,KAAK,eAAe,CAAC,IAAI,CAAC,CAAC;QAC5B,CAAC,CAAC,CAAC;QACH,OAAO,GAAG,EAAE;YACX,WAAW,EAAE,CAAC;YACd,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QACtC,CAAC,CAAC;IACH,CAAC,CAAC,EAAE,CAAC;IAEL,6BAA6B;IAC7B,OAAO,IAAI,OAAO,CAAC,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;AAC9B,CAAC","sourcesContent":["/**\n * RPC mode: Headless operation with JSON stdin/stdout protocol.\n *\n * Used for embedding the agent in other applications.\n * Receives commands as JSON on stdin, outputs events and responses as JSON on stdout.\n *\n * Protocol:\n * - Commands: JSON objects with `type` field, optional `id` for correlation\n * - Responses: JSON objects with `type: \"response\"`, `command`, `success`, and optional `data`/`error`\n * - Events: AgentSessionEvent objects streamed as they occur\n * - Extension UI: Extension UI requests are emitted, client responds with extension_ui_response\n *\n * This is the single-connection stdio host. The RPC command loop, extension-UI\n * bridge, and event subscription live in `connection-handler.ts` so the same\n * logic can also serve a caller-owned RPC transport. This file owns exactly the\n * process-level concerns that a per-connection handler must NOT\n * touch: stdout takeover, stdin wiring, signal handlers, and process exit.\n *\n * ── Multi-session mode (`--multi-session`) ─────────────────────────────────\n *\n * Startup: `senpi --mode rpc --multi-session` → NO default session is constructed\n * (no default `AgentSessionRuntime`, no default extension/watcher load). Classic\n * `senpi --mode rpc` is byte-identical to today. Mode is fixed at process start;\n * there is no runtime transition.\n *\n * D1 normative table (multi-session mode):\n *\n * | Command | Params | Success data | Notes |\n * | ---------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------- | ----- |\n * | `get_protocol_info` | - | `{ protocolVersion: 1, capabilities: [\"multi_session\"], mode: \"classic\"|\"multi\" }` | Answered in BOTH modes; side-effect-free; THE capability probe. |\n * | `open_session` | `sessionPath?`, `cwd?`, `provider?`, `modelId?`, `thinkingLevel?`, `permissionPreset?` (all optional; paths MUST be absolute) | `{ sessionId, state: RpcSessionState }` | `sessionPath` = today's `--session` semantics (open-if-exists else create persisting there); `provider`/`modelId` applied only on create (resume restores the session's model); params form the immutable launch profile (D8). |\n * | `close_session` | `sessionId` | `{}` | Aborts active work, awaits agent idle + settled persistence, flushes queued events, detaches subscriptions; its response is the LAST record tagged with that handle — no events after (test-pinned). |\n * | `list_sessions` | - | `{ sessions: [{ sessionId, durableSessionId, sessionPath, cwd, name, status }] }` | Includes `opening`/`closing` entries with their status. |\n * | every existing command | + `sessionId` (REQUIRED in multi mode) | unchanged | Routed to that session. |\n *\n * Identities (D6): response-level `sessionId` = opaque routing handle, unique per\n * process epoch, ephemeral (dies with the child). `state.sessionId` = durable\n * JSONL session identity (what a resume cursor stores today). `list_sessions`\n * exposes both. Clients store both, discard routing handles on child exit, verify\n * only durable ids against cursors.\n *\n * Stable error codes (in the response `error` field, machine-matchable):\n * `unknown_session`, `session_closing`, `session_path_in_use`, `missing_session_id`\n * (session-scoped command without `sessionId` in multi mode), `multi_session_disabled`\n * (`open_session` in classic mode), `invalid_path` (relative `sessionPath`/`cwd`),\n * `open_failed: <detail>`.\n *\n * Tagging: every response/event/`extension_ui_request` belonging to a session\n * carries top-level `sessionId` (routing handle). `get_protocol_info`/\n * `list_sessions` responses are untagged. Classic mode: nothing tagged\n * (byte-identical).\n *\n * Ordering guarantee (D9): strict FIFO per session; one total stdout order;\n * cross-session order unspecified; fair round-robin between sessions' queued\n * complete records; NO cross-session batch coalescing (per-session event buffers;\n * the process-wide single-array coalescer in `event-output-buffer.ts` must not\n * merge records of different sessions into one write). Starvation freedom is NOT\n * promised (single pipe); a giant tool record delays others — bounded only by\n * record completion.\n *\n * Duplicate/idempotency: duplicate `open_session` while a path reservation is\n * held → `session_path_in_use`. `close_session` on unknown/already-closed →\n * `unknown_session` error. Request `id`s are client-owned; the server echoes them\n * without dedup.\n *\n * Full prose docs: `packages/coding-agent/docs/rpc.md` (Multi-session mode).\n */\n\nimport type { AgentSessionRuntime } from \"../../core/agent-session-runtime.ts\";\nimport { envValue } from \"../../core/brand.ts\";\nimport {\n\tflushRawStdout,\n\ttakeOverStdout,\n\twaitForRawStdoutBackpressure,\n\twriteRawStdout,\n} from \"../../core/output-guard.ts\";\nimport { killTrackedDetachedChildren } from \"../../utils/shell.ts\";\nimport { createRpcConnectionHandler, type RpcConnectionSink } from \"./connection-handler.ts\";\nimport { parseClientCapabilities } from \"./custom-capability.ts\";\nimport { attachJsonlLineReader } from \"./jsonl.ts\";\n\n// Re-export types for consumers\nexport type {\n\tRpcCommand,\n\tRpcExtensionUIRequest,\n\tRpcExtensionUIResponse,\n\tRpcResponse,\n\tRpcSessionState,\n} from \"./rpc-types.ts\";\n\n/**\n * Run in RPC mode.\n * Listens for JSON commands on stdin, outputs events and responses on stdout.\n */\nexport async function runRpcMode(runtimeHost: AgentSessionRuntime): Promise<never> {\n\ttakeOverStdout();\n\n\tconst sink: RpcConnectionSink = {\n\t\twriteRaw: writeRawStdout,\n\t\twaitForBackpressure: waitForRawStdoutBackpressure,\n\t};\n\n\t// Client capability flags reach this single-connection stdio host via the\n\t// SENPI_RPC_CLIENT_CAPABILITIES env var (comma-separated). A launcher can set\n\t// it from a client handshake; a plain stdio client that sets nothing gets\n\t// byte-identical default behavior.\n\tconst capabilities = parseClientCapabilities(envValue(\"RPC_CLIENT_CAPABILITIES\"));\n\tconst handler = createRpcConnectionHandler(runtimeHost, sink, { capabilities });\n\n\tlet shuttingDown = false;\n\tconst signalCleanupHandlers: Array<() => void> = [];\n\n\tconst registerSignalHandlers = (): void => {\n\t\tconst signals: NodeJS.Signals[] = [\"SIGTERM\"];\n\t\tif (process.platform !== \"win32\") {\n\t\t\tsignals.push(\"SIGHUP\");\n\t\t}\n\n\t\tfor (const signal of signals) {\n\t\t\tconst handler = () => {\n\t\t\t\tkillTrackedDetachedChildren();\n\t\t\t\tvoid shutdown(signal === \"SIGHUP\" ? 129 : 143, signal);\n\t\t\t};\n\t\t\tprocess.on(signal, handler);\n\t\t\tsignalCleanupHandlers.push(() => process.off(signal, handler));\n\t\t}\n\t};\n\n\tregisterSignalHandlers();\n\n\tlet detachInput = () => {};\n\n\tasync function shutdown(exitCode = 0, signal?: NodeJS.Signals): Promise<never> {\n\t\tif (shuttingDown) {\n\t\t\tprocess.exit(exitCode);\n\t\t}\n\t\tshuttingDown = true;\n\t\tfor (const cleanup of signalCleanupHandlers) {\n\t\t\tcleanup();\n\t\t}\n\t\tawait handler.dispose();\n\t\tdetachInput();\n\t\tprocess.stdin.pause();\n\t\tif (signal !== \"SIGTERM\") {\n\t\t\tawait flushRawStdout();\n\t\t}\n\t\tprocess.exit(exitCode);\n\t}\n\n\tconst handleInputLine = async (line: string): Promise<void> => {\n\t\tawait handler.handleInputLine(line);\n\t\tif (handler.isShutdownRequested()) {\n\t\t\tawait shutdown();\n\t\t}\n\t};\n\n\tconst onInputEnd = () => {\n\t\tvoid shutdown();\n\t};\n\tprocess.stdin.on(\"end\", onInputEnd);\n\n\tdetachInput = (() => {\n\t\tconst detachJsonl = attachJsonlLineReader(process.stdin, (line) => {\n\t\t\tvoid handleInputLine(line);\n\t\t});\n\t\treturn () => {\n\t\t\tdetachJsonl();\n\t\t\tprocess.stdin.off(\"end\", onInputEnd);\n\t\t};\n\t})();\n\n\t// Keep process alive forever\n\treturn new Promise(() => {});\n}\n"]}
@@ -2,6 +2,11 @@ export declare const MAX_PARENT_CONFIG_SEARCH_DEPTH = 100;
2
2
  /**
3
3
  * Finds the nearest non-symlinked config directory between cwd and home.
4
4
  * Home is excluded so its config remains the global fallback layer.
5
+ *
6
+ * A flat-layout product has no marker subdirectory to look for, so it passes
7
+ * `requiredChildFile` instead: the directory only counts as a config directory when it
8
+ * actually holds that file. Without it, any same-named directory used for something else
9
+ * would be mistaken for agent config.
5
10
  */
6
- export declare function findNearestParentConfigDir(cwd: string, homeDir: string, configDirName: string, requiredChildDir?: string): string | undefined;
11
+ export declare function findNearestParentConfigDir(cwd: string, homeDir: string, configDirName: string, requiredChildDir?: string, requiredChildFile?: string): string | undefined;
7
12
  //# sourceMappingURL=nearest-parent-config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"nearest-parent-config.d.ts","sourceRoot":"","sources":["../src/nearest-parent-config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAUlD;;;GAGG;AACH,wBAAgB,0BAA0B,CACzC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,gBAAgB,CAAC,EAAE,MAAM,GACvB,MAAM,GAAG,SAAS,CAsBpB"}
1
+ {"version":3,"file":"nearest-parent-config.d.ts","sourceRoot":"","sources":["../src/nearest-parent-config.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAkBlD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACzC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,gBAAgB,CAAC,EAAE,MAAM,EACzB,iBAAiB,CAAC,EAAE,MAAM,GACxB,MAAM,GAAG,SAAS,CAyBpB"}
@@ -9,11 +9,24 @@ function isDirectory(path) {
9
9
  return false;
10
10
  }
11
11
  }
12
+ function isFile(path) {
13
+ try {
14
+ return lstatSync(path).isFile();
15
+ }
16
+ catch {
17
+ return false;
18
+ }
19
+ }
12
20
  /**
13
21
  * Finds the nearest non-symlinked config directory between cwd and home.
14
22
  * Home is excluded so its config remains the global fallback layer.
23
+ *
24
+ * A flat-layout product has no marker subdirectory to look for, so it passes
25
+ * `requiredChildFile` instead: the directory only counts as a config directory when it
26
+ * actually holds that file. Without it, any same-named directory used for something else
27
+ * would be mistaken for agent config.
15
28
  */
16
- export function findNearestParentConfigDir(cwd, homeDir, configDirName, requiredChildDir) {
29
+ export function findNearestParentConfigDir(cwd, homeDir, configDirName, requiredChildDir, requiredChildFile) {
17
30
  const normalizedHomeDir = normalize(homeDir);
18
31
  let currentDir = normalize(cwd);
19
32
  for (let depth = 0; depth <= MAX_PARENT_CONFIG_SEARCH_DEPTH; depth += 1) {
@@ -21,7 +34,10 @@ export function findNearestParentConfigDir(cwd, homeDir, configDirName, required
21
34
  return undefined;
22
35
  }
23
36
  const configDir = join(currentDir, configDirName);
24
- if (isDirectory(configDir) && (!requiredChildDir || isDirectory(join(configDir, requiredChildDir)))) {
37
+ const hasRequiredChild = requiredChildFile
38
+ ? isFile(join(configDir, requiredChildFile))
39
+ : !requiredChildDir || isDirectory(join(configDir, requiredChildDir));
40
+ if (isDirectory(configDir) && hasRequiredChild) {
25
41
  return configDir;
26
42
  }
27
43
  const parentDir = dirname(currentDir);
@@ -1 +1 @@
1
- {"version":3,"file":"nearest-parent-config.js","sourceRoot":"","sources":["../src/nearest-parent-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,SAAS,WAAW,CAAC,IAAY;IAChC,IAAI,CAAC;QACJ,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CACzC,GAAW,EACX,OAAe,EACf,aAAqB,EACrB,gBAAyB;IAEzB,MAAM,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAEhC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,8BAA8B,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACzE,IAAI,UAAU,KAAK,iBAAiB,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAClD,IAAI,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,gBAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;YACrG,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,UAAU,GAAG,SAAS,CAAC;IACxB,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import { lstatSync } from \"node:fs\";\nimport { dirname, join, normalize } from \"node:path\";\n\nexport const MAX_PARENT_CONFIG_SEARCH_DEPTH = 100;\n\nfunction isDirectory(path: string): boolean {\n\ttry {\n\t\treturn lstatSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Finds the nearest non-symlinked config directory between cwd and home.\n * Home is excluded so its config remains the global fallback layer.\n */\nexport function findNearestParentConfigDir(\n\tcwd: string,\n\thomeDir: string,\n\tconfigDirName: string,\n\trequiredChildDir?: string,\n): string | undefined {\n\tconst normalizedHomeDir = normalize(homeDir);\n\tlet currentDir = normalize(cwd);\n\n\tfor (let depth = 0; depth <= MAX_PARENT_CONFIG_SEARCH_DEPTH; depth += 1) {\n\t\tif (currentDir === normalizedHomeDir) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst configDir = join(currentDir, configDirName);\n\t\tif (isDirectory(configDir) && (!requiredChildDir || isDirectory(join(configDir, requiredChildDir)))) {\n\t\t\treturn configDir;\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn undefined;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n\n\treturn undefined;\n}\n"]}
1
+ {"version":3,"file":"nearest-parent-config.js","sourceRoot":"","sources":["../src/nearest-parent-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAErD,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,SAAS,WAAW,CAAC,IAAY;IAChC,IAAI,CAAC;QACJ,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IACtC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED,SAAS,MAAM,CAAC,IAAY;IAC3B,IAAI,CAAC;QACJ,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;IACjC,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,KAAK,CAAC;IACd,CAAC;AACF,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,0BAA0B,CACzC,GAAW,EACX,OAAe,EACf,aAAqB,EACrB,gBAAyB,EACzB,iBAA0B;IAE1B,MAAM,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;IAC7C,IAAI,UAAU,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;IAEhC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI,8BAA8B,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;QACzE,IAAI,UAAU,KAAK,iBAAiB,EAAE,CAAC;YACtC,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;QAClD,MAAM,gBAAgB,GAAG,iBAAiB;YACzC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC,gBAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACvE,IAAI,WAAW,CAAC,SAAS,CAAC,IAAI,gBAAgB,EAAE,CAAC;YAChD,OAAO,SAAS,CAAC;QAClB,CAAC;QAED,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,SAAS,KAAK,UAAU,EAAE,CAAC;YAC9B,OAAO,SAAS,CAAC;QAClB,CAAC;QACD,UAAU,GAAG,SAAS,CAAC;IACxB,CAAC;IAED,OAAO,SAAS,CAAC;AAClB,CAAC","sourcesContent":["import { lstatSync } from \"node:fs\";\nimport { dirname, join, normalize } from \"node:path\";\n\nexport const MAX_PARENT_CONFIG_SEARCH_DEPTH = 100;\n\nfunction isDirectory(path: string): boolean {\n\ttry {\n\t\treturn lstatSync(path).isDirectory();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\nfunction isFile(path: string): boolean {\n\ttry {\n\t\treturn lstatSync(path).isFile();\n\t} catch {\n\t\treturn false;\n\t}\n}\n\n/**\n * Finds the nearest non-symlinked config directory between cwd and home.\n * Home is excluded so its config remains the global fallback layer.\n *\n * A flat-layout product has no marker subdirectory to look for, so it passes\n * `requiredChildFile` instead: the directory only counts as a config directory when it\n * actually holds that file. Without it, any same-named directory used for something else\n * would be mistaken for agent config.\n */\nexport function findNearestParentConfigDir(\n\tcwd: string,\n\thomeDir: string,\n\tconfigDirName: string,\n\trequiredChildDir?: string,\n\trequiredChildFile?: string,\n): string | undefined {\n\tconst normalizedHomeDir = normalize(homeDir);\n\tlet currentDir = normalize(cwd);\n\n\tfor (let depth = 0; depth <= MAX_PARENT_CONFIG_SEARCH_DEPTH; depth += 1) {\n\t\tif (currentDir === normalizedHomeDir) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst configDir = join(currentDir, configDirName);\n\t\tconst hasRequiredChild = requiredChildFile\n\t\t\t? isFile(join(configDir, requiredChildFile))\n\t\t\t: !requiredChildDir || isDirectory(join(configDir, requiredChildDir));\n\t\tif (isDirectory(configDir) && hasRequiredChild) {\n\t\t\treturn configDir;\n\t\t}\n\n\t\tconst parentDir = dirname(currentDir);\n\t\tif (parentDir === currentDir) {\n\t\t\treturn undefined;\n\t\t}\n\t\tcurrentDir = parentDir;\n\t}\n\n\treturn undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"package-manager-cli.d.ts","sourceRoot":"","sources":["../src/package-manager-cli.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAclE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAogBtE,MAAM,WAAW,4BAA4B;IAC5C,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAiED,wBAAsB,mBAAmB,CACxC,IAAI,EAAE,MAAM,EAAE,EACd,cAAc,GAAE,4BAAiC,GAC/C,OAAO,CAAC,OAAO,CAAC,CAoElB;AAED,wBAAsB,oBAAoB,CACzC,IAAI,EAAE,MAAM,EAAE,EACd,cAAc,GAAE,4BAAiC,GAC/C,OAAO,CAAC,OAAO,CAAC,CAoOlB"}
1
+ {"version":3,"file":"package-manager-cli.d.ts","sourceRoot":"","sources":["../src/package-manager-cli.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAclE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAghBtE,MAAM,WAAW,4BAA4B;IAC5C,kBAAkB,CAAC,EAAE,eAAe,EAAE,CAAC;CACvC;AAiED,wBAAsB,mBAAmB,CACxC,IAAI,EAAE,MAAM,EAAE,EACd,cAAc,GAAE,4BAAiC,GAC/C,OAAO,CAAC,OAAO,CAAC,CAoElB;AAED,wBAAsB,oBAAoB,CACzC,IAAI,EAAE,MAAM,EAAE,EACd,cAAc,GAAE,4BAAiC,GAC/C,OAAO,CAAC,OAAO,CAAC,CAoOlB"}
@@ -5,7 +5,8 @@ import chalk from "chalk";
5
5
  import { runOmoLocalUpdateBeta } from "./beta/omo-local-update.js";
6
6
  import { selectConfig } from "./cli/config-selector.js";
7
7
  import { createProjectTrustContext } from "./cli/project-trust.js";
8
- import { APP_NAME, CONFIG_DIR_NAME, detectInstallMethod, getAgentDir, getPackageDir, getSelfUpdateCommand, getSelfUpdateUnavailableInstruction, PACKAGE_NAME, VERSION, } from "./config.js";
8
+ import { APP_NAME, CONFIG_DIR_NAME, DISPLAY_VERSION, detectInstallMethod, getAgentDir, getPackageDir, getSelfUpdateCommand, getSelfUpdateUnavailableInstruction, PACKAGE_NAME, VERSION, } from "./config.js";
9
+ import { brandProfile } from "./core/brand.js";
9
10
  import { ModelRuntime } from "./core/model-runtime.js";
10
11
  import { DefaultPackageManager } from "./core/package-manager.js";
11
12
  import { resolveProjectTrusted } from "./core/project-trust.js";
@@ -423,6 +424,17 @@ function printSelfUpdateNote(note) {
423
424
  console.log();
424
425
  }
425
426
  async function getSelfUpdatePlan(force) {
427
+ const brandUpdate = brandProfile()?.update;
428
+ if (brandUpdate) {
429
+ console.log(chalk.yellow(`${APP_NAME} ships inside ${brandUpdate.packageName}. Update it with:`));
430
+ console.log(chalk.cyan(` ${brandUpdate.command}`));
431
+ return {
432
+ packageName: brandUpdate.packageName,
433
+ installSpec: brandUpdate.command,
434
+ version: DISPLAY_VERSION,
435
+ shouldRun: false,
436
+ };
437
+ }
426
438
  let latestRelease;
427
439
  try {
428
440
  latestRelease = await getLatestPiRelease(VERSION);