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,431 @@
1
+ import { resolveTtyPolicy } from '../../shared/prompt/tty.js';
2
+ import { info } from '../../shared/ui/index.js';
3
+ import { sanitizeTerminalText } from '../../shared/utils/index.js';
4
+ import { assertExecActorName, assertExecConfig, assertExecProviderEffort, EXEC_PROVIDERS, getExecModelCandidates, getSupportedExecEfforts, } from './configValidation.js';
5
+ import { formatProviderModel, formatActorDetails, normalizeExecConfigEfforts, resolveEffortAfterProviderModelOverride, resolveModelAfterProviderOverride, } from './configOps.js';
6
+ import { DEFAULT_EXEC_CONFIG } from './defaults.js';
7
+ import { editFacetRefList, editInstructionFacetRef } from './facetEditor.js';
8
+ import { execCurrentLabel, execLabel } from './labels.js';
9
+ import { editPresetSetup } from './presetSetup.js';
10
+ import { promptInteger, promptText, selectExecOption } from './promptUtils.js';
11
+ import { ProjectBoundaryError } from './projectLocalFiles.js';
12
+ import { createExecSessionContext, shouldKeepExecSession, } from './assistantSession.js';
13
+ import { resolveExecConfigProviderModel, resolveExecProviderModel, } from './runtimeConfig.js';
14
+ const CUSTOM_MODEL_VALUE = '__custom_model__';
15
+ const DEFAULT_MODEL_VALUE = '__default_model__';
16
+ const DEFAULT_EFFORT_VALUE = '__default_effort__';
17
+ function supportsAnyExecEffort(provider) {
18
+ return getSupportedExecEfforts(provider).length > 0;
19
+ }
20
+ function shouldKeepSetupMenuOpen() {
21
+ return resolveTtyPolicy().useTty && !process.stdin.readableEnded;
22
+ }
23
+ function buildSetupSectionOptions(current, lang) {
24
+ return [
25
+ {
26
+ label: execLabel(lang, 'setup.assistantSummary', {
27
+ summary: `${formatProviderModel(current.session.provider, current.session.model, lang)}/${sanitizeTerminalText(current.session.effort ?? execLabel(lang, 'common.none'))}`,
28
+ }),
29
+ value: 'assistant',
30
+ },
31
+ { label: execLabel(lang, 'setup.workersSummary', { count: String(current.workers.length) }), value: 'workers' },
32
+ { label: execLabel(lang, 'setup.reviewsSummary', { count: String(current.reviews.length) }), value: 'reviews' },
33
+ { label: execLabel(lang, 'setup.replanSummary', { instruction: sanitizeTerminalText(current.replan.instruction) }), value: 'replan' },
34
+ {
35
+ label: execLabel(lang, 'setup.loopSummary', {
36
+ small: String(current.loop.smallThreshold),
37
+ large: String(current.loop.largeThreshold),
38
+ max: String(current.loop.maxSteps),
39
+ }),
40
+ value: 'loop',
41
+ },
42
+ { label: execLabel(lang, 'setup.preset'), value: 'preset' },
43
+ { label: execLabel(lang, 'common.back'), value: 'back' },
44
+ ];
45
+ }
46
+ function formatFacetListForTerminal(values, lang) {
47
+ return values.length > 0 ? values.map((value) => sanitizeTerminalText(value)).join(', ') : execLabel(lang, 'common.none');
48
+ }
49
+ function buildNextActorName(prefix, actors) {
50
+ const existingNames = new Set(actors.map((actor) => actor.name));
51
+ for (let index = 1; index <= actors.length + 1; index += 1) {
52
+ const candidate = `${prefix}-${index}`;
53
+ if (!existingNames.has(candidate)) {
54
+ return candidate;
55
+ }
56
+ }
57
+ throw new Error(`Unable to allocate ${prefix} actor name.`);
58
+ }
59
+ async function selectProvider(current, lang) {
60
+ const selected = await selectExecOption(lang, execLabel(lang, 'settings.provider'), EXEC_PROVIDERS.map((provider) => ({
61
+ label: provider === current ? execCurrentLabel(lang, provider) : provider,
62
+ value: provider,
63
+ })));
64
+ return selected ?? current;
65
+ }
66
+ async function selectEffort(provider, current, lang) {
67
+ const efforts = getSupportedExecEfforts(provider);
68
+ if (efforts.length === 0) {
69
+ throw new Error(`Provider "${provider}" does not support exec effort selection.`);
70
+ }
71
+ const defaultLabel = execLabel(lang, 'settings.defaultEffort');
72
+ const selected = await selectExecOption(lang, execLabel(lang, 'settings.effort'), [
73
+ {
74
+ label: current === undefined ? execCurrentLabel(lang, defaultLabel) : defaultLabel,
75
+ value: DEFAULT_EFFORT_VALUE,
76
+ },
77
+ ...efforts.map((effort) => ({
78
+ label: effort === current ? execCurrentLabel(lang, effort) : effort,
79
+ value: effort,
80
+ })),
81
+ ]);
82
+ if (selected === null) {
83
+ return current;
84
+ }
85
+ if (selected === DEFAULT_EFFORT_VALUE) {
86
+ return undefined;
87
+ }
88
+ return selected;
89
+ }
90
+ function formatModelValue(model, lang) {
91
+ return model === undefined ? execLabel(lang, 'common.providerDefault') : sanitizeTerminalText(model);
92
+ }
93
+ function requireCustomModelInput(model, lang) {
94
+ if (model.trim().length === 0) {
95
+ throw new Error(execLabel(lang, 'settings.customModelRequired'));
96
+ }
97
+ return model;
98
+ }
99
+ async function selectModel(provider, rawCurrent, effectiveCurrent, lang) {
100
+ const candidates = [...new Set([
101
+ ...getExecModelCandidates(provider),
102
+ ...(rawCurrent !== undefined ? [rawCurrent] : []),
103
+ ...(effectiveCurrent !== undefined ? [effectiveCurrent] : []),
104
+ ])];
105
+ const defaultLabel = execLabel(lang, 'settings.defaultModel', { value: execLabel(lang, 'common.providerDefault') });
106
+ const selected = await selectExecOption(lang, execLabel(lang, 'settings.model'), [
107
+ {
108
+ label: rawCurrent === undefined ? execCurrentLabel(lang, defaultLabel) : defaultLabel,
109
+ value: DEFAULT_MODEL_VALUE,
110
+ },
111
+ ...candidates.map((model) => ({
112
+ label: model === rawCurrent ? execCurrentLabel(lang, sanitizeTerminalText(model)) : sanitizeTerminalText(model),
113
+ value: model,
114
+ })),
115
+ { label: execLabel(lang, 'settings.customModel'), value: CUSTOM_MODEL_VALUE },
116
+ ]);
117
+ if (selected === null) {
118
+ return { changed: false };
119
+ }
120
+ if (selected === DEFAULT_MODEL_VALUE) {
121
+ return { changed: true, model: undefined };
122
+ }
123
+ if (selected === CUSTOM_MODEL_VALUE) {
124
+ const model = await promptText(execLabel(lang, 'settings.customModelPrompt'), rawCurrent ?? effectiveCurrent ?? '', lang);
125
+ return { changed: true, model: requireCustomModelInput(model, lang) };
126
+ }
127
+ return { changed: true, model: selected };
128
+ }
129
+ async function editSessionConfig(session, effectiveSession, providerModelDefaults, lang) {
130
+ let current = effectiveSession;
131
+ let raw = session;
132
+ while (true) {
133
+ const options = [
134
+ { label: execLabel(lang, 'fields.provider', { value: sanitizeTerminalText(current.provider) }), value: 'provider' },
135
+ { label: execLabel(lang, 'fields.model', { value: formatModelValue(raw.model, lang) }), value: 'model' },
136
+ ];
137
+ if (supportsAnyExecEffort(current.provider)) {
138
+ options.push({
139
+ label: execLabel(lang, 'fields.effort', { value: sanitizeTerminalText(current.effort ?? execLabel(lang, 'common.none')) }),
140
+ value: 'effort',
141
+ });
142
+ }
143
+ options.push({ label: execLabel(lang, 'common.back'), value: 'back' });
144
+ const field = await selectExecOption(lang, execLabel(lang, 'settings.assistant'), options);
145
+ if (field === null || field === 'back') {
146
+ return raw;
147
+ }
148
+ if (field === 'provider') {
149
+ const provider = await selectProvider(current.provider, lang);
150
+ if (provider !== current.provider) {
151
+ const model = resolveModelAfterProviderOverride(current.provider, provider, current.model, undefined);
152
+ const nextResolvedProviderModel = resolveExecProviderModel(provider, model, providerModelDefaults, 'exec.session.provider');
153
+ current = {
154
+ ...current,
155
+ ...nextResolvedProviderModel,
156
+ effort: resolveEffortAfterProviderModelOverride(current.provider, current.model, nextResolvedProviderModel.provider, nextResolvedProviderModel.model, current.effort),
157
+ };
158
+ raw = { ...raw, provider, model, effort: current.effort };
159
+ }
160
+ }
161
+ if (field === 'model') {
162
+ const selection = await selectModel(current.provider, raw.model, current.model, lang);
163
+ if (selection.changed) {
164
+ const nextResolvedProviderModel = resolveExecProviderModel(raw.provider, selection.model, providerModelDefaults, 'exec.session.provider');
165
+ const effort = resolveEffortAfterProviderModelOverride(current.provider, current.model, nextResolvedProviderModel.provider, nextResolvedProviderModel.model, current.effort);
166
+ current = { ...current, ...nextResolvedProviderModel, effort };
167
+ raw = { ...raw, model: selection.model, effort };
168
+ }
169
+ }
170
+ if (field === 'effort') {
171
+ current = { ...current, effort: await selectEffort(current.provider, current.effort, lang) };
172
+ raw = { ...raw, effort: current.effort };
173
+ }
174
+ assertExecProviderEffort(current.provider, current.model, current.effort, 'exec.session.effort');
175
+ if (!shouldKeepSetupMenuOpen()) {
176
+ return raw;
177
+ }
178
+ }
179
+ }
180
+ async function editActor(cwd, actor, effectiveActor, defaultActor, ctx, providerModelDefaults) {
181
+ let current = effectiveActor;
182
+ let raw = actor;
183
+ while (true) {
184
+ const options = [
185
+ { label: execLabel(ctx.lang, 'fields.name', { value: sanitizeTerminalText(current.name) }), value: 'name' },
186
+ { label: execLabel(ctx.lang, 'fields.provider', { value: sanitizeTerminalText(current.provider) }), value: 'provider' },
187
+ { label: execLabel(ctx.lang, 'fields.model', { value: formatModelValue(raw.model, ctx.lang) }), value: 'model' },
188
+ ];
189
+ if (supportsAnyExecEffort(current.provider)) {
190
+ options.push({
191
+ label: execLabel(ctx.lang, 'fields.effort', { value: sanitizeTerminalText(current.effort ?? execLabel(ctx.lang, 'common.none')) }),
192
+ value: 'effort',
193
+ });
194
+ }
195
+ options.push({ label: execLabel(ctx.lang, 'fields.instruction', { value: sanitizeTerminalText(current.instruction) }), value: 'instruction' }, { label: execLabel(ctx.lang, 'fields.knowledge', { value: formatFacetListForTerminal(current.knowledge, ctx.lang) }), value: 'knowledge' }, { label: execLabel(ctx.lang, 'fields.policy', { value: formatFacetListForTerminal(current.policy, ctx.lang) }), value: 'policy' }, { label: execLabel(ctx.lang, 'common.back'), value: 'back' });
196
+ const field = await selectExecOption(ctx.lang, execLabel(ctx.lang, 'settings.actor', { name: sanitizeTerminalText(current.name) }), options);
197
+ if (field === null || field === 'back') {
198
+ return raw;
199
+ }
200
+ if (field === 'name') {
201
+ const name = await promptText(execLabel(ctx.lang, 'settings.name'), current.name, ctx.lang);
202
+ assertExecActorName(name, `exec.${current.name}.name`);
203
+ raw = { ...raw, name };
204
+ current = { ...current, name };
205
+ }
206
+ if (field === 'provider') {
207
+ const provider = await selectProvider(current.provider, ctx.lang);
208
+ if (provider !== current.provider) {
209
+ const model = resolveModelAfterProviderOverride(current.provider, provider, current.model, undefined);
210
+ const nextResolvedProviderModel = resolveExecProviderModel(provider, model, providerModelDefaults, `exec.${current.name}.provider`);
211
+ current = {
212
+ ...current,
213
+ ...nextResolvedProviderModel,
214
+ effort: resolveEffortAfterProviderModelOverride(current.provider, current.model, nextResolvedProviderModel.provider, nextResolvedProviderModel.model, current.effort),
215
+ };
216
+ raw = { ...raw, provider, model, effort: current.effort };
217
+ }
218
+ }
219
+ if (field === 'model') {
220
+ const selection = await selectModel(current.provider, raw.model, current.model, ctx.lang);
221
+ if (selection.changed) {
222
+ const nextResolvedProviderModel = resolveExecProviderModel(raw.provider, selection.model, providerModelDefaults, `exec.${current.name}.provider`);
223
+ const effort = resolveEffortAfterProviderModelOverride(current.provider, current.model, nextResolvedProviderModel.provider, nextResolvedProviderModel.model, current.effort);
224
+ current = { ...current, ...nextResolvedProviderModel, effort };
225
+ raw = { ...raw, model: selection.model, effort };
226
+ }
227
+ }
228
+ if (field === 'effort') {
229
+ current = { ...current, effort: await selectEffort(current.provider, current.effort, ctx.lang) };
230
+ raw = { ...raw, effort: current.effort };
231
+ }
232
+ if (field === 'instruction') {
233
+ const instruction = await editInstructionFacetRef(cwd, current.instruction, defaultActor.instruction, ctx);
234
+ raw = {
235
+ ...raw,
236
+ instruction,
237
+ };
238
+ current = {
239
+ ...current,
240
+ instruction,
241
+ };
242
+ }
243
+ if (field === 'knowledge') {
244
+ const knowledge = await editFacetRefList(cwd, 'knowledge', current.knowledge, ctx);
245
+ raw = { ...raw, knowledge };
246
+ current = { ...current, knowledge };
247
+ }
248
+ if (field === 'policy') {
249
+ const policy = await editFacetRefList(cwd, 'policies', current.policy, ctx);
250
+ raw = { ...raw, policy };
251
+ current = { ...current, policy };
252
+ }
253
+ assertExecProviderEffort(current.provider, current.model, current.effort, `exec.${current.name}.effort`);
254
+ if (!shouldKeepSetupMenuOpen()) {
255
+ return raw;
256
+ }
257
+ }
258
+ }
259
+ async function editActorList(cwd, kind, config, template, ctx, providerModelDefaults) {
260
+ const label = execLabel(ctx.lang, `actors.${kind}`);
261
+ const actorNamePrefix = kind === 'workers' ? 'worker' : 'review';
262
+ let current = config[kind];
263
+ while (true) {
264
+ const effectiveActors = resolveExecConfigProviderModel({ ...config, [kind]: current }, providerModelDefaults)[kind];
265
+ const action = await selectExecOption(ctx.lang, label, [
266
+ ...effectiveActors.map((actor, index) => ({
267
+ label: `${sanitizeTerminalText(current[index]?.name ?? actor.name)}: ${formatActorDetails(actor, ctx.lang)}`,
268
+ value: `edit:${index}`,
269
+ })),
270
+ { label: execLabel(ctx.lang, 'common.add'), value: 'add' },
271
+ { label: execLabel(ctx.lang, 'common.delete'), value: 'delete' },
272
+ { label: execLabel(ctx.lang, 'common.back'), value: 'back' },
273
+ ]);
274
+ if (action === null || action === 'back') {
275
+ return current;
276
+ }
277
+ if (action === 'add') {
278
+ const actorName = buildNextActorName(actorNamePrefix, current);
279
+ assertExecActorName(actorName, `${label}.name`);
280
+ current = [...current, { ...template, name: actorName }];
281
+ }
282
+ else if (action === 'delete') {
283
+ if (current.length === 1) {
284
+ info(execLabel(ctx.lang, 'actors.mustContainOne', { label }));
285
+ }
286
+ else {
287
+ const selected = await selectExecOption(ctx.lang, execLabel(ctx.lang, 'actors.deletePrompt', { label }), current.map((actor, index) => ({
288
+ label: sanitizeTerminalText(actor.name),
289
+ value: String(index),
290
+ })));
291
+ if (selected !== null) {
292
+ current = current.filter((_, index) => index !== Number(selected));
293
+ }
294
+ }
295
+ }
296
+ else if (action.startsWith('edit:')) {
297
+ const index = Number(action.slice('edit:'.length));
298
+ const actor = current[index];
299
+ const effectiveActor = effectiveActors[index];
300
+ if (!actor) {
301
+ throw new Error(execLabel(ctx.lang, 'actors.invalidIndex', { label, index: String(index) }));
302
+ }
303
+ if (!effectiveActor) {
304
+ throw new Error(execLabel(ctx.lang, 'actors.invalidIndex', { label, index: String(index) }));
305
+ }
306
+ const updated = await editActor(cwd, actor, effectiveActor, template, ctx, providerModelDefaults);
307
+ current = current.map((entry, entryIndex) => entryIndex === index ? updated : entry);
308
+ }
309
+ if (!shouldKeepSetupMenuOpen()) {
310
+ return current;
311
+ }
312
+ }
313
+ }
314
+ async function editReplanConfig(cwd, config, ctx) {
315
+ let current = config;
316
+ while (true) {
317
+ const field = await selectExecOption(ctx.lang, execLabel(ctx.lang, 'replan.settings'), [
318
+ { label: execLabel(ctx.lang, 'fields.instruction', { value: sanitizeTerminalText(current.replan.instruction) }), value: 'instruction' },
319
+ { label: execLabel(ctx.lang, 'fields.knowledge', { value: formatFacetListForTerminal(current.replan.knowledge, ctx.lang) }), value: 'knowledge' },
320
+ { label: execLabel(ctx.lang, 'fields.policy', { value: formatFacetListForTerminal(current.replan.policy, ctx.lang) }), value: 'policy' },
321
+ { label: execLabel(ctx.lang, 'common.back'), value: 'back' },
322
+ ]);
323
+ if (field === null || field === 'back') {
324
+ return current;
325
+ }
326
+ if (field === 'instruction') {
327
+ current = {
328
+ ...current,
329
+ replan: {
330
+ ...current.replan,
331
+ instruction: await editInstructionFacetRef(cwd, current.replan.instruction, DEFAULT_EXEC_CONFIG.replan.instruction, ctx),
332
+ },
333
+ };
334
+ }
335
+ if (field === 'knowledge') {
336
+ current = { ...current, replan: { ...current.replan, knowledge: await editFacetRefList(cwd, 'knowledge', current.replan.knowledge, ctx) } };
337
+ }
338
+ if (field === 'policy') {
339
+ current = { ...current, replan: { ...current.replan, policy: await editFacetRefList(cwd, 'policies', current.replan.policy, ctx) } };
340
+ }
341
+ if (!shouldKeepSetupMenuOpen()) {
342
+ return current;
343
+ }
344
+ }
345
+ }
346
+ async function editLoopConfig(config, lang) {
347
+ let current = config;
348
+ while (true) {
349
+ const field = await selectExecOption(lang, execLabel(lang, 'loop.settings'), [
350
+ { label: execLabel(lang, 'fields.smallLoopThreshold', { value: String(current.loop.smallThreshold) }), value: 'small' },
351
+ { label: execLabel(lang, 'fields.largeLoopThreshold', { value: String(current.loop.largeThreshold) }), value: 'large' },
352
+ { label: execLabel(lang, 'fields.maxSteps', { value: String(current.loop.maxSteps) }), value: 'max' },
353
+ { label: execLabel(lang, 'common.back'), value: 'back' },
354
+ ]);
355
+ if (field === null || field === 'back') {
356
+ return current;
357
+ }
358
+ if (field === 'small') {
359
+ current = { ...current, loop: { ...current.loop, smallThreshold: await promptInteger(execLabel(lang, 'loop.smallThresholdPrompt'), current.loop.smallThreshold, lang) } };
360
+ }
361
+ if (field === 'large') {
362
+ current = { ...current, loop: { ...current.loop, largeThreshold: await promptInteger(execLabel(lang, 'loop.largeThresholdPrompt'), current.loop.largeThreshold, lang) } };
363
+ }
364
+ if (field === 'max') {
365
+ current = { ...current, loop: { ...current.loop, maxSteps: await promptInteger(execLabel(lang, 'loop.maxStepsPrompt'), current.loop.maxSteps, lang) } };
366
+ }
367
+ if (!shouldKeepSetupMenuOpen()) {
368
+ return current;
369
+ }
370
+ }
371
+ }
372
+ export async function runSetupMenu(cwd, config, ctx, providerModelDefaults) {
373
+ const workerTemplate = DEFAULT_EXEC_CONFIG.workers[0];
374
+ const reviewTemplate = DEFAULT_EXEC_CONFIG.reviews[0];
375
+ if (!workerTemplate || !reviewTemplate) {
376
+ throw new Error('Default exec actor templates are missing.');
377
+ }
378
+ let current = config;
379
+ let setupCtx = ctx;
380
+ if (!shouldKeepSetupMenuOpen()) {
381
+ const runtimeConfig = resolveExecConfigProviderModel(current, providerModelDefaults);
382
+ await selectExecOption(setupCtx.lang, execLabel(setupCtx.lang, 'setup.teamConfiguration'), buildSetupSectionOptions(runtimeConfig, setupCtx.lang));
383
+ return current;
384
+ }
385
+ while (true) {
386
+ const runtimeConfig = resolveExecConfigProviderModel(current, providerModelDefaults);
387
+ const section = await selectExecOption(setupCtx.lang, execLabel(setupCtx.lang, 'setup.teamConfiguration'), buildSetupSectionOptions(runtimeConfig, setupCtx.lang));
388
+ if (section === null || section === 'back') {
389
+ return current;
390
+ }
391
+ try {
392
+ const next = normalizeExecConfigEfforts(await resolveSetupSection(cwd, section, current, runtimeConfig, workerTemplate, reviewTemplate, setupCtx, providerModelDefaults), providerModelDefaults);
393
+ assertExecConfig(next);
394
+ const nextRuntimeConfig = resolveExecConfigProviderModel(next, providerModelDefaults);
395
+ const nextSessionId = shouldKeepExecSession(runtimeConfig.session, nextRuntimeConfig.session) ? setupCtx.sessionId : undefined;
396
+ setupCtx = createExecSessionContext(cwd, nextRuntimeConfig, nextSessionId);
397
+ current = next;
398
+ }
399
+ catch (error) {
400
+ if (error instanceof ProjectBoundaryError) {
401
+ throw error;
402
+ }
403
+ info(sanitizeTerminalText(error instanceof Error ? error.message : String(error)));
404
+ }
405
+ if (!shouldKeepSetupMenuOpen()) {
406
+ return current;
407
+ }
408
+ }
409
+ }
410
+ async function resolveSetupSection(cwd, section, config, runtimeConfig, workerTemplate, reviewTemplate, ctx, providerModelDefaults) {
411
+ if (section === 'assistant') {
412
+ return { ...config, session: await editSessionConfig(config.session, runtimeConfig.session, providerModelDefaults, ctx.lang) };
413
+ }
414
+ if (section === 'workers') {
415
+ return { ...config, workers: await editActorList(cwd, 'workers', config, workerTemplate, ctx, providerModelDefaults) };
416
+ }
417
+ if (section === 'reviews') {
418
+ return { ...config, reviews: await editActorList(cwd, 'reviews', config, reviewTemplate, ctx, providerModelDefaults) };
419
+ }
420
+ if (section === 'replan') {
421
+ return editReplanConfig(cwd, config, ctx);
422
+ }
423
+ if (section === 'loop') {
424
+ return editLoopConfig(config, ctx.lang);
425
+ }
426
+ if (section === 'preset') {
427
+ return editPresetSetup(cwd, config, ctx.lang, providerModelDefaults);
428
+ }
429
+ return config;
430
+ }
431
+ //# sourceMappingURL=setupMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupMenu.js","sourceRoot":"","sources":["../../../src/features/exec/setupMenu.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,cAAc,EACd,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,EAC1B,uCAAuC,EACvC,iCAAiC,GAClC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EACL,wBAAwB,EACxB,qBAAqB,GAEtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,wBAAwB,GAEzB,MAAM,oBAAoB,CAAC;AAe5B,MAAM,kBAAkB,GAAG,kBAAkB,CAAC;AAC9C,MAAM,mBAAmB,GAAG,mBAAmB,CAAC;AAChD,MAAM,oBAAoB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AW,EAAE,CAAC;QAC5B,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,qBAAqB,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;IACjI,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,qBAAqB,CAAC,EAAE,CAAC;IACzH,CAAC;IACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QAC1B,OAAO,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,qBAAqB,CAAC,EAAE,CAAC;IACzH,CAAC;IACD,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IACD,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,OAAO,cAAc,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;IACD,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import type { ProviderType } from '../../infra/providers/index.js';
2
+ export type ExecEffort = 'minimal' | 'low' | 'medium' | 'high' | 'xhigh' | 'max';
3
+ export interface ExecSessionConfig {
4
+ provider?: ProviderType;
5
+ model?: string;
6
+ effort?: ExecEffort;
7
+ }
8
+ export interface ExecActorConfig {
9
+ name: string;
10
+ provider?: ProviderType;
11
+ model?: string;
12
+ effort?: ExecEffort;
13
+ instruction: string;
14
+ knowledge: string[];
15
+ policy: string[];
16
+ }
17
+ export interface ExecReplanConfig {
18
+ instruction: string;
19
+ knowledge: string[];
20
+ policy: string[];
21
+ }
22
+ export interface ExecLoopConfig {
23
+ smallThreshold: number;
24
+ largeThreshold: number;
25
+ maxSteps: number;
26
+ }
27
+ export interface ExecConfig {
28
+ session: ExecSessionConfig;
29
+ replan: ExecReplanConfig;
30
+ workers: ExecActorConfig[];
31
+ reviews: ExecActorConfig[];
32
+ loop: ExecLoopConfig;
33
+ }
34
+ export interface ResolvedExecSessionConfig extends ExecSessionConfig {
35
+ provider: ProviderType;
36
+ }
37
+ export interface ResolvedExecActorConfig extends ExecActorConfig {
38
+ provider: ProviderType;
39
+ }
40
+ export interface ResolvedExecConfig extends ExecConfig {
41
+ session: ResolvedExecSessionConfig;
42
+ workers: ResolvedExecActorConfig[];
43
+ reviews: ResolvedExecActorConfig[];
44
+ }
45
+ export type ExecPresetScope = 'project' | 'global' | 'builtin';
46
+ export interface ExecPreset {
47
+ name: string;
48
+ description: string;
49
+ source: ExecPresetScope;
50
+ config: ExecConfig;
51
+ }
52
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/exec/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAEnE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;AAEjF,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI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2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/features/exec/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import type { ProviderPermissionProfiles } from '../../core/models/provider-profiles.js';
2
+ import type { ConversationMessage } from '../interactive/interactive.js';
3
+ import { loadRunSessionContext } from '../interactive/runSessionReader.js';
4
+ import { type TaskExecutionOptions } from '../tasks/index.js';
5
+ import type { ExecConfig, ResolvedExecConfig } from './types.js';
6
+ export declare function buildExecReadonlyProviderProfileOverrides(config: ExecConfig): ProviderPermissionProfiles;
7
+ export declare function buildTaskInstructionPrompt(history: ConversationMessage[], hasSessionContext: boolean, inlineTaskText: string): string | null;
8
+ export declare function runGeneratedWorkflow(cwd: string, runtimeConfig: ResolvedExecConfig, task: string, agentOverrides: TaskExecutionOptions | undefined): Promise<ReturnType<typeof loadRunSessionContext>>;
9
+ //# sourceMappingURL=workflowRunner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowRunner.d.ts","sourceRoot":"","sources":["../../../src/features/exec/workflowRunner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAGzF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGpF,OAAO,KAAK,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAcjE,wBAAgB,yCAAyC,CAAC,MAAM,EAAE,UAAU,GAAG,0BAA0B,CASxG;AAoCD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,mBAAmB,EAAE,EAC9B,iBAAiB,EAAE,OAAO,EAC1B,cAAc,EAAE,MAAM,GACrB,MAAM,GAAG,IAAI,CAyBf;AAED,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,kBAAkB,EACjC,IAAI,EAAE,MAAM,EACZ,cAAc,EAAE,oBAAoB,GAAG,SAAS,GAC/C,OAAO,CAAC,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC,CAcnD"}
@@ -0,0 +1,96 @@
1
+ import { join } from 'node:path';
2
+ import { generateExecutionReportDir } from '../../core/workflow/run/run-slug.js';
3
+ import { loadRunSessionContext } from '../interactive/runSessionReader.js';
4
+ import { selectAndExecuteTask } from '../tasks/index.js';
5
+ import { EXEC_PROVIDERS } from './configValidation.js';
6
+ import { writeProjectLocalTextFile } from './projectLocalFiles.js';
7
+ import { buildExecWorkflowYaml, buildReviewReportName } from './workflowTemplate.js';
8
+ const READONLY_PERMISSION_MODE = 'readonly';
9
+ function buildReadonlyStepPermissionOverrides(config) {
10
+ return Object.fromEntries([
11
+ ...config.reviews.map((review) => review.name),
12
+ 'replan',
13
+ '_loop_judge_execute_review',
14
+ '_loop_judge_replan_execute_review',
15
+ ].map((stepName) => [stepName, READONLY_PERMISSION_MODE]));
16
+ }
17
+ export function buildExecReadonlyProviderProfileOverrides(config) {
18
+ const stepPermissionOverrides = buildReadonlyStepPermissionOverrides(config);
19
+ return Object.fromEntries(EXEC_PROVIDERS.map((provider) => [
20
+ provider,
21
+ {
22
+ defaultPermissionMode: 'edit',
23
+ stepPermissionOverrides,
24
+ },
25
+ ]));
26
+ }
27
+ async function generateWorkflowFile(cwd, config, task, workflowName) {
28
+ const workflowDir = join(cwd, '.takt', 'exec');
29
+ const workflowPath = join(workflowDir, 'workflow.yaml');
30
+ const yaml = buildExecWorkflowYaml(config, {
31
+ workflowName,
32
+ taskDescription: task,
33
+ });
34
+ writeProjectLocalTextFile(cwd, workflowPath, yaml, 'exec workflow');
35
+ return workflowPath;
36
+ }
37
+ function loadCompletedExecRun(cwd, runSlug, expectedReviewReportNames) {
38
+ const context = loadRunSessionContext(cwd, runSlug, { reportNames: expectedReviewReportNames });
39
+ const actualReportNames = new Set(context.reports.map((report) => report.filename));
40
+ const missingReportNames = expectedReviewReportNames.filter((name) => !actualReportNames.has(name));
41
+ if (missingReportNames.length > 0) {
42
+ throw new Error(`Exec review result report was not found: ${missingReportNames.join(', ')}`);
43
+ }
44
+ return {
45
+ ...context,
46
+ reports: expectedReviewReportNames.map((name) => {
47
+ const report = context.reports.find((entry) => entry.filename === name);
48
+ if (report === undefined) {
49
+ throw new Error(`Exec review result report was not found: ${name}`);
50
+ }
51
+ return report;
52
+ }),
53
+ };
54
+ }
55
+ export function buildTaskInstructionPrompt(history, hasSessionContext, inlineTaskText) {
56
+ const normalizedInlineTaskText = inlineTaskText.trim();
57
+ if (history.length === 0 && !hasSessionContext && normalizedInlineTaskText.length === 0) {
58
+ return null;
59
+ }
60
+ const lines = [
61
+ 'Create a concise executable task instruction for TAKT exec.',
62
+ '',
63
+ 'TAKT is a CLI workflow runner for executing a user task with coordinated AI agents.',
64
+ '`takt exec` is the interactive task-entry mode that turns this conversation into a generated workflow and then runs it.',
65
+ 'The generated workflow uses Worker agent(s) to implement the task, Review agent(s) to review the result, a Replanning agent only when user-level replanning is needed, and loop detection to prevent repeated unproductive cycles.',
66
+ ];
67
+ if (history.length > 0) {
68
+ lines.push('', 'Conversation:');
69
+ for (const message of history) {
70
+ lines.push(`${message.role === 'user' ? 'User' : 'Assistant'}: ${message.content}`);
71
+ }
72
+ }
73
+ else if (hasSessionContext) {
74
+ lines.push('', 'Use the active exec assistant session context as the conversation.');
75
+ }
76
+ if (normalizedInlineTaskText.length > 0) {
77
+ lines.push('', 'Additional user note:', normalizedInlineTaskText);
78
+ }
79
+ return lines.join('\n');
80
+ }
81
+ export async function runGeneratedWorkflow(cwd, runtimeConfig, task, agentOverrides) {
82
+ const runSlug = generateExecutionReportDir(cwd, task);
83
+ const workflowPath = await generateWorkflowFile(cwd, runtimeConfig, task, `exec-${runSlug}`);
84
+ await selectAndExecuteTask(cwd, task, {
85
+ workflow: workflowPath,
86
+ skipTaskList: true,
87
+ interactiveUserInput: true,
88
+ interactiveMetadata: { confirmed: true, task },
89
+ reportDirName: runSlug,
90
+ providerProfileOverrides: buildExecReadonlyProviderProfileOverrides(runtimeConfig),
91
+ exitOnFailure: false,
92
+ }, agentOverrides);
93
+ const context = loadCompletedExecRun(cwd, runSlug, runtimeConfig.reviews.map((review) => buildReviewReportName(review.name)));
94
+ return context;
95
+ }
96
+ //# sourceMappingURL=workflowRunner.js.map