@kynver-app/runtime 0.1.76 → 0.1.79
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/cleanup-types.d.ts +2 -0
- package/dist/cli.js +1176 -319
- package/dist/cli.js.map +4 -4
- package/dist/completion-replay.d.ts +10 -0
- package/dist/cron/cron-env.d.ts +21 -0
- package/dist/cron/cron-fire.d.ts +8 -0
- package/dist/cron/cron-lock.d.ts +9 -0
- package/dist/cron/cron-match.d.ts +8 -0
- package/dist/cron/cron-status.d.ts +10 -0
- package/dist/cron/cron-store.d.ts +3 -0
- package/dist/cron/cron-tick-cli.d.ts +2 -0
- package/dist/cron/cron-tick-state.d.ts +5 -0
- package/dist/cron/cron-tick.d.ts +17 -0
- package/dist/cron/cron-types.d.ts +44 -0
- package/dist/dispatch.d.ts +1 -0
- package/dist/doctor/runtime-takeover-scheduler.d.ts +3 -1
- package/dist/doctor/runtime-takeover.probes.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1213 -335
- package/dist/index.js.map +4 -4
- package/dist/pipeline-dispatch.d.ts +1 -0
- package/dist/pipeline-exact-targets.d.ts +2 -0
- package/dist/pipeline-max-starts.d.ts +8 -1
- package/dist/pipeline-tick.d.ts +2 -0
- package/dist/prompt.d.ts +2 -0
- package/dist/run-metadata-retention.d.ts +23 -0
- package/dist/scheduler-cutover.d.ts +4 -1
- package/dist/status.d.ts +5 -0
- package/dist/supervisor.d.ts +1 -0
- package/dist/worker-metadata-reconcile.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare function countDispatchStarts(result: unknown): number;
|
|
1
2
|
/** Drop CLI max-starts so pipeline ticks always use the resource-gate slot budget. */
|
|
2
3
|
export declare function stripCliMaxStarts(args: Record<string, string | boolean>): Record<string, string | boolean>;
|
|
3
4
|
/**
|
|
@@ -5,15 +5,22 @@ export interface OperatorDispatchShape {
|
|
|
5
5
|
actionableReady?: number;
|
|
6
6
|
queuedTasks?: number;
|
|
7
7
|
boardAdvancedThisTick?: number;
|
|
8
|
+
leaseReapedThisTick?: number;
|
|
8
9
|
}
|
|
9
10
|
export interface ResolvePipelineMaxStartsResult {
|
|
10
11
|
maxStarts: number;
|
|
11
12
|
underutilized: boolean;
|
|
12
13
|
advisedStarts: number | null;
|
|
14
|
+
actionableReady: number | null;
|
|
15
|
+
queuedTasks: number | null;
|
|
16
|
+
nonDispatchableReady: number | null;
|
|
13
17
|
boardAdvancedThisTick: number;
|
|
18
|
+
leaseReapedThisTick: number;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* Merge runner slot budget with server dispatch-floor advice from the operator tick.
|
|
17
|
-
*
|
|
22
|
+
* Actionable backlog is authoritative: stale or conservative server advice may
|
|
23
|
+
* reduce noise, but it must not underfill open worker slots when ready work is
|
|
24
|
+
* startable.
|
|
18
25
|
*/
|
|
19
26
|
export declare function resolvePipelineMaxStarts(resourceGate: RunnerResourceGateShape, operatorTick: unknown): ResolvePipelineMaxStartsResult;
|
package/dist/pipeline-tick.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ResolvePipelineMaxStartsResult } from "./pipeline-max-starts.js";
|
|
1
2
|
import type { ReconcileStaleWorkersResult } from "./stale-reconcile.js";
|
|
2
3
|
import { type RunnerResourceGateShape } from "./resource-gate.js";
|
|
3
4
|
import { renewActiveTaskLeases } from "./lease-renewal.js";
|
|
@@ -32,6 +33,7 @@ export interface PipelineTickResult {
|
|
|
32
33
|
harnessCleanup?: HarnessCleanupSummary;
|
|
33
34
|
operatorTick: unknown;
|
|
34
35
|
sweep: unknown;
|
|
36
|
+
dispatchAdvice: ResolvePipelineMaxStartsResult;
|
|
35
37
|
dispatch: unknown;
|
|
36
38
|
idle: boolean;
|
|
37
39
|
}
|
package/dist/prompt.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export declare function buildPrompt(input: {
|
|
|
9
9
|
instructionPolicyMarkdown?: string | null;
|
|
10
10
|
/** Anchored task context-envelope persona block (required when task has personaSlug). */
|
|
11
11
|
personaMarkdown?: string | null;
|
|
12
|
+
/** P7 memory-quality trace summary + live-verification nudges (privacy-safe). */
|
|
13
|
+
memoryQualityMarkdown?: string | null;
|
|
12
14
|
/** When set, Haiku/compact models get a shorter harness instruction block. */
|
|
13
15
|
model?: string;
|
|
14
16
|
repairTargetPrUrl?: string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Recent heartbeat/stdout activity — treat run metadata as live. */
|
|
2
|
+
export declare const RUN_METADATA_ACTIVE_SIGNAL_MS: number;
|
|
3
|
+
export interface RunMetadataRetentionOutcome {
|
|
4
|
+
runId: string;
|
|
5
|
+
action: "repaired_run_json" | "skipped";
|
|
6
|
+
reason: string;
|
|
7
|
+
}
|
|
8
|
+
export interface RunMetadataRetentionResult {
|
|
9
|
+
runs: RunMetadataRetentionOutcome[];
|
|
10
|
+
}
|
|
11
|
+
/** True when `targetPath` lives under `{harnessRoot}/runs/` (run + worker metadata). */
|
|
12
|
+
export declare function isHarnessRunMetadataPath(targetPath: string, harnessRoot: string): boolean;
|
|
13
|
+
/** Worker dir still has live process or recent harness artifacts — retain metadata. */
|
|
14
|
+
export declare function workerDirHasActiveRetentionSignals(workerDir: string, now?: number, windowMs?: number): boolean;
|
|
15
|
+
/** Any worker under a run dir still looks active — block metadata deletion/relocation. */
|
|
16
|
+
export declare function runDirHasActiveRetentionSignals(runDir: string, now?: number, windowMs?: number): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Rebuild missing `run.json` files from on-disk worker dirs so reconcile/status
|
|
19
|
+
* cannot go blind while worker processes or fresh artifacts remain.
|
|
20
|
+
*/
|
|
21
|
+
export declare function repairMissingRunMetadata(harnessRootInput?: string): RunMetadataRetentionResult;
|
|
22
|
+
/** `${harnessRoot}\0${runId}` keys for runs with filesystem active-retention signals. */
|
|
23
|
+
export declare function collectFilesystemLiveRunKeys(harnessRoot: string, now?: number): Set<string>;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { KynverUserConfig } from "./config.js";
|
|
2
2
|
export type DeploymentSchedulerProvider = "qstash" | "kynver-cron" | "openclaw-cron";
|
|
3
|
-
export declare const SCHEDULER_CUTOVER_RUNNER_ENV_KEYS: readonly ["KYNVER_SCHEDULER_PROVIDER", "OPENCLAW_CRON_STORE_PATH", "OPENCLAW_CRON_SECRET", "OPENCLAW_CRON_FIRE_BASE_URL"];
|
|
3
|
+
export declare const SCHEDULER_CUTOVER_RUNNER_ENV_KEYS: readonly ["KYNVER_SCHEDULER_PROVIDER", "KYNVER_CRON_STORE_PATH", "KYNVER_CRON_SECRET", "KYNVER_CRON_FIRE_BASE_URL", "OPENCLAW_CRON_STORE_PATH", "OPENCLAW_CRON_SECRET", "OPENCLAW_CRON_FIRE_BASE_URL"];
|
|
4
4
|
export interface SchedulerCutoverEnvSnapshot {
|
|
5
5
|
kynverSchedulerProvider: string | null;
|
|
6
|
+
kynverCronStorePath: string | null;
|
|
7
|
+
kynverCronSecret: boolean;
|
|
8
|
+
kynverCronFireBaseUrl: string | null;
|
|
6
9
|
openclawCronStorePath: string | null;
|
|
7
10
|
openclawCronSecret: boolean;
|
|
8
11
|
openclawCronFireBaseUrl: string | null;
|
package/dist/status.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface HarnessMemoryQualityCaptureSnapshot {
|
|
|
35
35
|
miss: boolean;
|
|
36
36
|
capturedAt: string;
|
|
37
37
|
retrievalEvidence?: Record<string, unknown> | null;
|
|
38
|
+
/** P7 privacy-safe prompt block (trace summary + live-verification nudges). */
|
|
39
|
+
promptMarkdown?: string | null;
|
|
38
40
|
}
|
|
39
41
|
export interface HarnessWorkerRecord {
|
|
40
42
|
name: string;
|
|
@@ -154,6 +156,9 @@ export interface RawHarnessWorkerStatus {
|
|
|
154
156
|
disposableArtifactsRemoved?: string[];
|
|
155
157
|
/** Fencing token from claim — echoed on completion when set. */
|
|
156
158
|
leaseToken?: string;
|
|
159
|
+
/** Lane A policy fields echoed on completion status for mirror recovery. */
|
|
160
|
+
instructionPolicyFingerprint?: string | null;
|
|
161
|
+
instructionPolicyEvidence?: InstructionPolicyEvidenceSnapshot | null;
|
|
157
162
|
}
|
|
158
163
|
export interface WorkerStatusOptions {
|
|
159
164
|
/** Branch ref for ancestry when baseCommit is not set. */
|
package/dist/supervisor.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SpawnWorkerOptions {
|
|
|
13
13
|
instructionPolicyFingerprint?: string | null;
|
|
14
14
|
instructionPolicyEvidence?: InstructionPolicyEvidenceSnapshot | null;
|
|
15
15
|
memoryQualityCapture?: HarnessMemoryQualityCaptureSnapshot | null;
|
|
16
|
+
memoryQualityPromptMarkdown?: string | null;
|
|
16
17
|
personaMarkdown?: string | null;
|
|
17
18
|
personaSlug?: string | null;
|
|
18
19
|
personaEvidence?: PersonaContextEvidenceSnapshot | null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { repairMissingRunMetadata } from "./run-metadata-retention.js";
|
|
1
2
|
export interface WorkerMetadataReconcileOutcome {
|
|
2
3
|
runId: string;
|
|
3
4
|
worker: string;
|
|
@@ -6,6 +7,7 @@ export interface WorkerMetadataReconcileOutcome {
|
|
|
6
7
|
}
|
|
7
8
|
export interface WorkerMetadataReconcileResult {
|
|
8
9
|
workers: WorkerMetadataReconcileOutcome[];
|
|
10
|
+
runMetadataRetention: ReturnType<typeof repairMissingRunMetadata>;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Repair historical harness worker metadata:
|