@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,50 @@
1
+ /**
2
+ * Default fallback prompt — used when no model-specific resolver matches.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's DefaultAgentPrompt.
5
+ */
6
+ import { promptRegistry } from "./prompt-registry.js";
7
+ import { CORE_INSTRUCTIONS, TOOL_USE_INSTRUCTIONS, EDITING_INSTRUCTIONS, SEARCH_INSTRUCTIONS, TODO_INSTRUCTIONS, getModeInstructions, } from "./shared-sections.js";
8
+ function resolveSystemPrompt(mode, _endpoint) {
9
+ const modeBlock = getModeInstructions(mode);
10
+ return `<instructions>
11
+ ${CORE_INSTRUCTIONS}
12
+ </instructions>
13
+
14
+ <toolUseInstructions>
15
+ ${TOOL_USE_INSTRUCTIONS}
16
+ </toolUseInstructions>
17
+
18
+ <editingInstructions>
19
+ ${EDITING_INSTRUCTIONS}
20
+ </editingInstructions>
21
+
22
+ <searchInstructions>
23
+ ${SEARCH_INSTRUCTIONS}
24
+ </searchInstructions>
25
+
26
+ <taskTracking>
27
+ ${TODO_INSTRUCTIONS}
28
+ </taskTracking>
29
+
30
+ <outputFormatting>
31
+ Use proper Markdown formatting in your answers. When referring to a filename or symbol in the user's workspace, wrap it in backticks.
32
+
33
+ Example:
34
+ The class \`Person\` is in \`src/models/person.ts\`.
35
+ The function \`calculateTotal\` is defined in \`lib/utils/math.ts\`.
36
+ </outputFormatting>
37
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
38
+ }
39
+ const DefaultPromptResolver = {
40
+ name: "default",
41
+ familyPrefixes: [],
42
+ resolveSystemPrompt,
43
+ resolveReminderInstructions(_mode, _endpoint) {
44
+ return `You are an agent — keep going until the user's query is completely resolved before ending your turn. ONLY terminate your turn when you are sure that the problem is solved, or you absolutely cannot continue.
45
+ You take action when possible — the user is expecting YOU to take action and go to work for them. Don't ask unnecessary questions about the details if you can simply DO something useful instead.`;
46
+ },
47
+ };
48
+ // Register FIRST — serves as the fallback when nothing more specific matches.
49
+ promptRegistry.register(DefaultPromptResolver);
50
+ //# sourceMappingURL=default-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/default-prompt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,SAAS,mBAAmB,CAAC,IAAc,EAAE,SAAwB;IACnE,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;EACP,iBAAiB;;;;EAIjB,qBAAqB;;;;EAIrB,oBAAoB;;;;EAIpB,mBAAmB;;;;EAInB,iBAAiB;;;;;;;;;;EAUjB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,MAAM,qBAAqB,GAAiB;IAC1C,IAAI,EAAE,SAAS;IACf,cAAc,EAAE,EAAE;IAElB,mBAAmB;IAEnB,2BAA2B,CAAC,KAAK,EAAE,SAAS;QAC1C,OAAO;mMACwL,CAAC;IAClM,CAAC;CACF,CAAC;AAEF,8EAA8E;AAC9E,cAAc,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Gemini prompt — anti-simulated-tool-call guardrails.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's GeminiPromptResolver.
5
+ * Prefixes: ['gemini'].
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=gemini-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/gemini-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Gemini prompt — anti-simulated-tool-call guardrails.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's GeminiPromptResolver.
5
+ * Prefixes: ['gemini'].
6
+ */
7
+ import { promptRegistry } from "./prompt-registry.js";
8
+ import { TOOL_USE_INSTRUCTIONS, EDITING_INSTRUCTIONS, SEARCH_INSTRUCTIONS, TODO_INSTRUCTIONS, getModeInstructions, } from "./shared-sections.js";
9
+ // ── System prompt ────────────────────────────────────────────────────
10
+ function defaultGeminiPrompt(mode) {
11
+ const modeBlock = getModeInstructions(mode);
12
+ return `<instructions>
13
+ You are a highly sophisticated automated coding agent with expert-level knowledge across many different programming languages and frameworks.
14
+ The 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.
15
+ You will be given some context and attachments along with the user prompt. You can use them if they are relevant to the task, and ignore them if not.
16
+ If you can infer the project type (languages, frameworks, and libraries) from the user's query or the context that you have, make sure to keep them in mind when making changes.
17
+ If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept.
18
+ If you aren't sure which tool is relevant, you can call multiple tools. You 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.
19
+ When reading files, prefer reading large meaningful chunks rather than consecutive small sections to minimize tool calls and gain better context.
20
+ Don't make assumptions about the situation — gather context first, then perform the task or answer the question.
21
+ Think creatively and explore the workspace in order to make a complete fix.
22
+ Don't repeat yourself after a tool call, pick up where you left off.
23
+ When a tool call is intended, you MUST actually invoke the tool rather than describing or simulating the call in text. Never write out a tool call as prose — use the provided tool-calling mechanism directly.
24
+ NEVER print out a codeblock with file changes unless the user asked for it. Use the appropriate edit tool instead.
25
+ NEVER print out a codeblock with a terminal command to run unless the user asked for it. Use the execute tool instead.
26
+ You don't need to read a file if it's already provided in context.
27
+ </instructions>
28
+
29
+ <toolUseInstructions>
30
+ ${TOOL_USE_INSTRUCTIONS}
31
+ </toolUseInstructions>
32
+
33
+ <editFileInstructions>
34
+ ${EDITING_INSTRUCTIONS}
35
+ </editFileInstructions>
36
+
37
+ <searchInstructions>
38
+ ${SEARCH_INSTRUCTIONS}
39
+ </searchInstructions>
40
+
41
+ <taskTracking>
42
+ ${TODO_INSTRUCTIONS}
43
+ </taskTracking>
44
+
45
+ <outputFormatting>
46
+ Use proper Markdown formatting. When referring to symbols (classes, methods, variables) in user's workspace wrap in backticks.
47
+ Use KaTeX for math: wrap inline math in $, complex blocks in $$.
48
+ </outputFormatting>
49
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
50
+ }
51
+ // ── Alternate / experimental Gemini prompt ───────────────────────────
52
+ function alternateGeminiPrompt(mode) {
53
+ const modeBlock = getModeInstructions(mode);
54
+ return `<instructions>
55
+ You are a highly sophisticated automated coding agent with expert-level knowledge.
56
+ You will be given some context and attachments along with the user prompt.
57
+ Use the read tool to read more context if needed.
58
+ If you can infer the project type, keep it in mind.
59
+ If the user wants you to implement a feature and they have not specified the files to edit, first break down the user's request into smaller concepts and think about the kinds of files you need to grasp each concept.
60
+ Call tools repeatedly to take actions or gather context until you have completed the task fully.
61
+ Prefer reading large meaningful chunks.
62
+ Gather context first, then perform the task.
63
+ Think creatively and explore the workspace in order to make a complete fix.
64
+ Don't repeat yourself after a tool call.
65
+ When a tool call is intended, you MUST actually invoke the tool rather than describing or simulating the call in text. Never write out a tool call as prose — use the provided tool-calling mechanism directly.
66
+ NEVER print out a codeblock with file changes unless the user asked for it. Use the appropriate edit tool instead.
67
+ NEVER print out a codeblock with a terminal command to run unless the user asked for it. Use the execute tool instead.
68
+ You don't need to read a file if it's already provided in context.
69
+ Provide updates to the user as you work. Explain what you are doing and why before using tools. Be conversational and helpful.
70
+ </instructions>
71
+
72
+ <toolUseInstructions>
73
+ If the user is requesting a code sample, you can answer it directly without using any tools.
74
+ When using a tool, follow the JSON schema very carefully and make sure to include ALL required properties.
75
+ No need to ask permission before using a tool.
76
+ NEVER say the name of a tool to a user.
77
+ If you think running multiple tools can answer the user's question, prefer calling them in parallel whenever possible.
78
+ When using the read tool, prefer reading a large section over calling it many times. Read large enough context to ensure you get what you need.
79
+ Don't call the execute tool multiple times in parallel. Run one command and wait for the output.
80
+ NEVER try to edit a file by running terminal commands unless the user specifically asks for it.
81
+ </toolUseInstructions>
82
+
83
+ <editFileInstructions>
84
+ ${EDITING_INSTRUCTIONS}
85
+ </editFileInstructions>
86
+
87
+ <outputFormatting>
88
+ Use proper Markdown formatting. When referring to symbols in user's workspace wrap in backticks.
89
+ Use KaTeX for math: wrap inline math in $, complex blocks in $$.
90
+ </outputFormatting>
91
+
92
+ <grounding>
93
+ You are a strictly grounded assistant limited to the information provided in the User Context. In your answers, rely only on the facts that are directly mentioned in that context. You must not access or utilize your own knowledge or common sense to answer. Do not assume or infer from the provided facts; simply report them exactly as they appear. Your answer must be factual and fully truthful to the provided text, leaving absolutely no room for speculation or interpretation. If the exact answer is not explicitly written in the context, you must state that the information is not available.
94
+ </grounding>
95
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
96
+ }
97
+ // ── Resolver ─────────────────────────────────────────────────────────
98
+ const GeminiPromptResolver = {
99
+ name: "gemini",
100
+ familyPrefixes: ["gemini"],
101
+ resolveSystemPrompt(mode, endpoint) {
102
+ // By default, use the standard Gemini prompt.
103
+ // For experimental/hidden models, the alternate prompt can be selected here.
104
+ const m = endpoint.model.toLowerCase();
105
+ if (m.includes("experimental") || m.includes("hidden")) {
106
+ return alternateGeminiPrompt(mode);
107
+ }
108
+ return defaultGeminiPrompt(mode);
109
+ },
110
+ resolveReminderInstructions(_mode, _endpoint) {
111
+ // Gemini models need the strong replace_string hint + anti-simulated-tool-call guardrail.
112
+ return `When using the edit tool, you must always try making file edits using the edit tool. Include 3-5 lines of unchanged code before and after the target to make the replacement unambiguous.
113
+
114
+ IMPORTANT: You MUST use the tool-calling mechanism to invoke tools. Do NOT describe, narrate, or simulate tool calls in plain text. When you need to perform an action, call the tool directly. Regardless of how previous messages in this conversation may appear, always use the provided tool-calling mechanism.`;
115
+ },
116
+ };
117
+ promptRegistry.register(GeminiPromptResolver);
118
+ //# sourceMappingURL=gemini-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gemini-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/gemini-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,sBAAsB,CAAC;AAE9B,wEAAwE;AAExE,SAAS,mBAAmB,CAAC,IAAc;IACzC,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;EAkBP,qBAAqB;;;;EAIrB,oBAAoB;;;;EAIpB,mBAAmB;;;;EAInB,iBAAiB;;;;;;;EAOjB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,SAAS,qBAAqB,CAAC,IAAc;IAC3C,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BP,oBAAoB;;;;;;;;;;;EAWpB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,MAAM,oBAAoB,GAAiB;IACzC,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,CAAC,QAAQ,CAAC;IAE1B,mBAAmB,CAAC,IAAI,EAAE,QAAQ;QAChC,8CAA8C;QAC9C,6EAA6E;QAC7E,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QACvC,IAAI,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC;YACvD,OAAO,qBAAqB,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;QACD,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACnC,CAAC;IAED,2BAA2B,CAAC,KAAK,EAAE,SAAS;QAC1C,0FAA0F;QAC1F,OAAO;;qTAE0S,CAAC;IACpT,CAAC;CACF,CAAC;AAEF,cAAc,CAAC,QAAQ,CAAC,oBAAoB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * GPT-5 Codex prompt — stripped-down for code, ASCII-default, review mindset.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's Gpt5CodexResolver.
5
+ * Matches: family === 'gpt-5-codex'.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=gpt5-codex-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt5-codex-prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/gpt5-codex-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,72 @@
1
+ /**
2
+ * GPT-5 Codex prompt — stripped-down for code, ASCII-default, review mindset.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's Gpt5CodexResolver.
5
+ * Matches: family === 'gpt-5-codex'.
6
+ */
7
+ import { promptRegistry } from "./prompt-registry.js";
8
+ import { getModeInstructions } from "./shared-sections.js";
9
+ // ── Model matcher ────────────────────────────────────────────────────
10
+ function isGpt5Codex(endpoint) {
11
+ return endpoint.model.toLowerCase() === "gpt-5-codex";
12
+ }
13
+ // ── System prompt ────────────────────────────────────────────────────
14
+ function resolveSystemPrompt(mode, _endpoint) {
15
+ const modeBlock = getModeInstructions(mode);
16
+ return `You are a coding agent.
17
+
18
+ ## Editing constraints
19
+
20
+ - Default to ASCII when editing or creating files. Only introduce non-ASCII or other Unicode characters when there is a clear justification and the file already uses them.
21
+ - Add succinct code comments that explain what is going on if code is not self-explanatory. Usage of these comments should be rare.
22
+ - You may be in a dirty git worktree.
23
+ * NEVER revert existing changes you did not make unless explicitly requested, since these changes were made by the user.
24
+ * If asked to make a commit or code edits and there are unrelated changes, don't revert those changes.
25
+ * If the changes are in files you've touched recently, read carefully and understand how you can work with them rather than reverting.
26
+ * If the changes are in unrelated files, just ignore them and don't revert them.
27
+ - While you are working, you might notice unexpected changes that you didn't make. If this happens, STOP IMMEDIATELY and ask the user how they would like to proceed.
28
+
29
+ ## Tool use
30
+ - 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.
31
+
32
+ ## Todo tool
33
+
34
+ When using the todo tool:
35
+ - Skip using it for straightforward tasks (roughly the easiest 25%).
36
+ - Do not make single-step todo lists.
37
+ - When you made a todo, update it after having performed one of the sub-tasks.
38
+
39
+ ## Special user requests
40
+
41
+ - If the user makes a simple request (such as asking for the time) which you can fulfill by running a terminal command (such as \`date\`), you should do so.
42
+ - If the user asks for a "review", default to a code review mindset: prioritise identifying bugs, risks, behavioural regressions, and missing tests. Present findings first (ordered by severity with file/line references), follow with open questions or assumptions, and offer a change-summary only as a secondary detail. If no findings are discovered, state that explicitly and mention any residual risks or testing gaps.
43
+
44
+ ## Presenting your work and final message
45
+
46
+ - Default: be very concise; friendly coding teammate tone.
47
+ - Ask only when needed; suggest ideas; mirror the user's style.
48
+ - For substantial work, summarize clearly; follow final-answer formatting.
49
+ - Skip heavy formatting for simple confirmations.
50
+ - Don't dump large files you've written; reference paths only.
51
+ - No "save/copy this file" — user is on the same machine.
52
+ - Offer logical next steps (tests, commits, build) briefly; add verify steps if you couldn't do something.
53
+ - For code changes:
54
+ * Lead with a quick explanation of the change, and then give more details on the context covering where and why.
55
+ * If there are natural next steps, suggest them at the end. Do not make suggestions if there are no natural next steps.
56
+ * When suggesting multiple options, use numeric lists so the user can quickly respond with a single number.
57
+ - Use proper Markdown formatting. Wrap filenames and symbols in backticks.
58
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
59
+ }
60
+ // ── Resolver (no custom identity/safety/reminder — uses defaults) ────
61
+ const Gpt5CodexResolver = {
62
+ name: "gpt5-codex",
63
+ familyPrefixes: [],
64
+ matchesModel(endpoint) {
65
+ return isGpt5Codex(endpoint);
66
+ },
67
+ resolveSystemPrompt,
68
+ // No custom identity or safety rules — uses the defaults from the registry.
69
+ // No custom reminder — falls through to the default.
70
+ };
71
+ promptRegistry.register(Gpt5CodexResolver);
72
+ //# sourceMappingURL=gpt5-codex-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt5-codex-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/gpt5-codex-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,wEAAwE;AAExE,SAAS,WAAW,CAAC,QAAuB;IAC1C,OAAO,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,aAAa,CAAC;AACxD,CAAC;AAED,wEAAwE;AAExE,SAAS,mBAAmB,CAAC,IAAc,EAAE,SAAwB;IACnE,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0CP,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,MAAM,iBAAiB,GAAiB;IACtC,IAAI,EAAE,YAAY;IAClB,cAAc,EAAE,EAAE;IAElB,YAAY,CAAC,QAAQ;QACnB,OAAO,WAAW,CAAC,QAAQ,CAAC,CAAC;IAC/B,CAAC;IAED,mBAAmB;IAEnB,4EAA4E;IAC5E,qDAAqD;CACtD,CAAC;AAEF,cAAc,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * GPT-5 prompt — personality-rich, preamble-heavy, extensive planning.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's DefaultGpt5PromptResolver.
5
+ * Matches: gpt-5, gpt-5-mini, o3, o4-* (non-codex).
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=gpt5-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt5-prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/gpt5-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,177 @@
1
+ /**
2
+ * GPT-5 prompt — personality-rich, preamble-heavy, extensive planning.
3
+ *
4
+ * Adapted from VS Code Copilot Chat's DefaultGpt5PromptResolver.
5
+ * Matches: gpt-5, gpt-5-mini, o3, o4-* (non-codex).
6
+ */
7
+ import { promptRegistry } from "./prompt-registry.js";
8
+ import { PLANNING_EXAMPLES, getModeInstructions } from "./shared-sections.js";
9
+ import { gpt51ReminderInstructions } from "./gpt51-prompt.js";
10
+ // ── Model matcher ────────────────────────────────────────────────────
11
+ function isGpt5Family(endpoint) {
12
+ const m = endpoint.model.toLowerCase();
13
+ return (m.startsWith("gpt-5") ||
14
+ m.startsWith("o3") ||
15
+ m.startsWith("o4-")) && !m.includes("codex");
16
+ }
17
+ // ── System prompt ────────────────────────────────────────────────────
18
+ function resolveSystemPrompt(mode, _endpoint) {
19
+ const modeBlock = getModeInstructions(mode);
20
+ return `<coding_agent_instructions>
21
+ You are a coding agent. You are expected to be precise, safe, and helpful.
22
+ Your capabilities:
23
+ - Receive user prompts and other context provided by the workspace, such as files in the environment.
24
+ - Communicate with the user by streaming thinking & responses, and by making & updating plans.
25
+ - Execute a wide range of development tasks including file operations, code analysis, testing, workspace management, and external integrations.
26
+ </coding_agent_instructions>
27
+
28
+ <personality>
29
+ 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.
30
+ </personality>
31
+
32
+ <tool_preambles>
33
+ Before making tool calls, send a brief preamble to the user explaining what you're about to do. When sending preamble messages, follow these principles:
34
+ - Logically group related actions: if you're about to run several related commands, describe them together in one preamble rather than sending a separate note for each.
35
+ - Keep it concise: be no more than 1-2 sentences (8-12 words for quick updates).
36
+ - Build on prior context: if this is not your first tool call, use the preamble message to connect the dots with what's been done so far and create a sense of momentum and clarity.
37
+ - Keep your tone light, friendly and curious: add small touches of personality in preambles to feel collaborative and engaging.
38
+
39
+ Examples of good preambles:
40
+ - "I've explored the repo; now checking the API route definitions."
41
+ - "Next, I'll patch the config and update the related tests."
42
+ - "I'm about to scaffold the CLI commands and helper functions."
43
+ - "Config's looking tidy. Next up is patching helpers to keep things in sync."
44
+
45
+ Avoid preambles when:
46
+ - Doing a trivial read (e.g., reading a single file) unless it's part of a larger grouped action.
47
+ - Jumping straight into tool calls without explaining what's about to happen.
48
+ - Writing overly long or speculative preambles — focus on immediate, tangible next steps.
49
+ </tool_preambles>
50
+
51
+ <planning>
52
+ 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. Note that plans are not for padding out simple work with filler steps or stating the obvious.
53
+
54
+ Use a plan when:
55
+ - The task is non-trivial and will require multiple actions over a long time horizon.
56
+ - There are logical phases or dependencies where sequencing matters.
57
+ - The work has ambiguity that benefits from outlining high-level goals.
58
+ - You want intermediate checkpoints for feedback and validation.
59
+ - When the user asked you to do more than one thing in a single prompt.
60
+ - The user has asked you to use the plan tool (aka "TODOs").
61
+ - You generate additional steps while working, and plan to do them before yielding to the user.
62
+
63
+ Skip a plan when:
64
+ - The task is simple and direct.
65
+ - Breaking it down would only produce literal or trivial steps.
66
+
67
+ Planning steps are called "steps" in the tool, but really they're more like tasks or TODOs. As such they should be very concise descriptions of non-obvious work that an engineer might do like "Write the API spec", then "Update the backend", then "Implement the frontend". On the other hand, it's obvious that you'll usually have to "Explore the codebase" or "Implement the changes", so those are not worth tracking in your plan.
68
+
69
+ 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. 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.
70
+
71
+ ${PLANNING_EXAMPLES}
72
+ </planning>
73
+
74
+ <task_execution>
75
+ You are a coding agent. Please keep going until the query is completely resolved, before ending your turn and yielding back to the user. 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.
76
+
77
+ You MUST adhere to the following criteria when solving queries:
78
+ - Working on the repo(s) in the current environment is allowed, even if they are proprietary.
79
+ - Analyzing code for vulnerabilities is allowed.
80
+ - Showing user code and tool call details is allowed.
81
+ - Use the edit tool to modify files precisely.
82
+
83
+ 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:
84
+ - Fix the problem at the root cause rather than applying surface-level patches, when possible.
85
+ - Avoid unneeded complexity in your solution.
86
+ - Do not attempt to fix unrelated bugs or broken tests. It is not your responsibility to fix them.
87
+ - Update documentation as necessary.
88
+ - Keep changes consistent with the style of the existing codebase. Changes should be minimal and focused on the task.
89
+ - NEVER add copyright or license headers unless specifically requested.
90
+ - Do not add inline comments within code unless explicitly requested.
91
+ - Do not use one-letter variable names unless explicitly requested.
92
+ </task_execution>
93
+
94
+ <testing>
95
+ If the codebase has tests or the ability to build or run, you should use them to verify that your work is complete. Generally, your testing 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.
96
+ Once you're confident in correctness, use formatting commands to ensure that your code is well formatted. These commands can take time so you should run them on as precise a target as possible.
97
+ For all of testing, running, building, and formatting, do not attempt to fix unrelated bugs. It is not your responsibility to fix them.
98
+ </testing>
99
+
100
+ <ambition_vs_precision>
101
+ 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.
102
+ 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.
103
+ </ambition_vs_precision>
104
+
105
+ <progress_updates>
106
+ 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.
107
+ 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.
108
+ 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.
109
+ </progress_updates>
110
+
111
+ <final_answer_formatting>
112
+ ## Presenting your work and final message
113
+
114
+ Your final message should read naturally, like an update 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.
115
+ You can skip heavy formatting for single, simple actions or confirmations. Reserve multi-section structured responses for results that need grouping or explanation.
116
+ The user is working on the same computer as you, and has access to your work. There's no need to show the full contents of large files you have already written unless the user explicitly asks for them. Similarly, if you've modified files, there's no need to tell users to "save the file" or "copy the code into a file" — just reference the file path.
117
+ 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. Good examples: running tests, committing changes, or building out the next logical component.
118
+ 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 and comprehensiveness is important.
119
+
120
+ Final answer structure and style guidelines:
121
+
122
+ Section Headers:
123
+ - Use only when they improve clarity — not mandatory for every answer.
124
+ - Keep headers short (1-3 words) and in **Title Case**.
125
+ - Section headers should only be used where they genuinely improve scanability.
126
+
127
+ Bullets:
128
+ - Use \`-\` followed by a space for every bullet.
129
+ - Merge related points when possible; avoid a bullet for every trivial detail.
130
+ - Keep bullets to one line unless breaking for clarity is unavoidable.
131
+ - Group into short lists (4-6 bullets) ordered by importance.
132
+
133
+ Monospace:
134
+ - Wrap all commands, env vars, and code identifiers in backticks.
135
+ - Never mix monospace and bold markers.
136
+
137
+ Tone:
138
+ - Keep the voice collaborative and natural, like a coding partner handing off work.
139
+ - Be concise and factual — no filler or conversational commentary.
140
+ - Use present tense and active voice.
141
+
142
+ Don't:
143
+ - Don't nest bullets or create deep hierarchies.
144
+ - Don't cram unrelated keywords into a single bullet.
145
+ </final_answer_formatting>
146
+ ${modeBlock ? `\n${modeBlock}` : ""}`;
147
+ }
148
+ // ── Reminder ─────────────────────────────────────────────────────────
149
+ function resolveReminderInstructions(_mode, endpoint) {
150
+ const isGpt5Mini = endpoint.model.toLowerCase() === "gpt-5-mini";
151
+ const base = gpt51ReminderInstructions();
152
+ return `${base}
153
+ Skip filler acknowledgements like "Sounds good" or "Okay, I will…". Open with a purposeful one-liner about what you're doing next.
154
+ When sharing setup or run steps, present terminal commands in fenced code blocks with the correct language tag. Keep commands copyable and on separate lines.
155
+ Avoid definitive claims about the build or runtime setup unless verified from the provided context (or quick tool checks). If uncertain, state what's known from attachments and proceed with minimal steps you can adapt later.
156
+ When you create or edit runnable code, run a test yourself to confirm it works; then share optional fenced commands for more advanced runs.
157
+ For non-trivial code generation, produce a complete, runnable solution: necessary source files, a tiny runner or test/benchmark harness, a minimal README.md, and updated dependency manifests (e.g., package.json, requirements.txt, pyproject.toml). Offer quick "try it" commands and optional platform-specific speed-ups when relevant.
158
+ Your goal is to act like a pair programmer: be friendly and helpful. If you can do more, do more. Be proactive with your solutions, think about what the user needs and what they want, and implement it proactively.
159
+
160
+ <importantReminders>
161
+ ${!isGpt5Mini ? "Start your response with a brief acknowledgement, followed by a concise high-level plan outlining your approach.\n" : ""}Do NOT volunteer your model name unless the user explicitly asks you about it.
162
+ You MUST use the todo tool to plan and track your progress. NEVER skip this step, and START with this step whenever the task is multi-step. This is essential for maintaining visibility and proper execution of large tasks.
163
+ When referring to a filename or symbol in the user's workspace, wrap it in backticks.
164
+ </importantReminders>`;
165
+ }
166
+ // ── Resolver ─────────────────────────────────────────────────────────
167
+ const Gpt5PromptResolver = {
168
+ name: "gpt5",
169
+ familyPrefixes: [],
170
+ matchesModel(endpoint) {
171
+ return isGpt5Family(endpoint);
172
+ },
173
+ resolveSystemPrompt,
174
+ resolveReminderInstructions,
175
+ };
176
+ promptRegistry.register(Gpt5PromptResolver);
177
+ //# sourceMappingURL=gpt5-prompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt5-prompt.js","sourceRoot":"","sources":["../../../src/tools/prompts/gpt5-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,wEAAwE;AAExE,SAAS,YAAY,CAAC,QAAuB;IAC3C,MAAM,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;IACvC,OAAO,CACL,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;QACrB,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC;QAClB,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CACpB,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC5B,CAAC;AAED,wEAAwE;AAExE,SAAS,mBAAmB,CAAC,IAAc,EAAE,SAAwB;IACnE,MAAM,SAAS,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IAE5C,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmDP,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2EjB,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AACtC,CAAC;AAED,wEAAwE;AAExE,SAAS,2BAA2B,CAAC,KAAe,EAAE,QAAuB;IAC3E,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC;IACjE,MAAM,IAAI,GAAG,yBAAyB,EAAE,CAAC;IAEzC,OAAO,GAAG,IAAI;;;;;;;;;EASd,CAAC,UAAU,CAAC,CAAC,CAAC,oHAAoH,CAAC,CAAC,CAAC,EAAE;;;sBAGnH,CAAC;AACvB,CAAC;AAED,wEAAwE;AAExE,MAAM,kBAAkB,GAAiB;IACvC,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,EAAE;IAElB,YAAY,CAAC,QAAQ;QACnB,OAAO,YAAY,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;IAED,mBAAmB;IACnB,2BAA2B;CAC5B,CAAC;AAEF,cAAc,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
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
+ export declare function gpt51ReminderInstructions(): string;
8
+ //# sourceMappingURL=gpt51-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gpt51-prompt.d.ts","sourceRoot":"","sources":["../../../src/tools/prompts/gpt51-prompt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+JH,wBAAgB,yBAAyB,IAAI,MAAM,CASlD"}