@provos/ironcurtain 0.10.0 → 0.11.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 (467) hide show
  1. package/README.md +60 -8
  2. package/dist/auth/oauth-provider.js +1 -4
  3. package/dist/auth/oauth-provider.js.map +1 -1
  4. package/dist/cli.js +38 -0
  5. package/dist/cli.js.map +1 -1
  6. package/dist/config/config-command.js +162 -7
  7. package/dist/config/config-command.js.map +1 -1
  8. package/dist/config/first-start.js +61 -0
  9. package/dist/config/first-start.js.map +1 -1
  10. package/dist/config/generated/compiled-policy.json +528 -161
  11. package/dist/config/generated/test-scenarios.json +4810 -170
  12. package/dist/config/generated/tool-annotations.json +34 -47
  13. package/dist/config/index.d.ts +58 -0
  14. package/dist/config/index.js +97 -15
  15. package/dist/config/index.js.map +1 -1
  16. package/dist/config/mcp-servers.json +2 -2
  17. package/dist/config/paths.d.ts +175 -0
  18. package/dist/config/paths.js +308 -14
  19. package/dist/config/paths.js.map +1 -1
  20. package/dist/config/types.d.ts +7 -1
  21. package/dist/config/user-config.d.ts +53 -5
  22. package/dist/config/user-config.js +96 -30
  23. package/dist/config/user-config.js.map +1 -1
  24. package/dist/config/validate-policy-dir.d.ts +10 -0
  25. package/dist/config/validate-policy-dir.js +59 -0
  26. package/dist/config/validate-policy-dir.js.map +1 -0
  27. package/dist/cron/job-commands.js +22 -2
  28. package/dist/cron/job-commands.js.map +1 -1
  29. package/dist/cron/types.d.ts +16 -2
  30. package/dist/cron/types.js +1 -3
  31. package/dist/cron/types.js.map +1 -1
  32. package/dist/daemon/daemon-command.js +16 -2
  33. package/dist/daemon/daemon-command.js.map +1 -1
  34. package/dist/daemon/ironcurtain-daemon.d.ts +44 -1
  35. package/dist/daemon/ironcurtain-daemon.js +210 -8
  36. package/dist/daemon/ironcurtain-daemon.js.map +1 -1
  37. package/dist/docker/adapters/claude-code.js +194 -20
  38. package/dist/docker/adapters/claude-code.js.map +1 -1
  39. package/dist/docker/adapters/goose.d.ts +12 -11
  40. package/dist/docker/adapters/goose.js +80 -27
  41. package/dist/docker/adapters/goose.js.map +1 -1
  42. package/dist/docker/agent-adapter.d.ts +178 -4
  43. package/dist/docker/agent-adapter.js +14 -0
  44. package/dist/docker/agent-adapter.js.map +1 -1
  45. package/dist/docker/code-mode-proxy.d.ts +27 -0
  46. package/dist/docker/code-mode-proxy.js +3 -0
  47. package/dist/docker/code-mode-proxy.js.map +1 -1
  48. package/dist/docker/docker-agent-session.d.ts +113 -62
  49. package/dist/docker/docker-agent-session.js +242 -294
  50. package/dist/docker/docker-agent-session.js.map +1 -1
  51. package/dist/docker/docker-infrastructure.d.ts +246 -21
  52. package/dist/docker/docker-infrastructure.js +520 -29
  53. package/dist/docker/docker-infrastructure.js.map +1 -1
  54. package/dist/docker/docker-manager.d.ts +36 -1
  55. package/dist/docker/docker-manager.js +135 -30
  56. package/dist/docker/docker-manager.js.map +1 -1
  57. package/dist/docker/docker-progress-sink.d.ts +43 -0
  58. package/dist/docker/docker-progress-sink.js +299 -0
  59. package/dist/docker/docker-progress-sink.js.map +1 -0
  60. package/dist/docker/mitm-proxy.d.ts +84 -1
  61. package/dist/docker/mitm-proxy.js +380 -18
  62. package/dist/docker/mitm-proxy.js.map +1 -1
  63. package/dist/docker/oauth-credentials.d.ts +46 -3
  64. package/dist/docker/oauth-credentials.js +56 -14
  65. package/dist/docker/oauth-credentials.js.map +1 -1
  66. package/dist/docker/oauth-token-manager.js +2 -2
  67. package/dist/docker/oauth-token-manager.js.map +1 -1
  68. package/dist/docker/orientation.d.ts +1 -1
  69. package/dist/docker/provider-config.d.ts +49 -2
  70. package/dist/docker/provider-config.js +202 -28
  71. package/dist/docker/provider-config.js.map +1 -1
  72. package/dist/docker/proxy-tools.d.ts +0 -2
  73. package/dist/docker/proxy-tools.js +2 -7
  74. package/dist/docker/proxy-tools.js.map +1 -1
  75. package/dist/docker/pty-session.d.ts +49 -1
  76. package/dist/docker/pty-session.js +199 -69
  77. package/dist/docker/pty-session.js.map +1 -1
  78. package/dist/docker/pty-types.d.ts +0 -2
  79. package/dist/docker/pty-types.js +0 -2
  80. package/dist/docker/pty-types.js.map +1 -1
  81. package/dist/docker/resource-limits.d.ts +125 -0
  82. package/dist/docker/resource-limits.js +200 -0
  83. package/dist/docker/resource-limits.js.map +1 -0
  84. package/dist/docker/spawn-with-idle-timeout.d.ts +39 -0
  85. package/dist/docker/spawn-with-idle-timeout.js +152 -0
  86. package/dist/docker/spawn-with-idle-timeout.js.map +1 -0
  87. package/dist/docker/sse-extractor.d.ts +51 -0
  88. package/dist/docker/sse-extractor.js +303 -0
  89. package/dist/docker/sse-extractor.js.map +1 -0
  90. package/dist/docker/token-stream-bus.d.ts +83 -0
  91. package/dist/docker/token-stream-bus.js +98 -0
  92. package/dist/docker/token-stream-bus.js.map +1 -0
  93. package/dist/docker/token-stream-types.d.ts +71 -0
  94. package/dist/docker/token-stream-types.js +8 -0
  95. package/dist/docker/token-stream-types.js.map +1 -0
  96. package/dist/docker/types.d.ts +53 -6
  97. package/dist/doctor/checks.d.ts +138 -0
  98. package/dist/doctor/checks.js +511 -0
  99. package/dist/doctor/checks.js.map +1 -0
  100. package/dist/doctor/doctor-command.d.ts +29 -0
  101. package/dist/doctor/doctor-command.js +160 -0
  102. package/dist/doctor/doctor-command.js.map +1 -0
  103. package/dist/doctor/mcp-liveness.d.ts +28 -0
  104. package/dist/doctor/mcp-liveness.js +84 -0
  105. package/dist/doctor/mcp-liveness.js.map +1 -0
  106. package/dist/doctor/oauth-checks.d.ts +23 -0
  107. package/dist/doctor/oauth-checks.js +157 -0
  108. package/dist/doctor/oauth-checks.js.map +1 -0
  109. package/dist/doctor/output.d.ts +26 -0
  110. package/dist/doctor/output.js +82 -0
  111. package/dist/doctor/output.js.map +1 -0
  112. package/dist/escalation/listener-command.js +0 -3
  113. package/dist/escalation/listener-command.js.map +1 -1
  114. package/dist/event-bus/typed-event-bus.d.ts +26 -0
  115. package/dist/event-bus/typed-event-bus.js +35 -0
  116. package/dist/event-bus/typed-event-bus.js.map +1 -0
  117. package/dist/index.js +24 -9
  118. package/dist/index.js.map +1 -1
  119. package/dist/logger.js +31 -2
  120. package/dist/logger.js.map +1 -1
  121. package/dist/memory/auto-save.d.ts +18 -4
  122. package/dist/memory/auto-save.js +46 -6
  123. package/dist/memory/auto-save.js.map +1 -1
  124. package/dist/memory/memory-policy.d.ts +41 -0
  125. package/dist/memory/memory-policy.js +36 -0
  126. package/dist/memory/memory-policy.js.map +1 -0
  127. package/dist/mux/mux-command.d.ts +10 -1
  128. package/dist/mux/mux-command.js +56 -35
  129. package/dist/mux/mux-command.js.map +1 -1
  130. package/dist/mux/mux-renderer.js +2 -12
  131. package/dist/mux/mux-renderer.js.map +1 -1
  132. package/dist/mux/session-scanner.js +1 -2
  133. package/dist/mux/session-scanner.js.map +1 -1
  134. package/dist/{pipeline → observability}/llm-logger.d.ts +8 -3
  135. package/dist/{pipeline → observability}/llm-logger.js +8 -3
  136. package/dist/observability/llm-logger.js.map +1 -0
  137. package/dist/observe/observe-command.d.ts +12 -0
  138. package/dist/observe/observe-command.js +298 -0
  139. package/dist/observe/observe-command.js.map +1 -0
  140. package/dist/observe/observe-renderer.d.ts +24 -0
  141. package/dist/observe/observe-renderer.js +87 -0
  142. package/dist/observe/observe-renderer.js.map +1 -0
  143. package/dist/observe/observe-tui-rain.d.ts +42 -0
  144. package/dist/observe/observe-tui-rain.js +531 -0
  145. package/dist/observe/observe-tui-rain.js.map +1 -0
  146. package/dist/observe/observe-tui-text-panel.d.ts +46 -0
  147. package/dist/observe/observe-tui-text-panel.js +525 -0
  148. package/dist/observe/observe-tui-text-panel.js.map +1 -0
  149. package/dist/observe/observe-tui-types.d.ts +270 -0
  150. package/dist/observe/observe-tui-types.js +200 -0
  151. package/dist/observe/observe-tui-types.js.map +1 -0
  152. package/dist/observe/observe-tui-word-scorer.d.ts +143 -0
  153. package/dist/observe/observe-tui-word-scorer.js +572 -0
  154. package/dist/observe/observe-tui-word-scorer.js.map +1 -0
  155. package/dist/observe/observe-tui.d.ts +59 -0
  156. package/dist/observe/observe-tui.js +592 -0
  157. package/dist/observe/observe-tui.js.map +1 -0
  158. package/dist/persona/memory-gate.d.ts +19 -0
  159. package/dist/persona/memory-gate.js +33 -0
  160. package/dist/persona/memory-gate.js.map +1 -0
  161. package/dist/persona/persona-command.js +41 -6
  162. package/dist/persona/persona-command.js.map +1 -1
  163. package/dist/persona/resolve.d.ts +22 -0
  164. package/dist/persona/resolve.js +45 -2
  165. package/dist/persona/resolve.js.map +1 -1
  166. package/dist/persona/types.d.ts +16 -0
  167. package/dist/pipeline/constitution-compiler.d.ts +25 -14
  168. package/dist/pipeline/constitution-compiler.js +107 -38
  169. package/dist/pipeline/constitution-compiler.js.map +1 -1
  170. package/dist/pipeline/dynamic-list-types.d.ts +3 -6
  171. package/dist/pipeline/dynamic-list-types.js +3 -16
  172. package/dist/pipeline/dynamic-list-types.js.map +1 -1
  173. package/dist/pipeline/pipeline-runner.js +89 -50
  174. package/dist/pipeline/pipeline-runner.js.map +1 -1
  175. package/dist/pipeline/pipeline-shared.d.ts +1 -1
  176. package/dist/pipeline/pipeline-shared.js +3 -11
  177. package/dist/pipeline/pipeline-shared.js.map +1 -1
  178. package/dist/pipeline/policy-verifier.js +16 -3
  179. package/dist/pipeline/policy-verifier.js.map +1 -1
  180. package/dist/pipeline/proxy-mcp-connections.js +17 -2
  181. package/dist/pipeline/proxy-mcp-connections.js.map +1 -1
  182. package/dist/pipeline/scenario-generator.d.ts +4 -8
  183. package/dist/pipeline/scenario-generator.js +13 -46
  184. package/dist/pipeline/scenario-generator.js.map +1 -1
  185. package/dist/sandbox/index.d.ts +14 -0
  186. package/dist/sandbox/index.js +335 -116
  187. package/dist/sandbox/index.js.map +1 -1
  188. package/dist/sandbox/ironcurtain-protocol.d.ts +52 -0
  189. package/dist/sandbox/ironcurtain-protocol.js +185 -0
  190. package/dist/sandbox/ironcurtain-protocol.js.map +1 -0
  191. package/dist/session/agent-session.d.ts +6 -0
  192. package/dist/session/agent-session.js +16 -5
  193. package/dist/session/agent-session.js.map +1 -1
  194. package/dist/session/cli-transport.js +0 -6
  195. package/dist/session/cli-transport.js.map +1 -1
  196. package/dist/session/index.d.ts +35 -14
  197. package/dist/session/index.js +324 -130
  198. package/dist/session/index.js.map +1 -1
  199. package/dist/session/preflight.d.ts +50 -13
  200. package/dist/session/preflight.js +252 -80
  201. package/dist/session/preflight.js.map +1 -1
  202. package/dist/session/prompts.d.ts +2 -5
  203. package/dist/session/prompts.js.map +1 -1
  204. package/dist/session/session-manager.d.ts +61 -6
  205. package/dist/session/session-manager.js +72 -10
  206. package/dist/session/session-manager.js.map +1 -1
  207. package/dist/session/session-metadata.d.ts +21 -5
  208. package/dist/session/session-metadata.js +34 -12
  209. package/dist/session/session-metadata.js.map +1 -1
  210. package/dist/session/types.d.ts +311 -5
  211. package/dist/session/types.js +57 -1
  212. package/dist/session/types.js.map +1 -1
  213. package/dist/signal/setup-signal.js +13 -21
  214. package/dist/signal/setup-signal.js.map +1 -1
  215. package/dist/signal/signal-bot-daemon.d.ts +16 -1
  216. package/dist/signal/signal-bot-daemon.js +39 -27
  217. package/dist/signal/signal-bot-daemon.js.map +1 -1
  218. package/dist/signal/signal-container.js +7 -1
  219. package/dist/signal/signal-container.js.map +1 -1
  220. package/dist/skills/discovery.d.ts +77 -0
  221. package/dist/skills/discovery.js +206 -0
  222. package/dist/skills/discovery.js.map +1 -0
  223. package/dist/skills/index.d.ts +4 -0
  224. package/dist/skills/index.js +3 -0
  225. package/dist/skills/index.js.map +1 -0
  226. package/dist/skills/staging.d.ts +28 -0
  227. package/dist/skills/staging.js +68 -0
  228. package/dist/skills/staging.js.map +1 -0
  229. package/dist/skills/types.d.ts +46 -0
  230. package/dist/skills/types.js +2 -0
  231. package/dist/skills/types.js.map +1 -0
  232. package/dist/trusted-process/approval-whitelist.d.ts +0 -2
  233. package/dist/trusted-process/approval-whitelist.js +17 -17
  234. package/dist/trusted-process/approval-whitelist.js.map +1 -1
  235. package/dist/trusted-process/async-mutex.d.ts +32 -0
  236. package/dist/trusted-process/async-mutex.js +50 -0
  237. package/dist/trusted-process/async-mutex.js.map +1 -0
  238. package/dist/trusted-process/audit-log.d.ts +38 -1
  239. package/dist/trusted-process/audit-log.js +82 -13
  240. package/dist/trusted-process/audit-log.js.map +1 -1
  241. package/dist/trusted-process/call-circuit-breaker.js +2 -1
  242. package/dist/trusted-process/call-circuit-breaker.js.map +1 -1
  243. package/dist/trusted-process/control-server.d.ts +101 -0
  244. package/dist/trusted-process/control-server.js +282 -0
  245. package/dist/trusted-process/control-server.js.map +1 -0
  246. package/dist/trusted-process/domain-utils.d.ts +6 -6
  247. package/dist/trusted-process/domain-utils.js +7 -23
  248. package/dist/trusted-process/domain-utils.js.map +1 -1
  249. package/dist/trusted-process/error-prefixes.d.ts +16 -0
  250. package/dist/trusted-process/error-prefixes.js +17 -0
  251. package/dist/trusted-process/error-prefixes.js.map +1 -0
  252. package/dist/trusted-process/index.d.ts +40 -23
  253. package/dist/trusted-process/index.js +131 -225
  254. package/dist/trusted-process/index.js.map +1 -1
  255. package/dist/trusted-process/list-matcher.d.ts +17 -0
  256. package/dist/trusted-process/list-matcher.js +31 -0
  257. package/dist/trusted-process/list-matcher.js.map +1 -0
  258. package/dist/trusted-process/mcp-client-manager.d.ts +35 -6
  259. package/dist/trusted-process/mcp-client-manager.js +40 -45
  260. package/dist/trusted-process/mcp-client-manager.js.map +1 -1
  261. package/dist/trusted-process/mcp-proxy-server.d.ts +31 -120
  262. package/dist/trusted-process/mcp-proxy-server.js +166 -657
  263. package/dist/trusted-process/mcp-proxy-server.js.map +1 -1
  264. package/dist/trusted-process/policy-engine.d.ts +16 -4
  265. package/dist/trusted-process/policy-engine.js +90 -45
  266. package/dist/trusted-process/policy-engine.js.map +1 -1
  267. package/dist/trusted-process/policy-roots.d.ts +6 -0
  268. package/dist/trusted-process/policy-roots.js +20 -0
  269. package/dist/trusted-process/policy-roots.js.map +1 -1
  270. package/dist/trusted-process/sandbox-integration.d.ts +12 -0
  271. package/dist/trusted-process/sandbox-integration.js +18 -0
  272. package/dist/trusted-process/sandbox-integration.js.map +1 -1
  273. package/dist/trusted-process/tool-call-coordinator.d.ts +269 -0
  274. package/dist/trusted-process/tool-call-coordinator.js +508 -0
  275. package/dist/trusted-process/tool-call-coordinator.js.map +1 -0
  276. package/dist/trusted-process/tool-call-pipeline.d.ts +205 -0
  277. package/dist/trusted-process/tool-call-pipeline.js +798 -0
  278. package/dist/trusted-process/tool-call-pipeline.js.map +1 -0
  279. package/dist/trusted-process/tool-description-hints.d.ts +1 -1
  280. package/dist/types/argument-roles.d.ts +1 -1
  281. package/dist/types/argument-roles.js +14 -1
  282. package/dist/types/argument-roles.js.map +1 -1
  283. package/dist/types/audit.d.ts +9 -0
  284. package/dist/{session → types}/errors.d.ts +8 -2
  285. package/dist/{session → types}/errors.js +8 -2
  286. package/dist/types/errors.js.map +1 -0
  287. package/dist/types/reserved-servers.d.ts +11 -0
  288. package/dist/types/reserved-servers.js +12 -0
  289. package/dist/types/reserved-servers.js.map +1 -0
  290. package/dist/types/server-listing.d.ts +14 -0
  291. package/dist/types/server-listing.js +2 -0
  292. package/dist/types/server-listing.js.map +1 -0
  293. package/dist/types/slug.d.ts +2 -0
  294. package/dist/types/slug.js +2 -0
  295. package/dist/types/slug.js.map +1 -1
  296. package/dist/types/url-normalize.d.ts +16 -0
  297. package/dist/types/url-normalize.js +33 -0
  298. package/dist/types/url-normalize.js.map +1 -0
  299. package/dist/utils/error-message.d.ts +8 -0
  300. package/dist/utils/error-message.js +11 -0
  301. package/dist/utils/error-message.js.map +1 -0
  302. package/dist/utils/exec-error.d.ts +19 -0
  303. package/dist/utils/exec-error.js +16 -0
  304. package/dist/utils/exec-error.js.map +1 -0
  305. package/dist/utils/is-plain-object.d.ts +7 -0
  306. package/dist/utils/is-plain-object.js +12 -0
  307. package/dist/utils/is-plain-object.js.map +1 -0
  308. package/dist/utils/preflight-checks.d.ts +16 -0
  309. package/dist/utils/preflight-checks.js +178 -0
  310. package/dist/utils/preflight-checks.js.map +1 -0
  311. package/dist/web-ui/__tests__/json-rpc-dispatch.test.d.ts +7 -0
  312. package/dist/web-ui/__tests__/json-rpc-dispatch.test.js +725 -0
  313. package/dist/web-ui/__tests__/json-rpc-dispatch.test.js.map +1 -0
  314. package/dist/web-ui/dispatch/escalation-dispatch.d.ts +7 -0
  315. package/dist/web-ui/dispatch/escalation-dispatch.js +52 -0
  316. package/dist/web-ui/dispatch/escalation-dispatch.js.map +1 -0
  317. package/dist/web-ui/dispatch/job-dispatch.d.ts +8 -0
  318. package/dist/web-ui/dispatch/job-dispatch.js +83 -0
  319. package/dist/web-ui/dispatch/job-dispatch.js.map +1 -0
  320. package/dist/web-ui/dispatch/persona-dispatch.d.ts +6 -0
  321. package/dist/web-ui/dispatch/persona-dispatch.js +116 -0
  322. package/dist/web-ui/dispatch/persona-dispatch.js.map +1 -0
  323. package/dist/web-ui/dispatch/session-dispatch.d.ts +9 -0
  324. package/dist/web-ui/dispatch/session-dispatch.js +201 -0
  325. package/dist/web-ui/dispatch/session-dispatch.js.map +1 -0
  326. package/dist/web-ui/dispatch/token-stream-dispatch.d.ts +15 -0
  327. package/dist/web-ui/dispatch/token-stream-dispatch.js +55 -0
  328. package/dist/web-ui/dispatch/token-stream-dispatch.js.map +1 -0
  329. package/dist/web-ui/dispatch/types.d.ts +31 -0
  330. package/dist/web-ui/dispatch/types.js +68 -0
  331. package/dist/web-ui/dispatch/types.js.map +1 -0
  332. package/dist/web-ui/dispatch/workflow-dispatch.d.ts +103 -0
  333. package/dist/web-ui/dispatch/workflow-dispatch.js +925 -0
  334. package/dist/web-ui/dispatch/workflow-dispatch.js.map +1 -0
  335. package/dist/web-ui/json-rpc-dispatch.d.ts +12 -0
  336. package/dist/web-ui/json-rpc-dispatch.js +34 -0
  337. package/dist/web-ui/json-rpc-dispatch.js.map +1 -0
  338. package/dist/web-ui/state-graph.d.ts +13 -0
  339. package/dist/web-ui/state-graph.js +82 -0
  340. package/dist/web-ui/state-graph.js.map +1 -0
  341. package/dist/web-ui/token-stream-bridge.d.ts +76 -0
  342. package/dist/web-ui/token-stream-bridge.js +265 -0
  343. package/dist/web-ui/token-stream-bridge.js.map +1 -0
  344. package/dist/web-ui/web-event-bus.d.ts +152 -0
  345. package/dist/web-ui/web-event-bus.js +19 -0
  346. package/dist/web-ui/web-event-bus.js.map +1 -0
  347. package/dist/web-ui/web-session-transport.d.ts +31 -0
  348. package/dist/web-ui/web-session-transport.js +109 -0
  349. package/dist/web-ui/web-session-transport.js.map +1 -0
  350. package/dist/web-ui/web-ui-server.d.ts +76 -0
  351. package/dist/web-ui/web-ui-server.js +461 -0
  352. package/dist/web-ui/web-ui-server.js.map +1 -0
  353. package/dist/web-ui/web-ui-types.d.ts +290 -0
  354. package/dist/web-ui/web-ui-types.js +32 -0
  355. package/dist/web-ui/web-ui-types.js.map +1 -0
  356. package/dist/web-ui/ws-utils.d.ts +5 -0
  357. package/dist/web-ui/ws-utils.js +12 -0
  358. package/dist/web-ui/ws-utils.js.map +1 -0
  359. package/dist/web-ui-static/assets/index-BFO5z1js.js +76 -0
  360. package/dist/web-ui-static/assets/index-CCUwrkIL.css +1 -0
  361. package/dist/web-ui-static/assets/orbitron-latin-700-normal-4jsRXGGJ.woff2 +0 -0
  362. package/dist/web-ui-static/assets/orbitron-latin-700-normal-DmYOh-W9.woff +0 -0
  363. package/dist/web-ui-static/index.html +14 -0
  364. package/dist/workflow/artifacts.d.ts +59 -0
  365. package/dist/workflow/artifacts.js +188 -0
  366. package/dist/workflow/artifacts.js.map +1 -0
  367. package/dist/workflow/checkpoint-selection.d.ts +34 -0
  368. package/dist/workflow/checkpoint-selection.js +48 -0
  369. package/dist/workflow/checkpoint-selection.js.map +1 -0
  370. package/dist/workflow/checkpoint.d.ts +35 -0
  371. package/dist/workflow/checkpoint.js +84 -0
  372. package/dist/workflow/checkpoint.js.map +1 -0
  373. package/dist/workflow/cli-support.d.ts +92 -0
  374. package/dist/workflow/cli-support.js +423 -0
  375. package/dist/workflow/cli-support.js.map +1 -0
  376. package/dist/workflow/definition-loader.d.ts +32 -0
  377. package/dist/workflow/definition-loader.js +56 -0
  378. package/dist/workflow/definition-loader.js.map +1 -0
  379. package/dist/workflow/discovery.d.ts +78 -0
  380. package/dist/workflow/discovery.js +203 -0
  381. package/dist/workflow/discovery.js.map +1 -0
  382. package/dist/workflow/errors.d.ts +66 -0
  383. package/dist/workflow/errors.js +49 -0
  384. package/dist/workflow/errors.js.map +1 -0
  385. package/dist/workflow/guards.d.ts +8 -0
  386. package/dist/workflow/guards.js +38 -0
  387. package/dist/workflow/guards.js.map +1 -0
  388. package/dist/workflow/lint-integration.d.ts +64 -0
  389. package/dist/workflow/lint-integration.js +56 -0
  390. package/dist/workflow/lint-integration.js.map +1 -0
  391. package/dist/workflow/lint.d.ts +66 -0
  392. package/dist/workflow/lint.js +410 -0
  393. package/dist/workflow/lint.js.map +1 -0
  394. package/dist/workflow/machine-builder.d.ts +90 -0
  395. package/dist/workflow/machine-builder.js +485 -0
  396. package/dist/workflow/machine-builder.js.map +1 -0
  397. package/dist/workflow/message-log.d.ts +85 -0
  398. package/dist/workflow/message-log.js +40 -0
  399. package/dist/workflow/message-log.js.map +1 -0
  400. package/dist/workflow/orchestrator.d.ts +450 -0
  401. package/dist/workflow/orchestrator.js +1941 -0
  402. package/dist/workflow/orchestrator.js.map +1 -0
  403. package/dist/workflow/prompt-builder.d.ts +39 -0
  404. package/dist/workflow/prompt-builder.js +242 -0
  405. package/dist/workflow/prompt-builder.js.map +1 -0
  406. package/dist/workflow/run-state-command.d.ts +9 -0
  407. package/dist/workflow/run-state-command.js +414 -0
  408. package/dist/workflow/run-state-command.js.map +1 -0
  409. package/dist/workflow/run-state-debug-capture.d.ts +40 -0
  410. package/dist/workflow/run-state-debug-capture.js +101 -0
  411. package/dist/workflow/run-state-debug-capture.js.map +1 -0
  412. package/dist/workflow/status-parser.d.ts +68 -0
  413. package/dist/workflow/status-parser.js +259 -0
  414. package/dist/workflow/status-parser.js.map +1 -0
  415. package/dist/workflow/types.d.ts +498 -0
  416. package/dist/workflow/types.js +83 -0
  417. package/dist/workflow/types.js.map +1 -0
  418. package/dist/workflow/validate.d.ts +58 -0
  419. package/dist/workflow/validate.js +499 -0
  420. package/dist/workflow/validate.js.map +1 -0
  421. package/dist/workflow/workflow-command.d.ts +26 -0
  422. package/dist/workflow/workflow-command.js +648 -0
  423. package/dist/workflow/workflow-command.js.map +1 -0
  424. package/dist/workflow/workflow-discovery.d.ts +25 -0
  425. package/dist/workflow/workflow-discovery.js +100 -0
  426. package/dist/workflow/workflow-discovery.js.map +1 -0
  427. package/dist/workflow/workflow-manager.d.ts +122 -0
  428. package/dist/workflow/workflow-manager.js +308 -0
  429. package/dist/workflow/workflow-manager.js.map +1 -0
  430. package/dist/workflow/workflows/design-and-code/workflow.yaml +169 -0
  431. package/dist/workflow/workflows/test-email-summary/skills/email-formatting/SKILL.md +55 -0
  432. package/dist/workflow/workflows/test-email-summary/skills/gmail-query-syntax/SKILL.md +63 -0
  433. package/dist/workflow/workflows/test-email-summary/skills/json-schema-emails/SKILL.md +41 -0
  434. package/dist/workflow/workflows/test-email-summary/skills/json-schema-emails/schema.json +34 -0
  435. package/dist/workflow/workflows/test-email-summary/skills/summary-style-guide/SKILL.md +51 -0
  436. package/dist/workflow/workflows/test-email-summary/workflow.yaml +89 -0
  437. package/dist/workflow/workflows/vuln-discovery/skills/harness-design-fuzzing/SKILL.md +201 -0
  438. package/dist/workflow/workflows/vuln-discovery/skills/memory-safety-c-cpp/SKILL.md +166 -0
  439. package/dist/workflow/workflows/vuln-discovery/skills/vulnerability-triage/SKILL.md +185 -0
  440. package/dist/workflow/workflows/vuln-discovery/workflow.yaml +920 -0
  441. package/dist/workflow/worktree.d.ts +43 -0
  442. package/dist/workflow/worktree.js +106 -0
  443. package/dist/workflow/worktree.js.map +1 -0
  444. package/docker/Dockerfile.base +9 -0
  445. package/docker/Dockerfile.base.arm64 +9 -0
  446. package/docker/entrypoint-claude-code.sh +46 -0
  447. package/docker/entrypoint-goose.sh +25 -0
  448. package/package.json +19 -8
  449. package/packages/web-ui/README.md +113 -0
  450. package/packages/web-ui/docs/workflow-state-machine.png +0 -0
  451. package/src/config/generated/compiled-policy.json +528 -161
  452. package/src/config/generated/test-scenarios.json +4810 -170
  453. package/src/config/generated/tool-annotations.json +34 -47
  454. package/src/config/mcp-servers.json +2 -2
  455. package/src/workflow/workflows/design-and-code/workflow.yaml +169 -0
  456. package/src/workflow/workflows/test-email-summary/skills/email-formatting/SKILL.md +55 -0
  457. package/src/workflow/workflows/test-email-summary/skills/gmail-query-syntax/SKILL.md +63 -0
  458. package/src/workflow/workflows/test-email-summary/skills/json-schema-emails/SKILL.md +41 -0
  459. package/src/workflow/workflows/test-email-summary/skills/json-schema-emails/schema.json +34 -0
  460. package/src/workflow/workflows/test-email-summary/skills/summary-style-guide/SKILL.md +51 -0
  461. package/src/workflow/workflows/test-email-summary/workflow.yaml +89 -0
  462. package/src/workflow/workflows/vuln-discovery/skills/harness-design-fuzzing/SKILL.md +201 -0
  463. package/src/workflow/workflows/vuln-discovery/skills/memory-safety-c-cpp/SKILL.md +166 -0
  464. package/src/workflow/workflows/vuln-discovery/skills/vulnerability-triage/SKILL.md +185 -0
  465. package/src/workflow/workflows/vuln-discovery/workflow.yaml +920 -0
  466. package/dist/pipeline/llm-logger.js.map +0 -1
  467. package/dist/session/errors.js.map +0 -1
