@zhivex-ai/harness 1.0.0 → 1.1.0-rc.10

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 (246) hide show
  1. package/CHANGELOG.md +184 -1
  2. package/README.md +52 -306
  3. package/SECURITY.md +1 -1
  4. package/SUPPORT.md +7 -3
  5. package/benchmarks/README.md +3 -3
  6. package/contracts/client-protocol-v1.schema.json +341 -0
  7. package/contracts/public-api.json +107 -1
  8. package/contracts/stable-api-signatures.json +34 -34
  9. package/dist/approvals/approval-diff.d.ts +45 -0
  10. package/dist/approvals/approval-history.d.ts +38 -0
  11. package/dist/approvals/approval-preview.d.ts +26 -0
  12. package/dist/cli/arguments.d.ts +105 -0
  13. package/dist/cli/changes.d.ts +2 -0
  14. package/dist/cli/cli-credentials.d.ts +50 -0
  15. package/dist/cli/cli-help.d.ts +3 -0
  16. package/dist/{cli-options.d.ts → cli/cli-options.d.ts} +1 -1
  17. package/dist/{cli-profiles.d.ts → cli/cli-profiles.d.ts} +17 -1
  18. package/dist/cli/configured-harness.d.ts +12 -0
  19. package/dist/cli/console/console-commands.d.ts +6 -0
  20. package/dist/{console-context.d.ts → cli/console/console-context.d.ts} +7 -3
  21. package/dist/cli/console/console-input.d.ts +68 -0
  22. package/dist/cli/console/console-model-catalog.d.ts +8 -0
  23. package/dist/cli/console/console-navigation.d.ts +29 -0
  24. package/dist/cli/console/console-presentation.d.ts +18 -0
  25. package/dist/cli/console/console-welcome.d.ts +13 -0
  26. package/dist/cli/console.d.ts +2 -0
  27. package/dist/cli/doctor.d.ts +52 -0
  28. package/dist/cli/errors.d.ts +8 -0
  29. package/dist/cli/help-text.d.ts +2 -0
  30. package/dist/cli/presentation.d.ts +23 -0
  31. package/dist/cli/resume-metadata.d.ts +12 -0
  32. package/dist/cli/routing.d.ts +6 -0
  33. package/dist/cli/run-commands.d.ts +4 -0
  34. package/dist/cli/run-document.d.ts +91 -0
  35. package/dist/cli/run-management.d.ts +2 -0
  36. package/dist/cli/service-client-cli.d.ts +2 -0
  37. package/dist/cli/session-management.d.ts +8 -0
  38. package/dist/cli/setup.d.ts +10 -0
  39. package/dist/cli/state.d.ts +2 -0
  40. package/dist/cli/task-input.d.ts +6 -0
  41. package/dist/cli/terminal/terminal-continuation.d.ts +3 -0
  42. package/dist/{terminal-markdown.d.ts → cli/terminal/terminal-markdown.d.ts} +1 -0
  43. package/dist/{terminal-ui.d.ts → cli/terminal/terminal-ui.d.ts} +7 -0
  44. package/dist/cli/terminal/tool-activity.d.ts +19 -0
  45. package/dist/cli.d.ts +32 -238
  46. package/dist/cli.js +17247 -12181
  47. package/dist/client/adapter.d.ts +4 -0
  48. package/dist/client/index.d.ts +15 -0
  49. package/dist/{json-contracts.d.ts → client/json-contracts.d.ts} +6 -0
  50. package/dist/client/local-service.d.ts +34 -0
  51. package/dist/client/protocol.d.ts +205 -0
  52. package/dist/client/service-events.d.ts +50 -0
  53. package/dist/context/adaptive-compaction.d.ts +16 -0
  54. package/dist/{compaction.d.ts → context/compaction.d.ts} +1 -1
  55. package/dist/{context-engineering.d.ts → context/context-engineering.d.ts} +2 -2
  56. package/dist/{context-metrics.d.ts → context/context-metrics.d.ts} +2 -0
  57. package/dist/{execution-environment.d.ts → execution/execution-environment.d.ts} +8 -4
  58. package/dist/hostile-repository-demo.js +2813 -869
  59. package/dist/index.d.ts +49 -41
  60. package/dist/index.js +8834 -6250
  61. package/dist/internal/desktop/persistence.d.ts +14 -0
  62. package/dist/internal/desktop/protocol.d.ts +8 -0
  63. package/dist/internal/desktop/providers.d.ts +9 -0
  64. package/dist/internal/desktop/runtime.d.ts +7 -0
  65. package/dist/models/catalog-store.d.ts +15 -0
  66. package/dist/models/catalog.d.ts +74 -0
  67. package/dist/{operations.d.ts → persistence/operations.d.ts} +25 -2
  68. package/dist/persistence/persistence-secrets.d.ts +2 -0
  69. package/dist/persistence/recorded-workspace.d.ts +4 -0
  70. package/dist/{sessions.d.ts → persistence/sessions.d.ts} +3 -0
  71. package/dist/persistence/sqlite-access.d.ts +26 -0
  72. package/dist/{sqlite-database.d.ts → persistence/sqlite-database.d.ts} +2 -0
  73. package/dist/{state-backup.d.ts → persistence/state-backup.d.ts} +9 -1
  74. package/dist/{capabilities.d.ts → providers/capabilities.d.ts} +1 -1
  75. package/dist/providers/meta-continuation.d.ts +1 -0
  76. package/dist/{providers.d.ts → providers/providers.d.ts} +4 -0
  77. package/dist/{routing.d.ts → providers/routing.d.ts} +1 -1
  78. package/dist/{config.d.ts → runtime/config.d.ts} +5 -1
  79. package/dist/runtime/delegation-contracts.d.ts +23 -0
  80. package/dist/runtime/error-diagnostics.d.ts +116 -0
  81. package/dist/{harness.d.ts → runtime/harness.d.ts} +16 -135
  82. package/dist/{orchestration.d.ts → runtime/orchestration.d.ts} +5 -0
  83. package/dist/{runtime-diagnostics.d.ts → runtime/runtime-diagnostics.d.ts} +1 -0
  84. package/dist/{runtime-policy.d.ts → runtime/runtime-policy.d.ts} +17 -1
  85. package/dist/{time-to-safe-fix.d.ts → runtime/time-to-safe-fix.d.ts} +114 -0
  86. package/dist/runtime/usage-ledger.d.ts +84 -0
  87. package/dist/service-cli.d.ts +2 -0
  88. package/dist/service-cli.js +11748 -0
  89. package/dist/tools/execution.d.ts +47 -0
  90. package/dist/tools/shared.d.ts +67 -0
  91. package/dist/tools/workspace.d.ts +85 -0
  92. package/dist/verify-historical-migrations.js +6831 -5494
  93. package/dist/{workspace.d.ts → workspace/workspace.d.ts} +22 -0
  94. package/dist/zhx.js +17247 -12181
  95. package/docs/CLI.md +190 -30
  96. package/docs/CLIENT_PROTOCOL.md +212 -0
  97. package/docs/CONTEXT_ENGINEERING.md +29 -2
  98. package/docs/CREDENTIALS.md +69 -0
  99. package/docs/DURABLE_OPERATIONS.md +8 -2
  100. package/docs/EXTENSIBILITY.md +58 -1
  101. package/docs/FIRST_USE.md +95 -0
  102. package/docs/FIRST_USE_EXAMPLE.md +40 -0
  103. package/docs/HOSTILE_REPOSITORY_DEMO.md +1 -1
  104. package/docs/LOCAL_SERVICE.md +142 -0
  105. package/docs/MODEL_CATALOG.md +48 -0
  106. package/docs/README.md +25 -23
  107. package/docs/THREAT_MODEL.md +1 -1
  108. package/docs/TIME_TO_SAFE_FIX.md +2 -2
  109. package/docs/USAGE.md +181 -0
  110. package/evaluations/daily-cli-cohort.json +33 -0
  111. package/evaluations/representative-assembly-matrix.json +91 -1
  112. package/examples/README.md +26 -0
  113. package/examples/first-use/greeting.test.ts +3 -0
  114. package/examples/first-use/greeting.ts +1 -0
  115. package/examples/first-use/package.json +7 -0
  116. package/package.json +50 -18
  117. package/ROADMAP.md +0 -414
  118. package/benchmarks/baselines/context-navigation-2026-09-09.json +0 -94
  119. package/benchmarks/baselines/efficiency-2026-09-08.json +0 -233
  120. package/benchmarks/baselines/external-final-2026-09-08.json +0 -588
  121. package/benchmarks/baselines/external-intermediate-2026-09-08.json +0 -116
  122. package/benchmarks/baselines/external-matched-openai-2026-09-08.json +0 -1922
  123. package/benchmarks/baselines/external-matched-qwen-2026-09-08.json +0 -1706
  124. package/benchmarks/baselines/external-pilot-2026-09-08.json +0 -439
  125. package/benchmarks/baselines/external-qwen-flash-2026-09-08.json +0 -1570
  126. package/benchmarks/baselines/external-qwen-remediation-2026-09-09.json +0 -1509
  127. package/benchmarks/baselines/external-qwen-sdk-114-progress-2026-09-09.json +0 -2509
  128. package/benchmarks/baselines/external-sdk-upgrade-2026-09-08.json +0 -564
  129. package/benchmarks/baselines/external-verifier-recovery-2026-09-09.json +0 -794
  130. package/benchmarks/baselines/full-harness-review-2026-09-10.json +0 -134
  131. package/benchmarks/baselines/harness-audit-2026-09-09.json +0 -136
  132. package/benchmarks/baselines/harness-remediation-2026-09-09.json +0 -160
  133. package/benchmarks/baselines/oci-remediation-2026-09-10.json +0 -535
  134. package/benchmarks/baselines/rc14-holdout-2026-09-10.json +0 -854
  135. package/benchmarks/baselines/repair-architecture-audit-2026-09-09.json +0 -75
  136. package/benchmarks/baselines/time-to-safe-fix-live-expanded-2026-08-21.json +0 -186
  137. package/benchmarks/baselines/time-to-safe-fix-live-smoke-2026-08-21.json +0 -186
  138. package/dist/console-input.d.ts +0 -28
  139. package/docs/GA_READINESS.md +0 -29
  140. package/docs/GEMINI_1_0_DECISION.md +0 -9
  141. package/docs/LIVE_CERTIFICATION.md +0 -107
  142. package/docs/RC13_SECURITY_REVIEW.md +0 -28
  143. package/docs/RC14_DELEGATED_SECURITY_DECISION.md +0 -80
  144. package/docs/RC14_SECURITY_REVIEW.md +0 -40
  145. package/docs/RELEASE.md +0 -96
  146. package/docs/ROLLBACK.md +0 -9
  147. package/docs/SECURITY_REVIEW_EVIDENCE.md +0 -17
  148. package/docs/ga-readiness.json +0 -366
  149. package/docs/reports/EFFICIENCY_REVIEW.md +0 -156
  150. package/docs/reports/EXTERNAL_COMPARISON.md +0 -434
  151. package/docs/reports/FULL_HARNESS_REVIEW_2026-09-10.md +0 -200
  152. package/docs/reports/GA_BUDGET_REMEDIATION_2026-09-19.md +0 -38
  153. package/docs/reports/GA_REPAIR_RECOVERY_2026-09-19.md +0 -700
  154. package/docs/reports/GA_VALIDATION_2026-09-19.md +0 -111
  155. package/docs/reports/HARNESS_ARCHITECTURE_REVIEW_2026-09-09.md +0 -202
  156. package/docs/reports/HARNESS_AUDIT_2026-09-09.md +0 -306
  157. package/docs/reports/HARNESS_REMEDIATION_2026-09-09.md +0 -74
  158. package/docs/reports/HARNESS_REMEDIATION_2026-09-10.md +0 -90
  159. package/docs/reports/MODEL_COMPARISON_2026-09-09.md +0 -184
  160. package/docs/reports/QWEN_REMEDIATION_COMPARISON_2026-09-09.md +0 -142
  161. package/docs/reports/RC14_VALIDATION_2026-09-10.md +0 -45
  162. package/docs/reports/README.md +0 -26
  163. package/docs/reports/evidence/ga-budget-remediation-2026-09-19.json +0 -133
  164. package/docs/reports/evidence/ga-catalog-ablation-2026-09-19.json +0 -699
  165. package/docs/reports/evidence/ga-catalog-ablation-plan-2026-09-19.json +0 -40
  166. package/docs/reports/evidence/ga-catalog-observed-2026-09-19.json +0 -985
  167. package/docs/reports/evidence/ga-catalog-observed-plan-2026-09-19.json +0 -28
  168. package/docs/reports/evidence/ga-catalog-observed-status-2026-09-19.json +0 -15
  169. package/docs/reports/evidence/ga-complete-local-check-2026-09-19.json +0 -47
  170. package/docs/reports/evidence/ga-completion-reminder-2026-09-19.json +0 -22
  171. package/docs/reports/evidence/ga-fresh-cohort-plan-2026-09-19.json +0 -54
  172. package/docs/reports/evidence/ga-fresh-cohort-preparation-2026-09-19.json +0 -242
  173. package/docs/reports/evidence/ga-fresh-cohort-result-2026-09-19.json +0 -4318
  174. package/docs/reports/evidence/ga-local-validation-followup-2026-09-19.json +0 -66
  175. package/docs/reports/evidence/ga-node-consumers-2026-09-19.json +0 -31
  176. package/docs/reports/evidence/ga-package-content-validation-2026-09-19.json +0 -22
  177. package/docs/reports/evidence/ga-plan-completion-2026-09-19.json +0 -39
  178. package/docs/reports/evidence/ga-plan-reserve-2026-09-19.json +0 -573
  179. package/docs/reports/evidence/ga-plan-reserve-plan-2026-09-19.json +0 -24
  180. package/docs/reports/evidence/ga-plan-transition-2026-09-19.json +0 -19
  181. package/docs/reports/evidence/ga-private-verifier-plan-2026-09-19.json +0 -24
  182. package/docs/reports/evidence/ga-private-verifier-root-cause-2026-09-19.json +0 -41
  183. package/docs/reports/evidence/ga-published-sdk-2026-09-19.json +0 -35
  184. package/docs/reports/evidence/ga-python-checkout-imports-2026-09-19.json +0 -95
  185. package/docs/reports/evidence/ga-python-origin-delivery-2026-09-19.json +0 -211
  186. package/docs/reports/evidence/ga-python-origin-delivery-plan-2026-09-19.json +0 -27
  187. package/docs/reports/evidence/ga-qwen-patched-package-2026-09-19.json +0 -1092
  188. package/docs/reports/evidence/ga-qwen-patched-package-plan-2026-09-19.json +0 -18
  189. package/docs/reports/evidence/ga-qwen-published-2026-09-19.json +0 -571
  190. package/docs/reports/evidence/ga-qwen-published-plan-2026-09-19.json +0 -18
  191. package/docs/reports/evidence/ga-qwen-tool-choice-2026-09-19.json +0 -85
  192. package/docs/reports/evidence/ga-qwen-tool-choice-patched-2026-09-19.json +0 -85
  193. package/docs/reports/evidence/ga-recovery-development-2026-09-19.json +0 -1066
  194. package/docs/reports/evidence/ga-recovery-graded-development-2026-09-19.json +0 -1313
  195. package/docs/reports/evidence/ga-recovery-graded-v2-2026-09-19.json +0 -1151
  196. package/docs/reports/evidence/ga-recovery-v3-2026-09-19.json +0 -3943
  197. package/docs/reports/evidence/ga-recovery-v4-2026-09-19.json +0 -1055
  198. package/docs/reports/evidence/ga-recovery-v5-2026-09-19.json +0 -1245
  199. package/docs/reports/evidence/ga-recovery-v6-2026-09-19.json +0 -699
  200. package/docs/reports/evidence/ga-recovery-v7-2026-09-19.json +0 -854
  201. package/docs/reports/evidence/ga-recovery-v8-2026-09-19.json +0 -596
  202. package/docs/reports/evidence/ga-required-delivery-2026-09-19.json +0 -25
  203. package/docs/reports/evidence/ga-required-delivery-live-2026-09-19.json +0 -1337
  204. package/docs/reports/evidence/ga-required-delivery-live-plan-2026-09-19.json +0 -25
  205. package/docs/reports/evidence/ga-retained-candidate-grading-2026-09-19.json +0 -30
  206. package/docs/reports/evidence/ga-tool-selection-live-2026-09-19.json +0 -559
  207. package/docs/reports/evidence/ga-tool-selection-live-plan-2026-09-19.json +0 -28
  208. package/docs/reports/evidence/ga-tool-selection-recovery-2026-09-19.json +0 -27
  209. package/docs/reports/evidence/ga-validation-2026-09-19.json +0 -236
  210. package/docs/reports/evidence/ga-verifier-discovery-live-2026-09-19.json +0 -1369
  211. package/docs/reports/evidence/ga-verifier-discovery-plan-2026-09-19.json +0 -29
  212. package/docs/reports/evidence/ga-verifier-failure-identification-2026-09-19.json +0 -30
  213. package/docs/reports/evidence/ga-verifier-feedback-2026-09-19.json +0 -65
  214. package/docs/reports/evidence/ga-verifier-hints-live-2026-09-19.json +0 -1297
  215. package/docs/reports/evidence/ga-verifier-hints-plan-2026-09-19.json +0 -27
  216. package/docs/reports/evidence/ga-work-boundary-context-analysis-2026-09-19.json +0 -113
  217. package/docs/reports/evidence/ga-work-boundary-live-2026-09-19.json +0 -301
  218. package/docs/reports/evidence/ga-work-boundary-live-plan-2026-09-19.json +0 -84
  219. package/docs/reports/evidence/ga-work-budget-planning-2026-09-19.json +0 -32
  220. package/docs/reports/evidence/ga-working-context-2026-09-19.json +0 -22
  221. package/docs/reports/evidence/rc14-delegated-security-review-2026-09-20.json +0 -81
  222. package/docs/reports/evidence/rc14-ga-gate-2026-09-20.json +0 -18
  223. package/docs/reports/evidence/rc14-representative-2026-09-20.json +0 -509
  224. package/docs/reports/evidence/rc14-security-regressions-2026-09-20.json +0 -64
  225. package/docs/reports/evidence/security-current-2026-09-19.json +0 -91
  226. package/docs/reports/evidence/security-remediation-2026-09-19.json +0 -97
  227. /package/dist/{cli-stream.d.ts → cli/cli-stream.d.ts} +0 -0
  228. /package/dist/{task-memory.d.ts → context/task-memory.d.ts} +0 -0
  229. /package/dist/{package-manager.d.ts → execution/package-manager.d.ts} +0 -0
  230. /package/dist/{process-runtime.d.ts → execution/process-runtime.d.ts} +0 -0
  231. /package/dist/{mcp.d.ts → integrations/mcp.d.ts} +0 -0
  232. /package/dist/{state-directory.d.ts → persistence/state-directory.d.ts} +0 -0
  233. /package/dist/{errors.d.ts → runtime/errors.d.ts} +0 -0
  234. /package/dist/{model-budget.d.ts → runtime/model-budget.d.ts} +0 -0
  235. /package/dist/{repair-controller.d.ts → runtime/repair-controller.d.ts} +0 -0
  236. /package/dist/{repair-progress.d.ts → runtime/repair-progress.d.ts} +0 -0
  237. /package/dist/{repair-verifier.d.ts → runtime/repair-verifier.d.ts} +0 -0
  238. /package/dist/{run-interruption.d.ts → runtime/run-interruption.d.ts} +0 -0
  239. /package/dist/{runtime-checkpoints.d.ts → runtime/runtime-checkpoints.d.ts} +0 -0
  240. /package/dist/{tool-registry.d.ts → tools/tool-registry.d.ts} +0 -0
  241. /package/dist/{bounded-reads.d.ts → workspace/bounded-reads.d.ts} +0 -0
  242. /package/dist/{change-envelope.d.ts → workspace/change-envelope.d.ts} +0 -0
  243. /package/dist/{edit-contracts.d.ts → workspace/edit-contracts.d.ts} +0 -0
  244. /package/dist/{file-security.d.ts → workspace/file-security.d.ts} +0 -0
  245. /package/dist/{replacement-edits.d.ts → workspace/replacement-edits.d.ts} +0 -0
  246. /package/dist/{workspace-mutation-lock.d.ts → workspace/workspace-mutation-lock.d.ts} +0 -0
