@probelabs/visor 0.1.127 → 0.1.129

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 (255) hide show
  1. package/README.md +31 -1
  2. package/defaults/.visor.yaml +420 -0
  3. package/dist/ai-review-service.d.ts +1 -0
  4. package/dist/ai-review-service.d.ts.map +1 -1
  5. package/dist/cli-main.d.ts.map +1 -1
  6. package/dist/config.d.ts +4 -0
  7. package/dist/config.d.ts.map +1 -1
  8. package/dist/daemon.js +19 -0
  9. package/dist/defaults/.visor.yaml +420 -0
  10. package/dist/docs/commands.md +1 -1
  11. package/dist/docs/debugging.md +133 -0
  12. package/dist/docs/dev-playbook.md +10 -0
  13. package/dist/docs/index.md +1 -0
  14. package/dist/docs/scheduler.md +503 -0
  15. package/dist/docs/slack-integration.md +21 -0
  16. package/dist/docs/timeouts.md +1 -1
  17. package/dist/docs/workflow-creation-guide.md +39 -0
  18. package/dist/examples/README.md +30 -0
  19. package/dist/examples/calculator-config.yaml +4 -4
  20. package/dist/examples/sandbox-basic.yaml +18 -0
  21. package/dist/examples/sandbox-cache.yaml +32 -0
  22. package/dist/examples/sandbox-dockerfile-inline.yaml +22 -0
  23. package/dist/examples/sandbox-env-passthrough.yaml +26 -0
  24. package/dist/examples/sandbox-multi-env.yaml +27 -0
  25. package/dist/examples/sandbox-read-only.yaml +33 -0
  26. package/dist/examples/scheduler-example.yaml +118 -0
  27. package/dist/frontends/host.d.ts.map +1 -1
  28. package/dist/frontends/slack-frontend.d.ts.map +1 -1
  29. package/dist/generated/config-schema.d.ts +230 -9
  30. package/dist/generated/config-schema.d.ts.map +1 -1
  31. package/dist/index.js +13676 -1604
  32. package/dist/mcp-server.d.ts +8 -8
  33. package/dist/{traces/run-2026-02-01T09-59-08-165Z.ndjson → output/traces/run-2026-02-08T18-16-04-160Z.ndjson} +84 -84
  34. package/dist/{traces/run-2026-02-01T09-59-52-595Z.ndjson → output/traces/run-2026-02-08T18-16-51-253Z.ndjson} +1029 -1029
  35. package/dist/providers/ai-check-provider.d.ts +16 -0
  36. package/dist/providers/ai-check-provider.d.ts.map +1 -1
  37. package/dist/providers/check-provider.interface.d.ts +5 -0
  38. package/dist/providers/check-provider.interface.d.ts.map +1 -1
  39. package/dist/providers/command-check-provider.d.ts.map +1 -1
  40. package/dist/providers/log-check-provider.d.ts.map +1 -1
  41. package/dist/providers/mcp-check-provider.d.ts +3 -0
  42. package/dist/providers/mcp-check-provider.d.ts.map +1 -1
  43. package/dist/providers/mcp-custom-sse-server.d.ts +22 -2
  44. package/dist/providers/mcp-custom-sse-server.d.ts.map +1 -1
  45. package/dist/providers/workflow-check-provider.d.ts.map +1 -1
  46. package/dist/providers/workflow-tool-executor.d.ts +2 -0
  47. package/dist/providers/workflow-tool-executor.d.ts.map +1 -1
  48. package/dist/sandbox/cache-volume-manager.d.ts +48 -0
  49. package/dist/sandbox/cache-volume-manager.d.ts.map +1 -0
  50. package/dist/sandbox/check-runner.d.ts +25 -0
  51. package/dist/sandbox/check-runner.d.ts.map +1 -0
  52. package/dist/sandbox/docker-compose-sandbox.d.ts +25 -0
  53. package/dist/sandbox/docker-compose-sandbox.d.ts.map +1 -0
  54. package/dist/sandbox/docker-image-sandbox.d.ts +32 -0
  55. package/dist/sandbox/docker-image-sandbox.d.ts.map +1 -0
  56. package/dist/sandbox/env-filter.d.ts +19 -0
  57. package/dist/sandbox/env-filter.d.ts.map +1 -0
  58. package/dist/sandbox/index.d.ts +9 -0
  59. package/dist/sandbox/index.d.ts.map +1 -0
  60. package/dist/sandbox/sandbox-manager.d.ts +39 -0
  61. package/dist/sandbox/sandbox-manager.d.ts.map +1 -0
  62. package/dist/sandbox/sandbox-telemetry.d.ts +9 -0
  63. package/dist/sandbox/sandbox-telemetry.d.ts.map +1 -0
  64. package/dist/sandbox/trace-ingester.d.ts +19 -0
  65. package/dist/sandbox/trace-ingester.d.ts.map +1 -0
  66. package/dist/sandbox/types.d.ts +149 -0
  67. package/dist/sandbox/types.d.ts.map +1 -0
  68. package/dist/scheduler/cli-handler.d.ts +6 -0
  69. package/dist/scheduler/cli-handler.d.ts.map +1 -0
  70. package/dist/scheduler/index.d.ts +14 -0
  71. package/dist/scheduler/index.d.ts.map +1 -0
  72. package/dist/scheduler/schedule-parser.d.ts +34 -0
  73. package/dist/scheduler/schedule-parser.d.ts.map +1 -0
  74. package/dist/scheduler/schedule-store.d.ts +182 -0
  75. package/dist/scheduler/schedule-store.d.ts.map +1 -0
  76. package/dist/scheduler/schedule-tool.d.ts +137 -0
  77. package/dist/scheduler/schedule-tool.d.ts.map +1 -0
  78. package/dist/scheduler/scheduler.d.ts +195 -0
  79. package/dist/scheduler/scheduler.d.ts.map +1 -0
  80. package/dist/sdk/check-provider-registry-ACRGIYOB.mjs +28 -0
  81. package/dist/sdk/check-provider-registry-VYHKFHK2.mjs +28 -0
  82. package/dist/sdk/{chunk-CNX7V5JK.mjs → chunk-25IC7KXZ.mjs} +2 -2
  83. package/dist/sdk/{chunk-IHZOSIF4.mjs → chunk-2KB35MB7.mjs} +3 -3
  84. package/dist/sdk/{chunk-HQL734ZI.mjs → chunk-6W75IMDC.mjs} +3 -3
  85. package/dist/sdk/{chunk-XWJPT5KQ.mjs → chunk-7YSOINAQ.mjs} +392 -18
  86. package/dist/sdk/chunk-7YSOINAQ.mjs.map +1 -0
  87. package/dist/sdk/{chunk-3OMWVM6J.mjs → chunk-B7BVQM5K.mjs} +2 -2
  88. package/dist/sdk/chunk-BDGUM6BA.mjs +38825 -0
  89. package/dist/sdk/chunk-BDGUM6BA.mjs.map +1 -0
  90. package/dist/sdk/{chunk-VW2GBXQT.mjs → chunk-D5KI4YQ4.mjs} +3 -3
  91. package/dist/sdk/chunk-DGZPPGJJ.mjs +38825 -0
  92. package/dist/sdk/chunk-DGZPPGJJ.mjs.map +1 -0
  93. package/dist/sdk/chunk-H5BOW5CR.mjs +91 -0
  94. package/dist/sdk/chunk-H5BOW5CR.mjs.map +1 -0
  95. package/dist/sdk/{chunk-YSN4G6CI.mjs → chunk-HEX3RL32.mjs} +81 -3
  96. package/dist/sdk/{chunk-YSN4G6CI.mjs.map → chunk-HEX3RL32.mjs.map} +1 -1
  97. package/dist/sdk/{chunk-ZYAUYXSW.mjs → chunk-J5RGJQ53.mjs} +14 -3
  98. package/dist/sdk/{chunk-ZYAUYXSW.mjs.map → chunk-J5RGJQ53.mjs.map} +1 -1
  99. package/dist/sdk/{chunk-WMJKH4XE.mjs → chunk-J7LXIPZS.mjs} +16 -1
  100. package/dist/sdk/{chunk-EXFGO4FX.mjs → chunk-KFKHU6CM.mjs} +2 -2
  101. package/dist/sdk/{chunk-MPS4HVQI.mjs → chunk-N7HO6KKC.mjs} +8 -8
  102. package/dist/sdk/{chunk-O5EZDNYL.mjs → chunk-NCWIZVOT.mjs} +2 -2
  103. package/dist/sdk/{chunk-3NMLT3YS.mjs → chunk-PO7X5XI7.mjs} +3 -3
  104. package/dist/sdk/{chunk-BHOKBQPB.mjs → chunk-R5Z7YWPB.mjs} +5 -5
  105. package/dist/sdk/{chunk-EORMDOZU.mjs → chunk-SGS2VMEL.mjs} +7 -7
  106. package/dist/sdk/{chunk-BOVFH3LI.mjs → chunk-VF6XIUE4.mjs} +21 -10
  107. package/dist/sdk/chunk-VF6XIUE4.mjs.map +1 -0
  108. package/dist/sdk/{chunk-J2QWVDXK.mjs → chunk-XDLQ3UNF.mjs} +3 -3
  109. package/dist/sdk/{chunk-S2RUE2RG.mjs → chunk-XR7XXGL7.mjs} +3 -3
  110. package/dist/sdk/{chunk-NAW3DB3I.mjs → chunk-XXAEN5KU.mjs} +3 -3
  111. package/dist/sdk/command-executor-DVVXERLR.mjs +14 -0
  112. package/dist/sdk/config-7VTT64SQ.mjs +16 -0
  113. package/dist/sdk/config-merger-RKCZJQ44.mjs +10 -0
  114. package/dist/sdk/event-bus-5K3Y2FCS.mjs +43 -0
  115. package/dist/sdk/{event-bus-5BEVPQ6T.mjs.map → event-bus-5K3Y2FCS.mjs.map} +1 -1
  116. package/dist/sdk/failure-condition-evaluator-4WMDF4Q3.mjs +17 -0
  117. package/dist/sdk/git-repository-analyzer-QFMW6WIS.mjs +471 -0
  118. package/dist/sdk/git-repository-analyzer-QFMW6WIS.mjs.map +1 -0
  119. package/dist/sdk/{github-frontend-5PCKKHVC.mjs → github-frontend-3N2NLO66.mjs} +520 -588
  120. package/dist/sdk/github-frontend-3N2NLO66.mjs.map +1 -0
  121. package/dist/sdk/host-ONVMEHAA.mjs +63 -0
  122. package/dist/sdk/host-ONVMEHAA.mjs.map +1 -0
  123. package/dist/sdk/{liquid-extensions-I7O7KMHF.mjs → liquid-extensions-5IZLTFSZ.mjs} +8 -8
  124. package/dist/sdk/memory-store-3N4AZCYB.mjs +12 -0
  125. package/dist/sdk/{metrics-7PP3EJUH.mjs → metrics-GXQ2EDXA.mjs} +4 -4
  126. package/dist/sdk/ndjson-sink-FD2PSXGD.mjs +52 -0
  127. package/dist/sdk/{ndjson-sink-B4V4NTAQ.mjs.map → ndjson-sink-FD2PSXGD.mjs.map} +1 -1
  128. package/dist/sdk/{prompt-state-EZYOUG75.mjs → prompt-state-YHGXB2OA.mjs} +5 -5
  129. package/dist/sdk/{renderer-schema-CKFB5NDB.mjs → renderer-schema-CMXOLNIG.mjs} +4 -4
  130. package/dist/sdk/routing-S3Y7T2X3.mjs +24 -0
  131. package/dist/sdk/sdk.d.mts +212 -4
  132. package/dist/sdk/sdk.d.ts +212 -4
  133. package/dist/sdk/sdk.js +26927 -6264
  134. package/dist/sdk/sdk.js.map +1 -1
  135. package/dist/sdk/sdk.mjs +23 -1278
  136. package/dist/sdk/sdk.mjs.map +1 -1
  137. package/dist/sdk/session-registry-6PV6SGEJ.mjs +10 -0
  138. package/dist/sdk/slack-frontend-R3M2CACB.mjs +899 -0
  139. package/dist/sdk/slack-frontend-R3M2CACB.mjs.map +1 -0
  140. package/dist/sdk/{trace-helpers-VP6QYVBX.mjs → trace-helpers-YHNPC7MR.mjs} +4 -4
  141. package/dist/sdk/tracer-init-XPRWKMZT.mjs +10 -0
  142. package/dist/sdk/tui-frontend-S546M7A7.mjs +281 -0
  143. package/dist/sdk/tui-frontend-S546M7A7.mjs.map +1 -0
  144. package/dist/sdk/workflow-check-provider-4F3432ZP.mjs +28 -0
  145. package/dist/sdk/workflow-check-provider-A44PBPG2.mjs +28 -0
  146. package/dist/sdk/workflow-check-provider-A44PBPG2.mjs.map +1 -0
  147. package/dist/sdk/workflow-registry-ZAYYXLEP.mjs +12 -0
  148. package/dist/sdk/workflow-registry-ZAYYXLEP.mjs.map +1 -0
  149. package/dist/slack/client.d.ts +28 -0
  150. package/dist/slack/client.d.ts.map +1 -1
  151. package/dist/slack/schedule-tool-handler.d.ts +46 -0
  152. package/dist/slack/schedule-tool-handler.d.ts.map +1 -0
  153. package/dist/slack/slack-output-adapter.d.ts +44 -0
  154. package/dist/slack/slack-output-adapter.d.ts.map +1 -0
  155. package/dist/slack/socket-runner.d.ts +22 -0
  156. package/dist/slack/socket-runner.d.ts.map +1 -1
  157. package/dist/state-machine/dispatch/execution-invoker.d.ts.map +1 -1
  158. package/dist/state-machine/dispatch/foreach-processor.d.ts.map +1 -1
  159. package/dist/state-machine/dispatch/sandbox-routing.d.ts +21 -0
  160. package/dist/state-machine/dispatch/sandbox-routing.d.ts.map +1 -0
  161. package/dist/state-machine/states/level-dispatch.d.ts.map +1 -1
  162. package/dist/state-machine-execution-engine.d.ts.map +1 -1
  163. package/dist/test-runner/index.d.ts +5 -0
  164. package/dist/test-runner/index.d.ts.map +1 -1
  165. package/dist/{output/traces/run-2026-02-01T09-59-08-165Z.ndjson → traces/run-2026-02-08T18-16-04-160Z.ndjson} +84 -84
  166. package/dist/{output/traces/run-2026-02-01T09-59-52-595Z.ndjson → traces/run-2026-02-08T18-16-51-253Z.ndjson} +1029 -1029
  167. package/dist/tui/chat-runner.d.ts +39 -0
  168. package/dist/tui/chat-runner.d.ts.map +1 -0
  169. package/dist/tui/chat-state.d.ts +56 -0
  170. package/dist/tui/chat-state.d.ts.map +1 -0
  171. package/dist/tui/chat-tui.d.ts +69 -0
  172. package/dist/tui/chat-tui.d.ts.map +1 -0
  173. package/dist/tui/components/chat-box.d.ts +33 -0
  174. package/dist/tui/components/chat-box.d.ts.map +1 -0
  175. package/dist/tui/components/input-bar.d.ts +50 -0
  176. package/dist/tui/components/input-bar.d.ts.map +1 -0
  177. package/dist/tui/components/status-bar.d.ts +31 -0
  178. package/dist/tui/components/status-bar.d.ts.map +1 -0
  179. package/dist/tui/components/trace-viewer.d.ts +73 -0
  180. package/dist/tui/components/trace-viewer.d.ts.map +1 -0
  181. package/dist/tui/index.d.ts +14 -0
  182. package/dist/tui/index.d.ts.map +1 -0
  183. package/dist/tui/tui-frontend.d.ts +29 -0
  184. package/dist/tui/tui-frontend.d.ts.map +1 -0
  185. package/dist/types/bot.d.ts +35 -0
  186. package/dist/types/bot.d.ts.map +1 -1
  187. package/dist/types/config.d.ts +152 -3
  188. package/dist/types/config.d.ts.map +1 -1
  189. package/dist/types/engine.d.ts +3 -0
  190. package/dist/types/engine.d.ts.map +1 -1
  191. package/dist/utils/sandbox.d.ts.map +1 -1
  192. package/dist/utils/workspace-manager.d.ts +22 -2
  193. package/dist/utils/workspace-manager.d.ts.map +1 -1
  194. package/dist/utils/worktree-manager.d.ts +2 -1
  195. package/dist/utils/worktree-manager.d.ts.map +1 -1
  196. package/package.json +4 -2
  197. package/dist/docs/NPM_USAGE.md +0 -281
  198. package/dist/generated/config-schema.json +0 -2161
  199. package/dist/sdk/check-provider-registry-CVUONJ5A.mjs +0 -28
  200. package/dist/sdk/chunk-BOVFH3LI.mjs.map +0 -1
  201. package/dist/sdk/chunk-TS6BUNAI.mjs +0 -17722
  202. package/dist/sdk/chunk-TS6BUNAI.mjs.map +0 -1
  203. package/dist/sdk/chunk-XWJPT5KQ.mjs.map +0 -1
  204. package/dist/sdk/command-executor-Q7MHJKZJ.mjs +0 -14
  205. package/dist/sdk/config-DXX64GD3.mjs +0 -16
  206. package/dist/sdk/config-merger-PX3WIT57.mjs +0 -10
  207. package/dist/sdk/event-bus-5BEVPQ6T.mjs +0 -35
  208. package/dist/sdk/failure-condition-evaluator-G4HMJPXF.mjs +0 -17
  209. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs +0 -458
  210. package/dist/sdk/git-repository-analyzer-HJC4MYW4.mjs.map +0 -1
  211. package/dist/sdk/github-frontend-5PCKKHVC.mjs.map +0 -1
  212. package/dist/sdk/host-H3AWNZ2F.mjs +0 -52
  213. package/dist/sdk/host-H3AWNZ2F.mjs.map +0 -1
  214. package/dist/sdk/memory-store-RW5N2NGJ.mjs +0 -12
  215. package/dist/sdk/ndjson-sink-B4V4NTAQ.mjs +0 -44
  216. package/dist/sdk/routing-QHTGDIXF.mjs +0 -24
  217. package/dist/sdk/session-registry-4E6YRQ77.mjs +0 -10
  218. package/dist/sdk/slack-frontend-JUT3TYVC.mjs +0 -821
  219. package/dist/sdk/slack-frontend-JUT3TYVC.mjs.map +0 -1
  220. package/dist/sdk/tracer-init-GSLPPLCD.mjs +0 -10
  221. package/dist/sdk/workflow-check-provider-3IWBAZP7.mjs +0 -28
  222. package/dist/sdk/workflow-registry-KFWSDSLM.mjs +0 -12
  223. package/dist/tui.d.ts +0 -51
  224. package/dist/tui.d.ts.map +0 -1
  225. /package/dist/sdk/{check-provider-registry-CVUONJ5A.mjs.map → check-provider-registry-ACRGIYOB.mjs.map} +0 -0
  226. /package/dist/sdk/{chunk-WMJKH4XE.mjs.map → check-provider-registry-VYHKFHK2.mjs.map} +0 -0
  227. /package/dist/sdk/{chunk-CNX7V5JK.mjs.map → chunk-25IC7KXZ.mjs.map} +0 -0
  228. /package/dist/sdk/{chunk-IHZOSIF4.mjs.map → chunk-2KB35MB7.mjs.map} +0 -0
  229. /package/dist/sdk/{chunk-HQL734ZI.mjs.map → chunk-6W75IMDC.mjs.map} +0 -0
  230. /package/dist/sdk/{chunk-3OMWVM6J.mjs.map → chunk-B7BVQM5K.mjs.map} +0 -0
  231. /package/dist/sdk/{chunk-VW2GBXQT.mjs.map → chunk-D5KI4YQ4.mjs.map} +0 -0
  232. /package/dist/sdk/{command-executor-Q7MHJKZJ.mjs.map → chunk-J7LXIPZS.mjs.map} +0 -0
  233. /package/dist/sdk/{chunk-EXFGO4FX.mjs.map → chunk-KFKHU6CM.mjs.map} +0 -0
  234. /package/dist/sdk/{chunk-MPS4HVQI.mjs.map → chunk-N7HO6KKC.mjs.map} +0 -0
  235. /package/dist/sdk/{chunk-O5EZDNYL.mjs.map → chunk-NCWIZVOT.mjs.map} +0 -0
  236. /package/dist/sdk/{chunk-3NMLT3YS.mjs.map → chunk-PO7X5XI7.mjs.map} +0 -0
  237. /package/dist/sdk/{chunk-BHOKBQPB.mjs.map → chunk-R5Z7YWPB.mjs.map} +0 -0
  238. /package/dist/sdk/{chunk-EORMDOZU.mjs.map → chunk-SGS2VMEL.mjs.map} +0 -0
  239. /package/dist/sdk/{chunk-J2QWVDXK.mjs.map → chunk-XDLQ3UNF.mjs.map} +0 -0
  240. /package/dist/sdk/{chunk-S2RUE2RG.mjs.map → chunk-XR7XXGL7.mjs.map} +0 -0
  241. /package/dist/sdk/{chunk-NAW3DB3I.mjs.map → chunk-XXAEN5KU.mjs.map} +0 -0
  242. /package/dist/sdk/{config-DXX64GD3.mjs.map → command-executor-DVVXERLR.mjs.map} +0 -0
  243. /package/dist/sdk/{config-merger-PX3WIT57.mjs.map → config-7VTT64SQ.mjs.map} +0 -0
  244. /package/dist/sdk/{failure-condition-evaluator-G4HMJPXF.mjs.map → config-merger-RKCZJQ44.mjs.map} +0 -0
  245. /package/dist/sdk/{liquid-extensions-I7O7KMHF.mjs.map → failure-condition-evaluator-4WMDF4Q3.mjs.map} +0 -0
  246. /package/dist/sdk/{memory-store-RW5N2NGJ.mjs.map → liquid-extensions-5IZLTFSZ.mjs.map} +0 -0
  247. /package/dist/sdk/{metrics-7PP3EJUH.mjs.map → memory-store-3N4AZCYB.mjs.map} +0 -0
  248. /package/dist/sdk/{prompt-state-EZYOUG75.mjs.map → metrics-GXQ2EDXA.mjs.map} +0 -0
  249. /package/dist/sdk/{routing-QHTGDIXF.mjs.map → prompt-state-YHGXB2OA.mjs.map} +0 -0
  250. /package/dist/sdk/{renderer-schema-CKFB5NDB.mjs.map → renderer-schema-CMXOLNIG.mjs.map} +0 -0
  251. /package/dist/sdk/{session-registry-4E6YRQ77.mjs.map → routing-S3Y7T2X3.mjs.map} +0 -0
  252. /package/dist/sdk/{trace-helpers-VP6QYVBX.mjs.map → session-registry-6PV6SGEJ.mjs.map} +0 -0
  253. /package/dist/sdk/{tracer-init-GSLPPLCD.mjs.map → trace-helpers-YHNPC7MR.mjs.map} +0 -0
  254. /package/dist/sdk/{workflow-check-provider-3IWBAZP7.mjs.map → tracer-init-XPRWKMZT.mjs.map} +0 -0
  255. /package/dist/sdk/{workflow-registry-KFWSDSLM.mjs.map → workflow-check-provider-4F3432ZP.mjs.map} +0 -0
