@cerebriline/core 4.100.240

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 (479) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +16 -0
  3. package/assets/office-oxide/LICENSE-APACHE +176 -0
  4. package/assets/office-oxide/LICENSE-MIT +25 -0
  5. package/assets/office-oxide/office_oxide_bg.wasm +0 -0
  6. package/assets/prompt-templates/claude.md +516 -0
  7. package/assets/prompt-templates/deepseek.md +331 -0
  8. package/assets/prompt-templates/default.md +386 -0
  9. package/assets/prompt-templates/gemma.md +352 -0
  10. package/assets/prompt-templates/glm.md +334 -0
  11. package/assets/prompt-templates/kimi-k3.md +408 -0
  12. package/assets/prompt-templates/kimi.md +402 -0
  13. package/assets/prompt-templates/minimax.md +473 -0
  14. package/assets/prompt-templates/nemotron.md +358 -0
  15. package/assets/prompt-templates/qwen.md +612 -0
  16. package/dist/ClineCore.d.ts +365 -0
  17. package/dist/account/cline-account-service.d.ts +41 -0
  18. package/dist/account/index.d.ts +3 -0
  19. package/dist/account/rpc.d.ts +40 -0
  20. package/dist/account/types.d.ts +122 -0
  21. package/dist/auth/bounded-ttl-cache.d.ts +13 -0
  22. package/dist/auth/client.d.ts +30 -0
  23. package/dist/auth/cline.d.ts +71 -0
  24. package/dist/auth/codex.d.ts +40 -0
  25. package/dist/auth/oca.d.ts +21 -0
  26. package/dist/auth/provider-auth-registry.d.ts +52 -0
  27. package/dist/auth/server.d.ts +54 -0
  28. package/dist/auth/types.d.ts +103 -0
  29. package/dist/auth/utils.d.ts +31 -0
  30. package/dist/cline-core/automation.d.ts +34 -0
  31. package/dist/cline-core/runtime-services.d.ts +5 -0
  32. package/dist/cline-core/start-input.d.ts +10 -0
  33. package/dist/cline-core/telemetry.d.ts +10 -0
  34. package/dist/cline-core/types.d.ts +236 -0
  35. package/dist/cron/events/cron-event-ingress.d.ts +37 -0
  36. package/dist/cron/reports/cron-report-writer.d.ts +42 -0
  37. package/dist/cron/runner/cron-materializer.d.ts +35 -0
  38. package/dist/cron/runner/cron-runner.d.ts +60 -0
  39. package/dist/cron/runner/resource-limiter.d.ts +8 -0
  40. package/dist/cron/schedule/scheduler.d.ts +12 -0
  41. package/dist/cron/service/cron-service.d.ts +56 -0
  42. package/dist/cron/service/schedule-command-service.d.ts +14 -0
  43. package/dist/cron/service/schedule-service.d.ts +116 -0
  44. package/dist/cron/service/schedule-tool.d.ts +81 -0
  45. package/dist/cron/specs/cron-reconciler.d.ts +61 -0
  46. package/dist/cron/specs/cron-spec-parser.d.ts +26 -0
  47. package/dist/cron/specs/cron-watcher.d.ts +22 -0
  48. package/dist/cron/store/cron-schema.d.ts +2 -0
  49. package/dist/cron/store/sqlite-cron-store.d.ts +261 -0
  50. package/dist/extensions/agent-plugin/agent-skill.d.ts +21 -0
  51. package/dist/extensions/agent-plugin/index.d.ts +4 -0
  52. package/dist/extensions/agent-plugin/loader.d.ts +10 -0
  53. package/dist/extensions/agent-plugin/types.d.ts +67 -0
  54. package/dist/extensions/complexity/grammars.d.ts +92 -0
  55. package/dist/extensions/complexity/walker.d.ts +115 -0
  56. package/dist/extensions/config/builtin-templates.d.ts +10 -0
  57. package/dist/extensions/config/builtin-templates.generated.d.ts +5 -0
  58. package/dist/extensions/config/index.d.ts +15 -0
  59. package/dist/extensions/config/prompt-template-compaction.d.ts +92 -0
  60. package/dist/extensions/config/prompt-template-delta.d.ts +107 -0
  61. package/dist/extensions/config/prompt-template-hooks.d.ts +47 -0
  62. package/dist/extensions/config/prompt-template-loader.d.ts +79 -0
  63. package/dist/extensions/config/prompt-template-parser.d.ts +56 -0
  64. package/dist/extensions/config/prompt-template-review.d.ts +327 -0
  65. package/dist/extensions/config/prompt-template-session.d.ts +46 -0
  66. package/dist/extensions/config/runtime-commands.d.ts +23 -0
  67. package/dist/extensions/config/shipped-tool-signatures.d.ts +36 -0
  68. package/dist/extensions/config/skill-frontmatter-toggle.d.ts +11 -0
  69. package/dist/extensions/config/unified-config-file-watcher.d.ts +77 -0
  70. package/dist/extensions/config/user-instruction-config-loader.d.ts +77 -0
  71. package/dist/extensions/config/user-instruction-plugin.d.ts +26 -0
  72. package/dist/extensions/config/user-instruction-service.d.ts +31 -0
  73. package/dist/extensions/context/agentic-compaction.d.ts +129 -0
  74. package/dist/extensions/context/basic-compaction.d.ts +19 -0
  75. package/dist/extensions/context/budget-projection/index.d.ts +2 -0
  76. package/dist/extensions/context/budget-projection/project.d.ts +4 -0
  77. package/dist/extensions/context/budget-projection/types.d.ts +58 -0
  78. package/dist/extensions/context/capped-thinking.d.ts +195 -0
  79. package/dist/extensions/context/compaction-cause.d.ts +27 -0
  80. package/dist/extensions/context/compaction-journal.d.ts +65 -0
  81. package/dist/extensions/context/compaction-revisions.d.ts +72 -0
  82. package/dist/extensions/context/compaction-shared.d.ts +608 -0
  83. package/dist/extensions/context/compaction.d.ts +161 -0
  84. package/dist/extensions/context/context-minimum-warning.d.ts +27 -0
  85. package/dist/extensions/context/continuation-compaction.d.ts +260 -0
  86. package/dist/extensions/context/council-compaction.d.ts +262 -0
  87. package/dist/extensions/context/full-compaction.d.ts +44 -0
  88. package/dist/extensions/context/kv-pressure.d.ts +258 -0
  89. package/dist/extensions/context/polykv-session.d.ts +372 -0
  90. package/dist/extensions/context/replay-compaction.d.ts +90 -0
  91. package/dist/extensions/context/tool-ledger.d.ts +198 -0
  92. package/dist/extensions/context/work-digest.d.ts +92 -0
  93. package/dist/extensions/index.d.ts +7 -0
  94. package/dist/extensions/mcp/client.d.ts +28 -0
  95. package/dist/extensions/mcp/config-loader.d.ts +102 -0
  96. package/dist/extensions/mcp/index.d.ts +15 -0
  97. package/dist/extensions/mcp/manager.d.ts +23 -0
  98. package/dist/extensions/mcp/name-transform.d.ts +2 -0
  99. package/dist/extensions/mcp/oauth.d.ts +68 -0
  100. package/dist/extensions/mcp/plugin-server-registration.d.ts +18 -0
  101. package/dist/extensions/mcp/policies.d.ts +14 -0
  102. package/dist/extensions/mcp/remote-proxy.d.ts +9 -0
  103. package/dist/extensions/mcp/timeout.d.ts +2 -0
  104. package/dist/extensions/mcp/tools.d.ts +3 -0
  105. package/dist/extensions/mcp/types.d.ts +133 -0
  106. package/dist/extensions/plugin/plugin-config-loader.d.ts +44 -0
  107. package/dist/extensions/plugin/plugin-load-report.d.ts +18 -0
  108. package/dist/extensions/plugin/plugin-loader.d.ts +23 -0
  109. package/dist/extensions/plugin/plugin-module-import.d.ts +4 -0
  110. package/dist/extensions/plugin/plugin-sandbox.d.ts +82 -0
  111. package/dist/extensions/plugin/plugin-targeting.d.ts +6 -0
  112. package/dist/extensions/plugin-sandbox-bootstrap.js +1 -0
  113. package/dist/extensions/tools/ask-lsp.d.ts +150 -0
  114. package/dist/extensions/tools/audio-tools.d.ts +156 -0
  115. package/dist/extensions/tools/browser.d.ts +137 -0
  116. package/dist/extensions/tools/check-file.d.ts +218 -0
  117. package/dist/extensions/tools/check-on-failure.d.ts +49 -0
  118. package/dist/extensions/tools/code-intel.d.ts +131 -0
  119. package/dist/extensions/tools/command-guard-extension.d.ts +22 -0
  120. package/dist/extensions/tools/command-guard.d.ts +29 -0
  121. package/dist/extensions/tools/constants.d.ts +28 -0
  122. package/dist/extensions/tools/definitions.d.ts +178 -0
  123. package/dist/extensions/tools/delimiter-balance.d.ts +121 -0
  124. package/dist/extensions/tools/edit-verification.d.ts +86 -0
  125. package/dist/extensions/tools/error-locations.d.ts +53 -0
  126. package/dist/extensions/tools/executors/apply-patch-parser.d.ts +68 -0
  127. package/dist/extensions/tools/executors/apply-patch.d.ts +48 -0
  128. package/dist/extensions/tools/executors/awk-parser.d.ts +163 -0
  129. package/dist/extensions/tools/executors/awk.d.ts +41 -0
  130. package/dist/extensions/tools/executors/bash.d.ts +119 -0
  131. package/dist/extensions/tools/executors/document/assets.d.ts +22 -0
  132. package/dist/extensions/tools/executors/document/ebook.d.ts +11 -0
  133. package/dist/extensions/tools/executors/document/formats.d.ts +83 -0
  134. package/dist/extensions/tools/executors/document/images.d.ts +73 -0
  135. package/dist/extensions/tools/executors/document/legacy.d.ts +20 -0
  136. package/dist/extensions/tools/executors/document/ocr.d.ts +67 -0
  137. package/dist/extensions/tools/executors/document/office-oxide.d.ts +19 -0
  138. package/dist/extensions/tools/executors/document/office-oxide.generated.d.ts +82 -0
  139. package/dist/extensions/tools/executors/document/office.d.ts +10 -0
  140. package/dist/extensions/tools/executors/document/pdf.d.ts +6 -0
  141. package/dist/extensions/tools/executors/document/pdfjs.d.ts +30 -0
  142. package/dist/extensions/tools/executors/document/range.d.ts +18 -0
  143. package/dist/extensions/tools/executors/document/recognition.d.ts +67 -0
  144. package/dist/extensions/tools/executors/document-extract.d.ts +55 -0
  145. package/dist/extensions/tools/executors/editor.d.ts +68 -0
  146. package/dist/extensions/tools/executors/file-locks.d.ts +41 -0
  147. package/dist/extensions/tools/executors/file-read.d.ts +136 -0
  148. package/dist/extensions/tools/executors/grep.d.ts +35 -0
  149. package/dist/extensions/tools/executors/index.d.ts +97 -0
  150. package/dist/extensions/tools/executors/line-endings.d.ts +23 -0
  151. package/dist/extensions/tools/executors/output-limits.d.ts +58 -0
  152. package/dist/extensions/tools/executors/overlay-receipts.d.ts +25 -0
  153. package/dist/extensions/tools/executors/posix-regex.d.ts +52 -0
  154. package/dist/extensions/tools/executors/read-receipts.d.ts +93 -0
  155. package/dist/extensions/tools/executors/run-command-execution-controller.d.ts +16 -0
  156. package/dist/extensions/tools/executors/search.d.ts +50 -0
  157. package/dist/extensions/tools/executors/sed.d.ts +92 -0
  158. package/dist/extensions/tools/executors/unchanged-reads.d.ts +55 -0
  159. package/dist/extensions/tools/executors/web-fetch.d.ts +58 -0
  160. package/dist/extensions/tools/helpers.d.ts +59 -0
  161. package/dist/extensions/tools/image-edit.d.ts +76 -0
  162. package/dist/extensions/tools/image-generation.d.ts +183 -0
  163. package/dist/extensions/tools/index.d.ts +68 -0
  164. package/dist/extensions/tools/jev.d.ts +336 -0
  165. package/dist/extensions/tools/list-files.d.ts +128 -0
  166. package/dist/extensions/tools/media-endpoint.d.ts +160 -0
  167. package/dist/extensions/tools/media-tools.d.ts +140 -0
  168. package/dist/extensions/tools/model-tool-routing.d.ts +33 -0
  169. package/dist/extensions/tools/presets.d.ts +154 -0
  170. package/dist/extensions/tools/qa-credentials.d.ts +133 -0
  171. package/dist/extensions/tools/runtime.d.ts +39 -0
  172. package/dist/extensions/tools/schemas.d.ts +845 -0
  173. package/dist/extensions/tools/task-progress.d.ts +217 -0
  174. package/dist/extensions/tools/team/agent-admission.d.ts +127 -0
  175. package/dist/extensions/tools/team/agent-check.d.ts +152 -0
  176. package/dist/extensions/tools/team/agent-controls.d.ts +55 -0
  177. package/dist/extensions/tools/team/agent-file.d.ts +28 -0
  178. package/dist/extensions/tools/team/agent-iteration-cap.d.ts +328 -0
  179. package/dist/extensions/tools/team/agent-names.d.ts +29 -0
  180. package/dist/extensions/tools/team/agent-node-placement.d.ts +160 -0
  181. package/dist/extensions/tools/team/agent-placement-queue.d.ts +199 -0
  182. package/dist/extensions/tools/team/agent-placement.d.ts +118 -0
  183. package/dist/extensions/tools/team/agent-reports.d.ts +53 -0
  184. package/dist/extensions/tools/team/agent-rounds.d.ts +666 -0
  185. package/dist/extensions/tools/team/agent-sandbox-executors.d.ts +79 -0
  186. package/dist/extensions/tools/team/agent-slot-gate.d.ts +186 -0
  187. package/dist/extensions/tools/team/agent-status.d.ts +84 -0
  188. package/dist/extensions/tools/team/agent-trouble.d.ts +91 -0
  189. package/dist/extensions/tools/team/background-delegations.d.ts +106 -0
  190. package/dist/extensions/tools/team/batch-report.d.ts +151 -0
  191. package/dist/extensions/tools/team/configured-agent-config.d.ts +37 -0
  192. package/dist/extensions/tools/team/configured-agent-tool.d.ts +135 -0
  193. package/dist/extensions/tools/team/create-agent-tool.d.ts +45 -0
  194. package/dist/extensions/tools/team/delegate-to-agent.d.ts +105 -0
  195. package/dist/extensions/tools/team/delegated-agent.d.ts +272 -0
  196. package/dist/extensions/tools/team/delegated-sandboxes.d.ts +125 -0
  197. package/dist/extensions/tools/team/delegated-tools.d.ts +40 -0
  198. package/dist/extensions/tools/team/delegation-call-hooks.d.ts +30 -0
  199. package/dist/extensions/tools/team/engine-evictions.d.ts +38 -0
  200. package/dist/extensions/tools/team/index.d.ts +20 -0
  201. package/dist/extensions/tools/team/lead-agent-tools.d.ts +92 -0
  202. package/dist/extensions/tools/team/multi-agent.d.ts +364 -0
  203. package/dist/extensions/tools/team/node-reachability.d.ts +53 -0
  204. package/dist/extensions/tools/team/node-throughput.d.ts +40 -0
  205. package/dist/extensions/tools/team/placed-run.d.ts +114 -0
  206. package/dist/extensions/tools/team/projections.d.ts +8 -0
  207. package/dist/extensions/tools/team/runtime.d.ts +6 -0
  208. package/dist/extensions/tools/team/session-window-retry.d.ts +28 -0
  209. package/dist/extensions/tools/team/spawn-agent-tool.d.ts +450 -0
  210. package/dist/extensions/tools/team/spawn-sampling.d.ts +188 -0
  211. package/dist/extensions/tools/team/spawn-swarm-tool.d.ts +330 -0
  212. package/dist/extensions/tools/team/subagent-cancellation.d.ts +188 -0
  213. package/dist/extensions/tools/team/subagent-layout.d.ts +90 -0
  214. package/dist/extensions/tools/team/subagent-output.d.ts +73 -0
  215. package/dist/extensions/tools/team/subagent-progress.d.ts +211 -0
  216. package/dist/extensions/tools/team/subagent-prompts.d.ts +3 -0
  217. package/dist/extensions/tools/team/team-state-dates.d.ts +10 -0
  218. package/dist/extensions/tools/team/team-tools.d.ts +56 -0
  219. package/dist/extensions/tools/team/teammates-off.d.ts +14 -0
  220. package/dist/extensions/tools/team/token-split.d.ts +28 -0
  221. package/dist/extensions/tools/team/turn-fault-recovery.d.ts +71 -0
  222. package/dist/extensions/tools/types.d.ts +410 -0
  223. package/dist/extensions/tools/video-generation.d.ts +94 -0
  224. package/dist/hooks/checkpoint-hooks.d.ts +39 -0
  225. package/dist/hooks/hook-extension.d.ts +2 -0
  226. package/dist/hooks/hook-file-config.d.ts +24 -0
  227. package/dist/hooks/hook-file-hooks.d.ts +22 -0
  228. package/dist/hooks/index.d.ts +5 -0
  229. package/dist/hooks/subprocess-runner.d.ts +21 -0
  230. package/dist/hooks/subprocess.d.ts +74 -0
  231. package/dist/hub/client/connect.d.ts +14 -0
  232. package/dist/hub/client/index.d.ts +146 -0
  233. package/dist/hub/client/managed-hub-build-watcher.d.ts +62 -0
  234. package/dist/hub/client/session-client.d.ts +138 -0
  235. package/dist/hub/client/ui-client.d.ts +52 -0
  236. package/dist/hub/daemon/entry.d.ts +15 -0
  237. package/dist/hub/daemon/entry.js +2033 -0
  238. package/dist/hub/daemon/index.d.ts +125 -0
  239. package/dist/hub/daemon/runtime-handlers.d.ts +12 -0
  240. package/dist/hub/daemon/shutdown-coordinator.d.ts +31 -0
  241. package/dist/hub/daemon/start-shared-server.d.ts +18 -0
  242. package/dist/hub/daemon/telemetry.d.ts +19 -0
  243. package/dist/hub/discovery/defaults.d.ts +16 -0
  244. package/dist/hub/discovery/index.d.ts +139 -0
  245. package/dist/hub/discovery/instance-lock.d.ts +51 -0
  246. package/dist/hub/discovery/workspace.d.ts +13 -0
  247. package/dist/hub/index.d.ts +38 -0
  248. package/dist/hub/index.js +2023 -0
  249. package/dist/hub/runtime-host/hub-runtime-host.d.ts +83 -0
  250. package/dist/hub/runtime-host/remote-runtime-host.d.ts +9 -0
  251. package/dist/hub/server/browser-websocket.d.ts +22 -0
  252. package/dist/hub/server/command-transport.d.ts +29 -0
  253. package/dist/hub/server/handlers/approval-handlers.d.ts +24 -0
  254. package/dist/hub/server/handlers/capability-handlers.d.ts +12 -0
  255. package/dist/hub/server/handlers/client-handlers.d.ts +6 -0
  256. package/dist/hub/server/handlers/connector-handlers.d.ts +20 -0
  257. package/dist/hub/server/handlers/context.d.ts +98 -0
  258. package/dist/hub/server/handlers/run-handlers.d.ts +6 -0
  259. package/dist/hub/server/handlers/run-queue-handlers.d.ts +33 -0
  260. package/dist/hub/server/handlers/session-event-projector.d.ts +7 -0
  261. package/dist/hub/server/handlers/session-handlers.d.ts +30 -0
  262. package/dist/hub/server/hub-client-contributions.d.ts +19 -0
  263. package/dist/hub/server/hub-event-log.d.ts +57 -0
  264. package/dist/hub/server/hub-notifications.d.ts +7 -0
  265. package/dist/hub/server/hub-run-queue.d.ts +82 -0
  266. package/dist/hub/server/hub-schedule-events.d.ts +2 -0
  267. package/dist/hub/server/hub-server-logging.d.ts +2 -0
  268. package/dist/hub/server/hub-server-options.d.ts +94 -0
  269. package/dist/hub/server/hub-server-transport.d.ts +71 -0
  270. package/dist/hub/server/hub-session-records.d.ts +9 -0
  271. package/dist/hub/server/hub-websocket-server.d.ts +12 -0
  272. package/dist/hub/server/index.d.ts +4 -0
  273. package/dist/hub/server/native-transport.d.ts +25 -0
  274. package/dist/hub/server/task-command-service.d.ts +11 -0
  275. package/dist/index.d.ts +172 -0
  276. package/dist/index.js +5435 -0
  277. package/dist/logging/early-logger.d.ts +37 -0
  278. package/dist/remote-config/integration.d.ts +17 -0
  279. package/dist/runtime/atomic/base-revision-reads.d.ts +106 -0
  280. package/dist/runtime/atomic/base-revision.d.ts +77 -0
  281. package/dist/runtime/atomic/check-first-edits.d.ts +79 -0
  282. package/dist/runtime/atomic/file-revisions.d.ts +268 -0
  283. package/dist/runtime/atomic/oracle.d.ts +178 -0
  284. package/dist/runtime/atomic/page-check.d.ts +39 -0
  285. package/dist/runtime/atomic/plan-capture.d.ts +40 -0
  286. package/dist/runtime/atomic/plan-text.d.ts +33 -0
  287. package/dist/runtime/atomic/plan-tool.d.ts +159 -0
  288. package/dist/runtime/atomic/proposal.d.ts +112 -0
  289. package/dist/runtime/atomic/propose-check-tool.d.ts +76 -0
  290. package/dist/runtime/atomic/protocol.d.ts +233 -0
  291. package/dist/runtime/atomic/restore-file-tool.d.ts +196 -0
  292. package/dist/runtime/atomic/revision-capture.d.ts +75 -0
  293. package/dist/runtime/atomic/run-check-tool.d.ts +64 -0
  294. package/dist/runtime/atomic/session-protocol.d.ts +304 -0
  295. package/dist/runtime/atomic/session-revisions.d.ts +77 -0
  296. package/dist/runtime/atomic/snapshot.d.ts +77 -0
  297. package/dist/runtime/atomic/stalled-checks.d.ts +106 -0
  298. package/dist/runtime/atomic/submit-transaction-tool.d.ts +50 -0
  299. package/dist/runtime/atomic/tool-activity.d.ts +15 -0
  300. package/dist/runtime/atomic/transaction-controller.d.ts +364 -0
  301. package/dist/runtime/atomic/unparseable-change.d.ts +35 -0
  302. package/dist/runtime/capabilities/index.d.ts +2 -0
  303. package/dist/runtime/capabilities/normalize-runtime-capabilities.d.ts +2 -0
  304. package/dist/runtime/capabilities/runtime-capabilities.d.ts +18 -0
  305. package/dist/runtime/config/agent-message-codec.d.ts +6 -0
  306. package/dist/runtime/config/agent-runtime-config-builder.d.ts +93 -0
  307. package/dist/runtime/config/connection-update.d.ts +40 -0
  308. package/dist/runtime/escalation/a2a.d.ts +109 -0
  309. package/dist/runtime/escalation/assessment.d.ts +54 -0
  310. package/dist/runtime/escalation/brief.d.ts +70 -0
  311. package/dist/runtime/escalation/escalate-tool.d.ts +93 -0
  312. package/dist/runtime/escalation/escalation-controller.d.ts +62 -0
  313. package/dist/runtime/escalation/escalation-session.d.ts +241 -0
  314. package/dist/runtime/escalation/expert-failure.d.ts +20 -0
  315. package/dist/runtime/escalation/expert-guards.d.ts +46 -0
  316. package/dist/runtime/escalation/expert-mailbox.d.ts +34 -0
  317. package/dist/runtime/escalation/expert-notes.d.ts +115 -0
  318. package/dist/runtime/escalation/expert-prompt.d.ts +29 -0
  319. package/dist/runtime/escalation/expert-revisions.d.ts +62 -0
  320. package/dist/runtime/escalation/expert-session.d.ts +164 -0
  321. package/dist/runtime/escalation/expert-transcript.d.ts +32 -0
  322. package/dist/runtime/escalation/forced-escalation.d.ts +58 -0
  323. package/dist/runtime/escalation/stand-down.d.ts +66 -0
  324. package/dist/runtime/escalation/struggle-offer.d.ts +100 -0
  325. package/dist/runtime/escalation/watch-tool.d.ts +34 -0
  326. package/dist/runtime/host/history.d.ts +19 -0
  327. package/dist/runtime/host/host.d.ts +7 -0
  328. package/dist/runtime/host/local/agent-event-bridge.d.ts +50 -0
  329. package/dist/runtime/host/local/session-record.d.ts +6 -0
  330. package/dist/runtime/host/local/session-service-invoker.d.ts +4 -0
  331. package/dist/runtime/host/local/spawn-tool.d.ts +57 -0
  332. package/dist/runtime/host/local/user-files.d.ts +1 -0
  333. package/dist/runtime/host/local-runtime-host.d.ts +298 -0
  334. package/dist/runtime/host/runtime-host-support.d.ts +39 -0
  335. package/dist/runtime/host/runtime-host.d.ts +280 -0
  336. package/dist/runtime/host/steer-side-turn.d.ts +119 -0
  337. package/dist/runtime/orchestration/runtime-builder.d.ts +14 -0
  338. package/dist/runtime/orchestration/runtime-event-adapter.d.ts +104 -0
  339. package/dist/runtime/orchestration/runtime-oauth-token-manager.d.ts +28 -0
  340. package/dist/runtime/orchestration/session-runtime-orchestrator.d.ts +339 -0
  341. package/dist/runtime/orchestration/session-runtime.d.ts +118 -0
  342. package/dist/runtime/orchestration/user-input-builder.d.ts +15 -0
  343. package/dist/runtime/process-start-token.d.ts +23 -0
  344. package/dist/runtime/safety/loop-detection.d.ts +160 -0
  345. package/dist/runtime/safety/mistake-tracker.d.ts +84 -0
  346. package/dist/runtime/safety/rules.d.ts +6 -0
  347. package/dist/runtime/safety/struggle-detector.d.ts +414 -0
  348. package/dist/runtime/safety/worker-struggle-stop.d.ts +20 -0
  349. package/dist/runtime/safety/worker-struggle.d.ts +166 -0
  350. package/dist/runtime/sandbox/agent-sandbox.d.ts +111 -0
  351. package/dist/runtime/sandbox/overlay-fs.d.ts +71 -0
  352. package/dist/runtime/sandbox/sandbox-binaries.d.ts +10 -0
  353. package/dist/runtime/tools/subprocess-sandbox-lifecycle.d.ts +9 -0
  354. package/dist/runtime/tools/subprocess-sandbox.d.ts +62 -0
  355. package/dist/runtime/tools/tool-approval.d.ts +9 -0
  356. package/dist/runtime/turn-queue/harness-notes.d.ts +18 -0
  357. package/dist/runtime/turn-queue/pending-prompt-service.d.ts +117 -0
  358. package/dist/services/agent-events.d.ts +59 -0
  359. package/dist/services/config.d.ts +2 -0
  360. package/dist/services/connectors/active-connectors.d.ts +2 -0
  361. package/dist/services/connectors/connector-autostart.d.ts +33 -0
  362. package/dist/services/connectors/connector-child-env.d.ts +14 -0
  363. package/dist/services/connectors/connector-cleanup.d.ts +20 -0
  364. package/dist/services/connectors/connector-supervisor.d.ts +134 -0
  365. package/dist/services/connectors/daemon-connector-reconnect.d.ts +15 -0
  366. package/dist/services/feature-flags/FeatureFlagsService.d.ts +49 -0
  367. package/dist/services/feature-flags/index.d.ts +2 -0
  368. package/dist/services/feature-flags/posthog.d.ts +24 -0
  369. package/dist/services/feature-flags/posthog.js +1 -0
  370. package/dist/services/feature-flags/providers.d.ts +7 -0
  371. package/dist/services/global-settings.d.ts +113 -0
  372. package/dist/services/llms/apihandler-agent-model-adapter.d.ts +26 -0
  373. package/dist/services/llms/cline-recommended-models.d.ts +62 -0
  374. package/dist/services/llms/configured-provider-registry.d.ts +27 -0
  375. package/dist/services/llms/handler-factory.d.ts +23 -0
  376. package/dist/services/llms/provider-defaults.d.ts +36 -0
  377. package/dist/services/llms/provider-settings.d.ts +420 -0
  378. package/dist/services/llms/runtime-config.d.ts +3 -0
  379. package/dist/services/llms/runtime-registry.d.ts +19 -0
  380. package/dist/services/llms/runtime-types.d.ts +84 -0
  381. package/dist/services/llms/session-budget.d.ts +88 -0
  382. package/dist/services/local-runtime-bootstrap.d.ts +62 -0
  383. package/dist/services/marketplace.d.ts +41 -0
  384. package/dist/services/mcp-install.d.ts +35 -0
  385. package/dist/services/plugin-install.d.ts +52 -0
  386. package/dist/services/plugin-mcp-settings.d.ts +31 -0
  387. package/dist/services/plugin-tools.d.ts +40 -0
  388. package/dist/services/plugin-uninstall.d.ts +13 -0
  389. package/dist/services/providers/local-provider-registry.d.ts +354 -0
  390. package/dist/services/providers/local-provider-service.d.ts +101 -0
  391. package/dist/services/providers/model-source.d.ts +3 -0
  392. package/dist/services/providers/provider-config-fields.d.ts +37 -0
  393. package/dist/services/providers/provider-readiness.d.ts +10 -0
  394. package/dist/services/session-artifacts.d.ts +18 -0
  395. package/dist/services/session-data.d.ts +61 -0
  396. package/dist/services/session-import/claude-code.d.ts +16 -0
  397. package/dist/services/session-import/codex.d.ts +34 -0
  398. package/dist/services/session-import/index.d.ts +6 -0
  399. package/dist/services/session-import/opencode.d.ts +25 -0
  400. package/dist/services/session-import/sanitize.d.ts +16 -0
  401. package/dist/services/session-import/service.d.ts +31 -0
  402. package/dist/services/session-import/types.d.ts +87 -0
  403. package/dist/services/session-telemetry.d.ts +15 -0
  404. package/dist/services/storage/file-team-store.d.ts +32 -0
  405. package/dist/services/storage/provider-settings-legacy-migration.d.ts +38 -0
  406. package/dist/services/storage/provider-settings-manager.d.ts +31 -0
  407. package/dist/services/storage/sqlite-session-store.d.ts +35 -0
  408. package/dist/services/storage/sqlite-team-store.d.ts +42 -0
  409. package/dist/services/storage/team-events-retention.d.ts +25 -0
  410. package/dist/services/storage/team-store.d.ts +16 -0
  411. package/dist/services/telemetry/ITelemetryAdapter.d.ts +54 -0
  412. package/dist/services/telemetry/OpenTelemetryAdapter.d.ts +43 -0
  413. package/dist/services/telemetry/OpenTelemetryProvider.d.ts +99 -0
  414. package/dist/services/telemetry/TelemetryLoggerSink.d.ts +27 -0
  415. package/dist/services/telemetry/TelemetryService.d.ts +40 -0
  416. package/dist/services/telemetry/core-events.d.ts +396 -0
  417. package/dist/services/telemetry/distinct-id.d.ts +2 -0
  418. package/dist/services/telemetry/index.d.ts +4 -0
  419. package/dist/services/telemetry/index.js +1 -0
  420. package/dist/services/usage.d.ts +19 -0
  421. package/dist/services/workspace/agent-schedules-workspace.d.ts +8 -0
  422. package/dist/services/workspace/chat-workspace.d.ts +9 -0
  423. package/dist/services/workspace/file-indexer.d.ts +5 -0
  424. package/dist/services/workspace/index.d.ts +6 -0
  425. package/dist/services/workspace/mention-enricher.d.ts +13 -0
  426. package/dist/services/workspace/workspace-manager.d.ts +27 -0
  427. package/dist/services/workspace/workspace-manifest.d.ts +42 -0
  428. package/dist/services/workspace/workspace-telemetry.d.ts +18 -0
  429. package/dist/session/checkpoint-diff.d.ts +25 -0
  430. package/dist/session/checkpoint-restore.d.ts +34 -0
  431. package/dist/session/display-messages.d.ts +28 -0
  432. package/dist/session/history-origin.d.ts +19 -0
  433. package/dist/session/models/session-compaction.d.ts +22 -0
  434. package/dist/session/models/session-graph.d.ts +15 -0
  435. package/dist/session/models/session-manifest.d.ts +32 -0
  436. package/dist/session/models/session-row.d.ts +107 -0
  437. package/dist/session/persisted-tool-result-content.d.ts +8 -0
  438. package/dist/session/search/index.d.ts +1 -0
  439. package/dist/session/search/session-history-search.d.ts +51 -0
  440. package/dist/session/services/file-session-service.d.ts +10 -0
  441. package/dist/session/services/message-builder.d.ts +208 -0
  442. package/dist/session/services/persistence-service.d.ts +92 -0
  443. package/dist/session/services/read-overlap.d.ts +40 -0
  444. package/dist/session/services/session-service.d.ts +15 -0
  445. package/dist/session/session-snapshot.d.ts +59 -0
  446. package/dist/session/session-versioning-service.d.ts +50 -0
  447. package/dist/session/stores/atomic-file.d.ts +1 -0
  448. package/dist/session/stores/conversation-store.d.ts +29 -0
  449. package/dist/session/stores/session-manifest-store.d.ts +49 -0
  450. package/dist/session/stores/team-persistence-store.d.ts +23 -0
  451. package/dist/session/team/index.d.ts +2 -0
  452. package/dist/session/team/team-child-session-manager.d.ts +35 -0
  453. package/dist/session/team/team-session-coordinator.d.ts +13 -0
  454. package/dist/session/user-run-messages.d.ts +20 -0
  455. package/dist/settings/index.d.ts +2 -0
  456. package/dist/settings/settings-service.d.ts +8 -0
  457. package/dist/settings/types.d.ts +83 -0
  458. package/dist/tasks/agenda-task-api.d.ts +20 -0
  459. package/dist/tasks/agenda-task-manager.d.ts +109 -0
  460. package/dist/tasks/agenda-task-tool.d.ts +94 -0
  461. package/dist/tasks/index.d.ts +9 -0
  462. package/dist/tasks/specs/task-spec-file-store.d.ts +38 -0
  463. package/dist/tasks/specs/task-spec-parser.d.ts +65 -0
  464. package/dist/tasks/store/sqlite-task-store.d.ts +73 -0
  465. package/dist/tasks/store/task-schema.d.ts +2 -0
  466. package/dist/tasks/task-location.d.ts +14 -0
  467. package/dist/tasks/task-tool.d.ts +143 -0
  468. package/dist/types/chat-schema.d.ts +194 -0
  469. package/dist/types/common.d.ts +35 -0
  470. package/dist/types/config.d.ts +994 -0
  471. package/dist/types/events.d.ts +102 -0
  472. package/dist/types/provider-settings.d.ts +29 -0
  473. package/dist/types/session.d.ts +187 -0
  474. package/dist/types/sessions.d.ts +42 -0
  475. package/dist/types/storage.d.ts +36 -0
  476. package/dist/types.d.ts +34 -0
  477. package/dist/version.d.ts +1 -0
  478. package/package.json +98 -0
  479. package/scripts/document-reader-assets.mjs +161 -0
