@kynver-app/runtime 0.1.90 → 0.1.91

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.
Files changed (54) hide show
  1. package/dist/box-resource-snapshot-shared.d.ts +1 -0
  2. package/dist/cleanup-active-worktrees.d.ts +1 -1
  3. package/dist/cleanup-dependency-scan.d.ts +1 -0
  4. package/dist/cleanup-dir-size.d.ts +2 -1
  5. package/dist/cleanup-guards.d.ts +5 -0
  6. package/dist/cleanup-index-status.d.ts +9 -0
  7. package/dist/cleanup-progress.d.ts +2 -0
  8. package/dist/cleanup-retention-config.d.ts +4 -0
  9. package/dist/cleanup-run-liveness.d.ts +6 -2
  10. package/dist/cleanup-run-terminal-cache.d.ts +6 -0
  11. package/dist/cleanup-summary.d.ts +29 -0
  12. package/dist/cleanup-types.d.ts +7 -1
  13. package/dist/cleanup-worktree-index.d.ts +3 -2
  14. package/dist/cli.js +2276 -793
  15. package/dist/cli.js.map +4 -4
  16. package/dist/completion-ack.d.ts +8 -0
  17. package/dist/completion-response.d.ts +1 -1
  18. package/dist/db-credential-env-paths.d.ts +13 -0
  19. package/dist/db-credential-resolver.d.ts +2 -1
  20. package/dist/default-repo-cli.d.ts +20 -0
  21. package/dist/dispatch-claim-release.d.ts +17 -0
  22. package/dist/dispatch-lane-normalization.d.ts +14 -0
  23. package/dist/dispatch.d.ts +4 -1
  24. package/dist/doctor/doctor.types.d.ts +2 -0
  25. package/dist/doctor/runtime-takeover-cli.d.ts +1 -1
  26. package/dist/doctor/runtime-takeover-scheduler.d.ts +3 -1
  27. package/dist/heartbeat-final-result.d.ts +5 -0
  28. package/dist/heartbeat.d.ts +3 -1
  29. package/dist/index.d.ts +7 -1
  30. package/dist/index.js +2634 -971
  31. package/dist/index.js.map +4 -4
  32. package/dist/landing-contract-pr-classify.d.ts +4 -0
  33. package/dist/memory-cost-package-version-guard-enforce.d.ts +10 -0
  34. package/dist/memory-cost-package-version-guard.d.ts +49 -0
  35. package/dist/orchestration-enforcement/config.d.ts +5 -0
  36. package/dist/orchestration-enforcement/evaluator.d.ts +6 -0
  37. package/dist/orchestration-enforcement/idempotency.d.ts +8 -0
  38. package/dist/orchestration-enforcement/index.d.ts +4 -0
  39. package/dist/orchestration-enforcement/types.d.ts +24 -0
  40. package/dist/prompt.d.ts +2 -0
  41. package/dist/repo-search.d.ts +40 -0
  42. package/dist/run-worker-index.d.ts +10 -0
  43. package/dist/runner-identity.d.ts +2 -0
  44. package/dist/shell-command-outcome.d.ts +1 -1
  45. package/dist/status.d.ts +13 -0
  46. package/dist/supervisor.d.ts +3 -1
  47. package/dist/validate.d.ts +10 -0
  48. package/dist/worker-final-result-embed.d.ts +1 -0
  49. package/dist/worker-ops.d.ts +22 -1
  50. package/dist/worker-persona-catalog.d.ts +24 -0
  51. package/dist/worker-persona-catalog.js +138 -0
  52. package/dist/worker-persona-catalog.js.map +7 -0
  53. package/dist/workspace-runtime-config.d.ts +2 -0
  54. package/package.json +1 -1
