@kynver-app/runtime 0.1.61 → 0.1.66
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/README.md +3 -3
- package/dist/box-resource-snapshot-shared.d.ts +2 -0
- package/dist/box-resource-snapshot.d.ts +45 -0
- package/dist/cleanup-active-worktrees.d.ts +14 -0
- package/dist/cleanup-build-cache-paths.d.ts +5 -0
- package/dist/cleanup-dependency-scan.d.ts +12 -0
- package/dist/cleanup-disk-pressure.d.ts +15 -0
- package/dist/cleanup-duplicate-worktrees.d.ts +7 -0
- package/dist/cleanup-execute.d.ts +4 -0
- package/dist/cleanup-guards-helpers.d.ts +1 -1
- package/dist/cleanup-guards.d.ts +13 -0
- package/dist/cleanup-harness-roots.d.ts +6 -0
- package/dist/cleanup-retention-config.d.ts +3 -0
- package/dist/cleanup-scan.d.ts +1 -0
- package/dist/cleanup-types.d.ts +12 -1
- package/dist/cleanup-worktree-index.d.ts +2 -0
- package/dist/cli.js +1639 -558
- package/dist/cli.js.map +4 -4
- package/dist/harness-notice/harness-notice.auto-complete.d.ts +3 -0
- package/dist/harness-notice/harness-notice.monitor-tick.d.ts +6 -0
- package/dist/harness-notice/harness-notice.parse.d.ts +3 -0
- package/dist/harness-notice/harness-notice.tool-response.d.ts +3 -0
- package/dist/harness-notice/harness-notice.types.d.ts +17 -0
- package/dist/harness-notice/harness-notice.worker-complete.d.ts +3 -0
- package/dist/harness-notice/harness-notice.worker-status.d.ts +2 -0
- package/dist/harness-notice/index.d.ts +7 -0
- package/dist/harness-repair-target.d.ts +23 -0
- package/dist/heartbeat.d.ts +3 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +2079 -700
- package/dist/index.js.map +4 -4
- package/dist/landing-contract-gate.d.ts +3 -1
- package/dist/model-routing.d.ts +2 -0
- package/dist/pr-handoff/pr-handoff-assess.d.ts +2 -0
- package/dist/pr-handoff/pr-handoff.types.d.ts +1 -1
- package/dist/prompt.d.ts +2 -0
- package/dist/repair-target-worktree.d.ts +4 -0
- package/dist/resource-gate.d.ts +5 -0
- package/dist/run-list.d.ts +38 -0
- package/dist/run-store.d.ts +2 -0
- package/dist/runner-identity.d.ts +12 -0
- package/dist/scheduler-cutover-cli.d.ts +2 -0
- package/dist/scheduler-cutover.d.ts +22 -0
- package/dist/status.d.ts +3 -0
- package/dist/supervisor.d.ts +2 -0
- package/dist/vercel/index.d.ts +1 -1
- package/dist/vercel/vercel-url.d.ts +2 -0
- package/dist/worker-provider-policy.d.ts +26 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { MonitorTickResult } from "../monitor/monitor.types.js";
|
|
2
|
+
import type { HarnessReadableNotice } from "./harness-notice.types.js";
|
|
3
|
+
export declare function formatMonitorTickNotice(tick: MonitorTickResult & {
|
|
4
|
+
monitorId?: string;
|
|
5
|
+
phase?: string;
|
|
6
|
+
}): HarnessReadableNotice;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { HarnessReadableNotice, HarnessToolFormatContext } from "./harness-notice.types.js";
|
|
2
|
+
export declare function joinHarnessNotice(notice: HarnessReadableNotice): string;
|
|
3
|
+
export declare function formatHarnessToolReadable(ctx: HarnessToolFormatContext): HarnessReadableNotice;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** Plain-English operator notice with optional raw diagnostic attachment. */
|
|
2
|
+
export interface HarnessReadableNotice {
|
|
3
|
+
/** Primary body — plain English, safe for Telegram. */
|
|
4
|
+
primary: string;
|
|
5
|
+
/** Optional collapsed JSON / technical detail (not the main message). */
|
|
6
|
+
diagnostic?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface HarnessToolFormatContext {
|
|
9
|
+
scope: string;
|
|
10
|
+
action: string;
|
|
11
|
+
ok: boolean;
|
|
12
|
+
exitCode: number | null;
|
|
13
|
+
stdout: string;
|
|
14
|
+
stderr: string;
|
|
15
|
+
error?: string;
|
|
16
|
+
timedOut?: boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { HarnessReadableNotice, HarnessToolFormatContext } from "./harness-notice.types.js";
|
|
2
|
+
export { formatHarnessToolReadable, joinHarnessNotice } from "./harness-notice.tool-response.js";
|
|
3
|
+
export { formatWorkerStatusNotice } from "./harness-notice.worker-status.js";
|
|
4
|
+
export { formatAutoCompleteOutcomeNotice } from "./harness-notice.auto-complete.js";
|
|
5
|
+
export { formatMonitorTickNotice } from "./harness-notice.monitor-tick.js";
|
|
6
|
+
export { formatWorkerCompleteNotice } from "./harness-notice.worker-complete.js";
|
|
7
|
+
export { firstJsonFromStdout, diagnosticJson } from "./harness-notice.parse.js";
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface HarnessRepairTarget {
|
|
2
|
+
targetPrUrl: string;
|
|
3
|
+
targetPrBranch: string | null;
|
|
4
|
+
}
|
|
5
|
+
export interface HarnessRepairTargetContract {
|
|
6
|
+
repairEnforceOriginalPr: boolean;
|
|
7
|
+
targetPrUrl: string | null;
|
|
8
|
+
targetPrBranch: string | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function normalizePrUrl(url: string): string | null;
|
|
11
|
+
export declare function isHarnessRepairTask(task: {
|
|
12
|
+
title?: string;
|
|
13
|
+
executorRef?: string | null;
|
|
14
|
+
}): boolean;
|
|
15
|
+
export declare function parseRepairTargetContractFromDescription(description: string | null | undefined): HarnessRepairTargetContract;
|
|
16
|
+
export declare function resolveHarnessRepairTargetFromTask(task: {
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string | null;
|
|
19
|
+
executorRef?: string | null;
|
|
20
|
+
prUrl?: string | null;
|
|
21
|
+
branch?: string | null;
|
|
22
|
+
}): HarnessRepairTarget | null;
|
|
23
|
+
export declare function repairTargetPromptLines(target: HarnessRepairTarget): string[];
|
package/dist/heartbeat.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RuntimeBoxResourceSnapshot, RuntimeBoxResourceSnapshotPrEvidence } from "./box-resource-snapshot.js";
|
|
1
2
|
export interface ParsedHeartbeat {
|
|
2
3
|
heartbeatCount: number;
|
|
3
4
|
lastHeartbeatAt: string | null;
|
|
@@ -5,6 +6,8 @@ export interface ParsedHeartbeat {
|
|
|
5
6
|
lastHeartbeatSummary: string | null;
|
|
6
7
|
heartbeatBlocker: string | null;
|
|
7
8
|
timestampAnomalies: ParsedHeartbeatTimestampAnomaly[];
|
|
9
|
+
lastBoxResourceSnapshot: RuntimeBoxResourceSnapshot | null;
|
|
10
|
+
lastPrEvidence: RuntimeBoxResourceSnapshotPrEvidence[];
|
|
8
11
|
}
|
|
9
12
|
export interface ParsedHeartbeatTimestampAnomaly {
|
|
10
13
|
kind: "future_heartbeat_timestamp";
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ export { postJson, type DispatchNextDiskGateShape, type DispatchNextWslHostShape
|
|
|
6
6
|
export { parseClaudeStream, parseHarnessStream, summarizeEvent, summarizeShellToolCallEvent, } from "./stream.js";
|
|
7
7
|
export { classifyNpmAuditOutcome, classifyShellCommandOutcome, summarizeNpmAuditReport, type NpmAuditSummary, type ShellCommandOutcome, type ShellCommandOutcomeKind, } from "./shell-command-outcome.js";
|
|
8
8
|
export { parseHeartbeat, isTerminalHeartbeatPhase, terminalFinalResultFromHeartbeat, } from "./heartbeat.js";
|
|
9
|
+
export { buildBoxResourceSnapshotFromGate, formatHeartbeatLine, type RuntimeBoxResourceSnapshot, type RuntimeBoxResourceSnapshotPrEvidence, type HeartbeatLineInput, } from "./box-resource-snapshot.js";
|
|
10
|
+
export { resolveBoxKindFromEnv, defaultBoxId } from "./box-resource-snapshot-shared.js";
|
|
9
11
|
export { computeWorkerStatus, computeAttention, isFinishedWorkerStatus, isLandingBlockedWorkerStatus, deriveRunStatus, type RawHarnessWorkerStatus, type HarnessWorkerRecord, type WorkerAttention, } from "./status.js";
|
|
10
12
|
export { assessWorkerLanding, type WorkerLandingVerdict } from "./landing-gate.js";
|
|
11
13
|
export { isEngagementRequiredSkip } from "./fortress-engagement-gate.js";
|
|
@@ -14,6 +16,7 @@ export { assessExitedWorkerSalvage, type ExitedSalvageAssessment, type ExitedSal
|
|
|
14
16
|
export { buildPrompt } from "./prompt.js";
|
|
15
17
|
export { assessPrHandoffRequirement, ensurePrReadyHandoff, extractPrUrlFromText, } from "./pr-handoff/index.js";
|
|
16
18
|
export { normalizeCursorModelAlias, preflightCursorModel } from "./providers/model-preflight.js";
|
|
19
|
+
export { DEFAULT_WORKER_PROVIDER, enforceCursorWorkerProvider, isClaudeFamilyProvider, preferCursorExecutor, resolveConfiguredWorkerProvider, taskAllowsClaudeWorker, type EnforceCursorWorkerProviderInput, } from "./worker-provider-policy.js";
|
|
17
20
|
export { redactHarness } from "./redact.js";
|
|
18
21
|
export { scrubWorkerEnv, scrubClaudeEnv, auditWorkerEnv, listForbiddenWorkerEnvKeys, isForbiddenWorkerEnvKey, FORBIDDEN_WORKER_ENV_KEYS, type WorkerEnvAudit, } from "./worker-env.js";
|
|
19
22
|
export { applyProductionDatabaseToProcess, readProductionDbKeysFromEnvFile, resolveProductionDatabaseUrl, type DbCredentialResolution, type DbCredentialFailure, type DbCredentialSource, type ResolveProductionDatabaseResult, type ResolveProductionDatabaseOptions, } from "./db-credential-resolver.js";
|
|
@@ -21,6 +24,7 @@ export { safeDatabaseUrlHint } from "./db-url-hint.js";
|
|
|
21
24
|
export { validateRunId, validateWorkerName, validateRepo, validateOwnedPaths, validateTailLines, } from "./validate.js";
|
|
22
25
|
export { spawnWorkerProcess, startWorker } from "./supervisor.js";
|
|
23
26
|
export { createRun, listRuns } from "./worktree.js";
|
|
27
|
+
export { buildRunListRows, listRunsCli, type RunListFinalizeBlockedReason, type RunListRow, type RunListWorkerEvidence, } from "./run-list.js";
|
|
24
28
|
export { sweepRun } from "./sweep.js";
|
|
25
29
|
export { completeWorker, runStatus, workerStatus, tailWorker, stopWorker } from "./worker-ops.js";
|
|
26
30
|
export { autoCompleteWorker, autoCompleteWorkerCli, spawnCompletionSidecar, type AutoCompleteArgs, type AutoCompleteOutcome, type SpawnSidecarOptions, type SpawnedSidecar, } from "./auto-complete.js";
|
|
@@ -29,14 +33,17 @@ export { discoverDefaultRepo, discoverDefaultRepoCandidates, isKynverMonorepoRoo
|
|
|
29
33
|
export { resolveDefaultRepo, persistDefaultRepo, remediateDefaultRepo, formatResolvedDefaultRepo, type ResolvedDefaultRepo, type DefaultRepoSource, } from "./default-repo.js";
|
|
30
34
|
export { getHarnessPaths, resolveHarnessRoot } from "./paths.js";
|
|
31
35
|
export { harnessStorageSnapshot, type HarnessStorageSnapshot, } from "./harness-storage-snapshot.js";
|
|
32
|
-
export { assessOrphanWorktreeSafety } from "./cleanup-orphan-safety.js";
|
|
33
36
|
export { runHarnessCleanup, runPipelineHarnessCleanup, isPipelineCleanupEnabled, } from "./cleanup.js";
|
|
34
37
|
export type { HarnessCleanupSummary, HarnessCleanupOptions, HarnessStorageSnapshotShape, WorktreeRemovalGuardHook, WorktreeRemovalGuardInput, CleanupSkipReason, } from "./cleanup-types.js";
|
|
38
|
+
export { DEFAULT_NODE_MODULES_AGE_MS, DEFAULT_WORKTREES_AGE_MS } from "./cleanup-types.js";
|
|
39
|
+
export { assessOrphanWorktreeSafety } from "./cleanup-orphan-safety.js";
|
|
40
|
+
export { isGeneratedHarnessPath, HARNESS_BUILD_CACHE_RELATIVE_PATHS } from "./cleanup-build-cache-paths.js";
|
|
35
41
|
export { usage, main } from "./cli.js";
|
|
36
42
|
export { reconcileRunsCli, reconcileStaleWorkers, type ReconcileStaleWorkersResult, type StaleWorkerReconcileOutcome } from "./stale-reconcile.js";
|
|
37
43
|
export { runDaemon } from "./daemon.js";
|
|
38
44
|
export { runHarnessVerifyCommands, DEFAULT_HARNESS_VERIFY_COMMANDS, type HarnessVerifySummary, type HarnessVerifyStep, } from "./harness-verify.js";
|
|
39
45
|
export { runBoundedBuildCheck, assessBuildAdmission, mergeNodeOptionsForBuildCheck, buildSystemdRunArgv, isSystemdRunAvailable, readMemAvailableBytes, type BoundedBuildExecResult, type BuildAdmissionVerdict, } from "./bounded-build/index.js";
|
|
40
46
|
export { assessAutoCompleteEligibility, classifyWorkerHealth, getMonitorStatus, listMonitors, runMonitorTick, spawnMonitorSidecar, type AutoCompleteAssessment, type MonitorTickResult, type TaskLeaseSnapshot, type WorkerHealthClass, type WorkerMonitorView, } from "./monitor/index.js";
|
|
47
|
+
export { formatHarnessToolReadable, formatMonitorTickNotice, formatAutoCompleteOutcomeNotice, formatWorkerStatusNotice, formatWorkerCompleteNotice, joinHarnessNotice, type HarnessReadableNotice, type HarnessToolFormatContext, } from "./harness-notice/index.js";
|
|
41
48
|
export { persistPlan, drainPlanOutbox, listOutboxItems, formatPlanOutboxHandoffBlock, extractPlanOutboxFromTask, hashPlanBody, type PersistPlanInput, type PersistPlanResult, type PlanPersistUserStatus, } from "./plan-persist/index.js";
|
|
42
|
-
export { classifyVercelUrl, collectVercelEvidence, evidenceFromGitHubVercelStatus, isDashboardVercelUrl, isVercelStatusContext, pickVercelStatusContext, resolveVercelInspectTarget, type CollectVercelEvidenceInput, type GitHubCommitStatusRow, type VercelEvidenceResult, type VercelEvidenceStatus, } from "./vercel/index.js";
|
|
49
|
+
export { classifyVercelUrl, collectVercelEvidence, evidenceFromGitHubVercelStatus, isDashboardVercelUrl, isInspectableVercelTarget, isVercelStatusContext, pickVercelStatusContext, resolveVercelInspectTarget, type CollectVercelEvidenceInput, type GitHubCommitStatusRow, type VercelEvidenceResult, type VercelEvidenceStatus, } from "./vercel/index.js";
|