@kynver-app/runtime 0.2.24 → 0.2.28

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 (416) hide show
  1. package/dist/chat/command-auth-proof.js +1 -1
  2. package/dist/cli.js +69 -68
  3. package/dist/index.js +89 -88
  4. package/dist/instruction-bundle/contract.js +2 -2
  5. package/dist/local-run-store/index.js +6 -6
  6. package/dist/server/adapter-contract.js +1 -1
  7. package/dist/server/cleanup.js +9 -9
  8. package/dist/server/db-credentials.js +2 -2
  9. package/dist/server/default-repo.js +1 -1
  10. package/dist/server/heavy-verification.js +1 -1
  11. package/dist/server/memory-cost-enforce.js +2 -2
  12. package/dist/server/memory-cost.js +2 -2
  13. package/dist/server/model-routing.js +3 -3
  14. package/dist/server/monitor.js +5 -5
  15. package/dist/server/orchestration.js +1 -1
  16. package/dist/server/worker-policy.js +2 -2
  17. package/package.json +4 -2
  18. package/dist/active-harness-workers.d.ts +0 -11
  19. package/dist/auto-complete.d.ts +0 -60
  20. package/dist/bootstrap.d.ts +0 -49
  21. package/dist/bounded-build/admission.d.ts +0 -30
  22. package/dist/bounded-build/constants.d.ts +0 -10
  23. package/dist/bounded-build/exec.d.ts +0 -35
  24. package/dist/bounded-build/index.d.ts +0 -6
  25. package/dist/bounded-build/meminfo.d.ts +0 -5
  26. package/dist/bounded-build/node-options.d.ts +0 -9
  27. package/dist/bounded-build/systemd-wrap.d.ts +0 -17
  28. package/dist/box-identity.d.ts +0 -19
  29. package/dist/box-resource-snapshot-shared.d.ts +0 -13
  30. package/dist/box-resource-snapshot.d.ts +0 -45
  31. package/dist/box-worker-cap.d.ts +0 -9
  32. package/dist/byoc/context-hydration.d.ts +0 -54
  33. package/dist/byoc/execution-proof.d.ts +0 -46
  34. package/dist/byoc/index.d.ts +0 -5
  35. package/dist/byoc/job-envelope.d.ts +0 -39
  36. package/dist/byoc/m6-golden-path.d.ts +0 -86
  37. package/dist/byoc/mcp-tool-proof.d.ts +0 -42
  38. package/dist/callback-headers.d.ts +0 -2
  39. package/dist/callbacks.d.ts +0 -74
  40. package/dist/chat/anthropic-credentials.d.ts +0 -11
  41. package/dist/chat/anthropic-stream.d.ts +0 -43
  42. package/dist/chat/chat-claim-loop.d.ts +0 -41
  43. package/dist/chat/chat-primary-cli.d.ts +0 -2
  44. package/dist/chat/command-allowlist.d.ts +0 -8
  45. package/dist/chat/command-auth-proof.d.ts +0 -67
  46. package/dist/chat/command-executor.d.ts +0 -18
  47. package/dist/chat/delta-batcher.d.ts +0 -13
  48. package/dist/cleanup-active-worktrees.d.ts +0 -14
  49. package/dist/cleanup-build-cache-paths.d.ts +0 -5
  50. package/dist/cleanup-cli.d.ts +0 -1
  51. package/dist/cleanup-completion-blocker.d.ts +0 -10
  52. package/dist/cleanup-dependency-scan.d.ts +0 -13
  53. package/dist/cleanup-dir-size.d.ts +0 -5
  54. package/dist/cleanup-disk-pressure.d.ts +0 -15
  55. package/dist/cleanup-duplicate-worktrees.d.ts +0 -8
  56. package/dist/cleanup-evidence.d.ts +0 -10
  57. package/dist/cleanup-execute.d.ts +0 -7
  58. package/dist/cleanup-git-probe.d.ts +0 -5
  59. package/dist/cleanup-git-rev-cache.d.ts +0 -5
  60. package/dist/cleanup-git-status-cache.d.ts +0 -5
  61. package/dist/cleanup-guards-helpers.d.ts +0 -2
  62. package/dist/cleanup-guards.d.ts +0 -53
  63. package/dist/cleanup-harness-path-validate.d.ts +0 -5
  64. package/dist/cleanup-harness-roots.d.ts +0 -6
  65. package/dist/cleanup-index-status.d.ts +0 -16
  66. package/dist/cleanup-orphan-safety.d.ts +0 -17
  67. package/dist/cleanup-path-ownership.d.ts +0 -9
  68. package/dist/cleanup-privileged-remove.d.ts +0 -13
  69. package/dist/cleanup-progress.d.ts +0 -2
  70. package/dist/cleanup-remove-path.d.ts +0 -17
  71. package/dist/cleanup-retention-config.d.ts +0 -26
  72. package/dist/cleanup-run-directory.d.ts +0 -20
  73. package/dist/cleanup-run-liveness.d.ts +0 -21
  74. package/dist/cleanup-run-terminal-cache.d.ts +0 -6
  75. package/dist/cleanup-salvage-evidence.d.ts +0 -33
  76. package/dist/cleanup-scan.d.ts +0 -15
  77. package/dist/cleanup-summary.d.ts +0 -29
  78. package/dist/cleanup-types.d.ts +0 -154
  79. package/dist/cleanup-worker-harness-live.d.ts +0 -9
  80. package/dist/cleanup-worktree-index.d.ts +0 -18
  81. package/dist/cleanup-worktree-salvage.d.ts +0 -7
  82. package/dist/cleanup.d.ts +0 -5
  83. package/dist/cli-output/worker-start-stdout.d.ts +0 -11
  84. package/dist/cli.d.ts +0 -14
  85. package/dist/command-center-contract-cli.d.ts +0 -1
  86. package/dist/completion-ack.d.ts +0 -18
  87. package/dist/completion-replay.d.ts +0 -10
  88. package/dist/completion-response.d.ts +0 -15
  89. package/dist/config.d.ts +0 -122
  90. package/dist/context-budget-receipt.d.ts +0 -96
  91. package/dist/context-preview/chat-memory-preview.d.ts +0 -33
  92. package/dist/cron/cron-cli-bin.d.ts +0 -7
  93. package/dist/cron/cron-env-file.d.ts +0 -22
  94. package/dist/cron/cron-env.d.ts +0 -21
  95. package/dist/cron/cron-fire.d.ts +0 -8
  96. package/dist/cron/cron-id.d.ts +0 -3
  97. package/dist/cron/cron-install-api.d.ts +0 -27
  98. package/dist/cron/cron-install-cli.d.ts +0 -2
  99. package/dist/cron/cron-install-plan.d.ts +0 -34
  100. package/dist/cron/cron-install-secrets.d.ts +0 -6
  101. package/dist/cron/cron-install-systemd.d.ts +0 -18
  102. package/dist/cron/cron-install-verify.d.ts +0 -15
  103. package/dist/cron/cron-install.d.ts +0 -51
  104. package/dist/cron/cron-lock.d.ts +0 -9
  105. package/dist/cron/cron-match.d.ts +0 -8
  106. package/dist/cron/cron-readiness.d.ts +0 -35
  107. package/dist/cron/cron-status.d.ts +0 -10
  108. package/dist/cron/cron-store.d.ts +0 -8
  109. package/dist/cron/cron-tick-cli.d.ts +0 -2
  110. package/dist/cron/cron-tick-state.d.ts +0 -5
  111. package/dist/cron/cron-tick.d.ts +0 -19
  112. package/dist/cron/cron-types.d.ts +0 -53
  113. package/dist/cron/hermes-provider-notice.d.ts +0 -1
  114. package/dist/daemon-box-identity.d.ts +0 -16
  115. package/dist/daemon-heartbeat.d.ts +0 -30
  116. package/dist/daemon-keeper.d.ts +0 -53
  117. package/dist/daemon-platform-guard.d.ts +0 -2
  118. package/dist/daemon-supervision/host.d.ts +0 -4
  119. package/dist/daemon-supervision/index.d.ts +0 -6
  120. package/dist/daemon-supervision/policy.d.ts +0 -16
  121. package/dist/daemon-supervision/setup.d.ts +0 -23
  122. package/dist/daemon-supervision/start.d.ts +0 -26
  123. package/dist/daemon-supervision/supervision-health.d.ts +0 -20
  124. package/dist/daemon-supervision/verify.d.ts +0 -13
  125. package/dist/daemon.d.ts +0 -5
  126. package/dist/db-credential-env-paths.d.ts +0 -13
  127. package/dist/db-credential-resolver.d.ts +0 -38
  128. package/dist/db-url-hint.d.ts +0 -4
  129. package/dist/default-repo-cli.d.ts +0 -20
  130. package/dist/default-repo-discovery.d.ts +0 -25
  131. package/dist/default-repo.d.ts +0 -32
  132. package/dist/device-login.d.ts +0 -8
  133. package/dist/discard-disposable.d.ts +0 -6
  134. package/dist/disk-gate.d.ts +0 -25
  135. package/dist/dispatch-callback-timeout.d.ts +0 -1
  136. package/dist/dispatch-claim-release.d.ts +0 -23
  137. package/dist/dispatch-lane-normalization.d.ts +0 -14
  138. package/dist/dispatch-model-guard.d.ts +0 -26
  139. package/dist/dispatch-progress.d.ts +0 -3
  140. package/dist/dispatch-resource-gate.d.ts +0 -20
  141. package/dist/dispatch-start-abort.d.ts +0 -3
  142. package/dist/dispatch-start-readback.d.ts +0 -27
  143. package/dist/dispatch.d.ts +0 -24
  144. package/dist/disposable-artifacts.d.ts +0 -2
  145. package/dist/doctor/context-envelope-cli.d.ts +0 -1
  146. package/dist/doctor/context-envelope.d.ts +0 -13
  147. package/dist/doctor/context-envelope.probes.d.ts +0 -25
  148. package/dist/doctor/context-envelope.types.d.ts +0 -42
  149. package/dist/doctor/doctor.types.d.ts +0 -50
  150. package/dist/doctor/github-readiness.d.ts +0 -16
  151. package/dist/doctor/index.d.ts +0 -7
  152. package/dist/doctor/local-store-cli.d.ts +0 -11
  153. package/dist/doctor/local-store.d.ts +0 -35
  154. package/dist/doctor/node-runtime-cli.d.ts +0 -6
  155. package/dist/doctor/node-runtime.d.ts +0 -19
  156. package/dist/doctor/runner-install-cli.d.ts +0 -1
  157. package/dist/doctor/runner-install.d.ts +0 -86
  158. package/dist/doctor/runtime-takeover-cli.d.ts +0 -1
  159. package/dist/doctor/runtime-takeover-daemon-supervision.d.ts +0 -3
  160. package/dist/doctor/runtime-takeover-deploy-evidence.d.ts +0 -13
  161. package/dist/doctor/runtime-takeover-scheduler.d.ts +0 -29
  162. package/dist/doctor/runtime-takeover.d.ts +0 -3
  163. package/dist/doctor/runtime-takeover.probes.d.ts +0 -45
  164. package/dist/executor-ref-routing.d.ts +0 -14
  165. package/dist/exit-classify.d.ts +0 -12
  166. package/dist/exited-salvage.d.ts +0 -22
  167. package/dist/exited-worker-handoff-capture.d.ts +0 -19
  168. package/dist/factory-status/collect.d.ts +0 -12
  169. package/dist/factory-status/lightweight.d.ts +0 -5
  170. package/dist/factory-status/render.d.ts +0 -5
  171. package/dist/factory-status/types.d.ts +0 -46
  172. package/dist/factory-status-cli.d.ts +0 -1
  173. package/dist/factory-steer-delivery.d.ts +0 -7
  174. package/dist/finalize.d.ts +0 -25
  175. package/dist/fortress-engagement-gate.d.ts +0 -5
  176. package/dist/git.d.ts +0 -37
  177. package/dist/github-repo.d.ts +0 -5
  178. package/dist/harness-expert-review.d.ts +0 -12
  179. package/dist/harness-lease-owner.d.ts +0 -13
  180. package/dist/harness-notice/harness-notice.auto-complete.d.ts +0 -3
  181. package/dist/harness-notice/harness-notice.monitor-tick.d.ts +0 -6
  182. package/dist/harness-notice/harness-notice.parse.d.ts +0 -3
  183. package/dist/harness-notice/harness-notice.tool-response.d.ts +0 -3
  184. package/dist/harness-notice/harness-notice.types.d.ts +0 -17
  185. package/dist/harness-notice/harness-notice.worker-complete.d.ts +0 -3
  186. package/dist/harness-notice/harness-notice.worker-start.d.ts +0 -7
  187. package/dist/harness-notice/harness-notice.worker-status.d.ts +0 -2
  188. package/dist/harness-notice/index.d.ts +0 -8
  189. package/dist/harness-repair-target.d.ts +0 -23
  190. package/dist/harness-storage-snapshot.d.ts +0 -26
  191. package/dist/harness-verify-cli.d.ts +0 -1
  192. package/dist/harness-verify.d.ts +0 -30
  193. package/dist/harness-worker-active.d.ts +0 -12
  194. package/dist/harness-worktree-build-guard.d.ts +0 -12
  195. package/dist/heartbeat-final-result.d.ts +0 -5
  196. package/dist/heartbeat.d.ts +0 -27
  197. package/dist/heavy-verification/command-classify.d.ts +0 -9
  198. package/dist/heavy-verification/gate.d.ts +0 -10
  199. package/dist/heavy-verification/index.d.ts +0 -5
  200. package/dist/heavy-verification/paths.d.ts +0 -3
  201. package/dist/heavy-verification/slot.d.ts +0 -49
  202. package/dist/heavy-verification/worker-command-gate.d.ts +0 -23
  203. package/dist/index.d.ts +0 -88
  204. package/dist/installed-package-versions.d.ts +0 -8
  205. package/dist/instruction-bundle/cache.d.ts +0 -6
  206. package/dist/instruction-bundle/client.d.ts +0 -25
  207. package/dist/instruction-bundle/contract.d.ts +0 -4
  208. package/dist/instruction-bundle/embedded-bundle.d.ts +0 -3
  209. package/dist/instruction-bundle/index.d.ts +0 -7
  210. package/dist/instruction-bundle/keys.d.ts +0 -14
  211. package/dist/instruction-bundle/state.d.ts +0 -24
  212. package/dist/instruction-bundle/types.d.ts +0 -42
  213. package/dist/instruction-bundle/verify.d.ts +0 -15
  214. package/dist/landing/cli-auth.d.ts +0 -11
  215. package/dist/landing/land-pr-check-classify.d.ts +0 -17
  216. package/dist/landing/land-pr-completion-post.d.ts +0 -12
  217. package/dist/landing/land-pr.d.ts +0 -28
  218. package/dist/landing-contract-gate.d.ts +0 -27
  219. package/dist/landing-contract-pr-classify.d.ts +0 -4
  220. package/dist/landing-gate.d.ts +0 -24
  221. package/dist/lane/landing-maintainer-local.d.ts +0 -15
  222. package/dist/lane/landing-maintainer-tick.d.ts +0 -16
  223. package/dist/lane/lane-spec.d.ts +0 -8
  224. package/dist/lane/lane-tick-cli.d.ts +0 -1
  225. package/dist/lease-renewal.d.ts +0 -15
  226. package/dist/local-pr-attention-reconcile.d.ts +0 -25
  227. package/dist/local-run-store/admission-enforce.d.ts +0 -38
  228. package/dist/local-run-store/admission-shadow.d.ts +0 -56
  229. package/dist/local-run-store/dispatch-claim-recovery-startup.d.ts +0 -11
  230. package/dist/local-run-store/dispatch-claim-recovery.d.ts +0 -54
  231. package/dist/local-run-store/dispatch-receipts.d.ts +0 -90
  232. package/dist/local-run-store/index.d.ts +0 -15
  233. package/dist/local-run-store/local-run-store.d.ts +0 -106
  234. package/dist/local-run-store/remote-surface-flags.d.ts +0 -15
  235. package/dist/local-run-store/small-surfaces.d.ts +0 -37
  236. package/dist/local-run-store/sqlite/sqlite-filesystem-policy.d.ts +0 -16
  237. package/dist/local-run-store/sqlite/sqlite-local-run-store.d.ts +0 -68
  238. package/dist/local-run-store/sqlite/sqlite-recovery.d.ts +0 -14
  239. package/dist/local-run-store/sqlite/sqlite-schema.d.ts +0 -13
  240. package/dist/local-run-store/store-lifecycle.d.ts +0 -38
  241. package/dist/local-run-store/surface-flags.d.ts +0 -47
  242. package/dist/local-run-store/tick-posture.d.ts +0 -27
  243. package/dist/material-worktree-changes.d.ts +0 -2
  244. package/dist/memory-cost-package-version-guard-enforce.d.ts +0 -10
  245. package/dist/memory-cost-package-version-guard.d.ts +0 -49
  246. package/dist/mesh-liveness/mesh-cron-lease-store.d.ts +0 -9
  247. package/dist/model-routing-task-enrich.d.ts +0 -8
  248. package/dist/model-routing.d.ts +0 -49
  249. package/dist/monitor/index.d.ts +0 -7
  250. package/dist/monitor/monitor-cli.d.ts +0 -9
  251. package/dist/monitor/monitor-loop.d.ts +0 -1
  252. package/dist/monitor/monitor-spawn.d.ts +0 -18
  253. package/dist/monitor/monitor.classify.d.ts +0 -15
  254. package/dist/monitor/monitor.service.d.ts +0 -17
  255. package/dist/monitor/monitor.store.d.ts +0 -6
  256. package/dist/monitor/monitor.task-lease.d.ts +0 -11
  257. package/dist/monitor/monitor.terminal.d.ts +0 -11
  258. package/dist/monitor/monitor.types.d.ts +0 -77
  259. package/dist/node-runtime-policy.d.ts +0 -25
  260. package/dist/orchestration-enforcement/config.d.ts +0 -5
  261. package/dist/orchestration-enforcement/evaluator.d.ts +0 -6
  262. package/dist/orchestration-enforcement/idempotency.d.ts +0 -8
  263. package/dist/orchestration-enforcement/index.d.ts +0 -4
  264. package/dist/orchestration-enforcement/types.d.ts +0 -24
  265. package/dist/orchestration-providers/adapter-contract.d.ts +0 -50
  266. package/dist/orchestration-providers/audit.d.ts +0 -3
  267. package/dist/orchestration-providers/capabilities.d.ts +0 -3
  268. package/dist/orchestration-providers/claude-oauth-binding.d.ts +0 -6
  269. package/dist/orchestration-providers/codex-oauth-binding.d.ts +0 -5
  270. package/dist/orchestration-providers/codex-orchestration-adapter.d.ts +0 -13
  271. package/dist/orchestration-providers/cost-router.d.ts +0 -24
  272. package/dist/orchestration-providers/cursor-oauth-binding.d.ts +0 -5
  273. package/dist/orchestration-providers/hermes-cli-adapter.d.ts +0 -15
  274. package/dist/orchestration-providers/hermes-openai-codex-binding.d.ts +0 -15
  275. package/dist/orchestration-providers/index.d.ts +0 -14
  276. package/dist/orchestration-providers/inventory.d.ts +0 -54
  277. package/dist/orchestration-providers/oauth-binding-utils.d.ts +0 -22
  278. package/dist/orchestration-providers/routing.d.ts +0 -16
  279. package/dist/orchestration-providers/types.d.ts +0 -45
  280. package/dist/package-version.d.ts +0 -5
  281. package/dist/path-values.d.ts +0 -5
  282. package/dist/paths.d.ts +0 -16
  283. package/dist/pipeline-dispatch.d.ts +0 -8
  284. package/dist/pipeline-exact-targets.d.ts +0 -2
  285. package/dist/pipeline-max-starts.d.ts +0 -26
  286. package/dist/pipeline-tick.d.ts +0 -50
  287. package/dist/plan-persist/agentos-api.d.ts +0 -28
  288. package/dist/plan-persist/body-hash.d.ts +0 -3
  289. package/dist/plan-persist/drain.d.ts +0 -7
  290. package/dist/plan-persist/errors.d.ts +0 -9
  291. package/dist/plan-persist/handoff.d.ts +0 -7
  292. package/dist/plan-persist/idempotency.d.ts +0 -2
  293. package/dist/plan-persist/index.d.ts +0 -8
  294. package/dist/plan-persist/outbox-durability.d.ts +0 -31
  295. package/dist/plan-persist/outbox-store.d.ts +0 -36
  296. package/dist/plan-persist/paths.d.ts +0 -8
  297. package/dist/plan-persist/persist.d.ts +0 -10
  298. package/dist/plan-persist/readback.d.ts +0 -17
  299. package/dist/plan-persist/types.d.ts +0 -95
  300. package/dist/plan-persist-cli.d.ts +0 -3
  301. package/dist/plan-progress-daemon-sync.d.ts +0 -7
  302. package/dist/plan-progress-sync.d.ts +0 -21
  303. package/dist/plan-progress.d.ts +0 -10
  304. package/dist/post-restart-unblock.d.ts +0 -24
  305. package/dist/pr-handoff/index.d.ts +0 -6
  306. package/dist/pr-handoff/pr-handoff-assess.d.ts +0 -44
  307. package/dist/pr-handoff/pr-handoff-dedupe.d.ts +0 -18
  308. package/dist/pr-handoff/pr-handoff-gh.d.ts +0 -52
  309. package/dist/pr-handoff/pr-handoff-supersede.d.ts +0 -17
  310. package/dist/pr-handoff/pr-handoff.d.ts +0 -8
  311. package/dist/pr-handoff/pr-handoff.types.d.ts +0 -45
  312. package/dist/pr-handoff/same-head-pr-guard.d.ts +0 -10
  313. package/dist/prompt.d.ts +0 -56
  314. package/dist/provider-evidence/collect.d.ts +0 -31
  315. package/dist/provider-evidence/exec.d.ts +0 -5
  316. package/dist/provider-evidence/index.d.ts +0 -7
  317. package/dist/provider-evidence/recipes-github.d.ts +0 -5
  318. package/dist/provider-evidence/recipes-vercel.d.ts +0 -2
  319. package/dist/provider-evidence/registry.d.ts +0 -6
  320. package/dist/provider-evidence/shared-cache.d.ts +0 -8
  321. package/dist/provider-evidence/types.d.ts +0 -48
  322. package/dist/provider-evidence/wanted-store.d.ts +0 -13
  323. package/dist/provider-quota-preflight.d.ts +0 -38
  324. package/dist/providers/claude.d.ts +0 -8
  325. package/dist/providers/codex.d.ts +0 -14
  326. package/dist/providers/cursor-windows.d.ts +0 -7
  327. package/dist/providers/cursor.d.ts +0 -13
  328. package/dist/providers/hermes-codex.d.ts +0 -12
  329. package/dist/providers/model-preflight.d.ts +0 -41
  330. package/dist/providers/openai-codex-resilience.d.ts +0 -33
  331. package/dist/providers/openai-compatible-response.d.ts +0 -23
  332. package/dist/providers/openai-compatible-runner.d.ts +0 -1
  333. package/dist/providers/openai-compatible.d.ts +0 -46
  334. package/dist/providers/registry.d.ts +0 -4
  335. package/dist/providers/types.d.ts +0 -36
  336. package/dist/redact.d.ts +0 -1
  337. package/dist/repair-target-worktree.d.ts +0 -4
  338. package/dist/repo-search.d.ts +0 -53
  339. package/dist/resource-gate.d.ts +0 -74
  340. package/dist/retry-limits.d.ts +0 -12
  341. package/dist/review-head-reconcile.d.ts +0 -17
  342. package/dist/run-list.d.ts +0 -38
  343. package/dist/run-metadata-retention.d.ts +0 -38
  344. package/dist/run-resolve.d.ts +0 -4
  345. package/dist/run-store.d.ts +0 -38
  346. package/dist/run-worker-index.d.ts +0 -10
  347. package/dist/runner-boundary/index.d.ts +0 -6
  348. package/dist/runner-boundary/runner-boundary.dispatch-guard.d.ts +0 -4
  349. package/dist/runner-boundary/runner-boundary.forge-legacy-migration.d.ts +0 -23
  350. package/dist/runner-boundary/runner-boundary.harness-root.d.ts +0 -17
  351. package/dist/runner-boundary/runner-boundary.resolve.d.ts +0 -4
  352. package/dist/runner-boundary/runner-boundary.run-guard.d.ts +0 -12
  353. package/dist/runner-boundary/runner-boundary.types.d.ts +0 -31
  354. package/dist/runner-config-backfill.d.ts +0 -18
  355. package/dist/runner-identity.d.ts +0 -21
  356. package/dist/runtime-identity.d.ts +0 -9
  357. package/dist/runtime-memory-envelope.d.ts +0 -16
  358. package/dist/scheduler-cutover-cli.d.ts +0 -2
  359. package/dist/scheduler-cutover.d.ts +0 -25
  360. package/dist/security-review-environment.d.ts +0 -27
  361. package/dist/server/adapter-contract.d.ts +0 -1
  362. package/dist/server/cleanup.d.ts +0 -3
  363. package/dist/server/context-budget-receipt.d.ts +0 -2
  364. package/dist/server/db-credentials.d.ts +0 -1
  365. package/dist/server/default-repo.d.ts +0 -1
  366. package/dist/server/harness-notice.d.ts +0 -2
  367. package/dist/server/heavy-verification.d.ts +0 -3
  368. package/dist/server/landing.d.ts +0 -1
  369. package/dist/server/memory-cost-enforce.d.ts +0 -1
  370. package/dist/server/memory-cost.d.ts +0 -1
  371. package/dist/server/model-routing.d.ts +0 -3
  372. package/dist/server/monitor.d.ts +0 -3
  373. package/dist/server/node-runtime-policy.d.ts +0 -1
  374. package/dist/server/orchestration.d.ts +0 -10
  375. package/dist/server/pr-evidence.d.ts +0 -2
  376. package/dist/server/prompt.d.ts +0 -1
  377. package/dist/server/repo-search.d.ts +0 -1
  378. package/dist/server/worker-policy.d.ts +0 -6
  379. package/dist/server/wsl-crash-dumps.d.ts +0 -2
  380. package/dist/shell-command-outcome.d.ts +0 -32
  381. package/dist/sidecar-cli.d.ts +0 -16
  382. package/dist/stale-reconcile.d.ts +0 -31
  383. package/dist/start-box-identity.d.ts +0 -12
  384. package/dist/start.d.ts +0 -13
  385. package/dist/status.d.ts +0 -262
  386. package/dist/stream.d.ts +0 -33
  387. package/dist/supervisor.d.ts +0 -40
  388. package/dist/sweep.d.ts +0 -1
  389. package/dist/util.d.ts +0 -35
  390. package/dist/validate.d.ts +0 -15
  391. package/dist/vercel/index.d.ts +0 -4
  392. package/dist/vercel/vercel-api.d.ts +0 -17
  393. package/dist/vercel/vercel-evidence.d.ts +0 -48
  394. package/dist/vercel/vercel-github-status.d.ts +0 -19
  395. package/dist/vercel/vercel-url.d.ts +0 -18
  396. package/dist/verify-live/verify-live-prompt.d.ts +0 -2
  397. package/dist/worker-cap-source.d.ts +0 -29
  398. package/dist/worker-env.d.ts +0 -52
  399. package/dist/worker-execution-mode.d.ts +0 -5
  400. package/dist/worker-final-result-embed.d.ts +0 -1
  401. package/dist/worker-lease-sync.d.ts +0 -15
  402. package/dist/worker-lifecycle.d.ts +0 -28
  403. package/dist/worker-metadata-paths.d.ts +0 -26
  404. package/dist/worker-metadata-reconcile.d.ts +0 -21
  405. package/dist/worker-ops.d.ts +0 -45
  406. package/dist/worker-persona-catalog.d.ts +0 -29
  407. package/dist/worker-provider-policy.d.ts +0 -43
  408. package/dist/worker-usage.d.ts +0 -20
  409. package/dist/workspace-runtime-config.d.ts +0 -10
  410. package/dist/worktree-base-ref.d.ts +0 -34
  411. package/dist/worktree-completion-handoff.d.ts +0 -17
  412. package/dist/worktree.d.ts +0 -44
  413. package/dist/wsl-crash-dumps-cleanup.d.ts +0 -31
  414. package/dist/wsl-crash-dumps-cli.d.ts +0 -1
  415. package/dist/wsl-crash-dumps.d.ts +0 -90
  416. package/dist/wsl-host.d.ts +0 -71
