@kynver-app/runtime 0.1.172 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +12 -1
  2. package/dist/chat/command-auth-proof.js +1 -1
  3. package/dist/cli.js +59 -58
  4. package/dist/completion-response.d.ts +1 -1
  5. package/dist/config.d.ts +2 -0
  6. package/dist/context-budget-receipt.d.ts +96 -0
  7. package/dist/daemon-heartbeat.d.ts +7 -0
  8. package/dist/daemon-supervision/index.d.ts +1 -0
  9. package/dist/daemon-supervision/setup.d.ts +10 -1
  10. package/dist/daemon-supervision/supervision-health.d.ts +20 -0
  11. package/dist/daemon-supervision/verify.d.ts +1 -0
  12. package/dist/dispatch-model-guard.d.ts +26 -0
  13. package/dist/dispatch-resource-gate.d.ts +20 -0
  14. package/dist/doctor/context-envelope-cli.d.ts +1 -0
  15. package/dist/doctor/context-envelope.d.ts +13 -0
  16. package/dist/doctor/context-envelope.probes.d.ts +25 -0
  17. package/dist/doctor/context-envelope.types.d.ts +42 -0
  18. package/dist/doctor/github-readiness.d.ts +16 -0
  19. package/dist/doctor/index.d.ts +3 -0
  20. package/dist/doctor/node-runtime-cli.d.ts +6 -0
  21. package/dist/doctor/node-runtime.d.ts +19 -0
  22. package/dist/doctor/runtime-takeover-deploy-evidence.d.ts +9 -0
  23. package/dist/doctor/runtime-takeover.probes.d.ts +5 -0
  24. package/dist/executor-ref-routing.d.ts +14 -0
  25. package/dist/factory-steer-delivery.d.ts +7 -0
  26. package/dist/index.d.ts +11 -1
  27. package/dist/index.js +85 -75
  28. package/dist/landing/land-pr-check-classify.d.ts +11 -0
  29. package/dist/model-routing.d.ts +1 -1
  30. package/dist/node-runtime-policy.d.ts +25 -0
  31. package/dist/node-runtime-policy.js +1 -0
  32. package/dist/paths.d.ts +1 -1
  33. package/dist/prompt.d.ts +36 -2
  34. package/dist/providers/claude.d.ts +2 -0
  35. package/dist/providers/cursor.d.ts +2 -0
  36. package/dist/providers/types.d.ts +4 -0
  37. package/dist/review-head-reconcile.d.ts +17 -0
  38. package/dist/run-store.d.ts +6 -0
  39. package/dist/runner-boundary/index.d.ts +6 -0
  40. package/dist/runner-boundary/runner-boundary.dispatch-guard.d.ts +4 -0
  41. package/dist/runner-boundary/runner-boundary.forge-legacy-migration.d.ts +23 -0
  42. package/dist/runner-boundary/runner-boundary.harness-root.d.ts +17 -0
  43. package/dist/runner-boundary/runner-boundary.resolve.d.ts +4 -0
  44. package/dist/runner-boundary/runner-boundary.run-guard.d.ts +12 -0
  45. package/dist/runner-boundary/runner-boundary.types.d.ts +31 -0
  46. package/dist/runner-config-backfill.d.ts +18 -0
  47. package/dist/runtime-identity.d.ts +9 -0
  48. package/dist/runtime-memory-envelope.d.ts +16 -0
  49. package/dist/security-review-environment.d.ts +27 -0
  50. package/dist/server/cleanup.js +14 -14
  51. package/dist/server/default-repo.js +1 -1
  52. package/dist/server/monitor.js +7 -7
  53. package/dist/server/worker-policy.d.ts +2 -0
  54. package/dist/server/worker-policy.js +1 -1
  55. package/dist/status.d.ts +9 -0
  56. package/dist/supervisor.d.ts +2 -0
  57. package/dist/worker-execution-mode.d.ts +5 -0
  58. package/package.json +4 -3
