@oh-my-pi/pi-coding-agent 17.2.3 → 17.2.5

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 (375) hide show
  1. package/CHANGELOG.md +92 -0
  2. package/dist/{CHANGELOG-c5hpqt9r.md → CHANGELOG-q2w43aw3.md} +92 -0
  3. package/dist/cli.js +3979 -3548
  4. package/dist/{template-8vdv6xb4.js → template-c2hyaytt.js} +8 -26
  5. package/dist/types/advisor/advise-tool.d.ts +6 -0
  6. package/dist/types/advisor/runtime.d.ts +4 -4
  7. package/dist/types/capability/mcp.d.ts +9 -0
  8. package/dist/types/cli/args.d.ts +4 -1
  9. package/dist/types/cli/browser-relay-cli.d.ts +15 -0
  10. package/dist/types/cli/command-help.d.ts +99 -0
  11. package/dist/types/cli/help-extra.d.ts +2 -0
  12. package/dist/types/cli/models-cli.d.ts +1 -1
  13. package/dist/types/cli/thinking-levels.d.ts +5 -0
  14. package/dist/types/cli/update-cli.d.ts +13 -0
  15. package/dist/types/commands/browser-relay.d.ts +38 -0
  16. package/dist/types/commands/commit.d.ts +3 -0
  17. package/dist/types/commands/complete.d.ts +1 -1
  18. package/dist/types/commands/completions.d.ts +6 -0
  19. package/dist/types/commands/grep.d.ts +3 -0
  20. package/dist/types/commands/join.d.ts +4 -0
  21. package/dist/types/commands/launch-help.d.ts +171 -0
  22. package/dist/types/commands/launch.d.ts +5 -1
  23. package/dist/types/commands/models.d.ts +3 -0
  24. package/dist/types/commands/say.d.ts +10 -0
  25. package/dist/types/commands/worktree.d.ts +3 -0
  26. package/dist/types/config/keybindings.d.ts +6 -1
  27. package/dist/types/config/model-discovery.d.ts +2 -2
  28. package/dist/types/config/models-config-schema-bundle.d.ts +3 -0
  29. package/dist/types/config/models-config-schema.d.ts +2 -0
  30. package/dist/types/config/models-config.d.ts +1 -0
  31. package/dist/types/config/service-tier.d.ts +2 -0
  32. package/dist/types/config/settings-schema.d.ts +70 -22
  33. package/dist/types/cursor-bridge-tools.d.ts +1 -1
  34. package/dist/types/cursor.d.ts +7 -4
  35. package/dist/types/discovery/helpers.d.ts +6 -0
  36. package/dist/types/discovery/omp-extension-roots.d.ts +21 -2
  37. package/dist/types/edit/index.d.ts +3 -3
  38. package/dist/types/edit/modes/replace.d.ts +22 -15
  39. package/dist/types/edit/renderer.d.ts +1 -1
  40. package/dist/types/eval/py/kernel.d.ts +3 -1
  41. package/dist/types/eval/py/spawn-options.d.ts +12 -16
  42. package/dist/types/extensibility/extensions/loader.d.ts +6 -2
  43. package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +8 -1
  44. package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +1 -1
  45. package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +2 -0
  46. package/dist/types/extensibility/plugins/marketplace/registry.d.ts +2 -2
  47. package/dist/types/launch/broker.d.ts +1 -1
  48. package/dist/types/launch/client.d.ts +6 -3
  49. package/dist/types/launch/ensure.d.ts +8 -0
  50. package/dist/types/launch/paths.d.ts +3 -2
  51. package/dist/types/launch/protocol.d.ts +2 -2
  52. package/dist/types/lsp/client.d.ts +2 -0
  53. package/dist/types/lsp/mux/daemon.d.ts +15 -0
  54. package/dist/types/lsp/mux/protocol.d.ts +57 -0
  55. package/dist/types/lsp/mux/server.d.ts +18 -0
  56. package/dist/types/lsp/types.d.ts +22 -2
  57. package/dist/types/main.d.ts +2 -0
  58. package/dist/types/mcp/request-id.d.ts +19 -0
  59. package/dist/types/mcp/types.d.ts +14 -0
  60. package/dist/types/memory-backend/index.d.ts +1 -0
  61. package/dist/types/memory-backend/messages.d.ts +15 -0
  62. package/dist/types/mnemopi/embed-client.d.ts +1 -1
  63. package/dist/types/mnemopi/state.d.ts +0 -23
  64. package/dist/types/modes/components/assistant-message.d.ts +2 -0
  65. package/dist/types/modes/components/custom-editor.d.ts +2 -1
  66. package/dist/types/modes/components/model-browser.d.ts +7 -5
  67. package/dist/types/modes/components/model-picker.d.ts +9 -3
  68. package/dist/types/modes/components/read-tool-group.d.ts +11 -0
  69. package/dist/types/modes/components/stripped-tool-calls-placeholder.d.ts +12 -0
  70. package/dist/types/modes/components/tool-execution.d.ts +2 -0
  71. package/dist/types/modes/controllers/input-controller.d.ts +1 -0
  72. package/dist/types/modes/interactive-mode.d.ts +1 -0
  73. package/dist/types/modes/types.d.ts +2 -1
  74. package/dist/types/modes/workflow.d.ts +2 -1
  75. package/dist/types/registry/agent-lifecycle.d.ts +14 -5
  76. package/dist/types/registry/agent-registry.d.ts +4 -3
  77. package/dist/types/sdk.d.ts +4 -2
  78. package/dist/types/secrets/index.d.ts +7 -9
  79. package/dist/types/session/agent-session-types.d.ts +3 -1
  80. package/dist/types/session/agent-session.d.ts +6 -1
  81. package/dist/types/session/indexed-session-storage.d.ts +1 -0
  82. package/dist/types/session/model-controls.d.ts +0 -1
  83. package/dist/types/session/session-advisors.d.ts +8 -1
  84. package/dist/types/session/session-context.d.ts +2 -1
  85. package/dist/types/session/session-maintenance.d.ts +2 -0
  86. package/dist/types/session/session-manager.d.ts +16 -5
  87. package/dist/types/session/session-stats.d.ts +10 -0
  88. package/dist/types/session/session-storage.d.ts +15 -3
  89. package/dist/types/system-prompt.d.ts +6 -1
  90. package/dist/types/task/index.d.ts +2 -1
  91. package/dist/types/task/spawn-policy.d.ts +5 -0
  92. package/dist/types/thinking.d.ts +1 -7
  93. package/dist/types/tools/ast-grep.d.ts +1 -1
  94. package/dist/types/tools/browser/registry.d.ts +2 -1
  95. package/dist/types/tools/browser/relay/bridge.d.ts +35 -0
  96. package/dist/types/tools/browser/relay/daemon.d.ts +16 -0
  97. package/dist/types/tools/browser/relay/kind.d.ts +19 -0
  98. package/dist/types/tools/browser/relay/protocol.d.ts +97 -0
  99. package/dist/types/tools/browser/relay/server.d.ts +35 -0
  100. package/dist/types/tools/browser/render.d.ts +1 -0
  101. package/dist/types/tools/browser.d.ts +3 -0
  102. package/dist/types/tools/computer/exposure.d.ts +9 -7
  103. package/dist/types/tools/computer/protocol.d.ts +70 -17
  104. package/dist/types/tools/computer/supervisor.d.ts +23 -10
  105. package/dist/types/tools/computer/worker-entry.d.ts +1 -0
  106. package/dist/types/tools/computer/worker.d.ts +42 -7
  107. package/dist/types/tools/computer-renderer.d.ts +7 -5
  108. package/dist/types/tools/computer.d.ts +25 -44
  109. package/dist/types/tools/context.d.ts +3 -0
  110. package/dist/types/tools/default-renderer.d.ts +3 -0
  111. package/dist/types/tools/glob.d.ts +1 -1
  112. package/dist/types/tools/grep.d.ts +1 -1
  113. package/dist/types/tools/render-utils.d.ts +2 -0
  114. package/dist/types/tools/{browser/run-cancellation.d.ts → run-scope.d.ts} +8 -8
  115. package/dist/types/tools/tool-timeouts.d.ts +5 -0
  116. package/dist/types/tools/xdev.d.ts +8 -0
  117. package/dist/types/utils/clipboard.d.ts +2 -2
  118. package/dist/types/web/kagi.d.ts +1 -0
  119. package/dist/types/web/search/index.d.ts +1 -1
  120. package/dist/types/web/search/providers/anthropic.d.ts +1 -0
  121. package/dist/types/web/search/providers/base.d.ts +2 -0
  122. package/dist/types/web/search/providers/brave.d.ts +1 -0
  123. package/dist/types/web/search/providers/browser-page.d.ts +1 -0
  124. package/dist/types/web/search/providers/codex.d.ts +1 -0
  125. package/dist/types/web/search/providers/exa.d.ts +1 -0
  126. package/dist/types/web/search/providers/firecrawl.d.ts +1 -0
  127. package/dist/types/web/search/providers/gemini.d.ts +1 -0
  128. package/dist/types/web/search/providers/jina.d.ts +1 -0
  129. package/dist/types/web/search/providers/kagi.d.ts +1 -0
  130. package/dist/types/web/search/providers/kimi.d.ts +1 -0
  131. package/dist/types/web/search/providers/parallel.d.ts +1 -0
  132. package/dist/types/web/search/providers/perplexity.d.ts +1 -0
  133. package/dist/types/web/search/providers/searxng.d.ts +1 -0
  134. package/dist/types/web/search/providers/tavily.d.ts +1 -0
  135. package/dist/types/web/search/providers/tinyfish.d.ts +1 -0
  136. package/dist/types/web/search/providers/utils.d.ts +6 -9
  137. package/dist/types/web/search/providers/zai.d.ts +1 -0
  138. package/dist/types/web/search/types.d.ts +4 -0
  139. package/package.json +12 -12
  140. package/scripts/legacy-pi-virtual-module.ts +12 -2
  141. package/src/advisor/advise-tool.ts +18 -0
  142. package/src/advisor/runtime.ts +6 -6
  143. package/src/capability/mcp.ts +7 -0
  144. package/src/cli/args.ts +7 -87
  145. package/src/cli/browser-relay-cli.ts +119 -0
  146. package/src/cli/command-help.ts +103 -0
  147. package/src/cli/completion-gen.ts +5 -5
  148. package/src/cli/flag-tables.ts +9 -0
  149. package/src/cli/help-extra.ts +89 -0
  150. package/src/cli/models-cli.ts +13 -16
  151. package/src/cli/setup-cli.ts +13 -21
  152. package/src/cli/thinking-levels.ts +7 -0
  153. package/src/cli/update-cli.ts +26 -7
  154. package/src/cli-commands.ts +170 -33
  155. package/src/cli.ts +17 -5
  156. package/src/collab/host.ts +1 -1
  157. package/src/commands/acp.ts +3 -1
  158. package/src/commands/agents.ts +3 -2
  159. package/src/commands/auth-broker.ts +3 -2
  160. package/src/commands/auth-gateway.ts +3 -2
  161. package/src/commands/bench.ts +2 -3
  162. package/src/commands/browser-relay.ts +53 -0
  163. package/src/commands/cleanse.ts +2 -2
  164. package/src/commands/commit.ts +3 -2
  165. package/src/commands/complete.ts +2 -1
  166. package/src/commands/completions.ts +3 -2
  167. package/src/commands/config.ts +3 -2
  168. package/src/commands/dry-balance.ts +2 -2
  169. package/src/commands/gallery.ts +3 -2
  170. package/src/commands/gc.ts +3 -2
  171. package/src/commands/grep.ts +3 -2
  172. package/src/commands/grievances.ts +3 -2
  173. package/src/commands/install.ts +2 -2
  174. package/src/commands/join.ts +3 -2
  175. package/src/commands/launch-help.ts +116 -0
  176. package/src/commands/launch.ts +7 -191
  177. package/src/commands/models.ts +3 -2
  178. package/src/commands/plugin.ts +3 -2
  179. package/src/commands/read.ts +3 -2
  180. package/src/commands/say.ts +3 -2
  181. package/src/commands/setup.ts +3 -2
  182. package/src/commands/shell.ts +3 -2
  183. package/src/commands/ssh.ts +3 -2
  184. package/src/commands/stats.ts +3 -2
  185. package/src/commands/tiny-models.ts +2 -2
  186. package/src/commands/token.ts +2 -2
  187. package/src/commands/ttsr.ts +2 -2
  188. package/src/commands/update.ts +3 -2
  189. package/src/commands/usage.ts +3 -2
  190. package/src/commands/web-search.ts +3 -2
  191. package/src/commands/worktree.ts +3 -2
  192. package/src/config/keybindings.ts +19 -9
  193. package/src/config/mcp-schema.json +5 -0
  194. package/src/config/model-discovery.ts +30 -13
  195. package/src/config/model-registry.ts +16 -6
  196. package/src/config/models-config-schema-bundle.ts +9 -0
  197. package/src/config/resolve-config-value.ts +2 -1
  198. package/src/config/service-tier.ts +5 -0
  199. package/src/config/settings-schema.ts +73 -21
  200. package/src/cursor-bridge-tools.ts +1 -1
  201. package/src/cursor.ts +10 -14
  202. package/src/discovery/builtin.ts +10 -0
  203. package/src/discovery/helpers.ts +10 -0
  204. package/src/discovery/mcp-json.ts +11 -1
  205. package/src/discovery/omp-extension-roots.ts +79 -20
  206. package/src/discovery/omp-plugins.ts +10 -1
  207. package/src/edit/diff.ts +17 -8
  208. package/src/edit/index.ts +20 -7
  209. package/src/edit/modes/replace.ts +93 -40
  210. package/src/edit/renderer.ts +1 -1
  211. package/src/edit/streaming.ts +14 -17
  212. package/src/eval/py/kernel.ts +2 -1
  213. package/src/eval/py/spawn-options.ts +24 -29
  214. package/src/export/html/template.js +8 -26
  215. package/src/extensibility/extensions/loader.ts +66 -28
  216. package/src/extensibility/extensions/wrapper.ts +1 -0
  217. package/src/extensibility/legacy-pi-ai-shim.ts +22 -1
  218. package/src/extensibility/legacy-pi-coding-agent-shim.ts +7 -6
  219. package/src/extensibility/plugins/legacy-pi-compat.ts +124 -57
  220. package/src/extensibility/plugins/marketplace/registry.ts +4 -8
  221. package/src/extensibility/skills.ts +11 -0
  222. package/src/extensibility/utils.ts +10 -2
  223. package/src/launch/broker.ts +1 -1
  224. package/src/launch/client.ts +32 -13
  225. package/src/launch/ensure.ts +73 -0
  226. package/src/launch/paths.ts +3 -6
  227. package/src/launch/protocol.ts +2 -2
  228. package/src/lsp/client.ts +23 -2
  229. package/src/lsp/index.ts +8 -0
  230. package/src/lsp/mux/daemon.ts +348 -0
  231. package/src/lsp/mux/protocol.ts +96 -0
  232. package/src/lsp/mux/server.ts +797 -0
  233. package/src/lsp/types.ts +28 -2
  234. package/src/main.ts +31 -24
  235. package/src/mcp/config.ts +1 -0
  236. package/src/mcp/oauth-flow.ts +11 -1
  237. package/src/mcp/request-id.ts +24 -0
  238. package/src/mcp/transports/http.ts +4 -2
  239. package/src/mcp/transports/sse.ts +4 -2
  240. package/src/mcp/transports/stdio.ts +4 -2
  241. package/src/mcp/types.ts +15 -0
  242. package/src/memory-backend/index.ts +1 -0
  243. package/src/memory-backend/messages.ts +19 -0
  244. package/src/mnemopi/embed-client.ts +49 -2
  245. package/src/mnemopi/state.ts +57 -23
  246. package/src/modes/components/agent-hub.ts +1 -1
  247. package/src/modes/components/assistant-message.ts +11 -0
  248. package/src/modes/components/chat-transcript-builder.ts +4 -0
  249. package/src/modes/components/custom-editor.ts +10 -1
  250. package/src/modes/components/model-browser.ts +25 -17
  251. package/src/modes/components/model-picker.ts +10 -6
  252. package/src/modes/components/read-tool-group.ts +36 -0
  253. package/src/modes/components/status-line/component.ts +1 -1
  254. package/src/modes/components/stripped-tool-calls-placeholder.ts +35 -0
  255. package/src/modes/components/tool-execution.ts +85 -20
  256. package/src/modes/components/tree-selector.ts +46 -48
  257. package/src/modes/controllers/command-controller.ts +2 -2
  258. package/src/modes/controllers/event-controller.ts +199 -10
  259. package/src/modes/controllers/input-controller.ts +39 -1
  260. package/src/modes/controllers/mcp-command-controller.ts +11 -5
  261. package/src/modes/controllers/selector-controller.ts +47 -6
  262. package/src/modes/interactive-mode.ts +2 -0
  263. package/src/modes/types.ts +6 -1
  264. package/src/modes/utils/hotkeys-markdown.ts +1 -0
  265. package/src/modes/utils/interactive-context-helpers.ts +1 -0
  266. package/src/modes/utils/ui-helpers.ts +6 -10
  267. package/src/modes/workflow.ts +8 -2
  268. package/src/prompts/agents/init.md +1 -1
  269. package/src/prompts/system/plan-mode-active.md +2 -2
  270. package/src/prompts/system/system-prompt.md +26 -52
  271. package/src/prompts/system/workflow-notice.md +3 -3
  272. package/src/prompts/tools/ast-grep.md +1 -1
  273. package/src/prompts/tools/bash.md +1 -1
  274. package/src/prompts/tools/browser.md +1 -0
  275. package/src/prompts/tools/computer.md +21 -21
  276. package/src/prompts/tools/glob.md +1 -1
  277. package/src/prompts/tools/grep.md +1 -1
  278. package/src/prompts/tools/replace.md +5 -4
  279. package/src/prompts/tools/task.md +4 -4
  280. package/src/registry/agent-lifecycle.ts +36 -11
  281. package/src/registry/agent-registry.ts +12 -5
  282. package/src/sdk.ts +102 -35
  283. package/src/secrets/index.ts +16 -18
  284. package/src/session/agent-session-types.ts +3 -1
  285. package/src/session/agent-session.ts +23 -2
  286. package/src/session/agent-storage.ts +6 -4
  287. package/src/session/history-storage.ts +4 -2
  288. package/src/session/indexed-session-storage.ts +9 -0
  289. package/src/session/messages.ts +31 -7
  290. package/src/session/model-controls.ts +0 -1
  291. package/src/session/prewalk.ts +24 -2
  292. package/src/session/session-advisors.ts +21 -3
  293. package/src/session/session-context.ts +16 -12
  294. package/src/session/session-dump-format.ts +1 -1
  295. package/src/session/session-maintenance.ts +41 -4
  296. package/src/session/session-manager.ts +181 -94
  297. package/src/session/session-paths.ts +118 -55
  298. package/src/session/session-stats.ts +48 -3
  299. package/src/session/session-storage.ts +30 -22
  300. package/src/session/session-tools.ts +25 -23
  301. package/src/session/stream-guards.ts +1 -1
  302. package/src/slash-commands/builtin-registry.ts +29 -26
  303. package/src/system-prompt.ts +14 -4
  304. package/src/task/executor.ts +8 -1
  305. package/src/task/index.ts +23 -8
  306. package/src/task/spawn-policy.ts +14 -0
  307. package/src/thinking.ts +2 -8
  308. package/src/tiny/text.ts +12 -0
  309. package/src/tools/ast-grep.ts +10 -4
  310. package/src/tools/browser/cmux/cmux-tab.ts +5 -10
  311. package/src/tools/browser/cmux/rpc.ts +2 -8
  312. package/src/tools/browser/registry.ts +53 -2
  313. package/src/tools/browser/relay/bridge.ts +945 -0
  314. package/src/tools/browser/relay/daemon.ts +117 -0
  315. package/src/tools/browser/relay/extension-assets/background.js.txt +242 -0
  316. package/src/tools/browser/relay/extension-assets/manifest.json.txt +14 -0
  317. package/src/tools/browser/relay/extension-assets/options.html.txt +53 -0
  318. package/src/tools/browser/relay/extension-assets/options.js.txt +23 -0
  319. package/src/tools/browser/relay/kind.ts +41 -0
  320. package/src/tools/browser/relay/protocol.ts +54 -0
  321. package/src/tools/browser/relay/server.ts +141 -0
  322. package/src/tools/browser/render.ts +4 -1
  323. package/src/tools/browser/shared-daemon.ts +7 -58
  324. package/src/tools/browser/tab-supervisor.ts +5 -4
  325. package/src/tools/browser/tab-worker.ts +33 -12
  326. package/src/tools/browser.ts +26 -1
  327. package/src/tools/computer/exposure.ts +11 -35
  328. package/src/tools/computer/protocol.ts +51 -10
  329. package/src/tools/computer/supervisor.ts +227 -124
  330. package/src/tools/computer/worker-entry.ts +11 -6
  331. package/src/tools/computer/worker.ts +695 -81
  332. package/src/tools/computer-renderer.ts +104 -65
  333. package/src/tools/computer.ts +134 -428
  334. package/src/tools/context.ts +3 -0
  335. package/src/tools/default-renderer.ts +19 -4
  336. package/src/tools/glob.ts +9 -2
  337. package/src/tools/grep.ts +12 -6
  338. package/src/tools/index.ts +10 -6
  339. package/src/tools/inspect-image.ts +32 -6
  340. package/src/tools/render-utils.ts +2 -0
  341. package/src/tools/{browser/run-cancellation.ts → run-scope.ts} +11 -11
  342. package/src/tools/tool-timeouts.ts +1 -0
  343. package/src/tools/xdev.ts +29 -2
  344. package/src/utils/clipboard.ts +40 -14
  345. package/src/utils/command-args.ts +26 -28
  346. package/src/utils/tool-choice.ts +0 -13
  347. package/src/web/kagi.ts +2 -1
  348. package/src/web/search/index.ts +18 -2
  349. package/src/web/search/providers/anthropic.ts +7 -2
  350. package/src/web/search/providers/base.ts +2 -0
  351. package/src/web/search/providers/brave.ts +3 -1
  352. package/src/web/search/providers/browser-page.ts +6 -4
  353. package/src/web/search/providers/codex.ts +4 -1
  354. package/src/web/search/providers/duckduckgo.ts +2 -1
  355. package/src/web/search/providers/ecosia.ts +2 -1
  356. package/src/web/search/providers/exa.ts +4 -2
  357. package/src/web/search/providers/firecrawl.ts +3 -1
  358. package/src/web/search/providers/gemini.ts +8 -2
  359. package/src/web/search/providers/google.ts +2 -1
  360. package/src/web/search/providers/jina.ts +12 -2
  361. package/src/web/search/providers/kagi.ts +3 -0
  362. package/src/web/search/providers/kimi.ts +5 -1
  363. package/src/web/search/providers/mojeek.ts +2 -1
  364. package/src/web/search/providers/parallel.ts +5 -1
  365. package/src/web/search/providers/perplexity.ts +6 -3
  366. package/src/web/search/providers/public.ts +1 -1
  367. package/src/web/search/providers/searxng.ts +11 -5
  368. package/src/web/search/providers/startpage.ts +10 -4
  369. package/src/web/search/providers/synthetic.ts +11 -5
  370. package/src/web/search/providers/tavily.ts +3 -1
  371. package/src/web/search/providers/tinyfish.ts +3 -1
  372. package/src/web/search/providers/utils.ts +12 -10
  373. package/src/web/search/providers/xai.ts +2 -2
  374. package/src/web/search/providers/zai.ts +18 -3
  375. package/src/web/search/types.ts +6 -0