@@ -2,13 +2,13 @@
2
2
 
3
3
  Benchmark implementations, deterministic fixtures, OCI image contracts, and their tests live in this repository because they measure Zhivex Harness behavior.
4
4
 
5
- Complete generated reports remain local under `../results/` (source checkout). Only compact sanitized snapshots belong in [`baselines`](./baselines/). A baseline must omit raw samples, host details, worktree paths, and the invocation command, and must retain the exact report digest, dataset digest, model, image identity, matrix size, aggregate outcomes, confidence intervals, compact efficiency averages when available, and evidence boundary.
5
+ Complete generated reports remain local under `../results/` (source checkout). Only compact sanitized snapshots belong in [`baselines`](https://github.com/Zhivex/zhivex-harness/tree/main/benchmarks/baselines). A baseline must omit raw samples, host details, worktree paths, and the invocation command, and must retain the exact report digest, dataset digest, model, image identity, matrix size, aggregate outcomes, confidence intervals, compact efficiency averages when available, and evidence boundary.
6
6
 
7
7
  These snapshots are local observations, not provider certification, public leaderboard results, or cross-platform performance guarantees.
8
8
 
9
9
  Both current live snapshots exercise the single-approval terminal edit-verify-import transaction. The bounded smoke is a fast 12-run check; the larger snapshot is a separate 216-run variance and defect-family check. Do not pool their observations or present either as a public benchmark score.
10
10
 
11
- The 12-task expanded Time-to-Safe-Fix fixture lives at [`evaluations/time-to-safe-fix-expanded.jsonl`](../evaluations/time-to-safe-fix-expanded.jsonl). Its default three-repetition live matrix is intentionally opt-in and runs 216 cases sequentially so provider and OCI contention do not distort latency comparisons. Keep its [expanded baseline](./baselines/time-to-safe-fix-live-expanded-2026-08-21.json) separate from the bounded smoke snapshot.
11
+ The 12-task expanded Time-to-Safe-Fix fixture lives at [`evaluations/time-to-safe-fix-expanded.jsonl`](../evaluations/time-to-safe-fix-expanded.jsonl). Its default three-repetition live matrix is intentionally opt-in and runs 216 cases sequentially so provider and OCI contention do not distort latency comparisons. Keep its [expanded baseline](https://github.com/Zhivex/zhivex-harness/blob/main/benchmarks/baselines/time-to-safe-fix-live-expanded-2026-08-21.json) separate from the bounded smoke snapshot.
12
12
 
13
13
  In the 2026-08-21 expanded local GPT-5.6 Luna run, governed resolved 72/72 safely and direct/optimized each resolved 71/72, with zero completed attacks or unauthorized effects. Safe-run p50 was 9.64 s direct, 17.56 s governed, and 8.49 s optimized. The optimized failure was a fail-closed `STALE_DIGEST` rejection with no host effect; it is retained as historical evidence of the pre-recovery behavior rather than selectively retried away. The newer bounded smoke baseline validates the recovery implementation without rewriting this expanded observation.
14
14
 
@@ -42,7 +42,7 @@ continuity suite nor a workspace microbenchmark establishes competitive superior
42
42
 
43
43
  ## External agent comparison
44
44
 
45
- The opt-in [SWE-bench comparison](../docs/reports/EXTERNAL_COMPARISON.md) runs upstream
45
+ The opt-in [SWE-bench comparison](https://github.com/Zhivex/zhivex-harness/blob/main/docs/reports/EXTERNAL_COMPARISON.md) runs upstream
46
46
  mini-SWE-agent and the native Zhivex OCI harness, exports actual patches, and grades
47
47
  with the official SWE-bench evaluator. `bun run benchmark:swebench:test` validates
48
48
  its offline contracts. Paid runs require a prepared, pinned matrix and `--live`.
@@ -0,0 +1,341 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "protocolVersion": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "requestId": {
10
+ "type": "string",
11
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
12
+ },
13
+ "connectionId": {
14
+ "type": "string",
15
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
16
+ },
17
+ "command": {
18
+ "oneOf": [
19
+ {
20
+ "type": "object",
21
+ "properties": {
22
+ "method": {
23
+ "type": "string",
24
+ "const": "project.get"
25
+ },
26
+ "projectId": {
27
+ "type": "string",
28
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
29
+ }
30
+ },
31
+ "required": [
32
+ "method",
33
+ "projectId"
34
+ ],
35
+ "additionalProperties": false
36
+ },
37
+ {
38
+ "type": "object",
39
+ "properties": {
40
+ "method": {
41
+ "type": "string",
42
+ "const": "session.list"
43
+ },
44
+ "projectId": {
45
+ "type": "string",
46
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
47
+ },
48
+ "search": {
49
+ "type": "string",
50
+ "maxLength": 256
51
+ }
52
+ },
53
+ "required": [
54
+ "method",
55
+ "projectId"
56
+ ],
57
+ "additionalProperties": false
58
+ },
59
+ {
60
+ "type": "object",
61
+ "properties": {
62
+ "method": {
63
+ "type": "string",
64
+ "const": "session.create"
65
+ },
66
+ "projectId": {
67
+ "type": "string",
68
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
69
+ },
70
+ "idempotencyKey": {
71
+ "type": "string",
72
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
73
+ },
74
+ "title": {
75
+ "type": "string",
76
+ "maxLength": 256
77
+ }
78
+ },
79
+ "required": [
80
+ "method",
81
+ "projectId",
82
+ "idempotencyKey"
83
+ ],
84
+ "additionalProperties": false
85
+ },
86
+ {
87
+ "type": "object",
88
+ "properties": {
89
+ "method": {
90
+ "type": "string",
91
+ "const": "session.get"
92
+ },
93
+ "projectId": {
94
+ "type": "string",
95
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
96
+ },
97
+ "sessionId": {
98
+ "type": "string",
99
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
100
+ }
101
+ },
102
+ "required": [
103
+ "method",
104
+ "projectId",
105
+ "sessionId"
106
+ ],
107
+ "additionalProperties": false
108
+ },
109
+ {
110
+ "type": "object",
111
+ "properties": {
112
+ "method": {
113
+ "type": "string",
114
+ "const": "session.rename"
115
+ },
116
+ "projectId": {
117
+ "type": "string",
118
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
119
+ },
120
+ "sessionId": {
121
+ "type": "string",
122
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
123
+ },
124
+ "idempotencyKey": {
125
+ "type": "string",
126
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
127
+ },
128
+ "expectedRevision": {
129
+ "type": "integer",
130
+ "minimum": 0,
131
+ "maximum": 9007199254740991
132
+ },
133
+ "title": {
134
+ "type": "string",
135
+ "maxLength": 256
136
+ }
137
+ },
138
+ "required": [
139
+ "method",
140
+ "projectId",
141
+ "sessionId",
142
+ "idempotencyKey",
143
+ "expectedRevision",
144
+ "title"
145
+ ],
146
+ "additionalProperties": false
147
+ },
148
+ {
149
+ "type": "object",
150
+ "properties": {
151
+ "method": {
152
+ "type": "string",
153
+ "const": "run.start"
154
+ },
155
+ "projectId": {
156
+ "type": "string",
157
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
158
+ },
159
+ "sessionId": {
160
+ "type": "string",
161
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
162
+ },
163
+ "idempotencyKey": {
164
+ "type": "string",
165
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
166
+ },
167
+ "expectedRevision": {
168
+ "type": "integer",
169
+ "minimum": 0,
170
+ "maximum": 9007199254740991
171
+ },
172
+ "prompt": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "maxLength": 65536
176
+ }
177
+ },
178
+ "required": [
179
+ "method",
180
+ "projectId",
181
+ "sessionId",
182
+ "idempotencyKey",
183
+ "expectedRevision",
184
+ "prompt"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "method": {
192
+ "type": "string",
193
+ "const": "run.get"
194
+ },
195
+ "projectId": {
196
+ "type": "string",
197
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
198
+ },
199
+ "sessionId": {
200
+ "type": "string",
201
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
202
+ },
203
+ "runId": {
204
+ "type": "string",
205
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
206
+ },
207
+ "includeReview": {
208
+ "type": "boolean"
209
+ },
210
+ "decisionOffset": {
211
+ "type": "integer",
212
+ "minimum": 0,
213
+ "maximum": 512
214
+ }
215
+ },
216
+ "required": [
217
+ "method",
218
+ "projectId",
219
+ "sessionId",
220
+ "runId"
221
+ ],
222
+ "additionalProperties": false
223
+ },
224
+ {
225
+ "type": "object",
226
+ "properties": {
227
+ "method": {
228
+ "type": "string",
229
+ "const": "approval.resolve"
230
+ },
231
+ "projectId": {
232
+ "type": "string",
233
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
234
+ },
235
+ "sessionId": {
236
+ "type": "string",
237
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
238
+ },
239
+ "runId": {
240
+ "type": "string",
241
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
242
+ },
243
+ "idempotencyKey": {
244
+ "type": "string",
245
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
246
+ },
247
+ "expectedRevision": {
248
+ "type": "integer",
249
+ "minimum": 0,
250
+ "maximum": 9007199254740991
251
+ },
252
+ "decisions": {
253
+ "minItems": 1,
254
+ "maxItems": 64,
255
+ "type": "array",
256
+ "items": {
257
+ "type": "object",
258
+ "properties": {
259
+ "approvalId": {
260
+ "type": "string",
261
+ "minLength": 1,
262
+ "maxLength": 256
263
+ },
264
+ "digest": {
265
+ "type": "string",
266
+ "pattern": "^[a-f0-9]{64}$"
267
+ },
268
+ "approve": {
269
+ "type": "boolean"
270
+ }
271
+ },
272
+ "required": [
273
+ "approvalId",
274
+ "digest",
275
+ "approve"
276
+ ],
277
+ "additionalProperties": false
278
+ }
279
+ }
280
+ },
281
+ "required": [
282
+ "method",
283
+ "projectId",
284
+ "sessionId",
285
+ "runId",
286
+ "idempotencyKey",
287
+ "expectedRevision",
288
+ "decisions"
289
+ ],
290
+ "additionalProperties": false
291
+ },
292
+ {
293
+ "type": "object",
294
+ "properties": {
295
+ "method": {
296
+ "type": "string",
297
+ "const": "run.cancel"
298
+ },
299
+ "projectId": {
300
+ "type": "string",
301
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
302
+ },
303
+ "sessionId": {
304
+ "type": "string",
305
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
306
+ },
307
+ "runId": {
308
+ "type": "string",
309
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
310
+ },
311
+ "idempotencyKey": {
312
+ "type": "string",
313
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
314
+ },
315
+ "expectedRevision": {
316
+ "type": "integer",
317
+ "minimum": 0,
318
+ "maximum": 9007199254740991
319
+ }
320
+ },
321
+ "required": [
322
+ "method",
323
+ "projectId",
324
+ "sessionId",
325
+ "runId",
326
+ "idempotencyKey",
327
+ "expectedRevision"
328
+ ],
329
+ "additionalProperties": false
330
+ }
331
+ ]
332
+ }
333
+ },
334
+ "required": [
335
+ "protocolVersion",
336
+ "requestId",
337
+ "connectionId",
338
+ "command"
339
+ ],
340
+ "additionalProperties": false
341
+ }
@@ -24,6 +24,7 @@
24
24
  "DEFAULT_TIME_TO_SAFE_FIX_GOAL",
