open-multi-agent-kit 0.98.3 → 0.98.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (468) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/README.md +12 -2
  3. package/dist/cli/args.d.ts +1 -0
  4. package/dist/cli/args.d.ts.map +1 -1
  5. package/dist/cli/args.js +14 -0
  6. package/dist/cli/args.js.map +1 -1
  7. package/dist/cli/help.d.ts.map +1 -1
  8. package/dist/cli/help.js +3 -0
  9. package/dist/cli/help.js.map +1 -1
  10. package/dist/cli/mcp-attach.d.ts +3 -3
  11. package/dist/cli/mcp-attach.d.ts.map +1 -1
  12. package/dist/cli/mcp-attach.js +5 -4
  13. package/dist/cli/mcp-attach.js.map +1 -1
  14. package/dist/cli/model-contract.d.ts +5 -0
  15. package/dist/cli/model-contract.d.ts.map +1 -0
  16. package/dist/cli/model-contract.js +45 -0
  17. package/dist/cli/model-contract.js.map +1 -0
  18. package/dist/commands/adaptorch-doctor-cli.d.ts.map +1 -1
  19. package/dist/commands/adaptorch-doctor-cli.js +32 -10
  20. package/dist/commands/adaptorch-doctor-cli.js.map +1 -1
  21. package/dist/commands/init-cli.d.ts +12 -0
  22. package/dist/commands/init-cli.d.ts.map +1 -0
  23. package/dist/commands/init-cli.js +76 -0
  24. package/dist/commands/init-cli.js.map +1 -0
  25. package/dist/commands/provider-sync-cli.d.ts +27 -0
  26. package/dist/commands/provider-sync-cli.d.ts.map +1 -0
  27. package/dist/commands/provider-sync-cli.js +177 -0
  28. package/dist/commands/provider-sync-cli.js.map +1 -0
  29. package/dist/commands/run-command.d.ts +9 -0
  30. package/dist/commands/run-command.d.ts.map +1 -0
  31. package/dist/commands/run-command.js +34 -0
  32. package/dist/commands/run-command.js.map +1 -0
  33. package/dist/commands/verified-run-cli.d.ts +6 -0
  34. package/dist/commands/verified-run-cli.d.ts.map +1 -0
  35. package/dist/commands/verified-run-cli.js +190 -0
  36. package/dist/commands/verified-run-cli.js.map +1 -0
  37. package/dist/core/active-skill-state.d.ts +7 -0
  38. package/dist/core/active-skill-state.d.ts.map +1 -0
  39. package/dist/core/active-skill-state.js +25 -0
  40. package/dist/core/active-skill-state.js.map +1 -0
  41. package/dist/core/agent-session-services.d.ts +10 -1
  42. package/dist/core/agent-session-services.d.ts.map +1 -1
  43. package/dist/core/agent-session-services.js +43 -0
  44. package/dist/core/agent-session-services.js.map +1 -1
  45. package/dist/core/agent-session.d.ts +7 -9
  46. package/dist/core/agent-session.d.ts.map +1 -1
  47. package/dist/core/agent-session.js +91 -126
  48. package/dist/core/agent-session.js.map +1 -1
  49. package/dist/core/codex-chatgpt-web-bridge.d.ts +99 -0
  50. package/dist/core/codex-chatgpt-web-bridge.d.ts.map +1 -0
  51. package/dist/core/codex-chatgpt-web-bridge.js +192 -0
  52. package/dist/core/codex-chatgpt-web-bridge.js.map +1 -0
  53. package/dist/core/codex-chatgpt-web-sync.d.ts +50 -0
  54. package/dist/core/codex-chatgpt-web-sync.d.ts.map +1 -0
  55. package/dist/core/codex-chatgpt-web-sync.js +119 -0
  56. package/dist/core/codex-chatgpt-web-sync.js.map +1 -0
  57. package/dist/core/compaction/compaction-headroom.d.ts +30 -0
  58. package/dist/core/compaction/compaction-headroom.d.ts.map +1 -0
  59. package/dist/core/compaction/compaction-headroom.js +48 -0
  60. package/dist/core/compaction/compaction-headroom.js.map +1 -0
  61. package/dist/core/compaction/compaction.d.ts +2 -29
  62. package/dist/core/compaction/compaction.d.ts.map +1 -1
  63. package/dist/core/compaction/compaction.js +19 -47
  64. package/dist/core/compaction/compaction.js.map +1 -1
  65. package/dist/core/compaction/overflow-retry-guard.d.ts +20 -0
  66. package/dist/core/compaction/overflow-retry-guard.d.ts.map +1 -0
  67. package/dist/core/compaction/overflow-retry-guard.js +38 -0
  68. package/dist/core/compaction/overflow-retry-guard.js.map +1 -0
  69. package/dist/core/context-budget-headroom-types.d.ts.map +1 -1
  70. package/dist/core/context-budget-headroom-types.js +1 -1
  71. package/dist/core/context-budget-headroom-types.js.map +1 -1
  72. package/dist/core/context-budget-token-counter-types.d.ts +27 -0
  73. package/dist/core/context-budget-token-counter-types.d.ts.map +1 -0
  74. package/dist/core/context-budget-token-counter-types.js +2 -0
  75. package/dist/core/context-budget-token-counter-types.js.map +1 -0
  76. package/dist/core/context-budget-token-counter.d.ts +2 -26
  77. package/dist/core/context-budget-token-counter.d.ts.map +1 -1
  78. package/dist/core/context-budget-token-counter.js +2 -0
  79. package/dist/core/context-budget-token-counter.js.map +1 -1
  80. package/dist/core/context-budget-v2-scoring.d.ts.map +1 -1
  81. package/dist/core/context-budget-v2-scoring.js +14 -10
  82. package/dist/core/context-budget-v2-scoring.js.map +1 -1
  83. package/dist/core/domain-router.d.ts.map +1 -1
  84. package/dist/core/domain-router.js +1 -1
  85. package/dist/core/domain-router.js.map +1 -1
  86. package/dist/core/grok-harness-dispatch.d.ts +4 -0
  87. package/dist/core/grok-harness-dispatch.d.ts.map +1 -1
  88. package/dist/core/grok-harness-dispatch.js +20 -3
  89. package/dist/core/grok-harness-dispatch.js.map +1 -1
  90. package/dist/core/grok-harness.d.ts +15 -9
  91. package/dist/core/grok-harness.d.ts.map +1 -1
  92. package/dist/core/grok-harness.js +34 -8
  93. package/dist/core/grok-harness.js.map +1 -1
  94. package/dist/core/mcp/tools.d.ts +2 -2
  95. package/dist/core/mcp/tools.d.ts.map +1 -1
  96. package/dist/core/mcp/tools.js +29 -3
  97. package/dist/core/mcp/tools.js.map +1 -1
  98. package/dist/core/model-registry-schema.d.ts +1081 -0
  99. package/dist/core/model-registry-schema.d.ts.map +1 -0
  100. package/dist/core/model-registry-schema.js +148 -0
  101. package/dist/core/model-registry-schema.js.map +1 -0
  102. package/dist/core/model-registry.d.ts.map +1 -1
  103. package/dist/core/model-registry.js +1 -146
  104. package/dist/core/model-registry.js.map +1 -1
  105. package/dist/core/model-resolver.d.ts +2 -1
  106. package/dist/core/model-resolver.d.ts.map +1 -1
  107. package/dist/core/model-resolver.js +2 -1
  108. package/dist/core/model-resolver.js.map +1 -1
  109. package/dist/core/prompt-preset.d.ts +1 -1
  110. package/dist/core/prompt-preset.d.ts.map +1 -1
  111. package/dist/core/prompt-preset.js +16 -1
  112. package/dist/core/prompt-preset.js.map +1 -1
  113. package/dist/core/prompt-settlement.d.ts +4 -3
  114. package/dist/core/prompt-settlement.d.ts.map +1 -1
  115. package/dist/core/prompt-settlement.js.map +1 -1
  116. package/dist/core/provider-display-names.d.ts.map +1 -1
  117. package/dist/core/provider-display-names.js +1 -0
  118. package/dist/core/provider-display-names.js.map +1 -1
  119. package/dist/core/provider-resilience.d.ts +8 -0
  120. package/dist/core/provider-resilience.d.ts.map +1 -1
  121. package/dist/core/provider-resilience.js +20 -3
  122. package/dist/core/provider-resilience.js.map +1 -1
  123. package/dist/core/provider-usage-types.d.ts +42 -0
  124. package/dist/core/provider-usage-types.d.ts.map +1 -0
  125. package/dist/core/provider-usage-types.js +2 -0
  126. package/dist/core/provider-usage-types.js.map +1 -0
  127. package/dist/core/provider-usage.d.ts +2 -31
  128. package/dist/core/provider-usage.d.ts.map +1 -1
  129. package/dist/core/provider-usage.js +4 -0
  130. package/dist/core/provider-usage.js.map +1 -1
  131. package/dist/core/redaction.d.ts.map +1 -1
  132. package/dist/core/redaction.js +18 -2
  133. package/dist/core/redaction.js.map +1 -1
  134. package/dist/core/run-budget-policy.d.ts +18 -0
  135. package/dist/core/run-budget-policy.d.ts.map +1 -0
  136. package/dist/core/run-budget-policy.js +52 -0
  137. package/dist/core/run-budget-policy.js.map +1 -0
  138. package/dist/core/run-budget.d.ts +33 -0
  139. package/dist/core/run-budget.d.ts.map +1 -0
  140. package/dist/core/run-budget.js +89 -0
  141. package/dist/core/run-budget.js.map +1 -0
  142. package/dist/core/run-execution-api.d.ts +15 -0
  143. package/dist/core/run-execution-api.d.ts.map +1 -0
  144. package/dist/core/run-execution-api.js +7 -0
  145. package/dist/core/run-execution-api.js.map +1 -0
  146. package/dist/core/run-journal.d.ts.map +1 -1
  147. package/dist/core/run-journal.js +30 -208
  148. package/dist/core/run-journal.js.map +1 -1
  149. package/dist/core/sandbox/policy-merge.d.ts +6 -0
  150. package/dist/core/sandbox/policy-merge.d.ts.map +1 -0
  151. package/dist/core/sandbox/policy-merge.js +74 -0
  152. package/dist/core/sandbox/policy-merge.js.map +1 -0
  153. package/dist/core/sandbox/policy-paths.d.ts +4 -0
  154. package/dist/core/sandbox/policy-paths.d.ts.map +1 -0
  155. package/dist/core/sandbox/policy-paths.js +21 -0
  156. package/dist/core/sandbox/policy-paths.js.map +1 -0
  157. package/dist/core/sandbox/policy-types.d.ts +75 -0
  158. package/dist/core/sandbox/policy-types.d.ts.map +1 -0
  159. package/dist/core/sandbox/policy-types.js +2 -0
  160. package/dist/core/sandbox/policy-types.js.map +1 -0
  161. package/dist/core/sandbox/policy.d.ts +3 -77
  162. package/dist/core/sandbox/policy.d.ts.map +1 -1
  163. package/dist/core/sandbox/policy.js +3 -98
  164. package/dist/core/sandbox/policy.js.map +1 -1
  165. package/dist/core/sdk-provider-stream.d.ts +14 -0
  166. package/dist/core/sdk-provider-stream.d.ts.map +1 -0
  167. package/dist/core/sdk-provider-stream.js +38 -0
  168. package/dist/core/sdk-provider-stream.js.map +1 -0
  169. package/dist/core/sdk.d.ts +5 -1
  170. package/dist/core/sdk.d.ts.map +1 -1
  171. package/dist/core/sdk.js +17 -33
  172. package/dist/core/sdk.js.map +1 -1
  173. package/dist/core/session-bash-service.d.ts +2 -2
  174. package/dist/core/session-bash-service.d.ts.map +1 -1
  175. package/dist/core/session-bash-service.js +21 -9
  176. package/dist/core/session-bash-service.js.map +1 -1
  177. package/dist/core/session-failure-cause.d.ts.map +1 -1
  178. package/dist/core/session-failure-cause.js +15 -3
  179. package/dist/core/session-failure-cause.js.map +1 -1
  180. package/dist/core/session-prompt-lifecycle.d.ts +25 -0
  181. package/dist/core/session-prompt-lifecycle.d.ts.map +1 -0
  182. package/dist/core/session-prompt-lifecycle.js +87 -0
  183. package/dist/core/session-prompt-lifecycle.js.map +1 -0
  184. package/dist/core/session-run-budget.d.ts +28 -0
  185. package/dist/core/session-run-budget.d.ts.map +1 -0
  186. package/dist/core/session-run-budget.js +127 -0
  187. package/dist/core/session-run-budget.js.map +1 -0
  188. package/dist/core/session-run-termination.d.ts +18 -0
  189. package/dist/core/session-run-termination.d.ts.map +1 -0
  190. package/dist/core/session-run-termination.js +72 -0
  191. package/dist/core/session-run-termination.js.map +1 -0
  192. package/dist/core/session-termination-types.d.ts +97 -0
  193. package/dist/core/session-termination-types.d.ts.map +1 -0
  194. package/dist/core/session-termination-types.js +26 -0
  195. package/dist/core/session-termination-types.js.map +1 -0
  196. package/dist/core/session-termination.d.ts +3 -97
  197. package/dist/core/session-termination.d.ts.map +1 -1
  198. package/dist/core/session-termination.js +25 -29
  199. package/dist/core/session-termination.js.map +1 -1
  200. package/dist/core/skill-selector.d.ts +40 -0
  201. package/dist/core/skill-selector.d.ts.map +1 -0
  202. package/dist/core/skill-selector.js +102 -0
  203. package/dist/core/skill-selector.js.map +1 -0
  204. package/dist/core/slash-commands.d.ts.map +1 -1
  205. package/dist/core/slash-commands.js +1 -0
  206. package/dist/core/slash-commands.js.map +1 -1
  207. package/dist/core/subagent-lane-launcher.d.ts +3 -2
  208. package/dist/core/subagent-lane-launcher.d.ts.map +1 -1
  209. package/dist/core/subagent-lane-launcher.js +24 -13
  210. package/dist/core/subagent-lane-launcher.js.map +1 -1
  211. package/dist/core/tools/render-utils.d.ts.map +1 -1
  212. package/dist/core/tools/render-utils.js +2 -4
  213. package/dist/core/tools/render-utils.js.map +1 -1
  214. package/dist/core/turn-metrics-record.d.ts +55 -0
  215. package/dist/core/turn-metrics-record.d.ts.map +1 -0
  216. package/dist/core/turn-metrics-record.js +149 -0
  217. package/dist/core/turn-metrics-record.js.map +1 -0
  218. package/dist/core/turn-metrics.d.ts +4 -56
  219. package/dist/core/turn-metrics.d.ts.map +1 -1
  220. package/dist/core/turn-metrics.js +12 -60
  221. package/dist/core/turn-metrics.js.map +1 -1
  222. package/dist/core/verified-run/broker.d.ts +26 -0
  223. package/dist/core/verified-run/broker.d.ts.map +1 -0
  224. package/dist/core/verified-run/broker.js +210 -0
  225. package/dist/core/verified-run/broker.js.map +1 -0
  226. package/dist/core/verified-run/candidate.d.ts +24 -0
  227. package/dist/core/verified-run/candidate.d.ts.map +1 -0
  228. package/dist/core/verified-run/candidate.js +167 -0
  229. package/dist/core/verified-run/candidate.js.map +1 -0
  230. package/dist/core/verified-run/check-receipt.d.ts +18 -0
  231. package/dist/core/verified-run/check-receipt.d.ts.map +1 -0
  232. package/dist/core/verified-run/check-receipt.js +92 -0
  233. package/dist/core/verified-run/check-receipt.js.map +1 -0
  234. package/dist/core/verified-run/coordinator.d.ts +39 -0
  235. package/dist/core/verified-run/coordinator.d.ts.map +1 -0
  236. package/dist/core/verified-run/coordinator.js +190 -0
  237. package/dist/core/verified-run/coordinator.js.map +1 -0
  238. package/dist/core/verified-run/dag-candidates.d.ts +8 -0
  239. package/dist/core/verified-run/dag-candidates.d.ts.map +1 -0
  240. package/dist/core/verified-run/dag-candidates.js +65 -0
  241. package/dist/core/verified-run/dag-candidates.js.map +1 -0
  242. package/dist/core/verified-run/dag-phase.d.ts +7 -0
  243. package/dist/core/verified-run/dag-phase.d.ts.map +1 -0
  244. package/dist/core/verified-run/dag-phase.js +92 -0
  245. package/dist/core/verified-run/dag-phase.js.map +1 -0
  246. package/dist/core/verified-run/dag-projection.d.ts +7 -0
  247. package/dist/core/verified-run/dag-projection.d.ts.map +1 -0
  248. package/dist/core/verified-run/dag-projection.js +90 -0
  249. package/dist/core/verified-run/dag-projection.js.map +1 -0
  250. package/dist/core/verified-run/dag-recovery.d.ts +13 -0
  251. package/dist/core/verified-run/dag-recovery.d.ts.map +1 -0
  252. package/dist/core/verified-run/dag-recovery.js +98 -0
  253. package/dist/core/verified-run/dag-recovery.js.map +1 -0
  254. package/dist/core/verified-run/dag-retry-projection.d.ts +9 -0
  255. package/dist/core/verified-run/dag-retry-projection.d.ts.map +1 -0
  256. package/dist/core/verified-run/dag-retry-projection.js +43 -0
  257. package/dist/core/verified-run/dag-retry-projection.js.map +1 -0
  258. package/dist/core/verified-run/dag-types.d.ts +47 -0
  259. package/dist/core/verified-run/dag-types.d.ts.map +1 -0
  260. package/dist/core/verified-run/dag-types.js +2 -0
  261. package/dist/core/verified-run/dag-types.js.map +1 -0
  262. package/dist/core/verified-run/event-parser.d.ts +3 -0
  263. package/dist/core/verified-run/event-parser.d.ts.map +1 -0
  264. package/dist/core/verified-run/event-parser.js +153 -0
  265. package/dist/core/verified-run/event-parser.js.map +1 -0
  266. package/dist/core/verified-run/events.d.ts +4 -0
  267. package/dist/core/verified-run/events.d.ts.map +1 -0
  268. package/dist/core/verified-run/events.js +3 -0
  269. package/dist/core/verified-run/events.js.map +1 -0
  270. package/dist/core/verified-run/evidence-binding.d.ts +18 -0
  271. package/dist/core/verified-run/evidence-binding.d.ts.map +1 -0
  272. package/dist/core/verified-run/evidence-binding.js +81 -0
  273. package/dist/core/verified-run/evidence-binding.js.map +1 -0
  274. package/dist/core/verified-run/evidence.d.ts +27 -0
  275. package/dist/core/verified-run/evidence.d.ts.map +1 -0
  276. package/dist/core/verified-run/evidence.js +100 -0
  277. package/dist/core/verified-run/evidence.js.map +1 -0
  278. package/dist/core/verified-run/journal.d.ts +32 -0
  279. package/dist/core/verified-run/journal.d.ts.map +1 -0
  280. package/dist/core/verified-run/journal.js +103 -0
  281. package/dist/core/verified-run/journal.js.map +1 -0
  282. package/dist/core/verified-run/namespace-identity.d.ts +11 -0
  283. package/dist/core/verified-run/namespace-identity.d.ts.map +1 -0
  284. package/dist/core/verified-run/namespace-identity.js +77 -0
  285. package/dist/core/verified-run/namespace-identity.js.map +1 -0
  286. package/dist/core/verified-run/owned-execution.d.ts +21 -0
  287. package/dist/core/verified-run/owned-execution.d.ts.map +1 -0
  288. package/dist/core/verified-run/owned-execution.js +43 -0
  289. package/dist/core/verified-run/owned-execution.js.map +1 -0
  290. package/dist/core/verified-run/phase-context.d.ts +9 -0
  291. package/dist/core/verified-run/phase-context.d.ts.map +1 -0
  292. package/dist/core/verified-run/phase-context.js +2 -0
  293. package/dist/core/verified-run/phase-context.js.map +1 -0
  294. package/dist/core/verified-run/process-gate.d.ts +5 -0
  295. package/dist/core/verified-run/process-gate.d.ts.map +1 -0
  296. package/dist/core/verified-run/process-gate.js +31 -0
  297. package/dist/core/verified-run/process-gate.js.map +1 -0
  298. package/dist/core/verified-run/projection.d.ts +4 -0
  299. package/dist/core/verified-run/projection.d.ts.map +1 -0
  300. package/dist/core/verified-run/projection.js +219 -0
  301. package/dist/core/verified-run/projection.js.map +1 -0
  302. package/dist/core/verified-run/recovery-clock.d.ts +19 -0
  303. package/dist/core/verified-run/recovery-clock.d.ts.map +1 -0
  304. package/dist/core/verified-run/recovery-clock.js +69 -0
  305. package/dist/core/verified-run/recovery-clock.js.map +1 -0
  306. package/dist/core/verified-run/recovery-command.d.ts +11 -0
  307. package/dist/core/verified-run/recovery-command.d.ts.map +1 -0
  308. package/dist/core/verified-run/recovery-command.js +73 -0
  309. package/dist/core/verified-run/recovery-command.js.map +1 -0
  310. package/dist/core/verified-run/recovery-projection.d.ts +12 -0
  311. package/dist/core/verified-run/recovery-projection.d.ts.map +1 -0
  312. package/dist/core/verified-run/recovery-projection.js +88 -0
  313. package/dist/core/verified-run/recovery-projection.js.map +1 -0
  314. package/dist/core/verified-run/recovery.d.ts +12 -0
  315. package/dist/core/verified-run/recovery.d.ts.map +1 -0
  316. package/dist/core/verified-run/recovery.js +115 -0
  317. package/dist/core/verified-run/recovery.js.map +1 -0
  318. package/dist/core/verified-run/run-types.d.ts +103 -0
  319. package/dist/core/verified-run/run-types.d.ts.map +1 -0
  320. package/dist/core/verified-run/run-types.js +2 -0
  321. package/dist/core/verified-run/run-types.js.map +1 -0
  322. package/dist/core/verified-run/scripted-writer.d.ts +15 -0
  323. package/dist/core/verified-run/scripted-writer.d.ts.map +1 -0
  324. package/dist/core/verified-run/scripted-writer.js +94 -0
  325. package/dist/core/verified-run/scripted-writer.js.map +1 -0
  326. package/dist/core/verified-run/session-port.d.ts +27 -0
  327. package/dist/core/verified-run/session-port.d.ts.map +1 -0
  328. package/dist/core/verified-run/session-port.js +2 -0
  329. package/dist/core/verified-run/session-port.js.map +1 -0
  330. package/dist/core/verified-run/storage.d.ts +15 -0
  331. package/dist/core/verified-run/storage.d.ts.map +1 -0
  332. package/dist/core/verified-run/storage.js +96 -0
  333. package/dist/core/verified-run/storage.js.map +1 -0
  334. package/dist/core/verified-run/verification-phase.d.ts +5 -0
  335. package/dist/core/verified-run/verification-phase.d.ts.map +1 -0
  336. package/dist/core/verified-run/verification-phase.js +56 -0
  337. package/dist/core/verified-run/verification-phase.js.map +1 -0
  338. package/dist/core/verified-run/work-recovery.d.ts +8 -0
  339. package/dist/core/verified-run/work-recovery.d.ts.map +1 -0
  340. package/dist/core/verified-run/work-recovery.js +44 -0
  341. package/dist/core/verified-run/work-recovery.js.map +1 -0
  342. package/dist/core/verified-run/writer-completion.d.ts +4 -0
  343. package/dist/core/verified-run/writer-completion.d.ts.map +1 -0
  344. package/dist/core/verified-run/writer-completion.js +27 -0
  345. package/dist/core/verified-run/writer-completion.js.map +1 -0
  346. package/dist/core/verified-run/writer-phase.d.ts +8 -0
  347. package/dist/core/verified-run/writer-phase.d.ts.map +1 -0
  348. package/dist/core/verified-run/writer-phase.js +76 -0
  349. package/dist/core/verified-run/writer-phase.js.map +1 -0
  350. package/dist/core/verified-run/writer-projection.d.ts +11 -0
  351. package/dist/core/verified-run/writer-projection.d.ts.map +1 -0
  352. package/dist/core/verified-run/writer-projection.js +70 -0
  353. package/dist/core/verified-run/writer-projection.js.map +1 -0
  354. package/dist/core/verified-run/writer-recovery.d.ts +16 -0
  355. package/dist/core/verified-run/writer-recovery.d.ts.map +1 -0
  356. package/dist/core/verified-run/writer-recovery.js +107 -0
  357. package/dist/core/verified-run/writer-recovery.js.map +1 -0
  358. package/dist/core/workload-permit-pool.d.ts +1 -3
  359. package/dist/core/workload-permit-pool.d.ts.map +1 -1
  360. package/dist/core/workload-permit-pool.js +11 -11
  361. package/dist/core/workload-permit-pool.js.map +1 -1
  362. package/dist/guardrails/evidence-system.d.ts +1 -1
  363. package/dist/guardrails/evidence-system.d.ts.map +1 -1
  364. package/dist/guardrails/evidence-system.js +18 -29
  365. package/dist/guardrails/evidence-system.js.map +1 -1
  366. package/dist/guardrails/merge-gate-result.d.ts +4 -0
  367. package/dist/guardrails/merge-gate-result.d.ts.map +1 -0
  368. package/dist/guardrails/merge-gate-result.js +32 -0
  369. package/dist/guardrails/merge-gate-result.js.map +1 -0
  370. package/dist/index.d.ts +3 -2
  371. package/dist/index.d.ts.map +1 -1
  372. package/dist/index.js +2 -2
  373. package/dist/index.js.map +1 -1
  374. package/dist/main.d.ts.map +1 -1
  375. package/dist/main.js +17 -23
  376. package/dist/main.js.map +1 -1
  377. package/dist/modes/interactive/components/session-failure.d.ts +13 -0
  378. package/dist/modes/interactive/components/session-failure.d.ts.map +1 -0
  379. package/dist/modes/interactive/components/session-failure.js +81 -0
  380. package/dist/modes/interactive/components/session-failure.js.map +1 -0
  381. package/dist/modes/interactive/interactive-login-options.d.ts +27 -0
  382. package/dist/modes/interactive/interactive-login-options.d.ts.map +1 -0
  383. package/dist/modes/interactive/interactive-login-options.js +54 -0
  384. package/dist/modes/interactive/interactive-login-options.js.map +1 -0
  385. package/dist/modes/interactive/interactive-mode.d.ts +8 -4
  386. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  387. package/dist/modes/interactive/interactive-mode.js +183 -171
  388. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  389. package/dist/modes/interactive/interactive-resume-command.d.ts +3 -0
  390. package/dist/modes/interactive/interactive-resume-command.d.ts.map +1 -0
  391. package/dist/modes/interactive/interactive-resume-command.js +24 -0
  392. package/dist/modes/interactive/interactive-resume-command.js.map +1 -0
  393. package/dist/modes/interactive/interactive-tool-result.d.ts +32 -0
  394. package/dist/modes/interactive/interactive-tool-result.d.ts.map +1 -0
  395. package/dist/modes/interactive/interactive-tool-result.js +59 -0
  396. package/dist/modes/interactive/interactive-tool-result.js.map +1 -0
  397. package/dist/modes/interactive/tui-diagnostics.d.ts +36 -0
  398. package/dist/modes/interactive/tui-diagnostics.d.ts.map +1 -0
  399. package/dist/modes/interactive/tui-diagnostics.js +105 -0
  400. package/dist/modes/interactive/tui-diagnostics.js.map +1 -0
  401. package/dist/modes/interactive/tui-runtime-info.d.ts +20 -0
  402. package/dist/modes/interactive/tui-runtime-info.d.ts.map +1 -0
  403. package/dist/modes/interactive/tui-runtime-info.js +76 -0
  404. package/dist/modes/interactive/tui-runtime-info.js.map +1 -0
  405. package/dist/modes/print-mode.d.ts.map +1 -1
  406. package/dist/modes/print-mode.js +22 -0
  407. package/dist/modes/print-mode.js.map +1 -1
  408. package/dist/utils/clipboard-image.d.ts.map +1 -1
  409. package/dist/utils/clipboard-image.js +10 -60
  410. package/dist/utils/clipboard-image.js.map +1 -1
  411. package/dist/utils/terminal-links.d.ts +13 -0
  412. package/dist/utils/terminal-links.d.ts.map +1 -0
  413. package/dist/utils/terminal-links.js +68 -0
  414. package/dist/utils/terminal-links.js.map +1 -0
  415. package/dist/utils/windows-clipboard-image.d.ts +16 -0
  416. package/dist/utils/windows-clipboard-image.d.ts.map +1 -0
  417. package/dist/utils/windows-clipboard-image.js +87 -0
  418. package/dist/utils/windows-clipboard-image.js.map +1 -0
  419. package/docs/adaptorch-onboarding.md +80 -0
  420. package/docs/containerization.md +12 -0
  421. package/docs/context-files.md +97 -0
  422. package/docs/correctness-wall.md +8 -0
  423. package/docs/custom-provider.md +35 -0
  424. package/docs/development.md +28 -3
  425. package/docs/environment-variables.md +2 -0
  426. package/docs/grok-harness.md +4 -0
  427. package/docs/harness-boundaries.md +154 -0
  428. package/docs/harness-improvements.md +90 -0
  429. package/docs/json.md +19 -0
  430. package/docs/keybindings.md +2 -2
  431. package/docs/mcp.md +22 -2
  432. package/docs/metrics.md +66 -16
  433. package/docs/model-catalog-refresh.md +190 -0
  434. package/docs/model-contract.md +168 -0
  435. package/docs/models.md +21 -4
  436. package/docs/provider-resilience.md +5 -3
  437. package/docs/providers.md +68 -1
  438. package/docs/quickstart.md +4 -0
  439. package/docs/release-audit-0.98.4.md +112 -0
  440. package/docs/release-audit-0.98.5.md +84 -0
  441. package/docs/review-bundle-followup.md +195 -0
  442. package/docs/run-protocol.md +33 -1
  443. package/docs/runtime-algorithms.md +45 -0
  444. package/docs/sdk.md +204 -2
  445. package/docs/sessions.md +1 -1
  446. package/docs/settings.md +17 -1
  447. package/docs/skills.md +2 -0
  448. package/docs/tb21-audit.md +131 -0
  449. package/docs/terminal-setup.md +20 -0
  450. package/docs/usage.md +77 -1
  451. package/docs/verified-run-testing.md +417 -0
  452. package/docs/verified-run.md +388 -0
  453. package/docs/windows.md +48 -0
  454. package/examples/README.md +4 -0
  455. package/examples/context/AGENTS.md +64 -0
  456. package/examples/context/CLAUDE.md +17 -0
  457. package/examples/context/INTERNET.md +42 -0
  458. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  459. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  460. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  461. package/examples/extensions/gondolin/package-lock.json +2 -2
  462. package/examples/extensions/gondolin/package.json +1 -1
  463. package/examples/extensions/sandbox/package-lock.json +2 -2
  464. package/examples/extensions/sandbox/package.json +1 -1
  465. package/examples/extensions/with-deps/package-lock.json +2 -2
  466. package/examples/extensions/with-deps/package.json +1 -1
  467. package/npm-shrinkwrap.json +18 -18
  468. package/package.json +6 -6
