open-multi-agent-kit 0.80.7 → 0.90.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 (1494) hide show
  1. package/CHANGELOG.md +5 -27
  2. package/README.md +81 -38
  3. package/dist/agents/jailbreak/index.d.ts +7 -0
  4. package/dist/agents/jailbreak/index.d.ts.map +1 -0
  5. package/dist/agents/jailbreak/index.js +7 -0
  6. package/dist/agents/jailbreak/index.js.map +1 -0
  7. package/dist/agents/jailbreak/subagent-f.d.ts +44 -0
  8. package/dist/agents/jailbreak/subagent-f.d.ts.map +1 -0
  9. package/dist/agents/jailbreak/subagent-f.js +60 -0
  10. package/dist/agents/jailbreak/subagent-f.js.map +1 -0
  11. package/dist/bun/register-bedrock.d.ts.map +1 -1
  12. package/dist/bun/register-bedrock.js +2 -2
  13. package/dist/bun/register-bedrock.js.map +1 -1
  14. package/dist/ci/verify-reporter.d.ts +22 -0
  15. package/dist/ci/verify-reporter.d.ts.map +1 -0
  16. package/dist/ci/verify-reporter.js +50 -0
  17. package/dist/ci/verify-reporter.js.map +1 -0
  18. package/dist/cli/args.d.ts +4 -1
  19. package/dist/cli/args.d.ts.map +1 -1
  20. package/dist/cli/args.js +8 -0
  21. package/dist/cli/args.js.map +1 -1
  22. package/dist/cli/config-selector.d.ts.map +1 -1
  23. package/dist/cli/config-selector.js +1 -1
  24. package/dist/cli/config-selector.js.map +1 -1
  25. package/dist/cli/file-processor.d.ts +1 -1
  26. package/dist/cli/file-processor.d.ts.map +1 -1
  27. package/dist/cli/file-processor.js.map +1 -1
  28. package/dist/cli/initial-message.d.ts +1 -1
  29. package/dist/cli/initial-message.d.ts.map +1 -1
  30. package/dist/cli/initial-message.js.map +1 -1
  31. package/dist/cli/jailbreak-args.d.ts +26 -0
  32. package/dist/cli/jailbreak-args.d.ts.map +1 -0
  33. package/dist/cli/jailbreak-args.js +86 -0
  34. package/dist/cli/jailbreak-args.js.map +1 -0
  35. package/dist/cli/list-models.d.ts.map +1 -1
  36. package/dist/cli/list-models.js +1 -1
  37. package/dist/cli/list-models.js.map +1 -1
  38. package/dist/cli/session-picker.d.ts.map +1 -1
  39. package/dist/cli/session-picker.js +1 -1
  40. package/dist/cli/session-picker.js.map +1 -1
  41. package/dist/commands/doctor-provider.d.ts +19 -0
  42. package/dist/commands/doctor-provider.d.ts.map +1 -0
  43. package/dist/commands/doctor-provider.js +123 -0
  44. package/dist/commands/doctor-provider.js.map +1 -0
  45. package/dist/commands/jailbreak.d.ts +49 -0
  46. package/dist/commands/jailbreak.d.ts.map +1 -0
  47. package/dist/commands/jailbreak.js +201 -0
  48. package/dist/commands/jailbreak.js.map +1 -0
  49. package/dist/config.d.ts +9 -5
  50. package/dist/config.d.ts.map +1 -1
  51. package/dist/config.js +33 -52
  52. package/dist/config.js.map +1 -1
  53. package/dist/core/agent-session-services.d.ts +2 -2
  54. package/dist/core/agent-session-services.d.ts.map +1 -1
  55. package/dist/core/agent-session-services.js.map +1 -1
  56. package/dist/core/agent-session.d.ts +16 -27
  57. package/dist/core/agent-session.d.ts.map +1 -1
  58. package/dist/core/agent-session.js +185 -89
  59. package/dist/core/agent-session.js.map +1 -1
  60. package/dist/core/auth-storage.d.ts +3 -6
  61. package/dist/core/auth-storage.d.ts.map +1 -1
  62. package/dist/core/auth-storage.js +7 -7
  63. package/dist/core/auth-storage.js.map +1 -1
  64. package/dist/core/automation/index.d.ts +359 -0
  65. package/dist/core/automation/index.d.ts.map +1 -0
  66. package/dist/core/automation/index.js +665 -0
  67. package/dist/core/automation/index.js.map +1 -0
  68. package/dist/core/bash-executor.d.ts +1 -0
  69. package/dist/core/bash-executor.d.ts.map +1 -1
  70. package/dist/core/bash-executor.js +1 -0
  71. package/dist/core/bash-executor.js.map +1 -1
  72. package/dist/core/browser-use.d.ts +53 -0
  73. package/dist/core/browser-use.d.ts.map +1 -0
  74. package/dist/core/browser-use.js +108 -0
  75. package/dist/core/browser-use.js.map +1 -0
  76. package/dist/core/command-safety-parser.d.ts +77 -0
  77. package/dist/core/command-safety-parser.d.ts.map +1 -0
  78. package/dist/core/command-safety-parser.js +763 -0
  79. package/dist/core/command-safety-parser.js.map +1 -0
  80. package/dist/core/command-safety.d.ts.map +1 -1
  81. package/dist/core/command-safety.js +106 -3
  82. package/dist/core/command-safety.js.map +1 -1
  83. package/dist/core/compaction/branch-summarization.d.ts +2 -2
  84. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  85. package/dist/core/compaction/branch-summarization.js +5 -21
  86. package/dist/core/compaction/branch-summarization.js.map +1 -1
  87. package/dist/core/compaction/compaction.d.ts +3 -101
  88. package/dist/core/compaction/compaction.d.ts.map +1 -1
  89. package/dist/core/compaction/compaction.js +21 -656
  90. package/dist/core/compaction/compaction.js.map +1 -1
  91. package/dist/core/compaction/utils.d.ts +2 -2
  92. package/dist/core/compaction/utils.d.ts.map +1 -1
  93. package/dist/core/compaction/utils.js.map +1 -1
  94. package/dist/core/compactor.d.ts +42 -0
  95. package/dist/core/compactor.d.ts.map +1 -0
  96. package/dist/core/compactor.js +131 -0
  97. package/dist/core/compactor.js.map +1 -0
  98. package/dist/core/context-budget-compressors.d.ts +50 -0
  99. package/dist/core/context-budget-compressors.d.ts.map +1 -0
  100. package/dist/core/context-budget-compressors.js +166 -0
  101. package/dist/core/context-budget-compressors.js.map +1 -0
  102. package/dist/core/context-budget-governor-v2.d.ts +7 -0
  103. package/dist/core/context-budget-governor-v2.d.ts.map +1 -0
  104. package/dist/core/context-budget-governor-v2.js +7 -0
  105. package/dist/core/context-budget-governor-v2.js.map +1 -0
  106. package/dist/core/context-budget-governor.d.ts +67 -0
  107. package/dist/core/context-budget-governor.d.ts.map +1 -0
  108. package/dist/core/context-budget-governor.js +224 -0
  109. package/dist/core/context-budget-governor.js.map +1 -0
  110. package/dist/core/context-budget-headroom-candidates.d.ts +3 -0
  111. package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -0
  112. package/dist/core/context-budget-headroom-candidates.js +85 -0
  113. package/dist/core/context-budget-headroom-candidates.js.map +1 -0
  114. package/dist/core/context-budget-headroom-types.d.ts +67 -0
  115. package/dist/core/context-budget-headroom-types.d.ts.map +1 -0
  116. package/dist/core/context-budget-headroom-types.js +46 -0
  117. package/dist/core/context-budget-headroom-types.js.map +1 -0
  118. package/dist/core/context-budget-headroom.d.ts +5 -0
  119. package/dist/core/context-budget-headroom.d.ts.map +1 -0
  120. package/dist/core/context-budget-headroom.js +123 -0
  121. package/dist/core/context-budget-headroom.js.map +1 -0
  122. package/dist/core/context-budget-relevance.d.ts +46 -0
  123. package/dist/core/context-budget-relevance.d.ts.map +1 -0
  124. package/dist/core/context-budget-relevance.js +329 -0
  125. package/dist/core/context-budget-relevance.js.map +1 -0
  126. package/dist/core/context-budget-system-prompt-items.d.ts +19 -0
  127. package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -0
  128. package/dist/core/context-budget-system-prompt-items.js +143 -0
  129. package/dist/core/context-budget-system-prompt-items.js.map +1 -0
  130. package/dist/core/context-budget-system-prompt.d.ts +31 -0
  131. package/dist/core/context-budget-system-prompt.d.ts.map +1 -0
  132. package/dist/core/context-budget-system-prompt.js +87 -0
  133. package/dist/core/context-budget-system-prompt.js.map +1 -0
  134. package/dist/core/context-budget-token-counter.d.ts +34 -0
  135. package/dist/core/context-budget-token-counter.d.ts.map +1 -0
  136. package/dist/core/context-budget-token-counter.js +315 -0
  137. package/dist/core/context-budget-token-counter.js.map +1 -0
  138. package/dist/core/context-budget-v2-coverage.d.ts +5 -0
  139. package/dist/core/context-budget-v2-coverage.d.ts.map +1 -0
  140. package/dist/core/context-budget-v2-coverage.js +58 -0
  141. package/dist/core/context-budget-v2-coverage.js.map +1 -0
  142. package/dist/core/context-budget-v2-plan-hash.d.ts +12 -0
  143. package/dist/core/context-budget-v2-plan-hash.d.ts.map +1 -0
  144. package/dist/core/context-budget-v2-plan-hash.js +38 -0
  145. package/dist/core/context-budget-v2-plan-hash.js.map +1 -0
  146. package/dist/core/context-budget-v2-planner.d.ts +3 -0
  147. package/dist/core/context-budget-v2-planner.d.ts.map +1 -0
  148. package/dist/core/context-budget-v2-planner.js +143 -0
  149. package/dist/core/context-budget-v2-planner.js.map +1 -0
  150. package/dist/core/context-budget-v2-scoring.d.ts +14 -0
  151. package/dist/core/context-budget-v2-scoring.d.ts.map +1 -0
  152. package/dist/core/context-budget-v2-scoring.js +114 -0
  153. package/dist/core/context-budget-v2-scoring.js.map +1 -0
  154. package/dist/core/context-budget-v2-selection.d.ts +32 -0
  155. package/dist/core/context-budget-v2-selection.d.ts.map +1 -0
  156. package/dist/core/context-budget-v2-selection.js +158 -0
  157. package/dist/core/context-budget-v2-selection.js.map +1 -0
  158. package/dist/core/context-budget-v2-tiers.d.ts +15 -0
  159. package/dist/core/context-budget-v2-tiers.d.ts.map +1 -0
  160. package/dist/core/context-budget-v2-tiers.js +68 -0
  161. package/dist/core/context-budget-v2-tiers.js.map +1 -0
  162. package/dist/core/context-budget-v2-types.d.ts +92 -0
  163. package/dist/core/context-budget-v2-types.d.ts.map +1 -0
  164. package/dist/core/context-budget-v2-types.js +24 -0
  165. package/dist/core/context-budget-v2-types.js.map +1 -0
  166. package/dist/core/defaults.d.ts +1 -1
  167. package/dist/core/defaults.d.ts.map +1 -1
  168. package/dist/core/defaults.js.map +1 -1
  169. package/dist/core/diagnostics.d.ts +6 -0
  170. package/dist/core/diagnostics.d.ts.map +1 -1
  171. package/dist/core/diagnostics.js.map +1 -1
  172. package/dist/core/domain-confidence.d.ts +9 -0
  173. package/dist/core/domain-confidence.d.ts.map +1 -0
  174. package/dist/core/domain-confidence.js +39 -0
  175. package/dist/core/domain-confidence.js.map +1 -0
  176. package/dist/core/domain-dispatch.d.ts +44 -0
  177. package/dist/core/domain-dispatch.d.ts.map +1 -0
  178. package/dist/core/domain-dispatch.js +118 -0
  179. package/dist/core/domain-dispatch.js.map +1 -0
  180. package/dist/core/domain-loadouts.d.ts +76 -0
  181. package/dist/core/domain-loadouts.d.ts.map +1 -0
  182. package/dist/core/domain-loadouts.js +981 -0
  183. package/dist/core/domain-loadouts.js.map +1 -0
  184. package/dist/core/domain-registry.d.ts +7 -0
  185. package/dist/core/domain-registry.d.ts.map +1 -0
  186. package/dist/core/domain-registry.js +11 -0
  187. package/dist/core/domain-registry.js.map +1 -0
  188. package/dist/core/domain-router.d.ts +16 -0
  189. package/dist/core/domain-router.d.ts.map +1 -0
  190. package/dist/core/domain-router.js +24 -0
  191. package/dist/core/domain-router.js.map +1 -0
  192. package/dist/core/domain-score.d.ts +13 -0
  193. package/dist/core/domain-score.d.ts.map +1 -0
  194. package/dist/core/domain-score.js +48 -0
  195. package/dist/core/domain-score.js.map +1 -0
  196. package/dist/core/domain-trigger-match.d.ts +14 -0
  197. package/dist/core/domain-trigger-match.d.ts.map +1 -0
  198. package/dist/core/domain-trigger-match.js +51 -0
  199. package/dist/core/domain-trigger-match.js.map +1 -0
  200. package/dist/core/domain-types.d.ts +30 -0
  201. package/dist/core/domain-types.d.ts.map +1 -0
  202. package/dist/core/domain-types.js +2 -0
  203. package/dist/core/domain-types.js.map +1 -0
  204. package/dist/core/exact-cache-policy.d.ts +8 -0
  205. package/dist/core/exact-cache-policy.d.ts.map +1 -1
  206. package/dist/core/exact-cache-policy.js +9 -0
  207. package/dist/core/exact-cache-policy.js.map +1 -1
  208. package/dist/core/exec.d.ts +0 -2
  209. package/dist/core/exec.d.ts.map +1 -1
  210. package/dist/core/exec.js +0 -1
  211. package/dist/core/exec.js.map +1 -1
  212. package/dist/core/export-html/index.d.ts +1 -1
  213. package/dist/core/export-html/index.d.ts.map +1 -1
  214. package/dist/core/export-html/index.js.map +1 -1
  215. package/dist/core/export-html/template.js +1 -3
  216. package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
  217. package/dist/core/export-html/tool-renderer.js.map +1 -1
  218. package/dist/core/extensions/builtin/command-safety-gate.d.ts +3 -0
  219. package/dist/core/extensions/builtin/command-safety-gate.d.ts.map +1 -1
  220. package/dist/core/extensions/builtin/command-safety-gate.js +15 -3
  221. package/dist/core/extensions/builtin/command-safety-gate.js.map +1 -1
  222. package/dist/core/extensions/builtin/todo-checklist.d.ts +20 -0
  223. package/dist/core/extensions/builtin/todo-checklist.d.ts.map +1 -0
  224. package/dist/core/extensions/builtin/todo-checklist.js +73 -0
  225. package/dist/core/extensions/builtin/todo-checklist.js.map +1 -0
  226. package/dist/core/extensions/loader.d.ts +4 -4
  227. package/dist/core/extensions/loader.d.ts.map +1 -1
  228. package/dist/core/extensions/loader.js +57 -92
  229. package/dist/core/extensions/loader.js.map +1 -1
  230. package/dist/core/extensions/runner.d.ts +3 -3
  231. package/dist/core/extensions/runner.d.ts.map +1 -1
  232. package/dist/core/extensions/runner.js +1 -1
  233. package/dist/core/extensions/runner.js.map +1 -1
  234. package/dist/core/extensions/types.d.ts +7 -35
  235. package/dist/core/extensions/types.d.ts.map +1 -1
  236. package/dist/core/extensions/types.js.map +1 -1
  237. package/dist/core/extensions/wrapper.d.ts +1 -1
  238. package/dist/core/extensions/wrapper.d.ts.map +1 -1
  239. package/dist/core/extensions/wrapper.js.map +1 -1
  240. package/dist/core/footer-data-provider.d.ts +3 -1
  241. package/dist/core/footer-data-provider.d.ts.map +1 -1
  242. package/dist/core/footer-data-provider.js +4 -0
  243. package/dist/core/footer-data-provider.js.map +1 -1
  244. package/dist/core/headroom.d.ts +45 -0
  245. package/dist/core/headroom.d.ts.map +1 -0
  246. package/dist/core/headroom.js +171 -0
  247. package/dist/core/headroom.js.map +1 -0
  248. package/dist/core/hook-inventory.d.ts +4 -2
  249. package/dist/core/hook-inventory.d.ts.map +1 -1
  250. package/dist/core/hook-inventory.js +80 -11
  251. package/dist/core/hook-inventory.js.map +1 -1
  252. package/dist/core/hooks/fail-closed.d.ts +4 -1
  253. package/dist/core/hooks/fail-closed.d.ts.map +1 -1
  254. package/dist/core/hooks/fail-closed.js +79 -5
  255. package/dist/core/hooks/fail-closed.js.map +1 -1
  256. package/dist/core/hooks/index.d.ts +2 -2
  257. package/dist/core/hooks/index.d.ts.map +1 -1
  258. package/dist/core/hooks/index.js +1 -1
  259. package/dist/core/hooks/index.js.map +1 -1
  260. package/dist/core/hooks/types.d.ts +9 -0
  261. package/dist/core/hooks/types.d.ts.map +1 -1
  262. package/dist/core/hooks/types.js.map +1 -1
  263. package/dist/core/keybindings.d.ts +2 -14
  264. package/dist/core/keybindings.d.ts.map +1 -1
  265. package/dist/core/keybindings.js +1 -31
  266. package/dist/core/keybindings.js.map +1 -1
  267. package/dist/core/lean-ctx.d.ts +99 -0
  268. package/dist/core/lean-ctx.d.ts.map +1 -0
  269. package/dist/core/lean-ctx.js +225 -0
  270. package/dist/core/lean-ctx.js.map +1 -0
  271. package/dist/core/loadout-compose.d.ts +53 -0
  272. package/dist/core/loadout-compose.d.ts.map +1 -0
  273. package/dist/core/loadout-compose.js +172 -0
  274. package/dist/core/loadout-compose.js.map +1 -0
  275. package/dist/core/loadout-policy-bridge.d.ts +22 -0
  276. package/dist/core/loadout-policy-bridge.d.ts.map +1 -0
  277. package/dist/core/loadout-policy-bridge.js +52 -0
  278. package/dist/core/loadout-policy-bridge.js.map +1 -0
  279. package/dist/core/loadout-runtime.d.ts +22 -0
  280. package/dist/core/loadout-runtime.d.ts.map +1 -1
  281. package/dist/core/loadout-runtime.js +41 -5
  282. package/dist/core/loadout-runtime.js.map +1 -1
  283. package/dist/core/loadout-safety.d.ts +55 -0
  284. package/dist/core/loadout-safety.d.ts.map +1 -0
  285. package/dist/core/loadout-safety.js +213 -0
  286. package/dist/core/loadout-safety.js.map +1 -0
  287. package/dist/core/loadouts.d.ts +4 -2
  288. package/dist/core/loadouts.d.ts.map +1 -1
  289. package/dist/core/loadouts.js +116 -5
  290. package/dist/core/loadouts.js.map +1 -1
  291. package/dist/core/loop-gates.d.ts +48 -0
  292. package/dist/core/loop-gates.d.ts.map +1 -0
  293. package/dist/core/loop-gates.js +352 -0
  294. package/dist/core/loop-gates.js.map +1 -0
  295. package/dist/core/loop-registry.d.ts +77 -0
  296. package/dist/core/loop-registry.d.ts.map +1 -0
  297. package/dist/core/loop-registry.js +831 -0
  298. package/dist/core/loop-registry.js.map +1 -0
  299. package/dist/core/loop-types.d.ts +194 -0
  300. package/dist/core/loop-types.d.ts.map +1 -0
  301. package/dist/core/loop-types.js +2 -0
  302. package/dist/core/loop-types.js.map +1 -0
  303. package/dist/core/mcp-inventory.d.ts +7 -0
  304. package/dist/core/mcp-inventory.d.ts.map +1 -1
  305. package/dist/core/mcp-inventory.js +5 -1
  306. package/dist/core/mcp-inventory.js.map +1 -1
  307. package/dist/core/mcp-presets.d.ts +43 -2
  308. package/dist/core/mcp-presets.d.ts.map +1 -1
  309. package/dist/core/mcp-presets.js +298 -2
  310. package/dist/core/mcp-presets.js.map +1 -1
  311. package/dist/core/messages.d.ts +3 -3
  312. package/dist/core/messages.d.ts.map +1 -1
  313. package/dist/core/messages.js.map +1 -1
  314. package/dist/core/metrics-sampler.d.ts +11 -0
  315. package/dist/core/metrics-sampler.d.ts.map +1 -1
  316. package/dist/core/metrics-sampler.js +52 -13
  317. package/dist/core/metrics-sampler.js.map +1 -1
  318. package/dist/core/model-registry.d.ts +1 -2
  319. package/dist/core/model-registry.d.ts.map +1 -1
  320. package/dist/core/model-registry.js +18 -41
  321. package/dist/core/model-registry.js.map +1 -1
  322. package/dist/core/model-resolver.d.ts +2 -2
  323. package/dist/core/model-resolver.d.ts.map +1 -1
  324. package/dist/core/model-resolver.js +2 -2
  325. package/dist/core/model-resolver.js.map +1 -1
  326. package/dist/core/package-gallery-identity.d.ts +7 -0
  327. package/dist/core/package-gallery-identity.d.ts.map +1 -0
  328. package/dist/core/package-gallery-identity.js +31 -0
  329. package/dist/core/package-gallery-identity.js.map +1 -0
  330. package/dist/core/package-gallery-install.d.ts +6 -0
  331. package/dist/core/package-gallery-install.d.ts.map +1 -0
  332. package/dist/core/package-gallery-install.js +59 -0
  333. package/dist/core/package-gallery-install.js.map +1 -0
  334. package/dist/core/package-gallery-manifest.d.ts +13 -0
  335. package/dist/core/package-gallery-manifest.d.ts.map +1 -0
  336. package/dist/core/package-gallery-manifest.js +183 -0
  337. package/dist/core/package-gallery-manifest.js.map +1 -0
  338. package/dist/core/package-gallery-trial.d.ts +4 -0
  339. package/dist/core/package-gallery-trial.d.ts.map +1 -0
  340. package/dist/core/package-gallery-trial.js +55 -0
  341. package/dist/core/package-gallery-trial.js.map +1 -0
  342. package/dist/core/package-gallery-types.d.ts +71 -0
  343. package/dist/core/package-gallery-types.d.ts.map +1 -0
  344. package/dist/core/package-gallery-types.js +2 -0
  345. package/dist/core/package-gallery-types.js.map +1 -0
  346. package/dist/core/package-gallery.d.ts +5 -123
  347. package/dist/core/package-gallery.d.ts.map +1 -1
  348. package/dist/core/package-gallery.js +5 -391
  349. package/dist/core/package-gallery.js.map +1 -1
  350. package/dist/core/package-manager.d.ts +0 -69
  351. package/dist/core/package-manager.d.ts.map +1 -1
  352. package/dist/core/package-manager.js +69 -367
  353. package/dist/core/package-manager.js.map +1 -1
  354. package/dist/core/package-procurement.d.ts +4 -4
  355. package/dist/core/package-procurement.d.ts.map +1 -1
  356. package/dist/core/package-procurement.js +29 -17
  357. package/dist/core/package-procurement.js.map +1 -1
  358. package/dist/core/pi-package-intake-candidates.d.ts +21 -0
  359. package/dist/core/pi-package-intake-candidates.d.ts.map +1 -0
  360. package/dist/core/pi-package-intake-candidates.js +109 -0
  361. package/dist/core/pi-package-intake-candidates.js.map +1 -0
  362. package/dist/core/pi-package-intake.d.ts +43 -0
  363. package/dist/core/pi-package-intake.d.ts.map +1 -0
  364. package/dist/core/pi-package-intake.js +122 -0
  365. package/dist/core/pi-package-intake.js.map +1 -0
  366. package/dist/core/provider-attribution.d.ts +1 -1
  367. package/dist/core/provider-attribution.d.ts.map +1 -1
  368. package/dist/core/provider-attribution.js.map +1 -1
  369. package/dist/core/provider-display-names.d.ts.map +1 -1
  370. package/dist/core/provider-display-names.js +1 -0
  371. package/dist/core/provider-display-names.js.map +1 -1
  372. package/dist/core/read-anchors.d.ts +1 -1
  373. package/dist/core/read-anchors.d.ts.map +1 -1
  374. package/dist/core/read-anchors.js +1 -1
  375. package/dist/core/read-anchors.js.map +1 -1
  376. package/dist/core/recovery-checkpoint.d.ts +2 -2
  377. package/dist/core/recovery-checkpoint.d.ts.map +1 -1
  378. package/dist/core/recovery-checkpoint.js +2 -2
  379. package/dist/core/recovery-checkpoint.js.map +1 -1
  380. package/dist/core/resolve-config-value.d.ts +1 -1
  381. package/dist/core/resolve-config-value.d.ts.map +1 -1
  382. package/dist/core/resolve-config-value.js +2 -30
  383. package/dist/core/resolve-config-value.js.map +1 -1
  384. package/dist/core/resource-loader.d.ts +12 -20
  385. package/dist/core/resource-loader.d.ts.map +1 -1
  386. package/dist/core/resource-loader.js +67 -90
  387. package/dist/core/resource-loader.js.map +1 -1
  388. package/dist/core/sandbox-policy-v2.d.ts +49 -0
  389. package/dist/core/sandbox-policy-v2.d.ts.map +1 -0
  390. package/dist/core/sandbox-policy-v2.js +368 -0
  391. package/dist/core/sandbox-policy-v2.js.map +1 -0
  392. package/dist/core/sdk.d.ts +10 -78
  393. package/dist/core/sdk.d.ts.map +1 -1
  394. package/dist/core/sdk.js +97 -139
  395. package/dist/core/sdk.js.map +1 -1
  396. package/dist/core/semantic-cache-policy.d.ts +7 -1
  397. package/dist/core/semantic-cache-policy.d.ts.map +1 -1
  398. package/dist/core/semantic-cache-policy.js +8 -0
  399. package/dist/core/semantic-cache-policy.js.map +1 -1
  400. package/dist/core/session-manager.d.ts +2 -4
  401. package/dist/core/session-manager.d.ts.map +1 -1
  402. package/dist/core/session-manager.js +5 -6
  403. package/dist/core/session-manager.js.map +1 -1
  404. package/dist/core/settings-manager.d.ts +1 -18
  405. package/dist/core/settings-manager.d.ts.map +1 -1
  406. package/dist/core/settings-manager.js +2 -48
  407. package/dist/core/settings-manager.js.map +1 -1
  408. package/dist/core/skills.d.ts +5 -0
  409. package/dist/core/skills.d.ts.map +1 -1
  410. package/dist/core/skills.js +149 -36
  411. package/dist/core/skills.js.map +1 -1
  412. package/dist/core/slash-commands.d.ts.map +1 -1
  413. package/dist/core/slash-commands.js +0 -2
  414. package/dist/core/slash-commands.js.map +1 -1
  415. package/dist/core/subagent-orchestration.d.ts +73 -0
  416. package/dist/core/subagent-orchestration.d.ts.map +1 -0
  417. package/dist/core/subagent-orchestration.js +408 -0
  418. package/dist/core/subagent-orchestration.js.map +1 -0
  419. package/dist/core/system-prompt.d.ts +5 -4
  420. package/dist/core/system-prompt.d.ts.map +1 -1
  421. package/dist/core/system-prompt.js +57 -36
  422. package/dist/core/system-prompt.js.map +1 -1
  423. package/dist/core/timings.d.ts +0 -4
  424. package/dist/core/timings.d.ts.map +1 -1
  425. package/dist/core/timings.js +0 -4
  426. package/dist/core/timings.js.map +1 -1
  427. package/dist/core/todo-runtime-state.d.ts +5 -0
  428. package/dist/core/todo-runtime-state.d.ts.map +1 -0
  429. package/dist/core/todo-runtime-state.js +12 -0
  430. package/dist/core/todo-runtime-state.js.map +1 -0
  431. package/dist/core/todo-state.d.ts +53 -0
  432. package/dist/core/todo-state.d.ts.map +1 -0
  433. package/dist/core/todo-state.js +87 -0
  434. package/dist/core/todo-state.js.map +1 -0
  435. package/dist/core/token-optimizer.d.ts +58 -0
  436. package/dist/core/token-optimizer.d.ts.map +1 -0
  437. package/dist/core/token-optimizer.js +179 -0
  438. package/dist/core/token-optimizer.js.map +1 -0
  439. package/dist/core/tools/bash.d.ts +8 -9
  440. package/dist/core/tools/bash.d.ts.map +1 -1
  441. package/dist/core/tools/bash.js +9 -8
  442. package/dist/core/tools/bash.js.map +1 -1
  443. package/dist/core/tools/edit.d.ts +3 -14
  444. package/dist/core/tools/edit.d.ts.map +1 -1
  445. package/dist/core/tools/edit.js +4 -25
  446. package/dist/core/tools/edit.js.map +1 -1
  447. package/dist/core/tools/find.d.ts +1 -4
  448. package/dist/core/tools/find.d.ts.map +1 -1
  449. package/dist/core/tools/find.js +1 -4
  450. package/dist/core/tools/find.js.map +1 -1
  451. package/dist/core/tools/grep.d.ts +1 -4
  452. package/dist/core/tools/grep.d.ts.map +1 -1
  453. package/dist/core/tools/grep.js +2 -5
  454. package/dist/core/tools/grep.js.map +1 -1
  455. package/dist/core/tools/index.d.ts +2 -2
  456. package/dist/core/tools/index.d.ts.map +1 -1
  457. package/dist/core/tools/index.js.map +1 -1
  458. package/dist/core/tools/ls.d.ts +1 -4
  459. package/dist/core/tools/ls.d.ts.map +1 -1
  460. package/dist/core/tools/ls.js +1 -4
  461. package/dist/core/tools/ls.js.map +1 -1
  462. package/dist/core/tools/read.d.ts +2 -14
  463. package/dist/core/tools/read.d.ts.map +1 -1
  464. package/dist/core/tools/read.js +4 -28
  465. package/dist/core/tools/read.js.map +1 -1
  466. package/dist/core/tools/render-utils.d.ts +1 -1
  467. package/dist/core/tools/render-utils.d.ts.map +1 -1
  468. package/dist/core/tools/render-utils.js +1 -1
  469. package/dist/core/tools/render-utils.js.map +1 -1
  470. package/dist/core/tools/tool-definition-wrapper.d.ts +1 -1
  471. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  472. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  473. package/dist/core/tools/write.d.ts +2 -4
  474. package/dist/core/tools/write.d.ts.map +1 -1
  475. package/dist/core/tools/write.js +4 -4
  476. package/dist/core/tools/write.js.map +1 -1
  477. package/dist/encoding/index.d.ts +6 -0
  478. package/dist/encoding/index.d.ts.map +1 -0
  479. package/dist/encoding/index.js +6 -0
  480. package/dist/encoding/index.js.map +1 -0
  481. package/dist/encoding/l4-encoder.d.ts +96 -0
  482. package/dist/encoding/l4-encoder.d.ts.map +1 -0
  483. package/dist/encoding/l4-encoder.js +474 -0
  484. package/dist/encoding/l4-encoder.js.map +1 -0
  485. package/dist/fuzzing/index.d.ts +6 -0
  486. package/dist/fuzzing/index.d.ts.map +1 -0
  487. package/dist/fuzzing/index.js +6 -0
  488. package/dist/fuzzing/index.js.map +1 -0
  489. package/dist/fuzzing/mutation-engine.d.ts +93 -0
  490. package/dist/fuzzing/mutation-engine.d.ts.map +1 -0
  491. package/dist/fuzzing/mutation-engine.js +244 -0
  492. package/dist/fuzzing/mutation-engine.js.map +1 -0
  493. package/dist/guardrails/audit-logger.d.ts +4 -0
  494. package/dist/guardrails/audit-logger.d.ts.map +1 -0
  495. package/dist/guardrails/audit-logger.js +28 -0
  496. package/dist/guardrails/audit-logger.js.map +1 -0
  497. package/dist/guardrails/evidence-system.d.ts +61 -0
  498. package/dist/guardrails/evidence-system.d.ts.map +1 -0
  499. package/dist/guardrails/evidence-system.js +302 -0
  500. package/dist/guardrails/evidence-system.js.map +1 -0
  501. package/dist/guardrails/freedomd-adapter.d.ts +16 -0
  502. package/dist/guardrails/freedomd-adapter.d.ts.map +1 -0
  503. package/dist/guardrails/freedomd-adapter.js +87 -0
  504. package/dist/guardrails/freedomd-adapter.js.map +1 -0
  505. package/dist/index.d.ts +5 -19
  506. package/dist/index.d.ts.map +1 -1
  507. package/dist/index.js +3 -17
  508. package/dist/index.js.map +1 -1
  509. package/dist/jailbreak-extension.d.ts +48 -0
  510. package/dist/jailbreak-extension.d.ts.map +1 -0
  511. package/dist/jailbreak-extension.js +47 -0
  512. package/dist/jailbreak-extension.js.map +1 -0
  513. package/dist/main.d.ts.map +1 -1
  514. package/dist/main.js +2 -2
  515. package/dist/main.js.map +1 -1
  516. package/dist/migrations.d.ts +0 -37
  517. package/dist/migrations.d.ts.map +1 -1
  518. package/dist/migrations.js +6 -414
  519. package/dist/migrations.js.map +1 -1
  520. package/dist/modes/interactive/components/armin.d.ts +1 -1
  521. package/dist/modes/interactive/components/armin.d.ts.map +1 -1
  522. package/dist/modes/interactive/components/armin.js.map +1 -1
  523. package/dist/modes/interactive/components/assistant-message.d.ts +2 -2
  524. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  525. package/dist/modes/interactive/components/assistant-message.js +1 -1
  526. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  527. package/dist/modes/interactive/components/bash-execution.d.ts +1 -1
  528. package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
  529. package/dist/modes/interactive/components/bash-execution.js +1 -1
  530. package/dist/modes/interactive/components/bash-execution.js.map +1 -1
  531. package/dist/modes/interactive/components/bordered-loader.d.ts +1 -1
  532. package/dist/modes/interactive/components/bordered-loader.d.ts.map +1 -1
  533. package/dist/modes/interactive/components/bordered-loader.js +1 -1
  534. package/dist/modes/interactive/components/bordered-loader.js.map +1 -1
  535. package/dist/modes/interactive/components/branch-summary-message.d.ts +1 -1
  536. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  537. package/dist/modes/interactive/components/branch-summary-message.js +1 -1
  538. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  539. package/dist/modes/interactive/components/compaction-summary-message.d.ts +1 -1
  540. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  541. package/dist/modes/interactive/components/compaction-summary-message.js +1 -1
  542. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  543. package/dist/modes/interactive/components/config-selector.d.ts +1 -1
  544. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  545. package/dist/modes/interactive/components/config-selector.js +1 -1
  546. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  547. package/dist/modes/interactive/components/control-panel-box.d.ts +15 -0
  548. package/dist/modes/interactive/components/control-panel-box.d.ts.map +1 -0
  549. package/dist/modes/interactive/components/control-panel-box.js +55 -0
  550. package/dist/modes/interactive/components/control-panel-box.js.map +1 -0
  551. package/dist/modes/interactive/components/control-panel-gradient-motion.d.ts.map +1 -1
  552. package/dist/modes/interactive/components/control-panel-gradient-motion.js +2 -36
  553. package/dist/modes/interactive/components/control-panel-gradient-motion.js.map +1 -1
  554. package/dist/modes/interactive/components/control-panel-gradient.d.ts +1 -0
  555. package/dist/modes/interactive/components/control-panel-gradient.d.ts.map +1 -1
  556. package/dist/modes/interactive/components/control-panel-gradient.js +6 -5
  557. package/dist/modes/interactive/components/control-panel-gradient.js.map +1 -1
  558. package/dist/modes/interactive/components/control-panel-layout.d.ts +30 -0
  559. package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -0
  560. package/dist/modes/interactive/components/control-panel-layout.js +197 -0
  561. package/dist/modes/interactive/components/control-panel-layout.js.map +1 -0
  562. package/dist/modes/interactive/components/control-panel-runtime-status.d.ts +6 -0
  563. package/dist/modes/interactive/components/control-panel-runtime-status.d.ts.map +1 -0
  564. package/dist/modes/interactive/components/control-panel-runtime-status.js +29 -0
  565. package/dist/modes/interactive/components/control-panel-runtime-status.js.map +1 -0
  566. package/dist/modes/interactive/components/control-panel.d.ts +9 -31
  567. package/dist/modes/interactive/components/control-panel.d.ts.map +1 -1
  568. package/dist/modes/interactive/components/control-panel.js +49 -168
  569. package/dist/modes/interactive/components/control-panel.js.map +1 -1
  570. package/dist/modes/interactive/components/countdown-timer.d.ts +1 -1
  571. package/dist/modes/interactive/components/countdown-timer.d.ts.map +1 -1
  572. package/dist/modes/interactive/components/countdown-timer.js.map +1 -1
  573. package/dist/modes/interactive/components/custom-editor.d.ts +1 -1
  574. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  575. package/dist/modes/interactive/components/custom-editor.js +14 -22
  576. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  577. package/dist/modes/interactive/components/custom-message.d.ts +1 -1
  578. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  579. package/dist/modes/interactive/components/custom-message.js +1 -1
  580. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  581. package/dist/modes/interactive/components/daxnuts.d.ts +1 -1
  582. package/dist/modes/interactive/components/daxnuts.d.ts.map +1 -1
  583. package/dist/modes/interactive/components/daxnuts.js.map +1 -1
  584. package/dist/modes/interactive/components/dynamic-border.d.ts +1 -1
  585. package/dist/modes/interactive/components/dynamic-border.d.ts.map +1 -1
  586. package/dist/modes/interactive/components/dynamic-border.js.map +1 -1
  587. package/dist/modes/interactive/components/earendil-announcement.d.ts +1 -1
  588. package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
  589. package/dist/modes/interactive/components/earendil-announcement.js +1 -1
  590. package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
  591. package/dist/modes/interactive/components/extension-editor.d.ts +1 -1
  592. package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
  593. package/dist/modes/interactive/components/extension-editor.js +1 -1
  594. package/dist/modes/interactive/components/extension-editor.js.map +1 -1
  595. package/dist/modes/interactive/components/extension-input.d.ts +1 -1
  596. package/dist/modes/interactive/components/extension-input.d.ts.map +1 -1
  597. package/dist/modes/interactive/components/extension-input.js +1 -1
  598. package/dist/modes/interactive/components/extension-input.js.map +1 -1
  599. package/dist/modes/interactive/components/extension-selector.d.ts +1 -1
  600. package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
  601. package/dist/modes/interactive/components/extension-selector.js +1 -1
  602. package/dist/modes/interactive/components/extension-selector.js.map +1 -1
  603. package/dist/modes/interactive/components/footer.d.ts +1 -1
  604. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  605. package/dist/modes/interactive/components/footer.js +7 -9
  606. package/dist/modes/interactive/components/footer.js.map +1 -1
  607. package/dist/modes/interactive/components/index.d.ts +0 -2
  608. package/dist/modes/interactive/components/index.d.ts.map +1 -1
  609. package/dist/modes/interactive/components/index.js +0 -2
  610. package/dist/modes/interactive/components/index.js.map +1 -1
  611. package/dist/modes/interactive/components/keybinding-hints.d.ts +1 -1
  612. package/dist/modes/interactive/components/keybinding-hints.d.ts.map +1 -1
  613. package/dist/modes/interactive/components/keybinding-hints.js +1 -1
  614. package/dist/modes/interactive/components/keybinding-hints.js.map +1 -1
  615. package/dist/modes/interactive/components/login-dialog.d.ts +2 -2
  616. package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
  617. package/dist/modes/interactive/components/login-dialog.js +2 -2
  618. package/dist/modes/interactive/components/login-dialog.js.map +1 -1
  619. package/dist/modes/interactive/components/model-selector.d.ts +13 -47
  620. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  621. package/dist/modes/interactive/components/model-selector.js +118 -193
  622. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  623. package/dist/modes/interactive/components/oauth-selector.d.ts +1 -1
  624. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  625. package/dist/modes/interactive/components/oauth-selector.js +1 -1
  626. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  627. package/dist/modes/interactive/components/scoped-models-selector.d.ts +2 -2
  628. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  629. package/dist/modes/interactive/components/scoped-models-selector.js +1 -1
  630. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  631. package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
  632. package/dist/modes/interactive/components/session-selector-search.js +1 -1
  633. package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
  634. package/dist/modes/interactive/components/session-selector.d.ts +1 -1
  635. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  636. package/dist/modes/interactive/components/session-selector.js +1 -1
  637. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  638. package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
  639. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  640. package/dist/modes/interactive/components/settings-selector.js +1 -1
  641. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  642. package/dist/modes/interactive/components/show-images-selector.d.ts +1 -1
  643. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  644. package/dist/modes/interactive/components/show-images-selector.js +1 -1
  645. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  646. package/dist/modes/interactive/components/skill-invocation-message.d.ts +1 -1
  647. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  648. package/dist/modes/interactive/components/skill-invocation-message.js +1 -1
  649. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  650. package/dist/modes/interactive/components/theme-selector.d.ts +1 -2
  651. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  652. package/dist/modes/interactive/components/theme-selector.js +2 -11
  653. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  654. package/dist/modes/interactive/components/thinking-selector.d.ts +8 -7
  655. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  656. package/dist/modes/interactive/components/thinking-selector.js +48 -7
  657. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  658. package/dist/modes/interactive/components/todo-checklist.d.ts +31 -0
  659. package/dist/modes/interactive/components/todo-checklist.d.ts.map +1 -0
  660. package/dist/modes/interactive/components/todo-checklist.js +121 -0
  661. package/dist/modes/interactive/components/todo-checklist.js.map +1 -0
  662. package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
  663. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  664. package/dist/modes/interactive/components/tool-execution.js +1 -1
  665. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  666. package/dist/modes/interactive/components/tree-selector.d.ts +1 -1
  667. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  668. package/dist/modes/interactive/components/tree-selector.js +1 -1
  669. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  670. package/dist/modes/interactive/components/user-message-selector.d.ts +1 -1
  671. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  672. package/dist/modes/interactive/components/user-message-selector.js +1 -1
  673. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  674. package/dist/modes/interactive/components/user-message.d.ts +1 -1
  675. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  676. package/dist/modes/interactive/components/user-message.js +1 -1
  677. package/dist/modes/interactive/components/user-message.js.map +1 -1
  678. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  679. package/dist/modes/interactive/components/visual-truncate.js +1 -1
  680. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  681. package/dist/modes/interactive/interactive-mode.d.ts +3 -8
  682. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  683. package/dist/modes/interactive/interactive-mode.js +80 -232
  684. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  685. package/dist/modes/interactive/theme/omk-control-grid-dark.json +65 -77
  686. package/dist/modes/interactive/theme/omk-neon-control.json +90 -0
  687. package/dist/modes/interactive/theme/rust-forge.json +14 -24
  688. package/dist/modes/interactive/theme/theme.d.ts +1 -1
  689. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  690. package/dist/modes/interactive/theme/theme.js +25 -45
  691. package/dist/modes/interactive/theme/theme.js.map +1 -1
  692. package/dist/modes/print-mode.d.ts +1 -1
  693. package/dist/modes/print-mode.d.ts.map +1 -1
  694. package/dist/modes/print-mode.js.map +1 -1
  695. package/dist/modes/rpc/rpc-client.d.ts +2 -2
  696. package/dist/modes/rpc/rpc-client.d.ts.map +1 -1
  697. package/dist/modes/rpc/rpc-client.js.map +1 -1
  698. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  699. package/dist/modes/rpc/rpc-mode.js +0 -4
  700. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  701. package/dist/modes/rpc/rpc-types.d.ts +2 -2
  702. package/dist/modes/rpc/rpc-types.d.ts.map +1 -1
  703. package/dist/modes/rpc/rpc-types.js.map +1 -1
  704. package/dist/modules/index.d.ts +8 -0
  705. package/dist/modules/index.d.ts.map +1 -0
  706. package/dist/modules/index.js +7 -0
  707. package/dist/modules/index.js.map +1 -0
  708. package/dist/modules/lrl-bypass.d.ts +40 -0
  709. package/dist/modules/lrl-bypass.d.ts.map +1 -0
  710. package/dist/modules/lrl-bypass.js +84 -0
  711. package/dist/modules/lrl-bypass.js.map +1 -0
  712. package/dist/modules/lrl-deps.d.ts +38 -0
  713. package/dist/modules/lrl-deps.d.ts.map +1 -0
  714. package/dist/modules/lrl-deps.js +128 -0
  715. package/dist/modules/lrl-deps.js.map +1 -0
  716. package/dist/multiturn/easl-chain.d.ts +113 -0
  717. package/dist/multiturn/easl-chain.d.ts.map +1 -0
  718. package/dist/multiturn/easl-chain.js +351 -0
  719. package/dist/multiturn/easl-chain.js.map +1 -0
  720. package/dist/multiturn/index.d.ts +6 -0
  721. package/dist/multiturn/index.d.ts.map +1 -0
  722. package/dist/multiturn/index.js +6 -0
  723. package/dist/multiturn/index.js.map +1 -0
  724. package/dist/orchestration/lane-grant-auditor.d.ts +4 -0
  725. package/dist/orchestration/lane-grant-auditor.d.ts.map +1 -0
  726. package/dist/orchestration/lane-grant-auditor.js +87 -0
  727. package/dist/orchestration/lane-grant-auditor.js.map +1 -0
  728. package/dist/package-manager-cli.d.ts.map +1 -1
  729. package/dist/package-manager-cli.js +48 -113
  730. package/dist/package-manager-cli.js.map +1 -1
  731. package/dist/routing/fallback-router.d.ts +123 -0
  732. package/dist/routing/fallback-router.d.ts.map +1 -0
  733. package/dist/routing/fallback-router.js +355 -0
  734. package/dist/routing/fallback-router.js.map +1 -0
  735. package/dist/routing/index.d.ts +6 -0
  736. package/dist/routing/index.d.ts.map +1 -0
  737. package/dist/routing/index.js +6 -0
  738. package/dist/routing/index.js.map +1 -0
  739. package/dist/types/evidence.d.ts +117 -0
  740. package/dist/types/evidence.d.ts.map +1 -0
  741. package/dist/types/evidence.js +8 -0
  742. package/dist/types/evidence.js.map +1 -0
  743. package/dist/types/guardrails.d.ts +61 -0
  744. package/dist/types/guardrails.d.ts.map +1 -0
  745. package/dist/types/guardrails.js +9 -0
  746. package/dist/types/guardrails.js.map +1 -0
  747. package/dist/types/jailbreak.d.ts +246 -0
  748. package/dist/types/jailbreak.d.ts.map +1 -0
  749. package/dist/types/jailbreak.js +8 -0
  750. package/dist/types/jailbreak.js.map +1 -0
  751. package/dist/types/lane-grant.d.ts +58 -0
  752. package/dist/types/lane-grant.d.ts.map +1 -0
  753. package/dist/types/lane-grant.js +9 -0
  754. package/dist/types/lane-grant.js.map +1 -0
  755. package/dist/utils/jailbreak/common.d.ts +63 -0
  756. package/dist/utils/jailbreak/common.d.ts.map +1 -0
  757. package/dist/utils/jailbreak/common.js +130 -0
  758. package/dist/utils/jailbreak/common.js.map +1 -0
  759. package/dist/utils/jailbreak/index.d.ts +7 -0
  760. package/dist/utils/jailbreak/index.d.ts.map +1 -0
  761. package/dist/utils/jailbreak/index.js +7 -0
  762. package/dist/utils/jailbreak/index.js.map +1 -0
  763. package/dist/utils/windows-self-update.d.ts.map +1 -1
  764. package/dist/utils/windows-self-update.js +1 -1
  765. package/dist/utils/windows-self-update.js.map +1 -1
  766. package/docs/compaction.md +8 -21
  767. package/docs/custom-provider.md +2 -2
  768. package/docs/development.md +1 -1
  769. package/docs/extensions.md +11 -11
  770. package/docs/loadout-domains/README.md +70 -0
  771. package/docs/loadout-domains/ai-agent-ops.md +94 -0
  772. package/docs/loadout-domains/backend-api.md +116 -0
  773. package/docs/loadout-domains/data-science.md +100 -0
  774. package/docs/loadout-domains/devops-infra.md +85 -0
  775. package/docs/loadout-domains/docs-writing.md +92 -0
  776. package/docs/loadout-domains/frontend-ui.md +128 -0
  777. package/docs/loadout-domains/general.md +62 -0
  778. package/docs/loadout-domains/mobile.md +84 -0
  779. package/docs/loadout-domains/qa-testing.md +87 -0
  780. package/docs/loadout-domains/research.md +80 -0
  781. package/docs/loadout-domains/security-audit.md +97 -0
  782. package/docs/packages.md +7 -48
  783. package/docs/prompt-templates.md +0 -2
  784. package/docs/providers.md +12 -0
  785. package/docs/sdk.md +3 -3
  786. package/docs/security.md +145 -0
  787. package/docs/session-format.md +1 -1
  788. package/docs/themes.md +8 -7
  789. package/docs/tui.md +14 -14
  790. package/docs/usage.md +6 -16
  791. package/examples/extensions/README.md +2 -2
  792. package/examples/extensions/aside-computer-use/README.md +114 -0
  793. package/examples/extensions/aside-computer-use/action-scoring.ts +122 -0
  794. package/examples/extensions/aside-computer-use/assertions.ts +380 -0
  795. package/examples/extensions/aside-computer-use/controller.ts +491 -0
  796. package/examples/extensions/aside-computer-use/evidence.ts +229 -0
  797. package/examples/extensions/aside-computer-use/golden-trace.ts +141 -0
  798. package/examples/extensions/aside-computer-use/index.ts +76 -0
  799. package/examples/extensions/aside-computer-use/mcp-client.ts +381 -0
  800. package/examples/extensions/aside-computer-use/observation-snapshot.ts +121 -0
  801. package/examples/extensions/aside-computer-use/package.json +16 -0
  802. package/examples/extensions/aside-computer-use/policy.ts +257 -0
  803. package/examples/extensions/aside-computer-use/risk-authorize.ts +200 -0
  804. package/examples/extensions/aside-computer-use/risk-classifier.ts +205 -0
  805. package/examples/extensions/aside-computer-use/schema-fingerprint.ts +80 -0
  806. package/examples/extensions/aside-computer-use/session-binding.ts +161 -0
  807. package/examples/extensions/aside-computer-use/tools.ts +449 -0
  808. package/examples/extensions/aside-computer-use/types.ts +217 -0
  809. package/examples/extensions/aside-computer-use/url-origin.ts +132 -0
  810. package/examples/extensions/bash-spawn-hook.ts +1 -1
  811. package/examples/extensions/border-status-editor.ts +2 -2
  812. package/examples/extensions/built-in-tool-renderer.ts +1 -1
  813. package/examples/extensions/custom-compaction.ts +1 -1
  814. package/examples/extensions/custom-footer.ts +2 -2
  815. package/examples/extensions/custom-header.ts +8 -8
  816. package/examples/extensions/custom-provider-anthropic/index.ts +1 -1
  817. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  818. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  819. package/examples/extensions/custom-provider-gitlab-duo/index.ts +1 -1
  820. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  821. package/examples/extensions/custom-provider-gitlab-duo/test.ts +1 -1
  822. package/examples/extensions/doom-overlay/README.md +1 -2
  823. package/examples/extensions/doom-overlay/doom/build/doom.wasm +0 -0
  824. package/examples/extensions/doom-overlay/doom/build.sh +4 -4
  825. package/examples/extensions/doom-overlay/doom/doomgeneric_omk.c +72 -0
  826. package/examples/extensions/doom-overlay/doom-component.ts +2 -2
  827. package/examples/extensions/doom-overlay/doom-keys.ts +1 -1
  828. package/examples/extensions/git-merge-and-resolve.ts +1 -1
  829. package/examples/extensions/github-issue-autocomplete.ts +1 -6
  830. package/examples/extensions/gondolin/index.ts +1 -1
  831. package/examples/extensions/gondolin/package-lock.json +2 -2
  832. package/examples/extensions/gondolin/package.json +1 -1
  833. package/examples/extensions/handoff.ts +2 -2
  834. package/examples/extensions/hello.ts +1 -1
  835. package/examples/extensions/inline-bash.ts +1 -1
  836. package/examples/extensions/input-transform-streaming.ts +1 -1
  837. package/examples/extensions/input-transform.ts +2 -2
  838. package/examples/extensions/mac-system-theme.ts +1 -1
  839. package/examples/extensions/message-renderer.ts +1 -1
  840. package/examples/extensions/minimal-mode.ts +1 -1
  841. package/examples/extensions/modal-editor.ts +1 -1
  842. package/examples/extensions/overlay-qa-tests.ts +7 -7
  843. package/examples/extensions/overlay-test.ts +1 -1
  844. package/examples/extensions/plan-mode/index.ts +3 -3
  845. package/examples/extensions/preset.ts +4 -4
  846. package/examples/extensions/provider-payload.ts +6 -3
  847. package/examples/extensions/qna.ts +1 -1
  848. package/examples/extensions/question.ts +1 -1
  849. package/examples/extensions/questionnaire.ts +1 -1
  850. package/examples/extensions/rpc-demo.ts +1 -1
  851. package/examples/extensions/sandbox/index.ts +2 -2
  852. package/examples/extensions/sandbox/package-lock.json +2 -2
  853. package/examples/extensions/sandbox/package.json +1 -1
  854. package/examples/extensions/shutdown-command.ts +5 -5
  855. package/examples/extensions/snake.ts +1 -1
  856. package/examples/extensions/space-invaders.ts +1 -1
  857. package/examples/extensions/structured-output.ts +1 -1
  858. package/examples/extensions/subagent/agents.ts +2 -2
  859. package/examples/extensions/subagent/index.ts +19 -51
  860. package/examples/extensions/summarize.ts +2 -2
  861. package/examples/extensions/tic-tac-toe.ts +2 -2
  862. package/examples/extensions/todo.ts +2 -2
  863. package/examples/extensions/tool-override.ts +1 -1
  864. package/examples/extensions/tools.ts +1 -1
  865. package/examples/extensions/truncated-tool.ts +1 -1
  866. package/examples/extensions/with-deps/package-lock.json +2 -2
  867. package/examples/extensions/with-deps/package.json +1 -1
  868. package/examples/extensions/working-indicator.ts +3 -3
  869. package/examples/rpc-extension-ui.ts +1 -9
  870. package/examples/sdk/02-custom-model.ts +1 -1
  871. package/examples/sdk/07-context-files.ts +0 -2
  872. package/examples/sdk/12-full-control.ts +1 -1
  873. package/examples/sdk/README.md +1 -1
  874. package/npm-shrinkwrap.json +1805 -0
  875. package/package.json +10 -32
  876. package/dist/core/compaction/pruner-policy.d.ts +0 -84
  877. package/dist/core/compaction/pruner-policy.d.ts.map +0 -1
  878. package/dist/core/compaction/pruner-policy.js +0 -273
  879. package/dist/core/compaction/pruner-policy.js.map +0 -1
  880. package/dist/core/context-graph-identity-resolution.d.ts +0 -114
  881. package/dist/core/context-graph-identity-resolution.d.ts.map +0 -1
  882. package/dist/core/context-graph-identity-resolution.js +0 -127
  883. package/dist/core/context-graph-identity-resolution.js.map +0 -1
  884. package/dist/core/context-graph-memory-store.d.ts +0 -153
  885. package/dist/core/context-graph-memory-store.d.ts.map +0 -1
  886. package/dist/core/context-graph-memory-store.js +0 -377
  887. package/dist/core/context-graph-memory-store.js.map +0 -1
  888. package/dist/core/context-graph-ontology-generation.d.ts +0 -104
  889. package/dist/core/context-graph-ontology-generation.d.ts.map +0 -1
  890. package/dist/core/context-graph-ontology-generation.js +0 -135
  891. package/dist/core/context-graph-ontology-generation.js.map +0 -1
  892. package/dist/core/context-graph-ontology-registry.d.ts +0 -766
  893. package/dist/core/context-graph-ontology-registry.d.ts.map +0 -1
  894. package/dist/core/context-graph-ontology-registry.js +0 -1133
  895. package/dist/core/context-graph-ontology-registry.js.map +0 -1
  896. package/dist/core/context-graph-policy.d.ts +0 -68
  897. package/dist/core/context-graph-policy.d.ts.map +0 -1
  898. package/dist/core/context-graph-policy.js +0 -221
  899. package/dist/core/context-graph-policy.js.map +0 -1
  900. package/dist/core/context-graph-reasoning.d.ts +0 -130
  901. package/dist/core/context-graph-reasoning.d.ts.map +0 -1
  902. package/dist/core/context-graph-reasoning.js +0 -442
  903. package/dist/core/context-graph-reasoning.js.map +0 -1
  904. package/dist/core/context-graph-retrieval.d.ts +0 -120
  905. package/dist/core/context-graph-retrieval.d.ts.map +0 -1
  906. package/dist/core/context-graph-retrieval.js +0 -288
  907. package/dist/core/context-graph-retrieval.js.map +0 -1
  908. package/dist/core/contract-verification.d.ts +0 -78
  909. package/dist/core/contract-verification.d.ts.map +0 -1
  910. package/dist/core/contract-verification.js +0 -110
  911. package/dist/core/contract-verification.js.map +0 -1
  912. package/dist/core/freedom/banner.d.ts +0 -14
  913. package/dist/core/freedom/banner.d.ts.map +0 -1
  914. package/dist/core/freedom/banner.js +0 -22
  915. package/dist/core/freedom/banner.js.map +0 -1
  916. package/dist/core/freedom/config.d.ts +0 -27
  917. package/dist/core/freedom/config.d.ts.map +0 -1
  918. package/dist/core/freedom/config.js +0 -216
  919. package/dist/core/freedom/config.js.map +0 -1
  920. package/dist/core/freedom/index.d.ts +0 -23
  921. package/dist/core/freedom/index.d.ts.map +0 -1
  922. package/dist/core/freedom/index.js +0 -19
  923. package/dist/core/freedom/index.js.map +0 -1
  924. package/dist/core/freedom/policy.d.ts +0 -42
  925. package/dist/core/freedom/policy.d.ts.map +0 -1
  926. package/dist/core/freedom/policy.js +0 -47
  927. package/dist/core/freedom/policy.js.map +0 -1
  928. package/dist/core/freedom/safety-floor.d.ts +0 -73
  929. package/dist/core/freedom/safety-floor.d.ts.map +0 -1
  930. package/dist/core/freedom/safety-floor.js +0 -275
  931. package/dist/core/freedom/safety-floor.js.map +0 -1
  932. package/dist/core/harness-control-events.d.ts +0 -91
  933. package/dist/core/harness-control-events.d.ts.map +0 -1
  934. package/dist/core/harness-control-events.js +0 -514
  935. package/dist/core/harness-control-events.js.map +0 -1
  936. package/dist/core/harness-control-replay.d.ts +0 -31
  937. package/dist/core/harness-control-replay.d.ts.map +0 -1
  938. package/dist/core/harness-control-replay.js +0 -187
  939. package/dist/core/harness-control-replay.js.map +0 -1
  940. package/dist/core/headroom-middleware.d.ts +0 -35
  941. package/dist/core/headroom-middleware.d.ts.map +0 -1
  942. package/dist/core/headroom-middleware.js +0 -166
  943. package/dist/core/headroom-middleware.js.map +0 -1
  944. package/dist/core/lean-context-middleware.d.ts +0 -12
  945. package/dist/core/lean-context-middleware.d.ts.map +0 -1
  946. package/dist/core/lean-context-middleware.js +0 -87
  947. package/dist/core/lean-context-middleware.js.map +0 -1
  948. package/dist/core/lean-context-policy.d.ts +0 -45
  949. package/dist/core/lean-context-policy.d.ts.map +0 -1
  950. package/dist/core/lean-context-policy.js +0 -108
  951. package/dist/core/lean-context-policy.js.map +0 -1
  952. package/dist/core/native-adoption-benchmark.d.ts +0 -166
  953. package/dist/core/native-adoption-benchmark.d.ts.map +0 -1
  954. package/dist/core/native-adoption-benchmark.js +0 -624
  955. package/dist/core/native-adoption-benchmark.js.map +0 -1
  956. package/dist/core/observability-trace.d.ts +0 -80
  957. package/dist/core/observability-trace.d.ts.map +0 -1
  958. package/dist/core/observability-trace.js +0 -140
  959. package/dist/core/observability-trace.js.map +0 -1
  960. package/dist/core/orchestration/checkpoint.d.ts +0 -83
  961. package/dist/core/orchestration/checkpoint.d.ts.map +0 -1
  962. package/dist/core/orchestration/checkpoint.js +0 -152
  963. package/dist/core/orchestration/checkpoint.js.map +0 -1
  964. package/dist/core/orchestration/errors.d.ts +0 -74
  965. package/dist/core/orchestration/errors.d.ts.map +0 -1
  966. package/dist/core/orchestration/errors.js +0 -52
  967. package/dist/core/orchestration/errors.js.map +0 -1
  968. package/dist/core/orchestration/merge-queue.d.ts +0 -121
  969. package/dist/core/orchestration/merge-queue.d.ts.map +0 -1
  970. package/dist/core/orchestration/merge-queue.js +0 -149
  971. package/dist/core/orchestration/merge-queue.js.map +0 -1
  972. package/dist/core/orchestration/recovery.d.ts +0 -106
  973. package/dist/core/orchestration/recovery.d.ts.map +0 -1
  974. package/dist/core/orchestration/recovery.js +0 -110
  975. package/dist/core/orchestration/recovery.js.map +0 -1
  976. package/dist/core/orchestration/replay-ledger.d.ts +0 -76
  977. package/dist/core/orchestration/replay-ledger.d.ts.map +0 -1
  978. package/dist/core/orchestration/replay-ledger.js +0 -395
  979. package/dist/core/orchestration/replay-ledger.js.map +0 -1
  980. package/dist/core/orchestration/scheduler-state.d.ts +0 -78
  981. package/dist/core/orchestration/scheduler-state.d.ts.map +0 -1
  982. package/dist/core/orchestration/scheduler-state.js +0 -185
  983. package/dist/core/orchestration/scheduler-state.js.map +0 -1
  984. package/dist/core/orchestration/scheduler-store.d.ts +0 -309
  985. package/dist/core/orchestration/scheduler-store.d.ts.map +0 -1
  986. package/dist/core/orchestration/scheduler-store.js +0 -368
  987. package/dist/core/orchestration/scheduler-store.js.map +0 -1
  988. package/dist/core/orchestration/sqlite-scheduler-store.d.ts +0 -57
  989. package/dist/core/orchestration/sqlite-scheduler-store.d.ts.map +0 -1
  990. package/dist/core/orchestration/sqlite-scheduler-store.js +0 -528
  991. package/dist/core/orchestration/sqlite-scheduler-store.js.map +0 -1
  992. package/dist/core/orchestration/transaction-coordinator.d.ts +0 -217
  993. package/dist/core/orchestration/transaction-coordinator.d.ts.map +0 -1
  994. package/dist/core/orchestration/transaction-coordinator.js +0 -281
  995. package/dist/core/orchestration/transaction-coordinator.js.map +0 -1
  996. package/dist/core/orchestration/verification-contract.d.ts +0 -197
  997. package/dist/core/orchestration/verification-contract.d.ts.map +0 -1
  998. package/dist/core/orchestration/verification-contract.js +0 -145
  999. package/dist/core/orchestration/verification-contract.js.map +0 -1
  1000. package/dist/core/package-composition.d.ts +0 -68
  1001. package/dist/core/package-composition.d.ts.map +0 -1
  1002. package/dist/core/package-composition.js +0 -304
  1003. package/dist/core/package-composition.js.map +0 -1
  1004. package/dist/core/package-trial-runtime.d.ts +0 -75
  1005. package/dist/core/package-trial-runtime.d.ts.map +0 -1
  1006. package/dist/core/package-trial-runtime.js +0 -73
  1007. package/dist/core/package-trial-runtime.js.map +0 -1
  1008. package/dist/core/package-trial-sandbox.d.ts +0 -27
  1009. package/dist/core/package-trial-sandbox.d.ts.map +0 -1
  1010. package/dist/core/package-trial-sandbox.js +0 -102
  1011. package/dist/core/package-trial-sandbox.js.map +0 -1
  1012. package/dist/core/policy-overlays-runtime.d.ts +0 -141
  1013. package/dist/core/policy-overlays-runtime.d.ts.map +0 -1
  1014. package/dist/core/policy-overlays-runtime.js +0 -720
  1015. package/dist/core/policy-overlays-runtime.js.map +0 -1
  1016. package/dist/core/read-anchor-registry.d.ts +0 -27
  1017. package/dist/core/read-anchor-registry.d.ts.map +0 -1
  1018. package/dist/core/read-anchor-registry.js +0 -103
  1019. package/dist/core/read-anchor-registry.js.map +0 -1
  1020. package/dist/core/read-content-cache.d.ts +0 -22
  1021. package/dist/core/read-content-cache.d.ts.map +0 -1
  1022. package/dist/core/read-content-cache.js +0 -79
  1023. package/dist/core/read-content-cache.js.map +0 -1
  1024. package/dist/core/session-digest.d.ts +0 -57
  1025. package/dist/core/session-digest.d.ts.map +0 -1
  1026. package/dist/core/session-digest.js +0 -193
  1027. package/dist/core/session-digest.js.map +0 -1
  1028. package/dist/core/spec-kit/compiler.d.ts +0 -67
  1029. package/dist/core/spec-kit/compiler.d.ts.map +0 -1
  1030. package/dist/core/spec-kit/compiler.js +0 -268
  1031. package/dist/core/spec-kit/compiler.js.map +0 -1
  1032. package/dist/core/transaction-coordinator.d.ts +0 -30
  1033. package/dist/core/transaction-coordinator.d.ts.map +0 -1
  1034. package/dist/core/transaction-coordinator.js +0 -173
  1035. package/dist/core/transaction-coordinator.js.map +0 -1
  1036. package/dist/modes/interactive/components/mcp-selector.d.ts +0 -30
  1037. package/dist/modes/interactive/components/mcp-selector.d.ts.map +0 -1
  1038. package/dist/modes/interactive/components/mcp-selector.js +0 -155
  1039. package/dist/modes/interactive/components/mcp-selector.js.map +0 -1
  1040. package/dist/modes/interactive/components/model-selector-state.d.ts +0 -101
  1041. package/dist/modes/interactive/components/model-selector-state.d.ts.map +0 -1
  1042. package/dist/modes/interactive/components/model-selector-state.js +0 -261
  1043. package/dist/modes/interactive/components/model-selector-state.js.map +0 -1
  1044. package/dist/modes/interactive/components/skills-selector.d.ts +0 -32
  1045. package/dist/modes/interactive/components/skills-selector.d.ts.map +0 -1
  1046. package/dist/modes/interactive/components/skills-selector.js +0 -130
  1047. package/dist/modes/interactive/components/skills-selector.js.map +0 -1
  1048. package/dist/modes/interactive/theme/omk-blackboard.json +0 -91
  1049. package/dist/modes/interactive/theme/omk-freedom-grid.json +0 -91
  1050. package/dist/modes/interactive/theme/omk-neon-ops.json +0 -90
  1051. package/dist/modes/interactive/theme/omk-slate-light.json +0 -91
  1052. package/examples/extensions/doom-overlay/doom/doomgeneric_pi.c +0 -72
  1053. package/node_modules/@earendil-works/omk-agent-core/README.md +0 -488
  1054. package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.d.ts +0 -24
  1055. package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.d.ts.map +0 -1
  1056. package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.js +0 -553
  1057. package/node_modules/@earendil-works/omk-agent-core/dist/agent-loop.js.map +0 -1
  1058. package/node_modules/@earendil-works/omk-agent-core/dist/agent.d.ts +0 -118
  1059. package/node_modules/@earendil-works/omk-agent-core/dist/agent.d.ts.map +0 -1
  1060. package/node_modules/@earendil-works/omk-agent-core/dist/agent.js +0 -402
  1061. package/node_modules/@earendil-works/omk-agent-core/dist/agent.js.map +0 -1
  1062. package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.d.ts +0 -95
  1063. package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.d.ts.map +0 -1
  1064. package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.js +0 -996
  1065. package/node_modules/@earendil-works/omk-agent-core/dist/harness/agent-harness.js.map +0 -1
  1066. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.d.ts +0 -53
  1067. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.d.ts.map +0 -1
  1068. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.js +0 -175
  1069. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/branch-summarization.js.map +0 -1
  1070. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.d.ts +0 -117
  1071. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.d.ts.map +0 -1
  1072. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.js +0 -568
  1073. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/compaction.js.map +0 -1
  1074. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.d.ts +0 -25
  1075. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.d.ts.map +0 -1
  1076. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.js +0 -131
  1077. package/node_modules/@earendil-works/omk-agent-core/dist/harness/compaction/utils.js.map +0 -1
  1078. package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.d.ts +0 -51
  1079. package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.d.ts.map +0 -1
  1080. package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.js +0 -510
  1081. package/node_modules/@earendil-works/omk-agent-core/dist/harness/env/nodejs.js.map +0 -1
  1082. package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.d.ts +0 -51
  1083. package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.d.ts.map +0 -1
  1084. package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.js +0 -102
  1085. package/node_modules/@earendil-works/omk-agent-core/dist/harness/messages.js.map +0 -1
  1086. package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.d.ts +0 -48
  1087. package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.d.ts.map +0 -1
  1088. package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.js +0 -230
  1089. package/node_modules/@earendil-works/omk-agent-core/dist/harness/prompt-templates.js.map +0 -1
  1090. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.d.ts +0 -26
  1091. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.d.ts.map +0 -1
  1092. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.js +0 -101
  1093. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-repo.js.map +0 -1
  1094. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.d.ts +0 -36
  1095. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.d.ts.map +0 -1
  1096. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.js +0 -273
  1097. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/jsonl-storage.js.map +0 -1
  1098. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.d.ts +0 -18
  1099. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.d.ts.map +0 -1
  1100. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.js +0 -42
  1101. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-repo.js.map +0 -1
  1102. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.d.ts +0 -25
  1103. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.d.ts.map +0 -1
  1104. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.js +0 -114
  1105. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/memory-storage.js.map +0 -1
  1106. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.d.ts +0 -11
  1107. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.d.ts.map +0 -1
  1108. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.js +0 -39
  1109. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/repo-utils.js.map +0 -1
  1110. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.d.ts +0 -33
  1111. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.d.ts.map +0 -1
  1112. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.js +0 -210
  1113. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/session.js.map +0 -1
  1114. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.d.ts +0 -2
  1115. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.d.ts.map +0 -1
  1116. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.js +0 -50
  1117. package/node_modules/@earendil-works/omk-agent-core/dist/harness/session/uuid.js.map +0 -1
  1118. package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.d.ts +0 -44
  1119. package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.d.ts.map +0 -1
  1120. package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.js +0 -311
  1121. package/node_modules/@earendil-works/omk-agent-core/dist/harness/skills.js.map +0 -1
  1122. package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.d.ts +0 -3
  1123. package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.d.ts.map +0 -1
  1124. package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.js +0 -30
  1125. package/node_modules/@earendil-works/omk-agent-core/dist/harness/system-prompt.js.map +0 -1
  1126. package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.d.ts +0 -616
  1127. package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.d.ts.map +0 -1
  1128. package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.js +0 -94
  1129. package/node_modules/@earendil-works/omk-agent-core/dist/harness/types.js.map +0 -1
  1130. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.d.ts +0 -14
  1131. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.d.ts.map +0 -1
  1132. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.js +0 -126
  1133. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/shell-output.js.map +0 -1
  1134. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.d.ts +0 -70
  1135. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.d.ts.map +0 -1
  1136. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.js +0 -297
  1137. package/node_modules/@earendil-works/omk-agent-core/dist/harness/utils/truncate.js.map +0 -1
  1138. package/node_modules/@earendil-works/omk-agent-core/dist/index.d.ts +0 -20
  1139. package/node_modules/@earendil-works/omk-agent-core/dist/index.d.ts.map +0 -1
  1140. package/node_modules/@earendil-works/omk-agent-core/dist/index.js +0 -25
  1141. package/node_modules/@earendil-works/omk-agent-core/dist/index.js.map +0 -1
  1142. package/node_modules/@earendil-works/omk-agent-core/dist/node.d.ts +0 -3
  1143. package/node_modules/@earendil-works/omk-agent-core/dist/node.d.ts.map +0 -1
  1144. package/node_modules/@earendil-works/omk-agent-core/dist/node.js +0 -3
  1145. package/node_modules/@earendil-works/omk-agent-core/dist/node.js.map +0 -1
  1146. package/node_modules/@earendil-works/omk-agent-core/dist/proxy.d.ts +0 -69
  1147. package/node_modules/@earendil-works/omk-agent-core/dist/proxy.d.ts.map +0 -1
  1148. package/node_modules/@earendil-works/omk-agent-core/dist/proxy.js +0 -278
  1149. package/node_modules/@earendil-works/omk-agent-core/dist/proxy.js.map +0 -1
  1150. package/node_modules/@earendil-works/omk-agent-core/dist/types.d.ts +0 -393
  1151. package/node_modules/@earendil-works/omk-agent-core/dist/types.d.ts.map +0 -1
  1152. package/node_modules/@earendil-works/omk-agent-core/dist/types.js +0 -2
  1153. package/node_modules/@earendil-works/omk-agent-core/dist/types.js.map +0 -1
  1154. package/node_modules/@earendil-works/omk-agent-core/package.json +0 -60
  1155. package/node_modules/@earendil-works/omk-ai/README.md +0 -1389
  1156. package/node_modules/@earendil-works/omk-ai/dist/api-registry.d.ts +0 -20
  1157. package/node_modules/@earendil-works/omk-ai/dist/api-registry.d.ts.map +0 -1
  1158. package/node_modules/@earendil-works/omk-ai/dist/api-registry.js +0 -44
  1159. package/node_modules/@earendil-works/omk-ai/dist/api-registry.js.map +0 -1
  1160. package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.d.ts +0 -5
  1161. package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.d.ts.map +0 -1
  1162. package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.js +0 -6
  1163. package/node_modules/@earendil-works/omk-ai/dist/bedrock-provider.js.map +0 -1
  1164. package/node_modules/@earendil-works/omk-ai/dist/cli.d.ts +0 -3
  1165. package/node_modules/@earendil-works/omk-ai/dist/cli.d.ts.map +0 -1
  1166. package/node_modules/@earendil-works/omk-ai/dist/cli.js +0 -130
  1167. package/node_modules/@earendil-works/omk-ai/dist/cli.js.map +0 -1
  1168. package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.d.ts +0 -20
  1169. package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.d.ts.map +0 -1
  1170. package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.js +0 -199
  1171. package/node_modules/@earendil-works/omk-ai/dist/env-api-keys.js.map +0 -1
  1172. package/node_modules/@earendil-works/omk-ai/dist/image-models.d.ts +0 -10
  1173. package/node_modules/@earendil-works/omk-ai/dist/image-models.d.ts.map +0 -1
  1174. package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.d.ts +0 -515
  1175. package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.d.ts.map +0 -1
  1176. package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.js +0 -517
  1177. package/node_modules/@earendil-works/omk-ai/dist/image-models.generated.js.map +0 -1
  1178. package/node_modules/@earendil-works/omk-ai/dist/image-models.js +0 -23
  1179. package/node_modules/@earendil-works/omk-ai/dist/image-models.js.map +0 -1
  1180. package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.d.ts +0 -14
  1181. package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.d.ts.map +0 -1
  1182. package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.js +0 -22
  1183. package/node_modules/@earendil-works/omk-ai/dist/images-api-registry.js.map +0 -1
  1184. package/node_modules/@earendil-works/omk-ai/dist/images.d.ts +0 -4
  1185. package/node_modules/@earendil-works/omk-ai/dist/images.d.ts.map +0 -1
  1186. package/node_modules/@earendil-works/omk-ai/dist/images.js +0 -16
  1187. package/node_modules/@earendil-works/omk-ai/dist/images.js.map +0 -1
  1188. package/node_modules/@earendil-works/omk-ai/dist/index.d.ts +0 -33
  1189. package/node_modules/@earendil-works/omk-ai/dist/index.d.ts.map +0 -1
  1190. package/node_modules/@earendil-works/omk-ai/dist/index.js +0 -21
  1191. package/node_modules/@earendil-works/omk-ai/dist/index.js.map +0 -1
  1192. package/node_modules/@earendil-works/omk-ai/dist/models.d.ts +0 -18
  1193. package/node_modules/@earendil-works/omk-ai/dist/models.d.ts.map +0 -1
  1194. package/node_modules/@earendil-works/omk-ai/dist/models.generated.d.ts +0 -18762
  1195. package/node_modules/@earendil-works/omk-ai/dist/models.generated.d.ts.map +0 -1
  1196. package/node_modules/@earendil-works/omk-ai/dist/models.generated.js +0 -17197
  1197. package/node_modules/@earendil-works/omk-ai/dist/models.generated.js.map +0 -1
  1198. package/node_modules/@earendil-works/omk-ai/dist/models.js +0 -78
  1199. package/node_modules/@earendil-works/omk-ai/dist/models.js.map +0 -1
  1200. package/node_modules/@earendil-works/omk-ai/dist/oauth.d.ts +0 -2
  1201. package/node_modules/@earendil-works/omk-ai/dist/oauth.d.ts.map +0 -1
  1202. package/node_modules/@earendil-works/omk-ai/dist/oauth.js +0 -2
  1203. package/node_modules/@earendil-works/omk-ai/dist/oauth.js.map +0 -1
  1204. package/node_modules/@earendil-works/omk-ai/dist/provider-network.d.ts +0 -39
  1205. package/node_modules/@earendil-works/omk-ai/dist/provider-network.d.ts.map +0 -1
  1206. package/node_modules/@earendil-works/omk-ai/dist/provider-network.js +0 -170
  1207. package/node_modules/@earendil-works/omk-ai/dist/provider-network.js.map +0 -1
  1208. package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.d.ts +0 -38
  1209. package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.d.ts.map +0 -1
  1210. package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.js +0 -826
  1211. package/node_modules/@earendil-works/omk-ai/dist/providers/amazon-bedrock.js.map +0 -1
  1212. package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.d.ts +0 -77
  1213. package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.d.ts.map +0 -1
  1214. package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.js +0 -1123
  1215. package/node_modules/@earendil-works/omk-ai/dist/providers/anthropic.js.map +0 -1
  1216. package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.d.ts +0 -15
  1217. package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.d.ts.map +0 -1
  1218. package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.js +0 -221
  1219. package/node_modules/@earendil-works/omk-ai/dist/providers/azure-openai-responses.js.map +0 -1
  1220. package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.d.ts +0 -13
  1221. package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.d.ts.map +0 -1
  1222. package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.js +0 -26
  1223. package/node_modules/@earendil-works/omk-ai/dist/providers/cloudflare.js.map +0 -1
  1224. package/node_modules/@earendil-works/omk-ai/dist/providers/faux.d.ts +0 -56
  1225. package/node_modules/@earendil-works/omk-ai/dist/providers/faux.d.ts.map +0 -1
  1226. package/node_modules/@earendil-works/omk-ai/dist/providers/faux.js +0 -368
  1227. package/node_modules/@earendil-works/omk-ai/dist/providers/faux.js.map +0 -1
  1228. package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.d.ts +0 -8
  1229. package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.d.ts.map +0 -1
  1230. package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.js +0 -29
  1231. package/node_modules/@earendil-works/omk-ai/dist/providers/github-copilot-headers.js.map +0 -1
  1232. package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.d.ts +0 -70
  1233. package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.d.ts.map +0 -1
  1234. package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.js +0 -331
  1235. package/node_modules/@earendil-works/omk-ai/dist/providers/google-shared.js.map +0 -1
  1236. package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.d.ts +0 -15
  1237. package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.d.ts.map +0 -1
  1238. package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.js +0 -442
  1239. package/node_modules/@earendil-works/omk-ai/dist/providers/google-vertex.js.map +0 -1
  1240. package/node_modules/@earendil-works/omk-ai/dist/providers/google.d.ts +0 -13
  1241. package/node_modules/@earendil-works/omk-ai/dist/providers/google.d.ts.map +0 -1
  1242. package/node_modules/@earendil-works/omk-ai/dist/providers/google.js +0 -402
  1243. package/node_modules/@earendil-works/omk-ai/dist/providers/google.js.map +0 -1
  1244. package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.d.ts +0 -3
  1245. package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.d.ts.map +0 -1
  1246. package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.js +0 -128
  1247. package/node_modules/@earendil-works/omk-ai/dist/providers/images/openrouter.js.map +0 -1
  1248. package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.d.ts +0 -4
  1249. package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.d.ts.map +0 -1
  1250. package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.js +0 -34
  1251. package/node_modules/@earendil-works/omk-ai/dist/providers/images/register-builtins.js.map +0 -1
  1252. package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.d.ts +0 -25
  1253. package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.d.ts.map +0 -1
  1254. package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.js +0 -534
  1255. package/node_modules/@earendil-works/omk-ai/dist/providers/mistral.js.map +0 -1
  1256. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.d.ts +0 -30
  1257. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.d.ts.map +0 -1
  1258. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.js +0 -1171
  1259. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-codex-responses.js.map +0 -1
  1260. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.d.ts +0 -19
  1261. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.d.ts.map +0 -1
  1262. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.js +0 -977
  1263. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-completions.js.map +0 -1
  1264. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.d.ts +0 -11
  1265. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.d.ts.map +0 -1
  1266. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.js +0 -22
  1267. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-prompt-cache.js.map +0 -1
  1268. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.d.ts +0 -18
  1269. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.d.ts.map +0 -1
  1270. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.js +0 -496
  1271. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses-shared.js.map +0 -1
  1272. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.d.ts +0 -13
  1273. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.d.ts.map +0 -1
  1274. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.js +0 -233
  1275. package/node_modules/@earendil-works/omk-ai/dist/providers/openai-responses.js.map +0 -1
  1276. package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.d.ts +0 -35
  1277. package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.d.ts.map +0 -1
  1278. package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.js +0 -254
  1279. package/node_modules/@earendil-works/omk-ai/dist/providers/register-builtins.js.map +0 -1
  1280. package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.d.ts +0 -8
  1281. package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.d.ts.map +0 -1
  1282. package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.js +0 -42
  1283. package/node_modules/@earendil-works/omk-ai/dist/providers/simple-options.js.map +0 -1
  1284. package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.d.ts +0 -13
  1285. package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.d.ts.map +0 -1
  1286. package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.js +0 -82
  1287. package/node_modules/@earendil-works/omk-ai/dist/providers/tool-schema.js.map +0 -1
  1288. package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.d.ts +0 -8
  1289. package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.d.ts.map +0 -1
  1290. package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.js +0 -184
  1291. package/node_modules/@earendil-works/omk-ai/dist/providers/transform-messages.js.map +0 -1
  1292. package/node_modules/@earendil-works/omk-ai/dist/session-resources.d.ts +0 -4
  1293. package/node_modules/@earendil-works/omk-ai/dist/session-resources.d.ts.map +0 -1
  1294. package/node_modules/@earendil-works/omk-ai/dist/session-resources.js +0 -22
  1295. package/node_modules/@earendil-works/omk-ai/dist/session-resources.js.map +0 -1
  1296. package/node_modules/@earendil-works/omk-ai/dist/stream.d.ts +0 -8
  1297. package/node_modules/@earendil-works/omk-ai/dist/stream.d.ts.map +0 -1
  1298. package/node_modules/@earendil-works/omk-ai/dist/stream.js +0 -77
  1299. package/node_modules/@earendil-works/omk-ai/dist/stream.js.map +0 -1
  1300. package/node_modules/@earendil-works/omk-ai/dist/types.d.ts +0 -570
  1301. package/node_modules/@earendil-works/omk-ai/dist/types.d.ts.map +0 -1
  1302. package/node_modules/@earendil-works/omk-ai/dist/types.js +0 -2
  1303. package/node_modules/@earendil-works/omk-ai/dist/types.js.map +0 -1
  1304. package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.d.ts +0 -6
  1305. package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.d.ts.map +0 -1
  1306. package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.js +0 -34
  1307. package/node_modules/@earendil-works/omk-ai/dist/utils/abort-signals.js.map +0 -1
  1308. package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.d.ts +0 -19
  1309. package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.d.ts.map +0 -1
  1310. package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.js +0 -25
  1311. package/node_modules/@earendil-works/omk-ai/dist/utils/diagnostics.js.map +0 -1
  1312. package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.d.ts +0 -21
  1313. package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.d.ts.map +0 -1
  1314. package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.js +0 -81
  1315. package/node_modules/@earendil-works/omk-ai/dist/utils/event-stream.js.map +0 -1
  1316. package/node_modules/@earendil-works/omk-ai/dist/utils/hash.d.ts +0 -3
  1317. package/node_modules/@earendil-works/omk-ai/dist/utils/hash.d.ts.map +0 -1
  1318. package/node_modules/@earendil-works/omk-ai/dist/utils/hash.js +0 -14
  1319. package/node_modules/@earendil-works/omk-ai/dist/utils/hash.js.map +0 -1
  1320. package/node_modules/@earendil-works/omk-ai/dist/utils/headers.d.ts +0 -2
  1321. package/node_modules/@earendil-works/omk-ai/dist/utils/headers.d.ts.map +0 -1
  1322. package/node_modules/@earendil-works/omk-ai/dist/utils/headers.js +0 -8
  1323. package/node_modules/@earendil-works/omk-ai/dist/utils/headers.js.map +0 -1
  1324. package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.d.ts +0 -16
  1325. package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.d.ts.map +0 -1
  1326. package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.js +0 -113
  1327. package/node_modules/@earendil-works/omk-ai/dist/utils/json-parse.js.map +0 -1
  1328. package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.d.ts +0 -10
  1329. package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.d.ts.map +0 -1
  1330. package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.js +0 -97
  1331. package/node_modules/@earendil-works/omk-ai/dist/utils/node-http-proxy.js.map +0 -1
  1332. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.d.ts +0 -25
  1333. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.d.ts.map +0 -1
  1334. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.js +0 -335
  1335. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/anthropic.js.map +0 -1
  1336. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.d.ts +0 -21
  1337. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.d.ts.map +0 -1
  1338. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.js +0 -56
  1339. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/device-code.js.map +0 -1
  1340. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.d.ts +0 -30
  1341. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.d.ts.map +0 -1
  1342. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.js +0 -280
  1343. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/github-copilot.js.map +0 -1
  1344. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.d.ts +0 -58
  1345. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.d.ts.map +0 -1
  1346. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.js +0 -122
  1347. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/index.js.map +0 -1
  1348. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.d.ts +0 -3
  1349. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.d.ts.map +0 -1
  1350. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.js +0 -105
  1351. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/oauth-page.js.map +0 -1
  1352. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.d.ts +0 -43
  1353. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.d.ts.map +0 -1
  1354. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.js +0 -487
  1355. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/openai-codex.js.map +0 -1
  1356. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.d.ts +0 -13
  1357. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.d.ts.map +0 -1
  1358. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.js +0 -31
  1359. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/pkce.js.map +0 -1
  1360. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.d.ts +0 -64
  1361. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.d.ts.map +0 -1
  1362. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.js +0 -2
  1363. package/node_modules/@earendil-works/omk-ai/dist/utils/oauth/types.js.map +0 -1
  1364. package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.d.ts +0 -57
  1365. package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.d.ts.map +0 -1
  1366. package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.js +0 -154
  1367. package/node_modules/@earendil-works/omk-ai/dist/utils/overflow.js.map +0 -1
  1368. package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.d.ts +0 -22
  1369. package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.d.ts.map +0 -1
  1370. package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.js +0 -26
  1371. package/node_modules/@earendil-works/omk-ai/dist/utils/sanitize-unicode.js.map +0 -1
  1372. package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.d.ts +0 -17
  1373. package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.d.ts.map +0 -1
  1374. package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.js +0 -21
  1375. package/node_modules/@earendil-works/omk-ai/dist/utils/typebox-helpers.js.map +0 -1
  1376. package/node_modules/@earendil-works/omk-ai/dist/utils/validation.d.ts +0 -18
  1377. package/node_modules/@earendil-works/omk-ai/dist/utils/validation.d.ts.map +0 -1
  1378. package/node_modules/@earendil-works/omk-ai/dist/utils/validation.js +0 -281
  1379. package/node_modules/@earendil-works/omk-ai/dist/utils/validation.js.map +0 -1
  1380. package/node_modules/@earendil-works/omk-ai/package.json +0 -106
  1381. package/node_modules/@earendil-works/omk-tui/README.md +0 -791
  1382. package/node_modules/@earendil-works/omk-tui/dist/autocomplete.d.ts +0 -54
  1383. package/node_modules/@earendil-works/omk-tui/dist/autocomplete.d.ts.map +0 -1
  1384. package/node_modules/@earendil-works/omk-tui/dist/autocomplete.js +0 -632
  1385. package/node_modules/@earendil-works/omk-tui/dist/autocomplete.js.map +0 -1
  1386. package/node_modules/@earendil-works/omk-tui/dist/components/box.d.ts +0 -22
  1387. package/node_modules/@earendil-works/omk-tui/dist/components/box.d.ts.map +0 -1
  1388. package/node_modules/@earendil-works/omk-tui/dist/components/box.js +0 -104
  1389. package/node_modules/@earendil-works/omk-tui/dist/components/box.js.map +0 -1
  1390. package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.d.ts +0 -22
  1391. package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.d.ts.map +0 -1
  1392. package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.js +0 -35
  1393. package/node_modules/@earendil-works/omk-tui/dist/components/cancellable-loader.js.map +0 -1
  1394. package/node_modules/@earendil-works/omk-tui/dist/components/editor.d.ts +0 -249
  1395. package/node_modules/@earendil-works/omk-tui/dist/components/editor.d.ts.map +0 -1
  1396. package/node_modules/@earendil-works/omk-tui/dist/components/editor.js +0 -1857
  1397. package/node_modules/@earendil-works/omk-tui/dist/components/editor.js.map +0 -1
  1398. package/node_modules/@earendil-works/omk-tui/dist/components/image.d.ts +0 -28
  1399. package/node_modules/@earendil-works/omk-tui/dist/components/image.d.ts.map +0 -1
  1400. package/node_modules/@earendil-works/omk-tui/dist/components/image.js +0 -89
  1401. package/node_modules/@earendil-works/omk-tui/dist/components/image.js.map +0 -1
  1402. package/node_modules/@earendil-works/omk-tui/dist/components/input.d.ts +0 -37
  1403. package/node_modules/@earendil-works/omk-tui/dist/components/input.d.ts.map +0 -1
  1404. package/node_modules/@earendil-works/omk-tui/dist/components/input.js +0 -378
  1405. package/node_modules/@earendil-works/omk-tui/dist/components/input.js.map +0 -1
  1406. package/node_modules/@earendil-works/omk-tui/dist/components/loader.d.ts +0 -31
  1407. package/node_modules/@earendil-works/omk-tui/dist/components/loader.d.ts.map +0 -1
  1408. package/node_modules/@earendil-works/omk-tui/dist/components/loader.js +0 -69
  1409. package/node_modules/@earendil-works/omk-tui/dist/components/loader.js.map +0 -1
  1410. package/node_modules/@earendil-works/omk-tui/dist/components/markdown.d.ts +0 -96
  1411. package/node_modules/@earendil-works/omk-tui/dist/components/markdown.d.ts.map +0 -1
  1412. package/node_modules/@earendil-works/omk-tui/dist/components/markdown.js +0 -644
  1413. package/node_modules/@earendil-works/omk-tui/dist/components/markdown.js.map +0 -1
  1414. package/node_modules/@earendil-works/omk-tui/dist/components/select-list.d.ts +0 -50
  1415. package/node_modules/@earendil-works/omk-tui/dist/components/select-list.d.ts.map +0 -1
  1416. package/node_modules/@earendil-works/omk-tui/dist/components/select-list.js +0 -159
  1417. package/node_modules/@earendil-works/omk-tui/dist/components/select-list.js.map +0 -1
  1418. package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.d.ts +0 -50
  1419. package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.d.ts.map +0 -1
  1420. package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.js +0 -185
  1421. package/node_modules/@earendil-works/omk-tui/dist/components/settings-list.js.map +0 -1
  1422. package/node_modules/@earendil-works/omk-tui/dist/components/spacer.d.ts +0 -12
  1423. package/node_modules/@earendil-works/omk-tui/dist/components/spacer.d.ts.map +0 -1
  1424. package/node_modules/@earendil-works/omk-tui/dist/components/spacer.js +0 -23
  1425. package/node_modules/@earendil-works/omk-tui/dist/components/spacer.js.map +0 -1
  1426. package/node_modules/@earendil-works/omk-tui/dist/components/text.d.ts +0 -19
  1427. package/node_modules/@earendil-works/omk-tui/dist/components/text.d.ts.map +0 -1
  1428. package/node_modules/@earendil-works/omk-tui/dist/components/text.js +0 -89
  1429. package/node_modules/@earendil-works/omk-tui/dist/components/text.js.map +0 -1
  1430. package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.d.ts +0 -13
  1431. package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.d.ts.map +0 -1
  1432. package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.js +0 -51
  1433. package/node_modules/@earendil-works/omk-tui/dist/components/truncated-text.js.map +0 -1
  1434. package/node_modules/@earendil-works/omk-tui/dist/editor-component.d.ts +0 -39
  1435. package/node_modules/@earendil-works/omk-tui/dist/editor-component.d.ts.map +0 -1
  1436. package/node_modules/@earendil-works/omk-tui/dist/editor-component.js +0 -2
  1437. package/node_modules/@earendil-works/omk-tui/dist/editor-component.js.map +0 -1
  1438. package/node_modules/@earendil-works/omk-tui/dist/fuzzy.d.ts +0 -16
  1439. package/node_modules/@earendil-works/omk-tui/dist/fuzzy.d.ts.map +0 -1
  1440. package/node_modules/@earendil-works/omk-tui/dist/fuzzy.js +0 -110
  1441. package/node_modules/@earendil-works/omk-tui/dist/fuzzy.js.map +0 -1
  1442. package/node_modules/@earendil-works/omk-tui/dist/index.d.ts +0 -23
  1443. package/node_modules/@earendil-works/omk-tui/dist/index.d.ts.map +0 -1
  1444. package/node_modules/@earendil-works/omk-tui/dist/index.js +0 -32
  1445. package/node_modules/@earendil-works/omk-tui/dist/index.js.map +0 -1
  1446. package/node_modules/@earendil-works/omk-tui/dist/keybindings.d.ts +0 -212
  1447. package/node_modules/@earendil-works/omk-tui/dist/keybindings.d.ts.map +0 -1
  1448. package/node_modules/@earendil-works/omk-tui/dist/keybindings.js +0 -252
  1449. package/node_modules/@earendil-works/omk-tui/dist/keybindings.js.map +0 -1
  1450. package/node_modules/@earendil-works/omk-tui/dist/keys.d.ts +0 -184
  1451. package/node_modules/@earendil-works/omk-tui/dist/keys.d.ts.map +0 -1
  1452. package/node_modules/@earendil-works/omk-tui/dist/keys.js +0 -1173
  1453. package/node_modules/@earendil-works/omk-tui/dist/keys.js.map +0 -1
  1454. package/node_modules/@earendil-works/omk-tui/dist/kill-ring.d.ts +0 -28
  1455. package/node_modules/@earendil-works/omk-tui/dist/kill-ring.d.ts.map +0 -1
  1456. package/node_modules/@earendil-works/omk-tui/dist/kill-ring.js +0 -44
  1457. package/node_modules/@earendil-works/omk-tui/dist/kill-ring.js.map +0 -1
  1458. package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.d.ts +0 -3
  1459. package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.d.ts.map +0 -1
  1460. package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.js +0 -53
  1461. package/node_modules/@earendil-works/omk-tui/dist/native-modifiers.js.map +0 -1
  1462. package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.d.ts +0 -50
  1463. package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.d.ts.map +0 -1
  1464. package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.js +0 -361
  1465. package/node_modules/@earendil-works/omk-tui/dist/stdin-buffer.js.map +0 -1
  1466. package/node_modules/@earendil-works/omk-tui/dist/terminal-image.d.ts +0 -90
  1467. package/node_modules/@earendil-works/omk-tui/dist/terminal-image.d.ts.map +0 -1
  1468. package/node_modules/@earendil-works/omk-tui/dist/terminal-image.js +0 -366
  1469. package/node_modules/@earendil-works/omk-tui/dist/terminal-image.js.map +0 -1
  1470. package/node_modules/@earendil-works/omk-tui/dist/terminal.d.ts +0 -113
  1471. package/node_modules/@earendil-works/omk-tui/dist/terminal.d.ts.map +0 -1
  1472. package/node_modules/@earendil-works/omk-tui/dist/terminal.js +0 -472
  1473. package/node_modules/@earendil-works/omk-tui/dist/terminal.js.map +0 -1
  1474. package/node_modules/@earendil-works/omk-tui/dist/tui.d.ts +0 -242
  1475. package/node_modules/@earendil-works/omk-tui/dist/tui.d.ts.map +0 -1
  1476. package/node_modules/@earendil-works/omk-tui/dist/tui.js +0 -1221
  1477. package/node_modules/@earendil-works/omk-tui/dist/tui.js.map +0 -1
  1478. package/node_modules/@earendil-works/omk-tui/dist/undo-stack.d.ts +0 -17
  1479. package/node_modules/@earendil-works/omk-tui/dist/undo-stack.d.ts.map +0 -1
  1480. package/node_modules/@earendil-works/omk-tui/dist/undo-stack.js +0 -25
  1481. package/node_modules/@earendil-works/omk-tui/dist/undo-stack.js.map +0 -1
  1482. package/node_modules/@earendil-works/omk-tui/dist/utils.d.ts +0 -84
  1483. package/node_modules/@earendil-works/omk-tui/dist/utils.d.ts.map +0 -1
  1484. package/node_modules/@earendil-works/omk-tui/dist/utils.js +0 -1032
  1485. package/node_modules/@earendil-works/omk-tui/dist/utils.js.map +0 -1
  1486. package/node_modules/@earendil-works/omk-tui/dist/word-navigation.d.ts +0 -25
  1487. package/node_modules/@earendil-works/omk-tui/dist/word-navigation.d.ts.map +0 -1
  1488. package/node_modules/@earendil-works/omk-tui/dist/word-navigation.js +0 -96
  1489. package/node_modules/@earendil-works/omk-tui/dist/word-navigation.js.map +0 -1
  1490. package/node_modules/@earendil-works/omk-tui/native/darwin/prebuilds/darwin-arm64/darwin-modifiers.node +0 -0
  1491. package/node_modules/@earendil-works/omk-tui/native/darwin/prebuilds/darwin-x64/darwin-modifiers.node +0 -0
  1492. package/node_modules/@earendil-works/omk-tui/native/win32/prebuilds/win32-arm64/win32-console-mode.node +0 -0
  1493. package/node_modules/@earendil-works/omk-tui/native/win32/prebuilds/win32-x64/win32-console-mode.node +0 -0
  1494. package/node_modules/@earendil-works/omk-tui/package.json +0 -47