@@ -64,9 +64,63 @@ interface ReviewSummary {
64
64
  }
65
65
 
66
66
  /**
67
- * Types for Visor configuration system
67
+ * Types for Docker-based sandbox execution environments
68
68
  */
69
69
 
70
+ /**
71
+ * Cache configuration for sandbox volumes
72
+ */
73
+ interface SandboxCacheConfig {
74
+ /** Liquid template for cache scope prefix (default: git branch) */
75
+ prefix?: string;
76
+ /** Fallback prefix when current prefix has no cache */
77
+ fallback_prefix?: string;
78
+ /** Paths inside the container to cache */
79
+ paths: string[];
80
+ /** Time-to-live for cache volumes (e.g., "7d", "24h") */
81
+ ttl?: string;
82
+ /** Maximum number of cache scopes to keep */
83
+ max_scopes?: number;
84
+ }
85
+ /**
86
+ * Resource limits for sandbox containers
87
+ */
88
+ interface SandboxResourceConfig {
89
+ /** Memory limit (e.g., "512m", "2g") */
90
+ memory?: string;
91
+ /** CPU limit (e.g., 1.0, 0.5) */
92
+ cpu?: number;
93
+ }
94
+ /**
95
+ * Configuration for a single sandbox environment
96
+ */
97
+ interface SandboxConfig {
98
+ /** Docker image to use (e.g., "node:20-alpine") */
99
+ image?: string;
100
+ /** Path to Dockerfile (relative to config file or absolute) */
101
+ dockerfile?: string;
102
+ /** Inline Dockerfile content */
103
+ dockerfile_inline?: string;
104
+ /** Path to docker-compose file */
105
+ compose?: string;
106
+ /** Service name within the compose file */
107
+ service?: string;
108
+ /** Working directory inside container (default: /workspace) */
109
+ workdir?: string;
110
+ /** Glob patterns for host env vars to forward into sandbox */
111
+ env_passthrough?: string[];
112
+ /** Enable/disable network access (default: true) */
113
+ network?: boolean;
114
+ /** Mount repo as read-only (default: false) */
115
+ read_only?: boolean;
116
+ /** Resource limits */
117
+ resources?: SandboxResourceConfig;
118
+ /** Where visor is mounted inside container (default: /opt/visor) */
119
+ visor_path?: string;
120
+ /** Cache volume configuration */
121
+ cache?: SandboxCacheConfig;
122
+ }
123
+
70
124
  /**
71
125
  * Failure condition severity levels
72
126
  */
