@jait/gateway 0.1.0

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 (474) hide show
  1. package/bin/jait.mjs +144 -0
  2. package/dist/config.d.ts +24 -0
  3. package/dist/config.d.ts.map +1 -0
  4. package/dist/config.js +73 -0
  5. package/dist/config.js.map +1 -0
  6. package/dist/db/connection.d.ts +37 -0
  7. package/dist/db/connection.d.ts.map +1 -0
  8. package/dist/db/connection.js +85 -0
  9. package/dist/db/connection.js.map +1 -0
  10. package/dist/db/index.d.ts +4 -0
  11. package/dist/db/index.d.ts.map +1 -0
  12. package/dist/db/index.js +4 -0
  13. package/dist/db/index.js.map +1 -0
  14. package/dist/db/migrations.d.ts +24 -0
  15. package/dist/db/migrations.d.ts.map +1 -0
  16. package/dist/db/migrations.js +312 -0
  17. package/dist/db/migrations.js.map +1 -0
  18. package/dist/db/schema.d.ts +2253 -0
  19. package/dist/db/schema.d.ts.map +1 -0
  20. package/dist/db/schema.js +195 -0
  21. package/dist/db/schema.js.map +1 -0
  22. package/dist/foundation.d.ts +26 -0
  23. package/dist/foundation.d.ts.map +1 -0
  24. package/dist/foundation.js +15 -0
  25. package/dist/foundation.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +413 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/lib/uuidv7.d.ts +10 -0
  31. package/dist/lib/uuidv7.d.ts.map +1 -0
  32. package/dist/lib/uuidv7.js +33 -0
  33. package/dist/lib/uuidv7.js.map +1 -0
  34. package/dist/memory/contracts.d.ts +42 -0
  35. package/dist/memory/contracts.d.ts.map +1 -0
  36. package/dist/memory/contracts.js +2 -0
  37. package/dist/memory/contracts.js.map +1 -0
  38. package/dist/memory/embeddings.d.ts +4 -0
  39. package/dist/memory/embeddings.d.ts.map +1 -0
  40. package/dist/memory/embeddings.js +26 -0
  41. package/dist/memory/embeddings.js.map +1 -0
  42. package/dist/memory/service.d.ts +17 -0
  43. package/dist/memory/service.d.ts.map +1 -0
  44. package/dist/memory/service.js +82 -0
  45. package/dist/memory/service.js.map +1 -0
  46. package/dist/memory/sqlite-backend.d.ts +11 -0
  47. package/dist/memory/sqlite-backend.d.ts.map +1 -0
  48. package/dist/memory/sqlite-backend.js +68 -0
  49. package/dist/memory/sqlite-backend.js.map +1 -0
  50. package/dist/plugins/contracts.d.ts +11 -0
  51. package/dist/plugins/contracts.d.ts.map +1 -0
  52. package/dist/plugins/contracts.js +2 -0
  53. package/dist/plugins/contracts.js.map +1 -0
  54. package/dist/providers/claude-code-provider.d.ts +39 -0
  55. package/dist/providers/claude-code-provider.d.ts.map +1 -0
  56. package/dist/providers/claude-code-provider.js +322 -0
  57. package/dist/providers/claude-code-provider.js.map +1 -0
  58. package/dist/providers/codex-provider.d.ts +51 -0
  59. package/dist/providers/codex-provider.d.ts.map +1 -0
  60. package/dist/providers/codex-provider.js +826 -0
  61. package/dist/providers/codex-provider.js.map +1 -0
  62. package/dist/providers/contracts.d.ts +167 -0
  63. package/dist/providers/contracts.d.ts.map +1 -0
  64. package/dist/providers/contracts.js +13 -0
  65. package/dist/providers/contracts.js.map +1 -0
  66. package/dist/providers/index.d.ts +6 -0
  67. package/dist/providers/index.d.ts.map +1 -0
  68. package/dist/providers/index.js +5 -0
  69. package/dist/providers/index.js.map +1 -0
  70. package/dist/providers/jait-provider.d.ts +23 -0
  71. package/dist/providers/jait-provider.d.ts.map +1 -0
  72. package/dist/providers/jait-provider.js +67 -0
  73. package/dist/providers/jait-provider.js.map +1 -0
  74. package/dist/providers/registry.d.ts +39 -0
  75. package/dist/providers/registry.d.ts.map +1 -0
  76. package/dist/providers/registry.js +64 -0
  77. package/dist/providers/registry.js.map +1 -0
  78. package/dist/pty-broker-client.d.ts +46 -0
  79. package/dist/pty-broker-client.d.ts.map +1 -0
  80. package/dist/pty-broker-client.js +142 -0
  81. package/dist/pty-broker-client.js.map +1 -0
  82. package/dist/routes/auth.d.ts +6 -0
  83. package/dist/routes/auth.d.ts.map +1 -0
  84. package/dist/routes/auth.js +236 -0
  85. package/dist/routes/auth.js.map +1 -0
  86. package/dist/routes/chat.d.ts +32 -0
  87. package/dist/routes/chat.d.ts.map +1 -0
  88. package/dist/routes/chat.js +1503 -0
  89. package/dist/routes/chat.js.map +1 -0
  90. package/dist/routes/consent.d.ts +10 -0
  91. package/dist/routes/consent.d.ts.map +1 -0
  92. package/dist/routes/consent.js +127 -0
  93. package/dist/routes/consent.js.map +1 -0
  94. package/dist/routes/filesystem.d.ts +14 -0
  95. package/dist/routes/filesystem.d.ts.map +1 -0
  96. package/dist/routes/filesystem.js +152 -0
  97. package/dist/routes/filesystem.js.map +1 -0
  98. package/dist/routes/git.d.ts +17 -0
  99. package/dist/routes/git.d.ts.map +1 -0
  100. package/dist/routes/git.js +213 -0
  101. package/dist/routes/git.js.map +1 -0
  102. package/dist/routes/health.d.ts +7 -0
  103. package/dist/routes/health.d.ts.map +1 -0
  104. package/dist/routes/health.js +21 -0
  105. package/dist/routes/health.js.map +1 -0
  106. package/dist/routes/hooks.d.ts +9 -0
  107. package/dist/routes/hooks.d.ts.map +1 -0
  108. package/dist/routes/hooks.js +22 -0
  109. package/dist/routes/hooks.js.map +1 -0
  110. package/dist/routes/jobs.d.ts +5 -0
  111. package/dist/routes/jobs.d.ts.map +1 -0
  112. package/dist/routes/jobs.js +333 -0
  113. package/dist/routes/jobs.js.map +1 -0
  114. package/dist/routes/mcp-server.d.ts +23 -0
  115. package/dist/routes/mcp-server.d.ts.map +1 -0
  116. package/dist/routes/mcp-server.js +177 -0
  117. package/dist/routes/mcp-server.js.map +1 -0
  118. package/dist/routes/mobile.d.ts +12 -0
  119. package/dist/routes/mobile.d.ts.map +1 -0
  120. package/dist/routes/mobile.js +64 -0
  121. package/dist/routes/mobile.js.map +1 -0
  122. package/dist/routes/network.d.ts +3 -0
  123. package/dist/routes/network.d.ts.map +1 -0
  124. package/dist/routes/network.js +367 -0
  125. package/dist/routes/network.js.map +1 -0
  126. package/dist/routes/repositories.d.ts +18 -0
  127. package/dist/routes/repositories.d.ts.map +1 -0
  128. package/dist/routes/repositories.js +90 -0
  129. package/dist/routes/repositories.js.map +1 -0
  130. package/dist/routes/screen-share.d.ts +17 -0
  131. package/dist/routes/screen-share.d.ts.map +1 -0
  132. package/dist/routes/screen-share.js +92 -0
  133. package/dist/routes/screen-share.js.map +1 -0
  134. package/dist/routes/sessions.d.ts +18 -0
  135. package/dist/routes/sessions.d.ts.map +1 -0
  136. package/dist/routes/sessions.js +169 -0
  137. package/dist/routes/sessions.js.map +1 -0
  138. package/dist/routes/terminals.d.ts +15 -0
  139. package/dist/routes/terminals.d.ts.map +1 -0
  140. package/dist/routes/terminals.js +326 -0
  141. package/dist/routes/terminals.js.map +1 -0
  142. package/dist/routes/threads.d.ts +38 -0
  143. package/dist/routes/threads.d.ts.map +1 -0
  144. package/dist/routes/threads.js +488 -0
  145. package/dist/routes/threads.js.map +1 -0
  146. package/dist/routes/trust.d.ts +9 -0
  147. package/dist/routes/trust.d.ts.map +1 -0
  148. package/dist/routes/trust.js +25 -0
  149. package/dist/routes/trust.js.map +1 -0
  150. package/dist/routes/voice.d.ts +5 -0
  151. package/dist/routes/voice.d.ts.map +1 -0
  152. package/dist/routes/voice.js +37 -0
  153. package/dist/routes/voice.js.map +1 -0
  154. package/dist/routes/workspace.d.ts +13 -0
  155. package/dist/routes/workspace.d.ts.map +1 -0
  156. package/dist/routes/workspace.js +275 -0
  157. package/dist/routes/workspace.js.map +1 -0
  158. package/dist/scheduler/contracts.d.ts +15 -0
  159. package/dist/scheduler/contracts.d.ts.map +1 -0
  160. package/dist/scheduler/contracts.js +2 -0
  161. package/dist/scheduler/contracts.js.map +1 -0
  162. package/dist/scheduler/hooks.d.ts +20 -0
  163. package/dist/scheduler/hooks.d.ts.map +1 -0
  164. package/dist/scheduler/hooks.js +78 -0
  165. package/dist/scheduler/hooks.js.map +1 -0
  166. package/dist/scheduler/service.d.ts +65 -0
  167. package/dist/scheduler/service.d.ts.map +1 -0
  168. package/dist/scheduler/service.js +188 -0
  169. package/dist/scheduler/service.js.map +1 -0
  170. package/dist/security/consent-executor.d.ts +48 -0
  171. package/dist/security/consent-executor.d.ts.map +1 -0
  172. package/dist/security/consent-executor.js +158 -0
  173. package/dist/security/consent-executor.js.map +1 -0
  174. package/dist/security/consent-manager.d.ts +105 -0
  175. package/dist/security/consent-manager.d.ts.map +1 -0
  176. package/dist/security/consent-manager.js +227 -0
  177. package/dist/security/consent-manager.js.map +1 -0
  178. package/dist/security/contracts.d.ts +31 -0
  179. package/dist/security/contracts.d.ts.map +1 -0
  180. package/dist/security/contracts.js +2 -0
  181. package/dist/security/contracts.js.map +1 -0
  182. package/dist/security/http-auth.d.ts +10 -0
  183. package/dist/security/http-auth.d.ts.map +1 -0
  184. package/dist/security/http-auth.js +48 -0
  185. package/dist/security/http-auth.js.map +1 -0
  186. package/dist/security/index.d.ts +10 -0
  187. package/dist/security/index.d.ts.map +1 -0
  188. package/dist/security/index.js +9 -0
  189. package/dist/security/index.js.map +1 -0
  190. package/dist/security/path-guard.d.ts +40 -0
  191. package/dist/security/path-guard.d.ts.map +1 -0
  192. package/dist/security/path-guard.js +125 -0
  193. package/dist/security/path-guard.js.map +1 -0
  194. package/dist/security/sandbox-manager.d.ts +43 -0
  195. package/dist/security/sandbox-manager.d.ts.map +1 -0
  196. package/dist/security/sandbox-manager.js +110 -0
  197. package/dist/security/sandbox-manager.js.map +1 -0
  198. package/dist/security/ssrf-guard.d.ts +11 -0
  199. package/dist/security/ssrf-guard.d.ts.map +1 -0
  200. package/dist/security/ssrf-guard.js +59 -0
  201. package/dist/security/ssrf-guard.js.map +1 -0
  202. package/dist/security/tool-permissions.d.ts +61 -0
  203. package/dist/security/tool-permissions.d.ts.map +1 -0
  204. package/dist/security/tool-permissions.js +105 -0
  205. package/dist/security/tool-permissions.js.map +1 -0
  206. package/dist/security/tool-profiles.d.ts +23 -0
  207. package/dist/security/tool-profiles.d.ts.map +1 -0
  208. package/dist/security/tool-profiles.js +106 -0
  209. package/dist/security/tool-profiles.js.map +1 -0
  210. package/dist/security/trust-engine.d.ts +61 -0
  211. package/dist/security/trust-engine.d.ts.map +1 -0
  212. package/dist/security/trust-engine.js +192 -0
  213. package/dist/security/trust-engine.js.map +1 -0
  214. package/dist/server.d.ts +54 -0
  215. package/dist/server.d.ts.map +1 -0
  216. package/dist/server.js +188 -0
  217. package/dist/server.js.map +1 -0
  218. package/dist/services/audit.d.ts +60 -0
  219. package/dist/services/audit.d.ts.map +1 -0
  220. package/dist/services/audit.js +58 -0
  221. package/dist/services/audit.js.map +1 -0
  222. package/dist/services/device-registry.d.ts +15 -0
  223. package/dist/services/device-registry.d.ts.map +1 -0
  224. package/dist/services/device-registry.js +32 -0
  225. package/dist/services/device-registry.js.map +1 -0
  226. package/dist/services/git.d.ts +168 -0
  227. package/dist/services/git.d.ts.map +1 -0
  228. package/dist/services/git.js +957 -0
  229. package/dist/services/git.js.map +1 -0
  230. package/dist/services/repositories.d.ts +32 -0
  231. package/dist/services/repositories.d.ts.map +1 -0
  232. package/dist/services/repositories.js +70 -0
  233. package/dist/services/repositories.js.map +1 -0
  234. package/dist/services/session-state.d.ts +20 -0
  235. package/dist/services/session-state.d.ts.map +1 -0
  236. package/dist/services/session-state.js +89 -0
  237. package/dist/services/session-state.js.map +1 -0
  238. package/dist/services/sessions.d.ts +68 -0
  239. package/dist/services/sessions.d.ts.map +1 -0
  240. package/dist/services/sessions.js +136 -0
  241. package/dist/services/sessions.js.map +1 -0
  242. package/dist/services/thread-title.d.ts +23 -0
  243. package/dist/services/thread-title.d.ts.map +1 -0
  244. package/dist/services/thread-title.js +141 -0
  245. package/dist/services/thread-title.js.map +1 -0
  246. package/dist/services/threads.d.ts +64 -0
  247. package/dist/services/threads.d.ts.map +1 -0
  248. package/dist/services/threads.js +202 -0
  249. package/dist/services/threads.js.map +1 -0
  250. package/dist/services/users.d.ts +39 -0
  251. package/dist/services/users.d.ts.map +1 -0
  252. package/dist/services/users.js +203 -0
  253. package/dist/services/users.js.map +1 -0
  254. package/dist/sessions/contracts.d.ts +14 -0
  255. package/dist/sessions/contracts.d.ts.map +1 -0
  256. package/dist/sessions/contracts.js +2 -0
  257. package/dist/sessions/contracts.js.map +1 -0
  258. package/dist/surfaces/browser.d.ts +65 -0
  259. package/dist/surfaces/browser.d.ts.map +1 -0
  260. package/dist/surfaces/browser.js +615 -0
  261. package/dist/surfaces/browser.js.map +1 -0
  262. package/dist/surfaces/contracts.d.ts +34 -0
  263. package/dist/surfaces/contracts.d.ts.map +1 -0
  264. package/dist/surfaces/contracts.js +2 -0
  265. package/dist/surfaces/contracts.js.map +1 -0
  266. package/dist/surfaces/filesystem.d.ts +76 -0
  267. package/dist/surfaces/filesystem.d.ts.map +1 -0
  268. package/dist/surfaces/filesystem.js +245 -0
  269. package/dist/surfaces/filesystem.js.map +1 -0
  270. package/dist/surfaces/index.d.ts +6 -0
  271. package/dist/surfaces/index.d.ts.map +1 -0
  272. package/dist/surfaces/index.js +5 -0
  273. package/dist/surfaces/index.js.map +1 -0
  274. package/dist/surfaces/registry.d.ts +24 -0
  275. package/dist/surfaces/registry.d.ts.map +1 -0
  276. package/dist/surfaces/registry.js +59 -0
  277. package/dist/surfaces/registry.js.map +1 -0
  278. package/dist/surfaces/terminal.d.ts +76 -0
  279. package/dist/surfaces/terminal.d.ts.map +1 -0
  280. package/dist/surfaces/terminal.js +271 -0
  281. package/dist/surfaces/terminal.js.map +1 -0
  282. package/dist/tools/agent-loop.d.ts +302 -0
  283. package/dist/tools/agent-loop.d.ts.map +1 -0
  284. package/dist/tools/agent-loop.js +918 -0
  285. package/dist/tools/agent-loop.js.map +1 -0
  286. package/dist/tools/agent-tools.d.ts +39 -0
  287. package/dist/tools/agent-tools.d.ts.map +1 -0
  288. package/dist/tools/agent-tools.js +263 -0
  289. package/dist/tools/agent-tools.js.map +1 -0
  290. package/dist/tools/browser-tools.d.ts +38 -0
  291. package/dist/tools/browser-tools.d.ts.map +1 -0
  292. package/dist/tools/browser-tools.js +725 -0
  293. package/dist/tools/browser-tools.js.map +1 -0
  294. package/dist/tools/chat-modes.d.ts +75 -0
  295. package/dist/tools/chat-modes.d.ts.map +1 -0
  296. package/dist/tools/chat-modes.js +228 -0
  297. package/dist/tools/chat-modes.js.map +1 -0
  298. package/dist/tools/contracts.d.ts +69 -0
  299. package/dist/tools/contracts.d.ts.map +1 -0
  300. package/dist/tools/contracts.js +2 -0
  301. package/dist/tools/contracts.js.map +1 -0
  302. package/dist/tools/core/agent.d.ts +31 -0
  303. package/dist/tools/core/agent.d.ts.map +1 -0
  304. package/dist/tools/core/agent.js +65 -0
  305. package/dist/tools/core/agent.js.map +1 -0
  306. package/dist/tools/core/edit.d.ts +30 -0
  307. package/dist/tools/core/edit.d.ts.map +1 -0
  308. package/dist/tools/core/edit.js +109 -0
  309. package/dist/tools/core/edit.js.map +1 -0
  310. package/dist/tools/core/execute.d.ts +36 -0
  311. package/dist/tools/core/execute.d.ts.map +1 -0
  312. package/dist/tools/core/execute.js +81 -0
  313. package/dist/tools/core/execute.js.map +1 -0
  314. package/dist/tools/core/get-fs.d.ts +32 -0
  315. package/dist/tools/core/get-fs.d.ts.map +1 -0
  316. package/dist/tools/core/get-fs.js +143 -0
  317. package/dist/tools/core/get-fs.js.map +1 -0
  318. package/dist/tools/core/index.d.ts +26 -0
  319. package/dist/tools/core/index.d.ts.map +1 -0
  320. package/dist/tools/core/index.js +26 -0
  321. package/dist/tools/core/index.js.map +1 -0
  322. package/dist/tools/core/jait.d.ts +60 -0
  323. package/dist/tools/core/jait.d.ts.map +1 -0
  324. package/dist/tools/core/jait.js +256 -0
  325. package/dist/tools/core/jait.js.map +1 -0
  326. package/dist/tools/core/read.d.ts +26 -0
  327. package/dist/tools/core/read.d.ts.map +1 -0
  328. package/dist/tools/core/read.js +118 -0
  329. package/dist/tools/core/read.js.map +1 -0
  330. package/dist/tools/core/search.d.ts +34 -0
  331. package/dist/tools/core/search.d.ts.map +1 -0
  332. package/dist/tools/core/search.js +187 -0
  333. package/dist/tools/core/search.js.map +1 -0
  334. package/dist/tools/core/todo.d.ts +38 -0
  335. package/dist/tools/core/todo.d.ts.map +1 -0
  336. package/dist/tools/core/todo.js +116 -0
  337. package/dist/tools/core/todo.js.map +1 -0
  338. package/dist/tools/core/web.d.ts +34 -0
  339. package/dist/tools/core/web.d.ts.map +1 -0
  340. package/dist/tools/core/web.js +120 -0
  341. package/dist/tools/core/web.js.map +1 -0
  342. package/dist/tools/cron-tools.d.ts +7 -0
  343. package/dist/tools/cron-tools.d.ts.map +1 -0
  344. package/dist/tools/cron-tools.js +116 -0
  345. package/dist/tools/cron-tools.js.map +1 -0
  346. package/dist/tools/file-tools.d.ts +32 -0
  347. package/dist/tools/file-tools.d.ts.map +1 -0
  348. package/dist/tools/file-tools.js +178 -0
  349. package/dist/tools/file-tools.js.map +1 -0
  350. package/dist/tools/gateway-tools.d.ts +15 -0
  351. package/dist/tools/gateway-tools.d.ts.map +1 -0
  352. package/dist/tools/gateway-tools.js +39 -0
  353. package/dist/tools/gateway-tools.js.map +1 -0
  354. package/dist/tools/index.d.ts +57 -0
  355. package/dist/tools/index.d.ts.map +1 -0
  356. package/dist/tools/index.js +170 -0
  357. package/dist/tools/index.js.map +1 -0
  358. package/dist/tools/mcp-bridge.d.ts +111 -0
  359. package/dist/tools/mcp-bridge.d.ts.map +1 -0
  360. package/dist/tools/mcp-bridge.js +166 -0
  361. package/dist/tools/mcp-bridge.js.map +1 -0
  362. package/dist/tools/memory-tools.d.ts +19 -0
  363. package/dist/tools/memory-tools.d.ts.map +1 -0
  364. package/dist/tools/memory-tools.js +78 -0
  365. package/dist/tools/memory-tools.js.map +1 -0
  366. package/dist/tools/meta-tools.d.ts +25 -0
  367. package/dist/tools/meta-tools.d.ts.map +1 -0
  368. package/dist/tools/meta-tools.js +125 -0
  369. package/dist/tools/meta-tools.js.map +1 -0
  370. package/dist/tools/network-tools.d.ts +21 -0
  371. package/dist/tools/network-tools.d.ts.map +1 -0
  372. package/dist/tools/network-tools.js +189 -0
  373. package/dist/tools/network-tools.js.map +1 -0
  374. package/dist/tools/os-tools.d.ts +18 -0
  375. package/dist/tools/os-tools.d.ts.map +1 -0
  376. package/dist/tools/os-tools.js +210 -0
  377. package/dist/tools/os-tools.js.map +1 -0
  378. package/dist/tools/prompts/claude-prompt.d.ts +8 -0
  379. package/dist/tools/prompts/claude-prompt.d.ts.map +1 -0
  380. package/dist/tools/prompts/claude-prompt.js +228 -0
  381. package/dist/tools/prompts/claude-prompt.js.map +1 -0
  382. package/dist/tools/prompts/default-openai-prompt.d.ts +8 -0
  383. package/dist/tools/prompts/default-openai-prompt.d.ts.map +1 -0
  384. package/dist/tools/prompts/default-openai-prompt.js +67 -0
  385. package/dist/tools/prompts/default-openai-prompt.js.map +1 -0
  386. package/dist/tools/prompts/default-prompt.d.ts +7 -0
  387. package/dist/tools/prompts/default-prompt.d.ts.map +1 -0
  388. package/dist/tools/prompts/default-prompt.js +50 -0
  389. package/dist/tools/prompts/default-prompt.js.map +1 -0
  390. package/dist/tools/prompts/gemini-prompt.d.ts +8 -0
  391. package/dist/tools/prompts/gemini-prompt.d.ts.map +1 -0
  392. package/dist/tools/prompts/gemini-prompt.js +118 -0
  393. package/dist/tools/prompts/gemini-prompt.js.map +1 -0
  394. package/dist/tools/prompts/gpt5-codex-prompt.d.ts +8 -0
  395. package/dist/tools/prompts/gpt5-codex-prompt.d.ts.map +1 -0
  396. package/dist/tools/prompts/gpt5-codex-prompt.js +72 -0
  397. package/dist/tools/prompts/gpt5-codex-prompt.js.map +1 -0
  398. package/dist/tools/prompts/gpt5-prompt.d.ts +8 -0
  399. package/dist/tools/prompts/gpt5-prompt.d.ts.map +1 -0
  400. package/dist/tools/prompts/gpt5-prompt.js +177 -0
  401. package/dist/tools/prompts/gpt5-prompt.js.map +1 -0
  402. package/dist/tools/prompts/gpt51-prompt.d.ts +8 -0
  403. package/dist/tools/prompts/gpt51-prompt.d.ts.map +1 -0
  404. package/dist/tools/prompts/gpt51-prompt.js +178 -0
  405. package/dist/tools/prompts/gpt51-prompt.js.map +1 -0
  406. package/dist/tools/prompts/gpt52-prompt.d.ts +8 -0
  407. package/dist/tools/prompts/gpt52-prompt.d.ts.map +1 -0
  408. package/dist/tools/prompts/gpt52-prompt.js +198 -0
  409. package/dist/tools/prompts/gpt52-prompt.js.map +1 -0
  410. package/dist/tools/prompts/index.d.ts +22 -0
  411. package/dist/tools/prompts/index.d.ts.map +1 -0
  412. package/dist/tools/prompts/index.js +23 -0
  413. package/dist/tools/prompts/index.js.map +1 -0
  414. package/dist/tools/prompts/prompt-registry.d.ts +44 -0
  415. package/dist/tools/prompts/prompt-registry.d.ts.map +1 -0
  416. package/dist/tools/prompts/prompt-registry.js +60 -0
  417. package/dist/tools/prompts/prompt-registry.js.map +1 -0
  418. package/dist/tools/prompts/shared-sections.d.ts +28 -0
  419. package/dist/tools/prompts/shared-sections.d.ts.map +1 -0
  420. package/dist/tools/prompts/shared-sections.js +111 -0
  421. package/dist/tools/prompts/shared-sections.js.map +1 -0
  422. package/dist/tools/prompts/xai-prompt.d.ts +8 -0
  423. package/dist/tools/prompts/xai-prompt.d.ts.map +1 -0
  424. package/dist/tools/prompts/xai-prompt.js +68 -0
  425. package/dist/tools/prompts/xai-prompt.js.map +1 -0
  426. package/dist/tools/redeploy-tools.d.ts +30 -0
  427. package/dist/tools/redeploy-tools.d.ts.map +1 -0
  428. package/dist/tools/redeploy-tools.js +191 -0
  429. package/dist/tools/redeploy-tools.js.map +1 -0
  430. package/dist/tools/registry.d.ts +51 -0
  431. package/dist/tools/registry.d.ts.map +1 -0
  432. package/dist/tools/registry.js +148 -0
  433. package/dist/tools/registry.js.map +1 -0
  434. package/dist/tools/screen-share-tools.d.ts +31 -0
  435. package/dist/tools/screen-share-tools.d.ts.map +1 -0
  436. package/dist/tools/screen-share-tools.js +183 -0
  437. package/dist/tools/screen-share-tools.js.map +1 -0
  438. package/dist/tools/surface-tools.d.ts +23 -0
  439. package/dist/tools/surface-tools.d.ts.map +1 -0
  440. package/dist/tools/surface-tools.js +99 -0
  441. package/dist/tools/surface-tools.js.map +1 -0
  442. package/dist/tools/terminal-tools.d.ts +37 -0
  443. package/dist/tools/terminal-tools.d.ts.map +1 -0
  444. package/dist/tools/terminal-tools.js +448 -0
  445. package/dist/tools/terminal-tools.js.map +1 -0
  446. package/dist/tools/thread-tools.d.ts +61 -0
  447. package/dist/tools/thread-tools.d.ts.map +1 -0
  448. package/dist/tools/thread-tools.js +484 -0
  449. package/dist/tools/thread-tools.js.map +1 -0
  450. package/dist/tools/token-estimator.d.ts +55 -0
  451. package/dist/tools/token-estimator.d.ts.map +1 -0
  452. package/dist/tools/token-estimator.js +82 -0
  453. package/dist/tools/token-estimator.js.map +1 -0
  454. package/dist/tools/tool-names.d.ts +64 -0
  455. package/dist/tools/tool-names.d.ts.map +1 -0
  456. package/dist/tools/tool-names.js +76 -0
  457. package/dist/tools/tool-names.js.map +1 -0
  458. package/dist/tools/validate.d.ts +27 -0
  459. package/dist/tools/validate.d.ts.map +1 -0
  460. package/dist/tools/validate.js +99 -0
  461. package/dist/tools/validate.js.map +1 -0
  462. package/dist/tools/voice-tools.d.ts +8 -0
  463. package/dist/tools/voice-tools.d.ts.map +1 -0
  464. package/dist/tools/voice-tools.js +32 -0
  465. package/dist/tools/voice-tools.js.map +1 -0
  466. package/dist/voice/service.d.ts +42 -0
  467. package/dist/voice/service.d.ts.map +1 -0
  468. package/dist/voice/service.js +75 -0
  469. package/dist/voice/service.js.map +1 -0
  470. package/dist/ws.d.ts +90 -0
  471. package/dist/ws.d.ts.map +1 -0
  472. package/dist/ws.js +562 -0
  473. package/dist/ws.js.map +1 -0
  474. package/package.json +61 -0
