@kynver-app/runtime 0.2.24 → 0.2.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* M6 first-run local Codex golden path verifier.
|
|
3
|
-
*
|
|
4
|
-
* Validates a signed Kynver cloud job envelope against local runner state:
|
|
5
|
-
* workspace binding, runner presence, Codex/Hermes auth, BYO entitlement,
|
|
6
|
-
* and tool policy. Fails closed — any missing or mismatched prerequisite
|
|
7
|
-
* returns a typed failure code rather than proceeding to execution.
|
|
8
|
-
*
|
|
9
|
-
* Secrets and tokens are never returned. Session fingerprints are sha256
|
|
10
|
-
* prefixes of non-secret binding metadata (see oauth-binding-utils).
|
|
11
|
-
*/
|
|
12
|
-
import { resolveCodexOrchestrationAdapter, type CodexOrchestrationPath } from "../orchestration-providers/codex-orchestration-adapter.js";
|
|
13
|
-
import type { LocalCodexJobEnvelope } from "./job-envelope.js";
|
|
14
|
-
/**
|
|
15
|
-
* Failure codes for the M6 golden path. Each maps to an operator-visible
|
|
16
|
-
* remediation action — never expose secret material in messages.
|
|
17
|
-
*/
|
|
18
|
-
export type GoldenPathCheckCode =
|
|
19
|
-
/** Runner not configured or identity cannot be resolved. */
|
|
20
|
-
"missing_runner"
|
|
21
|
-
/** Codex CLI and Hermes openai-codex are both unavailable on this host. */
|
|
22
|
-
| "missing_codex_auth"
|
|
23
|
-
/** Job's agentOsId does not match the runner's configured workspace. */
|
|
24
|
-
| "wrong_workspace"
|
|
25
|
-
/**
|
|
26
|
-
* Job envelope is structurally invalid (missing/blank required field or
|
|
27
|
-
* malformed dates). Indicates a control-plane/serialization problem, not a
|
|
28
|
-
* runner-config problem — distinct from `wrong_workspace`.
|
|
29
|
-
*/
|
|
30
|
-
| "malformed_envelope"
|
|
31
|
-
/** Job envelope has expired (expiresAt in the past). */
|
|
32
|
-
| "job_expired"
|
|
33
|
-
/**
|
|
34
|
-
* BYO compute entitlement is not active for this runner.
|
|
35
|
-
* Set KYNVER_BYOC_ENTITLED=1 or complete the workspace entitlement flow.
|
|
36
|
-
*/
|
|
37
|
-
| "missing_entitlement"
|
|
38
|
-
/**
|
|
39
|
-
* Job requests a tool or toolset not permitted on local BYO runners, or
|
|
40
|
-
* requests privileged platform actions (DB writes, deploy, secrets).
|
|
41
|
-
*/
|
|
42
|
-
| "unauthorized_tool_policy";
|
|
43
|
-
/** Non-secret audit evidence written back to the control plane. */
|
|
44
|
-
export interface GoldenPathAuditEvidence {
|
|
45
|
-
jobId: string;
|
|
46
|
-
agentOsId: string;
|
|
47
|
-
taskId: string;
|
|
48
|
-
runnerId: string;
|
|
49
|
-
runnerIdHint: string | null;
|
|
50
|
-
codexPath: CodexOrchestrationPath;
|
|
51
|
-
codexReady: boolean;
|
|
52
|
-
sessionFingerprint: string | undefined;
|
|
53
|
-
toolsetsRequested: string[];
|
|
54
|
-
privilegedRequested: boolean;
|
|
55
|
-
checkedAt: string;
|
|
56
|
-
}
|
|
57
|
-
export type GoldenPathResult = {
|
|
58
|
-
passed: true;
|
|
59
|
-
envelope: LocalCodexJobEnvelope;
|
|
60
|
-
evidence: GoldenPathAuditEvidence;
|
|
61
|
-
} | {
|
|
62
|
-
passed: false;
|
|
63
|
-
code: GoldenPathCheckCode;
|
|
64
|
-
detail: string;
|
|
65
|
-
evidence: GoldenPathAuditEvidence;
|
|
66
|
-
};
|
|
67
|
-
export interface GoldenPathOptions {
|
|
68
|
-
/** Override current time (ms) for testing. */
|
|
69
|
-
nowMs?: number;
|
|
70
|
-
/** Override process.env for testing. */
|
|
71
|
-
env?: NodeJS.ProcessEnv;
|
|
72
|
-
/** Injectable for tests — skips live Codex probe. */
|
|
73
|
-
codexAdapter?: ReturnType<typeof resolveCodexOrchestrationAdapter>;
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Run the M6 golden path checks in order. The first failure short-circuits
|
|
77
|
-
* and returns the error code — callers must not proceed to execution.
|
|
78
|
-
*/
|
|
79
|
-
export declare function verifyLocalCodexGoldenPath(rawEnvelope: unknown, options?: GoldenPathOptions): GoldenPathResult;
|
|
80
|
-
/**
|
|
81
|
-
* Format a human-readable remediation notice for a golden path failure.
|
|
82
|
-
* Safe to log — contains no secrets or tokens.
|
|
83
|
-
*/
|
|
84
|
-
export declare function formatGoldenPathFailureNotice(result: Extract<GoldenPathResult, {
|
|
85
|
-
passed: false;
|
|
86
|
-
}>): string;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BYOC M0.6 — MCP tool reachability proof.
|
|
3
|
-
*
|
|
4
|
-
* Proves the runner-credential auth pathway to the Kynver server works by making
|
|
5
|
-
* a lightweight HTTP probe (GET /api/agent-os/runner-token/verify) using the
|
|
6
|
-
* scoped runner token. Does not invoke any destructive MCP tools.
|
|
7
|
-
*
|
|
8
|
-
* Fail-closed on network errors — returns a typed result, never throws.
|
|
9
|
-
* No secrets in the returned object.
|
|
10
|
-
*/
|
|
11
|
-
import type { HydratedJobContext } from "./context-hydration.js";
|
|
12
|
-
export type McpAuthSource = "runner_token" | "api_key" | "none";
|
|
13
|
-
export interface McpToolProofResult {
|
|
14
|
-
/** Whether the MCP endpoint replied with a non-error HTTP status. */
|
|
15
|
-
reachable: boolean;
|
|
16
|
-
/** Which credential was used to probe. */
|
|
17
|
-
authSource: McpAuthSource;
|
|
18
|
-
/** The probe endpoint URL (no path secrets). */
|
|
19
|
-
endpoint: string | null;
|
|
20
|
-
/** HTTP status code returned, or null on network error. */
|
|
21
|
-
httpStatus: number | null;
|
|
22
|
-
/** Round-trip duration in ms, or null on failure. */
|
|
23
|
-
responseMs: number | null;
|
|
24
|
-
/** ISO timestamp when the probe ran. */
|
|
25
|
-
probedAt: string;
|
|
26
|
-
/** Error message if the probe failed, or null on success. */
|
|
27
|
-
error: string | null;
|
|
28
|
-
}
|
|
29
|
-
export interface McpToolProofOptions {
|
|
30
|
-
env?: NodeJS.ProcessEnv;
|
|
31
|
-
nowMs?: number;
|
|
32
|
-
/** Timeout for the HTTP probe. Default 8 000 ms. */
|
|
33
|
-
timeoutMs?: number;
|
|
34
|
-
/** Injectable fetch for tests — defaults to global fetch. */
|
|
35
|
-
fetcher?: typeof fetch;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Probe MCP/API reachability using the runner credential.
|
|
39
|
-
* Uses `GET /api/agent-os/runner-token/verify` — a read-only identity endpoint
|
|
40
|
-
* added in M0.4 that requires only the runner token and returns the workspace ID.
|
|
41
|
-
*/
|
|
42
|
-
export declare function probeMcpToolReachability(context: HydratedJobContext, options?: McpToolProofOptions): Promise<McpToolProofResult>;
|
package/dist/callbacks.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
/** WSL host disk snapshot — present only when the runner is under WSL.
|
|
2
|
-
* The field is optional/nullable so older runners (no probe) and non-WSL
|
|
3
|
-
* runners both serialize as `wslHost: null` for the dispatch-next server. */
|
|
4
|
-
export interface DispatchNextWslHostShape {
|
|
5
|
-
ok: boolean;
|
|
6
|
-
path: string;
|
|
7
|
-
freeBytes: number;
|
|
8
|
-
totalBytes: number;
|
|
9
|
-
usedPercent: number;
|
|
10
|
-
warnBelowBytes: number;
|
|
11
|
-
criticalBelowBytes: number;
|
|
12
|
-
reason: string | null;
|
|
13
|
-
probeError: string | null;
|
|
14
|
-
}
|
|
15
|
-
/** WSL crash-dump snapshot — present only when the runner is under WSL. */
|
|
16
|
-
export interface DispatchNextWslCrashDumpsShape {
|
|
17
|
-
ok: boolean;
|
|
18
|
-
path: string | null;
|
|
19
|
-
dumpCount: number;
|
|
20
|
-
totalBytes: number;
|
|
21
|
-
executables: string[];
|
|
22
|
-
wslCaptureEnabled: boolean;
|
|
23
|
-
dumpsDisabledInWslConfig: boolean;
|
|
24
|
-
reason: string | null;
|
|
25
|
-
probeError: string | null;
|
|
26
|
-
}
|
|
27
|
-
export interface DispatchNextDiskGateShape {
|
|
28
|
-
ok: boolean;
|
|
29
|
-
path: string;
|
|
30
|
-
freeBytes: number;
|
|
31
|
-
totalBytes: number;
|
|
32
|
-
usedPercent: number;
|
|
33
|
-
warnBelowBytes: number;
|
|
34
|
-
criticalBelowBytes: number;
|
|
35
|
-
maxUsedPercent: number;
|
|
36
|
-
hardMaxUsedPercent: number;
|
|
37
|
-
reason: string | null;
|
|
38
|
-
/** Windows host disk under WSL (`/mnt/c` by default). `null` on non-WSL
|
|
39
|
-
* hosts and when the probe was opted out via `skipWslHostCheck`. */
|
|
40
|
-
wslHost?: DispatchNextWslHostShape | null;
|
|
41
|
-
/** Windows-side `%LOCALAPPDATA%\\Temp\\wsl-crashes` usage. `null` on non-WSL. */
|
|
42
|
-
wslCrashDumps?: DispatchNextWslCrashDumpsShape | null;
|
|
43
|
-
}
|
|
44
|
-
export interface DispatchNextResourceGateShape {
|
|
45
|
-
ok: boolean;
|
|
46
|
-
totalMemBytes: number;
|
|
47
|
-
freeMemBytes: number;
|
|
48
|
-
memReserveBytes: number;
|
|
49
|
-
perWorkerMemBytes: number;
|
|
50
|
-
configuredMaxWorkers: number | null;
|
|
51
|
-
capacityWorkers: number;
|
|
52
|
-
maxConcurrentWorkers: number;
|
|
53
|
-
activeWorkers: number;
|
|
54
|
-
slotsAvailable: number;
|
|
55
|
-
reason: string | null;
|
|
56
|
-
}
|
|
57
|
-
export interface PostJsonResult {
|
|
58
|
-
ok: boolean;
|
|
59
|
-
status: number;
|
|
60
|
-
response: unknown;
|
|
61
|
-
refreshedAuth?: boolean;
|
|
62
|
-
authRefreshFailure?: string;
|
|
63
|
-
}
|
|
64
|
-
export declare function postJson(url: string, secret: string, body: unknown, opts?: {
|
|
65
|
-
timeoutMs?: number;
|
|
66
|
-
}): Promise<PostJsonResult>;
|
|
67
|
-
export declare function postJsonWithCredentialRefresh(url: string, secret: string, body: unknown, opts: {
|
|
68
|
-
agentOsId: string;
|
|
69
|
-
baseUrl?: string;
|
|
70
|
-
timeoutMs?: number;
|
|
71
|
-
}): Promise<PostJsonResult>;
|
|
72
|
-
export declare function getJson(url: string, secret: string, opts?: {
|
|
73
|
-
timeoutMs?: number;
|
|
74
|
-
}): Promise<PostJsonResult>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export type LocalAnthropicCredentials = {
|
|
2
|
-
kind: "api_key";
|
|
3
|
-
key: string;
|
|
4
|
-
} | {
|
|
5
|
-
kind: "oauth";
|
|
6
|
-
token: string;
|
|
7
|
-
};
|
|
8
|
-
export declare function parseClaudeCredentials(raw: string, now?: number): string | null;
|
|
9
|
-
export declare function resolveLocalAnthropicCredentials(env?: Record<string, string | undefined>, opts?: {
|
|
10
|
-
oauthOptIn?: boolean;
|
|
11
|
-
}): LocalAnthropicCredentials | null;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { LocalAnthropicCredentials } from "./anthropic-credentials.js";
|
|
2
|
-
export interface ChatTurnPayload {
|
|
3
|
-
system: string;
|
|
4
|
-
tools?: unknown[];
|
|
5
|
-
messages: unknown[];
|
|
6
|
-
maxTokens: number;
|
|
7
|
-
temperature?: number;
|
|
8
|
-
}
|
|
9
|
-
/** Anthropic-shaped final message — the relay's `final` event body. */
|
|
10
|
-
export interface LocalTurnMessage {
|
|
11
|
-
content: unknown[];
|
|
12
|
-
stop_reason: string;
|
|
13
|
-
usage: {
|
|
14
|
-
input_tokens: number;
|
|
15
|
-
output_tokens: number;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
interface ContentBlockAccumulator {
|
|
19
|
-
type: "text" | "tool_use";
|
|
20
|
-
text: string;
|
|
21
|
-
id?: string;
|
|
22
|
-
name?: string;
|
|
23
|
-
inputJson: string;
|
|
24
|
-
}
|
|
25
|
-
export interface AnthropicStreamAccumulator {
|
|
26
|
-
blocks: ContentBlockAccumulator[];
|
|
27
|
-
stopReason: string | null;
|
|
28
|
-
inputTokens: number;
|
|
29
|
-
outputTokens: number;
|
|
30
|
-
}
|
|
31
|
-
export declare function createAnthropicAccumulator(): AnthropicStreamAccumulator;
|
|
32
|
-
/** Fold one parsed SSE event; returns the text delta it carried (if any). */
|
|
33
|
-
export declare function foldAnthropicEvent(acc: AnthropicStreamAccumulator, event: unknown): string;
|
|
34
|
-
export declare function toLocalTurnMessage(acc: AnthropicStreamAccumulator): LocalTurnMessage;
|
|
35
|
-
export declare function getAnthropicBaseUrl(env?: Record<string, string | undefined>): string;
|
|
36
|
-
export declare function streamLocalAnthropicTurn(input: {
|
|
37
|
-
creds: LocalAnthropicCredentials;
|
|
38
|
-
model: string;
|
|
39
|
-
payload: ChatTurnPayload;
|
|
40
|
-
onDelta: (text: string) => void;
|
|
41
|
-
signal?: AbortSignal;
|
|
42
|
-
}): Promise<LocalTurnMessage>;
|
|
43
|
-
export {};
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { type ChatTurnPayload } from "./anthropic-stream.js";
|
|
2
|
-
/** Stable box id for sticky chat routing (config/env before hostname). */
|
|
3
|
-
export declare function resolveChatClaimBoxId(env?: Record<string, string | undefined>): string;
|
|
4
|
-
export interface ChatBridgeTarget {
|
|
5
|
-
bridgeUrl: string;
|
|
6
|
-
agentOsId: string;
|
|
7
|
-
apiKey: string;
|
|
8
|
-
boxId: string;
|
|
9
|
-
model: string;
|
|
10
|
-
/** Claude Code OAuth opt-in (config `chatUseClaudeOauth` or env). */
|
|
11
|
-
useClaudeOauth: boolean;
|
|
12
|
-
}
|
|
13
|
-
/** Resolve the chat-bridge target; null when the feature is off/unconfigured. */
|
|
14
|
-
export declare function resolveChatBridgeTarget(env?: Record<string, string | undefined>): Promise<ChatBridgeTarget | null>;
|
|
15
|
-
interface ClaimedTurn {
|
|
16
|
-
turnId: string;
|
|
17
|
-
agentOsId: string;
|
|
18
|
-
payload: ChatTurnPayload;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* M5.6: execute a claimed COMMAND turn — allowlisted local `kynver` CLI argv,
|
|
22
|
-
* output streamed as delta events, terminal `final` carries exitCode. Never
|
|
23
|
-
* throws; refusals surface as a terminal error event.
|
|
24
|
-
*/
|
|
25
|
-
export declare function executeCommandTurn(target: ChatBridgeTarget, turn: {
|
|
26
|
-
turnId: string;
|
|
27
|
-
payload: {
|
|
28
|
-
argv?: unknown;
|
|
29
|
-
authProof?: unknown;
|
|
30
|
-
};
|
|
31
|
-
}): Promise<void>;
|
|
32
|
-
/** Execute one claimed turn and stream its events back. Never throws. */
|
|
33
|
-
export declare function executeChatTurn(target: ChatBridgeTarget, turn: ClaimedTurn): Promise<void>;
|
|
34
|
-
/**
|
|
35
|
-
* The forever loop the daemon runs alongside its pipeline ticks. Serial by
|
|
36
|
-
* design (one turn at a time per box). Exits when `shouldStop()` flips.
|
|
37
|
-
*/
|
|
38
|
-
export declare function runChatClaimLoop(opts: {
|
|
39
|
-
shouldStop: () => boolean;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface CommandVerdict {
|
|
2
|
-
ok: boolean;
|
|
3
|
-
/** True when the verb mutates state — gateway requires approval first. */
|
|
4
|
-
mutating: boolean;
|
|
5
|
-
reason?: string;
|
|
6
|
-
}
|
|
7
|
-
/** Classify an argv against the allowlist. Pure — unit-tested. */
|
|
8
|
-
export declare function classifyCommand(argv: readonly string[]): CommandVerdict;
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/** Default proof lifetime — must cover one gateway command wait + relay latency. */
|
|
2
|
-
export declare const COMMAND_AUTH_PROOF_TTL_SEC = 120;
|
|
3
|
-
export interface CommandAuthorizationProofPayload {
|
|
4
|
-
v: 1;
|
|
5
|
-
agentOsId: string;
|
|
6
|
-
argv: string[];
|
|
7
|
-
userId: string;
|
|
8
|
-
/** Unix epoch seconds. */
|
|
9
|
-
exp: number;
|
|
10
|
-
/** Single-use replay guard (base64url). */
|
|
11
|
-
nonce: string;
|
|
12
|
-
}
|
|
13
|
-
export interface SignedCommandAuthorizationProof {
|
|
14
|
-
payload: CommandAuthorizationProofPayload;
|
|
15
|
-
/** base64url Ed25519 signature over `canonicalJsonStringify(payload)`. */
|
|
16
|
-
signature: string;
|
|
17
|
-
/** Identifies the signing key (`ca-<sha256(publicKey) prefix>`). */
|
|
18
|
-
publicKeyId: string;
|
|
19
|
-
}
|
|
20
|
-
export type CommandAuthProofVerifyResult = {
|
|
21
|
-
ok: true;
|
|
22
|
-
payload: CommandAuthorizationProofPayload;
|
|
23
|
-
} | {
|
|
24
|
-
ok: false;
|
|
25
|
-
reason: string;
|
|
26
|
-
};
|
|
27
|
-
export interface CommandAuthSigningKey {
|
|
28
|
-
seed: Uint8Array;
|
|
29
|
-
rawPublicKey: Uint8Array;
|
|
30
|
-
publicKeyId: string;
|
|
31
|
-
usingDevFallbackKey: boolean;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Committed DEV fallback public key id. Matching private seed is committed for
|
|
35
|
-
* local/dev signing — NOT a production trust root (verifier refuses it when
|
|
36
|
-
* `NODE_ENV=production` unless `KYNVER_COMMAND_AUTH_PUBLIC_KEY` overrides).
|
|
37
|
-
*/
|
|
38
|
-
export declare const COMMAND_AUTH_DEV_FALLBACK_PUBLIC_KEY_ID = "ca-6297fb8e1773";
|
|
39
|
-
/**
|
|
40
|
-
* keyId → raw Ed25519 public key (hex). Public material ships in the published
|
|
41
|
-
* package on purpose — baking it in is what lets bridge + daemon verify
|
|
42
|
-
* command proofs without a per-host env. Rotation path:
|
|
43
|
-
* `KYNVER_COMMAND_AUTH_PUBLIC_KEY` env override (raw 32-byte hex or base64)
|
|
44
|
-
* outranks the pinned set (must match the proof's `publicKeyId`), then a
|
|
45
|
-
* package republish pins the new key.
|
|
46
|
-
*/
|
|
47
|
-
export declare const PINNED_COMMAND_AUTH_PUBLIC_KEYS: Readonly<Record<string, string>>;
|
|
48
|
-
export declare function deriveCommandAuthKeyId(rawPublicKey: Uint8Array): string;
|
|
49
|
-
export declare function resolveCommandAuthPublicKey(publicKeyId: string, env?: Record<string, string | undefined>): Uint8Array | null;
|
|
50
|
-
export declare function argvMatchesProof(proofArgv: unknown, expectedArgv: readonly string[]): boolean;
|
|
51
|
-
export declare function isSignedCommandAuthProofShape(value: unknown): value is SignedCommandAuthorizationProof;
|
|
52
|
-
/** Verify signature + expiry + workspace/argv binding. */
|
|
53
|
-
export declare function verifyCommandAuthorizationProof(signed: unknown, expected: {
|
|
54
|
-
agentOsId: string;
|
|
55
|
-
argv: readonly string[];
|
|
56
|
-
}, env?: Record<string, string | undefined>, nowSec?: number): CommandAuthProofVerifyResult;
|
|
57
|
-
export declare function resolveCommandAuthSigningKey(env?: Record<string, string | undefined>): CommandAuthSigningKey;
|
|
58
|
-
/** Mint a signed proof after the app-side approval gate passes. */
|
|
59
|
-
export declare function issueCommandAuthorizationProof(args: {
|
|
60
|
-
agentOsId: string;
|
|
61
|
-
argv: readonly string[];
|
|
62
|
-
userId: string;
|
|
63
|
-
ttlSec?: number;
|
|
64
|
-
nowSec?: number;
|
|
65
|
-
env?: Record<string, string | undefined>;
|
|
66
|
-
}): SignedCommandAuthorizationProof;
|
|
67
|
-
export declare function commandAuthProofKeyFingerprint(key: CommandAuthSigningKey): string;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { type SignedCommandAuthorizationProof } from "./command-auth-proof.js";
|
|
2
|
-
export interface CommandTurnResult {
|
|
3
|
-
exitCode: number | null;
|
|
4
|
-
timedOut: boolean;
|
|
5
|
-
refused?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function verifyCommandTurnAuthorization(agentOsId: string, argv: readonly string[], authProof: unknown, env?: Record<string, string | undefined>): string | null;
|
|
8
|
-
/**
|
|
9
|
-
* Execute one command turn. `pushDelta` receives batched output text;
|
|
10
|
-
* resolves with the terminal result (never throws).
|
|
11
|
-
*/
|
|
12
|
-
export declare function executeLocalCommand(argv: string[], pushDelta: (text: string) => void, opts?: {
|
|
13
|
-
cliEntry?: string;
|
|
14
|
-
timeoutMs?: number;
|
|
15
|
-
agentOsId?: string;
|
|
16
|
-
authProof?: SignedCommandAuthorizationProof | unknown;
|
|
17
|
-
env?: Record<string, string | undefined>;
|
|
18
|
-
}): Promise<CommandTurnResult>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const DELTA_FLUSH_FLOOR_MS = 150;
|
|
2
|
-
export declare class DeltaBatcher {
|
|
3
|
-
private readonly flushFn;
|
|
4
|
-
private readonly floorMs;
|
|
5
|
-
private buffer;
|
|
6
|
-
private timer;
|
|
7
|
-
private closed;
|
|
8
|
-
constructor(flushFn: (text: string) => void, floorMs?: number);
|
|
9
|
-
push(text: string): void;
|
|
10
|
-
private flushNow;
|
|
11
|
-
/** Flush any remainder and stop the timer. Idempotent. */
|
|
12
|
-
close(): void;
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ActiveWorktreeGuardSnapshot {
|
|
2
|
-
/** Resolved worktree paths that must keep dependency caches. */
|
|
3
|
-
activeWorktreePaths: Set<string>;
|
|
4
|
-
/** `${harnessRoot}\0${runId}` keys for runs with at least one live worker. */
|
|
5
|
-
liveRunKeys: Set<string>;
|
|
6
|
-
}
|
|
7
|
-
/** Collect worktrees/runs that still have live worker processes (current-run guard). */
|
|
8
|
-
export declare function collectActiveWorktreeGuards(harnessRoots: string[], now?: number): ActiveWorktreeGuardSnapshot;
|
|
9
|
-
/** True when a worktree path still exists under a live run (belt-and-suspenders). */
|
|
10
|
-
export declare function isWorktreeOnLiveRun(worktreePath: string, harnessRoot: string, runId: string | undefined, liveRunKeys: Set<string>): boolean;
|
|
11
|
-
export declare function worktreesDirForRoot(harnessRoot: string): string;
|
|
12
|
-
export declare function runsDirForRoot(harnessRoot: string): string;
|
|
13
|
-
export declare function harnessRootExists(harnessRoot: string): boolean;
|
|
14
|
-
export declare function listWorktreeRunIds(worktreesDir: string): string[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Generated install/build trees safe to delete under a harness worktree. */
|
|
2
|
-
export declare const HARNESS_BUILD_CACHE_RELATIVE_PATHS: readonly [".next", ".turbo", "dist", "build", ".cache", "node_modules/.cache"];
|
|
3
|
-
export type HarnessBuildCacheRelativePath = (typeof HARNESS_BUILD_CACHE_RELATIVE_PATHS)[number];
|
|
4
|
-
/** True when a porcelain path is only generated build/install noise. */
|
|
5
|
-
export declare function isGeneratedHarnessPath(pathPart: string): boolean;
|
package/dist/cleanup-cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function runCleanupCli(args: Record<string, string | boolean>): void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IndexedWorktree } from "./cleanup-worktree-index.js";
|
|
2
|
-
import type { RawHarnessWorkerStatus } from "./status.js";
|
|
3
|
-
/**
|
|
4
|
-
* Whether a persisted `completionBlocker` should still block whole-worktree removal.
|
|
5
|
-
*
|
|
6
|
-
* Dead workers with landed/clean work may keep replay metadata on disk after the
|
|
7
|
-
* board advanced externally — those blockers are stale for GC and must not pin
|
|
8
|
-
* worktrees indefinitely.
|
|
9
|
-
*/
|
|
10
|
-
export declare function completionBlockerBlocksWorktreeRemoval(indexed: IndexedWorktree, status?: RawHarnessWorkerStatus): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { CleanupCandidate } from "./cleanup-types.js";
|
|
2
|
-
import type { IndexedWorktree } from "./cleanup-worktree-index.js";
|
|
3
|
-
export interface ScanDependencyCacheOptions {
|
|
4
|
-
harnessRoot: string;
|
|
5
|
-
worktreesDir: string;
|
|
6
|
-
nodeModulesAgeMs: number;
|
|
7
|
-
includeOrphans?: boolean;
|
|
8
|
-
runIdFilter?: string;
|
|
9
|
-
index: Map<string, IndexedWorktree>;
|
|
10
|
-
now: number;
|
|
11
|
-
}
|
|
12
|
-
/** Scan indexed + on-disk worktrees for generated dependency caches. */
|
|
13
|
-
export declare function scanDependencyCacheCandidates(opts: ScanDependencyCacheOptions): CleanupCandidate[];
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { DispatchNextDiskGateShape } from "./callbacks.js";
|
|
2
|
-
import { type ObserveDiskGateInput } from "./disk-gate.js";
|
|
3
|
-
import type { ResolvedHarnessRetention } from "./cleanup-retention-config.js";
|
|
4
|
-
export interface CleanupDiskPressureShape {
|
|
5
|
-
diskGate: DispatchNextDiskGateShape;
|
|
6
|
-
/** Root filesystem (or override) is at/above the guard threshold. */
|
|
7
|
-
pressured: boolean;
|
|
8
|
-
maxUsedPercent: number;
|
|
9
|
-
}
|
|
10
|
-
export declare function observeCleanupDiskPressure(input?: ObserveDiskGateInput): CleanupDiskPressureShape;
|
|
11
|
-
/**
|
|
12
|
-
* Under disk pressure, reclaim generated dependency caches aggressively while
|
|
13
|
-
* keeping source worktrees and stricter worktree deletion rules unchanged.
|
|
14
|
-
*/
|
|
15
|
-
export declare function applyDiskPressureToRetention(retention: ResolvedHarnessRetention, pressure: CleanupDiskPressureShape): ResolvedHarnessRetention;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { CleanupCandidate } from "./cleanup-types.js";
|
|
2
|
-
import type { ScanHarnessOptions } from "./cleanup-scan.js";
|
|
3
|
-
/**
|
|
4
|
-
* Secondary git worktrees under the harness layout that are not indexed
|
|
5
|
-
* (aborted duplicate attempts). Salvage guards (orphan safety) run at evaluation
|
|
6
|
-
* time — do not run per-worktree `git status` during the scan pass.
|
|
7
|
-
*/
|
|
8
|
-
export declare function scanDuplicateWorktreeCandidates(opts: ScanHarnessOptions): CleanupCandidate[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { CleanupAction, CleanupSkipReason } from "./cleanup-types.js";
|
|
2
|
-
export declare function collectPreservedLivePaths(actions: CleanupAction[], skips: Array<{
|
|
3
|
-
path: string;
|
|
4
|
-
reason: CleanupSkipReason;
|
|
5
|
-
detail?: string;
|
|
6
|
-
}>): Array<{
|
|
7
|
-
path: string;
|
|
8
|
-
reason: CleanupSkipReason;
|
|
9
|
-
detail?: string;
|
|
10
|
-
}>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CleanupAction, CleanupCandidate } from "./cleanup-types.js";
|
|
2
|
-
export { isHarnessBuildCachePath, isHarnessNextCachePath, isHarnessNodeModulesPath } from "./cleanup-harness-path-validate.js";
|
|
3
|
-
export declare function removeNodeModules(candidate: CleanupCandidate, execute: boolean): CleanupAction;
|
|
4
|
-
export declare function removeNextCache(candidate: CleanupCandidate, execute: boolean): CleanupAction;
|
|
5
|
-
export declare function removeBuildCache(candidate: CleanupCandidate, execute: boolean): CleanupAction;
|
|
6
|
-
export declare function removeRunDirectory(candidate: CleanupCandidate, execute: boolean): CleanupAction;
|
|
7
|
-
export declare function removeWorktree(candidate: CleanupCandidate, execute: boolean): CleanupAction;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { GitCaptureResult } from "./git.js";
|
|
2
|
-
/** Bounded git work during broad cleanup scans — hung repos must not stall the sweep. */
|
|
3
|
-
export declare const CLEANUP_GIT_PROBE_TIMEOUT_MS = 5000;
|
|
4
|
-
export declare function cleanupGitCapture(cwd: string, args: string[]): GitCaptureResult;
|
|
5
|
-
export declare function gitStatusShortForCleanup(worktreePath: string): string[] | null;
|
package/dist/cleanup-guards.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { CleanupGitStatusCache } from "./cleanup-git-status-cache.js";
|
|
2
|
-
import type { CleanupSkipReason, WorktreeRemovalGuardHook } from "./cleanup-types.js";
|
|
3
|
-
import type { IndexedWorktree } from "./cleanup-worktree-index.js";
|
|
4
|
-
import type { CleanupRunLivenessContext } from "./cleanup-run-liveness.js";
|
|
5
|
-
export { materialWorktreeChanges } from "./cleanup-guards-helpers.js";
|
|
6
|
-
export { isLandedGitAncestry, isPrOrUnmergedWork } from "./cleanup-worktree-salvage.js";
|
|
7
|
-
export interface WorktreeGuardInput {
|
|
8
|
-
indexed: IndexedWorktree | null;
|
|
9
|
-
/** Resolved worktree directory (required for overlay guards on orphans). */
|
|
10
|
-
worktreePath: string;
|
|
11
|
-
includeOrphans: boolean;
|
|
12
|
-
worktreesAgeMs: number;
|
|
13
|
-
/** Shorter age gate for harness runs already marked terminal. */
|
|
14
|
-
terminalWorktreesAgeMs: number;
|
|
15
|
-
ageMs: number;
|
|
16
|
-
/**
|
|
17
|
-
* Filesystem-derived skip reason for orphan candidates (computed by
|
|
18
|
-
* `assessOrphanWorktreeSafety`). Used only when `indexed` is null.
|
|
19
|
-
*/
|
|
20
|
-
orphanSafety?: CleanupSkipReason | null;
|
|
21
|
-
worktreeRemovalGuard?: WorktreeRemovalGuardHook;
|
|
22
|
-
liveness?: CleanupRunLivenessContext;
|
|
23
|
-
now?: number;
|
|
24
|
-
harnessRoot?: string;
|
|
25
|
-
/** When true (execute mode), persist salvage evidence before allowing removal. */
|
|
26
|
-
writeSalvageEvidence?: boolean;
|
|
27
|
-
}
|
|
28
|
-
export type WorktreeGuardSkip = CleanupSkipReason | {
|
|
29
|
-
reason: CleanupSkipReason;
|
|
30
|
-
detail?: string;
|
|
31
|
-
};
|
|
32
|
-
export declare function skipWorktreeRemoval(input: WorktreeGuardInput): WorktreeGuardSkip | null;
|
|
33
|
-
export interface NodeModulesGuardInput {
|
|
34
|
-
indexed: IndexedWorktree | null;
|
|
35
|
-
includeOrphans: boolean;
|
|
36
|
-
nodeModulesAgeMs: number;
|
|
37
|
-
ageMs: number;
|
|
38
|
-
}
|
|
39
|
-
export interface DependencyCacheGuardInput extends NodeModulesGuardInput {
|
|
40
|
-
worktreePath: string;
|
|
41
|
-
activeWorktreePaths: Set<string>;
|
|
42
|
-
diskPressure?: boolean;
|
|
43
|
-
gitStatusCache?: CleanupGitStatusCache;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Dependency caches (`node_modules`, `.next`) are safe to drop when the worker
|
|
47
|
-
* process is dead and source files remain — even if the board still shows
|
|
48
|
-
* completion/landing/PR blockers. Whole-worktree removal stays strict.
|
|
49
|
-
*/
|
|
50
|
-
export declare function skipDependencyCacheRemoval(input: DependencyCacheGuardInput): CleanupSkipReason | null;
|
|
51
|
-
/** Build caches (`.turbo`, `dist`, etc.) use the same relaxed guards as dependency caches. */
|
|
52
|
-
export declare function skipBuildCacheRemoval(input: DependencyCacheGuardInput): CleanupSkipReason | null;
|
|
53
|
-
export declare function skipNodeModulesRemoval(input: NodeModulesGuardInput): CleanupSkipReason | null;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { CleanupSkipReason } from "./cleanup-types.js";
|
|
2
|
-
export declare function isHarnessNodeModulesPath(targetPath: string, harnessRoot: string, worktreesDir: string): CleanupSkipReason | null;
|
|
3
|
-
export declare function isHarnessNextCachePath(targetPath: string, harnessRoot: string, worktreesDir: string): CleanupSkipReason | null;
|
|
4
|
-
export declare function isHarnessBuildCachePath(targetPath: string, harnessRoot: string, worktreesDir: string): CleanupSkipReason | null;
|
|
5
|
-
export declare function isHarnessGeneratedCachePath(targetPath: string, harnessRoot: string, worktreesDir: string): boolean;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/** Operator-known harness trees that accumulate stale dependency caches. */
|
|
2
|
-
export declare const WELL_KNOWN_HARNESS_SCAN_ROOTS: readonly ["/var/tmp/kynver-harness", string];
|
|
3
|
-
export declare function resolveHarnessScanRoots(options?: {
|
|
4
|
-
harnessRoot?: string;
|
|
5
|
-
scanWellKnown?: boolean;
|
|
6
|
-
}): string[];
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { type RawHarnessWorkerStatus } from "./status.js";
|
|
2
|
-
import type { CleanupGitStatusCache } from "./cleanup-git-status-cache.js";
|
|
3
|
-
import type { CleanupRunLivenessContext } from "./cleanup-run-liveness.js";
|
|
4
|
-
import type { IndexedWorktree } from "./cleanup-worktree-index.js";
|
|
5
|
-
/** Lazily compute worker status — avoids git/stream work for every indexed worker up front. */
|
|
6
|
-
export declare function indexedWorktreeStatus(entry: IndexedWorktree): RawHarnessWorkerStatus;
|
|
7
|
-
/**
|
|
8
|
-
* Porcelain-only dirty probe for dependency-cache guards. Skips ancestry/stream
|
|
9
|
-
* work that whole-worktree removal needs but `node_modules` GC does not.
|
|
10
|
-
*/
|
|
11
|
-
export declare function indexedWorktreeHasMaterialChanges(entry: IndexedWorktree, gitStatusCache?: CleanupGitStatusCache): boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Guard-oriented status: avoids stdout/heartbeat stream parsing for terminal workers
|
|
14
|
-
* while preserving salvage semantics (dirty / PR / landing checks).
|
|
15
|
-
*/
|
|
16
|
-
export declare function resolveWorktreeGuardStatus(entry: IndexedWorktree, ctx?: CleanupRunLivenessContext): RawHarnessWorkerStatus;
|