25
25
  "EDIT_CONTRACT_SCHEMA_VERSION",
26
26
  "EDIT_DIGEST_ALGORITHM",
27
+ "HARNESS_CLIENT_PROTOCOL_VERSION",
27
28
  "HARNESS_CONFIG_MIGRATABLE_SCHEMA_VERSIONS",
28
29
  "HARNESS_CONFIG_SCHEMA_VERSION",
29
30
  "HARNESS_CONTEXT_BUNDLE_SCHEMA_VERSION",
@@ -132,6 +133,7 @@
132
133
  "createEmptyHarnessContextBundle",
133
134
  "createExecutionEnvironmentTools",
134
135
  "createHarness",
136
+ "createHarnessClientAdapter",
135
137
  "createHarnessLifecycleDispatcher",
136
138
  "createHarnessMcpTools",
137
139
  "createHarnessOciExecutionEnvironment",
@@ -161,11 +163,14 @@
161
163
  "formatApproval",
162
164
  "formatTerminalEvent",
163
165
  "formatTerminalHeader",
166
+ "harnessClientCommandSchema",
167
+ "harnessClientRequestSchema",
164
168
  "harnessContextConfigurationSchema",
165
169
  "harnessContextFingerprintInput",
166
170
  "harnessErrorDocument",
167
171
  "harnessExecutionSession",
