@kynver-app/runtime 0.1.93 → 0.1.99
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/admission.d.ts +2 -2
- package/dist/bounded-build/exec.d.ts +6 -2
- package/dist/cli.js +752 -420
- package/dist/cli.js.map +4 -4
- package/dist/doctor/runtime-takeover.probes.d.ts +0 -2
- package/dist/harness-verify.d.ts +3 -2
- package/dist/heavy-verification/gate.d.ts +10 -0
- package/dist/heavy-verification/index.d.ts +3 -0
- package/dist/heavy-verification/paths.d.ts +3 -0
- package/dist/heavy-verification/slot.d.ts +49 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1005 -629
- package/dist/index.js.map +4 -4
- package/dist/installed-package-versions.d.ts +2 -0
- package/dist/resource-gate.d.ts +7 -0
- package/dist/vercel/index.d.ts +2 -1
- package/dist/vercel/vercel-api.d.ts +17 -0
- package/dist/vercel/vercel-evidence.d.ts +15 -15
- package/dist/vercel/vercel-url.d.ts +3 -3
- package/package.json +1 -1
|
@@ -36,7 +36,5 @@ export interface RuntimeTakeoverProbes {
|
|
|
36
36
|
legacyOpenclawHarnessRoot(): string;
|
|
37
37
|
pathExists(target: string): boolean;
|
|
38
38
|
pathWritable(target: string): boolean;
|
|
39
|
-
vercelVersion(): CommandProbeResult;
|
|
40
|
-
vercelWhoami(): CommandProbeResult;
|
|
41
39
|
}
|
|
42
40
|
export declare const defaultRuntimeTakeoverProbes: RuntimeTakeoverProbes;
|
package/dist/harness-verify.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ export interface HarnessVerifySummary {
|
|
|
10
10
|
steps: HarnessVerifyStep[];
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
* Run plan/harness verification commands
|
|
14
|
-
*
|
|
13
|
+
* Run plan/harness verification commands through the cross-process heavy-verification
|
|
14
|
+
* gate and memory-bounded subprocess execution. Parallel workers queue here instead
|
|
15
|
+
* of launching simultaneous typecheck/build commands.
|
|
15
16
|
*/
|
|
16
17
|
export declare function runHarnessVerifyCommands(cwd: string, commands?: readonly string[], opts?: {
|
|
17
18
|
waitForAdmissionMs?: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { assessHeavyVerificationGate, tryAcquireHeavyVerificationSlot, type HeavyVerificationGateVerdict } from "./slot.js";
|
|
2
|
+
export declare function sleepMs(ms: number): void;
|
|
3
|
+
/**
|
|
4
|
+
* Poll until a heavy-verification slot is acquired or timeout elapses.
|
|
5
|
+
* Serializes expensive typecheck/build across harness worker processes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function waitForHeavyVerificationSlot(command: string, timeoutMs: number, pollMs?: number, opts?: Parameters<typeof tryAcquireHeavyVerificationSlot>[1]): HeavyVerificationGateVerdict & {
|
|
8
|
+
slotId: string | null;
|
|
9
|
+
};
|
|
10
|
+
export { assessHeavyVerificationGate, type HeavyVerificationGateVerdict };
|
|
@@ -0,0 +1,3 @@
|
|
|
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
|
+
export { waitForHeavyVerificationSlot } from "./gate.js";
|
|
3
|
+
export { ensureHeavyVerificationDirs, heavyVerificationSlotsDir, resolveHeavyVerificationRoot, } from "./paths.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/** Reclaim slots held by dead PIDs or long-running orphans. */
|
|
2
|
+
export declare const DEFAULT_HEAVY_VERIFICATION_STALE_MS: number;
|
|
3
|
+
/** Default global cap — serialize typecheck/build across harness workers. */
|
|
4
|
+
export declare const DEFAULT_HEAVY_VERIFICATION_MAX_CONCURRENT = 1;
|
|
5
|
+
export interface HeavyVerificationSlotRecord {
|
|
6
|
+
slotId: string;
|
|
7
|
+
pid: number;
|
|
8
|
+
acquiredAt: string;
|
|
9
|
+
command: string;
|
|
10
|
+
}
|
|
11
|
+
export interface HeavyVerificationGateVerdict {
|
|
12
|
+
admitted: boolean;
|
|
13
|
+
slotId: string | null;
|
|
14
|
+
activeSlots: number;
|
|
15
|
+
maxSlots: number;
|
|
16
|
+
reason: string | null;
|
|
17
|
+
}
|
|
18
|
+
export declare function isHeavyVerificationGateSkipped(): boolean;
|
|
19
|
+
export declare function resolveHeavyVerificationMaxConcurrent(): number;
|
|
20
|
+
/** Remove dead/orphan slot files before admission attempts. */
|
|
21
|
+
export declare function reclaimStaleHeavyVerificationSlots(opts?: {
|
|
22
|
+
slotsDir?: string;
|
|
23
|
+
staleMs?: number;
|
|
24
|
+
}): number;
|
|
25
|
+
export declare function listActiveHeavyVerificationSlots(opts?: {
|
|
26
|
+
slotsDir?: string;
|
|
27
|
+
staleMs?: number;
|
|
28
|
+
}): HeavyVerificationSlotRecord[];
|
|
29
|
+
export declare function countActiveHeavyVerificationSlots(opts?: {
|
|
30
|
+
slotsDir?: string;
|
|
31
|
+
staleMs?: number;
|
|
32
|
+
}): number;
|
|
33
|
+
/**
|
|
34
|
+
* Try to acquire one heavy-verification slot using fixed index files (`slot-0.json`, …)
|
|
35
|
+
* and exclusive `wx` create. Avoids count-then-UUID TOCTOU races under burst dispatch.
|
|
36
|
+
*/
|
|
37
|
+
export declare function tryAcquireHeavyVerificationSlot(command: string, opts?: {
|
|
38
|
+
slotsDir?: string;
|
|
39
|
+
staleMs?: number;
|
|
40
|
+
maxSlots?: number;
|
|
41
|
+
}): HeavyVerificationGateVerdict;
|
|
42
|
+
export declare function releaseHeavyVerificationSlot(slotId: string | null | undefined, opts?: {
|
|
43
|
+
slotsDir?: string;
|
|
44
|
+
}): void;
|
|
45
|
+
export declare function assessHeavyVerificationGate(command: string, opts?: {
|
|
46
|
+
slotsDir?: string;
|
|
47
|
+
staleMs?: number;
|
|
48
|
+
maxSlots?: number;
|
|
49
|
+
}): HeavyVerificationGateVerdict;
|
package/dist/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export { canonicalWorkerDir, hasNestedRunsSegment, repairNestedRunsPath, resolve
|
|
|
57
57
|
export { runDaemon } from "./daemon.js";
|
|
58
58
|
export { runHarnessVerifyCommands, DEFAULT_HARNESS_VERIFY_COMMANDS, type HarnessVerifySummary, type HarnessVerifyStep, } from "./harness-verify.js";
|
|
59
59
|
export { runBoundedBuildCheck, assessBuildAdmission, mergeNodeOptionsForBuildCheck, buildSystemdRunArgv, isSystemdRunAvailable, readMemAvailableBytes, type BoundedBuildExecResult, type BuildAdmissionVerdict, } from "./bounded-build/index.js";
|
|
60
|
+
export { assessHeavyVerificationGate, countActiveHeavyVerificationSlots, isHeavyVerificationGateSkipped, listActiveHeavyVerificationSlots, reclaimStaleHeavyVerificationSlots, releaseHeavyVerificationSlot, resolveHeavyVerificationMaxConcurrent, tryAcquireHeavyVerificationSlot, waitForHeavyVerificationSlot, DEFAULT_HEAVY_VERIFICATION_MAX_CONCURRENT, type HeavyVerificationGateVerdict, type HeavyVerificationSlotRecord, } from "./heavy-verification/index.js";
|
|
60
61
|
export { assessAutoCompleteEligibility, classifyWorkerHealth, getMonitorStatus, listMonitors, runMonitorTick, spawnMonitorSidecar, type AutoCompleteAssessment, type MonitorTickResult, type TaskLeaseSnapshot, type WorkerHealthClass, type WorkerMonitorView, } from "./monitor/index.js";
|
|
61
62
|
export { formatHarnessToolReadable, formatMonitorTickNotice, formatAutoCompleteOutcomeNotice, formatWorkerStatusNotice, formatWorkerCompleteNotice, joinHarnessNotice, type HarnessReadableNotice, type HarnessToolFormatContext, } from "./harness-notice/index.js";
|
|
62
63
|
export { persistPlan, drainPlanOutbox, listOutboxItems, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
|