@kynver-app/runtime 0.1.129 → 0.1.132
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/bounded-build/exec.d.ts +3 -1
- package/dist/cli.js +49 -49
- package/dist/heavy-verification/command-classify.d.ts +9 -0
- package/dist/heavy-verification/index.d.ts +2 -0
- package/dist/heavy-verification/worker-command-gate.d.ts +23 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +64 -64
- package/dist/instruction-bundle/contract.js +2 -2
- package/dist/runner-identity.d.ts +7 -0
- package/dist/server/worker-policy.d.ts +2 -0
- package/dist/server/worker-policy.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type HeavyCommandClass = "full_typecheck" | "full_build" | "vercel_verify" | "paid_compute" | "allowed";
|
|
2
|
+
export interface HeavyCommandClassification {
|
|
3
|
+
heavy: boolean;
|
|
4
|
+
commandClass: HeavyCommandClass;
|
|
5
|
+
reason: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** Pure classifier — unit-tested. */
|
|
8
|
+
export declare function classifyHeavyShellCommand(command: string): HeavyCommandClassification;
|
|
9
|
+
export declare const HEAVY_VERIFICATION_TOKEN_REQUIRED: "heavy_verification_token_required";
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { DEFAULT_HEAVY_VERIFICATION_MAX_CONCURRENT, DEFAULT_HEAVY_VERIFICATION_STALE_MS, assessHeavyVerificationGate, countActiveHeavyVerificationSlots, isHeavyVerificationGateSkipped, listActiveHeavyVerificationSlots, reclaimStaleHeavyVerificationSlots, releaseHeavyVerificationSlot, resolveHeavyVerificationMaxConcurrent, tryAcquireHeavyVerificationSlot, type HeavyVerificationGateVerdict, type HeavyVerificationSlotRecord, } from "./slot.js";
|
|
2
2
|
export { waitForHeavyVerificationSlot } from "./gate.js";
|
|
3
|
+
export { classifyHeavyShellCommand, HEAVY_VERIFICATION_TOKEN_REQUIRED, type HeavyCommandClassification, type HeavyCommandClass, } from "./command-classify.js";
|
|
4
|
+
export { gateWorkerShellCommand, type GateWorkerShellCommandOpts, type WorkerCommandGateOutcome, type WorkerCommandGateResult, } from "./worker-command-gate.js";
|
|
3
5
|
export { ensureHeavyVerificationDirs, heavyVerificationSlotsDir, resolveHeavyVerificationRoot, } from "./paths.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { classifyHeavyShellCommand, HEAVY_VERIFICATION_TOKEN_REQUIRED } from "./command-classify.js";
|
|
2
|
+
import { type HeavyVerificationGateVerdict } from "./slot.js";
|
|
3
|
+
export { HEAVY_VERIFICATION_TOKEN_REQUIRED };
|
|
4
|
+
export type WorkerCommandGateOutcome = typeof HEAVY_VERIFICATION_TOKEN_REQUIRED | "allowed" | "heavy_verification_skipped";
|
|
5
|
+
export interface WorkerCommandGateResult {
|
|
6
|
+
allowed: boolean;
|
|
7
|
+
outcome: WorkerCommandGateOutcome;
|
|
8
|
+
commandClass: ReturnType<typeof classifyHeavyShellCommand>["commandClass"];
|
|
9
|
+
reason: string;
|
|
10
|
+
verificationGate: HeavyVerificationGateVerdict & {
|
|
11
|
+
slotId: string | null;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface GateWorkerShellCommandOpts {
|
|
15
|
+
/** Max ms to wait for a heavy-verification slot (0 = fail fast). */
|
|
16
|
+
waitMs?: number;
|
|
17
|
+
pollMs?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Gate a shell command before spawn. Heavy commands require an admitted slot;
|
|
21
|
+
* denied attempts return a typed refusal (never a silent hang).
|
|
22
|
+
*/
|
|
23
|
+
export declare function gateWorkerShellCommand(command: string, opts?: GateWorkerShellCommandOpts): WorkerCommandGateResult;
|
package/dist/index.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export { isActiveHarnessWorker } from "./harness-worker-active.js";
|
|
|
42
42
|
export { sweepRun } from "./sweep.js";
|
|
43
43
|
export { completeWorker, runStatus, workerStatus, tailWorker, stopWorker } from "./worker-ops.js";
|
|
44
44
|
export { autoCompleteWorker, autoCompleteWorkerCli, spawnCompletionSidecar, type AutoCompleteArgs, type AutoCompleteOutcome, type SpawnSidecarOptions, type SpawnedSidecar, } from "./auto-complete.js";
|
|
45
|
-
export { loadUserConfig, saveUserConfig, resolveBaseUrl, resolveCallbackSecret, resolveCallbackSecretWithMint, parseArgs, } from "./config.js";
|
|
45
|
+
export { loadUserConfig, saveUserConfig, resolveBaseUrl, tryResolveBaseUrl, resolveCallbackSecret, resolveCallbackSecretWithMint, tryResolveCallbackSecretWithMint, parseArgs, } from "./config.js";
|
|
46
46
|
export { discoverDefaultRepo, discoverDefaultRepoCandidates, isKynverMonorepoRoot, gitRepoRoot, type DiscoveredDefaultRepo, type DefaultRepoDiscoverySource, } from "./default-repo-discovery.js";
|
|
47
47
|
export { resolveDefaultRepo, persistDefaultRepo, remediateDefaultRepo, formatResolvedDefaultRepo, type ResolvedDefaultRepo, type DefaultRepoSource, } from "./default-repo.js";
|
|
48
48
|
export { getHarnessPaths, harnessRunsDir, harnessWorktreesDir, normalizeHarnessRoot, resolveHarnessRoot, } from "./paths.js";
|
|
@@ -61,7 +61,7 @@ export { canonicalWorkerDir, hasNestedRunsSegment, repairNestedRunsPath, resolve
|
|
|
61
61
|
export { runDaemon } from "./daemon.js";
|
|
62
62
|
export { runHarnessVerifyCommands, DEFAULT_HARNESS_VERIFY_COMMANDS, type HarnessVerifySummary, type HarnessVerifyStep, } from "./harness-verify.js";
|
|
63
63
|
export { runBoundedBuildCheck, assessBuildAdmission, mergeNodeOptionsForBuildCheck, buildSystemdRunArgv, isSystemdRunAvailable, readMemAvailableBytes, type BoundedBuildExecResult, type BuildAdmissionVerdict, } from "./bounded-build/index.js";
|
|
64
|
-
export { assessHeavyVerificationGate, countActiveHeavyVerificationSlots, isHeavyVerificationGateSkipped, listActiveHeavyVerificationSlots, reclaimStaleHeavyVerificationSlots, releaseHeavyVerificationSlot, resolveHeavyVerificationMaxConcurrent, tryAcquireHeavyVerificationSlot, waitForHeavyVerificationSlot, DEFAULT_HEAVY_VERIFICATION_MAX_CONCURRENT, type HeavyVerificationGateVerdict, type HeavyVerificationSlotRecord, } from "./heavy-verification/index.js";
|
|
64
|
+
export { assessHeavyVerificationGate, countActiveHeavyVerificationSlots, isHeavyVerificationGateSkipped, listActiveHeavyVerificationSlots, reclaimStaleHeavyVerificationSlots, releaseHeavyVerificationSlot, resolveHeavyVerificationMaxConcurrent, tryAcquireHeavyVerificationSlot, waitForHeavyVerificationSlot, DEFAULT_HEAVY_VERIFICATION_MAX_CONCURRENT, classifyHeavyShellCommand, gateWorkerShellCommand, HEAVY_VERIFICATION_TOKEN_REQUIRED, type HeavyCommandClass, type HeavyCommandClassification, type HeavyVerificationGateVerdict, type HeavyVerificationSlotRecord, type WorkerCommandGateOutcome, type WorkerCommandGateResult, } from "./heavy-verification/index.js";
|
|
65
65
|
export { assessAutoCompleteEligibility, classifyWorkerHealth, getMonitorStatus, listMonitors, runMonitorTick, spawnMonitorSidecar, type AutoCompleteAssessment, type MonitorTickResult, type TaskLeaseSnapshot, type WorkerHealthClass, type WorkerMonitorView, } from "./monitor/index.js";
|
|
66
66
|
export { formatHarnessToolReadable, formatMonitorTickNotice, formatAutoCompleteOutcomeNotice, formatWorkerStatusNotice, formatWorkerCompleteNotice, joinHarnessNotice, type HarnessReadableNotice, type HarnessToolFormatContext, } from "./harness-notice/index.js";
|
|
67
67
|
export { persistPlan, drainPlanOutbox, listOutboxItems, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
|