@kynver-app/runtime 0.2.24 → 0.2.29
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.
- package/dist/chat/command-auth-proof.js +1 -1
- package/dist/cli.js +69 -68
- package/dist/index.js +89 -88
- package/dist/instruction-bundle/contract.js +2 -2
- package/dist/local-run-store/index.js +6 -6
- package/dist/server/adapter-contract.js +1 -1
- package/dist/server/cleanup.js +9 -9
- package/dist/server/db-credentials.js +2 -2
- package/dist/server/default-repo.js +1 -1
- package/dist/server/heavy-verification.js +1 -1
- package/dist/server/memory-cost-enforce.js +2 -2
- package/dist/server/memory-cost.js +2 -2
- package/dist/server/model-routing.js +3 -3
- package/dist/server/monitor.js +5 -5
- package/dist/server/orchestration.js +1 -1
- package/dist/server/worker-policy.js +2 -2
- package/package.json +4 -2
- package/dist/active-harness-workers.d.ts +0 -11
- package/dist/auto-complete.d.ts +0 -60
- package/dist/bootstrap.d.ts +0 -49
- package/dist/bounded-build/admission.d.ts +0 -30
- package/dist/bounded-build/constants.d.ts +0 -10
- package/dist/bounded-build/exec.d.ts +0 -35
- package/dist/bounded-build/index.d.ts +0 -6
- package/dist/bounded-build/meminfo.d.ts +0 -5
- package/dist/bounded-build/node-options.d.ts +0 -9
- package/dist/bounded-build/systemd-wrap.d.ts +0 -17
- package/dist/box-identity.d.ts +0 -19
- package/dist/box-resource-snapshot-shared.d.ts +0 -13
- package/dist/box-resource-snapshot.d.ts +0 -45
- package/dist/box-worker-cap.d.ts +0 -9
- package/dist/byoc/context-hydration.d.ts +0 -54
- package/dist/byoc/execution-proof.d.ts +0 -46
- package/dist/byoc/index.d.ts +0 -5
- package/dist/byoc/job-envelope.d.ts +0 -39
- package/dist/byoc/m6-golden-path.d.ts +0 -86
- package/dist/byoc/mcp-tool-proof.d.ts +0 -42
- package/dist/callback-headers.d.ts +0 -2
- package/dist/callbacks.d.ts +0 -74
- package/dist/chat/anthropic-credentials.d.ts +0 -11
- package/dist/chat/anthropic-stream.d.ts +0 -43
- package/dist/chat/chat-claim-loop.d.ts +0 -41
- package/dist/chat/chat-primary-cli.d.ts +0 -2
- package/dist/chat/command-allowlist.d.ts +0 -8
- package/dist/chat/command-auth-proof.d.ts +0 -67
- package/dist/chat/command-executor.d.ts +0 -18
- package/dist/chat/delta-batcher.d.ts +0 -13
- package/dist/cleanup-active-worktrees.d.ts +0 -14
- package/dist/cleanup-build-cache-paths.d.ts +0 -5
- package/dist/cleanup-cli.d.ts +0 -1
- package/dist/cleanup-completion-blocker.d.ts +0 -10
- package/dist/cleanup-dependency-scan.d.ts +0 -13
- package/dist/cleanup-dir-size.d.ts +0 -5
- package/dist/cleanup-disk-pressure.d.ts +0 -15
- package/dist/cleanup-duplicate-worktrees.d.ts +0 -8
- package/dist/cleanup-evidence.d.ts +0 -10
- package/dist/cleanup-execute.d.ts +0 -7
- package/dist/cleanup-git-probe.d.ts +0 -5
- package/dist/cleanup-git-rev-cache.d.ts +0 -5
- package/dist/cleanup-git-status-cache.d.ts +0 -5
- package/dist/cleanup-guards-helpers.d.ts +0 -2
- package/dist/cleanup-guards.d.ts +0 -53
- package/dist/cleanup-harness-path-validate.d.ts +0 -5
- package/dist/cleanup-harness-roots.d.ts +0 -6
- package/dist/cleanup-index-status.d.ts +0 -16
- package/dist/cleanup-orphan-safety.d.ts +0 -17
- package/dist/cleanup-path-ownership.d.ts +0 -9
- package/dist/cleanup-privileged-remove.d.ts +0 -13
- package/dist/cleanup-progress.d.ts +0 -2
- package/dist/cleanup-remove-path.d.ts +0 -17
- package/dist/cleanup-retention-config.d.ts +0 -26
- package/dist/cleanup-run-directory.d.ts +0 -20
- package/dist/cleanup-run-liveness.d.ts +0 -21
- package/dist/cleanup-run-terminal-cache.d.ts +0 -6
- package/dist/cleanup-salvage-evidence.d.ts +0 -33
- package/dist/cleanup-scan.d.ts +0 -15
- package/dist/cleanup-summary.d.ts +0 -29
- package/dist/cleanup-types.d.ts +0 -154
- package/dist/cleanup-worker-harness-live.d.ts +0 -9
- package/dist/cleanup-worktree-index.d.ts +0 -18
- package/dist/cleanup-worktree-salvage.d.ts +0 -7
- package/dist/cleanup.d.ts +0 -5
- package/dist/cli-output/worker-start-stdout.d.ts +0 -11
- package/dist/cli.d.ts +0 -14
- package/dist/command-center-contract-cli.d.ts +0 -1
- package/dist/completion-ack.d.ts +0 -18
- package/dist/completion-replay.d.ts +0 -10
- package/dist/completion-response.d.ts +0 -15
- package/dist/config.d.ts +0 -122
- package/dist/context-budget-receipt.d.ts +0 -96
- package/dist/context-preview/chat-memory-preview.d.ts +0 -33
- package/dist/cron/cron-cli-bin.d.ts +0 -7
- package/dist/cron/cron-env-file.d.ts +0 -22
- package/dist/cron/cron-env.d.ts +0 -21
- package/dist/cron/cron-fire.d.ts +0 -8
- package/dist/cron/cron-id.d.ts +0 -3
- package/dist/cron/cron-install-api.d.ts +0 -27
- package/dist/cron/cron-install-cli.d.ts +0 -2
- package/dist/cron/cron-install-plan.d.ts +0 -34
- package/dist/cron/cron-install-secrets.d.ts +0 -6
- package/dist/cron/cron-install-systemd.d.ts +0 -18
- package/dist/cron/cron-install-verify.d.ts +0 -15
- package/dist/cron/cron-install.d.ts +0 -51
- package/dist/cron/cron-lock.d.ts +0 -9
- package/dist/cron/cron-match.d.ts +0 -8
- package/dist/cron/cron-readiness.d.ts +0 -35
- package/dist/cron/cron-status.d.ts +0 -10
- package/dist/cron/cron-store.d.ts +0 -8
- package/dist/cron/cron-tick-cli.d.ts +0 -2
- package/dist/cron/cron-tick-state.d.ts +0 -5
- package/dist/cron/cron-tick.d.ts +0 -19
- package/dist/cron/cron-types.d.ts +0 -53
- package/dist/cron/hermes-provider-notice.d.ts +0 -1
- package/dist/daemon-box-identity.d.ts +0 -16
- package/dist/daemon-heartbeat.d.ts +0 -30
- package/dist/daemon-keeper.d.ts +0 -53
- package/dist/daemon-platform-guard.d.ts +0 -2
- package/dist/daemon-supervision/host.d.ts +0 -4
- package/dist/daemon-supervision/index.d.ts +0 -6
- package/dist/daemon-supervision/policy.d.ts +0 -16
- package/dist/daemon-supervision/setup.d.ts +0 -23
- package/dist/daemon-supervision/start.d.ts +0 -26
- package/dist/daemon-supervision/supervision-health.d.ts +0 -20
- package/dist/daemon-supervision/verify.d.ts +0 -13
- package/dist/daemon.d.ts +0 -5
- package/dist/db-credential-env-paths.d.ts +0 -13
- package/dist/db-credential-resolver.d.ts +0 -38
- package/dist/db-url-hint.d.ts +0 -4
- package/dist/default-repo-cli.d.ts +0 -20
- package/dist/default-repo-discovery.d.ts +0 -25
- package/dist/default-repo.d.ts +0 -32
- package/dist/device-login.d.ts +0 -8
- package/dist/discard-disposable.d.ts +0 -6
- package/dist/disk-gate.d.ts +0 -25
- package/dist/dispatch-callback-timeout.d.ts +0 -1
- package/dist/dispatch-claim-release.d.ts +0 -23
- package/dist/dispatch-lane-normalization.d.ts +0 -14
- package/dist/dispatch-model-guard.d.ts +0 -26
- package/dist/dispatch-progress.d.ts +0 -3
- package/dist/dispatch-resource-gate.d.ts +0 -20
- package/dist/dispatch-start-abort.d.ts +0 -3
- package/dist/dispatch-start-readback.d.ts +0 -27
- package/dist/dispatch.d.ts +0 -24
- package/dist/disposable-artifacts.d.ts +0 -2
- package/dist/doctor/context-envelope-cli.d.ts +0 -1
- package/dist/doctor/context-envelope.d.ts +0 -13
- package/dist/doctor/context-envelope.probes.d.ts +0 -25
- package/dist/doctor/context-envelope.types.d.ts +0 -42
- package/dist/doctor/doctor.types.d.ts +0 -50
- package/dist/doctor/github-readiness.d.ts +0 -16
- package/dist/doctor/index.d.ts +0 -7
- package/dist/doctor/local-store-cli.d.ts +0 -11
- package/dist/doctor/local-store.d.ts +0 -35
- package/dist/doctor/node-runtime-cli.d.ts +0 -6
- package/dist/doctor/node-runtime.d.ts +0 -19
- package/dist/doctor/runner-install-cli.d.ts +0 -1
- package/dist/doctor/runner-install.d.ts +0 -86
- package/dist/doctor/runtime-takeover-cli.d.ts +0 -1
- package/dist/doctor/runtime-takeover-daemon-supervision.d.ts +0 -3
- package/dist/doctor/runtime-takeover-deploy-evidence.d.ts +0 -13
- package/dist/doctor/runtime-takeover-scheduler.d.ts +0 -29
- package/dist/doctor/runtime-takeover.d.ts +0 -3
- package/dist/doctor/runtime-takeover.probes.d.ts +0 -45
- package/dist/executor-ref-routing.d.ts +0 -14
- package/dist/exit-classify.d.ts +0 -12
- package/dist/exited-salvage.d.ts +0 -22
- package/dist/exited-worker-handoff-capture.d.ts +0 -19
- package/dist/factory-status/collect.d.ts +0 -12
- package/dist/factory-status/lightweight.d.ts +0 -5
- package/dist/factory-status/render.d.ts +0 -5
- package/dist/factory-status/types.d.ts +0 -46
- package/dist/factory-status-cli.d.ts +0 -1
- package/dist/factory-steer-delivery.d.ts +0 -7
- package/dist/finalize.d.ts +0 -25
- package/dist/fortress-engagement-gate.d.ts +0 -5
- package/dist/git.d.ts +0 -37
- package/dist/github-repo.d.ts +0 -5
- package/dist/harness-expert-review.d.ts +0 -12
- package/dist/harness-lease-owner.d.ts +0 -13
- package/dist/harness-notice/harness-notice.auto-complete.d.ts +0 -3
- package/dist/harness-notice/harness-notice.monitor-tick.d.ts +0 -6
- package/dist/harness-notice/harness-notice.parse.d.ts +0 -3
- package/dist/harness-notice/harness-notice.tool-response.d.ts +0 -3
- package/dist/harness-notice/harness-notice.types.d.ts +0 -17
- package/dist/harness-notice/harness-notice.worker-complete.d.ts +0 -3
- package/dist/harness-notice/harness-notice.worker-start.d.ts +0 -7
- package/dist/harness-notice/harness-notice.worker-status.d.ts +0 -2
- package/dist/harness-notice/index.d.ts +0 -8
- package/dist/harness-repair-target.d.ts +0 -23
- package/dist/harness-storage-snapshot.d.ts +0 -26
- package/dist/harness-verify-cli.d.ts +0 -1
- package/dist/harness-verify.d.ts +0 -30
- package/dist/harness-worker-active.d.ts +0 -12
- package/dist/harness-worktree-build-guard.d.ts +0 -12
- package/dist/heartbeat-final-result.d.ts +0 -5
- package/dist/heartbeat.d.ts +0 -27
- package/dist/heavy-verification/command-classify.d.ts +0 -9
- package/dist/heavy-verification/gate.d.ts +0 -10
- package/dist/heavy-verification/index.d.ts +0 -5
- package/dist/heavy-verification/paths.d.ts +0 -3
- package/dist/heavy-verification/slot.d.ts +0 -49
- package/dist/heavy-verification/worker-command-gate.d.ts +0 -23
- package/dist/index.d.ts +0 -88
- package/dist/installed-package-versions.d.ts +0 -8
- package/dist/instruction-bundle/cache.d.ts +0 -6
- package/dist/instruction-bundle/client.d.ts +0 -25
- package/dist/instruction-bundle/contract.d.ts +0 -4
- package/dist/instruction-bundle/embedded-bundle.d.ts +0 -3
- package/dist/instruction-bundle/index.d.ts +0 -7
- package/dist/instruction-bundle/keys.d.ts +0 -14
- package/dist/instruction-bundle/state.d.ts +0 -24
- package/dist/instruction-bundle/types.d.ts +0 -42
- package/dist/instruction-bundle/verify.d.ts +0 -15
- package/dist/landing/cli-auth.d.ts +0 -11
- package/dist/landing/land-pr-check-classify.d.ts +0 -17
- package/dist/landing/land-pr-completion-post.d.ts +0 -12
- package/dist/landing/land-pr.d.ts +0 -28
- package/dist/landing-contract-gate.d.ts +0 -27
- package/dist/landing-contract-pr-classify.d.ts +0 -4
- package/dist/landing-gate.d.ts +0 -24
- package/dist/lane/landing-maintainer-local.d.ts +0 -15
- package/dist/lane/landing-maintainer-tick.d.ts +0 -16
- package/dist/lane/lane-spec.d.ts +0 -8
- package/dist/lane/lane-tick-cli.d.ts +0 -1
- package/dist/lease-renewal.d.ts +0 -15
- package/dist/local-pr-attention-reconcile.d.ts +0 -25
- package/dist/local-run-store/admission-enforce.d.ts +0 -38
- package/dist/local-run-store/admission-shadow.d.ts +0 -56
- package/dist/local-run-store/dispatch-claim-recovery-startup.d.ts +0 -11
- package/dist/local-run-store/dispatch-claim-recovery.d.ts +0 -54
- package/dist/local-run-store/dispatch-receipts.d.ts +0 -90
- package/dist/local-run-store/index.d.ts +0 -15
- package/dist/local-run-store/local-run-store.d.ts +0 -106
- package/dist/local-run-store/remote-surface-flags.d.ts +0 -15
- package/dist/local-run-store/small-surfaces.d.ts +0 -37
- package/dist/local-run-store/sqlite/sqlite-filesystem-policy.d.ts +0 -16
- package/dist/local-run-store/sqlite/sqlite-local-run-store.d.ts +0 -68
- package/dist/local-run-store/sqlite/sqlite-recovery.d.ts +0 -14
- package/dist/local-run-store/sqlite/sqlite-schema.d.ts +0 -13
- package/dist/local-run-store/store-lifecycle.d.ts +0 -38
- package/dist/local-run-store/surface-flags.d.ts +0 -47
- package/dist/local-run-store/tick-posture.d.ts +0 -27
- package/dist/material-worktree-changes.d.ts +0 -2
- package/dist/memory-cost-package-version-guard-enforce.d.ts +0 -10
- package/dist/memory-cost-package-version-guard.d.ts +0 -49
- package/dist/mesh-liveness/mesh-cron-lease-store.d.ts +0 -9
- package/dist/model-routing-task-enrich.d.ts +0 -8
- package/dist/model-routing.d.ts +0 -49
- package/dist/monitor/index.d.ts +0 -7
- package/dist/monitor/monitor-cli.d.ts +0 -9
- package/dist/monitor/monitor-loop.d.ts +0 -1
- package/dist/monitor/monitor-spawn.d.ts +0 -18
- package/dist/monitor/monitor.classify.d.ts +0 -15
- package/dist/monitor/monitor.service.d.ts +0 -17
- package/dist/monitor/monitor.store.d.ts +0 -6
- package/dist/monitor/monitor.task-lease.d.ts +0 -11
- package/dist/monitor/monitor.terminal.d.ts +0 -11
- package/dist/monitor/monitor.types.d.ts +0 -77
- package/dist/node-runtime-policy.d.ts +0 -25
- package/dist/orchestration-enforcement/config.d.ts +0 -5
- package/dist/orchestration-enforcement/evaluator.d.ts +0 -6
- package/dist/orchestration-enforcement/idempotency.d.ts +0 -8
- package/dist/orchestration-enforcement/index.d.ts +0 -4
- package/dist/orchestration-enforcement/types.d.ts +0 -24
- package/dist/orchestration-providers/adapter-contract.d.ts +0 -50
- package/dist/orchestration-providers/audit.d.ts +0 -3
- package/dist/orchestration-providers/capabilities.d.ts +0 -3
- package/dist/orchestration-providers/claude-oauth-binding.d.ts +0 -6
- package/dist/orchestration-providers/codex-oauth-binding.d.ts +0 -5
- package/dist/orchestration-providers/codex-orchestration-adapter.d.ts +0 -13
- package/dist/orchestration-providers/cost-router.d.ts +0 -24
- package/dist/orchestration-providers/cursor-oauth-binding.d.ts +0 -5
- package/dist/orchestration-providers/hermes-cli-adapter.d.ts +0 -15
- package/dist/orchestration-providers/hermes-openai-codex-binding.d.ts +0 -15
- package/dist/orchestration-providers/index.d.ts +0 -14
- package/dist/orchestration-providers/inventory.d.ts +0 -54
- package/dist/orchestration-providers/oauth-binding-utils.d.ts +0 -22
- package/dist/orchestration-providers/routing.d.ts +0 -16
- package/dist/orchestration-providers/types.d.ts +0 -45
- package/dist/package-version.d.ts +0 -5
- package/dist/path-values.d.ts +0 -5
- package/dist/paths.d.ts +0 -16
- package/dist/pipeline-dispatch.d.ts +0 -8
- package/dist/pipeline-exact-targets.d.ts +0 -2
- package/dist/pipeline-max-starts.d.ts +0 -26
- package/dist/pipeline-tick.d.ts +0 -50
- package/dist/plan-persist/agentos-api.d.ts +0 -28
- package/dist/plan-persist/body-hash.d.ts +0 -3
- package/dist/plan-persist/drain.d.ts +0 -7
- package/dist/plan-persist/errors.d.ts +0 -9
- package/dist/plan-persist/handoff.d.ts +0 -7
- package/dist/plan-persist/idempotency.d.ts +0 -2
- package/dist/plan-persist/index.d.ts +0 -8
- package/dist/plan-persist/outbox-durability.d.ts +0 -31
- package/dist/plan-persist/outbox-store.d.ts +0 -36
- package/dist/plan-persist/paths.d.ts +0 -8
- package/dist/plan-persist/persist.d.ts +0 -10
- package/dist/plan-persist/readback.d.ts +0 -17
- package/dist/plan-persist/types.d.ts +0 -95
- package/dist/plan-persist-cli.d.ts +0 -3
- package/dist/plan-progress-daemon-sync.d.ts +0 -7
- package/dist/plan-progress-sync.d.ts +0 -21
- package/dist/plan-progress.d.ts +0 -10
- package/dist/post-restart-unblock.d.ts +0 -24
- package/dist/pr-handoff/index.d.ts +0 -6
- package/dist/pr-handoff/pr-handoff-assess.d.ts +0 -44
- package/dist/pr-handoff/pr-handoff-dedupe.d.ts +0 -18
- package/dist/pr-handoff/pr-handoff-gh.d.ts +0 -52
- package/dist/pr-handoff/pr-handoff-supersede.d.ts +0 -17
- package/dist/pr-handoff/pr-handoff.d.ts +0 -8
- package/dist/pr-handoff/pr-handoff.types.d.ts +0 -45
- package/dist/pr-handoff/same-head-pr-guard.d.ts +0 -10
- package/dist/prompt.d.ts +0 -56
- package/dist/provider-evidence/collect.d.ts +0 -31
- package/dist/provider-evidence/exec.d.ts +0 -5
- package/dist/provider-evidence/index.d.ts +0 -7
- package/dist/provider-evidence/recipes-github.d.ts +0 -5
- package/dist/provider-evidence/recipes-vercel.d.ts +0 -2
- package/dist/provider-evidence/registry.d.ts +0 -6
- package/dist/provider-evidence/shared-cache.d.ts +0 -8
- package/dist/provider-evidence/types.d.ts +0 -48
- package/dist/provider-evidence/wanted-store.d.ts +0 -13
- package/dist/provider-quota-preflight.d.ts +0 -38
- package/dist/providers/claude.d.ts +0 -8
- package/dist/providers/codex.d.ts +0 -14
- package/dist/providers/cursor-windows.d.ts +0 -7
- package/dist/providers/cursor.d.ts +0 -13
- package/dist/providers/hermes-codex.d.ts +0 -12
- package/dist/providers/model-preflight.d.ts +0 -41
- package/dist/providers/openai-codex-resilience.d.ts +0 -33
- package/dist/providers/openai-compatible-response.d.ts +0 -23
- package/dist/providers/openai-compatible-runner.d.ts +0 -1
- package/dist/providers/openai-compatible.d.ts +0 -46
- package/dist/providers/registry.d.ts +0 -4
- package/dist/providers/types.d.ts +0 -36
- package/dist/redact.d.ts +0 -1
- package/dist/repair-target-worktree.d.ts +0 -4
- package/dist/repo-search.d.ts +0 -53
- package/dist/resource-gate.d.ts +0 -74
- package/dist/retry-limits.d.ts +0 -12
- package/dist/review-head-reconcile.d.ts +0 -17
- package/dist/run-list.d.ts +0 -38
- package/dist/run-metadata-retention.d.ts +0 -38
- package/dist/run-resolve.d.ts +0 -4
- package/dist/run-store.d.ts +0 -38
- package/dist/run-worker-index.d.ts +0 -10
- package/dist/runner-boundary/index.d.ts +0 -6
- package/dist/runner-boundary/runner-boundary.dispatch-guard.d.ts +0 -4
- package/dist/runner-boundary/runner-boundary.forge-legacy-migration.d.ts +0 -23
- package/dist/runner-boundary/runner-boundary.harness-root.d.ts +0 -17
- package/dist/runner-boundary/runner-boundary.resolve.d.ts +0 -4
- package/dist/runner-boundary/runner-boundary.run-guard.d.ts +0 -12
- package/dist/runner-boundary/runner-boundary.types.d.ts +0 -31
- package/dist/runner-config-backfill.d.ts +0 -18
- package/dist/runner-identity.d.ts +0 -21
- package/dist/runtime-identity.d.ts +0 -9
- package/dist/runtime-memory-envelope.d.ts +0 -16
- package/dist/scheduler-cutover-cli.d.ts +0 -2
- package/dist/scheduler-cutover.d.ts +0 -25
- package/dist/security-review-environment.d.ts +0 -27
- package/dist/server/adapter-contract.d.ts +0 -1
- package/dist/server/cleanup.d.ts +0 -3
- package/dist/server/context-budget-receipt.d.ts +0 -2
- package/dist/server/db-credentials.d.ts +0 -1
- package/dist/server/default-repo.d.ts +0 -1
- package/dist/server/harness-notice.d.ts +0 -2
- package/dist/server/heavy-verification.d.ts +0 -3
- package/dist/server/landing.d.ts +0 -1
- package/dist/server/memory-cost-enforce.d.ts +0 -1
- package/dist/server/memory-cost.d.ts +0 -1
- package/dist/server/model-routing.d.ts +0 -3
- package/dist/server/monitor.d.ts +0 -3
- package/dist/server/node-runtime-policy.d.ts +0 -1
- package/dist/server/orchestration.d.ts +0 -10
- package/dist/server/pr-evidence.d.ts +0 -2
- package/dist/server/prompt.d.ts +0 -1
- package/dist/server/repo-search.d.ts +0 -1
- package/dist/server/worker-policy.d.ts +0 -6
- package/dist/server/wsl-crash-dumps.d.ts +0 -2
- package/dist/shell-command-outcome.d.ts +0 -32
- package/dist/sidecar-cli.d.ts +0 -16
- package/dist/stale-reconcile.d.ts +0 -31
- package/dist/start-box-identity.d.ts +0 -12
- package/dist/start.d.ts +0 -13
- package/dist/status.d.ts +0 -262
- package/dist/stream.d.ts +0 -33
- package/dist/supervisor.d.ts +0 -40
- package/dist/sweep.d.ts +0 -1
- package/dist/util.d.ts +0 -35
- package/dist/validate.d.ts +0 -15
- package/dist/vercel/index.d.ts +0 -4
- package/dist/vercel/vercel-api.d.ts +0 -17
- package/dist/vercel/vercel-evidence.d.ts +0 -48
- package/dist/vercel/vercel-github-status.d.ts +0 -19
- package/dist/vercel/vercel-url.d.ts +0 -18
- package/dist/verify-live/verify-live-prompt.d.ts +0 -2
- package/dist/worker-cap-source.d.ts +0 -29
- package/dist/worker-env.d.ts +0 -52
- package/dist/worker-execution-mode.d.ts +0 -5
- package/dist/worker-final-result-embed.d.ts +0 -1
- package/dist/worker-lease-sync.d.ts +0 -15
- package/dist/worker-lifecycle.d.ts +0 -28
- package/dist/worker-metadata-paths.d.ts +0 -26
- package/dist/worker-metadata-reconcile.d.ts +0 -21
- package/dist/worker-ops.d.ts +0 -45
- package/dist/worker-persona-catalog.d.ts +0 -29
- package/dist/worker-provider-policy.d.ts +0 -43
- package/dist/worker-usage.d.ts +0 -20
- package/dist/workspace-runtime-config.d.ts +0 -10
- package/dist/worktree-base-ref.d.ts +0 -34
- package/dist/worktree-completion-handoff.d.ts +0 -17
- package/dist/worktree.d.ts +0 -44
- package/dist/wsl-crash-dumps-cleanup.d.ts +0 -31
- package/dist/wsl-crash-dumps-cli.d.ts +0 -1
- package/dist/wsl-crash-dumps.d.ts +0 -90
- package/dist/wsl-host.d.ts +0 -71
package/dist/landing-gate.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { GitAncestry } from "./git.js";
|
|
2
|
-
export type WorkerLandingBlockReason = "dirty_worktree_no_pr";
|
|
3
|
-
export interface WorkerLandingSnapshot {
|
|
4
|
-
finalResult: unknown;
|
|
5
|
-
changedFiles: string[];
|
|
6
|
-
headCommit?: string | null;
|
|
7
|
-
prUrl?: string | null;
|
|
8
|
-
artifactBundlePath?: string | null;
|
|
9
|
-
patchPath?: string | null;
|
|
10
|
-
gitAncestry?: GitAncestry | null;
|
|
11
|
-
}
|
|
12
|
-
export interface WorkerLandingVerdict {
|
|
13
|
-
/** When true, do not treat the worker as cleanly landed/done. */
|
|
14
|
-
blocked: boolean;
|
|
15
|
-
reason?: WorkerLandingBlockReason;
|
|
16
|
-
/** Human-readable attention reason for boards and completion payloads. */
|
|
17
|
-
detail?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Hard landing gate: a recorded final result is not sufficient when the worker
|
|
21
|
-
* left uncommitted code and has no commit/PR/patch/bundle landing path.
|
|
22
|
-
*/
|
|
23
|
-
export declare function assessWorkerLanding(snapshot: WorkerLandingSnapshot): WorkerLandingVerdict;
|
|
24
|
-
export declare function landingAttentionReason(verdict: WorkerLandingVerdict): string | undefined;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface LandingMaintainerLocalAction {
|
|
2
|
-
kind: "land_pr" | "skip" | "noop" | "repair_dispatch_hint";
|
|
3
|
-
prNumber?: number;
|
|
4
|
-
prUrl?: string;
|
|
5
|
-
reason: string;
|
|
6
|
-
}
|
|
7
|
-
export interface LandingMaintainerLocalOutcome {
|
|
8
|
-
action: LandingMaintainerLocalAction;
|
|
9
|
-
executed: boolean;
|
|
10
|
-
exitCode: number | null;
|
|
11
|
-
stdout: string;
|
|
12
|
-
stderr: string;
|
|
13
|
-
}
|
|
14
|
-
export declare function runLandingWrapper(prNumber: number, repoRoot: string, execute: boolean): LandingMaintainerLocalOutcome;
|
|
15
|
-
export declare function resolveLandingMaintainerRepoRoot(args: Record<string, string | boolean>): string;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface LandingMaintainerTickResult {
|
|
2
|
-
repo: string;
|
|
3
|
-
fleet: boolean;
|
|
4
|
-
execute: boolean;
|
|
5
|
-
coordinator: unknown;
|
|
6
|
-
localOutcomes: Array<{
|
|
7
|
-
action: {
|
|
8
|
-
kind: string;
|
|
9
|
-
prNumber?: number;
|
|
10
|
-
reason: string;
|
|
11
|
-
};
|
|
12
|
-
executed: boolean;
|
|
13
|
-
exitCode: number | null;
|
|
14
|
-
}>;
|
|
15
|
-
}
|
|
16
|
-
export declare function runLandingMaintainerLaneTick(args: Record<string, string | boolean>): Promise<LandingMaintainerTickResult>;
|
package/dist/lane/lane-spec.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/** Runtime mirror of server landing-maintainer lane policy. */
|
|
2
|
-
export declare const LANDING_MAINTAINER_LANE_SPEC: {
|
|
3
|
-
readonly slug: "landing-maintainer";
|
|
4
|
-
readonly originCron: "maintain-8-blocker-and-pr-landing-workers";
|
|
5
|
-
readonly defaultRepo: "Totalsolutionsync/Kynver";
|
|
6
|
-
readonly landScript: "scripts/agent-os-land-pr.mjs";
|
|
7
|
-
readonly landScriptArgs: readonly ["--skip-not-ready"];
|
|
8
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runLaneTickCli(args: Record<string, string | boolean>, laneFromArgv?: string): Promise<void>;
|
package/dist/lease-renewal.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface RenewActiveLeasesResult {
|
|
2
|
-
renewed: string[];
|
|
3
|
-
failed: Array<{
|
|
4
|
-
worker: string;
|
|
5
|
-
reason: string;
|
|
6
|
-
}>;
|
|
7
|
-
skipped: string[];
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Renew leases for board-linked workers whose process is still alive.
|
|
11
|
-
* Prevents dispatch/reaper from reclaiming a task while a local worker runs.
|
|
12
|
-
*/
|
|
13
|
-
export declare function renewActiveTaskLeases(runId: string, args: Record<string, string | boolean>): Promise<RenewActiveLeasesResult>;
|
|
14
|
-
/** True when this run already has a live worker bound to the same board task. */
|
|
15
|
-
export declare function hasLiveWorkerForTask(runId: string, taskId: string): boolean;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export interface LocalPrAttentionReconcileOutcome {
|
|
2
|
-
runId: string;
|
|
3
|
-
worker: string;
|
|
4
|
-
action: "marked_done" | "skipped";
|
|
5
|
-
reason: string;
|
|
6
|
-
prUrl?: string;
|
|
7
|
-
mergeCommit?: string | null;
|
|
8
|
-
}
|
|
9
|
-
export interface LocalPrAttentionReconcileResult {
|
|
10
|
-
workers: LocalPrAttentionReconcileOutcome[];
|
|
11
|
-
}
|
|
12
|
-
interface PrLookupResult {
|
|
13
|
-
prUrl: string;
|
|
14
|
-
state: string;
|
|
15
|
-
mergedAt?: string | null;
|
|
16
|
-
mergeCommit?: string | null;
|
|
17
|
-
}
|
|
18
|
-
export interface LocalPrAttentionReconcileOptions {
|
|
19
|
-
lookupPr?: (input: {
|
|
20
|
-
repoDir: string;
|
|
21
|
-
prNumber: number;
|
|
22
|
-
}) => PrLookupResult | null;
|
|
23
|
-
}
|
|
24
|
-
export declare function reconcileLocalOnlyMergedPrAttention(options?: LocalPrAttentionReconcileOptions): LocalPrAttentionReconcileResult;
|
|
25
|
-
export {};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export declare const ADMISSION_SLOT_KEY_PREFIX = "worker-slot-n:";
|
|
2
|
-
export interface AdmissionSlotDecision {
|
|
3
|
-
admitted: boolean;
|
|
4
|
-
/** Set when admitted via a numbered reservation (absent in off/shadow no-op admits). */
|
|
5
|
-
slot?: number;
|
|
6
|
-
reason?: "disk_backstop" | "slots_exhausted";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Pre-spawn admission (enforce only; off/shadow admit unconditionally — the
|
|
10
|
-
* existing gate stays authoritative there). `diskActiveWorkers` MUST be a
|
|
11
|
-
* fresh count taken at call time, not the tick-start gate sample.
|
|
12
|
-
*/
|
|
13
|
-
export declare function acquireWorkerAdmissionSlot(input: {
|
|
14
|
-
runId: string;
|
|
15
|
-
workerName: string;
|
|
16
|
-
maxSlots: number;
|
|
17
|
-
diskActiveWorkers: number;
|
|
18
|
-
}): AdmissionSlotDecision;
|
|
19
|
-
/** Free the numbered slot a worker holds (terminal transition / spawn abort). Never throws. */
|
|
20
|
-
export declare function releaseWorkerAdmissionSlot(runId: string, workerName: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Per-tick numbered-slot reconcile (enforce only; called from the shared
|
|
23
|
-
* admission reconcile): refresh slots whose owner worker is live, release
|
|
24
|
-
* slots whose owner is provably dead, and adopt live workers holding no
|
|
25
|
-
* slot (pre-flip spawns) so the reservation view converges with reality.
|
|
26
|
-
*/
|
|
27
|
-
export declare function reconcileNumberedAdmissionSlots(input: {
|
|
28
|
-
liveWorkers: Array<{
|
|
29
|
-
runId: string;
|
|
30
|
-
workerName: string;
|
|
31
|
-
}>;
|
|
32
|
-
}): {
|
|
33
|
-
refreshed: number;
|
|
34
|
-
deadReleased: number;
|
|
35
|
-
adopted: number;
|
|
36
|
-
};
|
|
37
|
-
export declare function admissionEnforceCounters(): Record<string, number>;
|
|
38
|
-
export declare function __resetAdmissionEnforceCountersForTests(): void;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import type { LocalRunStoreSurfaceMode } from "./surface-flags.js";
|
|
2
|
-
export declare const ADMISSION_RESERVATION_TTL_MS: number;
|
|
3
|
-
/**
|
|
4
|
-
* Re-arm the adoption pass when the surface is observed OFF (re-review
|
|
5
|
-
* finding 2): workers spawned during an off window take no reservations, so
|
|
6
|
-
* the first reconcile after an off→active flag transition must adopt them
|
|
7
|
-
* silently — otherwise an operator toggling the emergency brake poisons the
|
|
8
|
-
* `missingForLive` metric that gates D2b. Called from the tick's off branch
|
|
9
|
-
* (the reconcile itself never runs while off).
|
|
10
|
-
*/
|
|
11
|
-
export declare function rearmAdmissionAdoptionPass(): void;
|
|
12
|
-
export declare function admissionMode(env?: NodeJS.ProcessEnv): LocalRunStoreSurfaceMode;
|
|
13
|
-
/** Take/refresh the reservation for a spawned worker. Never throws. */
|
|
14
|
-
export declare function takeWorkerSlotReservation(runId: string, workerName: string): void;
|
|
15
|
-
/** Release on worker terminal transition. Never throws. */
|
|
16
|
-
export declare function releaseWorkerSlotReservation(runId: string, workerName: string): void;
|
|
17
|
-
export interface AdmissionShadowReconcile {
|
|
18
|
-
liveReservations: number;
|
|
19
|
-
refreshed: number;
|
|
20
|
-
deadReleased: number;
|
|
21
|
-
/** Pre-reconcile: live workers with no reservation (missed takes; 0 on the adoption pass). */
|
|
22
|
-
missingForLive: number;
|
|
23
|
-
/** Pre-reconcile: reservations with no live worker (crash backstop firing OR a missed release). */
|
|
24
|
-
orphaned: number;
|
|
25
|
-
/** True when this call was the silent adoption pass. */
|
|
26
|
-
adoptionPass: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Per-tick reconcile with PRE-reconcile classified measurement (review B —
|
|
30
|
-
* measuring after adoption/release repaired the evidence made the old parity
|
|
31
|
-
* count a tautology; comparing against a minutes-earlier disk sample made it
|
|
32
|
-
* noise). The instrument now compares like-for-like at the same instant,
|
|
33
|
-
* BEFORE repairing anything:
|
|
34
|
-
*
|
|
35
|
-
* - `missingForLive` (counted as divergence, post-adoption-pass): a live
|
|
36
|
-
* worker with no reservation means `takeWorkerSlotReservation` missed —
|
|
37
|
-
* a real lifecycle defect. Reads as: broken take → non-zero every tick.
|
|
38
|
-
* - `orphaned` (reported, folded into `deadSlotsReleased` when released):
|
|
39
|
-
* crash-terminated workers legitimately leave orphans for the reconcile
|
|
40
|
-
* to reap — that is the design's crash backstop, not a defect. A broken
|
|
41
|
-
* COMPLETION-release shows up as `deadSlotsReleased` trending with the
|
|
42
|
-
* completion rate instead of the (rare) crash rate.
|
|
43
|
-
*
|
|
44
|
-
* Then the repair: refresh live slots, adopt missing ones, release dead
|
|
45
|
-
* ones. No cross-time disk-count comparison exists anymore.
|
|
46
|
-
*/
|
|
47
|
-
export declare function reconcileAdmissionShadow(input: {
|
|
48
|
-
/** Live workers by identity (from the same records the gate counts). */
|
|
49
|
-
liveWorkers: Array<{
|
|
50
|
-
runId: string;
|
|
51
|
-
workerName: string;
|
|
52
|
-
}>;
|
|
53
|
-
}): AdmissionShadowReconcile;
|
|
54
|
-
/** Counters snapshot for the operator-tick posture (surface active only). */
|
|
55
|
-
export declare function admissionShadowCounters(): Record<string, number>;
|
|
56
|
-
export declare function __resetAdmissionShadowCountersForTests(): void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type StrandedClaimRecoveryResult } from "./dispatch-claim-recovery.js";
|
|
2
|
-
export declare function __resetStartupClaimRecoveryForTests(): void;
|
|
3
|
-
export declare function maybeRunStartupClaimRecovery(input: {
|
|
4
|
-
agentOsId: string;
|
|
5
|
-
baseUrl: string;
|
|
6
|
-
secret: string;
|
|
7
|
-
hasLiveWorker: (intent: {
|
|
8
|
-
runId: string;
|
|
9
|
-
workerName: string;
|
|
10
|
-
}) => boolean;
|
|
11
|
-
}): Promise<StrandedClaimRecoveryResult | null>;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export interface StrandedClaimRecoveryOutcome {
|
|
2
|
-
taskId: string;
|
|
3
|
-
leaseToken: string;
|
|
4
|
-
runId: string | null;
|
|
5
|
-
workerName: string | null;
|
|
6
|
-
action: "released" | "finalized_late" | "deferred_orphan" | "release_refused" | "deferred_transport" | "skipped";
|
|
7
|
-
detail?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface StrandedClaimRecoveryResult {
|
|
10
|
-
mode: "off" | "shadow" | "enforce";
|
|
11
|
-
scanned: number;
|
|
12
|
-
outcomes: StrandedClaimRecoveryOutcome[];
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Scan /proc for a live process whose cmdline references `pathFragment`.
|
|
16
|
-
* Linux only — on other platforms the probe reports no orphan, so recovery
|
|
17
|
-
* PROCEEDS TO RELEASE after the stall window (review A6: an unfindable
|
|
18
|
-
* orphan can never report anyway — it has no worker record — so the release
|
|
19
|
-
* narrows the pre-existing 1 h expiry window rather than adding risk; prod
|
|
20
|
-
* boxes are Linux). Bounded, never throws.
|
|
21
|
-
*/
|
|
22
|
-
export declare function findLiveProcessByCmdlinePath(pathFragment: string): number | null;
|
|
23
|
-
export interface RecoverStrandedClaimsOptions {
|
|
24
|
-
nowMs?: number;
|
|
25
|
-
strandedAfterMs?: number;
|
|
26
|
-
/** Same liveness delegation as the shadow scan (worker.json + pid). */
|
|
27
|
-
hasLiveWorker: (intent: {
|
|
28
|
-
runId: string;
|
|
29
|
-
workerName: string;
|
|
30
|
-
}) => boolean;
|
|
31
|
-
/** Derive the deterministic worktree path for a claim's spawn intent. */
|
|
32
|
-
worktreePathFor: (intent: {
|
|
33
|
-
runId: string;
|
|
34
|
-
workerName: string;
|
|
35
|
-
}) => string;
|
|
36
|
-
/** Injectable orphan probe (defaults to the /proc cmdline scan). */
|
|
37
|
-
findOrphanPid?: (worktreePath: string) => number | null;
|
|
38
|
-
/**
|
|
39
|
-
* Perform the server release for one stranded claim. MUST present the
|
|
40
|
-
* claim's lease token (§7.7). Returns released=true only on server ack.
|
|
41
|
-
*/
|
|
42
|
-
releaseClaim: (input: {
|
|
43
|
-
taskId: string;
|
|
44
|
-
leaseToken: string;
|
|
45
|
-
runId: string;
|
|
46
|
-
}) => Promise<{
|
|
47
|
-
released: boolean;
|
|
48
|
-
transportError?: boolean;
|
|
49
|
-
detail?: string;
|
|
50
|
-
}>;
|
|
51
|
-
}
|
|
52
|
-
export declare function recoverStrandedDispatchClaims(opts: RecoverStrandedClaimsOptions): Promise<StrandedClaimRecoveryResult>;
|
|
53
|
-
export declare function dispatchClaimRecoveryCounters(): Record<string, number>;
|
|
54
|
-
export declare function __resetDispatchClaimRecoveryForTests(): void;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
import { type LocalRunStoreSurfaceMode } from "./surface-flags.js";
|
|
2
|
-
export interface DispatchReceiptIdentity {
|
|
3
|
-
taskId: string;
|
|
4
|
-
leaseToken: string;
|
|
5
|
-
}
|
|
6
|
-
export interface DispatchClaimIntent extends DispatchReceiptIdentity {
|
|
7
|
-
runId: string;
|
|
8
|
-
workerName: string;
|
|
9
|
-
provider: string | null;
|
|
10
|
-
}
|
|
11
|
-
export declare function dispatchReceiptsMode(env?: NodeJS.ProcessEnv): LocalRunStoreSurfaceMode;
|
|
12
|
-
export declare function recordDispatchClaimReceipt(intent: DispatchClaimIntent): void;
|
|
13
|
-
export declare function recordDispatchSpawnedReceipt(identity: DispatchReceiptIdentity): void;
|
|
14
|
-
export declare function recordDispatchReleasedReceipt(identity: DispatchReceiptIdentity, reasonClass: string): void;
|
|
15
|
-
export declare function recordCompletionSentReceipt(identity: DispatchReceiptIdentity): void;
|
|
16
|
-
export declare function recordCompletionAckedReceipt(identity: DispatchReceiptIdentity, outcome: "acknowledged" | "rejected"): void;
|
|
17
|
-
/**
|
|
18
|
-
* Shadow invariant: the worker record says this completion still needs to be
|
|
19
|
-
* POSTed, but the store already holds a `completion-acked` receipt — the ack
|
|
20
|
-
* was recorded locally and then lost from worker.json (torn ack / replay).
|
|
21
|
-
* Report-only: the POST still happens (server idempotency absorbs it); the
|
|
22
|
-
* divergence is counted so the shadow window can prove how often replays are
|
|
23
|
-
* store-detectable before D1b short-circuits them.
|
|
24
|
-
*/
|
|
25
|
-
export declare function noteCompletionReplayIfAcked(identity: DispatchReceiptIdentity): boolean;
|
|
26
|
-
/** Reason-class extraction for released receipts (never the full detail text). */
|
|
27
|
-
export declare function releaseReasonClass(failureDetail: string | null | undefined): string;
|
|
28
|
-
/**
|
|
29
|
-
* D1b — completion replay short-circuit: in ENFORCE mode a worker replaying a
|
|
30
|
-
* completion whose ack the store already holds (outcome "acknowledged") skips
|
|
31
|
-
* the POST entirely — the local receipt is authoritative for "the server
|
|
32
|
-
* already accepted this". Shadow/off keep today's behavior (POST proceeds,
|
|
33
|
-
* server idempotency absorbs it). The observation counter still fires via
|
|
34
|
-
* `noteCompletionReplayIfAcked` at the call site; this adds the decision.
|
|
35
|
-
*/
|
|
36
|
-
export declare function shouldShortCircuitCompletionReplay(identity: DispatchReceiptIdentity): boolean;
|
|
37
|
-
export declare function recordDispatchStartFailedReceipt(taskId: string, runId: string): void;
|
|
38
|
-
export declare function listRecentDispatchStartFailures(runId: string, opts?: {
|
|
39
|
-
nowMs?: number;
|
|
40
|
-
windowMs?: number;
|
|
41
|
-
}): string[];
|
|
42
|
-
/**
|
|
43
|
-
* Attempt embedded in a lease token (`${attempt}:${uuid}`), or null. D1b R2:
|
|
44
|
-
* completion-ack exclusion must be attempt-aware — a PRIOR attempt's ack must
|
|
45
|
-
* not mask a LATER claim's stranding.
|
|
46
|
-
*/
|
|
47
|
-
export declare function leaseTokenAttempt(token: string): number | null;
|
|
48
|
-
export interface DispatchReceiptInvariantScan {
|
|
49
|
-
scannedClaims: number;
|
|
50
|
-
/** Claim receipts past the stall window with no spawned/released receipt and no live worker. */
|
|
51
|
-
strandedClaimCandidates: number;
|
|
52
|
-
/** Bracketed/aged receipt rows removed this scan (retention). */
|
|
53
|
-
prunedReceipts: number;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Report-only shadow scan (review-N1 hardened): the window is recency-bounded
|
|
57
|
-
* (`recordedAfter`, 7 days) AND self-pruning — bracketed (spawned/released)
|
|
58
|
-
* claim trios older than 24 h are deleted each scan, so old bracketed claims
|
|
59
|
-
* can never pin the window and blind the counter on a busy box.
|
|
60
|
-
*
|
|
61
|
-
* A claim with a LIVE worker is never a candidate — that is the crux case
|
|
62
|
-
* (crash between spawn and the `spawned` receipt), and flagging it would
|
|
63
|
-
* train operators to distrust the counter. A claim whose task already holds a
|
|
64
|
-
* `completion-acked` receipt is never a candidate either (review N4: a
|
|
65
|
-
* crux-crashed claim whose worker went on to finish and report is closed
|
|
66
|
-
* evidence, not a stranding). Liveness is delegated via `hasLiveWorker` so
|
|
67
|
-
* this module stays free of run-store imports.
|
|
68
|
-
*
|
|
69
|
-
* Known false-positive class (documented, closed by D1b's worktree-path
|
|
70
|
-
* probe): a crash between `provider.start` and `saveWorker` leaves a live
|
|
71
|
-
* ORPHAN child with no worker record — the worker.json-based probe cannot see
|
|
72
|
-
* it, so it counts as stranded until the orphan exits.
|
|
73
|
-
*
|
|
74
|
-
* Scope: `spawnClaimed` dispatches only. land_pr dispatches carry no claim
|
|
75
|
-
* receipts (plan D1a item 1); their aborts share `abortClaimedSpawn` and may
|
|
76
|
-
* emit `released` receipts with no matching claim — harmless, the scan
|
|
77
|
-
* iterates claims only.
|
|
78
|
-
*/
|
|
79
|
-
export declare function scanDispatchReceiptInvariants(options?: {
|
|
80
|
-
nowMs?: number;
|
|
81
|
-
strandedAfterMs?: number;
|
|
82
|
-
hasLiveWorker?: (intent: {
|
|
83
|
-
runId: string;
|
|
84
|
-
workerName: string;
|
|
85
|
-
}) => boolean;
|
|
86
|
-
}): DispatchReceiptInvariantScan;
|
|
87
|
-
/** Counters snapshot for the operator-tick posture (report-only). */
|
|
88
|
-
export declare function dispatchReceiptCounters(): Record<string, number>;
|
|
89
|
-
/** Test-only: reset in-memory shadow counters. */
|
|
90
|
-
export declare function __resetDispatchReceiptCountersForTests(): void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type { AdmissionReservation, LocalRunStore, OperationReceiptRecord, ProcessIdentityRecord, RecoveryCheckpointRecord, ReserveOutcome, } from "./local-run-store.js";
|
|
2
|
-
export { classifyDatabaseDirectory, type ClassifyOptions, type FilesystemClassification, } from "./sqlite/sqlite-filesystem-policy.js";
|
|
3
|
-
export { LOCAL_SCHEMA_VERSION, SchemaDowngradeRefusedError, } from "./sqlite/sqlite-schema.js";
|
|
4
|
-
export { FilesystemPolicyError, SqliteLocalRunStore, type OpenSqliteLocalRunStoreOptions, } from "./sqlite/sqlite-local-run-store.js";
|
|
5
|
-
export { openSqliteLocalRunStoreWithRecovery, type OpenWithRecoveryResult, } from "./sqlite/sqlite-recovery.js";
|
|
6
|
-
export { __resetLocalRunStoreLifecycleForTests, __setLocalRunStoreLifecycleTestOverrides, closeLocalRunStore, getLocalRunStore, getLocalRunStoreLifecycleStatus, LOCAL_RUN_STORE_OPEN_RETRY_MS, probeLocalRunStore, type LocalRunStoreLifecycleStatus, } from "./store-lifecycle.js";
|
|
7
|
-
export { __resetDispatchReceiptCountersForTests, dispatchReceiptCounters, dispatchReceiptsMode, noteCompletionReplayIfAcked, recordCompletionAckedReceipt, recordCompletionSentReceipt, recordDispatchClaimReceipt, recordDispatchReleasedReceipt, recordDispatchSpawnedReceipt, recordDispatchStartFailedReceipt, listRecentDispatchStartFailures, leaseTokenAttempt, releaseReasonClass, scanDispatchReceiptInvariants, shouldShortCircuitCompletionReplay, type DispatchClaimIntent, type DispatchReceiptIdentity, type DispatchReceiptInvariantScan, } from "./dispatch-receipts.js";
|
|
8
|
-
export { dispatchClaimRecoveryCounters, findLiveProcessByCmdlinePath, recoverStrandedDispatchClaims, __resetDispatchClaimRecoveryForTests, type RecoverStrandedClaimsOptions, type StrandedClaimRecoveryOutcome, type StrandedClaimRecoveryResult, } from "./dispatch-claim-recovery.js";
|
|
9
|
-
export { maybeRunStartupClaimRecovery, __resetStartupClaimRecoveryForTests, } from "./dispatch-claim-recovery-startup.js";
|
|
10
|
-
export { anyLocalRunStoreSurfaceActive, LOCAL_RUN_STORE_SURFACES, parseLocalRunStoreSurfaceMode, resolveLocalRunStoreSurfaceFlags, type LocalRunStoreSurfaceDefinition, type LocalRunStoreSurfaceFlags, type LocalRunStoreSurfaceKey, type LocalRunStoreSurfaceMode, type ResolvedLocalRunStoreSurfaceFlags, } from "./surface-flags.js";
|
|
11
|
-
export { buildLocalRunStoreTickPosture, type LocalRunStoreTickPosture, } from "./tick-posture.js";
|
|
12
|
-
export { __resetAdmissionShadowCountersForTests, admissionShadowCounters, ADMISSION_RESERVATION_TTL_MS, rearmAdmissionAdoptionPass, reconcileAdmissionShadow, releaseWorkerSlotReservation, takeWorkerSlotReservation, type AdmissionShadowReconcile, } from "./admission-shadow.js";
|
|
13
|
-
export { acquireWorkerAdmissionSlot, admissionEnforceCounters, ADMISSION_SLOT_KEY_PREFIX, reconcileNumberedAdmissionSlots, releaseWorkerAdmissionSlot, __resetAdmissionEnforceCountersForTests, type AdmissionSlotDecision, } from "./admission-enforce.js";
|
|
14
|
-
export { __resetSmallSurfaceCountersForTests, assessQuotaCooldownReservation, clearQuotaCooldownReservation, readMeshLeaseCheckpoint, recordQuotaCooldownReservation, restoreKeeperBackoffCheckpoint, saveKeeperBackoffCheckpoint, saveMeshLeaseCheckpoint, smallSurfaceCounters, type MeshLeaseGrant, } from "./small-surfaces.js";
|
|
15
|
-
export { __resetRemoteSurfaceFlagsCacheForTests, extractLocalRunStoreFlagsFromOperatorTickResponse, getRemoteSurfaceFlags, persistRemoteSurfaceFlags, remoteSurfaceFlagsPath, type RemoteSurfaceModeMap, } from "./remote-surface-flags.js";
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Node 24 migration N4.1 — the replaceable LocalRunStore adapter contract.
|
|
3
|
-
*
|
|
4
|
-
* Covers ONLY host-local concerns the durable-harness plan needs:
|
|
5
|
-
* attempt/process identity, admission reservations, operation
|
|
6
|
-
* receipts/idempotency, recovery checkpoints, and the local schema version.
|
|
7
|
-
* It deliberately does NOT model global AgentOS task authority —
|
|
8
|
-
* AgentOS/PostgreSQL stays authoritative; nothing here may become a source
|
|
9
|
-
* of truth for tasks, plans, or audit.
|
|
10
|
-
*
|
|
11
|
-
* Implementations: sqlite/ (qualification under N4). A future fallback
|
|
12
|
-
* implementation must pass the same contract suite
|
|
13
|
-
* (__tests__/local-run-store/contract-suite.ts).
|
|
14
|
-
*/
|
|
15
|
-
export interface ProcessIdentityRecord {
|
|
16
|
-
processKey: string;
|
|
17
|
-
pid: number;
|
|
18
|
-
runtimeVersion: string;
|
|
19
|
-
nodeVersion: string;
|
|
20
|
-
startedAt: string;
|
|
21
|
-
registeredAt: string;
|
|
22
|
-
}
|
|
23
|
-
export interface AdmissionReservation {
|
|
24
|
-
key: string;
|
|
25
|
-
owner: string;
|
|
26
|
-
expiresAt: string;
|
|
27
|
-
}
|
|
28
|
-
export interface ReserveOutcome {
|
|
29
|
-
acquired: boolean;
|
|
30
|
-
/** The live reservation after the attempt (the winner's, not necessarily the caller's). */
|
|
31
|
-
current: AdmissionReservation;
|
|
32
|
-
}
|
|
33
|
-
export interface OperationReceiptRecord {
|
|
34
|
-
idempotencyKey: string;
|
|
35
|
-
operation: string;
|
|
36
|
-
resultJson: string | null;
|
|
37
|
-
recordedAt: string;
|
|
38
|
-
}
|
|
39
|
-
export interface RecoveryCheckpointRecord {
|
|
40
|
-
scope: string;
|
|
41
|
-
seq: number;
|
|
42
|
-
payloadJson: string;
|
|
43
|
-
createdAt: string;
|
|
44
|
-
}
|
|
45
|
-
export interface LocalRunStore {
|
|
46
|
-
/** Upsert this process's identity row (idempotent per processKey). */
|
|
47
|
-
registerProcessIdentity(input: {
|
|
48
|
-
processKey: string;
|
|
49
|
-
pid: number;
|
|
50
|
-
runtimeVersion: string;
|
|
51
|
-
nodeVersion: string;
|
|
52
|
-
startedAt: string;
|
|
53
|
-
}): ProcessIdentityRecord;
|
|
54
|
-
getProcessIdentity(processKey: string): ProcessIdentityRecord | null;
|
|
55
|
-
/**
|
|
56
|
-
* Try to acquire a keyed admission slot. An unexpired reservation held by
|
|
57
|
-
* another owner loses; an expired one is replaced. Re-acquiring your own
|
|
58
|
-
* live reservation refreshes it.
|
|
59
|
-
*/
|
|
60
|
-
tryReserveAdmission(key: string, owner: string, ttlMs: number, now?: Date): ReserveOutcome;
|
|
61
|
-
releaseAdmission(key: string, owner: string): boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Bounded reservation scan (durable-harness D2 shadow parity + dead-slot
|
|
64
|
-
* release): filter by escaped-LIKE key prefix; optionally include expired
|
|
65
|
-
* rows (default live-only). Oldest expiry first.
|
|
66
|
-
*/
|
|
67
|
-
listAdmissionReservations(input?: {
|
|
68
|
-
keyPrefix?: string;
|
|
69
|
-
includeExpired?: boolean;
|
|
70
|
-
limit?: number;
|
|
71
|
-
now?: Date;
|
|
72
|
-
}): AdmissionReservation[];
|
|
73
|
-
/** Record an operation receipt; a duplicate idempotency key is reported, never overwritten. */
|
|
74
|
-
recordOperationReceipt(input: {
|
|
75
|
-
idempotencyKey: string;
|
|
76
|
-
operation: string;
|
|
77
|
-
resultJson?: string | null;
|
|
78
|
-
}): {
|
|
79
|
-
deduplicated: boolean;
|
|
80
|
-
};
|
|
81
|
-
getOperationReceipt(idempotencyKey: string): OperationReceiptRecord | null;
|
|
82
|
-
/**
|
|
83
|
-
* Bounded receipt scan for invariant checks (durable-harness D1 shadow):
|
|
84
|
-
* filter by exact `operation`, key prefix, and/or a recency floor
|
|
85
|
-
* (`recordedAfter`, ISO — strictly newer than), oldest first. `limit`
|
|
86
|
-
* defaults to a small bound — this is a diagnostic surface, not a query
|
|
87
|
-
* engine.
|
|
88
|
-
*/
|
|
89
|
-
listOperationReceipts(input?: {
|
|
90
|
-
operation?: string;
|
|
91
|
-
keyPrefix?: string;
|
|
92
|
-
recordedAfter?: string;
|
|
93
|
-
limit?: number;
|
|
94
|
-
}): OperationReceiptRecord[];
|
|
95
|
-
/** Delete receipts by exact key (retention pruning). Returns rows removed. */
|
|
96
|
-
deleteOperationReceiptsByKeys(keys: string[]): number;
|
|
97
|
-
saveRecoveryCheckpoint(input: {
|
|
98
|
-
scope: string;
|
|
99
|
-
payloadJson: string;
|
|
100
|
-
}): {
|
|
101
|
-
seq: number;
|
|
102
|
-
};
|
|
103
|
-
latestRecoveryCheckpoint(scope: string): RecoveryCheckpointRecord | null;
|
|
104
|
-
localSchemaVersion(): number;
|
|
105
|
-
close(): void;
|
|
106
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { LocalRunStoreSurfaceKey, LocalRunStoreSurfaceMode } from "./surface-flags.js";
|
|
2
|
-
export type RemoteSurfaceModeMap = Partial<Record<LocalRunStoreSurfaceKey, LocalRunStoreSurfaceMode>>;
|
|
3
|
-
export declare function remoteSurfaceFlagsPath(agentOsId: string): string;
|
|
4
|
-
/** Pull the delivered flag map off an operator-tick response (tolerant). */
|
|
5
|
-
export declare function extractLocalRunStoreFlagsFromOperatorTickResponse(operatorTick: unknown): RemoteSurfaceModeMap | null;
|
|
6
|
-
/** Persist a delivery atomically and refresh the in-process cache. Never throws. */
|
|
7
|
-
export declare function persistRemoteSurfaceFlags(agentOsId: string, flags: RemoteSurfaceModeMap): void;
|
|
8
|
-
/**
|
|
9
|
-
* Server-delivered modes for this box (cached). Empty map when nothing has
|
|
10
|
-
* ever been delivered, the file is unreadable, or no workspace is configured.
|
|
11
|
-
* Never throws.
|
|
12
|
-
*/
|
|
13
|
-
export declare function getRemoteSurfaceFlags(nowMs?: number): RemoteSurfaceModeMap;
|
|
14
|
-
/** Test-only: drop the cache so the next read hits disk. */
|
|
15
|
-
export declare function __resetRemoteSurfaceFlagsCacheForTests(): void;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/** Matches the keeper's HEALTHY_RESET window — older counts are stale evidence. */
|
|
2
|
-
export declare const KEEPER_CHECKPOINT_MAX_AGE_MS: number;
|
|
3
|
-
export declare function saveKeeperBackoffCheckpoint(input: {
|
|
4
|
-
consecutiveFailures: number;
|
|
5
|
-
exitCode: number | null;
|
|
6
|
-
exitSignal: string | null;
|
|
7
|
-
}): void;
|
|
8
|
-
/** Enforce only: resume the failure count across keeper restarts. */
|
|
9
|
-
export declare function restoreKeeperBackoffCheckpoint(): number | null;
|
|
10
|
-
export interface MeshLeaseGrant {
|
|
11
|
-
leaseToken: string | null;
|
|
12
|
-
holderBoxId: string | null;
|
|
13
|
-
authorized: boolean;
|
|
14
|
-
updatedAt: string;
|
|
15
|
-
}
|
|
16
|
-
export declare function saveMeshLeaseCheckpoint(runId: string, grant: MeshLeaseGrant): void;
|
|
17
|
-
/**
|
|
18
|
-
* Enforce: the store is the read source (JSON kept for external readers).
|
|
19
|
-
* Shadow: returns null (JSON stays authoritative) but counts divergence
|
|
20
|
-
* against the JSON value the caller read.
|
|
21
|
-
*/
|
|
22
|
-
export declare function readMeshLeaseCheckpoint(runId: string, jsonValue: MeshLeaseGrant | null): MeshLeaseGrant | null;
|
|
23
|
-
export declare function recordQuotaCooldownReservation(provider: string, cooldownMs: number): void;
|
|
24
|
-
export declare function clearQuotaCooldownReservation(provider: string): void;
|
|
25
|
-
/**
|
|
26
|
-
* The reservation-backed cooldown verdict. Enforce: this IS the verdict
|
|
27
|
-
* (race-free record/prune; a torn JSON can no longer fail open into attempt
|
|
28
|
-
* burns). Shadow: returns null (JSON verdict stands) but counts divergence
|
|
29
|
-
* against it. Returns the reservation's expiry when cooling down, null when
|
|
30
|
-
* clear.
|
|
31
|
-
*/
|
|
32
|
-
export declare function assessQuotaCooldownReservation(provider: string, jsonBlocked: boolean): {
|
|
33
|
-
blocked: boolean;
|
|
34
|
-
retryAtIso: string | null;
|
|
35
|
-
} | null;
|
|
36
|
-
export declare function smallSurfaceCounters(): Record<string, number>;
|
|
37
|
-
export declare function __resetSmallSurfaceCountersForTests(): void;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export interface FilesystemClassification {
|
|
2
|
-
verdict: "accepted" | "rejected";
|
|
3
|
-
/** Bounded operator-facing reason; never environment values. */
|
|
4
|
-
reason: string;
|
|
5
|
-
filesystemType: string | null;
|
|
6
|
-
mountPoint: string | null;
|
|
7
|
-
/** Realpath-resolved nearest existing ancestor the classification applied to. */
|
|
8
|
-
resolvedPath: string;
|
|
9
|
-
}
|
|
10
|
-
export interface ClassifyOptions {
|
|
11
|
-
/** Injectable mounts content (tests); default reads /proc/self/mounts. Return null when unavailable. */
|
|
12
|
-
mountsSource?: () => string | null;
|
|
13
|
-
/** Injectable realpath (tests); default resolves via the filesystem. */
|
|
14
|
-
resolveRealPath?: (p: string) => string;
|
|
15
|
-
}
|
|
16
|
-
export declare function classifyDatabaseDirectory(directory: string, options?: ClassifyOptions): FilesystemClassification;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import type { AdmissionReservation, LocalRunStore, OperationReceiptRecord, ProcessIdentityRecord, RecoveryCheckpointRecord, ReserveOutcome } from "../local-run-store.js";
|
|
2
|
-
import { type ClassifyOptions } from "./sqlite-filesystem-policy.js";
|
|
3
|
-
export declare class FilesystemPolicyError extends Error {
|
|
4
|
-
constructor(reason: string);
|
|
5
|
-
}
|
|
6
|
-
export interface OpenSqliteLocalRunStoreOptions {
|
|
7
|
-
directory: string;
|
|
8
|
-
filename?: string;
|
|
9
|
-
/** Busy timeout in ms (writer contention wait). */
|
|
10
|
-
busyTimeoutMs?: number;
|
|
11
|
-
/** Test injection for the filesystem policy. */
|
|
12
|
-
classifyOptions?: ClassifyOptions;
|
|
13
|
-
now?: () => Date;
|
|
14
|
-
}
|
|
15
|
-
export declare class SqliteLocalRunStore implements LocalRunStore {
|
|
16
|
-
private readonly db;
|
|
17
|
-
private readonly now;
|
|
18
|
-
readonly databasePath: string;
|
|
19
|
-
private constructor();
|
|
20
|
-
static open(options: OpenSqliteLocalRunStoreOptions): SqliteLocalRunStore;
|
|
21
|
-
/** Writer helper — every mutation runs inside BEGIN IMMEDIATE. */
|
|
22
|
-
private inImmediateTransaction;
|
|
23
|
-
registerProcessIdentity(input: {
|
|
24
|
-
processKey: string;
|
|
25
|
-
pid: number;
|
|
26
|
-
runtimeVersion: string;
|
|
27
|
-
nodeVersion: string;
|
|
28
|
-
startedAt: string;
|
|
29
|
-
}): ProcessIdentityRecord;
|
|
30
|
-
getProcessIdentity(processKey: string): ProcessIdentityRecord | null;
|
|
31
|
-
tryReserveAdmission(key: string, owner: string, ttlMs: number, now?: Date): ReserveOutcome;
|
|
32
|
-
releaseAdmission(key: string, owner: string): boolean;
|
|
33
|
-
listAdmissionReservations(input?: {
|
|
34
|
-
keyPrefix?: string;
|
|
35
|
-
includeExpired?: boolean;
|
|
36
|
-
limit?: number;
|
|
37
|
-
now?: Date;
|
|
38
|
-
}): AdmissionReservation[];
|
|
39
|
-
recordOperationReceipt(input: {
|
|
40
|
-
idempotencyKey: string;
|
|
41
|
-
operation: string;
|
|
42
|
-
resultJson?: string | null;
|
|
43
|
-
}): {
|
|
44
|
-
deduplicated: boolean;
|
|
45
|
-
};
|
|
46
|
-
listOperationReceipts(input?: {
|
|
47
|
-
operation?: string;
|
|
48
|
-
keyPrefix?: string;
|
|
49
|
-
recordedAfter?: string;
|
|
50
|
-
limit?: number;
|
|
51
|
-
}): OperationReceiptRecord[];
|
|
52
|
-
deleteOperationReceiptsByKeys(keys: string[]): number;
|
|
53
|
-
getOperationReceipt(idempotencyKey: string): OperationReceiptRecord | null;
|
|
54
|
-
saveRecoveryCheckpoint(input: {
|
|
55
|
-
scope: string;
|
|
56
|
-
payloadJson: string;
|
|
57
|
-
}): {
|
|
58
|
-
seq: number;
|
|
59
|
-
};
|
|
60
|
-
latestRecoveryCheckpoint(scope: string): RecoveryCheckpointRecord | null;
|
|
61
|
-
localSchemaVersion(): number;
|
|
62
|
-
/** Explicit checkpoint policy: truncate the WAL back into the main db. */
|
|
63
|
-
checkpointTruncate(): void;
|
|
64
|
-
integrityCheck(): boolean;
|
|
65
|
-
/** Read-only config readback used by qualification assertions. */
|
|
66
|
-
pragma(name: "journal_mode" | "synchronous"): string;
|
|
67
|
-
close(): void;
|
|
68
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SqliteLocalRunStore, type OpenSqliteLocalRunStoreOptions } from "./sqlite-local-run-store.js";
|
|
2
|
-
export interface OpenWithRecoveryResult {
|
|
3
|
-
store: SqliteLocalRunStore;
|
|
4
|
-
recovered: boolean;
|
|
5
|
-
quarantinedTo: string | null;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Open the store; on open failure or integrity failure, quarantine and
|
|
9
|
-
* rebuild fresh. Schema-downgrade refusals are NOT recovered — a newer
|
|
10
|
-
* schema is an operator decision, not corruption.
|
|
11
|
-
*/
|
|
12
|
-
export declare function openSqliteLocalRunStoreWithRecovery(options: OpenSqliteLocalRunStoreOptions & {
|
|
13
|
-
quarantineStamp?: string;
|
|
14
|
-
}): OpenWithRecoveryResult;
|