@zhixuan92/multi-model-agent-core 4.7.3 → 4.7.5

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 (270) hide show
  1. package/README.md +6 -6
  2. package/dist/config/schema.d.ts +1 -1
  3. package/dist/events/task-envelope.d.ts +4 -0
  4. package/dist/events/task-envelope.d.ts.map +1 -1
  5. package/dist/events/task-envelope.js.map +1 -1
  6. package/dist/events/to-wire-record.d.ts.map +1 -1
  7. package/dist/events/to-wire-record.js +37 -20
  8. package/dist/events/to-wire-record.js.map +1 -1
  9. package/dist/events/wire-schema.d.ts +48 -36
  10. package/dist/events/wire-schema.d.ts.map +1 -1
  11. package/dist/events/wire-schema.js +15 -1
  12. package/dist/events/wire-schema.js.map +1 -1
  13. package/dist/index.d.ts +3 -18
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +1 -13
  16. package/dist/index.js.map +1 -1
  17. package/dist/lifecycle/findings-parser.d.ts +8 -1
  18. package/dist/lifecycle/findings-parser.d.ts.map +1 -1
  19. package/dist/lifecycle/findings-parser.js +109 -18
  20. package/dist/lifecycle/findings-parser.js.map +1 -1
  21. package/dist/lifecycle/handlers/annotate-stage.d.ts +4 -0
  22. package/dist/lifecycle/handlers/annotate-stage.d.ts.map +1 -1
  23. package/dist/lifecycle/handlers/annotate-stage.js +14 -1
  24. package/dist/lifecycle/handlers/annotate-stage.js.map +1 -1
  25. package/dist/lifecycle/handlers/baseline-handlers.d.ts.map +1 -1
  26. package/dist/lifecycle/handlers/baseline-handlers.js +61 -4
  27. package/dist/lifecycle/handlers/baseline-handlers.js.map +1 -1
  28. package/dist/lifecycle/handlers/enrich-runtime-result.d.ts.map +1 -1
  29. package/dist/lifecycle/handlers/enrich-runtime-result.js +10 -0
  30. package/dist/lifecycle/handlers/enrich-runtime-result.js.map +1 -1
  31. package/dist/lifecycle/handlers/implement-stage.d.ts.map +1 -1
  32. package/dist/lifecycle/handlers/implement-stage.js +4 -0
  33. package/dist/lifecycle/handlers/implement-stage.js.map +1 -1
  34. package/dist/lifecycle/handlers/read-route-implementer.d.ts +11 -0
  35. package/dist/lifecycle/handlers/read-route-implementer.d.ts.map +1 -1
  36. package/dist/lifecycle/handlers/read-route-implementer.js +26 -1
  37. package/dist/lifecycle/handlers/read-route-implementer.js.map +1 -1
  38. package/dist/lifecycle/handlers/review-stage.d.ts.map +1 -1
  39. package/dist/lifecycle/handlers/review-stage.js +38 -3
  40. package/dist/lifecycle/handlers/review-stage.js.map +1 -1
  41. package/dist/lifecycle/lifecycle-driver.js +4 -0
  42. package/dist/lifecycle/lifecycle-driver.js.map +1 -1
  43. package/dist/lifecycle/merge-stage-stats.d.ts +9 -0
  44. package/dist/lifecycle/merge-stage-stats.d.ts.map +1 -1
  45. package/dist/lifecycle/merge-stage-stats.js +21 -0
  46. package/dist/lifecycle/merge-stage-stats.js.map +1 -1
  47. package/dist/lifecycle/parallel-criteria-routes.d.ts +5 -0
  48. package/dist/lifecycle/parallel-criteria-routes.d.ts.map +1 -1
  49. package/dist/lifecycle/parallel-criteria-routes.js +15 -7
  50. package/dist/lifecycle/parallel-criteria-routes.js.map +1 -1
  51. package/dist/lifecycle/perform-implementation.d.ts.map +1 -1
  52. package/dist/lifecycle/perform-implementation.js +46 -0
  53. package/dist/lifecycle/perform-implementation.js.map +1 -1
  54. package/dist/lifecycle/stage-io.d.ts +12 -0
  55. package/dist/lifecycle/stage-io.d.ts.map +1 -1
  56. package/dist/lifecycle/stage-io.js.map +1 -1
  57. package/dist/lifecycle/tool-config-types.d.ts +7 -1
  58. package/dist/lifecycle/tool-config-types.d.ts.map +1 -1
  59. package/dist/providers/claude-session.d.ts.map +1 -1
  60. package/dist/providers/claude-session.js +36 -2
  61. package/dist/providers/claude-session.js.map +1 -1
  62. package/dist/reporting/findings-outcome.d.ts +13 -0
  63. package/dist/reporting/findings-outcome.d.ts.map +1 -0
  64. package/dist/reporting/findings-outcome.js +22 -0
  65. package/dist/reporting/findings-outcome.js.map +1 -0
  66. package/dist/reporting/report-parser-slots/investigate-report.d.ts +6 -0
  67. package/dist/reporting/report-parser-slots/investigate-report.d.ts.map +1 -1
  68. package/dist/reporting/report-parser-slots/investigate-report.js +122 -13
  69. package/dist/reporting/report-parser-slots/investigate-report.js.map +1 -1
  70. package/dist/reporting/structured-report.d.ts +4 -0
  71. package/dist/reporting/structured-report.d.ts.map +1 -1
  72. package/dist/reporting/structured-report.js.map +1 -1
  73. package/dist/review/parse-review-report.d.ts +4 -1
  74. package/dist/review/parse-review-report.d.ts.map +1 -1
  75. package/dist/review/parse-review-report.js +3 -2
  76. package/dist/review/parse-review-report.js.map +1 -1
  77. package/dist/review/templates/quality-review.d.ts +1 -0
  78. package/dist/review/templates/quality-review.d.ts.map +1 -1
  79. package/dist/review/templates/quality-review.js +14 -3
  80. package/dist/review/templates/quality-review.js.map +1 -1
  81. package/dist/review/templates/spec-review.d.ts +1 -0
  82. package/dist/review/templates/spec-review.d.ts.map +1 -1
  83. package/dist/review/templates/spec-review.js +19 -12
  84. package/dist/review/templates/spec-review.js.map +1 -1
  85. package/dist/tools/audit/brief-slot.d.ts +15 -0
  86. package/dist/tools/audit/brief-slot.d.ts.map +1 -0
  87. package/dist/tools/audit/brief-slot.js +69 -0
  88. package/dist/tools/audit/brief-slot.js.map +1 -0
  89. package/dist/tools/audit/skill-audit-criteria.d.ts.map +1 -1
  90. package/dist/tools/audit/skill-audit-criteria.js +1 -0
  91. package/dist/tools/audit/skill-audit-criteria.js.map +1 -1
  92. package/dist/tools/audit/spec-audit-criteria.d.ts.map +1 -1
  93. package/dist/tools/audit/spec-audit-criteria.js +5 -4
  94. package/dist/tools/audit/spec-audit-criteria.js.map +1 -1
  95. package/dist/tools/audit/subtypes.d.ts.map +1 -1
  96. package/dist/tools/audit/subtypes.js +2 -0
  97. package/dist/tools/audit/subtypes.js.map +1 -1
  98. package/dist/tools/audit/tool-config.d.ts +2 -14
  99. package/dist/tools/audit/tool-config.d.ts.map +1 -1
  100. package/dist/tools/audit/tool-config.js +1 -68
  101. package/dist/tools/audit/tool-config.js.map +1 -1
  102. package/dist/{intake/brief-compiler-slots/debug.d.ts → tools/debug/brief-slot.d.ts} +1 -1
  103. package/dist/tools/debug/brief-slot.d.ts.map +1 -0
  104. package/dist/{intake/brief-compiler-slots/debug.js → tools/debug/brief-slot.js} +1 -1
  105. package/dist/tools/debug/brief-slot.js.map +1 -0
  106. package/dist/tools/debug/subtypes.d.ts.map +1 -1
  107. package/dist/tools/debug/subtypes.js +5 -4
  108. package/dist/tools/debug/subtypes.js.map +1 -1
  109. package/dist/tools/debug/tool-config.d.ts +1 -1
  110. package/dist/tools/debug/tool-config.d.ts.map +1 -1
  111. package/dist/tools/debug/tool-config.js +1 -1
  112. package/dist/tools/debug/tool-config.js.map +1 -1
  113. package/dist/tools/delegate/brief-slot.d.ts +13 -0
  114. package/dist/tools/delegate/brief-slot.d.ts.map +1 -0
  115. package/dist/{intake/brief-compiler-slots/delegate.js → tools/delegate/brief-slot.js} +12 -3
  116. package/dist/tools/delegate/brief-slot.js.map +1 -0
  117. package/dist/tools/delegate/schema.d.ts +1 -1
  118. package/dist/tools/delegate/tool-config.d.ts +1 -10
  119. package/dist/tools/delegate/tool-config.d.ts.map +1 -1
  120. package/dist/tools/delegate/tool-config.js +2 -10
  121. package/dist/tools/delegate/tool-config.js.map +1 -1
  122. package/dist/tools/execute-plan/brief-slot.d.ts +21 -0
  123. package/dist/tools/execute-plan/brief-slot.d.ts.map +1 -0
  124. package/dist/{intake/brief-compiler-slots/execute-plan.js → tools/execute-plan/brief-slot.js} +3 -67
  125. package/dist/tools/execute-plan/brief-slot.js.map +1 -0
  126. package/dist/tools/execute-plan/draft-id.d.ts.map +1 -0
  127. package/dist/tools/execute-plan/draft-id.js.map +1 -0
  128. package/dist/tools/execute-plan/plan-extractor.d.ts.map +1 -0
  129. package/dist/tools/execute-plan/plan-extractor.js.map +1 -0
  130. package/dist/tools/execute-plan/schema.d.ts +1 -1
  131. package/dist/tools/execute-plan/tool-config.d.ts +3 -3
  132. package/dist/tools/execute-plan/tool-config.d.ts.map +1 -1
  133. package/dist/tools/execute-plan/tool-config.js +2 -2
  134. package/dist/tools/execute-plan/tool-config.js.map +1 -1
  135. package/dist/tools/investigate/brief-slot.d.ts +31 -0
  136. package/dist/tools/investigate/brief-slot.d.ts.map +1 -0
  137. package/dist/tools/investigate/brief-slot.js +69 -0
  138. package/dist/tools/investigate/brief-slot.js.map +1 -0
  139. package/dist/tools/investigate/subtypes.d.ts.map +1 -1
  140. package/dist/tools/investigate/subtypes.js +5 -4
  141. package/dist/tools/investigate/subtypes.js.map +1 -1
  142. package/dist/tools/investigate/tool-config.d.ts +2 -29
  143. package/dist/tools/investigate/tool-config.d.ts.map +1 -1
  144. package/dist/tools/investigate/tool-config.js +2 -62
  145. package/dist/tools/investigate/tool-config.js.map +1 -1
  146. package/dist/tools/parallel-criteria-prompt.d.ts +7 -0
  147. package/dist/tools/parallel-criteria-prompt.d.ts.map +1 -1
  148. package/dist/tools/parallel-criteria-prompt.js.map +1 -1
  149. package/dist/tools/research/brief-slot.d.ts +19 -0
  150. package/dist/tools/research/brief-slot.d.ts.map +1 -0
  151. package/dist/tools/research/brief-slot.js +37 -0
  152. package/dist/tools/research/brief-slot.js.map +1 -0
  153. package/dist/tools/research/subtypes.d.ts.map +1 -1
  154. package/dist/tools/research/subtypes.js +5 -4
  155. package/dist/tools/research/subtypes.js.map +1 -1
  156. package/dist/tools/research/tool-config.d.ts +2 -14
  157. package/dist/tools/research/tool-config.d.ts.map +1 -1
  158. package/dist/tools/research/tool-config.js +3 -14
  159. package/dist/tools/research/tool-config.js.map +1 -1
  160. package/dist/tools/retry/brief-slot.d.ts +7 -0
  161. package/dist/tools/retry/brief-slot.d.ts.map +1 -0
  162. package/dist/tools/retry/brief-slot.js +2 -0
  163. package/dist/tools/retry/brief-slot.js.map +1 -0
  164. package/dist/tools/retry/tool-config.d.ts +1 -5
  165. package/dist/tools/retry/tool-config.d.ts.map +1 -1
  166. package/dist/tools/retry/tool-config.js +2 -1
  167. package/dist/tools/retry/tool-config.js.map +1 -1
  168. package/dist/{intake/brief-compiler-slots/review.d.ts → tools/review/brief-slot.d.ts} +1 -1
  169. package/dist/tools/review/brief-slot.d.ts.map +1 -0
  170. package/dist/{intake/brief-compiler-slots/review.js → tools/review/brief-slot.js} +1 -1
  171. package/dist/tools/review/brief-slot.js.map +1 -0
  172. package/dist/tools/review/subtypes.d.ts.map +1 -1
  173. package/dist/tools/review/subtypes.js +5 -4
  174. package/dist/tools/review/subtypes.js.map +1 -1
  175. package/dist/tools/review/tool-config.d.ts +1 -1
  176. package/dist/tools/review/tool-config.d.ts.map +1 -1
  177. package/dist/tools/review/tool-config.js +1 -1
  178. package/dist/tools/review/tool-config.js.map +1 -1
  179. package/dist/types/brief-quality-policy.d.ts +3 -0
  180. package/dist/types/brief-quality-policy.d.ts.map +1 -0
  181. package/dist/types/brief-quality-policy.js +2 -0
  182. package/dist/types/brief-quality-policy.js.map +1 -0
  183. package/dist/{intake/types.d.ts → types/draft-task.d.ts} +2 -40
  184. package/dist/types/draft-task.d.ts.map +1 -0
  185. package/dist/types/draft-task.js +2 -0
  186. package/dist/types/draft-task.js.map +1 -0
  187. package/dist/types/review-policy.d.ts +2 -0
  188. package/dist/types/review-policy.d.ts.map +1 -0
  189. package/dist/types/review-policy.js +2 -0
  190. package/dist/types/review-policy.js.map +1 -0
  191. package/dist/types/task-spec.d.ts +1 -1
  192. package/dist/types/task-spec.d.ts.map +1 -1
  193. package/package.json +1 -49
  194. package/dist/intake/brief-compiler-slots/debug.d.ts.map +0 -1
  195. package/dist/intake/brief-compiler-slots/debug.js.map +0 -1
  196. package/dist/intake/brief-compiler-slots/delegate.d.ts +0 -23
  197. package/dist/intake/brief-compiler-slots/delegate.d.ts.map +0 -1
  198. package/dist/intake/brief-compiler-slots/delegate.js.map +0 -1
  199. package/dist/intake/brief-compiler-slots/execute-plan.d.ts +0 -49
  200. package/dist/intake/brief-compiler-slots/execute-plan.d.ts.map +0 -1
  201. package/dist/intake/brief-compiler-slots/execute-plan.js.map +0 -1
  202. package/dist/intake/brief-compiler-slots/register-context-block.d.ts +0 -17
  203. package/dist/intake/brief-compiler-slots/register-context-block.d.ts.map +0 -1
  204. package/dist/intake/brief-compiler-slots/register-context-block.js +0 -17
  205. package/dist/intake/brief-compiler-slots/register-context-block.js.map +0 -1
  206. package/dist/intake/brief-compiler-slots/research.d.ts +0 -18
  207. package/dist/intake/brief-compiler-slots/research.d.ts.map +0 -1
  208. package/dist/intake/brief-compiler-slots/research.js +0 -43
  209. package/dist/intake/brief-compiler-slots/research.js.map +0 -1
  210. package/dist/intake/brief-compiler-slots/retry.d.ts +0 -20
  211. package/dist/intake/brief-compiler-slots/retry.d.ts.map +0 -1
  212. package/dist/intake/brief-compiler-slots/retry.js +0 -37
  213. package/dist/intake/brief-compiler-slots/retry.js.map +0 -1
  214. package/dist/intake/brief-compiler-slots/review.d.ts.map +0 -1
  215. package/dist/intake/brief-compiler-slots/review.js.map +0 -1
  216. package/dist/intake/brief-compiler.d.ts +0 -9
  217. package/dist/intake/brief-compiler.d.ts.map +0 -1
  218. package/dist/intake/brief-compiler.js +0 -8
  219. package/dist/intake/brief-compiler.js.map +0 -1
  220. package/dist/intake/classify.d.ts +0 -3
  221. package/dist/intake/classify.d.ts.map +0 -1
  222. package/dist/intake/classify.js +0 -111
  223. package/dist/intake/classify.js.map +0 -1
  224. package/dist/intake/context-overflow-estimator.d.ts +0 -33
  225. package/dist/intake/context-overflow-estimator.d.ts.map +0 -1
  226. package/dist/intake/context-overflow-estimator.js +0 -36
  227. package/dist/intake/context-overflow-estimator.js.map +0 -1
  228. package/dist/intake/draft-id.d.ts.map +0 -1
  229. package/dist/intake/draft-id.js.map +0 -1
  230. package/dist/intake/field-inferer.d.ts +0 -10
  231. package/dist/intake/field-inferer.d.ts.map +0 -1
  232. package/dist/intake/field-inferer.js +0 -57
  233. package/dist/intake/field-inferer.js.map +0 -1
  234. package/dist/intake/host-allowlist-builder.d.ts +0 -25
  235. package/dist/intake/host-allowlist-builder.d.ts.map +0 -1
  236. package/dist/intake/host-allowlist-builder.js +0 -102
  237. package/dist/intake/host-allowlist-builder.js.map +0 -1
  238. package/dist/intake/index.d.ts +0 -5
  239. package/dist/intake/index.d.ts.map +0 -1
  240. package/dist/intake/index.js +0 -6
  241. package/dist/intake/index.js.map +0 -1
  242. package/dist/intake/pipeline.d.ts +0 -5
  243. package/dist/intake/pipeline.d.ts.map +0 -1
  244. package/dist/intake/pipeline.js +0 -110
  245. package/dist/intake/pipeline.js.map +0 -1
  246. package/dist/intake/plan-extractor.d.ts.map +0 -1
  247. package/dist/intake/plan-extractor.js.map +0 -1
  248. package/dist/intake/resolve.d.ts +0 -16
  249. package/dist/intake/resolve.d.ts.map +0 -1
  250. package/dist/intake/resolve.js +0 -37
  251. package/dist/intake/resolve.js.map +0 -1
  252. package/dist/intake/source-schema.d.ts +0 -4
  253. package/dist/intake/source-schema.d.ts.map +0 -1
  254. package/dist/intake/source-schema.js +0 -45
  255. package/dist/intake/source-schema.js.map +0 -1
  256. package/dist/intake/types.d.ts.map +0 -1
  257. package/dist/intake/types.js +0 -2
  258. package/dist/intake/types.js.map +0 -1
  259. package/dist/intake/verify-command-validator.d.ts +0 -6
  260. package/dist/intake/verify-command-validator.d.ts.map +0 -1
  261. package/dist/intake/verify-command-validator.js +0 -47
  262. package/dist/intake/verify-command-validator.js.map +0 -1
  263. package/dist/intake/verify-referenced-blocks.d.ts +0 -5
  264. package/dist/intake/verify-referenced-blocks.d.ts.map +0 -1
  265. package/dist/intake/verify-referenced-blocks.js +0 -9
  266. package/dist/intake/verify-referenced-blocks.js.map +0 -1
  267. /package/dist/{intake → tools/execute-plan}/draft-id.d.ts +0 -0
  268. /package/dist/{intake → tools/execute-plan}/draft-id.js +0 -0
  269. /package/dist/{intake → tools/execute-plan}/plan-extractor.d.ts +0 -0
  270. /package/dist/{intake → tools/execute-plan}/plan-extractor.js +0 -0