@@ -1,9 +1,34 @@
1
1
  import { createHash } from 'node:crypto';
2
- import { existsSync, readFileSync } from 'node:fs';
2
+ import { existsSync, readFileSync, readdirSync } from 'node:fs';
3
3
  import { homedir } from 'node:os';
4
4
  import { dirname, resolve } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
- import { SESSION_STATE_FILENAME } from '../docker/pty-types.js';
6
+ import { JOB_ID_PATTERN } from '../types/slug.js';
7
+ /**
8
+ * Short slug length used in file/directory names that must fit under
9
+ * `sockaddr_un.sun_path` (macOS ~104 bytes, Linux ~108 bytes). 12 hex
10
+ * chars give 16^12 ≈ 2.8e14 combinations, so collisions in the
11
+ * host-wide `~/.ironcurtain/run/<slug>/` namespace are astronomical —
12
+ * important because bundle teardown runs `rmSync(runtimeRoot)` and a
13
+ * collision would wipe another live bundle's sockets. The full UUID
14
+ * remains the authoritative identity in Docker labels and directory
15
+ * paths; only socket-adjacent names use the short form. The new
16
+ * `~/.ironcurtain/run/<12chars>/sockets/<name>.sock` layout has ample
17
+ * sun_path budget for the longer slug on both macOS (104) and Linux
18
+ * (108).
19
+ */
20
+ const BUNDLE_SLUG_LEN = 12;
21
+ /**
22
+ * Derives the short slug from a `BundleId`. Strips hyphens first so the
23
+ * resulting `BUNDLE_SLUG_LEN` characters are all hex — a raw
24
+ * `substring(0, 12)` on a canonical UUID would include the hyphen at
25
+ * position 8 and yield only 11 hex digits of entropy (16^11 ≈ 1.8e13).
26
+ * 12 hex digits give 16^12 ≈ 2.8e14, matching the collision-space math
27
+ * the layout depends on.
28
+ */
29
+ function toBundleSlug(bundleId) {
30
+ return bundleId.replace(/-/g, '').substring(0, BUNDLE_SLUG_LEN);
31
+ }
7
32
  const __dirname = dirname(fileURLToPath(import.meta.url));
