context-brake 0.0.0-stage → 1.0.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 (506) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +361 -2
  3. package/dist/assets/runtime/antigravity-cli-hook.mjs +19174 -0
  4. package/dist/assets/runtime/claude-code-hook.mjs +19302 -0
  5. package/dist/assets/runtime/claude-code-mod.mjs +18579 -0
  6. package/dist/assets/runtime/claude-code-statusline.mjs +18749 -0
  7. package/dist/assets/runtime/codex-cli-hook.mjs +19299 -0
  8. package/dist/assets/runtime/context-brake-runtime.mjs +6 -0
  9. package/dist/assets/runtime/cursor-hook.mjs +19181 -0
  10. package/dist/assets/runtime/github-copilot-cli-hook.mjs +19186 -0
  11. package/dist/assets/runtime/omp-extension.js +19237 -0
  12. package/dist/assets/runtime/omp-restart.js +18763 -0
  13. package/dist/assets/runtime/opencode-plugin.js +19200 -0
  14. package/dist/assets/runtime/pi-extension.js +19228 -0
  15. package/dist/assets/runtime/pi-restart.js +18758 -0
  16. package/dist/src/cli/argument-parser.d.ts +20 -0
  17. package/dist/src/cli/argument-parser.js +45 -0
  18. package/dist/src/cli/argument-validator.d.ts +8 -0
  19. package/dist/src/cli/argument-validator.js +24 -0
  20. package/dist/src/cli/assistant/ask.d.ts +10 -0
  21. package/dist/src/cli/assistant/ask.js +36 -0
  22. package/dist/src/cli/assistant/assistant-context.d.ts +9 -0
  23. package/dist/src/cli/assistant/assistant-context.js +18 -0
  24. package/dist/src/cli/assistant/assistant-questions.d.ts +3 -0
  25. package/dist/src/cli/assistant/assistant-questions.js +26 -0
  26. package/dist/src/cli/assistant/assistant-session.d.ts +5 -0
  27. package/dist/src/cli/assistant/assistant-session.js +25 -0
  28. package/dist/src/cli/assistant/clack-prompt-port.d.ts +14 -0
  29. package/dist/src/cli/assistant/clack-prompt-port.js +47 -0
  30. package/dist/src/cli/assistant/equivalent-command.d.ts +1 -0
  31. package/dist/src/cli/assistant/equivalent-command.js +16 -0
  32. package/dist/src/cli/assistant/prompt-factory.d.ts +3 -0
  33. package/dist/src/cli/assistant/prompt-factory.js +16 -0
  34. package/dist/src/cli/assistant/prompt-port.d.ts +14 -0
  35. package/dist/src/cli/assistant/prompt-port.js +28 -0
  36. package/dist/src/cli/assistant/questions-gitignore.d.ts +7 -0
  37. package/dist/src/cli/assistant/questions-gitignore.js +14 -0
  38. package/dist/src/cli/assistant/questions-harness.d.ts +9 -0
  39. package/dist/src/cli/assistant/questions-harness.js +52 -0
  40. package/dist/src/cli/assistant/questions-misc.d.ts +10 -0
  41. package/dist/src/cli/assistant/questions-misc.js +25 -0
  42. package/dist/src/cli/assistant/questions-restart.d.ts +15 -0
  43. package/dist/src/cli/assistant/questions-restart.js +51 -0
  44. package/dist/src/cli/assistant/questions-snapshot.d.ts +9 -0
  45. package/dist/src/cli/assistant/questions-snapshot.js +64 -0
  46. package/dist/src/cli/assistant/snapshot-specs.d.ts +4 -0
  47. package/dist/src/cli/assistant/snapshot-specs.js +22 -0
  48. package/dist/src/cli/assistant/summary.d.ts +2 -0
  49. package/dist/src/cli/assistant/summary.js +34 -0
  50. package/dist/src/cli/assistant/types.d.ts +37 -0
  51. package/dist/src/cli/assistant/types.js +1 -0
  52. package/dist/src/cli/assistant/ui-prompt.d.ts +29 -0
  53. package/dist/src/cli/assistant/ui-prompt.js +1 -0
  54. package/dist/src/cli/commands/doctor.d.ts +3 -0
  55. package/dist/src/cli/commands/doctor.js +56 -0
  56. package/dist/src/cli/commands/init.d.ts +4 -0
  57. package/dist/src/cli/commands/init.js +26 -0
  58. package/dist/src/cli/commands/remove.d.ts +3 -0
  59. package/dist/src/cli/commands/remove.js +62 -0
  60. package/dist/src/cli/composition-root.d.ts +3 -0
  61. package/dist/src/cli/composition-root.js +62 -0
  62. package/dist/src/cli/confirmation.d.ts +6 -0
  63. package/dist/src/cli/confirmation.js +22 -0
  64. package/dist/src/cli/detection-collector.d.ts +14 -0
  65. package/dist/src/cli/detection-collector.js +31 -0
  66. package/dist/src/cli/exit-codes.d.ts +8 -0
  67. package/dist/src/cli/exit-codes.js +8 -0
  68. package/dist/src/cli/gitignore-findings.d.ts +3 -0
  69. package/dist/src/cli/gitignore-findings.js +11 -0
  70. package/dist/src/cli/handoff-findings.d.ts +5 -0
  71. package/dist/src/cli/handoff-findings.js +15 -0
  72. package/dist/src/cli/init-arguments.d.ts +25 -0
  73. package/dist/src/cli/init-arguments.js +70 -0
  74. package/dist/src/cli/init-config-state.d.ts +14 -0
  75. package/dist/src/cli/init-config-state.js +19 -0
  76. package/dist/src/cli/init-config-updates.d.ts +13 -0
  77. package/dist/src/cli/init-config-updates.js +35 -0
  78. package/dist/src/cli/init-flow.d.ts +14 -0
  79. package/dist/src/cli/init-flow.js +72 -0
  80. package/dist/src/cli/init-option-rules.d.ts +11 -0
  81. package/dist/src/cli/init-option-rules.js +29 -0
  82. package/dist/src/cli/main.d.ts +3 -0
  83. package/dist/src/cli/main.js +62 -0
  84. package/dist/src/cli/output/detection-text.d.ts +2 -0
  85. package/dist/src/cli/output/detection-text.js +3 -0
  86. package/dist/src/cli/output/doctor-mode-text.d.ts +2 -0
  87. package/dist/src/cli/output/doctor-mode-text.js +12 -0
  88. package/dist/src/cli/output/doctor-sessions-text.d.ts +2 -0
  89. package/dist/src/cli/output/doctor-sessions-text.js +12 -0
  90. package/dist/src/cli/output/json.d.ts +1 -0
  91. package/dist/src/cli/output/json.js +3 -0
  92. package/dist/src/cli/output/text.d.ts +5 -0
  93. package/dist/src/cli/output/text.js +68 -0
  94. package/dist/src/cli/snapshot-helper.d.ts +3 -0
  95. package/dist/src/cli/snapshot-helper.js +25 -0
  96. package/dist/src/cli/terminal.d.ts +9 -0
  97. package/dist/src/cli/terminal.js +18 -0
  98. package/dist/src/core/contracts/adapter.d.ts +49 -0
  99. package/dist/src/core/contracts/adapter.js +1 -0
  100. package/dist/src/core/contracts/auto-restart.d.ts +10 -0
  101. package/dist/src/core/contracts/auto-restart.js +10 -0
  102. package/dist/src/core/contracts/changes.d.ts +219 -0
  103. package/dist/src/core/contracts/changes.js +13 -0
  104. package/dist/src/core/contracts/configuration.d.ts +81 -0
  105. package/dist/src/core/contracts/configuration.js +52 -0
  106. package/dist/src/core/contracts/context-window-report.d.ts +16 -0
  107. package/dist/src/core/contracts/context-window-report.js +8 -0
  108. package/dist/src/core/contracts/diagnostics.d.ts +546 -0
  109. package/dist/src/core/contracts/diagnostics.js +35 -0
  110. package/dist/src/core/contracts/handoff.d.ts +10 -0
  111. package/dist/src/core/contracts/handoff.js +3 -0
  112. package/dist/src/core/contracts/harness.d.ts +73 -0
  113. package/dist/src/core/contracts/harness.js +23 -0
  114. package/dist/src/core/contracts/hook-phase.d.ts +12 -0
  115. package/dist/src/core/contracts/hook-phase.js +1 -0
  116. package/dist/src/core/contracts/manifest.d.ts +69 -0
  117. package/dist/src/core/contracts/manifest.js +20 -0
  118. package/dist/src/core/contracts/processes.d.ts +24 -0
  119. package/dist/src/core/contracts/processes.js +1 -0
  120. package/dist/src/core/contracts/restart-host.d.ts +32 -0
  121. package/dist/src/core/contracts/restart-host.js +3 -0
  122. package/dist/src/core/contracts/restart-log.d.ts +52 -0
  123. package/dist/src/core/contracts/restart-log.js +15 -0
  124. package/dist/src/core/contracts/runtime.d.ts +50 -0
  125. package/dist/src/core/contracts/runtime.js +1 -0
  126. package/dist/src/core/contracts/session-ledger.d.ts +144 -0
  127. package/dist/src/core/contracts/session-ledger.js +38 -0
  128. package/dist/src/core/contracts/statusline-line.d.ts +20 -0
  129. package/dist/src/core/contracts/statusline-line.js +13 -0
  130. package/dist/src/core/contracts/zones.d.ts +18 -0
  131. package/dist/src/core/contracts/zones.js +4 -0
  132. package/dist/src/core/services/active-sessions.d.ts +17 -0
  133. package/dist/src/core/services/active-sessions.js +35 -0
  134. package/dist/src/core/services/asset-currency.d.ts +17 -0
  135. package/dist/src/core/services/asset-currency.js +72 -0
  136. package/dist/src/core/services/auto-restart-merge.d.ts +26 -0
  137. package/dist/src/core/services/auto-restart-merge.js +30 -0
  138. package/dist/src/core/services/auto-restart-notices.d.ts +6 -0
  139. package/dist/src/core/services/auto-restart-notices.js +27 -0
  140. package/dist/src/core/services/auto-restart-policy.d.ts +26 -0
  141. package/dist/src/core/services/auto-restart-policy.js +23 -0
  142. package/dist/src/core/services/brake-engine.d.ts +24 -0
  143. package/dist/src/core/services/brake-engine.js +61 -0
  144. package/dist/src/core/services/change-plan-service.d.ts +11 -0
  145. package/dist/src/core/services/change-plan-service.js +60 -0
  146. package/dist/src/core/services/config-legacy-checks.d.ts +6 -0
  147. package/dist/src/core/services/config-legacy-checks.js +28 -0
  148. package/dist/src/core/services/debug-mode-merge.d.ts +25 -0
  149. package/dist/src/core/services/debug-mode-merge.js +21 -0
  150. package/dist/src/core/services/detection-service.d.ts +6 -0
  151. package/dist/src/core/services/detection-service.js +54 -0
  152. package/dist/src/core/services/doctor-checks.d.ts +6 -0
  153. package/dist/src/core/services/doctor-checks.js +24 -0
  154. package/dist/src/core/services/doctor-report-extras.d.ts +11 -0
  155. package/dist/src/core/services/doctor-report-extras.js +23 -0
  156. package/dist/src/core/services/doctor-service.d.ts +24 -0
  157. package/dist/src/core/services/doctor-service.js +82 -0
  158. package/dist/src/core/services/failure-policy.d.ts +38 -0
  159. package/dist/src/core/services/failure-policy.js +63 -0
  160. package/dist/src/core/services/gitignore-block.d.ts +10 -0
  161. package/dist/src/core/services/gitignore-block.js +61 -0
  162. package/dist/src/core/services/gitignore-merge.d.ts +23 -0
  163. package/dist/src/core/services/gitignore-merge.js +21 -0
  164. package/dist/src/core/services/gitignore-plan.d.ts +34 -0
  165. package/dist/src/core/services/gitignore-plan.js +65 -0
  166. package/dist/src/core/services/harness-exclusion.d.ts +14 -0
  167. package/dist/src/core/services/harness-exclusion.js +19 -0
  168. package/dist/src/core/services/harness-removal.d.ts +23 -0
  169. package/dist/src/core/services/harness-removal.js +34 -0
  170. package/dist/src/core/services/injection-policy.d.ts +9 -0
  171. package/dist/src/core/services/injection-policy.js +5 -0
  172. package/dist/src/core/services/installation-adapters.d.ts +21 -0
  173. package/dist/src/core/services/installation-adapters.js +28 -0
  174. package/dist/src/core/services/installation-builder.d.ts +24 -0
  175. package/dist/src/core/services/installation-builder.js +66 -0
  176. package/dist/src/core/services/installation-findings.d.ts +5 -0
  177. package/dist/src/core/services/installation-findings.js +19 -0
  178. package/dist/src/core/services/installation-service.d.ts +36 -0
  179. package/dist/src/core/services/installation-service.js +50 -0
  180. package/dist/src/core/services/manifest-change.d.ts +11 -0
  181. package/dist/src/core/services/manifest-change.js +16 -0
  182. package/dist/src/core/services/no-harness-finding.d.ts +3 -0
  183. package/dist/src/core/services/no-harness-finding.js +9 -0
  184. package/dist/src/core/services/removal-helper.d.ts +10 -0
  185. package/dist/src/core/services/removal-helper.js +48 -0
  186. package/dist/src/core/services/removal-service.d.ts +19 -0
  187. package/dist/src/core/services/removal-service.js +45 -0
  188. package/dist/src/core/services/report-service.d.ts +30 -0
  189. package/dist/src/core/services/report-service.js +71 -0
  190. package/dist/src/core/services/reset-notice.d.ts +3 -0
  191. package/dist/src/core/services/reset-notice.js +8 -0
  192. package/dist/src/core/services/restart-doctor-findings.d.ts +10 -0
  193. package/dist/src/core/services/restart-doctor-findings.js +24 -0
  194. package/dist/src/core/services/restart-flow.d.ts +13 -0
  195. package/dist/src/core/services/restart-flow.js +50 -0
  196. package/dist/src/core/services/restart-guards.d.ts +6 -0
  197. package/dist/src/core/services/restart-guards.js +25 -0
  198. package/dist/src/core/services/restart-install-extras.d.ts +27 -0
  199. package/dist/src/core/services/restart-install-extras.js +39 -0
  200. package/dist/src/core/services/restart-mode.d.ts +4 -0
  201. package/dist/src/core/services/restart-mode.js +6 -0
  202. package/dist/src/core/services/runtime-error-checks.d.ts +11 -0
  203. package/dist/src/core/services/runtime-error-checks.js +20 -0
  204. package/dist/src/core/services/session-counters.d.ts +15 -0
  205. package/dist/src/core/services/session-counters.js +33 -0
  206. package/dist/src/core/services/session-reset-handler.d.ts +18 -0
  207. package/dist/src/core/services/session-reset-handler.js +24 -0
  208. package/dist/src/core/services/session-zone.d.ts +30 -0
  209. package/dist/src/core/services/session-zone.js +25 -0
  210. package/dist/src/core/services/snapshot-merge.d.ts +22 -0
  211. package/dist/src/core/services/snapshot-merge.js +25 -0
  212. package/dist/src/core/services/statusline-summary.d.ts +10 -0
  213. package/dist/src/core/services/statusline-summary.js +13 -0
  214. package/dist/src/core/services/support-service.d.ts +2 -0
  215. package/dist/src/core/services/support-service.js +57 -0
  216. package/dist/src/core/services/telemetry-block.d.ts +14 -0
  217. package/dist/src/core/services/telemetry-block.js +17 -0
  218. package/dist/src/core/services/usage-resolver.d.ts +20 -0
  219. package/dist/src/core/services/usage-resolver.js +23 -0
  220. package/dist/src/core/services/version-service.d.ts +14 -0
  221. package/dist/src/core/services/version-service.js +45 -0
  222. package/dist/src/core/services/window-trust.d.ts +2 -0
  223. package/dist/src/core/services/window-trust.js +3 -0
  224. package/dist/src/core/services/zone-classifier.d.ts +11 -0
  225. package/dist/src/core/services/zone-classifier.js +24 -0
  226. package/dist/src/core/services/zone-guidance.d.ts +6 -0
  227. package/dist/src/core/services/zone-guidance.js +32 -0
  228. package/dist/src/core/validation/configuration-sanitizer.d.ts +10 -0
  229. package/dist/src/core/validation/configuration-sanitizer.js +31 -0
  230. package/dist/src/core/validation/configuration-validator.d.ts +18 -0
  231. package/dist/src/core/validation/configuration-validator.js +45 -0
  232. package/dist/src/infrastructure/diagnostics/in-process-sampler.d.ts +18 -0
  233. package/dist/src/infrastructure/diagnostics/in-process-sampler.js +63 -0
  234. package/dist/src/infrastructure/diagnostics/overhead-measurer.d.ts +12 -0
  235. package/dist/src/infrastructure/diagnostics/overhead-measurer.js +77 -0
  236. package/dist/src/infrastructure/diagnostics/p95.d.ts +1 -0
  237. package/dist/src/infrastructure/diagnostics/p95.js +9 -0
  238. package/dist/src/infrastructure/diagnostics/process-sampler.d.ts +7 -0
  239. package/dist/src/infrastructure/diagnostics/process-sampler.js +69 -0
  240. package/dist/src/infrastructure/diagnostics/sample-failure.d.ts +10 -0
  241. package/dist/src/infrastructure/diagnostics/sample-failure.js +19 -0
  242. package/dist/src/infrastructure/git/git-context.d.ts +3 -0
  243. package/dist/src/infrastructure/git/git-context.js +25 -0
  244. package/dist/src/infrastructure/harnesses/antigravity-cli/adapter.d.ts +14 -0
  245. package/dist/src/infrastructure/harnesses/antigravity-cli/adapter.js +84 -0
  246. package/dist/src/infrastructure/harnesses/antigravity-cli/capabilities.d.ts +2 -0
  247. package/dist/src/infrastructure/harnesses/antigravity-cli/capabilities.js +6 -0
  248. package/dist/src/infrastructure/harnesses/antigravity-cli/detector.d.ts +4 -0
  249. package/dist/src/infrastructure/harnesses/antigravity-cli/detector.js +56 -0
  250. package/dist/src/infrastructure/harnesses/antigravity-cli/planner.d.ts +7 -0
  251. package/dist/src/infrastructure/harnesses/antigravity-cli/planner.js +62 -0
  252. package/dist/src/infrastructure/harnesses/antigravity-cli/runtime.d.ts +9 -0
  253. package/dist/src/infrastructure/harnesses/antigravity-cli/runtime.js +51 -0
  254. package/dist/src/infrastructure/harnesses/antigravity-cli/schemas.d.ts +31 -0
  255. package/dist/src/infrastructure/harnesses/antigravity-cli/schemas.js +19 -0
  256. package/dist/src/infrastructure/harnesses/claude-code/adapter.d.ts +14 -0
  257. package/dist/src/infrastructure/harnesses/claude-code/adapter.js +84 -0
  258. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-diagnostics.d.ts +9 -0
  259. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-diagnostics.js +60 -0
  260. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-files.d.ts +12 -0
  261. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-files.js +24 -0
  262. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-ownership.d.ts +5 -0
  263. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-ownership.js +41 -0
  264. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-planner.d.ts +7 -0
  265. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-planner.js +81 -0
  266. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-settings.d.ts +4 -0
  267. package/dist/src/infrastructure/harnesses/claude-code/auto-restart-settings.js +29 -0
  268. package/dist/src/infrastructure/harnesses/claude-code/capabilities.d.ts +2 -0
  269. package/dist/src/infrastructure/harnesses/claude-code/capabilities.js +6 -0
  270. package/dist/src/infrastructure/harnesses/claude-code/claude-hooks-config.d.ts +1 -0
  271. package/dist/src/infrastructure/harnesses/claude-code/claude-hooks-config.js +25 -0
  272. package/dist/src/infrastructure/harnesses/claude-code/claude-merger.d.ts +14 -0
  273. package/dist/src/infrastructure/harnesses/claude-code/claude-merger.js +44 -0
  274. package/dist/src/infrastructure/harnesses/claude-code/detector.d.ts +6 -0
  275. package/dist/src/infrastructure/harnesses/claude-code/detector.js +14 -0
  276. package/dist/src/infrastructure/harnesses/claude-code/mod/hooks.d.ts +6 -0
  277. package/dist/src/infrastructure/harnesses/claude-code/mod/hooks.js +43 -0
  278. package/dist/src/infrastructure/harnesses/claude-code/mod/host.d.ts +56 -0
  279. package/dist/src/infrastructure/harnesses/claude-code/mod/host.js +1 -0
  280. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-config.d.ts +8 -0
  281. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-config.js +31 -0
  282. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-guards.d.ts +3 -0
  283. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-guards.js +13 -0
  284. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-info.d.ts +4 -0
  285. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-info.js +5 -0
  286. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-log.d.ts +4 -0
  287. package/dist/src/infrastructure/harnesses/claude-code/mod/mod-log.js +34 -0
  288. package/dist/src/infrastructure/harnesses/claude-code/mod/register.d.ts +2 -0
  289. package/dist/src/infrastructure/harnesses/claude-code/mod/register.js +23 -0
  290. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-facts.d.ts +3 -0
  291. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-facts.js +12 -0
  292. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-flow.d.ts +4 -0
  293. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-flow.js +22 -0
  294. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-host.d.ts +7 -0
  295. package/dist/src/infrastructure/harnesses/claude-code/mod/restart-host.js +35 -0
  296. package/dist/src/infrastructure/harnesses/claude-code/mod/turn-state.d.ts +7 -0
  297. package/dist/src/infrastructure/harnesses/claude-code/mod/turn-state.js +12 -0
  298. package/dist/src/infrastructure/harnesses/claude-code/planner.d.ts +7 -0
  299. package/dist/src/infrastructure/harnesses/claude-code/planner.js +72 -0
  300. package/dist/src/infrastructure/harnesses/claude-code/runtime.d.ts +10 -0
  301. package/dist/src/infrastructure/harnesses/claude-code/runtime.js +82 -0
  302. package/dist/src/infrastructure/harnesses/claude-code/schemas.d.ts +42 -0
  303. package/dist/src/infrastructure/harnesses/claude-code/schemas.js +30 -0
  304. package/dist/src/infrastructure/harnesses/claude-code/statusline-bridge.d.ts +12 -0
  305. package/dist/src/infrastructure/harnesses/claude-code/statusline-bridge.js +78 -0
  306. package/dist/src/infrastructure/harnesses/claude-code/statusline-context-window.d.ts +5 -0
  307. package/dist/src/infrastructure/harnesses/claude-code/statusline-context-window.js +50 -0
  308. package/dist/src/infrastructure/harnesses/claude-code/statusline-default.d.ts +6 -0
  309. package/dist/src/infrastructure/harnesses/claude-code/statusline-default.js +38 -0
  310. package/dist/src/infrastructure/harnesses/claude-code/statusline-diagnostics.d.ts +3 -0
  311. package/dist/src/infrastructure/harnesses/claude-code/statusline-diagnostics.js +70 -0
  312. package/dist/src/infrastructure/harnesses/claude-code/statusline-output.d.ts +9 -0
  313. package/dist/src/infrastructure/harnesses/claude-code/statusline-output.js +15 -0
  314. package/dist/src/infrastructure/harnesses/claude-code/statusline-payload.d.ts +7 -0
  315. package/dist/src/infrastructure/harnesses/claude-code/statusline-payload.js +36 -0
  316. package/dist/src/infrastructure/harnesses/claude-code/statusline-planner.d.ts +4 -0
  317. package/dist/src/infrastructure/harnesses/claude-code/statusline-planner.js +82 -0
  318. package/dist/src/infrastructure/harnesses/claude-code/statusline-previous.d.ts +17 -0
  319. package/dist/src/infrastructure/harnesses/claude-code/statusline-previous.js +41 -0
  320. package/dist/src/infrastructure/harnesses/claude-code/statusline-restore.d.ts +9 -0
  321. package/dist/src/infrastructure/harnesses/claude-code/statusline-restore.js +31 -0
  322. package/dist/src/infrastructure/harnesses/claude-code/statusline-settings.d.ts +33 -0
  323. package/dist/src/infrastructure/harnesses/claude-code/statusline-settings.js +63 -0
  324. package/dist/src/infrastructure/harnesses/claude-code/statusline-shell.d.ts +13 -0
  325. package/dist/src/infrastructure/harnesses/claude-code/statusline-shell.js +28 -0
  326. package/dist/src/infrastructure/harnesses/claude-code/statusline-state.d.ts +21 -0
  327. package/dist/src/infrastructure/harnesses/claude-code/statusline-state.js +29 -0
  328. package/dist/src/infrastructure/harnesses/claude-code/transcript-usage.d.ts +6 -0
  329. package/dist/src/infrastructure/harnesses/claude-code/transcript-usage.js +24 -0
  330. package/dist/src/infrastructure/harnesses/codex-cli/adapter.d.ts +14 -0
  331. package/dist/src/infrastructure/harnesses/codex-cli/adapter.js +90 -0
  332. package/dist/src/infrastructure/harnesses/codex-cli/capabilities.d.ts +2 -0
  333. package/dist/src/infrastructure/harnesses/codex-cli/capabilities.js +6 -0
  334. package/dist/src/infrastructure/harnesses/codex-cli/detector.d.ts +6 -0
  335. package/dist/src/infrastructure/harnesses/codex-cli/detector.js +13 -0
  336. package/dist/src/infrastructure/harnesses/codex-cli/planner.d.ts +7 -0
  337. package/dist/src/infrastructure/harnesses/codex-cli/planner.js +75 -0
  338. package/dist/src/infrastructure/harnesses/codex-cli/rollout-usage.d.ts +6 -0
  339. package/dist/src/infrastructure/harnesses/codex-cli/rollout-usage.js +27 -0
  340. package/dist/src/infrastructure/harnesses/codex-cli/runtime.d.ts +10 -0
  341. package/dist/src/infrastructure/harnesses/codex-cli/runtime.js +85 -0
  342. package/dist/src/infrastructure/harnesses/codex-cli/schemas.d.ts +47 -0
  343. package/dist/src/infrastructure/harnesses/codex-cli/schemas.js +25 -0
  344. package/dist/src/infrastructure/harnesses/common/antigravity-hooks-updater.d.ts +4 -0
  345. package/dist/src/infrastructure/harnesses/common/antigravity-hooks-updater.js +57 -0
  346. package/dist/src/infrastructure/harnesses/common/change-target.d.ts +1 -0
  347. package/dist/src/infrastructure/harnesses/common/change-target.js +40 -0
  348. package/dist/src/infrastructure/harnesses/common/codex-hooks-updater.d.ts +13 -0
  349. package/dist/src/infrastructure/harnesses/common/codex-hooks-updater.js +79 -0
  350. package/dist/src/infrastructure/harnesses/common/cursor-hooks-updater.d.ts +3 -0
  351. package/dist/src/infrastructure/harnesses/common/cursor-hooks-updater.js +63 -0
  352. package/dist/src/infrastructure/harnesses/common/diagnostic-helpers.d.ts +7 -0
  353. package/dist/src/infrastructure/harnesses/common/diagnostic-helpers.js +60 -0
  354. package/dist/src/infrastructure/harnesses/common/hook-event-cleanup.d.ts +3 -0
  355. package/dist/src/infrastructure/harnesses/common/hook-event-cleanup.js +50 -0
  356. package/dist/src/infrastructure/harnesses/common/in-process-restart-log.d.ts +9 -0
  357. package/dist/src/infrastructure/harnesses/common/in-process-restart-log.js +36 -0
  358. package/dist/src/infrastructure/harnesses/common/in-process-restart-state.d.ts +11 -0
  359. package/dist/src/infrastructure/harnesses/common/in-process-restart-state.js +50 -0
  360. package/dist/src/infrastructure/harnesses/common/in-process-restart-support.d.ts +13 -0
  361. package/dist/src/infrastructure/harnesses/common/in-process-restart-support.js +15 -0
  362. package/dist/src/infrastructure/harnesses/common/in-process-support.d.ts +18 -0
  363. package/dist/src/infrastructure/harnesses/common/in-process-support.js +40 -0
  364. package/dist/src/infrastructure/harnesses/common/jsonl-tail-reader.d.ts +6 -0
  365. package/dist/src/infrastructure/harnesses/common/jsonl-tail-reader.js +76 -0
  366. package/dist/src/infrastructure/harnesses/common/path-helpers.d.ts +6 -0
  367. package/dist/src/infrastructure/harnesses/common/path-helpers.js +51 -0
  368. package/dist/src/infrastructure/harnesses/common/removal-config-validator.d.ts +2 -0
  369. package/dist/src/infrastructure/harnesses/common/removal-config-validator.js +14 -0
  370. package/dist/src/infrastructure/harnesses/common/restart-asset-plan.d.ts +12 -0
  371. package/dist/src/infrastructure/harnesses/common/restart-asset-plan.js +37 -0
  372. package/dist/src/infrastructure/harnesses/common/restart-diagnostics.d.ts +12 -0
  373. package/dist/src/infrastructure/harnesses/common/restart-diagnostics.js +49 -0
  374. package/dist/src/infrastructure/harnesses/common/runtime-assets.d.ts +1 -0
  375. package/dist/src/infrastructure/harnesses/common/runtime-assets.js +23 -0
  376. package/dist/src/infrastructure/harnesses/common/runtime-support.d.ts +8 -0
  377. package/dist/src/infrastructure/harnesses/common/runtime-support.js +44 -0
  378. package/dist/src/infrastructure/harnesses/common/version-probes.d.ts +3 -0
  379. package/dist/src/infrastructure/harnesses/common/version-probes.js +21 -0
  380. package/dist/src/infrastructure/harnesses/cursor/adapter.d.ts +14 -0
  381. package/dist/src/infrastructure/harnesses/cursor/adapter.js +70 -0
  382. package/dist/src/infrastructure/harnesses/cursor/capabilities.d.ts +2 -0
  383. package/dist/src/infrastructure/harnesses/cursor/capabilities.js +6 -0
  384. package/dist/src/infrastructure/harnesses/cursor/detector.d.ts +6 -0
  385. package/dist/src/infrastructure/harnesses/cursor/detector.js +13 -0
  386. package/dist/src/infrastructure/harnesses/cursor/planner.d.ts +7 -0
  387. package/dist/src/infrastructure/harnesses/cursor/planner.js +66 -0
  388. package/dist/src/infrastructure/harnesses/cursor/runtime.d.ts +9 -0
  389. package/dist/src/infrastructure/harnesses/cursor/runtime.js +49 -0
  390. package/dist/src/infrastructure/harnesses/cursor/schemas.d.ts +39 -0
  391. package/dist/src/infrastructure/harnesses/cursor/schemas.js +23 -0
  392. package/dist/src/infrastructure/harnesses/github-copilot-cli/adapter.d.ts +14 -0
  393. package/dist/src/infrastructure/harnesses/github-copilot-cli/adapter.js +69 -0
  394. package/dist/src/infrastructure/harnesses/github-copilot-cli/capabilities.d.ts +2 -0
  395. package/dist/src/infrastructure/harnesses/github-copilot-cli/capabilities.js +6 -0
  396. package/dist/src/infrastructure/harnesses/github-copilot-cli/detector.d.ts +6 -0
  397. package/dist/src/infrastructure/harnesses/github-copilot-cli/detector.js +15 -0
  398. package/dist/src/infrastructure/harnesses/github-copilot-cli/planner.d.ts +7 -0
  399. package/dist/src/infrastructure/harnesses/github-copilot-cli/planner.js +66 -0
  400. package/dist/src/infrastructure/harnesses/github-copilot-cli/runtime.d.ts +9 -0
  401. package/dist/src/infrastructure/harnesses/github-copilot-cli/runtime.js +67 -0
  402. package/dist/src/infrastructure/harnesses/github-copilot-cli/schemas.d.ts +35 -0
  403. package/dist/src/infrastructure/harnesses/github-copilot-cli/schemas.js +21 -0
  404. package/dist/src/infrastructure/harnesses/oh-my-pi/adapter.d.ts +14 -0
  405. package/dist/src/infrastructure/harnesses/oh-my-pi/adapter.js +64 -0
  406. package/dist/src/infrastructure/harnesses/oh-my-pi/capabilities.d.ts +2 -0
  407. package/dist/src/infrastructure/harnesses/oh-my-pi/capabilities.js +6 -0
  408. package/dist/src/infrastructure/harnesses/oh-my-pi/detector.d.ts +6 -0
  409. package/dist/src/infrastructure/harnesses/oh-my-pi/detector.js +13 -0
  410. package/dist/src/infrastructure/harnesses/oh-my-pi/events.d.ts +8 -0
  411. package/dist/src/infrastructure/harnesses/oh-my-pi/events.js +65 -0
  412. package/dist/src/infrastructure/harnesses/oh-my-pi/planner.d.ts +7 -0
  413. package/dist/src/infrastructure/harnesses/oh-my-pi/planner.js +32 -0
  414. package/dist/src/infrastructure/harnesses/oh-my-pi/restart.d.ts +28 -0
  415. package/dist/src/infrastructure/harnesses/oh-my-pi/restart.js +79 -0
  416. package/dist/src/infrastructure/harnesses/oh-my-pi/runtime.d.ts +17 -0
  417. package/dist/src/infrastructure/harnesses/oh-my-pi/runtime.js +69 -0
  418. package/dist/src/infrastructure/harnesses/oh-my-pi/schemas.d.ts +50 -0
  419. package/dist/src/infrastructure/harnesses/oh-my-pi/schemas.js +17 -0
  420. package/dist/src/infrastructure/harnesses/opencode/adapter.d.ts +14 -0
  421. package/dist/src/infrastructure/harnesses/opencode/adapter.js +64 -0
  422. package/dist/src/infrastructure/harnesses/opencode/capabilities.d.ts +2 -0
  423. package/dist/src/infrastructure/harnesses/opencode/capabilities.js +6 -0
  424. package/dist/src/infrastructure/harnesses/opencode/detector.d.ts +6 -0
  425. package/dist/src/infrastructure/harnesses/opencode/detector.js +16 -0
  426. package/dist/src/infrastructure/harnesses/opencode/events.d.ts +8 -0
  427. package/dist/src/infrastructure/harnesses/opencode/events.js +36 -0
  428. package/dist/src/infrastructure/harnesses/opencode/planner.d.ts +6 -0
  429. package/dist/src/infrastructure/harnesses/opencode/planner.js +23 -0
  430. package/dist/src/infrastructure/harnesses/opencode/runtime.d.ts +20 -0
  431. package/dist/src/infrastructure/harnesses/opencode/runtime.js +51 -0
  432. package/dist/src/infrastructure/harnesses/opencode/schemas.d.ts +51 -0
  433. package/dist/src/infrastructure/harnesses/opencode/schemas.js +32 -0
  434. package/dist/src/infrastructure/harnesses/pi/adapter.d.ts +14 -0
  435. package/dist/src/infrastructure/harnesses/pi/adapter.js +64 -0
  436. package/dist/src/infrastructure/harnesses/pi/capabilities.d.ts +2 -0
  437. package/dist/src/infrastructure/harnesses/pi/capabilities.js +6 -0
  438. package/dist/src/infrastructure/harnesses/pi/detector.d.ts +6 -0
  439. package/dist/src/infrastructure/harnesses/pi/detector.js +10 -0
  440. package/dist/src/infrastructure/harnesses/pi/events.d.ts +8 -0
  441. package/dist/src/infrastructure/harnesses/pi/events.js +65 -0
  442. package/dist/src/infrastructure/harnesses/pi/planner.d.ts +7 -0
  443. package/dist/src/infrastructure/harnesses/pi/planner.js +32 -0
  444. package/dist/src/infrastructure/harnesses/pi/restart.d.ts +33 -0
  445. package/dist/src/infrastructure/harnesses/pi/restart.js +69 -0
  446. package/dist/src/infrastructure/harnesses/pi/runtime.d.ts +17 -0
  447. package/dist/src/infrastructure/harnesses/pi/runtime.js +67 -0
  448. package/dist/src/infrastructure/harnesses/pi/schemas.d.ts +50 -0
  449. package/dist/src/infrastructure/harnesses/pi/schemas.js +17 -0
  450. package/dist/src/infrastructure/harnesses/registry.d.ts +6 -0
  451. package/dist/src/infrastructure/harnesses/registry.js +94 -0
  452. package/dist/src/infrastructure/process/node-process-runner.d.ts +8 -0
  453. package/dist/src/infrastructure/process/node-process-runner.js +66 -0
  454. package/dist/src/infrastructure/process/process-tree.d.ts +2 -0
  455. package/dist/src/infrastructure/process/process-tree.js +28 -0
  456. package/dist/src/infrastructure/runtime/hook-deadline.d.ts +26 -0
  457. package/dist/src/infrastructure/runtime/hook-deadline.js +55 -0
  458. package/dist/src/infrastructure/runtime/hook-failure.d.ts +14 -0
  459. package/dist/src/infrastructure/runtime/hook-failure.js +22 -0
  460. package/dist/src/infrastructure/runtime/in-process-host.d.ts +16 -0
  461. package/dist/src/infrastructure/runtime/in-process-host.js +75 -0
  462. package/dist/src/infrastructure/runtime/node-runtime-logs.d.ts +8 -0
  463. package/dist/src/infrastructure/runtime/node-runtime-logs.js +21 -0
  464. package/dist/src/infrastructure/runtime/node-session-ledger.d.ts +17 -0
  465. package/dist/src/infrastructure/runtime/node-session-ledger.js +68 -0
  466. package/dist/src/infrastructure/runtime/process-hook-host.d.ts +25 -0
  467. package/dist/src/infrastructure/runtime/process-hook-host.js +79 -0
  468. package/dist/src/infrastructure/runtime/runtime-composition.d.ts +29 -0
  469. package/dist/src/infrastructure/runtime/runtime-composition.js +41 -0
  470. package/dist/src/infrastructure/runtime/runtime-paths.d.ts +12 -0
  471. package/dist/src/infrastructure/runtime/runtime-paths.js +45 -0
  472. package/dist/src/infrastructure/runtime/runtime-state-reader.d.ts +9 -0
  473. package/dist/src/infrastructure/runtime/runtime-state-reader.js +82 -0
  474. package/dist/src/infrastructure/storage/atomic-writer.d.ts +2 -0
  475. package/dist/src/infrastructure/storage/atomic-writer.js +35 -0
  476. package/dist/src/infrastructure/storage/change-applier.d.ts +10 -0
  477. package/dist/src/infrastructure/storage/change-applier.js +80 -0
  478. package/dist/src/infrastructure/storage/directory-pruner.d.ts +8 -0
  479. package/dist/src/infrastructure/storage/directory-pruner.js +76 -0
  480. package/dist/src/infrastructure/storage/handoff-claim-lock.d.ts +3 -0
  481. package/dist/src/infrastructure/storage/handoff-claim-lock.js +32 -0
  482. package/dist/src/infrastructure/storage/json-document-editor.d.ts +5 -0
  483. package/dist/src/infrastructure/storage/json-document-editor.js +52 -0
  484. package/dist/src/infrastructure/storage/json-span-utils.d.ts +24 -0
  485. package/dist/src/infrastructure/storage/json-span-utils.js +104 -0
  486. package/dist/src/infrastructure/storage/json-validator.d.ts +13 -0
  487. package/dist/src/infrastructure/storage/json-validator.js +61 -0
  488. package/dist/src/infrastructure/storage/manifest-store.d.ts +11 -0
  489. package/dist/src/infrastructure/storage/manifest-store.js +45 -0
  490. package/dist/src/infrastructure/storage/node-file-system.d.ts +4 -0
  491. package/dist/src/infrastructure/storage/node-file-system.js +33 -0
  492. package/dist/src/infrastructure/storage/node-handoff-store.d.ts +11 -0
  493. package/dist/src/infrastructure/storage/node-handoff-store.js +96 -0
  494. package/dist/src/infrastructure/storage/package-metadata.d.ts +7 -0
  495. package/dist/src/infrastructure/storage/package-metadata.js +58 -0
  496. package/dist/src/infrastructure/storage/path-boundary.d.ts +11 -0
  497. package/dist/src/infrastructure/storage/path-boundary.js +73 -0
  498. package/dist/src/infrastructure/storage/project-config-store.d.ts +9 -0
  499. package/dist/src/infrastructure/storage/project-config-store.js +24 -0
  500. package/dist/src/infrastructure/storage/runtime-state-files.d.ts +12 -0
  501. package/dist/src/infrastructure/storage/runtime-state-files.js +22 -0
  502. package/docs/telemetry-block.md +149 -0
  503. package/package.json +65 -4
  504. package/schemas/context-brake.config.schema.json +177 -0
  505. package/schemas/doctor-report.schema.json +595 -0
  506. package/schemas/install-report.schema.json +458 -0