@@ -0,0 +1,4 @@
1
+ import type { TargetPrReconciliation } from "./landing-contract-gate.js";
2
+ export type WorkerReconciliationPrRole = "contract" | "support" | "unrelated";
3
+ export declare function classifyWorkerReconciliationPrRole(prUrl: string, targetPrUrls: readonly string[], entry?: TargetPrReconciliation | null): WorkerReconciliationPrRole;
4
+ export declare function unrelatedWorkerReconciliationPrUrls(reconciliation: readonly TargetPrReconciliation[], targetPrUrls: readonly string[]): string[];
@@ -0,0 +1,10 @@
1
+ import { evaluateMemoryCostPackageVersionGuard, type MemoryCostManagedPackageName, type MemoryCostPackageGuardResult } from "./memory-cost-package-version-guard.js";
2
+ export declare function buildMemoryCostPackageGuardInput(input?: {
3
+ cwd?: string;
4
+ repoRoot?: string;
5
+ selfPackageName?: MemoryCostManagedPackageName;
6
+ selfVersion?: string;
7
+ }): Promise<Parameters<typeof evaluateMemoryCostPackageVersionGuard>[0]>;
8
+ export declare function evaluateMemoryCostPackageGuardAtStartup(input?: Parameters<typeof buildMemoryCostPackageGuardInput>[0]): Promise<MemoryCostPackageGuardResult>;
9
+ export declare function enforceMemoryCostPackageGuardAtStartup(input?: Parameters<typeof buildMemoryCostPackageGuardInput>[0]): Promise<MemoryCostPackageGuardResult>;
10
+ export declare function shouldEnforceMemoryCostPackageGuardCli(scope?: string, action?: string): boolean;
@@ -0,0 +1,49 @@
1
+ /** Minimum versions that ship MARM memory cost controls (PR #1159). */
2
+ export declare const MEMORY_COST_PACKAGE_MIN_VERSIONS: {
3
+ readonly "@kynver-app/runtime": "0.1.83";
4
+ readonly "@kynver-app/openclaw-agent-os": "0.1.43";
5
+ readonly "@kynver-app/mcp-agent-os": "0.3.34";
6
+ };
7
+ export type MemoryCostManagedPackageName = keyof typeof MEMORY_COST_PACKAGE_MIN_VERSIONS;
8
+ export declare const MEMORY_COST_MANAGED_PACKAGES: MemoryCostManagedPackageName[];
9
+ export type MemoryCostVersionSource = "self" | "installed" | "repo" | "unknown";
10
+ export interface MemoryCostPackageVersionCandidate {
11
+ version: string;
12
+ source: MemoryCostVersionSource;
13
+ path?: string;
14
+ }
15
+ export interface MemoryCostPackageGuardRow {
16
+ packageName: MemoryCostManagedPackageName;
17
+ displayName: string;
18
+ minimumVersion: string;
19
+ effectiveVersion: string | null;
20
+ effectiveSource: MemoryCostVersionSource;
21
+ ok: boolean;
22
+ summary: string;
23
+ remediation: string[];
24
+ }
25
+ export interface MemoryCostPackageGuardResult {
26
+ ok: boolean;
27
+ summary: string;
28
+ packages: MemoryCostPackageGuardRow[];
29
+ }
30
+ /** Parse `major.minor.patch`; pre-release/build suffixes are ignored. */
31
+ export declare function parseSemverParts(version: string): [number, number, number] | null;
32
+ /** Returns 1 if a > b, -1 if a < b, 0 if equal or either unparsable. */
33
+ export declare function compareSemver(a: string, b: string): number;
34
+ export declare function semverAtLeast(version: string, minimum: string): boolean;
35
+ export declare function probeRepoPackageVersions(input?: {
36
+ cwd?: string;
37
+ repoRoot?: string;
38
+ }): Partial<Record<MemoryCostManagedPackageName, MemoryCostPackageVersionCandidate>>;
39
+ export declare function evaluateMemoryCostPackageVersionGuard(input?: {
40
+ installed?: Partial<Record<MemoryCostManagedPackageName, string | MemoryCostPackageVersionCandidate>>;
41
+ repo?: Partial<Record<MemoryCostManagedPackageName, string | MemoryCostPackageVersionCandidate>>;
42
+ self?: Partial<Record<MemoryCostManagedPackageName, string | MemoryCostPackageVersionCandidate>>;
43
+ }): MemoryCostPackageGuardResult;
44
+ export declare class MemoryCostPackageVersionGuardError extends Error {
45
+ readonly result: MemoryCostPackageGuardResult;
46
+ constructor(result: MemoryCostPackageGuardResult);
47
+ }
48
+ export declare function assertMemoryCostPackageVersionGuard(input?: Parameters<typeof evaluateMemoryCostPackageVersionGuard>[0]): MemoryCostPackageGuardResult;
49
+ export declare function formatMemoryCostPackageGuardError(result: MemoryCostPackageGuardResult): string;
@@ -0,0 +1,5 @@
1
+ import type { OrchestrationPolicyMode } from "./types.js";
2
+ /** Resolve orchestration policy mode from env (default off — local fallback preserved). */
3
+ export declare function resolveOrchestrationPolicyMode(env?: NodeJS.ProcessEnv): OrchestrationPolicyMode;
4
+ /** Feature gate for enforce-mode linked AgentTask creation (default false until explicitly on). */
5
+ export declare function isOrchestrationEnforceTasksEnabled(env?: NodeJS.ProcessEnv): boolean;
@@ -0,0 +1,6 @@
1
+ import type { OrchestrationPolicyEvaluateInput, OrchestrationPolicyEvaluateResult } from "./types.js";
2
+ /**
3
+ * Evaluate whether a foreground orchestration action should stay local, be
4
+ * observed (logged bypass), or route through linked harness AgentTask creation.
5
+ */
6
+ export declare function evaluateOrchestrationPolicy(input: OrchestrationPolicyEvaluateInput, env?: NodeJS.ProcessEnv): OrchestrationPolicyEvaluateResult;
@@ -0,0 +1,8 @@
1
+ /** Deterministic foreground harness task idempotency key for Hermes/Forge sessions. */
2
+ export declare function buildForegroundHarnessIdempotencyKey(input: {
3
+ sessionId?: string | null;
4
+ planId?: string | null;
5
+ parentTaskId?: string | null;
6
+ title?: string | null;
7
+ action?: string | null;
8
+ }): string;
@@ -0,0 +1,4 @@
1
+ export * from "./types.js";
2
+ export * from "./config.js";
3
+ export * from "./idempotency.js";
4
+ export * from "./evaluator.js";
@@ -0,0 +1,24 @@
1
+ /** Kynver-first foreground orchestration policy — observe before enforce. */
2
+ export declare const ORCHESTRATION_POLICY_MODES: readonly ["off", "observe", "enforce"];
3
+ export type OrchestrationPolicyMode = (typeof ORCHESTRATION_POLICY_MODES)[number];
4
+ export declare const ORCHESTRATION_ACTION_KINDS: readonly ["foreground_harness_spawn", "shell_platform_dispatch"];
5
+ export type OrchestrationActionKind = (typeof ORCHESTRATION_ACTION_KINDS)[number];
6
+ export declare const ORCHESTRATION_POLICY_DECISIONS: readonly ["allow_local", "observe_bypass", "enforce_harness_task"];
7
+ export type OrchestrationPolicyDecision = (typeof ORCHESTRATION_POLICY_DECISIONS)[number];
8
+ export interface OrchestrationPolicyEvaluateInput {
9
+ action: OrchestrationActionKind;
10
+ toolName?: string | null;
11
+ sessionId?: string | null;
12
+ planId?: string | null;
13
+ parentTaskId?: string | null;
14
+ title?: string | null;
15
+ description?: string | null;
16
+ }
17
+ export interface OrchestrationPolicyEvaluateResult {
18
+ mode: OrchestrationPolicyMode;
19
+ decision: OrchestrationPolicyDecision;
20
+ /** Stable idempotency key when enforce would create a linked harness task. */
21
+ idempotencyKey: string | null;
22
+ bypassLogged: boolean;
23
+ reason: string;
24
+ }
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
+ /** Compact task context envelope (non-persona tasks or supplemental). */
13
+ contextEnvelopeMarkdown?: string | null;
12
14
  /** P7 memory-quality trace summary + live-verification nudges (privacy-safe). */