@@ -250,6 +304,8 @@ interface AIProviderConfig {
250
304
  mcpServers?: Record<string, McpServerConfig>;
251
305
  /** Enable the delegate tool for task distribution to subagents */
252
306
  enableDelegate?: boolean;
307
+ /** Enable task management for tracking multi-goal requests */
308
+ enableTasks?: boolean;
253
309
  /** Retry configuration for this provider */
254
310
  retry?: AIRetryConfig;
255
311
  /** Fallback configuration for provider failures */
@@ -266,17 +322,39 @@ interface AIProviderConfig {
266
322
  bashConfig?: BashConfig;
267
323
  /** Completion prompt for post-completion validation/review (runs after attempt_completion) */
268
324
  completion_prompt?: string;
325
+ /** Enable the schedule tool for scheduling workflow executions (requires scheduler configuration) */
326
+ enable_scheduler?: boolean;
269
327
  }
270
328
  /**
271
- * MCP Server configuration
329
+ * Unified MCP server/tool entry - type detected by which properties are present
330
+ *
331
+ * Detection logic (priority order):
332
+ * 1. Has `command` → stdio MCP server (external process)
333
+ * 2. Has `url` → SSE/HTTP MCP server (external endpoint)
334
+ * 3. Has `workflow` → workflow tool reference
335
+ * 4. Empty `{}` or just key → auto-detect from `tools:` section
272
336
  */
273
337
  interface McpServerConfig {
274
- /** Command to execute for the MCP server */
275
- command: string;
338
+ /** Command to execute (presence indicates stdio server) */
339
+ command?: string;
276
340
  /** Arguments to pass to the command */
277
341
  args?: string[];
278
342
  /** Environment variables for the MCP server */
279
343
  env?: Record<string, string>;
344
+ /** URL endpoint (presence indicates external server) */
345
+ url?: string;
346
+ /** Transport type */
347
+ transport?: 'stdio' | 'sse' | 'http';
348
+ /** Workflow ID or path (presence indicates workflow tool) */
349
+ workflow?: string;
350
+ /** Inputs to pass to workflow */
351
+ inputs?: Record<string, unknown>;
352
+ /** Tool description for AI */
353
+ description?: string;
354
+ /** Whitelist specific methods from this MCP server (supports wildcards like "search_*") */
355
+ allowedMethods?: string[];
356
+ /** Block specific methods from this MCP server (supports wildcards like "*_delete") */
357
+ blockedMethods?: string[];
280
358
  }
281
359
  /**
282
360
  * Claude Code configuration
@@ -362,8 +440,44 @@ interface CheckConfig {
362
440
  ai_custom_prompt?: string;
363
441
  /** MCP servers for this AI check - overrides global setting */
364
442
  ai_mcp_servers?: Record<string, McpServerConfig>;
443
+ /**
444
+ * JavaScript expression to dynamically compute MCP servers for this AI check.
445
+ * Expression has access to: outputs, inputs, pr, files, env, memory
446
+ * Must return an object mapping server names to McpServerConfig objects.
447
+ *
448
+ * Example:
449
+ * ```
450
+ * const servers = {};
451
+ * const tags = outputs['route-intent']?.tags || [];
452
+ * if (tags.includes('jira')) {
453
+ * servers.jira = {
454
+ * command: "npx",
455
+ * args: ["-y", "@aashari/mcp-server-atlassian-jira"],
456
+ * env: { ATLASSIAN_SITE_NAME: "mysite" }
457
+ * };
458
+ * }
459
+ * return servers;
460
+ * ```
461
+ */
462
+ ai_mcp_servers_js?: string;
365
463
  /** List of custom tool names to expose to this AI check via ephemeral SSE MCP server */
366
464
  ai_custom_tools?: string[];
465
+ /**
466
+ * JavaScript expression to dynamically compute custom tools for this AI check.
467
+ * Expression has access to: outputs, inputs, pr, files, env, memory
468
+ * Must return an array of tool names (strings) or WorkflowToolReference objects
469
+ * ({ workflow: string, args?: Record<string, unknown> })
470
+ *
471
+ * Example:
472
+ * ```
473
+ * const tools = [];
474
+ * if (outputs['route-intent'].intent === 'engineer') {
475
+ * tools.push({ workflow: 'engineer', args: { projects: ['tyk'] } });
476
+ * }
477
+ * return tools;
478
+ * ```
479
+ */
480
+ ai_custom_tools_js?: string;
367
481
  /** Claude Code configuration (for claude-code type checks) */
368
482
  claude_code?: ClaudeCodeConfig;
369
483
  /** Environment variables for this check */
@@ -566,6 +680,8 @@ interface CheckConfig {
566
680
  cleanup_on_failure?: boolean;
567
681
  /** Keep worktree after workflow completion (default: false) */
568
682
  persist_worktree?: boolean;
683
+ /** Sandbox name to use for this check (overrides workspace-level default) */
684
+ sandbox?: string;
569
685
  }
570
686
  /**
571
687
  * Backoff policy for retries
@@ -968,6 +1084,85 @@ interface WorkflowOutput {
968
1084
  /** Value using JavaScript expression (alternative to value) */
969
1085
  value_js?: string;
970
1086
  }