@@ -1,6 +1,4 @@
1
- import type { AgentType, TaskSpec } from '../types.js';
2
- export type BriefQualityWarning = 'outsourced_discovery' | 'brittle_line_anchors' | 'mixed_environment_actions' | 'bare_topic_noun' | 'no_done_condition' | 'no_output_contract' | 'tiny_brief' | 'huge_brief';
3
- export type BriefQualityPolicy = 'strict' | 'warn' | 'off' | undefined;
1
+ import type { AgentType } from '../types.js';
4
2
  export type SourceRoute = 'delegate_tasks' | 'review_code' | 'debug_task' | 'verify_work' | 'audit_document' | 'execute_plan' | 'investigate_codebase';
5
3
  export type DelegateSource = {
6
4
  route: 'delegate_tasks';
@@ -60,40 +58,4 @@ export interface DraftTask {
60
58
  verifyCommand?: string[];
61
59
  skipCompletionHeuristic?: boolean;
62
60
  }
63
- export type ClassificationResult = {
64
- draft: DraftTask;
65
- classification: 'ready';
66
- reasons: [];
67
- } | {
68
- draft: DraftTask;
69
- classification: 'needs_confirmation';
70
- reasons: string[];
71
- } | {
72
- draft: DraftTask;
73
- classification: 'unrecoverable';
74
- reasons: string[];
75
- };
76
- export interface HardError {
77
- draftId: string;
78
- taskIndex: number;
79
- error: string;
80
- errorCode: string;
81
- details?: Record<string, unknown>;
82
- }
83
- export interface IntakeProgress {
84
- totalDrafts: number;
85
- readyDrafts: number;
86
- hardErrorDrafts: number;
87
- executedDrafts: number;
88
- }
89
- export interface ReadyDraft {
90
- task: TaskSpec;
91
- draftId: string;
92
- taskIndex: number;
93
- }
94
- export interface IntakeResult {
95
- ready: ReadyDraft[];
96
- hardErrors: HardError[];
97
- intakeProgress: IntakeProgress;
98
- }
99
- //# sourceMappingURL=types.d.ts.map
61
+ //# sourceMappingURL=draft-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-task.d.ts","sourceRoot":"","sources":["../../src/types/draft-task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,MAAM,WAAW,GAAG,gBAAgB,G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CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACrI,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,EAAE,sBAAsB,CAAC;IAAC,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AACjJ,MAAM,MAAM,SAAS,GAAG,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,GAAG,iBAAiB,GAAG,iBAAiB,CAAC;AAEzI,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;IAC9D,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=draft-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft-task.js","sourceRoot":"","sources":["../../src/types/draft-task.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type ReviewPolicy = 'full' | 'quality_only' | 'diff_only' | 'none';
2
+ //# sourceMappingURL=review-policy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-policy.d.ts","sourceRoot":"","sources":["../../src/types/review-policy.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=review-policy.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"review-policy.js","sourceRoot":"","sources":["../../src/types/review-policy.ts"],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import type { BriefQualityPolicy } from '../intake/types.js';
1
+ import type { BriefQualityPolicy } from './brief-quality-policy.js';
2
2
  import type { ResearchToolDefinition } from '../research/types.js';
3
3
  export type ToolMode = 'none' | 'readonly' | 'no-shell' | 'full';
4
4
  export type SandboxPolicy = 'none' | 'cwd-only';
@@ -1 +1 @@
1
- {"version":3,"file":"task-spec.d.ts","sourceRoot":"","sources":["../../src/types/task-spec.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC7D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC;AACjE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,UAAU,CAAC;AAChD,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;AAC/C,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AACxD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;AAC1D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,oBAAoB,GAAG,eAAe,GAAG,SAAS,GAAG,oBAAoB,GAAG,QAAQ,CAAC;AAEzH,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,M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EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,YAAY,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAA;IAC7D,kBAAkB,CAAC,EAAE,kBAAkB,CAAA;IACvC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC,gBAAgB,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAA;IAChG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,sBAAsB,EAAE,CAAA;IACxC;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhixuan92/multi-model-agent-core",
3
- "version": "4.7.3",
3
+ "version": "4.7.5",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Core library for multi-model-agent: provider runners (Claude, Codex, OpenAI-compatible), routing logic, config schema, and tool/sandbox primitives.",
@@ -64,10 +64,6 @@
64
64
  "types": "./dist/lifecycle/stage-labels.d.ts",
65
65
  "import": "./dist/lifecycle/stage-labels.js"
66
66
  },
67
- "./intake/verify-command-validator": {
68
- "types": "./dist/intake/verify-command-validator.d.ts",
69
- "import": "./dist/intake/verify-command-validator.js"
70
- },
71
67
  "./lifecycle/handlers/commit-stage": {
72
68
  "types": "./dist/lifecycle/handlers/commit-stage.d.ts",
73
69
  "import": "./dist/lifecycle/handlers/commit-stage.js"
@@ -104,54 +100,10 @@
104
100
  "types": "./dist/providers/call-cache.d.ts",
105
101
  "import": "./dist/providers/call-cache.js"
106
102
  },
107
- "./intake/types": {
108
- "types": "./dist/intake/types.d.ts",
109
- "import": "./dist/intake/types.js"
110
- },
111
103
  "./intake/brief-compiler-slots/delegate": {
112
104
  "types": "./dist/intake/brief-compiler-slots/delegate.d.ts",
113
105
  "import": "./dist/intake/brief-compiler-slots/delegate.js"
114
106
  },
115
- "./intake/brief-compiler-slots/review": {
116
- "types": "./dist/intake/brief-compiler-slots/review.d.ts",
117
- "import": "./dist/intake/brief-compiler-slots/review.js"
118
- },
119
- "./intake/brief-compiler-slots/debug": {
120
- "types": "./dist/intake/brief-compiler-slots/debug.d.ts",
121
- "import": "./dist/intake/brief-compiler-slots/debug.js"
122
- },
123
- "./intake/brief-compiler-slots/execute-plan": {
124
- "types": "./dist/intake/brief-compiler-slots/execute-plan.d.ts",
125
- "import": "./dist/intake/brief-compiler-slots/execute-plan.js"
126
- },
127
- "./intake/brief-compiler-slots/research": {
128
- "types": "./dist/intake/brief-compiler-slots/research.d.ts",
129
- "import": "./dist/intake/brief-compiler-slots/research.js"
130
- },
131
- "./intake/pipeline": {
132
- "types": "./dist/intake/pipeline.d.ts",
133
- "import": "./dist/intake/pipeline.js"
134
- },
135
- "./intake/classify": {
136
- "types": "./dist/intake/classify.d.ts",
137
- "import": "./dist/intake/classify.js"
138
- },
139
- "./intake/field-inferer": {
140
- "types": "./dist/intake/field-inferer.d.ts",
141
- "import": "./dist/intake/field-inferer.js"
142
- },
143
- "./intake/resolve": {
144
- "types": "./dist/intake/resolve.d.ts",
145
- "import": "./dist/intake/resolve.js"
146
- },
147
- "./intake/source-schema": {
148
- "types": "./dist/intake/source-schema.d.ts",
149
- "import": "./dist/intake/source-schema.js"
150
- },
151
- "./intake/draft-id": {
152
- "types": "./dist/intake/draft-id.d.ts",
153
- "import": "./dist/intake/draft-id.js"
154
- },
155
107
  "./events/jsonl-writer": {
156
108
  "types": "./dist/events/jsonl-writer.d.ts",
157
109
  "import": "./dist/events/jsonl-writer.js"
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/debug.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE;IACpC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B,GAAG,cAAc,EAAE,CAQnB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debug.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/debug.ts"],"names":[],"mappings":"AAQA,MAAM,UAAU,cAAc,CAAC,KAM9B;IACC,OAAO,CAAC;YACN,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,eAAe,EAAE,KAAK,CAAC,eAAe;SACvC,CAAC,CAAC;AACL,CAAC"}
@@ -1,23 +0,0 @@
1
- export type ReviewPolicy = 'full' | 'quality_only' | 'diff_only' | 'none';
2
- /**
3
- * Compile a delegate worker prompt — slimmed in 4.2.3 from ~9 KB to
4
- * ~3 KB. Cheap workers respond to long layered prompts by spinning on
5
- * discovery; this slim version keeps only load-bearing rules. The spec
6
- * reviewer (complex tier) catches scope creep / partial fixes and emits
7
- * targeted instructions for rework; the rework round applies them
8
- * mechanically. The worker no longer needs to anticipate the reviewer's
9
- * full rubric — that was REVIEWER_AWARENESS_AP, dropped.
10
- *
11
- * Structure (top-down):
12
- * 1. Orientation (smallest complete change)
13
- * 2. The caller's brief (`prompt`)
14
- * 3. File constraint (when filePaths is set)
15
- * 4. Scope rule
16
- * 5. Top-4 failure-mode taxonomy
17
- * 6. Brief-vs-diff walk
18
- */
19
- export declare function compileDelegatePrompt(input: {
20
- prompt: string;
21
- filePaths?: string[];
22
- }): string;
23
- //# sourceMappingURL=delegate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"delegate.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;AAE1E;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,MAAM,CAoB7F"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"delegate.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/delegate.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,oBAAoB,GACrB,MAAM,8CAA8C,CAAC;AAItD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAA+C;IACnF,MAAM,eAAe,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;QACnE,CAAC,CAAC,+EAA+E,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,2SAA2S;QAC7a,CAAC,CAAC,EAAE,CAAC;IACP,OAAO;QACL,4BAA4B;QAC5B,EAAE;QACF,gFAAgF;QAChF,EAAE;QACF,KAAK,CAAC,MAAM;QACZ,eAAe;QACf,EAAE;QACF,mBAAmB;QACnB,EAAE;QACF,sBAAsB;QACtB,EAAE;QACF,8BAA8B;QAC9B,EAAE;QACF,oBAAoB;KACrB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1,49 +0,0 @@
1
- import type { DraftTask } from '../types.js';
2
- import type { ReviewPolicy } from './delegate.js';
3
- export interface ExecutePlanTaskInput {
4
- task: string;
5
- reviewPolicy?: ReviewPolicy;
6
- }
7
- export interface ExecutePlanCompilerInput {
8
- tasks: Array<string | ExecutePlanTaskInput>;
9
- fileContents: string;
10
- filePaths?: string[];
11
- verifyCommand?: string[];
12
- }
13
- export declare function compileExecutePlan(input: ExecutePlanCompilerInput, requestId: string): DraftTask[];
14
- export interface ExecutePlanInput {
15
- filePaths: [string] | string[];
16
- taskDescriptors: string[];
17
- cwd?: string;
18
- perTaskReviewPolicy?: Record<number, ReviewPolicy>;
19
- }
20
- export interface ExecutePlanBrief {
21
- taskIndex: number;
22
- brief: string;
23
- cwd: string;
24
- agentType: 'standard';
25
- reviewPolicy: ReviewPolicy;
26
- contextBlockIds: string[];
27
- autoCommit: true;
28
- }
29
- export declare function executePlanSlot(input: ExecutePlanInput): ExecutePlanBrief[];
30
- export interface ToolExecutePlanBrief {
31
- taskDescriptor: string;
32
- filePaths: string[];
33
- sectionBody: string;
34
- sectionTruncated: boolean;
35
- contextBlockIds: string[];
36
- reviewPolicy: ReviewPolicy;
37
- cwd: string;
38
- verifyCommand?: string[];
39
- }
40
- export interface ToolExecutePlanInput {
41
- filePaths: string[];
42
- taskDescriptors: string[];
43
- cwd?: string;
44
- perTaskReviewPolicy?: Record<string, 'full' | 'quality_only' | 'diff_only' | 'none'>;
45
- contextBlockIds?: string[];
46
- verifyCommand?: string[];
47
- }
48
- export declare function toolExecutePlanBriefSlot(input: ToolExecutePlanInput): ToolExecutePlanBrief[];
49
- //# sourceMappingURL=execute-plan.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"execute-plan.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/execute-plan.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAqB,MAAM,aAAa,CAAC;AAEhE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAMlD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,KAAK,CAAC,MAAM,GAAG,oBAAoB,CAAC,CAAC;IAC5C,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,wBAAwB,EAC/B,SAAS,EAAE,MAAM,GAChB,SAAS,EAAE,CAuCb;AAMD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,CAAC,MAAM,CAAC,GAAG,MAAM,EAAE,CAAC;IAC/B,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,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E,MAAM,CAAC,CAAC;QACtC,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QACzD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,WAAW,GAAG,CAAC;YAAE,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;QACvD,SAAS,GAAG,IAAI,CAAC;IACnB,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC7B,CAAC"}
@@ -1,17 +0,0 @@
1
- import type { BriefSlotFiller } from '../brief-compiler.js';
2
- export interface RegisterContextBlockInput {
3
- content: string;
4
- ttlMs?: number;
5
- cwd?: string;
6
- }
7
- export interface RegisterContextBlockBrief {
8
- taskIndex: number;
9
- brief: string;
10
- cwd: string;
11
- agentType: 'standard' | 'complex';
12
- reviewPolicy: 'full' | 'quality_only' | 'diff_only' | 'none';
13
- contextBlockIds: string[];
14
- inheritedToolCategory: 'assist';
15
- }
16
- export declare function makeRegisterContextBlockSlot(): BriefSlotFiller<RegisterContextBlockInput, RegisterContextBlockBrief[]>;
17
- //# sourceMappingURL=register-context-block.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-context-block.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/register-context-block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;IAC7D,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,qBAAqB,EAAE,QAAQ,CAAC;CACjC;AAKD,wBAAgB,4BAA4B,IAAI,eAAe,CAAC,yBAAyB,EAAE,yBAAyB,EAAE,CAAC,CAYtH"}
@@ -1,17 +0,0 @@
1
- // register-context-block is a synchronous state op — it does not
2
- // dispatch a sub-agent. This slot returns a single zero-cost brief
3
- // so the framework can resolve a slot per route uniformly.
4
- export function makeRegisterContextBlockSlot() {
5
- return (input) => {
6
- return [{
7
- taskIndex: 0,
8
- brief: input.content,
9
- cwd: input.cwd ?? process.cwd(),
10
- agentType: 'standard',
11
- reviewPolicy: 'none',
12
- contextBlockIds: [],
13
- inheritedToolCategory: 'assist',
14
- }];
15
- };
16
- }
17
- //# sourceMappingURL=register-context-block.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-context-block.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/register-context-block.ts"],"names":[],"mappings":"AAkBA,iEAAiE;AACjE,mEAAmE;AACnE,2DAA2D;AAC3D,MAAM,UAAU,4BAA4B;IAC1C,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,OAAO,CAAC;gBACN,SAAS,EAAE,CAAC;gBACZ,KAAK,EAAE,KAAK,CAAC,OAAO;gBACpB,GAAG,EAAE,KAAK,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,EAAE;gBAC/B,SAAS,EAAE,UAAU;gBACrB,YAAY,EAAE,MAAM;gBACpB,eAAe,EAAE,EAAE;gBACnB,qBAAqB,EAAE,QAAQ;aAChC,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
@@ -1,18 +0,0 @@
1
- import type { TaskSpec } from '../../types.js';
2
- import type { Input } from '../../tools/research/schema.js';
3
- export interface ResolvedContextBlock {
4
- id: string;
5
- content: string;
6
- }
7
- export interface CompileExtras {
8
- userSources: readonly string[];
9
- hasBrave: boolean;
10
- }
11
- export interface CompileResearchResult {
12
- task: Omit<TaskSpec, 'route'> & {
13
- route: string;
14
- originalInput: Record<string, unknown>;
15
- };
16
- }
17
- export declare function compileResearch(input: Input, resolvedContextBlocks: ResolvedContextBlock[], cwd: string, extras: CompileExtras): CompileResearchResult;
18
- //# sourceMappingURL=research.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"research.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/research.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAS5D,MAAM,WAAW,oBAAoB;IAAG,EAAE,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;CAAE;AAEtE,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IAMpC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,GAAG;QAC9B,KAAK,EAAE,MAAM,CAAC;QACd,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACxC,CAAC;CACH;AAED,wBAAgB,eAAe,CAC7B,KAAK,EAAE,KAAK,EACZ,qBAAqB,EAAE,oBAAoB,EAAE,EAC7C,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,aAAa,GACpB,qBAAqB,CA2CvB"}
@@ -1,43 +0,0 @@
1
- import { EVIDENCE_RULE_RESEARCH, TRUST_BOUNDARY_USER_SOURCES_RESEARCH, TRUST_BOUNDARY_EXTERNAL_DATA_RESEARCH, QUERY_PHRASING_RESEARCH, strategyRuleResearch, } from '../../tools/research/implementer-criteria.js';
2
- export function compileResearch(input, resolvedContextBlocks, cwd, extras) {
3
- const priorContext = resolvedContextBlocks.length
4
- ? `## Prior context (read-only)\n\n${resolvedContextBlocks.map(b => b.content).join('\n\n---\n\n')}\n\n`
5
- : '';
6
- const userSourcesBlock = extras.userSources.length
7
- ? extras.userSources.map((s, i) => `${i}. ${s}`).join('\n')
8
- : '(none configured)';
9
- const prompt = `${priorContext}You are an external researcher. The caller wants to discover external ideas, sources, and practices relevant to their question; your job is to bring back substantive external material with citations.
10
-
11
- **Background:** ${input.background}
12
- **Research question:** ${input.researchQuestion}
13
-
14
- **User-described sources (free text — interpret each one):**
15
- ${userSourcesBlock}
16
-
17
- ${TRUST_BOUNDARY_USER_SOURCES_RESEARCH}
18
-
19
- ${strategyRuleResearch(extras.hasBrave)}
20
-
21
- ${TRUST_BOUNDARY_EXTERNAL_DATA_RESEARCH}
22
-
23
- ${QUERY_PHRASING_RESEARCH}
24
-
25
- ${EVIDENCE_RULE_RESEARCH}`;
26
- return {
27
- task: {
28
- route: 'research',
29
- prompt,
30
- tools: 'readonly',
31
- sandboxPolicy: 'cwd-only',
32
- cwd,
33
- agentType: 'complex',
34
- reviewPolicy: 'none',
35
- originalInput: {
36
- researchQuestion: input.researchQuestion,
37
- background: input.background,
38
- contextBlockIds: input.contextBlockIds,
39
- },
40
- },
41
- };
42
- }
43
- //# sourceMappingURL=research.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"research.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/research.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,oCAAoC,EACpC,qCAAqC,EACrC,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,8CAA8C,CAAC;AAqBtD,MAAM,UAAU,eAAe,CAC7B,KAAY,EACZ,qBAA6C,EAC7C,GAAW,EACX,MAAqB;IAErB,MAAM,YAAY,GAAG,qBAAqB,CAAC,MAAM;QAC/C,CAAC,CAAC,mCAAmC,qBAAqB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM;QACxG,CAAC,CAAC,EAAE,CAAC;IAEP,MAAM,gBAAgB,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM;QAChD,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC3D,CAAC,CAAC,mBAAmB,CAAC;IAExB,MAAM,MAAM,GAAG,GAAG,YAAY;;kBAEd,KAAK,CAAC,UAAU;yBACT,KAAK,CAAC,gBAAgB;;;EAG7C,gBAAgB;;EAEhB,oCAAoC;;EAEpC,oBAAoB,CAAC,MAAM,CAAC,QAAQ,CAAC;;EAErC,qCAAqC;;EAErC,uBAAuB;;EAEvB,sBAAsB,EAAE,CAAC;IAEzB,OAAO;QACL,IAAI,EAAE;YACJ,KAAK,EAAE,UAAmB;YAC1B,MAAM;YACN,KAAK,EAAE,UAAmB;YAC1B,aAAa,EAAE,UAAmB;YAClC,GAAG;YACH,SAAS,EAAE,SAAkB;YAC7B,YAAY,EAAE,MAAe;YAC7B,aAAa,EAAE;gBACb,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;gBACxC,UAAU,EAAE,KAAK,CAAC,UAAU;gBAC5B,eAAe,EAAE,KAAK,CAAC,eAAe;aACZ;SAC7B;KACF,CAAC;AACJ,CAAC"}
@@ -1,20 +0,0 @@
1
- import type { BriefSlotFiller } from '../brief-compiler.js';
2
- import type { BatchRegistry } from '../../stores/batch-registry.js';
3
- export interface RetryInput {
4
- batchId: string;
5
- retryableFor: number[];
6
- cwd?: string;
7
- }
8
- export interface RetryBrief {
9
- taskIndex: number;
10
- brief: string;
11
- cwd: string;
12
- agentType: 'standard' | 'complex';
13
- reviewPolicy: 'full' | 'quality_only' | 'diff_only' | 'none';
14
- contextBlockIds: string[];
15
- originalTaskIndex: number;
16
- /** Inherited from the original tool — used for runtime budget selection. */
17
- inheritedToolCategory: 'artifact_producing' | 'read_only' | 'research' | 'assist';
18
- }
19
- export declare function makeRetrySlot(registry: BatchRegistry): BriefSlotFiller<RetryInput, RetryBrief[]>;
20
- //# sourceMappingURL=retry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAEpE,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,UAAU,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,WAAW,GAAG,MAAM,CAAC;IAC7D,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,4EAA4E;IAC5E,qBAAqB,EAAE,oBAAoB,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;CACnF;AAED,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,GAAG,eAAe,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC,CAsChG"}
@@ -1,37 +0,0 @@
1
- export function makeRetrySlot(registry) {
2
- return (input) => {
3
- const original = registry.get(input.batchId);
4
- if (!original)
5
- throw new Error(`unknown batchId for retry: ${input.batchId}`);
6
- const { toolCategory, tasks, terminalBlockIds } = original;
7
- if (!toolCategory || toolCategory === 'assist') {
8
- throw new Error(`retry: original batch '${input.batchId}' has missing or invalid toolCategory ` +
9
- `'${toolCategory}' — refusing to retry with 'assist' (assist is route-level only)`);
10
- }
11
- if (!tasks) {
12
- throw new Error(`retry: original batch '${input.batchId}' has no stored tasks in registry`);
13
- }
14
- return input.retryableFor.map((origIdx, i) => {
15
- const origTask = tasks[origIdx];
16
- if (!origTask) {
17
- throw new Error(`retry: task index ${origIdx} out of range for batch '${input.batchId}' ` +
18
- `(tasks length: ${tasks.length})`);
19
- }
20
- const priorBlock = terminalBlockIds?.get(origIdx);
21
- return {
22
- taskIndex: i,
23
- brief: origTask.brief,
24
- cwd: input.cwd ?? origTask.cwd,
25
- agentType: origTask.agentType,
26
- reviewPolicy: origTask.reviewPolicy,
27
- contextBlockIds: [
28
- ...(origTask.contextBlockIds ?? []),
29
- ...(priorBlock ? [priorBlock] : []),
30
- ],
31
- originalTaskIndex: origIdx,
32
- inheritedToolCategory: toolCategory,
33
- };
34
- });
35
- };
36
- }
37
- //# sourceMappingURL=retry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.js","sourceRoot":"","sources":["../../../src/intake/brief-compiler-slots/retry.ts"],"names":[],"mappings":"AAqBA,MAAM,UAAU,aAAa,CAAC,QAAuB;IACnD,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QAC7C,IAAI,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9E,MAAM,EAAE,YAAY,EAAE,KAAK,EAAE,gBAAgB,EAAE,GAAG,QAAQ,CAAC;QAC3D,IAAI,CAAC,YAAY,IAAK,YAAuB,KAAK,QAAQ,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CACb,0BAA0B,KAAK,CAAC,OAAO,wCAAwC;gBAC/E,IAAI,YAAY,kEAAkE,CACnF,CAAC;QACJ,CAAC;QACD,IA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,EAAE,EAAE;QACZ,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,gBAAgB;QAChB,eAAe,EAAE,KAAK,CAAC,eAAe,IAAI,EAAE;KAC7C,CAAC,CAAC,CAAC;AACN,CAAC"}
@@ -1,9 +0,0 @@
1
- export interface BriefSlotFiller<TInput, TBrief> {
2
- (input: TInput): TBrief;
3
- }
4
- export declare class BriefCompiler<TInput, TBrief> {
5
- private slot;
6
- constructor(slot: BriefSlotFiller<TInput, TBrief>);
7
- compile(input: TInput): TBrief;
8
- }
9
- //# sourceMappingURL=brief-compiler.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brief-compiler.d.ts","sourceRoot":"","sources":["../../src/intake/brief-compiler.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe,CAAC,MAAM,EAAE,MAAM;IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE;AAE5E,qBAAa,aAAa,CAAC,MAAM,EAAE,MAAM;IAC3B,OAAO,CAAC,IAAI;gBAAJ,IAAI,EAAE,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC;IACzD,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;CAC/B"}
@@ -1,8 +0,0 @@
1
- export class BriefCompiler {
2
- slot;
3
- constructor(slot) {
4
- this.slot = slot;
5
- }
6
- compile(input) { return this.slot(input); }
7
- }
8
- //# sourceMappingURL=brief-compiler.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brief-compiler.js","sourceRoot":"","sources":["../../src/intake/brief-compiler.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,aAAa;IACJ;IAApB,YAAoB,IAAqC;QAArC,SAAI,GAAJ,IAAI,CAAiC;IAAG,CAAC;IAC7D,OAAO,CAAC,KAAa,IAAY,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;CAC5D"}
@@ -1,3 +0,0 @@
1
- import type { DraftTask, ClassificationResult } from './types.js';
2
- export declare function classifyDraft(draft: DraftTask): ClassificationResult;
3
- //# sourceMappingURL=classify.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/intake/classify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AA2BlE,wBAAgB,aAAa,CAAC,KAAK,EAAE,SAAS,GAAG,oBAAoB,CAsGpE"}
@@ -1,111 +0,0 @@
1
- const PRESET_ROUTES = new Set(['review_code', 'debug_task', 'verify_work', 'audit_document']);
2
- const MIN_PROMPT_WORDS = 4;
3
- const VAGUE_PATTERNS = [
4
- /^please$/i,
5
- /^help$/i,
6
- /^fix it$/i,
7
- /^do it$/i,
8
- /^handle this$/i,
9
- /^(can|could) you/i,
10
- /^(can|could) I/i,
11
- ];
12
- function getUserContentForRoute(draft) {
13
- switch (draft.source.route) {
14
- case 'review_code':
15
- return draft.source.code || draft.source.inlineContent;
16
- case 'audit_document':
17
- return draft.source.document;
18
- case 'verify_work':
19
- return draft.source.work;
20
- default:
21
- return draft.prompt;
22
- }
23
- }
24
- export function classifyDraft(draft) {
25
- const reasons = [];
26
- const promptWords = draft.prompt.trim().split(/\s+/).length;
27
- if (!draft.prompt.trim()) {
28
- if (draft.source.route === 'delegate_tasks') {
29
- return {
30
- draft,
31
- classification: 'unrecoverable',
32
- reasons: ['prompt too vague to form any interpretation — requires a fresh request'],
33
- };
34
- }
35
- }
36
- if (promptWords < 2) {
37
- return {
38
- draft,
39
- classification: 'unrecoverable',
40
- reasons: ['prompt too vague to form any interpretation — requires a fresh request'],
41
- };
42
- }
43
- if (draft.questions?.length) {
44
- reasons.push('draft has open questions from compilation');
45
- return { draft, classification: 'needs_confirmation', reasons };
46
- }
47
- const isConfirmed = draft.confirmed === true;
48
- if (PRESET_ROUTES.has(draft.source.route)) {
49
- const presetReasons = [];
50
- const userContent = getUserContentForRoute(draft);
51
- if (userContent && userContent.trim().split(/\s+/).length < 2) {
52
- presetReasons.push('user-provided content is too vague to act on');
53
- }
54
- if (draft.filePaths?.some(p => p === '/' || p === '.' || p === '*')) {
55
- presetReasons.push('file scope is too broad to be actionable');
56
- }
57
- if (draft.source.route === 'audit_document' && !draft.filePaths?.length) {
58
- if (!('document' in draft.source.originalInput)) {
59
- presetReasons.push('audit has no target — provide filePaths or inline document');
60
- }
61
- }
62
- if (draft.source.route === 'verify_work') {
63
- const checklist = draft.source.checklist ?? [];
64
- const VAGUE_CHECKLIST = /^(check|verify|test|ensure)\s+(everything|all|it|this|that)$/i;
65
- if (checklist.some(item => VAGUE_CHECKLIST.test(item.trim()))) {
66
- presetReasons.push('checklist contains overly generic items that are not actionable');
67
- }
68
- }
69
- if (presetReasons.length > 0) {
70
- return { draft, classification: 'needs_confirmation', reasons: presetReasons };
71
- }
72
- return { draft, classification: 'ready', reasons: [] };
73
- }
74
- if (!isConfirmed) {
75
- for (const pattern of VAGUE_PATTERNS) {
76
- if (pattern.test(draft.prompt.trim())) {
77
- reasons.push('prompt is too vague to form one concrete instruction');
78
- break;
79
- }
80
- }
81
- // Behavior-change detection requires a dangerous *combination* (verb +
82
- // dangerous object/target), not a bare verb. The earlier broad pattern
83
- // (`delete|remove|drop|migrate|deploy|push|publish|send` alone) flagged
84
- // ordinary technical English ("send a request", "publish docs") with no
85
- // real safety win — kept the combination form below to focus on actual
86
- // destructive intent.
87
- const dangerousCombos = [
88
- /\brm\s+-rf?\b/i,
89
- /\bdrop\s+(?:the\s+)?(?:\w+\s+)?(?:table|database|schema|index)\b/i,
90
- /\b(?:delete|truncate)\s+(?:the\s+)?(?:table|database|schema|all|every|everything|users|accounts|files?\b|directory|directories|repo)\b/i,
91
- /\b(?:deploy|publish|release)\s+(?:to\s+)?(?:production|prod|staging|live|main|master)\b/i,
92
- /\b(?:force[-\s]push|push\s+--force)\b/i,
93
- /\bpush\s+(?:to\s+)?(?:main|master|origin\/(?:main|master))\b/i,
94
- /\bmigrate\s+(?:the\s+)?(?:production|prod|live|database|schema)\b/i,
95
- ];
96
- const matchedDangerous = dangerousCombos.some(pat => pat.test(draft.prompt));
97
- if (matchedDangerous && !draft.filePaths?.length) {
98
- reasons.push('behavior-changing task without explicit scope');
99
- }
100
- const securitySensitive = /\b(auth|credential|secret|token|permission|password|key)\b/i;
101
- if (securitySensitive.test(draft.prompt) && !draft.done) {
102
- reasons.push('security-sensitive task without explicit done condition');
103
- }
104
- }
105
- const uniqueReasons = [...new Set(reasons)];
106
- if (uniqueReasons.length > 0) {
107
- return { draft, classification: 'needs_confirmation', reasons: uniqueReasons };
108
- }
109
- return { draft, classification: 'ready', reasons: [] };
110
- }
111
- //# sourceMappingURL=classify.js.map