13
15
  memoryQualityMarkdown?: string | null;
14
16
  /** When set, Haiku/compact models get a shorter harness instruction block. */
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Normalize and classify repo text-search commands for harness operators and chat agents.
3
+ *
4
+ * Codex/OpenClaw often emit `search "pattern" in <scope>` meta that maps poorly to ripgrep
5
+ * (e.g. `in !node_modules` instead of `-g '!node_modules/**'`, or `in package.json` as a path).
6
+ */
7
+ export type RepoSearchKind = "not_repo_search" | "bad_scope" | "rg_exclude_syntax" | "no_matches";
8
+ export interface RepoSearchContext {
9
+ kind: RepoSearchKind;
10
+ pattern?: string;
11
+ target?: string;
12
+ }
13
+ export declare function isSingleFileSearchTarget(target: string | undefined): boolean;
14
+ /** `!node_modules` as a path is invalid — ripgrep needs `-g '!node_modules/**'`. */
15
+ export declare function isRgExcludeScopeTarget(target: string | undefined): boolean;
16
+ export declare function normalizeRgArgv(argv: string[]): {
17
+ argv: string[];
18
+ changed: boolean;
19
+ };
20
+ export declare function normalizeRepoSearchCommand(command: string): {
21
+ command: string;
22
+ changed: boolean;
23
+ };
24
+ export declare function extractSearchMeta(meta: string): {
25
+ pattern?: string;
26
+ target?: string;
27
+ };
28
+ export declare function classifyRepoSearchMeta(meta: string): RepoSearchContext;
29
+ export declare function metaToNormalizedRgCommand(meta: string): {
30
+ command: string;
31
+ changed: boolean;
32
+ } | null;
33
+ export declare function formatRepoSearchGuidance(ctx: RepoSearchContext): string | null;
34
+ /** Extract `search "…" in …` from a tool-failure line or command string. */
35
+ export declare function extractSearchMetaFromToolLine(line: string): string | null;
36
+ export declare function diagnoseRepoSearchFailure(input: {
37
+ meta?: string;
38
+ command?: string;
39
+ exitCode?: number;
40
+ }): string | null;
@@ -0,0 +1,10 @@
1
+ import { type HarnessRunRecord } from "./run-store.js";
2
+ /**
3
+ * Union of `run.json` worker keys and on-disk worker dirs for one run.
4
+ *
5
+ * Watchdog replenishment can spawn workers whose `worker.json` exists before
6
+ * `run.json` is updated (or when concurrent spawns lose a last-write-wins race).
7
+ * Finalization, capacity gates, and operator rollups must not treat those
8
+ * live workers as absent.
9
+ */
10
+ export declare function listRunWorkerNames(run: HarnessRunRecord): string[];
@@ -5,6 +5,8 @@ export interface RunnerPresencePayload {
5
5
  harnessRepo: string | null;
6
6
  runId?: string | null;
7
7
  }