1087
+ interface SandboxDefaults {
1088
+ /** Base env var patterns for all sandboxes (replaces hardcoded defaults when set) */
1089
+ env_passthrough?: string[];
1090
+ }
1091
+ /**
1092
+ * Static cron job defined in YAML configuration
1093
+ * These are always executed by the scheduler daemon
1094
+ */
1095
+ interface StaticCronJob {
1096
+ /** Cron expression (e.g., "0 9 * * 1" for every Monday at 9am) */
1097
+ schedule: string;
1098
+ /** Workflow/check ID to run */
1099
+ workflow: string;
1100
+ /** Optional workflow inputs */
1101
+ inputs?: Record<string, unknown>;
1102
+ /** Output destination configuration */
1103
+ output?: {
1104
+ /** Output type: slack, github, webhook, or none */
1105
+ type: 'slack' | 'github' | 'webhook' | 'none';
1106
+ /** Target (channel name, repo, URL) */
1107
+ target?: string;
1108
+ /** Thread ID for threaded outputs */
1109
+ thread_id?: string;
1110
+ };
1111
+ /** Description for logging/display */
1112
+ description?: string;
1113
+ /** Enable/disable this job (default: true) */
1114
+ enabled?: boolean;
1115
+ /** Timezone for schedule (default: UTC or scheduler default) */
1116
+ timezone?: string;
1117
+ }
1118
+ /**
1119
+ * Scheduler limits configuration
1120
+ */
1121
+ interface SchedulerLimitsConfig {
1122
+ /** Maximum schedules per user (default: 25) */
1123
+ max_per_user?: number;
1124
+ /** Maximum recurring schedules per user (default: 10) */
1125
+ max_recurring_per_user?: number;
1126
+ /** Maximum total schedules (default: 1000) */
1127
+ max_global?: number;
1128
+ }
1129
+ /**
1130
+ * Scheduler permissions for dynamic schedule creation
1131
+ */
1132
+ interface SchedulerPermissionsConfig {
1133
+ /** Allow personal schedules (via DM or CLI) */
1134
+ allow_personal?: boolean;
1135
+ /** Allow channel schedules (in Slack channels) */
1136
+ allow_channel?: boolean;
1137
+ /** Allow DM schedules (to specific users) */
1138
+ allow_dm?: boolean;
1139
+ /** List of allowed workflow patterns (glob-style, e.g., "report-*") */
1140
+ allowed_workflows?: string[];
1141
+ /** List of denied workflow patterns */
1142
+ denied_workflows?: string[];
1143
+ }
1144
+ /**
1145
+ * Scheduler configuration for workflow scheduling
1146
+ */
1147
+ interface SchedulerConfig {
1148
+ /** Enable/disable the scheduler (default: true) */
1149
+ enabled?: boolean;
1150
+ /** Storage configuration */
1151
+ storage?: {
1152
+ /** Path to schedules JSON file (default: .visor/schedules.json) */
1153
+ path?: string;
1154
+ };
1155
+ /** Limits for dynamic schedules */
1156
+ limits?: SchedulerLimitsConfig;
1157
+ /** Default timezone (IANA format, e.g., "America/New_York") */
1158
+ default_timezone?: string;
1159
+ /** Check interval in milliseconds (default: 60000) */
1160
+ check_interval_ms?: number;
1161
+ /** Permissions for dynamic schedule creation (via AI tool) */
1162
+ permissions?: SchedulerPermissionsConfig;
1163
+ /** Static cron jobs defined in configuration (always executed) */
1164
+ cron?: Record<string, StaticCronJob>;
1165
+ }
971
1166
  /**
972
1167
  * Main Visor configuration
973
1168
  */
