@kynver-app/runtime 0.2.23 → 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 (413) hide show
  1. package/README.md +52 -18
  2. package/dist/chat/command-auth-proof.js +1 -1
  3. package/dist/cli.js +74 -65
  4. package/dist/index.js +96 -87
  5. package/dist/instruction-bundle/contract.js +2 -2
  6. package/dist/local-run-store/index.js +6 -6
  7. package/dist/server/adapter-contract.js +1 -1
  8. package/dist/server/cleanup.js +14 -14
  9. package/dist/server/db-credentials.js +2 -2
  10. package/dist/server/default-repo.js +1 -1
  11. package/dist/server/heavy-verification.js +1 -1
  12. package/dist/server/memory-cost-enforce.js +2 -2
  13. package/dist/server/memory-cost.js +2 -2
  14. package/dist/server/model-routing.js +4 -4
  15. package/dist/server/monitor.js +7 -7
  16. package/dist/server/orchestration.js +1 -1
  17. package/dist/server/worker-policy.js +2 -2
  18. package/package.json +6 -3
  19. package/dist/active-harness-workers.d.ts +0 -11
  20. package/dist/auto-complete.d.ts +0 -60
  21. package/dist/bootstrap.d.ts +0 -1
  22. package/dist/bounded-build/admission.d.ts +0 -30
  23. package/dist/bounded-build/constants.d.ts +0 -10
  24. package/dist/bounded-build/exec.d.ts +0 -35
  25. package/dist/bounded-build/index.d.ts +0 -6
  26. package/dist/bounded-build/meminfo.d.ts +0 -5
  27. package/dist/bounded-build/node-options.d.ts +0 -9
  28. package/dist/bounded-build/systemd-wrap.d.ts +0 -17
  29. package/dist/box-identity.d.ts +0 -19
  30. package/dist/box-resource-snapshot-shared.d.ts +0 -13
  31. package/dist/box-resource-snapshot.d.ts +0 -45
  32. package/dist/box-worker-cap.d.ts +0 -9
  33. package/dist/byoc/context-hydration.d.ts +0 -54
  34. package/dist/byoc/execution-proof.d.ts +0 -46
  35. package/dist/byoc/index.d.ts +0 -5
  36. package/dist/byoc/job-envelope.d.ts +0 -39
  37. package/dist/byoc/m6-golden-path.d.ts +0 -86
  38. package/dist/byoc/mcp-tool-proof.d.ts +0 -42
  39. package/dist/callback-headers.d.ts +0 -2
  40. package/dist/callbacks.d.ts +0 -74
  41. package/dist/chat/anthropic-credentials.d.ts +0 -11
  42. package/dist/chat/anthropic-stream.d.ts +0 -43
  43. package/dist/chat/chat-claim-loop.d.ts +0 -41
  44. package/dist/chat/chat-primary-cli.d.ts +0 -2
  45. package/dist/chat/command-allowlist.d.ts +0 -8
  46. package/dist/chat/command-auth-proof.d.ts +0 -67
  47. package/dist/chat/command-executor.d.ts +0 -18
  48. package/dist/chat/delta-batcher.d.ts +0 -13
  49. package/dist/cleanup-active-worktrees.d.ts +0 -14
  50. package/dist/cleanup-build-cache-paths.d.ts +0 -5
  51. package/dist/cleanup-cli.d.ts +0 -1
  52. package/dist/cleanup-completion-blocker.d.ts +0 -10
  53. package/dist/cleanup-dependency-scan.d.ts +0 -13
  54. package/dist/cleanup-dir-size.d.ts +0 -5
  55. package/dist/cleanup-disk-pressure.d.ts +0 -15
  56. package/dist/cleanup-duplicate-worktrees.d.ts +0 -8
  57. package/dist/cleanup-evidence.d.ts +0 -10
  58. package/dist/cleanup-execute.d.ts +0 -7
  59. package/dist/cleanup-git-probe.d.ts +0 -5
  60. package/dist/cleanup-git-rev-cache.d.ts +0 -5
  61. package/dist/cleanup-git-status-cache.d.ts +0 -5
  62. package/dist/cleanup-guards-helpers.d.ts +0 -2
  63. package/dist/cleanup-guards.d.ts +0 -53
  64. package/dist/cleanup-harness-path-validate.d.ts +0 -5
  65. package/dist/cleanup-harness-roots.d.ts +0 -6
  66. package/dist/cleanup-index-status.d.ts +0 -16
  67. package/dist/cleanup-orphan-safety.d.ts +0 -17
  68. package/dist/cleanup-path-ownership.d.ts +0 -9
  69. package/dist/cleanup-privileged-remove.d.ts +0 -13
  70. package/dist/cleanup-progress.d.ts +0 -2
  71. package/dist/cleanup-remove-path.d.ts +0 -17
  72. package/dist/cleanup-retention-config.d.ts +0 -26
  73. package/dist/cleanup-run-directory.d.ts +0 -20
  74. package/dist/cleanup-run-liveness.d.ts +0 -21
  75. package/dist/cleanup-run-terminal-cache.d.ts +0 -6
  76. package/dist/cleanup-salvage-evidence.d.ts +0 -33
  77. package/dist/cleanup-scan.d.ts +0 -15
  78. package/dist/cleanup-summary.d.ts +0 -29
  79. package/dist/cleanup-types.d.ts +0 -154
  80. package/dist/cleanup-worker-harness-live.d.ts +0 -9
  81. package/dist/cleanup-worktree-index.d.ts +0 -18
  82. package/dist/cleanup-worktree-salvage.d.ts +0 -7
  83. package/dist/cleanup.d.ts +0 -5
  84. package/dist/cli-output/worker-start-stdout.d.ts +0 -11
  85. package/dist/cli.d.ts +0 -3
  86. package/dist/command-center-contract-cli.d.ts +0 -1
  87. package/dist/completion-ack.d.ts +0 -18
  88. package/dist/completion-replay.d.ts +0 -10
  89. package/dist/completion-response.d.ts +0 -15
  90. package/dist/config.d.ts +0 -122
  91. package/dist/context-budget-receipt.d.ts +0 -96
  92. package/dist/context-preview/chat-memory-preview.d.ts +0 -33
  93. package/dist/cron/cron-cli-bin.d.ts +0 -7
  94. package/dist/cron/cron-env-file.d.ts +0 -22
  95. package/dist/cron/cron-env.d.ts +0 -21
  96. package/dist/cron/cron-fire.d.ts +0 -8
  97. package/dist/cron/cron-id.d.ts +0 -3
  98. package/dist/cron/cron-install-api.d.ts +0 -27
  99. package/dist/cron/cron-install-cli.d.ts +0 -2
  100. package/dist/cron/cron-install-plan.d.ts +0 -34
  101. package/dist/cron/cron-install-secrets.d.ts +0 -6
  102. package/dist/cron/cron-install-systemd.d.ts +0 -18
  103. package/dist/cron/cron-install-verify.d.ts +0 -15
  104. package/dist/cron/cron-install.d.ts +0 -51
  105. package/dist/cron/cron-lock.d.ts +0 -9
  106. package/dist/cron/cron-match.d.ts +0 -8
  107. package/dist/cron/cron-readiness.d.ts +0 -35
  108. package/dist/cron/cron-status.d.ts +0 -10
  109. package/dist/cron/cron-store.d.ts +0 -8
  110. package/dist/cron/cron-tick-cli.d.ts +0 -2
  111. package/dist/cron/cron-tick-state.d.ts +0 -5
  112. package/dist/cron/cron-tick.d.ts +0 -19
  113. package/dist/cron/cron-types.d.ts +0 -53
  114. package/dist/cron/hermes-provider-notice.d.ts +0 -1
  115. package/dist/daemon-box-identity.d.ts +0 -16
  116. package/dist/daemon-heartbeat.d.ts +0 -30
  117. package/dist/daemon-keeper.d.ts +0 -21
  118. package/dist/daemon-platform-guard.d.ts +0 -2
  119. package/dist/daemon-supervision/host.d.ts +0 -4
  120. package/dist/daemon-supervision/index.d.ts +0 -6
  121. package/dist/daemon-supervision/policy.d.ts +0 -16
  122. package/dist/daemon-supervision/setup.d.ts +0 -23
  123. package/dist/daemon-supervision/start.d.ts +0 -26
  124. package/dist/daemon-supervision/supervision-health.d.ts +0 -20
  125. package/dist/daemon-supervision/verify.d.ts +0 -13
  126. package/dist/daemon.d.ts +0 -5
  127. package/dist/db-credential-env-paths.d.ts +0 -13
  128. package/dist/db-credential-resolver.d.ts +0 -38
  129. package/dist/db-url-hint.d.ts +0 -4
  130. package/dist/default-repo-cli.d.ts +0 -20
  131. package/dist/default-repo-discovery.d.ts +0 -25
  132. package/dist/default-repo.d.ts +0 -32
  133. package/dist/device-login.d.ts +0 -8
  134. package/dist/discard-disposable.d.ts +0 -6
  135. package/dist/disk-gate.d.ts +0 -25
  136. package/dist/dispatch-callback-timeout.d.ts +0 -1
  137. package/dist/dispatch-claim-release.d.ts +0 -23
  138. package/dist/dispatch-lane-normalization.d.ts +0 -14
  139. package/dist/dispatch-model-guard.d.ts +0 -26
  140. package/dist/dispatch-progress.d.ts +0 -3
  141. package/dist/dispatch-resource-gate.d.ts +0 -20
  142. package/dist/dispatch-start-abort.d.ts +0 -3
  143. package/dist/dispatch-start-readback.d.ts +0 -27
  144. package/dist/dispatch.d.ts +0 -24
  145. package/dist/disposable-artifacts.d.ts +0 -2
  146. package/dist/doctor/context-envelope-cli.d.ts +0 -1
  147. package/dist/doctor/context-envelope.d.ts +0 -13
  148. package/dist/doctor/context-envelope.probes.d.ts +0 -25
  149. package/dist/doctor/context-envelope.types.d.ts +0 -42
  150. package/dist/doctor/doctor.types.d.ts +0 -50
  151. package/dist/doctor/github-readiness.d.ts +0 -16
  152. package/dist/doctor/index.d.ts +0 -7
  153. package/dist/doctor/local-store-cli.d.ts +0 -11
  154. package/dist/doctor/local-store.d.ts +0 -35
  155. package/dist/doctor/node-runtime-cli.d.ts +0 -6
  156. package/dist/doctor/node-runtime.d.ts +0 -19
  157. package/dist/doctor/runner-install-cli.d.ts +0 -1
  158. package/dist/doctor/runner-install.d.ts +0 -2
  159. package/dist/doctor/runtime-takeover-cli.d.ts +0 -1
  160. package/dist/doctor/runtime-takeover-daemon-supervision.d.ts +0 -3
  161. package/dist/doctor/runtime-takeover-deploy-evidence.d.ts +0 -13
  162. package/dist/doctor/runtime-takeover-scheduler.d.ts +0 -29
  163. package/dist/doctor/runtime-takeover.d.ts +0 -3
  164. package/dist/doctor/runtime-takeover.probes.d.ts +0 -45
  165. package/dist/executor-ref-routing.d.ts +0 -14
  166. package/dist/exit-classify.d.ts +0 -12
  167. package/dist/exited-salvage.d.ts +0 -22
  168. package/dist/exited-worker-handoff-capture.d.ts +0 -19
  169. package/dist/factory-status/collect.d.ts +0 -12
  170. package/dist/factory-status/lightweight.d.ts +0 -5
  171. package/dist/factory-status/render.d.ts +0 -5
  172. package/dist/factory-status/types.d.ts +0 -46
  173. package/dist/factory-status-cli.d.ts +0 -1
  174. package/dist/factory-steer-delivery.d.ts +0 -7
  175. package/dist/finalize.d.ts +0 -25
  176. package/dist/fortress-engagement-gate.d.ts +0 -5
  177. package/dist/git.d.ts +0 -37
  178. package/dist/github-repo.d.ts +0 -5
  179. package/dist/harness-expert-review.d.ts +0 -12
  180. package/dist/harness-lease-owner.d.ts +0 -13
  181. package/dist/harness-notice/harness-notice.auto-complete.d.ts +0 -3
  182. package/dist/harness-notice/harness-notice.monitor-tick.d.ts +0 -6
  183. package/dist/harness-notice/harness-notice.parse.d.ts +0 -3
  184. package/dist/harness-notice/harness-notice.tool-response.d.ts +0 -3
  185. package/dist/harness-notice/harness-notice.types.d.ts +0 -17
  186. package/dist/harness-notice/harness-notice.worker-complete.d.ts +0 -3
  187. package/dist/harness-notice/harness-notice.worker-start.d.ts +0 -7
  188. package/dist/harness-notice/harness-notice.worker-status.d.ts +0 -2
  189. package/dist/harness-notice/index.d.ts +0 -8
  190. package/dist/harness-repair-target.d.ts +0 -23
  191. package/dist/harness-storage-snapshot.d.ts +0 -26
  192. package/dist/harness-verify-cli.d.ts +0 -1
  193. package/dist/harness-verify.d.ts +0 -30
  194. package/dist/harness-worker-active.d.ts +0 -12
  195. package/dist/harness-worktree-build-guard.d.ts +0 -12
  196. package/dist/heartbeat-final-result.d.ts +0 -5
  197. package/dist/heartbeat.d.ts +0 -27
  198. package/dist/heavy-verification/command-classify.d.ts +0 -9
  199. package/dist/heavy-verification/gate.d.ts +0 -10
  200. package/dist/heavy-verification/index.d.ts +0 -5
  201. package/dist/heavy-verification/paths.d.ts +0 -3
  202. package/dist/heavy-verification/slot.d.ts +0 -49
  203. package/dist/heavy-verification/worker-command-gate.d.ts +0 -23
  204. package/dist/index.d.ts +0 -85
  205. package/dist/installed-package-versions.d.ts +0 -8
  206. package/dist/instruction-bundle/cache.d.ts +0 -6
  207. package/dist/instruction-bundle/client.d.ts +0 -25
  208. package/dist/instruction-bundle/contract.d.ts +0 -4
  209. package/dist/instruction-bundle/embedded-bundle.d.ts +0 -3
  210. package/dist/instruction-bundle/index.d.ts +0 -7
  211. package/dist/instruction-bundle/keys.d.ts +0 -14
  212. package/dist/instruction-bundle/state.d.ts +0 -24
  213. package/dist/instruction-bundle/types.d.ts +0 -42
  214. package/dist/instruction-bundle/verify.d.ts +0 -15
  215. package/dist/landing/cli-auth.d.ts +0 -11
  216. package/dist/landing/land-pr-check-classify.d.ts +0 -17
  217. package/dist/landing/land-pr-completion-post.d.ts +0 -12
  218. package/dist/landing/land-pr.d.ts +0 -28
  219. package/dist/landing-contract-gate.d.ts +0 -27
  220. package/dist/landing-contract-pr-classify.d.ts +0 -4
  221. package/dist/landing-gate.d.ts +0 -24
  222. package/dist/lane/landing-maintainer-local.d.ts +0 -15
  223. package/dist/lane/landing-maintainer-tick.d.ts +0 -16
  224. package/dist/lane/lane-spec.d.ts +0 -8
  225. package/dist/lane/lane-tick-cli.d.ts +0 -1
  226. package/dist/lease-renewal.d.ts +0 -15
  227. package/dist/local-pr-attention-reconcile.d.ts +0 -25
  228. package/dist/local-run-store/admission-enforce.d.ts +0 -38
  229. package/dist/local-run-store/admission-shadow.d.ts +0 -56
  230. package/dist/local-run-store/dispatch-claim-recovery-startup.d.ts +0 -11
  231. package/dist/local-run-store/dispatch-claim-recovery.d.ts +0 -54
  232. package/dist/local-run-store/dispatch-receipts.d.ts +0 -90
  233. package/dist/local-run-store/index.d.ts +0 -15
  234. package/dist/local-run-store/local-run-store.d.ts +0 -106
  235. package/dist/local-run-store/remote-surface-flags.d.ts +0 -15
  236. package/dist/local-run-store/small-surfaces.d.ts +0 -37
  237. package/dist/local-run-store/sqlite/sqlite-filesystem-policy.d.ts +0 -16
  238. package/dist/local-run-store/sqlite/sqlite-local-run-store.d.ts +0 -68
  239. package/dist/local-run-store/sqlite/sqlite-recovery.d.ts +0 -14
  240. package/dist/local-run-store/sqlite/sqlite-schema.d.ts +0 -13
  241. package/dist/local-run-store/store-lifecycle.d.ts +0 -38
  242. package/dist/local-run-store/surface-flags.d.ts +0 -47
  243. package/dist/local-run-store/tick-posture.d.ts +0 -27
  244. package/dist/material-worktree-changes.d.ts +0 -2
  245. package/dist/memory-cost-package-version-guard-enforce.d.ts +0 -10
  246. package/dist/memory-cost-package-version-guard.d.ts +0 -49
  247. package/dist/mesh-liveness/mesh-cron-lease-store.d.ts +0 -9
  248. package/dist/model-routing-task-enrich.d.ts +0 -8
  249. package/dist/model-routing.d.ts +0 -49
  250. package/dist/monitor/index.d.ts +0 -7
  251. package/dist/monitor/monitor-cli.d.ts +0 -9
  252. package/dist/monitor/monitor-loop.d.ts +0 -1
  253. package/dist/monitor/monitor-spawn.d.ts +0 -18
  254. package/dist/monitor/monitor.classify.d.ts +0 -15
  255. package/dist/monitor/monitor.service.d.ts +0 -17
  256. package/dist/monitor/monitor.store.d.ts +0 -6
  257. package/dist/monitor/monitor.task-lease.d.ts +0 -11
  258. package/dist/monitor/monitor.terminal.d.ts +0 -11
  259. package/dist/monitor/monitor.types.d.ts +0 -77
  260. package/dist/node-runtime-policy.d.ts +0 -25
  261. package/dist/orchestration-enforcement/config.d.ts +0 -5
  262. package/dist/orchestration-enforcement/evaluator.d.ts +0 -6
  263. package/dist/orchestration-enforcement/idempotency.d.ts +0 -8
  264. package/dist/orchestration-enforcement/index.d.ts +0 -4
  265. package/dist/orchestration-enforcement/types.d.ts +0 -24
  266. package/dist/orchestration-providers/adapter-contract.d.ts +0 -50
  267. package/dist/orchestration-providers/audit.d.ts +0 -3
  268. package/dist/orchestration-providers/capabilities.d.ts +0 -3
  269. package/dist/orchestration-providers/claude-oauth-binding.d.ts +0 -6
  270. package/dist/orchestration-providers/codex-oauth-binding.d.ts +0 -5
  271. package/dist/orchestration-providers/codex-orchestration-adapter.d.ts +0 -13
  272. package/dist/orchestration-providers/cost-router.d.ts +0 -24
  273. package/dist/orchestration-providers/cursor-oauth-binding.d.ts +0 -5
  274. package/dist/orchestration-providers/hermes-cli-adapter.d.ts +0 -15
  275. package/dist/orchestration-providers/hermes-openai-codex-binding.d.ts +0 -15
  276. package/dist/orchestration-providers/index.d.ts +0 -14
  277. package/dist/orchestration-providers/inventory.d.ts +0 -31
  278. package/dist/orchestration-providers/oauth-binding-utils.d.ts +0 -22
  279. package/dist/orchestration-providers/routing.d.ts +0 -16
  280. package/dist/orchestration-providers/types.d.ts +0 -45
  281. package/dist/package-version.d.ts +0 -5
  282. package/dist/path-values.d.ts +0 -5
  283. package/dist/paths.d.ts +0 -16
  284. package/dist/pipeline-dispatch.d.ts +0 -8
  285. package/dist/pipeline-exact-targets.d.ts +0 -2
  286. package/dist/pipeline-max-starts.d.ts +0 -26
  287. package/dist/pipeline-tick.d.ts +0 -50
  288. package/dist/plan-persist/agentos-api.d.ts +0 -28
  289. package/dist/plan-persist/body-hash.d.ts +0 -3
  290. package/dist/plan-persist/drain.d.ts +0 -7
  291. package/dist/plan-persist/errors.d.ts +0 -9
  292. package/dist/plan-persist/handoff.d.ts +0 -7
  293. package/dist/plan-persist/idempotency.d.ts +0 -2
  294. package/dist/plan-persist/index.d.ts +0 -8
  295. package/dist/plan-persist/outbox-durability.d.ts +0 -31
  296. package/dist/plan-persist/outbox-store.d.ts +0 -36
  297. package/dist/plan-persist/paths.d.ts +0 -8
  298. package/dist/plan-persist/persist.d.ts +0 -10
  299. package/dist/plan-persist/readback.d.ts +0 -17
  300. package/dist/plan-persist/types.d.ts +0 -95
  301. package/dist/plan-persist-cli.d.ts +0 -3
  302. package/dist/plan-progress-daemon-sync.d.ts +0 -7
  303. package/dist/plan-progress-sync.d.ts +0 -21
  304. package/dist/plan-progress.d.ts +0 -10
  305. package/dist/post-restart-unblock.d.ts +0 -24
  306. package/dist/pr-handoff/index.d.ts +0 -6
  307. package/dist/pr-handoff/pr-handoff-assess.d.ts +0 -44
  308. package/dist/pr-handoff/pr-handoff-dedupe.d.ts +0 -18
  309. package/dist/pr-handoff/pr-handoff-gh.d.ts +0 -52
  310. package/dist/pr-handoff/pr-handoff-supersede.d.ts +0 -17
  311. package/dist/pr-handoff/pr-handoff.d.ts +0 -8
  312. package/dist/pr-handoff/pr-handoff.types.d.ts +0 -45
  313. package/dist/pr-handoff/same-head-pr-guard.d.ts +0 -10
  314. package/dist/prompt.d.ts +0 -56
  315. package/dist/provider-evidence/collect.d.ts +0 -31
  316. package/dist/provider-evidence/exec.d.ts +0 -5
  317. package/dist/provider-evidence/index.d.ts +0 -7
  318. package/dist/provider-evidence/recipes-github.d.ts +0 -5
  319. package/dist/provider-evidence/recipes-vercel.d.ts +0 -2
  320. package/dist/provider-evidence/registry.d.ts +0 -6
  321. package/dist/provider-evidence/shared-cache.d.ts +0 -8
  322. package/dist/provider-evidence/types.d.ts +0 -48
  323. package/dist/provider-evidence/wanted-store.d.ts +0 -13
  324. package/dist/provider-quota-preflight.d.ts +0 -38
  325. package/dist/providers/claude.d.ts +0 -8
  326. package/dist/providers/codex.d.ts +0 -14
  327. package/dist/providers/cursor-windows.d.ts +0 -7
  328. package/dist/providers/cursor.d.ts +0 -13
  329. package/dist/providers/hermes-codex.d.ts +0 -12
  330. package/dist/providers/model-preflight.d.ts +0 -33
  331. package/dist/providers/openai-codex-resilience.d.ts +0 -33
  332. package/dist/providers/registry.d.ts +0 -4
  333. package/dist/providers/types.d.ts +0 -36
  334. package/dist/redact.d.ts +0 -1
  335. package/dist/repair-target-worktree.d.ts +0 -4
  336. package/dist/repo-search.d.ts +0 -53
  337. package/dist/resource-gate.d.ts +0 -74
  338. package/dist/retry-limits.d.ts +0 -12
  339. package/dist/review-head-reconcile.d.ts +0 -17
  340. package/dist/run-list.d.ts +0 -38
  341. package/dist/run-metadata-retention.d.ts +0 -38
  342. package/dist/run-resolve.d.ts +0 -4
  343. package/dist/run-store.d.ts +0 -38
  344. package/dist/run-worker-index.d.ts +0 -10
  345. package/dist/runner-boundary/index.d.ts +0 -6
  346. package/dist/runner-boundary/runner-boundary.dispatch-guard.d.ts +0 -4
  347. package/dist/runner-boundary/runner-boundary.forge-legacy-migration.d.ts +0 -23
  348. package/dist/runner-boundary/runner-boundary.harness-root.d.ts +0 -17
  349. package/dist/runner-boundary/runner-boundary.resolve.d.ts +0 -4
  350. package/dist/runner-boundary/runner-boundary.run-guard.d.ts +0 -12
  351. package/dist/runner-boundary/runner-boundary.types.d.ts +0 -31
  352. package/dist/runner-config-backfill.d.ts +0 -18
  353. package/dist/runner-identity.d.ts +0 -21
  354. package/dist/runtime-identity.d.ts +0 -9
  355. package/dist/runtime-memory-envelope.d.ts +0 -16
  356. package/dist/scheduler-cutover-cli.d.ts +0 -2
  357. package/dist/scheduler-cutover.d.ts +0 -25
  358. package/dist/security-review-environment.d.ts +0 -27
  359. package/dist/server/adapter-contract.d.ts +0 -1
  360. package/dist/server/cleanup.d.ts +0 -3
  361. package/dist/server/context-budget-receipt.d.ts +0 -2
  362. package/dist/server/db-credentials.d.ts +0 -1
  363. package/dist/server/default-repo.d.ts +0 -1
  364. package/dist/server/harness-notice.d.ts +0 -2
  365. package/dist/server/heavy-verification.d.ts +0 -3
  366. package/dist/server/landing.d.ts +0 -1
  367. package/dist/server/memory-cost-enforce.d.ts +0 -1
  368. package/dist/server/memory-cost.d.ts +0 -1
  369. package/dist/server/model-routing.d.ts +0 -3
  370. package/dist/server/monitor.d.ts +0 -3
  371. package/dist/server/node-runtime-policy.d.ts +0 -1
  372. package/dist/server/orchestration.d.ts +0 -10
  373. package/dist/server/pr-evidence.d.ts +0 -2
  374. package/dist/server/prompt.d.ts +0 -1
  375. package/dist/server/repo-search.d.ts +0 -1
  376. package/dist/server/worker-policy.d.ts +0 -6
  377. package/dist/server/wsl-crash-dumps.d.ts +0 -2
  378. package/dist/shell-command-outcome.d.ts +0 -32
  379. package/dist/sidecar-cli.d.ts +0 -16
  380. package/dist/stale-reconcile.d.ts +0 -31
  381. package/dist/start-box-identity.d.ts +0 -12
  382. package/dist/start.d.ts +0 -13
  383. package/dist/status.d.ts +0 -260
  384. package/dist/stream.d.ts +0 -20
  385. package/dist/supervisor.d.ts +0 -40
  386. package/dist/sweep.d.ts +0 -1
  387. package/dist/util.d.ts +0 -35
  388. package/dist/validate.d.ts +0 -15
  389. package/dist/vercel/index.d.ts +0 -4
  390. package/dist/vercel/vercel-api.d.ts +0 -17
  391. package/dist/vercel/vercel-evidence.d.ts +0 -48
  392. package/dist/vercel/vercel-github-status.d.ts +0 -19
  393. package/dist/vercel/vercel-url.d.ts +0 -18
  394. package/dist/verify-live/verify-live-prompt.d.ts +0 -2
  395. package/dist/worker-cap-source.d.ts +0 -29
  396. package/dist/worker-env.d.ts +0 -52
  397. package/dist/worker-execution-mode.d.ts +0 -5
  398. package/dist/worker-final-result-embed.d.ts +0 -1
  399. package/dist/worker-lease-sync.d.ts +0 -15
  400. package/dist/worker-lifecycle.d.ts +0 -28
  401. package/dist/worker-metadata-paths.d.ts +0 -26
  402. package/dist/worker-metadata-reconcile.d.ts +0 -21
  403. package/dist/worker-ops.d.ts +0 -45
  404. package/dist/worker-persona-catalog.d.ts +0 -29
  405. package/dist/worker-provider-policy.d.ts +0 -26
  406. package/dist/workspace-runtime-config.d.ts +0 -10
  407. package/dist/worktree-base-ref.d.ts +0 -34
  408. package/dist/worktree-completion-handoff.d.ts +0 -17
  409. package/dist/worktree.d.ts +0 -11
  410. package/dist/wsl-crash-dumps-cleanup.d.ts +0 -31
  411. package/dist/wsl-crash-dumps-cli.d.ts +0 -1
  412. package/dist/wsl-crash-dumps.d.ts +0 -90
  413. package/dist/wsl-host.d.ts +0 -71