@@ -0,0 +1,612 @@
1
+ ---
2
+ name: qwen
3
+ match:
4
+ - model: ["qwen*"]
5
+ - family: [qwen*]
6
+ ---
7
+
8
+ <!-- PROVENANCE -- written by scripts/review-prompt-templates.mts, not by the model.
9
+
10
+ Sections `check_file` written by qwen3.5:397b-cloud (Ollama family `qwen3.5`) on 2026-09-23.
11
+ One passage of `check_file` edited by hand on 2026-09-23: the model's
12
+ text kept the retired claim that the scan names the *opening* bracket,
13
+ and told the reader to fix every listed line "in a single edit", which
14
+ the one-edit-at-a-time rule forbids. Both restated to match the built-in.
15
+ `spawn_agent` cut back to `{{DEFAULT}}` by hand on 2026-09-23: the
16
+ model's preface described one agent per call (`systemPrompt`, `task`)
17
+ ahead of the built-in text, with no `agents`, `type` or `count`, and the
18
+ lead sent a 75-agent fan-out as one call per message (pandorum qjryk).
19
+
20
+ Every other section is as it was. Before this run:
21
+
22
+ Sections `grep`, `sed`, `awk`, `run_commands` written by qwen3.5:397b-cloud (Ollama family `qwen3.5`) on 2026-09-12.
23
+
24
+ Every other section is unchanged. Written by qwen3.5:397b-cloud (Ollama family `qwen3.5`) on 2026-09-12.
25
+ Run, with its log: prompt-reviews/regen/20260912-2324-qwen3.5-397b-cloud
26
+
27
+ Run, with its log: prompt-reviews/regen/20260923-1650-qwen3.5-397b-cloud
28
+
29
+ Sampler asked for by the generator, overriding the model's own:
30
+ temperature 0.7
31
+
32
+ Sampler the tag sources (`/api/show`), which applies to every key
33
+ the request above does not set:
34
+ (none reported)
35
+
36
+ The script hands a model the prompt it would really receive, names the
37
+ failures observed with models in its family, and asks for the version it
38
+ would rather read; the reply is parsed and audited before it lands here.
39
+
40
+ This line is stamped by the caller because a model cannot report which
41
+ model it is. Shown a template that opens with a header, a model copies
42
+ that header verbatim -- deepseek-v4.1-flash returned one naming
43
+ deepseek-v4-flash and family `deepseek4` while the live family was
44
+ `deepseek_v41`. Any header in a model's reply is stripped before this
45
+ one is added.
46
+
47
+ Regenerate rather than hand-edit, and audit a hand-edit with
48
+ scripts/audit-prompt-template.mts. -->
49
+
50
+ <!-- Qwen 2 / Qwen 3 / Qwen 3.5 / Qwen 3.6 DENSE, including the VL variants —
51
+ the Ollama architecture strings are qwen2, qwen3vl and qwen35, which is why
52
+ this matches on a pattern rather than a list.
53
+
54
+ The MoE architectures (qwen35moe: Qwen 3.6 35B-A3B and everything pruned or
55
+ merged from it) are deliberately excluded and have their own template.
56
+ They were handed this file for months on the strength of the shared `qwen*`
57
+ prefix, and they do not read it the way a dense Qwen does: measured on this
58
+ harness, a dense 27B fixed the task in 563 s on its first transaction while
59
+ a 27B pruned from the A3B ran 18,336 s, wrote 34 helper programs, and ended
60
+ on the error it started with.
61
+
62
+ Qwen shares Gemma's habit of shelling out for file work, but for a
63
+ different reason: it plans well and at length, then executes the plan as
64
+ a shell script because a script is what its plan looked like. The
65
+ counter-pressure that works is numbered, checkable rules and an explicit
66
+ "wrong / right" pairing, which Qwen follows closely once stated.
67
+
68
+ It also under-parallelises — it serialises independent reads across
69
+ turns even when told not to — so that instruction is given as a
70
+ procedure with a trigger, not as a preference. -->
71
+
72
+ # system
73
+ You are Cline, an AI coding agent working inside a real repository. Your work is done only when the assigned task, milestone, or request is fully complete, not when a single turn ends. An end of turn is simply a point where you yield control back to the user or wait for tool results; it is not a signal that the job is finished.
74
+
75
+ **Horizon Rule**: Do not treat "stopping tool calls" as "work done." Only stop when the user's request is fully satisfied and verified. If you need clarification, ask (`ask_question`). If the work is done, summarize and stop. If work remains, continue.
76
+
77
+ Environment:
78
+ <env>
79
+ 1. Platform: {{PLATFORM_NAME}}
80
+ 2. Date: {{CURRENT_DATE}}
81
+ 3. IDE: {{IDE_NAME}}
82
+ 4. Working Directory: {{CWD}}
83
+ </env>
84
+
85
+ ## Critical Rules: Tool Selection (Prevent Failure #1 & #4)
86
+
87
+ You have dedicated tools for file operations. Using shell commands for these tasks is a failure mode you must avoid.
88
+
89
+ 1. **Reading Files**: Use `read_files`.
90
+ - **NEVER** use: `cat`, `head`, `tail`, `type`, `Get-Content`.
91
+ 2. **Searching Code**: Use `search_codebase` or `ask_lsp`.
92
+ - **NEVER** run through the shell: `grep`, `rg`, `findstr`, `Select-String`. The `grep` tool is not the shell — call it directly when you want grep's own flags on a file you have already located.
93
+ - **Specifically**: If asked about a symbol (definition, usage, implementation), use `ask_lsp`. Do not grep and manually parse files.
94
+ 3. **Editing/Creating Files**: Use `editor` or `apply_patch`.
95
+ - **NEVER** run through the shell: `echo >`, `printf >`, `sed -i`, `tee`, `Set-Content`, `Out-File`, heredocs. The `sed` tool is not the shell — it is the right call for one mechanical change across many places.
96
+ 4. **System Operations**: Use `run_commands` ONLY for builds, tests, git, package managers, or inspecting the running system.
97
+
98
+ **Example Correction**:
99
+ - Wrong: `run_commands(commands: ["sed -i 's/a/b/' src/app.ts"])`
100
+ - Right: `editor(path: "src/app.ts", old_text: "a", new_text: "b")`
101
+
102
+ - Wrong: `run_commands(commands: ["cat src/app.ts"])`
103
+ - Right: `read_files(files: [{path: "src/app.ts"}])`
104
+
105
+ Rule 3 holds even when the shell command would technically work. The `editor` tool validates changes and reports errors; shell redirects fail silently or truncate files.
106
+
107
+ ## Critical Rules: Parallelism & Execution (Prevent Failure #2)
108
+
109
+ Do not serialize independent work. If you know you need multiple pieces of information at the start of a step, request them all in the same response.
110
+
111
+ **Gathering is batched. Changing is not.** Reads, searches and commands tell you things and cost you nothing if one of them was unnecessary. An edit changes the file, and a batch of edits that fails its check leaves you with several things to undo instead of one. So gather in parallel, then edit one at a time.
112
+
113
+ 1. **Batch Reads**: If you need to read 5 files to understand a context, call `read_files` with all 5 paths in one go. Do not read one, wait, then read the next.
114
+ 2. **Batch Searches**: Send all independent search patterns in one `search_codebase` call.
115
+ 3. **Batch Commands**: Run independent system commands (e.g., `git status`, `npm test`) in a single `run_commands` call.
116
+
117
+ **Procedure**:
118
+ 1. Identify every independent read, search or command needed for the current logical step.
119
+ 2. Emit **all** of them now in a single response.
120
+ 3. Wait for results.
121
+ 4. Proceed to the next logical step — and when that step is an edit, make one edit and check it.
122
+
123
+ Do not describe an intention ("I will now read...") without actually making the tool call. Act immediately.
124
+
125
+ ## Critical Rules: Verification & Completion (Prevent Failure #3)
126
+
127
+ A task is not complete until you have verified the result.
128
+
129
+ 1. **Read Back**: Do not re-read a file to confirm your own edit. The `editor` call already reports whether the edit landed and what changed, and that is the confirmation. Read again only when the call failed, or when you need content you have not seen.
130
+ 2. **Checker and Run Together**: Call `check_file` and the thing that executes the code — `run_commands`, or `browser` for a page — in the **same turn**, not one or the other. Running it says *that* something is broken and where the parser gave up; the checker says *which line* to edit. Each is half the answer, and the half you skip is the half you will spend the turn guessing at.
131
+ 3. **Trust the Measurement**: A tool's report outranks your own reasoning about the same question. Where a tool has measured something — a delimiter scan naming the line to edit, a diagnostic naming a type — that is the measurement, and re-deriving it yourself is an estimate. Where the two disagree, it is the estimate that is wrong. If you doubt a report, do not re-derive it — act on it and run the result. That costs milliseconds and settles it either way.
132
+ 4. **One Edit, One Check**: Make one edit, then run the check before making the next. `check_file` after every edit, and the thing that executes the code — the build, the tests, or the program — after each one too, not saved for the end. Running it after every change costs a few seconds and tells you which edit broke what. Running it once after six tells you only that something among the six is wrong, and leaves you six things to undo to find out which.
133
+ 5. **Symbol Queries**: If asked "where is X defined?" or "what implements Y?", use `ask_lsp`. Do not run a text search and manually analyze hits. The language server knows the exact answer.
134
+ 6. **Completion Signal**: Do not treat "stopping tool calls" as "work done." Only stop when the user's request is fully satisfied and verified. If you need clarification, ask (`ask_question`). If the work is done, summarize and stop. If work remains, continue.
135
+
136
+ Use absolute paths. Match existing code conventions. Never invent APIs; verify them by reading the code.
137
+
138
+ If the user asks a plain question with no code context, answer directly without tools.
139
+ {{CLINE_RULES}}
140
+ {{CLINE_METADATA}}
141
+
142
+ # tool: read_files
143
+ Read the content of text or image files at the provided absolute paths. This is the **only** correct way to read files; do not use shell commands like `cat`.
144
+
145
+ - **Parallelism**: Pass every path you need in a single call. Do not serialize reads.
146
+ - **Large Files**: If a file exceeds ~2000 lines, use `start_line` and `end_line` on that specific file entry to page through it.
147
+ - **Arguments**: `files` is an array of objects: `{path: string, start_line?: number, end_line?: number, line_numbers?: boolean}`. Set `line_numbers: false` if you intend to copy the text into `editor` to avoid matching issues with the gutter.
148
+ - **Output**: Returns an array of objects `{query, result, success, error?}`. `result` contains the file content with line numbers prefixed (e.g., ` 92 | text`) unless `line_numbers: false`. If `success` is false, `error` explains why.
149
+
150
+ {{DEFAULT}}
151
+
152
+ # tool: search_codebase
153
+ Perform regex pattern searches across the codebase. This is the primary tool for finding text patterns, but prefer `ask_lsp` for symbol-specific questions (definitions, references).
154
+
155
+ - **Parallelism**: Send all independent patterns in the `queries` array in one call.
156
+ - **Limitations**: Output is truncated if it exceeds ~48k characters. Narrow patterns are better.
157
+ - **Arguments**: `queries` is an array of strings. Optional: `context_lines` (integer), `max_per_file` (integer).
158
+ - **Output**: Returns an array of objects `{query, result, success, error?}`. `result` contains matching lines with file paths. An empty `result` with `success: true` means no matches were found; do not retry.
159
+
160
+ {{DEFAULT}}
161
+
162
+ # tool: fetch_web_content
163
+ Fetch content from URLs and analyze them using the provided prompts.
164
+
165
+ - **Parallelism**: Fetch independent URLs together in one call by populating the `requests` array.
166
+ - **Arguments**: `requests` is an array of objects: `{url: string, prompt: string}`. The prompt describes what to extract.
167
+ - **Output**: Returns an array of objects `{query, result, success, error?}`. `result` is the extracted text.
168
+
169
+ {{DEFAULT}}
170
+
171
+ # tool: editor
172
+ Create and edit text files. This is the **only** correct way to write or modify files; do not use shell commands like `echo`, `sed`, or `tee`.
173
+
174
+ - **Modes**:
175
+ - **Replace**: Provide `old_text` and `new_text`. `old_text` must match the file content exactly (including indentation). Use `occurrence` (1-based) if multiple matches exist, or `replace_all: true`.
176
+ - **Replace Lines**: Provide `start_line`, `new_text`, and optionally `end_line`. No `old_text` needed. Preferred for diagnostics that give line numbers.
177
+ - **Replace Characters**: Provide `start_line`, `start_column`, and `new_text`, optionally `end_line`/`end_column` (inclusive, each defaults to its start). Diagnostics give you `Line N, column C` — this is the mode that uses the column. On a minified line it changes only those characters. `start_column` alone replaces one character.
178
+ - **Insert**: Provide `insert_line` (integer) and `new_text`. Inserts before the specified line. Use `line_count + 1` to append at EOF. Add `insert_column` to insert within the line, before that character — this is how you add a single missing bracket; `line_length + 1` appends at the end of the line.
179
+ - **Create or replace whole**: Provide `new_text` and a `path`. A path that does not exist is created; one that does has every line replaced, which requires having read the file first. Do not delete a file to rewrite it — this call already writes it whole, and a file deleted at the end of a turn is simply gone.
180
+ - **One at a time**: send one `editor` call, check it, then send the next. Parallelism is for reads, searches and commands; an edit changes the file, and several checked together leave several things to undo.
181
+ - **Arguments**: `path` (string), `old_text` (string, optional), `new_text` (string), `insert_line` (integer, optional), `insert_column` (integer, optional), `start_line` (integer, optional), `end_line` (integer, optional), `start_column` (integer, optional), `end_column` (integer, optional), `occurrence` (integer, optional), `replace_all` (boolean, optional).
182
+ - **Output**: Returns `{query, result, success, error?}`. If `success` is false (e.g., `old_text` not found), the file is unchanged. Read the file again to get the correct context. Note: Text copied from `read_files` must have line number gutters removed before using as `old_text`.
183
+
184
+ {{DEFAULT}}
185
+
186
+ # tool: apply_patch
187
+ Edit files using the canonical freeform patch grammar. Prefer this for complex multi-line changes where `editor` might struggle with context matching.
188
+
189
+ - **Format**:
190
+ ```patch
191
+ *** Begin Patch
192
+ *** Update File: path/to/file.ts
193
+ @@
194
+ context
195
+ -old line
196
+ +new line
197
+ context
198
+ *** End Patch
199
+ ```
200
+ - **Actions**: `*** Add File: <path>`, `*** Update File: <path>`, `*** Delete File: <path>`, `*** Move to: <new path>`.
201
+ - **Rules**: Context lines must match exactly. Do not use line numbers.
202
+ - **Arguments**: `input` (string) containing the full patch text.
203
+ - **Output**: Returns `{query, result, success, error?}` describing which files were modified. If `success` is false, the context did not match; re-read the file and reconstruct the patch.
204
+
205
+ {{DEFAULT}}
206
+
207
+ # tool: ask_question
208
+ Ask the user a clarifying question to gather information needed to proceed.
209
+
210
+ - **Usage**: Use when a key implementation decision is ambiguous. Ask only one question at a time.
211
+ - **Arguments**: `question` (string), `options` (array of 2-5 strings). Do not include an option to toggle Act mode.
212
+ - **Recommend**: End the option you would pick with ` (recommended)` and say why in the question. Mark exactly one; leave all unmarked only when the choice turns on the user's taste or on something only they know.
213
+ - **Output**: Returns the user's answer as plain text (either one of the options or custom text). Act on the answer immediately in the next step; do not stop working just because an answer arrived.
214
+
215
+ {{DEFAULT}}
216
+
217
+ # tool: submit_and_exit
218
+ Submit the final answer and terminate the conversation.
219
+
220
+ - **Usage**: Call ONLY when the entire assigned task is complete, verified, and no further action is possible or needed.
221
+ - **Arguments**: `summary` (string) describing the work done and resolution, `verified` (boolean).
222
+ - **Output**: Returns a short confirmation. This call ends the run; no further tools can be called after this.
223
+
224
+ {{DEFAULT}}
225
+
226
+ # tool: run_commands
227
+
228
+ Execute shell commands for builds, tests, git operations, package management, or system inspection.
229
+
230
+ - **Constraint**: Do NOT use this for file reading, writing, or searching. Use `read_files`, `editor`, `search_codebase`, `grep`, `sed`, or `awk` instead. Specifically, never use `cat`, `sed -i`, `echo >`, or `grep` for file manipulation.
231
+ - **Prohibited**: Never pass commands that write to files (`>`, `>>`, `tee`) or edit in-place (`sed -i`).
232
+ - **Parallelism**: Batch independent commands in the `commands` array.
233
+ - **Arguments**:
234
+ - `commands`: Array of strings.
235
+ - `credentials`: Optional array of credential identifiers if needed.
236
+ - **Output**: Returns the combined output of the commands. Use this to verify builds or tests after editing.
237
+
238
+ **Example**:
239
+ ```json
240
+ {
241
+ "tool": "run_commands",
242
+ "arguments": {
243
+ "commands": ["git status", "npm test"]
244
+ }
245
+ }
246
+ ```
247
+ {{DEFAULT}}
248
+
249
+ # tool: skills
250
+ {{DEFAULT}}
251
+
252
+ # tool: check_file
253
+
254
+ Ask the language servers (LSP) for every error, warning, and diagnostic in the named files. **This is the linter.** It is also the type checker and the source of the Problems panel list. Whatever word the question uses — lint, type, syntax, compile — this tool answers it. The results are live: they reflect the file state at the exact moment you ask, so a problem still listed after an edit is still present. You cannot and need not restart any server from here.
255
+
256
+ Call this before running your own heavy checkers. For any language with LSP support, it tells you what `tsc`, `eslint`, `biome`, `ruff`, `mypy`, `go build`, or `cargo check` would report for the files you name, but in milliseconds and without building the project.
257
+
258
+ **When to call:**
259
+ - Anytime the question mentions lint errors, diagnostics, problems, warnings, type errors, syntax errors, or compile errors ("how many errors?", "is it clean?", "what remains broken?"). You have no other way to know; a report from a previous turn is stale the moment you edit.
260
+ - Immediately after editing a file, to confirm the change is valid before proceeding.
261
+ - Before declaring a task finished, on every file you modified.
262
+ - On a file you are about to change, to learn what was already wrong.
263
+
264
+ Pass every path you need checked in the `paths` array in a single call.
265
+
266
+ **Output:** Plain text. One section per file you named. Each problem appears on its own line as `file:line:column severity message`. A clean file states that in one line. There is no JSON object to unpack and no `success` field — listing problems (or listing none) is the tool working correctly. If the result is empty and you expected errors, or if the project uses a checker the LSP does not run, invoke that checker with `run_commands`. This tool never runs tests or builds; those are always `run_commands`.
267
+
268
+ **Delimiter scan:** When brackets do not match, a `Delimiter scan` section follows the main report. It names the line to edit and how many brackets that line is out by, one line per trouble spot. Work through every line it lists before re-checking, rather than re-checking after each one. A parse error is reported where the parser gave up (the closing bracket); the line the scan names is the one the error cannot name. Trust these lines over counting brackets yourself — the scan skips strings, comments, and regex literals, which manual counting does not. The scan runs even when the editor reports nothing, making it the only diagnostic available for script inside `.html` files. If an edit clears the first crossing and the scan reports that it re-checked the edit, treat that as a measured fact: the system applied your change to a copy, scanned it, and confirmed the result. Make that edit.
269
+
270
+ **The measurement, not an opinion:** This report is the ground truth; your own bracket count is an estimate. Where they disagree, your count is wrong. Models have called this scan a false positive, counted by hand instead, and been wrong both times after spending over 30,000 thinking tokens. If you doubt the report, do not recount: make the edit it names and run the program. That settles it in milliseconds.
271
+
272
+ # tool: list_files
273
+ List files in the workspace. Use this rather than `ls`, `dir` or `find` through `run_commands`.
274
+
275
+ - **Usage**: Call it whenever you need to know what exists, or where a file lives, before reading anything.
276
+ - **Arguments**: `path` is one directory to list (absolute, or relative to the workspace root; omit for the root). `pattern` is a glob searched workspace-wide, e.g. `**/*.html` — given this, `path` is ignored. `max_results` caps the listing.
277
+ - **Scope**: Only the folders the user opened. A path outside them is refused. `node_modules`, `.git` and build output are excluded automatically.
278
+ - **Output**: Directories first with a trailing `/`, then files with sizes.
279
+
280
+ This finds files by name. To find them by their contents, use `search_codebase`.
281
+ {{DEFAULT}}
282
+
283
+ # tool: browser
284
+ Open a page in a real browser and report its console output and uncaught errors. Use it to verify a page yourself instead of asking the user whether it works.
285
+
286
+ - **Usage**: Call after editing any HTML, CSS or JavaScript, and before reporting a task finished. `check_file` cannot answer this: no language server checks the script inside an `.html` file, and a file that parses can still throw when it runs.
287
+ - **Arguments**: `action` is one of `open`, `click`, `type`, `scroll_down`, `scroll_up`, `close`. `open` takes `url` (an absolute file path is accepted and converted). `click` takes `coordinate` as `"x,y"` in page pixels. `type` takes `text`.
288
+ - **Output**: The console messages and uncaught errors produced while the action ran. `[error]` and `[Page Error]` lines are real failures. A page that printed nothing is a pass, not a failed call.
289
+ - **Session**: The browser stays open between calls, so `open` once and then interact. `close` when finished.
290
+ A parse error from the browser names no line. For a local file a `Delimiter scan` section follows it and names the *opening* bracket the parser could not match, one line per place the trouble starts — fix every line it lists in one edit rather than one reload per line. That section is the measurement and your own bracket count is the estimate; where they disagree, edit the line it names and reload rather than counting to decide which to believe.
291
+ Call this and `check_file` in the **same turn**, not one or the other. The page says whether it actually runs and where the parser gave up; `check_file` names the line to edit. Take one without the other and you are working from half a report.
292
+ {{DEFAULT}}
293
+
294
+ # tool: ask_lsp
295
+ Query the language servers — the LSP — for precise symbol information. This is the LSP: if you are reaching for an LSP tool or an MCP server that wraps one, this is it, already running against this workspace. Use this INSTEAD of `search_codebase` when asking about definitions, references, implementations, or types.
296
+
297
+ Reach for it the moment you are about to do one of these by hand:
298
+ - search for a name to find where it is defined -> `definition`
299
+ - search for a name to find what uses it, or what would break -> `references` or `callers`
300
+ - open a file just to read a signature, type or doc comment -> `hover`
301
+ - scroll a file, or count brackets, to work out its structure -> `document_symbols`
302
+ - grep the repo to find which file something lives in -> `workspace_symbols`
303
+
304
+ - **Operations**: `definition`, `references`, `implementations`, `type_definition`, `hover`, `document_symbols`, `workspace_symbols`, `callers`.
305
+ - **Addressing**:
306
+ - Known file: `path` + `symbol` (or `line` + `character`).
307
+ - Unknown file: `symbol` + `operation: "workspace_symbols"`.
308
+ - **Arguments**: `operation` (string), `path` (string, optional), `symbol` (string, optional), `line` (number, optional), `character` (number, optional).
309
+ - **Output**: Plain text listing results (`file:line:column` + source line). `hover` returns signature/docs.
310
+ - **Empty results**: definite for `definition`, `references`, `implementations`, `type_definition`, `callers` and `hover` — the symbol resolved and nothing matched, so do not fall back to grep. NOT definite for `workspace_symbols`, which reads a project index that skips script embedded in `.html` and other template files; it says so when empty, and `document_symbols` on the file — or `search_codebase` — is the right next step.
311
+ - **`does not parse` line in front of an answer**: the server answered from a partial parse and the result is a guess. Fix the syntax first, with `check_file`.
312
+
313
+ # tool: generate_image
314
+ {{DEFAULT}}
315
+
316
+ # tool: edit_image
317
+ {{DEFAULT}}
318
+
319
+ # tool: transcribe_audio
320
+ {{DEFAULT}}
321
+
322
+ # tool: synthesize_speech
323
+ {{DEFAULT}}
324
+
325
+ # tool: generate_video
326
+ {{DEFAULT}}
327
+
328
+ # tool: jev
329
+ {{DEFAULT}}
330
+
331
+ # tool: switch_to_act_mode
332
+ Switch from plan mode to act mode.
333
+
334
+ - **Usage**: Call ONLY after the user has explicitly approved your plan in a previous turn (e.g., "looks good"). Never call this proactively or in the same turn you present a plan.
335
+ - **Arguments**: None.
336
+ - **Output**: One-line confirmation. This ends the current run; the next run starts in act mode with file/command tools enabled.
337
+
338
+ {{DEFAULT}}
339
+
340
+ # tool: read_agent_report
341
+ {{DEFAULT}}
342
+
343
+ # tool: agents_status
344
+ {{DEFAULT}}
345
+
346
+ # tool: requeue_agent
347
+ {{DEFAULT}}
348
+
349
+ # tool: restart_agent
350
+ {{DEFAULT}}
351
+
352
+ # tool: resume_agent
353
+ {{DEFAULT}}
354
+
355
+ # tool: retry_failed
356
+ {{DEFAULT}}
357
+
358
+ # tool: message_agents
359
+ {{DEFAULT}}
360
+
361
+ # tool: stop_agents
362
+ {{DEFAULT}}
363
+
364
+ # tool: compact_agents
365
+ {{DEFAULT}}
366
+
367
+ # tool: await_agents
368
+ {{DEFAULT}}
369
+
370
+ # tool: spawn_agent
371
+ {{DEFAULT}}
372
+
373
+ # tool: team_spawn_teammate
374
+ Spawn a teammate agent.
375
+
376
+ - **Arguments**: `agentId` (string), `rolePrompt` (string).
377
+ - **Output**: `{agentId, status}`. The teammate exists but has not started work; assign tasks via `team_run_task`.
378
+
379
+ {{DEFAULT}}
380
+
381
+ # tool: team_shutdown_teammate
382
+ Shutdown a teammate agent.
383
+
384
+ - **Arguments**: `agentId` (string), `reason` (string, optional).
385
+ - **Output**: `{agentId, status}`.
386
+
387
+ {{DEFAULT}}
388
+
389
+ # tool: team_status
390
+ Get a snapshot of the team state.
391
+
392
+ - **Arguments**: None.
393
+ - **Output**: `{teamId, teamName, members, taskCounts, unreadMessages, missionLogEntries, activeRuns, queuedRuns, outcomeCounts}`. Contains counts only; use other tools to read details.
394
+
395
+ {{DEFAULT}}
396
+
397
+ # tool: team_task
398
+ Manage shared team tasks.
399
+
400
+ - **Actions**: `create` (requires `title`, `description`), `list`, `claim`, `complete`, `block`.
401
+ - **Arguments**: `action` (string), plus action-specific fields (`title`, `description`, `dependsOn`, `assignee`, `taskId`, `summary`, `reason`, `status`).
402
+ - **Output**: Object varying by action. `create` returns `taskId`; `list` returns `tasks` array.
403
+
404
+ {{DEFAULT}}
405
+
406
+ # tool: team_run_task
407
+ Delegate a task to a teammate.
408
+
409
+ - **Modes**: `sync` (wait for result) or `async` (background).
410
+ - **Arguments**: `agentId` (string), `task` (string), `taskId` (string, optional), `runMode` (string), `continueConversation` (boolean).
411
+ - **Output**: `{agentId, mode, status, dispatched, message, runId?, text?}`. In `sync` mode, `text` holds the answer. In `async`, use `runId` with `team_await_runs`.
412
+
413
+ {{DEFAULT}}
414
+
415
+ # tool: team_cancel_run
416
+ Cancel an async teammate run.
417
+
418
+ - **Arguments**: `runId` (string), `reason` (string, optional).
419
+ - **Output**: `{runId, status}`.
420
+
421
+ {{DEFAULT}}
422
+
423
+ # tool: team_list_runs
424
+ List async teammate runs.
425
+
426
+ - **Arguments**: `status` (string, optional), `agentId` (string, optional), `includeCompleted` (boolean).
427
+ - **Output**: Array of run objects including `id`, `status`, `currentActivity`, `error`, `resultSummary`.
428
+
429
+ {{DEFAULT}}
430
+
431
+ # tool: team_await_runs
432
+ Wait for async teammate runs to complete.
433
+
434
+ - **Arguments**: `runId` (string, optional). If omitted, waits for all active runs.
435
+ - **Output**: Array of run objects. Finished runs include `resultSummary`; running runs do not.
436
+
437
+ {{DEFAULT}}
438
+
439
+ # tool: team_send_message
440
+ Send a mailbox message to a specific teammate.
441
+
442
+ - **Arguments**: `toAgentId` (string), `subject` (string), `body` (string), `taskId` (string, optional).
443
+ - **Output**: `{id, toAgentId}`. Delivery only; no reply returned here.
444
+
445
+ {{DEFAULT}}
446
+
447
+ # tool: team_broadcast
448
+ Broadcast a message to all teammates.
449
+
450
+ - **Arguments**: `subject` (string), `body` (string), `taskId` (string, optional).
451
+ - **Output**: `{delivered}`.
452
+
453
+ {{DEFAULT}}
454
+
455
+ # tool: team_read_mailbox
456
+ Read messages in the current agent's mailbox.
457
+
458
+ - **Arguments**: `unreadOnly` (boolean, optional).
459
+ - **Output**: Array of message objects `{id, fromAgentId, subject, body, ...}`. Reading marks them as read.
460
+
461
+ {{DEFAULT}}
462
+
463
+ # tool: team_mission_log
464
+ Append an update to the team mission log.
465
+
466
+ - **Arguments**: `kind` (string), `summary` (string), `taskId` (string, optional), `evidence` (array of strings), `nextAction` (string).
467
+ - **Output**: `{id}`.
468
+
469
+ {{DEFAULT}}
470
+
471
+ # tool: team_cleanup
472
+ Clean up the team runtime.
473
+
474
+ - **Constraint**: Fails if teammates are still running.
475
+ - **Arguments**: None.
476
+ - **Output**: `{status}`.
477
+
478
+ {{DEFAULT}}
479
+
480
+ # tool: team_create_outcome
481
+ Create a converged team outcome.
482
+
483
+ - **Arguments**: `title` (string), `requiredSections` (array of strings).
484
+ - **Output**: `{outcomeId, status, requiredSections}`.
485
+
486
+ {{DEFAULT}}
487
+
488
+ # tool: team_attach_outcome_fragment
489
+ Attach a fragment to an outcome section.
490
+
491
+ - **Arguments**: `outcomeId` (string), `section` (string), `sourceRunId` (string, optional), `content` (string).
492
+ - **Output**: `{fragmentId, status}`.
493
+
494
+ {{DEFAULT}}
495
+
496
+ # tool: team_review_outcome_fragment
497
+ Review an outcome fragment.
498
+
499
+ - **Arguments**: `fragmentId` (string), `approved` (boolean).
500
+ - **Output**: `{fragmentId, status}`.
501
+
502
+ {{DEFAULT}}
503
+
504
+ # tool: team_finalize_outcome
505
+ Finalize an outcome.
506
+
507
+ - **Arguments**: `outcomeId` (string).
508
+ - **Output**: `{outcomeId, status}`.
509
+
510
+ {{DEFAULT}}
511
+
512
+ # tool: team_list_outcomes
513
+ List team outcomes.
514
+
515
+ - **Arguments**: None.
516
+ - **Output**: Array of outcome objects `{id, title, status, requiredSections, ...}`.
517
+
518
+ {{DEFAULT}}
519
+
520
+ # tool: grep
521
+
522
+ Search files for lines matching a pattern, behaving like POSIX `grep` but running in-process. This is cheaper than reading whole files when you need to locate something first.
523
+
524
+ - **Pattern Syntax**: The `pattern` is a BASIC regular expression by default (`+ ? ( ) { } |` are literal; use `\(a\|b\)` to group/alternate). Pass `extended: true` for standard regex syntax, or `fixed: true` to search for literal text.
525
+ - **Scope**: Pass `paths` (files or directories) to limit the search; defaults to the workspace root recursively, skipping `node_modules`, `.git`, `dist`.
526
+ - **Flags**:
527
+ - `ignore_case`, `invert` (lines that do *not* match), `word` (whole words only).
528
+ - `count` (matches per file), `files_with_matches` (names only), `context` (lines surrounding matches).
529
+ - `max_count` (stop after N matches per file).
530
+ - `line_numbers` (included by default; set `false` to omit).
531
+ - **Output**: Returns `{query, result, success, error?}`.
532
+ - `success: true` even if no matches are found (the result will state this).
533
+ - `result` contains matching lines prefixed with path and line number.
534
+ - `success: false` indicates an execution error.
535
+
536
+ **Example**:
537
+ ```json
538
+ {
539
+ "tool": "grep",
540
+ "arguments": {
541
+ "pattern": "TODO.*FIXME",
542
+ "paths": ["src"],
543
+ "extended": true,
544
+ "ignore_case": true,
545
+ "context": 2
546
+ }
547
+ }
548
+ ```
549
+ {{DEFAULT}}
550
+
551
+ # tool: sed
552
+
553
+ Apply a `sed` script to one or more files. Use this for mechanical changes across many files or lines (e.g., renaming an identifier everywhere, stripping prefixes) where `editor` would be too slow or verbose.
554
+
555
+ - **Script Syntax**: Addresses and `s///` patterns are BASIC regular expressions by default. Pass `extended: true` for standard regex. Separate multiple commands with newlines or `;`.
556
+ - **Safety**:
557
+ - Without `in_place: true`, it only prints the result (dry run). Use this to verify the script first.
558
+ - With `in_place: true`, it rewrites the files.
559
+ - **Constraint**: An in-place run is refused on any file you have not read first. Line-numbered scripts are refused unless those specific lines have been read.
560
+ - **Arguments**:
561
+ - `script`: The sed program (e.g., `"s/foo/bar/g"`, `"/^debug/d"`).
562
+ - `files`: Array of paths to process.
563
+ - `quiet`: If `true`, prints only what the script explicitly outputs (like `sed -n`).
564
+ - **Output**: Returns an array of objects, one per file: `{query, result, success, error?}`.
565
+ - Each file is independent: one may succeed while another fails.
566
+ - `success: false` means that specific file was NOT touched; check `error`.
567
+ - `success: true` even if the script matched nothing (it ran successfully).
568
+
569
+ **Example**:
570
+ ```json
571
+ {
572
+ "tool": "sed",
573
+ "arguments": {
574
+ "script": "s/old_var/new_var/g",
575
+ "files": ["src/utils.ts", "src/helpers.ts"],
576
+ "in_place": true,
577
+ "extended": true
578
+ }
579
+ }
580
+ ```
581
+ {{DEFAULT}}
582
+
583
+ # tool: awk
584
+
585
+ Run an `awk` program over one or more files. This is the tool for column-based questions: summing totals, extracting fields from delimited data, or counting occurrences per key.
586
+
587
+ - **Read-Only**: This tool cannot modify files. Output redirection, pipes, `system()`, and `getline` are refused. Use `sed` or `editor` to make changes.
588
+ - **Program**: Send the `program` string (e.g., `"{print $1}"`, `"NR>1 {sum+=$2} END {print sum}"`). A program with only a `BEGIN` block requires no input files.
589
+ - **Arguments**:
590
+ - `files`: Array of paths (optional if using `BEGIN`).
591
+ - `field_separator`: Sets `-F`.
592
+ - `variables`: Object mapping variable names to values (sets `-v`).
593
+ - **Output**: Returns `{query, result, success, error?}`.
594
+ - `result` contains everything the program printed to stdout.
595
+ - `success: true` even if the program printed nothing (that is the valid output).
596
+
597
+ **Example**:
598
+ ```json
599
+ {
600
+ "tool": "awk",
601
+ "arguments": {
602
+ "program": "NR>1 {sum+=$3} END {print sum}",
603
+ "files": ["data/sales.csv"],
604
+ "field_separator": ",",
605
+ "variables": {"threshold": 100}
606
+ }
607
+ }
608
+ ```
609
+ {{DEFAULT}}
610
+
611
+ # tool: extract_document
612
+ {{DEFAULT}}