@@ -1029,8 +1224,16 @@ interface VisorConfig {
1029
1224
  }>;
1030
1225
  /** Workspace isolation configuration for sandboxed execution */
1031
1226
  workspace?: WorkspaceConfig;
1227
+ /** Workspace-level default sandbox name (all checks use this unless overridden) */
1228
+ sandbox?: string;
1229
+ /** Named sandbox environment definitions */
1230
+ sandboxes?: Record<string, SandboxConfig>;
1231
+ /** Workspace-level sandbox defaults (env allowlist, etc.) */
1232
+ sandbox_defaults?: SandboxDefaults;
1032
1233
  /** Slack configuration */
1033
1234
  slack?: SlackConfig;
1235
+ /** Scheduler configuration for scheduled workflow execution */
1236
+ scheduler?: SchedulerConfig;
1034
1237
  }
1035
1238
  /**
1036
1239
  * Workspace isolation configuration
@@ -1258,6 +1461,11 @@ interface ExecutionContext {
1258
1461
  webhookData?: Map<string, unknown>;
1259
1462
  eventType?: string;
1260
1463
  };
1464
+ /**
1465
+ * Callback for capturing AI responses - used by scheduler to store previousResponse
1466
+ * for recurring reminders. The text passed is the AI response before mrkdwn formatting.
1467
+ */
1468
+ responseCapture?: (text: string) => void;
1261
1469
  }
