@kynver-app/runtime 0.1.128 → 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 +53 -45
- package/dist/config.d.ts +2 -0
- package/dist/daemon-heartbeat.d.ts +3 -0
- 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 +3 -2
- package/dist/index.js +67 -59
- package/dist/instruction-bundle/cache.d.ts +6 -0
- package/dist/instruction-bundle/client.d.ts +25 -0
- package/dist/instruction-bundle/contract.d.ts +4 -0
- package/dist/instruction-bundle/contract.js +5 -0
- package/dist/instruction-bundle/embedded-bundle.d.ts +3 -0
- package/dist/instruction-bundle/index.d.ts +7 -0
- package/dist/instruction-bundle/keys.d.ts +14 -0
- package/dist/instruction-bundle/state.d.ts +24 -0
- package/dist/instruction-bundle/types.d.ts +42 -0
- package/dist/instruction-bundle/verify.d.ts +15 -0
- package/dist/retry-limits.d.ts +4 -0
- package/dist/runner-identity.d.ts +7 -0
- package/dist/server/monitor.js +4 -4
- package/dist/server/worker-policy.d.ts +2 -0
- package/dist/server/worker-policy.js +1 -1
- package/dist/worker-persona-catalog.d.ts +5 -0
- package/dist/worker-persona-catalog.js +5 -1
- package/package.json +7 -2
package/dist/config.d.ts
CHANGED
|
@@ -46,6 +46,8 @@ export declare function saveApiKey(apiKey: string): void;
|
|
|
46
46
|
export declare function loadRunnerToken(agentOsId?: string): string | undefined;
|
|
47
47
|
export declare function saveRunnerToken(agentOsId: string, token: string): void;
|
|
48
48
|
export declare function resolveBaseUrl(argsBaseUrl?: string): string;
|
|
49
|
+
/** Non-exiting sibling of `resolveBaseUrl` for long-lived callers (the daemon). */
|
|
50
|
+
export declare function tryResolveBaseUrl(argsBaseUrl?: string): string | undefined;
|
|
49
51
|
export declare function resolveCallbackSecret(argsSecret?: string, agentOsId?: string): string;
|
|
50
52
|
/**
|
|
51
53
|
* Non-exiting sibling of `resolveCallbackSecretWithMint` for long-lived
|
|
@@ -3,6 +3,8 @@ export interface DaemonHeartbeat {
|
|
|
3
3
|
pid: number;
|
|
4
4
|
runId: string;
|
|
5
5
|
agentOsId: string;
|
|
6
|
+
/** Active server-delivered instruction bundle version (M6); additive. */
|
|
7
|
+
instructionBundleVersion?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare function daemonHeartbeatPath(agentOsId: string): string;
|
|
8
10
|
/** Best-effort atomic write (temp + rename). Never throws. */
|
|
@@ -10,6 +12,7 @@ export declare function writeDaemonHeartbeat(input: {
|
|
|
10
12
|
agentOsId: string;
|
|
11
13
|
runId: string;
|
|
12
14
|
now?: Date;
|
|
15
|
+
instructionBundleVersion?: string;
|
|
13
16
|
}): void;
|
|
14
17
|
export declare function readDaemonHeartbeat(agentOsId: string): DaemonHeartbeat | null;
|
|
15
18
|
/**
|
|
@@ -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
|
@@ -17,6 +17,7 @@ export { isEngagementRequiredSkip } from "./fortress-engagement-gate.js";
|
|
|
17
17
|
export { assessWorkerLandingContract, landingContractAttentionReason, type WorkerLandingContract, type WorkerLandingContractVerdict, type TargetPrReconciliation, } from "./landing-contract-gate.js";
|
|
18
18
|
export { assessExitedWorkerSalvage, type ExitedSalvageAssessment, type ExitedSalvageKind, } from "./exited-salvage.js";
|
|
19
19
|
export { buildPrompt } from "./prompt.js";
|
|
20
|
+
export { canonicalJsonStringify, computeInstructionBundleVersion, deriveInstructionBundleKeyId, parseRawEd25519Key, isSignedInstructionBundleShape, PINNED_INSTRUCTION_BUNDLE_PUBLIC_KEYS, resolveInstructionBundlePublicKey, verifyInstructionBundleSignatureWithKey, verifySignedInstructionBundle, EMBEDDED_INSTRUCTION_BUNDLE, EMBEDDED_INSTRUCTION_BUNDLE_VERSION, getActiveInstructionBundle, getActiveInstructionBundleSource, getActiveInstructionBundleVersion, setActiveInstructionBundle, resolveInstructionText, resolvePolicyThreshold, resolveBundlePersona, ensureInstructionBundle, instructionBundleCachePath, loadInstructionBundleCache, saveInstructionBundleCache, INSTRUCTION_BUNDLE_REFRESH_TTL_MS, type InstructionBundle, type InstructionBundleContent, type InstructionBundlePersona, type SignedInstructionBundle, type InstructionBundleSource, type InstructionBundleVerifyResult, type EnsureInstructionBundleOptions, type EnsureInstructionBundleResult, } from "./instruction-bundle/index.js";
|
|
20
21
|
export { WORKER_PERSONA_CATALOG, getWorkerPersonaCatalogEntry, getPersonaDispatchLane, getPersonaDefaultRoleLane, isKnownWorkerPersonaSlug, workerPersonaReviewSlugs, workerPersonaLandingSlugs, type WorkerPersonaCatalogEntry, type WorkerPersonaCatalogSlug, type WorkerPersonaDispatchLane, type WorkerPersonaDefaultRoleLane, } from "./worker-persona-catalog.js";
|
|
21
22
|
export { assessPrHandoffRequirement, ensurePrReadyHandoff, extractPrUrlFromText, } from "./pr-handoff/index.js";
|
|
22
23
|
export { normalizeCursorModelAlias, preflightClaudeModel, preflightCodexModel, preflightCursorModel, } from "./providers/model-preflight.js";
|
|
@@ -41,7 +42,7 @@ export { isActiveHarnessWorker } from "./harness-worker-active.js";
|
|
|
41
42
|
export { sweepRun } from "./sweep.js";
|
|
42
43
|
export { completeWorker, runStatus, workerStatus, tailWorker, stopWorker } from "./worker-ops.js";
|
|
43
44
|
export { autoCompleteWorker, autoCompleteWorkerCli, spawnCompletionSidecar, type AutoCompleteArgs, type AutoCompleteOutcome, type SpawnSidecarOptions, type SpawnedSidecar, } from "./auto-complete.js";
|
|
44
|
-
export { loadUserConfig, saveUserConfig, resolveBaseUrl, resolveCallbackSecret, resolveCallbackSecretWithMint, parseArgs, } from "./config.js";
|
|
45
|
+
export { loadUserConfig, saveUserConfig, resolveBaseUrl, tryResolveBaseUrl, resolveCallbackSecret, resolveCallbackSecretWithMint, tryResolveCallbackSecretWithMint, parseArgs, } from "./config.js";
|
|
45
46
|
export { discoverDefaultRepo, discoverDefaultRepoCandidates, isKynverMonorepoRoot, gitRepoRoot, type DiscoveredDefaultRepo, type DefaultRepoDiscoverySource, } from "./default-repo-discovery.js";
|
|
46
47
|
export { resolveDefaultRepo, persistDefaultRepo, remediateDefaultRepo, formatResolvedDefaultRepo, type ResolvedDefaultRepo, type DefaultRepoSource, } from "./default-repo.js";
|
|
47
48
|
export { getHarnessPaths, harnessRunsDir, harnessWorktreesDir, normalizeHarnessRoot, resolveHarnessRoot, } from "./paths.js";
|
|
@@ -60,7 +61,7 @@ export { canonicalWorkerDir, hasNestedRunsSegment, repairNestedRunsPath, resolve
|
|
|
60
61
|
export { runDaemon } from "./daemon.js";
|
|
61
62
|
export { runHarnessVerifyCommands, DEFAULT_HARNESS_VERIFY_COMMANDS, type HarnessVerifySummary, type HarnessVerifyStep, } from "./harness-verify.js";
|
|
62
63
|
export { runBoundedBuildCheck, assessBuildAdmission, mergeNodeOptionsForBuildCheck, buildSystemdRunArgv, isSystemdRunAvailable, readMemAvailableBytes, type BoundedBuildExecResult, type BuildAdmissionVerdict, } from "./bounded-build/index.js";
|
|
63
|
-
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";
|
|
64
65
|
export { assessAutoCompleteEligibility, classifyWorkerHealth, getMonitorStatus, listMonitors, runMonitorTick, spawnMonitorSidecar, type AutoCompleteAssessment, type MonitorTickResult, type TaskLeaseSnapshot, type WorkerHealthClass, type WorkerMonitorView, } from "./monitor/index.js";
|
|
65
66
|
export { formatHarnessToolReadable, formatMonitorTickNotice, formatAutoCompleteOutcomeNotice, formatWorkerStatusNotice, formatWorkerCompleteNotice, joinHarnessNotice, type HarnessReadableNotice, type HarnessToolFormatContext, } from "./harness-notice/index.js";
|
|
66
67
|
export { persistPlan, drainPlanOutbox, listOutboxItems, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
|