8
33
  /**
9
34
  * Returns the IronCurtain home directory.
@@ -19,12 +44,37 @@ export function getSessionsDir() {
19
44
  return resolve(getIronCurtainHome(), 'sessions');
20
45
  }
21
46
  /**
22
- * Validates that a session ID contains only safe characters
23
- * (alphanumeric, hyphens, underscores) to prevent path traversal.
47
+ * Characters permitted in any identifier that gets embedded in a
48
+ * filesystem path by this module (session IDs, workflow IDs, persona
49
+ * slugs, daemon log names). Rejects path separators, glob
50
+ * metacharacters, NUL bytes, and everything else that could escape the
51
+ * target directory.
24
52
  */
25
- function validateSessionId(sessionId) {
26
- if (!/^[a-zA-Z0-9_-]+$/.test(sessionId)) {
27
- throw new Error(`Invalid session ID: ${sessionId}`);
53
+ const PATH_SAFE_SLUG_RE = /^[a-zA-Z0-9_-]+$/;
54
+ function assertPathSafeSlug(kind, value) {
55
+ if (!PATH_SAFE_SLUG_RE.test(value)) {
56
+ throw new Error(`Invalid ${kind}: ${value}`);
57
+ }
58
+ }
59
+ /**
60
+ * Filenames shared across session-scoped and workflow-state-scoped
61
+ * layouts. Centralized so the "single source of truth" for how session
62
+ * artifacts are named does not drift between helpers and call sites.
63
+ */
64
+ export const SESSION_LOG_FILENAME = 'session.log';
65
+ export const SESSION_METADATA_FILENAME = 'session-metadata.json';
66
+ export const SESSION_STATE_FILENAME = 'session-state.json';
67
+ /**
68
+ * Validates a workflow state slug of the form `{stateId}.{visitCount}`
69
+ * (e.g., `fetch.1`, `plan.2`). Accepts dot-separated segments where
70
+ * each segment satisfies `PATH_SAFE_SLUG_RE`. Empty segments — produced
71
+ * by `..`, leading or trailing dots — fail the per-segment check.
72
+ */
73
+ function assertStateSlug(value) {
74
+ if (value.length === 0)
75
+ throw new Error(`Invalid state slug: ${value}`);
76
+ for (const segment of value.split('.')) {
77
+ assertPathSafeSlug('state slug segment', segment);
28
78
  }
29
79
  }
30
80
  /**
@@ -32,7 +82,7 @@ function validateSessionId(sessionId) {
32
82
  * {home}/sessions/{sessionId}/
33
83
  */
34
84
  export function getSessionDir(sessionId) {
35
- validateSessionId(sessionId);
85
+ assertPathSafeSlug('session ID', sessionId);
36
86
  return resolve(getSessionsDir(), sessionId);
37
87
  }
38
88
  /**
@@ -54,7 +104,7 @@ export function getSessionEscalationDir(sessionId) {
54
104
  * {home}/sessions/{sessionId}/session-metadata.json
55
105
  */
56
106
  export function getSessionMetadataPath(sessionId) {
57
- return resolve(getSessionDir(sessionId), 'session-metadata.json');
107
+ return resolve(getSessionDir(sessionId), SESSION_METADATA_FILENAME);
58
108
  }
59
109
  /**
60
110
  * Returns the audit log path for a given session:
@@ -75,7 +125,7 @@ export function getSessionInteractionLogPath(sessionId) {
75
125
  * {home}/sessions/{sessionId}/session.log
76
126
  */
77
127
  export function getSessionLogPath(sessionId) {
78
- return resolve(getSessionDir(sessionId), 'session.log');
128
+ return resolve(getSessionDir(sessionId), SESSION_LOG_FILENAME);
79
129
  }
80
130
  /**
81
131
  * Returns the LLM interaction log path for a given session:
@@ -142,9 +192,7 @@ export function getLogsDir() {
142
192
  * E.g., getDaemonLogPath('signal-bot') → {home}/logs/signal-bot.log
143
193
  */
144
194
  export function getDaemonLogPath(name) {
145
- if (!/^[a-zA-Z0-9_-]+$/.test(name)) {
146
- throw new Error(`Invalid daemon log name: ${name}`);
147
- }
195
+ assertPathSafeSlug('daemon log name', name);
148
196
  return resolve(getLogsDir(), `${name}.log`);
149
197
  }
150
198
  /**
@@ -238,6 +286,24 @@ export function computeConstitutionHash(basePath) {
238
286
  const text = loadConstitutionText(basePath);
239
287
  return createHash('sha256').update(text).digest('hex');
240
288
  }
289
+ /**
290
+ * Returns the user workflows directory: {home}/workflows/
291
+ * Users can place custom workflow definitions here.
292
+ */
293
+ export function getUserWorkflowsDir() {
294
+ return resolve(getIronCurtainHome(), 'workflows');
295
+ }
296
+ /**
297
+ * Returns the user-global skills directory: {home}/skills/
298
+ *
299
+ * Skills placed here are layered into every Docker session regardless
300
+ * of workflow or persona. See `src/skills/discovery.ts` for the
301
+ * resolution order (user-global → persona → workflow, last-wins on
302
+ * collision) and `docs/designs/skills-capability.md` for the format.
303
+ */
304
+ export function getUserSkillsDir() {
305
+ return resolve(getIronCurtainHome(), 'skills');
306
+ }
241
307
  // ---------------------------------------------------------------------------
242
308
  // OAuth paths
243
309
  // ---------------------------------------------------------------------------
@@ -285,6 +351,16 @@ export function getOAuthCredentialsPath(providerId) {
285
351
  export function getDaemonSocketPath() {
286
352
  return resolve(getIronCurtainHome(), 'daemon.sock');
287
353
  }
354
+ /**
355
+ * Returns the web UI state file path: {home}/web-ui.json
356
+ *
357
+ * The daemon writes connection info (port + auth token) here on startup
358
+ * so CLI commands (e.g., `observe`) can connect to the WebSocket server.
359
+ * The file is removed on daemon shutdown.
360
+ */
361
+ export function getWebUiStatePath() {
362
+ return resolve(getIronCurtainHome(), 'web-ui.json');
363
+ }
288
364
  // ---------------------------------------------------------------------------
289
365
  // Job paths (cron mode)
290
366
  // ---------------------------------------------------------------------------
@@ -294,7 +370,6 @@ export function getDaemonSocketPath() {
294
370
  export function getJobsDir() {
295
371
  return resolve(getIronCurtainHome(), 'jobs');
296
372
  }
297
- import { JOB_ID_PATTERN } from '../cron/types.js';
298
373
  /**
299
374
  * Validates that a job ID contains only safe characters.
300
375
  */
@@ -331,4 +406,223 @@ export function getJobWorkspaceDir(jobId) {
331
406
  export function getJobRunsDir(jobId) {
332
407
  return resolve(getJobDir(jobId), 'runs');
333
408
  }
409
+ // ---------------------------------------------------------------------------
410
+ // Workflow run paths
411
+ // ---------------------------------------------------------------------------
412
+ /**
413
+ * Returns the workflow runs base directory: {home}/workflow-runs/
414
+ */
415
+ export function getWorkflowRunsDir() {
416
+ return resolve(getIronCurtainHome(), 'workflow-runs');
417
+ }
418
+ /**
419
+ * Returns the directory for a specific workflow run:
420
+ * {home}/workflow-runs/{workflowId}/
421
+ */
422
+ export function getWorkflowRunDir(workflowId) {
423
+ assertPathSafeSlug('workflow ID', workflowId);
424
+ return resolve(getWorkflowRunsDir(), workflowId);
425
+ }
426
+ /**
427
+ * Returns the containers root for a workflow run:
428
+ * {home}/workflow-runs/{workflowId}/containers/
429
+ *
430
+ * Each bundle (one Docker container + its MITM/Code-Mode proxies, CA,
431
+ * fake keys, audit log, and per-state artifacts) lives under
432
+ * `containers/<bundleId>/`. A single-scope workflow has one entry; a
433
+ * bifurcated workflow with distinct `containerScope` values has one
434
+ * entry per distinct scope.
435
+ */
436
+ export function getWorkflowContainersDir(workflowId) {
437
+ return resolve(getWorkflowRunDir(workflowId), 'containers');
438
+ }
439
+ /**
440
+ * Returns the outer directory for a single bundle within a workflow run:
441
+ * {home}/workflow-runs/{workflowId}/containers/{bundleId}/
442
+ *
443
+ * Contains the bundle's audit log, its inner `bundle/` directory with
444
+ * sockets/CA/fake keys/orientation, and the per-state `states/` tree.
445
+ */
446
+ export function getBundleDir(workflowId, bundleId) {
447
+ assertPathSafeSlug('bundle ID', bundleId);
448
+ return resolve(getWorkflowContainersDir(workflowId), bundleId);
449
+ }
450
+ /**
451
+ * Returns the inner bundle artifact directory:
452
+ * {home}/workflow-runs/{workflowId}/containers/{bundleId}/bundle/
453
+ *
454
+ * Holds the bundle-scoped files that `DockerInfrastructure` manages:
455
+ * MCP/MITM sockets, CA cert, fake keys, orientation scripts, and the
456
+ * effective system prompt. Bind-mounted into the Docker container for
457
+ * the UDS endpoints.
458
+ */
459
+ export function getBundleBundleDir(workflowId, bundleId) {
460
+ return resolve(getBundleDir(workflowId, bundleId), 'bundle');
461
+ }
462
+ /**
463
+ * Returns the per-bundle audit log path:
464
+ * {home}/workflow-runs/{workflowId}/containers/{bundleId}/audit.jsonl
465
+ *
466
+ * One audit file per bundle (coordinator). Each entry is tagged with
467
+ * the active `persona` so consumers can reconstruct per-persona /
468
+ * per-re-entry slices by scanning.
469
+ */
470
+ export function getBundleAuditLogPath(workflowId, bundleId) {
471
+ return resolve(getBundleDir(workflowId, bundleId), 'audit.jsonl');
472
+ }
473
+ /**
474
+ * Returns the per-bundle states root:
475
+ * {home}/workflow-runs/{workflowId}/containers/{bundleId}/states/
476
+ *
477
+ * Each agent state invocation (including re-entries) that borrows this
478
+ * bundle gets its own subdirectory keyed by `{stateId}.{N}`.
479
+ */
480
+ export function getBundleStatesDir(workflowId, bundleId) {
481
+ return resolve(getBundleDir(workflowId, bundleId), 'states');
482
+ }
483
+ /**
484
+ * Returns the per-invocation artifact directory for a single state:
485
+ * {home}/workflow-runs/{workflowId}/containers/{bundleId}/states/{stateSlug}/
486
+ *
487
+ * Holds this invocation's `session.log` and `session-metadata.json`.
488
+ * `stateSlug` is `{stateId}.{N}` (e.g., `fetch.1`, `plan.2`).
489
+ */
490
+ export function getInvocationDir(workflowId, bundleId, stateSlug) {
491
+ assertStateSlug(stateSlug);
492
+ return resolve(getBundleStatesDir(workflowId, bundleId), stateSlug);
493
+ }
494
+ /**
495
+ * Picks the next available `{stateId}.{N}` slug in `statesDir`. Returns
496
+ * `${stateId}.1` when no matching dir exists; otherwise the max existing
497
+ * N plus 1. Used so every state entry (true logical re-visits AND resume
498
+ * legs of a single visit) gets its own forensic dir — `session.log` and
499
+ * `session-metadata.json` no longer interleave across resume attempts.
500
+ */
501
+ export function nextStateSlug(statesDir, stateId) {
502
+ assertPathSafeSlug('state ID', stateId);
503
+ let max = 0;
504
+ if (existsSync(statesDir)) {
505
+ const prefix = `${stateId}.`;
506
+ for (const entry of readdirSync(statesDir, { withFileTypes: true })) {
507
+ if (!entry.isDirectory() || !entry.name.startsWith(prefix))
508
+ continue;
509
+ // Decimal-digit-only suffix; reject "1e6", "0x10", " 1 ", "01",
510
+ // etc. so a stray dir name can't inflate the next slug.
511
+ const suffix = entry.name.slice(prefix.length);
512
+ if (!DECIMAL_SUFFIX_RE.test(suffix))
513
+ continue;
514
+ const n = Number(suffix);
515
+ if (n > max)
516
+ max = n;
517
+ }
518
+ }
519
+ return `${stateId}.${max + 1}`;
520
+ }
521
+ const DECIMAL_SUFFIX_RE = /^(?:0|[1-9]\d*)$/;
522
+ /**
523
+ * Returns the coordinator control socket path for a bundle:
524
+ * {home}/run/{bundleId[0:12]}/ctrl.sock
525
+ *
526
+ * The coordinator listens on this UDS to accept policy hot-swap
527
+ * requests from the orchestrator. The socket sits under the bundle's
528
+ * per-bundle runtime root (mode `0o700`) so filesystem permissions
529
+ * gate access.
530
+ *
531
+ * The directory slug is truncated to 12 chars of `bundleId` so the
532
+ * assembled path fits under macOS `sockaddr_un.sun_path` (104 chars).
533
+ * 16^12 ≈ 2.8e14 combinations — collisions in the host-wide
534
+ * `run/<slug>/` namespace are astronomical.
535
+ */
536
+ export function getBundleControlSocketPath(bundleId) {
537
+ return resolve(getBundleRuntimeRoot(bundleId), 'ctrl.sock');
538
+ }
539
+ // ---------------------------------------------------------------------------
540
+ // Per-bundle UDS endpoints (MCP proxy, MITM proxy, MITM control, coordinator)
541
+ // ---------------------------------------------------------------------------
542
+ //
543
+ // Every UDS file owned by a bundle lives under a single per-bundle root
544
+ // at `~/.ironcurtain/run/<bundleId[0:12]>/`. The directory is created
545
+ // with `0o700` (see `docker-infrastructure.ts`), inheriting the same
546
+ // security posture as the rest of the IronCurtain home. Worst-case
547
+ // assembled path (with a 20-char username) is about 76 bytes —
548
+ // comfortably under macOS 104 and Linux 108 `sockaddr_un.sun_path` caps.
549
+ //
550
+ // Three locations per bundle:
551
+ // run/<bid12>/ctrl.sock → coordinator control socket
552
+ // run/<bid12>/sockets/ → bind-mounted as /run/ironcurtain/
553
+ // run/<bid12>/host/ → host-local only (MITM control)
554
+ // The `sockets/` vs `host/` split keeps the bind-mounted endpoints
555
+ // separate from host-only endpoints so `isEndpointAllowed` is not the
556
+ // only thing standing between the container and the MITM control API.
557
+ /**
558
+ * Returns the per-bundle runtime root directory:
559
+ * {home}/run/{bundleId[0:12]}/
560
+ *
561
+ * Holds the coordinator control socket plus two subdirectories
562
+ * (`sockets/` and `host/`) so the bind-mounted UDS files can be
563
+ * co-located without exposing host-only sockets to the container.
564
+ */
565
+ export function getBundleRuntimeRoot(bundleId) {
566
+ assertPathSafeSlug('bundle ID', bundleId);
567
+ return resolve(getIronCurtainHome(), 'run', toBundleSlug(bundleId));
568
+ }
569
+ /**
570
+ * Returns the per-bundle container-visible sockets directory:
571
+ * {home}/run/{bundleId[0:12]}/sockets/
572
+ *
573
+ * Two UDS files live here:
574
+ * - `proxy.sock` (Code Mode proxy — bind-mounted into container)
575
+ * - `mitm-proxy.sock` (MITM proxy — bind-mounted into container)
576
+ *
577
+ * This directory is what `prepareDockerInfrastructure()` bind-mounts as
578
+ * `/run/ironcurtain/` inside the container (read-write). Only these two
579
+ * socket files live here — no audit logs, escalation files, or other
580
+ * session artifacts.
581
+ */
582
+ export function getBundleSocketsDir(bundleId) {
583
+ return resolve(getBundleRuntimeRoot(bundleId), 'sockets');
584
+ }
585
+ /**
586
+ * Returns the per-bundle host-only directory:
587
+ * {home}/run/{bundleId[0:12]}/host/
588
+ *
589
+ * Holds UDS files that must NOT be visible to the container
590
+ * (currently just the MITM control socket).
591
+ */
592
+ export function getBundleHostOnlyDir(bundleId) {
593
+ return resolve(getBundleRuntimeRoot(bundleId), 'host');
594
+ }
595
+ /**
596
+ * Code Mode proxy UDS path for a bundle:
597
+ * {home}/run/{bundleId[0:12]}/sockets/proxy.sock
598
+ *
599
+ * Bound by the host-side Code Mode proxy; reachable inside the
600
+ * container as `/run/ironcurtain/proxy.sock` via the bind mount on
601
+ * `getBundleSocketsDir()`.
602
+ */
603
+ export function getBundleProxySocketPath(bundleId) {
604
+ return resolve(getBundleSocketsDir(bundleId), 'proxy.sock');
605
+ }
606
+ /**
607
+ * MITM proxy UDS path for a bundle:
608
+ * {home}/run/{bundleId[0:12]}/sockets/mitm-proxy.sock
609
+ *
610
+ * Bound by the host-side MITM proxy; reachable inside the container as
611
+ * `/run/ironcurtain/mitm-proxy.sock` via the bind mount on
612
+ * `getBundleSocketsDir()`.
613
+ */
614
+ export function getBundleMitmProxySocketPath(bundleId) {
615
+ return resolve(getBundleSocketsDir(bundleId), 'mitm-proxy.sock');
616
+ }
617
+ /**
618
+ * MITM control UDS path for a bundle:
619
+ * {home}/run/{bundleId[0:12]}/host/mitm-control.sock
620
+ *
621
+ * Host-local only — lives under `host/` rather than `sockets/` so the
622
+ * bind mount that exposes `sockets/` at `/run/ironcurtain/` does not
623
+ * expose this socket to the container.
624
+ */
625
+ export function getBundleMitmControlSocketPath(bundleId) {
626
+ return resolve(getBundleHostOnlyDir(bundleId), 'mitm-control.sock');
627
+ }
334
628
  //# sourceMappingURL=paths.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/config/paths.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,UAAU,EAA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AO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,YAAY,CAAC,CAAC;AAC9D,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAAkB;IAC7D,OAAO,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,8BAA8B,CAAC,QAAkB;IAC/D,OAAO,OAAO,CAAC,oBAAoB,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC,CAAC;AACtE,CAAC"}
@@ -1,4 +1,10 @@
1
1
  import type { ResolvedUserConfig } from './user-config.js';
2
+ /**
3
+ * Auth kinds an adapter may receive. Subset of `AuthMethod['kind']` from
4
+ * `docker/oauth-credentials.ts` minus `'none'`: by the time an adapter is
5
+ * consulted, a credential has been resolved.
6
+ */
7
+ export type DockerAuthKind = 'oauth' | 'apikey';
2
8
  /**
3
9
  * Network access configuration for a sandboxed MCP server.
4
10
  *
@@ -105,7 +111,7 @@ export interface IronCurtainConfig {
105
111
  * Adapters use this to choose between OAuth and API key env vars.
106
112
  */
107
113
  dockerAuth?: {
108
- readonly kind: 'oauth' | 'apikey';
114
+ readonly kind: DockerAuthKind;
109
115
  };
110
116
  /**
111
117
  * Whether this is a PTY session. When true, the proxy requires
@@ -31,9 +31,27 @@ export declare const USER_CONFIG_DEFAULTS: {
31
31
  readonly auditRedaction: {
32
32
  readonly enabled: true;
33
33
  };
34
+ readonly preferredMode: "docker";
35
+ readonly dockerResources: {
36
+ /** Memory ceiling in MB; null means "do not pass --memory". */
37
+ readonly memoryMb: 8192;
38
+ /** CPU ceiling (fractional ok); null means "do not pass --cpus". */
39
+ readonly cpus: 4;
40
+ };
34
41
  };
35
42
  export declare const ESCALATION_TIMEOUT_MIN = 30;
36
43
  export declare const ESCALATION_TIMEOUT_MAX = 600;
44
+ /**
45
+ * Strict model ID validator for `~/.ironcurtain/config.json`. A colon-prefixed
46
+ * value must name a known provider; bare names are accepted.
47
+ */
48
+ export declare const qualifiedModelId: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
49
+ /**
50
+ * Looser model ID validator for workflow YAML. Additionally accepts
51
+ * Ollama-style "name:tag" identifiers (e.g. `glm-5.1:cloud`) reached via
52
+ * an upstream gateway like ANTHROPIC_BASE_URL.
53
+ */
54
+ export declare const looseModelId: z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>;
37
55
  export declare const WEB_SEARCH_PROVIDERS: readonly ["brave", "tavily", "serpapi"];
38
56
  export type WebSearchProvider = (typeof WEB_SEARCH_PROVIDERS)[number];
39
57
  /** Human-readable labels for web search providers. */
@@ -50,10 +68,12 @@ export declare const GOOSE_PROVIDERS: readonly ["anthropic", "openai", "google"]
50
68
  export type GooseProvider = (typeof GOOSE_PROVIDERS)[number];
51
69
  export declare const DOCKER_AGENTS: readonly ["claude-code", "goose"];
52
70
  export type DockerAgent = (typeof DOCKER_AGENTS)[number];
71
+ export declare const SESSION_MODES: readonly ["docker", "builtin"];
72
+ export type SessionModeKind = (typeof SESSION_MODES)[number];
53
73
  export declare const userConfigSchema: z.ZodObject<{
54
- agentModelId: z.ZodOptional<z.ZodString>;
55
- policyModelId: z.ZodOptional<z.ZodString>;
56
- prefilterModelId: z.ZodOptional<z.ZodString>;
74
+ agentModelId: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
75
+ policyModelId: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
76
+ prefilterModelId: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
57
77
  anthropicApiKey: z.ZodOptional<z.ZodString>;
58
78
  googleApiKey: z.ZodOptional<z.ZodString>;
59
79
  openaiApiKey: z.ZodOptional<z.ZodString>;
@@ -72,11 +92,11 @@ export declare const userConfigSchema: z.ZodObject<{
72
92
  enabled: z.ZodOptional<z.ZodBoolean>;
73
93
  thresholdTokens: z.ZodOptional<z.ZodNumber>;
74
94
  keepRecentMessages: z.ZodOptional<z.ZodNumber>;
75
- summaryModelId: z.ZodOptional<z.ZodString>;
95
+ summaryModelId: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
76
96
  }, z.core.$strip>>;
77
97
  autoApprove: z.ZodOptional<z.ZodObject<{
78
98
  enabled: z.ZodOptional<z.ZodBoolean>;
79
- modelId: z.ZodOptional<z.ZodString>;
99
+ modelId: z.ZodOptional<z.ZodType<string, unknown, z.core.$ZodTypeInternals<string, unknown>>>;
80
100
  }, z.core.$strip>>;
81
101
  auditRedaction: z.ZodOptional<z.ZodObject<{
82
102
  enabled: z.ZodOptional<z.ZodBoolean>;
@@ -124,12 +144,20 @@ export declare const userConfigSchema: z.ZodObject<{
124
144
  "claude-code": "claude-code";
125
145
  goose: "goose";
126
146
  }>>;
147
+ preferredMode: z.ZodOptional<z.ZodEnum<{
148
+ docker: "docker";
149
+ builtin: "builtin";
150
+ }>>;
127
151
  packageInstall: z.ZodOptional<z.ZodObject<{
128
152
  enabled: z.ZodOptional<z.ZodBoolean>;
129
153
  quarantineDays: z.ZodOptional<z.ZodNumber>;
130
154
  allowedPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
131
155
  deniedPackages: z.ZodOptional<z.ZodArray<z.ZodString>>;
132
156
  }, z.core.$strip>>;
157
+ dockerResources: z.ZodOptional<z.ZodObject<{
158
+ memoryMb: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
159
+ cpus: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
160
+ }, z.core.$strip>>;
133
161
  }, z.core.$strip>;
134
162
  /** Parsed config from ~/.ironcurtain/config.json. All fields optional. */
135
163
  export type UserConfig = z.infer<typeof userConfigSchema>;
@@ -171,6 +199,22 @@ export interface ResolvedPackageInstallConfig {
171
199
  readonly allowedPackages: readonly string[];
172
200
  readonly deniedPackages: readonly string[];
173
201
  }
202
+ /**
203
+ * Resolved Docker container resource ceilings.
204
+ *
205
+ * `null` is a deliberate "no limit" signal: callers must omit the
206
+ * corresponding `--memory` / `--cpus` flag, matching the existing pattern
207
+ * in `docker-manager.ts:buildCreateArgs()`.
208
+ *
209
+ * These are the user-configured ceilings BEFORE clamping. The runtime
210
+ * clamp (`clampDockerResources()` in `src/docker/resource-limits.ts`) lowers
211
+ * either value to fit the host's actual capacity; nulls pass through
212
+ * unchanged.
213
+ */
214
+ export interface ResolvedDockerResourcesConfig {
215
+ readonly memoryMb: number | null;
216
+ readonly cpus: number | null;
217
+ }
174
218
  /** Resolved web search config with all fields present. */
175
219
  export interface ResolvedWebSearchConfig {
176
220
  readonly provider: WebSearchProvider | null;
@@ -211,8 +255,12 @@ export interface ResolvedUserConfig {
211
255
  readonly gooseModel: string;
212
256
  /** Preferred Docker agent for auto-detection. */
213
257
  readonly preferredDockerAgent: DockerAgent;
258
+ /** Preferred session mode: 'docker' (default) or 'builtin'. */
259
+ readonly preferredMode: SessionModeKind;
214
260
  /** Package installation proxy configuration. */
215
261
  readonly packageInstall: ResolvedPackageInstallConfig;
262
+ /** Docker container resource ceilings (pre-clamp). */
263
+ readonly dockerResources: ResolvedDockerResourcesConfig;
216
264
  }
217
265
  /**
218
266
  * Loads user configuration from ~/.ironcurtain/config.json.