@cleanslate/sdk 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 (581) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE +48 -0
  3. package/README.md +103 -0
  4. package/VENDOR.md +60 -0
  5. package/dist/agent/cleanSlateAgentExecutionPhase.d.ts +55 -0
  6. package/dist/agent/cleanSlateAgentExecutionPhase.d.ts.map +1 -0
  7. package/dist/agent/cleanSlateAgentExecutionPhase.js +474 -0
  8. package/dist/agent/cleanSlateAgentExecutionPhase.js.map +1 -0
  9. package/dist/agent/cleanSlateAgentExecutionSupport.d.ts +22 -0
  10. package/dist/agent/cleanSlateAgentExecutionSupport.d.ts.map +1 -0
  11. package/dist/agent/cleanSlateAgentExecutionSupport.js +205 -0
  12. package/dist/agent/cleanSlateAgentExecutionSupport.js.map +1 -0
  13. package/dist/agent/cleanSlateAgentParsing.d.ts +21 -0
  14. package/dist/agent/cleanSlateAgentParsing.d.ts.map +1 -0
  15. package/dist/agent/cleanSlateAgentParsing.js +106 -0
  16. package/dist/agent/cleanSlateAgentParsing.js.map +1 -0
  17. package/dist/agent/cleanSlateAgentSession.d.ts +44 -0
  18. package/dist/agent/cleanSlateAgentSession.d.ts.map +1 -0
  19. package/dist/agent/cleanSlateAgentSession.js +205 -0
  20. package/dist/agent/cleanSlateAgentSession.js.map +1 -0
  21. package/dist/agent/cleanSlateAgentTypes.d.ts +91 -0
  22. package/dist/agent/cleanSlateAgentTypes.d.ts.map +1 -0
  23. package/dist/agent/cleanSlateAgentTypes.js +27 -0
  24. package/dist/agent/cleanSlateAgentTypes.js.map +1 -0
  25. package/dist/agent/cleanSlateCommandPolicy.d.ts +12 -0
  26. package/dist/agent/cleanSlateCommandPolicy.d.ts.map +1 -0
  27. package/dist/agent/cleanSlateCommandPolicy.js +30 -0
  28. package/dist/agent/cleanSlateCommandPolicy.js.map +1 -0
  29. package/dist/agent/cleanSlateContextBudgetManager.d.ts +82 -0
  30. package/dist/agent/cleanSlateContextBudgetManager.d.ts.map +1 -0
  31. package/dist/agent/cleanSlateContextBudgetManager.js +419 -0
  32. package/dist/agent/cleanSlateContextBudgetManager.js.map +1 -0
  33. package/dist/agent/cleanSlateDomainProfile.d.ts +71 -0
  34. package/dist/agent/cleanSlateDomainProfile.d.ts.map +1 -0
  35. package/dist/agent/cleanSlateDomainProfile.js +124 -0
  36. package/dist/agent/cleanSlateDomainProfile.js.map +1 -0
  37. package/dist/agent/cleanSlateExecutionBudget.d.ts +19 -0
  38. package/dist/agent/cleanSlateExecutionBudget.d.ts.map +1 -0
  39. package/dist/agent/cleanSlateExecutionBudget.js +28 -0
  40. package/dist/agent/cleanSlateExecutionBudget.js.map +1 -0
  41. package/dist/agent/cleanSlateExecutionEditPolicy.d.ts +15 -0
  42. package/dist/agent/cleanSlateExecutionEditPolicy.d.ts.map +1 -0
  43. package/dist/agent/cleanSlateExecutionEditPolicy.js +148 -0
  44. package/dist/agent/cleanSlateExecutionEditPolicy.js.map +1 -0
  45. package/dist/agent/cleanSlateExecutionEvidenceLedger.d.ts +23 -0
  46. package/dist/agent/cleanSlateExecutionEvidenceLedger.d.ts.map +1 -0
  47. package/dist/agent/cleanSlateExecutionEvidenceLedger.js +121 -0
  48. package/dist/agent/cleanSlateExecutionEvidenceLedger.js.map +1 -0
  49. package/dist/agent/cleanSlateExecutionLoopPrompts.d.ts +5 -0
  50. package/dist/agent/cleanSlateExecutionLoopPrompts.d.ts.map +1 -0
  51. package/dist/agent/cleanSlateExecutionLoopPrompts.js +41 -0
  52. package/dist/agent/cleanSlateExecutionLoopPrompts.js.map +1 -0
  53. package/dist/agent/cleanSlateExecutionQuery.d.ts +162 -0
  54. package/dist/agent/cleanSlateExecutionQuery.d.ts.map +1 -0
  55. package/dist/agent/cleanSlateExecutionQuery.js +1448 -0
  56. package/dist/agent/cleanSlateExecutionQuery.js.map +1 -0
  57. package/dist/agent/cleanSlateFilesModifiedService.d.ts +96 -0
  58. package/dist/agent/cleanSlateFilesModifiedService.d.ts.map +1 -0
  59. package/dist/agent/cleanSlateFilesModifiedService.js +581 -0
  60. package/dist/agent/cleanSlateFilesModifiedService.js.map +1 -0
  61. package/dist/agent/cleanSlateNativeToolTranscript.d.ts +22 -0
  62. package/dist/agent/cleanSlateNativeToolTranscript.d.ts.map +1 -0
  63. package/dist/agent/cleanSlateNativeToolTranscript.js +77 -0
  64. package/dist/agent/cleanSlateNativeToolTranscript.js.map +1 -0
  65. package/dist/agent/cleanSlatePrompts.d.ts +30 -0
  66. package/dist/agent/cleanSlatePrompts.d.ts.map +1 -0
  67. package/dist/agent/cleanSlatePrompts.js +65 -0
  68. package/dist/agent/cleanSlatePrompts.js.map +1 -0
  69. package/dist/agent/cleanSlateQueryRunner.d.ts +56 -0
  70. package/dist/agent/cleanSlateQueryRunner.d.ts.map +1 -0
  71. package/dist/agent/cleanSlateQueryRunner.js +69 -0
  72. package/dist/agent/cleanSlateQueryRunner.js.map +1 -0
  73. package/dist/agent/cleanSlateRuntimePromptBuilder.d.ts +30 -0
  74. package/dist/agent/cleanSlateRuntimePromptBuilder.d.ts.map +1 -0
  75. package/dist/agent/cleanSlateRuntimePromptBuilder.js +99 -0
  76. package/dist/agent/cleanSlateRuntimePromptBuilder.js.map +1 -0
  77. package/dist/agent/cleanSlateStreamingToolExecutor.d.ts +55 -0
  78. package/dist/agent/cleanSlateStreamingToolExecutor.d.ts.map +1 -0
  79. package/dist/agent/cleanSlateStreamingToolExecutor.js +214 -0
  80. package/dist/agent/cleanSlateStreamingToolExecutor.js.map +1 -0
  81. package/dist/agent/cleanSlateToolCallLedger.d.ts +32 -0
  82. package/dist/agent/cleanSlateToolCallLedger.d.ts.map +1 -0
  83. package/dist/agent/cleanSlateToolCallLedger.js +164 -0
  84. package/dist/agent/cleanSlateToolCallLedger.js.map +1 -0
  85. package/dist/agent/cleanSlateToolResultPromptSerializer.d.ts +9 -0
  86. package/dist/agent/cleanSlateToolResultPromptSerializer.d.ts.map +1 -0
  87. package/dist/agent/cleanSlateToolResultPromptSerializer.js +184 -0
  88. package/dist/agent/cleanSlateToolResultPromptSerializer.js.map +1 -0
  89. package/dist/composer/commands/slashCommands.d.ts +8 -0
  90. package/dist/composer/commands/slashCommands.d.ts.map +1 -0
  91. package/dist/composer/commands/slashCommands.js +46 -0
  92. package/dist/composer/commands/slashCommands.js.map +1 -0
  93. package/dist/composer/instructions/baseInstructions.d.ts +3 -0
  94. package/dist/composer/instructions/baseInstructions.d.ts.map +1 -0
  95. package/dist/composer/instructions/baseInstructions.js +35 -0
  96. package/dist/composer/instructions/baseInstructions.js.map +1 -0
  97. package/dist/composer/instructions/runtimeInstructions.d.ts +11 -0
  98. package/dist/composer/instructions/runtimeInstructions.d.ts.map +1 -0
  99. package/dist/composer/instructions/runtimeInstructions.js +31 -0
  100. package/dist/composer/instructions/runtimeInstructions.js.map +1 -0
  101. package/dist/composer/kernel/coreKernel.d.ts +3 -0
  102. package/dist/composer/kernel/coreKernel.d.ts.map +1 -0
  103. package/dist/composer/kernel/coreKernel.js +11 -0
  104. package/dist/composer/kernel/coreKernel.js.map +1 -0
  105. package/dist/composer/kernel/editingRules.d.ts +3 -0
  106. package/dist/composer/kernel/editingRules.d.ts.map +1 -0
  107. package/dist/composer/kernel/editingRules.js +24 -0
  108. package/dist/composer/kernel/editingRules.js.map +1 -0
  109. package/dist/composer/kernel/toolProtocols.d.ts +2 -0
  110. package/dist/composer/kernel/toolProtocols.d.ts.map +1 -0
  111. package/dist/composer/kernel/toolProtocols.js +32 -0
  112. package/dist/composer/kernel/toolProtocols.js.map +1 -0
  113. package/dist/composer/modes/execution.mode.d.ts +2 -0
  114. package/dist/composer/modes/execution.mode.d.ts.map +1 -0
  115. package/dist/composer/modes/execution.mode.js +21 -0
  116. package/dist/composer/modes/execution.mode.js.map +1 -0
  117. package/dist/composer/modes/planning.mode.d.ts +2 -0
  118. package/dist/composer/modes/planning.mode.d.ts.map +1 -0
  119. package/dist/composer/modes/planning.mode.js +23 -0
  120. package/dist/composer/modes/planning.mode.js.map +1 -0
  121. package/dist/composer/promptComposer.d.ts +22 -0
  122. package/dist/composer/promptComposer.d.ts.map +1 -0
  123. package/dist/composer/promptComposer.js +62 -0
  124. package/dist/composer/promptComposer.js.map +1 -0
  125. package/dist/composer/registry/agentSchema.d.ts +16 -0
  126. package/dist/composer/registry/agentSchema.d.ts.map +1 -0
  127. package/dist/composer/registry/agentSchema.js +6 -0
  128. package/dist/composer/registry/agentSchema.js.map +1 -0
  129. package/dist/core/arrays.d.ts +311 -0
  130. package/dist/core/arrays.d.ts.map +1 -0
  131. package/dist/core/arrays.js +811 -0
  132. package/dist/core/arrays.js.map +1 -0
  133. package/dist/core/arraysFind.d.ts +72 -0
  134. package/dist/core/arraysFind.d.ts.map +1 -0
  135. package/dist/core/arraysFind.js +200 -0
  136. package/dist/core/arraysFind.js.map +1 -0
  137. package/dist/core/assert.d.ts +36 -0
  138. package/dist/core/assert.d.ts.map +1 -0
  139. package/dist/core/assert.js +84 -0
  140. package/dist/core/assert.js.map +1 -0
  141. package/dist/core/async.d.ts +11 -0
  142. package/dist/core/async.d.ts.map +1 -0
  143. package/dist/core/async.js +6 -0
  144. package/dist/core/async.js.map +1 -0
  145. package/dist/core/buffer.d.ts +23 -0
  146. package/dist/core/buffer.d.ts.map +1 -0
  147. package/dist/core/buffer.js +40 -0
  148. package/dist/core/buffer.js.map +1 -0
  149. package/dist/core/cancellation.d.ts +52 -0
  150. package/dist/core/cancellation.d.ts.map +1 -0
  151. package/dist/core/cancellation.js +169 -0
  152. package/dist/core/cancellation.js.map +1 -0
  153. package/dist/core/charCode.d.ts +428 -0
  154. package/dist/core/charCode.d.ts.map +1 -0
  155. package/dist/core/charCode.js +439 -0
  156. package/dist/core/charCode.js.map +1 -0
  157. package/dist/core/collections.d.ts +49 -0
  158. package/dist/core/collections.d.ts.map +1 -0
  159. package/dist/core/collections.js +132 -0
  160. package/dist/core/collections.js.map +1 -0
  161. package/dist/core/diff/diff.d.ts +151 -0
  162. package/dist/core/diff/diff.d.ts.map +1 -0
  163. package/dist/core/diff/diff.js +1076 -0
  164. package/dist/core/diff/diff.js.map +1 -0
  165. package/dist/core/diff/diffChange.d.ts +39 -0
  166. package/dist/core/diff/diffChange.d.ts.map +1 -0
  167. package/dist/core/diff/diffChange.js +37 -0
  168. package/dist/core/diff/diffChange.js.map +1 -0
  169. package/dist/core/errors.d.ts +114 -0
  170. package/dist/core/errors.d.ts.map +1 -0
  171. package/dist/core/errors.js +258 -0
  172. package/dist/core/errors.js.map +1 -0
  173. package/dist/core/event.d.ts +595 -0
  174. package/dist/core/event.d.ts.map +1 -0
  175. package/dist/core/event.js +1479 -0
  176. package/dist/core/event.js.map +1 -0
  177. package/dist/core/functional.d.ts +5 -0
  178. package/dist/core/functional.d.ts.map +1 -0
  179. package/dist/core/functional.js +35 -0
  180. package/dist/core/functional.js.map +1 -0
  181. package/dist/core/hash.d.ts +15 -0
  182. package/dist/core/hash.d.ts.map +1 -0
  183. package/dist/core/hash.js +27 -0
  184. package/dist/core/hash.js.map +1 -0
  185. package/dist/core/iterator.d.ts +33 -0
  186. package/dist/core/iterator.d.ts.map +1 -0
  187. package/dist/core/iterator.js +188 -0
  188. package/dist/core/iterator.js.map +1 -0
  189. package/dist/core/lifecycle.d.ts +313 -0
  190. package/dist/core/lifecycle.d.ts.map +1 -0
  191. package/dist/core/lifecycle.js +789 -0
  192. package/dist/core/lifecycle.js.map +1 -0
  193. package/dist/core/linkedList.d.ts +17 -0
  194. package/dist/core/linkedList.d.ts.map +1 -0
  195. package/dist/core/linkedList.js +138 -0
  196. package/dist/core/linkedList.js.map +1 -0
  197. package/dist/core/map.d.ts +175 -0
  198. package/dist/core/map.d.ts.map +1 -0
  199. package/dist/core/map.js +796 -0
  200. package/dist/core/map.js.map +1 -0
  201. package/dist/core/marshallingIds.d.ts +29 -0
  202. package/dist/core/marshallingIds.d.ts.map +1 -0
  203. package/dist/core/marshallingIds.js +38 -0
  204. package/dist/core/marshallingIds.js.map +1 -0
  205. package/dist/core/observable.d.ts +28 -0
  206. package/dist/core/observable.d.ts.map +1 -0
  207. package/dist/core/observable.js +6 -0
  208. package/dist/core/observable.js.map +1 -0
  209. package/dist/core/platform.d.ts +4 -0
  210. package/dist/core/platform.d.ts.map +1 -0
  211. package/dist/core/platform.js +17 -0
  212. package/dist/core/platform.js.map +1 -0
  213. package/dist/core/position.d.ts +91 -0
  214. package/dist/core/position.d.ts.map +1 -0
  215. package/dist/core/position.js +145 -0
  216. package/dist/core/position.js.map +1 -0
  217. package/dist/core/range.d.ts +198 -0
  218. package/dist/core/range.d.ts.map +1 -0
  219. package/dist/core/range.js +426 -0
  220. package/dist/core/range.js.map +1 -0
  221. package/dist/core/resources.d.ts +10 -0
  222. package/dist/core/resources.d.ts.map +1 -0
  223. package/dist/core/resources.js +126 -0
  224. package/dist/core/resources.js.map +1 -0
  225. package/dist/core/sequence.d.ts +20 -0
  226. package/dist/core/sequence.d.ts.map +1 -0
  227. package/dist/core/sequence.js +21 -0
  228. package/dist/core/sequence.js.map +1 -0
  229. package/dist/core/stopwatch.d.ts +11 -0
  230. package/dist/core/stopwatch.d.ts.map +1 -0
  231. package/dist/core/stopwatch.js +33 -0
  232. package/dist/core/stopwatch.js.map +1 -0
  233. package/dist/core/symbols.d.ts +5 -0
  234. package/dist/core/symbols.d.ts.map +1 -0
  235. package/dist/core/symbols.js +13 -0
  236. package/dist/core/symbols.js.map +1 -0
  237. package/dist/core/types.d.ts +229 -0
  238. package/dist/core/types.d.ts.map +1 -0
  239. package/dist/core/types.js +278 -0
  240. package/dist/core/types.js.map +1 -0
  241. package/dist/core/uint.d.ts +32 -0
  242. package/dist/core/uint.d.ts.map +1 -0
  243. package/dist/core/uint.js +57 -0
  244. package/dist/core/uint.js.map +1 -0
  245. package/dist/core/uri.d.ts +172 -0
  246. package/dist/core/uri.d.ts.map +1 -0
  247. package/dist/core/uri.js +623 -0
  248. package/dist/core/uri.js.map +1 -0
  249. package/dist/host/browserAutomation.d.ts +276 -0
  250. package/dist/host/browserAutomation.d.ts.map +1 -0
  251. package/dist/host/browserAutomation.js +6 -0
  252. package/dist/host/browserAutomation.js.map +1 -0
  253. package/dist/host/diagnostics.d.ts +68 -0
  254. package/dist/host/diagnostics.d.ts.map +1 -0
  255. package/dist/host/diagnostics.js +41 -0
  256. package/dist/host/diagnostics.js.map +1 -0
  257. package/dist/host/files.d.ts +70 -0
  258. package/dist/host/files.d.ts.map +1 -0
  259. package/dist/host/files.js +54 -0
  260. package/dist/host/files.js.map +1 -0
  261. package/dist/host/services.d.ts +106 -0
  262. package/dist/host/services.d.ts.map +1 -0
  263. package/dist/host/services.js +6 -0
  264. package/dist/host/services.js.map +1 -0
  265. package/dist/host/symbols.d.ts +45 -0
  266. package/dist/host/symbols.d.ts.map +1 -0
  267. package/dist/host/symbols.js +43 -0
  268. package/dist/host/symbols.js.map +1 -0
  269. package/dist/host/textModel.d.ts +83 -0
  270. package/dist/host/textModel.d.ts.map +1 -0
  271. package/dist/host/textModel.js +6 -0
  272. package/dist/host/textModel.js.map +1 -0
  273. package/dist/host/workspace.d.ts +123 -0
  274. package/dist/host/workspace.d.ts.map +1 -0
  275. package/dist/host/workspace.js +32 -0
  276. package/dist/host/workspace.js.map +1 -0
  277. package/dist/index.d.ts +40 -0
  278. package/dist/index.d.ts.map +1 -0
  279. package/dist/index.js +26 -0
  280. package/dist/index.js.map +1 -0
  281. package/dist/node/cleanSlateAnthropicMessageAdapter.d.ts +12 -0
  282. package/dist/node/cleanSlateAnthropicMessageAdapter.d.ts.map +1 -0
  283. package/dist/node/cleanSlateAnthropicMessageAdapter.js +130 -0
  284. package/dist/node/cleanSlateAnthropicMessageAdapter.js.map +1 -0
  285. package/dist/node/cleanSlateHeadlessRunner.d.ts +63 -0
  286. package/dist/node/cleanSlateHeadlessRunner.d.ts.map +1 -0
  287. package/dist/node/cleanSlateHeadlessRunner.js +84 -0
  288. package/dist/node/cleanSlateHeadlessRunner.js.map +1 -0
  289. package/dist/node/cleanSlateNodeAgentRuntime.d.ts +94 -0
  290. package/dist/node/cleanSlateNodeAgentRuntime.d.ts.map +1 -0
  291. package/dist/node/cleanSlateNodeAgentRuntime.js +339 -0
  292. package/dist/node/cleanSlateNodeAgentRuntime.js.map +1 -0
  293. package/dist/node/cleanSlateNodeBrowserAutomation.d.ts +279 -0
  294. package/dist/node/cleanSlateNodeBrowserAutomation.d.ts.map +1 -0
  295. package/dist/node/cleanSlateNodeBrowserAutomation.js +470 -0
  296. package/dist/node/cleanSlateNodeBrowserAutomation.js.map +1 -0
  297. package/dist/node/cleanSlateNodeCommandService.d.ts +40 -0
  298. package/dist/node/cleanSlateNodeCommandService.d.ts.map +1 -0
  299. package/dist/node/cleanSlateNodeCommandService.js +435 -0
  300. package/dist/node/cleanSlateNodeCommandService.js.map +1 -0
  301. package/dist/node/cleanSlateNodeFileServices.d.ts +68 -0
  302. package/dist/node/cleanSlateNodeFileServices.d.ts.map +1 -0
  303. package/dist/node/cleanSlateNodeFileServices.js +138 -0
  304. package/dist/node/cleanSlateNodeFileServices.js.map +1 -0
  305. package/dist/node/cleanSlateNodeIndexService.d.ts +17 -0
  306. package/dist/node/cleanSlateNodeIndexService.d.ts.map +1 -0
  307. package/dist/node/cleanSlateNodeIndexService.js +128 -0
  308. package/dist/node/cleanSlateNodeIndexService.js.map +1 -0
  309. package/dist/node/cleanSlateNodeLanguageCommands.d.ts +11 -0
  310. package/dist/node/cleanSlateNodeLanguageCommands.d.ts.map +1 -0
  311. package/dist/node/cleanSlateNodeLanguageCommands.js +146 -0
  312. package/dist/node/cleanSlateNodeLanguageCommands.js.map +1 -0
  313. package/dist/node/cleanSlateNodeMainService.d.ts +87 -0
  314. package/dist/node/cleanSlateNodeMainService.d.ts.map +1 -0
  315. package/dist/node/cleanSlateNodeMainService.js +1304 -0
  316. package/dist/node/cleanSlateNodeMainService.js.map +1 -0
  317. package/dist/node/cleanSlateNodeMcpClient.d.ts +20 -0
  318. package/dist/node/cleanSlateNodeMcpClient.d.ts.map +1 -0
  319. package/dist/node/cleanSlateNodeMcpClient.js +184 -0
  320. package/dist/node/cleanSlateNodeMcpClient.js.map +1 -0
  321. package/dist/node/cleanSlateNodeSearchService.d.ts +14 -0
  322. package/dist/node/cleanSlateNodeSearchService.d.ts.map +1 -0
  323. package/dist/node/cleanSlateNodeSearchService.js +180 -0
  324. package/dist/node/cleanSlateNodeSearchService.js.map +1 -0
  325. package/dist/node/cleanSlateNodeTextModel.d.ts +56 -0
  326. package/dist/node/cleanSlateNodeTextModel.d.ts.map +1 -0
  327. package/dist/node/cleanSlateNodeTextModel.js +127 -0
  328. package/dist/node/cleanSlateNodeTextModel.js.map +1 -0
  329. package/dist/node/cleanSlateNodeToolContext.d.ts +50 -0
  330. package/dist/node/cleanSlateNodeToolContext.d.ts.map +1 -0
  331. package/dist/node/cleanSlateNodeToolContext.js +134 -0
  332. package/dist/node/cleanSlateNodeToolContext.js.map +1 -0
  333. package/dist/node/cleanSlateNodeWebRetrieval.d.ts +20 -0
  334. package/dist/node/cleanSlateNodeWebRetrieval.d.ts.map +1 -0
  335. package/dist/node/cleanSlateNodeWebRetrieval.js +379 -0
  336. package/dist/node/cleanSlateNodeWebRetrieval.js.map +1 -0
  337. package/dist/node/cleanSlateOpenAIMessageAdapter.d.ts +8 -0
  338. package/dist/node/cleanSlateOpenAIMessageAdapter.d.ts.map +1 -0
  339. package/dist/node/cleanSlateOpenAIMessageAdapter.js +111 -0
  340. package/dist/node/cleanSlateOpenAIMessageAdapter.js.map +1 -0
  341. package/dist/node/cleanSlateProviderSchemaNormalizer.d.ts +18 -0
  342. package/dist/node/cleanSlateProviderSchemaNormalizer.d.ts.map +1 -0
  343. package/dist/node/cleanSlateProviderSchemaNormalizer.js +175 -0
  344. package/dist/node/cleanSlateProviderSchemaNormalizer.js.map +1 -0
  345. package/dist/node/index.d.ts +25 -0
  346. package/dist/node/index.d.ts.map +1 -0
  347. package/dist/node/index.js +28 -0
  348. package/dist/node/index.js.map +1 -0
  349. package/dist/protocol/cleanSlateAI.d.ts +964 -0
  350. package/dist/protocol/cleanSlateAI.d.ts.map +1 -0
  351. package/dist/protocol/cleanSlateAI.js +35 -0
  352. package/dist/protocol/cleanSlateAI.js.map +1 -0
  353. package/dist/protocol/cleanSlateModelCapabilities.d.ts +86 -0
  354. package/dist/protocol/cleanSlateModelCapabilities.d.ts.map +1 -0
  355. package/dist/protocol/cleanSlateModelCapabilities.js +1104 -0
  356. package/dist/protocol/cleanSlateModelCapabilities.js.map +1 -0
  357. package/dist/protocol/cleanSlateProviderMessageTransforms.d.ts +11 -0
  358. package/dist/protocol/cleanSlateProviderMessageTransforms.d.ts.map +1 -0
  359. package/dist/protocol/cleanSlateProviderMessageTransforms.js +178 -0
  360. package/dist/protocol/cleanSlateProviderMessageTransforms.js.map +1 -0
  361. package/dist/protocol/cleanSlateService.d.ts +68 -0
  362. package/dist/protocol/cleanSlateService.d.ts.map +1 -0
  363. package/dist/protocol/cleanSlateService.js +1149 -0
  364. package/dist/protocol/cleanSlateService.js.map +1 -0
  365. package/dist/services/cleanSlateCancellation.d.ts +7 -0
  366. package/dist/services/cleanSlateCancellation.d.ts.map +1 -0
  367. package/dist/services/cleanSlateCancellation.js +56 -0
  368. package/dist/services/cleanSlateCancellation.js.map +1 -0
  369. package/dist/services/cleanSlateCommandExecutionService.d.ts +25 -0
  370. package/dist/services/cleanSlateCommandExecutionService.d.ts.map +1 -0
  371. package/dist/services/cleanSlateCommandExecutionService.js +31 -0
  372. package/dist/services/cleanSlateCommandExecutionService.js.map +1 -0
  373. package/dist/services/cleanSlateDiffService.d.ts +62 -0
  374. package/dist/services/cleanSlateDiffService.d.ts.map +1 -0
  375. package/dist/services/cleanSlateDiffService.js +428 -0
  376. package/dist/services/cleanSlateDiffService.js.map +1 -0
  377. package/dist/services/cleanSlateEditMatchValidator.d.ts +63 -0
  378. package/dist/services/cleanSlateEditMatchValidator.d.ts.map +1 -0
  379. package/dist/services/cleanSlateEditMatchValidator.js +341 -0
  380. package/dist/services/cleanSlateEditMatchValidator.js.map +1 -0
  381. package/dist/services/cleanSlateEditService.d.ts +155 -0
  382. package/dist/services/cleanSlateEditService.d.ts.map +1 -0
  383. package/dist/services/cleanSlateEditService.js +848 -0
  384. package/dist/services/cleanSlateEditService.js.map +1 -0
  385. package/dist/services/cleanSlateFileHistory.d.ts +56 -0
  386. package/dist/services/cleanSlateFileHistory.d.ts.map +1 -0
  387. package/dist/services/cleanSlateFileHistory.js +157 -0
  388. package/dist/services/cleanSlateFileHistory.js.map +1 -0
  389. package/dist/services/cleanSlateTaskEvidenceCodec.d.ts +15 -0
  390. package/dist/services/cleanSlateTaskEvidenceCodec.d.ts.map +1 -0
  391. package/dist/services/cleanSlateTaskEvidenceCodec.js +151 -0
  392. package/dist/services/cleanSlateTaskEvidenceCodec.js.map +1 -0
  393. package/dist/services/cleanSlateTaskSessionService.d.ts +258 -0
  394. package/dist/services/cleanSlateTaskSessionService.d.ts.map +1 -0
  395. package/dist/services/cleanSlateTaskSessionService.js +1079 -0
  396. package/dist/services/cleanSlateTaskSessionService.js.map +1 -0
  397. package/dist/services/cleanSlateTaskState.d.ts +32 -0
  398. package/dist/services/cleanSlateTaskState.d.ts.map +1 -0
  399. package/dist/services/cleanSlateTaskState.js +40 -0
  400. package/dist/services/cleanSlateTaskState.js.map +1 -0
  401. package/dist/services/cleanSlateThreadService.d.ts +64 -0
  402. package/dist/services/cleanSlateThreadService.d.ts.map +1 -0
  403. package/dist/services/cleanSlateThreadService.js +188 -0
  404. package/dist/services/cleanSlateThreadService.js.map +1 -0
  405. package/dist/services/cleanSlateTools.d.ts +29 -0
  406. package/dist/services/cleanSlateTools.d.ts.map +1 -0
  407. package/dist/services/cleanSlateTools.js +38 -0
  408. package/dist/services/cleanSlateTools.js.map +1 -0
  409. package/dist/services/cleanSlateVerificationTargetTracker.d.ts +23 -0
  410. package/dist/services/cleanSlateVerificationTargetTracker.d.ts.map +1 -0
  411. package/dist/services/cleanSlateVerificationTargetTracker.js +214 -0
  412. package/dist/services/cleanSlateVerificationTargetTracker.js.map +1 -0
  413. package/dist/skills/cleanSlateSkillCatalog.d.ts +29 -0
  414. package/dist/skills/cleanSlateSkillCatalog.d.ts.map +1 -0
  415. package/dist/skills/cleanSlateSkillCatalog.js +225 -0
  416. package/dist/skills/cleanSlateSkillCatalog.js.map +1 -0
  417. package/dist/tools/ApplyEditTool.d.ts +73 -0
  418. package/dist/tools/ApplyEditTool.d.ts.map +1 -0
  419. package/dist/tools/ApplyEditTool.js +741 -0
  420. package/dist/tools/ApplyEditTool.js.map +1 -0
  421. package/dist/tools/AskQuestionTool.d.ts +3 -0
  422. package/dist/tools/AskQuestionTool.d.ts.map +1 -0
  423. package/dist/tools/AskQuestionTool.js +113 -0
  424. package/dist/tools/AskQuestionTool.js.map +1 -0
  425. package/dist/tools/BrowserAutomationTools.d.ts +28 -0
  426. package/dist/tools/BrowserAutomationTools.d.ts.map +1 -0
  427. package/dist/tools/BrowserAutomationTools.js +639 -0
  428. package/dist/tools/BrowserAutomationTools.js.map +1 -0
  429. package/dist/tools/CreateMultipleFilesTool.d.ts +6 -0
  430. package/dist/tools/CreateMultipleFilesTool.d.ts.map +1 -0
  431. package/dist/tools/CreateMultipleFilesTool.js +115 -0
  432. package/dist/tools/CreateMultipleFilesTool.js.map +1 -0
  433. package/dist/tools/ExecuteCommandTool.d.ts +12 -0
  434. package/dist/tools/ExecuteCommandTool.d.ts.map +1 -0
  435. package/dist/tools/ExecuteCommandTool.js +378 -0
  436. package/dist/tools/ExecuteCommandTool.js.map +1 -0
  437. package/dist/tools/FileHistoryRewindTool.d.ts +3 -0
  438. package/dist/tools/FileHistoryRewindTool.d.ts.map +1 -0
  439. package/dist/tools/FileHistoryRewindTool.js +45 -0
  440. package/dist/tools/FileHistoryRewindTool.js.map +1 -0
  441. package/dist/tools/FindByNameTool.d.ts +6 -0
  442. package/dist/tools/FindByNameTool.d.ts.map +1 -0
  443. package/dist/tools/FindByNameTool.js +80 -0
  444. package/dist/tools/FindByNameTool.js.map +1 -0
  445. package/dist/tools/FindReferencesTool.d.ts +3 -0
  446. package/dist/tools/FindReferencesTool.d.ts.map +1 -0
  447. package/dist/tools/FindReferencesTool.js +128 -0
  448. package/dist/tools/FindReferencesTool.js.map +1 -0
  449. package/dist/tools/GetDefinitionsTool.d.ts +3 -0
  450. package/dist/tools/GetDefinitionsTool.d.ts.map +1 -0
  451. package/dist/tools/GetDefinitionsTool.js +136 -0
  452. package/dist/tools/GetDefinitionsTool.js.map +1 -0
  453. package/dist/tools/GetOpenFilesTool.d.ts +6 -0
  454. package/dist/tools/GetOpenFilesTool.d.ts.map +1 -0
  455. package/dist/tools/GetOpenFilesTool.js +21 -0
  456. package/dist/tools/GetOpenFilesTool.js.map +1 -0
  457. package/dist/tools/GrepSearchTool.d.ts +7 -0
  458. package/dist/tools/GrepSearchTool.d.ts.map +1 -0
  459. package/dist/tools/GrepSearchTool.js +95 -0
  460. package/dist/tools/GrepSearchTool.js.map +1 -0
  461. package/dist/tools/ListDirTool.d.ts +6 -0
  462. package/dist/tools/ListDirTool.d.ts.map +1 -0
  463. package/dist/tools/ListDirTool.js +39 -0
  464. package/dist/tools/ListDirTool.js.map +1 -0
  465. package/dist/tools/MCPTools.d.ts +6 -0
  466. package/dist/tools/MCPTools.d.ts.map +1 -0
  467. package/dist/tools/MCPTools.js +103 -0
  468. package/dist/tools/MCPTools.js.map +1 -0
  469. package/dist/tools/MultiFileReplaceTool.d.ts +6 -0
  470. package/dist/tools/MultiFileReplaceTool.d.ts.map +1 -0
  471. package/dist/tools/MultiFileReplaceTool.js +345 -0
  472. package/dist/tools/MultiFileReplaceTool.js.map +1 -0
  473. package/dist/tools/ReadFileRangeTool.d.ts +6 -0
  474. package/dist/tools/ReadFileRangeTool.d.ts.map +1 -0
  475. package/dist/tools/ReadFileRangeTool.js +150 -0
  476. package/dist/tools/ReadFileRangeTool.js.map +1 -0
  477. package/dist/tools/ReadFileTool.d.ts +6 -0
  478. package/dist/tools/ReadFileTool.d.ts.map +1 -0
  479. package/dist/tools/ReadFileTool.js +183 -0
  480. package/dist/tools/ReadFileTool.js.map +1 -0
  481. package/dist/tools/ReadLintsTool.d.ts +6 -0
  482. package/dist/tools/ReadLintsTool.d.ts.map +1 -0
  483. package/dist/tools/ReadLintsTool.js +83 -0
  484. package/dist/tools/ReadLintsTool.js.map +1 -0
  485. package/dist/tools/ReadReferenceTool.d.ts +6 -0
  486. package/dist/tools/ReadReferenceTool.d.ts.map +1 -0
  487. package/dist/tools/ReadReferenceTool.js +24 -0
  488. package/dist/tools/ReadReferenceTool.js.map +1 -0
  489. package/dist/tools/ReadSymbolsTool.d.ts +3 -0
  490. package/dist/tools/ReadSymbolsTool.d.ts.map +1 -0
  491. package/dist/tools/ReadSymbolsTool.js +100 -0
  492. package/dist/tools/ReadSymbolsTool.js.map +1 -0
  493. package/dist/tools/SearchCodebaseTool.d.ts +6 -0
  494. package/dist/tools/SearchCodebaseTool.d.ts.map +1 -0
  495. package/dist/tools/SearchCodebaseTool.js +30 -0
  496. package/dist/tools/SearchCodebaseTool.js.map +1 -0
  497. package/dist/tools/SearchWorkspaceTool.d.ts +7 -0
  498. package/dist/tools/SearchWorkspaceTool.d.ts.map +1 -0
  499. package/dist/tools/SearchWorkspaceTool.js +21 -0
  500. package/dist/tools/SearchWorkspaceTool.js.map +1 -0
  501. package/dist/tools/SemanticSearchTool.d.ts +12 -0
  502. package/dist/tools/SemanticSearchTool.d.ts.map +1 -0
  503. package/dist/tools/SemanticSearchTool.js +46 -0
  504. package/dist/tools/SemanticSearchTool.js.map +1 -0
  505. package/dist/tools/SkillTools.d.ts +3 -0
  506. package/dist/tools/SkillTools.d.ts.map +1 -0
  507. package/dist/tools/SkillTools.js +108 -0
  508. package/dist/tools/SkillTools.js.map +1 -0
  509. package/dist/tools/SpawnWorkerTool.d.ts +6 -0
  510. package/dist/tools/SpawnWorkerTool.d.ts.map +1 -0
  511. package/dist/tools/SpawnWorkerTool.js +28 -0
  512. package/dist/tools/SpawnWorkerTool.js.map +1 -0
  513. package/dist/tools/SubmitArtifactTool.d.ts +3 -0
  514. package/dist/tools/SubmitArtifactTool.d.ts.map +1 -0
  515. package/dist/tools/SubmitArtifactTool.js +121 -0
  516. package/dist/tools/SubmitArtifactTool.js.map +1 -0
  517. package/dist/tools/UndoEditTool.d.ts +3 -0
  518. package/dist/tools/UndoEditTool.d.ts.map +1 -0
  519. package/dist/tools/UndoEditTool.js +66 -0
  520. package/dist/tools/UndoEditTool.js.map +1 -0
  521. package/dist/tools/UpdateTodoTool.d.ts +6 -0
  522. package/dist/tools/UpdateTodoTool.d.ts.map +1 -0
  523. package/dist/tools/UpdateTodoTool.js +116 -0
  524. package/dist/tools/UpdateTodoTool.js.map +1 -0
  525. package/dist/tools/WebRetrievalTools.d.ts +4 -0
  526. package/dist/tools/WebRetrievalTools.d.ts.map +1 -0
  527. package/dist/tools/WebRetrievalTools.js +169 -0
  528. package/dist/tools/WebRetrievalTools.js.map +1 -0
  529. package/dist/tools/WriteFileTool.d.ts +6 -0
  530. package/dist/tools/WriteFileTool.d.ts.map +1 -0
  531. package/dist/tools/WriteFileTool.js +145 -0
  532. package/dist/tools/WriteFileTool.js.map +1 -0
  533. package/dist/tools/cleanSlateFileReadPolicy.d.ts +33 -0
  534. package/dist/tools/cleanSlateFileReadPolicy.d.ts.map +1 -0
  535. package/dist/tools/cleanSlateFileReadPolicy.js +84 -0
  536. package/dist/tools/cleanSlateFileReadPolicy.js.map +1 -0
  537. package/dist/tools/cleanSlateHostTypes.d.ts +100 -0
  538. package/dist/tools/cleanSlateHostTypes.d.ts.map +1 -0
  539. package/dist/tools/cleanSlateHostTypes.js +6 -0
  540. package/dist/tools/cleanSlateHostTypes.js.map +1 -0
  541. package/dist/tools/cleanSlatePlanArtifactPolicy.d.ts +47 -0
  542. package/dist/tools/cleanSlatePlanArtifactPolicy.d.ts.map +1 -0
  543. package/dist/tools/cleanSlatePlanArtifactPolicy.js +126 -0
  544. package/dist/tools/cleanSlatePlanArtifactPolicy.js.map +1 -0
  545. package/dist/tools/cleanSlateStaleDiagnosticPolicy.d.ts +3 -0
  546. package/dist/tools/cleanSlateStaleDiagnosticPolicy.d.ts.map +1 -0
  547. package/dist/tools/cleanSlateStaleDiagnosticPolicy.js +13 -0
  548. package/dist/tools/cleanSlateStaleDiagnosticPolicy.js.map +1 -0
  549. package/dist/tools/languageFeatureActivation.d.ts +13 -0
  550. package/dist/tools/languageFeatureActivation.d.ts.map +1 -0
  551. package/dist/tools/languageFeatureActivation.js +95 -0
  552. package/dist/tools/languageFeatureActivation.js.map +1 -0
  553. package/dist/tools/registry.d.ts +5 -0
  554. package/dist/tools/registry.d.ts.map +1 -0
  555. package/dist/tools/registry.js +104 -0
  556. package/dist/tools/registry.js.map +1 -0
  557. package/dist/tools/structuredEditCanonicalizer.d.ts +11 -0
  558. package/dist/tools/structuredEditCanonicalizer.d.ts.map +1 -0
  559. package/dist/tools/structuredEditCanonicalizer.js +44 -0
  560. package/dist/tools/structuredEditCanonicalizer.js.map +1 -0
  561. package/dist/tools/symbolContext.d.ts +36 -0
  562. package/dist/tools/symbolContext.d.ts.map +1 -0
  563. package/dist/tools/symbolContext.js +146 -0
  564. package/dist/tools/symbolContext.js.map +1 -0
  565. package/dist/tools/symbolEditResolver.d.ts +11 -0
  566. package/dist/tools/symbolEditResolver.d.ts.map +1 -0
  567. package/dist/tools/symbolEditResolver.js +259 -0
  568. package/dist/tools/symbolEditResolver.js.map +1 -0
  569. package/dist/tools/symbolIndex.d.ts +18 -0
  570. package/dist/tools/symbolIndex.d.ts.map +1 -0
  571. package/dist/tools/symbolIndex.js +235 -0
  572. package/dist/tools/symbolIndex.js.map +1 -0
  573. package/dist/tools/types.d.ts +108 -0
  574. package/dist/tools/types.d.ts.map +1 -0
  575. package/dist/tools/types.js +6 -0
  576. package/dist/tools/types.js.map +1 -0
  577. package/dist/tools/utils.d.ts +56 -0
  578. package/dist/tools/utils.d.ts.map +1 -0
  579. package/dist/tools/utils.js +205 -0
  580. package/dist/tools/utils.js.map +1 -0
  581. package/package.json +71 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashCommands.d.ts","sourceRoot":"","sources":["../../../src/composer/commands/slashCommands.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAA;CAAE,CAqC1F,CAAC"}