@@ -0,0 +1,80 @@
1
+ # OMK / WPL → AdaptOrch 안내
2
+
3
+ AdaptOrch는 OMK와 별개의 선택적 서비스입니다. OMK와 MIT 라이선스의
4
+ `omk-adaptorch-wpl` 사용에 가입이나 유료 플랜은 필요하지 않습니다.
5
+ 이 경로는 웹사이트 방문을 돕는 CRM 유입 경로이며, 계정 생성이나 리드 저장을
6
+ 대신 수행하는 CRM 클라이언트가 아닙니다.
7
+
8
+ ## CLI에서 시작
9
+
10
+ ```bash
11
+ omk doctor adaptorch --links
12
+ omk doctor adaptorch --links --json
13
+ ```
14
+
15
+ `--links`는 API 키 없이 작동합니다. 환경의 API 키나 API URL을 읽거나 검증하지
16
+ 않으며, HTTP 요청·브라우저 열기·파일 저장·run 제출을 하지 않습니다.
17
+ JSON 출력의 `mode: "links"`, `networkAccess: false`, `accountRequired: false`는
18
+ 이 **로컬 안내 명령**의 상태입니다. 웹사이트의 요금이나 가입 조건을 뜻하지 않습니다.
19
+
20
+ | 행동 | 목적지 | 용도 |
21
+ | --- | --- | --- |
22
+ | Plans / local Starter | `https://adaptorch.com/#pricing` | 로컬 평가와 호스티드 플랜 비교 |
23
+ | Sign up | `https://adaptorch.com/app/signup` | 사용자가 직접 가입 |
24
+ | Team / private-runner contact | `https://adaptorch.com/#bookDemo` | 팀·사설 러너 상담 |
25
+ | Claim boundary | `https://adaptorch.com/claim-boundary` | 검증 범위와 한계 확인 |
26
+
27
+ 실제 출력 URL에는 아래의 고정 UTM 태그가 붙습니다. 사용자가 링크를 열면 해당
28
+ 태그가 웹사이트로 전달됩니다. OMK 자체는 클릭을 관찰하거나 추적 요청을 보내지 않습니다.
29
+
30
+ 계정을 만든 뒤 API 연결을 확인하려면 키를 안전하게 설정하고 별도로 실행합니다.
31
+
32
+ ```bash
33
+ omk doctor adaptorch
34
+ omk doctor adaptorch --json
35
+ ```
36
+
37
+ 이 명령은 설정된 API의 `GET /v1/whoami`에 인증 요청을 보냅니다.
38
+ 종료 코드 `0`은 API 인증 성공, `1`은 미설정, `2`는 잘못된 설정이나 연결 실패입니다.
39
+ 인증 성공은 코드 검증, WPL 자동 실행, 배포 승인을 뜻하지 않습니다.
40
+ `--links`의 성공 종료 코드는 API 연결 여부와 무관합니다.
41
+
42
+ ## WPL 소비자에서 사용
43
+
44
+ ```typescript
45
+ import { getAdaptOrchLinks } from "omk-adaptorch-wpl";
46
+
47
+ const links = getAdaptOrchLinks(); // 기본 표면: wpl
48
+ // 사용자가 요청한 도움말이나 별도 제품 안내 화면에서 렌더링합니다.
49
+ console.log(links.plans, links.signup, links.contact, links.claimBoundary);
50
+ ```
51
+
52
+ `getAdaptOrchLinks("doctor")`는 CLI 유입용입니다. 함수는 매번 독립적인 링크 객체를
53
+ 반환하고 네트워크·환경 변수·사용자 파일에 접근하지 않습니다.
54
+ 링크를 판정 카드의 `next_actions`나 서명된 receipt에 삽입하지 마세요.
55
+ 가입·결제 여부는 `canApply`, `shouldSubmit`, 사람 검토 요구를 바꾸지 않습니다.
56
+
57
+ ## CRM 유입 구분과 개인정보 경계
58
+
59
+ - `utm_source=omk`
60
+ - `utm_campaign=omk-adaptorch-wpl`
61
+ - CLI: `utm_medium=cli`, `utm_content=doctor-{action}`
62
+ - WPL: `utm_medium=library`, `utm_content=wpl-{action}`
63
+ - `{action}`: `plans`, `signup`, `contact`, `claim-boundary`
64
+
65
+ 허용된 값만 사용합니다. 이메일, API 키, 프롬프트, diff, 저장소 경로, 세션 ID,
66
+ run ID를 URL에 추가하지 않습니다. 가격은 코드에 고정하지 않고 웹사이트가 소유합니다.
67
+
68
+ 사이트 운영 측에서는 사용자 동의와 개인정보 처리 정책에 따라 UTM 보존,
69
+ 가입 완료·상담 제출·활성화 이벤트를 연결해야 합니다. 이 변경은 해당 서버의
70
+ CRM 저장, 이메일 발송, 결제, 전환율을 구현하거나 검증하지 않습니다.
71
+ 단순 링크 생성 횟수를 방문자 수나 가입 전환으로 집계하면 안 됩니다.
72
+
73
+ ## 검증과 관련 문서
74
+
75
+ - `test/adaptorch-onboarding.test.ts`: 키 미접근, HTTP 미호출, 옵션 순서, JSON 계약
76
+ - `test/adaptorch-doctor-cli.test.ts`: 기존 연결 검사와 종료 코드 회귀
77
+ - `packages/adaptorch-wpl/test/service-links.test.ts`: 공개 export, 고정 목적지·UTM, 임의 입력 거부
78
+ - [Correctness Wall](correctness-wall.md): 적용·제출 게이트
79
+ - [AdaptOrch Preview](adaptorch-preview.md): 계획과 실제 실행 구분
80
+ - [하네스 개선 우선순위](harness-improvements.md): 이번 점검 범위와 후속 과제
@@ -22,6 +22,18 @@ There are two general isolation options:
22
22
  1. run the whole `omk` process inside an isolated environment, or