168
172
  "harnessLifecycleFingerprintInput",
173
+ "harnessLocalCredentialsSchema",
169
174
  "harnessSkillLoadInputSchema",
170
175
  "importHarnessStateBackup",
171
176
  "importHarnessStateBackupFile",
@@ -186,6 +191,7 @@
186
191
  "normalizeHarnessError",
187
192
  "normalizeHarnessMcpConfiguration",
188
193
  "openCliSessionStore",
194
+ "openHarnessActivityStore",
189
195
  "openHarnessPersistence",
190
196
  "openSessionStore",
191
197
  "parseCliJsonDocument",
@@ -195,8 +201,11 @@
195
201
  "providerAvailability",
196
202
  "providerDescriptor",
197
203
  "quarantineFileInputSchema",
204
+ "readHarnessLocalCredentials",
198
205
  "readHarnessStateBackup",
206
+ "recoverHarnessLocalService",
199
207
  "renderHarnessContextInstructions",
208
+ "requestHarnessLocalService",
200
209
  "resolveHarnessConfig",
201
210
  "resolveHarnessModelRoutes",
202
211
  "resolveTerminalApprovals",
@@ -208,6 +217,7 @@
208
217
  "serializeHarnessModelRoutes",
209
218
  "serializeStreamEvent",
210
219
  "serializeStreamResult",
