@kynver-app/runtime 0.2.4 → 0.2.8

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.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * `kynver doctor local-store [--no-probe]` — report-only in D0: always exits
3
+ * 0 (no surface consults the store yet, so nothing may gate on this); the
4
+ * posture lives in the printed report.
5
+ *
6
+ * The default openability probe CREATES `local-run-store.sqlite` under the
7
+ * harness root on a host that never opened it (inert — nothing reads it with
8
+ * flags off). Pass `--no-probe` to report current lifecycle state without
9
+ * touching disk.
10
+ */
11
+ export declare function runLocalStoreDoctorCli(args?: Record<string, unknown>): void;
@@ -0,0 +1,35 @@
1
+ import { type LocalRunStoreLifecycleStatus } from "../local-run-store/store-lifecycle.js";
2
+ import { type LocalRunStoreSurfaceMode } from "../local-run-store/surface-flags.js";
3
+ export interface LocalStoreQuarantineEntry {
4
+ file: string;
5
+ mtime: string | null;
6
+ }
7
+ export interface LocalStoreDoctorReport {
8
+ command: "doctor local-store";
9
+ contractVersion: 1;
10
+ harnessRoot: string;
11
+ store: {
12
+ state: LocalRunStoreLifecycleStatus["state"];
13
+ databasePath: string | null;
14
+ schemaVersion: number | null;
15
+ recovered: boolean;
16
+ quarantinedTo: string | null;
17
+ reason: string | null;
18
+ };
19
+ surfaces: Array<{
20
+ key: string;
21
+ env: string;
22
+ milestone: string;
23
+ mode: LocalRunStoreSurfaceMode;
24
+ /** env override / server-delivered policy / default off. */
25
+ source: "env" | "server" | "default";
26
+ }>;
27
+ flagWarnings: string[];
28
+ /** `*.quarantine-*` artifacts under the harness root (offline inspection). */
29
+ quarantineHistory: LocalStoreQuarantineEntry[];
30
+ }
31
+ export declare function buildLocalStoreDoctorReport(options?: {
32
+ env?: NodeJS.ProcessEnv;
33
+ /** Skip the open probe (report current lifecycle state only). */
34
+ probe?: boolean;
35
+ }): LocalStoreDoctorReport;
package/dist/index.d.ts CHANGED
@@ -9,7 +9,7 @@ export { cleanupWslCrashDumps, shouldAutoCleanupWslCrashDumps, type WslCrashDump
9
9
  export { postJson, type DispatchNextDiskGateShape, type DispatchNextWslHostShape, } from "./callbacks.js";
10
10
  export { parseClaudeStream, parseHarnessStream, summarizeEvent, summarizeShellToolCallEvent, } from "./stream.js";
11
11
  export { classifyNpmAuditOutcome, classifyShellCommandOutcome, summarizeNpmAuditReport, type NpmAuditSummary, type ShellCommandOutcome, type ShellCommandOutcomeKind, } from "./shell-command-outcome.js";
12
- export { classifyRepoSearchMeta, diagnoseRepoSearchFailure, extractSearchMeta, extractSearchMetaFromToolLine, formatRepoSearchGuidance, isRgExcludeScopeTarget, isSingleFileSearchTarget, metaToNormalizedRgCommand, normalizeRepoSearchCommand, normalizeRgArgv, type RepoSearchContext, type RepoSearchKind, } from "./repo-search.js";
12
+ export { classifyRepoSearchMeta, diagnoseRepoSearchFailure, extractSearchMeta, extractSearchMetaFromToolLine, formatRepoSearchGuidance, isRgExcludeScopeTarget, isSingleFileSearchTarget, metaToNormalizedRgCommand, normalizeRepoSearchCommand, normalizeRgArgv, shouldTreatRgNoMatchAsSuccess, unwrapShellWrapperCommand, type RepoSearchContext, type RepoSearchKind, } from "./repo-search.js";
13
13
  export { parseHeartbeat, isTerminalHeartbeatPhase, terminalFinalResultFromHeartbeat, } from "./heartbeat.js";
14
14
  export { buildBoxResourceSnapshotFromGate, formatHeartbeatLine, type RuntimeBoxResourceSnapshot, type RuntimeBoxResourceSnapshotPrEvidence, type HeartbeatLineInput, } from "./box-resource-snapshot.js";
15
15
  export { resolveBoxKindFromEnv, defaultBoxId } from "./box-resource-snapshot-shared.js";
@@ -74,7 +74,7 @@ export { runBoundedBuildCheck, assessBuildAdmission, mergeNodeOptionsForBuildChe
74
74
  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";
75
75
  export { assessAutoCompleteEligibility, classifyWorkerHealth, getMonitorStatus, listMonitors, runMonitorTick, spawnMonitorSidecar, type AutoCompleteAssessment, type MonitorTickResult, type TaskLeaseSnapshot, type WorkerHealthClass, type WorkerMonitorView, } from "./monitor/index.js";
76
76
  export { formatHarnessToolReadable, formatMonitorTickNotice, formatAutoCompleteOutcomeNotice, formatWorkerStatusNotice, formatWorkerCompleteNotice, joinHarnessNotice, type HarnessReadableNotice, type HarnessToolFormatContext, } from "./harness-notice/index.js";
77
- export { persistPlan, drainPlanOutbox, listOutboxItems, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
77
+ export { persistPlan, drainPlanOutbox, listOutboxItems, writeOutboxItem, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
78
78
  export { classifyVercelUrl, collectVercelEvidence, evidenceFromGitHubVercelStatus, isDashboardVercelUrl, isInspectableVercelTarget, isVercelStatusContext, pickVercelStatusContext, resolveVercelInspectTarget, type CollectVercelEvidenceInput, type GitHubCommitStatusRow, type VercelEvidenceResult, type VercelEvidenceStatus, } from "./vercel/index.js";
79
79
  export { validateJobEnvelope, type LocalCodexJobEnvelope, type LocalCodexJobToolPolicy, type JobEnvelopeValidationError, type JobEnvelopeValidationResult, } from "./byoc/job-envelope.js";
80
80
  export { verifyLocalCodexGoldenPath, formatGoldenPathFailureNotice, type GoldenPathCheckCode, type GoldenPathAuditEvidence, type GoldenPathOptions, type GoldenPathResult, } from "./byoc/m6-golden-path.js";
@@ -82,3 +82,4 @@ export { AGENT_RUNTIME_ENVELOPE_SCHEMA_VERSION, AGENT_RUNTIME_ENVELOPE_SCHEMA_VE
82
82
  export { evaluateNodeRuntimePolicy, KYNVER_NODE_PATCH_FLOOR, PUBLISHED_NODE_RANGE, PRIVATE_ROOT_NODE_RANGE, type NodeRuntimePolicyStatus, type NodeRuntimePolicyVerdict, } from "./node-runtime-policy.js";
83
83
  export { buildRuntimeIdentity, type RuntimeIdentityV1 } from "./runtime-identity.js";
84
84
  export { buildNodeRuntimeDoctorReport, type NodeRuntimeDoctorReport } from "./doctor/node-runtime.js";
85
+ export { readJson, writeJson } from "./util.js";