23
23
  2. run `omk` on the host and route tool execution into an isolated environment.
24
24
 
25
+ ### Policy composition
26
+
27
+ `mergeSandboxPolicy(base, override)` keeps the stronger enforcement mode and accepts
28
+ only a root inside the base root. An override cannot silently turn `enforce` into
29
+ `audit`/`off` or move the workspace elsewhere. Broader mode/root changes require the
30
+ trusted caller's explicit `{ allowBroaden: true }`; the flag is not user authentication.
31
+ These pure policy checks do not replace backend enforcement or isolate extension code.
32
+
33
+ Evidence configuration also fails closed: `FailClosedMergeGate` rejects empty,
34
+ sparse, or invalid gate lists and snapshots the supplied array. Later changes to
35
+ that array cannot remove the checks. This does not authenticate arbitrary gate code.
36
+
25
37
  ## Choose a pattern
26
38
 
27
39
  | Pattern | What is isolated | Best for | Notes |
@@ -0,0 +1,97 @@
1
+ # User context setup
2
+
3
+ OMK's shared defaults are provider-neutral, editable markdown. They do not ship
4
+ an operator's personal configuration, install skills, or enable external services.
5
+
6
+ ## Initialize an installed OMK
7
+
8
+ ```bash
9
+ omk init --global --dry-run
10
+ omk init --global
11
+ ```
12
+
13
+ The first command previews the operation without creating even the target directory.
14
+ The second creates missing documents in `~/.omk/agent/`. Both are offline and return
15
+ before migrations, settings, credentials, sessions, extensions, and model startup.
16
+ There is no install hook: installing or updating the npm package does not alter
17
+ user instructions, including when installed with `--ignore-scripts`.
18
+
19
+ Choose another user config directory with the existing environment override:
20
+
21
+ ```bash
22
+ OMK_CODING_AGENT_DIR="/path/to/omk-config" omk init --global --dry-run
23
+ OMK_CODING_AGENT_DIR="/path/to/omk-config" omk init --global
24
+ ```
25
+
26
+ Use the same override when starting OMK. PowerShell users can set
27
+ `$env:OMK_CODING_AGENT_DIR` before running the commands. Paths with spaces and
28
+ non-ASCII characters are supported. The destination must be a real directory,
29
+ not a file or symlink; parent directories should be trusted and user-controlled.
30
+ New files use owner-only permissions on POSIX. Existing directory modes are unchanged.
31
+
32
+ `--global` is required; `init` without a scope or with unsupported flags exits `2`.
33
+ `--help` exits `0`. Setup and preservation succeed with `0`; file or template errors
34
+ exit `1`. `--offline` is accepted but not needed for this command.
35
+
36
+ ## Documents and loading
37
+
38
+ | File | Purpose | Loading |
39
+ | --- | --- | --- |
40
+ | `AGENTS.md` | Work, verification, permissions, skills, runtime identity | Preferred global context entry point |
41
+ | `INTERNET.md` | Source selection, freshness, citations, network permissions | Read on demand when web work is needed |
42
+ | `CLAUDE.md` | Thin interoperability entry point referring to `AGENTS.md` | OMK fallback; another host needs explicit configuration |
43
+
44
+ OMK's entry-point search order within each directory is `AGENTS.md`, `AGENTS.MD`,
45
+ `CLAUDE.md`, then `CLAUDE.MD`; only the first readable file is used. Global context
46
+ loads before ancestor and working-directory context. Markdown links and Claude Code
47
+ `@` imports are not expanded by OMK. `INTERNET.md` and `SOUL.md` are not automatically
48
+ loaded by filename. The starter `AGENTS.md` tells the agent to read `INTERNET.md`
49
+ when relevant, so ordinary coding tasks do not carry the whole web guide.
50
+
51
+ Existing compatibility files `AGENTS.override.md`, `AGENTS.GODMODE.md`, `GODMODE.md`,
52
+ and `ENI.override.md` are also discovered in global and ancestor directories.
53
+ Setup does not generate, import, modify, or delete them. Review old files yourself
54
+ when migrating: installing a new guide does not retire an old override.
55
+
56
+ `--no-context-files` disables discovery. Claude models inside OMK omit discovered
57
+ context by default; `OMK_CLAUDE_CONTEXT_FILES=1` restores it. Setup does not change
58
+ that provider behavior or write the environment override. See [Usage](usage.md#context-files)
59
+ and [Environment variables](environment-variables.md).
60
+
61
+ ## Preserve and customize
62
+
63
+ - No `--force` or automatic overwrite mode is provided. Re-running setup preserves
64
+ existing files, including symlinks and directories at a document filename.
65
+ - If any case variant of `AGENTS.md` or `CLAUDE.md` already exists, setup skips both
66
+ entry-point templates. This avoids shadowing a Claude-only or uppercase setup,
67
+ and avoids a new compatibility import pointing to the wrong filename.
68
+ - A missing `INTERNET.md` can still be created. Any existing case variant is preserved.
69
+ - `settings.json`, authentication, models, MCP configuration, installed packages,
70
+ skills, shell profiles, other hosts' directories, and project files are untouched.
71
+ - Required templates are read before writing. An I/O failure while writing can leave
72
+ earlier files created; setup is not a multi-file transaction. Review the output
73
+ before retrying. Exclusive file creation prevents overwriting a concurrent file.
74
+
75
+ Back up existing documents before manually merging the defaults. Put project commands
76
+ in the project's `AGENTS.md`, local preferences in your global file or
77
+ `AGENTS.override.md`, and no credentials in either. Keep changes small and reload
78
+ with `/reload` or restart OMK. Already-recorded conversation text is not erased by reload.
79
+
80
+ For optional user-installed skills and `defaultActiveSkills`, see [Skills](skills.md)
81
+ and [Settings](settings.md). Neither a skill nor a markdown policy grants tool access.
82
+
83
+ ## Distribution and interoperability
84
+
85
+ The templates live in [`examples/context/`](../examples/context/) inside the package.
86
+ Existing npm `files` and binary asset-copy rules include `examples/`; the initializer
87
+ resolves that directory from the installed package, not from a developer's checkout.
88
+ `OMK_PACKAGE_DIR` retains its documented package-root override.
89
+
90
+ The same templates can be reviewed and copied manually from a source checkout.
91
+ `CLAUDE.md` uses a sibling `@AGENTS.md` import for Claude Code, but OMK does not install
92
+ it into `~/.claude/`. Opt into sharing from that host with an import to the actual
93
+ file path. Other hosts retain their own tool names, hooks, permission model, and
94
+ configuration; using a Claude model in OMK is not running Claude Code.
95
+
96
+ Public defaults are authored in the repository. Do not create a distribution by
97
+ copying a maintainer's agent home, credentials, private skills, or session history.
@@ -25,6 +25,14 @@ Structured next steps on the verdict card: **Apply**, **Deep Check**, **Regenera
25
25
 
26
26
  **Can apply** vs **should submit** are separate gates on the verification receipt: mechanical apply safety is not the same as trusting downstream submission.
27
27
 
28
+ `shouldSubmit` is fail-closed: it requires `canApply`, non-preview evaluation,
29
+ non-empty run IDs, and `CONFIRMED` outcome adjudication. Missing evidence,
30
+ verifier errors, corroborated failures, and previews never authorize submission.
31
+ If a deep check was requested, it must also complete. Its evidence must carry
32
+ non-blank digest and command values and exit code `0`; completion cannot clear
33
+ an existing policy requirement for human review. Local apply policy is unchanged.
34
+ These are evidence gates, not release, merge, or deployment authorization.
35
+
28
36
  ## Fast wall vs deep wall
29
37
 
30
38
  - **Fast wall (default):** Pure policy — diff paths, scope globs, secret-shaped lines, preview-only limits (`BATCH1_NO_DOCKER_RUNNER`). No Docker runner in batch 1.
@@ -238,6 +238,37 @@ For Anthropic-compatible providers using `api: "anthropic-messages"`, set `compa
238
238
  > Use `mistral-conversations` for native Mistral models.
239
239
  > If you intentionally route Mistral-compatible/custom endpoints through `openai-completions`, set `compat` flags explicitly as needed.
240
240
 
241
+ ### ChatGPT Web through codex-chatgpt-web
242
+
243
+ [codex-chatgpt-web](https://github.com/miuuyy/codex-chatgpt-web) runs a loopback Responses bridge (`http://127.0.0.1:17841/v1`) that drives a signed-in ChatGPT Web session from its own launcher. It was written for the Codex CLI, so it refuses a turn that lacks Codex's `client_metadata["x-codex-turn-metadata"]` (`thread_id`, `turn_id`) and the matching `turn_id` on the current user item. Set `compat.sendCodexTurnMetadata: true` on an `openai-responses` provider and OMK sends both: `thread_id` is the OMK session id and `turn_id` is derived from the latest user message, so tool rounds replay the same id and the next prompt starts a new browser turn.
244
+
245
+ ```json
246
+ {
247
+ "providers": {
248
+ "codex-chatgpt-web": {
249
+ "baseUrl": "http://127.0.0.1:17841/v1",
250
+ "api": "openai-responses",
251
+ "apiKey": "codex-chatgpt-web",
252
+ "compat": { "sendCodexTurnMetadata": true },
253
+ "models": [
254
+ { "id": "chatgpt-web/high", "name": "ChatGPT Web — High", "reasoning": true, "input": ["text", "image"], "contextWindow": 80000, "maxTokens": 32768 },
255
+ { "id": "chatgpt-web/pro", "name": "ChatGPT Web — Pro", "reasoning": true, "input": ["text", "image"], "contextWindow": 95000, "maxTokens": 32768, "thinkingLevelMap": { "max": "max" } }
256
+ ]
257
+ }
258
+ }
259
+ }
260
+ ```
261
+
262
+ The bridge ignores the bearer value for `chatgpt-web/*` models (the browser session is the credential), so any placeholder key satisfies OMK's key check. Each `chatgpt-web/*` id pins one ChatGPT mode (`luna`, `think`, `light`, `medium`, `high`, `extra-high`, `pro`, plus `zero-risk` / `zero-risk-pro` for the launcher's manual mode); the bridge fixes the effort per id and ignores the request's `reasoning.effort`, and `pro`/`extra-high` fail explicitly unless the signed-in account exposes them. In the launcher's browser-only mode the model cannot call OMK tools; full mode routes tool calls back through the bridge's MCP connector.
263
+
264
+ OMK's coding-agent supplies its resolved session cwd as a trusted `workspace-write` Codex environment when this compatibility flag is enabled. Direct `omk-ai` callers must pass an absolute `options.cwd` to enable Full harness tools; an absent or relative cwd deliberately carries no filesystem authority, so Full mode fails closed. Bridge 5.0.x binds that environment to the turn metadata (`sandbox`, `workspaces`) and the adjacent `<environment_context>` item; OMK emits exactly that pair, verified against launcher 5.0.4 in full mode with a tool round trip.
265
+
266
+ **Keep the rows in step with the launcher.** The bridge's `/v1/models` document is the only account-aware source, and it publishes two numbers per row: `context_window` is the ceiling past which the bridge rejects a turn, and `auto_compact_token_limit` is the budget it expects a client to compact within (Codex's effective window, 85% of the ceiling). OMK's `contextWindow` drives OMK's own compaction policy (`compaction.maxUsageRatio`, default 0.9, plus output reserves), so the row carries the **budget**: `contextWindow: 80000` above is the launcher's Plus High budget under a 90,000 ceiling, `95000` the Pro budget (ceiling 111,193, or 112,193 for `chatgpt-web/pro`), and a Pro account with Bigger Context advertises 285,000 under 333,579 / 336,579. With the budget in place OMK compacts at about 90% of it, comfortably inside what the bridge accepts. `omk provider sync codex-chatgpt-web` reads the document and rewrites the provider's `chatgpt-web/*` rows (`name`, `contextWindow`, `reasoning`, `input`), preserving `maxTokens`, `cost`, `thinkingLevelMap`, other keys, other providers, and the file's indentation, and records where the numbers came from as `bridgeCatalog` on the provider (`bridgeVersion`, `clientVersion`, `syncedAt`, and each row's `contextCeilings`). `--dry-run` reports the drift without writing and `--json` emits one document; a launcher upgrade or a changed ceiling is recorded even when no row moves. The bridge forwards `/v1/models` to the Codex backend, so the command authenticates with OMK's `openai-codex` OAuth (`/login openai-codex`) and sends a `client_version` (`--client-version`, `OMK_CODEX_CLIENT_VERSION`, `codex --version`, then OMK's last verified version): the backend hides models from clients it considers too old. `omk provider doctor codex-chatgpt-web --level 1` reports the `models-endpoint` probe as failed for this bridge because it probes with the placeholder bearer; use `provider sync --dry-run` as the bridge health check instead.
267
+
268
+ Effort is chosen by the slug, not by OMK's thinking level: `chatgpt-web/pro` runs every turn at ChatGPT's Pro effort (verified on launcher 5.0.4: the browser trace records the effort control switching to a distinct label for medium, high, and pro turns), so pick the `pro` row when you want the maximum. The response length is not capped by OMK either: the bridge accepts `max_output_tokens` but never applies it to a browser turn, so `maxTokens` only sizes OMK's own compaction-summary and context-governor budgets.
269
+
270
+ When the launcher is not running, a turn on a bridge model fails with a message that names the launcher instead of the SDK's generic connection error.
271
+
241
272
  ### Auth Header