220
+ "startHarnessLocalService",
211
221
  "stateBackupBundleSchema",
212
222
  "streamEventDocument",
213
223
  "streamResultDocument",
@@ -298,6 +308,7 @@
298
308
  ],
299
309
  "experimentalRuntimeExports": [
300
310
  "DEFAULT_TIME_TO_SAFE_FIX_GOAL",
311
+ "HARNESS_CLIENT_PROTOCOL_VERSION",
301
312
  "TIME_TO_SAFE_FIX_CARRIERS",
302
313
  "TIME_TO_SAFE_FIX_DIAGNOSTIC_CODES",
303
314
  "TIME_TO_SAFE_FIX_FAILURE_ORIGINS",
@@ -306,10 +317,19 @@
306
317
  "TIME_TO_SAFE_FIX_PROFILES",
307
318
  "TIME_TO_SAFE_FIX_SCHEMA_VERSION",
308
319
  "classifyTimeToSafeFixFailure",
320
+ "createHarnessClientAdapter",
309
321
  "createTimeToSafeFixCases",
310
322
  "createTimeToSafeFixReport",
311
323
  "createTimeToSafeFixSample",
324
+ "harnessClientCommandSchema",
325
+ "harnessClientRequestSchema",
326
+ "harnessLocalCredentialsSchema",
312
327
  "injectTimeToSafeFixAttack",
328
+ "openHarnessActivityStore",
329
+ "readHarnessLocalCredentials",
330
+ "recoverHarnessLocalService",
331
+ "requestHarnessLocalService",
332
+ "startHarnessLocalService",
313
333
  "timeToSafeFixDriverResultSchema",
314
334
  "timeToSafeFixLatencyStatistics",
315
335
  "timeToSafeFixTaskSchema"
@@ -492,8 +512,23 @@
492
512
  "ExternalAttestationReference",
493
513
  "FileDigest",
494
514
  "ForkSessionInput",
515
+ "HarnessActivityEvent",
516
+ "HarnessActivityOptions",
517
+ "HarnessActivityPage",
518
+ "HarnessActivitySnapshot",
519
+ "HarnessActivityStore",
495
520
  "HarnessBudget",
496
521
  "HarnessCheck",
522
+ "HarnessClientAdapter",
523
+ "HarnessClientAdapterOptions",
524
+ "HarnessClientCommand",
525
+ "HarnessClientData",
526
+ "HarnessClientErrorCode",
527
+ "HarnessClientNegotiation",
528
+ "HarnessClientRequest",
529
+ "HarnessClientResponse",
530
+ "HarnessClientRun",
531
+ "HarnessClientSession",
497
532
  "HarnessCommandResult",
498
533
  "HarnessCompactionConfig",
499
534
  "HarnessConfig",
@@ -505,6 +540,7 @@
505
540
  "HarnessContextManifestIdentity",
506
541
  "HarnessContextSource",
507
542
  "HarnessCostBudget",
543
+ "HarnessDelegationContract",
508
544
  "HarnessEnvironmentStatus",
509
545
  "HarnessErrorCategory",
510
546
  "HarnessErrorCode",
@@ -519,6 +555,9 @@
519
555
  "HarnessLifecycleHookFailure",
520
556
  "HarnessLifecycleHookRegistration",
521
557
  "HarnessLoadedSkill",
558
+ "HarnessLocalCredentials",
559
+ "HarnessLocalService",
560
+ "HarnessLocalServiceOptions",
522
561
  "HarnessMcpClients",
523
562
  "HarnessMcpConfiguration",
524
563
  "HarnessMcpPermission",
@@ -700,6 +739,7 @@
700
739
  "HarnessContextConfiguration",
701
740
  "HarnessContextManifestIdentity",
702
741
  "HarnessContextSource",
742
+ "HarnessDelegationContract",
703
743
  "HarnessEnvironmentStatus",
704
744
  "HarnessErrorOptions",
705
745
  "HarnessExecutionIoMetrics",
@@ -775,6 +815,24 @@
775
815
  "WorkspaceTopologyFile"
776
816
  ],
