takt 0.48.0 → 0.49.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 (340) hide show
  1. package/README.md +13 -0
  2. package/builtins/en/facets/instructions/exec-loop-monitor.md +15 -0
  3. package/builtins/en/facets/instructions/exec-replan.md +5 -0
  4. package/builtins/en/facets/instructions/exec-review.md +10 -0
  5. package/builtins/en/facets/instructions/exec-worker.md +5 -0
  6. package/builtins/en/facets/knowledge/takt.md +16 -0
  7. package/builtins/en/facets/output-contracts/exec-review-result.md +13 -0
  8. package/builtins/en/facets/personas/exec-assistant.md +3 -0
  9. package/builtins/en/facets/personas/exec-worker.md +3 -0
  10. package/builtins/en/facets/policies/existing-system-respect.md +13 -0
  11. package/builtins/en/facets/policies/review.md +2 -0
  12. package/builtins/en/facets/policies/testing.md +13 -0
  13. package/builtins/en/workflows/draft.yaml +1 -1
  14. package/builtins/en/workflows/peer-review-with-fc.yaml +1 -1
  15. package/builtins/en/workflows/peer-review.yaml +1 -1
  16. package/builtins/exec/presets/backend.yaml +31 -0
  17. package/builtins/exec/presets/dual.yaml +34 -0
  18. package/builtins/exec/presets/frontend.yaml +31 -0
  19. package/builtins/exec/presets/research.yaml +45 -0
  20. package/builtins/ja/facets/instructions/exec-loop-monitor.md +15 -0
  21. package/builtins/ja/facets/instructions/exec-replan.md +5 -0
  22. package/builtins/ja/facets/instructions/exec-review.md +10 -0
  23. package/builtins/ja/facets/instructions/exec-worker.md +5 -0
  24. package/builtins/ja/facets/knowledge/takt.md +16 -0
  25. package/builtins/ja/facets/output-contracts/exec-review-result.md +13 -0
  26. package/builtins/ja/facets/personas/exec-assistant.md +3 -0
  27. package/builtins/ja/facets/personas/exec-worker.md +3 -0
  28. package/builtins/ja/facets/policies/existing-system-respect.md +13 -0
  29. package/builtins/ja/facets/policies/review.md +3 -0
  30. package/builtins/ja/facets/policies/testing.md +13 -0
  31. package/builtins/ja/workflows/draft.yaml +1 -1
  32. package/builtins/ja/workflows/peer-review-with-fc.yaml +1 -1
  33. package/builtins/ja/workflows/peer-review.yaml +1 -1
  34. package/builtins/skill/SKILL.md +1 -1
  35. package/builtins/skill/references/engine.md +1 -15
  36. package/builtins/skill-codex/SKILL.md +1 -1
  37. package/builtins/skill-codex/references/engine.md +0 -2
  38. package/dist/agents/decompose-task-usecase.d.ts +0 -1
  39. package/dist/agents/decompose-task-usecase.d.ts.map +1 -1
  40. package/dist/agents/decompose-task-usecase.js +0 -4
  41. package/dist/agents/decompose-task-usecase.js.map +1 -1
  42. package/dist/agents/runner.d.ts.map +1 -1
  43. package/dist/agents/runner.js +7 -6
  44. package/dist/agents/runner.js.map +1 -1
  45. package/dist/agents/structured-caller/prompt-based-structured-caller.d.ts.map +1 -1
  46. package/dist/agents/structured-caller/prompt-based-structured-caller.js +0 -3
  47. package/dist/agents/structured-caller/prompt-based-structured-caller.js.map +1 -1
  48. package/dist/agents/structured-caller/shared.d.ts.map +1 -1
  49. package/dist/agents/structured-caller/shared.js +2 -9
  50. package/dist/agents/structured-caller/shared.js.map +1 -1
  51. package/dist/app/cli/commands.js +13 -0
  52. package/dist/app/cli/commands.js.map +1 -1
  53. package/dist/core/models/workflow-schemas.d.ts +204 -16
  54. package/dist/core/models/workflow-schemas.d.ts.map +1 -1
  55. package/dist/core/models/workflow-schemas.js +37 -3
  56. package/dist/core/models/workflow-schemas.js.map +1 -1
  57. package/dist/core/models/workflow-types.d.ts +8 -0
  58. package/dist/core/models/workflow-types.d.ts.map +1 -1
  59. package/dist/core/workflow/engine/LoopMonitorJudgeRunner.d.ts +2 -2
  60. package/dist/core/workflow/engine/LoopMonitorJudgeRunner.d.ts.map +1 -1
  61. package/dist/core/workflow/engine/LoopMonitorJudgeRunner.js +8 -7
  62. package/dist/core/workflow/engine/LoopMonitorJudgeRunner.js.map +1 -1
  63. package/dist/core/workflow/engine/OptionsBuilder.d.ts +1 -0
  64. package/dist/core/workflow/engine/OptionsBuilder.d.ts.map +1 -1
  65. package/dist/core/workflow/engine/OptionsBuilder.js +23 -11
  66. package/dist/core/workflow/engine/OptionsBuilder.js.map +1 -1
  67. package/dist/core/workflow/engine/StepExecutor.d.ts.map +1 -1
  68. package/dist/core/workflow/engine/StepExecutor.js +4 -8
  69. package/dist/core/workflow/engine/StepExecutor.js.map +1 -1
  70. package/dist/core/workflow/engine/WorkflowEngineSetup.js +2 -2
  71. package/dist/core/workflow/engine/WorkflowEngineSetup.js.map +1 -1
  72. package/dist/core/workflow/engine/WorkflowRunLoop.d.ts.map +1 -1
  73. package/dist/core/workflow/engine/WorkflowRunLoop.js +31 -0
  74. package/dist/core/workflow/engine/WorkflowRunLoop.js.map +1 -1
  75. package/dist/core/workflow/engine/WorkflowValidator.d.ts.map +1 -1
  76. package/dist/core/workflow/engine/WorkflowValidator.js +17 -7
  77. package/dist/core/workflow/engine/WorkflowValidator.js.map +1 -1
  78. package/dist/core/workflow/engine/engine-provider-options.d.ts +1 -1
  79. package/dist/core/workflow/engine/engine-provider-options.d.ts.map +1 -1
  80. package/dist/core/workflow/engine/engine-provider-options.js +18 -6
  81. package/dist/core/workflow/engine/engine-provider-options.js.map +1 -1
  82. package/dist/core/workflow/findings/manager-runner.d.ts.map +1 -1
  83. package/dist/core/workflow/findings/manager-runner.js +9 -25
  84. package/dist/core/workflow/findings/manager-runner.js.map +1 -1
  85. package/dist/core/workflow/instruction/InstructionBuilder.js +1 -1
  86. package/dist/core/workflow/instruction/InstructionBuilder.js.map +1 -1
  87. package/dist/core/workflow/provider-model-compatibility.d.ts +0 -1
  88. package/dist/core/workflow/provider-model-compatibility.d.ts.map +1 -1
  89. package/dist/core/workflow/provider-model-compatibility.js +2 -2
  90. package/dist/core/workflow/provider-model-compatibility.js.map +1 -1
  91. package/dist/core/workflow/provider-resolution.d.ts +4 -6
  92. package/dist/core/workflow/provider-resolution.d.ts.map +1 -1
  93. package/dist/core/workflow/provider-resolution.js +19 -11
  94. package/dist/core/workflow/provider-resolution.js.map +1 -1
  95. package/dist/core/workflow/session-key.d.ts +4 -1
  96. package/dist/core/workflow/session-key.d.ts.map +1 -1
  97. package/dist/core/workflow/session-key.js +5 -2
  98. package/dist/core/workflow/session-key.js.map +1 -1
  99. package/dist/features/catalog/catalogFacets.d.ts +11 -1
  100. package/dist/features/catalog/catalogFacets.d.ts.map +1 -1
  101. package/dist/features/catalog/catalogFacets.js +36 -10
  102. package/dist/features/catalog/catalogFacets.js.map +1 -1
  103. package/dist/features/exec/assistantSession.d.ts +18 -0
  104. package/dist/features/exec/assistantSession.d.ts.map +1 -0
  105. package/dist/features/exec/assistantSession.js +51 -0
  106. package/dist/features/exec/assistantSession.js.map +1 -0
  107. package/dist/features/exec/command.d.ts +9 -0
  108. package/dist/features/exec/command.d.ts.map +1 -0
  109. package/dist/features/exec/command.js +143 -0
  110. package/dist/features/exec/command.js.map +1 -0
  111. package/dist/features/exec/commandAvailability.d.ts +4 -0
  112. package/dist/features/exec/commandAvailability.d.ts.map +1 -0
  113. package/dist/features/exec/commandAvailability.js +10 -0
  114. package/dist/features/exec/commandAvailability.js.map +1 -0
  115. package/dist/features/exec/configOps.d.ts +13 -0
  116. package/dist/features/exec/configOps.d.ts.map +1 -0
  117. package/dist/features/exec/configOps.js +129 -0
  118. package/dist/features/exec/configOps.js.map +1 -0
  119. package/dist/features/exec/configValidation.d.ts +15 -0
  120. package/dist/features/exec/configValidation.d.ts.map +1 -0
  121. package/dist/features/exec/configValidation.js +150 -0
  122. package/dist/features/exec/configValidation.js.map +1 -0
  123. package/dist/features/exec/defaults.d.ts +3 -0
  124. package/dist/features/exec/defaults.d.ts.map +1 -0
  125. package/dist/features/exec/defaults.js +30 -0
  126. package/dist/features/exec/defaults.js.map +1 -0
  127. package/dist/features/exec/facetEditor.d.ts +5 -0
  128. package/dist/features/exec/facetEditor.d.ts.map +1 -0
  129. package/dist/features/exec/facetEditor.js +293 -0
  130. package/dist/features/exec/facetEditor.js.map +1 -0
  131. package/dist/features/exec/index.d.ts +2 -0
  132. package/dist/features/exec/index.d.ts.map +1 -0
  133. package/dist/features/exec/index.js +2 -0
  134. package/dist/features/exec/index.js.map +1 -0
  135. package/dist/features/exec/labels.d.ts +11 -0
  136. package/dist/features/exec/labels.d.ts.map +1 -0
  137. package/dist/features/exec/labels.js +20 -0
  138. package/dist/features/exec/labels.js.map +1 -0
  139. package/dist/features/exec/presetSelection.d.ts +3 -0
  140. package/dist/features/exec/presetSelection.d.ts.map +1 -0
  141. package/dist/features/exec/presetSelection.js +16 -0
  142. package/dist/features/exec/presetSelection.js.map +1 -0
  143. package/dist/features/exec/presetSetup.d.ts +7 -0
  144. package/dist/features/exec/presetSetup.d.ts.map +1 -0
  145. package/dist/features/exec/presetSetup.js +120 -0
  146. package/dist/features/exec/presetSetup.js.map +1 -0
  147. package/dist/features/exec/presetStore.d.ts +25 -0
  148. package/dist/features/exec/presetStore.d.ts.map +1 -0
  149. package/dist/features/exec/presetStore.js +326 -0
  150. package/dist/features/exec/presetStore.js.map +1 -0
  151. package/dist/features/exec/projectLocalFiles.d.ts +9 -0
  152. package/dist/features/exec/projectLocalFiles.d.ts.map +1 -0
  153. package/dist/features/exec/projectLocalFiles.js +111 -0
  154. package/dist/features/exec/projectLocalFiles.js.map +1 -0
  155. package/dist/features/exec/promptUtils.d.ts +8 -0
  156. package/dist/features/exec/promptUtils.d.ts.map +1 -0
  157. package/dist/features/exec/promptUtils.js +32 -0
  158. package/dist/features/exec/promptUtils.js.map +1 -0
  159. package/dist/features/exec/runtimeConfig.d.ts +13 -0
  160. package/dist/features/exec/runtimeConfig.d.ts.map +1 -0
  161. package/dist/features/exec/runtimeConfig.js +59 -0
  162. package/dist/features/exec/runtimeConfig.js.map +1 -0
  163. package/dist/features/exec/setupMenu.d.ts +5 -0
  164. package/dist/features/exec/setupMenu.d.ts.map +1 -0
  165. package/dist/features/exec/setupMenu.js +431 -0
  166. package/dist/features/exec/setupMenu.js.map +1 -0
  167. package/dist/features/exec/types.d.ts +52 -0
  168. package/dist/features/exec/types.d.ts.map +1 -0
  169. package/dist/features/exec/types.js +2 -0
  170. package/dist/features/exec/types.js.map +1 -0
  171. package/dist/features/exec/workflowRunner.d.ts +9 -0
  172. package/dist/features/exec/workflowRunner.d.ts.map +1 -0
  173. package/dist/features/exec/workflowRunner.js +96 -0
  174. package/dist/features/exec/workflowRunner.js.map +1 -0
  175. package/dist/features/exec/workflowTemplate.d.ts +9 -0
  176. package/dist/features/exec/workflowTemplate.d.ts.map +1 -0
  177. package/dist/features/exec/workflowTemplate.js +159 -0
  178. package/dist/features/exec/workflowTemplate.js.map +1 -0
  179. package/dist/features/interactive/aiCaller.d.ts +3 -0
  180. package/dist/features/interactive/aiCaller.d.ts.map +1 -1
  181. package/dist/features/interactive/aiCaller.js +4 -0
  182. package/dist/features/interactive/aiCaller.js.map +1 -1
  183. package/dist/features/interactive/commandMatcher.d.ts +2 -1
  184. package/dist/features/interactive/commandMatcher.d.ts.map +1 -1
  185. package/dist/features/interactive/commandMatcher.js +13 -2
  186. package/dist/features/interactive/commandMatcher.js.map +1 -1
  187. package/dist/features/interactive/interactive-summary.d.ts.map +1 -1
  188. package/dist/features/interactive/interactive-summary.js +45 -23
  189. package/dist/features/interactive/interactive-summary.js.map +1 -1
  190. package/dist/features/interactive/interactive.js +2 -2
  191. package/dist/features/interactive/interactive.js.map +1 -1
  192. package/dist/features/interactive/promptSections.d.ts.map +1 -1
  193. package/dist/features/interactive/promptSections.js +3 -6
  194. package/dist/features/interactive/promptSections.js.map +1 -1
  195. package/dist/features/interactive/retryMode.d.ts.map +1 -1
  196. package/dist/features/interactive/retryMode.js +3 -3
  197. package/dist/features/interactive/retryMode.js.map +1 -1
  198. package/dist/features/interactive/runSessionReader.d.ts +4 -37
  199. package/dist/features/interactive/runSessionReader.d.ts.map +1 -1
  200. package/dist/features/interactive/runSessionReader.js +130 -49
  201. package/dist/features/interactive/runSessionReader.js.map +1 -1
  202. package/dist/features/interactive/slashCommandRegistry.d.ts +2 -0
  203. package/dist/features/interactive/slashCommandRegistry.d.ts.map +1 -1
  204. package/dist/features/interactive/slashCommandRegistry.js +5 -0
  205. package/dist/features/interactive/slashCommandRegistry.js.map +1 -1
  206. package/dist/features/prompt/preview.d.ts.map +1 -1
  207. package/dist/features/prompt/preview.js +58 -32
  208. package/dist/features/prompt/preview.js.map +1 -1
  209. package/dist/features/tasks/execute/selectAndExecute.d.ts.map +1 -1
  210. package/dist/features/tasks/execute/selectAndExecute.js +6 -2
  211. package/dist/features/tasks/execute/selectAndExecute.js.map +1 -1
  212. package/dist/features/tasks/execute/taskWorkflowExecution.d.ts.map +1 -1
  213. package/dist/features/tasks/execute/taskWorkflowExecution.js +41 -1
  214. package/dist/features/tasks/execute/taskWorkflowExecution.js.map +1 -1
  215. package/dist/features/tasks/execute/types.d.ts +8 -0
  216. package/dist/features/tasks/execute/types.d.ts.map +1 -1
  217. package/dist/features/tasks/execute/workflowExecutionEvents.d.ts.map +1 -1
  218. package/dist/features/tasks/execute/workflowExecutionEvents.js +3 -1
  219. package/dist/features/tasks/execute/workflowExecutionEvents.js.map +1 -1
  220. package/dist/features/tasks/list/instructMode.d.ts.map +1 -1
  221. package/dist/features/tasks/list/instructMode.js +3 -3
  222. package/dist/features/tasks/list/instructMode.js.map +1 -1
  223. package/dist/features/tasks/resume/directInstructMode.d.ts.map +1 -1
  224. package/dist/features/tasks/resume/directInstructMode.js +3 -3
  225. package/dist/features/tasks/resume/directInstructMode.js.map +1 -1
  226. package/dist/infra/config/configNormalizers.d.ts.map +1 -1
  227. package/dist/infra/config/configNormalizers.js +11 -8
  228. package/dist/infra/config/configNormalizers.js.map +1 -1
  229. package/dist/infra/config/loaders/resource-resolver.d.ts +3 -33
  230. package/dist/infra/config/loaders/resource-resolver.d.ts.map +1 -1
  231. package/dist/infra/config/loaders/resource-resolver.js +119 -46
  232. package/dist/infra/config/loaders/resource-resolver.js.map +1 -1
  233. package/dist/infra/config/loaders/workflowCallableArgResolver.d.ts.map +1 -1
  234. package/dist/infra/config/loaders/workflowCallableArgResolver.js +15 -7
  235. package/dist/infra/config/loaders/workflowCallableArgResolver.js.map +1 -1
  236. package/dist/infra/config/loaders/workflowDoctor.d.ts.map +1 -1
  237. package/dist/infra/config/loaders/workflowDoctor.js +19 -7
  238. package/dist/infra/config/loaders/workflowDoctor.js.map +1 -1
  239. package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.d.ts +3 -1
  240. package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.d.ts.map +1 -1
  241. package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.js +3 -1
  242. package/dist/infra/config/loaders/workflowLoopMonitorNormalizer.js.map +1 -1
  243. package/dist/infra/config/loaders/workflowParser.d.ts.map +1 -1
  244. package/dist/infra/config/loaders/workflowParser.js +6 -8
  245. package/dist/infra/config/loaders/workflowParser.js.map +1 -1
  246. package/dist/infra/config/loaders/workflowPreview.d.ts +3 -0
  247. package/dist/infra/config/loaders/workflowPreview.d.ts.map +1 -1
  248. package/dist/infra/config/loaders/workflowPreview.js +17 -9
  249. package/dist/infra/config/loaders/workflowPreview.js.map +1 -1
  250. package/dist/infra/config/loaders/workflowStepNormalizer.d.ts +1 -1
  251. package/dist/infra/config/loaders/workflowStepNormalizer.d.ts.map +1 -1
  252. package/dist/infra/config/loaders/workflowStepNormalizer.js +18 -10
  253. package/dist/infra/config/loaders/workflowStepNormalizer.js.map +1 -1
  254. package/dist/infra/opencode/allowedTools.d.ts +1 -0
  255. package/dist/infra/opencode/allowedTools.d.ts.map +1 -1
  256. package/dist/infra/opencode/allowedTools.js +7 -0
  257. package/dist/infra/opencode/allowedTools.js.map +1 -1
  258. package/dist/infra/opencode/client.d.ts.map +1 -1
  259. package/dist/infra/opencode/client.js +47 -1
  260. package/dist/infra/opencode/client.js.map +1 -1
  261. package/dist/infra/opencode/types.d.ts +1 -0
  262. package/dist/infra/opencode/types.d.ts.map +1 -1
  263. package/dist/infra/opencode/types.js +10 -10
  264. package/dist/infra/opencode/types.js.map +1 -1
  265. package/dist/infra/providers/allowed-tool-edit-policy.d.ts +1 -0
  266. package/dist/infra/providers/allowed-tool-edit-policy.d.ts.map +1 -1
  267. package/dist/infra/providers/allowed-tool-edit-policy.js +35 -1
  268. package/dist/infra/providers/allowed-tool-edit-policy.js.map +1 -1
  269. package/dist/infra/providers/opencode.d.ts +2 -1
  270. package/dist/infra/providers/opencode.d.ts.map +1 -1
  271. package/dist/infra/providers/opencode.js +17 -7
  272. package/dist/infra/providers/opencode.js.map +1 -1
  273. package/dist/infra/providers/types.d.ts +1 -1
  274. package/dist/infra/providers/types.d.ts.map +1 -1
  275. package/dist/shared/constants.d.ts +1 -0
  276. package/dist/shared/constants.d.ts.map +1 -1
  277. package/dist/shared/constants.js +1 -0
  278. package/dist/shared/constants.js.map +1 -1
  279. package/dist/shared/i18n/labels_en.yaml +115 -0
  280. package/dist/shared/i18n/labels_ja.yaml +115 -0
  281. package/dist/shared/prompts/en/exec_assistant_clarify.md +14 -0
  282. package/dist/shared/prompts/en/exec_assistant_instruct.md +14 -0
  283. package/dist/shared/prompts/en/exec_assistant_summary.md +12 -0
  284. package/dist/shared/prompts/en/exec_facet_create.md +8 -0
  285. package/dist/shared/prompts/en/exec_facet_edit.md +8 -0
  286. package/dist/shared/prompts/en/finding_manager_instruction.md +28 -0
  287. package/dist/shared/prompts/en/opencode_agent_prompt.md +52 -0
  288. package/dist/shared/prompts/en/opencode_report_agent_prompt.md +8 -0
  289. package/dist/shared/prompts/en/opencode_review_agent_prompt.md +35 -0
  290. package/dist/shared/prompts/en/perform_phase1_message.md +1 -4
  291. package/dist/shared/prompts/en/perform_phase2_message.md +1 -0
  292. package/dist/shared/prompts/en/perform_phase3_message.md +1 -0
  293. package/dist/shared/prompts/en/provider_runtime_system_prompt.md +1 -0
  294. package/dist/shared/prompts/en/score_slug_system_prompt.md +1 -0
  295. package/dist/shared/prompts/en/score_slug_user_prompt.md +1 -0
  296. package/dist/shared/prompts/en/score_summary_system_prompt.md +1 -0
  297. package/dist/shared/prompts/en/source_context_section_guidance.md +6 -0
  298. package/dist/shared/prompts/en/source_context_system_guard.md +8 -0
  299. package/dist/shared/prompts/en/structured_json_schema_instruction.md +12 -0
  300. package/dist/shared/prompts/en/structured_json_step_instruction.md +12 -0
  301. package/dist/shared/prompts/en/sync_conflict_resolver_message.md +1 -0
  302. package/dist/shared/prompts/en/sync_conflict_resolver_system_prompt.md +1 -0
  303. package/dist/shared/prompts/index.d.ts.map +1 -1
  304. package/dist/shared/prompts/index.js +3 -1
  305. package/dist/shared/prompts/index.js.map +1 -1
  306. package/dist/shared/prompts/ja/exec_assistant_clarify.md +14 -0
  307. package/dist/shared/prompts/ja/exec_assistant_instruct.md +14 -0
  308. package/dist/shared/prompts/ja/exec_assistant_summary.md +12 -0
  309. package/dist/shared/prompts/ja/exec_facet_create.md +8 -0
  310. package/dist/shared/prompts/ja/exec_facet_edit.md +8 -0
  311. package/dist/shared/prompts/ja/finding_manager_instruction.md +28 -0
  312. package/dist/shared/prompts/ja/opencode_agent_prompt.md +52 -0
  313. package/dist/shared/prompts/ja/opencode_report_agent_prompt.md +8 -0
  314. package/dist/shared/prompts/ja/opencode_review_agent_prompt.md +35 -0
  315. package/dist/shared/prompts/ja/perform_phase1_message.md +1 -4
  316. package/dist/shared/prompts/ja/perform_phase2_message.md +1 -0
  317. package/dist/shared/prompts/ja/perform_phase3_message.md +1 -0
  318. package/dist/shared/prompts/ja/provider_runtime_system_prompt.md +1 -0
  319. package/dist/shared/prompts/ja/score_slug_system_prompt.md +1 -0
  320. package/dist/shared/prompts/ja/score_slug_user_prompt.md +1 -0
  321. package/dist/shared/prompts/ja/score_summary_system_prompt.md +1 -0
  322. package/dist/shared/prompts/ja/source_context_section_guidance.md +6 -0
  323. package/dist/shared/prompts/ja/source_context_system_guard.md +8 -0
  324. package/dist/shared/prompts/ja/structured_json_schema_instruction.md +12 -0
  325. package/dist/shared/prompts/ja/structured_json_step_instruction.md +12 -0
  326. package/dist/shared/prompts/ja/sync_conflict_resolver_message.md +1 -0
  327. package/dist/shared/prompts/ja/sync_conflict_resolver_system_prompt.md +1 -0
  328. package/dist/shared/utils/pathBoundary.d.ts +6 -0
  329. package/dist/shared/utils/pathBoundary.d.ts.map +1 -1
  330. package/dist/shared/utils/pathBoundary.js +38 -1
  331. package/dist/shared/utils/pathBoundary.js.map +1 -1
  332. package/package.json +1 -1
  333. package/builtins/en/provider-options/review-web.yaml +0 -14
  334. package/builtins/ja/provider-options/review-web.yaml +0 -14
  335. package/dist/features/interactive/policyPrompt.d.ts +0 -2
  336. package/dist/features/interactive/policyPrompt.d.ts.map +0 -1
  337. package/dist/features/interactive/policyPrompt.js +0 -18
  338. package/dist/features/interactive/policyPrompt.js.map +0 -1
  339. package/dist/shared/prompts/en/score_interactive_policy.md +0 -83
  340. package/dist/shared/prompts/ja/score_interactive_policy.md +0 -83