@@ -22,7 +22,7 @@ export declare const DISCOVERY_DEFAULT_MAX_TOKENS = 32768;
22
22
  * empty (issue #7087). Anything that is not strictly loopback therefore gets
23
23
  * {@link REMOTE_DISCOVERY_TIMEOUT_MS}.
24
24
  */
25
- export declare function discoveryProbeTimeoutMs(baseUrl: string, loopbackMs: number): number;
25
+ export declare function discoveryProbeTimeoutMs(baseUrl: string, loopbackMs: number, customTimeoutMs?: number): number;
26
26
  export declare function getImplicitOllamaBaseUrl(): string;
27
27
  export declare function getOllamaContextLengthOverride(): number | undefined;
28
28
  /** Routes discovered-model `maxTokens` defaults around Anthropic's 3× output divisor. */
@@ -74,7 +74,7 @@ export declare function discoverOllamaModels(providerConfig: DiscoveryProviderCo
74
74
  */
75
75
  export declare function applyLlamaCppQwenThinking(model: Model<Api>): Model<Api>;
76
76
  export declare function discoverLlamaCppModels(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
77
- export declare function discoverLlamaCppModelRuntimeMetadata(model: Pick<Model<Api>, "provider" | "id" | "baseUrl" | "headers">, ctx: DiscoveryContext): Promise<LlamaCppDiscoveredModelRuntimeMetadata | undefined>;
77
+ export declare function discoverLlamaCppModelRuntimeMetadata(model: Pick<Model<Api>, "provider" | "id" | "baseUrl" | "headers">, ctx: DiscoveryContext, customTimeoutMs?: number): Promise<LlamaCppDiscoveredModelRuntimeMetadata | undefined>;
78
78
  export declare function discoverOpenAIModelsList(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
79
79
  export declare function discoverLiteLLMModels(providerConfig: DiscoveryProviderConfig, ctx: DiscoveryContext): Promise<Model<Api>[]>;
80
80
  /**
@@ -269,6 +269,7 @@ export declare const getModelsConfigSchemaBundle: () => {
269
269
  }, {}>;
270
270
  ProviderDiscoverySchema: import("arktype/internal/variants/object.ts").ObjectType<{
271
271
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
272
+ timeoutMs?: number | undefined;
272
273
  }, {}>;
273
274
  ProviderAuthSchema: import("arktype/internal/variants/string.ts").StringType<"apiKey" | "none" | "oauth", {}>;
274
275
  ModelsConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
@@ -402,6 +403,7 @@ export declare const getModelsConfigSchemaBundle: () => {
402
403
  auth?: "apiKey" | "none" | "oauth" | undefined;
403
404
  discovery?: {
404
405
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
406
+ timeoutMs?: number | undefined;
405
407
  } | undefined;
406
408
  models?: {
407
409
  id: string;
@@ -869,6 +871,7 @@ export declare const getModelsConfigSchema: () => import("arktype/internal/varia
869
871
  auth?: "apiKey" | "none" | "oauth" | undefined;
870
872
  discovery?: {
871
873
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
874
+ timeoutMs?: number | undefined;
872
875
  } | undefined;
873
876
  models?: {
874
877
  id: string;
@@ -266,6 +266,7 @@ export declare const OpenAICompatSchema: import("arktype/internal/variants/objec
266
266
  } | undefined;
267
267
  }, {}>, ProviderDiscoverySchema: import("arktype/internal/variants/object.ts").ObjectType<{
268
268
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
269
+ timeoutMs?: number | undefined;
269
270
  }, {}>, ProviderAuthSchema: import("arktype/internal/variants/string.ts").StringType<"apiKey" | "none" | "oauth", {}>, ModelsConfigSchema: import("arktype/internal/variants/object.ts").ObjectType<{
270
271
  providers?: {
271
272
  [x: string]: {
@@ -397,6 +398,7 @@ export declare const OpenAICompatSchema: import("arktype/internal/variants/objec
397
398
  auth?: "apiKey" | "none" | "oauth" | undefined;
398
399
  discovery?: {
399
400
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
401
+ timeoutMs?: number | undefined;
400
402
  } | undefined;
401
403
  models?: {
402
404
  id: string;
@@ -158,6 +158,7 @@ export declare const ModelsConfigFile: ConfigFile<{
158
158
  auth?: "apiKey" | "none" | "oauth" | undefined;
159
159
  discovery?: {
160
160
  type: "litellm" | "llama.cpp" | "lm-studio" | "ollama" | "openai-models-list" | "proxy";
161
+ timeoutMs?: number | undefined;
161
162
  } | undefined;
162
163
  models?: {
163
164
  id: string;
@@ -13,6 +13,8 @@ export declare const SERVICE_TIER_GOOGLE_VALUES: readonly ["none", "flex", "prio
13
13
  export type ServiceTierOpenAISettingValue = (typeof SERVICE_TIER_OPENAI_VALUES)[number];
14
14
  export type ServiceTierAnthropicSettingValue = (typeof SERVICE_TIER_ANTHROPIC_VALUES)[number];
15
15
  export type ServiceTierGoogleSettingValue = (typeof SERVICE_TIER_GOOGLE_VALUES)[number];
16
+ /** Whether a runtime value is a supported OpenAI service-tier setting. */
17
+ export declare function isServiceTierOpenAISettingValue(value: string): value is ServiceTierOpenAISettingValue;
16
18
  /** Whether a runtime value names a provider family with an independent service-tier knob. */
17
19
  export declare function isServiceTierFamily(value: unknown): value is ServiceTierFamily;
18
20
  /** Whether a runtime value is a supported service tier for one provider family. */
@@ -924,6 +924,16 @@ export declare const SETTINGS_SCHEMA: {
924
924
  readonly description: "Reveal assistant text and streamed tool input smoothly while chunks arrive";
925
925
  };
926
926
  };
927
+ readonly "display.hideToolActivity": {
928
+ readonly type: "boolean";
929
+ readonly default: false;
930
+ readonly ui: {
931
+ readonly tab: "appearance";
932
+ readonly group: "Display";
933
+ readonly label: "Hide Tool Activity";
934
+ readonly description: "Hide model-initiated tool calls and results from the transcript";
935
+ };
936
+ };
927
937
  readonly "display.showTokenUsage": {
928
938
  readonly type: "boolean";
929
939
  readonly default: false;
@@ -3499,6 +3509,16 @@ export declare const SETTINGS_SCHEMA: {
3499
3509
  readonly description: "Start language servers on first use (lsp tool or editing a matching file type) instead of at session startup";
3500
3510
  };
3501
3511
  };
3512
+ readonly "lsp.shared": {
3513
+ readonly type: "boolean";
3514
+ readonly default: true;
3515
+ readonly ui: {
3516
+ readonly tab: "files";
3517
+ readonly group: "LSP";
3518
+ readonly label: "Shared Language Servers";
3519
+ readonly description: "Share one language server per project across omp instances via the daemon broker (falls back to private servers when unavailable)";
3520
+ };
3521
+ };
3502
3522
  readonly "lsp.formatOnWrite": {
3503
3523
  readonly type: "boolean";
3504
3524
  readonly default: false;
@@ -3994,25 +4014,7 @@ export declare const SETTINGS_SCHEMA: {
3994
4014
  readonly tab: "tools";
3995
4015
  readonly group: "Available Tools";
3996
4016
  readonly label: "Computer";
3997
- readonly description: "Enable native host-desktop screenshots and input for OpenAI computer use";
3998
- };
3999
- };
4000
- readonly "computer.backend": {
4001
- readonly type: "enum";
4002
- readonly values: readonly ["auto", "native"];
4003
- readonly default: "auto";
4004
- readonly ui: {
4005
- readonly tab: "tools";
4006
- readonly group: "Computer";
4007
- readonly label: "Computer Backend";
4008
- readonly description: "Select automatic or explicit platform-native desktop capture and input";
4009
- readonly options: readonly [{
4010
- readonly value: "auto";
4011
- readonly label: "Auto";
4012
- }, {
4013
- readonly value: "native";
4014
- readonly label: "Native";
4015
- }];
4017
+ readonly description: "Enable the scriptable host-desktop control tool (screenshots, input, accessibility)";
4016
4018
  };
4017
4019
  };
4018
4020
  readonly "computer.display": {
@@ -4027,7 +4029,7 @@ export declare const SETTINGS_SCHEMA: {
4027
4029
  };
4028
4030
  readonly "computer.maxWidth": {
4029
4031
  readonly type: "number";
4030
- readonly default: 1920;
4032
+ readonly default: 3840;
4031
4033
  readonly ui: {
4032
4034
  readonly tab: "tools";
4033
4035
  readonly group: "Computer";
@@ -4037,7 +4039,7 @@ export declare const SETTINGS_SCHEMA: {
4037
4039
  };
4038
4040
  readonly "computer.maxHeight": {
4039
4041
  readonly type: "number";
4040
- readonly default: 1200;
4042
+ readonly default: 2400;
4041
4043
  readonly ui: {
4042
4044
  readonly tab: "tools";
4043
4045
  readonly group: "Computer";
@@ -4191,6 +4193,26 @@ export declare const SETTINGS_SCHEMA: {
4191
4193
  readonly description: "Default HTTP CDP discovery endpoint (for example http://127.0.0.1:9222) to attach to instead of launching a browser. Explicit app.cdp_url or app.path on the tool call take precedence.";
4192
4194
  };
4193
4195
  };
4196
+ readonly "browser.relay": {
4197
+ readonly type: "boolean";
4198
+ readonly default: false;
4199
+ readonly ui: {
4200
+ readonly tab: "tools";
4201
+ readonly group: "Grep & Browser";
4202
+ readonly label: "Browser Relay";
4203
+ readonly description: "Drive your own Chrome tabs through the omp browser relay. Install the extension once (`omp browser-relay install`); the relay server auto-starts when the browser tool needs it. Takes precedence over Browser CDP URL; set PI_BROWSER_RELAY=0 or PI_BROWSER_RELAY=1 to override.";
4204
+ };
4205
+ };
4206
+ readonly "browser.relayUrl": {
4207
+ readonly type: "string";
4208
+ readonly default: undefined;
4209
+ readonly ui: {
4210
+ readonly tab: "tools";
4211
+ readonly group: "Grep & Browser";
4212
+ readonly label: "Browser Relay URL";
4213
+ readonly description: "omp browser relay endpoint (default http://127.0.0.1:9224).";
4214
+ };
4215
+ };
4194
4216
  readonly "browser.headless": {
4195
4217
  readonly type: "boolean";
4196
4218
  readonly default: true;
@@ -4352,7 +4374,7 @@ export declare const SETTINGS_SCHEMA: {
4352
4374
  readonly tab: "tools";
4353
4375
  readonly group: "Discovery & MCP";
4354
4376
  readonly label: "xd:// Tools";
4355
- readonly description: "Mount rarely-used (discoverable) tools under xd:// device URLs driven via read/write instead of shipping their schemas on every request. Disable to expose every enabled tool top-level.";
4377
+ readonly description: "Mount rarely-used (discoverable) tools under xd:// device URLs driven via read/write instead of shipping their schemas on every request. Sessions without a granted write tool skip mounting and expose every tool top-level. Disable to expose every enabled tool top-level.";
4356
4378
  };
4357
4379
  };
4358
4380
  readonly "tools.xdevDocs": {
@@ -5186,6 +5208,32 @@ export declare const SETTINGS_SCHEMA: {
5186
5208
  })[];
5187
5209
  };
5188
5210
  };
5211
+ readonly "providers.webSearchTimeoutSeconds": {
5212
+ readonly type: "number";
5213
+ readonly default: 60;
5214
+ readonly ui: {
5215
+ readonly tab: "providers";
5216
+ readonly group: "Services";
5217
+ readonly label: "Web Search Timeout";
5218
+ readonly description: "Hard timeout for each provider's search transport before web_search advances to the next fallback, in seconds (maximum 300)";
5219
+ readonly options: readonly [{
5220
+ readonly value: "30";
5221
+ readonly label: "30 seconds";
5222
+ }, {
5223
+ readonly value: "60";
5224
+ readonly label: "1 minute";
5225
+ }, {
5226
+ readonly value: "120";
5227
+ readonly label: "2 minutes";
5228
+ }, {
5229
+ readonly value: "180";
5230
+ readonly label: "3 minutes";
5231
+ }, {
5232
+ readonly value: "300";
5233
+ readonly label: "5 minutes";
5234
+ }];
5235
+ };
5236
+ };
5189
5237
  readonly "providers.webSearchGeminiModel": {
5190
5238
  readonly type: "string";
5191
5239
  readonly default: undefined;
@@ -25,7 +25,7 @@ export declare function createBridgeGrepFactory(session: ToolSession, extensionR
25
25
  /**
26
26
  * Build the `replace`-mode `edit` the bridge answers `pi_edit` with.
27
27
  *
28
- * `PiEditExecArgs` carries `old_text`/`new_text` pairs, which is exactly
28
+ * `PiEditExecArgs` carries `old_string`/`new_string` replacements, which is exactly
29
29
  * `replace`'s schema and nothing else's. The session's own instance follows the
30
30
  * configured `edit.mode` — `hashline` by default, whose schema is a single
31
31
  * `input` string — so a frame handed that instance fails validation instead of
@@ -38,7 +38,7 @@ interface CursorExecBridgeOptions {
38
38
  *
39
39
  * `PiEditExecArgs` is that mode's schema verbatim, and the session's own
40
40
  * `edit` may be in any mode — `hashline` by default — whose schema rejects
41
- * `old_text`/`new_text` outright. {@link tools} therefore cannot be trusted
41
+ * `old_string`/`new_string` outright. {@link tools} therefore cannot be trusted
42
42
  * for this one frame: a session that starts on another provider keeps its
43
43
  * configured instance in the map (only Cursor sessions move `edit` out), and
44
44
  * switching to Cursor later does not rebuild the roster.
@@ -150,9 +150,12 @@ export declare class CursorExecHandlers implements ICursorExecHandlers {
150
150
  piRead(call: Parameters<NonNullable<ICursorExecHandlers["piRead"]>>[0]): Promise<ToolResultMessage<unknown>>;
151
151
  piBash(call: Parameters<NonNullable<ICursorExecHandlers["piBash"]>>[0]): Promise<ToolResultMessage<unknown>>;
152
152
  /**
153
- * `PiEditExecArgs` is the local `edit` tool's replace mode verbatim: a path
154
- * plus `old_text`/`new_text` pairs. The tool's schema is snake_case, so the
155
- * proto's camelCase accessors are mapped back on the way in.
153
+ * `PiEditExecArgs` carries a path plus `oldText`/`newText` replacement
154
+ * pairs. A single replacement maps onto the model-facing single-edit
155
+ * `replace` schema verbatim; a multi-replacement frame still runs as ONE
156
+ * tool lifecycle (one start/end event pair, one aggregate diff), so it is
157
+ * sent in the tool's internal `edits` batch form (`ReplaceBatchParams`),
158
+ * which only this bridge produces.
156
159
  *
157
160
  * The replace-mode instance is requested explicitly rather than resolved
158
161
  * from {@link CursorExecBridgeOptions.tools}: the registry's `edit` is in
@@ -2,6 +2,7 @@ import type { ExtensionModule } from "../capability/extension-module.js";
2
2
  import { type Rule } from "../capability/rule.js";
3
3
  import type { Skill } from "../capability/skill.js";
4
4
  import type { LoadContext, LoadResult, SourceMeta } from "../capability/types.js";
5
+ import type { MCPRequestIdFormat } from "../mcp/types.js";
5
6
  import { type ConfiguredThinkingLevel } from "../thinking.js";
6
7
  /**
7
8
  * Standard paths for each config source.
@@ -79,6 +80,11 @@ export declare function resolveCopilotHome(home: string): string;
79
80
  */
80
81
  export declare function createSourceMeta(provider: string, filePath: string, level: "user" | "project"): SourceMeta;
81
82
  export declare function parseBoolean(value: unknown): boolean | undefined;
83
+ /**
84
+ * Parse an MCP `requestIdFormat` value. Unrecognized values are dropped so a typo
85
+ * degrades to the default integer ids rather than reaching a transport.
86
+ */
87
+ export declare function parseRequestIdFormat(value: unknown): MCPRequestIdFormat | undefined;
82
88
  /**
83
89
  * Parse a comma-separated string into an array of trimmed, non-empty strings.
84
90
  */
@@ -8,6 +8,24 @@ export interface OmpExtensionRoot {
8
8
  /** Scope from which the path was sourced. */
9
9
  level: "user" | "project";
10
10
  }
11
+ export type OmpExtensionRootMode = "merge" | "explicit-only";
12
+ export interface InjectOmpExtensionCliRootOptions {
13
+ /**
14
+ * `explicit-only` exposes only roots named by this CLI invocation. Use it
15
+ * with `--no-extensions` so configured and installed packages cannot
16
+ * contribute sibling capabilities through the `omp-plugins` provider.
17
+ */
18
+ mode?: OmpExtensionRootMode;
19
+ /** Replace roots from an earlier invocation instead of extending them. */
20
+ replace?: boolean;
21
+ }
22
+ /**
23
+ * Run one SDK invocation with its own extension-package roots. Async resources
24
+ * started inside `callback` retain this scope, including discovery deliberately
25
+ * deferred until the end of session startup. Raw relative paths are resolved by
26
+ * {@link listOmpExtensionRoots} against that invocation's active cwd.
27
+ */
28
+ export declare function withOmpExtensionRootScope<T>(paths: readonly string[], mode: OmpExtensionRootMode, callback: () => T): T;
11
29
  /**
12
30
  * Register CLI-provided extension package paths (e.g. from `--extension`/`-e`)
13
31
  * so the sub-discovery providers can find their sibling `skills/`, `hooks/`,
@@ -17,7 +35,7 @@ export interface OmpExtensionRoot {
17
35
  * Call once during startup before any capability load. Repeated calls extend
18
36
  * the registered set; {@link clearOmpExtensionCliRoots} resets for tests.
19
37
  */
20
- export declare function injectOmpExtensionCliRoots(paths: readonly string[], home: string, cwd: string): void;
38
+ export declare function injectOmpExtensionCliRoots(paths: readonly string[], home: string, cwd: string, options?: InjectOmpExtensionCliRootOptions): void;
21
39
  /** Drop every CLI-injected root. Tests use this between cases. */
22
40
  export declare function clearOmpExtensionCliRoots(): void;
23
41
  /** Inspect currently-injected CLI roots (read-only). Exposed for diagnostics + tests. */
@@ -28,7 +46,8 @@ export declare function getInjectedOmpExtensionCliRoots(): readonly OmpExtension
28
46
  * Sources, in order of precedence (later entries with the same absolute path
29
47
  * are dropped):
30
48
  *
31
- * 1. CLI roots injected via {@link injectOmpExtensionCliRoots}
49
+ * 1. Invocation-scoped SDK roots, when present; otherwise CLI roots injected
50
+ * via {@link injectOmpExtensionCliRoots}
32
51
  * 2. Project `<cwd>/.omp/settings.json#extensions`
33
52
  * 3. User `~/.omp/agent/settings.json#extensions`
34
53
  * 4. Enabled npm/link plugins installed under `<plugins>/node_modules/` (for
@@ -5,7 +5,7 @@ import { type EditMode } from "../utils/edit-mode.js";
5
5
  import { hashlineEditParamsSchema } from "./hashline/index.js";
6
6
  import { type ApplyPatchParams, applyPatchSchema } from "./modes/apply-patch.js";
7
7
  import { type PatchParams, patchEditSchema } from "./modes/patch.js";
8
- import { type ReplaceParams, replaceEditSchema } from "./modes/replace.js";
8
+ import { type ReplaceBatchParams, type ReplaceParams, replaceEditSchema } from "./modes/replace.js";
9
9
  import { type EditToolDetails } from "./renderer.js";
10
10
  export * from "@oh-my-pi/hashline";
11
11
  export { DEFAULT_EDIT_MODE, type EditMode, normalizeEditMode } from "../utils/edit-mode.js";
@@ -22,7 +22,7 @@ export * from "./snapshot-details.js";
22
22
  export * from "./streaming.js";
23
23
  type TInput = typeof replaceEditSchema | typeof patchEditSchema | typeof hashlineEditParamsSchema | typeof applyPatchSchema;
24
24
  type HashlineParams = typeof hashlineEditParamsSchema.infer;
25
- type EditParams = ReplaceParams | PatchParams | HashlineParams | ApplyPatchParams;
25
+ type EditParams = ReplaceParams | ReplaceBatchParams | PatchParams | HashlineParams | ApplyPatchParams;
26
26
  export declare class EditTool implements AgentTool<TInput> {
27
27
  #private;
28
28
  private readonly session;
@@ -36,7 +36,7 @@ export declare class EditTool implements AgentTool<TInput> {
36
36
  /**
37
37
  * `mode` pins the edit variant for this instance, for callers whose protocol
38
38
  * fixes the shape of an edit. The Cursor `pi_edit` frame carries
39
- * `old_text`/`new_text` pairs, which only `replace` accepts — under the
39
+ * `old_string`/`new_string` args, which only `replace` accepts — under the
40
40
  * default `hashline` mode those args do not match the schema at all. Left
41
41
  * unset, the env/settings resolution applies as before.
42
42
  */
@@ -67,11 +67,15 @@ export declare function levenshteinDistance(a: string, b: string): number;
67
67
  export declare function similarity(a: string, b: string): number;
68
68
  /**
69
69
  * Find a match for target text within content.
70
- * Used primarily for replace-mode edits.
70
+ * Used primarily for replace-mode edits; excluded ranges remain invisible to exact and fuzzy matching.
71
71
  */
72
72
  export declare function findMatch(content: string, target: string, options: {
73
73
  allowFuzzy: boolean;
74
74
  threshold?: number;
75
+ excludedRanges?: readonly {
76
+ startIndex: number;
77
+ endIndex: number;
78
+ }[];
75
79
  }): MatchOutcome;
76
80
  /**
77
81
  * Find a sequence of pattern lines within content lines.
@@ -112,25 +116,28 @@ export declare function findContextLine(lines: string[], context: string, startF
112
116
  allowFuzzy?: boolean;
113
117
  skipFunctionFallback?: boolean;
114
118
  }): ContextLineResult;
115
- export declare const replaceEditEntrySchema: import("arktype/internal/variants/object.ts").ObjectType<{
116
- old_text: string;
117
- new_text: string;
118
- all?: boolean | undefined;
119
- }, {}>;
120
119
  export declare const replaceEditSchema: import("arktype/internal/variants/object.ts").ObjectType<{
121
120
  path: string;
122
- edits: {
123
- old_text: string;
124
- new_text: string;
125
- all?: boolean | undefined;
126
- }[];
121
+ old_string: string;
122
+ new_string: string;
123
+ replace_all?: boolean | undefined;
127
124
  }, {}>;
128
- export type ReplaceEditEntry = typeof replaceEditEntrySchema.infer;
129
125
  export type ReplaceParams = typeof replaceEditSchema.infer;
130
- export interface ExecuteReplaceSingleOptions {
126
+ /**
127
+ * Internal batch form of {@link ReplaceParams}, produced only by the Cursor
128
+ * exec bridge: a `pi_edit` frame carries several replacements against one
129
+ * path but must run as a single tool lifecycle with one aggregate result.
130
+ * Never advertised to the model — the agent loop validates model calls
131
+ * against {@link replaceEditSchema}, which has no `edits` field.
132
+ */
133
+ export interface ReplaceBatchParams {
134
+ path: string;
135
+ edits: Omit<ReplaceParams, "path">[];
136
+ }
137
+ export interface ExecuteReplaceOptions {
131
138
  session: ToolSession;
132
139
  path: string;
133
- params: ReplaceEditEntry;
140
+ params: Omit<ReplaceParams, "path">;
134
141
  signal?: AbortSignal;
135
142
  batchRequest?: LspBatchRequest;
136
143
  allowFuzzy: boolean;
@@ -138,4 +145,4 @@ export interface ExecuteReplaceSingleOptions {
138
145
  writethrough: WritethroughCallback;
139
146
  beginDeferredDiagnosticsForPath: (path: string) => WritethroughDeferredHandle;
140
147
  }
141
- export declare function executeReplaceSingle(options: ExecuteReplaceSingleOptions): Promise<AgentToolResult<EditToolDetails, ReplaceEditEntry>>;
148
+ export declare function executeReplace(options: ExecuteReplaceOptions): Promise<AgentToolResult<EditToolDetails, ReplaceParams>>;
@@ -68,7 +68,7 @@ interface EditRenderArgs {
68
68
  patch?: string;
69
69
  input?: string;
70
70
  _input?: string;
71
- all?: boolean;
71
+ replace_all?: boolean;
72
72
  op?: Operation;
73
73
  rename?: unknown;
74
74
  diff?: string;
@@ -10,7 +10,9 @@ export interface PythonKernelAvailability {
10
10
  /** The probed-working runtime, when one was found. */
11
11
  runtime?: PythonRuntime;
12
12
  }
13
- export declare function checkPythonKernelAvailability(cwd: string, interpreter?: string): Promise<PythonKernelAvailability>;
13
+ export declare function checkPythonKernelAvailability(cwd: string, interpreter?: string, options?: {
14
+ forceProbe?: boolean;
15
+ }): Promise<PythonKernelAvailability>;
14
16
  export declare class PythonKernel extends BaseKernel {
15
17
  private constructor();
16
18
  static start(options: KernelStartOptions): Promise<PythonKernel>;
@@ -37,16 +37,16 @@ export declare function shouldHideKernelWindow(opts: {
37
37
  */
38
38
  export declare function shouldDetachKernel(platform: NodeJS.Platform): boolean;
39
39
  /**
40
- * TTY-based fallback used when the Win32 console probe is unavailable.
40
+ * Combine native Win32 and stdio TTY evidence of an inheritable console.
41
41
  *
42
- * Returns `true` if any of stdin/stdout/stderr is currently a TTY. This
43
- * correctly detects the common interactive launches and the partial-
44
- * redirection cases (`omp -p > out.txt`, `< in.txt`, `2> err.log`) where at
45
- * least one stream stays bound to the terminal. The all-stdio-redirected
46
- * case (`< in > out 2> err` from a console) is the reason we prefer the
47
- * Win32 probe over this fallback whenever possible.
42
+ * `GetConsoleWindow()` detects classic consoles even when every stdio stream
43
+ * is redirected. TTY detection covers ConPTY-backed terminals, where compiled
44
+ * hosts can receive a null HWND despite being attached to Windows Terminal.
45
+ * Either signal must preserve console inheritance: `CREATE_NO_WINDOW` can
46
+ * deadlock NumPy native-extension loading in the Python child.
48
47
  */
49
- export declare function consoleAttachedViaTTY(opts: {
48
+ export declare function consoleAttached(opts: {
49
+ nativeConsole?: boolean | null;
50
50
  stdinIsTTY: boolean;
51
51
  stdoutIsTTY: boolean;
52
52
  stderrIsTTY: boolean;
@@ -56,13 +56,9 @@ export declare function __resetWindowsConsoleProbeCache(): void;
56
56
  /**
57
57
  * Whether the host process owns a console its children can inherit.
58
58
  *
59
- * - On Windows, the authoritative signal is `GetConsoleWindow()`. It returns
60
- * a non-NULL HWND whenever the process has a console attached, regardless
61
- * of how the standard streams are redirected so an `omp -p ... < in.txt
62
- * > out.txt 2> err.log` launched from a real Windows Terminal session is
63
- * correctly classified as console-attached and the kernel keeps its
64
- * inheritable console.
65
- * - On any other platform, or if the FFI probe fails, fall back to the
66
- * TTY-OR heuristic. That still catches the common interactive cases.
59
+ * On Windows, `GetConsoleWindow()` detects classic consoles and all-stdio-
60
+ * redirected launches while stdio TTYs detect ConPTY-backed terminals. Either
61
+ * signal is sufficient. Other platforms use the same TTY evidence, although
62
+ * `windowsHide` is a no-op there.
67
63
  */
68
64
  export declare function hostHasInheritableConsole(): boolean;
@@ -53,10 +53,14 @@ export declare function loadExtensions(paths: string[], cwd: string, eventBus?:
53
53
  * `LoadExtensionsResult` directly would reuse handlers/tools/commands that
54
54
  * closed over the parent's `cwd` and event bus.
55
55
  */
56
- export declare function discoverExtensionPaths(configuredPaths: string[], cwd: string, disabledExtensionIds?: string[]): Promise<string[]>;
56
+ export interface DiscoverExtensionPathOptions {
57
+ /** Include ambient native extensions, hooks, and installed plugins. */
58
+ ambient?: boolean;
59
+ }
60
+ export declare function discoverExtensionPaths(configuredPaths: string[], cwd: string, disabledExtensionIds?: string[], options?: DiscoverExtensionPathOptions): Promise<string[]>;
57
61
  /**
58
62
  * Discover and load extensions from standard locations. Composed of
59
63
  * {@link discoverExtensionPaths} (FS scan) + {@link loadExtensions}
60
64
  * (per-session binding).
61
65
  */
62
- export declare function discoverAndLoadExtensions(configuredPaths: string[], cwd: string, eventBus?: EventBus, disabledExtensionIds?: string[]): Promise<LoadExtensionsResult>;
66
+ export declare function discoverAndLoadExtensions(configuredPaths: string[], cwd: string, eventBus?: EventBus, disabledExtensionIds?: string[], options?: DiscoverExtensionPathOptions): Promise<LoadExtensionsResult>;
@@ -19,7 +19,7 @@
19
19
  * `types.ts` via the `export *` below — pi-ai still exports both as types,
20
20
  * only the runtime `Type` builder and `StringEnum()` helper were removed.
21
21
  */
22
- import type { Api, AssistantMessage, Model } from "@oh-my-pi/pi-ai";
22
+ import { type Api, type AssistantMessage, type AssistantMessageEventStream, type Context, type Model, type SimpleStreamOptions } from "@oh-my-pi/pi-ai";
23
23
  import type { Effort } from "@oh-my-pi/pi-catalog/effort";
24
24
  import { calculateCost, getBundledModel, getBundledModels, getBundledProviders, modelsAreEqual } from "@oh-my-pi/pi-catalog/models";
25
25
  import { type TSchema, Type } from "./typebox.js";
@@ -54,6 +54,13 @@ export * from "@oh-my-pi/pi-ai";
54
54
  export { calculateCost, getBundledModel, getBundledModels, getBundledProviders, modelsAreEqual, Type };
55
55
  export declare const getModel: typeof getBundledModel;
56
56
  export declare const getModels: typeof getBundledModels;
57
+ /**
58
+ * Stream OpenAI Responses through the historical simple-options contract.
59
+ *
60
+ * Legacy `/compat` callers pass {@link SimpleStreamOptions}; routing through
61
+ * `streamSimple` preserves option normalization before provider dispatch.
62
+ */
63
+ export declare function streamSimpleOpenAIResponses(model: Model<"openai-responses">, context: Context, options?: SimpleStreamOptions): AssistantMessageEventStream;
57
64
  /**
58
65
  * Compatibility re-exports for runtime helpers that upstream
59
66
  * `@earendil-works/pi-ai` exposed from its package root but omp's
@@ -398,7 +398,7 @@ export { getProjectDir } from "@oh-my-pi/pi-utils";
398
398
  * canonical helper.
399
399
  */
400
400
  export declare function getPackageDir(): string;
401
- export { compact, estimateTokens } from "@oh-my-pi/pi-agent-core/compaction";
401
+ export { compact, estimateTokens, serializeConversation } from "@oh-my-pi/pi-agent-core/compaction";
402
402
  export { CONFIG_DIR_NAME } from "@oh-my-pi/pi-utils";
403
403
  export { parseArgs } from "../cli/args.js";
404
404
  export * from "../index.js";
@@ -71,6 +71,8 @@ export declare function __rewriteLegacyExtensionSourceForTests(source: string, i
71
71
  * no-op.
72
72
  */
73
73
  export declare function ensureGraphCommonJsRequireRegistered(): void;
74
+ /** Test seam for compiled-binary dependency graph discovery and rewriting. */
75
+ export declare function __collectLegacyPiExtensionSourcesForTests(entryPath: string): Promise<ReadonlyMap<string, string>>;
74
76
  /**
75
77
  * Load a legacy Pi extension module from its real on-disk location.
76
78
  *
@@ -2,7 +2,7 @@
2
2
  * Registry read/write operations for the marketplace plugin system.
3
3
  *
4
4
  * Two registries:
5
- * - marketplaces.json under getConfigRootDir() — which catalogs the user has added
5
+ * - marketplaces.json at getMarketplacesRegistryPath() — which catalogs the user has added
6
6
  * - installed_plugins.json under getPluginsDir() — which plugins are installed
7
7
  *
8
8
  * Read/write functions accept explicit file paths so callers control the
@@ -11,8 +11,8 @@
11
11
  * Both use atomic write (tmp + rename). On Windows, rename over existing file
12
12
  * can fail with EPERM — fallback: unlink target then rename.
13
13
  */
14
+ export { getMarketplacesRegistryPath } from "@oh-my-pi/pi-utils";
14
15
  import type { InstalledPluginEntry, InstalledPluginsRegistry, MarketplaceRegistryEntry, MarketplacesRegistry } from "./types.js";
15
- export declare function getMarketplacesRegistryPath(): string;
16
16
  export declare function getInstalledPluginsRegistryPath(): string;
17
17
  export declare function getMarketplacesCacheDir(): string;
18
18
  export declare function getPluginsCacheDir(): string;
@@ -1,2 +1,2 @@
1
- /** Start the detached per-project daemon broker selected by the CLI worker host. */
1
+ /** Start the detached project or global daemon broker selected by the CLI worker host. */
2
2
  export declare function startDaemonBrokerFromEnvironment(): Promise<void>;
@@ -6,17 +6,20 @@ export interface DaemonBrokerClientOptions {
6
6
  /** Last-client shutdown grace override in milliseconds. */
7
7
  idleGraceMs?: number;
8
8
  }
9
- /** Persistent per-process connection to one project's daemon broker. */
9
+ /** Persistent per-process connection to one project or global daemon broker. */
10
10
  export interface DaemonBrokerClient {
11
+ /** Canonical project directory or synthetic directory identifying a global scope. */
11
12
  readonly projectDir: string;
12
13
  request(operation: DaemonOperation, signal?: AbortSignal): Promise<DaemonRpcResult>;
13
14
  close(): void;
14
15
  }
15
- /** Create an independent socket connection to one project's shared daemon broker. */
16
+ /** Create an independent socket connection to one daemon broker scope. */
16
17
  export declare function createDaemonBrokerClient(projectDir: string, options?: DaemonBrokerClientOptions): Promise<DaemonBrokerClient>;
17
18
  /** Get the process-shared daemon broker client for one canonical project directory. */
18
19
  export declare function daemonClientForProject(projectDir: string): Promise<DaemonBrokerClient>;
19
- /** Close every project broker connection held by this omp process. */
20
+ /** Get the process-shared client that leases one profile-independent, machine-global daemon broker. */
21
+ export declare function daemonClientForGlobal(service: string): Promise<DaemonBrokerClient>;
22
+ /** Close every project and machine-global broker connection held by this omp process. */
20
23
  export declare function closeDaemonClients(): Promise<void>;
21
24
  /** Exercise worker-host broker startup and authenticated RPC for distribution smoke tests. */
22
25
  export declare function smokeTestDaemonBroker(): Promise<void>;
@@ -0,0 +1,8 @@
1
+ import type { DaemonBrokerClient } from "./client.js";
2
+ import type { DaemonSnapshot } from "./protocol.js";
3
+ /** Snapshot a broker daemon, treating "unknown daemon" and broker errors as absent. */
4
+ export declare function describeQuietly(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal): Promise<DaemonSnapshot | undefined>;
5
+ /** Block until the daemon reports ready; undefined on timeout or pre-ready exit. */
6
+ export declare function waitReady(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal, timeoutMs?: number): Promise<DaemonSnapshot | undefined>;
7
+ /** Best-effort stop before replacing a wedged or endpoint-less daemon. */
8
+ export declare function stopQuietly(client: DaemonBrokerClient, name: string, label: string, signal?: AbortSignal): Promise<void>;
@@ -1,4 +1,5 @@
1
+ import { getDaemonRuntimeDir } from "@oh-my-pi/pi-utils";
1
2
  /** Resolve the private runtime directory shared by omp processes in one project directory. */
2
- export declare function daemonRuntimeDir(projectDir: string, configRoot?: string): string;
3
- /** Resolve the Unix socket or Windows named pipe used by one project broker. */
3
+ export { getDaemonRuntimeDir as daemonRuntimeDir };
4
+ /** Resolve the Unix socket or Windows named pipe used by one daemon broker scope. */
4
5
  export declare function daemonBrokerEndpoint(projectDir: string, runtimeDir: string): string;