@@ -1,24 +0,0 @@
1
- import type { OrchestrationProviderInventory } from "./inventory.js";
2
- import type { OrchestrationProviderBindingStatus, OrchestrationProviderId, OrchestrationRiskClass } from "./types.js";
3
- export declare function providerCapableForRisk(providerId: OrchestrationProviderId, riskClass: OrchestrationRiskClass): boolean;
4
- export declare function compareProviderCandidates(a: {
5
- providerId: OrchestrationProviderId;
6
- binding: OrchestrationProviderBindingStatus;
7
- }, b: {
8
- providerId: OrchestrationProviderId;
9
- binding: OrchestrationProviderBindingStatus;
10
- }): number;
11
- export interface CheapestCapableSelection {
12
- providerId: OrchestrationProviderId;
13
- binding: OrchestrationProviderBindingStatus;
14
- escalatedFrom?: OrchestrationProviderId;
15
- escalatedReason?: string;
16
- }
17
- /**
18
- * Pick the lowest-cost ready provider that can run the given risk class.
19
- * Sorts by cost tier, then prefers local OAuth CLI over metered API-key paths.
20
- */
21
- export declare function selectCheapestCapableProvider(input: {
22
- inventory: OrchestrationProviderInventory;
23
- riskClass: OrchestrationRiskClass;
24
- }): CheapestCapableSelection | null;
@@ -1,5 +0,0 @@
1
- import type { OrchestrationProviderBindingStatus } from "./types.js";
2
- /**
3
- * Probe Cursor/Composer OAuth on the local runner. Never reads or returns raw OAuth tokens.
4
- */
5
- export declare function probeCursorOAuthBinding(nowIso?: string): OrchestrationProviderBindingStatus;
@@ -1,15 +0,0 @@
1
- import type { OrchestrationAuthSource } from "./types.js";
2
- export interface HermesCliAdapterStatus {
3
- adapterId: "hermes";
4
- cliAvailable: boolean;
5
- profileBound: boolean;
6
- authSource: OrchestrationAuthSource;
7
- sessionFingerprint?: string;
8
- checkedAt: string;
9
- note?: string;
10
- }
11
- /**
12
- * Best-effort Hermes Forge CLI adapter probe. Cloud/API keys in ~/.hermes/.env are
13
- * reported as api_key_env — distinct from harness worker BYO OAuth inventory.
14
- */
15
- export declare function probeHermesCliAdapter(nowIso?: string): HermesCliAdapterStatus;
@@ -1,15 +0,0 @@
1
- import type { OrchestrationAuthSource } from "./types.js";
2
- export type HermesOpenAiCodexPath = "hermes_openai_codex";
3
- export interface HermesOpenAiCodexBindingStatus {
4
- path: HermesOpenAiCodexPath;
5
- ready: boolean;
6
- authSource: OrchestrationAuthSource;
7
- sessionFingerprint?: string;
8
- checkedAt: string;
9
- note?: string;
10
- }
11
- /**
12
- * Probe Hermes-managed OpenAI Codex subscription (ChatGPT backend-api/codex).
13
- * Uses exit-code-only `hermes auth status` — never reads auth.json token payloads.
14
- */
15
- export declare function probeHermesOpenAiCodexBinding(nowIso?: string): HermesOpenAiCodexBindingStatus;
@@ -1,14 +0,0 @@
1
- export * from "./types.js";
2
- export * from "./capabilities.js";
3
- export * from "./adapter-contract.js";
4
- export * from "./oauth-binding-utils.js";
5
- export * from "./codex-oauth-binding.js";
6
- export * from "./cursor-oauth-binding.js";
7
- export * from "./claude-oauth-binding.js";
8
- export * from "./hermes-cli-adapter.js";
9
- export * from "./hermes-openai-codex-binding.js";
10
- export * from "./codex-orchestration-adapter.js";
11
- export * from "./inventory.js";
12
- export * from "./cost-router.js";
13
- export * from "./routing.js";
14
- export * from "./audit.js";
@@ -1,54 +0,0 @@
1
- import { type CodexOrchestrationPath } from "./codex-orchestration-adapter.js";
2
- import { type HermesCliAdapterStatus } from "./hermes-cli-adapter.js";
3
- import { type HermesOpenAiCodexBindingStatus } from "./hermes-openai-codex-binding.js";
4
- import type { OrchestrationProviderBindingStatus, OrchestrationProviderId } from "./types.js";
5
- /**
6
- * PRESENCE-ONLY report of cloud API keys on the daemon host env.
7
- *
8
- * Honesty note (model-freedom audit gap 8): these keys are NOT usable by
9
- * harness CLI workers — the worker-env scrub (`worker-env.ts`) strips every
10
- * `*_API_KEY` from worker child environments by design. Presence here means
11
- * only "the key exists on the daemon host" (e.g. for daemon-side HTTP paths);
12
- * it must never be advertised as spendable worker credit.
13
- */
14
- export interface OrchestrationCloudApiCredits {
15
- /** ANTHROPIC_API_KEY present on the daemon host env (scrubbed from worker children). */
16
- anthropicApiKey: boolean;
17
- /** OPENAI_API_KEY present on the daemon host env (scrubbed from worker children). */
18
- openaiApiKey: boolean;
19
- /** CODEX_API_KEY present on the daemon host env (scrubbed from worker children). */
20
- codexApiKey: boolean;
21
- }
22
- /**
23
- * W2a — generic `openai-compatible` worker provider endpoint presence.
24
- * Unlike the cloud API keys above, this path IS worker-usable: the daemon
25
- * builds the request (headers include the key) and hands it to its own runner
26
- * child over stdin, so the scrub never blocks it.
27
- */
28
- export interface OrchestrationWorkerEndpoint {
29
- /** KYNVER_WORKER_BASE_URL present — the generic provider is endpoint-configured. */
30
- baseUrlConfigured: boolean;
31
- /** KYNVER_WORKER_API_KEY present (optional — many local servers need none). */
32
- apiKeyConfigured: boolean;
33
- }
34
- export interface OrchestrationProviderInventory {
35
- generatedAt: string;
36
- bindings: Record<OrchestrationProviderId, OrchestrationProviderBindingStatus>;
37
- /** API-key PRESENCE on the daemon host — not worker-usable credit (see type doc). */
38
- cloudApiCredits: OrchestrationCloudApiCredits;
39
- /** Generic openai-compatible worker endpoint presence (optional for snapshots from older runtimes). */
40
- workerEndpoint?: OrchestrationWorkerEndpoint;
41
- hermes: HermesCliAdapterStatus;
42
- hermesOpenAiCodex: HermesOpenAiCodexBindingStatus;
43
- codexAdapterPath: CodexOrchestrationPath;
44
- readyCount: number;
45
- }
46
- export interface BuildOrchestrationProviderInventoryOptions {
47
- nowIso?: () => string;
48
- }
49
- /**
50
- * Probe all harness orchestration CLI providers on this host.
51
- * Never reads or returns raw OAuth tokens or API key values.
52
- */
53
- export declare function buildOrchestrationProviderInventory(options?: BuildOrchestrationProviderInventoryOptions): OrchestrationProviderInventory;
54
- export declare function probeOrchestrationProviderBinding(providerId: OrchestrationProviderId, nowIso?: string): OrchestrationProviderBindingStatus;
@@ -1,22 +0,0 @@
1
- /** Fingerprint from file metadata only — never reads token payload. */
2
- export declare function fingerprintAuthStore(filePath: string): string | undefined;
3
- export declare function envKeyFingerprint(envKey: string): string;
4
- export declare function resolveCliBin(defaultBin: string, envKeys: string[]): string;
5
- export declare function probeCliCommand(bin: string, args: string[], options?: {
6
- timeoutMs?: number;
7
- okNote?: string;
8
- failPrefix?: string;
9
- env?: NodeJS.ProcessEnv;
10
- }): {
11
- ok: boolean;
12
- note?: string;
13
- };
14
- /** Exit-code-only probe — stdout/stderr are discarded to avoid leaking auth payloads. */
15
- export declare function probeCliExitCodeOnly(bin: string, args: string[], options?: {
16
- timeoutMs?: number;
17
- okNote?: string;
18
- failNote?: string;
19
- }): {
20
- ok: boolean;
21
- note?: string;
22
- };
@@ -1,16 +0,0 @@
1
- import type { OrchestrationProviderInventory } from "./inventory.js";
2
- import type { OrchestrationProviderBindingStatus, OrchestrationRiskClass, OrchestrationRoutingDecision } from "./types.js";
3
- export declare function classifyOrchestrationRisk(task: Record<string, unknown>): OrchestrationRiskClass;
4
- export interface ResolveOrchestrationRoutingInput {
5
- task?: Record<string, unknown> | null;
6
- explicitProvider?: string | null;
7
- explicitModel?: string | null;
8
- codexBinding?: OrchestrationProviderBindingStatus | null;
9
- inventory?: OrchestrationProviderInventory | null;
10
- preferLowCost?: boolean;
11
- }
12
- /**
13
- * Cost-aware harness orchestration routing: cheapest capable provider first,
14
- * preferring local OAuth CLI sessions over metered API-key paths; escalate when needed.
15
- */
16
- export declare function resolveOrchestrationRouting(input: ResolveOrchestrationRoutingInput): OrchestrationRoutingDecision;
@@ -1,45 +0,0 @@
1
- /** Harness / orchestration executor identity (distinct from LLM vendor strings). */
2
- export type OrchestrationProviderId = "cursor" | "codex" | "claude";
3
- /** How the worker authenticates — never includes secret material. */
4
- export type OrchestrationAuthSource = "oauth_local" | "api_key_env" | "subscription_hermes" | "runner_token" | "none";
5
- export type OrchestrationCostTier = "low" | "medium" | "high";
6
- export type OrchestrationRiskClass = "low" | "elevated" | "privileged";
7
- export interface OrchestrationProviderCapability {
8
- id: OrchestrationProviderId;
9
- displayName: string;
10
- costTier: OrchestrationCostTier;
11
- /** Supported auth modes for this provider on a user runner. */
12
- authSources: OrchestrationAuthSource[];
13
- /** May run routine orchestration (progress sync, status, low-risk board ops). */
14
- supportsLowRiskOrchestration: boolean;
15
- /** May run privileged platform actions (DB, deploy, secrets) — always false for BYO Codex. */
16
- supportsPrivilegedPlatformActions: boolean;
17
- }
18
- /** Non-secret local session marker for audit (fingerprint only). */
19
- export interface OrchestrationProviderBindingStatus {
20
- providerId: OrchestrationProviderId;
21
- ready: boolean;
22
- authSource: OrchestrationAuthSource;
23
- /** sha256 prefix of non-secret binding metadata — never a raw OAuth token. */
24
- sessionFingerprint?: string;
25
- checkedAt: string;
26
- note?: string;
27
- }
28
- export interface OrchestrationRoutingAudit {
29
- provider: OrchestrationProviderId;
30
- model?: string;
31
- authSource: OrchestrationAuthSource;
32
- costTier: OrchestrationCostTier;
33
- riskClass: OrchestrationRiskClass;
34
- costRationale: string;
35
- routingRule: string;
36
- /** When routing escalated away from the preferred low-cost provider. */
37
- escalatedFrom?: OrchestrationProviderId;
38
- escalatedReason?: string;
39
- }
40
- export interface OrchestrationRoutingDecision {
41
- provider: OrchestrationProviderId;
42
- model?: string;
43
- rule: string;
44
- audit: OrchestrationRoutingAudit;
45
- }
@@ -1,5 +0,0 @@
1
- export declare function readOwnPackageVersion(moduleUrl?: string): string;
2
- export declare const PACKAGE_VERSION: string;
3
- export declare function wantsCliVersion(argv: string[]): boolean;
4
- export declare function printCliVersionAndExit(version: string, binName?: string): never;
5
- export declare function handleCliVersionFlag(argv: string[], moduleUrl?: string, binName?: string): boolean;
@@ -1,5 +0,0 @@
1
- export declare function expandHomePath(value: string): string;
2
- export declare function resolveUserPath(value: string): string;
3
- export declare function redactHomePath(value: string): string;
4
- /** User-facing path strings (doctor JSON, setup output). */
5
- export declare function displayUserPath(value: string): string;
package/dist/paths.d.ts DELETED
@@ -1,16 +0,0 @@
1
- /**
2
- * Canonical harness root: the directory that contains `runs/` and `worktrees/`.
3
- * Strips mistaken trailing layout segments (e.g. env set to `.../harness/runs`).
4
- * Server mirror: agent-os.harness-root.ts
5
- */
6
- export declare function normalizeHarnessRoot(root: string): string;
7
- /** Canonical harness root for CLI/workers (box-scoped when identity is known). */
8
- export declare function resolveHarnessRoot(): string;
9
- export declare function harnessRunsDir(harnessRoot: string): string;
10
- export declare function harnessWorktreesDir(harnessRoot: string): string;
11
- export declare function getHarnessPaths(): {
12
- harnessRoot: string;
13
- runsDir: string;
14
- worktreesDir: string;
15
- };
16
- export declare function runDir(runsDir: string, id: string): string;
@@ -1,8 +0,0 @@
1
- export declare function countDispatchStarts(result: unknown): number;
2
- /** Drop CLI max-starts so pipeline ticks always use the resource-gate slot budget. */
3
- export declare function stripCliMaxStarts(args: Record<string, string | boolean>): Record<string, string | boolean>;
4
- /**
5
- * Two-pass daemon dispatch: reserve one start for the review lane, then fill
6
- * remaining slots from the mixed queue (review-first ordering on the server).
7
- */
8
- export declare function runPipelineDispatch(args: Record<string, string | boolean>, slots: number): Promise<Record<string, unknown>>;
@@ -1,2 +0,0 @@
1
- /** Operator tick `dispatch.exactTargetTaskIds` — start these before any broad sweep. */
2
- export declare function operatorExactTargetTaskIds(operatorTick: unknown): string[];
@@ -1,26 +0,0 @@
1
- import type { RunnerResourceGateShape } from "./resource-gate.js";
2
- export interface OperatorDispatchShape {
3
- recommendedMaxStarts?: number;
4
- underutilized?: boolean;
5
- actionableReady?: number;
6
- queuedTasks?: number;
7
- boardAdvancedThisTick?: number;
8
- leaseReapedThisTick?: number;
9
- }
10
- export interface ResolvePipelineMaxStartsResult {
11
- maxStarts: number;
12
- underutilized: boolean;
13
- advisedStarts: number | null;
14
- actionableReady: number | null;
15
- queuedTasks: number | null;
16
- nonDispatchableReady: number | null;
17
- boardAdvancedThisTick: number;
18
- leaseReapedThisTick: number;
19
- }
20
- /**
21
- * Merge runner slot budget with server dispatch-floor advice from the operator tick.
22
- * Actionable backlog is authoritative: stale or conservative server advice may
23
- * reduce noise, but it must not underfill open worker slots when ready work is
24
- * startable.
25
- */
26
- export declare function resolvePipelineMaxStarts(resourceGate: RunnerResourceGateShape, operatorTick: unknown): ResolvePipelineMaxStartsResult;
@@ -1,50 +0,0 @@
1
- import { type ResolvePipelineMaxStartsResult } from "./pipeline-max-starts.js";
2
- import type { ReconcileStaleWorkersResult } from "./stale-reconcile.js";
3
- import { type RunnerResourceGateShape } from "./resource-gate.js";
4
- import { renewActiveTaskLeases } from "./lease-renewal.js";
5
- import type { HarnessCleanupSummary } from "./cleanup-types.js";
6
- export interface PipelineTickResult {
7
- runId: string;
8
- agentOsId: string;
9
- execute: boolean;
10
- /** Gate sampled before operator tick (Command Center heartbeat). */
11
- resourceGate: RunnerResourceGateShape;
12
- /** Gate re-sampled after completion replay + board lifecycle sync — used for dispatch. */
13
- dispatchResourceGate: RunnerResourceGateShape;
14
- leaseRenewal?: Awaited<ReturnType<typeof renewActiveTaskLeases>>;
15
- completedWorkers: Array<{
16
- worker: string;
17
- ok: boolean;
18
- taskId?: string | null;
19
- skipped?: boolean;
20
- }>;
21
- staleReconcile: ReconcileStaleWorkersResult;
22
- planProgressSync: Array<{
23
- worker: string;
24
- phase: string;
25
- ok: boolean;
26
- skipped?: boolean;
27
- }>;
28
- completionAckSync: Array<{
29
- worker: string;
30
- taskId: string;
31
- taskStatus: string;
32
- }>;
33
- harnessCleanup?: HarnessCleanupSummary;
34
- operatorTick: unknown;
35
- sweep: unknown;
36
- dispatchAdvice: ResolvePipelineMaxStartsResult;
37
- dispatch: unknown;
38
- idle: boolean;
39
- }
40
- export declare function completeFinishedWorkers(runId: string, args: Record<string, string | boolean>): Promise<Array<{
41
- worker: string;
42
- ok: boolean;
43
- taskId?: string | null;
44
- skipped?: boolean;
45
- }>>;
46
- /**
47
- * One operator/dispatcher cycle (M10 / D7 pull-first):
48
- * refresh status → complete finished workers → ingest operator tick → sweep leases → dispatch up to slot cap.
49
- */
50
- export declare function runPipelineTick(args: Record<string, string | boolean>): Promise<PipelineTickResult>;
@@ -1,28 +0,0 @@
1
- import type { PersistPlanInput } from "./types.js";
2
- export interface AgentOsPlanGetPayload {
3
- plan: {
4
- id: string;
5
- title: string;
6
- summary: string | null;
7
- currentVersionId: string | null;
8
- };
9
- currentVersion: {
10
- id: string;
11
- versionNumber: number;
12
- title: string;
13
- body: string;
14
- summary: string | null;
15
- } | null;
16
- }
17
- export interface AgentOsWriteResult {
18
- planId: string;
19
- versionId: string | null;
20
- versionNumber: number | null;
21
- }
22
- export interface AgentOsApiDeps {
23
- baseUrl?: string;
24
- apiKey?: string;
25
- fetchFn?: typeof fetch;
26
- }
27
- export declare function agentOsGetPlan(slug: string, planId: string, deps?: AgentOsApiDeps): Promise<AgentOsPlanGetPayload>;
28
- export declare function agentOsWritePlan(input: PersistPlanInput, deps?: AgentOsApiDeps): Promise<AgentOsWriteResult>;
@@ -1,3 +0,0 @@
1
- /** Stable hash for readback verification (normalized trailing whitespace). */
2
- export declare function hashPlanBody(body: string): string;
3
- export declare function hashSummary(summary: string | null | undefined): string | null;
@@ -1,7 +0,0 @@
1
- import { type PersistPlanDeps } from "./persist.js";
2
- import type { DrainOutboxResult, PlanOutboxItem } from "./types.js";
3
- export declare function drainPlanOutbox(opts?: {
4
- max?: number;
5
- outboxId?: string;
6
- }, deps?: PersistPlanDeps): Promise<DrainOutboxResult>;
7
- export declare function loadOutboxById(outboxId: string): PlanOutboxItem | null;
@@ -1,9 +0,0 @@
1
- import type { PlanPersistFailureKind } from "./types.js";
2
- export declare class PlanPersistError extends Error {
3
- readonly kind: PlanPersistFailureKind;
4
- readonly httpStatus?: number;
5
- constructor(kind: PlanPersistFailureKind, message: string, httpStatus?: number);
6
- }
7
- export declare function classifyHttpFailure(status: number, message: string): PlanPersistError;
8
- export declare function classifyFetchFailure(err: unknown): PlanPersistError;
9
- export declare function isRetryableFailure(kind: PlanPersistFailureKind): boolean;
@@ -1,7 +0,0 @@
1
- import type { PlanOutboxItem } from "./types.js";
2
- export declare function formatPlanOutboxHandoffBlock(item: PlanOutboxItem): string;
3
- export declare function extractPlanOutboxFromTask(task: Record<string, unknown>): {
4
- outboxId?: string;
5
- jsonPath?: string;
6
- bodyPath?: string;
7
- } | null;
@@ -1,2 +0,0 @@
1
- import type { PersistPlanInput } from "./types.js";
2
- export declare function buildPlanPersistIdempotencyKey(input: PersistPlanInput): string;
@@ -1,8 +0,0 @@
1
- export type { PlanPersistUserStatus, PlanPersistOperation, PlanOutboxItem, PersistPlanInput, PersistPlanResult, DrainOutboxResult, } from "./types.js";
2
- export { hashPlanBody, hashSummary } from "./body-hash.js";
3
- export { persistPlan } from "./persist.js";
4
- export { drainPlanOutbox, loadOutboxById } from "./drain.js";
5
- export { listOutboxItems, findOutboxByIdempotencyKey, writeOutboxItem } from "./outbox-store.js";
6
- export { formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, } from "./handoff.js";
7
- export { isTmpOnlyPath, planOutboxDir } from "./paths.js";
8
- export { PlanPersistError } from "./errors.js";
@@ -1,31 +0,0 @@
1
- import type { LocalRunStoreSurfaceMode } from "../local-run-store/surface-flags.js";
2
- export declare function planOutboxMode(env?: NodeJS.ProcessEnv): LocalRunStoreSurfaceMode;
3
- /**
4
- * A corrupt spool file was sighted. `shadow`: count only (caller keeps
5
- * today's behavior). `enforce`: quarantine by rename (never delete) and tell
6
- * the caller to continue. Returns true when the file was quarantined.
7
- */
8
- export declare function handleCorruptOutboxFile(paths: string[], now?: () => Date): boolean;
9
- /**
10
- * Per-item drain serialization. `enforce`: only the reservation winner may
11
- * drain the item (crash backstop = TTL). `shadow`: a lost race is counted,
12
- * the caller proceeds as today. Never throws.
13
- */
14
- export declare function tryAcquireDrainSlot(itemId: string, owner: string): {
15
- proceed: boolean;
16
- deduplicated: boolean;
17
- };
18
- export declare function releaseDrainSlot(itemId: string, owner: string): void;
19
- /** Record the verified persist on the item's existing idempotency key. */
20
- export declare function recordPlanPersistedReceipt(idempotencyKey: string, planId: string | null): void;
21
- /** Archive intent receipt — recorded BEFORE the two renames (enforce). */
22
- export declare function recordArchiveIntentReceipt(itemId: string): void;
23
- /**
24
- * ENFORCE-mode drain preamble: an item whose archive-intent receipt exists is
25
- * a crash between the archive renames — complete the renames instead of
26
- * re-persisting. Returns true when the item was (re)archived away.
27
- */
28
- export declare function completeHalfArchiveIfIntended(itemId: string, renameRemaining: () => void): boolean;
29
- /** Counters snapshot for the operator-tick posture (surface active only). */
30
- export declare function planOutboxCounters(): Record<string, number>;
31
- export declare function __resetPlanOutboxCountersForTests(): void;
@@ -1,36 +0,0 @@
1
- import type { PlanOutboxItem, PersistPlanInput } from "./types.js";
2
- export declare function listOutboxItems(): PlanOutboxItem[];
3
- export declare function findOutboxByIdempotencyKey(key: string): PlanOutboxItem | null;
4
- export declare function readOutboxItem(jsonPath: string): PlanOutboxItem | null;
5
- export declare function readOutboxBody(item: PlanOutboxItem): string;
6
- export declare function writeOutboxItem(input: PersistPlanInput, opts: {
7
- lastError: string;
8
- lastFailureKind: PlanOutboxItem["lastFailureKind"];
9
- existing?: PlanOutboxItem;
10
- }): PlanOutboxItem;
11
- export declare function saveOutboxItem(item: PlanOutboxItem): void;
12
- export declare function archiveOutboxItem(item: PlanOutboxItem): void;
13
- /**
14
- * The bare renames (idempotent — each guarded by existsSync). ORDER MATTERS
15
- * (D3 review N-1): the BODY moves first, the `.json` last, so the state a
16
- * crash between the renames leaves behind is a LISTED item (json still in
17
- * the outbox) with an archived body — which the next drain detects via the
18
- * archive-intent receipt and completes. The reverse order left an invisible
19
- * json-less orphan body no drain could ever see.
20
- */
21
- export declare function archiveOutboxItemFiles(item: PlanOutboxItem): void;
22
- /**
23
- * Filesystem-evidence archive completion (re-review N-7, ALL modes): the
24
- * body sitting at its id-derived ARCHIVE destination can only mean a
25
- * post-verified-persist archive began and crashed (or hit a transient json
26
- * rename error) between the renames — the plan is already persisted. Finish
27
- * the json rename so the item cannot wedge the drain (off/shadow have no
28
- * receipt to consult; the fs state alone is proof). Store-free by design.
29
- */
30
- export declare function completeArchiveFromFilesystemEvidence(item: PlanOutboxItem): boolean;
31
- export declare function outboxItemPaths(item: PlanOutboxItem): {
32
- jsonPath: string;
33
- bodyPath: string;
34
- };
35
- export declare function removeOutboxItem(item: PlanOutboxItem): void;
36
- export declare function outboxInputFromItem(item: PlanOutboxItem, body: string): PersistPlanInput;
@@ -1,8 +0,0 @@
1
- export declare function resolveKynverStateRoot(): string;
2
- export declare function planOutboxDir(): string;
3
- export declare function planOutboxArchiveDir(): string;
4
- export declare function ensurePlanOutboxDirs(): {
5
- outboxDir: string;
6
- archiveDir: string;
7
- };
8
- export declare function isTmpOnlyPath(filePath: string): boolean;
@@ -1,10 +0,0 @@
1
- import type { AgentOsApiDeps } from "./agentos-api.js";
2
- import { agentOsWritePlan } from "./agentos-api.js";
3
- import { verifyPlanReadback } from "./readback.js";
4
- import type { PersistPlanInput, PersistPlanResult } from "./types.js";
5
- export interface PersistPlanDeps extends AgentOsApiDeps {
6
- /** When set, skip live HTTP (tests). */
7
- writePlan?: typeof agentOsWritePlan;
8
- verifyReadback?: typeof verifyPlanReadback;
9
- }
10
- export declare function persistPlan(input: PersistPlanInput, deps?: PersistPlanDeps): Promise<PersistPlanResult>;
@@ -1,17 +0,0 @@
1
- import { type AgentOsApiDeps } from "./agentos-api.js";
2
- import type { PlanPersistReadbackEvidence, PersistPlanInput } from "./types.js";
3
- export interface ReadbackExpectation {
4
- planId: string;
5
- title: string;
6
- summary: string | null;
7
- body: string;
8
- bodyHash: string;
9
- versionId?: string | null;
10
- versionNumber?: number | null;
11
- }
12
- export declare function verifyPlanReadback(slug: string, expectation: ReadbackExpectation, deps?: AgentOsApiDeps): Promise<PlanPersistReadbackEvidence>;
13
- export declare function buildReadbackExpectation(input: PersistPlanInput, write: {
14
- planId: string;
15
- versionId: string | null;
16
- versionNumber: number | null;
17
- }): ReadbackExpectation;
@@ -1,95 +0,0 @@
1
- /** User-facing persistence outcome — never imply AgentOS success from local files alone. */
2
- export type PlanPersistUserStatus = "persisted and read back" | "queued for retry" | "failed and needs action";
3
- export type PlanPersistOperation = "create" | "add_version" | "update_metadata";
4
- export type PlanOutboxQueueStatus = "queued" | "draining" | "archived" | "failed";
5
- export type PlanPersistFailureKind = "approval_guard" | "auth" | "network" | "server" | "tool_interruption" | "verification_failed" | "permanent";
6
- export interface PlanPersistSourceRefs {
7
- model?: string;
8
- source?: string;
9
- [key: string]: unknown;
10
- }
11
- export interface PlanPersistReadbackEvidence {
12
- planId: string;
13
- currentVersionId: string | null;
14
- versionNumber: number | null;
15
- title: string;
16
- summary: string | null;
17
- bodyHash: string;
18
- readAt: string;
19
- }
20
- export interface PlanOutboxItem {
21
- id: string;
22
- idempotencyKey: string;
23
- operation: PlanPersistOperation;
24
- agentOsSlug: string;
25
- planId: string | null;
26
- planSlug: string | null;
27
- title: string;
28
- summary: string | null;
29
- /** Relative to outbox dir when body is large; inline when small. */
30
- bodyPath: string;
31
- bodyHash: string;
32
- author: string | null;
33
- model: string | null;
34
- sourceRefs: PlanPersistSourceRefs | null;
35
- changeSummary: string | null;
36
- markCurrent: boolean | null;
37
- createdAt: string;
38
- updatedAt: string;
39
- retryCount: number;
40
- maxRetries: number;
41
- lastError: string | null;
42
- lastFailureKind: PlanPersistFailureKind | null;
43
- queueStatus: PlanOutboxQueueStatus;
44
- userStatus: PlanPersistUserStatus;
45
- /** Set after a successful drain for audit. */
46
- readbackEvidence: PlanPersistReadbackEvidence | null;
47
- }
48
- export interface PersistPlanInput {
49
- operation: PlanPersistOperation;
50
- agentOsSlug: string;
51
- title: string;
52
- body: string;
53
- summary?: string | null;
54
- planId?: string | null;
55
- planSlug?: string | null;
56
- changeSummary?: string | null;
57
- author?: string | null;
58
- model?: string | null;
59
- sourceRefs?: PlanPersistSourceRefs | null;
60
- markCurrent?: boolean;
61
- maxRetries?: number;
62
- /** When the immediate AgentOS/MCP write failed before reaching the server. */
63
- immediateFailure?: {
64
- kind: PlanPersistFailureKind;
65
- message: string;
66
- };
67
- /** Optional path hint — `/tmp`-only paths must not count as durable persistence. */
68
- bodyPathHint?: string;
69
- }
70
- export interface PersistPlanResult {
71
- userStatus: PlanPersistUserStatus;
72
- outboxId?: string;
73
- outboxPath?: string;
74
- bodyPath?: string;
75
- planId?: string;
76
- versionId?: string;
77
- readbackEvidence?: PlanPersistReadbackEvidence;
78
- lastError?: string;
79
- idempotencyKey?: string;
80
- }
81
- export interface DrainOutboxResult {
82
- processed: number;
83
- succeeded: number;
84
- stillQueued: number;
85
- failed: number;
86
- /** D3 enforce: items skipped because another drainer holds the lease. */
87
- deduplicated?: number;
88
- results: Array<{
89
- outboxId: string;
90
- userStatus: PlanPersistUserStatus;
91
- lastError?: string;
92
- /** True when this row reports a skip, not a persist attempt. */
93
- skipped?: boolean;
94
- }>;
95
- }
@@ -1,3 +0,0 @@
1
- export declare function runPlanPersist(args: Record<string, string | boolean>): Promise<void>;
2
- export declare function runPlanOutboxList(): Promise<void>;
3
- export declare function runPlanOutboxDrain(args: Record<string, string | boolean>): Promise<void>;
@@ -1,7 +0,0 @@
1
- /** Push heartbeat blockers to the server orchestrator (deduped per worker). */
2
- export declare function syncActiveWorkerPlanProgress(runId: string, args: Record<string, string | boolean>): Promise<Array<{
3
- worker: string;
4
- phase: string;
5
- ok: boolean;
6
- skipped?: boolean;
7
- }>>;