1262
1470
 
1263
1471
  interface VisorOptions {
package/dist/sdk/sdk.d.ts CHANGED
@@ -64,9 +64,63 @@ interface ReviewSummary {
64
64
  }
65
65
 
66
66
  /**
67
- * Types for Visor configuration system
67
+ * Types for Docker-based sandbox execution environments
68
68
  */
69
69
 
70
+ /**
71
+ * Cache configuration for sandbox volumes
72
+ */
73
+ interface SandboxCacheConfig {
74
+ /** Liquid template for cache scope prefix (default: git branch) */
75
+ prefix?: string;
76
+ /** Fallback prefix when current prefix has no cache */
77
+ fallback_prefix?: string;
78
+ /** Paths inside the container to cache */
79
+ paths: string[];
80
+ /** Time-to-live for cache volumes (e.g., "7d", "24h") */
81
+ ttl?: string;
82
+ /** Maximum number of cache scopes to keep */
83
+ max_scopes?: number;
84
+ }
85
+ /**
86
+ * Resource limits for sandbox containers
87
+ */
88
+ interface SandboxResourceConfig {
89
+ /** Memory limit (e.g., "512m", "2g") */
90
+ memory?: string;
91
+ /** CPU limit (e.g., 1.0, 0.5) */
92
+ cpu?: number;
93
+ }
94
+ /**
95
+ * Configuration for a single sandbox environment
96
+ */
97
+ interface SandboxConfig {
98
+ /** Docker image to use (e.g., "node:20-alpine") */
99
+ image?: string;
100
+ /** Path to Dockerfile (relative to config file or absolute) */
101
+ dockerfile?: string;
102
+ /** Inline Dockerfile content */
103
+ dockerfile_inline?: string;
104
+ /** Path to docker-compose file */
105
+ compose?: string;
106
+ /** Service name within the compose file */
107
+ service?: string;
108
+ /** Working directory inside container (default: /workspace) */
109
+ workdir?: string;
110
+ /** Glob patterns for host env vars to forward into sandbox */
111
+ env_passthrough?: string[];
112
+ /** Enable/disable network access (default: true) */
113
+ network?: boolean;
114
+ /** Mount repo as read-only (default: false) */
115
+ read_only?: boolean;
116
+ /** Resource limits */
117
+ resources?: SandboxResourceConfig;
118
+ /** Where visor is mounted inside container (default: /opt/visor) */
119
+ visor_path?: string;
120
+ /** Cache volume configuration */
121
+ cache?: SandboxCacheConfig;
122
+ }
123
+
70
124
  /**
71
125
  * Failure condition severity levels
72
126
  */
@@ -250,6 +304,8 @@ interface AIProviderConfig {
250
304
  mcpServers?: Record<string, McpServerConfig>;
251
305
  /** Enable the delegate tool for task distribution to subagents */
252
306
  enableDelegate?: boolean;
307
+ /** Enable task management for tracking multi-goal requests */
308
+ enableTasks?: boolean;
253
309
  /** Retry configuration for this provider */
254
310
  retry?: AIRetryConfig;
255
311
  /** Fallback configuration for provider failures */
@@ -266,17 +322,39 @@ interface AIProviderConfig {
266
322
  bashConfig?: BashConfig;
267
323
  /** Completion prompt for post-completion validation/review (runs after attempt_completion) */
268
324
  completion_prompt?: string;
325
+ /** Enable the schedule tool for scheduling workflow executions (requires scheduler configuration) */
326
+ enable_scheduler?: boolean;
269
327
  }
270
328
  /**
271
- * MCP Server configuration
329
+ * Unified MCP server/tool entry - type detected by which properties are present
330
+ *
331
+ * Detection logic (priority order):
332
+ * 1. Has `command` → stdio MCP server (external process)
333
+ * 2. Has `url` → SSE/HTTP MCP server (external endpoint)
334
+ * 3. Has `workflow` → workflow tool reference
335
+ * 4. Empty `{}` or just key → auto-detect from `tools:` section
272
336
  */
273
337
  interface McpServerConfig {
274
- /** Command to execute for the MCP server */
275
- command: string;
338
+ /** Command to execute (presence indicates stdio server) */
339
+ command?: string;
276
340
  /** Arguments to pass to the command */
277
341
  args?: string[];
278
342
  /** Environment variables for the MCP server */
279
343
  env?: Record<string, string>;
344
+ /** URL endpoint (presence indicates external server) */
345
+ url?: string;
346
+ /** Transport type */
347
+ transport?: 'stdio' | 'sse' | 'http';
348
+ /** Workflow ID or path (presence indicates workflow tool) */
349
+ workflow?: string;
350
+ /** Inputs to pass to workflow */
351
+ inputs?: Record<string, unknown>;
352
+ /** Tool description for AI */
353
+ description?: string;
354
+ /** Whitelist specific methods from this MCP server (supports wildcards like "search_*") */
355
+ allowedMethods?: string[];
356
+ /** Block specific methods from this MCP server (supports wildcards like "*_delete") */
357
+ blockedMethods?: string[];
280
358
  }
281
359
  /**
282
360
  * Claude Code configuration
@@ -362,8 +440,44 @@ interface CheckConfig {
362
440
  ai_custom_prompt?: string;
363
441
  /** MCP servers for this AI check - overrides global setting */
364
442
  ai_mcp_servers?: Record<string, McpServerConfig>;
443
+ /**
444
+ * JavaScript expression to dynamically compute MCP servers for this AI check.
445
+ * Expression has access to: outputs, inputs, pr, files, env, memory
446
+ * Must return an object mapping server names to McpServerConfig objects.
447
+ *
448
+ * Example:
449
+ * ```
450
+ * const servers = {};
451
+ * const tags = outputs['route-intent']?.tags || [];
452
+ * if (tags.includes('jira')) {
453
+ * servers.jira = {
454
+ * command: "npx",
455
+ * args: ["-y", "@aashari/mcp-server-atlassian-jira"],
456
+ * env: { ATLASSIAN_SITE_NAME: "mysite" }
457
+ * };
458
+ * }
459
+ * return servers;
460
+ * ```
461
+ */
462
+ ai_mcp_servers_js?: string;
365
463
  /** List of custom tool names to expose to this AI check via ephemeral SSE MCP server */
366
464
  ai_custom_tools?: string[];
465
+ /**
466
+ * JavaScript expression to dynamically compute custom tools for this AI check.
467
+ * Expression has access to: outputs, inputs, pr, files, env, memory
468
+ * Must return an array of tool names (strings) or WorkflowToolReference objects
469
+ * ({ workflow: string, args?: Record<string, unknown> })
470
+ *
471
+ * Example:
472
+ * ```
473
+ * const tools = [];
474
+ * if (outputs['route-intent'].intent === 'engineer') {
475
+ * tools.push({ workflow: 'engineer', args: { projects: ['tyk'] } });
476
+ * }
477
+ * return tools;
478
+ * ```
479
+ */
480
+ ai_custom_tools_js?: string;
367
481
  /** Claude Code configuration (for claude-code type checks) */
368
482
  claude_code?: ClaudeCodeConfig;
369
483
  /** Environment variables for this check */
@@ -566,6 +680,8 @@ interface CheckConfig {
566
680
  cleanup_on_failure?: boolean;
567
681
  /** Keep worktree after workflow completion (default: false) */
568
682
  persist_worktree?: boolean;
683
+ /** Sandbox name to use for this check (overrides workspace-level default) */
684
+ sandbox?: string;
569
685
  }
570
686
  /**
571
687
  * Backoff policy for retries
@@ -968,6 +1084,85 @@ interface WorkflowOutput {
968
1084
  /** Value using JavaScript expression (alternative to value) */
969
1085
  value_js?: string;
970
1086
  }
1087
+ interface SandboxDefaults {
1088
+ /** Base env var patterns for all sandboxes (replaces hardcoded defaults when set) */
1089
+ env_passthrough?: string[];
1090
+ }
1091
+ /**
1092
+ * Static cron job defined in YAML configuration
1093
+ * These are always executed by the scheduler daemon
1094
+ */
1095
+ interface StaticCronJob {
1096
+ /** Cron expression (e.g., "0 9 * * 1" for every Monday at 9am) */
1097
+ schedule: string;
1098
+ /** Workflow/check ID to run */
1099
+ workflow: string;
1100
+ /** Optional workflow inputs */
1101
+ inputs?: Record<string, unknown>;
1102
+ /** Output destination configuration */
1103
+ output?: {
1104
+ /** Output type: slack, github, webhook, or none */
1105
+ type: 'slack' | 'github' | 'webhook' | 'none';
1106
+ /** Target (channel name, repo, URL) */
1107
+ target?: string;
1108
+ /** Thread ID for threaded outputs */
1109
+ thread_id?: string;
1110
+ };
1111
+ /** Description for logging/display */
1112
+ description?: string;
1113
+ /** Enable/disable this job (default: true) */
1114
+ enabled?: boolean;
1115
+ /** Timezone for schedule (default: UTC or scheduler default) */
1116
+ timezone?: string;
1117
+ }
1118
+ /**
1119
+ * Scheduler limits configuration
1120
+ */
1121
+ interface SchedulerLimitsConfig {
1122
+ /** Maximum schedules per user (default: 25) */
1123
+ max_per_user?: number;
1124
+ /** Maximum recurring schedules per user (default: 10) */
1125
+ max_recurring_per_user?: number;
1126
+ /** Maximum total schedules (default: 1000) */
1127
+ max_global?: number;
1128
+ }
1129
+ /**
1130
+ * Scheduler permissions for dynamic schedule creation
1131
+ */
1132
+ interface SchedulerPermissionsConfig {
1133
+ /** Allow personal schedules (via DM or CLI) */
1134
+ allow_personal?: boolean;
1135
+ /** Allow channel schedules (in Slack channels) */
1136
+ allow_channel?: boolean;
1137
+ /** Allow DM schedules (to specific users) */
1138
+ allow_dm?: boolean;
1139
+ /** List of allowed workflow patterns (glob-style, e.g., "report-*") */
1140
+ allowed_workflows?: string[];
1141
+ /** List of denied workflow patterns */
1142
+ denied_workflows?: string[];
1143
+ }
1144
+ /**
1145
+ * Scheduler configuration for workflow scheduling
1146
+ */
1147
+ interface SchedulerConfig {
1148
+ /** Enable/disable the scheduler (default: true) */
1149
+ enabled?: boolean;
1150
+ /** Storage configuration */
1151
+ storage?: {
1152
+ /** Path to schedules JSON file (default: .visor/schedules.json) */
1153
+ path?: string;
1154
+ };
1155
+ /** Limits for dynamic schedules */
1156
+ limits?: SchedulerLimitsConfig;
1157
+ /** Default timezone (IANA format, e.g., "America/New_York") */
1158
+ default_timezone?: string;
1159
+ /** Check interval in milliseconds (default: 60000) */
1160
+ check_interval_ms?: number;
1161
+ /** Permissions for dynamic schedule creation (via AI tool) */
1162
+ permissions?: SchedulerPermissionsConfig;
1163
+ /** Static cron jobs defined in configuration (always executed) */
1164
+ cron?: Record<string, StaticCronJob>;
1165
+ }
971
1166
  /**
972
1167
  * Main Visor configuration
973
1168
  */
@@ -1029,8 +1224,16 @@ interface VisorConfig {
1029
1224
  }>;
1030
1225
  /** Workspace isolation configuration for sandboxed execution */
1031
1226
  workspace?: WorkspaceConfig;
1227
+ /** Workspace-level default sandbox name (all checks use this unless overridden) */
1228
+ sandbox?: string;
1229
+ /** Named sandbox environment definitions */
1230
+ sandboxes?: Record<string, SandboxConfig>;
1231
+ /** Workspace-level sandbox defaults (env allowlist, etc.) */
1232
+ sandbox_defaults?: SandboxDefaults;
1032
1233
  /** Slack configuration */
1033
1234
  slack?: SlackConfig;
1235
+ /** Scheduler configuration for scheduled workflow execution */
1236
+ scheduler?: SchedulerConfig;
1034
1237
  }
1035
1238
  /**
1036
1239
  * Workspace isolation configuration
@@ -1258,6 +1461,11 @@ interface ExecutionContext {
1258
1461
  webhookData?: Map<string, unknown>;
1259
1462
  eventType?: string;
1260
1463
  };
1464
+ /**
1465
+ * Callback for capturing AI responses - used by scheduler to store previousResponse
1466
+ * for recurring reminders. The text passed is the AI response before mrkdwn formatting.
1467
+ */
1468
+ responseCapture?: (text: string) => void;
1261
1469
  }
1262
1470
 
1263
1471
  interface VisorOptions {