@@ -0,0 +1,595 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "command": {
10
+ "type": "string",
11
+ "const": "doctor"
12
+ },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": [
16
+ "healthy",
17
+ "warnings",
18
+ "errors"
19
+ ]
20
+ },
21
+ "exitCode": {
22
+ "anyOf": [
23
+ {
24
+ "type": "number",
25
+ "const": 0
26
+ },
27
+ {
28
+ "type": "number",
29
+ "const": 1
30
+ },
31
+ {
32
+ "type": "number",
33
+ "const": 2
34
+ }
35
+ ]
36
+ },
37
+ "detections": {
38
+ "type": "array",
39
+ "items": {
40
+ "type": "object",
41
+ "properties": {
42
+ "harness": {
43
+ "type": "string",
44
+ "enum": [
45
+ "claude-code",
46
+ "codex-cli",
47
+ "cursor",
48
+ "github-copilot-cli",
49
+ "opencode",
50
+ "pi",
51
+ "oh-my-pi",
52
+ "antigravity-cli"
53
+ ]
54
+ },
55
+ "state": {
56
+ "type": "string",
57
+ "enum": [
58
+ "project",
59
+ "candidate",
60
+ "excluded"
61
+ ]
62
+ },
63
+ "evidence": {
64
+ "type": "array",
65
+ "items": {
66
+ "type": "object",
67
+ "properties": {
68
+ "origin": {
69
+ "type": "string",
70
+ "enum": [
71
+ "project",
72
+ "machine"
73
+ ]
74
+ },
75
+ "kind": {
76
+ "type": "string"
77
+ },
78
+ "value": {
79
+ "type": "string"
80
+ }
81
+ },
82
+ "required": [
83
+ "origin",
84
+ "kind",
85
+ "value"
86
+ ],
87
+ "additionalProperties": false
88
+ }
89
+ },
90
+ "selectedExplicitly": {
91
+ "type": "boolean"
92
+ },
93
+ "version": {
94
+ "type": [
95
+ "string",
96
+ "null"
97
+ ]
98
+ },
99
+ "versionSource": {
100
+ "anyOf": [
101
+ {
102
+ "type": "string",
103
+ "enum": [
104
+ "executable",
105
+ "config"
106
+ ]
107
+ },
108
+ {
109
+ "type": "null"
110
+ }
111
+ ]
112
+ }
113
+ },
114
+ "required": [
115
+ "harness",
116
+ "state",
117
+ "evidence",
118
+ "selectedExplicitly",
119
+ "version",
120
+ "versionSource"
121
+ ],
122
+ "additionalProperties": false
123
+ }
124
+ },
125
+ "integrations": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "object",
129
+ "properties": {
130
+ "harness": {
131
+ "type": "string",
132
+ "enum": [
133
+ "claude-code",
134
+ "codex-cli",
135
+ "cursor",
136
+ "github-copilot-cli",
137
+ "opencode",
138
+ "pi",
139
+ "oh-my-pi",
140
+ "antigravity-cli"
141
+ ]
142
+ },
143
+ "state": {
144
+ "type": "string",
145
+ "enum": [
146
+ "installed",
147
+ "missing",
148
+ "broken"
149
+ ]
150
+ },
151
+ "version": {
152
+ "type": [
153
+ "string",
154
+ "null"
155
+ ]
156
+ },
157
+ "support": {
158
+ "type": "object",
159
+ "properties": {
160
+ "harness": {
161
+ "type": "string",
162
+ "enum": [
163
+ "claude-code",
164
+ "codex-cli",
165
+ "cursor",
166
+ "github-copilot-cli",
167
+ "opencode",
168
+ "pi",
169
+ "oh-my-pi",
170
+ "antigravity-cli"
171
+ ]
172
+ },
173
+ "supportLevel": {
174
+ "type": "string",
175
+ "enum": [
176
+ "full",
177
+ "partial"
178
+ ]
179
+ },
180
+ "minimumVersion": {
181
+ "type": [
182
+ "string",
183
+ "null"
184
+ ]
185
+ },
186
+ "capabilities": {
187
+ "type": "array",
188
+ "items": {
189
+ "type": "object",
190
+ "properties": {
191
+ "id": {
192
+ "type": "string",
193
+ "enum": [
194
+ "post_tool_telemetry",
195
+ "session_boot",
196
+ "context_usage",
197
+ "auto_restart"
198
+ ]
199
+ },
200
+ "state": {
201
+ "type": "string",
202
+ "enum": [
203
+ "supported",
204
+ "unsupported",
205
+ "unknown"
206
+ ]
207
+ }
208
+ },
209
+ "required": [
210
+ "id",
211
+ "state"
212
+ ],
213
+ "additionalProperties": false
214
+ }
215
+ },
216
+ "limitations": {
217
+ "type": "array",
218
+ "items": {
219
+ "type": "object",
220
+ "properties": {
221
+ "capability": {
222
+ "type": "string",
223
+ "enum": [
224
+ "post_tool_telemetry",
225
+ "session_boot",
226
+ "context_usage",
227
+ "auto_restart"
228
+ ]
229
+ },
230
+ "impact": {
231
+ "type": "string"
232
+ }
233
+ },
234
+ "required": [
235
+ "capability",
236
+ "impact"
237
+ ],
238
+ "additionalProperties": false
239
+ }
240
+ }
241
+ },
242
+ "required": [
243
+ "harness",
244
+ "supportLevel",
245
+ "minimumVersion",
246
+ "capabilities",
247
+ "limitations"
248
+ ],
249
+ "additionalProperties": false
250
+ },
251
+ "overhead": {
252
+ "anyOf": [
253
+ {
254
+ "type": "object",
255
+ "properties": {
256
+ "harness": {
257
+ "type": "string",
258
+ "enum": [
259
+ "claude-code",
260
+ "codex-cli",
261
+ "cursor",
262
+ "github-copilot-cli",
263
+ "opencode",
264
+ "pi",
265
+ "oh-my-pi",
266
+ "antigravity-cli"
267
+ ]
268
+ },
269
+ "executionModel": {
270
+ "type": "string",
271
+ "enum": [
272
+ "process",
273
+ "in_process"
274
+ ]
275
+ },
276
+ "sampleCount": {
277
+ "type": "integer",
278
+ "minimum": 0,
279
+ "maximum": 9007199254740991
280
+ },
281
+ "p95Milliseconds": {
282
+ "anyOf": [
283
+ {
284
+ "type": "number",
285
+ "minimum": 0
286
+ },
287
+ {
288
+ "type": "null"
289
+ }
290
+ ]
291
+ },
292
+ "targetMilliseconds": {
293
+ "anyOf": [
294
+ {
295
+ "type": "number",
296
+ "const": 100
297
+ },
298
+ {
299
+ "type": "number",
300
+ "const": 15
301
+ }
302
+ ]
303
+ },
304
+ "status": {
305
+ "type": "string",
306
+ "enum": [
307
+ "pass",
308
+ "fail",
309
+ "unavailable"
310
+ ]
311
+ }
312
+ },
313
+ "required": [
314
+ "harness",
315
+ "executionModel",
316
+ "sampleCount",
317
+ "p95Milliseconds",
318
+ "targetMilliseconds",
319
+ "status"
320
+ ],
321
+ "additionalProperties": false
322
+ },
323
+ {
324
+ "type": "null"
325
+ }
326
+ ]
327
+ }
328
+ },
329
+ "required": [
330
+ "harness",
331
+ "state",
332
+ "version",
333
+ "support",
334
+ "overhead"
335
+ ],
336
+ "additionalProperties": false
337
+ }
338
+ },
339
+ "findings": {
340
+ "type": "array",
341
+ "items": {
342
+ "type": "object",
343
+ "properties": {
344
+ "code": {
345
+ "type": "string",
346
+ "pattern": "^[A-Z0-9_]+$"
347
+ },
348
+ "severity": {
349
+ "type": "string",
350
+ "enum": [
351
+ "ok",
352
+ "warning",
353
+ "error"
354
+ ]
355
+ },
356
+ "scope": {
357
+ "type": "string",
358
+ "enum": [
359
+ "project",
360
+ "harness",
361
+ "file",
362
+ "performance"
363
+ ]
364
+ },
365
+ "harness": {
366
+ "anyOf": [
367
+ {
368
+ "type": "string",
369
+ "enum": [
370
+ "claude-code",
371
+ "codex-cli",
372
+ "cursor",
373
+ "github-copilot-cli",
374
+ "opencode",
375
+ "pi",
376
+ "oh-my-pi",
377
+ "antigravity-cli"
378
+ ]
379
+ },
380
+ {
381
+ "type": "null"
382
+ }
383
+ ]
384
+ },
385
+ "path": {
386
+ "type": [
387
+ "string",
388
+ "null"
389
+ ]
390
+ },
391
+ "message": {
392
+ "type": "string"
393
+ },
394
+ "impact": {
395
+ "type": [
396
+ "string",
397
+ "null"
398
+ ]
399
+ },
400
+ "remediation": {
401
+ "type": [
402
+ "string",
403
+ "null"
404
+ ]
405
+ }
406
+ },
407
+ "required": [
408
+ "code",
409
+ "severity",
410
+ "scope",
411
+ "harness",
412
+ "path",
413
+ "message",
414
+ "impact",
415
+ "remediation"
416
+ ],
417
+ "additionalProperties": false
418
+ }
419
+ },
420
+ "snapshot": {
421
+ "type": "object",
422
+ "properties": {
423
+ "triggerZone": {
424
+ "type": "string",
425
+ "enum": [
426
+ "YELLOW",
427
+ "RED"
428
+ ]
429
+ },
430
+ "command": {
431
+ "type": [
432
+ "string",
433
+ "null"
434
+ ]
435
+ },
436
+ "resumeCommand": {
437
+ "type": [
438
+ "string",
439
+ "null"
440
+ ]
441
+ }
442
+ },
443
+ "required": [
444
+ "triggerZone",
445
+ "command",
446
+ "resumeCommand"
447
+ ],
448
+ "additionalProperties": false
449
+ },
450
+ "contextWindow": {
451
+ "type": "object",
452
+ "properties": {
453
+ "bridge": {
454
+ "type": "string",
455
+ "enum": [
456
+ "absent",
457
+ "installed",
458
+ "inactive"
459
+ ]
460
+ },
461
+ "source": {
462
+ "type": "string",
463
+ "enum": [
464
+ "statusline",
465
+ "contextWindowCeiling"
466
+ ]
467
+ },
468
+ "lastWindowTokens": {
469
+ "anyOf": [
470
+ {
471
+ "type": "integer",
472
+ "exclusiveMinimum": 0,
473
+ "maximum": 9007199254740991
474
+ },
475
+ {
476
+ "type": "null"
477
+ }
478
+ ]
479
+ }
480
+ },
481
+ "required": [
482
+ "bridge",
483
+ "source",
484
+ "lastWindowTokens"
485
+ ],
486
+ "additionalProperties": false
487
+ },
488
+ "activeSessions": {
489
+ "type": "array",
490
+ "items": {
491
+ "type": "object",
492
+ "properties": {
493
+ "harness": {
494
+ "type": "string",
495
+ "enum": [
496
+ "claude-code",
497
+ "codex-cli",
498
+ "cursor",
499
+ "github-copilot-cli",
500
+ "opencode",
501
+ "pi",
502
+ "oh-my-pi",
503
+ "antigravity-cli"
504
+ ]
505
+ },
506
+ "sessionId": {
507
+ "type": [
508
+ "string",
509
+ "null"
510
+ ]
511
+ },
512
+ "lastActivityAt": {
513
+ "type": "string"
514
+ },
515
+ "usage": {
516
+ "anyOf": [
517
+ {
518
+ "type": "object",
519
+ "properties": {
520
+ "percentage": {
521
+ "type": "integer",
522
+ "minimum": 0,
523
+ "maximum": 9007199254740991
524
+ },
525
+ "usedTokens": {
526
+ "type": "integer",
527
+ "minimum": 0,
528
+ "maximum": 9007199254740991
529
+ },
530
+ "windowTokens": {
531
+ "type": "integer",
532
+ "exclusiveMinimum": 0,
533
+ "maximum": 9007199254740991
534
+ },
535
+ "zone": {
536
+ "type": "string",
537
+ "enum": [
538
+ "GREEN",
539
+ "YELLOW",
540
+ "RED",
541
+ "CRITICAL"
542
+ ]
543
+ },
544
+ "source": {
545
+ "type": "string",
546
+ "enum": [
547
+ "measured",
548
+ "estimated"
549
+ ]
550
+ },
551
+ "at": {
552
+ "type": "string"
553
+ }
554
+ },
555
+ "required": [
556
+ "percentage",
557
+ "usedTokens",
558
+ "windowTokens",
559
+ "zone",
560
+ "source",
561
+ "at"
562
+ ],
563
+ "additionalProperties": false
564
+ },
565
+ {
566
+ "type": "null"
567
+ }
568
+ ]
569
+ }
570
+ },
571
+ "required": [
572
+ "harness",
573
+ "sessionId",
574
+ "lastActivityAt",
575
+ "usage"
576
+ ],
577
+ "additionalProperties": false
578
+ }
579
+ },
580
+ "debugMode": {
581
+ "type": "boolean",
582
+ "const": true
583
+ }
584
+ },
585
+ "required": [
586
+ "schemaVersion",
587
+ "command",
588
+ "status",
589
+ "exitCode",
590
+ "detections",
591
+ "integrations",
592
+ "findings"
593
+ ],
594
+ "additionalProperties": false
595
+ }