242
273
 
243
274
  If your provider expects `Authorization: Bearer <key>` but doesn't use a standard API, set `authHeader: true`:
@@ -721,6 +752,10 @@ interface ProviderModelConfig {
721
752
  thinkingFormat?: "openai" | "openrouter" | "deepseek" | "together" | "zai" | "qwen" | "qwen-chat-template";
722
753
  cacheControlFormat?: "anthropic";
723
754
 
755
+ // openai-responses
756
+ sendSessionIdHeader?: boolean;
757
+ sendCodexTurnMetadata?: boolean;
758
+
724
759
  // anthropic-messages
725
760
  supportsEagerToolInputStreaming?: boolean;
726
761
  supportsLongCacheRetention?: boolean;
@@ -56,11 +56,36 @@ Never use `__dirname` directly for package assets.
56
56
  ## Testing
57
57
 
58
58
  ```bash
59
- ./test.sh # Run non-LLM tests (no API keys needed)
60
- npm test # Run all tests
61
- npm test -- test/specific.test.ts # Run specific test
59
+ ./test.sh # Run the non-LLM suite when a full run is intended
60
+ # Narrow, offline regression from the repository root:
61
+ LIVE_E2E=0 node node_modules/vitest/dist/cli.js --run packages/coding-agent/test/adaptorch-onboarding.test.ts
62
62
  ```
63
63
 
64
+ The root `vitest.config.ts` delegates to each package's Vitest project. This
65
+ preserves package-local setup files and source aliases; a root invocation must
66
+ not silently test stale `dist` dependencies. The coding-agent project resolves
67
+ `omk-adaptorch-wpl` to its source entrypoint during tests.
68
+
69
+ Package-local targeted commands continue to work, for example from
70
+ `packages/coding-agent`:
71
+
72
+ ```bash
73
+ LIVE_E2E=0 node ../../node_modules/vitest/dist/cli.js --run test/adaptorch-onboarding.test.ts
74
+ ```
75
+
76
+ Keep explicit file filters for routine work. A keyless regression pass is not a
77
+ live-provider or release verification, and unfiltered suites may include e2e tests.
78
+
79
+ ## Commit checks
80
+
81
+ The pre-commit hook validates the working tree without changing the selected
82
+ index. It never auto-stages checker edits or unstaged hunks. If a checker changes
83
+ the index, the hook fails and asks you to review the selection again; it does not
84
+ restore or discard those changes. The checks still run against the working tree,
85
+ not an isolated staged snapshot, so review partially staged changes separately.
86
+
87
+ Hook regression: `node --test scripts/test/pre-commit-index.test.mjs`.
88
+
64
89
  ## Project Structure
65
90
 
66
91
  ```
@@ -82,6 +82,8 @@ These variables are read by OMK itself. The four built-in harness flags below ar
82
82
  | `OMK_SKIP_VERSION_CHECK` | Disable the latest-version request |
83
83
  | `OMK_TELEMETRY` | Override install/update telemetry and provider attribution headers: `1`/`true`/`yes` or `0`/`false`/`no` |
84
84
  | `OMK_SHARE_VIEWER_URL` | Override the base URL used by `/share` |
85
+ | `PI_DISABLE_INPUT_REDACTION` | Stop masking credentials on the way to the model and the session. Persistence and report boundaries still mask |
86
+ | `OMK_DISABLE_REDACTION` | Alias for the input-redaction opt-out when `PI_DISABLE_INPUT_REDACTION` is unset. Only `1`/`true`/`yes`/`on` enable it. Forced persistence/report redaction remains active; this does not disable masking everywhere |
85
87
  | `OMK_HARDWARE_CURSOR` | Set to `1` to show the hardware cursor; see [Terminal setup](terminal-setup.md) |
86
88
  | `OMK_CONTEXT_GOVERNOR` | Context Budget V2 process override: `1` forces it on and `0` forces it off; otherwise the global `contextBudget.enabled` setting applies |
87
89
  | `OMK_CONTEXT_GOVERNOR_CACHE` | Set to `memory` to keep representations, negative results, and plans in session memory instead of persisting representations per workspace |
@@ -68,6 +68,10 @@ Do not select `grok-imagine-image`, `grok-imagine-image-quality`, `grok-imagine-
68
68
 
69
69
  Use the normal OMK lane grant model: grant the smallest skill and MCP surface that matches the task, and keep media exceptions explicit.
70
70
 
71
+ For each non-queued native `xai` request started through `AgentSession.prompt()`, OMK calls `selectGrokHarnessSkills()` against the live discovered skill descriptions after ordinary prompt-template expansion. It merges up to three matches with explicit/settings selections and rebuilds that turn's `<active_skills>` marker.
72
+
73
+ The pure `selectSkills()` scorer uses the task plus independent camelCase-aware path-to-skill-name signals, weak 0.35 / strong 0.7 thresholds, deterministic input-order ties, and first-name-wins deduplication. Explicit-only skills are never auto-selected. `headroom` is added only for lexical pressure cues or the session's measured context-pressure bucket. A task with no signals yields an empty automatic grant rather than the full allowlist. Messages queued through `steer`, `followUp`, or `prompt(..., { streamingBehavior })` retain the active run's system prompt; they do not trigger a second skill-selection rebuild.
74
+
71
75
  | Task class | Skills | MCP |
72
76
  | --- | --- | --- |
73
77
  | Multi-package or repo-context work | `packages`; add `headroom` only under context pressure | none by default |
@@ -0,0 +1,154 @@
1
+ # 벤치마크 실패에서 다시 나눈 하네스 책임
2
+
3
+ 2026-09-09. 대상은 Terminal-Bench 2.1의 **중단된 Flash 24-task 개발용 비교**다.
4
+ 새 오케스트레이터를 추가하는 대신, 기존 런타임에서 입력·권한·실행·완료 판정의 책임을
5
+ 분리한다. 이 문서는 구현한 경계와 후속 설계를 구분하며 성능 우위를 주장하지 않는다.
6
+
7
+ ## 1. 무엇을 고쳐야 하는가
8
+
9
+ 비공개 실행 `tb21-flash24-20260908T151234Z-pYN3`의 결과·요청 원장·세션 메타데이터를
10
+ 읽기 전용으로 재집계했다. 고정 dataset SHA는 `5c8eadf1f393183288fa08b8f73ca9a469cc5e00`,
11
+ 실행 소스 HEAD는 `29624c3962d00cc8355191265e7827d9fdf0f3ad`다. 실행에는 미커밋 코드가
12
+ 포함됐으므로 HEAD만으로 실행물을 재현할 수 없다. 실행 manifest의 파일 해시가 별도로 필요하다.
13
+
14
+ | 관측 | 확인된 사실 | 설계 결정 |
15
+ | --- | --- | --- |
16
+ | 완료 범위 | 43/48시행. A 21개, B 22개 | 같은 21쌍만 비교. 미완료 5개를 실패·성공으로 채우지 않음 |
17
+ | 같은 21쌍 해결 | OMK 7, Terminus-2 10 | 최종 24개 점수나 공식 순위가 아님 |
18
+ | OMK 비정상 종료 4건 | 모두 `read`의 image 결과 다음 공급자 계약 거부 | 도구 관측값이 모델 선택을 변경하지 않게 함 |
19
+ | 시간 초과 | OMK 4, Terminus 3 | 원인별 시간 분해 뒤에만 deadline 정책 변경 |
20
+ | 같은 21쌍 요청 | OMK 574, Terminus 617 | 이전 Pro 실험의 요청 증폭 결론을 그대로 재사용하지 않음 |
21
+ | 같은 21쌍 기록된 입력 토큰 | OMK 9,523,530, Terminus 22,752,932 | 토큰 감소만으로 품질·비용 개선을 판정하지 않음 |
22
+ | 동일 tool 인수 반복 | OMK 완료 시행에서 최대 3회 | 반복 차단 임계값을 일괄 낮출 근거 없음 |
23
+ | 중단 상태 | 소유 프로세스가 없는데 `state.json`은 running | supervisor 상태와 살아 있는 실행 소유권을 분리 |
24
+ | 별도 WSL 측정 | OMK 8세션과 자식 프로세스 PSS 약15.8GiB, SwapPSS 약6.4GiB | MCP 시작 전 자원 입장 제어가 필요. benchmark만의 점유량이 아님 |
25
+
26
+ 이미지 실패 4건은 자동 라우팅→계약 거부까지 확인한 인과 경로다. 아래 수정으로 그
27
+ 종료 원인을 없애도 네 task가 해결된다는 뜻은 아니다. 시간 초과 중 `tune-mjcf`의
28
+ 기록된 gateway 시간은 약120초, `db-wal-recovery`는 약712초였다. 나머지 시간을 모두
29
+ 도구 낭비라고 추정하지 않는다. 대기·tool·검증·호스트 압박 측정이 더 필요하다.
30
+
31
+ ## 2. 선택한 구조
32
+
33
+ ```text
34
+ 원본 session / tool artifact [보관·재생]
35
+
36
+ 사용자가 선택한 모델 + 명시적 사용자 첨부 [모델 선택]
37
+
38
+ ProviderInputProjection [전송 표현]
39
+ ├─ 지원하는 입력: 유지
40
+ └─ text-only + tool image: 명시적 미관측 안내
41
+
42
+ ModelContract → provider-specific payload check [허용·거부]
43
+
44
+ SDK/provider → tool execution → 실행 관측 [실행]
45
+
46
+ classifyRunTermination → durable run journal [시도 종료]
47
+
48
+ prompt_settled (retry·continuation 종료 후) [프롬프트 종료]
49
+
50
+ CLI exit status ── text / JSON renderer [보고]
51
+ ```
52
+
53
+ 원본 보관은 입력 변환과 별개다. 계약 검사는 입력을 해석하거나 임의 모델을 선택하지 않는다.
54
+ `agent_end`는 재시도 전의 시도 종료일 수 있으므로 CLI의 최종 판정으로 바로 쓰지 않는다.
55
+ 종료 코드 0이나 `prompt_settled=completed`도 외부 verifier의 해결 판정과는 다르다.
56
+
57
+ 선행연구는 [SWE-agent의 ACI 연구](https://arxiv.org/abs/2405.15793v3)의 초록을 확인했다.
58
+ 모델과 도구 사이의 인터페이스를 먼저 고친다는 방향의 참고 자료이며, 이 변경의 구현
59
+ 세부사항이나 TB 성능 이득을 증명하는 자료가 아니다. 새 학습형 라우터·judge·앙상블은
60
+ 이번 실패 원인을 해결하지 않으므로 추가하지 않는다.
61
+
62
+ ## 3. 이번에 구현한 경계
63
+
64
+ ### 입력 표현: provider-input.ts
65
+
66
+ `packages/agent/src/provider-input.ts`는 `projectToolImagesForModel()`을 제공한다.
67
+ 계약이 있는 core/SDK 경로에서만 사용한다.
68
+
69
+ - text-only 모델의 `toolResult` 이미지 블록만 텍스트 안내로 바꾼다. 시각 내용을
70
+ 추측하거나 OCR 결과를 만들어 내지 않는다.
71
+ - 기존 text, tool-call ID, 오류 여부와 순서를 유지한다. 원본 세션의 image는 수정하지 않는다.
72
+ - 현재 모델이 이미지 입력을 지원하면 그대로 전송한다. 사용자 첨부는 자동 제거하지 않는다.
73
+ - 계약 모드에서는 **tool 이미지로 자동 vision 모델을 선택하지 않는다**. 사용자 이미지가
74
+ 있는 경우는 기존 vision 라우트를 검사하고, 허용된 vision 모델이면 모든 첨부를 유지한다.
75
+ - 계약 없는 일반 제품 경로는 기존 자동 vision 라우팅을 유지한다.
76
+ - core의 `provider_request.omittedToolImages`는 해당 요청에서 생략한 이미지 수다.
77
+ 누적 제거량이나 이미지 해석 성공률이 아니다. SDK 요약은 동일 변환을 쓰지만 아직 이
78
+ core 사건 원장의 소비자가 아니므로 별도의 완전한 요청 원장으로 주장하지 않는다.
79
+
80
+ 이는 원본 이미지 메모리를 줄이는 변경이 아니다. read producer의 decode/resize나
81
+ 세션 내 base64 저장을 없애지 않았다. 그 부분은 아래 artifact-reference 후속 단위다.
82
+
83
+ ### 원인 분류: session-run-termination.ts
84
+
85
+ 기존 `AgentSession`의 종료 원인 분류를 별도 순수 함수로 옮겼다. 세션 수명주기와
86
+ 원장 append 책임은 그대로 두고, 시계·모델·관측된 거부/timeout을 분류기에 전달한다.
87
+
88
+ `provider_denied(contract-violation)`가 관측된 core run은 문자열 추측보다 먼저
89
+ `configuration.invalid`, `retryable=false`로 분류한다. 계약을 완화하거나 다른 모델로
90
+ 전환하는 재시도는 추가하지 않는다. 다음 run에서 원인을 초기화한다.
91
+ 이전 로그의 `retryable=true`는 잘못된 안내였으며, 그것만으로 실제 재시도 지출이
92
+ 발생했다고 주장하지 않는다. SDK/사용자 정의 stream의 모든 오류까지 이 사건으로
93
+ 변환한 것은 아니다.
94
+
95
+ ### CLI 결과: print-mode.ts
96
+
97
+ 최종 실패 판단은 renderer 바깥에 둔다. 각 `session.prompt()`가 끝난 뒤
98
+ `prompt_settled` 결과를 확인한다. 이 사건이 없는 호환 경로에서는 해당 프롬프트의
99
+ assistant error/abort와 typed termination을 확인한다.
100
+
101
+ text와 JSON 모두 실패 시 종료 코드 1을 반환하고 후속 CLI 프롬프트를 실행하지 않는다.
102
+ 내부 재시도에서 한 번 실패했어도 최종 settlement가 성공이면 실패로 고정하지 않는다.
103
+ 실행 전부터 존재하던 이전 termination을 새 프롬프트의 실패로 재사용하지 않는다.
104
+
105
+ ## 4. 다음 고도화: 작은 독립 단위로 구현
106
+
107
+ 아래는 **설계이며 아직 구현하지 않았다**. 이번 실행이나 기본 설정에 몰래 적용하지 않는다.
108
+
109
+ | 단위 | 기존 책임과 연결 지점 | 수용 기준·중단 기준 |
110
+ | --- | --- | --- |
111
+ | H1: 실행 소유권·재개 | benchmark supervisor, `run-journal-store.ts` | PID뿐 아니라 boot ID+process start+heartbeat로 소유권 식별. 중단 시 미확정 요청·원본 결과 보존. 재시도는 새 attempt이며 사용자 승인 필요 |
112
+ | H2: 공유 시간 예산 | prompt 수명주기, provider signal, `tool-timeout.ts` | 단조 시계 deadline 하나를 모든 대기에 전달. 남은 예산에서 검증·정리 시간을 예약. queue/model/tool/cleanup 구간 측정; fake-clock·child 종료·부분 결과 보존 검사 통과 전 활성화 금지 |
113
+ | H3: artifact-reference 입력 | read producer, 세션 저장, provider-input | 큰 이미지/출력을 파일·digest·MIME·크기 참조로 보관. text-only 요청은 decoding 이전에 metadata만 사용. 원본 회수·권한·수명·재생 동일성을 검사하며 조용한 정보 손실 금지 |
114
+ | H4: MCP 입장 제어 | MCP manager의 spawn, 기존 resource admission | 사용자 선택 loadout에서 필요할 때 시작. 실제 소유 child에만 종료·유휴회수 적용. 다른 세션·인증·프로젝트 경계를 공유하지 않음. host memory pressure와 startup 비용을 전후 측정 |
115
+ | H5: 단일 요청 원장 | core 사건+SDK 요약+provider HTTP 경계 | run/trial/attempt/request ID로 시작·완료·거부·미확정을 연결. 시간창 귀속 금지. 사용량 결측을0으로 대체하지 않음. redaction·append 실패는 평가 completeness에 반영 |
116
+
117
+ H1→H2→H3/H4→H5 순으로 무조건 전부 재작성하지 않는다. 먼저 각각의 현재 호출 경로와
118
+ 검사로 최소 diff를 정한다. H2는 “더 빨리 포기하기”가 목표가 아니며, H4는 머신 전체의
119
+ 프로세스나 Docker를 일괄 종료하는 기능이 아니다. global MCP pool은 인증 격리 비용이
120
+ 크므로 첫 구현에서 제외한다.
121
+
122
+ ## 5. 검증과 주장 범위
123
+
124
+ 이번 회귀는 공개 합성 입력만 사용했다. benchmark task 이름에 따라 동작을 바꾸거나
125
+ 원본 정답·verifier를 모델에 노출하지 않았다. 원본 실행물·결과·STOP 상태는 그대로다.
126
+
127
+ | 검증 | 증명하는 범위 |
128
+ | --- | --- |
129
+ | core 이미지 회귀 | text-only 모델 유지, 원본 불변, idempotent 입력, 사용자 이미지 거부/허용, legacy 라우팅 유지 |
130
+ | SDK 요약 회귀 | 요약에도 동일한 이미지 projection, 계약 거부 후 다음 허용 run 복구 |
131
+ | 실제 소스 CLI + loopback HTTP | 실제 read image→두 번째 모델 요청 성공, raw 이벤트의 원본 image 보존, 최종 요청에 image payload 없음 |
132
+ | CLI text/JSON 회귀 | 금지 모델의 네트워크0·exit1, settlement 실패 전파, 실패 후 후속 프롬프트 중단, 내부 복구 성공 보존 |
133
+ | 기존 런타임 회귀 | auth/network/quota/abort/tool/persistence/compaction 분류와 기존 계약 유지 |
134
+
135
+ 구현 전에는 core 이미지 2개, SDK 요약/분류 2개, CLI 결과 5개 요구 검사가 실제 실패했다.
136
+ 직접 검토 중 사용자 이미지로 허용된 vision 모델을 선택했을 때 tool image까지 제거되는
137
+ 문제를 별도 RED로 발견하고 수정했다. 테스트 타입/fixture 오류는 제품 RED에 합산하지 않는다.
138
+
139
+ 실행 명령은 해당 package 디렉터리 기준이다. 메모리 부담을 줄이기 위해 worker 1로 실행한다.
140
+
141
+ ```bash
142
+ # packages/agent
143
+ node ../../node_modules/vitest/dist/cli.js --run test/provider-input.test.ts test/provider-request-boundary.test.ts --maxWorkers=1 --no-file-parallelism
144
+ # packages/coding-agent
145
+ node ../../node_modules/vitest/dist/cli.js --run test/sdk-model-contract.test.ts test/print-mode.test.ts test/model-contract-wire-cli.test.ts test/agent-session-termination-runtime.test.ts --maxWorkers=1 --no-file-parallelism
146
+ # repository root
147
+ node_modules/.bin/tsgo --noEmit --pretty false
148
+ npm run check
149
+ ```
150
+
151
+ 실제 모델 재호출·벤치마크 재개·WSL 재시작·빌드/설치·커밋은 이번 작업에서 하지 않는다.
152
+ 본 변경은 중단된 24-task 결과를 보정하지 않는다. 재측정 전에 실행 snapshot과 양 arm의
153
+ 동일 조건을 다시 고정해야 한다. 현재 본 적 있는 24개는 개발 집합으로 유지하고,
154
+ 일반화 주장은 별도의 사전 고정 확인 평가로 검증한다.
@@ -0,0 +1,90 @@
1
+ # OMK 하네스 개선 점검 — 2026-09-05
2
+
3
+ 기준은 `60f520f0c1`에서 시작한 현재 작업 트리입니다. 시작 시 다른 작업의
4
+ 미커밋 변경이 존재했으며 이를 보존했습니다. 아래는 주요 실행 경로에 대한
5
+ 소스·로컬 회귀 테스트 점검이지, 전체 코드 감사나 성능·SOTA 인증이 아닙니다.
6
+ 이번 변경은 작업 트리 상태이며 배포·릴리스된 기능으로 간주하지 않습니다.
7
+
8
+ ## 이번에 수정한 항목
9
+
10
+ | 우선순위 | 관찰한 문제 | 수정과 증거 |
11
+ | --- | --- | --- |
12
+ | P0 | WPL의 `shouldSubmit`이 BLOCKED 여부만 확인해 preview·증거 부족·검증기 오류도 제출 가능으로 표시 | `b2c-mapper.ts`에서 적용 가능 + non-preview + run ID + `CONFIRMED`를 모두 요구. `submission-gates.test.ts`로 실패·누락·성공 대조 |
13
+ | P0 | deep runner의 음수·비정수·실패 종료 코드와 공백 증거가 완료로 인정됨 | `deep-wall.ts`에서 비어 있지 않은 digest/command와 종료 코드 `0` 요구. `deep-wall-gates.test.ts` |
14
+ | P0 | 완료된 deep check가 기존 BLOCKED/INCONCLUSIVE의 사람 검토 요구를 삭제 | `evaluate-correctness-wall.ts`가 기존 검토 요구를 유지하고, 요청한 deep check가 불가능하면 제출을 보류 |
15
+ | P1 | 같은 테스트가 패키지 디렉터리에서는 통과하지만 저장소 루트에서는 오래된 WPL `dist`를 읽어 실패 | 루트 Vitest 프로젝트 설정과 coding-agent의 WPL 소스 alias 추가. 루트 실행에서 7개 실패를 재현한 뒤 같은 테스트 통과 |
16
+ | P1 | WPL 사용자용 웹 가입·상담 접점과 키 없는 CLI 안내가 없음 | `getAdaptOrchLinks()`와 `omk doctor adaptorch --links [--json]` 추가. 고정 URL·UTM만 제공하며 정책 판정과 분리 |
17
+
18
+ WPL의 `canApply`와 기존 shadow/soft/hard 적용 정책은 바꾸지 않았습니다.
19
+ 증거 요건을 충족한 `shouldSubmit=true`도 사람의 커밋·병합·배포 승인을 대신하지 않습니다.
20
+ CTA를 verdict, 서명 receipt, 모델 프롬프트 또는 tool 실행 게이트에 끼워 넣지 않았습니다.
21
+
22
+ ## 다음 개선 순서
23
+
24
+ | 우선순위 | 영역 / 현재 근거 | 후속 작업과 완료 기준 |
25
+ | --- | --- | --- |
26
+ | P0 | 전체 정적 검사: 아래 기존 파일의 Biome 오류 4개와 module-size 초과 5개 | 해당 변경 소유자가 수정한 뒤 `npm run check` 전체를 다시 통과시킬 것. 이번 작업 밖의 diff나 크기 baseline을 임의 수정하지 않음 |
27
+ | P1 | 완료·취소·재시도: `prompt-settlement.ts`, `session-termination.ts`, `tool-timeout-settlement.ts` | 중간 `agent_end`와 최종 완료를 계속 분리. timeout 후 계속 쓰는 도구, 큐 취소, 중단 복원 조합을 실제 세션 경계 회귀에 추가 |
28
+ | P1 | 컨텍스트·스킬: Context Budget V2와 Grok의 요청별 skill 선택은 별도 경로 | 공급자별 컨텍스트 비용·캐시 적중·compaction 후 명시 규칙 보존을 같은 작업으로 비교. 일반 공급자로 확장하기 전에 explicit-only 권한과 토큰 상한 회귀 확보 |
29
+ | P1 | 공급자·도구 계약: `tool-schema`와 종료 원인 분류 테스트 | 인증/모델 미지원/환경 실패를 후보 코드 실패와 계속 구분. JSON schema 정규화와 tool pair 수선 후 공급자별 키 없는 cassette 회귀를 일관된 진입점에서 실행 |
30
+ | P2 | 자원·스케줄링: DAG scheduler, resource admission의 현재 테스트 | `observe` 데이터를 먼저 수집하고 p95 지연·메모리·중복 도구 실행을 측정. adaptive 기본값 변경이나 자동 fan-out은 별도 승인·비교 실험 이후 |
31
+ | P2 | 구조: 큰 session/interactive 모듈과 버전이 다른 런타임 설명 | 동작 변경과 파일 이동을 분리하고 역할별 모듈 크기·import-cycle 기준을 유지. 오래된 문서는 실제 소비자·기본값·revision에 묶어 갱신 |
32
+ | P2 | CRM: 이번 변경은 링크 전달까지만 구현 | 사이트 측 동의 기반 UTM 보존 → 가입/상담 제출 → 첫 사용 이벤트를 연결하고, 로컬 평가와 호스티드 사용을 분리 집계. 링크 출력은 전환이 아님 |
33
+
34
+ 측정은 [Turn metrics](metrics.md)의 동일 모델·공급자·작업·예산 비교 계약을 따릅니다.
35
+ 회귀 테스트 통과만으로 더 빠르다거나 정확도가 높아졌다고 주장하지 않습니다.
36
+ AdaptOrch 브리지는 계속 기본 비활성·advisory이며, WPL은 기본 CLI에서
37
+ 자동 dispatch/polling 루프가 되지 않습니다.
38
+
39
+ ## 검증 기록
40
+
41
+ - 제출/deep-check 신규 회귀: 수정 전 **25개 중 17개 실패**, 수정 후 모두 통과.
42
+ - CRM 안내 신규 회귀: 수정 전 **8개 중 7개 실패**, 수정 후 모두 통과.
43
+ - WPL 관련 **9개 파일 / 68개 테스트 통과**. 변경한 mapper, deep wall, evaluator,
44
+ service links 네 모듈의 V8 커버리지: **lines 98.74%, branches 94.7%, functions 100%**.
45
+ `service-links.ts`는 모든 지표 100%.
46
+ - coding-agent 하네스/컨텍스트/자원/브리지/벽 회귀 **13개 파일 / 154개 통과**.
47
+ - 기존 doctor + 신규 offline handoff **2개 파일 / 20개 통과**.
48
+ - 실제 소스 CLI 진입점 3개 시나리오와 agent scheduler/timeout/harness,
49
+ AI tool schema를 루트에서 함께 실행: **5개 파일 / 48개 통과**.
50
+ - 최종 루트 통합 실행: 위의 **29개 파일 / 290개 테스트 모두 통과**, 종료 코드 `0`.
51
+ - 루트 `node_modules/.bin/tsgo --noEmit`: 종료 코드 `0`. 변경 TypeScript 13개 파일의 LSP 오류 없음.
52
+ - 변경 소스·테스트 Biome 검사와 범위 지정 `git diff --check`: 종료 코드 `0`.
53
+ - `check:doc-links`, `check:feature-claims`, `check:private-home`, `check:import-cycles`:
54
+ 각각 별도 실행에서 종료 코드 `0`. private-home 검사는 추적 중인 파일 범위입니다.
55
+ - `npm run check`: 종료 코드 `1`, 아래 기존 파일의 import 정렬/포맷 오류 4개에서 중단.
56
+ 이후 연결된 전체 게이트가 실행됐다고 간주하지 않습니다.
57
+ - 별도 `npm run check:module-size`: 종료 코드 `1`, 이번에 수정하지 않은 아래 5개 모듈이
58
+ 기존 baseline을 초과. 새 baseline을 등록해 오류를 숨기지 않았습니다.
59
+
60
+ 전체 검사를 막은 이번 작업 밖의 파일:
61
+
62
+ - `packages/ai/src/utils/oauth/meta.ts`
63
+ - `packages/ai/test/openai-responses-codex-turn-metadata.test.ts`
64
+ - `packages/coding-agent/test/mcp/tools.test.ts`
65
+ - `packages/coding-agent/test/session-termination.test.ts`
66
+
67
+ Module-size 초과 파일 (현재 pure LOC / baseline):
68
+
69
+ - `packages/agent/src/harness/reverse-skill.ts`: 905 / 792
70
+ - `packages/ai/src/types.ts`: 362 / 361
71
+ - `packages/coding-agent/src/core/model-registry.ts`: 886 / 885
72
+ - `packages/coding-agent/src/core/provider-usage.ts`: 996 / 994
73
+ - `packages/coding-agent/src/modes/interactive/interactive-mode.ts`: 5574 / 5473
74
+
75
+ 주요 신규 계약 재실행:
76
+
77
+ ```bash
78
+ LIVE_E2E=0 node node_modules/vitest/dist/cli.js --run \
79
+ packages/adaptorch-wpl/test/submission-gates.test.ts \
80
+ packages/adaptorch-wpl/test/deep-wall-gates.test.ts \
81
+ packages/adaptorch-wpl/test/service-links.test.ts \
82
+ packages/coding-agent/test/adaptorch-onboarding.test.ts \
83
+ packages/coding-agent/test/adaptorch-doctor-cli.test.ts \
84
+ packages/coding-agent/test/adaptorch-links-cli.test.ts
85
+ ```
86
+
87
+ 명시적으로 미검증: 실제 Docker runner, 실제 인증 API 요청, 사이트 가입·상담
88
+ 저장, 클릭/전환 집계, 유료 provider 실행, 전체 e2e, 설치된 배포본/TUI 반영.
89
+ 벤치마크·AdaptOrch 실행·배포·커밋은 수행하지 않았습니다.
90
+ CRM 사용법과 개인정보 경계는 [AdaptOrch 안내](adaptorch-onboarding.md)를 참조하세요.
package/docs/json.md CHANGED
@@ -75,6 +75,25 @@ Followed by events as they occur:
75
75
  {"type":"agent_end","messages":[...]}
76
76
  ```
77
77
 
78
+ ## Completion and exit status
79
+
80
+ `agent_end` closes an attempt, not necessarily the whole prompt: retries and
81
+ continuations may still run. Use `prompt_settled` for the final prompt outcome
82
+ (`completed`, `failed`, or `aborted`). Neither event proves task correctness.
83
+
84
+ Print mode returns exit code **1** for a final failed or aborted prompt in both
85
+ text and JSON output. If several CLI prompts were supplied, it stops at the first
86
+ failed prompt instead of hiding it with a later success. An internally recovered
87
+ attempt followed by a completed prompt still exits successfully. No prompt is an
88
+ argument error (exit code **2**).
89
+
90
+ Keep `pipefail` when filtering events, or the filter can hide OMK's nonzero status:
91
+
92
+ ```bash
93
+ set -o pipefail
94
+ omk --mode json "List files" | jq -c 'select(.type == "prompt_settled")'
95
+ ```
96
+
78
97
  ## Example
79
98
 
80
99
  ```bash
@@ -87,7 +87,7 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
87
87
  | `app.exit` | `ctrl+d` | Exit (when editor empty) |
88
88
  | `app.suspend` | `ctrl+z` (none on Windows) | Suspend to background |
89
89
  | `app.editor.external` | `ctrl+g` | Open in external editor (`$VISUAL` or `$EDITOR`) |
90
- | `app.clipboard.pasteImage` | `ctrl+v` (`alt+v` on Windows) | Paste image from clipboard |
90
+ | `app.clipboard.pasteImage` | `ctrl+v`, `alt+v` | Paste image from clipboard; use `alt+v` when Windows Terminal consumes `ctrl+v` |
91
91
 
92
92
  ### Sessions
93
93
 
@@ -118,7 +118,7 @@ Modifier combinations: `ctrl+shift+x`, `alt+ctrl+x`, `ctrl+shift+alt+x`, `ctrl+1
118
118
 
119
119
  | Keybinding id | Default | Description |
120
120
  |--------|---------|-------------|
121
- | `app.tools.expand` | `ctrl+o` | Collapse or expand tool output |
121
+ | `app.tools.expand` | `ctrl+o` | Collapse or expand tool output and typed failure details |
122
122
  | `app.message.followUp` | `alt+enter` | Queue follow-up message |
123
123
  | `app.message.dequeue` | `alt+up` | Restore queued messages to editor |
124
124