jeopi-cli 16.2.14 → 16.2.17

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 (1097) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cli.js +2562 -2561
  3. package/dist/types/advisor/__tests__/advisor.test.d.ts +1 -0
  4. package/dist/types/advisor/__tests__/config.test.d.ts +1 -0
  5. package/dist/types/advisor/__tests__/emission-guard.test.d.ts +1 -0
  6. package/dist/types/advisor/advise-tool.d.ts +106 -0
  7. package/dist/types/advisor/config.d.ts +90 -0
  8. package/dist/types/advisor/emission-guard.d.ts +73 -0
  9. package/dist/types/advisor/index.d.ts +6 -0
  10. package/dist/types/advisor/runtime.d.ts +76 -0
  11. package/dist/types/advisor/transcript-recorder.d.ts +63 -0
  12. package/dist/types/advisor/watchdog.d.ts +38 -0
  13. package/dist/types/async/index.d.ts +1 -0
  14. package/dist/types/async/job-manager.d.ts +121 -0
  15. package/dist/types/auto-thinking/classifier.d.ts +37 -0
  16. package/dist/types/autolearn/controller.d.ts +25 -0
  17. package/dist/types/autolearn/managed-skills.d.ts +45 -0
  18. package/dist/types/autoresearch/dashboard.d.ts +4 -0
  19. package/dist/types/autoresearch/git.d.ts +36 -0
  20. package/dist/types/autoresearch/helpers.d.ts +24 -0
  21. package/dist/types/autoresearch/index.d.ts +2 -0
  22. package/dist/types/autoresearch/state.d.ts +17 -0
  23. package/dist/types/autoresearch/storage.d.ts +142 -0
  24. package/dist/types/autoresearch/tools/init-experiment.d.ts +27 -0
  25. package/dist/types/autoresearch/tools/log-experiment.d.ts +21 -0
  26. package/dist/types/autoresearch/tools/run-experiment.d.ts +7 -0
  27. package/dist/types/autoresearch/tools/update-notes.d.ts +11 -0
  28. package/dist/types/autoresearch/types.d.ts +154 -0
  29. package/dist/types/capability/context-file.d.ts +17 -0
  30. package/dist/types/capability/extension-module.d.ts +15 -0
  31. package/dist/types/capability/extension.d.ts +28 -0
  32. package/dist/types/capability/fs.d.ts +20 -0
  33. package/dist/types/capability/hook.d.ts +19 -0
  34. package/dist/types/capability/index.d.ts +80 -0
  35. package/dist/types/capability/instruction.d.ts +17 -0
  36. package/dist/types/capability/mcp.d.ts +47 -0
  37. package/dist/types/capability/prompt.d.ts +15 -0
  38. package/dist/types/capability/rule-buckets.d.ts +30 -0
  39. package/dist/types/capability/rule.d.ts +73 -0
  40. package/dist/types/capability/settings.d.ts +15 -0
  41. package/dist/types/capability/skill.d.ts +43 -0
  42. package/dist/types/capability/slash-command.d.ts +17 -0
  43. package/dist/types/capability/ssh.d.ts +23 -0
  44. package/dist/types/capability/system-prompt.d.ts +15 -0
  45. package/dist/types/capability/tool.d.ts +19 -0
  46. package/dist/types/capability/types.d.ts +154 -0
  47. package/dist/types/cli/agents-cli.d.ts +12 -0
  48. package/dist/types/cli/args.d.ts +80 -0
  49. package/dist/types/cli/auth-broker-cli.d.ts +25 -0
  50. package/dist/types/cli/auth-gateway-cli.d.ts +26 -0
  51. package/dist/types/cli/bench-cli.d.ts +85 -0
  52. package/dist/types/cli/classify-install-target.d.ts +12 -0
  53. package/dist/types/cli/claude-trace-cli.d.ts +54 -0
  54. package/dist/types/cli/commands/init-xdg.d.ts +1 -0
  55. package/dist/types/cli/commands/migrate-legacy.d.ts +1 -0
  56. package/dist/types/cli/completion-gen.d.ts +80 -0
  57. package/dist/types/cli/config-cli.d.ts +22 -0
  58. package/dist/types/cli/dry-balance-cli.d.ts +113 -0
  59. package/dist/types/cli/extension-flags.d.ts +36 -0
  60. package/dist/types/cli/file-processor.d.ts +11 -0
  61. package/dist/types/cli/flag-tables.d.ts +144 -0
  62. package/dist/types/cli/gallery-cli.d.ts +49 -0
  63. package/dist/types/cli/gallery-fixtures/agentic.d.ts +2 -0
  64. package/dist/types/cli/gallery-fixtures/codeintel.d.ts +3 -0
  65. package/dist/types/cli/gallery-fixtures/edit.d.ts +3 -0
  66. package/dist/types/cli/gallery-fixtures/fs.d.ts +2 -0
  67. package/dist/types/cli/gallery-fixtures/index.d.ts +4 -0
  68. package/dist/types/cli/gallery-fixtures/interaction.d.ts +3 -0
  69. package/dist/types/cli/gallery-fixtures/memory.d.ts +2 -0
  70. package/dist/types/cli/gallery-fixtures/misc.d.ts +3 -0
  71. package/dist/types/cli/gallery-fixtures/search.d.ts +3 -0
  72. package/dist/types/cli/gallery-fixtures/shell.d.ts +3 -0
  73. package/dist/types/cli/gallery-fixtures/types.d.ts +55 -0
  74. package/dist/types/cli/gallery-fixtures/web.d.ts +2 -0
  75. package/dist/types/cli/gallery-screenshot.d.ts +35 -0
  76. package/dist/types/cli/gc-cli.d.ts +58 -0
  77. package/dist/types/cli/grep-cli.d.ts +17 -0
  78. package/dist/types/cli/grievances-cli.d.ts +37 -0
  79. package/dist/types/cli/initial-message.d.ts +17 -0
  80. package/dist/types/cli/models-cli.d.ts +62 -0
  81. package/dist/types/cli/plugin-cli.d.ts +32 -0
  82. package/dist/types/cli/profile-alias.d.ts +29 -0
  83. package/dist/types/cli/profile-bootstrap.d.ts +55 -0
  84. package/dist/types/cli/read-cli.d.ts +11 -0
  85. package/dist/types/cli/session-picker.d.ts +11 -0
  86. package/dist/types/cli/setup-cli.d.ts +24 -0
  87. package/dist/types/cli/setup-model-picker.d.ts +14 -0
  88. package/dist/types/cli/shell-cli.d.ts +8 -0
  89. package/dist/types/cli/ssh-cli.d.ts +21 -0
  90. package/dist/types/cli/startup-cwd.d.ts +2 -0
  91. package/dist/types/cli/stats-cli.d.ts +17 -0
  92. package/dist/types/cli/tiny-models-cli.d.ts +11 -0
  93. package/dist/types/cli/ttsr-cli.d.ts +39 -0
  94. package/dist/types/cli/update-cli.d.ts +105 -0
  95. package/dist/types/cli/usage-cli.d.ts +95 -0
  96. package/dist/types/cli/web-search-cli.d.ts +20 -0
  97. package/dist/types/cli/worktree-cli.d.ts +26 -0
  98. package/dist/types/cli-commands.d.ts +33 -0
  99. package/dist/types/cli.d.ts +3 -0
  100. package/dist/types/collab/crypto.d.ts +7 -0
  101. package/dist/types/collab/display-name.d.ts +3 -0
  102. package/dist/types/collab/guest.d.ts +52 -0
  103. package/dist/types/collab/host.d.ts +43 -0
  104. package/dist/types/collab/protocol.d.ts +143 -0
  105. package/dist/types/collab/relay-client.d.ts +22 -0
  106. package/dist/types/collab/replication-shrink.d.ts +39 -0
  107. package/dist/types/commands/acp.d.ts +12 -0
  108. package/dist/types/commands/agents.d.ts +31 -0
  109. package/dist/types/commands/auth-broker.d.ts +51 -0
  110. package/dist/types/commands/auth-gateway.d.ts +32 -0
  111. package/dist/types/commands/bench.d.ts +37 -0
  112. package/dist/types/commands/commit.d.ts +27 -0
  113. package/dist/types/commands/complete.d.ts +6 -0
  114. package/dist/types/commands/completions.d.ts +13 -0
  115. package/dist/types/commands/config.d.ts +30 -0
  116. package/dist/types/commands/dry-balance.d.ts +31 -0
  117. package/dist/types/commands/gallery.d.ts +47 -0
  118. package/dist/types/commands/gc.d.ts +37 -0
  119. package/dist/types/commands/grep.d.ts +42 -0
  120. package/dist/types/commands/grievances.d.ts +40 -0
  121. package/dist/types/commands/install.d.ts +51 -0
  122. package/dist/types/commands/join.d.ts +12 -0
  123. package/dist/types/commands/launch.d.ts +148 -0
  124. package/dist/types/commands/models.d.ts +33 -0
  125. package/dist/types/commands/plugin.d.ts +52 -0
  126. package/dist/types/commands/read.d.ts +15 -0
  127. package/dist/types/commands/say.d.ts +24 -0
  128. package/dist/types/commands/setup.d.ts +31 -0
  129. package/dist/types/commands/shell.d.ts +21 -0
  130. package/dist/types/commands/ssh.d.ts +48 -0
  131. package/dist/types/commands/stats.d.ts +25 -0
  132. package/dist/types/commands/tiny-models.d.ts +22 -0
  133. package/dist/types/commands/token.d.ts +34 -0
  134. package/dist/types/commands/ttsr.d.ts +57 -0
  135. package/dist/types/commands/update.d.ts +20 -0
  136. package/dist/types/commands/usage.d.ts +34 -0
  137. package/dist/types/commands/web-search.d.ts +33 -0
  138. package/dist/types/commands/worktree.d.ts +31 -0
  139. package/dist/types/commit/agentic/agent.d.ts +31 -0
  140. package/dist/types/commit/agentic/fallback.d.ts +5 -0
  141. package/dist/types/commit/agentic/index.d.ts +2 -0
  142. package/dist/types/commit/agentic/state.d.ts +58 -0
  143. package/dist/types/commit/agentic/tools/analyze-file.d.ts +18 -0
  144. package/dist/types/commit/agentic/tools/git-file-diff.d.ts +9 -0
  145. package/dist/types/commit/agentic/tools/git-hunk.d.ts +8 -0
  146. package/dist/types/commit/agentic/tools/git-overview.d.ts +8 -0
  147. package/dist/types/commit/agentic/tools/index.d.ts +16 -0
  148. package/dist/types/commit/agentic/tools/propose-changelog.d.ts +27 -0
  149. package/dist/types/commit/agentic/tools/propose-commit.d.ts +15 -0
  150. package/dist/types/commit/agentic/tools/recent-commits.d.ts +6 -0
  151. package/dist/types/commit/agentic/tools/schemas.d.ts +6 -0
  152. package/dist/types/commit/agentic/tools/split-commit.d.ts +32 -0
  153. package/dist/types/commit/agentic/topo-sort.d.ts +4 -0
  154. package/dist/types/commit/agentic/trivial.d.ts +7 -0
  155. package/dist/types/commit/agentic/validation.d.ts +20 -0
  156. package/dist/types/commit/analysis/conventional.d.ts +22 -0
  157. package/dist/types/commit/analysis/index.d.ts +4 -0
  158. package/dist/types/commit/analysis/scope.d.ts +6 -0
  159. package/dist/types/commit/analysis/summary.d.ts +19 -0
  160. package/dist/types/commit/analysis/validation.d.ts +8 -0
  161. package/dist/types/commit/changelog/detect.d.ts +2 -0
  162. package/dist/types/commit/changelog/generate.d.ts +29 -0
  163. package/dist/types/commit/changelog/index.d.ts +30 -0
  164. package/dist/types/commit/changelog/parse.d.ts +2 -0
  165. package/dist/types/commit/cli.d.ts +3 -0
  166. package/dist/types/commit/git/diff.d.ts +5 -0
  167. package/dist/types/commit/index.d.ts +4 -0
  168. package/dist/types/commit/map-reduce/index.d.ts +28 -0
  169. package/dist/types/commit/map-reduce/map-phase.d.ts +17 -0
  170. package/dist/types/commit/map-reduce/reduce-phase.d.ts +13 -0
  171. package/dist/types/commit/map-reduce/utils.d.ts +2 -0
  172. package/dist/types/commit/message.d.ts +2 -0
  173. package/dist/types/commit/model-selection.d.ts +26 -0
  174. package/dist/types/commit/pipeline.d.ts +5 -0
  175. package/dist/types/commit/shared-llm.d.ts +27 -0
  176. package/dist/types/commit/types.d.ts +78 -0
  177. package/dist/types/commit/utils/exclusions.d.ts +4 -0
  178. package/dist/types/commit/utils.d.ts +20 -0
  179. package/dist/types/config/api-key-resolver.d.ts +43 -0
  180. package/dist/types/config/append-only-context-mode.d.ts +9 -0
  181. package/dist/types/config/config-file.d.ts +62 -0
  182. package/dist/types/config/file-lock.d.ts +29 -0
  183. package/dist/types/config/inline-tool-descriptors-mode.d.ts +12 -0
  184. package/dist/types/config/keybindings.d.ts +362 -0
  185. package/dist/types/config/model-discovery.d.ts +68 -0
  186. package/dist/types/config/model-registry.d.ts +251 -0
  187. package/dist/types/config/model-resolver.d.ts +300 -0
  188. package/dist/types/config/model-roles.d.ts +29 -0
  189. package/dist/types/config/models-config-schema.d.ts +697 -0
  190. package/dist/types/config/models-config.d.ts +436 -0
  191. package/dist/types/config/prompt-templates.d.ts +32 -0
  192. package/dist/types/config/provider-globals.d.ts +7 -0
  193. package/dist/types/config/resolve-config-value.d.ts +17 -0
  194. package/dist/types/config/service-tier.d.ts +49 -0
  195. package/dist/types/config/settings-schema.d.ts +5658 -0
  196. package/dist/types/config/settings.d.ts +181 -0
  197. package/dist/types/config.d.ts +92 -0
  198. package/dist/types/cursor.d.ts +22 -0
  199. package/dist/types/dap/client.d.ts +38 -0
  200. package/dist/types/dap/config.d.ts +19 -0
  201. package/dist/types/dap/index.d.ts +4 -0
  202. package/dist/types/dap/session.d.ts +108 -0
  203. package/dist/types/dap/types.d.ts +534 -0
  204. package/dist/types/debug/index.d.ts +15 -0
  205. package/dist/types/debug/log-formatting.d.ts +4 -0
  206. package/dist/types/debug/log-viewer.d.ts +69 -0
  207. package/dist/types/debug/profiler.d.ts +24 -0
  208. package/dist/types/debug/protocol-probe.d.ts +38 -0
  209. package/dist/types/debug/raw-sse-buffer.d.ts +44 -0
  210. package/dist/types/debug/raw-sse.d.ts +19 -0
  211. package/dist/types/debug/remote-debugger.d.ts +45 -0
  212. package/dist/types/debug/report-bundle.d.ts +58 -0
  213. package/dist/types/debug/system-info.d.ts +26 -0
  214. package/dist/types/debug/terminal-info.d.ts +33 -0
  215. package/dist/types/discovery/agents-md.d.ts +1 -0
  216. package/dist/types/discovery/agents.d.ts +12 -0
  217. package/dist/types/discovery/at-imports.d.ts +15 -0
  218. package/dist/types/discovery/builtin-defaults.d.ts +1 -0
  219. package/dist/types/discovery/builtin-rules/index.d.ts +7 -0
  220. package/dist/types/discovery/builtin.d.ts +1 -0
  221. package/dist/types/discovery/claude-plugins.d.ts +1 -0
  222. package/dist/types/discovery/claude.d.ts +1 -0
  223. package/dist/types/discovery/cline.d.ts +1 -0
  224. package/dist/types/discovery/codex.d.ts +1 -0
  225. package/dist/types/discovery/cursor.d.ts +16 -0
  226. package/dist/types/discovery/gemini.d.ts +1 -0
  227. package/dist/types/discovery/github.d.ts +1 -0
  228. package/dist/types/discovery/helpers.d.ts +276 -0
  229. package/dist/types/discovery/index.d.ts +53 -0
  230. package/dist/types/discovery/mcp-json.d.ts +1 -0
  231. package/dist/types/discovery/omp-extension-roots.d.ts +43 -0
  232. package/dist/types/discovery/omp-plugins.d.ts +1 -0
  233. package/dist/types/discovery/opencode.d.ts +1 -0
  234. package/dist/types/discovery/plugin-dir-roots.d.ts +15 -0
  235. package/dist/types/discovery/ssh.d.ts +1 -0
  236. package/dist/types/discovery/substitute-plugin-root.d.ts +1 -0
  237. package/dist/types/discovery/vscode.d.ts +1 -0
  238. package/dist/types/discovery/windsurf.d.ts +13 -0
  239. package/dist/types/edit/apply-patch/index.d.ts +35 -0
  240. package/dist/types/edit/apply-patch/parser.d.ts +34 -0
  241. package/dist/types/edit/diff.d.ts +60 -0
  242. package/dist/types/edit/file-snapshot-store.d.ts +64 -0
  243. package/dist/types/edit/hashline/block-resolver.d.ts +9 -0
  244. package/dist/types/edit/hashline/diff.d.ts +29 -0
  245. package/dist/types/edit/hashline/execute.d.ts +28 -0
  246. package/dist/types/edit/hashline/filesystem.d.ts +43 -0
  247. package/dist/types/edit/hashline/index.d.ts +5 -0
  248. package/dist/types/edit/hashline/noop-loop-guard.d.ts +72 -0
  249. package/dist/types/edit/hashline/params.d.ts +7 -0
  250. package/dist/types/edit/index.d.ts +83 -0
  251. package/dist/types/edit/modes/apply-patch.d.ts +23 -0
  252. package/dist/types/edit/modes/patch.d.ts +101 -0
  253. package/dist/types/edit/modes/replace.d.ts +141 -0
  254. package/dist/types/edit/normalize.d.ts +31 -0
  255. package/dist/types/edit/notebook.d.ts +23 -0
  256. package/dist/types/edit/read-file.d.ts +2 -0
  257. package/dist/types/edit/renderer.d.ts +118 -0
  258. package/dist/types/edit/snapshot-details.d.ts +33 -0
  259. package/dist/types/edit/streaming.d.ts +105 -0
  260. package/dist/types/eval/__tests__/agent-bridge.test.d.ts +1 -0
  261. package/dist/types/eval/__tests__/bridge-timeout.test.d.ts +1 -0
  262. package/dist/types/eval/__tests__/budget-bridge.test.d.ts +1 -0
  263. package/dist/types/eval/__tests__/completion-bridge.test.d.ts +1 -0
  264. package/dist/types/eval/__tests__/helpers-local-roots.test.d.ts +1 -0
  265. package/dist/types/eval/__tests__/idle-timeout.test.d.ts +1 -0
  266. package/dist/types/eval/__tests__/js-context-manager.test.d.ts +1 -0
  267. package/dist/types/eval/__tests__/julia-prelude.test.d.ts +1 -0
  268. package/dist/types/eval/__tests__/kernel-spawn.test.d.ts +1 -0
  269. package/dist/types/eval/__tests__/prelude-agent.test.d.ts +1 -0
  270. package/dist/types/eval/agent-bridge.d.ts +48 -0
  271. package/dist/types/eval/backend-helpers.d.ts +23 -0
  272. package/dist/types/eval/backend.d.ts +60 -0
  273. package/dist/types/eval/bridge-timeout.d.ts +27 -0
  274. package/dist/types/eval/budget-bridge.d.ts +29 -0
  275. package/dist/types/eval/completion-bridge.d.ts +38 -0
  276. package/dist/types/eval/concurrency-bridge.d.ts +26 -0
  277. package/dist/types/eval/executor-base.d.ts +118 -0
  278. package/dist/types/eval/idle-timeout.d.ts +26 -0
  279. package/dist/types/eval/index.d.ts +6 -0
  280. package/dist/types/eval/jl/executor.d.ts +44 -0
  281. package/dist/types/eval/jl/index.d.ts +11 -0
  282. package/dist/types/eval/jl/kernel.d.ts +28 -0
  283. package/dist/types/eval/jl/prelude.d.ts +1 -0
  284. package/dist/types/eval/jl/runtime.d.ts +22 -0
  285. package/dist/types/eval/js/context-manager.d.ts +40 -0
  286. package/dist/types/eval/js/executor.d.ts +38 -0
  287. package/dist/types/eval/js/index.d.ts +11 -0
  288. package/dist/types/eval/js/shared/helpers.d.ts +32 -0
  289. package/dist/types/eval/js/shared/indirect-eval.d.ts +14 -0
  290. package/dist/types/eval/js/shared/local-module-loader.d.ts +16 -0
  291. package/dist/types/eval/js/shared/prelude.d.ts +1 -0
  292. package/dist/types/eval/js/shared/rewrite-imports.d.ts +25 -0
  293. package/dist/types/eval/js/shared/runtime.d.ts +59 -0
  294. package/dist/types/eval/js/shared/types.d.ts +24 -0
  295. package/dist/types/eval/js/tool-bridge.d.ts +20 -0
  296. package/dist/types/eval/js/worker-core.d.ts +6 -0
  297. package/dist/types/eval/js/worker-entry.d.ts +1 -0
  298. package/dist/types/eval/js/worker-protocol.d.ts +83 -0
  299. package/dist/types/eval/kernel-base.d.ts +105 -0
  300. package/dist/types/eval/py/__tests__/prelude.test.d.ts +1 -0
  301. package/dist/types/eval/py/__tests__/runner-shell-output.test.d.ts +1 -0
  302. package/dist/types/eval/py/display.d.ts +25 -0
  303. package/dist/types/eval/py/executor.d.ts +107 -0
  304. package/dist/types/eval/py/index.d.ts +11 -0
  305. package/dist/types/eval/py/kernel.d.ts +17 -0
  306. package/dist/types/eval/py/prelude.d.ts +1 -0
  307. package/dist/types/eval/py/runtime.d.ts +40 -0
  308. package/dist/types/eval/py/spawn-options.d.ts +58 -0
  309. package/dist/types/eval/py/tool-bridge.d.ts +16 -0
  310. package/dist/types/eval/rb/executor.d.ts +77 -0
  311. package/dist/types/eval/rb/index.d.ts +11 -0
  312. package/dist/types/eval/rb/kernel.d.ts +31 -0
  313. package/dist/types/eval/rb/prelude.d.ts +1 -0
  314. package/dist/types/eval/rb/runtime.d.ts +23 -0
  315. package/dist/types/eval/runtime-env.d.ts +24 -0
  316. package/dist/types/eval/session-id.d.ts +3 -0
  317. package/dist/types/eval/types.d.ts +52 -0
  318. package/dist/types/exa/index.d.ts +2 -0
  319. package/dist/types/exa/mcp-client.d.ts +53 -0
  320. package/dist/types/exa/types.d.ts +72 -0
  321. package/dist/types/exec/bash-cwd-sync.d.ts +16 -0
  322. package/dist/types/exec/bash-executor.d.ts +45 -0
  323. package/dist/types/exec/exec.d.ts +25 -0
  324. package/dist/types/exec/non-interactive-env.d.ts +3 -0
  325. package/dist/types/export/custom-share.d.ts +19 -0
  326. package/dist/types/export/html/index.d.ts +78 -0
  327. package/dist/types/export/html/web-palette.d.ts +117 -0
  328. package/dist/types/export/share.d.ts +55 -0
  329. package/dist/types/export/ttsr.d.ts +67 -0
  330. package/dist/types/extensibility/custom-commands/bundled/ci-green/index.d.ts +9 -0
  331. package/dist/types/extensibility/custom-commands/bundled/review/index.d.ts +10 -0
  332. package/dist/types/extensibility/custom-commands/index.d.ts +2 -0
  333. package/dist/types/extensibility/custom-commands/loader.d.ts +29 -0
  334. package/dist/types/extensibility/custom-commands/types.d.ts +112 -0
  335. package/dist/types/extensibility/custom-tools/index.d.ts +6 -0
  336. package/dist/types/extensibility/custom-tools/loader.d.ts +89 -0
  337. package/dist/types/extensibility/custom-tools/types.d.ts +242 -0
  338. package/dist/types/extensibility/custom-tools/wrapper.d.ts +23 -0
  339. package/dist/types/extensibility/extensions/compact-handler.d.ts +26 -0
  340. package/dist/types/extensibility/extensions/get-commands-handler.d.ts +29 -0
  341. package/dist/types/extensibility/extensions/index.d.ts +8 -0
  342. package/dist/types/extensibility/extensions/loader.d.ts +59 -0
  343. package/dist/types/extensibility/extensions/model-api.d.ts +17 -0
  344. package/dist/types/extensibility/extensions/runner.d.ts +161 -0
  345. package/dist/types/extensibility/extensions/types.d.ts +962 -0
  346. package/dist/types/extensibility/extensions/wrapper.d.ts +54 -0
  347. package/dist/types/extensibility/hooks/index.d.ts +6 -0
  348. package/dist/types/extensibility/hooks/loader.d.ts +65 -0
  349. package/dist/types/extensibility/hooks/runner.d.ts +126 -0
  350. package/dist/types/extensibility/hooks/tool-wrapper.d.ts +25 -0
  351. package/dist/types/extensibility/hooks/types.d.ts +442 -0
  352. package/dist/types/extensibility/legacy-pi-ai-shim.d.ts +35 -0
  353. package/dist/types/extensibility/legacy-pi-coding-agent-shim.d.ts +115 -0
  354. package/dist/types/extensibility/plugins/doctor.d.ts +3 -0
  355. package/dist/types/extensibility/plugins/git-url.d.ts +44 -0
  356. package/dist/types/extensibility/plugins/index.d.ts +7 -0
  357. package/dist/types/extensibility/plugins/installer.d.ts +5 -0
  358. package/dist/types/extensibility/plugins/legacy-pi-bundled-keys.d.ts +10 -0
  359. package/dist/types/extensibility/plugins/legacy-pi-bundled-registry.d.ts +10 -0
  360. package/dist/types/extensibility/plugins/legacy-pi-compat.d.ts +79 -0
  361. package/dist/types/extensibility/plugins/loader.d.ts +59 -0
  362. package/dist/types/extensibility/plugins/manager.d.ts +76 -0
  363. package/dist/types/extensibility/plugins/marketplace/cache.d.ts +41 -0
  364. package/dist/types/extensibility/plugins/marketplace/fetcher.d.ts +48 -0
  365. package/dist/types/extensibility/plugins/marketplace/index.d.ts +6 -0
  366. package/dist/types/extensibility/plugins/marketplace/manager.d.ts +57 -0
  367. package/dist/types/extensibility/plugins/marketplace/registry.d.ts +34 -0
  368. package/dist/types/extensibility/plugins/marketplace/source-resolver.d.ts +28 -0
  369. package/dist/types/extensibility/plugins/marketplace/types.d.ts +131 -0
  370. package/dist/types/extensibility/plugins/marketplace-auto-update.d.ts +8 -0
  371. package/dist/types/extensibility/plugins/parser.d.ts +52 -0
  372. package/dist/types/extensibility/plugins/runtime-config.d.ts +3 -0
  373. package/dist/types/extensibility/plugins/types.d.ts +161 -0
  374. package/dist/types/extensibility/session-handler-types.d.ts +23 -0
  375. package/dist/types/extensibility/shared-events.d.ts +301 -0
  376. package/dist/types/extensibility/skills.d.ts +97 -0
  377. package/dist/types/extensibility/slash-commands.d.ts +38 -0
  378. package/dist/types/extensibility/tool-event-input.d.ts +9 -0
  379. package/dist/types/extensibility/tool-proxy.d.ts +4 -0
  380. package/dist/types/extensibility/typebox.d.ts +177 -0
  381. package/dist/types/extensibility/utils.d.ts +24 -0
  382. package/dist/types/goals/guided-setup.d.ts +18 -0
  383. package/dist/types/goals/index.d.ts +3 -0
  384. package/dist/types/goals/runtime.d.ts +69 -0
  385. package/dist/types/goals/state.d.ts +35 -0
  386. package/dist/types/goals/tools/goal-tool.d.ts +53 -0
  387. package/dist/types/hindsight/backend.d.ts +13 -0
  388. package/dist/types/hindsight/bank.d.ts +63 -0
  389. package/dist/types/hindsight/client.d.ts +224 -0
  390. package/dist/types/hindsight/config.d.ts +51 -0
  391. package/dist/types/hindsight/content.d.ts +69 -0
  392. package/dist/types/hindsight/index.d.ts +8 -0
  393. package/dist/types/hindsight/mental-models.d.ts +134 -0
  394. package/dist/types/hindsight/state.d.ts +105 -0
  395. package/dist/types/hindsight/transcript.d.ts +28 -0
  396. package/dist/types/index.d.ts +43 -0
  397. package/dist/types/internal-urls/__tests__/ssh-protocol.test.d.ts +1 -0
  398. package/dist/types/internal-urls/agent-protocol.d.ts +13 -0
  399. package/dist/types/internal-urls/artifact-protocol.d.ts +7 -0
  400. package/dist/types/internal-urls/docs-index.d.ts +19 -0
  401. package/dist/types/internal-urls/filesystem-resource.d.ts +9 -0
  402. package/dist/types/internal-urls/history-protocol.d.ts +14 -0
  403. package/dist/types/internal-urls/index.d.ts +25 -0
  404. package/dist/types/internal-urls/issue-pr-protocol.d.ts +17 -0
  405. package/dist/types/internal-urls/json-query.d.ts +30 -0
  406. package/dist/types/internal-urls/local-protocol.d.ts +79 -0
  407. package/dist/types/internal-urls/mcp-protocol.d.ts +12 -0
  408. package/dist/types/internal-urls/memory-protocol.d.ts +24 -0
  409. package/dist/types/internal-urls/omp-protocol.d.ts +13 -0
  410. package/dist/types/internal-urls/parse.d.ts +19 -0
  411. package/dist/types/internal-urls/registry-helpers.d.ts +12 -0
  412. package/dist/types/internal-urls/router.d.ts +21 -0
  413. package/dist/types/internal-urls/rule-protocol.d.ts +7 -0
  414. package/dist/types/internal-urls/skill-protocol.d.ts +14 -0
  415. package/dist/types/internal-urls/ssh-protocol.d.ts +10 -0
  416. package/dist/types/internal-urls/types.d.ts +165 -0
  417. package/dist/types/internal-urls/vault-protocol.d.ts +93 -0
  418. package/dist/types/irc/bus.d.ts +85 -0
  419. package/dist/types/jsonrpc/message-framing.d.ts +35 -0
  420. package/dist/types/lib/xai-http.d.ts +40 -0
  421. package/dist/types/lsp/client.d.ts +84 -0
  422. package/dist/types/lsp/clients/biome-client.d.ts +16 -0
  423. package/dist/types/lsp/clients/index.d.ts +19 -0
  424. package/dist/types/lsp/clients/lsp-linter-client.d.ts +16 -0
  425. package/dist/types/lsp/clients/swiftlint-client.d.ts +20 -0
  426. package/dist/types/lsp/config.d.ts +65 -0
  427. package/dist/types/lsp/diagnostics-ledger.d.ts +10 -0
  428. package/dist/types/lsp/edits.d.ts +32 -0
  429. package/dist/types/lsp/format-options.d.ts +32 -0
  430. package/dist/types/lsp/index.d.ts +120 -0
  431. package/dist/types/lsp/lspmux.d.ts +58 -0
  432. package/dist/types/lsp/render.d.ts +32 -0
  433. package/dist/types/lsp/startup-events.d.ts +11 -0
  434. package/dist/types/lsp/types.d.ts +300 -0
  435. package/dist/types/lsp/utils.d.ts +116 -0
  436. package/dist/types/main.d.ts +70 -0
  437. package/dist/types/markit/converters/docx.d.ts +6 -0
  438. package/dist/types/markit/converters/epub.d.ts +15 -0
  439. package/dist/types/markit/converters/pdf/columns.d.ts +35 -0
  440. package/dist/types/markit/converters/pdf/extract.d.ts +10 -0
  441. package/dist/types/markit/converters/pdf/grid.d.ts +25 -0
  442. package/dist/types/markit/converters/pdf/headers.d.ts +24 -0
  443. package/dist/types/markit/converters/pdf/index.d.ts +6 -0
  444. package/dist/types/markit/converters/pdf/render.d.ts +24 -0
  445. package/dist/types/markit/converters/pdf/types.d.ts +75 -0
  446. package/dist/types/markit/converters/pptx.d.ts +57 -0
  447. package/dist/types/markit/converters/xlsx.d.ts +25 -0
  448. package/dist/types/markit/index.d.ts +2 -0
  449. package/dist/types/markit/registry.d.ts +16 -0
  450. package/dist/types/markit/types.d.ts +30 -0
  451. package/dist/types/mcp/client.d.ts +83 -0
  452. package/dist/types/mcp/config-writer.d.ts +101 -0
  453. package/dist/types/mcp/config.d.ts +75 -0
  454. package/dist/types/mcp/index.d.ts +18 -0
  455. package/dist/types/mcp/json-rpc.d.ts +32 -0
  456. package/dist/types/mcp/loader.d.ts +44 -0
  457. package/dist/types/mcp/manager.d.ts +215 -0
  458. package/dist/types/mcp/oauth-credentials.d.ts +17 -0
  459. package/dist/types/mcp/oauth-discovery.d.ts +35 -0
  460. package/dist/types/mcp/oauth-flow.d.ts +145 -0
  461. package/dist/types/mcp/render.d.ts +25 -0
  462. package/dist/types/mcp/smithery-auth.d.ts +16 -0
  463. package/dist/types/mcp/smithery-connect.d.ts +38 -0
  464. package/dist/types/mcp/smithery-registry.d.ts +51 -0
  465. package/dist/types/mcp/startup-events.d.ts +28 -0
  466. package/dist/types/mcp/timeout.d.ts +9 -0
  467. package/dist/types/mcp/tool-bridge.d.ts +95 -0
  468. package/dist/types/mcp/tool-cache.d.ts +8 -0
  469. package/dist/types/mcp/transports/http.d.ts +45 -0
  470. package/dist/types/mcp/transports/index.d.ts +6 -0
  471. package/dist/types/mcp/transports/sse.d.ts +20 -0
  472. package/dist/types/mcp/transports/stdio.d.ts +108 -0
  473. package/dist/types/mcp/transports/stdio.test.d.ts +1 -0
  474. package/dist/types/mcp/types.d.ts +340 -0
  475. package/dist/types/memories/index.d.ts +54 -0
  476. package/dist/types/memories/okf.d.ts +36 -0
  477. package/dist/types/memories/storage.d.ts +110 -0
  478. package/dist/types/memory-backend/index.d.ts +7 -0
  479. package/dist/types/memory-backend/local-backend.d.ts +10 -0
  480. package/dist/types/memory-backend/off-backend.d.ts +7 -0
  481. package/dist/types/memory-backend/resolve.d.ts +16 -0
  482. package/dist/types/memory-backend/runtime.d.ts +4 -0
  483. package/dist/types/memory-backend/types.d.ts +132 -0
  484. package/dist/types/mnemopi/backend.d.ts +4 -0
  485. package/dist/types/mnemopi/config.d.ts +60 -0
  486. package/dist/types/mnemopi/embed-client.d.ts +53 -0
  487. package/dist/types/mnemopi/embed-protocol.d.ts +52 -0
  488. package/dist/types/mnemopi/embed-worker.d.ts +12 -0
  489. package/dist/types/mnemopi/index.d.ts +3 -0
  490. package/dist/types/mnemopi/state.d.ts +130 -0
  491. package/dist/types/modes/acp/acp-agent.d.ts +60 -0
  492. package/dist/types/modes/acp/acp-client-bridge.d.ts +9 -0
  493. package/dist/types/modes/acp/acp-event-mapper.d.ts +33 -0
  494. package/dist/types/modes/acp/acp-mode.d.ts +5 -0
  495. package/dist/types/modes/acp/index.d.ts +2 -0
  496. package/dist/types/modes/acp/terminal-auth.d.ts +6 -0
  497. package/dist/types/modes/components/__tests__/assistant-agent-label.test.d.ts +1 -0
  498. package/dist/types/modes/components/__tests__/move-overlay.test.d.ts +1 -0
  499. package/dist/types/modes/components/__tests__/skill-message.test.d.ts +1 -0
  500. package/dist/types/modes/components/advisor-config.d.ts +59 -0
  501. package/dist/types/modes/components/advisor-message.d.ts +9 -0
  502. package/dist/types/modes/components/agent-dashboard.d.ts +22 -0
  503. package/dist/types/modes/components/agent-hub.d.ts +77 -0
  504. package/dist/types/modes/components/agent-transcript-viewer.d.ts +40 -0
  505. package/dist/types/modes/components/assistant-message.d.ts +57 -0
  506. package/dist/types/modes/components/background-tan-message.d.ts +9 -0
  507. package/dist/types/modes/components/bash-execution.d.ts +29 -0
  508. package/dist/types/modes/components/bordered-loader.d.ts +11 -0
  509. package/dist/types/modes/components/btw-panel.d.ts +19 -0
  510. package/dist/types/modes/components/cache-invalidation-marker.d.ts +52 -0
  511. package/dist/types/modes/components/chat-block.d.ts +64 -0
  512. package/dist/types/modes/components/chat-transcript-builder.d.ts +45 -0
  513. package/dist/types/modes/components/collab-prompt-message.d.ts +10 -0
  514. package/dist/types/modes/components/compaction-summary-message.d.ts +46 -0
  515. package/dist/types/modes/components/copy-selector.d.ts +22 -0
  516. package/dist/types/modes/components/countdown-timer.d.ts +14 -0
  517. package/dist/types/modes/components/custom-editor.d.ts +163 -0
  518. package/dist/types/modes/components/custom-editor.test.d.ts +1 -0
  519. package/dist/types/modes/components/custom-message.d.ts +15 -0
  520. package/dist/types/modes/components/diff.d.ts +11 -0
  521. package/dist/types/modes/components/dynamic-border.d.ts +14 -0
  522. package/dist/types/modes/components/error-banner.d.ts +11 -0
  523. package/dist/types/modes/components/eval-execution.d.ts +23 -0
  524. package/dist/types/modes/components/execution-shared.d.ts +46 -0
  525. package/dist/types/modes/components/extensions/extension-dashboard.d.ts +43 -0
  526. package/dist/types/modes/components/extensions/extension-list.d.ts +52 -0
  527. package/dist/types/modes/components/extensions/index.d.ts +8 -0
  528. package/dist/types/modes/components/extensions/inspector-panel.d.ts +8 -0
  529. package/dist/types/modes/components/extensions/state-manager.d.ts +50 -0
  530. package/dist/types/modes/components/extensions/types.d.ts +147 -0
  531. package/dist/types/modes/components/footer.d.ts +30 -0
  532. package/dist/types/modes/components/history-search.d.ts +7 -0
  533. package/dist/types/modes/components/hook-editor.d.ts +24 -0
  534. package/dist/types/modes/components/hook-input.d.ts +19 -0
  535. package/dist/types/modes/components/hook-message.d.ts +15 -0
  536. package/dist/types/modes/components/hook-selector.d.ts +68 -0
  537. package/dist/types/modes/components/index.d.ts +38 -0
  538. package/dist/types/modes/components/keybinding-hints.d.ts +40 -0
  539. package/dist/types/modes/components/late-diagnostics-message.d.ts +20 -0
  540. package/dist/types/modes/components/login-dialog.d.ts +32 -0
  541. package/dist/types/modes/components/logout-account-selector.d.ts +8 -0
  542. package/dist/types/modes/components/mcp-add-wizard.d.ts +38 -0
  543. package/dist/types/modes/components/message-frame.d.ts +44 -0
  544. package/dist/types/modes/components/model-selector.d.ts +36 -0
  545. package/dist/types/modes/components/move-overlay.d.ts +23 -0
  546. package/dist/types/modes/components/oauth-selector.d.ts +23 -0
  547. package/dist/types/modes/components/omfg-panel.d.ts +19 -0
  548. package/dist/types/modes/components/overlay-box.d.ts +17 -0
  549. package/dist/types/modes/components/plan-review-overlay.d.ts +61 -0
  550. package/dist/types/modes/components/plan-toc.d.ts +41 -0
  551. package/dist/types/modes/components/plugin-selector.d.ts +27 -0
  552. package/dist/types/modes/components/plugin-settings.d.ts +103 -0
  553. package/dist/types/modes/components/queue-mode-selector.d.ts +10 -0
  554. package/dist/types/modes/components/read-tool-group.d.ts +38 -0
  555. package/dist/types/modes/components/reset-usage-selector.d.ts +12 -0
  556. package/dist/types/modes/components/segment-track.d.ts +27 -0
  557. package/dist/types/modes/components/select-list-mouse-routing.d.ts +2 -0
  558. package/dist/types/modes/components/selector-helpers.d.ts +53 -0
  559. package/dist/types/modes/components/session-selector.d.ts +94 -0
  560. package/dist/types/modes/components/settings-defs.d.ts +60 -0
  561. package/dist/types/modes/components/settings-selector.d.ts +70 -0
  562. package/dist/types/modes/components/show-images-selector.d.ts +10 -0
  563. package/dist/types/modes/components/skill-message.d.ts +9 -0
  564. package/dist/types/modes/components/snapcompact-shape-preview.d.ts +31 -0
  565. package/dist/types/modes/components/status-line/component.d.ts +94 -0
  566. package/dist/types/modes/components/status-line/component.test.d.ts +1 -0
  567. package/dist/types/modes/components/status-line/context-thresholds.d.ts +10 -0
  568. package/dist/types/modes/components/status-line/git-utils.d.ts +22 -0
  569. package/dist/types/modes/components/status-line/index.d.ts +5 -0
  570. package/dist/types/modes/components/status-line/presets.d.ts +3 -0
  571. package/dist/types/modes/components/status-line/segments.d.ts +5 -0
  572. package/dist/types/modes/components/status-line/separators.d.ts +3 -0
  573. package/dist/types/modes/components/status-line/token-rate.d.ts +10 -0
  574. package/dist/types/modes/components/status-line/types.d.ts +150 -0
  575. package/dist/types/modes/components/theme-selector.d.ts +11 -0
  576. package/dist/types/modes/components/thinking-selector.d.ts +11 -0
  577. package/dist/types/modes/components/tiny-title-download-progress.d.ts +11 -0
  578. package/dist/types/modes/components/todo-reminder.d.ts +15 -0
  579. package/dist/types/modes/components/tool-execution.d.ts +124 -0
  580. package/dist/types/modes/components/transcript-container.d.ts +88 -0
  581. package/dist/types/modes/components/tree-selector.d.ts +31 -0
  582. package/dist/types/modes/components/ttsr-notification.d.ts +17 -0
  583. package/dist/types/modes/components/usage-row.d.ts +3 -0
  584. package/dist/types/modes/components/user-message-selector.d.ts +28 -0
  585. package/dist/types/modes/components/user-message.d.ts +9 -0
  586. package/dist/types/modes/components/visual-truncate.d.ts +19 -0
  587. package/dist/types/modes/components/welcome.d.ts +76 -0
  588. package/dist/types/modes/controllers/btw-controller.d.ts +14 -0
  589. package/dist/types/modes/controllers/command-controller-shared.d.ts +47 -0
  590. package/dist/types/modes/controllers/command-controller.d.ts +55 -0
  591. package/dist/types/modes/controllers/event-controller.d.ts +28 -0
  592. package/dist/types/modes/controllers/extension-ui-controller.d.ts +88 -0
  593. package/dist/types/modes/controllers/input-controller.d.ts +71 -0
  594. package/dist/types/modes/controllers/mcp-command-controller.d.ts +27 -0
  595. package/dist/types/modes/controllers/omfg-controller.d.ts +10 -0
  596. package/dist/types/modes/controllers/omfg-rule.d.ts +26 -0
  597. package/dist/types/modes/controllers/selector-controller.d.ts +61 -0
  598. package/dist/types/modes/controllers/session-focus-controller.d.ts +31 -0
  599. package/dist/types/modes/controllers/ssh-command-controller.d.ts +10 -0
  600. package/dist/types/modes/controllers/streaming-reveal.d.ts +45 -0
  601. package/dist/types/modes/controllers/tan-command-controller.d.ts +6 -0
  602. package/dist/types/modes/controllers/todo-command-controller.d.ts +7 -0
  603. package/dist/types/modes/controllers/tool-args-reveal.d.ts +77 -0
  604. package/dist/types/modes/emoji-autocomplete.d.ts +16 -0
  605. package/dist/types/modes/gradient-highlight.d.ts +32 -0
  606. package/dist/types/modes/image-references.d.ts +28 -0
  607. package/dist/types/modes/index.d.ts +10 -0
  608. package/dist/types/modes/interactive-mode.d.ts +399 -0
  609. package/dist/types/modes/internal-url-autocomplete.d.ts +43 -0
  610. package/dist/types/modes/loop-limit.d.ts +35 -0
  611. package/dist/types/modes/magic-keywords.d.ts +26 -0
  612. package/dist/types/modes/markdown-prose.d.ts +27 -0
  613. package/dist/types/modes/oauth-manual-input.d.ts +15 -0
  614. package/dist/types/modes/orchestrate.d.ts +15 -0
  615. package/dist/types/modes/print-mode.d.ts +29 -0
  616. package/dist/types/modes/prompt-action-autocomplete.d.ts +46 -0
  617. package/dist/types/modes/rpc/host-tools.d.ts +16 -0
  618. package/dist/types/modes/rpc/host-uris.d.ts +38 -0
  619. package/dist/types/modes/rpc/rpc-client.d.ts +300 -0
  620. package/dist/types/modes/rpc/rpc-mode.d.ts +145 -0
  621. package/dist/types/modes/rpc/rpc-subagents.d.ts +24 -0
  622. package/dist/types/modes/rpc/rpc-types.d.ts +699 -0
  623. package/dist/types/modes/running-subagent-badge.d.ts +6 -0
  624. package/dist/types/modes/runtime-init.d.ts +25 -0
  625. package/dist/types/modes/session-observer-registry.d.ts +35 -0
  626. package/dist/types/modes/session-teardown.d.ts +63 -0
  627. package/dist/types/modes/session-teardown.test.d.ts +1 -0
  628. package/dist/types/modes/setup-version.d.ts +11 -0
  629. package/dist/types/modes/setup-wizard/index.d.ts +22 -0
  630. package/dist/types/modes/setup-wizard/lazy.d.ts +2 -0
  631. package/dist/types/modes/setup-wizard/scenes/glyph.d.ts +2 -0
  632. package/dist/types/modes/setup-wizard/scenes/outro.d.ts +2 -0
  633. package/dist/types/modes/setup-wizard/scenes/providers.d.ts +2 -0
  634. package/dist/types/modes/setup-wizard/scenes/sign-in.d.ts +22 -0
  635. package/dist/types/modes/setup-wizard/scenes/splash.d.ts +11 -0
  636. package/dist/types/modes/setup-wizard/scenes/theme.d.ts +2 -0
  637. package/dist/types/modes/setup-wizard/scenes/types.d.ts +52 -0
  638. package/dist/types/modes/setup-wizard/scenes/web-search.d.ts +23 -0
  639. package/dist/types/modes/setup-wizard/startup-splash.d.ts +7 -0
  640. package/dist/types/modes/setup-wizard/wizard-overlay.d.ts +15 -0
  641. package/dist/types/modes/shared.d.ts +15 -0
  642. package/dist/types/modes/skill-command.d.ts +32 -0
  643. package/dist/types/modes/theme/defaults/index.d.ts +9436 -0
  644. package/dist/types/modes/theme/mermaid-cache.d.ts +26 -0
  645. package/dist/types/modes/theme/mermaid-rendering.test.d.ts +1 -0
  646. package/dist/types/modes/theme/shimmer.d.ts +40 -0
  647. package/dist/types/modes/theme/theme.d.ts +360 -0
  648. package/dist/types/modes/turn-budget.d.ts +18 -0
  649. package/dist/types/modes/types.d.ts +399 -0
  650. package/dist/types/modes/ultrathink.d.ts +15 -0
  651. package/dist/types/modes/utils/context-usage.d.ts +64 -0
  652. package/dist/types/modes/utils/copy-targets.d.ts +75 -0
  653. package/dist/types/modes/utils/hotkeys-markdown.d.ts +5 -0
  654. package/dist/types/modes/utils/interactive-context-helpers.d.ts +14 -0
  655. package/dist/types/modes/utils/keybinding-matchers.d.ts +32 -0
  656. package/dist/types/modes/utils/tools-markdown.d.ts +5 -0
  657. package/dist/types/modes/utils/transcript-render-helpers.d.ts +54 -0
  658. package/dist/types/modes/utils/ui-helpers.d.ts +55 -0
  659. package/dist/types/modes/workflow.d.ts +15 -0
  660. package/dist/types/plan-mode/approved-plan-prompt.test.d.ts +1 -0
  661. package/dist/types/plan-mode/approved-plan.d.ts +68 -0
  662. package/dist/types/plan-mode/plan-handoff.d.ts +20 -0
  663. package/dist/types/plan-mode/plan-protection.d.ts +12 -0
  664. package/dist/types/plan-mode/state.d.ts +6 -0
  665. package/dist/types/registry/agent-lifecycle.d.ts +66 -0
  666. package/dist/types/registry/agent-registry.d.ts +97 -0
  667. package/dist/types/sdk.d.ts +370 -0
  668. package/dist/types/secrets/index.d.ts +9 -0
  669. package/dist/types/secrets/obfuscator.d.ts +63 -0
  670. package/dist/types/secrets/regex.d.ts +2 -0
  671. package/dist/types/session/agent-session.d.ts +1420 -0
  672. package/dist/types/session/agent-storage.d.ts +97 -0
  673. package/dist/types/session/artifacts.d.ts +61 -0
  674. package/dist/types/session/auth-broker-config.d.ts +45 -0
  675. package/dist/types/session/auth-storage.d.ts +7 -0
  676. package/dist/types/session/blob-store.d.ts +68 -0
  677. package/dist/types/session/client-bridge.d.ts +88 -0
  678. package/dist/types/session/codex-auto-reset.d.ts +111 -0
  679. package/dist/types/session/compact-modes.d.ts +60 -0
  680. package/dist/types/session/exit-diagnostics.d.ts +48 -0
  681. package/dist/types/session/history-storage.d.ts +30 -0
  682. package/dist/types/session/indexed-session-storage.d.ts +65 -0
  683. package/dist/types/session/messages.d.ts +220 -0
  684. package/dist/types/session/messages.test.d.ts +1 -0
  685. package/dist/types/session/provider-image-budget.d.ts +3 -0
  686. package/dist/types/session/redis-session-storage.d.ts +51 -0
  687. package/dist/types/session/session-context.d.ts +44 -0
  688. package/dist/types/session/session-dump-format.d.ts +30 -0
  689. package/dist/types/session/session-entries.d.ts +197 -0
  690. package/dist/types/session/session-history-format.d.ts +49 -0
  691. package/dist/types/session/session-listing.d.ts +78 -0
  692. package/dist/types/session/session-loader.d.ts +29 -0
  693. package/dist/types/session/session-manager.d.ts +306 -0
  694. package/dist/types/session/session-migrations.d.ts +12 -0
  695. package/dist/types/session/session-paths.d.ts +25 -0
  696. package/dist/types/session/session-persistence.d.ts +12 -0
  697. package/dist/types/session/session-storage.d.ts +101 -0
  698. package/dist/types/session/session-title-slot.d.ts +19 -0
  699. package/dist/types/session/settings-stream-fn.d.ts +21 -0
  700. package/dist/types/session/shake-types.d.ts +24 -0
  701. package/dist/types/session/snapcompact-inline.d.ts +145 -0
  702. package/dist/types/session/snapcompact-savings-journal.d.ts +46 -0
  703. package/dist/types/session/sql-session-storage.d.ts +72 -0
  704. package/dist/types/session/streaming-output.d.ts +229 -0
  705. package/dist/types/session/tool-choice-queue.d.ts +94 -0
  706. package/dist/types/session/turn-persistence.d.ts +88 -0
  707. package/dist/types/session/unexpected-stop-classifier.d.ts +13 -0
  708. package/dist/types/session/yield-queue.d.ts +37 -0
  709. package/dist/types/slash-commands/acp-builtins.d.ts +34 -0
  710. package/dist/types/slash-commands/available-commands.d.ts +34 -0
  711. package/dist/types/slash-commands/builtin-registry.d.ts +36 -0
  712. package/dist/types/slash-commands/helpers/active-oauth-account.d.ts +14 -0
  713. package/dist/types/slash-commands/helpers/collab-qrcode.d.ts +13 -0
  714. package/dist/types/slash-commands/helpers/context-report.d.ts +7 -0
  715. package/dist/types/slash-commands/helpers/format.d.ts +10 -0
  716. package/dist/types/slash-commands/helpers/logout.d.ts +15 -0
  717. package/dist/types/slash-commands/helpers/marketplace-manager.d.ts +8 -0
  718. package/dist/types/slash-commands/helpers/mcp.d.ts +3 -0
  719. package/dist/types/slash-commands/helpers/parse.d.ts +33 -0
  720. package/dist/types/slash-commands/helpers/reset-usage.d.ts +27 -0
  721. package/dist/types/slash-commands/helpers/ssh.d.ts +3 -0
  722. package/dist/types/slash-commands/helpers/stats-dashboard.d.ts +13 -0
  723. package/dist/types/slash-commands/helpers/todo.d.ts +3 -0
  724. package/dist/types/slash-commands/helpers/usage-report.d.ts +7 -0
  725. package/dist/types/slash-commands/marketplace-install-parser.d.ts +33 -0
  726. package/dist/types/slash-commands/types.d.ts +127 -0
  727. package/dist/types/ssh/__tests__/connection-manager-args.test.d.ts +1 -0
  728. package/dist/types/ssh/__tests__/file-transfer-posix-guard.test.d.ts +1 -0
  729. package/dist/types/ssh/config-writer.d.ts +49 -0
  730. package/dist/types/ssh/connection-manager.d.ts +90 -0
  731. package/dist/types/ssh/file-transfer.d.ts +79 -0
  732. package/dist/types/ssh/ssh-executor.d.ts +37 -0
  733. package/dist/types/ssh/sshfs-mount.d.ts +6 -0
  734. package/dist/types/ssh/utils.d.ts +24 -0
  735. package/dist/types/startup-splash.d.ts +12 -0
  736. package/dist/types/stt/asr-client.d.ts +68 -0
  737. package/dist/types/stt/asr-protocol.d.ts +97 -0
  738. package/dist/types/stt/asr-worker.d.ts +2 -0
  739. package/dist/types/stt/downloader.d.ts +47 -0
  740. package/dist/types/stt/endpointer.d.ts +59 -0
  741. package/dist/types/stt/index.d.ts +8 -0
  742. package/dist/types/stt/models.d.ts +120 -0
  743. package/dist/types/stt/recorder.d.ts +30 -0
  744. package/dist/types/stt/stt-controller.d.ts +24 -0
  745. package/dist/types/stt/submit-trigger.d.ts +30 -0
  746. package/dist/types/stt/transcriber.d.ts +14 -0
  747. package/dist/types/stt/wav.d.ts +29 -0
  748. package/dist/types/subprocess/worker-client.d.ts +149 -0
  749. package/dist/types/subprocess/worker-runtime.d.ts +107 -0
  750. package/dist/types/system-prompt.d.ts +128 -0
  751. package/dist/types/system-prompt.test.d.ts +1 -0
  752. package/dist/types/task/agents.d.ts +28 -0
  753. package/dist/types/task/commands.d.ts +35 -0
  754. package/dist/types/task/critic-gate.d.ts +76 -0
  755. package/dist/types/task/critic-gate.test.d.ts +1 -0
  756. package/dist/types/task/discovery.d.ts +17 -0
  757. package/dist/types/task/executor.d.ts +214 -0
  758. package/dist/types/task/index.d.ts +79 -0
  759. package/dist/types/task/isolation-runner.d.ts +128 -0
  760. package/dist/types/task/name-generator.d.ts +16 -0
  761. package/dist/types/task/omp-command.d.ts +7 -0
  762. package/dist/types/task/output-manager.d.ts +20 -0
  763. package/dist/types/task/parallel.d.ts +55 -0
  764. package/dist/types/task/persisted-revive.d.ts +36 -0
  765. package/dist/types/task/provider-concurrency.d.ts +40 -0
  766. package/dist/types/task/render.d.ts +34 -0
  767. package/dist/types/task/render.test.d.ts +1 -0
  768. package/dist/types/task/renderer.d.ts +13 -0
  769. package/dist/types/task/repair-args.d.ts +53 -0
  770. package/dist/types/task/spawn-policy.d.ts +17 -0
  771. package/dist/types/task/spawn-policy.test.d.ts +1 -0
  772. package/dist/types/task/subprocess-tool-registry.d.ts +72 -0
  773. package/dist/types/task/types.d.ts +384 -0
  774. package/dist/types/task/worktree.d.ts +135 -0
  775. package/dist/types/task/yield-assembly.d.ts +28 -0
  776. package/dist/types/telemetry-export.d.ts +43 -0
  777. package/dist/types/thinking.d.ts +96 -0
  778. package/dist/types/tiny/device.d.ts +78 -0
  779. package/dist/types/tiny/dtype.d.ts +85 -0
  780. package/dist/types/tiny/models.d.ts +230 -0
  781. package/dist/types/tiny/text.d.ts +44 -0
  782. package/dist/types/tiny/title-client.d.ts +68 -0
  783. package/dist/types/tiny/title-protocol.d.ts +78 -0
  784. package/dist/types/tiny/worker.d.ts +2 -0
  785. package/dist/types/tool-discovery/mode.d.ts +8 -0
  786. package/dist/types/tool-discovery/tool-index.d.ts +57 -0
  787. package/dist/types/tools/__tests__/eval-description.test.d.ts +1 -0
  788. package/dist/types/tools/__tests__/json-tree.test.d.ts +1 -0
  789. package/dist/types/tools/acp-bridge.d.ts +29 -0
  790. package/dist/types/tools/approval.d.ts +46 -0
  791. package/dist/types/tools/ask.d.ts +119 -0
  792. package/dist/types/tools/ast-edit.d.ts +84 -0
  793. package/dist/types/tools/ast-grep.d.ts +74 -0
  794. package/dist/types/tools/auto-generated-guard.d.ts +17 -0
  795. package/dist/types/tools/bash-command-fixup.d.ts +11 -0
  796. package/dist/types/tools/bash-interactive.d.ts +16 -0
  797. package/dist/types/tools/bash-interceptor.d.ts +24 -0
  798. package/dist/types/tools/bash-pty-selection.d.ts +7 -0
  799. package/dist/types/tools/bash-skill-urls.d.ts +31 -0
  800. package/dist/types/tools/bash.d.ts +148 -0
  801. package/dist/types/tools/browser/aria/aria-snapshot.d.ts +39 -0
  802. package/dist/types/tools/browser/attach.d.ts +34 -0
  803. package/dist/types/tools/browser/cmux/cmux-tab.d.ts +212 -0
  804. package/dist/types/tools/browser/cmux/rpc.d.ts +70 -0
  805. package/dist/types/tools/browser/cmux/socket-client.d.ts +19 -0
  806. package/dist/types/tools/browser/launch.d.ts +67 -0
  807. package/dist/types/tools/browser/readable.d.ts +17 -0
  808. package/dist/types/tools/browser/registry.d.ts +58 -0
  809. package/dist/types/tools/browser/render.d.ts +52 -0
  810. package/dist/types/tools/browser/run-cancellation.d.ts +4 -0
  811. package/dist/types/tools/browser/tab-protocol.d.ts +146 -0
  812. package/dist/types/tools/browser/tab-supervisor.d.ts +104 -0
  813. package/dist/types/tools/browser/tab-worker-entry.d.ts +1 -0
  814. package/dist/types/tools/browser/tab-worker.d.ts +56 -0
  815. package/dist/types/tools/browser.d.ts +96 -0
  816. package/dist/types/tools/builtin-names.d.ts +6 -0
  817. package/dist/types/tools/checkpoint.d.ts +72 -0
  818. package/dist/types/tools/conflict-detect.d.ts +221 -0
  819. package/dist/types/tools/context.d.ts +19 -0
  820. package/dist/types/tools/debug.d.ts +156 -0
  821. package/dist/types/tools/eval-backends.d.ts +15 -0
  822. package/dist/types/tools/eval-render.d.ts +58 -0
  823. package/dist/types/tools/eval.d.ts +66 -0
  824. package/dist/types/tools/fetch.d.ts +99 -0
  825. package/dist/types/tools/file-recorder.d.ts +13 -0
  826. package/dist/types/tools/fs-cache-invalidation.d.ts +15 -0
  827. package/dist/types/tools/gh-cache-invalidation.d.ts +6 -0
  828. package/dist/types/tools/gh-format.d.ts +6 -0
  829. package/dist/types/tools/gh-renderer.d.ts +25 -0
  830. package/dist/types/tools/gh.d.ts +331 -0
  831. package/dist/types/tools/github-cache.d.ts +123 -0
  832. package/dist/types/tools/glob.d.ts +94 -0
  833. package/dist/types/tools/grep.d.ts +98 -0
  834. package/dist/types/tools/grouped-file-output.d.ts +70 -0
  835. package/dist/types/tools/image-gen.d.ts +66 -0
  836. package/dist/types/tools/index.d.ts +373 -0
  837. package/dist/types/tools/inspect-image-renderer.d.ts +26 -0
  838. package/dist/types/tools/inspect-image.d.ts +32 -0
  839. package/dist/types/tools/irc.d.ts +112 -0
  840. package/dist/types/tools/job.d.ts +73 -0
  841. package/dist/types/tools/json-tree.d.ts +23 -0
  842. package/dist/types/tools/jtd-to-json-schema.d.ts +29 -0
  843. package/dist/types/tools/jtd-to-typescript.d.ts +26 -0
  844. package/dist/types/tools/jtd-utils.d.ts +42 -0
  845. package/dist/types/tools/learn.d.ts +44 -0
  846. package/dist/types/tools/list-limit.d.ts +12 -0
  847. package/dist/types/tools/manage-skill.d.ts +31 -0
  848. package/dist/types/tools/match-line-format.d.ts +11 -0
  849. package/dist/types/tools/memory-edit.d.ts +31 -0
  850. package/dist/types/tools/memory-recall.d.ts +23 -0
  851. package/dist/types/tools/memory-reflect.d.ts +25 -0
  852. package/dist/types/tools/memory-render.d.ts +63 -0
  853. package/dist/types/tools/memory-retain.d.ts +29 -0
  854. package/dist/types/tools/output-meta.d.ts +211 -0
  855. package/dist/types/tools/output-schema-validator.d.ts +77 -0
  856. package/dist/types/tools/path-utils.d.ts +260 -0
  857. package/dist/types/tools/plan-mode-guard.d.ts +41 -0
  858. package/dist/types/tools/read.d.ts +87 -0
  859. package/dist/types/tools/render-utils.d.ts +218 -0
  860. package/dist/types/tools/renderers.d.ts +45 -0
  861. package/dist/types/tools/report-tool-issue.d.ts +127 -0
  862. package/dist/types/tools/resolve.d.ts +94 -0
  863. package/dist/types/tools/review.d.ts +59 -0
  864. package/dist/types/tools/search-tool-bm25.d.ts +65 -0
  865. package/dist/types/tools/sqlite-reader.d.ts +114 -0
  866. package/dist/types/tools/ssh.d.ts +73 -0
  867. package/dist/types/tools/todo.d.ts +126 -0
  868. package/dist/types/tools/tool-errors.d.ts +33 -0
  869. package/dist/types/tools/tool-result.d.ts +34 -0
  870. package/dist/types/tools/tool-timeouts.d.ts +51 -0
  871. package/dist/types/tools/tts.d.ts +42 -0
  872. package/dist/types/tools/write.d.ts +66 -0
  873. package/dist/types/tools/yield.d.ts +39 -0
  874. package/dist/types/tts/downloader.d.ts +20 -0
  875. package/dist/types/tts/index.d.ts +8 -0
  876. package/dist/types/tts/models.d.ts +82 -0
  877. package/dist/types/tts/player.d.ts +32 -0
  878. package/dist/types/tts/runtime.d.ts +6 -0
  879. package/dist/types/tts/streaming-player.d.ts +41 -0
  880. package/dist/types/tts/tts-client.d.ts +68 -0
  881. package/dist/types/tts/tts-protocol.d.ts +95 -0
  882. package/dist/types/tts/tts-worker.d.ts +2 -0
  883. package/dist/types/tts/vocalizer.d.ts +41 -0
  884. package/dist/types/tts/wav.d.ts +8 -0
  885. package/dist/types/tui/code-cell.d.ts +47 -0
  886. package/dist/types/tui/file-list.d.ts +22 -0
  887. package/dist/types/tui/hyperlink.d.ts +61 -0
  888. package/dist/types/tui/index.d.ts +12 -0
  889. package/dist/types/tui/output-block.d.ts +59 -0
  890. package/dist/types/tui/status-line.d.ts +21 -0
  891. package/dist/types/tui/tree-list.d.ts +20 -0
  892. package/dist/types/tui/types.d.ts +13 -0
  893. package/dist/types/tui/utils.d.ts +36 -0
  894. package/dist/types/tui/width-aware-text.d.ts +23 -0
  895. package/dist/types/utils/active-repo-context.d.ts +8 -0
  896. package/dist/types/utils/block-context.d.ts +35 -0
  897. package/dist/types/utils/changelog.d.ts +33 -0
  898. package/dist/types/utils/clipboard.d.ts +37 -0
  899. package/dist/types/utils/command-args.d.ts +9 -0
  900. package/dist/types/utils/commit-message-generator.d.ts +7 -0
  901. package/dist/types/utils/edit-mode.d.ts +13 -0
  902. package/dist/types/utils/enhanced-paste.d.ts +20 -0
  903. package/dist/types/utils/event-bus.d.ts +6 -0
  904. package/dist/types/utils/external-editor.d.ts +27 -0
  905. package/dist/types/utils/file-display-mode.d.ts +27 -0
  906. package/dist/types/utils/file-mentions.d.ts +13 -0
  907. package/dist/types/utils/git.d.ts +453 -0
  908. package/dist/types/utils/image-loading.d.ts +67 -0
  909. package/dist/types/utils/image-resize.d.ts +42 -0
  910. package/dist/types/utils/image-vision-fallback.d.ts +28 -0
  911. package/dist/types/utils/ipc.d.ts +22 -0
  912. package/dist/types/utils/jj.d.ts +74 -0
  913. package/dist/types/utils/lang-from-path.d.ts +8 -0
  914. package/dist/types/utils/markit-cache.d.ts +23 -0
  915. package/dist/types/utils/markit.d.ts +20 -0
  916. package/dist/types/utils/mupdf-wasm-embed.d.ts +1 -0
  917. package/dist/types/utils/open.d.ts +2 -0
  918. package/dist/types/utils/prompt-path.d.ts +1 -0
  919. package/dist/types/utils/qrcode.d.ts +48 -0
  920. package/dist/types/utils/session-color.d.ts +27 -0
  921. package/dist/types/utils/shell-snapshot.d.ts +15 -0
  922. package/dist/types/utils/sixel.d.ts +21 -0
  923. package/dist/types/utils/thinking-display.d.ts +7 -0
  924. package/dist/types/utils/title-generator.d.ts +33 -0
  925. package/dist/types/utils/tool-choice.d.ts +15 -0
  926. package/dist/types/utils/tools-manager.d.ts +12 -0
  927. package/dist/types/utils/turndown.d.ts +15 -0
  928. package/dist/types/utils/zip.d.ts +119 -0
  929. package/dist/types/web/kagi.d.ts +99 -0
  930. package/dist/types/web/parallel.d.ts +67 -0
  931. package/dist/types/web/scrapers/artifacthub.d.ts +6 -0
  932. package/dist/types/web/scrapers/arxiv.d.ts +5 -0
  933. package/dist/types/web/scrapers/aur.d.ts +5 -0
  934. package/dist/types/web/scrapers/biorxiv.d.ts +5 -0
  935. package/dist/types/web/scrapers/bluesky.d.ts +5 -0
  936. package/dist/types/web/scrapers/brew.d.ts +5 -0
  937. package/dist/types/web/scrapers/cheatsh.d.ts +8 -0
  938. package/dist/types/web/scrapers/chocolatey.d.ts +5 -0
  939. package/dist/types/web/scrapers/choosealicense.d.ts +2 -0
  940. package/dist/types/web/scrapers/cisa-kev.d.ts +5 -0
  941. package/dist/types/web/scrapers/clojars.d.ts +5 -0
  942. package/dist/types/web/scrapers/coingecko.d.ts +5 -0
  943. package/dist/types/web/scrapers/crates-io.d.ts +5 -0
  944. package/dist/types/web/scrapers/crossref.d.ts +2 -0
  945. package/dist/types/web/scrapers/devto.d.ts +5 -0
  946. package/dist/types/web/scrapers/discogs.d.ts +8 -0
  947. package/dist/types/web/scrapers/discourse.d.ts +5 -0
  948. package/dist/types/web/scrapers/dockerhub.d.ts +5 -0
  949. package/dist/types/web/scrapers/docs-rs.d.ts +2 -0
  950. package/dist/types/web/scrapers/fdroid.d.ts +5 -0
  951. package/dist/types/web/scrapers/firefox-addons.d.ts +2 -0
  952. package/dist/types/web/scrapers/flathub.d.ts +2 -0
  953. package/dist/types/web/scrapers/github-gist.d.ts +5 -0
  954. package/dist/types/web/scrapers/github.d.ts +34 -0
  955. package/dist/types/web/scrapers/gitlab.d.ts +5 -0
  956. package/dist/types/web/scrapers/go-pkg.d.ts +5 -0
  957. package/dist/types/web/scrapers/hackage.d.ts +5 -0
  958. package/dist/types/web/scrapers/hackernews.d.ts +2 -0
  959. package/dist/types/web/scrapers/hex.d.ts +5 -0
  960. package/dist/types/web/scrapers/huggingface.d.ts +2 -0
  961. package/dist/types/web/scrapers/iacr.d.ts +5 -0
  962. package/dist/types/web/scrapers/index.d.ts +84 -0
  963. package/dist/types/web/scrapers/jetbrains-marketplace.d.ts +2 -0
  964. package/dist/types/web/scrapers/lemmy.d.ts +2 -0
  965. package/dist/types/web/scrapers/lobsters.d.ts +5 -0
  966. package/dist/types/web/scrapers/mastodon.d.ts +5 -0
  967. package/dist/types/web/scrapers/maven.d.ts +6 -0
  968. package/dist/types/web/scrapers/mdn.d.ts +2 -0
  969. package/dist/types/web/scrapers/metacpan.d.ts +5 -0
  970. package/dist/types/web/scrapers/musicbrainz.d.ts +5 -0
  971. package/dist/types/web/scrapers/npm.d.ts +5 -0
  972. package/dist/types/web/scrapers/nuget.d.ts +5 -0
  973. package/dist/types/web/scrapers/nvd.d.ts +5 -0
  974. package/dist/types/web/scrapers/ollama.d.ts +2 -0
  975. package/dist/types/web/scrapers/open-vsx.d.ts +5 -0
  976. package/dist/types/web/scrapers/opencorporates.d.ts +5 -0
  977. package/dist/types/web/scrapers/openlibrary.d.ts +5 -0
  978. package/dist/types/web/scrapers/orcid.d.ts +5 -0
  979. package/dist/types/web/scrapers/osv.d.ts +5 -0
  980. package/dist/types/web/scrapers/packagist.d.ts +5 -0
  981. package/dist/types/web/scrapers/pub-dev.d.ts +5 -0
  982. package/dist/types/web/scrapers/pubmed.d.ts +5 -0
  983. package/dist/types/web/scrapers/pypi.d.ts +5 -0
  984. package/dist/types/web/scrapers/rawg.d.ts +2 -0
  985. package/dist/types/web/scrapers/readthedocs.d.ts +5 -0
  986. package/dist/types/web/scrapers/reddit.d.ts +5 -0
  987. package/dist/types/web/scrapers/repology.d.ts +5 -0
  988. package/dist/types/web/scrapers/rfc.d.ts +5 -0
  989. package/dist/types/web/scrapers/rubygems.d.ts +5 -0
  990. package/dist/types/web/scrapers/searchcode.d.ts +2 -0
  991. package/dist/types/web/scrapers/sec-edgar.d.ts +5 -0
  992. package/dist/types/web/scrapers/semantic-scholar.d.ts +2 -0
  993. package/dist/types/web/scrapers/snapcraft.d.ts +2 -0
  994. package/dist/types/web/scrapers/sourcegraph.d.ts +2 -0
  995. package/dist/types/web/scrapers/spdx.d.ts +5 -0
  996. package/dist/types/web/scrapers/spotify.d.ts +8 -0
  997. package/dist/types/web/scrapers/stackoverflow.d.ts +6 -0
  998. package/dist/types/web/scrapers/terraform.d.ts +5 -0
  999. package/dist/types/web/scrapers/tldr.d.ts +7 -0
  1000. package/dist/types/web/scrapers/twitter.d.ts +5 -0
  1001. package/dist/types/web/scrapers/types.d.ts +90 -0
  1002. package/dist/types/web/scrapers/utils.d.ts +26 -0
  1003. package/dist/types/web/scrapers/vimeo.d.ts +5 -0
  1004. package/dist/types/web/scrapers/vscode-marketplace.d.ts +5 -0
  1005. package/dist/types/web/scrapers/w3c.d.ts +2 -0
  1006. package/dist/types/web/scrapers/wikidata.d.ts +5 -0
  1007. package/dist/types/web/scrapers/wikipedia.d.ts +5 -0
  1008. package/dist/types/web/scrapers/youtube.d.ts +5 -0
  1009. package/dist/types/web/search/index.d.ts +74 -0
  1010. package/dist/types/web/search/provider.d.ts +30 -0
  1011. package/dist/types/web/search/providers/anthropic.d.ts +33 -0
  1012. package/dist/types/web/search/providers/base.d.ts +83 -0
  1013. package/dist/types/web/search/providers/brave.d.ts +28 -0
  1014. package/dist/types/web/search/providers/codex.d.ts +36 -0
  1015. package/dist/types/web/search/providers/duckduckgo.d.ts +14 -0
  1016. package/dist/types/web/search/providers/exa.d.ts +70 -0
  1017. package/dist/types/web/search/providers/firecrawl.d.ts +28 -0
  1018. package/dist/types/web/search/providers/gemini.d.ts +62 -0
  1019. package/dist/types/web/search/providers/jina.d.ts +31 -0
  1020. package/dist/types/web/search/providers/kagi.d.ts +30 -0
  1021. package/dist/types/web/search/providers/kimi.d.ts +32 -0
  1022. package/dist/types/web/search/providers/parallel.d.ts +16 -0
  1023. package/dist/types/web/search/providers/perplexity-auth.d.ts +37 -0
  1024. package/dist/types/web/search/providers/perplexity.d.ts +58 -0
  1025. package/dist/types/web/search/providers/searxng.d.ts +45 -0
  1026. package/dist/types/web/search/providers/synthetic.d.ts +25 -0
  1027. package/dist/types/web/search/providers/tavily.d.ts +30 -0
  1028. package/dist/types/web/search/providers/tinyfish.d.ts +29 -0
  1029. package/dist/types/web/search/providers/utils.d.ts +52 -0
  1030. package/dist/types/web/search/providers/xai.d.ts +13 -0
  1031. package/dist/types/web/search/providers/zai.d.ts +29 -0
  1032. package/dist/types/web/search/render.d.ts +34 -0
  1033. package/dist/types/web/search/types.d.ts +431 -0
  1034. package/dist/types/web/search/utils.d.ts +4 -0
  1035. package/dist/types/workspace-tree.d.ts +42 -0
  1036. package/package.json +39 -39
  1037. package/src/autolearn/managed-skills.ts +1 -1
  1038. package/src/autoresearch/storage.ts +1 -1
  1039. package/src/capability/types.ts +2 -2
  1040. package/src/cli/args.ts +1 -1
  1041. package/src/cli/auth-broker-cli.ts +4 -4
  1042. package/src/cli/auth-gateway-cli.ts +4 -4
  1043. package/src/cli/claude-trace-cli.ts +1 -1
  1044. package/src/cli/flag-tables.ts +1 -1
  1045. package/src/cli/gallery-fixtures/misc.ts +7 -7
  1046. package/src/cli/gallery-screenshot.ts +2 -2
  1047. package/src/cli/grievances-cli.ts +1 -1
  1048. package/src/cli/plugin-cli.ts +2 -2
  1049. package/src/cli/profile-alias.ts +8 -8
  1050. package/src/cli/read-cli.ts +1 -1
  1051. package/src/cli/update-cli.ts +27 -27
  1052. package/src/cli.ts +5 -5
  1053. package/src/commands/auth-broker.ts +1 -1
  1054. package/src/commands/dry-balance.ts +6 -6
  1055. package/src/commands/launch.ts +1 -1
  1056. package/src/commands/say.ts +1 -1
  1057. package/src/commands/token.ts +5 -5
  1058. package/src/commit/agentic/prompts/system.md +1 -1
  1059. package/src/commit/cli.ts +1 -1
  1060. package/src/commit/index.ts +1 -1
  1061. package/src/commit/pipeline.ts +1 -1
  1062. package/src/commit/types.ts +1 -1
  1063. package/src/config/mcp-schema.json +5 -5
  1064. package/src/config/models-config-schema.ts +1 -1
  1065. package/src/config/settings-schema.ts +6 -6
  1066. package/src/config/settings.ts +1 -1
  1067. package/src/dap/session.ts +2 -2
  1068. package/src/debug/protocol-probe.ts +1 -1
  1069. package/src/debug/raw-sse-buffer.ts +3 -3
  1070. package/src/debug/raw-sse.ts +2 -2
  1071. package/src/discovery/helpers.ts +2 -2
  1072. package/src/discovery/substitute-plugin-root.ts +3 -3
  1073. package/src/eval/rb/runner.rb +6 -6
  1074. package/src/extensibility/extensions/loader.ts +6 -2
  1075. package/src/extensibility/plugins/installer.ts +2 -2
  1076. package/src/extensibility/plugins/legacy-pi-bundled-keys.ts +3 -0
  1077. package/src/extensibility/plugins/legacy-pi-bundled-registry.ts +11 -0
  1078. package/src/extensibility/plugins/loader.ts +14 -7
  1079. package/src/extensibility/plugins/manager.ts +13 -10
  1080. package/src/extensibility/plugins/types.ts +16 -3
  1081. package/src/mcp/client.ts +1 -1
  1082. package/src/mcp/manager.ts +1 -1
  1083. package/src/mcp/oauth-flow.ts +1 -1
  1084. package/src/mcp/timeout.ts +2 -2
  1085. package/src/mcp/transports/http.ts +1 -1
  1086. package/src/modes/controllers/mcp-command-controller.ts +2 -2
  1087. package/src/modes/setup-wizard/index.ts +1 -1
  1088. package/src/sdk.ts +1 -1
  1089. package/src/session/agent-session.ts +1 -1
  1090. package/src/session/auth-broker-config.ts +4 -4
  1091. package/src/system-prompt.test.ts +15 -15
  1092. package/src/tools/browser/tab-protocol.ts +1 -1
  1093. package/src/tools/grep.ts +2 -2
  1094. package/src/tools/read.ts +1 -1
  1095. package/src/utils/image-loading.ts +4 -4
  1096. package/src/utils/image-resize.ts +5 -5
  1097. package/src/web/search/index.ts +1 -1