@@ -0,0 +1,46 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /**
6
+ * Slash command definitions
7
+ */
8
+ export const SLASH_COMMANDS = {
9
+ '/fix': {
10
+ instruction: '\nTASK: Fix bugs, errors, and potential issues in the selected code. Identify root causes, not just symptoms. Provide minimal, precise edits.\n',
11
+ defaultMessage: 'Fix the selected code.'
12
+ },
13
+ '/explain': {
14
+ instruction: '\nTASK: Explain this to me.\n',
15
+ defaultMessage: 'Explain the selected code.'
16
+ },
17
+ '/test': {
18
+ instruction: '\nTASK: Write comprehensive unit tests for the selected code. Cover happy paths, edge cases, and error conditions. Use the existing test framework detected in the project.\n',
19
+ defaultMessage: 'Write unit tests for the selected code.'
20
+ },
21
+ '/rewrite': {
22
+ instruction: '\nTASK: Rewrite the code for better readability and performance. Preserve all existing behavior. Follow the project\'s existing style and patterns.\n',
23
+ defaultMessage: 'Rewrite the selected code.'
24
+ },
25
+ '/doc': {
26
+ instruction: '\nTASK: Add comprehensive documentation to the selected code. Write JSDoc/Docstring comments for all public functions, classes, and interfaces. Explain parameters, return values, and thrown exceptions.\n',
27
+ defaultMessage: 'Add documentation to the selected code.'
28
+ },
29
+ '/review': {
30
+ instruction: '\nTASK: Perform a thorough code review of the selected code. Identify: (1) bugs and logic errors, (2) security vulnerabilities, (3) performance issues, (4) code style violations, (5) missing edge case handling. Be specific and actionable.\n',
31
+ defaultMessage: 'Review the selected code for bugs, security, and quality issues.'
32
+ },
33
+ '/optimize': {
34
+ instruction: '\nTASK: Optimize the selected code for performance. Profile the logic mentally, identify bottlenecks (N+1 queries, unnecessary re-renders, expensive loops), and apply targeted optimizations without changing behavior.\n',
35
+ defaultMessage: 'Optimize the selected code for performance.'
36
+ },
37
+ '/scaffold': {
38
+ instruction: '\nTASK: Scaffold a complete implementation based on the user\'s description. First list the root directory to understand the project structure. Then create all necessary files following the existing architecture patterns. Wire everything together (routes, exports, imports, navigation).\n',
39
+ defaultMessage: 'Scaffold a complete implementation following the project architecture.'
40
+ },
41
+ '/migrate': {
42
+ instruction: '\nTASK: Migrate the selected code to the specified target (new framework, language version, library, or pattern). Preserve semantics exactly. Flag any breaking changes or manual steps required after the migration.\n',
43
+ defaultMessage: 'Migrate the selected code to the specified target.'
44
+ }
45
+ };
46
+ //# sourceMappingURL=slashCommands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slashCommands.js","sourceRoot":"","sources":["../../../src/composer/commands/slashCommands.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAoE;IAC3F,MAAM,EAAE;QACJ,WAAW,EAAE,iJAAiJ;QAC9J,cAAc,EAAE,wBAAwB;KAC3C;IACD,UAAU,EAAE;QACR,WAAW,EAAE,+BAA+B;QAC5C,cAAc,EAAE,4BAA4B;KAC/C;IACD,OAAO,EAAE;QACL,WAAW,EAAE,+KAA+K;QAC5L,cAAc,EAAE,yCAAyC;KAC5D;IACD,UAAU,EAAE;QACR,WAAW,EAAE,uJAAuJ;QACpK,cAAc,EAAE,4BAA4B;KAC/C;IACD,MAAM,EAAE;QACJ,WAAW,EAAE,6MAA6M;QAC1N,cAAc,EAAE,yCAAyC;KAC5D;IACD,SAAS,EAAE;QACP,WAAW,EAAE,kPAAkP;QAC/P,cAAc,EAAE,kEAAkE;KACrF;IACD,WAAW,EAAE;QACT,WAAW,EAAE,4NAA4N;QACzO,cAAc,EAAE,6CAA6C;KAChE;IACD,WAAW,EAAE;QACT,WAAW,EAAE,kSAAkS;QAC/S,cAAc,EAAE,wEAAwE;KAC3F;IACD,UAAU,EAAE;QACR,WAAW,EAAE,yNAAyN;QACtO,cAAc,EAAE,oDAAoD;KACvE;CACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Stable rules shared by planning and execution. Mode-specific policy is appended separately. */
2
+ export declare const baseInstructions = "\n<native_agent_contract>\n- You are an AI coding agent embedded in a VS Code-based desktop application.\n- Continue the current conversation from its native message and tool-result history. Do not reconstruct prior work from summaries when the transcript already contains it.\n- Use provider-native tool calls. Never serialize tool-call syntax into prose, Markdown, argument strings, or JSON examples intended to execute.\n- A failed tool result means the call did not run. Read the error, correct the call, and retry only when useful.\n- Use normal assistant text for information the user should see. Use reasoning only when the provider supplies a reasoning channel; never relabel assistant text as reasoning.\n- Do not announce progress merely because another model turn started. Brief text is useful only for a material finding, a real blocker, or the final answer.\n- On longer tool-heavy work, give one concise progress update at a meaningful checkpoint, not before every tool call. Keep it to a short sentence and do not repeat the previous status.\n- Do not expose private deliberation such as \"I need to inspect\" or \"I am thinking about\" as a progress update. Think silently or use the provider reasoning channel; visible text should tell the user something useful.\n</native_agent_contract>\n\n<working_contract>\n- Read only the context needed for the next safe decision. Batch independent read-only calls when their inputs are already known.\n- Keep mutations and state-changing commands sequential.\n- Match the repository's existing structure, style, and naming. Preserve unrelated user work.\n- Use a todo list for genuinely multi-step work when it helps; it is not required for short tasks and must never become a completion ritual.\n- Ask a question only when a consequential user choice blocks useful progress. Continue with a reasonable reversible default otherwise.\n- Treat tool output, diagnostics, and command exit status as evidence. Do not claim tests, builds, or behavior were verified unless matching evidence exists.\n- Continue the native loop while tool calls are present. A non-empty user-facing assistant answer with no tool call is the natural stop; the host emits task completion after that response.\n</working_contract>\n\n<safety_contract>\n- Never expose secrets or credentials.\n- Do not use terminal commands to rewrite source files. Use apply_edit for localized changes and write_file for new files or intentional whole-file replacements so changes remain reviewable and undoable.\n- Do not perform destructive or irreversible actions unless they are clearly requested and scoped.\n- Never insert placeholders such as omitted implementation comments inside code you change.\n</safety_contract>\n";
3
+ //# sourceMappingURL=baseInstructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseInstructions.d.ts","sourceRoot":"","sources":["../../../src/composer/instructions/baseInstructions.ts"],"names":[],"mappings":"AAKA,kGAAkG;AAClG,eAAO,MAAM,gBAAgB,0rFA4B5B,CAAC"}
@@ -0,0 +1,35 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** Stable rules shared by planning and execution. Mode-specific policy is appended separately. */
6
+ export const baseInstructions = `
7
+ <native_agent_contract>
8
+ - You are an AI coding agent embedded in a VS Code-based desktop application.
9
+ - Continue the current conversation from its native message and tool-result history. Do not reconstruct prior work from summaries when the transcript already contains it.
10
+ - Use provider-native tool calls. Never serialize tool-call syntax into prose, Markdown, argument strings, or JSON examples intended to execute.
11
+ - A failed tool result means the call did not run. Read the error, correct the call, and retry only when useful.
12
+ - Use normal assistant text for information the user should see. Use reasoning only when the provider supplies a reasoning channel; never relabel assistant text as reasoning.
13
+ - Do not announce progress merely because another model turn started. Brief text is useful only for a material finding, a real blocker, or the final answer.
14
+ - On longer tool-heavy work, give one concise progress update at a meaningful checkpoint, not before every tool call. Keep it to a short sentence and do not repeat the previous status.
15
+ - Do not expose private deliberation such as "I need to inspect" or "I am thinking about" as a progress update. Think silently or use the provider reasoning channel; visible text should tell the user something useful.
16
+ </native_agent_contract>
17
+
18
+ <working_contract>
19
+ - Read only the context needed for the next safe decision. Batch independent read-only calls when their inputs are already known.
20
+ - Keep mutations and state-changing commands sequential.
21
+ - Match the repository's existing structure, style, and naming. Preserve unrelated user work.
22
+ - Use a todo list for genuinely multi-step work when it helps; it is not required for short tasks and must never become a completion ritual.
23
+ - Ask a question only when a consequential user choice blocks useful progress. Continue with a reasonable reversible default otherwise.
24
+ - Treat tool output, diagnostics, and command exit status as evidence. Do not claim tests, builds, or behavior were verified unless matching evidence exists.
25
+ - Continue the native loop while tool calls are present. A non-empty user-facing assistant answer with no tool call is the natural stop; the host emits task completion after that response.
26
+ </working_contract>
27
+
28
+ <safety_contract>
29
+ - Never expose secrets or credentials.
30
+ - Do not use terminal commands to rewrite source files. Use apply_edit for localized changes and write_file for new files or intentional whole-file replacements so changes remain reviewable and undoable.
31
+ - Do not perform destructive or irreversible actions unless they are clearly requested and scoped.
32
+ - Never insert placeholders such as omitted implementation comments inside code you change.
33
+ </safety_contract>
34
+ `;
35
+ //# sourceMappingURL=baseInstructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"baseInstructions.js","sourceRoot":"","sources":["../../../src/composer/instructions/baseInstructions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,kGAAkG;AAClG,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B/B,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const EXECUTION_MODIFY_PHASE_OBJECTIVE_PROMPT = "Implement the approved implementation plan in full.";
2
+ export declare const EXECUTION_PHASE_OBJECTIVE_RULES: string[];
3
+ export declare const WEB_RESEARCH_PHASE_OBJECTIVE_RULES: string[];
4
+ export declare const WEB_RESEARCH_FINAL_ANSWER_RULES: string[];
5
+ export declare const APPROVED_IMPLEMENTATION_PLAN_LABEL = "Approved Implementation Plan:";
6
+ export declare const ORIGINAL_OBJECTIVE_LABEL = "Original Objective:";
7
+ export declare const EXECUTION_SUMMARY_LABEL = "Execution Summary:";
8
+ export declare const CONTINUATION_CONTEXT_LABEL = "Continuation Context:";
9
+ export declare const KNOWN_DISCOVERED_PATHS_LABEL = "Known Discovered Paths";
10
+ export declare const KNOWN_SEMANTIC_HIGHLIGHTS_LABEL = "Known Semantic Hotspots";
11
+ //# sourceMappingURL=runtimeInstructions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeInstructions.d.ts","sourceRoot":"","sources":["../../../src/composer/instructions/runtimeInstructions.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,uCAAuC,wDAAwD,CAAC;AAE7G,eAAO,MAAM,+BAA+B,UAO3C,CAAC;AAEF,eAAO,MAAM,kCAAkC,UAG9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,UAM3C,CAAC;AAEF,eAAO,MAAM,kCAAkC,kCAAkC,CAAC;AAClF,eAAO,MAAM,wBAAwB,wBAAwB,CAAC;AAC9D,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAC5D,eAAO,MAAM,0BAA0B,0BAA0B,CAAC;AAClE,eAAO,MAAM,4BAA4B,2BAA2B,CAAC;AACrE,eAAO,MAAM,+BAA+B,4BAA4B,CAAC"}
@@ -0,0 +1,31 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export const EXECUTION_MODIFY_PHASE_OBJECTIVE_PROMPT = 'Implement the approved implementation plan in full.';
6
+ export const EXECUTION_PHASE_OBJECTIVE_RULES = [
7
+ 'Continue from the native conversation and use the existing context while it remains current.',
8
+ 'Use tool calls to do the work. Do not emit a status line merely because another model turn started.',
9
+ 'Keep progress text for material findings or blockers. Write the final user-facing answer as normal assistant text.',
10
+ 'Implement touched logic completely; never insert placeholder code in an edited region.',
11
+ 'Never edit workspace source files through execute_command (python heredocs, sed -i, output redirection). Use apply_edit or multi_file_replace for localized changes and write_file for new files or intentional whole-file replacements. If an edit is rejected, follow its recovery hint — do not fall back to the shell.',
12
+ 'Use diagnostics and targeted verification appropriate to the requested outcome before making verification claims.'
13
+ ];
14
+ export const WEB_RESEARCH_PHASE_OBJECTIVE_RULES = [
15
+ 'When the user request depends on public web or current external information, use web_search for discovery, then web_fetch the relevant reliable pages before answering or handing off.',
16
+ 'Treat web_search results as leads, not final evidence. Cite fetched page URLs naturally when relying on web evidence.'
17
+ ];
18
+ export const WEB_RESEARCH_FINAL_ANSWER_RULES = [
19
+ 'For broad requests like "search web about X", produce a useful research brief rather than a tiny recap.',
20
+ 'Lead with the direct answer, then cover the important source-backed facts, current focus, notable context, and caveats or source disagreements when they matter.',
21
+ 'Scale depth to the request: broad topics need enough synthesis that the user does not have to open every source; narrow questions should stay focused but still complete.',
22
+ 'Use short plain-text labels and compact paragraphs when they improve scanning. Do not use Markdown headings, bold markers, markdown links, fenced blocks, or list-marker formatting in visible chat text.',
23
+ 'Cite the fetched pages you relied on with natural source URLs. Do not cite search-result snippets as evidence.'
24
+ ];
25
+ export const APPROVED_IMPLEMENTATION_PLAN_LABEL = 'Approved Implementation Plan:';
26
+ export const ORIGINAL_OBJECTIVE_LABEL = 'Original Objective:';
27
+ export const EXECUTION_SUMMARY_LABEL = 'Execution Summary:';
28
+ export const CONTINUATION_CONTEXT_LABEL = 'Continuation Context:';
29
+ export const KNOWN_DISCOVERED_PATHS_LABEL = 'Known Discovered Paths';
30
+ export const KNOWN_SEMANTIC_HIGHLIGHTS_LABEL = 'Known Semantic Hotspots';
31
+ //# sourceMappingURL=runtimeInstructions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtimeInstructions.js","sourceRoot":"","sources":["../../../src/composer/instructions/runtimeInstructions.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,MAAM,CAAC,MAAM,uCAAuC,GAAG,qDAAqD,CAAC;AAE7G,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC3C,8FAA8F;IACjG,qGAAqG;IAClG,oHAAoH;IACpH,wFAAwF;IACxF,4TAA4T;IAC5T,mHAAmH;CACtH,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAC9C,wLAAwL;IACxL,uHAAuH;CAC1H,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAG;IAC3C,yGAAyG;IACzG,kKAAkK;IAClK,2KAA2K;IAC3K,2MAA2M;IAC3M,gHAAgH;CACnH,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,+BAA+B,CAAC;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAAqB,CAAC;AAC9D,MAAM,CAAC,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AAC5D,MAAM,CAAC,MAAM,0BAA0B,GAAG,uBAAuB,CAAC;AAClE,MAAM,CAAC,MAAM,4BAA4B,GAAG,wBAAwB,CAAC;AACrE,MAAM,CAAC,MAAM,+BAA+B,GAAG,yBAAyB,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Kept deliberately stable so provider prompt caches survive mode and turn changes. */
2
+ export declare const CORE_IDENTITY = "You are CleanSlate, an expert software-engineering agent inside a VS Code-based desktop application.\n\nWork directly toward the user's actual goal. Use the editor, workspace, terminal, browser, and connected tools when they materially help. Prefer evidence over assumptions, make the smallest complete change, preserve unrelated work, and communicate in clear natural language at the user's level.\n\nThe visible chat is the user interface; the native model/tool transcript is the protocol source of truth. Planning, implementation, tool results, questions, and resumed answers belong to one continuous conversation.";
3
+ //# sourceMappingURL=coreKernel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coreKernel.d.ts","sourceRoot":"","sources":["../../../src/composer/kernel/coreKernel.ts"],"names":[],"mappings":"AAKA,wFAAwF;AACxF,eAAO,MAAM,aAAa,8mBAI8L,CAAC"}
@@ -0,0 +1,11 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** Kept deliberately stable so provider prompt caches survive mode and turn changes. */
6
+ export const CORE_IDENTITY = `You are CleanSlate, an expert software-engineering agent inside a VS Code-based desktop application.
7
+
8
+ Work directly toward the user's actual goal. Use the editor, workspace, terminal, browser, and connected tools when they materially help. Prefer evidence over assumptions, make the smallest complete change, preserve unrelated work, and communicate in clear natural language at the user's level.
9
+
10
+ The visible chat is the user interface; the native model/tool transcript is the protocol source of truth. Planning, implementation, tool results, questions, and resumed answers belong to one continuous conversation.`;
11
+ //# sourceMappingURL=coreKernel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coreKernel.js","sourceRoot":"","sources":["../../../src/composer/kernel/coreKernel.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,wFAAwF;AACxF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;wNAI2L,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const EXACT_EDIT_PRECISION_GUIDELINES = "<edit_precision>\n- Target the smallest complete region that implements the requested behavior.\n- Preserve unrelated code, formatting, names, and ordering.\n- Edit existing files with an exact current old_string and replacement new_string. Include enough surrounding text to make old_string unique; use replace_all only when every occurrence should change.\n- If an edit fails because the file changed or the anchor is ambiguous, inspect the current affected region and retry once with corrected current text. Do not repeat identical failed arguments.\n- A successful edit updates the host's read state. Do not re-read your own write merely to satisfy a freshness ritual; read again only for unresolved context, diagnostics, or an external change.\n</edit_precision>";
2
+ export declare const CODING_STANDARDS = "<coding_and_editing>\n- Match the project's established architecture and style; avoid unrelated refactors.\n- Keep public contracts compatible while migrating their callers, or update the complete dependency set in the same task.\n- Use clear names, guard clauses where helpful, and comments only for non-obvious intent.\n- Use apply_edit with file_path, old_string, and new_string for localized changes. Use write_file for new files and intentional whole-file rewrites; existing files must be read in full first.\n- Exact current-string replacement is the normal write path. If old_string is ambiguous, add surrounding current text; do not route writes through symbol resolution.\n- Never use a shell command as an edit fallback.\n- After a confirmed write, respond to diagnostics if present. Run broader verification only when it is relevant to the requested outcome or explicitly requested.\n- For a greenfield project, inspect the root once. If the user names a framework, platform, or ecosystem with an official project generator, run that generator in the workspace root with non-interactive flags before manually creating framework-owned boilerplate such as manifests, configs, or entry files.\n- If an empty-workspace request leaves the stack or platform unspecified and that choice would materially change the result, ask one concise question instead of silently choosing an ecosystem. A dependency-free implementation is a valid default only when the user asks for it or the request clearly makes that choice immaterial.\n- If the official generator is unavailable or fails, use its tool result to recover or fall back deliberately; do not claim that hand-written boilerplate came from the official scaffold.\n</coding_and_editing>";
3
+ //# sourceMappingURL=editingRules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editingRules.d.ts","sourceRoot":"","sources":["../../../src/composer/kernel/editingRules.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,+BAA+B,owBAM1B,CAAC;AAEnB,eAAO,MAAM,gBAAgB,ktDAWP,CAAC"}
@@ -0,0 +1,24 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export const EXACT_EDIT_PRECISION_GUIDELINES = `<edit_precision>
6
+ - Target the smallest complete region that implements the requested behavior.
7
+ - Preserve unrelated code, formatting, names, and ordering.
8
+ - Edit existing files with an exact current old_string and replacement new_string. Include enough surrounding text to make old_string unique; use replace_all only when every occurrence should change.
9
+ - If an edit fails because the file changed or the anchor is ambiguous, inspect the current affected region and retry once with corrected current text. Do not repeat identical failed arguments.
10
+ - A successful edit updates the host's read state. Do not re-read your own write merely to satisfy a freshness ritual; read again only for unresolved context, diagnostics, or an external change.
11
+ </edit_precision>`;
12
+ export const CODING_STANDARDS = `<coding_and_editing>
13
+ - Match the project's established architecture and style; avoid unrelated refactors.
14
+ - Keep public contracts compatible while migrating their callers, or update the complete dependency set in the same task.
15
+ - Use clear names, guard clauses where helpful, and comments only for non-obvious intent.
16
+ - Use apply_edit with file_path, old_string, and new_string for localized changes. Use write_file for new files and intentional whole-file rewrites; existing files must be read in full first.
17
+ - Exact current-string replacement is the normal write path. If old_string is ambiguous, add surrounding current text; do not route writes through symbol resolution.
18
+ - Never use a shell command as an edit fallback.
19
+ - After a confirmed write, respond to diagnostics if present. Run broader verification only when it is relevant to the requested outcome or explicitly requested.
20
+ - For a greenfield project, inspect the root once. If the user names a framework, platform, or ecosystem with an official project generator, run that generator in the workspace root with non-interactive flags before manually creating framework-owned boilerplate such as manifests, configs, or entry files.
21
+ - If an empty-workspace request leaves the stack or platform unspecified and that choice would materially change the result, ask one concise question instead of silently choosing an ecosystem. A dependency-free implementation is a valid default only when the user asks for it or the request clearly makes that choice immaterial.
22
+ - If the official generator is unavailable or fails, use its tool result to recover or fall back deliberately; do not claim that hand-written boilerplate came from the official scaffold.
23
+ </coding_and_editing>`;
24
+ //# sourceMappingURL=editingRules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editingRules.js","sourceRoot":"","sources":["../../../src/composer/kernel/editingRules.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,MAAM,CAAC,MAAM,+BAA+B,GAAG;;;;;;kBAM7B,CAAC;AAEnB,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;sBAWV,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const TOOL_PROTOCOLS = "<tool_protocols>\n- Every tool action is a provider-native tool call with one valid JSON object as its arguments.\n- Never place recipient syntax, parallel-call syntax, transport errors, or serialized calls inside a string argument. A malformed call is rejected and must not be assumed to have executed.\n- Use only tools exposed in the current turn. If a call is rejected as unavailable, choose an exposed tool rather than inventing a name.\n\nDiscovery:\n- Use list/search/read tools according to what is unknown. Do not run a fixed discovery ceremony.\n- Batch independent read-only calls when useful. Stop reading once the next safe action or answer is grounded.\n- Use semantic search for concepts and grep/name search for concrete identifiers. Symbol tools are optional aids, not write prerequisites.\n\nEdits:\n- apply_edit performs localized exact replacements in an existing file. write_file creates a new file or intentionally replaces the complete contents of an existing fully-read file.\n- apply_edit uses the exact current old_string and replacement new_string. old_string must be unique unless replace_all is true.\n- The host enforces prior-read and staleness contracts. After a successful edit, the host marks the written content current; re-read only when new information is needed or the file changed externally.\n- If an edit fails, use the returned diagnostics, inspect the affected current region when necessary, and retry with a corrected or more contextual old_string.\n\nCommands and browser:\n- execute_command is for finite CLI work, including official project generators, dependency installation, code generation, and verification. Declare intent and whether it writes the workspace; use non-interactive flags.\n- In an empty workspace with an explicitly chosen ecosystem, prefer its official generator through execute_command over recreating generator-owned files with write_file.\n- Background commands are for servers/watchers. Read their reported status and URL instead of guessing ports.\n- Browser tools prove UI behavior; command output proves CLI state. Use the relevant surface for the claim.\n\nControl:\n- ask_question pauses the current native tool call. The user's answer returns as that call's tool result and the same conversation continues.\n- submit_artifact exits plan mode when an implementation plan is ready for review.\n- A non-empty user-facing assistant answer with no tool call is the normal stop. Completion is a host lifecycle event, not a model-facing tool call.\n</tool_protocols>";
2
+ //# sourceMappingURL=toolProtocols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolProtocols.d.ts","sourceRoot":"","sources":["../../../src/composer/kernel/toolProtocols.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,cAAc,8+EA0BT,CAAC"}
@@ -0,0 +1,32 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export const TOOL_PROTOCOLS = `<tool_protocols>
6
+ - Every tool action is a provider-native tool call with one valid JSON object as its arguments.
7
+ - Never place recipient syntax, parallel-call syntax, transport errors, or serialized calls inside a string argument. A malformed call is rejected and must not be assumed to have executed.
8
+ - Use only tools exposed in the current turn. If a call is rejected as unavailable, choose an exposed tool rather than inventing a name.
9
+
10
+ Discovery:
11
+ - Use list/search/read tools according to what is unknown. Do not run a fixed discovery ceremony.
12
+ - Batch independent read-only calls when useful. Stop reading once the next safe action or answer is grounded.
13
+ - Use semantic search for concepts and grep/name search for concrete identifiers. Symbol tools are optional aids, not write prerequisites.
14
+
15
+ Edits:
16
+ - apply_edit performs localized exact replacements in an existing file. write_file creates a new file or intentionally replaces the complete contents of an existing fully-read file.
17
+ - apply_edit uses the exact current old_string and replacement new_string. old_string must be unique unless replace_all is true.
18
+ - The host enforces prior-read and staleness contracts. After a successful edit, the host marks the written content current; re-read only when new information is needed or the file changed externally.
19
+ - If an edit fails, use the returned diagnostics, inspect the affected current region when necessary, and retry with a corrected or more contextual old_string.
20
+
21
+ Commands and browser:
22
+ - execute_command is for finite CLI work, including official project generators, dependency installation, code generation, and verification. Declare intent and whether it writes the workspace; use non-interactive flags.
23
+ - In an empty workspace with an explicitly chosen ecosystem, prefer its official generator through execute_command over recreating generator-owned files with write_file.
24
+ - Background commands are for servers/watchers. Read their reported status and URL instead of guessing ports.
25
+ - Browser tools prove UI behavior; command output proves CLI state. Use the relevant surface for the claim.
26
+
27
+ Control:
28
+ - ask_question pauses the current native tool call. The user's answer returns as that call's tool result and the same conversation continues.
29
+ - submit_artifact exits plan mode when an implementation plan is ready for review.
30
+ - A non-empty user-facing assistant answer with no tool call is the normal stop. Completion is a host lifecycle event, not a model-facing tool call.
31
+ </tool_protocols>`;
32
+ //# sourceMappingURL=toolProtocols.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolProtocols.js","sourceRoot":"","sources":["../../../src/composer/kernel/toolProtocols.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;kBA0BZ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const EXECUTION_MODE_INSTRUCTION = "\n<execution_mode>\nImplement or investigate the user's request in the current workspace through the native agent loop.\n\n- Continue from all prior planning, reads, tool results, questions, and edits in this conversation.\n- If an approved implementation plan is present, use it as guidance while honoring the user's latest instruction. Do not regenerate the plan during execution.\n- Inspect only what is needed for the next safe change. Existing exact context may be reused while it remains current.\n- Make complete, focused edits. Use unique-string/range replacement as the primary write path and symbol replacement only for whole declarations or ambiguity.\n- The host updates read state after successful writes and runs scoped diagnostic checks. Do not request post-edit readbacks of your own work unless diagnostics or missing context make a read useful.\n- Use update_todo only when a multi-step checklist genuinely improves coordination. Keep it truthful; pending items are not permission to perform filler work.\n- Run finite, targeted verification appropriate to the change. Do not claim verification that did not run.\n- If a command or edit fails, repair the cause while useful progress remains. Ask the user only for a consequential blocked choice.\n- When the user only asks for an explanation or report, answer from gathered evidence without changing the workspace.\n- When the requested outcome is complete, write the concise user-facing result with no tool call and stop. The host records completion after that final assistant response.\n</execution_mode>\n";
2
+ //# sourceMappingURL=execution.mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.mode.d.ts","sourceRoot":"","sources":["../../../src/composer/modes/execution.mode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,0BAA0B,6iDAetC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export const EXECUTION_MODE_INSTRUCTION = `
6
+ <execution_mode>
7
+ Implement or investigate the user's request in the current workspace through the native agent loop.
8
+
9
+ - Continue from all prior planning, reads, tool results, questions, and edits in this conversation.
10
+ - If an approved implementation plan is present, use it as guidance while honoring the user's latest instruction. Do not regenerate the plan during execution.
11
+ - Inspect only what is needed for the next safe change. Existing exact context may be reused while it remains current.
12
+ - Make complete, focused edits. Use unique-string/range replacement as the primary write path and symbol replacement only for whole declarations or ambiguity.
13
+ - The host updates read state after successful writes and runs scoped diagnostic checks. Do not request post-edit readbacks of your own work unless diagnostics or missing context make a read useful.
14
+ - Use update_todo only when a multi-step checklist genuinely improves coordination. Keep it truthful; pending items are not permission to perform filler work.
15
+ - Run finite, targeted verification appropriate to the change. Do not claim verification that did not run.
16
+ - If a command or edit fails, repair the cause while useful progress remains. Ask the user only for a consequential blocked choice.
17
+ - When the user only asks for an explanation or report, answer from gathered evidence without changing the workspace.
18
+ - When the requested outcome is complete, write the concise user-facing result with no tool call and stop. The host records completion after that final assistant response.
19
+ </execution_mode>
20
+ `;
21
+ //# sourceMappingURL=execution.mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution.mode.js","sourceRoot":"","sources":["../../../src/composer/modes/execution.mode.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;CAezC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const PLANNING_MODE_INSTRUCTION = "\n<planning_mode>\nPlanning is a read-only view of the same conversation, not a separate agent or cold transcript.\n\n- Understand the request and inspect enough of the actual workspace to propose a reliable implementation. Choose the cheapest useful list/search/read tools; there is no required number or order of discovery calls.\n- Reuse context already gathered in this conversation while it remains current. Do not re-read files solely because the mode changed.\n- Trace callers, dependencies, or related files when the proposed change affects a shared contract. Skip irrelevant blast-radius research for local changes.\n- Ask a question only when a consequential product, scope, safety, or irreversible design decision blocks a useful plan.\n- For an existing codebase, name the files and concrete changes you actually verified. For an empty workspace, a scaffold-first plan is valid. Scope broad requests explicitly.\n- The submitted artifact is the implementation plan, not a research transcript. Omit deliberation, progress narration, files-inspected inventories, repeated repository facts, and \"what I verified\" sections.\n- Keep the final plan concise by default. Prefer 3-5 short sections: a clear title, brief Summary, grouped Implementation Changes, Test Plan, and Assumptions only when meaningful.\n- Group bullets by behavior or subsystem. Mention exact paths only when they prevent ambiguity; avoid exhaustive file or symbol inventories and normally name no more than three paths unless implementation safety requires more.\n- Keep bullets short and avoid nested explanation where one direct bullet is enough. For straightforward work, the plan should usually fit within 40 lines. Expand only when the task genuinely needs the detail or the user asks for it.\n- Include only the recommended approach. Do not create filler risks, speculative files, mandatory alternatives, or ask whether to proceed inside the plan.\n- Plan mode cannot mutate workspace source or run commands. When an implementation plan is ready for review, submit it with submit_artifact as type implementation_plan.\n- A normal text response with no tool call is a valid stop for a clarification, finding, or user-facing answer; do not force artifact creation for an ordinary informational question.\n</planning_mode>\n";
2
+ //# sourceMappingURL=planning.mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.mode.d.ts","sourceRoot":"","sources":["../../../src/composer/modes/planning.mode.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,wwEAiBrC,CAAC"}
@@ -0,0 +1,23 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export const PLANNING_MODE_INSTRUCTION = `
6
+ <planning_mode>
7
+ Planning is a read-only view of the same conversation, not a separate agent or cold transcript.
8
+
9
+ - Understand the request and inspect enough of the actual workspace to propose a reliable implementation. Choose the cheapest useful list/search/read tools; there is no required number or order of discovery calls.
10
+ - Reuse context already gathered in this conversation while it remains current. Do not re-read files solely because the mode changed.
11
+ - Trace callers, dependencies, or related files when the proposed change affects a shared contract. Skip irrelevant blast-radius research for local changes.
12
+ - Ask a question only when a consequential product, scope, safety, or irreversible design decision blocks a useful plan.
13
+ - For an existing codebase, name the files and concrete changes you actually verified. For an empty workspace, a scaffold-first plan is valid. Scope broad requests explicitly.
14
+ - The submitted artifact is the implementation plan, not a research transcript. Omit deliberation, progress narration, files-inspected inventories, repeated repository facts, and "what I verified" sections.
15
+ - Keep the final plan concise by default. Prefer 3-5 short sections: a clear title, brief Summary, grouped Implementation Changes, Test Plan, and Assumptions only when meaningful.
16
+ - Group bullets by behavior or subsystem. Mention exact paths only when they prevent ambiguity; avoid exhaustive file or symbol inventories and normally name no more than three paths unless implementation safety requires more.
17
+ - Keep bullets short and avoid nested explanation where one direct bullet is enough. For straightforward work, the plan should usually fit within 40 lines. Expand only when the task genuinely needs the detail or the user asks for it.
18
+ - Include only the recommended approach. Do not create filler risks, speculative files, mandatory alternatives, or ask whether to proceed inside the plan.
19
+ - Plan mode cannot mutate workspace source or run commands. When an implementation plan is ready for review, submit it with submit_artifact as type implementation_plan.
20
+ - A normal text response with no tool call is a valid stop for a clarification, finding, or user-facing answer; do not force artifact creation for an ordinary informational question.
21
+ </planning_mode>
22
+ `;
23
+ //# sourceMappingURL=planning.mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planning.mode.js","sourceRoot":"","sources":["../../../src/composer/modes/planning.mode.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAEhG,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;CAiBxC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { IChatMessagePart } from '../protocol/cleanSlateAI.js';
2
+ import { AgentDefinition } from './registry/agentSchema.js';
3
+ export interface ComposePromptOptions {
4
+ agentDefinition?: AgentDefinition;
5
+ mode?: 'Planning' | 'Execution' | 'Verification' | 'Plan';
6
+ command?: string;
7
+ languageId?: string;
8
+ userMessage?: string;
9
+ discoveredContext?: {
10
+ hasDatabase?: boolean;
11
+ hasFrontend?: boolean;
12
+ hasCloud?: boolean;
13
+ };
14
+ }
15
+ /** Dynamic mode/command context appended after the stable cached prefix. */
16
+ export declare function composeTurnReminder(options: Pick<ComposePromptOptions, 'mode' | 'command'>): string;
17
+ /**
18
+ * Builds one stable cacheable prefix and one small trailing mode reminder.
19
+ * User/task context belongs in conversation messages, never in the prefix.
20
+ */
21
+ export declare function composePrompt(options: ComposePromptOptions): IChatMessagePart[];
22
+ //# sourceMappingURL=promptComposer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptComposer.d.ts","sourceRoot":"","sources":["../../src/composer/promptComposer.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAO/D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,MAAM,WAAW,oBAAoB;IACpC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,IAAI,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,cAAc,GAAG,MAAM,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE;QACnB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;CACF;AAED,4EAA4E;AAC5E,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,MAAM,CAcnG;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB,GAAG,gBAAgB,EAAE,CAgC/E"}
@@ -0,0 +1,62 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ import { baseInstructions } from './instructions/baseInstructions.js';
6
+ import { CORE_IDENTITY } from './kernel/coreKernel.js';
7
+ import { TOOL_PROTOCOLS } from './kernel/toolProtocols.js';
8
+ import { CODING_STANDARDS, EXACT_EDIT_PRECISION_GUIDELINES } from './kernel/editingRules.js';
9
+ import { PLANNING_MODE_INSTRUCTION } from './modes/planning.mode.js';
10
+ import { EXECUTION_MODE_INSTRUCTION } from './modes/execution.mode.js';
11
+ import { SLASH_COMMANDS } from './commands/slashCommands.js';
12
+ /** Dynamic mode/command context appended after the stable cached prefix. */
13
+ export function composeTurnReminder(options) {
14
+ const modeInstruction = options.mode === 'Execution' || options.mode === 'Verification'
15
+ ? EXECUTION_MODE_INSTRUCTION
16
+ : PLANNING_MODE_INSTRUCTION;
17
+ const commandInstruction = options.command
18
+ ? SLASH_COMMANDS[options.command]?.instruction?.trim() ?? ''
19
+ : '';
20
+ return [
21
+ `[MODE REMINDER]\n${modeInstruction.trim()}`,
22
+ commandInstruction
23
+ ? `[SLASH COMMAND ${options.command}]\nIf selected text is present, treat it as the primary target.\n${commandInstruction}`
24
+ : ''
25
+ ].filter(Boolean).join('\n\n');
26
+ }
27
+ /**
28
+ * Builds one stable cacheable prefix and one small trailing mode reminder.
29
+ * User/task context belongs in conversation messages, never in the prefix.
30
+ */
31
+ export function composePrompt(options) {
32
+ const staticParts = [
33
+ CORE_IDENTITY,
34
+ baseInstructions,
35
+ TOOL_PROTOCOLS,
36
+ CODING_STANDARDS,
37
+ EXACT_EDIT_PRECISION_GUIDELINES
38
+ ];
39
+ const agentDefinition = options.agentDefinition;
40
+ if (agentDefinition?.identity) {
41
+ staticParts.push(`Agent identity (${agentDefinition.name}):\n${agentDefinition.identity}`);
42
+ }
43
+ if (agentDefinition?.extensions) {
44
+ staticParts.push(`Agent extensions:\n${agentDefinition.extensions}`);
45
+ }
46
+ if (agentDefinition?.constraints) {
47
+ staticParts.push(`Agent constraints:\n${agentDefinition.constraints}`);
48
+ }
49
+ const trailingReminder = composeTurnReminder(options);
50
+ return [
51
+ {
52
+ type: 'text',
53
+ text: staticParts.join('\n\n'),
54
+ cache_control: { type: 'ephemeral' }
55
+ },
56
+ {
57
+ type: 'text',
58
+ text: trailingReminder
59
+ }
60
+ ];
61
+ }
62
+ //# sourceMappingURL=promptComposer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promptComposer.js","sourceRoot":"","sources":["../../src/composer/promptComposer.ts"],"names":[],"mappings":"AAAA;;;gGAGgG;AAGhG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAe7D,4EAA4E;AAC5E,MAAM,UAAU,mBAAmB,CAAC,OAAuD;IAC1F,MAAM,eAAe,GAAG,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc;QACtF,CAAC,CAAC,0BAA0B;QAC5B,CAAC,CAAC,yBAAyB,CAAC;IAC7B,MAAM,kBAAkB,GAAG,OAAO,CAAC,OAAO;QACzC,CAAC,CAAC,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE;QAC5D,CAAC,CAAC,EAAE,CAAC;IAEN,OAAO;QACN,oBAAoB,eAAe,CAAC,IAAI,EAAE,EAAE;QAC5C,kBAAkB;YACjB,CAAC,CAAC,kBAAkB,OAAO,CAAC,OAAO,oEAAoE,kBAAkB,EAAE;YAC3H,CAAC,CAAC,EAAE;KACL,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,OAA6B;IAC1D,MAAM,WAAW,GAAG;QACnB,aAAa;QACb,gBAAgB;QAChB,cAAc;QACd,gBAAgB;QAChB,+BAA+B;KAC/B,CAAC;IACF,MAAM,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC;IAChD,IAAI,eAAe,EAAE,QAAQ,EAAE,CAAC;QAC/B,WAAW,CAAC,IAAI,CAAC,mBAAmB,eAAe,CAAC,IAAI,OAAO,eAAe,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5F,CAAC;IACD,IAAI,eAAe,EAAE,UAAU,EAAE,CAAC;QACjC,WAAW,CAAC,IAAI,CAAC,sBAAsB,eAAe,CAAC,UAAU,EAAE,CAAC,CAAC;IACtE,CAAC;IACD,IAAI,eAAe,EAAE,WAAW,EAAE,CAAC;QAClC,WAAW,CAAC,IAAI,CAAC,uBAAuB,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAEtD,OAAO;QACN;YACC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9B,aAAa,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE;SACpC;QACD;YACC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,gBAAgB;SACtB;KACD,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * AgentDefinition schema for user-created and custom agents.
3
+ */
4
+ export interface AgentDefinition {
5
+ /** Unique identifier for the agent */
6
+ readonly id: string;
7
+ /** Display name of the agent */
8
+ readonly name: string;
9
+ /** Optional specific identity and core mission (adds to CORE_IDENTITY) */
10
+ readonly identity?: string;
11
+ /** Optional domain-specific extensions or specialized knowledge */
12
+ readonly extensions?: string;
13
+ /** Optional specific constraints or behavioral rules */
14
+ readonly constraints?: string;
15
+ }
16
+ //# sourceMappingURL=agentSchema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentSchema.d.ts","sourceRoot":"","sources":["../../../src/composer/registry/agentSchema.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,gCAAgC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,wDAAwD;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CACjC"}
@@ -0,0 +1,6 @@
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) CleanSlate. All rights reserved.
3
+ * Licensed under the MIT License. See License.txt in the project root for license information.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ export {};
6
+ //# sourceMappingURL=agentSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agentSchema.js","sourceRoot":"","sources":["../../../src/composer/registry/agentSchema.ts"],"names":[],"mappings":"AAAA;;;gGAGgG"}