@@ -0,0 +1,293 @@
1
+ import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
4
+ import { spawnSync } from 'node:child_process';
5
+ import { getGlobalFacetDir, getProjectFacetDir } from '../../infra/config/paths.js';
6
+ import { getFacetDirs, scanFacets } from '../catalog/catalogFacets.js';
7
+ import { readInteractiveInput } from '../interactive/interactiveInput.js';
8
+ import { info } from '../../shared/ui/index.js';
9
+ import { sanitizeTerminalText } from '../../shared/utils/index.js';
10
+ import { loadTemplate } from '../../shared/prompts/index.js';
11
+ import { askExecAssistant } from './assistantSession.js';
12
+ import { EXEC_TEXT_INPUT_COMMAND_AVAILABILITY } from './commandAvailability.js';
13
+ import { execFacetKindLabel, execLabel, execScopeLabel, execSourceLabel } from './labels.js';
14
+ import { promptText, selectExecOption } from './promptUtils.js';
15
+ import { projectLocalFileExists, readProjectLocalTextFile, writeProjectLocalTextFile, } from './projectLocalFiles.js';
16
+ const FACET_NAME_REGEX = /^[A-Za-z0-9_-]+$/;
17
+ function validateFacetName(name) {
18
+ if (!FACET_NAME_REGEX.test(name)) {
19
+ throw new Error(`Invalid facet name: ${name}`);
20
+ }
21
+ return name;
22
+ }
23
+ function normalizeFacetEntries(kind, cwd, lookupConfig) {
24
+ const effective = new Map();
25
+ for (const entry of scanFacets(kind, cwd, lookupConfig)) {
26
+ effective.set(entry.name, entry);
27
+ }
28
+ return [...effective.values()].sort((a, b) => a.name.localeCompare(b.name));
29
+ }
30
+ function getWritableFacetDir(cwd, kind, source) {
31
+ switch (source) {
32
+ case 'project':
33
+ return getProjectFacetDir(cwd, kind);
34
+ case 'global':
35
+ return getGlobalFacetDir(kind);
36
+ }
37
+ const exhaustive = source;
38
+ throw new Error(`Unsupported facet write scope: ${exhaustive}`);
39
+ }
40
+ function readEffectiveFacetContent(cwd, kind, name, lookupConfig) {
41
+ const facetName = validateFacetName(name);
42
+ const candidates = [...getFacetDirs(kind, cwd, lookupConfig)]
43
+ .reverse()
44
+ .map((entry) => ({
45
+ source: entry.source,
46
+ path: join(entry.dir, `${facetName}.md`),
47
+ }));
48
+ for (const candidate of candidates) {
49
+ if (candidate.source === 'project') {
50
+ if (projectLocalFileExists(cwd, candidate.path, `${kind} facet`)) {
51
+ return readProjectLocalTextFile(cwd, candidate.path, `${kind} facet`);
52
+ }
53
+ continue;
54
+ }
55
+ if (existsSync(candidate.path)) {
56
+ return readFileSync(candidate.path, 'utf-8');
57
+ }
58
+ }
59
+ throw new Error(`${kind} facet not found: ${facetName}`);
60
+ }
61
+ function writeFacetFile(cwd, kind, scope, name, content) {
62
+ const facetName = validateFacetName(name);
63
+ const facetDir = getWritableFacetDir(cwd, kind, scope);
64
+ const facetPath = join(facetDir, `${facetName}.md`);
65
+ const alreadyExists = scope === 'project'
66
+ ? projectLocalFileExists(cwd, facetPath, `${kind} facet`)
67
+ : existsSync(facetPath);
68
+ if (alreadyExists) {
69
+ throw new Error(`${scope} ${kind} facet already exists: ${facetName}`);
70
+ }
71
+ if (content.trim().length === 0) {
72
+ throw new Error(`${kind} facet content is required.`);
73
+ }
74
+ if (scope === 'project') {
75
+ writeProjectLocalTextFile(cwd, facetPath, content, `${kind} facet`);
76
+ return facetName;
77
+ }
78
+ mkdirSync(facetDir, { recursive: true });
79
+ writeFileSync(facetPath, content, 'utf-8');
80
+ return facetName;
81
+ }
82
+ function overwriteFacetFile(cwd, kind, scope, name, content) {
83
+ const facetName = validateFacetName(name);
84
+ const facetDir = getWritableFacetDir(cwd, kind, scope);
85
+ if (content.trim().length === 0) {
86
+ throw new Error(`${kind} facet content is required.`);
87
+ }
88
+ if (scope === 'project') {
89
+ writeProjectLocalTextFile(cwd, join(facetDir, `${facetName}.md`), content, `${kind} facet`);
90
+ return facetName;
91
+ }
92
+ mkdirSync(facetDir, { recursive: true });
93
+ writeFileSync(join(facetDir, `${facetName}.md`), content, 'utf-8');
94
+ return facetName;
95
+ }
96
+ async function selectExistingFacet(kind, cwd, lookupConfig, lang) {
97
+ const entries = normalizeFacetEntries(kind, cwd, lookupConfig);
98
+ const selected = await selectExecOption(lang, execLabel(lang, 'facets.selectPrompt', { kind: execFacetKindLabel(lang, kind) }), entries.map((entry) => ({
99
+ label: sanitizeTerminalText(entry.name),
100
+ value: entry.name,
101
+ description: `${sanitizeTerminalText(execSourceLabel(lang, entry.source))} · ${sanitizeTerminalText(entry.description)}`,
102
+ })));
103
+ return selected;
104
+ }
105
+ async function selectFacetScope(message, lang) {
106
+ return await selectExecOption(lang, message, [
107
+ { label: execScopeLabel(lang, 'project'), value: 'project', description: execLabel(lang, 'scope.projectDescription') },
108
+ { label: execScopeLabel(lang, 'global'), value: 'global', description: execLabel(lang, 'scope.globalDescription') },
109
+ ]);
110
+ }
111
+ function runEditor(initialContent, name) {
112
+ const editor = process.env.VISUAL ?? process.env.EDITOR;
113
+ if (!editor) {
114
+ throw new Error('Set VISUAL or EDITOR to edit a facet.');
115
+ }
116
+ const tempDir = mkdtempSync(join(tmpdir(), 'takt-exec-facet-'));
117
+ const tempPath = join(tempDir, `${validateFacetName(name)}.md`);
118
+ try {
119
+ writeFileSync(tempPath, initialContent, 'utf-8');
120
+ const result = spawnSync(editor, [tempPath], { stdio: 'inherit' });
121
+ if (result.status !== null) {
122
+ if (result.status !== 0) {
123
+ throw new Error(`Editor exited with status ${result.status}.`);
124
+ }
125
+ }
126
+ else if (result.signal !== null) {
127
+ throw new Error(`Editor terminated by signal ${result.signal}.`);
128
+ }
129
+ else {
130
+ throw new Error('Editor exited without status or signal.');
131
+ }
132
+ return readFileSync(tempPath, 'utf-8');
133
+ }
134
+ finally {
135
+ rmSync(tempDir, { recursive: true, force: true });
136
+ }
137
+ }
138
+ async function confirmGeneratedFacet(kind, name, content, lang) {
139
+ info(execLabel(lang, 'facets.generated', {
140
+ kind: execFacetKindLabel(lang, kind),
141
+ name: sanitizeTerminalText(name),
142
+ }));
143
+ info(sanitizeTerminalText(content));
144
+ const approved = await selectExecOption(lang, execLabel(lang, 'facets.saveGenerated'), [
145
+ { label: execLabel(lang, 'common.save'), value: 'save' },
146
+ { label: execLabel(lang, 'common.discard'), value: 'discard' },
147
+ ]);
148
+ return approved === 'save';
149
+ }
150
+ async function promptFacetConsultation(kind, name, ctx) {
151
+ const input = await readInteractiveInput(execLabel(ctx.lang, 'facets.consultationPrompt', {
152
+ kind: execFacetKindLabel(ctx.lang, kind),
153
+ name: sanitizeTerminalText(name),
154
+ }), ctx.lang, EXEC_TEXT_INPUT_COMMAND_AVAILABILITY);
155
+ if (input === null) {
156
+ return null;
157
+ }
158
+ const trimmed = input.trim();
159
+ return trimmed.length > 0 ? trimmed : null;
160
+ }
161
+ async function createFacetWithAI(cwd, kind, scope, name, ctx) {
162
+ const request = await promptFacetConsultation(kind, name, ctx);
163
+ if (request === null) {
164
+ return null;
165
+ }
166
+ const generated = await askExecAssistant(cwd, { ...ctx, sessionId: undefined }, [
167
+ `Create a TAKT ${kind} facet named "${name}".`,
168
+ 'Use this user request:',
169
+ request,
170
+ '',
171
+ 'Return only markdown content for the facet.',
172
+ ].join('\n'), loadTemplate('exec_facet_create', ctx.lang));
173
+ if (!await confirmGeneratedFacet(kind, name, generated.content, ctx.lang)) {
174
+ return null;
175
+ }
176
+ return writeFacetFile(cwd, kind, scope, name, generated.content);
177
+ }
178
+ async function createFacetRef(cwd, kind, ctx, useAI) {
179
+ const scope = await selectFacetScope(execLabel(ctx.lang, 'facets.saveScope'), ctx.lang);
180
+ if (scope === null) {
181
+ return null;
182
+ }
183
+ const name = await promptText(execLabel(ctx.lang, 'facets.namePrompt'), 'custom', ctx.lang);
184
+ const ref = useAI
185
+ ? await createFacetWithAI(cwd, kind, scope, name, ctx)
186
+ : writeFacetFile(cwd, kind, scope, name, runEditor(`# ${name}\n\n`, name));
187
+ if (ref !== null) {
188
+ info(execLabel(ctx.lang, 'facets.created', {
189
+ scope: sanitizeTerminalText(execScopeLabel(ctx.lang, scope)),
190
+ kind: execFacetKindLabel(ctx.lang, kind),
191
+ name: sanitizeTerminalText(ref),
192
+ }));
193
+ }
194
+ return ref;
195
+ }
196
+ async function editFacetWithAI(cwd, kind, current, ctx) {
197
+ const scope = await selectFacetScope(execLabel(ctx.lang, 'facets.editedSaveScope'), ctx.lang);
198
+ if (scope === null) {
199
+ return null;
200
+ }
201
+ const content = readEffectiveFacetContent(cwd, kind, current, ctx.facetLookupConfig);
202
+ const request = await promptFacetConsultation(kind, current, ctx);
203
+ if (request === null) {
204
+ return null;
205
+ }
206
+ const generated = await askExecAssistant(cwd, { ...ctx, sessionId: undefined }, [
207
+ `Edit this TAKT ${kind} facet named "${current}".`,
208
+ 'Use this user request:',
209
+ request,
210
+ '',
211
+ 'Return only the updated markdown content.',
212
+ '',
213
+ content,
214
+ ].join('\n'), loadTemplate('exec_facet_edit', ctx.lang));
215
+ if (!await confirmGeneratedFacet(kind, current, generated.content, ctx.lang)) {
216
+ return null;
217
+ }
218
+ return overwriteFacetFile(cwd, kind, scope, current, generated.content);
219
+ }
220
+ async function editFacetWithEditor(cwd, kind, current, ctx) {
221
+ const scope = await selectFacetScope(execLabel(ctx.lang, 'facets.editedSaveScope'), ctx.lang);
222
+ if (scope === null) {
223
+ return null;
224
+ }
225
+ const edited = runEditor(readEffectiveFacetContent(cwd, kind, current, ctx.facetLookupConfig), current);
226
+ return overwriteFacetFile(cwd, kind, scope, current, edited);
227
+ }
228
+ export async function editInstructionFacetRef(cwd, current, defaultRef, ctx) {
229
+ const action = await selectExecOption(ctx.lang, execLabel(ctx.lang, 'facets.instructionMenu'), [
230
+ { label: execLabel(ctx.lang, 'facets.selectExisting', { current: sanitizeTerminalText(current) }), value: 'select' },
231
+ { label: execLabel(ctx.lang, 'facets.editWithAI'), value: 'ai_edit' },
232
+ { label: execLabel(ctx.lang, 'facets.createWithAI'), value: 'create_ai' },
233
+ { label: execLabel(ctx.lang, 'facets.openInEditor'), value: 'edit_editor' },
234
+ { label: execLabel(ctx.lang, 'facets.restoreDefault', { defaultRef: sanitizeTerminalText(defaultRef) }), value: 'default' },
235
+ { label: execLabel(ctx.lang, 'common.back'), value: 'back' },
236
+ ]);
237
+ if (action === 'select') {
238
+ return await selectExistingFacet('instructions', cwd, ctx.facetLookupConfig, ctx.lang) ?? current;
239
+ }
240
+ if (action === 'ai_edit') {
241
+ return await editFacetWithAI(cwd, 'instructions', current, ctx) ?? current;
242
+ }
243
+ if (action === 'create_ai') {
244
+ return await createFacetRef(cwd, 'instructions', ctx, true) ?? current;
245
+ }
246
+ if (action === 'edit_editor') {
247
+ return await editFacetWithEditor(cwd, 'instructions', current, ctx) ?? current;
248
+ }
249
+ if (action === 'default') {
250
+ return defaultRef;
251
+ }
252
+ return current;
253
+ }
254
+ async function selectFacetToToggle(kind, cwd, current, lookupConfig, lang) {
255
+ const entries = normalizeFacetEntries(kind, cwd, lookupConfig);
256
+ return await selectExecOption(lang, execLabel(lang, 'facets.togglePrompt', { kind: execFacetKindLabel(lang, kind) }), entries.map((entry) => ({
257
+ label: `${current.includes(entry.name) ? '[x]' : '[ ]'} ${sanitizeTerminalText(entry.name)}`,
258
+ value: entry.name,
259
+ description: `${sanitizeTerminalText(execSourceLabel(lang, entry.source))} · ${sanitizeTerminalText(entry.description)}`,
260
+ })));
261
+ }
262
+ export async function editFacetRefList(cwd, kind, current, ctx) {
263
+ const kindLabel = execFacetKindLabel(ctx.lang, kind);
264
+ const action = await selectExecOption(ctx.lang, execLabel(ctx.lang, 'facets.listPrompt', { kind: kindLabel }), [
265
+ {
266
+ label: execLabel(ctx.lang, 'facets.toggleExisting'),
267
+ value: 'toggle',
268
+ description: current.map((name) => sanitizeTerminalText(name)).join(', ') || execLabel(ctx.lang, 'common.none'),
269
+ },
270
+ { label: execLabel(ctx.lang, 'facets.createWithEditor'), value: 'create_editor' },
271
+ { label: execLabel(ctx.lang, 'facets.createWithAI'), value: 'create_ai' },
272
+ { label: execLabel(ctx.lang, 'facets.clearAll'), value: 'clear' },
273
+ { label: execLabel(ctx.lang, 'common.back'), value: 'back' },
274
+ ]);
275
+ if (action === 'toggle') {
276
+ const selected = await selectFacetToToggle(kind, cwd, current, ctx.facetLookupConfig, ctx.lang);
277
+ if (selected === null) {
278
+ return current;
279
+ }
280
+ return current.includes(selected)
281
+ ? current.filter((name) => name !== selected)
282
+ : [...current, selected];
283
+ }
284
+ if (action === 'create_editor' || action === 'create_ai') {
285
+ const created = await createFacetRef(cwd, kind, ctx, action === 'create_ai');
286
+ return created === null || current.includes(created) ? current : [...current, created];
287
+ }
288
+ if (action === 'clear') {
289
+ return [];
290
+ }
291
+ return current;
292
+ }
293
+ //# sourceMappingURL=facetEditor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"facetEditor.js","sourceRoot":"","sources":["../../../src/features/exec/facetEditor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClG,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,S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GAAG,EAAE,MAAM,KAAK,WAAW,CAAC,CAAC;QAC7E,OAAO,OAAO,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC;IACzF,CAAC;IACD,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { runExecCommand } from './command.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/exec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { runExecCommand } from './command.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/exec/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { Language } from '../../core/models/types.js';
2
+ import type { FacetType } from '../catalog/catalogFacets.js';
3
+ import type { ExecPresetScope } from './types.js';
4
+ export type ExecLanguage = Extract<Language, 'en' | 'ja'>;
5
+ export type LocalizedExecScope = ExecPresetScope | 'default' | 'project' | 'global';
6
+ export declare function execLabel(lang: ExecLanguage, key: string, vars?: Record<string, string>): string;
7
+ export declare function execCurrentLabel(lang: ExecLanguage, value: string): string;
8
+ export declare function execScopeLabel(lang: ExecLanguage, scope: LocalizedExecScope): string;
9
+ export declare function execSourceLabel(lang: ExecLanguage, source: string): string;
10
+ export declare function execFacetKindLabel(lang: ExecLanguage, kind: FacetType): string;
11
+ //# sourceMappingURL=labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../../src/features/exec/labels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;AAC1D,MAAM,MAAM,kBAAkB,GAAG,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEpF,wBAAgB,SAAS,CAAC,IAAI,EAAE,YAAY,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAEhG;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1E;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,kBAAkB,GAAG,MAAM,CAEpF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAE9E"}
@@ -0,0 +1,20 @@
1
+ import { getLabel } from '../../shared/i18n/index.js';
2
+ export function execLabel(lang, key, vars) {
3
+ return getLabel(`exec.${key}`, lang, vars);
4
+ }
5
+ export function execCurrentLabel(lang, value) {
6
+ return `${value} ${execLabel(lang, 'common.currentSuffix')}`;
7
+ }
8
+ export function execScopeLabel(lang, scope) {
9
+ return execLabel(lang, `common.${scope}`);
10
+ }
11
+ export function execSourceLabel(lang, source) {
12
+ if (source === 'builtin' || source === 'project' || source === 'global' || source === 'user') {
13
+ return execLabel(lang, `common.${source}`);
14
+ }
15
+ return source;
16
+ }
17
+ export function execFacetKindLabel(lang, kind) {
18
+ return execLabel(lang, `facets.${kind}`);
19
+ }
20
+ //# sourceMappingURL=labels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"labels.js","sourceRoot":"","sources":["../../../src/features/exec/labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAOtD,MAAM,UAAU,SAAS,CAAC,IAAkB,EAAE,GAAW,EAAE,IAA6B;IACtF,OAAO,QAAQ,CAAC,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAkB,EAAE,KAAa;IAChE,OAAO,GAAG,KAAK,IAAI,SAAS,CAAC,IAAI,EAAE,sBAAsB,CAAC,EAAE,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAkB,EAAE,KAAyB;IAC1E,OAAO,SAAS,CAAC,IAAI,EAAE,UAAU,KAAK,EAAE,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,IAAkB,EAAE,MAAc;IAChE,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QAC7F,OAAO,SAAS,CAAC,IAAI,EAAE,UAAU,MAAM,EAAE,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAkB,EAAE,IAAe;IACpE,OAAO,SAAS,CAAC,IAAI,EAAE,UAAU,IAAI,EAAE,CAAC,CAAC;AAC3C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { ExecConfig } from './types.js';
2
+ export declare function selectInitialExecConfig(cwd: string, preset: string | undefined): ExecConfig;
3
+ //# sourceMappingURL=presetSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presetSelection.d.ts","sourceRoot":"","sources":["../../../src/features/exec/presetSelection.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,CAa3F"}
@@ -0,0 +1,16 @@
1
+ import { info } from '../../shared/ui/index.js';
2
+ import { DEFAULT_EXEC_CONFIG } from './defaults.js';
3
+ import { loadExecPreset, loadLastUsedExecConfig } from './presetStore.js';
4
+ export function selectInitialExecConfig(cwd, preset) {
5
+ if (preset !== undefined) {
6
+ return loadExecPreset(preset, { projectDir: cwd }).config;
7
+ }
8
+ const lastUsed = loadLastUsedExecConfig();
9
+ if (lastUsed !== null) {
10
+ info('Previous configuration loaded');
11
+ return lastUsed;
12
+ }
13
+ info('Starting with default exec configuration');
14
+ return DEFAULT_EXEC_CONFIG;
15
+ }
16
+ //# sourceMappingURL=presetSelection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presetSelection.js","sourceRoot":"","sources":["../../../src/features/exec/presetSelection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAG1E,MAAM,UAAU,uBAAuB,CAAC,GAAW,EAAE,MAA0B;IAC7E,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,cAAc,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,MAAM,CAAC;IAC5D,CAAC;IAED,MAAM,QAAQ,GAAG,sBAAsB,EAAE,CAAC;IAC1C,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;QACtB,IAAI,CAAC,+BAA+B,CAAC,CAAC;QACtC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,IAAI,CAAC,0CAA0C,CAAC,CAAC;IACjD,OAAO,mBAAmB,CAAC;AAC7B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { SessionContext } from '../interactive/aiCaller.js';
2
+ import { type ExecLanguage } from './labels.js';
3
+ import { type ExecProviderModelDefaults } from './runtimeConfig.js';
4
+ import type { ExecConfig } from './types.js';
5
+ export declare function exportPresetAsWorkflow(cwd: string, lang: ExecLanguage, providerModelDefaults: ExecProviderModelDefaults): Promise<void>;
6
+ export declare function editPresetSetup(cwd: string, config: ExecConfig, lang: SessionContext['lang'], providerModelDefaults: ExecProviderModelDefaults): Promise<ExecConfig>;
7
+ //# sourceMappingURL=presetSetup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presetSetup.d.ts","sourceRoot":"","sources":["../../../src/features/exec/presetSetup.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AASjE,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3E,OAAO,EAAkC,KAAK,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACpG,OAAO,KAAK,EAAE,UAAU,EAAmB,MAAM,YAAY,CAAC;AAiF9D,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,YAAY,EAClB,qBAAqB,EAAE,yBAAyB,GAC/C,OAAO,CAAC,IAAI,CAAC,CAcf;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,CAAC,MAAM,CAAC,EAAE,qBAAqB,EAAE,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,CAwB1K"}
@@ -0,0 +1,120 @@
1
+ import { join } from 'node:path';
2
+ import { info } from '../../shared/ui/index.js';
3
+ import { sanitizeTerminalText } from '../../shared/utils/index.js';
4
+ import { deleteExecPreset, loadExecPresetFromSource, listExecPresetsBySource, saveExecPreset, validateExecPresetName, } from './presetStore.js';
5
+ import { DEFAULT_EXEC_CONFIG } from './defaults.js';
6
+ import { execLabel, execScopeLabel } from './labels.js';
7
+ import { writeProjectLocalTextFile } from './projectLocalFiles.js';
8
+ import { promptTextOrCancel, selectExecOption } from './promptUtils.js';
9
+ import { resolveExecConfigProviderModel } from './runtimeConfig.js';
10
+ import { buildExecWorkflowYaml } from './workflowTemplate.js';
11
+ async function selectPresetScope(message, lang) {
12
+ return await selectExecOption(lang, message, [
13
+ { label: execScopeLabel(lang, 'project'), value: 'project', description: execLabel(lang, 'preset.projectDescription') },
14
+ { label: execScopeLabel(lang, 'global'), value: 'global', description: execLabel(lang, 'preset.globalDescription') },
15
+ ]);
16
+ }
17
+ async function selectLoadPresetScope(lang) {
18
+ return await selectExecOption(lang, execLabel(lang, 'preset.loadSource'), [
19
+ { label: execScopeLabel(lang, 'default'), value: 'default', description: execLabel(lang, 'preset.defaultDescription') },
20
+ { label: execScopeLabel(lang, 'builtin'), value: 'builtin', description: execLabel(lang, 'preset.builtinDescription') },
21
+ { label: execScopeLabel(lang, 'project'), value: 'project', description: execLabel(lang, 'preset.projectDescription') },
22
+ { label: execScopeLabel(lang, 'global'), value: 'global', description: execLabel(lang, 'preset.globalDescription') },
23
+ ]);
24
+ }
25
+ async function selectPresetConfig(cwd, lang) {
26
+ const source = await selectLoadPresetScope(lang);
27
+ if (source === null) {
28
+ return null;
29
+ }
30
+ if (source === 'default') {
31
+ return DEFAULT_EXEC_CONFIG;
32
+ }
33
+ const presets = listExecPresetsBySource(source, { projectDir: cwd });
34
+ const selected = await selectExecOption(lang, execLabel(lang, 'preset.loadFromSource', { source: execScopeLabel(lang, source) }), presets.map((preset) => ({
35
+ label: sanitizeTerminalText(preset.name),
36
+ value: preset.name,
37
+ description: sanitizeTerminalText(preset.description),
38
+ })));
39
+ return selected === null ? null : loadExecPresetFromSource(selected, source, { projectDir: cwd }).config;
40
+ }
41
+ async function saveCurrentConfigAsPreset(cwd, config, lang) {
42
+ const scope = await selectPresetScope(execLabel(lang, 'preset.saveScope'), lang);
43
+ if (scope === null) {
44
+ return;
45
+ }
46
+ const name = await promptTextOrCancel(execLabel(lang, 'preset.namePrompt'), 'custom', lang);
47
+ if (name === null) {
48
+ return;
49
+ }
50
+ const description = await promptTextOrCancel(execLabel(lang, 'preset.descriptionPrompt'), execLabel(lang, 'preset.descriptionDefault'), lang);
51
+ if (description === null) {
52
+ return;
53
+ }
54
+ saveExecPreset(name, description, config, { projectDir: cwd, scope });
55
+ info(execLabel(lang, 'preset.saved', {
56
+ scope: sanitizeTerminalText(execScopeLabel(lang, scope)),
57
+ name: sanitizeTerminalText(name),
58
+ }));
59
+ }
60
+ async function deleteWritablePreset(cwd, lang) {
61
+ const scope = await selectPresetScope(execLabel(lang, 'preset.deleteScope'), lang);
62
+ if (scope === null) {
63
+ return;
64
+ }
65
+ const presets = listExecPresetsBySource(scope, { projectDir: cwd });
66
+ const selected = await selectExecOption(lang, execLabel(lang, 'preset.deleteFromSource', { source: execScopeLabel(lang, scope) }), presets.map((preset) => ({
67
+ label: sanitizeTerminalText(preset.name),
68
+ value: preset.name,
69
+ description: sanitizeTerminalText(preset.description),
70
+ })));
71
+ if (selected === null) {
72
+ return;
73
+ }
74
+ deleteExecPreset(selected, { projectDir: cwd, scope });
75
+ info(execLabel(lang, 'preset.deleted', {
76
+ scope: sanitizeTerminalText(execScopeLabel(lang, scope)),
77
+ name: sanitizeTerminalText(selected),
78
+ }));
79
+ }
80
+ export async function exportPresetAsWorkflow(cwd, lang, providerModelDefaults) {
81
+ const config = await selectPresetConfig(cwd, lang);
82
+ if (config === null) {
83
+ return;
84
+ }
85
+ const name = await promptTextOrCancel(execLabel(lang, 'preset.exportNamePrompt'), 'exported-exec', lang);
86
+ if (name === null) {
87
+ return;
88
+ }
89
+ validateExecPresetName(name);
90
+ const resolvedConfig = resolveExecConfigProviderModel(config, providerModelDefaults);
91
+ const yaml = buildExecWorkflowYaml(resolvedConfig, { workflowName: name, taskDescription: name });
92
+ writeProjectLocalTextFile(cwd, join(cwd, '.takt', 'workflows', `${name}.yaml`), yaml, 'exec workflow');
93
+ info(execLabel(lang, 'preset.exported', { name: sanitizeTerminalText(name) }));
94
+ }
95
+ export async function editPresetSetup(cwd, config, lang, providerModelDefaults) {
96
+ const action = await selectExecOption(lang, execLabel(lang, 'preset.menu'), [
97
+ { label: execLabel(lang, 'preset.load'), value: 'load' },
98
+ { label: execLabel(lang, 'preset.saveCurrent'), value: 'save' },
99
+ { label: execLabel(lang, 'preset.delete'), value: 'delete' },
100
+ { label: execLabel(lang, 'preset.exportAsWorkflow'), value: 'export' },
101
+ { label: execLabel(lang, 'common.back'), value: 'back' },
102
+ ]);
103
+ if (action === 'load') {
104
+ return await selectPresetConfig(cwd, lang) ?? config;
105
+ }
106
+ if (action === 'save') {
107
+ await saveCurrentConfigAsPreset(cwd, config, lang);
108
+ return config;
109
+ }
110
+ if (action === 'delete') {
111
+ await deleteWritablePreset(cwd, lang);
112
+ return config;
113
+ }
114
+ if (action === 'export') {
115
+ await exportPresetAsWorkflow(cwd, lang, providerModelDefaults);
116
+ return config;
117
+ }
118
+ return config;
119
+ }
120
+ //# sourceMappingURL=presetSetup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presetSetup.js","sourceRoot":"","sources":["../../../src/features/exec/presetSetup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EACL,gBAAgB,EAChB,wBAAwB,EACxB,uBAAuB,EACvB,cAAc,EACd,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,mBAAmB,EA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I,MAAM,CAAC;IACvD,CAAC;IACD,IAAI,MAAM,KAAK,MAAM,EAAE,CAAC;QACtB,MAAM,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;QACnD,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QACtC,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACxB,MAAM,sBAAsB,CAAC,GAAG,EAAE,IAAI,EAAE,qBAAqB,CAAC,CAAC;QAC/D,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ExecConfig, ExecPreset, ExecPresetScope } from './types.js';
2
+ interface ExecPresetStoreOptions {
3
+ projectDir: string;
4
+ globalConfigDir?: string;
5
+ builtinPresetsDir?: string;
6
+ }
7
+ interface LastUsedExecConfigOptions {
8
+ globalConfigDir?: string;
9
+ }
10
+ interface ExecPresetWriteOptions {
11
+ projectDir: string;
12
+ scope: Exclude<ExecPresetScope, 'builtin'>;
13
+ globalConfigDir?: string;
14
+ }
15
+ export declare function validateExecPresetName(name: string): string;
16
+ export declare function loadExecPreset(name: string, options: ExecPresetStoreOptions): ExecPreset;
17
+ export declare function loadExecPresetFromSource(name: string, source: ExecPresetScope, options: ExecPresetStoreOptions): ExecPreset;
18
+ export declare function listExecPresets(options: ExecPresetStoreOptions): ExecPreset[];
19
+ export declare function listExecPresetsBySource(source: ExecPresetScope, options: ExecPresetStoreOptions): ExecPreset[];
20
+ export declare function saveLastUsedExecConfig(config: ExecConfig, options?: LastUsedExecConfigOptions): void;
21
+ export declare function loadLastUsedExecConfig(options?: LastUsedExecConfigOptions): ExecConfig | null;
22
+ export declare function saveExecPreset(name: string, description: string, config: ExecConfig, options: ExecPresetWriteOptions): void;
23
+ export declare function deleteExecPreset(name: string, options: ExecPresetWriteOptions): void;
24
+ export {};
25
+ //# sourceMappingURL=presetStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presetStore.d.ts","sourceRoot":"","sources":["../../../src/features/exec/presetStore.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAmB,UAAU,EAAc,UAAU,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEvG,UAAU,sBAAsB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,UAAU,yBAAyB;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,sBAAsB;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC,CAAC;IAC3C,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAiCD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAK3D;AA8KD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,sBAAsB,GAAG,UAAU,CAOxF;AAgBD,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,sBAAsB,GAC9B,UAAU,CAUZ;AAYD,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,UAAU,EAAE,CA0B7E;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,sBAAsB,GAC9B,UAAU,EAAE,CAkBd;AA6BD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAIpG;AAED,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,yBAAyB,G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