@@ -1,32 +0,0 @@
1
- export type ShellCommandOutcomeKind = "success" | "audit_findings" | "search_no_matches" | "command_failure";
2
- export interface NpmAuditSummary {
3
- total: number;
4
- critical: number;
5
- high: number;
6
- moderate: number;
7
- low: number;
8
- info: number;
9
- }
10
- export interface ShellCommandOutcome {
11
- kind: ShellCommandOutcomeKind;
12
- exitCode: number;
13
- /** Short operator-facing line (no raw JSON blob). */
14
- summary: string;
15
- /** Present when kind === audit_findings and JSON parsed. */
16
- audit?: NpmAuditSummary;
17
- /** When JSON was expected but invalid. */
18
- parseError?: string;
19
- }
20
- export declare function summarizeNpmAuditReport(report: Record<string, unknown>): NpmAuditSummary | null;
21
- export declare function classifyNpmAuditOutcome(input: {
22
- exitCode: number;
23
- stdout: string;
24
- stderr: string;
25
- }): ShellCommandOutcome;
26
- export declare function classifyShellCommandOutcome(input: {
27
- command: string;
28
- exitCode: number;
29
- stdout?: string;
30
- stderr?: string;
31
- interleavedOutput?: string;
32
- }): ShellCommandOutcome;
@@ -1,16 +0,0 @@
1
- export interface SidecarCliCommand {
2
- command: string;
3
- argsPrefix: string[];
4
- cliPath: string;
5
- }
6
- /**
7
- * Runtime sidecars normally execute bundled `dist/cli.js`. During repo-source
8
- * daemon runs, however, `import.meta.url` points at `src/*.ts` and no sibling
9
- * `cli.js` exists until `npm run build`. Fall back to `tsx src/cli.ts` so
10
- * source-driven workers still get completion/monitor sidecars.
11
- */
12
- export declare function resolveSidecarCliCommand(input: {
13
- importMetaUrl: string;
14
- explicitCliPath?: string;
15
- nodeExecutable: string;
16
- }): SidecarCliCommand | null;
@@ -1,31 +0,0 @@
1
- import { type RunFinalizeResult } from "./finalize.js";
2
- import { reconcileWorkerMetadata } from "./worker-metadata-reconcile.js";
3
- import { reconcileLocalOnlyMergedPrAttention } from "./local-pr-attention-reconcile.js";
4
- import { archiveTerminalWorkerMetadata } from "./run-metadata-retention.js";
5
- /** No heartbeat this long + dead PID → reconcile as exited. */
6
- export declare const STALE_RECONCILE_HEARTBEAT_MS: number;
7
- export interface StaleWorkerReconcileOutcome {
8
- runId: string;
9
- worker: string;
10
- action: "marked_exited" | "killed_stale" | "skipped";
11
- reason: string;
12
- }
13
- export interface ReconcileStaleWorkersResult {
14
- workers: StaleWorkerReconcileOutcome[];
15
- finalizedRuns: RunFinalizeResult[];
16
- metadataReconcile: ReturnType<typeof reconcileWorkerMetadata>;
17
- localPrAttentionReconcile: ReturnType<typeof reconcileLocalOnlyMergedPrAttention>;
18
- terminalWorkerArchive: ReturnType<typeof archiveTerminalWorkerMetadata>;
19
- }
20
- /**
21
- * Reconcile workers that exited without updating worker.json, and optionally
22
- * terminate long-idle live processes. Paused workers with recent heartbeat
23
- * blockers are left alone (heartbeat freshness gate).
24
- */
25
- export declare function reconcileStaleWorkers(): ReconcileStaleWorkersResult;
26
- /**
27
- * One-shot CLI entry for `kynver run reconcile`: reconciles stale workers and
28
- * finalizes dead runs globally without requiring a running daemon. Prints a
29
- * JSON summary to stdout.
30
- */
31
- export declare function reconcileRunsCli(): void;
@@ -1,12 +0,0 @@
1
- import type { KynverUserConfig } from "./config.js";
2
- export interface StartBoxIdentityRepair {
3
- repaired: boolean;
4
- boxKind: string;
5
- maxConcurrentWorkers: number;
6
- warnings: string[];
7
- }
8
- /**
9
- * On `kynver start`, persist explicit box identity and clamp mis-inherited Forge caps
10
- * so Command Center pools stay ghost 8 / forge 4.
11
- */
12
- export declare function repairStartBoxIdentity(config?: KynverUserConfig, env?: NodeJS.ProcessEnv): StartBoxIdentityRepair;
package/dist/start.d.ts DELETED
@@ -1,13 +0,0 @@
1
- import { type HarnessRunRecord } from "./run-store.js";
2
- /**
3
- * Pick the run `start` should attach the daemon to: the newest non-terminal
4
- * run whose repo matches. Returns null when none exists (create one).
5
- */
6
- export declare function resolveStartRunId(runs: HarnessRunRecord[], repo: string): string | null;
7
- export declare function runStart(args: Record<string, string | boolean>): Promise<void>;
8
- /**
9
- * The argv the keeper child re-invokes with: an explicit `kynver daemon`
10
- * command (NOT `start` — the child must skip bootstrap/run resolution and
11
- * just run the loop). Forwards the daemon-relevant flags `start` accepts.
12
- */
13
- export declare function buildStartDaemonArgv(runId: string, agentOsId: string, args: Record<string, string | boolean>): string[];
package/dist/status.d.ts DELETED
@@ -1,260 +0,0 @@
1
- import { type GitAncestry } from "./git.js";
2
- import { type WorkerLandingContract } from "./landing-contract-gate.js";
3
- export declare const NO_START_MS = 180000;
4
- export declare const STALE_MS = 600000;
5
- export interface WorkerAttention {
6
- state: "done" | "needs_attention" | "blocked" | "stale" | "ok";
7
- reason: string;
8
- }
9
- /** Snapshot of operating-rules policy injection at worker spawn (from dispatch-next). */
10
- export interface InstructionPolicyEvidenceSnapshot {
11
- fingerprint?: string;
12
- ruleSlugs?: string[];
13
- globalRuleCount?: number;
14
- personaRuleCount?: number;
15
- explicitKindCount?: number;
16
- invariantCount?: number;
17
- markdownChars?: number;
18
- injectedAt?: string;
19
- }
20
- /** Snapshot of task-anchored context envelope injection at worker spawn. */
21
- export interface ContextEnvelopeEvidenceSnapshot {
22
- anchorTaskId?: string;
23
- envelopeGeneratedAt?: string;
24
- injectedAt?: string;
25
- hasPersonaBlock?: boolean;
26
- personaSlug?: string | null;
27
- operatingRuleCount?: number;
28
- memoryHitCount?: number;
29
- markdownChars?: number;
30
- source?: "dispatch_injection" | "tool_call";
31
- }
32
- /** Snapshot of anchored persona context-envelope injection at worker spawn. */
33
- export interface PersonaContextEvidenceSnapshot {
34
- expectedPersonaSlug?: string;
35
- injectedPersonaSlug?: string;
36
- displayName?: string;
37
- operatingRuleCount?: number;
38
- anchorTaskId?: string;
39
- envelopeGeneratedAt?: string;
40
- injectedAt?: string;
41
- markdownChars?: number;
42
- }
43
- /** Snapshot of first-class runtime memory envelope injection at harness launch. */
44
- export interface RuntimeEnvelopeEvidenceSnapshot {
45
- envelopeId?: string;
46
- envelopeSchemaVersion?: string;
47
- generatedAt?: string;
48
- injectedAt?: string;
49
- mode?: string;
50
- memoryIncludedCount?: number;
51
- memoryOmittedCount?: number;
52
- degraded?: boolean;
53
- degradedReason?: string | null;
54
- auditFingerprint?: string;
55
- promptMarkdownChars?: number;
56
- }
57
- /** Dispatch-time retrieval probe replayed on harness completion. */
58
- export interface HarnessMemoryQualityCaptureSnapshot {
59
- memoryQuery: string;
60
- hitCount: number;
61
- miss: boolean;
62
- capturedAt: string;
63
- retrievalEvidence?: Record<string, unknown> | null;
64
- /** P7 privacy-safe prompt block (trace summary + live-verification nudges). */
65
- promptMarkdown?: string | null;
66
- }
67
- export interface HarnessWorkerRecord {
68
- name: string;
69
- runId: string;
70
- status: string;
71
- pid?: number;
72
- /** Model id passed to the worker provider. */
73
- model?: string;
74
- /** Worker provider key frozen at spawn for status/completion readback. */
75
- provider?: string;
76
- executionMode?: import("./worker-execution-mode.js").WorkerExecutionMode;
77
- /** Runtime observed unread operator steers and stopped this worker generation. */
78
- steerRestartRequired?: boolean;
79
- steerRestartRequestedAt?: string;
80
- pendingSteerEventIds?: number[];
81
- dispatchSteerFenceEventId?: number;
82
- branch: string;
83
- worktreePath: string;
84
- workerDir: string;
85
- stdoutPath: string;
86
- stderrPath: string;
87
- heartbeatPath: string;
88
- ownedPaths?: string[];
89
- agentOsId?: string;
90
- taskId?: string;
91
- planId?: string;
92
- /** Operating-rules policy fingerprint when dispatch injected operating rules. */
93
- instructionPolicyFingerprint?: string;
94
- instructionPolicyEvidence?: InstructionPolicyEvidenceSnapshot;
95
- memoryQualityCapture?: HarnessMemoryQualityCaptureSnapshot;
96
- personaSlug?: string;
97
- personaEvidence?: PersonaContextEvidenceSnapshot;
98
- contextEnvelopeEvidence?: ContextEnvelopeEvidenceSnapshot;
99
- runtimeEnvelopeEvidence?: RuntimeEnvelopeEvidenceSnapshot;
100
- leaseOwner?: string;
101
- /** Fencing token from claim — sent on renew/completion when set. */
102
- leaseToken?: string;
103
- dispatched?: boolean;
104
- startedAt?: string;
105
- /** Routing audit — which rule selected model/provider (dispatch inference). */
106
- routingRule?: string;
107
- requestedModel?: string;
108
- /** Orchestration provider/model/auth-source/cost audit (no OAuth secrets). */
109
- orchestrationAudit?: import("./orchestration-providers/types.js").OrchestrationRoutingAudit;
110
- /** Board task metadata for landing/PR-handoff gates (set at dispatch). */
111
- executorRef?: string;
112
- parentTaskId?: string;
113
- taskTitle?: string;
114
- taskPrUrl?: string;
115
- /** Canonical target PR for repair workers (must not spawn duplicate PRs). */
116
- repairTargetPrUrl?: string;
117
- repairTargetBranch?: string;
118
- /** Set when stale-reconcile patches a dead/stale worker record. */
119
- reconciledAt?: string;
120
- reconcileReason?: string;
121
- /** Last heartbeat blocker text successfully synced to plan-progress-sync (dedupe). */
122
- lastSyncedHeartbeatBlocker?: string;
123
- /**
124
- * Set when the most recent AgentOS completion replay for this finished worker
125
- * was rejected (e.g. a revoked / expired / cross-workspace runner token) or
126
- * otherwise failed. While set, the worker is NOT treated as cleanly done:
127
- * `finalizeStaleRuns` keeps the run non-terminal and the board surfaces it.
128
- * Cleared once the completion is acknowledged (2xx). Local-only — never sent
129
- * to the server as part of the worker's intrinsic status.
130
- */
131
- completionBlocker?: string;
132
- /** Local worker aborted because post-dispatch AgentOS readback failed. */
133
- dispatchStartReadbackFailed?: boolean;
134
- /** ISO timestamp when `/harness/completion` returned 2xx for this worker. */
135
- completionReportedAt?: string;
136
- /** Snapshot from the acknowledged completion POST — local-only. */
137
- completionSnapshot?: {
138
- finalResult?: unknown;
139
- prUrl?: string | null;
140
- summary?: string | null;
141
- };
142
- /** How `completionSnapshot` was captured before completion ack (reconcile path). */
143
- completionHandoffSource?: string;
144
- /** Audit tag for how `completionReportedAt` was set (`tryCompleteWorker`, `board-task-*`). */
145
- completionAckSource?: string;
146
- /** Local mirror of the last completion POST outcome. */
147
- completionOutcome?: "acknowledged" | "rejected";
148
- /** Truncated JSON body from the last acknowledged completion response. */
149
- completionResponse?: unknown;
150
- /**
151
- * Direct/local worker with no board linkage — must not be mistaken for an
152
- * AgentTask-backed harness worker in completion or dispatch paths.
153
- */
154
- localOnly?: boolean;
155
- /** Sidecar PID when detached; used for observability only. */
156
- completionSidecarPid?: number;
157
- completionSidecarSpawnFailedAt?: string;
158
- /** One-off helper paths removed before completion (`kynver worker discard-disposable`). */
159
- disposableArtifactsRemoved?: string[];
160
- /** Physical pool label frozen at spawn for orchestration usage attribution. */
161
- boxKind?: string;
162
- boxId?: string;
163
- /** Runner/daemon identity frozen at spawn (KYNVER_RUNTIME_ID). */
164
- runtimeId?: string;
165
- }
166
- export interface RawHarnessWorkerStatus {
167
- runId: string;
168
- worker: string;
169
- pid?: number;
170
- alive: boolean;
171
- status: string;
172
- attention: WorkerAttention;
173
- branch: string;
174
- worktreePath: string;
175
- ownedPaths?: string[];
176
- stdoutBytes: number;
177
- stderrBytes: number;
178
- heartbeatBytes: number;
179
- firstEventAt: string | null;
180
- lastEventAt: string | null;
181
- lastActivityAt: string | null;
182
- currentTool: string | null;
183
- heartbeatCount: number;
184
- lastHeartbeatAt: string | null;
185
- lastHeartbeatPhase: string | null;
186
- lastHeartbeatSummary: string | null;
187
- heartbeatBlocker: string | null;
188
- steerRestartRequired?: boolean;
189
- pendingSteerEventIds?: number[];
190
- dispatchSteerFenceEventId?: number;
191
- /** Parser-detected timestamp anomalies (e.g., future heartbeat ts). */
192
- timestampAnomalies?: Array<{
193
- kind: "future_heartbeat_timestamp";
194
- observedAt: string;
195
- clampedTo: string;
196
- }>;
197
- finalResult: unknown;
198
- error?: string;
199
- changedFiles: string[];
200
- gitAncestry: GitAncestry;
201
- /** Set by PR-ready handoff before completion is posted. */
202
- prUrl?: string;
203
- headCommit?: string;
204
- /** Paths removed via `kynver worker discard-disposable` before completion POST. */
205
- disposableArtifactsRemoved?: string[];
206
- /** Fencing token from claim — echoed on completion when set. */
207
- leaseToken?: string;
208
- /** Operating-rules policy fields echoed on completion status for mirror recovery. */
209
- instructionPolicyFingerprint?: string | null;
210
- instructionPolicyEvidence?: InstructionPolicyEvidenceSnapshot | null;
211
- /** Model the worker was launched with — echoed from worker.json for usage tracking. */
212
- model?: string | null;
213
- /** Worker provider key (codex | cursor | claude) frozen at spawn for usage/routing readback. */
214
- provider?: string | null;
215
- /** Physical pool label — ghost | forge (runtime ≥ 0.1.115). */
216
- boxKind?: string | null;
217
- boxId?: string | null;
218
- /** Runner/daemon identity echoed from worker.json. */
219
- runtimeId?: string | null;
220
- personaSlug?: string | null;
221
- /** True when dispatch-next spawned the worker on a daemon tick. */
222
- dispatched?: boolean | null;
223
- localOnly?: boolean | null;
224
- }
225
- export interface WorkerStatusOptions {
226
- /** Branch ref for ancestry when baseCommit is not set. */
227
- base?: string;
228
- /** Pinned SHA from run creation — preferred for ancestry vs a moving branch tip. */
229
- baseCommit?: string;
230
- }
231
- export declare function computeAttention(input: {
232
- alive: boolean;
233
- finalResult: unknown;
234
- firstEventAt: string | null;
235
- stdoutBytes: number;
236
- stderrBytes?: number;
237
- heartbeatBytes: number;
238
- lastActivityAt: string | null;
239
- heartbeatBlocker: string | null;
240
- startedAt?: string;
241
- /** stderr tail / parsed error for a worker that died without a final result. */
242
- error?: string | null;
243
- changedFiles?: string[];
244
- gitAncestry?: GitAncestry | null;
245
- completionBlocker?: string | null;
246
- landingContract?: WorkerLandingContract | null;
247
- prUrl?: string | null;
248
- localOnly?: boolean;
249
- taskId?: string | null;
250
- agentOsId?: string | null;
251
- reconcileReason?: string | null;
252
- }): WorkerAttention;
253
- export declare function computeWorkerStatus(worker: HarnessWorkerRecord, options?: WorkerStatusOptions): RawHarnessWorkerStatus;
254
- export declare function isFinishedWorkerStatus(status: RawHarnessWorkerStatus): boolean;
255
- /** True when a worker recorded a final result but failed the landing gate. */
256
- export declare function isLandingBlockedWorkerStatus(status: RawHarnessWorkerStatus): boolean;
257
- export declare function deriveRunStatus(fallback: string, workers: Array<{
258
- attention?: string;
259
- status?: string;
260
- }>): string;
package/dist/stream.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { type ShellCommandOutcome } from "./shell-command-outcome.js";
2
- export interface ParsedStream {
3
- firstEventAt: string | null;
4
- lastEventAt: string | null;
5
- currentTool: string | null;
6
- finalResult: unknown;
7
- error: string | null;
8
- /** Most recent non-success shell outcome for operator error streams. */
9
- lastShellOutcome: ShellCommandOutcome | null;
10
- }
11
- /**
12
- * Parse harness worker stdout (`stream-json` from Claude Code or Cursor Agent).
13
- * Cursor emits `tool_call` events and may only write `type: "result"` after exit;
14
- * completion heartbeats are merged in `computeWorkerStatus`.
15
- */
16
- export declare function parseHarnessStream(file: string): ParsedStream;
17
- /** @deprecated Use {@link parseHarnessStream} — kept for existing imports. */
18
- export declare function parseClaudeStream(file: string): ParsedStream;
19
- export declare function summarizeShellToolCallEvent(event: Record<string, unknown>): string | undefined;
20
- export declare function summarizeEvent(event: Record<string, unknown>): string | undefined;
@@ -1,40 +0,0 @@
1
- import type { HarnessRunRecord } from "./run-store.js";
2
- import type { ContextEnvelopeEvidenceSnapshot, HarnessMemoryQualityCaptureSnapshot, HarnessWorkerRecord, InstructionPolicyEvidenceSnapshot, PersonaContextEvidenceSnapshot, RuntimeEnvelopeEvidenceSnapshot } from "./status.js";
3
- import type { WorkerExecutionMode } from "./worker-execution-mode.js";
4
- export interface SpawnWorkerOptions {
5
- name: string;
6
- task: string;
7
- ownedPaths?: string[];
8
- model?: string;
9
- branch?: string;
10
- agentOsId?: string;
11
- taskId?: string;
12
- planId?: string;
13
- instructionPolicyMarkdown?: string | null;
14
- instructionPolicyFingerprint?: string | null;
15
- instructionPolicyEvidence?: InstructionPolicyEvidenceSnapshot | null;
16
- memoryQualityCapture?: HarnessMemoryQualityCaptureSnapshot | null;
17
- memoryQualityPromptMarkdown?: string | null;
18
- personaMarkdown?: string | null;
19
- personaSlug?: string | null;
20
- personaEvidence?: PersonaContextEvidenceSnapshot | null;
21
- contextEnvelopeMarkdown?: string | null;
22
- contextEnvelopeEvidence?: ContextEnvelopeEvidenceSnapshot | null;
23
- runtimeEnvelopeMarkdown?: string | null;
24
- runtimeEnvelopeEvidence?: RuntimeEnvelopeEvidenceSnapshot | null;
25
- leaseOwner?: string;
26
- leaseToken?: string;
27
- dispatched?: boolean;
28
- provider?: string;
29
- routingRule?: string;
30
- requestedModel?: string;
31
- executorRef?: string;
32
- parentTaskId?: string;
33
- taskTitle?: string;
34
- taskPrUrl?: string;
35
- repairTargetPrUrl?: string;
36
- repairTargetBranch?: string;
37
- executionMode?: WorkerExecutionMode;
38
- }
39
- export declare function spawnWorkerProcess(run: HarnessRunRecord, opts: SpawnWorkerOptions): HarnessWorkerRecord;
40
- export declare function startWorker(args: Record<string, string | boolean>): Promise<void>;
package/dist/sweep.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare function sweepRun(args: Record<string, string | boolean>): Promise<Record<string, unknown> | void>;
package/dist/util.d.ts DELETED
@@ -1,35 +0,0 @@
1
- export declare function fail(message: string): never;
2
- /** Avoid flashing a visible console on Windows when spawning worker/sidecar children. */
3
- export declare function hiddenSpawnOptions<T extends Record<string, unknown>>(opts: T): T;
4
- export declare function required(value: string | undefined, name: string): string;
5
- export declare function safeJson(line: string): unknown;
6
- export declare function readJson<T>(file: string, fallback?: T): T;
7
- /**
8
- * Atomic JSON write (temp + rename): a PROCESS crash mid-write leaves either
9
- * the old or the new content on disk, never a torn file (durable-harness D0
10
- * — the tear-class fix behind every run.json/worker.json/lease write). The
11
- * temp name is unique per writer so concurrent daemon+CLI writers to the
12
- * same target cannot collide on the temp path. Scope: the process-crash
13
- * (SIGKILL/OOM) tear class only — no fsync, so power-loss durability is
14
- * explicitly out of scope for host-local coordination state. Windows note:
15
- * rename over a target held open by another process can throw EPERM (a
16
- * throw path the old direct write did not have).
17
- */
18
- export declare function writeJson(file: string, value: unknown): void;
19
- export declare function safeSlug(value: string | undefined): string;
20
- export declare function timestampSlug(name: string): string;
21
- export declare function splitCsv(value: string | undefined): string[];
22
- export declare function trimTrailingSlash(url: string): string;
23
- export declare function oneLine(value: string): string;
24
- export declare function fileSize(file: string): number;
25
- export declare function fileMtime(file: string): string | null;
26
- export declare function tailFile(file: string, lines: number): string;
27
- export declare function readMaybeFile(file: string | undefined): string;
28
- export declare function listRunIds(runsDir: string): string[];
29
- export declare function sleepMs(ms: number): void;
30
- /** Non-blocking sleep for async loops (daemon backoff, interruptible shutdown). */
31
- export declare function sleepMsAsync(ms: number): Promise<void>;
32
- export declare function isPidAlive(pid: number | undefined): boolean;
33
- export declare function killWorkerProcess(pid: number, signal: NodeJS.Signals): void;
34
- export declare function latestIso(values: Array<string | null | undefined>): string | null;
35
- export declare function secsAgo(ms: number): number;
@@ -1,15 +0,0 @@
1
- export declare function validateRunId(runId: string): string;
2
- export declare function validateWorkerName(name: string): string;
3
- /**
4
- * Require `--run` and `--name` before touching the filesystem. Missing flags used
5
- * to become `String(undefined)` → paths under `runs/undefined/workers/undefined`.
6
- */
7
- export declare function resolveWorkerTargetArgs(args: Record<string, string | boolean>): {
8
- runId: string;
9
- workerName: string;
10
- };
11
- /** Require `--run` before loading run.json or building a run board. */
12
- export declare function resolveRunTargetArg(args: Record<string, string | boolean>): string;
13
- export declare function validateRepo(repo: string): string;
14
- export declare function validateOwnedPaths(repoRoot: string, ownedPaths: string[]): string[];
15
- export declare function validateTailLines(lines: number): number;
@@ -1,4 +0,0 @@
1
- export { fetchVercelDeploymentStatus, mapVercelReadyStateToEvidenceStatus, type VercelDeploymentLookupOptions, type VercelDeploymentLookupResult, } from "./vercel-api.js";
2
- export { classifyVercelUrl, isDashboardVercelUrl, isInspectableVercelTarget, type ClassifiedVercelUrl, type VercelUrlKind, } from "./vercel-url.js";
3
- export { isVercelStatusContext, normalizeGitHubStatusState, pickVercelStatusContext, type GitHubCommitStatusRow, type GitHubStatusState, type GitHubVercelStatusContext, } from "./vercel-github-status.js";
4
- export { collectVercelEvidence, evidenceFromGitHubVercelStatus, resolveVercelInspectTarget, type CollectVercelEvidenceInput, type RunVercelDeploymentLookup, type RunVercelInspect, type VercelEvidenceResult, type VercelEvidenceStatus, type VercelInspectCommandResult, } from "./vercel-evidence.js";
@@ -1,17 +0,0 @@
1
- export interface VercelDeploymentLookupResult {
2
- ok: boolean;
3
- readyState: string | null;
4
- previewUrl: string | null;
5
- error: string | null;
6
- }
7
- export interface VercelDeploymentLookupOptions {
8
- token?: string | null;
9
- teamId?: string | null;
10
- fetchImpl?: typeof fetch;
11
- }
12
- /**
13
- * Fetch deployment state by id (`dpl_*`) or `*.vercel.app` host URL.
14
- * Requires `VERCEL_TOKEN` (or explicit token) — never shells out to the Vercel CLI.
15
- */
16
- export declare function fetchVercelDeploymentStatus(deploymentIdOrUrl: string, options?: VercelDeploymentLookupOptions): Promise<VercelDeploymentLookupResult>;
17
- export declare function mapVercelReadyStateToEvidenceStatus(readyState: string | null, githubPending: boolean): "ready" | "building" | "error";
@@ -1,48 +0,0 @@
1
- import { type VercelDeploymentLookupResult } from "./vercel-api.js";
2
- import { type GitHubCommitStatusRow, type GitHubStatusState, type GitHubVercelStatusContext } from "./vercel-github-status.js";
3
- import { type ClassifiedVercelUrl } from "./vercel-url.js";
4
- export type VercelEvidenceStatus = "ready" | "building" | "error" | "unavailable" | "not_run";
5
- export interface VercelEvidenceResult {
6
- status: VercelEvidenceStatus;
7
- previewUrl: string | null;
8
- deploymentUrl: string | null;
9
- summary: string | null;
10
- observedAt: string | null;
11
- /** True when Vercel API lookup was not run (GitHub-only or missing token). */
12
- inspectSkipped: boolean;
13
- inspectReason: string | null;
14
- githubState: GitHubStatusState | null;
15
- vercelContext: string | null;
16
- }
17
- /** @deprecated Renamed — use VercelDeploymentLookupResult from vercel-api. */
18
- export type VercelInspectCommandResult = VercelDeploymentLookupResult;
19
- export type RunVercelDeploymentLookup = (target: string) => Promise<VercelDeploymentLookupResult>;
20
- /** @deprecated Renamed — use RunVercelDeploymentLookup. */
21
- export type RunVercelInspect = RunVercelDeploymentLookup;
22
- /**
23
- * Resolve the deployment lookup target. Never returns a vercel.com dashboard page URL.
24
- */
25
- export declare function resolveVercelInspectTarget(rawUrl: string | null | undefined): {
26
- target: string | null;
27
- classified: ClassifiedVercelUrl | null;
28
- reason: string | null;
29
- };
30
- export declare function evidenceFromGitHubVercelStatus(statuses: GitHubCommitStatusRow[] | null | undefined, options?: {
31
- observedAt?: string;
32
- }): VercelEvidenceResult;
33
- export interface CollectVercelEvidenceInput {
34
- statuses?: GitHubCommitStatusRow[] | null;
35
- /** When false, never call Vercel REST API (GitHub status only). Default path. */
36
- allowInspect?: boolean;
37
- /** @deprecated waitSeconds was for CLI inspect; ignored for API lookup. */
38
- waitSeconds?: number;
39
- runInspect?: RunVercelDeploymentLookup;
40
- observedAt?: string;
41
- }
42
- /**
43
- * Prefer GitHub Vercel StatusContext.state for gates. Call Vercel REST API only when
44
- * inspectable (deployment host or id), GitHub state is not terminal success, and
45
- * `allowInspect` is true with VERCEL_TOKEN configured.
46
- */
47
- export declare function collectVercelEvidence(input: CollectVercelEvidenceInput): Promise<VercelEvidenceResult>;
48
- export type { GitHubVercelStatusContext };
@@ -1,19 +0,0 @@
1
- export type GitHubStatusState = "success" | "pending" | "failure" | "error" | "unknown";
2
- export interface GitHubCommitStatusRow {
3
- context?: string | null;
4
- state?: string | null;
5
- target_url?: string | null;
6
- description?: string | null;
7
- }
8
- export interface GitHubVercelStatusContext {
9
- context: string;
10
- state: GitHubStatusState;
11
- targetUrl: string | null;
12
- description: string | null;
13
- deploymentId: string | null;
14
- previewUrl: string | null;
15
- dashboardUrl: string | null;
16
- }
17
- export declare function normalizeGitHubStatusState(state: unknown): GitHubStatusState;
18
- export declare function isVercelStatusContext(context: unknown): boolean;
19
- export declare function pickVercelStatusContext(statuses: GitHubCommitStatusRow[] | null | undefined): GitHubVercelStatusContext | null;
@@ -1,18 +0,0 @@
1
- export type VercelUrlKind = "deployment_host" | "dashboard" | "deployment_id" | "unknown";
2
- export interface ClassifiedVercelUrl {
3
- kind: VercelUrlKind;
4
- /** Original URL when it is a usable preview/deployment host. */
5
- previewUrl: string | null;
6
- /** Deployment id or host URL suitable for Vercel REST API lookup — never a dashboard page URL. */
7
- inspectTarget: string | null;
8
- /** Deployment id extracted from dashboard paths when present. */
9
- deploymentId: string | null;
10
- }
11
- /** True when the string is safe for Vercel REST API deployment lookup (never a dashboard page URL). */
12
- export declare function isInspectableVercelTarget(target: string): boolean;
13
- /**
14
- * Classify a Vercel-related URL from GitHub commit status target_url.
15
- * Vercel REST API accepts deployment ids and `*.vercel.app` hosts — not vercel.com dashboard links.
16
- */
17
- export declare function classifyVercelUrl(raw: string): ClassifiedVercelUrl;
18
- export declare function isDashboardVercelUrl(raw: string): boolean;
@@ -1,2 +0,0 @@
1
- /** Instruction block appended to verify_live harness dispatch tasks. */
2
- export declare function formatVerifyLiveCompletionContract(): string;
@@ -1,29 +0,0 @@
1
- import type { KynverUserConfig } from "./config.js";
2
- export type WorkerCapSource = "workspace_override" | "env" | "config" | "auto";
3
- export interface ResolvedWorkerCap {
4
- configuredMaxWorkers: number | null;
5
- autoCap: number;
6
- workerCapSource: WorkerCapSource;
7
- }
8
- export declare function resolveWorkerCap(input: {
9
- config?: KynverUserConfig;
10
- configuredMaxWorkersOverride?: number | null;
11
- totalMemBytes: number;
12
- env?: NodeJS.ProcessEnv;
13
- }): ResolvedWorkerCap;
14
- export interface SetupWorkerCapRecommendation {
15
- totalMemBytes: number;
16
- autoCap: number;
17
- recommendedMaxWorkers: number;
18
- diskPath: string;
19
- diskGateOk: boolean;
20
- diskFreeBytes: number | null;
21
- }
22
- /** RAM/disk-aware default for `kynver setup` when the operator omits --max-workers. */
23
- export declare function recommendSetupWorkerCap(input?: {
24
- totalMemBytes?: number;
25
- diskPath?: string;
26
- diskGateOk?: boolean;
27
- diskFreeBytes?: number | null;
28
- config?: KynverUserConfig;
29
- }): SetupWorkerCapRecommendation;