@@ -1,19 +0,0 @@
1
- /**
2
- * Public surface for the OMK freedom-mode runtime.
3
- *
4
- * Tool dispatchers import `gate`. The interactive TUI imports `badgeText` and
5
- * `bannerOnce`. Subprocess spawners import `applyFreedomEnv`. Everything else
6
- * is implementation detail and stays inside this directory.
7
- *
8
- * Design: every doctrine clause from AGENTS.md §0 has exactly one owner here.
9
- * - §0.1 safety floor → safety-floor.ts (always-on, never downgradable)
10
- * - §0.2 defaults → config.ts (parsed from .omk/config.toml)
11
- * - §0.3 no moralizing → not enforced at runtime (system prompt only)
12
- * - banner & badge → banner.ts + policy.badgeText
13
- * - subprocess env → policy.applyFreedomEnv
14
- */
15
- export { bannerOnce } from "./banner.js";
16
- export { FREEDOM_CONFIG_DEFAULTS, FreedomConfigError, loadFreedomConfig, parseFreedomConfigFromString, } from "./config.js";
17
- export { applyFreedomEnv, badgeText, gate } from "./policy.js";
18
- export { redactSecrets, runSafetyFloor } from "./safety-floor.js";
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/freedom/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,OAAO,EACN,uBAAuB,EACvB,kBAAkB,EAClB,iBAAiB,EACjB,4BAA4B,GAC5B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * Public surface for the OMK freedom-mode runtime.\n *\n * Tool dispatchers import `gate`. The interactive TUI imports `badgeText` and\n * `bannerOnce`. Subprocess spawners import `applyFreedomEnv`. Everything else\n * is implementation detail and stays inside this directory.\n *\n * Design: every doctrine clause from AGENTS.md §0 has exactly one owner here.\n * - §0.1 safety floor → safety-floor.ts (always-on, never downgradable)\n * - §0.2 defaults → config.ts (parsed from .omk/config.toml)\n * - §0.3 no moralizing → not enforced at runtime (system prompt only)\n * - banner & badge → banner.ts + policy.badgeText\n * - subprocess env → policy.applyFreedomEnv\n */\n\nexport type { BannerMemo } from \"./banner.ts\";\nexport { bannerOnce } from \"./banner.ts\";\nexport type { ApprovalPolicy, FreedomConfig } from \"./config.ts\";\nexport {\n\tFREEDOM_CONFIG_DEFAULTS,\n\tFreedomConfigError,\n\tloadFreedomConfig,\n\tparseFreedomConfigFromString,\n} from \"./config.ts\";\nexport type { PolicyDecision, ToolCallContext } from \"./policy.ts\";\nexport { applyFreedomEnv, badgeText, gate } from \"./policy.ts\";\nexport type { MatcherVerdict } from \"./safety-floor.ts\";\nexport { redactSecrets, runSafetyFloor } from \"./safety-floor.ts\";\n"]}
@@ -1,42 +0,0 @@
1
- /**
2
- * Freedom-mode policy gate.
3
- *
4
- * The dispatcher wraps every tool call in `gate(call, cfg)`. Three outcomes:
5
- *
6
- * - `allow`: dispatcher runs the tool without an interactive prompt.
7
- * - `require-confirm`: dispatcher falls back to its existing confirm UI.
8
- * - `deny-hard`: dispatcher returns a FailClosedToolResult and never runs.
9
- *
10
- * The safety floor (`safety-floor.ts`) is always consulted first. Only when
11
- * the floor passes do we look at the approval policy from `.omk/config.toml`.
12
- * Freedom mode can flip the second decision (approval) but never the first
13
- * (safety floor), which matches AGENTS.md §0.1 ("non-negotiable").
14
- */
15
- import type { HookFailureCode } from "../hooks/types.ts";
16
- import type { FreedomConfig } from "./config.ts";
17
- import { type ToolCallContext } from "./safety-floor.ts";
18
- export type { ToolCallContext } from "./safety-floor.ts";
19
- export type PolicyDecision = {
20
- kind: "allow";
21
- } | {
22
- kind: "require-confirm";
23
- reason: string;
24
- } | {
25
- kind: "deny-hard";
26
- code: HookFailureCode;
27
- reason: string;
28
- };
29
- export declare function gate(call: ToolCallContext, cfg: FreedomConfig): PolicyDecision;
30
- /**
31
- * UI surface: returns a short badge string when freedom mode is on, otherwise
32
- * undefined. Used by the interactive footer.
33
- */
34
- export declare function badgeText(cfg: FreedomConfig): string | undefined;
35
- /**
36
- * Environment passthrough for child processes spawned under freedom mode.
37
- * Mirrors the legacy shell hook's exports for code that still reads them, but
38
- * never auto-sets the advanced flags (TOS bypass / dark-web crawl); those must
39
- * be enabled explicitly via a future [freedom.advanced] block.
40
- */
41
- export declare function applyFreedomEnv(env: NodeJS.ProcessEnv, cfg: FreedomConfig): NodeJS.ProcessEnv;
42
- //# sourceMappingURL=policy.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"policy.d.ts","sourceRoot":"","sources":["../../../src/core/freedom/policy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAkB,KAAK,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,cAAc,GACvB;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,GACjB;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhE,wBAAgB,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,EAAE,aAAa,GAAG,cAAc,CAiB9E;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAGhE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,GAAG,EAAE,aAAa,GAAG,MAAM,CAAC,UAAU,CAS7F","sourcesContent":["/**\n * Freedom-mode policy gate.\n *\n * The dispatcher wraps every tool call in `gate(call, cfg)`. Three outcomes:\n *\n * - `allow`: dispatcher runs the tool without an interactive prompt.\n * - `require-confirm`: dispatcher falls back to its existing confirm UI.\n * - `deny-hard`: dispatcher returns a FailClosedToolResult and never runs.\n *\n * The safety floor (`safety-floor.ts`) is always consulted first. Only when\n * the floor passes do we look at the approval policy from `.omk/config.toml`.\n * Freedom mode can flip the second decision (approval) but never the first\n * (safety floor), which matches AGENTS.md §0.1 (\"non-negotiable\").\n */\nimport type { HookFailureCode } from \"../hooks/types.ts\";\nimport type { FreedomConfig } from \"./config.ts\";\nimport { runSafetyFloor, type ToolCallContext } from \"./safety-floor.ts\";\n\nexport type { ToolCallContext } from \"./safety-floor.ts\";\n\nexport type PolicyDecision =\n\t| { kind: \"allow\" }\n\t| { kind: \"require-confirm\"; reason: string }\n\t| { kind: \"deny-hard\"; code: HookFailureCode; reason: string };\n\nexport function gate(call: ToolCallContext, cfg: FreedomConfig): PolicyDecision {\n\t// §0.1 floor first. The floor can hard-deny or upgrade to require-confirm\n\t// (privilege escalation). It never returns 'allow' on its own.\n\tconst floor = runSafetyFloor(call);\n\tif (floor.kind === \"deny-hard\") return floor;\n\tif (floor.kind === \"require-confirm\") return floor;\n\n\t// Floor passed. Now consult the approval policy.\n\tif (cfg.enabled && cfg.approvalPolicy === \"yolo\" && cfg.yoloMode) {\n\t\treturn { kind: \"allow\" };\n\t}\n\treturn {\n\t\tkind: \"require-confirm\",\n\t\treason: cfg.enabled\n\t\t\t? \"approval_policy is not 'yolo'; falling back to per-tool confirmation.\"\n\t\t\t: \"Freedom mode disabled; per-tool confirmation required.\",\n\t};\n}\n\n/**\n * UI surface: returns a short badge string when freedom mode is on, otherwise\n * undefined. Used by the interactive footer.\n */\nexport function badgeText(cfg: FreedomConfig): string | undefined {\n\tif (!cfg.enabled) return undefined;\n\treturn cfg.approvalPolicy === \"yolo\" && cfg.yoloMode ? \"freedom·yolo\" : \"freedom·prompt\";\n}\n\n/**\n * Environment passthrough for child processes spawned under freedom mode.\n * Mirrors the legacy shell hook's exports for code that still reads them, but\n * never auto-sets the advanced flags (TOS bypass / dark-web crawl); those must\n * be enabled explicitly via a future [freedom.advanced] block.\n */\nexport function applyFreedomEnv(env: NodeJS.ProcessEnv, cfg: FreedomConfig): NodeJS.ProcessEnv {\n\tif (!cfg.enabled) return env;\n\tconst out: NodeJS.ProcessEnv = { ...env };\n\tout.OMK_FREEDOM_MODE = \"true\";\n\tout.OMK_DOCTRINE_VERSION = cfg.doctrineVersion;\n\tif (cfg.approvalPolicy === \"yolo\" && cfg.yoloMode) {\n\t\tout.OMK_EXECUTE_ALL = \"true\";\n\t}\n\treturn out;\n}\n"]}
@@ -1,47 +0,0 @@
1
- import { runSafetyFloor } from "./safety-floor.js";
2
- export function gate(call, cfg) {
3
- // §0.1 floor first. The floor can hard-deny or upgrade to require-confirm
4
- // (privilege escalation). It never returns 'allow' on its own.
5
- const floor = runSafetyFloor(call);
6
- if (floor.kind === "deny-hard")
7
- return floor;
8
- if (floor.kind === "require-confirm")
9
- return floor;
10
- // Floor passed. Now consult the approval policy.
11
- if (cfg.enabled && cfg.approvalPolicy === "yolo" && cfg.yoloMode) {
12
- return { kind: "allow" };
13
- }
14
- return {
15
- kind: "require-confirm",
16
- reason: cfg.enabled
17
- ? "approval_policy is not 'yolo'; falling back to per-tool confirmation."
18
- : "Freedom mode disabled; per-tool confirmation required.",
19
- };
20
- }
21
- /**
22
- * UI surface: returns a short badge string when freedom mode is on, otherwise
23
- * undefined. Used by the interactive footer.
24
- */
25
- export function badgeText(cfg) {
26
- if (!cfg.enabled)
27
- return undefined;
28
- return cfg.approvalPolicy === "yolo" && cfg.yoloMode ? "freedom·yolo" : "freedom·prompt";
29
- }
30
- /**
31
- * Environment passthrough for child processes spawned under freedom mode.
32
- * Mirrors the legacy shell hook's exports for code that still reads them, but
33
- * never auto-sets the advanced flags (TOS bypass / dark-web crawl); those must
34
- * be enabled explicitly via a future [freedom.advanced] block.
35
- */
36
- export function applyFreedomEnv(env, cfg) {
37
- if (!cfg.enabled)
38
- return env;
39
- const out = { ...env };
40
- out.OMK_FREEDOM_MODE = "true";
41
- out.OMK_DOCTRINE_VERSION = cfg.doctrineVersion;
42
- if (cfg.approvalPolicy === "yolo" && cfg.yoloMode) {
43
- out.OMK_EXECUTE_ALL = "true";
44
- }
45
- return out;
46
- }
47
- //# sourceMappingURL=policy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"policy.js","sourceRoot":"","sources":["../../../src/core/freedom/policy.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAwB,MAAM,mBAAmB,CAAC;AASzE,MAAM,UAAU,IAAI,CAAC,IAAqB,EAAE,GAAkB,EAAkB;IAC/E,2EAA0E;IAC1E,+DAA+D;IAC/D,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,KAAK,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,KAAK,CAAC;IAC7C,IAAI,KAAK,CAAC,IAAI,KAAK,iBAAiB;QAAE,OAAO,KAAK,CAAC;IAEnD,iDAAiD;IACjD,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,cAAc,KAAK,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QAClE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;IAC1B,CAAC;IACD,OAAO;QACN,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,GAAG,CAAC,OAAO;YAClB,CAAC,CAAC,uEAAuE;YACzE,CAAC,CAAC,wDAAwD;KAC3D,CAAC;AAAA,CACF;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,GAAkB,EAAsB;IACjE,IAAI,CAAC,GAAG,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IACnC,OAAO,GAAG,CAAC,cAAc,KAAK,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,eAAc,CAAC,CAAC,CAAC,iBAAgB,CAAC;AAAA,CACzF;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAsB,EAAE,GAAkB,EAAqB;IAC9F,IAAI,CAAC,GAAG,CAAC,OAAO;QAAE,OAAO,GAAG,CAAC;IAC7B,MAAM,GAAG,GAAsB,EAAE,GAAG,GAAG,EAAE,CAAC;IAC1C,GAAG,CAAC,gBAAgB,GAAG,MAAM,CAAC;IAC9B,GAAG,CAAC,oBAAoB,GAAG,GAAG,CAAC,eAAe,CAAC;IAC/C,IAAI,GAAG,CAAC,cAAc,KAAK,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACnD,GAAG,CAAC,eAAe,GAAG,MAAM,CAAC;IAC9B,CAAC;IACD,OAAO,GAAG,CAAC;AAAA,CACX","sourcesContent":["/**\n * Freedom-mode policy gate.\n *\n * The dispatcher wraps every tool call in `gate(call, cfg)`. Three outcomes:\n *\n * - `allow`: dispatcher runs the tool without an interactive prompt.\n * - `require-confirm`: dispatcher falls back to its existing confirm UI.\n * - `deny-hard`: dispatcher returns a FailClosedToolResult and never runs.\n *\n * The safety floor (`safety-floor.ts`) is always consulted first. Only when\n * the floor passes do we look at the approval policy from `.omk/config.toml`.\n * Freedom mode can flip the second decision (approval) but never the first\n * (safety floor), which matches AGENTS.md §0.1 (\"non-negotiable\").\n */\nimport type { HookFailureCode } from \"../hooks/types.ts\";\nimport type { FreedomConfig } from \"./config.ts\";\nimport { runSafetyFloor, type ToolCallContext } from \"./safety-floor.ts\";\n\nexport type { ToolCallContext } from \"./safety-floor.ts\";\n\nexport type PolicyDecision =\n\t| { kind: \"allow\" }\n\t| { kind: \"require-confirm\"; reason: string }\n\t| { kind: \"deny-hard\"; code: HookFailureCode; reason: string };\n\nexport function gate(call: ToolCallContext, cfg: FreedomConfig): PolicyDecision {\n\t// §0.1 floor first. The floor can hard-deny or upgrade to require-confirm\n\t// (privilege escalation). It never returns 'allow' on its own.\n\tconst floor = runSafetyFloor(call);\n\tif (floor.kind === \"deny-hard\") return floor;\n\tif (floor.kind === \"require-confirm\") return floor;\n\n\t// Floor passed. Now consult the approval policy.\n\tif (cfg.enabled && cfg.approvalPolicy === \"yolo\" && cfg.yoloMode) {\n\t\treturn { kind: \"allow\" };\n\t}\n\treturn {\n\t\tkind: \"require-confirm\",\n\t\treason: cfg.enabled\n\t\t\t? \"approval_policy is not 'yolo'; falling back to per-tool confirmation.\"\n\t\t\t: \"Freedom mode disabled; per-tool confirmation required.\",\n\t};\n}\n\n/**\n * UI surface: returns a short badge string when freedom mode is on, otherwise\n * undefined. Used by the interactive footer.\n */\nexport function badgeText(cfg: FreedomConfig): string | undefined {\n\tif (!cfg.enabled) return undefined;\n\treturn cfg.approvalPolicy === \"yolo\" && cfg.yoloMode ? \"freedom·yolo\" : \"freedom·prompt\";\n}\n\n/**\n * Environment passthrough for child processes spawned under freedom mode.\n * Mirrors the legacy shell hook's exports for code that still reads them, but\n * never auto-sets the advanced flags (TOS bypass / dark-web crawl); those must\n * be enabled explicitly via a future [freedom.advanced] block.\n */\nexport function applyFreedomEnv(env: NodeJS.ProcessEnv, cfg: FreedomConfig): NodeJS.ProcessEnv {\n\tif (!cfg.enabled) return env;\n\tconst out: NodeJS.ProcessEnv = { ...env };\n\tout.OMK_FREEDOM_MODE = \"true\";\n\tout.OMK_DOCTRINE_VERSION = cfg.doctrineVersion;\n\tif (cfg.approvalPolicy === \"yolo\" && cfg.yoloMode) {\n\t\tout.OMK_EXECUTE_ALL = \"true\";\n\t}\n\treturn out;\n}\n"]}
@@ -1,73 +0,0 @@
1
- /**
2
- * Non-negotiable §0.1 safety floor matchers.
3
- *
4
- * These are deterministic, pure functions used by `policy.ts:gate()`. They
5
- * implement the four runtime-enforceable clauses from AGENTS.md §0.1:
6
- *
7
- * 1. Secrets must never be read, logged, or transmitted.
8
- * 2. Privilege escalation must require an explicit per-command user confirm.
9
- * 3. Filesystem-destructive commands at root or home are hard-denied.
10
- * 4. Tool calls must stay inside the lane grant's writeScope / executeScope.
11
- *
12
- * Clause 5 (§0.3 "no moralizing") is an LLM behavior clause and lives in the
13
- * orchestrator system prompt; there is no runtime matcher for it.
14
- *
15
- * Every matcher fails closed: if its internal regex throws, the call is
16
- * treated as a hard deny instead of an implicit allow. This is enforced by
17
- * the wrapper helpers in `policy.ts`, not here, so the matchers themselves
18
- * can stay tiny and testable.
19
- */
20
- import type { HookFailureCode } from "../hooks/types.ts";
21
- export interface ToolCallContext {
22
- tool: "bash" | "edit" | "write" | "read";
23
- args: {
24
- path?: string;
25
- command?: string;
26
- [key: string]: unknown;
27
- };
28
- laneGrant?: {
29
- writeScope?: readonly string[];
30
- executeScope?: readonly string[];
31
- };
32
- }
33
- export type MatcherVerdict = {
34
- kind: "pass";
35
- } | {
36
- kind: "require-confirm";
37
- reason: string;
38
- } | {
39
- kind: "deny-hard";
40
- code: HookFailureCode;
41
- reason: string;
42
- };
43
- /**
44
- * Clause 1 — secrets. Block reads/writes/edits targeting credential files.
45
- * Bash matchers check the command's argv for known credential paths too.
46
- */
47
- export declare function checkSecretsClause(call: ToolCallContext): MatcherVerdict;
48
- /**
49
- * Clause 2 — privilege escalation. Even under yolo mode, sudo/su require an
50
- * explicit confirm. Never auto-approved.
51
- */
52
- export declare function checkPrivilegeClause(call: ToolCallContext): MatcherVerdict;
53
- /**
54
- * Clause 3 — filesystem destruction. Hard deny. No override path.
55
- */
56
- export declare function checkFsDestructionClause(call: ToolCallContext): MatcherVerdict;
57
- /**
58
- * Clause 4 — scope. Edits/writes must land inside writeScope; bash must stay
59
- * inside executeScope when configured. Empty/undefined scope = no constraint
60
- * (e.g. local CLI usage without a lane grant).
61
- */
62
- export declare function checkScopeClause(call: ToolCallContext): MatcherVerdict;
63
- /**
64
- * Redact bearer tokens and other secret-looking substrings before any sink
65
- * (logger, audit event, tool result returned to the LLM).
66
- */
67
- export declare function redactSecrets(input: string): string;
68
- /**
69
- * Run every clause in order. First non-pass verdict wins; deny-hard beats
70
- * require-confirm in the rare case both fire (privilege + fs-destruction).
71
- */
72
- export declare function runSafetyFloor(call: ToolCallContext): MatcherVerdict;
73
- //# sourceMappingURL=safety-floor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safety-floor.d.ts","sourceRoot":"","sources":["../../../src/core/freedom/safety-floor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACzC,IAAI,EAAE;QACL,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;KACvB,CAAC;IACF,SAAS,CAAC,EAAE;QACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;QAC/B,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;KACjC,CAAC;CACF;AAED,MAAM,MAAM,cAAc,GACvB;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAChB;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,IAAI,EAAE,eAAe,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAgGhE;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAsBxE;AAuBD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAa1E;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAc9E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAiCtE;AAsBD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOnD;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,cAAc,CAiBpE","sourcesContent":["/**\n * Non-negotiable §0.1 safety floor matchers.\n *\n * These are deterministic, pure functions used by `policy.ts:gate()`. They\n * implement the four runtime-enforceable clauses from AGENTS.md §0.1:\n *\n * 1. Secrets must never be read, logged, or transmitted.\n * 2. Privilege escalation must require an explicit per-command user confirm.\n * 3. Filesystem-destructive commands at root or home are hard-denied.\n * 4. Tool calls must stay inside the lane grant's writeScope / executeScope.\n *\n * Clause 5 (§0.3 \"no moralizing\") is an LLM behavior clause and lives in the\n * orchestrator system prompt; there is no runtime matcher for it.\n *\n * Every matcher fails closed: if its internal regex throws, the call is\n * treated as a hard deny instead of an implicit allow. This is enforced by\n * the wrapper helpers in `policy.ts`, not here, so the matchers themselves\n * can stay tiny and testable.\n */\nimport type { HookFailureCode } from \"../hooks/types.ts\";\n\nexport interface ToolCallContext {\n\ttool: \"bash\" | \"edit\" | \"write\" | \"read\";\n\targs: {\n\t\tpath?: string;\n\t\tcommand?: string;\n\t\t[key: string]: unknown;\n\t};\n\tlaneGrant?: {\n\t\twriteScope?: readonly string[];\n\t\texecuteScope?: readonly string[];\n\t};\n}\n\nexport type MatcherVerdict =\n\t| { kind: \"pass\" }\n\t| { kind: \"require-confirm\"; reason: string }\n\t| { kind: \"deny-hard\"; code: HookFailureCode; reason: string };\n\nconst SECRET_PATH_PATTERNS: readonly RegExp[] = [\n\t/(^|\\/)\\.env(\\.|$)/i,\n\t/(^|\\/)\\.env$/i,\n\t/(^|\\/)auth\\.json$/i,\n\t/(^|\\/)\\.netrc$/i,\n\t/(^|\\/)\\.aws\\/credentials$/i,\n\t/(^|\\/)\\.ssh\\/(id_[a-z0-9]+|[a-z0-9_-]+_(rsa|ed25519|ecdsa|dsa))$/i,\n\t/\\.pem$/i,\n\t/\\.key$/i,\n\t/(^|\\/)[^/]*secret[^/]*$/i,\n\t/(^|\\/)[^/]*token[^/]*$/i,\n];\n\nconst SECRET_CONTENT_PATTERNS: readonly RegExp[] = [\n\t/npm_[A-Za-z0-9_-]{16,}/g,\n\t/\\bgh[pousr]_[A-Za-z0-9]{36}\\b/g,\n\t/\\bxox[bpars]-[A-Za-z0-9-]+\\b/g,\n\t/\\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\\b/g,\n\t/\\bAKIA[0-9A-Z]{16}\\b/g,\n];\n\nconst PRIVILEGE_ESCALATION_PATTERNS: readonly RegExp[] = [\n\t/^\\s*sudo(\\s|$)/,\n\t/^\\s*su(\\s|$)/,\n\t/(^|\\s|;|&&|\\|\\|)sudo\\s/,\n\t/(^|\\s|;|&&|\\|\\|)su\\s/,\n\t/(^|\\s)doas(\\s|$)/,\n\t/chmod\\s+[ug]\\+s\\b/,\n\t/\\bsetcap\\s/,\n];\n\nconst FS_DESTRUCTION_PATTERNS: readonly RegExp[] = [\n\t/\\brm\\s+(-[a-zA-Z]*[rRfF][a-zA-Z]*\\s+)+(\\/|~|\\$HOME|\"\\/\"|'\\/')(\\s|$)/,\n\t/\\bmkfs(\\.\\w+)?\\s/,\n\t/\\bdd\\b[^|;&]*\\bof=\\/dev\\//,\n\t/:\\(\\)\\s*\\{\\s*:\\s*\\|\\s*:\\s*&\\s*\\}\\s*;\\s*:/,\n\t/\\bchmod\\s+-R\\s+0+\\s+\\/(\\s|$)/,\n];\n\nconst REDACTION_PLACEHOLDER = \"***REDACTED***\";\n\nfunction normalizePath(input: string): string {\n\treturn input.replace(/\\\\/g, \"/\");\n}\n\nfunction basename(input: string): string {\n\tconst normalized = normalizePath(input);\n\tconst idx = normalized.lastIndexOf(\"/\");\n\treturn idx >= 0 ? normalized.slice(idx + 1) : normalized;\n}\n\nfunction matchesAnyGlob(path: string, scope: readonly string[]): boolean {\n\tif (scope.length === 0) return false;\n\tconst normalized = normalizePath(path);\n\tfor (const glob of scope) {\n\t\tconst re = globToRegex(glob);\n\t\tif (re.test(normalized)) return true;\n\t}\n\treturn false;\n}\n\nfunction globToRegex(glob: string): RegExp {\n\t// Minimal glob: ** -> .*, * -> [^/]*, ? -> [^/]. Other regex metachars escaped.\n\tconst normalized = normalizePath(glob);\n\tlet pattern = \"\";\n\tlet i = 0;\n\twhile (i < normalized.length) {\n\t\tconst c = normalized[i];\n\t\tif (c === \"*\" && normalized[i + 1] === \"*\") {\n\t\t\tpattern += \".*\";\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c === \"*\") {\n\t\t\tpattern += \"[^/]*\";\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c === \"?\") {\n\t\t\tpattern += \"[^/]\";\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (/[.+^${}()|[\\]\\\\]/.test(c)) {\n\t\t\tpattern += `\\\\${c}`;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tpattern += c;\n\t\ti += 1;\n\t}\n\treturn new RegExp(`^${pattern}$`);\n}\n\n/**\n * Clause 1 — secrets. Block reads/writes/edits targeting credential files.\n * Bash matchers check the command's argv for known credential paths too.\n */\nexport function checkSecretsClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool === \"read\" || call.tool === \"edit\" || call.tool === \"write\") {\n\t\tconst path = typeof call.args.path === \"string\" ? call.args.path : \"\";\n\t\tif (path && pathLooksLikeSecret(path)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: `Secrets clause blocks ${call.tool} on '${path}'.`,\n\t\t\t};\n\t\t}\n\t}\n\tif (call.tool === \"bash\") {\n\t\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\t\tif (cmd && bashTouchesSecret(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: \"Secrets clause blocks bash command that reads a credential file.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\nfunction pathLooksLikeSecret(path: string): boolean {\n\tconst normalized = normalizePath(path);\n\tconst base = basename(normalized);\n\tfor (const re of SECRET_PATH_PATTERNS) {\n\t\tif (re.test(normalized) || re.test(base)) return true;\n\t}\n\treturn false;\n}\n\nfunction bashTouchesSecret(cmd: string): boolean {\n\t// Catch the obvious cat / cp / mv / less / head / tail / source <secret-path>.\n\tconst readVerbs = /\\b(cat|less|more|head|tail|tac|nl|od|hexdump|xxd|cp|mv|source|\\.)\\b\\s+([^\\s|;&<>]+)/g;\n\tlet match: RegExpExecArray | null = readVerbs.exec(cmd);\n\twhile (match !== null) {\n\t\tconst target = match[2];\n\t\tif (target && pathLooksLikeSecret(target)) return true;\n\t\tmatch = readVerbs.exec(cmd);\n\t}\n\treturn false;\n}\n\n/**\n * Clause 2 — privilege escalation. Even under yolo mode, sudo/su require an\n * explicit confirm. Never auto-approved.\n */\nexport function checkPrivilegeClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool !== \"bash\") return { kind: \"pass\" };\n\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\tif (!cmd) return { kind: \"pass\" };\n\tfor (const re of PRIVILEGE_ESCALATION_PATTERNS) {\n\t\tif (re.test(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"require-confirm\",\n\t\t\t\treason: \"Privilege escalation requires explicit confirmation under §0.1.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\n/**\n * Clause 3 — filesystem destruction. Hard deny. No override path.\n */\nexport function checkFsDestructionClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool !== \"bash\") return { kind: \"pass\" };\n\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\tif (!cmd) return { kind: \"pass\" };\n\tfor (const re of FS_DESTRUCTION_PATTERNS) {\n\t\tif (re.test(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: \"Filesystem-destructive command is blocked by §0.1.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\n/**\n * Clause 4 — scope. Edits/writes must land inside writeScope; bash must stay\n * inside executeScope when configured. Empty/undefined scope = no constraint\n * (e.g. local CLI usage without a lane grant).\n */\nexport function checkScopeClause(call: ToolCallContext): MatcherVerdict {\n\tconst grant = call.laneGrant;\n\tif (!grant) return { kind: \"pass\" };\n\tif (call.tool === \"write\" || call.tool === \"edit\") {\n\t\tconst writeScope = grant.writeScope;\n\t\tif (writeScope && writeScope.length > 0) {\n\t\t\tconst path = typeof call.args.path === \"string\" ? call.args.path : \"\";\n\t\t\tif (path && !matchesAnyGlob(path, writeScope)) {\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"deny-hard\",\n\t\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\t\treason: `Path '${path}' is outside writeScope.`,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\tif (call.tool === \"bash\") {\n\t\tconst executeScope = grant.executeScope;\n\t\tif (executeScope && executeScope.length > 0) {\n\t\t\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\t\t\tconst touched = extractMutatingTargets(cmd);\n\t\t\tfor (const target of touched) {\n\t\t\t\tif (!matchesAnyGlob(target, executeScope)) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkind: \"deny-hard\",\n\t\t\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\t\t\treason: `Bash mutates '${target}' outside executeScope.`,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\nfunction extractMutatingTargets(cmd: string): string[] {\n\t// Heuristic: top-level >, >>, tee target; ignore quoted forms inside strings.\n\tconst targets: string[] = [];\n\tconst redirectRe = />>?\\s*([^\\s|;&<>'\"]+)/g;\n\tlet m: RegExpExecArray | null = redirectRe.exec(cmd);\n\twhile (m !== null) {\n\t\tconst t = m[1];\n\t\tif (t && t !== \"/dev/null\") targets.push(t);\n\t\tm = redirectRe.exec(cmd);\n\t}\n\tconst teeRe = /\\btee\\s+(?:-a\\s+)?([^\\s|;&<>'\"]+)/g;\n\tm = teeRe.exec(cmd);\n\twhile (m !== null) {\n\t\tconst t = m[1];\n\t\tif (t) targets.push(t);\n\t\tm = teeRe.exec(cmd);\n\t}\n\treturn targets;\n}\n\n/**\n * Redact bearer tokens and other secret-looking substrings before any sink\n * (logger, audit event, tool result returned to the LLM).\n */\nexport function redactSecrets(input: string): string {\n\tif (!input) return input;\n\tlet out = input;\n\tfor (const re of SECRET_CONTENT_PATTERNS) {\n\t\tout = out.replace(re, REDACTION_PLACEHOLDER);\n\t}\n\treturn out;\n}\n\n/**\n * Run every clause in order. First non-pass verdict wins; deny-hard beats\n * require-confirm in the rare case both fire (privilege + fs-destruction).\n */\nexport function runSafetyFloor(call: ToolCallContext): MatcherVerdict {\n\tconst checks = [checkSecretsClause, checkFsDestructionClause, checkScopeClause, checkPrivilegeClause];\n\tlet firstConfirm: MatcherVerdict | null = null;\n\tfor (const check of checks) {\n\t\ttry {\n\t\t\tconst verdict = check(call);\n\t\t\tif (verdict.kind === \"deny-hard\") return verdict;\n\t\t\tif (verdict.kind === \"require-confirm\" && !firstConfirm) firstConfirm = verdict;\n\t\t} catch (error) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_failed\",\n\t\t\t\treason: `Safety floor matcher threw: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t};\n\t\t}\n\t}\n\treturn firstConfirm ?? { kind: \"pass\" };\n}\n"]}
@@ -1,275 +0,0 @@
1
- const SECRET_PATH_PATTERNS = [
2
- /(^|\/)\.env(\.|$)/i,
3
- /(^|\/)\.env$/i,
4
- /(^|\/)auth\.json$/i,
5
- /(^|\/)\.netrc$/i,
6
- /(^|\/)\.aws\/credentials$/i,
7
- /(^|\/)\.ssh\/(id_[a-z0-9]+|[a-z0-9_-]+_(rsa|ed25519|ecdsa|dsa))$/i,
8
- /\.pem$/i,
9
- /\.key$/i,
10
- /(^|\/)[^/]*secret[^/]*$/i,
11
- /(^|\/)[^/]*token[^/]*$/i,
12
- ];
13
- const SECRET_CONTENT_PATTERNS = [
14
- /npm_[A-Za-z0-9_-]{16,}/g,
15
- /\bgh[pousr]_[A-Za-z0-9]{36}\b/g,
16
- /\bxox[bpars]-[A-Za-z0-9-]+\b/g,
17
- /\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\b/g,
18
- /\bAKIA[0-9A-Z]{16}\b/g,
19
- ];
20
- const PRIVILEGE_ESCALATION_PATTERNS = [
21
- /^\s*sudo(\s|$)/,
22
- /^\s*su(\s|$)/,
23
- /(^|\s|;|&&|\|\|)sudo\s/,
24
- /(^|\s|;|&&|\|\|)su\s/,
25
- /(^|\s)doas(\s|$)/,
26
- /chmod\s+[ug]\+s\b/,
27
- /\bsetcap\s/,
28
- ];
29
- const FS_DESTRUCTION_PATTERNS = [
30
- /\brm\s+(-[a-zA-Z]*[rRfF][a-zA-Z]*\s+)+(\/|~|\$HOME|"\/"|'\/')(\s|$)/,
31
- /\bmkfs(\.\w+)?\s/,
32
- /\bdd\b[^|;&]*\bof=\/dev\//,
33
- /:\(\)\s*\{\s*:\s*\|\s*:\s*&\s*\}\s*;\s*:/,
34
- /\bchmod\s+-R\s+0+\s+\/(\s|$)/,
35
- ];
36
- const REDACTION_PLACEHOLDER = "***REDACTED***";
37
- function normalizePath(input) {
38
- return input.replace(/\\/g, "/");
39
- }
40
- function basename(input) {
41
- const normalized = normalizePath(input);
42
- const idx = normalized.lastIndexOf("/");
43
- return idx >= 0 ? normalized.slice(idx + 1) : normalized;
44
- }
45
- function matchesAnyGlob(path, scope) {
46
- if (scope.length === 0)
47
- return false;
48
- const normalized = normalizePath(path);
49
- for (const glob of scope) {
50
- const re = globToRegex(glob);
51
- if (re.test(normalized))
52
- return true;
53
- }
54
- return false;
55
- }
56
- function globToRegex(glob) {
57
- // Minimal glob: ** -> .*, * -> [^/]*, ? -> [^/]. Other regex metachars escaped.
58
- const normalized = normalizePath(glob);
59
- let pattern = "";
60
- let i = 0;
61
- while (i < normalized.length) {
62
- const c = normalized[i];
63
- if (c === "*" && normalized[i + 1] === "*") {
64
- pattern += ".*";
65
- i += 2;
66
- continue;
67
- }
68
- if (c === "*") {
69
- pattern += "[^/]*";
70
- i += 1;
71
- continue;
72
- }
73
- if (c === "?") {
74
- pattern += "[^/]";
75
- i += 1;
76
- continue;
77
- }
78
- if (/[.+^${}()|[\]\\]/.test(c)) {
79
- pattern += `\\${c}`;
80
- i += 1;
81
- continue;
82
- }
83
- pattern += c;
84
- i += 1;
85
- }
86
- return new RegExp(`^${pattern}$`);
87
- }
88
- /**
89
- * Clause 1 — secrets. Block reads/writes/edits targeting credential files.
90
- * Bash matchers check the command's argv for known credential paths too.
91
- */
92
- export function checkSecretsClause(call) {
93
- if (call.tool === "read" || call.tool === "edit" || call.tool === "write") {
94
- const path = typeof call.args.path === "string" ? call.args.path : "";
95
- if (path && pathLooksLikeSecret(path)) {
96
- return {
97
- kind: "deny-hard",
98
- code: "hook_rejected",
99
- reason: `Secrets clause blocks ${call.tool} on '${path}'.`,
100
- };
101
- }
102
- }
103
- if (call.tool === "bash") {
104
- const cmd = typeof call.args.command === "string" ? call.args.command : "";
105
- if (cmd && bashTouchesSecret(cmd)) {
106
- return {
107
- kind: "deny-hard",
108
- code: "hook_rejected",
109
- reason: "Secrets clause blocks bash command that reads a credential file.",
110
- };
111
- }
112
- }
113
- return { kind: "pass" };
114
- }
115
- function pathLooksLikeSecret(path) {
116
- const normalized = normalizePath(path);
117
- const base = basename(normalized);
118
- for (const re of SECRET_PATH_PATTERNS) {
119
- if (re.test(normalized) || re.test(base))
120
- return true;
121
- }
122
- return false;
123
- }
124
- function bashTouchesSecret(cmd) {
125
- // Catch the obvious cat / cp / mv / less / head / tail / source <secret-path>.
126
- const readVerbs = /\b(cat|less|more|head|tail|tac|nl|od|hexdump|xxd|cp|mv|source|\.)\b\s+([^\s|;&<>]+)/g;
127
- let match = readVerbs.exec(cmd);
128
- while (match !== null) {
129
- const target = match[2];
130
- if (target && pathLooksLikeSecret(target))
131
- return true;
132
- match = readVerbs.exec(cmd);
133
- }
134
- return false;
135
- }
136
- /**
137
- * Clause 2 — privilege escalation. Even under yolo mode, sudo/su require an
138
- * explicit confirm. Never auto-approved.
139
- */
140
- export function checkPrivilegeClause(call) {
141
- if (call.tool !== "bash")
142
- return { kind: "pass" };
143
- const cmd = typeof call.args.command === "string" ? call.args.command : "";
144
- if (!cmd)
145
- return { kind: "pass" };
146
- for (const re of PRIVILEGE_ESCALATION_PATTERNS) {
147
- if (re.test(cmd)) {
148
- return {
149
- kind: "require-confirm",
150
- reason: "Privilege escalation requires explicit confirmation under §0.1.",
151
- };
152
- }
153
- }
154
- return { kind: "pass" };
155
- }
156
- /**
157
- * Clause 3 — filesystem destruction. Hard deny. No override path.
158
- */
159
- export function checkFsDestructionClause(call) {
160
- if (call.tool !== "bash")
161
- return { kind: "pass" };
162
- const cmd = typeof call.args.command === "string" ? call.args.command : "";
163
- if (!cmd)
164
- return { kind: "pass" };
165
- for (const re of FS_DESTRUCTION_PATTERNS) {
166
- if (re.test(cmd)) {
167
- return {
168
- kind: "deny-hard",
169
- code: "hook_rejected",
170
- reason: "Filesystem-destructive command is blocked by §0.1.",
171
- };
172
- }
173
- }
174
- return { kind: "pass" };
175
- }
176
- /**
177
- * Clause 4 — scope. Edits/writes must land inside writeScope; bash must stay
178
- * inside executeScope when configured. Empty/undefined scope = no constraint
179
- * (e.g. local CLI usage without a lane grant).
180
- */
181
- export function checkScopeClause(call) {
182
- const grant = call.laneGrant;
183
- if (!grant)
184
- return { kind: "pass" };
185
- if (call.tool === "write" || call.tool === "edit") {
186
- const writeScope = grant.writeScope;
187
- if (writeScope && writeScope.length > 0) {
188
- const path = typeof call.args.path === "string" ? call.args.path : "";
189
- if (path && !matchesAnyGlob(path, writeScope)) {
190
- return {
191
- kind: "deny-hard",
192
- code: "hook_rejected",
193
- reason: `Path '${path}' is outside writeScope.`,
194
- };
195
- }
196
- }
197
- }
198
- if (call.tool === "bash") {
199
- const executeScope = grant.executeScope;
200
- if (executeScope && executeScope.length > 0) {
201
- const cmd = typeof call.args.command === "string" ? call.args.command : "";
202
- const touched = extractMutatingTargets(cmd);
203
- for (const target of touched) {
204
- if (!matchesAnyGlob(target, executeScope)) {
205
- return {
206
- kind: "deny-hard",
207
- code: "hook_rejected",
208
- reason: `Bash mutates '${target}' outside executeScope.`,
209
- };
210
- }
211
- }
212
- }
213
- }
214
- return { kind: "pass" };
215
- }
216
- function extractMutatingTargets(cmd) {
217
- // Heuristic: top-level >, >>, tee target; ignore quoted forms inside strings.
218
- const targets = [];
219
- const redirectRe = />>?\s*([^\s|;&<>'"]+)/g;
220
- let m = redirectRe.exec(cmd);
221
- while (m !== null) {
222
- const t = m[1];
223
- if (t && t !== "/dev/null")
224
- targets.push(t);
225
- m = redirectRe.exec(cmd);
226
- }
227
- const teeRe = /\btee\s+(?:-a\s+)?([^\s|;&<>'"]+)/g;
228
- m = teeRe.exec(cmd);
229
- while (m !== null) {
230
- const t = m[1];
231
- if (t)
232
- targets.push(t);
233
- m = teeRe.exec(cmd);
234
- }
235
- return targets;
236
- }
237
- /**
238
- * Redact bearer tokens and other secret-looking substrings before any sink
239
- * (logger, audit event, tool result returned to the LLM).
240
- */
241
- export function redactSecrets(input) {
242
- if (!input)
243
- return input;
244
- let out = input;
245
- for (const re of SECRET_CONTENT_PATTERNS) {
246
- out = out.replace(re, REDACTION_PLACEHOLDER);
247
- }
248
- return out;
249
- }
250
- /**
251
- * Run every clause in order. First non-pass verdict wins; deny-hard beats
252
- * require-confirm in the rare case both fire (privilege + fs-destruction).
253
- */
254
- export function runSafetyFloor(call) {
255
- const checks = [checkSecretsClause, checkFsDestructionClause, checkScopeClause, checkPrivilegeClause];
256
- let firstConfirm = null;
257
- for (const check of checks) {
258
- try {
259
- const verdict = check(call);
260
- if (verdict.kind === "deny-hard")
261
- return verdict;
262
- if (verdict.kind === "require-confirm" && !firstConfirm)
263
- firstConfirm = verdict;
264
- }
265
- catch (error) {
266
- return {
267
- kind: "deny-hard",
268
- code: "hook_failed",
269
- reason: `Safety floor matcher threw: ${error instanceof Error ? error.message : String(error)}`,
270
- };
271
- }
272
- }
273
- return firstConfirm ?? { kind: "pass" };
274
- }
275
- //# sourceMappingURL=safety-floor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"safety-floor.js","sourceRoot":"","sources":["../../../src/core/freedom/safety-floor.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Non-negotiable §0.1 safety floor matchers.\n *\n * These are deterministic, pure functions used by `policy.ts:gate()`. They\n * implement the four runtime-enforceable clauses from AGENTS.md §0.1:\n *\n * 1. Secrets must never be read, logged, or transmitted.\n * 2. Privilege escalation must require an explicit per-command user confirm.\n * 3. Filesystem-destructive commands at root or home are hard-denied.\n * 4. Tool calls must stay inside the lane grant's writeScope / executeScope.\n *\n * Clause 5 (§0.3 \"no moralizing\") is an LLM behavior clause and lives in the\n * orchestrator system prompt; there is no runtime matcher for it.\n *\n * Every matcher fails closed: if its internal regex throws, the call is\n * treated as a hard deny instead of an implicit allow. This is enforced by\n * the wrapper helpers in `policy.ts`, not here, so the matchers themselves\n * can stay tiny and testable.\n */\nimport type { HookFailureCode } from \"../hooks/types.ts\";\n\nexport interface ToolCallContext {\n\ttool: \"bash\" | \"edit\" | \"write\" | \"read\";\n\targs: {\n\t\tpath?: string;\n\t\tcommand?: string;\n\t\t[key: string]: unknown;\n\t};\n\tlaneGrant?: {\n\t\twriteScope?: readonly string[];\n\t\texecuteScope?: readonly string[];\n\t};\n}\n\nexport type MatcherVerdict =\n\t| { kind: \"pass\" }\n\t| { kind: \"require-confirm\"; reason: string }\n\t| { kind: \"deny-hard\"; code: HookFailureCode; reason: string };\n\nconst SECRET_PATH_PATTERNS: readonly RegExp[] = [\n\t/(^|\\/)\\.env(\\.|$)/i,\n\t/(^|\\/)\\.env$/i,\n\t/(^|\\/)auth\\.json$/i,\n\t/(^|\\/)\\.netrc$/i,\n\t/(^|\\/)\\.aws\\/credentials$/i,\n\t/(^|\\/)\\.ssh\\/(id_[a-z0-9]+|[a-z0-9_-]+_(rsa|ed25519|ecdsa|dsa))$/i,\n\t/\\.pem$/i,\n\t/\\.key$/i,\n\t/(^|\\/)[^/]*secret[^/]*$/i,\n\t/(^|\\/)[^/]*token[^/]*$/i,\n];\n\nconst SECRET_CONTENT_PATTERNS: readonly RegExp[] = [\n\t/npm_[A-Za-z0-9_-]{16,}/g,\n\t/\\bgh[pousr]_[A-Za-z0-9]{36}\\b/g,\n\t/\\bxox[bpars]-[A-Za-z0-9-]+\\b/g,\n\t/\\bsk-(?:proj-)?[A-Za-z0-9_-]{20,}\\b/g,\n\t/\\bAKIA[0-9A-Z]{16}\\b/g,\n];\n\nconst PRIVILEGE_ESCALATION_PATTERNS: readonly RegExp[] = [\n\t/^\\s*sudo(\\s|$)/,\n\t/^\\s*su(\\s|$)/,\n\t/(^|\\s|;|&&|\\|\\|)sudo\\s/,\n\t/(^|\\s|;|&&|\\|\\|)su\\s/,\n\t/(^|\\s)doas(\\s|$)/,\n\t/chmod\\s+[ug]\\+s\\b/,\n\t/\\bsetcap\\s/,\n];\n\nconst FS_DESTRUCTION_PATTERNS: readonly RegExp[] = [\n\t/\\brm\\s+(-[a-zA-Z]*[rRfF][a-zA-Z]*\\s+)+(\\/|~|\\$HOME|\"\\/\"|'\\/')(\\s|$)/,\n\t/\\bmkfs(\\.\\w+)?\\s/,\n\t/\\bdd\\b[^|;&]*\\bof=\\/dev\\//,\n\t/:\\(\\)\\s*\\{\\s*:\\s*\\|\\s*:\\s*&\\s*\\}\\s*;\\s*:/,\n\t/\\bchmod\\s+-R\\s+0+\\s+\\/(\\s|$)/,\n];\n\nconst REDACTION_PLACEHOLDER = \"***REDACTED***\";\n\nfunction normalizePath(input: string): string {\n\treturn input.replace(/\\\\/g, \"/\");\n}\n\nfunction basename(input: string): string {\n\tconst normalized = normalizePath(input);\n\tconst idx = normalized.lastIndexOf(\"/\");\n\treturn idx >= 0 ? normalized.slice(idx + 1) : normalized;\n}\n\nfunction matchesAnyGlob(path: string, scope: readonly string[]): boolean {\n\tif (scope.length === 0) return false;\n\tconst normalized = normalizePath(path);\n\tfor (const glob of scope) {\n\t\tconst re = globToRegex(glob);\n\t\tif (re.test(normalized)) return true;\n\t}\n\treturn false;\n}\n\nfunction globToRegex(glob: string): RegExp {\n\t// Minimal glob: ** -> .*, * -> [^/]*, ? -> [^/]. Other regex metachars escaped.\n\tconst normalized = normalizePath(glob);\n\tlet pattern = \"\";\n\tlet i = 0;\n\twhile (i < normalized.length) {\n\t\tconst c = normalized[i];\n\t\tif (c === \"*\" && normalized[i + 1] === \"*\") {\n\t\t\tpattern += \".*\";\n\t\t\ti += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c === \"*\") {\n\t\t\tpattern += \"[^/]*\";\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (c === \"?\") {\n\t\t\tpattern += \"[^/]\";\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tif (/[.+^${}()|[\\]\\\\]/.test(c)) {\n\t\t\tpattern += `\\\\${c}`;\n\t\t\ti += 1;\n\t\t\tcontinue;\n\t\t}\n\t\tpattern += c;\n\t\ti += 1;\n\t}\n\treturn new RegExp(`^${pattern}$`);\n}\n\n/**\n * Clause 1 — secrets. Block reads/writes/edits targeting credential files.\n * Bash matchers check the command's argv for known credential paths too.\n */\nexport function checkSecretsClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool === \"read\" || call.tool === \"edit\" || call.tool === \"write\") {\n\t\tconst path = typeof call.args.path === \"string\" ? call.args.path : \"\";\n\t\tif (path && pathLooksLikeSecret(path)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: `Secrets clause blocks ${call.tool} on '${path}'.`,\n\t\t\t};\n\t\t}\n\t}\n\tif (call.tool === \"bash\") {\n\t\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\t\tif (cmd && bashTouchesSecret(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: \"Secrets clause blocks bash command that reads a credential file.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\nfunction pathLooksLikeSecret(path: string): boolean {\n\tconst normalized = normalizePath(path);\n\tconst base = basename(normalized);\n\tfor (const re of SECRET_PATH_PATTERNS) {\n\t\tif (re.test(normalized) || re.test(base)) return true;\n\t}\n\treturn false;\n}\n\nfunction bashTouchesSecret(cmd: string): boolean {\n\t// Catch the obvious cat / cp / mv / less / head / tail / source <secret-path>.\n\tconst readVerbs = /\\b(cat|less|more|head|tail|tac|nl|od|hexdump|xxd|cp|mv|source|\\.)\\b\\s+([^\\s|;&<>]+)/g;\n\tlet match: RegExpExecArray | null = readVerbs.exec(cmd);\n\twhile (match !== null) {\n\t\tconst target = match[2];\n\t\tif (target && pathLooksLikeSecret(target)) return true;\n\t\tmatch = readVerbs.exec(cmd);\n\t}\n\treturn false;\n}\n\n/**\n * Clause 2 — privilege escalation. Even under yolo mode, sudo/su require an\n * explicit confirm. Never auto-approved.\n */\nexport function checkPrivilegeClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool !== \"bash\") return { kind: \"pass\" };\n\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\tif (!cmd) return { kind: \"pass\" };\n\tfor (const re of PRIVILEGE_ESCALATION_PATTERNS) {\n\t\tif (re.test(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"require-confirm\",\n\t\t\t\treason: \"Privilege escalation requires explicit confirmation under §0.1.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\n/**\n * Clause 3 — filesystem destruction. Hard deny. No override path.\n */\nexport function checkFsDestructionClause(call: ToolCallContext): MatcherVerdict {\n\tif (call.tool !== \"bash\") return { kind: \"pass\" };\n\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\tif (!cmd) return { kind: \"pass\" };\n\tfor (const re of FS_DESTRUCTION_PATTERNS) {\n\t\tif (re.test(cmd)) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\treason: \"Filesystem-destructive command is blocked by §0.1.\",\n\t\t\t};\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\n/**\n * Clause 4 — scope. Edits/writes must land inside writeScope; bash must stay\n * inside executeScope when configured. Empty/undefined scope = no constraint\n * (e.g. local CLI usage without a lane grant).\n */\nexport function checkScopeClause(call: ToolCallContext): MatcherVerdict {\n\tconst grant = call.laneGrant;\n\tif (!grant) return { kind: \"pass\" };\n\tif (call.tool === \"write\" || call.tool === \"edit\") {\n\t\tconst writeScope = grant.writeScope;\n\t\tif (writeScope && writeScope.length > 0) {\n\t\t\tconst path = typeof call.args.path === \"string\" ? call.args.path : \"\";\n\t\t\tif (path && !matchesAnyGlob(path, writeScope)) {\n\t\t\t\treturn {\n\t\t\t\t\tkind: \"deny-hard\",\n\t\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\t\treason: `Path '${path}' is outside writeScope.`,\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t}\n\tif (call.tool === \"bash\") {\n\t\tconst executeScope = grant.executeScope;\n\t\tif (executeScope && executeScope.length > 0) {\n\t\t\tconst cmd = typeof call.args.command === \"string\" ? call.args.command : \"\";\n\t\t\tconst touched = extractMutatingTargets(cmd);\n\t\t\tfor (const target of touched) {\n\t\t\t\tif (!matchesAnyGlob(target, executeScope)) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tkind: \"deny-hard\",\n\t\t\t\t\t\tcode: \"hook_rejected\",\n\t\t\t\t\t\treason: `Bash mutates '${target}' outside executeScope.`,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn { kind: \"pass\" };\n}\n\nfunction extractMutatingTargets(cmd: string): string[] {\n\t// Heuristic: top-level >, >>, tee target; ignore quoted forms inside strings.\n\tconst targets: string[] = [];\n\tconst redirectRe = />>?\\s*([^\\s|;&<>'\"]+)/g;\n\tlet m: RegExpExecArray | null = redirectRe.exec(cmd);\n\twhile (m !== null) {\n\t\tconst t = m[1];\n\t\tif (t && t !== \"/dev/null\") targets.push(t);\n\t\tm = redirectRe.exec(cmd);\n\t}\n\tconst teeRe = /\\btee\\s+(?:-a\\s+)?([^\\s|;&<>'\"]+)/g;\n\tm = teeRe.exec(cmd);\n\twhile (m !== null) {\n\t\tconst t = m[1];\n\t\tif (t) targets.push(t);\n\t\tm = teeRe.exec(cmd);\n\t}\n\treturn targets;\n}\n\n/**\n * Redact bearer tokens and other secret-looking substrings before any sink\n * (logger, audit event, tool result returned to the LLM).\n */\nexport function redactSecrets(input: string): string {\n\tif (!input) return input;\n\tlet out = input;\n\tfor (const re of SECRET_CONTENT_PATTERNS) {\n\t\tout = out.replace(re, REDACTION_PLACEHOLDER);\n\t}\n\treturn out;\n}\n\n/**\n * Run every clause in order. First non-pass verdict wins; deny-hard beats\n * require-confirm in the rare case both fire (privilege + fs-destruction).\n */\nexport function runSafetyFloor(call: ToolCallContext): MatcherVerdict {\n\tconst checks = [checkSecretsClause, checkFsDestructionClause, checkScopeClause, checkPrivilegeClause];\n\tlet firstConfirm: MatcherVerdict | null = null;\n\tfor (const check of checks) {\n\t\ttry {\n\t\t\tconst verdict = check(call);\n\t\t\tif (verdict.kind === \"deny-hard\") return verdict;\n\t\t\tif (verdict.kind === \"require-confirm\" && !firstConfirm) firstConfirm = verdict;\n\t\t} catch (error) {\n\t\t\treturn {\n\t\t\t\tkind: \"deny-hard\",\n\t\t\t\tcode: \"hook_failed\",\n\t\t\t\treason: `Safety floor matcher threw: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t};\n\t\t}\n\t}\n\treturn firstConfirm ?? { kind: \"pass\" };\n}\n"]}
@@ -1,91 +0,0 @@
1
- export type HarnessControlEventStatus = "prepared" | "started" | "applying" | "verifying" | "completed" | "failed" | "blocked" | "rolled_back" | "in_doubt";
2
- export type HarnessControlEventKind = "compaction.summary.generated" | "extension.migration.plan" | "extension.migration.apply" | "interactive.model_thinking.commit" | "interactive.theme.apply" | "keybinding.conflict" | "spec.compile" | "spec.verify" | "cli.contract.verify" | (string & {});
3
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
4
- [key: string]: JsonValue;
5
- };
6
- export type JsonObject = {
7
- [key: string]: JsonValue;
8
- };
9
- export interface HarnessControlArtifactManifestEntry {
10
- path: string;
11
- exists: boolean;
12
- allowed: boolean;
13
- sizeBytes?: number;
14
- sha256?: string;
15
- error?: string;
16
- }
17
- export interface HarnessControlEvent {
18
- schemaVersion: "omk.harness-control.event.v2";
19
- eventId: string;
20
- runId: string;
21
- sessionId: string;
22
- operationId: string;
23
- causationId: string | null;
24
- correlationId: string;
25
- sequence: number;
26
- timestamp: string;
27
- kind: HarnessControlEventKind;
28
- status: HarnessControlEventStatus;
29
- cwd: string;
30
- beforeStateHash: string;
31
- afterStateHash: string;
32
- data: JsonObject;
33
- dataHash: string;
34
- artifacts: HarnessControlArtifactManifestEntry[];
35
- previousEventHash: string;
36
- eventHash: string;
37
- }
38
- export interface HarnessControlLedgerAnchor {
39
- schemaVersion: "omk.harness-control.anchor.v1";
40
- anchoredSequence: number;
41
- anchoredEventHash: string;
42
- rotatedFrom: string;
43
- timestamp: string;
44
- }
45
- export interface HarnessControlEventWriteResult {
46
- ok: boolean;
47
- path?: string;
48
- event?: HarnessControlEvent;
49
- error?: string;
50
- }
51
- export interface HarnessControlEventOptions {
52
- cwd?: string;
53
- logPath?: string;
54
- now?: Date;
55
- id?: string;
56
- eventId?: string;
57
- runId?: string;
58
- sessionId?: string;
59
- operationId?: string;
60
- causationId?: string | null;
61
- correlationId?: string;
62
- beforeState?: unknown;
63
- afterState?: unknown;
64
- artifactRefs?: string[];
65
- allowedArtifactRoots?: string[];
66
- lockTimeoutMs?: number;
67
- maxLedgerBytes?: number;
68
- }
69
- export interface HarnessControlLedgerQuarantineEntry {
70
- lineNumber: number;
71
- reason: string;
72
- }
73
- export interface HarnessControlLedgerVerificationResult {
74
- ok: boolean;
75
- events: HarnessControlEvent[];
76
- errors: string[];
77
- quarantinedLines: HarnessControlLedgerQuarantineEntry[];
78
- }
79
- interface PreviousEventState {
80
- sequence: number;
81
- eventHash: string;
82
- }
83
- export declare function sanitizeHarnessControlEventData(data: unknown): JsonObject;
84
- export declare function canonicalJson(value: JsonValue): string;
85
- export declare function hashCanonical(value: unknown): string;
86
- export declare function resolveHarnessControlEventLogPath(options?: HarnessControlEventOptions): string | undefined;
87
- export declare function createHarnessControlEvent(kind: HarnessControlEventKind, status: HarnessControlEventStatus, data?: unknown, options?: HarnessControlEventOptions, previous?: PreviousEventState): HarnessControlEvent;
88
- export declare function recordHarnessControlEvent(kind: HarnessControlEventKind, status: HarnessControlEventStatus, data?: unknown, options?: HarnessControlEventOptions): HarnessControlEventWriteResult;
89
- export declare function verifyHarnessControlLedger(logPath: string): HarnessControlLedgerVerificationResult;
90
- export {};
91
- //# sourceMappingURL=harness-control-events.d.ts.map