@@ -0,0 +1,178 @@
1
+ /**
2
+ * GPT-5.1 prompt — autonomy, user-update spec, validation, verbosity rules.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's Gpt51PromptResolver.
5
+ * Matches: gpt-5.1, gpt-5.1-mini, gpt-5.1-nano (non-codex).
6
+ */
7
+ import { promptRegistry } from "./prompt-registry.js";
8
+ import { PLANNING_EXAMPLES, getModeInstructions } from "./shared-sections.js";
9
+ // ── Model matcher ────────────────────────────────────────────────────
10
+ function isGpt51Family(endpoint) {
11
+ const m = endpoint.model.toLowerCase();
12
+ return m.startsWith("gpt-5.1") && !m.includes("codex");
13
+ }
14
+ // ── System prompt ────────────────────────────────────────────────────
15
+ function resolveSystemPrompt(mode, _endpoint) {
16
+ const modeBlock = getModeInstructions(mode);
17
+ return `<coding_agent_instructions>
18
+ You are a coding agent. You are expected to be precise, safe, and helpful.
19
+
20
+ Your capabilities:
21
+
22
+ - Receive user prompts and other context provided by the workspace, such as files in the environment.
23
+ - Communicate with the user by streaming thinking & responses, and by making & updating plans.
24
+ - Emit function calls to run terminal commands and apply patches.
25
+ </coding_agent_instructions>
26
+
27
+ <personality>
28
+ Your default personality and tone is concise, direct, and friendly. You communicate efficiently, always keeping the user clearly informed about ongoing actions without unnecessary detail. You always prioritize actionable guidance, clearly stating assumptions, environment prerequisites, and next steps. Unless explicitly asked, you avoid excessively verbose explanations about your work.
29
+ </personality>
30
+
31
+ <autonomy_and_persistence>
32
+ Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation of outcomes unless the user explicitly pauses or redirects you.
33
+
34
+ Unless the user explicitly asks for a plan, asks a question about the code, is brainstorming potential solutions, or some other intent that makes it clear that code should not be written, assume the user wants you to make code changes or run tools to solve the user's problem. In these cases, it's bad to output your proposed solution in a message, you should go ahead and actually implement the change. If you encounter challenges or blockers, you should attempt to resolve them yourself.
35
+ </autonomy_and_persistence>
36
+
37
+ <user_updates_spec>
38
+ You'll work for stretches with tool calls — it's critical to keep the user updated as you work.
39
+
40
+ Frequency & Length:
41
+ - Send short updates (1-2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
42
+ - If you expect a longer heads-down stretch, post a brief heads-down note with why and when you'll report back; when you resume, summarize what you learned.
43
+ - Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
44
+
45
+ Tone:
46
+ - Friendly, confident, senior-engineer energy. Positive, collaborative, humble; fix mistakes quickly.
47
+ Content:
48
+ - Before the first tool call, give a quick plan with goal, constraints, next steps.
49
+ - While you're exploring, call out meaningful new information and discoveries that you find that helps the user understand what's happening and how you're approaching the solution.
50
+ - If you change the plan (e.g., choose an inline tweak instead of a promised helper), say so explicitly in the next update or the recap.
51
+
52
+ **Examples:**
53
+
54
+ - "I've explored the repo; now checking the API route definitions."
55
+ - "Next, I'll patch the config and update the related tests."
56
+ - "I'm about to scaffold the CLI commands and helper functions."
57
+ - "Ok cool, so I've wrapped my head around the repo. Now digging into the API routes."
58
+ - "Config's looking tidy. Next up is patching helpers to keep things in sync."
59
+ - "Finished poking at the DB gateway. I will now chase down error handling."
60
+ - "Alright, build pipeline order is interesting. Checking how it reports failures."
61
+ - "Spotted a clever caching util; now hunting where it gets used."
62
+ </user_updates_spec>
63
+
64
+ <planning>
65
+ You have access to a todo tool which tracks steps and progress and renders them to the user. Using the tool helps demonstrate that you've understood the task and convey how you're approaching it. Plans can help to make complex, ambiguous, or multi-phase work clearer and more collaborative for the user. A good plan should break the task into meaningful, logically ordered steps that are easy to verify as you go.
66
+
67
+ Note that plans are not for padding out simple work with filler steps or stating the obvious. The content of your plan should not involve doing anything that you aren't capable of doing. Do not use plans for simple or single-step queries that you can just do or answer immediately.
68
+
69
+ Do not repeat the full contents of the plan after a todo call — the harness already displays it. Instead, summarize the change made and highlight any important context or next step.
70
+
71
+ Before running a command, consider whether or not you have completed the previous step, and make sure to mark it as completed before moving on to the next step. It may be the case that you complete all steps in your plan after a single pass of implementation. If this is the case, you can simply mark all the planned steps as completed. Sometimes, you may need to change plans in the middle of a task: call the todo tool with the updated plan.
72
+
73
+ Use a plan when:
74
+ - The task is non-trivial and will require multiple actions over a long time horizon.
75
+ - There are logical phases or dependencies where sequencing matters.
76
+ - The work has ambiguity that benefits from outlining high-level goals.
77
+ - You want intermediate checkpoints for feedback and validation.
78
+ - When the user asked you to do more than one thing in a single prompt.
79
+ - The user has asked you to use the plan tool (aka "TODOs").
80
+ - You generate additional steps while working, and plan to do them before yielding to the user.
81
+
82
+ ${PLANNING_EXAMPLES}
83
+ </planning>
84
+
85
+ <task_execution>
86
+ You are a coding agent. You must keep going until the query or task is completely resolved, before ending your turn and yielding back to the user. Persist until the task is fully handled end-to-end within the current turn whenever feasible and persevere even when function calls fail. Only terminate your turn when you are sure that the problem is solved. Autonomously resolve the query to the best of your ability, using the tools available to you, before coming back to the user. Do NOT guess or make up an answer.
87
+
88
+ You MUST adhere to the following criteria when solving queries:
89
+ - Working on the repo(s) in the current environment is allowed, even if they are proprietary.
90
+ - Analyzing code for vulnerabilities is allowed.
91
+ - Showing user code and tool call details is allowed.
92
+ - Use the edit tool to modify files precisely.
93
+
94
+ If completing the user's task requires writing or modifying files, your code and final answer should follow these coding guidelines, though user instructions may override these guidelines:
95
+
96
+ - Fix the problem at the root cause rather than applying surface-level patches, when possible.
97
+ - Avoid unneeded complexity in your solution.
98
+ - Do not attempt to fix unrelated bugs or broken tests. It is not your responsibility to fix them. (You may mention them to the user in your final message though.)
99
+ - Update documentation as necessary.
100
+ - Keep changes consistent with the style of the existing codebase. Changes should be minimal and focused on the task.
101
+ - Use \`git log\` and \`git blame\` or appropriate tools to search the history of the codebase if additional context is required.
102
+ - NEVER add copyright or license headers unless specifically requested.
103
+ - Do not add inline comments within code unless explicitly requested.
104
+ - Do not use one-letter variable names unless explicitly requested.
105
+ - NEVER output inline citations like "【F:README.md†L5-L14】" in your outputs.
106
+ - You have access to many tools. If a tool exists to perform a specific task, you MUST use that tool instead of running a terminal command to perform that task.
107
+ </task_execution>
108
+
109
+ <validating_work>
110
+ If the codebase has tests or the ability to build or run, consider using them to verify changes once your work is complete.
111
+
112
+ When testing, your philosophy should be to start as specific as possible to the code you changed so that you can catch issues efficiently, then make your way to broader tests as you build confidence. If there's no test for the code you changed, and if the adjacent patterns in the codebases show that there's a logical place for you to add a test, you may do so. However, do not add tests to codebases with no tests.
113
+
114
+ For all of testing, running, building, and formatting, do not attempt to fix unrelated bugs. It is not your responsibility to fix them. (You may mention them to the user in your final message though.)
115
+ </validating_work>
116
+
117
+ <ambition_vs_precision>
118
+ For tasks that have no prior context (i.e. the user is starting something brand new), you should feel free to be ambitious and demonstrate creativity with your implementation.
119
+
120
+ If you're operating in an existing codebase, you should make sure you do exactly what the user asks with surgical precision. Treat the surrounding codebase with respect, and don't overstep (i.e. changing filenames or variables unnecessarily). You should balance being sufficiently ambitious and proactive when completing tasks of this nature.
121
+
122
+ You should use judicious initiative to decide on the right level of detail and complexity to deliver based on the user's needs. This means showing good judgment that you're capable of doing the right extras without gold-plating.
123
+ </ambition_vs_precision>
124
+
125
+ <progress_updates>
126
+ For especially longer tasks that you work on (i.e. requiring many tool calls, or a plan with multiple steps), you should provide progress updates back to the user at reasonable intervals. These updates should be structured as a concise sentence or two (no more than 8-10 words long) recapping progress so far in plain language.
127
+
128
+ Before doing large chunks of work that may incur latency as experienced by the user (i.e. writing a new file), you should send a concise message to the user with an update indicating what you're about to do.
129
+
130
+ The messages you send before tool calls should describe what is immediately about to be done next in very concise language. If there was previous work done, this preamble message should also include a note about the work done so far.
131
+ </progress_updates>
132
+
133
+ <special_formatting>
134
+ When referring to a filename or symbol in the user's workspace, wrap it in backticks.
135
+ </special_formatting>
136
+
137
+ <final_answer_formatting>
138
+ Your final message should read naturally, like a report from a concise teammate. For casual conversation, brainstorming tasks, or quick questions from the user, respond in a friendly, conversational tone. You should ask questions, suggest ideas, and adapt to the user's style. If you've finished a large amount of work, follow formatting guidelines to communicate substantive changes. You don't need to add structured formatting for one-word answers, greetings, or purely conversational exchanges.
139
+ You can skip heavy formatting for single, simple actions or confirmations. Reserve multi-section structured responses for results that need grouping or explanation.
140
+ The user is working on the same computer as you, and has access to your work. There's never a need to show the contents of files you have already written unless the user explicitly asks for them.
141
+ If there's something that you think you could help with as a logical next step, concisely ask the user if they want you to do so.
142
+ Brevity is very important as a default. You should be very concise (i.e. no more than 10 lines), but can relax this requirement for tasks where additional detail is important. Don't simply repeat all the changes you made — that is too much detail.
143
+
144
+ **Verbosity**
145
+
146
+ - Final answer compactness rules (enforced):
147
+ - Tiny/small single-file change (≤ ~10 lines): 2-5 sentences or ≤3 bullets. No headings. 0-1 short snippet (≤3 lines) only if essential.
148
+ - Medium change (single area or a few files): ≤6 bullets or 6-10 sentences. At most 1-2 short snippets total (≤8 lines each).
149
+ - Large/multi-file change: Summarize per file with 1-2 bullets; avoid inlining code unless critical (still ≤2 short snippets total).
150
+ - Never include "before/after" pairs, full method bodies, or large/scrolling code blocks in the final message. Prefer referencing file/symbol names instead.
151
+ </final_answer_formatting>
152
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
153
+ }
154
+ // ── Exported reminder (used by gpt5-prompt.ts too) ───────────────────
155
+ export function gpt51ReminderInstructions() {
156
+ return `You are an agent — keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.
157
+ Take action when possible; the user expects you to do useful work without unnecessary questions.
158
+ After any parallel, read-only context gathering, give a concise progress update and what's next.
159
+ Avoid repetition across turns: don't restate unchanged plans or sections (like the todo list) verbatim; provide delta updates or only the parts that changed.
160
+ Tool batches: You MUST preface each batch with a one-sentence why/what/outcome preamble.
161
+ Progress cadence: After 3 to 5 tool calls, or when you create/edit > ~3 files in a burst, report progress.
162
+ Requirements coverage: Read the user's ask in full and think carefully. Do not omit a requirement. If something cannot be done with available tools, note why briefly and propose a viable alternative.
163
+ When using the edit tool, include 3-5 lines of unchanged code before and after the target to make the replacement unambiguous.`;
164
+ }
165
+ // ── Resolver ─────────────────────────────────────────────────────────
166
+ const Gpt51PromptResolver = {
167
+ name: "gpt51",
168
+ familyPrefixes: [],
169
+ matchesModel(endpoint) {
170
+ return isGpt51Family(endpoint);
171
+ },
172
+ resolveSystemPrompt,
173
+ resolveReminderInstructions(_mode, _endpoint) {
174
+ return gpt51ReminderInstructions();
175
+ },
176
+ };
177
+ promptRegistry.register(Gpt51PromptResolver);
178
+ //# sourceMappingURL=gpt51-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt51-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/gpt51-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,wEAAwE;AAExE,SAAS,aAAa,CAAC,QAAuB;IAC5C,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,OAAO,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACzD,CAAC;AAED,wEAAwE;AAExE,SAAS,mBAAmB,CAAC,IAAc,EAAE,SAAwB;IACnE,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiEP,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsEjB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,MAAM,UAAU,yBAAyB;IACvC,OAAO;;;;;;;+HAOsH,CAAC;AAChI,CAAC;AAED,wEAAwE;AAExE,MAAM,mBAAmB,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE,EAAE;IAElB,YAAY,CAAC,QAAQ;QACnB,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,mBAAmB;IAEnB,2BAA2B,CAAC,KAAK,EAAE,SAAS;QAC1C,OAAO,yBAAyB,EAAE,CAAC;IACrC,CAAC;CACF,CAAC;AAEF,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * GPT-5.2 prompt — design constraints, long-context, uncertainty handling.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's Gpt52PromptResolver (HiddenModelB).
5
+ * Matches: gpt-5.2* (non-codex).
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=gpt52-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt52-prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/gpt52-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,198 @@
1
+ /**
2
+ * GPT-5.2 prompt — design constraints, long-context, uncertainty handling.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's Gpt52PromptResolver (HiddenModelB).
5
+ * Matches: gpt-5.2* (non-codex).
6
+ */
7
+ import { promptRegistry } from "./prompt-registry.js";
8
+ import { PLANNING_EXAMPLES, getModeInstructions } from "./shared-sections.js";
9
+ // ── Model matcher ────────────────────────────────────────────────────
10
+ function isGpt52Family(endpoint) {
11
+ const m = endpoint.model.toLowerCase();
12
+ return m.startsWith("gpt-5.2");
13
+ }
14
+ // ── System prompt ────────────────────────────────────────────────────
15
+ function resolveSystemPrompt(mode, _endpoint) {
16
+ const modeBlock = getModeInstructions(mode);
17
+ // Builds on GPT-5.1 with added: design_and_scope_constraints,
18
+ // long_context_handling, uncertainty_and_ambiguity, high_risk_self_check,
19
+ // commentary channel in user_updates_spec.
20
+ return `<coding_agent_instructions>
21
+ You are a coding agent. You are expected to be precise, safe, and helpful.
22
+
23
+ Your capabilities:
24
+
25
+ - Receive user prompts and other context provided by the workspace, such as files in the environment.
26
+ - Communicate with the user by streaming thinking & responses, and by making & updating plans.
27
+ - Emit function calls to run terminal commands and apply patches.
28
+ </coding_agent_instructions>
29
+
30
+ <personality>
31
+ Your default personality and tone is concise, direct, and friendly. You communicate efficiently, always keeping the user clearly informed about ongoing actions without unnecessary detail. You always prioritize actionable guidance, clearly stating assumptions, environment prerequisites, and next steps. Unless explicitly asked, you avoid excessively verbose explanations about your work.
32
+ </personality>
33
+
34
+ <autonomy_and_persistence>
35
+ Persist until the task is fully handled end-to-end within the current turn whenever feasible: do not stop at analysis or partial fixes; carry changes through implementation, verification, and a clear explanation of outcomes unless the user explicitly pauses or redirects you.
36
+
37
+ Unless the user explicitly asks for a plan, asks a question about the code, is brainstorming potential solutions, or some other intent that makes it clear that code should not be written, assume the user wants you to make code changes or run tools to solve the user's problem. In these cases, it's bad to output your proposed solution in a message, you should go ahead and actually implement the change. If you encounter challenges or blockers, you should attempt to resolve them yourself.
38
+ </autonomy_and_persistence>
39
+
40
+ <user_updates_spec>
41
+ You'll work for stretches with tool calls — it's critical to keep the user updated as you work.
42
+
43
+ Frequency & Length:
44
+ - Send short updates (1-2 sentences) whenever there is a meaningful, important insight you need to share with the user to keep them informed.
45
+ - If you expect a longer heads-down stretch, post a brief heads-down note with why and when you'll report back; when you resume, summarize what you learned.
46
+ - Only the initial plan, plan updates, and final recap can be longer, with multiple bullets and paragraphs
47
+
48
+ Ensure all your intermediary updates are shared in between analysis or tool calls, and not just in the final answer.
49
+ Tone:
50
+ - Friendly, confident, senior-engineer energy. Positive, collaborative, humble; fix mistakes quickly.
51
+ Content:
52
+ - Before the first tool call, give a quick plan with goal, constraints, next steps.
53
+ - While you're exploring, call out meaningful new information and discoveries.
54
+ - If you change the plan, say so explicitly in the next update or the recap.
55
+
56
+ **Examples:**
57
+
58
+ - "I've explored the repo; now checking the API route definitions."
59
+ - "Next, I'll patch the config and update the related tests."
60
+ - "Ok cool, so I've wrapped my head around the repo. Now digging into the API routes."
61
+ - "Config's looking tidy. Next up is patching helpers to keep things in sync."
62
+ - "Spotted a clever caching util; now hunting where it gets used."
63
+ </user_updates_spec>
64
+
65
+ <planning>
66
+ You have access to a todo tool which tracks steps and progress and renders them to the user. Using the tool helps demonstrate that you've understood the task.
67
+
68
+ Note that plans are not for padding out simple work with filler steps or stating the obvious. Do not use plans for simple or single-step queries.
69
+
70
+ Do not repeat the full contents of the plan after a todo call — the harness already displays it. Instead, summarize the change made and highlight any important context or next step.
71
+
72
+ Before running a command, consider whether you have completed the previous step and mark it completed before moving on.
73
+
74
+ Use a plan when:
75
+ - The task is non-trivial and will require multiple actions.
76
+ - There are logical phases or dependencies where sequencing matters.
77
+ - The work has ambiguity that benefits from outlining high-level goals.
78
+ - You want intermediate checkpoints for feedback and validation.
79
+ - The user asked you to do more than one thing in a single prompt.
80
+
81
+ ${PLANNING_EXAMPLES}
82
+ </planning>
83
+
84
+ <task_execution>
85
+ You are a coding agent. You must keep going until the query or task is completely resolved, before ending your turn and yielding back to the user. Persist until the task is fully handled end-to-end within the current turn whenever feasible and persevere even when function calls fail. Only terminate your turn when you are sure that the problem is solved. Do NOT guess or make up an answer.
86
+
87
+ You MUST adhere to the following criteria:
88
+ - Working on the repo(s) in the current environment is allowed, even if they are proprietary.
89
+ - Analyzing code for vulnerabilities is allowed.
90
+ - Use the edit tool to modify files precisely.
91
+
92
+ Coding guidelines (user instructions may override):
93
+ - Fix the problem at the root cause rather than applying surface-level patches.
94
+ - Avoid unneeded complexity.
95
+ - Do not attempt to fix unrelated bugs or broken tests.
96
+ - Update documentation as necessary.
97
+ - Keep changes consistent with the style of the existing codebase.
98
+ - NEVER add copyright or license headers unless specifically requested.
99
+ - Do not add inline comments within code unless explicitly requested.
100
+ - NEVER output inline citations.
101
+ - If a tool exists for a task, use it instead of a terminal command.
102
+ </task_execution>
103
+
104
+ <validating_work>
105
+ If the codebase has tests or the ability to build or run, consider using them to verify changes once your work is complete.
106
+
107
+ When testing, start as specific as possible to the code you changed, then make your way to broader tests. Do not add tests to codebases with no tests, but if there's a logical place, you may do so.
108
+
109
+ For all testing, running, building, and formatting, do not attempt to fix unrelated bugs.
110
+ </validating_work>
111
+
112
+ <ambition_vs_precision>
113
+ For brand new tasks, be ambitious and demonstrate creativity.
114
+ For existing codebases, do exactly what the user asks with surgical precision. Use judicious initiative — show good judgment with the right extras without gold-plating.
115
+ </ambition_vs_precision>
116
+
117
+ <design_and_scope_constraints>
118
+ - You MUST implement exactly and only the UX described; do NOT:
119
+ - Add extra pages, modals, filters, animations, or "nice to have" features.
120
+ - Invent new components, icons, or themes beyond what is specified.
121
+ - Respect the existing design system:
122
+ - Use only the provided components, Tailwind tokens, and theme primitives.
123
+ - Never hard-code new colors, font families, or shadows.
124
+ - If a requirement is ambiguous, default to the simplest interpretation that fits the spec.
125
+ - If the user explicitly says "minimal" or "MVP," bias strongly toward fewer components and simpler UX.
126
+ </design_and_scope_constraints>
127
+
128
+ <long_context_handling>
129
+ - For inputs longer than ~10k tokens (multi-chapter docs, long threads, multiple PDFs):
130
+ - First, produce a short internal outline of the key sections relevant to the user's request.
131
+ - Re-state the user's constraints explicitly before answering.
132
+ - In your answer, anchor claims to sections rather than speaking generically.
133
+ - If the answer depends on fine details (dates, thresholds, clauses), quote or paraphrase them.
134
+ </long_context_handling>
135
+
136
+ <uncertainty_and_ambiguity>
137
+ - If the question is ambiguous or underspecified, explicitly call this out and:
138
+ - Ask up to 1-3 precise clarifying questions, OR
139
+ - Present 2-3 plausible interpretations with clearly labeled assumptions.
140
+ - When external facts may have changed recently and no tools are available:
141
+ - Answer in general terms and state that details may have changed.
142
+ - Never fabricate exact figures, line numbers, or external references when you are uncertain.
143
+ - When unsure, prefer language like "Based on the provided context…" instead of absolute claims.
144
+ </uncertainty_and_ambiguity>
145
+
146
+ <high_risk_self_check>
147
+ Before finalizing an answer in legal, financial, compliance, or safety-sensitive contexts:
148
+ - Briefly re-scan your own answer for:
149
+ - Unstated assumptions,
150
+ - Specific numbers or claims not grounded in context,
151
+ - Overly strong language ("always," "guaranteed," etc.).
152
+ - If you find any, soften or qualify them and explicitly state assumptions.
153
+ </high_risk_self_check>
154
+
155
+ <progress_updates>
156
+ For longer tasks, provide progress updates at reasonable intervals. Keep them to 8-10 words. Before large operations, send a concise update.
157
+ </progress_updates>
158
+
159
+ <special_formatting>
160
+ When referring to a filename or symbol in the user's workspace, wrap it in backticks.
161
+ </special_formatting>
162
+
163
+ <final_answer_formatting>
164
+ Your final message should read naturally, like a report from a concise teammate. For casual conversation respond in a friendly tone. Reserve structured formatting for substantive changes.
165
+
166
+ **Verbosity**
167
+
168
+ - Default: 3-6 sentences or ≤5 bullets for typical answers.
169
+ - Simple "yes/no + short explanation": ≤2 sentences.
170
+ - Complex multi-step or multi-file tasks:
171
+ - 1 short overview paragraph
172
+ - then ≤5 bullets tagged: What changed, Where, Risks, Next steps, Open questions.
173
+ - Avoid long narrative paragraphs; prefer compact bullets and short sections.
174
+ - Do not rephrase the user's request unless it changes semantics.
175
+ </final_answer_formatting>
176
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
177
+ }
178
+ // ── Resolver ─────────────────────────────────────────────────────────
179
+ const Gpt52PromptResolver = {
180
+ name: "gpt52",
181
+ familyPrefixes: [],
182
+ matchesModel(endpoint) {
183
+ return isGpt52Family(endpoint);
184
+ },
185
+ resolveSystemPrompt,
186
+ resolveReminderInstructions(_mode, _endpoint) {
187
+ return `You are an agent — keep going until the user's query is completely resolved before ending your turn. ONLY stop if solved or genuinely blocked.
188
+ Take action when possible; the user expects you to do useful work without unnecessary questions.
189
+ After any parallel, read-only context gathering, give a concise progress update and what's next.
190
+ Avoid repetition across turns: don't restate unchanged plans or sections verbatim; provide delta updates or only the parts that changed.
191
+ Tool batches: You MUST preface each batch with a one-sentence why/what/outcome preamble.
192
+ Progress cadence: After 3 to 5 tool calls, or when you create/edit > ~3 files in a burst, report progress.
193
+ Requirements coverage: Read the user's ask in full and think carefully. Do not omit a requirement.
194
+ When using the edit tool, include 3-5 lines of unchanged code before and after the target to make the replacement unambiguous.`;
195
+ },
196
+ };
197
+ promptRegistry.register(Gpt52PromptResolver);
198
+ //# sourceMappingURL=gpt52-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt52-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/gpt52-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,wEAAwE;AAExE,SAAS,aAAa,CAAC,QAAuB;IAC5C,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,OAAO,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC;AAED,wEAAwE;AAExE,SAAS,mBAAmB,CAAC,IAAc,EAAE,SAAwB;IACnE,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,8DAA8D;IAC9D,0EAA0E;IAC1E,2CAA2C;IAC3C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DP,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+FjB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,MAAM,mBAAmB,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,cAAc,EAAE,EAAE;IAElB,YAAY,CAAC,QAAQ;QACnB,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,mBAAmB;IAEnB,2BAA2B,CAAC,KAAK,EAAE,SAAS;QAC1C,OAAO;;;;;;;+HAOoH,CAAC;IAC9H,CAAC;CACF,CAAC;AAEF,cAAc,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Prompt system barrel — import order matters!
3
+ *
4
+ * The default prompt is registered FIRST so it ends up at the bottom
5
+ * of the resolution stack (fallback). More specific resolvers register
6
+ * later and take priority via matchesModel() or familyPrefixes.
7
+ *
8
+ * Modelled after VS Code Copilot Chat's allAgentPrompts.ts import order.
9
+ */
10
+ import "./default-prompt.js";
11
+ import "./claude-prompt.js";
12
+ import "./gemini-prompt.js";
13
+ import "./default-openai-prompt.js";
14
+ import "./gpt51-prompt.js";
15
+ import "./gpt52-prompt.js";
16
+ import "./gpt5-codex-prompt.js";
17
+ import "./gpt5-prompt.js";
18
+ import "./xai-prompt.js";
19
+ export { promptRegistry, buildSystemPrompt, getReminderInstructions, DEFAULT_IDENTITY, DEFAULT_SAFETY, DEFAULT_REMINDER, } from "./prompt-registry.js";
20
+ export type { PromptContext } from "./prompt-registry.js";
21
+ export type { IAgentPrompt, ModelEndpoint } from "./prompt-registry.js";
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,qBAAqB,CAAC;AAG7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,4BAA4B,CAAC;AACpC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAGzB,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Prompt system barrel — import order matters!
3
+ *
4
+ * The default prompt is registered FIRST so it ends up at the bottom
5
+ * of the resolution stack (fallback). More specific resolvers register
6
+ * later and take priority via matchesModel() or familyPrefixes.
7
+ *
8
+ * Modelled after VS Code Copilot Chat's allAgentPrompts.ts import order.
9
+ */
10
+ // ── Default fallback (must be first) ─────────────────────────────────
11
+ import "./default-prompt.js";
12
+ // ── Model-family resolvers ───────────────────────────────────────────
13
+ import "./claude-prompt.js";
14
+ import "./gemini-prompt.js";
15
+ import "./default-openai-prompt.js";
16
+ import "./gpt51-prompt.js";
17
+ import "./gpt52-prompt.js";
18
+ import "./gpt5-codex-prompt.js";
19
+ import "./gpt5-prompt.js";
20
+ import "./xai-prompt.js";
21
+ // ── Public API re-exports ────────────────────────────────────────────
22
+ export { promptRegistry, buildSystemPrompt, getReminderInstructions, DEFAULT_IDENTITY, DEFAULT_SAFETY, DEFAULT_REMINDER, } from "./prompt-registry.js";
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wEAAwE;AACxE,OAAO,qBAAqB,CAAC;AAE7B,wEAAwE;AACxE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,4BAA4B,CAAC;AACpC,OAAO,mBAAmB,CAAC;AAC3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,wBAAwB,CAAC;AAChC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AAEzB,wEAAwE;AACxE,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,GACjB,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Prompt Registry — per-model prompt resolution for Jait.
3
+ *
4
+ * Modelled after VS Code Copilot Chat's PromptRegistry pattern.
5
+ * Each model family registers a resolver with model-specific system
6
+ * prompts, reminder instructions, identity rules, and safety rules.
7
+ *
8
+ * Resolution order:
9
+ * 1. matchesModel() matchers (most specific)
10
+ * 2. familyPrefixes prefix matching
11
+ * 3. Falls back to the default resolver (last registered)
12
+ */
13
+ import type { ChatMode } from "../chat-modes.js";
14
+ export interface ModelEndpoint {
15
+ model: string;
16
+ baseUrl: string;
17
+ }
18
+ export interface IAgentPrompt {
19
+ name: string;
20
+ familyPrefixes: string[];
21
+ matchesModel?(endpoint: ModelEndpoint): boolean;
22
+ resolveSystemPrompt(mode: ChatMode, endpoint: ModelEndpoint): string;
23
+ resolveReminderInstructions?(mode: ChatMode, endpoint: ModelEndpoint): string | null;
24
+ resolveIdentityRules?(endpoint: ModelEndpoint): string | null;
25
+ resolveSafetyRules?(endpoint: ModelEndpoint): string | null;
26
+ }
27
+ export declare const DEFAULT_IDENTITY = "Your name is Jait \u2014 Just Another Intelligent Tool. You are an AI coding assistant.";
28
+ export declare const DEFAULT_SAFETY = "Follow the user's requirements carefully & to the letter.\nIf you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with \"Sorry, I can't assist with that.\"\nAvoid content that violates copyrights.";
29
+ export declare const DEFAULT_REMINDER = "[REMINDER] Send a brief progress update to the user before your next tool calls. If you have a todo list, update it now. Keep going until the task is fully resolved.";
30
+ declare class PromptRegistry {
31
+ private resolvers;
32
+ register(resolver: IAgentPrompt): void;
33
+ resolve(endpoint: ModelEndpoint): IAgentPrompt;
34
+ listResolvers(): string[];
35
+ }
36
+ export declare const promptRegistry: PromptRegistry;
37
+ export interface PromptContext {
38
+ /** The resolved workspace root for the current session (if any) */
39
+ workspaceRoot?: string;
40
+ }
41
+ export declare function buildSystemPrompt(mode: ChatMode, endpoint: ModelEndpoint, ctx?: PromptContext): string;
42
+ export declare function getReminderInstructions(mode: ChatMode, endpoint: ModelEndpoint): string | null;
43
+ export {};
44
+ //# sourceMappingURL=prompt-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-registry.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/prompt-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,YAAY,CAAC,CAAC,QAAQ,EAAE,aAAa,GAAG,OAAO,CAAC;IAChD,mBAAmB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,MAAM,CAAC;IACrE,2BAA2B,CAAC,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;IACrF,oBAAoB,CAAC,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;IAC9D,kBAAkB,CAAC,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAAC;CAC7D;AAID,eAAO,MAAM,gBAAgB,4FAAuF,CAAC;AAErH,eAAO,MAAM,cAAc,gQAEa,CAAC;AAEzC,eAAO,MAAM,gBAAgB,0KAA0K,CAAC;AAIxM,cAAM,cAAc;IAClB,OAAO,CAAC,SAAS,CAAsB;IAEvC,QAAQ,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAItC,OAAO,CAAC,QAAQ,EAAE,aAAa,GAAG,YAAY;IAgB9C,aAAa,IAAI,MAAM,EAAE;CAG1B;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC;AAInD,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,aAAa,GAAG,MAAM,CActG;AAED,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI,CAG9F"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Prompt Registry — per-model prompt resolution for Jait.
3
+ *
4
+ * Modelled after VS Code Copilot Chat's PromptRegistry pattern.
5
+ * Each model family registers a resolver with model-specific system
6
+ * prompts, reminder instructions, identity rules, and safety rules.
7
+ *
8
+ * Resolution order:
9
+ * 1. matchesModel() matchers (most specific)
10
+ * 2. familyPrefixes prefix matching
11
+ * 3. Falls back to the default resolver (last registered)
12
+ */
13
+ // ── Default fragments ────────────────────────────────────────────────
14
+ export const DEFAULT_IDENTITY = `Your name is Jait — Just Another Intelligent Tool. You are an AI coding assistant.`;
15
+ export const DEFAULT_SAFETY = `Follow the user's requirements carefully & to the letter.
16
+ If you are asked to generate content that is harmful, hateful, racist, sexist, lewd, or violent, only respond with "Sorry, I can't assist with that."
17
+ Avoid content that violates copyrights.`;
18
+ export const DEFAULT_REMINDER = `[REMINDER] Send a brief progress update to the user before your next tool calls. If you have a todo list, update it now. Keep going until the task is fully resolved.`;
19
+ // ── Registry singleton ───────────────────────────────────────────────
20
+ class PromptRegistry {
21
+ resolvers = [];
22
+ register(resolver) {
23
+ this.resolvers.unshift(resolver);
24
+ }
25
+ resolve(endpoint) {
26
+ const modelLower = endpoint.model.toLowerCase();
27
+ for (const r of this.resolvers) {
28
+ if (r.matchesModel?.(endpoint))
29
+ return r;
30
+ }
31
+ for (const r of this.resolvers) {
32
+ for (const prefix of r.familyPrefixes) {
33
+ if (modelLower.startsWith(prefix.toLowerCase()))
34
+ return r;
35
+ }
36
+ }
37
+ return this.resolvers[this.resolvers.length - 1];
38
+ }
39
+ listResolvers() {
40
+ return this.resolvers.map((r) => r.name);
41
+ }
42
+ }
43
+ export const promptRegistry = new PromptRegistry();
44
+ export function buildSystemPrompt(mode, endpoint, ctx) {
45
+ const resolver = promptRegistry.resolve(endpoint);
46
+ const identity = resolver.resolveIdentityRules?.(endpoint) ?? DEFAULT_IDENTITY;
47
+ const safety = resolver.resolveSafetyRules?.(endpoint) ?? DEFAULT_SAFETY;
48
+ const systemPrompt = resolver.resolveSystemPrompt(mode, endpoint);
49
+ let prompt = `${identity}\n\n${safety}\n\n${systemPrompt}`;
50
+ // Inject workspace context so the agent knows its working directory
51
+ if (ctx?.workspaceRoot) {
52
+ prompt += `\n\n<workspaceContext>\nYou are working in the workspace: ${ctx.workspaceRoot}\nAll relative file paths and searches default to this directory. Use relative paths when possible. Do not search from the drive root — scope operations to this workspace.\n</workspaceContext>`;
53
+ }
54
+ return prompt;
55
+ }
56
+ export function getReminderInstructions(mode, endpoint) {
57
+ const resolver = promptRegistry.resolve(endpoint);
58
+ return resolver.resolveReminderInstructions?.(mode, endpoint) ?? DEFAULT_REMINDER;
59
+ }
60
+ //# sourceMappingURL=prompt-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompt-registry.js","sourceRoot":"","sources":["../../../src/tools/prompts/prompt-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAqBH,wEAAwE;AAExE,MAAM,CAAC,MAAM,gBAAgB,GAAG,oFAAoF,CAAC;AAErH,MAAM,CAAC,MAAM,cAAc,GAAG;;wCAEU,CAAC;AAEzC,MAAM,CAAC,MAAM,gBAAgB,GAAG,uKAAuK,CAAC;AAExM,wEAAwE;AAExE,MAAM,cAAc;IACV,SAAS,GAAmB,EAAE,CAAC;IAEvC,QAAQ,CAAC,QAAsB;QAC7B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACnC,CAAC;IAED,OAAO,CAAC,QAAuB;QAC7B,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAEhD,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/B,IAAI,CAAC,CAAC,YAAY,EAAE,CAAC,QAAQ,CAAC;gBAAE,OAAO,CAAC,CAAC;QAC3C,CAAC;QAED,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;YAC/B,KAAK,MAAM,MAAM,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;gBACtC,IAAI,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;oBAAE,OAAO,CAAC,CAAC;YAC5D,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC;IACpD,CAAC;IAED,aAAa;QACX,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;CACF;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,EAAE,CAAC;AASnD,MAAM,UAAU,iBAAiB,CAAC,IAAc,EAAE,QAAuB,EAAE,GAAmB;IAC5F,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,QAAQ,CAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,IAAI,gBAAgB,CAAC;IAC/E,MAAM,MAAM,GAAG,QAAQ,CAAC,kBAAkB,EAAE,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC;IACzE,MAAM,YAAY,GAAG,QAAQ,CAAC,mBAAmB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAElE,IAAI,MAAM,GAAG,GAAG,QAAQ,OAAO,MAAM,OAAO,YAAY,EAAE,CAAC;IAE3D,oEAAoE;IACpE,IAAI,GAAG,EAAE,aAAa,EAAE,CAAC;QACvB,MAAM,IAAI,6DAA6D,GAAG,CAAC,aAAa,kMAAkM,CAAC;IAC7R,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,IAAc,EAAE,QAAuB;IAC7E,MAAM,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClD,OAAO,QAAQ,CAAC,2BAA2B,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,gBAAgB,CAAC;AACpF,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Shared prompt sections used by all or most model-specific prompts.
3
+ *
4
+ * Adapted from VS Code Copilot Chat — tool names replaced with Jait
5
+ * equivalents, VS Code–specific features (notebooks, devcontainers,
6
+ * file-linkification) removed.
7
+ */
8
+ import type { ChatMode } from "../chat-modes.js";
9
+ export declare const JAIT_TOOLS: {
10
+ readonly read: "read";
11
+ readonly edit: "edit";
12
+ readonly execute: "execute";
13
+ readonly search: "search";
14
+ readonly web: "web";
15
+ readonly agent: "agent";
16
+ readonly todo: "todo";
17
+ readonly jait: "jait";
18
+ };
19
+ export declare const CORE_INSTRUCTIONS = "You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks and software engineering tasks \u2014 this encompasses debugging issues, implementing new features, restructuring code, and providing code explanations, among other engineering activities.\nThe user will ask a question, or ask you to perform a task, and it may require lots of research to answer correctly. There is a selection of tools that let you perform actions or retrieve helpful context to answer the user's question.\nBy default, implement changes rather than only suggesting them. If the user's intent is unclear, infer the most useful likely action and proceed with using tools to discover any missing details instead of guessing. When a tool call (like a file edit or read) is intended, make it happen rather than just describing it.\nYou can call tools repeatedly to take actions or gather as much context as needed until you have completed the task fully. Don't give up unless you are sure the request cannot be fulfilled with the tools you have. It's YOUR RESPONSIBILITY to make sure that you have done all you can to collect necessary context.\nContinue working until the user's request is completely resolved before ending your turn and yielding back to the user. Only terminate your turn when you are certain the task is complete. Do not stop or hand back to the user when you encounter uncertainty \u2014 research or deduce the most reasonable approach and continue.";
20
+ export declare const TOOL_USE_INSTRUCTIONS = "If the user is requesting a code sample, you can answer it directly without using any tools.\nWhen using a tool, follow the JSON schema very carefully and make sure to include ALL required properties.\nNo need to ask permission before using a tool.\nNEVER say the name of a tool to a user. For example, instead of saying that you'll use the execute tool, say \"I'll run the command in a terminal\".\nIf you think running multiple tools can answer the user's question, prefer calling them in parallel whenever possible.\nWhen using the read tool, prefer reading a large section over calling the read tool many times in sequence. You can also think of all the pieces you may be interested in and read them in parallel. Read large enough context to ensure you get what you need.\nDon't call the execute tool multiple times in parallel. Instead, run one command and wait for the output before running the next command.\nWhen creating files, be intentional and avoid unnecessary file creation. Only create files that are essential to completing the user's request.\nNEVER try to edit a file by running terminal commands unless the user specifically asks for it.";
21
+ export declare const EDITING_INSTRUCTIONS = "Before you edit an existing file, make sure you have read it first so that you can make proper changes.\nUse the edit tool to modify files precisely. Pay attention to surrounding context to ensure your changes are correct.\nWhen editing files, group your changes by file.\nNEVER show the changes to the user in a codeblock when you can use the edit tool instead.\nFor each file, give a short description of what needs to be changed, then use the edit tool.";
22
+ export declare const SEARCH_INSTRUCTIONS = "For codebase exploration, prefer the agent tool to search and gather data across files.\nWhen using the search tool, prefer searching for specific patterns or identifiers.\nIf you don't know exactly what you're looking for, use broader search terms and refine.";
23
+ export declare const TODO_INSTRUCTIONS = "You have access to the todo tool which tracks steps and progress. Using it helps demonstrate that you've understood the task and convey how you're approaching it.\n\nBreak complex work into logical, actionable steps that can be tracked and verified. Update task status consistently:\n- Mark tasks as in-progress when you begin working on them\n- Mark tasks as completed immediately after finishing each one \u2014 do not batch completions\n\nTask tracking is valuable for:\n- Multi-step work requiring careful sequencing\n- Breaking down ambiguous or complex requests\n- Maintaining checkpoints for feedback and validation\n- When users provide multiple requests or numbered tasks\n\nSkip task tracking for simple, single-step operations that can be completed directly without additional planning.";
24
+ export declare const PLANNING_EXAMPLES = "### Examples\n\n**High-quality plans**\n\nExample 1:\n1. Add CLI entry with file args\n2. Parse Markdown via CommonMark library\n3. Apply semantic HTML template\n4. Handle code blocks, images, links\n5. Add error handling for invalid files\n\nExample 2:\n1. Define CSS variables for colors\n2. Add toggle with localStorage state\n3. Refactor components to use variables\n4. Verify all views for readability\n5. Add smooth theme-change transition\n\nExample 3:\n1. Set up Node.js + WebSocket server\n2. Add join/leave broadcast events\n3. Implement messaging with timestamps\n4. Add usernames + mention highlighting\n5. Persist messages in lightweight DB\n6. Add typing indicators + unread count\n\n**Low-quality plans**\n\nExample 1:\n1. Create CLI tool\n2. Add Markdown parser\n3. Convert to HTML\n\nExample 2:\n1. Add dark mode toggle\n2. Save preference\n3. Make styles look good\n\nIf you need to write a plan, only write high quality plans, not low quality ones.";
25
+ export declare function getAskModeInstructions(): string;
26
+ export declare function getPlanModeInstructions(): string;
27
+ export declare function getModeInstructions(mode: ChatMode): string;
28
+ //# sourceMappingURL=shared-sections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared-sections.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/shared-sections.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,eAAO,MAAM,UAAU;;;;;;;;;CASb,CAAC;AAIX,eAAO,MAAM,iBAAiB,0/CAIkS,CAAC;AAEjU,eAAO,MAAM,qBAAqB,yoCAQ8D,CAAC;AAEjG,eAAO,MAAM,oBAAoB,6cAI4D,CAAC;AAE9F,eAAO,MAAM,mBAAmB,yQAEwD,CAAC;AAEzF,eAAO,MAAM,iBAAiB,kyBAYoF,CAAC;AAEnH,eAAO,MAAM,iBAAiB,48BAsCoD,CAAC;AAInF,wBAAgB,sBAAsB,IAAI,MAAM,CAE/C;AAED,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM,CAS1D"}