@@ -0,0 +1,11 @@
1
+ export declare function checkName(check: Record<string, unknown>): string;
2
+ /** Collapse rollup to the latest run per check name so stale failures do not block landing. */
3
+ export declare function collapseCheckRollupByName(statusCheckRollup: unknown[] | undefined): Record<string, unknown>[];
4
+ export declare function isGitHubActionsCheck(check: Record<string, unknown>): boolean;
5
+ export declare function classifyChecks(statusCheckRollup: unknown[] | undefined): {
6
+ pending: string[];
7
+ failed: string[];
8
+ ignoredActions: string[];
9
+ };
10
+ export declare function vercelCheckSuccess(statusCheckRollup: unknown[] | undefined): boolean;
11
+ export declare function mergeStateReadinessError(mergeStateStatus: string, checks: ReturnType<typeof classifyChecks>): string | null;
@@ -31,7 +31,7 @@ export declare function resolveClaudeFactoryModel(roleLane: string, ref: string,
31
31
  * pass an explicit `--model`. Explicit CLI/model args always win.
32
32
  */
33
33
  export declare function inferModelRoutingFromTask(task: Record<string, unknown>): ModelRoutingDecision;
34
- /** Resolve launch parameters: explicit CLI wins, then task inference, then global default. */
34
+ /** Resolve launch parameters: explicit CLI wins, then executorRef intent, then task inference. */
35
35
  export declare function resolveWorkerLaunch(input: {
36
36
  explicitModel?: string;
37
37
  explicitProvider?: string;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Node 24 migration N2b — the ONE shared semantic-version policy contract.
3
+ *
4
+ * The comparator takes the engine range as a parameter: one comparison
5
+ * engine, two contracts. Published CLI/MCP artifacts use the unbounded
6
+ * range; the private root app is bounded per-major. Do NOT duplicate this
7
+ * comparison logic anywhere (N2d wraps it; the server diagnostic imports
8
+ * it). During N2b the policy is report-only: callers may classify, but
9
+ * nothing gates startup on the verdict.
10
+ */
11
+ export declare const KYNVER_NODE_PATCH_FLOOR = "24.11.0";
12
+ /** Engine contract for published runtime-coupled packages (unbounded). */
13
+ export declare const PUBLISHED_NODE_RANGE = ">=24.11.0";
14
+ /** Engine contract for the private root app (bounded per qualified major). */
15
+ export declare const PRIVATE_ROOT_NODE_RANGE = ">=24.11.0 <25";
16
+ export type NodeRuntimePolicyStatus = "compatible" | "upgrade_required" | "unsupported_major" | "invalid_version";
17
+ export interface NodeRuntimePolicyVerdict {
18
+ status: NodeRuntimePolicyStatus;
19
+ /** Normalized (no leading `v`) version that was evaluated, or the raw input when invalid. */
20
+ currentVersion: string;
21
+ requiredRange: string;
22
+ /** Bounded operator guidance; never environment values or paths. */
23
+ remediation: string | null;
24
+ }
25
+ export declare function evaluateNodeRuntimePolicy(rawVersion: string, requiredRange?: string): NodeRuntimePolicyVerdict;
@@ -0,0 +1 @@
1
+ var a="24.11.0",l=">=24.11.0",d=">=24.11.0 <25";function s(r){let e=r.trim().replace(/^v/,""),o=/^(\d+)\.(\d+)\.(\d+)$/.exec(e);return o?{major:Number(o[1]),minor:Number(o[2]),patch:Number(o[3])}:null}function u(r,e){return r.major!==e.major?r.major-e.major:r.minor!==e.minor?r.minor-e.minor:r.patch-e.patch}function c(r){let e=r.trim().split(/\s+/),o=null,i=null;for(let t of e)if(t.startsWith(">="))o=s(t.slice(2));else if(t.startsWith("<")){let n=t.slice(1);i=s(n)??(/^\d+$/.test(n)?{major:Number(n),minor:0,patch:0}:null)}if(!o)throw new Error(`Unsupported node policy range: ${r}`);return{floor:o,below:i}}function m(r,e=l){let{floor:o,below:i}=c(e),t=s(r);if(!t)return{status:"invalid_version",currentVersion:r.trim(),requiredRange:e,remediation:`Node version could not be parsed as X.Y.Z (prereleases are unsupported). Install Node ${a} or a later release within the supported range.`};let n=`${t.major}.${t.minor}.${t.patch}`;return u(t,o)<0?{status:"upgrade_required",currentVersion:n,requiredRange:e,remediation:`Upgrade Node to >=${a}. See docs/runbooks/node-24-fleet-migration.md for the per-host procedure.`}:i&&u(t,i)>=0?{status:"unsupported_major",currentVersion:n,requiredRange:e,remediation:`Node ${t.major}.x is newer than this artifact's qualified range (${e}). Use a qualified Node major or wait for the next runtime qualification.`}:{status:"compatible",currentVersion:n,requiredRange:e,remediation:null}}export{a as KYNVER_NODE_PATCH_FLOOR,d as PRIVATE_ROOT_NODE_RANGE,l as PUBLISHED_NODE_RANGE,m as evaluateNodeRuntimePolicy};
package/dist/paths.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Server mirror: agent-os.harness-root.ts
5
5
  */
6
6
  export declare function normalizeHarnessRoot(root: string): string;
7
- /** Canonical harness root for CLI/workers. */
7
+ /** Canonical harness root for CLI/workers (box-scoped when identity is known). */
8
8
  export declare function resolveHarnessRoot(): string;
9
9
  export declare function harnessRunsDir(harnessRoot: string): string;
10
10
  export declare function harnessWorktreesDir(harnessRoot: string): string;
package/dist/prompt.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export declare function buildPrompt(input: {
1
+ import { type ContextBudgetReceiptSurface, type ContextEnvelopeMode, type RuntimeContextBudgetReceiptV2 } from "./context-budget-receipt.js";
2
+ export type BuildPromptInput = {
2
3
  task: string;
3
4
  ownedPaths: string[];
4
5
  worktreePath: string;
@@ -19,4 +20,37 @@ export declare function buildPrompt(input: {
19
20
  model?: string;
20
21
  repairTargetPrUrl?: string;
21
22
  repairTargetBranch?: string;
22
- }): string;
23
+ agentOsId?: string | null;
24
+ personaSlug?: string | null;
25
+ mode?: ContextEnvelopeMode;
26
+ /**
27
+ * Package-safe kill-switch gate (PR3): when true, the hard-cap engine is
28
+ * active and `budgetSatisfied` on the receipt reflects live enforcement.
29
+ * Callers read `KYNVER_CONTEXT_BUDGET_ENFORCEMENT` server-side and pass
30
+ * the resolved boolean so the runtime package stays env-free.
31
+ * Defaults to false (shadow mode: measure and report, never truncate).
32
+ */
33
+ enforcementEnabled?: boolean;
34
+ /** Operator steer overlay from dispatch-next harnessWorkerContext. */
35
+ steerOverlayMarkdown?: string | null;
36
+ reviewOnly?: boolean;
37
+ };
38
+ export declare function buildPrompt(input: BuildPromptInput): string;
39
+ export declare function buildPromptWithReceipt(input: BuildPromptInput & {
40
+ surface?: ContextBudgetReceiptSurface;
41
+ generatedAt?: string;
42
+ }): {
43
+ prompt: string;
44
+ receipt: RuntimeContextBudgetReceiptV2;
45
+ };
46
+ /**
47
+ * Prompt hard-cap constants exposed for tests and diagnostics (PR3).
48
+ * All measurements are in chars (runtime prompt is built as a JS string).
49
+ * Pass `enforcementEnabled: true` in BuildPromptInput to activate enforcement;
50
+ * callers read KYNVER_CONTEXT_BUDGET_ENFORCEMENT server-side — do not read
51
+ * env vars inside the runtime package (package-safe contract).
52
+ */
53
+ export declare const RUNTIME_PROMPT_ENFORCEMENT: {
54
+ readonly hardCapChars: 200000;
55
+ readonly safeFloorChars: 500;
56
+ };
@@ -1,6 +1,8 @@
1
1
  import type { WorkerProvider } from "./types.js";
2
+ import type { WorkerProviderStartOptions } from "./types.js";
2
3
  /** Provider default when no explicit model is passed — Sonnet, not Opus. */
3
4
  export declare const CLAUDE_DEFAULT_MODEL = "claude-sonnet-4-6";
4
5
  /** Model for review/gate/critique lanes when dispatched on the claude provider. */
5
6
  export declare const CLAUDE_REVIEW_MODEL = "claude-opus-4-8";
6
7
  export declare const claudeProvider: WorkerProvider;
8
+ export declare function buildClaudeProviderArgs(opts: Pick<WorkerProviderStartOptions, "executionMode" | "prompt">, model: string): string[];
@@ -1,4 +1,5 @@
1
1
  import type { WorkerProvider } from "./types.js";
2
+ import type { WorkerProviderStartOptions } from "./types.js";
2
3
  export interface CursorSpawnTarget {
3
4
  executable: string;
4
5
  prefixArgs: string[];
@@ -9,3 +10,4 @@ export interface CursorSpawnTarget {
9
10
  /** Resolve a headless Windows spawn target (node.exe + index.js), never agent.cmd via shell. */
10
11
  export declare function resolveCursorSpawn(agentBin: string): CursorSpawnTarget;
11
12
  export declare const cursorProvider: WorkerProvider;
13
+ export declare function buildCursorProviderArgs(opts: Pick<WorkerProviderStartOptions, "executionMode" | "worktreePath" | "prompt">, model: string, prefixArgs?: string[]): string[];
@@ -11,6 +11,10 @@ export interface WorkerProviderStartOptions {
11
11
  heartbeatPath: string;
12
12
  /** Fully built agent prompt passed to the provider CLI. */
13
13
  prompt: string;
14
+ /** Expert/security review lane — spawn env blocks prod DB resolution (LB1). */
15
+ reviewWorker?: boolean;
16
+ /** Provider-enforced worker capability mode. */
17
+ executionMode?: import("../worker-execution-mode.js").WorkerExecutionMode;
14
18
  }
15
19
  export interface WorkerProviderStartResult {
16
20
  pid: number;
@@ -0,0 +1,17 @@
1
+ export interface ReviewHeadReconcileResponse {
2
+ ok?: boolean;
3
+ dispatchable?: boolean;
4
+ outcome?: string;
5
+ reason?: string | null;
6
+ reviewTaskId?: string;
7
+ activeReviewTaskId?: string | null;
8
+ reviewTargetSha?: string | null;
9
+ merged?: boolean;
10
+ }
11
+ export declare function taskLooksLikeReviewDispatch(task: Record<string, unknown>): boolean;
12
+ export declare function reconcileReviewHeadBeforeWorkerStart(input: {
13
+ agentOsId: string;
14
+ taskId: string;
15
+ baseUrl: string;
16
+ secret: string;
17
+ }): Promise<ReviewHeadReconcileResponse | null>;
@@ -11,6 +11,12 @@ export interface HarnessRunRecord {
11
11
  workerDir: string;
12
12
  statusPath: string;
13
13
  }>;
14
+ /** Physical pool that owns this run (`ghost` | `forge`). */
15
+ boxKind?: string;
16
+ /** Stable runner id that claimed this run namespace. */
17
+ runnerId?: string;
18
+ /** Harness root path isolating this run from other pools. */
19
+ harnessRoot?: string;
14
20
  }
15
21
  export declare function getPaths(): {
16
22
  harnessRoot: string;
@@ -0,0 +1,6 @@
1
+ export * from "./runner-boundary.types.js";
2
+ export * from "./runner-boundary.harness-root.js";
3
+ export * from "./runner-boundary.resolve.js";
4
+ export * from "./runner-boundary.run-guard.js";
5
+ export * from "./runner-boundary.dispatch-guard.js";
6
+ export * from "./runner-boundary.forge-legacy-migration.js";
@@ -0,0 +1,4 @@
1
+ import type { RunnerBoundaryIdentity, RunnerBoundaryValidation } from "./runner-boundary.types.js";
2
+ export declare function validateInteractiveDispatchBoundary(env?: NodeJS.ProcessEnv): RunnerBoundaryValidation;
3
+ export declare function formatRunnerBoundaryFailure(validation: RunnerBoundaryValidation): string;
4
+ export declare function assertInteractiveDispatchBoundaryOrThrow(env?: NodeJS.ProcessEnv): RunnerBoundaryIdentity;
@@ -0,0 +1,23 @@
1
+ export type ForgeLegacyMigrationVerdict = {
2
+ action: "none";
3
+ } | {
4
+ action: "migrate";
5
+ } | {
6
+ action: "blocked";
7
+ blocker: string;
8
+ };
9
+ /** True when the forge box-scoped root has no harness layout yet. */
10
+ export declare function isForgeScopedHarnessRootEmpty(forgeRoot: string): boolean;
11
+ /** True when the legacy shared harness root still has run records on disk. */
12
+ export declare function legacySharedHarnessHasRuns(sharedRoot: string): boolean;
13
+ /**
14
+ * Ghost is co-hosted when a ghost pool namespace exists or shared runs are
15
+ * attributed to ghost — moving forge legacy content would orphan ghost work.
16
+ */
17
+ export declare function isGhostCoHostedAtHarnessRoot(sharedRoot: string): boolean;
18
+ export declare function assessForgeLegacyHarnessMigration(input: {
19
+ sharedRoot: string;
20
+ forgeRoot: string;
21
+ }): ForgeLegacyMigrationVerdict;
22
+ /** Move legacy shared runs/worktrees into the empty forge box-scoped root. */
23
+ export declare function executeForgeLegacyHarnessMigration(sharedRoot: string, forgeRoot: string): void;
@@ -0,0 +1,17 @@
1
+ import type { WorkerPoolBoxKind } from "../box-identity.js";
2
+ import type { HarnessRootResolution } from "./runner-boundary.types.js";
3
+ /** Strip mistaken trailing `runs` / `worktrees` segments from a harness root path. */
4
+ export declare function normalizeHarnessRootPath(root: string): string;
5
+ /** Per-pool namespace under ~/.kynver/harness/{ghost|forge}. */
6
+ export declare function boxScopedHarnessRoot(boxKind: WorkerPoolBoxKind, env?: NodeJS.ProcessEnv): string;
7
+ /**
8
+ * Resolve the on-disk harness root for a runner boundary.
9
+ * Order: env → config.harnessRoot → box-scoped dir → legacy shared (ghost only).
10
+ */
11
+ export declare function resolveHarnessRootForRunnerBoundary(input: {
12
+ boxKind: WorkerPoolBoxKind;
13
+ configuredHarnessRoot?: string | null;
14
+ env?: NodeJS.ProcessEnv;
15
+ /** When false, assess migration but do not move on-disk layout (tests). */
16
+ allowForgeLegacyMigration?: boolean;
17
+ }): HarnessRootResolution;
@@ -0,0 +1,4 @@
1
+ import type { KynverUserConfig } from "../config.js";
2
+ import type { RunnerBoundaryResolveOptions, RunnerBoundaryValidation } from "./runner-boundary.types.js";
3
+ export declare function deriveDefaultRunnerId(boxKind: string, hostname: string): string;
4
+ export declare function resolveRunnerBoundary(config?: KynverUserConfig, env?: NodeJS.ProcessEnv, options?: RunnerBoundaryResolveOptions): RunnerBoundaryValidation;
@@ -0,0 +1,12 @@
1
+ import type { HarnessRunRecord } from "../run-store.js";
2
+ import type { RunnerBoundaryIdentity } from "./runner-boundary.types.js";
3
+ export interface RunBoundaryGuardResult {
4
+ ok: boolean;
5
+ reason?: string;
6
+ stamped?: boolean;
7
+ }
8
+ /**
9
+ * Ensure a harness run belongs to the active runner boundary.
10
+ * Legacy runs without stamps are migrated in-place on first dispatch.
11
+ */
12
+ export declare function assertRunMatchesRunnerBoundary(run: HarnessRunRecord, boundary: RunnerBoundaryIdentity): RunBoundaryGuardResult;
@@ -0,0 +1,31 @@
1
+ import type { BoxKindSource, WorkerPoolBoxKind } from "../box-identity.js";
2
+ import type { WorkerCapSource } from "../worker-cap-source.js";
3
+ export type HarnessRootSource = "env" | "config" | "box_scoped" | "legacy_shared" | "legacy_migrated";
4
+ export interface HarnessRootResolution {
5
+ harnessRoot: string;
6
+ source: HarnessRootSource;
7
+ /** Set when Forge legacy migration is required but blocked pending operator sign-off. */
8
+ migrationBlocker?: string;
9
+ }
10
+ export interface RunnerBoundaryIdentity {
11
+ boxKind: WorkerPoolBoxKind;
12
+ boxKindSource: BoxKindSource;
13
+ runnerId: string;
14
+ runnerIdSource: "config" | "env" | "derived";
15
+ maxConcurrentWorkers: number;
16
+ workerCapSource: WorkerCapSource;
17
+ harnessRoot: string;
18
+ harnessRootSource: HarnessRootSource;
19
+ }
20
+ export interface RunnerBoundaryValidation {
21
+ ok: boolean;
22
+ identity: RunnerBoundaryIdentity | null;
23
+ errors: string[];
24
+ warnings: string[];
25
+ }
26
+ export interface RunnerBoundaryResolveOptions {
27
+ /** Interactive dispatch always requires explicit box kind (config or env). */
28
+ requireExplicitBoxKind?: boolean;
29
+ /** Treat slug-only env as a hard error (daemon strict mode). */
30
+ strict?: boolean;
31
+ }
@@ -0,0 +1,18 @@
1
+ import { type KynverUserConfig } from "./config.js";
2
+ export interface RunnerConfigBackfillResult {
3
+ updated: boolean;
4
+ fields: string[];
5
+ skippedAmbiguous: string[];
6
+ }
7
+ /**
8
+ * Safe migration/backfill of ~/.kynver/config.json from env and scoped credentials.
9
+ * Never adopts ambiguous workspace identity or writes raw tokens.
10
+ */
11
+ export declare function buildRunnerConfigBackfillUpdates(config: KynverUserConfig, env?: NodeJS.ProcessEnv): {
12
+ updates: Partial<KynverUserConfig>;
13
+ fields: string[];
14
+ skippedAmbiguous: string[];
15
+ };
16
+ export declare function backfillRunnerConfigFromLegacySources(opts?: {
17
+ dryRun?: boolean;
18
+ }): RunnerConfigBackfillResult;
@@ -0,0 +1,9 @@
1
+ export interface RuntimeIdentityV1 {
2
+ contractVersion: 1;
3
+ nodeVersion: string;
4
+ runtimePackageVersion: string;
5
+ buildIdentity: string | null;
6
+ platform: NodeJS.Platform;
7
+ arch: string;
8
+ }
9
+ export declare function buildRuntimeIdentity(): RuntimeIdentityV1;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Dependency-free runtime-memory-envelope v2 schema + flag helpers for harness hosts.
3
+ */
4
+ export declare const AGENT_RUNTIME_ENVELOPE_SCHEMA_VERSION: "runtime-memory-envelope.v1";
5
+ export declare const AGENT_RUNTIME_ENVELOPE_SCHEMA_VERSION_V2: "runtime-memory-envelope.v2";
6
+ export declare const AGENT_RUNTIME_ENVELOPE_SCHEMA_VERSIONS: readonly ["runtime-memory-envelope.v1", "runtime-memory-envelope.v2"];
7
+ export type AgentRuntimeEnvelopeSchemaVersion = (typeof AGENT_RUNTIME_ENVELOPE_SCHEMA_VERSIONS)[number];
8
+ export declare function runtimeEnvelopeV2Enabled(): boolean;
9
+ export type RuntimeEnvelopeFlagSource = "env_explicit_on" | "env_explicit_off" | "default_off";
10
+ export interface RuntimeEnvelopeWriterConfig {
11
+ schemaVersion: AgentRuntimeEnvelopeSchemaVersion;
12
+ v2WriterEnabled: boolean;
13
+ effectiveSource: RuntimeEnvelopeFlagSource;
14
+ }
15
+ export declare function resolveRuntimeEnvelopeWriterConfig(): RuntimeEnvelopeWriterConfig;
16
+ export declare function isAgentRuntimeEnvelopeSchemaVersion(value: string): value is AgentRuntimeEnvelopeSchemaVersion;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * LB1 — review workers must not receive unrestricted production DB credentials.
3
+ * Spawn sets KYNVER_NO_PROD_DB_CREDENTIALS; db-credential-resolver refuses when set.
4
+ */
5
+ /** Truthy when the worker is a source-only / expert review lane (no prod DB). */
6
+ export declare const KYNVER_NO_PROD_DB_CREDENTIALS_ENV = "KYNVER_NO_PROD_DB_CREDENTIALS";
7
+ /** Extra env keys stripped for review workers (operator file pointers). */
8
+ export declare const REVIEW_WORKER_EXTRA_FORBIDDEN_ENV_KEYS: readonly ["KYNVER_ENV_FILE"];
9
+ export declare function isNoProdCredentialReviewEnvironment(env: NodeJS.ProcessEnv): boolean;
10
+ export interface BuildWorkerSpawnEnvOptions {
11
+ reviewWorker?: boolean;
12
+ }
13
+ export declare function buildWorkerSpawnEnv(hostEnv: NodeJS.ProcessEnv, opts?: BuildWorkerSpawnEnvOptions): NodeJS.ProcessEnv;
14
+ export declare class ProductionDatabaseCredentialBlockedError extends Error {
15
+ constructor();
16
+ }
17
+ export declare function assertProductionDatabaseResolutionAllowed(env: NodeJS.ProcessEnv): void;
18
+ export interface ReviewWorkerCredentialScopeAudit {
19
+ reviewMode: boolean;
20
+ noProdFlagPresent: boolean;
21
+ forbiddenKeysAfterScrub: string[];
22
+ productionDbKeysAbsent: boolean;
23
+ envFilePointerStripped: boolean;
24
+ safe: boolean;
25
+ }
26
+ /** Audit credential scope for diagnostics and security-boundary proofs (no secret values). */
27
+ export declare function auditReviewWorkerCredentialScope(env: NodeJS.ProcessEnv, opts?: BuildWorkerSpawnEnvOptions): ReviewWorkerCredentialScopeAudit;