8
+ /** True when this host belongs to the Ghost orchestrator pool (not Hermes Forge). */
9
+ export declare function isGhostPoolHost(env?: NodeJS.ProcessEnv): boolean;
8
10
  /** Stable runner identity for multi-box AgentOS coordination. */
9
11
  export declare function resolveRunnerPresencePayload(input?: {
10
12
  runId?: string | null;
@@ -1,4 +1,4 @@
1
- export type ShellCommandOutcomeKind = "success" | "audit_findings" | "command_failure";
1
+ export type ShellCommandOutcomeKind = "success" | "audit_findings" | "search_no_matches" | "command_failure";
2
2
  export interface NpmAuditSummary {
3
3
  total: number;
4
4
  critical: number;
package/dist/status.d.ts CHANGED
@@ -17,6 +17,18 @@ export interface InstructionPolicyEvidenceSnapshot {
17
17
  markdownChars?: number;
18
18
  injectedAt?: string;
19
19
  }
20
+ /** Snapshot of task-anchored context envelope injection at worker spawn. */
21
+ export interface ContextEnvelopeEvidenceSnapshot {
22
+ anchorTaskId?: string;
23
+ envelopeGeneratedAt?: string;
24
+ injectedAt?: string;
25
+ hasPersonaBlock?: boolean;
26
+ personaSlug?: string | null;
27
+ operatingRuleCount?: number;
28
+ memoryHitCount?: number;
29
+ markdownChars?: number;
30
+ source?: "dispatch_injection" | "tool_call";
31
+ }
20
32
  /** Snapshot of anchored persona context-envelope injection at worker spawn. */
21
33
  export interface PersonaContextEvidenceSnapshot {
22
34
  expectedPersonaSlug?: string;
@@ -60,6 +72,7 @@ export interface HarnessWorkerRecord {
60
72
  memoryQualityCapture?: HarnessMemoryQualityCaptureSnapshot;
61
73
  personaSlug?: string;
62
74
  personaEvidence?: PersonaContextEvidenceSnapshot;
75
+ contextEnvelopeEvidence?: ContextEnvelopeEvidenceSnapshot;
63
76
  leaseOwner?: string;
64
77
  /** Fencing token from claim — sent on renew/completion when set. */
65
78
  leaseToken?: string;
@@ -1,5 +1,5 @@
1
1
  import type { HarnessRunRecord } from "./run-store.js";
2
- import type { HarnessMemoryQualityCaptureSnapshot, HarnessWorkerRecord, InstructionPolicyEvidenceSnapshot, PersonaContextEvidenceSnapshot } from "./status.js";
2
+ import type { ContextEnvelopeEvidenceSnapshot, HarnessMemoryQualityCaptureSnapshot, HarnessWorkerRecord, InstructionPolicyEvidenceSnapshot, PersonaContextEvidenceSnapshot } from "./status.js";
3
3
  export interface SpawnWorkerOptions {
4
4
  name: string;
5
5
  task: string;
@@ -17,6 +17,8 @@ export interface SpawnWorkerOptions {
17
17
  personaMarkdown?: string | null;
18
18
  personaSlug?: string | null;
19
19
  personaEvidence?: PersonaContextEvidenceSnapshot | null;
20
+ contextEnvelopeMarkdown?: string | null;
21
+ contextEnvelopeEvidence?: ContextEnvelopeEvidenceSnapshot | null;
20
22
  leaseOwner?: string;
21
23
  leaseToken?: string;
22
24
  dispatched?: boolean;
@@ -1,5 +1,15 @@
1
1
  export declare function validateRunId(runId: string): string;
2
2
  export declare function validateWorkerName(name: string): string;
3
+ /**
4
+ * Require `--run` and `--name` before touching the filesystem. Missing flags used
5
+ * to become `String(undefined)` → paths under `runs/undefined/workers/undefined`.
6
+ */
7
+ export declare function resolveWorkerTargetArgs(args: Record<string, string | boolean>): {
8
+ runId: string;
9
+ workerName: string;
10
+ };
11
+ /** Require `--run` before loading run.json or building a run board. */
12
+ export declare function resolveRunTargetArg(args: Record<string, string | boolean>): string;
3
13
  export declare function validateRepo(repo: string): string;
4
14
  export declare function validateOwnedPaths(repoRoot: string, ownedPaths: string[]): string[];
5
15
  export declare function validateTailLines(lines: number): number;
@@ -0,0 +1 @@
1
+ export declare function extractEmbeddedWorkerFinalResultRecord(value: string): Record<string, unknown> | null;
@@ -13,8 +13,29 @@ export declare function tryCompleteWorker(args: Record<string, string | boolean>
13
13
  }>;
14
14
  export declare function completeWorker(args: Record<string, string | boolean>): Promise<void>;
15
15
  export declare function workerStatus(args: Record<string, string | boolean>): void;
16
- export declare function buildRunBoard(runId: string): Record<string, unknown>;
16
+ export declare function workerList(args: Record<string, string | boolean>): void;
17
+ type RunBoardWorker = Record<string, unknown> & {
18
+ worker: string;
19
+ status?: string;
20
+ attention?: string;
21
+ lifecycleStage?: string | null;
22
+ lastActivityAt?: string | null;
23
+ };
24
+ interface RunBoard {
25
+ runId: string;
26
+ name: string;
27
+ status: string;
28
+ repo: string;
29
+ workerCount: number;
30
+ needsAttention: string[];
31
+ workers: RunBoardWorker[];
32
+ summary?: Record<string, unknown>;
33
+ controller?: Record<string, unknown>;
34
+ }
35
+ export declare function buildRunBoard(runId: string): RunBoard;
36
+ export declare function buildCompactRunBoard(runId: string): RunBoard;
17
37
  export declare function publishHarnessBoardSnapshot(args: Record<string, string | boolean>, source: string): Promise<Record<string, unknown> | null>;
18
38
  export declare function runStatus(args: Record<string, string | boolean>): void;
19
39
  export declare function tailWorker(args: Record<string, string | boolean>): void;
20
40
  export declare function stopWorker(args: Record<string, string | boolean>): void;
41
+ export {};
@@ -0,0 +1,24 @@
1
+ export declare const WORKER_PERSONA_DISPATCH_LANES: readonly ["implementation", "review", "landing"];
2
+ export type WorkerPersonaDispatchLane = (typeof WORKER_PERSONA_DISPATCH_LANES)[number];
3
+ export declare const WORKER_PERSONA_DEFAULT_ROLE_LANES: readonly ["plan_author", "implementer", "report_reviewer", "deep_reviewer", "runtime_verifier", "system"];
4
+ export type WorkerPersonaDefaultRoleLane = (typeof WORKER_PERSONA_DEFAULT_ROLE_LANES)[number];
5
+ export interface WorkerPersonaCatalogEntry {
6
+ slug: string;
7
+ displayName: string;
8
+ description: string;
9
+ /** Harness dispatch lane reserved for this persona (null = orchestration / no dispatch). */
10
+ dispatchLane: WorkerPersonaDispatchLane | null;
11
+ /** Default plan progress role when enriching harness tasks. */
12
+ defaultRoleLane: WorkerPersonaDefaultRoleLane;
13
+ }
14
+ export declare const WORKER_PERSONA_CATALOG: readonly WorkerPersonaCatalogEntry[];
15
+ export type WorkerPersonaCatalogSlug = (typeof WORKER_PERSONA_CATALOG)[number]["slug"];
16
+ export declare function getWorkerPersonaCatalogEntry(slug: string | null | undefined): WorkerPersonaCatalogEntry | null;
17
+ /** Dispatch lane reserved for a persona; null when orchestration-only or unknown. */
18
+ export declare function getPersonaDispatchLane(slug: string | null | undefined): WorkerPersonaDispatchLane | null;
19
+ export declare function getPersonaDefaultRoleLane(slug: string | null | undefined): WorkerPersonaDefaultRoleLane | null;
20
+ export declare function isKnownWorkerPersonaSlug(slug: string | null | undefined): boolean;
21
+ /** Personas whose harness dispatch lane is `review` (derived — do not hardcode slugs). */
22
+ export declare function workerPersonaReviewSlugs(): readonly WorkerPersonaCatalogSlug[];
23
+ /** Personas whose harness dispatch lane is `landing` (derived — do not hardcode slugs). */
24
+ export declare function workerPersonaLandingSlugs(): readonly WorkerPersonaCatalogSlug[];
@@ -0,0 +1,138 @@
1
+ // src/worker-persona-catalog.ts
2
+ var WORKER_PERSONA_DISPATCH_LANES = [
3
+ "implementation",
4
+ "review",
5
+ "landing"
6
+ ];
7
+ var WORKER_PERSONA_DEFAULT_ROLE_LANES = [
8
+ "plan_author",
9
+ "implementer",
10
+ "report_reviewer",
11
+ "deep_reviewer",
12
+ "runtime_verifier",
13
+ "system"
14
+ ];
15
+ var WORKER_PERSONA_CATALOG = [
16
+ {
17
+ slug: "ghost",
18
+ displayName: "Ghost",
19
+ description: "Orchestration \u2014 coordinates lanes, handoffs, and operator decisions.",
20
+ dispatchLane: null,
21
+ defaultRoleLane: "system"
22
+ },
23
+ {
24
+ slug: "astra",
25
+ displayName: "Astra",
26
+ description: "Planning \u2014 plan authoring, milestones, and operational flow design.",
27
+ dispatchLane: "implementation",
28
+ defaultRoleLane: "plan_author"
29
+ },
30
+ {
31
+ slug: "rhea",
32
+ displayName: "Rhea",
33
+ description: "Runtime / control-plane implementation \u2014 harness, dispatch, and AgentOS plumbing.",
34
+ dispatchLane: "implementation",
35
+ defaultRoleLane: "implementer"
36
+ },
37
+ {
38
+ slug: "mnemo",
39
+ displayName: "Mnemo",
40
+ description: "Memory-quality implementation \u2014 MARM lanes, retrieval hygiene, and consolidation.",
41
+ dispatchLane: "implementation",
42
+ defaultRoleLane: "implementer"
43
+ },
44
+ {
45
+ slug: "sentinel",
46
+ displayName: "Sentinel",
47
+ description: "Security / privacy implementation and security verification gates.",
48
+ dispatchLane: "review",
49
+ defaultRoleLane: "deep_reviewer"
50
+ },
51
+ {
52
+ slug: "pixel",
53
+ displayName: "Pixel",
54
+ description: "Frontend \u2014 Command Center UI, dashboards, and client surfaces.",
55
+ dispatchLane: "implementation",
56
+ defaultRoleLane: "implementer"
57
+ },
58
+ {
59
+ slug: "schema",
60
+ displayName: "Schema",
61
+ description: "Data / migrations \u2014 Prisma schema, seeds, and persistence contracts.",
62
+ dispatchLane: "implementation",
63
+ defaultRoleLane: "implementer"
64
+ },
65
+ {
66
+ slug: "atlas",
67
+ displayName: "Atlas",
68
+ description: "Infra / reliability \u2014 deploy pipelines, observability, and runtime health.",
69
+ dispatchLane: "implementation",
70
+ defaultRoleLane: "runtime_verifier"
71
+ },
72
+ {
73
+ slug: "bridge",
74
+ displayName: "Bridge",
75
+ description: "Integrations / MCP \u2014 tool manifests, OpenClaw bridges, and cross-service wiring.",
76
+ dispatchLane: "implementation",
77
+ defaultRoleLane: "implementer"
78
+ },
79
+ {
80
+ slug: "catalyst",
81
+ displayName: "Catalyst",
82
+ description: "Product / domain \u2014 business rules, domain packs, and feature semantics.",
83
+ dispatchLane: "implementation",
84
+ defaultRoleLane: "implementer"
85
+ },
86
+ {
87
+ slug: "lorentz",
88
+ displayName: "Lorentz",
89
+ description: "Review / testing \u2014 pre-landing and post-landing verification, report + deep review.",
90
+ dispatchLane: "review",
91
+ defaultRoleLane: "report_reviewer"
92
+ },
93
+ {
94
+ slug: "dalton",
95
+ displayName: "Dalton",
96
+ description: "Landing / merge execution \u2014 merge-ready PR landing and merge evidence only (no implementation).",
97
+ dispatchLane: "landing",
98
+ defaultRoleLane: "implementer"
99
+ }
100
+ ];
101
+ var BY_SLUG = new Map(WORKER_PERSONA_CATALOG.map((entry) => [entry.slug, entry]));
102
+ function getWorkerPersonaCatalogEntry(slug) {
103
+ if (!slug) return null;
104
+ const key = slug.trim().toLowerCase();
105
+ return BY_SLUG.get(key) ?? null;
106
+ }
107
+ function getPersonaDispatchLane(slug) {
108
+ return getWorkerPersonaCatalogEntry(slug)?.dispatchLane ?? null;
109
+ }
110
+ function getPersonaDefaultRoleLane(slug) {
111
+ return getWorkerPersonaCatalogEntry(slug)?.defaultRoleLane ?? null;
112
+ }
113
+ function isKnownWorkerPersonaSlug(slug) {
114
+ if (!slug) return false;
115
+ return BY_SLUG.has(slug.trim().toLowerCase());
116
+ }
117
+ function workerPersonaReviewSlugs() {
118
+ return WORKER_PERSONA_CATALOG.filter((entry) => entry.dispatchLane === "review").map(
119
+ (entry) => entry.slug
120
+ );
121
+ }
122
+ function workerPersonaLandingSlugs() {
123
+ return WORKER_PERSONA_CATALOG.filter((entry) => entry.dispatchLane === "landing").map(
124
+ (entry) => entry.slug
125
+ );
126
+ }
127
+ export {
128
+ WORKER_PERSONA_CATALOG,
129
+ WORKER_PERSONA_DEFAULT_ROLE_LANES,
130
+ WORKER_PERSONA_DISPATCH_LANES,
131
+ getPersonaDefaultRoleLane,
132
+ getPersonaDispatchLane,
133
+ getWorkerPersonaCatalogEntry,
134
+ isKnownWorkerPersonaSlug,
135
+ workerPersonaLandingSlugs,
136
+ workerPersonaReviewSlugs
137
+ };
138
+ //# sourceMappingURL=worker-persona-catalog.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/worker-persona-catalog.ts"],
4
+ "sourcesContent": ["// Canonical Command Center worker persona catalog \u2014 single source of truth for\r\n// harness dispatch lanes, default plan role lanes, and persona slug validation.\r\n// AgentOS re-exports this module; do not duplicate lane maps elsewhere.\r\n\r\nexport const WORKER_PERSONA_DISPATCH_LANES = [\r\n \"implementation\",\r\n \"review\",\r\n \"landing\",\r\n] as const;\r\n\r\nexport type WorkerPersonaDispatchLane = (typeof WORKER_PERSONA_DISPATCH_LANES)[number];\r\n\r\nexport const WORKER_PERSONA_DEFAULT_ROLE_LANES = [\r\n \"plan_author\",\r\n \"implementer\",\r\n \"report_reviewer\",\r\n \"deep_reviewer\",\r\n \"runtime_verifier\",\r\n \"system\",\r\n] as const;\r\n\r\nexport type WorkerPersonaDefaultRoleLane = (typeof WORKER_PERSONA_DEFAULT_ROLE_LANES)[number];\r\n\r\nexport interface WorkerPersonaCatalogEntry {\r\n slug: string;\r\n displayName: string;\r\n description: string;\r\n /** Harness dispatch lane reserved for this persona (null = orchestration / no dispatch). */\r\n dispatchLane: WorkerPersonaDispatchLane | null;\r\n /** Default plan progress role when enriching harness tasks. */\r\n defaultRoleLane: WorkerPersonaDefaultRoleLane;\r\n}\r\n\r\nexport const WORKER_PERSONA_CATALOG: readonly WorkerPersonaCatalogEntry[] = [\r\n {\r\n slug: \"ghost\",\r\n displayName: \"Ghost\",\r\n description: \"Orchestration \u2014 coordinates lanes, handoffs, and operator decisions.\",\r\n dispatchLane: null,\r\n defaultRoleLane: \"system\",\r\n },\r\n {\r\n slug: \"astra\",\r\n displayName: \"Astra\",\r\n description: \"Planning \u2014 plan authoring, milestones, and operational flow design.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"plan_author\",\r\n },\r\n {\r\n slug: \"rhea\",\r\n displayName: \"Rhea\",\r\n description: \"Runtime / control-plane implementation \u2014 harness, dispatch, and AgentOS plumbing.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"mnemo\",\r\n displayName: \"Mnemo\",\r\n description: \"Memory-quality implementation \u2014 MARM lanes, retrieval hygiene, and consolidation.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"sentinel\",\r\n displayName: \"Sentinel\",\r\n description: \"Security / privacy implementation and security verification gates.\",\r\n dispatchLane: \"review\",\r\n defaultRoleLane: \"deep_reviewer\",\r\n },\r\n {\r\n slug: \"pixel\",\r\n displayName: \"Pixel\",\r\n description: \"Frontend \u2014 Command Center UI, dashboards, and client surfaces.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"schema\",\r\n displayName: \"Schema\",\r\n description: \"Data / migrations \u2014 Prisma schema, seeds, and persistence contracts.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"atlas\",\r\n displayName: \"Atlas\",\r\n description: \"Infra / reliability \u2014 deploy pipelines, observability, and runtime health.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"runtime_verifier\",\r\n },\r\n {\r\n slug: \"bridge\",\r\n displayName: \"Bridge\",\r\n description: \"Integrations / MCP \u2014 tool manifests, OpenClaw bridges, and cross-service wiring.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"catalyst\",\r\n displayName: \"Catalyst\",\r\n description: \"Product / domain \u2014 business rules, domain packs, and feature semantics.\",\r\n dispatchLane: \"implementation\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n {\r\n slug: \"lorentz\",\r\n displayName: \"Lorentz\",\r\n description: \"Review / testing \u2014 pre-landing and post-landing verification, report + deep review.\",\r\n dispatchLane: \"review\",\r\n defaultRoleLane: \"report_reviewer\",\r\n },\r\n {\r\n slug: \"dalton\",\r\n displayName: \"Dalton\",\r\n description: \"Landing / merge execution \u2014 merge-ready PR landing and merge evidence only (no implementation).\",\r\n dispatchLane: \"landing\",\r\n defaultRoleLane: \"implementer\",\r\n },\r\n] as const;\r\n\r\nexport type WorkerPersonaCatalogSlug = (typeof WORKER_PERSONA_CATALOG)[number][\"slug\"];\r\n\r\nconst BY_SLUG = new Map(WORKER_PERSONA_CATALOG.map((entry) => [entry.slug, entry]));\r\n\r\nexport function getWorkerPersonaCatalogEntry(\r\n slug: string | null | undefined,\r\n): WorkerPersonaCatalogEntry | null {\r\n if (!slug) return null;\r\n const key = slug.trim().toLowerCase();\r\n return BY_SLUG.get(key) ?? null;\r\n}\r\n\r\n/** Dispatch lane reserved for a persona; null when orchestration-only or unknown. */\r\nexport function getPersonaDispatchLane(\r\n slug: string | null | undefined,\r\n): WorkerPersonaDispatchLane | null {\r\n return getWorkerPersonaCatalogEntry(slug)?.dispatchLane ?? null;\r\n}\r\n\r\nexport function getPersonaDefaultRoleLane(\r\n slug: string | null | undefined,\r\n): WorkerPersonaDefaultRoleLane | null {\r\n return getWorkerPersonaCatalogEntry(slug)?.defaultRoleLane ?? null;\r\n}\r\n\r\nexport function isKnownWorkerPersonaSlug(slug: string | null | undefined): boolean {\r\n if (!slug) return false;\r\n return BY_SLUG.has(slug.trim().toLowerCase());\r\n}\r\n\r\n/** Personas whose harness dispatch lane is `review` (derived \u2014 do not hardcode slugs). */\r\nexport function workerPersonaReviewSlugs(): readonly WorkerPersonaCatalogSlug[] {\r\n return WORKER_PERSONA_CATALOG.filter((entry) => entry.dispatchLane === \"review\").map(\r\n (entry) => entry.slug,\r\n );\r\n}\r\n\r\n/** Personas whose harness dispatch lane is `landing` (derived \u2014 do not hardcode slugs). */\r\nexport function workerPersonaLandingSlugs(): readonly WorkerPersonaCatalogSlug[] {\r\n return WORKER_PERSONA_CATALOG.filter((entry) => entry.dispatchLane === \"landing\").map(\r\n (entry) => entry.slug,\r\n );\r\n}\r\n"],
5
+ "mappings": ";AAIO,IAAM,gCAAgC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,oCAAoC;AAAA,EAC/C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAcO,IAAM,yBAA+D;AAAA,EAC1E;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,aAAa;AAAA,IACb,cAAc;AAAA,IACd,iBAAiB;AAAA,EACnB;AACF;AAIA,IAAM,UAAU,IAAI,IAAI,uBAAuB,IAAI,CAAC,UAAU,CAAC,MAAM,MAAM,KAAK,CAAC,CAAC;AAE3E,SAAS,6BACd,MACkC;AAClC,MAAI,CAAC,KAAM,QAAO;AAClB,QAAM,MAAM,KAAK,KAAK,EAAE,YAAY;AACpC,SAAO,QAAQ,IAAI,GAAG,KAAK;AAC7B;AAGO,SAAS,uBACd,MACkC;AAClC,SAAO,6BAA6B,IAAI,GAAG,gBAAgB;AAC7D;AAEO,SAAS,0BACd,MACqC;AACrC,SAAO,6BAA6B,IAAI,GAAG,mBAAmB;AAChE;AAEO,SAAS,yBAAyB,MAA0C;AACjF,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO,QAAQ,IAAI,KAAK,KAAK,EAAE,YAAY,CAAC;AAC9C;AAGO,SAAS,2BAAgE;AAC9E,SAAO,uBAAuB,OAAO,CAAC,UAAU,MAAM,iBAAiB,QAAQ,EAAE;AAAA,IAC/E,CAAC,UAAU,MAAM;AAAA,EACnB;AACF;AAGO,SAAS,4BAAiE;AAC/E,SAAO,uBAAuB,OAAO,CAAC,UAAU,MAAM,iBAAiB,SAAS,EAAE;AAAA,IAChF,CAAC,UAAU,MAAM;AAAA,EACnB;AACF;",
6
+ "names": []
7
+ }
@@ -1,6 +1,8 @@
1
1
  export interface WorkspaceRuntimePreferences {
2
2
  maxConcurrentWorkers: number | null;
3
3
  }
4
+ export declare function shouldApplyWorkspaceRuntimePreferences(env?: NodeJS.ProcessEnv): boolean;
5
+ export declare function configuredMaxWorkersOverrideForBox(preferences: WorkspaceRuntimePreferences | null | undefined, env?: NodeJS.ProcessEnv): number | undefined;
4
6
  /**
5
7
  * Pull the Command Center worker cap each pipeline tick so the daemon honors
6
8
  * workspace settings without restarting or editing ~/.kynver/config.json.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kynver-app/runtime",
3
- "version": "0.1.90",
3
+ "version": "0.1.91",
4
4
  "description": "Kynver AgentOS local execution runtime and CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",