@@ -0,0 +1,1420 @@
1
+ /**
2
+ * AgentSession - Core abstraction for agent lifecycle and session management.
3
+ *
4
+ * This class is shared between all run modes (interactive, print, rpc).
5
+ * It encapsulates:
6
+ * - Agent state access
7
+ * - Event subscription with automatic session persistence
8
+ * - Model and thinking level management
9
+ * - Compaction (manual and auto)
10
+ * - Bash execution
11
+ * - Session switching and branching
12
+ *
13
+ * Modes use this class and add their own I/O layer on top.
14
+ */
15
+ import { Agent, type AgentEvent, type AgentMessage, type AgentState, type AgentTool, type StreamFn, ThinkingLevel, type ToolChoiceDirective } from "jeopi-agent-core";
16
+ import { type CompactionResult, type ShakeConfig } from "jeopi-agent-core/compaction";
17
+ import type { AssistantMessage, Context, ImageContent, Message, MessageAttribution, Model, ProviderSessionState, ResetCreditAccountStatus, ResetCreditRedeemOutcome, ResetCreditTarget, ServiceTier, ServiceTierByFamily, ServiceTierFamily, SimpleStreamOptions, TextContent, ToolChoice, UsageReport } from "jeopi-ai";
18
+ import { Effort } from "jeopi-ai";
19
+ import type { InMemorySnapshotStore } from "jeopi-hashline";
20
+ import { postmortem } from "jeopi-utils";
21
+ import { type AdvisorConfig } from "../advisor";
22
+ import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager } from "../async";
23
+ import type { Rule } from "../capability/rule";
24
+ import type { ModelRegistry } from "../config/model-registry";
25
+ import { type ResolvedModelRoleValue } from "../config/model-resolver";
26
+ import { type PromptTemplate } from "../config/prompt-templates";
27
+ import type { Settings, SkillsSettings } from "../config/settings";
28
+ import { RawSseDebugBuffer } from "../debug/raw-sse-buffer";
29
+ import { type PythonResult } from "../eval/py/executor";
30
+ import { type BashResult } from "../exec/bash-executor";
31
+ import type { TtsrManager } from "../export/ttsr";
32
+ import type { LoadedCustomCommand } from "../extensibility/custom-commands";
33
+ import type { CustomTool } from "../extensibility/custom-tools/types";
34
+ import type { ExtensionRunner } from "../extensibility/extensions";
35
+ import type { CompactOptions, ContextUsage } from "../extensibility/extensions/types";
36
+ import type { Skill, SkillWarning } from "../extensibility/skills";
37
+ import { type FileSlashCommand } from "../extensibility/slash-commands";
38
+ import { GoalRuntime } from "../goals/runtime";
39
+ import type { Goal, GoalModeState } from "../goals/state";
40
+ import type { HindsightSessionState } from "../hindsight/state";
41
+ import { type IrcMessage } from "../irc/bus";
42
+ import { type MnemopiSessionState } from "../mnemopi/state";
43
+ import type { PlanModeState } from "../plan-mode/state";
44
+ import { type SecretObfuscator } from "../secrets/obfuscator";
45
+ import type { CriticGateState } from "../task/critic-gate";
46
+ import { type ConfiguredThinkingLevel } from "../thinking";
47
+ import { type DiscoverableTool, type DiscoverableToolSearchIndex } from "../tool-discovery/tool-index";
48
+ import type { CheckpointState, CompletedRewindState } from "../tools/checkpoint";
49
+ import { type TodoItem, type TodoPhase } from "../tools/todo";
50
+ import type { ClientBridge } from "./client-bridge";
51
+ import { type CustomMessage } from "./messages";
52
+ import type { BuildSessionContextOptions, SessionContext } from "./session-context";
53
+ import type { BranchSummaryEntry, NewSessionOptions } from "./session-entries";
54
+ import { type SessionManager } from "./session-manager";
55
+ import type { ShakeMode, ShakeResult } from "./shake-types";
56
+ import { ToolChoiceQueue } from "./tool-choice-queue";
57
+ import { YieldQueue } from "./yield-queue";
58
+ /** Session-specific events that extend the core AgentEvent */
59
+ export type AgentSessionEvent = AgentEvent | {
60
+ type: "auto_compaction_start";
61
+ reason: "threshold" | "overflow" | "idle" | "incomplete";
62
+ action: "context-full" | "handoff" | "shake" | "snapcompact";
63
+ } | {
64
+ type: "auto_compaction_end";
65
+ action: "context-full" | "handoff" | "shake" | "snapcompact";
66
+ result: CompactionResult | undefined;
67
+ aborted: boolean;
68
+ willRetry: boolean;
69
+ errorMessage?: string;
70
+ /** True when compaction was skipped for a benign reason (no model, no candidates, nothing to compact). */
71
+ skipped?: boolean;
72
+ } | {
73
+ type: "auto_retry_start";
74
+ attempt: number;
75
+ maxAttempts: number;
76
+ delayMs: number;
77
+ errorMessage: string;
78
+ errorId?: number;
79
+ } | {
80
+ type: "auto_retry_end";
81
+ success: boolean;
82
+ attempt: number;
83
+ finalError?: string;
84
+ } | {
85
+ type: "retry_fallback_applied";
86
+ from: string;
87
+ to: string;
88
+ role: string;
89
+ } | {
90
+ type: "retry_fallback_succeeded";
91
+ model: string;
92
+ role: string;
93
+ } | {
94
+ type: "ttsr_triggered";
95
+ rules: Rule[];
96
+ } | {
97
+ type: "todo_reminder";
98
+ todos: TodoItem[];
99
+ attempt: number;
100
+ maxAttempts: number;
101
+ } | {
102
+ type: "todo_auto_clear";
103
+ } | {
104
+ type: "irc_message";
105
+ message: CustomMessage;
106
+ } | {
107
+ type: "notice";
108
+ level: "info" | "warning" | "error";
109
+ message: string;
110
+ source?: string;
111
+ } | {
112
+ type: "thinking_level_changed";
113
+ thinkingLevel: ThinkingLevel | undefined;
114
+ /** The user-configured selector when it differs from the effective level (e.g. `auto`). */
115
+ configured?: ConfiguredThinkingLevel;
116
+ /** The level `auto` resolved to this turn, once classified. */
117
+ resolved?: Effort;
118
+ } | {
119
+ type: "goal_updated";
120
+ goal: Goal | null;
121
+ state?: GoalModeState;
122
+ };
123
+ /** Listener function for agent session events */
124
+ export type AgentSessionEventListener = (event: AgentSessionEvent) => void;
125
+ /**
126
+ * Budget for callers on the user-visible `/quit` / `/exit` shutdown path that
127
+ * want to cap how long they wait for `MnemopiSessionState.dispose()` to finish
128
+ * its consolidate pass. Consolidate fires fresh LLM fact extractions, each a
129
+ * 1–3 s round-trip, so interactive shutdown passes this budget to keep the
130
+ * UI responsive. Callers that keep the process/session host alive must omit it
131
+ * so dispose still awaits the full consolidate-then-close pipeline.
132
+ */
133
+ export declare const SHUTDOWN_CONSOLIDATE_BUDGET_MS = 1500;
134
+ export interface AgentSessionDisposeOptions {
135
+ mnemopiConsolidateTimeoutMs?: number;
136
+ /**
137
+ * Postmortem reason that triggered this dispose (signal/fatal teardown
138
+ * paths). When set, the persisted `session_exit` diagnostic records it
139
+ * instead of the generic `"dispose"` used for normal programmatic disposal
140
+ * (`/quit`, test teardown, subagent completion).
141
+ */
142
+ reason?: postmortem.Reason;
143
+ }
144
+ export type CommandMetadataChangedListener = () => void | Promise<void>;
145
+ export type AsyncJobSnapshotItem = Pick<AsyncJob, "id" | "type" | "status" | "label" | "startTime">;
146
+ export interface AsyncJobSnapshot {
147
+ running: AsyncJobSnapshotItem[];
148
+ recent: AsyncJobSnapshotItem[];
149
+ delivery: AsyncJobDeliveryState;
150
+ }
151
+ export type { ShakeMode, ShakeResult };
152
+ export interface AgentSessionConfig {
153
+ agent: Agent;
154
+ sessionManager: SessionManager;
155
+ settings: Settings;
156
+ /** Whether the caller explicitly requested yolo/auto-approve behavior for this session. */
157
+ autoApprove?: boolean;
158
+ /** Models to cycle through with Ctrl+P (from --models flag) */
159
+ scopedModels?: Array<{
160
+ model: Model;
161
+ thinkingLevel?: ThinkingLevel;
162
+ }>;
163
+ /** Initial session thinking selector. */
164
+ thinkingLevel?: ConfiguredThinkingLevel;
165
+ /** Initial per-family service tiers (OpenAI / Anthropic / Google) for the live session. */
166
+ serviceTierByFamily?: ServiceTierByFamily;
167
+ /** Prompt templates for expansion */
168
+ promptTemplates?: PromptTemplate[];
169
+ /** File-based slash commands for expansion */
170
+ slashCommands?: FileSlashCommand[];
171
+ /** Extension runner (created in main.ts with wrapped tools) */
172
+ extensionRunner?: ExtensionRunner;
173
+ /** Loaded skills (already discovered by SDK) */
174
+ skills?: Skill[];
175
+ /** Skill loading warnings (already captured by SDK) */
176
+ skillWarnings?: SkillWarning[];
177
+ /** Custom commands (TypeScript slash commands) */
178
+ customCommands?: LoadedCustomCommand[];
179
+ skillsSettings?: SkillsSettings;
180
+ /** Model registry for API key resolution and model discovery */
181
+ modelRegistry: ModelRegistry;
182
+ /** Tool registry for LSP and settings */
183
+ toolRegistry?: Map<string, AgentTool>;
184
+ /** Tool names whose current registry entry is still the built-in implementation. */
185
+ builtInToolNames?: Iterable<string>;
186
+ /** Current session pre-LLM message transform pipeline */
187
+ transformContext?: (messages: AgentMessage[], signal?: AbortSignal) => AgentMessage[] | Promise<AgentMessage[]>;
188
+ /**
189
+ * Per-request transform applied after `convertToLlm` and before the
190
+ * provider call. Used for snapcompact, secret obfuscation, and image
191
+ * clamping. When supplied via {@link createAgentSession}, the advisor agent
192
+ * inherits this so its requests undergo the same shaping as the main turn.
193
+ */
194
+ transformProviderContext?: (context: Context, model: Model) => Context | Promise<Context>;
195
+ /**
196
+ * Stream wrapper passed to side-channel requests (`/btw`, `/omfg`, IRC
197
+ * auto-replies, and handoff generation) so they apply the same provider
198
+ * shaping and host-level request wrappers as normal agent turns. Defaults
199
+ * to plain `streamSimple` when omitted.
200
+ */
201
+ sideStreamFn?: StreamFn;
202
+ /**
203
+ * Stream wrapper passed to the advisor agent so its requests apply the
204
+ * session's `providers.openrouterVariant`, `providers.antigravityEndpoint`,
205
+ * `providers.maxInFlightRequests`, and `model.loopGuard.*` settings —
206
+ * keeping OpenRouter sticky-routing / response caching consistent with the
207
+ * main agent. Defaults to plain `streamSimple` when omitted.
208
+ */
209
+ advisorStreamFn?: StreamFn;
210
+ /** Hint that OpenAI Codex requests should prefer websocket transport when supported. */
211
+ preferWebsockets?: boolean;
212
+ /** Provider payload hook used by the active session request path */
213
+ onPayload?: SimpleStreamOptions["onPayload"];
214
+ /** Provider response hook used by the active session request path */
215
+ onResponse?: SimpleStreamOptions["onResponse"];
216
+ /** Raw SSE hook used by the active session request path */
217
+ onSseEvent?: SimpleStreamOptions["onSseEvent"];
218
+ /** Per-session raw SSE diagnostic buffer */
219
+ rawSseDebugBuffer?: RawSseDebugBuffer;
220
+ /** Current session message-to-LLM conversion pipeline */
221
+ convertToLlm?: (messages: AgentMessage[]) => Message[] | Promise<Message[]>;
222
+ /** System prompt builder that can consider tool availability. Returns ordered provider-facing blocks. */
223
+ rebuildSystemPrompt?: (toolNames: string[], tools: Map<string, AgentTool>) => Promise<{
224
+ systemPrompt: string[];
225
+ }>;
226
+ /** Rebuild the SSH tool from current capability discovery results. */
227
+ reloadSshTool?: () => Promise<AgentTool | null>;
228
+ requestedToolNames?: ReadonlySet<string>;
229
+ /**
230
+ * Optional accessor for live MCP server instructions. Read by the session's
231
+ * `rebuildSystemPrompt`-skip optimization to detect server-side instruction
232
+ * changes (e.g. an MCP server upgrade) that would otherwise pass the tool-set
233
+ * signature comparison and silently keep a stale prompt cached.
234
+ */
235
+ getMcpServerInstructions?: () => Map<string, string> | undefined;
236
+ /** Enable hidden-by-default MCP tool discovery for this session. */
237
+ mcpDiscoveryEnabled?: boolean;
238
+ /** MCP tool names to activate for the current session when discovery mode is enabled. */
239
+ initialSelectedMCPToolNames?: string[];
240
+ /** Whether constructor-provided MCP defaults should be persisted immediately. */
241
+ persistInitialMCPToolSelection?: boolean;
242
+ /** MCP server names whose tools should seed discovery-mode sessions whenever those servers are connected. */
243
+ defaultSelectedMCPServerNames?: string[];
244
+ /** MCP tool names that should seed brand-new sessions created from this AgentSession. */
245
+ defaultSelectedMCPToolNames?: string[];
246
+ /** TTSR manager for time-traveling stream rules */
247
+ ttsrManager?: TtsrManager;
248
+ /** Secret obfuscator for deobfuscating streaming edit content */
249
+ obfuscator?: SecretObfuscator;
250
+ /** Inherited eval executor session id from a parent agent. */
251
+ parentEvalSessionId?: string;
252
+ /** Logical owner for retained eval kernels created by this session. */
253
+ evalKernelOwnerId?: string;
254
+ /**
255
+ * AsyncJobManager that this session installed as the process-global instance.
256
+ * Only set for top-level sessions; subagents inherit the parent's manager and
257
+ * **MUST NOT** dispose it on their own teardown.
258
+ */
259
+ ownedAsyncJobManager?: AsyncJobManager;
260
+ /**
261
+ * AsyncJobManager reachable by this session for scoped job actions.
262
+ *
263
+ * Top-level owners receive their own manager, subagents receive the inherited
264
+ * parent manager, and secondary in-process top-level sessions receive
265
+ * `undefined` so job snapshots and ACP drains cannot observe the primary's
266
+ * state.
267
+ */
268
+ asyncJobManager?: AsyncJobManager;
269
+ /** Agent identity (registry id like "Main" or "Alice") used for IRC routing. */
270
+ agentId?: string;
271
+ /** Whether this session is the top-level agent or a subagent. Drives eager-task
272
+ * prelude gating so a top-level session created with a custom `agentId` still
273
+ * receives the always-mode reminder. Defaults to "main". */
274
+ agentKind?: "main" | "sub";
275
+ /**
276
+ * Override the provider-facing session ID for all API requests from this session.
277
+ * When absent, `sessionManager.getSessionId()` is used. Needed when benchmark or
278
+ * SDK callers issue probes / prewarming with an explicit `--provider-session-id`
279
+ * so that credential sticky selection is consistent with the session's streaming calls.
280
+ */
281
+ providerSessionId?: string;
282
+ /**
283
+ * Full advisor toolset, pre-built in `createAgentSession` against a distinct,
284
+ * advisor-scoped `ToolSession` (its own `-advisor` session/agent id) so the
285
+ * advisor's tool state stays isolated from the primary. The advisor is a full
286
+ * agent; its config `tools` selects a subset (default read/grep/glob). Undefined
287
+ * when the advisor is disabled.
288
+ */
289
+ advisorTools?: AgentTool[];
290
+ /** Preloaded watchdog prompt content for the advisor. */
291
+ advisorWatchdogPrompt?: string;
292
+ /** Preloaded YAML top-level `instructions` shared baseline, kept separate from
293
+ * `advisorWatchdogPrompt` so `/advisor configure` can swap it live. */
294
+ advisorSharedInstructions?: string;
295
+ /**
296
+ * Preloaded project context files (AGENTS.md, etc.) rendered as a system-prompt
297
+ * block for the advisor — the same standing instructions the primary agent
298
+ * receives, so the reviewer holds the agent to them.
299
+ */
300
+ advisorContextPrompt?: string;
301
+ /**
302
+ * Advisors discovered from `WATCHDOG.yml`. Empty/undefined runs a single
303
+ * legacy advisor on the `advisor` role (byte-for-byte the pre-config path).
304
+ */
305
+ advisorConfigs?: AdvisorConfig[];
306
+ /**
307
+ * Strip tool descriptions from provider-bound tool specs on side requests
308
+ * (handoff). Must match the session-start value used to build the system
309
+ * prompt so inline descriptors are not also sent through provider schemas.
310
+ */
311
+ pruneToolDescriptions?: boolean;
312
+ /**
313
+ * Disconnect this session's OWNED MCP manager on dispose. Provided only when
314
+ * the session created the manager (top-level sessions); subagents reuse a
315
+ * parent's manager via `options.mcpManager` and omit this so a child's
316
+ * teardown never tears down the shared servers.
317
+ */
318
+ disconnectOwnedMcpManager?: () => Promise<void>;
319
+ /**
320
+ * Override the bundled system prompt used by automatic session-title
321
+ * generation paths (initial title + replan refresh). Source-of-truth is
322
+ * `TITLE_SYSTEM.md` discovered via {@link discoverTitleSystemPromptFile} and
323
+ * resolved through {@link resolvePromptInput}; refresh after a `/move`-style
324
+ * cwd change via {@link AgentSession.setTitleSystemPrompt}.
325
+ */
326
+ titleSystemPrompt?: string;
327
+ }
328
+ /** Options for AgentSession.prompt() */
329
+ export interface PromptOptions {
330
+ /** Whether to expand file-based prompt templates (default: true) */
331
+ expandPromptTemplates?: boolean;
332
+ /** Image attachments */
333
+ images?: ImageContent[];
334
+ /** When streaming, how to queue the message: "steer" (interrupt) or "followUp" (wait). */
335
+ streamingBehavior?: "steer" | "followUp";
336
+ /** Optional tool choice override for the next LLM call. */
337
+ toolChoice?: ToolChoice;
338
+ /** Send as developer/system message instead of user. Providers that support it use the developer role; others fall back to user. */
339
+ synthetic?: boolean;
340
+ /** Marks this prompt as a deliberate user action (typed message, `.`/`c`
341
+ * continue). Clears advisor auto-resume suppression that a user interrupt set.
342
+ * Defaults to `!synthetic`; manual-continue is synthetic yet user-initiated, so
343
+ * it sets this explicitly. Agent-initiated synthetic prompts (auto-continue,
344
+ * plan re-prime, reminders) leave it unset and keep suppression latched. */
345
+ userInitiated?: boolean;
346
+ /** Explicit billing/initiator attribution for the prompt. Defaults to user prompts as `user` and synthetic prompts as `agent`. */
347
+ attribution?: MessageAttribution;
348
+ /** Skip pre-send compaction checks for this prompt (internal use for maintenance flows). */
349
+ skipCompactionCheck?: boolean;
350
+ }
351
+ /** Result from a handoff operation. */
352
+ export interface HandoffResult {
353
+ document: string;
354
+ savedPath?: string;
355
+ }
356
+ export interface SessionHandoffOptions {
357
+ autoTriggered?: boolean;
358
+ signal?: AbortSignal;
359
+ }
360
+ /** Result from cycleModel() */
361
+ export interface ModelCycleResult {
362
+ model: Model;
363
+ thinkingLevel: ThinkingLevel | undefined;
364
+ /** Whether cycling through scoped models (--models flag) or all available */
365
+ isScoped: boolean;
366
+ }
367
+ /** Result from cycleRoleModels() */
368
+ export interface RoleModelCycleResult {
369
+ model: Model;
370
+ thinkingLevel: ThinkingLevel | undefined;
371
+ role: string;
372
+ }
373
+ /** A configured role resolved to a concrete model, used by role cycling and
374
+ * the plan-approval model slider. */
375
+ export interface ResolvedRoleModel {
376
+ role: string;
377
+ model: Model;
378
+ thinkingLevel?: ConfiguredThinkingLevel;
379
+ explicitThinkingLevel: boolean;
380
+ }
381
+ /** The set of resolvable role models plus the index of the currently active
382
+ * one within {@link ResolvedRoleModel.role} order. */
383
+ export interface RoleModelCycle {
384
+ models: ResolvedRoleModel[];
385
+ currentIndex: number;
386
+ }
387
+ export interface ContextUsageBreakdown {
388
+ contextWindow: number;
389
+ anchored: boolean;
390
+ usedTokens: number;
391
+ systemPromptTokens: number;
392
+ systemToolsTokens: number;
393
+ systemContextTokens: number;
394
+ skillsTokens: number;
395
+ messagesTokens: number;
396
+ }
397
+ /** Session statistics for /session command */
398
+ export interface SessionStats {
399
+ sessionFile: string | undefined;
400
+ sessionId: string;
401
+ userMessages: number;
402
+ assistantMessages: number;
403
+ toolCalls: number;
404
+ toolResults: number;
405
+ totalMessages: number;
406
+ tokens: {
407
+ input: number;
408
+ output: number;
409
+ reasoning: number;
410
+ cacheRead: number;
411
+ cacheWrite: number;
412
+ total: number;
413
+ };
414
+ premiumRequests: number;
415
+ cost: number;
416
+ }
417
+ /** Advisor statistics for /advisor status command. */
418
+ export interface AdvisorStats {
419
+ configured: boolean;
420
+ active: boolean;
421
+ model?: Model;
422
+ contextWindow: number;
423
+ contextTokens: number;
424
+ tokens: {
425
+ input: number;
426
+ output: number;
427
+ reasoning: number;
428
+ cacheRead: number;
429
+ cacheWrite: number;
430
+ total: number;
431
+ };
432
+ cost: number;
433
+ messages: {
434
+ user: number;
435
+ assistant: number;
436
+ total: number;
437
+ };
438
+ /** Per-advisor breakdown; one entry per active advisor (single-advisor sessions have one). */
439
+ advisors: PerAdvisorStat[];
440
+ }
441
+ /** One advisor's slice of {@link AdvisorStats}, surfaced for the multi-advisor status panel. */
442
+ export interface PerAdvisorStat {
443
+ name: string;
444
+ model: Model;
445
+ contextWindow: number;
446
+ contextTokens: number;
447
+ tokens: AdvisorStats["tokens"];
448
+ cost: number;
449
+ messages: AdvisorStats["messages"];
450
+ }
451
+ export interface FreshSessionResult {
452
+ previousSessionId: string;
453
+ sessionId: string;
454
+ closedProviderSessions: number;
455
+ }
456
+ /** Entry returned by {@link AgentSession.clearQueue} / {@link AgentSession.popLastQueuedMessage}. */
457
+ export type RestoredQueuedMessage = {
458
+ text: string;
459
+ images?: ImageContent[];
460
+ };
461
+ type SessionNameTrigger = "replan";
462
+ export declare class AgentSession {
463
+ #private;
464
+ readonly agent: Agent;
465
+ readonly sessionManager: SessionManager;
466
+ readonly settings: Settings;
467
+ readonly yieldQueue: YieldQueue;
468
+ fileSnapshotStore?: InMemorySnapshotStore;
469
+ readonly configWarnings: string[];
470
+ readonly rawSseDebugBuffer: RawSseDebugBuffer;
471
+ constructor(config: AgentSessionConfig);
472
+ /** Model registry for API key resolution and model discovery */
473
+ get modelRegistry(): ModelRegistry;
474
+ get asyncJobManager(): AsyncJobManager | undefined;
475
+ getAgentId(): string | undefined;
476
+ /**
477
+ * The per-turn tool-choice directive for the agent loop's `getToolChoice`. Priority:
478
+ * 1. a HARD forced choice from the queue (genuine forces: user-force, eager-todo, …) —
479
+ * consuming (advances the queue generator);
480
+ * 2. else, when a non-forcing preview is pending, a {@link SoftToolRequirement} — a
481
+ * PEEK (advances/pops nothing), so the agent-loop injects the reminder once per head
482
+ * and escalates to a forced `resolve` only if the model declines. A compliant turn
483
+ * pays ZERO tool_choice change (no prompt-cache messages-cache invalidation);
484
+ * 3. else undefined.
485
+ */
486
+ nextToolChoiceDirective(): ToolChoiceDirective | undefined;
487
+ /** Peek the head non-forcing pending preview invoker, for the `resolve` tool's dispatch. */
488
+ peekPendingInvoker(): ((input: unknown) => Promise<unknown> | unknown) | undefined;
489
+ /** Clear stale non-forcing pending preview invokers after `resolve` proves none can run. */
490
+ clearPendingInvokers(): void;
491
+ /**
492
+ * Force the next model call to target a specific active tool, then terminate
493
+ * the agent loop. Pushes a two-step sequence [forced, "none"] so the model
494
+ * calls exactly the forced tool once and then cannot call another.
495
+ */
496
+ setForcedToolChoice(toolName: string): void;
497
+ /** The tool-choice queue: forces forthcoming tool invocations and carries handlers. */
498
+ get toolChoiceQueue(): ToolChoiceQueue;
499
+ /** Peek the in-flight directive's invocation handler for use by the resolve tool. */
500
+ peekQueueInvoker(): ((input: unknown) => Promise<unknown> | unknown) | undefined;
501
+ peekStandingResolveHandler(): ((input: unknown) => Promise<unknown> | unknown) | undefined;
502
+ setStandingResolveHandler(handler: ((input: unknown) => Promise<unknown> | unknown) | null): void;
503
+ setSessionSwitchReconciler(reconciler: (() => Promise<void>) | null): void;
504
+ /** Provider-scoped mutable state store for transport/session caches. */
505
+ get providerSessionState(): Map<string, ProviderSessionState>;
506
+ /** Hint forwarded to provider calls that support websocket transport. */
507
+ get preferWebsockets(): boolean | undefined;
508
+ getHindsightSessionState(): HindsightSessionState | undefined;
509
+ setHindsightSessionState(state: HindsightSessionState | undefined): HindsightSessionState | undefined;
510
+ getMnemopiSessionState(): MnemopiSessionState | undefined;
511
+ /** TTSR manager for time-traveling stream rules */
512
+ get ttsrManager(): TtsrManager | undefined;
513
+ /** Secret obfuscator, when secrets are configured; /share redaction reuses it. */
514
+ get obfuscator(): SecretObfuscator | undefined;
515
+ /** Whether a TTSR abort is pending (stream was aborted to inject rules) */
516
+ get isTtsrAbortPending(): boolean;
517
+ /** Whether an expected internal plan-mode abort is pending. Consumed by
518
+ * `#handleAgentEvent` to stamp `SILENT_ABORT_MARKER` on the next aborted
519
+ * assistant message_end; callers clear it in `finally`. */
520
+ get isPlanInternalAbortPending(): boolean;
521
+ /** Arm the silent-abort marker for the next aborted assistant message_end.
522
+ * Caller MUST clear via `clearPlanInternalAbortPending()` in a `finally`
523
+ * to guarantee no leak. */
524
+ markPlanInternalAbortPending(): void;
525
+ /** Unconditionally clear the silent-abort flag. Idempotent: safe when the
526
+ * flag was never set OR was already consumed by `#handleAgentEvent`. */
527
+ clearPlanInternalAbortPending(): void;
528
+ getAsyncJobSnapshot(options?: {
529
+ recentLimit?: number;
530
+ }): AsyncJobSnapshot | null;
531
+ /**
532
+ * Emit a UI-only notice to the session. Surfaces in interactive mode as a
533
+ * `showWarning` / `showError` / `showStatus` line; non-interactive modes
534
+ * receive the event through the normal subscribe stream.
535
+ *
536
+ * Notices are NOT added to agent state and never reach the LLM — use this
537
+ * for out-of-band conditions the user should see but the model shouldn't
538
+ * react to (e.g. background queue flush failures).
539
+ */
540
+ emitNotice(level: "info" | "warning" | "error", message: string, source?: string): void;
541
+ /**
542
+ * Subscribe to agent events.
543
+ * Session persistence is handled internally (saves messages on message_end).
544
+ * Multiple listeners can be added. Returns unsubscribe function for this listener.
545
+ */
546
+ subscribe(listener: AgentSessionEventListener): () => void;
547
+ subscribeCommandMetadataChanged(listener: CommandMetadataChangedListener): () => void;
548
+ /** True once dispose() has begun; deferred background work (e.g. the deferred
549
+ * MCP discovery task in sdk.ts) must not touch the session past this point. */
550
+ get isDisposed(): boolean;
551
+ markMovedFromEmptySessionFile(sessionFile: string): void;
552
+ /**
553
+ * Synchronously mark the session as disposing so new work is rejected
554
+ * immediately: eval starts throw, queued asides are dropped, and the
555
+ * aside provider is detached. Idempotent; `dispose()` runs it first.
556
+ *
557
+ * Wrappers that await other teardown before delegating to `dispose()` MUST
558
+ * call this before their first await — otherwise work started in that async
559
+ * gap slips past the disposal guards.
560
+ */
561
+ beginDispose(): void;
562
+ dispose(options?: AgentSessionDisposeOptions): Promise<void>;
563
+ freshSession(): FreshSessionResult | undefined;
564
+ /** Full agent state */
565
+ get state(): AgentState;
566
+ /** Current model (may be undefined if not yet selected) */
567
+ get model(): Model | undefined;
568
+ /** Effective thinking level applied to the agent (the resolved level when `auto`). */
569
+ get thinkingLevel(): ThinkingLevel | undefined;
570
+ /** The selector the user configured: `auto` when auto mode is active, else the effective level. */
571
+ configuredThinkingLevel(): ConfiguredThinkingLevel | undefined;
572
+ /** True when `auto` thinking mode is active. */
573
+ get isAutoThinking(): boolean;
574
+ /** The level `auto` resolved to for the current turn (undefined until classified). */
575
+ autoResolvedThinkingLevel(): Effort | undefined;
576
+ /** Live per-family service tiers (OpenAI / Anthropic / Google). */
577
+ get serviceTierByFamily(): ServiceTierByFamily;
578
+ /** Whether agent is currently streaming a response */
579
+ get isStreaming(): boolean;
580
+ get isAborting(): boolean;
581
+ /** Wait until streaming and deferred recovery work are fully settled. */
582
+ waitForIdle(): Promise<void>;
583
+ drainAsyncJobDeliveriesForAcp(options?: {
584
+ timeoutMs?: number;
585
+ }): Promise<boolean>;
586
+ /** Most recent assistant message in agent state. */
587
+ getLastAssistantMessage(): AssistantMessage | undefined;
588
+ /** Current effective system prompt blocks (includes any per-turn extension modifications) */
589
+ get systemPrompt(): string[];
590
+ /** Current retry attempt (0 if not retrying) */
591
+ get retryAttempt(): number;
592
+ /**
593
+ * Get the names of currently active tools.
594
+ * Returns the names of tools currently set on the agent.
595
+ */
596
+ getActiveToolNames(): string[];
597
+ /** Whether the edit tool is registered in this session. */
598
+ get hasEditTool(): boolean;
599
+ /**
600
+ * Get a tool by name from the registry.
601
+ */
602
+ getToolByName(name: string): AgentTool | undefined;
603
+ /** True when the current registry entry for `name` came from a built-in factory. */
604
+ hasBuiltInTool(name: string): boolean;
605
+ /**
606
+ * Get all configured tool names (built-in via --tools or default, plus custom tools).
607
+ */
608
+ getAllToolNames(): string[];
609
+ isMCPDiscoveryEnabled(): boolean;
610
+ /**
611
+ * Flip MCP discovery on after deferred discovery learns the real tool count.
612
+ * UI sessions resolve `tools.discoveryMode: "auto"` before MCP servers
613
+ * connect, so a large MCP toolset discovered later must be able to upgrade
614
+ * the session from the force-activate path to the discovery path. One-way:
615
+ * discovery is never downgraded mid-session.
616
+ */
617
+ enableMCPDiscovery(): void;
618
+ getSelectedMCPToolNames(): string[];
619
+ activateDiscoveredMCPTools(toolNames: string[]): Promise<string[]>;
620
+ isToolDiscoveryEnabled(): boolean;
621
+ getDiscoverableTools(filter?: {
622
+ source?: DiscoverableTool["source"];
623
+ }): DiscoverableTool[];
624
+ getDiscoverableToolSearchIndex(): DiscoverableToolSearchIndex;
625
+ getSelectedDiscoveredToolNames(): string[];
626
+ activateDiscoveredTools(toolNames: string[]): Promise<string[]>;
627
+ /**
628
+ * Reload the SSH tool from disk-backed capability discovery and make the
629
+ * refreshed definition visible to the next model call without restarting.
630
+ */
631
+ refreshSshTool(options?: {
632
+ activateIfAvailable?: boolean;
633
+ }): Promise<void>;
634
+ /**
635
+ * Set active tools by name.
636
+ * Only tools in the registry can be enabled. Unknown tool names are ignored.
637
+ * Also rebuilds the system prompt to reflect the new tool set.
638
+ * Changes take effect before the next model call.
639
+ */
640
+ setActiveToolsByName(toolNames: string[]): Promise<void>;
641
+ /** Rebuild the base system prompt using the current active tool set. */
642
+ refreshBaseSystemPrompt(): Promise<void>;
643
+ /**
644
+ * Replace MCP tools in the registry and recompute the visible MCP tool set immediately.
645
+ * This allows /mcp add/remove/reauth to take effect without restarting the session.
646
+ *
647
+ * @param mcpTools The new MCP tools to register.
648
+ * @param options.activateAll When true, force-activates every newly registered MCP tool
649
+ * regardless of prior selection state. Used when an ACP client provisions MCP servers
650
+ * for a session where MCP discovery is disabled.
651
+ */
652
+ refreshMCPTools(mcpTools: CustomTool[], options?: {
653
+ activateAll?: boolean;
654
+ }): Promise<void>;
655
+ /**
656
+ * Replace RPC host-owned tools and refresh the active tool set before the next model call.
657
+ */
658
+ refreshRpcHostTools(rpcTools: AgentTool[]): Promise<void>;
659
+ /** Whether auto-compaction is currently running */
660
+ get isCompacting(): boolean;
661
+ /**
662
+ * Whether idle-flush tasks, auto-continuations, or other short-lived
663
+ * post-prompt work are pending. True in the brief window after
664
+ * `session.prompt()` returns but before a scheduled background delivery
665
+ * (e.g. an async-job result) has finished its own streaming turn.
666
+ * Loop-mode and similar auto-submit paths should treat this as a block
667
+ * to avoid racing against the delivery turn.
668
+ */
669
+ get hasPostPromptWork(): boolean;
670
+ /** All messages including custom types like BashExecutionMessage */
671
+ get messages(): AgentMessage[];
672
+ /** Latest image attachments addressable by tools as `Image #N` or `attachment://N`. */
673
+ getImageAttachments(): {
674
+ label: string;
675
+ uri: string;
676
+ image: ImageContent;
677
+ }[];
678
+ buildDisplaySessionContext(): SessionContext;
679
+ /**
680
+ * Transcript for TUI display. Full history is kept for export/resume-style
681
+ * callers; live chat can collapse compacted history to keep the hot render
682
+ * surface bounded. Display-only — NEVER feed the result to
683
+ * `agent.replaceMessages` or a provider.
684
+ */
685
+ buildTranscriptSessionContext(options?: Pick<BuildSessionContextOptions, "collapseCompactedHistory">): SessionContext;
686
+ /** Convert session messages using the same pre-LLM pipeline as the active session. */
687
+ convertMessagesToLlm(messages: AgentMessage[], signal?: AbortSignal): Promise<Message[]>;
688
+ /** Apply session-level stream hooks to a direct side request. */
689
+ prepareSimpleStreamOptions(options: SimpleStreamOptions, provider?: string): SimpleStreamOptions;
690
+ /** Current steering mode */
691
+ get steeringMode(): "all" | "one-at-a-time";
692
+ /** Current follow-up mode */
693
+ get followUpMode(): "all" | "one-at-a-time";
694
+ /** Current interrupt mode */
695
+ get interruptMode(): "immediate" | "wait";
696
+ /** Current session file path, or undefined if sessions are disabled */
697
+ get sessionFile(): string | undefined;
698
+ /** Current session ID */
699
+ get sessionId(): string;
700
+ getEvalSessionId(): string | null;
701
+ /** Current session display name, if set */
702
+ get sessionName(): string | undefined;
703
+ /** Scoped models for cycling (from --models flag) */
704
+ get scopedModels(): ReadonlyArray<{
705
+ model: Model;
706
+ thinkingLevel?: ThinkingLevel;
707
+ }>;
708
+ /** Prompt templates */
709
+ getPlanModeState(): PlanModeState | undefined;
710
+ setPlanModeState(state: PlanModeState | undefined): void;
711
+ getCriticGateState(): CriticGateState | undefined;
712
+ setCriticGateState(state: CriticGateState | undefined): void;
713
+ getGoalModeState(): GoalModeState | undefined;
714
+ setGoalModeState(state: GoalModeState | undefined): void;
715
+ get goalRuntime(): GoalRuntime;
716
+ markPlanReferenceSent(): void;
717
+ setPlanReferencePath(path: string): void;
718
+ getPlanReferencePath(): string;
719
+ get clientBridge(): ClientBridge | undefined;
720
+ setClientBridge(bridge: ClientBridge | undefined): void;
721
+ getCheckpointState(): CheckpointState | undefined;
722
+ getLastCompletedRewind(): CompletedRewindState | undefined;
723
+ setCheckpointState(state: CheckpointState | undefined): void;
724
+ /**
725
+ * Inject the plan mode context message into the conversation history.
726
+ */
727
+ sendPlanModeContext(options?: {
728
+ deliverAs?: "steer" | "followUp" | "nextTurn";
729
+ }): Promise<void>;
730
+ sendGoalModeContext(options?: {
731
+ deliverAs?: "steer" | "followUp" | "nextTurn";
732
+ }): Promise<void>;
733
+ resolveRoleModel(role: string): Model | undefined;
734
+ /**
735
+ * Resolve a role to its model AND thinking level.
736
+ * Unlike resolveRoleModel(), this preserves the thinking level suffix
737
+ * from role configuration (e.g., "anthropic/claude-sonnet-4-5:xhigh").
738
+ */
739
+ resolveRoleModelWithThinking(role: string): ResolvedModelRoleValue;
740
+ get promptTemplates(): ReadonlyArray<PromptTemplate>;
741
+ /** Replace file-based slash commands used for prompt expansion. */
742
+ setSlashCommands(slashCommands: FileSlashCommand[]): void;
743
+ /** Custom commands (TypeScript slash commands and MCP prompts) */
744
+ get customCommands(): ReadonlyArray<LoadedCustomCommand>;
745
+ /** MCP prompt commands only, for command-list metadata. */
746
+ get mcpPromptCommands(): ReadonlyArray<LoadedCustomCommand>;
747
+ /** Update the MCP prompt commands list. Called when server prompts are (re)loaded. */
748
+ setMCPPromptCommands(commands: LoadedCustomCommand[]): void;
749
+ /**
750
+ * Send a prompt to the agent.
751
+ * - Handles extension commands (registered via pi.registerCommand) immediately, even during streaming
752
+ * - Expands file-based prompt templates by default
753
+ * - During streaming, queues via steer() or followUp() based on streamingBehavior option
754
+ * - Validates model and API key before sending (when not streaming)
755
+ * @throws Error if streaming and no streamingBehavior specified
756
+ * @throws Error if no model selected or no API key available (when not streaming)
757
+ */
758
+ /**
759
+ * Returns `false` when the command was fully handled locally (extension or
760
+ * custom-TS command consumed without calling the LLM). Returns `true` when
761
+ * the prompt was forwarded to the agent — either directly or queued as a
762
+ * steer/follow-up. Callers that render a UI or manage turn lifecycle (e.g.
763
+ * the ACP agent) use this to know whether to expect an `agent_end` event.
764
+ */
765
+ prompt(text: string, options?: PromptOptions): Promise<boolean>;
766
+ promptCustomMessage<T = unknown>(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details" | "attribution">, options?: Pick<PromptOptions, "streamingBehavior" | "toolChoice"> & {
767
+ queueChipText?: string;
768
+ queueOnly?: boolean;
769
+ }): Promise<void>;
770
+ /**
771
+ * Queue a steering message to interrupt the agent mid-run.
772
+ */
773
+ steer(text: string, images?: ImageContent[]): Promise<void>;
774
+ /**
775
+ * Queue a follow-up message to process after the agent would otherwise stop.
776
+ */
777
+ followUp(text: string, images?: ImageContent[]): Promise<void>;
778
+ queueDeferredMessage(message: CustomMessage): void;
779
+ /**
780
+ * Send a custom message to the session. Creates a CustomMessageEntry.
781
+ *
782
+ * Handles three cases:
783
+ * - Streaming: queue as steer/follow-up or store for next turn
784
+ * - Not streaming + triggerTurn: appends to state/session, starts new turn unless the client cannot own it
785
+ * - Not streaming + no trigger: appends to state/session, no turn
786
+ *
787
+ * @returns true iff this call synchronously started a new turn (awaited
788
+ * `agent.prompt`); false when the message was queued/appended without a turn
789
+ * — including when `triggerTurn` is downgraded because the client defers
790
+ * agent-initiated turns. Callers that must mirror the resulting `agent_end`
791
+ * use this to avoid acting on a turn that never ran.
792
+ */
793
+ sendCustomMessage<T = unknown>(message: Pick<CustomMessage<T>, "customType" | "content" | "display" | "details" | "attribution">, options?: {
794
+ triggerTurn?: boolean;
795
+ deliverAs?: "steer" | "followUp" | "nextTurn";
796
+ queueChipText?: string;
797
+ }): Promise<boolean>;
798
+ /**
799
+ * Send a user message to the agent.
800
+ * When deliverAs is set, queue the message instead of starting a new turn.
801
+ *
802
+ * @param content User message content (string or content array)
803
+ * @param options.deliverAs Delivery mode: "steer" or "followUp"
804
+ */
805
+ sendUserMessage(content: string | (TextContent | ImageContent)[], options?: {
806
+ deliverAs?: "steer" | "followUp";
807
+ }): Promise<void>;
808
+ /** Clear queued messages and return the user-restorable ones (text plus any attached images).
809
+ * Only user-authored messages (plain user turns, `attribution:"user"` custom like `/skill`) are
810
+ * returned for editor restore. Other queued messages stay in the agent-core queues so a continuing
811
+ * stream still delivers them — EXCEPT on `forInterrupt` (Esc+abort), where only advisor cards are
812
+ * kept (abort()'s #extractQueuedAdvisorCards preserves them as visible advice) and every other
813
+ * non-user steer (hidden goal/plan/budget, IRC/extension asides) is dropped, so abort()'s
814
+ * #drainStrandedQueuedMessages can't auto-resume the run the user just interrupted (the drain only
815
+ * fires while agent.hasQueuedMessages()). Plain Alt+Up dequeue preserves those non-user steers. */
816
+ clearQueue(options?: {
817
+ forInterrupt?: boolean;
818
+ }): {
819
+ steering: RestoredQueuedMessage[];
820
+ followUp: RestoredQueuedMessage[];
821
+ };
822
+ /** Number of pending displayable messages (includes steering, follow-up, and next-turn messages).
823
+ * Reflects actual queued work (advisor cards included) — feeds hasPendingMessages()/RPC and the
824
+ * empty-submit abort gate. The user-restorable subset is surfaced by getQueuedMessages()/clearQueue(). */
825
+ get queuedMessageCount(): number;
826
+ getQueuedMessages(): {
827
+ steering: readonly string[];
828
+ followUp: readonly string[];
829
+ };
830
+ /**
831
+ * Pop the last queued message (steering first, then follow-up).
832
+ * Used by dequeue keybinding to restore messages to editor one at a time.
833
+ * Steps over agent-authored queued messages (advisor cards, hidden/internal steers).
834
+ */
835
+ popLastQueuedMessage(): RestoredQueuedMessage | undefined;
836
+ get skillsSettings(): SkillsSettings | undefined;
837
+ /** Skills loaded by SDK (empty if --no-skills or skills: [] was passed) */
838
+ get skills(): readonly Skill[];
839
+ /** Skill loading warnings captured by SDK */
840
+ get skillWarnings(): readonly SkillWarning[];
841
+ getTodoPhases(): TodoPhase[];
842
+ setTodoPhases(phases: TodoPhase[]): void;
843
+ /** Currently-applied {@link TITLE_SYSTEM.md} override, or undefined when the
844
+ * bundled prompt is in effect. Consumed by {@link InteractiveMode} so the
845
+ * first-input title path and the replan refresh share one source. */
846
+ get titleSystemPrompt(): string | undefined;
847
+ /** Replace the title-generation system prompt override. Called by
848
+ * {@link InteractiveMode.refreshTitleSystemPrompt} after the session cwd
849
+ * changes (e.g. `/move` relocation) so the next replan refresh resolves
850
+ * against the destination project's override. */
851
+ setTitleSystemPrompt(prompt: string | undefined): void;
852
+ /**
853
+ * Abort current operation and wait for agent to become idle.
854
+ *
855
+ * `reason` (e.g. `USER_INTERRUPT_LABEL`) rides the agent's `AbortController`
856
+ * and surfaces verbatim on the aborted assistant message's `errorMessage`, so
857
+ * the transcript can distinguish a deliberate user interrupt from an opaque
858
+ * abort. Omit it for internal/lifecycle aborts.
859
+ */
860
+ abort(options?: {
861
+ goalReason?: "interrupted" | "internal";
862
+ reason?: string;
863
+ /** Internal `/compact` startup keeps the manual-compaction marker alive while aborting the active turn. */
864
+ preserveCompaction?: boolean;
865
+ }): Promise<void>;
866
+ /**
867
+ * Start a new session, optionally with initial messages and parent tracking.
868
+ * Clears all messages and starts a new session.
869
+ * Listeners are preserved and will continue receiving events.
870
+ * @param options - Optional initial messages and parent session path
871
+ * @returns true if completed, false if cancelled by hook
872
+ */
873
+ newSession(options?: NewSessionOptions): Promise<boolean>;
874
+ /**
875
+ * Set a display name for the current session.
876
+ */
877
+ setSessionName(name: string, source?: "auto" | "user", trigger?: SessionNameTrigger): Promise<boolean>;
878
+ /**
879
+ * Fork the current session, creating a new session file with the exact same state.
880
+ * Copies all entries and artifacts to the new session.
881
+ * Unlike newSession(), this preserves all messages in the agent state.
882
+ * @returns true if completed, false if cancelled by hook or not persisting
883
+ */
884
+ fork(): Promise<boolean>;
885
+ /**
886
+ * Set model directly.
887
+ * Validates that a credential source is configured (synchronously, without
888
+ * refreshing OAuth or running command-backed key programs). The active
889
+ * session switches by default; when `currentContextTokens` is provided and
890
+ * exceeds the refreshed candidate's context window, the live switch is
891
+ * skipped while role persistence still runs. Returns whether the active
892
+ * model actually switched, computed against the refreshed metadata so
893
+ * dynamic providers (e.g. llama.cpp) honor their post-load contextWindow.
894
+ * @throws Error if no API key available for the model
895
+ */
896
+ setModel(model: Model, role?: string, options?: {
897
+ selector?: string;
898
+ thinkingLevel?: ThinkingLevel;
899
+ persist?: boolean;
900
+ currentContextTokens?: number;
901
+ }): Promise<{
902
+ switched: boolean;
903
+ }>;
904
+ /**
905
+ * Set model temporarily (for this session only).
906
+ * Validates that a credential source is configured (synchronously, without
907
+ * refreshing OAuth or running command-backed key programs), saves to session
908
+ * log but NOT to settings.
909
+ * @throws Error if no API key available for the model
910
+ */
911
+ setModelTemporary(model: Model, thinkingLevel?: ConfiguredThinkingLevel, options?: {
912
+ ephemeral?: boolean;
913
+ }): Promise<void>;
914
+ /**
915
+ * Cycle to next/previous model.
916
+ * Uses scoped models (from --models flag) if available, otherwise all available models.
917
+ * @param direction - "forward" (default) or "backward"
918
+ * @returns The new model info, or undefined if only one model available
919
+ */
920
+ cycleModel(direction?: "forward" | "backward"): Promise<ModelCycleResult | undefined>;
921
+ /**
922
+ * Resolve the configured role models in the given order plus the index of
923
+ * the currently active one. Roles that have no configured model, or whose
924
+ * configured model is not currently available, are skipped. The `default`
925
+ * role falls back to the active model when no explicit assignment exists.
926
+ *
927
+ * Returns `undefined` only when there is no current model or no available
928
+ * models at all; an empty `models` array is never returned (callers should
929
+ * still guard on `models.length`).
930
+ */
931
+ getRoleModelCycle(roleOrder: readonly string[]): RoleModelCycle | undefined;
932
+ /**
933
+ * Apply a resolved role model as the active model without changing global
934
+ * settings. Shared with role cycling and the plan-approval model slider.
935
+ */
936
+ applyRoleModel(entry: ResolvedRoleModel): Promise<void>;
937
+ /**
938
+ * Cycle through configured role models in a fixed order.
939
+ * Skips missing roles and changes only the active session model.
940
+ * @param roleOrder - Order of roles to cycle through (e.g., ["slow", "default", "smol"])
941
+ * @param direction - "forward" (default) or "backward"
942
+ */
943
+ cycleRoleModels(roleOrder: readonly string[], direction?: "forward" | "backward"): Promise<RoleModelCycleResult | undefined>;
944
+ /**
945
+ * Get all available models with valid API keys, filtered by `enabledModels` when configured.
946
+ * See {@link filterAvailableModelsByEnabledPatterns} for supported pattern forms and limitations.
947
+ */
948
+ getAvailableModels(): Model[];
949
+ /**
950
+ * Set the thinking level. `auto` enables per-turn classification; the selector
951
+ * itself is never written to the session log, but resolved concrete levels are
952
+ * persisted when real user turns are classified so resumed sessions keep the
953
+ * last resolved effort instead of reverting to pending auto.
954
+ */
955
+ setThinkingLevel(level: ConfiguredThinkingLevel | undefined, persist?: boolean): void;
956
+ /**
957
+ * Cycle to next thinking level: off → auto → minimal..xhigh → off.
958
+ * @returns New selector, or undefined if model doesn't support thinking
959
+ */
960
+ cycleThinkingLevel(): ConfiguredThinkingLevel | undefined;
961
+ /**
962
+ * True when the currently selected model's family is set to `priority` — the
963
+ * `/fast` on/off state for the active model. Returns false when no model is
964
+ * selected or the model exposes no service-tier family (e.g. Fireworks, which
965
+ * has its own Providers › Fireworks Tier toggle).
966
+ *
967
+ * For "is priority actually applied to the next request?" use
968
+ * {@link isFastModeActive} instead.
969
+ */
970
+ isFastModeEnabled(): boolean;
971
+ /**
972
+ * True when `priority` is actually realized on the wire for the currently
973
+ * selected model (OpenAI/Google `service_tier`, direct Anthropic fast mode,
974
+ * or Fireworks priority). Returns false for tiers the active model can't
975
+ * realize and when no model is selected.
976
+ */
977
+ isFastModeActive(): boolean;
978
+ /** Set one family's tier (or clear it with `undefined`); persists the change. */
979
+ setServiceTierFamily(family: ServiceTierFamily, tier: ServiceTier | undefined): void;
980
+ /**
981
+ * `/fast on|off` targets the family of the currently selected model: it sets
982
+ * (or clears) that family's `priority` tier. Models without a service-tier
983
+ * family (Fireworks, or providers with no tier knob) have nothing to toggle.
984
+ */
985
+ setFastMode(enabled: boolean): void;
986
+ toggleFastMode(): boolean;
987
+ /**
988
+ * Get available thinking levels for current model.
989
+ */
990
+ getAvailableThinkingLevels(): ReadonlyArray<Effort>;
991
+ /**
992
+ * Set steering mode.
993
+ * Saves to settings.
994
+ */
995
+ setSteeringMode(mode: "all" | "one-at-a-time"): void;
996
+ /**
997
+ * Set follow-up mode.
998
+ * Saves to settings.
999
+ */
1000
+ setFollowUpMode(mode: "all" | "one-at-a-time"): void;
1001
+ /**
1002
+ * Set interrupt mode.
1003
+ * Saves to settings.
1004
+ */
1005
+ setInterruptMode(mode: "immediate" | "wait"): void;
1006
+ /**
1007
+ * Strip image content blocks from every message on the current branch and
1008
+ * persist the rewrite. Walks `SessionManager.getBranch()` in place — both
1009
+ * `SessionMessageEntry.message` and `CustomMessageEntry.content` arrays
1010
+ * are mutated, then `rewriteEntries` durably commits the new shape. The
1011
+ * agent's runtime view is rebuilt from the freshly-mutated entries so any
1012
+ * provider sessions caching message identity (Codex Responses) are torn
1013
+ * down to force a clean replay on the next turn.
1014
+ *
1015
+ * No-op when the branch carries no images; returns `{ removed: 0 }` and
1016
+ * skips the disk rewrite.
1017
+ */
1018
+ dropImages(): Promise<{
1019
+ removed: number;
1020
+ }>;
1021
+ /**
1022
+ * Surgically reduce context by dropping heavy content ("shake").
1023
+ *
1024
+ * - `images` delegates to {@link dropImages}.
1025
+ * - `elide` replaces whole tool-call results and large fenced/XML blocks
1026
+ * with short placeholders that embed an `artifact://` recovery link.
1027
+ *
1028
+ * Mutates the branch in place, persists via `rewriteEntries`, replays the
1029
+ * rebuilt context through the agent, and tears down provider sessions that
1030
+ * cache message identity — same rewrite contract as {@link dropImages}.
1031
+ *
1032
+ * No-op (zero counts) when nothing is eligible.
1033
+ */
1034
+ shake(mode: ShakeMode, opts?: {
1035
+ config?: ShakeConfig;
1036
+ signal?: AbortSignal;
1037
+ }): Promise<ShakeResult>;
1038
+ /**
1039
+ * Manually compact the session context.
1040
+ * Aborts current agent operation first.
1041
+ * @param customInstructions Optional instructions for the compaction summary
1042
+ * @param options Optional callbacks for completion/error handling
1043
+ */
1044
+ compact(customInstructions?: string, options?: CompactOptions): Promise<CompactionResult>;
1045
+ /**
1046
+ * Cancel in-progress context maintenance (manual compaction, auto-compaction, or auto-handoff).
1047
+ */
1048
+ abortCompaction(): void;
1049
+ /** Trigger idle compaction through the auto-compaction flow (with UI events). */
1050
+ runIdleCompaction(): Promise<void>;
1051
+ /**
1052
+ * Cancel in-progress branch summarization.
1053
+ */
1054
+ abortBranchSummary(): void;
1055
+ /**
1056
+ * Cancel in-progress handoff generation.
1057
+ */
1058
+ abortHandoff(): void;
1059
+ /**
1060
+ * Check if handoff generation is in progress.
1061
+ */
1062
+ get isGeneratingHandoff(): boolean;
1063
+ /**
1064
+ * Generate a handoff document with a oneshot LLM call, then start a new session with it.
1065
+ *
1066
+ * @param customInstructions Optional focus for the handoff document
1067
+ * @param options Handoff execution options
1068
+ * @returns The handoff document text, or undefined if cancelled/failed
1069
+ */
1070
+ handoff(customInstructions?: string, options?: SessionHandoffOptions): Promise<HandoffResult | undefined>;
1071
+ /**
1072
+ * Toggle auto-compaction setting.
1073
+ */
1074
+ setAutoCompactionEnabled(enabled: boolean): void;
1075
+ /** Whether auto-compaction is enabled */
1076
+ get autoCompactionEnabled(): boolean;
1077
+ /**
1078
+ * Cancel in-progress retry.
1079
+ */
1080
+ abortRetry(): void;
1081
+ /** Whether auto-retry is currently in progress */
1082
+ get isRetrying(): boolean;
1083
+ /** Whether auto-retry is enabled */
1084
+ get autoRetryEnabled(): boolean;
1085
+ /**
1086
+ * Toggle auto-retry setting.
1087
+ */
1088
+ setAutoRetryEnabled(enabled: boolean): void;
1089
+ /**
1090
+ * Manually retry the last failed assistant turn.
1091
+ * Removes the error message from agent state and re-attempts with a fresh retry budget.
1092
+ * @returns true if retry was initiated, false if no failed turn to retry or agent is busy
1093
+ */
1094
+ retry(): Promise<boolean>;
1095
+ /**
1096
+ * Execute a bash command.
1097
+ * Adds result to agent context and session.
1098
+ * @param command The bash command to execute
1099
+ * @param onChunk Optional streaming callback for output
1100
+ * @param options.excludeFromContext If true, command output won't be sent to LLM (!! prefix)
1101
+ * @param options.useUserShell If true, allow caller to request configured user-shell routing
1102
+ */
1103
+ executeBash(command: string, onChunk?: (chunk: string) => void, options?: {
1104
+ excludeFromContext?: boolean;
1105
+ useUserShell?: boolean;
1106
+ }): Promise<BashResult>;
1107
+ /**
1108
+ * Record a bash execution result in session history.
1109
+ * Used by executeBash and by extensions that handle bash execution themselves.
1110
+ */
1111
+ recordBashResult(command: string, result: BashResult, options?: {
1112
+ excludeFromContext?: boolean;
1113
+ }): void;
1114
+ /**
1115
+ * Cancel running bash command.
1116
+ */
1117
+ abortBash(): void;
1118
+ /** Whether a bash command is currently running */
1119
+ get isBashRunning(): boolean;
1120
+ /** Whether there are pending bash messages waiting to be flushed */
1121
+ get hasPendingBashMessages(): boolean;
1122
+ /**
1123
+ * Execute Python code in the shared kernel.
1124
+ * Uses the same kernel session as eval's Python backend, allowing collaborative editing.
1125
+ * @param code The Python code to execute
1126
+ * @param onChunk Optional streaming callback for output
1127
+ * @param options.excludeFromContext If true, execution won't be sent to LLM ($$ prefix)
1128
+ */
1129
+ executePython(code: string, onChunk?: (chunk: string) => void, options?: {
1130
+ excludeFromContext?: boolean;
1131
+ }): Promise<PythonResult>;
1132
+ assertEvalExecutionAllowed(): void;
1133
+ /**
1134
+ * Track Python work started outside AgentSession.executePython so dispose can await and abort it too.
1135
+ */
1136
+ trackEvalExecution<T>(execution: Promise<T>, abortController: AbortController): Promise<T>;
1137
+ /**
1138
+ * Record a Python execution result in session history.
1139
+ */
1140
+ recordPythonResult(code: string, result: PythonResult, options?: {
1141
+ excludeFromContext?: boolean;
1142
+ }): void;
1143
+ /**
1144
+ * Cancel running Python execution.
1145
+ */
1146
+ abortEval(): void;
1147
+ /** Whether a Python execution is currently running */
1148
+ get isEvalRunning(): boolean;
1149
+ /** Whether there are pending Python messages waiting to be flushed */
1150
+ get hasPendingPythonMessages(): boolean;
1151
+ /**
1152
+ * Surfaces (and consumes) pending IRC incoming records before the next model
1153
+ * step can inject them automatically.
1154
+ *
1155
+ * The inbox tool injects the formatted body into the tool result, so the
1156
+ * model sees it once via the result. Leaving the record in either pending
1157
+ * IRC queue would deliver it a second time at the next step boundary —
1158
+ * including on `peek`, which is why peek also drains here.
1159
+ */
1160
+ drainPendingIrcInboxMessages(agentId: string): IrcMessage[];
1161
+ /**
1162
+ * Deliver an IRC message into this session (recipient side; called by the
1163
+ * IrcBus). Emits the `irc_message` session event for UI cards and injects
1164
+ * the rendered message into the model's context as an `irc:incoming`
1165
+ * custom message:
1166
+ *
1167
+ * - mid-turn → queued on the aside channel and folded in at the next step
1168
+ * boundary (non-interrupting, like async-result deliveries) → "injected";
1169
+ * - idle → starts a real turn with the message so the recipient wakes
1170
+ * → "woken".
1171
+ *
1172
+ * Never blocks on the recipient's turn: the wake turn is fire-and-forget.
1173
+ *
1174
+ * When the sender expects a reply (`send await:true`) and this session is
1175
+ * mid-turn with async execution disabled, the next step boundary may be
1176
+ * gated on the sender's own batch finishing (blocking task spawns), so a
1177
+ * real reply turn can never happen in time. In that case an ephemeral
1178
+ * side-channel auto-reply is generated from the current context (the old
1179
+ * `respondAsBackground` path) and sent back over the bus on this agent's
1180
+ * behalf.
1181
+ */
1182
+ deliverIrcMessage(msg: IrcMessage, opts?: {
1183
+ expectsReply?: boolean;
1184
+ }): Promise<"injected" | "woken">;
1185
+ /**
1186
+ * Emit an IRC relay observation event on this session for UI rendering only.
1187
+ * Does not persist the record to history. Called by the IrcBus to surface
1188
+ * agent↔agent traffic on the main session.
1189
+ */
1190
+ emitIrcRelayObservation(record: CustomMessage): void;
1191
+ /**
1192
+ * Run a single ephemeral side-channel turn against this session's current
1193
+ * model + system prompt + history. The main turn's tool catalog is sent
1194
+ * to preserve the prompt cache, but the model is reminded not to call
1195
+ * tools and any tool calls are discarded. The side request
1196
+ * does not block on, or interfere with, any in-flight main turn. The
1197
+ * session's history and persisted state are NOT modified by this call.
1198
+ *
1199
+ * Used by `BtwController` (`/btw`) and `OmfgController` (`/omfg`) to share
1200
+ * the snapshot + stream pipeline. The snapshot includes any in-flight
1201
+ * streaming assistant text so the model sees the half-finished response
1202
+ * rather than missing context.
1203
+ */
1204
+ runEphemeralTurn(args: {
1205
+ promptText: string;
1206
+ onTextDelta?: (delta: string) => void;
1207
+ signal?: AbortSignal;
1208
+ dedupeReply?: boolean;
1209
+ }): Promise<{
1210
+ replyText: string;
1211
+ assistantMessage: AssistantMessage;
1212
+ }>;
1213
+ /**
1214
+ * Reload the current session from disk.
1215
+ *
1216
+ * Intended for extension commands and headless modes to re-read the current session
1217
+ * file and re-emit session_switch hooks.
1218
+ */
1219
+ reload(): Promise<void>;
1220
+ /**
1221
+ * Switch to a different session file.
1222
+ * Aborts current operation, loads messages, restores model/thinking.
1223
+ * Listeners are preserved and will continue receiving events.
1224
+ * @returns true if switch completed, false if cancelled by hook
1225
+ */
1226
+ switchSession(sessionPath: string): Promise<boolean>;
1227
+ /**
1228
+ * Create a branch from a specific entry.
1229
+ * Emits before_branch/branch session events to hooks.
1230
+ *
1231
+ * @param entryId ID of the entry to branch from
1232
+ * @returns Object with:
1233
+ * - selectedText: The text of the selected user message (for editor pre-fill)
1234
+ * - cancelled: True if a hook cancelled the branch
1235
+ */
1236
+ branch(entryId: string): Promise<{
1237
+ selectedText: string;
1238
+ cancelled: boolean;
1239
+ }>;
1240
+ branchFromBtw(question: string, assistantMessage: AssistantMessage): Promise<{
1241
+ cancelled: boolean;
1242
+ sessionFile: string | undefined;
1243
+ }>;
1244
+ /**
1245
+ * Navigate to a different node in the session tree.
1246
+ * Unlike branch() which creates a new session file, this stays in the same file.
1247
+ *
1248
+ * @param targetId The entry ID to navigate to
1249
+ * @param options.summarize Whether user wants to summarize abandoned branch
1250
+ * @param options.customInstructions Custom instructions for summarizer
1251
+ * @returns Result with editorText (if user message) and cancelled status
1252
+ */
1253
+ navigateTree(targetId: string, options?: {
1254
+ summarize?: boolean;
1255
+ customInstructions?: string;
1256
+ }): Promise<{
1257
+ editorText?: string;
1258
+ cancelled: boolean;
1259
+ aborted?: boolean;
1260
+ summaryEntry?: BranchSummaryEntry;
1261
+ /** Raw session context built during navigation — pass to renderInitialMessages to skip a second O(N) walk. */
1262
+ sessionContext?: SessionContext;
1263
+ }>;
1264
+ /**
1265
+ * Get all user messages from session for branch selector.
1266
+ */
1267
+ getUserMessagesForBranching(): Array<{
1268
+ entryId: string;
1269
+ text: string;
1270
+ }>;
1271
+ /**
1272
+ * Get session statistics.
1273
+ */
1274
+ getSessionStats(): SessionStats;
1275
+ /**
1276
+ * Get current context usage statistics.
1277
+ * Uses the last assistant message's usage data when available,
1278
+ * otherwise estimates tokens for all messages.
1279
+ */
1280
+ getContextBreakdown(options?: {
1281
+ contextWindow?: number;
1282
+ pendingMessages?: AgentMessage[];
1283
+ }): ContextUsageBreakdown | undefined;
1284
+ getContextUsage(options?: {
1285
+ contextWindow?: number;
1286
+ }): ContextUsage | undefined;
1287
+ /**
1288
+ * Monotonic counter that changes whenever the in-flight pending context
1289
+ * snapshot is set or cleared. Status-line context memoization keys on this so
1290
+ * a value computed mid-turn cannot persist after the turn ends/aborts.
1291
+ */
1292
+ get contextUsageRevision(): number;
1293
+ fetchUsageReports(signal?: AbortSignal): Promise<UsageReport[] | null>;
1294
+ /**
1295
+ * Redeem one saved Codex rate-limit reset for a specific account, injecting
1296
+ * the provider base URL like {@link AgentSession.fetchUsageReports}. Powers
1297
+ * the `/usage reset` command and auto-redeem. Never throws for business
1298
+ * outcomes — inspect the returned `code`.
1299
+ */
1300
+ redeemResetCredit(target: ResetCreditTarget, signal?: AbortSignal): Promise<ResetCreditRedeemOutcome>;
1301
+ /**
1302
+ * List saved Codex rate-limit resets per stored account, fetched live from
1303
+ * the dedicated credits endpoint (bypasses the usage cache). Powers the
1304
+ * `/usage reset` account selector.
1305
+ */
1306
+ listResetCredits(signal?: AbortSignal): Promise<ResetCreditAccountStatus[]>;
1307
+ /**
1308
+ * Export session to HTML.
1309
+ * @param outputPath Optional output path (defaults to session directory)
1310
+ * @returns Path to exported file
1311
+ */
1312
+ exportToHtml(outputPath?: string): Promise<string>;
1313
+ /**
1314
+ * Get text content of last assistant message.
1315
+ * Useful for /copy command.
1316
+ * @returns Text content, or undefined if no assistant message exists
1317
+ */
1318
+ getLastAssistantText(): string | undefined;
1319
+ hasCopyCandidateAssistantMessage(): boolean;
1320
+ /**
1321
+ * Get text content of the most recent visible handoff message.
1322
+ * Fresh handoff sessions store the handoff context as a custom message, not
1323
+ * an assistant message, so callers that copy the "last" message can use this
1324
+ * as a fallback before the new session has an assistant response.
1325
+ */
1326
+ getLastVisibleHandoffText(): string | undefined;
1327
+ /**
1328
+ * Format the entire session as plain text for clipboard export: system
1329
+ * prompt, model/thinking config, tool inventory, and the full transcript
1330
+ * rendered with markdown role headings (`## User`, `## Assistant`,
1331
+ * `### Tool Call`/`### Tool Result`).
1332
+ */
1333
+ formatSessionAsText(): string;
1334
+ /**
1335
+ * Dump the current session's LLM-facing request context as JSON to a
1336
+ * auto-named file in `os.tmpdir()`. This is the synchronous
1337
+ * `convertToLlm`-boundary snapshot — system prompt, tools (wire schemas),
1338
+ * thinking/service tier, and converted messages — with no network round-trip
1339
+ * and no arming flag, so advisor/side requests cannot intercept it.
1340
+ *
1341
+ * The file persists on disk and may contain the same raw context/secrets
1342
+ * as `/dump`; treat the path accordingly.
1343
+ *
1344
+ * @returns the written file path, or `undefined` when there are no messages.
1345
+ */
1346
+ dumpLlmRequestToTmpDir(): Promise<string | undefined>;
1347
+ /**
1348
+ * Enable or disable the advisor for this session. The setting is overridden for the session,
1349
+ * and the runtime is started or stopped to match.
1350
+ *
1351
+ * @returns true when the advisor is actively running after the call.
1352
+ */
1353
+ setAdvisorEnabled(enabled: boolean): boolean;
1354
+ /**
1355
+ * Toggle the advisor setting and start/stop the runtime accordingly.
1356
+ *
1357
+ * @returns true when the advisor is actively running after the call.
1358
+ */
1359
+ toggleAdvisorEnabled(): boolean;
1360
+ /**
1361
+ * Replace the live advisor roster from an edited `WATCHDOG.yml` (the `/advisor
1362
+ * configure` save path). Swaps the configs + shared baseline, then rebuilds the
1363
+ * runtimes in place so the change applies without a restart. When the advisor is
1364
+ * disabled the new configs are simply stored for the next enable.
1365
+ *
1366
+ * @returns the number of advisors active after the rebuild.
1367
+ */
1368
+ applyAdvisorConfigs(advisors: AdvisorConfig[], sharedInstructions: string | undefined): number;
1369
+ /**
1370
+ * Whether the advisor setting is enabled for this session.
1371
+ */
1372
+ isAdvisorEnabled(): boolean;
1373
+ /**
1374
+ * Whether a live advisor agent is attached to this session. True only when
1375
+ * `advisor.enabled` is set AND a model resolved for the `advisor` role AND
1376
+ * the advisor applies to this agent kind — i.e. the actual runtime exists,
1377
+ * not merely the setting. Drives the status-line badge and `/dump advisor`.
1378
+ */
1379
+ isAdvisorActive(): boolean;
1380
+ /**
1381
+ * The names of the tools available to advisors this session (the pool a
1382
+ * `/advisor configure` editor lists). The advisor is a full agent, so this is the
1383
+ * full built tool set; a tool whose optional factory returns null (e.g. lsp with
1384
+ * no servers) is absent.
1385
+ */
1386
+ getAdvisorAvailableToolNames(): string[];
1387
+ /**
1388
+ * The live advisor `Agent`, or `undefined` when no advisor runtime is
1389
+ * attached. Surfaced for diagnostics (`/dump advisor` already serializes
1390
+ * its transcript via {@link formatAdvisorHistoryAsText}) and so callers can
1391
+ * verify the advisor inherits the session's provider-shaping options
1392
+ * (`streamFn`, `promptCacheKey`, `providerSessionState`, ...).
1393
+ */
1394
+ getAdvisorAgent(): Agent | undefined;
1395
+ /**
1396
+ * Return structured advisor stats for the status command and TUI panel.
1397
+ */
1398
+ getAdvisorStats(): AdvisorStats;
1399
+ /**
1400
+ * Format a concise advisor status line for ACP/text output.
1401
+ */
1402
+ formatAdvisorStatus(): string;
1403
+ /**
1404
+ * Format the advisor agent's own transcript (its system prompt, config,
1405
+ * tools, and the markdown deltas it received plus its thinking/advise/read
1406
+ * calls) as plain text — the advisor-side equivalent of
1407
+ * {@link formatSessionAsText}. Returns null when no advisor is active.
1408
+ */
1409
+ formatAdvisorHistoryAsText(options?: {
1410
+ compact?: boolean;
1411
+ }): string | null;
1412
+ /**
1413
+ * Check if extensions have handlers for a specific event type.
1414
+ */
1415
+ hasExtensionHandlers(eventType: string): boolean;
1416
+ /**
1417
+ * Get the extension runner (for setting UI context and error handlers).
1418
+ */
1419
+ get extensionRunner(): ExtensionRunner | undefined;
1420
+ }