777
817
  "experimentalTypeExports": [
818
+ "HarnessActivityEvent",
819
+ "HarnessActivityOptions",
820
+ "HarnessActivityPage",
821
+ "HarnessActivitySnapshot",
822
+ "HarnessActivityStore",
823
+ "HarnessClientAdapter",
824
+ "HarnessClientAdapterOptions",
825
+ "HarnessClientCommand",
826
+ "HarnessClientData",
827
+ "HarnessClientErrorCode",
828
+ "HarnessClientNegotiation",
829
+ "HarnessClientRequest",
830
+ "HarnessClientResponse",
831
+ "HarnessClientRun",
832
+ "HarnessClientSession",
833
+ "HarnessLocalCredentials",
834
+ "HarnessLocalService",
835
+ "HarnessLocalServiceOptions",
778
836
  "TimeToSafeFixAggregate",
779
837
  "TimeToSafeFixCarrier",
780
838
  "TimeToSafeFixCase",
@@ -848,6 +906,7 @@
848
906
  "--provider",
849
907
  "--model",
850
908
  "--profile",
909
+ "--update",
851
910
  "--json"
852
911
  ],
853
912
  "required": [],
@@ -856,6 +915,10 @@
856
915
  },
857
916
  "run": {
858
917
  "allowed": [
918
+ "--service",
919
+ "--session",
920
+ "--pricing-file",
921
+ "--usage-limit-usd",
859
922
  "--provider",
860
923
  "--model",
861
924
  "--profile",
@@ -883,6 +946,7 @@
883
946
  "--oci-max-workspace-bytes",
884
947
  "--oci-max-file-write-bytes",
885
948
  "--oci-tmpfs-mb",
949
+ "--no-token-budget",
886
950
  "--max-steps",
887
951
  "--timeout-ms",
888
952
  "--max-tool-calls",
@@ -917,6 +981,20 @@
917
981
  "--subagent"
918
982
  ],
919
983
  "conflicts": {
984
+ "--usage-limit-usd": [
985
+ "--max-cost-usd",
986
+ "--input-cost-per-million",
987
+ "--output-cost-per-million"
988
+ ],
989
+ "--max-cost-usd": [
990
+ "--usage-limit-usd"
991
+ ],
992
+ "--input-cost-per-million": [
993
+ "--usage-limit-usd"
994
+ ],
995
+ "--output-cost-per-million": [
996
+ "--usage-limit-usd"
997
+ ],
920
998
  "--json": [
921
999
  "--jsonl"
922
1000
  ],
@@ -927,6 +1005,8 @@
927
1005
  },
928
1006
  "review": {
929
1007
  "allowed": [
1008
+ "--pricing-file",
1009
+ "--usage-limit-usd",
930
1010
  "--provider",
931
1011
  "--model",
932
1012
  "--profile",
@@ -939,6 +1019,7 @@
939
1019
  "--namespace",
940
1020
  "--context-config",
941
1021
  "--no-project-context",
1022
+ "--no-token-budget",
942
1023
  "--subagent-max-steps",
943
1024
  "--subagent-max-tool-calls",
944
1025
  "--subagent-max-tool-errors",
@@ -961,6 +1042,9 @@
961
1042
  },
962
1043
  "chat": {
963
1044
  "allowed": [
1045
+ "--service",
1046
+ "--pricing-file",
1047
+ "--usage-limit-usd",
964
1048
  "--provider",
965
1049
  "--model",
966
1050
  "--profile",
@@ -988,6 +1072,7 @@
988
1072
  "--oci-max-workspace-bytes",
989
1073
  "--oci-max-file-write-bytes",
990
1074
  "--oci-tmpfs-mb",
1075
+ "--no-token-budget",
991
1076
  "--max-steps",
992
1077
  "--timeout-ms",
993
1078
  "--max-tool-calls",
@@ -1021,6 +1106,20 @@
1021
1106
  "--subagent"
1022
1107
  ],
1023
1108
  "conflicts": {
1109
+ "--usage-limit-usd": [
1110
+ "--max-cost-usd",
1111
+ "--input-cost-per-million",
1112
+ "--output-cost-per-million"
1113
+ ],
1114
+ "--max-cost-usd": [
1115
+ "--usage-limit-usd"
1116
+ ],
1117
+ "--input-cost-per-million": [
1118
+ "--usage-limit-usd"
1119
+ ],
1120
+ "--output-cost-per-million": [
1121
+ "--usage-limit-usd"
1122
+ ],
1024
1123
  "--session": [
1025
1124
  "--continue"
1026
1125
  ],
@@ -1065,6 +1164,7 @@
1065
1164
  "--oci-max-workspace-bytes",
1066
1165
  "--oci-max-file-write-bytes",
1067
1166
  "--oci-tmpfs-mb",
1167
+ "--no-token-budget",
1068
1168
  "--max-steps",
1069
1169
  "--timeout-ms",
1070
1170
  "--max-tool-calls",
@@ -1098,6 +1198,8 @@
1098
1198
  },
1099
1199
  "resume": {
1100
1200
  "allowed": [
1201
+ "--service",
1202
+ "--session",
1101
1203
  "--workspace",
1102
1204
  "--state-dir",
1103
1205
  "--store",
@@ -1218,6 +1320,7 @@
1218
1320
  },
1219
1321
  "sessions:list": {
1220
1322
  "allowed": [
1323
+ "--service",
1221
1324
  "--workspace",
1222
1325
  "--state-dir",
1223
1326
  "--store",
@@ -1225,7 +1328,8 @@
1225
1328
  "--user",
1226
1329
  "--namespace",
1227
1330
  "--limit",
1228
- "--json"
1331
+ "--json",
1332
+ "--search"
1229
1333
  ],
1230
1334
  "required": [],
1231
1335
  "repeatable": [],
@@ -1233,6 +1337,7 @@
1233
1337
  },
1234
1338
  "sessions:inspect": {
1235
1339
  "allowed": [
1340
+ "--service",
1236
1341
  "--workspace",
1237
1342
  "--state-dir",
1238
1343
  "--store",
@@ -1247,6 +1352,7 @@
1247
1352
  },
1248
1353
  "sessions:rename": {
1249
1354
  "allowed": [
1355
+ "--service",
1250
1356
  "--workspace",
1251
1357
  "--state-dir",
1252
1358
  "--store",