@agentskit/harness 0.5.0 → 0.7.0

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/index.d.ts CHANGED
@@ -735,8 +735,188 @@ interface DocBridgeContextProviderOptions {
735
735
  readonly root: string;
736
736
  readonly indexPath?: string;
737
737
  }
738
+ interface DocBridgeIndexInspection {
739
+ readonly present: boolean;
740
+ readonly path: string;
741
+ readonly contentHash: string | null;
742
+ readonly mtimeMs: number | null;
743
+ readonly ageHours: number | null;
744
+ readonly error: string | null;
745
+ }
746
+ /** Read-only inspection for doctor freshness checks (no network, no rebuild). */
747
+ declare const inspectDocBridgeIndex: (root: string, indexPath?: string, now?: number) => DocBridgeIndexInspection;
738
748
  declare const createDocBridgeContextProvider: ({ root, indexPath }: DocBridgeContextProviderOptions) => ContextProvider;
739
749
 
750
+ interface CommandResult {
751
+ readonly code: number | null;
752
+ readonly stdout: string;
753
+ readonly stderr: string;
754
+ readonly timedOut: boolean;
755
+ readonly durationMs: number;
756
+ }
757
+ interface CommandRunOptions {
758
+ readonly timeoutMs?: number;
759
+ readonly cwd?: string;
760
+ readonly env?: NodeJS.ProcessEnv;
761
+ }
762
+ /** Shell-free command execution seam. Adapters receive it; composition supplies the real one; tests supply fakes. */
763
+ interface CommandRunner {
764
+ run(argv: readonly string[], options?: CommandRunOptions): Promise<CommandResult>;
765
+ }
766
+ /** Resolve an executable on PATH without spawning a shell. Honours PATHEXT on Windows. */
767
+ declare const findExecutable: (name: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform) => string | null;
768
+ /** Parse the `{ ok, result }` envelope every `orca … --json` command prints. Returns null when the payload is not an envelope. */
769
+ declare const parseJsonEnvelope: (stdout: string) => {
770
+ readonly ok: boolean;
771
+ readonly result: unknown;
772
+ readonly error?: string;
773
+ } | null;
774
+
775
+ type UsageWindowKind = 'session' | 'weekly' | 'monthly' | string;
776
+ interface UsageWindow {
777
+ readonly kind: UsageWindowKind;
778
+ readonly usedPercent: number;
779
+ readonly windowMinutes: number | null;
780
+ readonly resetsAt: string | null;
781
+ }
782
+ interface ProviderUsage {
783
+ /** `ok` when Orca reported live usage, `unavailable` when Orca could not, `unknown` when Orca did not mention the provider. */
784
+ readonly status: 'ok' | 'unavailable' | 'unknown';
785
+ readonly error: string | null;
786
+ readonly windows: readonly UsageWindow[];
787
+ readonly exhausted: boolean;
788
+ /** Earliest reset among exhausted windows, ISO-8601. */
789
+ readonly resetsAt: string | null;
790
+ readonly hasAuth: boolean | null;
791
+ }
792
+ type ProviderAuthStatus = 'ok' | 'unknown' | 'missing';
793
+ interface ProviderAvailability {
794
+ readonly id: string;
795
+ readonly binary: string | null;
796
+ readonly hookState: 'installed' | 'not_installed' | 'unknown';
797
+ readonly auth: ProviderAuthStatus;
798
+ readonly usage: ProviderUsage;
799
+ readonly probe: 'passed' | 'failed' | 'skipped';
800
+ readonly coolingDownUntil: string | null;
801
+ readonly available: boolean;
802
+ readonly reasons: readonly string[];
803
+ }
804
+ interface ProviderSpec {
805
+ readonly id: string;
806
+ readonly bin: string;
807
+ readonly auth: 'subscription' | 'api-key' | 'none';
808
+ readonly envKeys: readonly string[];
809
+ readonly orcaUsageKey: string;
810
+ readonly probe?: readonly string[];
811
+ }
812
+ interface DetectProvidersInput {
813
+ readonly providers: readonly ProviderSpec[];
814
+ readonly accountList: unknown;
815
+ readonly agentHooks: Readonly<Record<string, 'installed' | 'not_installed' | 'unknown'>>;
816
+ readonly env?: NodeJS.ProcessEnv;
817
+ readonly platform?: NodeJS.Platform;
818
+ readonly exhaustedPercent?: number;
819
+ readonly cooldowns?: Readonly<Record<string, string>>;
820
+ readonly now?: () => Date;
821
+ readonly runner?: CommandRunner;
822
+ readonly probeTimeoutMs?: number;
823
+ }
824
+ declare const parseUsageWindows: (entry: unknown) => readonly UsageWindow[];
825
+ /** Read one provider's usage out of `orca account list --json` → `result`. */
826
+ declare const parseProviderUsage: (accountList: unknown, usageKey: string, exhaustedPercent?: number) => ProviderUsage;
827
+ declare const authStatusFor: (spec: ProviderSpec, usage: ProviderUsage, env: NodeJS.ProcessEnv) => ProviderAuthStatus;
828
+ /** Detect which coding-agent CLIs can take work right now. Pure over its inputs except the optional probe. */
829
+ declare const detectProviders: (input: DetectProvidersInput) => Promise<readonly ProviderAvailability[]>;
830
+ /** Exponential cooldown: initial × 2^attempts, capped. Returns the ISO instant the provider may be retried. */
831
+ declare const cooldownUntil: (attempt: number, initialMin: number, maxMin: number, from: Date, resetsAt?: string | null) => string;
832
+ type UsageMetric = 'max' | 'session' | 'weekly' | 'monthly';
833
+ /** Remaining capacity 0–100 from usage windows, or null when unknown. `max` = most constrained window. */
834
+ declare const remainingUsagePercent: (usage: ProviderUsage, metric?: UsageMetric) => number | null;
835
+ /** Sort key for usage-aware ranking: higher remaining first; known before unknown when preferKnownUsage. */
836
+ declare const usageRankTuple: (usage: ProviderUsage, metric: UsageMetric, preferKnownUsage: boolean) => readonly [number, number, number];
837
+ /** Warn when Orca shows an integration that has no `models.providers` entry. */
838
+ declare const undeclaredOrcaProviders: (accountList: unknown, declared: Readonly<Record<string, {
839
+ readonly orcaUsageKey?: string;
840
+ }>>) => readonly string[];
841
+
842
+ interface RagQueryResult {
843
+ readonly references: readonly ContextReference[];
844
+ readonly sourceHash: string;
845
+ }
846
+ interface RagContextProviderOptions {
847
+ /** Injected query function — callers wire `@agentskit/rag` (or any store) here; this package never imports it. */
848
+ readonly query: (query: ContextQuery) => Promise<RagQueryResult>;
849
+ }
850
+ interface ArgvRagContextProviderOptions {
851
+ readonly runner: CommandRunner;
852
+ /** Argv template; `{query}` and `{scope}` (JSON array) are substituted per element. */
853
+ readonly argv: readonly string[];
854
+ readonly timeoutMs?: number;
855
+ readonly cwd?: string;
856
+ }
857
+ /** Accept either a ContextSnapshot-shaped object or `{ references, sourceHash }`. Fail closed on anything else. */
858
+ declare const parseRagQueryOutput: (value: unknown) => RagQueryResult;
859
+ /** ContextProvider over an injected RAG query function. No static dependency on `@agentskit/rag`. */
860
+ declare const createRagContextProvider: ({ query }: RagContextProviderOptions) => ContextProvider;
861
+ /** ContextProvider that runs argv and parses stdout JSON as a ContextSnapshot or `{ references, sourceHash }`. */
862
+ declare const createArgvRagContextProvider: ({ runner, argv, timeoutMs, cwd }: ArgvRagContextProviderOptions) => ContextProvider;
863
+
864
+ interface PolicyRule {
865
+ readonly id: string;
866
+ readonly effect: 'allow' | 'block' | 'approve';
867
+ readonly toolIds: readonly string[];
868
+ readonly reason: string;
869
+ }
870
+ interface PolicyRequest {
871
+ readonly actionId: string;
872
+ readonly turnId: string;
873
+ readonly toolId: string;
874
+ readonly argumentsHash: string;
875
+ }
876
+ interface PolicyDecision {
877
+ readonly decision: 'allow' | 'block' | 'approve';
878
+ readonly policyId: string;
879
+ readonly reason: string;
880
+ }
881
+ interface PolicyGate {
882
+ evaluate(request: PolicyRequest): PolicyDecision;
883
+ }
884
+ declare const createPolicyGate: ({ rules }: {
885
+ readonly rules: readonly PolicyRule[];
886
+ }) => PolicyGate;
887
+
888
+ type McpPolicy = PolicyGate | {
889
+ readonly evaluate: (request: PolicyRequest) => PolicyDecision;
890
+ };
891
+ interface McpToolBridgeOptions {
892
+ readonly policy: McpPolicy;
893
+ readonly allowTools: readonly string[];
894
+ readonly call: (toolId: string, argsHash: string, args: unknown) => Promise<unknown>;
895
+ }
896
+ type McpToolCallResult = {
897
+ readonly status: 'ok';
898
+ readonly result: unknown;
899
+ } | {
900
+ readonly status: 'blocked';
901
+ readonly reason: string;
902
+ };
903
+ interface McpToolCallInput {
904
+ readonly toolId: string;
905
+ readonly args?: unknown;
906
+ readonly argsHash?: string;
907
+ readonly actionId?: string;
908
+ readonly turnId?: string;
909
+ }
910
+ interface McpToolBridge {
911
+ readonly invoke: (input: McpToolCallInput) => Promise<McpToolCallResult>;
912
+ }
913
+ declare const hashMcpArgs: (args: unknown) => string;
914
+ /**
915
+ * Adapter-only MCP tool bridge: default-deny allowlist + policy gate before any call.
916
+ * Not wired into loop tick/deliver in 0.6.0 (see ADR-0028).
917
+ */
918
+ declare const createMcpToolBridge: ({ policy, allowTools, call }: McpToolBridgeOptions) => McpToolBridge;
919
+
740
920
  interface DiscoveryOption {
741
921
  readonly id: string;
742
922
  readonly summary: string;
@@ -1832,30 +2012,6 @@ declare const loadBenchmarkManifest: (path: string) => BenchmarkManifest;
1832
2012
  declare const recordBenchmarkObservation: (path: string, input: BenchmarkObservationInput) => BenchmarkManifest;
1833
2013
  declare const benchmarkRuns: (stateDir: string, manifest?: BenchmarkManifest) => BenchmarkReport;
1834
2014
 
1835
- interface PolicyRule {
1836
- readonly id: string;
1837
- readonly effect: 'allow' | 'block' | 'approve';
1838
- readonly toolIds: readonly string[];
1839
- readonly reason: string;
1840
- }
1841
- interface PolicyRequest {
1842
- readonly actionId: string;
1843
- readonly turnId: string;
1844
- readonly toolId: string;
1845
- readonly argumentsHash: string;
1846
- }
1847
- interface PolicyDecision {
1848
- readonly decision: 'allow' | 'block' | 'approve';
1849
- readonly policyId: string;
1850
- readonly reason: string;
1851
- }
1852
- interface PolicyGate {
1853
- evaluate(request: PolicyRequest): PolicyDecision;
1854
- }
1855
- declare const createPolicyGate: ({ rules }: {
1856
- readonly rules: readonly PolicyRule[];
1857
- }) => PolicyGate;
1858
-
1859
2015
  interface AgentAdapter {
1860
2016
  readonly id: string;
1861
2017
  readonly version: string;
@@ -2195,31 +2351,6 @@ declare const verifyEvidenceBundle: (path: string, { trustedKeys }?: {
2195
2351
  }) => EvidenceBundleVerification;
2196
2352
  declare const readEvidenceTrustStore: (path: string) => readonly TrustedEvidenceKey[];
2197
2353
 
2198
- interface CommandResult {
2199
- readonly code: number | null;
2200
- readonly stdout: string;
2201
- readonly stderr: string;
2202
- readonly timedOut: boolean;
2203
- readonly durationMs: number;
2204
- }
2205
- interface CommandRunOptions {
2206
- readonly timeoutMs?: number;
2207
- readonly cwd?: string;
2208
- readonly env?: NodeJS.ProcessEnv;
2209
- }
2210
- /** Shell-free command execution seam. Adapters receive it; composition supplies the real one; tests supply fakes. */
2211
- interface CommandRunner {
2212
- run(argv: readonly string[], options?: CommandRunOptions): Promise<CommandResult>;
2213
- }
2214
- /** Resolve an executable on PATH without spawning a shell. Honours PATHEXT on Windows. */
2215
- declare const findExecutable: (name: string, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform) => string | null;
2216
- /** Parse the `{ ok, result }` envelope every `orca … --json` command prints. Returns null when the payload is not an envelope. */
2217
- declare const parseJsonEnvelope: (stdout: string) => {
2218
- readonly ok: boolean;
2219
- readonly result: unknown;
2220
- readonly error?: string;
2221
- } | null;
2222
-
2223
2354
  interface OrcaCliOptions {
2224
2355
  readonly bin?: string;
2225
2356
  readonly timeoutMs?: number;
@@ -2359,64 +2490,6 @@ declare const orcaAutomationRemove: (runner: CommandRunner, id: string, options?
2359
2490
  declare const orcaAutomationRun: (runner: CommandRunner, id: string, options?: OrcaCliOptions) => Promise<unknown>;
2360
2491
  declare const orcaAutomationRuns: (runner: CommandRunner, id: string, options?: OrcaCliOptions) => Promise<unknown>;
2361
2492
 
2362
- type UsageWindowKind = 'session' | 'weekly' | 'monthly' | string;
2363
- interface UsageWindow {
2364
- readonly kind: UsageWindowKind;
2365
- readonly usedPercent: number;
2366
- readonly windowMinutes: number | null;
2367
- readonly resetsAt: string | null;
2368
- }
2369
- interface ProviderUsage {
2370
- /** `ok` when Orca reported live usage, `unavailable` when Orca could not, `unknown` when Orca did not mention the provider. */
2371
- readonly status: 'ok' | 'unavailable' | 'unknown';
2372
- readonly error: string | null;
2373
- readonly windows: readonly UsageWindow[];
2374
- readonly exhausted: boolean;
2375
- /** Earliest reset among exhausted windows, ISO-8601. */
2376
- readonly resetsAt: string | null;
2377
- readonly hasAuth: boolean | null;
2378
- }
2379
- type ProviderAuthStatus = 'ok' | 'unknown' | 'missing';
2380
- interface ProviderAvailability {
2381
- readonly id: string;
2382
- readonly binary: string | null;
2383
- readonly hookState: 'installed' | 'not_installed' | 'unknown';
2384
- readonly auth: ProviderAuthStatus;
2385
- readonly usage: ProviderUsage;
2386
- readonly probe: 'passed' | 'failed' | 'skipped';
2387
- readonly coolingDownUntil: string | null;
2388
- readonly available: boolean;
2389
- readonly reasons: readonly string[];
2390
- }
2391
- interface ProviderSpec {
2392
- readonly id: string;
2393
- readonly bin: string;
2394
- readonly auth: 'subscription' | 'api-key' | 'none';
2395
- readonly envKeys: readonly string[];
2396
- readonly orcaUsageKey: string;
2397
- readonly probe?: readonly string[];
2398
- }
2399
- interface DetectProvidersInput {
2400
- readonly providers: readonly ProviderSpec[];
2401
- readonly accountList: unknown;
2402
- readonly agentHooks: Readonly<Record<string, 'installed' | 'not_installed' | 'unknown'>>;
2403
- readonly env?: NodeJS.ProcessEnv;
2404
- readonly platform?: NodeJS.Platform;
2405
- readonly exhaustedPercent?: number;
2406
- readonly cooldowns?: Readonly<Record<string, string>>;
2407
- readonly now?: () => Date;
2408
- readonly runner?: CommandRunner;
2409
- readonly probeTimeoutMs?: number;
2410
- }
2411
- declare const parseUsageWindows: (entry: unknown) => readonly UsageWindow[];
2412
- /** Read one provider's usage out of `orca account list --json` → `result`. */
2413
- declare const parseProviderUsage: (accountList: unknown, usageKey: string, exhaustedPercent?: number) => ProviderUsage;
2414
- declare const authStatusFor: (spec: ProviderSpec, usage: ProviderUsage, env: NodeJS.ProcessEnv) => ProviderAuthStatus;
2415
- /** Detect which coding-agent CLIs can take work right now. Pure over its inputs except the optional probe. */
2416
- declare const detectProviders: (input: DetectProvidersInput) => Promise<readonly ProviderAvailability[]>;
2417
- /** Exponential cooldown: initial × 2^attempts, capped. Returns the ISO instant the provider may be retried. */
2418
- declare const cooldownUntil: (attempt: number, initialMin: number, maxMin: number, from: Date, resetsAt?: string | null) => string;
2419
-
2420
2493
  interface LoopIssue {
2421
2494
  readonly id: string;
2422
2495
  readonly identifier: string;
@@ -2577,6 +2650,77 @@ declare const LoopConfigSchema: z.ZodObject<{
2577
2650
  reviewer: z.ZodArray<z.ZodArray<z.ZodString>>;
2578
2651
  builder: z.ZodArray<z.ZodArray<z.ZodString>>;
2579
2652
  watcher: z.ZodArray<z.ZodArray<z.ZodString>>;
2653
+ routing: z.ZodPrefault<z.ZodObject<{
2654
+ mode: z.ZodDefault<z.ZodEnum<{
2655
+ tiers: "tiers";
2656
+ hybrid: "hybrid";
2657
+ dynamic: "dynamic";
2658
+ catalog: "catalog";
2659
+ }>>;
2660
+ usageMetric: z.ZodDefault<z.ZodEnum<{
2661
+ session: "session";
2662
+ weekly: "weekly";
2663
+ monthly: "monthly";
2664
+ max: "max";
2665
+ }>>;
2666
+ preferKnownUsage: z.ZodDefault<z.ZodBoolean>;
2667
+ excludeProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
2668
+ includeProviders: z.ZodDefault<z.ZodArray<z.ZodString>>;
2669
+ pin: z.ZodPrefault<z.ZodObject<{
2670
+ orchestrator: z.ZodOptional<z.ZodString>;
2671
+ reviewer: z.ZodOptional<z.ZodString>;
2672
+ builder: z.ZodOptional<z.ZodString>;
2673
+ watcher: z.ZodOptional<z.ZodString>;
2674
+ }, z.core.$strip>>;
2675
+ pinStrict: z.ZodDefault<z.ZodBoolean>;
2676
+ }, z.core.$strip>>;
2677
+ roles: z.ZodPrefault<z.ZodObject<{
2678
+ orchestrator: z.ZodPrefault<z.ZodObject<{
2679
+ quality: z.ZodDefault<z.ZodEnum<{
2680
+ frontier: "frontier";
2681
+ balanced: "balanced";
2682
+ fast: "fast";
2683
+ }>>;
2684
+ preferCreators: z.ZodDefault<z.ZodArray<z.ZodString>>;
2685
+ }, z.core.$strip>>;
2686
+ reviewer: z.ZodPrefault<z.ZodObject<{
2687
+ quality: z.ZodDefault<z.ZodEnum<{
2688
+ frontier: "frontier";
2689
+ balanced: "balanced";
2690
+ fast: "fast";
2691
+ }>>;
2692
+ preferCreators: z.ZodDefault<z.ZodArray<z.ZodString>>;
2693
+ }, z.core.$strip>>;
2694
+ builder: z.ZodPrefault<z.ZodObject<{
2695
+ quality: z.ZodDefault<z.ZodEnum<{
2696
+ frontier: "frontier";
2697
+ balanced: "balanced";
2698
+ fast: "fast";
2699
+ }>>;
2700
+ preferCreators: z.ZodDefault<z.ZodArray<z.ZodString>>;
2701
+ }, z.core.$strip>>;
2702
+ watcher: z.ZodPrefault<z.ZodObject<{
2703
+ quality: z.ZodDefault<z.ZodEnum<{
2704
+ frontier: "frontier";
2705
+ balanced: "balanced";
2706
+ fast: "fast";
2707
+ }>>;
2708
+ preferCreators: z.ZodDefault<z.ZodArray<z.ZodString>>;
2709
+ }, z.core.$strip>>;
2710
+ }, z.core.$strip>>;
2711
+ catalog: z.ZodPrefault<z.ZodObject<{
2712
+ sources: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2713
+ cli: "cli";
2714
+ "artificial-analysis": "artificial-analysis";
2715
+ builtin: "builtin";
2716
+ }>>>;
2717
+ artificialAnalysis: z.ZodPrefault<z.ZodObject<{
2718
+ enabled: z.ZodDefault<z.ZodBoolean>;
2719
+ apiKeyEnv: z.ZodDefault<z.ZodString>;
2720
+ cacheHours: z.ZodDefault<z.ZodNumber>;
2721
+ endpoint: z.ZodDefault<z.ZodString>;
2722
+ }, z.core.$strip>>;
2723
+ }, z.core.$strip>>;
2580
2724
  cooldown: z.ZodPrefault<z.ZodObject<{
2581
2725
  initialMin: z.ZodDefault<z.ZodNumber>;
2582
2726
  maxMin: z.ZodDefault<z.ZodNumber>;
@@ -2636,6 +2780,10 @@ declare const LoopConfigSchema: z.ZodObject<{
2636
2780
  deadlineMs: z.ZodDefault<z.ZodNumber>;
2637
2781
  maxCalls: z.ZodDefault<z.ZodNumber>;
2638
2782
  post: z.ZodDefault<z.ZodBoolean>;
2783
+ doctorProbe: z.ZodDefault<z.ZodEnum<{
2784
+ none: "none";
2785
+ help: "help";
2786
+ }>>;
2639
2787
  }, z.core.$strip>>;
2640
2788
  merge: z.ZodPrefault<z.ZodObject<{
2641
2789
  auto: z.ZodDefault<z.ZodBoolean>;
@@ -2646,6 +2794,26 @@ declare const LoopConfigSchema: z.ZodObject<{
2646
2794
  }>>;
2647
2795
  requireChecks: z.ZodDefault<z.ZodBoolean>;
2648
2796
  }, z.core.$strip>>;
2797
+ smoke: z.ZodPrefault<z.ZodObject<{
2798
+ enabled: z.ZodDefault<z.ZodBoolean>;
2799
+ kind: z.ZodDefault<z.ZodEnum<{
2800
+ none: "none";
2801
+ "verify-argv": "verify-argv";
2802
+ }>>;
2803
+ argv: z.ZodDefault<z.ZodArray<z.ZodString>>;
2804
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
2805
+ }, z.core.$strip>>;
2806
+ verify: z.ZodPrefault<z.ZodObject<{
2807
+ runtime: z.ZodDefault<z.ZodEnum<{
2808
+ docker: "docker";
2809
+ process: "process";
2810
+ }>>;
2811
+ argv: z.ZodDefault<z.ZodArray<z.ZodString>>;
2812
+ docker: z.ZodPrefault<z.ZodObject<{
2813
+ image: z.ZodDefault<z.ZodString>;
2814
+ cwd: z.ZodDefault<z.ZodString>;
2815
+ }, z.core.$strip>>;
2816
+ }, z.core.$strip>>;
2649
2817
  maxFixRounds: z.ZodDefault<z.ZodNumber>;
2650
2818
  workerIdleTimeoutMin: z.ZodDefault<z.ZodNumber>;
2651
2819
  selfEditPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
@@ -2659,10 +2827,62 @@ declare const LoopConfigSchema: z.ZodObject<{
2659
2827
  timeoutMs: z.ZodDefault<z.ZodNumber>;
2660
2828
  maxContextReferences: z.ZodDefault<z.ZodNumber>;
2661
2829
  reuseHours: z.ZodDefault<z.ZodNumber>;
2830
+ docBridgeMaxAgeHours: z.ZodDefault<z.ZodNumber>;
2831
+ requireDocBridge: z.ZodDefault<z.ZodBoolean>;
2832
+ briefScopes: z.ZodDefault<z.ZodArray<z.ZodString>>;
2833
+ maxBriefReferences: z.ZodDefault<z.ZodNumber>;
2834
+ contextProviders: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2835
+ "doc-bridge": "doc-bridge";
2836
+ rag: "rag";
2837
+ }>>>;
2838
+ }, z.core.$strip>>;
2839
+ memory: z.ZodPrefault<z.ZodObject<{
2840
+ enabled: z.ZodDefault<z.ZodBoolean>;
2841
+ backend: z.ZodDefault<z.ZodEnum<{
2842
+ none: "none";
2843
+ file: "file";
2844
+ }>>;
2845
+ storePath: z.ZodDefault<z.ZodString>;
2846
+ maxRecall: z.ZodDefault<z.ZodNumber>;
2847
+ maxSummaryChars: z.ZodDefault<z.ZodNumber>;
2848
+ maxBlockChars: z.ZodDefault<z.ZodNumber>;
2849
+ preferOverDocBridge: z.ZodDefault<z.ZodBoolean>;
2850
+ minDocBridgeWhenMemory: z.ZodDefault<z.ZodNumber>;
2851
+ scopes: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2852
+ project: "project";
2853
+ issue: "issue";
2854
+ global: "global";
2855
+ }>>>;
2856
+ includeStale: z.ZodDefault<z.ZodBoolean>;
2857
+ writeOnPromote: z.ZodDefault<z.ZodBoolean>;
2858
+ categories: z.ZodDefault<z.ZodArray<z.ZodEnum<{
2859
+ adjustment: "adjustment";
2860
+ worked: "worked";
2861
+ problem: "problem";
2862
+ other: "other";
2863
+ }>>>;
2864
+ shrinkIssueCharsWhenMemory: z.ZodDefault<z.ZodBoolean>;
2865
+ issueCharsWithMemory: z.ZodDefault<z.ZodNumber>;
2866
+ }, z.core.$strip>>;
2867
+ agents: z.ZodPrefault<z.ZodObject<{
2868
+ registryPath: z.ZodDefault<z.ZodString>;
2869
+ requireRegistry: z.ZodDefault<z.ZodBoolean>;
2870
+ }, z.core.$strip>>;
2871
+ rag: z.ZodPrefault<z.ZodObject<{
2872
+ enabled: z.ZodDefault<z.ZodBoolean>;
2873
+ queryArgv: z.ZodDefault<z.ZodArray<z.ZodString>>;
2874
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
2875
+ maxReferences: z.ZodDefault<z.ZodNumber>;
2876
+ }, z.core.$strip>>;
2877
+ mcp: z.ZodPrefault<z.ZodObject<{
2878
+ enabled: z.ZodDefault<z.ZodBoolean>;
2879
+ allowTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
2662
2880
  }, z.core.$strip>>;
2663
2881
  schedule: z.ZodPrefault<z.ZodObject<{
2664
2882
  tick: z.ZodDefault<z.ZodString>;
2665
2883
  deliver: z.ZodDefault<z.ZodString>;
2884
+ retro: z.ZodOptional<z.ZodString>;
2885
+ retroIssue: z.ZodOptional<z.ZodString>;
2666
2886
  precheckTimeoutSec: z.ZodDefault<z.ZodNumber>;
2667
2887
  harnessCommand: z.ZodDefault<z.ZodString>;
2668
2888
  provider: z.ZodOptional<z.ZodString>;
@@ -2708,6 +2928,42 @@ declare const renderTuiCommand: (settings: LoopProviderConfig, model: string) =>
2708
2928
  /** Substitute `{model}` / `{prompt}` inside each headless argv element; the prompt stays one argv element, never shell-joined. */
2709
2929
  declare const renderHeadlessArgv: (settings: LoopProviderConfig, model: string, prompt: string) => readonly string[] | null;
2710
2930
 
2931
+ declare const AGENT_REGISTRY_SCHEMA_VERSION: 1;
2932
+ declare const AgentRegistryEntrySchema: z.ZodObject<{
2933
+ role: z.ZodOptional<z.ZodString>;
2934
+ provider: z.ZodString;
2935
+ model: z.ZodOptional<z.ZodString>;
2936
+ tui: z.ZodOptional<z.ZodString>;
2937
+ headless: z.ZodOptional<z.ZodArray<z.ZodString>>;
2938
+ }, z.core.$strip>;
2939
+ declare const AgentRegistrySchema: z.ZodObject<{
2940
+ schemaVersion: z.ZodLiteral<1>;
2941
+ agents: z.ZodRecord<z.ZodString, z.ZodObject<{
2942
+ role: z.ZodOptional<z.ZodString>;
2943
+ provider: z.ZodString;
2944
+ model: z.ZodOptional<z.ZodString>;
2945
+ tui: z.ZodOptional<z.ZodString>;
2946
+ headless: z.ZodOptional<z.ZodArray<z.ZodString>>;
2947
+ }, z.core.$strip>>;
2948
+ roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2949
+ }, z.core.$strip>;
2950
+ type AgentRegistryEntry = z.output<typeof AgentRegistryEntrySchema>;
2951
+ type AgentRegistry = z.output<typeof AgentRegistrySchema>;
2952
+ interface ResolvedAgent {
2953
+ readonly agentId: string;
2954
+ readonly entry: AgentRegistryEntry;
2955
+ readonly role: string;
2956
+ }
2957
+ /** Parse and validate an agents.registry.yaml document. Fail closed on schema drift. */
2958
+ declare const parseAgentRegistryText: (text: string, label?: string) => AgentRegistry;
2959
+ /** Load agents.registry.yaml from disk. Missing file fails closed. */
2960
+ declare const loadAgentRegistry: (path: string) => AgentRegistry;
2961
+ /**
2962
+ * Resolve a role to a registry agent. Prefer `roles[role]` → `agents[id]`, else the first agent
2963
+ * whose `role` field matches. Fail closed when neither mapping exists.
2964
+ */
2965
+ declare const resolveAgentForRole: (registry: AgentRegistry, role: string) => ResolvedAgent;
2966
+
2711
2967
  /** Real, shell-free command runner for the loop composition layer. Output is capped; timeouts kill the process group. */
2712
2968
  declare const createProcessRunner: (defaults?: {
2713
2969
  readonly timeoutMs?: number;
@@ -2752,25 +3008,77 @@ interface RoutingSkip {
2752
3008
  readonly ref: ModelReference;
2753
3009
  readonly reasons: readonly string[];
2754
3010
  }
2755
- interface RoutingDecision {
2756
- readonly role: ModelRole;
2757
- readonly selected: (ModelReference & {
2758
- readonly tier: number;
2759
- readonly orcaAgent: string;
2760
- readonly tui: string;
2761
- }) | null;
2762
- readonly skipped: readonly RoutingSkip[];
2763
- }
2764
- /** Walk the role's tiers in order; inside a tier keep declaration order; first available provider wins. */
2765
- declare const selectModel: (config: LoopConfig, role: ModelRole, availability: readonly ProviderAvailability[]) => RoutingDecision;
2766
- declare const routeAllRoles: (config: LoopConfig, availability: readonly ProviderAvailability[]) => Readonly<Record<ModelRole, RoutingDecision>>;
2767
3011
  interface RankedModel extends ModelReference {
2768
3012
  readonly tier: number;
2769
3013
  readonly orcaAgent: string;
2770
3014
  readonly tui: string;
3015
+ readonly remainingPercent: number | null;
3016
+ readonly reason: string;
3017
+ readonly preferenceIndex: number;
2771
3018
  }
2772
- /** Every available candidate for a role in preference order (tier, then declaration order). */
2773
- declare const rankModels: (config: LoopConfig, role: ModelRole, availability: readonly ProviderAvailability[]) => readonly RankedModel[];
3019
+ interface RoutingDecision {
3020
+ readonly role: ModelRole;
3021
+ readonly selected: RankedModel | null;
3022
+ readonly skipped: readonly RoutingSkip[];
3023
+ }
3024
+ /**
3025
+ * Walk the role's candidates according to `models.routing.mode`.
3026
+ * - tiers: declaration order (0.6 behaviour)
3027
+ * - hybrid: keep tier bands; within a tier pick highest remaining usage
3028
+ * - dynamic: flatten all YAML candidates; sort by remaining usage
3029
+ * - catalog: same as dynamic over YAML seeds for now; catalog enrichment is applied by `rankModels` callers that pass extra refs via `extraCandidates`
3030
+ */
3031
+ declare const selectModel: (config: LoopConfig, role: ModelRole, availability: readonly ProviderAvailability[], extraCandidates?: readonly ModelReference[]) => RoutingDecision;
3032
+ declare const routeAllRoles: (config: LoopConfig, availability: readonly ProviderAvailability[], extrasByRole?: Partial<Record<ModelRole, readonly ModelReference[]>>) => Readonly<Record<ModelRole, RoutingDecision>>;
3033
+ /** Every available candidate for a role in preference / usage order. */
3034
+ declare const rankModels: (config: LoopConfig, role: ModelRole, availability: readonly ProviderAvailability[], extraCandidates?: readonly ModelReference[]) => readonly RankedModel[];
3035
+
3036
+ type ModelQuality = 'frontier' | 'balanced' | 'fast';
3037
+ interface CatalogModel {
3038
+ readonly id: string;
3039
+ readonly quality: ModelQuality;
3040
+ readonly codingScore: number;
3041
+ readonly source: 'cli' | 'artificial-analysis' | 'builtin' | 'yaml';
3042
+ readonly creator?: string;
3043
+ }
3044
+ interface ProviderCatalog {
3045
+ readonly creator?: string;
3046
+ readonly models: readonly CatalogModel[];
3047
+ }
3048
+ declare const loadBuiltinCatalog: () => Readonly<Record<string, ProviderCatalog>>;
3049
+ declare const loadAliases: () => Readonly<Record<string, Readonly<Record<string, string>>>>;
3050
+ declare const resolveAlias: (provider: string, modelId: string, aliases?: Readonly<Record<string, Readonly<Record<string, string>>>>) => string;
3051
+ /** Parse `grok models` human output into model ids. */
3052
+ declare const parseGrokModelsOutput: (stdout: string) => readonly string[];
3053
+ declare const listCliModels: (provider: string, bin: string, runner: CommandRunner, timeoutMs?: number) => Promise<readonly string[]>;
3054
+ interface ArtificialAnalysisModel {
3055
+ readonly slug: string;
3056
+ readonly name: string;
3057
+ readonly creatorSlug: string;
3058
+ readonly codingIndex: number | null;
3059
+ readonly intelligenceIndex: number | null;
3060
+ }
3061
+ declare const parseArtificialAnalysisPayload: (payload: unknown) => readonly ArtificialAnalysisModel[];
3062
+ declare const readAaCache: (stateDir: string) => {
3063
+ readonly fetchedAt: string;
3064
+ readonly models: readonly ArtificialAnalysisModel[];
3065
+ } | null;
3066
+ declare const writeAaCache: (stateDir: string, models: readonly ArtificialAnalysisModel[]) => void;
3067
+ declare const fetchArtificialAnalysisModels: (input: {
3068
+ readonly endpoint: string;
3069
+ readonly apiKey: string;
3070
+ readonly timeoutMs?: number;
3071
+ }) => Promise<readonly ArtificialAnalysisModel[]>;
3072
+ /** Build catalog candidates for a role from CLI + builtin + optional AA, filtered by quality band. */
3073
+ declare const resolveCatalogCandidates: (input: {
3074
+ readonly config: LoopConfig;
3075
+ readonly role: ModelRole;
3076
+ readonly availableProviderIds: readonly string[];
3077
+ readonly runner?: CommandRunner;
3078
+ readonly stateDir?: string;
3079
+ readonly env?: NodeJS.ProcessEnv;
3080
+ readonly now?: () => Date;
3081
+ }) => Promise<readonly ModelReference[]>;
2774
3082
 
2775
3083
  interface CooldownEntry {
2776
3084
  readonly attempts: number;
@@ -2928,6 +3236,70 @@ declare const githubCommentExists: (runner: CommandRunner, input: {
2928
3236
  readonly marker: string;
2929
3237
  }, options?: GitHubCliOptions) => Promise<boolean>;
2930
3238
 
3239
+ interface MemoryPromptSelection {
3240
+ readonly hits: readonly AgentMemoryHit[];
3241
+ readonly block: string;
3242
+ readonly approxChars: number;
3243
+ }
3244
+ interface MemoryContextPlan {
3245
+ readonly hits: readonly AgentMemoryHit[];
3246
+ readonly references: readonly ContextReference[];
3247
+ readonly memoryBlock: string;
3248
+ readonly issueCharBudget: number;
3249
+ readonly approxCharsSaved: number;
3250
+ readonly memoryDigest: string;
3251
+ readonly docBridgeBefore: number;
3252
+ readonly docBridgeAfter: number;
3253
+ }
3254
+ /** Atomic JSON file KV under `dir` (index + one file per record). */
3255
+ declare const createFileMemoryKvStore: (dir: string) => AgentMemoryKvStore;
3256
+ declare const createFileMemoryAdapter: (dir: string, options?: {
3257
+ readonly id?: string;
3258
+ readonly version?: string;
3259
+ }) => AgentMemoryAdapter;
3260
+ declare const openLoopMemory: (loaded: LoadedLoopConfig) => AgentMemoryAdapter | null;
3261
+ declare const memoryDigestOf: (hits: readonly AgentMemoryHit[]) => string;
3262
+ /** Cap, filter stale/scope, and render a bounded “Approved memory” markdown block. */
3263
+ declare const selectMemoryForPrompt: (hits: readonly AgentMemoryHit[], config: LoopConfig["memory"]) => MemoryPromptSelection;
3264
+ /** Prefer memory over Doc Bridge so adding memory reduces (not increases) prompt size. */
3265
+ declare const preferMemoryOverDocBridge: (references: readonly ContextReference[], hits: readonly AgentMemoryHit[], minKeep: number) => {
3266
+ readonly references: readonly ContextReference[];
3267
+ readonly dropped: number;
3268
+ };
3269
+ declare const planMemoryContext: (input: {
3270
+ readonly adapter: AgentMemoryAdapter | null;
3271
+ readonly config: LoopConfig;
3272
+ readonly issueId: string;
3273
+ readonly issueTitle: string;
3274
+ readonly project: string;
3275
+ readonly references: readonly ContextReference[];
3276
+ readonly sourceRevision?: string;
3277
+ }) => Promise<MemoryContextPlan>;
3278
+ declare const learningToMemoryRecord: (learning: LearningRecord, meta: {
3279
+ readonly project: string;
3280
+ readonly sourceRevision: string;
3281
+ readonly scope?: MemoryScope;
3282
+ }) => AgentMemoryRecord;
3283
+ interface LearningsLedger {
3284
+ readonly records: readonly LearningRecord[];
3285
+ }
3286
+ declare const learningsPath: (stateDir: string) => string;
3287
+ declare const readLearningsLedger: (stateDir: string) => LearningsLedger;
3288
+ declare const writeLearningsLedger: (stateDir: string, ledger: LearningsLedger) => void;
3289
+ /** Merge proposed learnings into the ledger without changing promoted/rejected rows. */
3290
+ declare const upsertProposedLearnings: (stateDir: string, proposed: readonly LearningRecord[]) => LearningsLedger;
3291
+ declare const promoteLearningsToMemory: (input: {
3292
+ readonly stateDir: string;
3293
+ readonly config: LoopConfig;
3294
+ readonly adapter: AgentMemoryAdapter | null;
3295
+ readonly ids: readonly string[];
3296
+ readonly actor: string;
3297
+ readonly sourceRevision: string;
3298
+ }) => Promise<{
3299
+ readonly ledger: LearningsLedger;
3300
+ readonly remembered: readonly string[];
3301
+ }>;
3302
+
2931
3303
  declare const CONTRACT_SCHEMA_VERSION = 1;
2932
3304
  declare const CONTRACT_OPEN = "<<<LOOP_CONTRACT";
2933
3305
  declare const CONTRACT_CLOSE = "LOOP_CONTRACT>>>";
@@ -2982,6 +3354,8 @@ interface StoredContract {
2982
3354
  readonly digest: string;
2983
3355
  readonly assessment: ContractAssessment;
2984
3356
  readonly source: 'llm' | 'manual';
3357
+ /** Digest of approved memory hits frozen with this contract (invalidates reuse when memory changes). */
3358
+ readonly memoryDigest?: string;
2985
3359
  }
2986
3360
  interface ContractAssessment {
2987
3361
  readonly dispatchable: boolean;
@@ -2992,17 +3366,19 @@ declare const assessContract: (contract: TaskContract) => ContractAssessment;
2992
3366
  declare const contractPath: (stateDir: string, identifier: string) => string;
2993
3367
  declare const readStoredContract: (stateDir: string, identifier: string) => StoredContract | null;
2994
3368
  declare const writeStoredContract: (stateDir: string, stored: StoredContract) => string;
2995
- /** A cached contract is fresh when the issue has not changed since and it is younger than `reuseHours`. */
2996
- declare const contractIsFresh: (stored: StoredContract, issue: Pick<LinearIssueDetail, "updatedAt">, reuseHours: number, now: Date) => boolean;
3369
+ /** A cached contract is fresh when the issue has not changed since, it is younger than `reuseHours`, and memory digest still matches. */
3370
+ declare const contractIsFresh: (stored: StoredContract, issue: Pick<LinearIssueDetail, "updatedAt">, reuseHours: number, now: Date, memoryDigest?: string) => boolean;
2997
3371
  /** Wrap untrusted text so the model treats it as data; the closing sentinel is unforgeable because we strip it from the payload. */
2998
3372
  declare const untrusted: (label: string, text: string) => string;
2999
3373
  declare const renderContractPrompt: (input: {
3000
3374
  readonly issue: LinearIssueDetail;
3001
3375
  readonly config: LoopConfig;
3002
3376
  readonly references: readonly ContextReference[];
3377
+ readonly memoryBlock?: string;
3378
+ readonly maxIssueChars?: number;
3003
3379
  }) => string;
3004
3380
  declare const parseContractOutput: (stdout: string) => TaskContract;
3005
- declare const resolveDocContext: (root: string, query: string, max: number) => Promise<readonly ContextReference[]>;
3381
+ declare const resolveDocContext: (root: string, query: string, max: number, scopes?: readonly string[]) => Promise<readonly ContextReference[]>;
3006
3382
  interface ProviderFailure {
3007
3383
  readonly provider: string;
3008
3384
  readonly model: string;
@@ -3019,8 +3395,12 @@ interface GenerateContractInput {
3019
3395
  readonly orchestrator?: RoutingDecision;
3020
3396
  readonly now?: () => Date;
3021
3397
  readonly references?: readonly ContextReference[];
3398
+ /** Optional approved-memory adapter (token reduction). Fail-soft when omitted. */
3399
+ readonly memory?: AgentMemoryAdapter | null;
3022
3400
  /** Called when a candidate fails for a provider-level reason (auth/quota/timeout) before the next one is tried. */
3023
3401
  readonly onProviderFailure?: (failure: ProviderFailure) => void;
3402
+ /** Observability for memory/doc-bridge char budgets. */
3403
+ readonly onMemoryPlan?: (plan: MemoryContextPlan) => void;
3024
3404
  }
3025
3405
  declare const classifyProviderFailure: (detail: string, timedOut?: boolean) => ProviderFailure["kind"];
3026
3406
  declare const generateContract: (input: GenerateContractInput) => Promise<StoredContract>;
@@ -3033,6 +3413,10 @@ interface WorkerBriefInput {
3033
3413
  readonly provider: string;
3034
3414
  readonly model: string;
3035
3415
  readonly maxIssueChars?: number;
3416
+ /** Pre-rendered approved memory block (from `selectMemoryForPrompt`). */
3417
+ readonly memoryBlock?: string;
3418
+ /** Doc Bridge playbook/for-agents refs (titles/paths only). */
3419
+ readonly guidanceRefs?: readonly ContextReference[];
3036
3420
  }
3037
3421
  /** The prompt a worker receives in its Orca terminal. Issue text is data; the contract and the rules are the instructions. */
3038
3422
  declare const renderWorkerBrief: (input: WorkerBriefInput) => string;
@@ -3275,7 +3659,7 @@ declare const precheckDeliver: (stateDir: string) => {
3275
3659
  };
3276
3660
  declare const runDeliver: (input: DeliverInput) => Promise<DeliverReport>;
3277
3661
 
3278
- type LoopStage = 'tick' | 'deliver';
3662
+ type LoopStage = 'tick' | 'deliver' | 'retro';
3279
3663
  declare const LOOP_STAGES: readonly LoopStage[];
3280
3664
  interface InstallInput {
3281
3665
  readonly configPath?: string;
@@ -3670,5 +4054,21 @@ declare const buildRetroReport: (input: RetroInput) => Promise<RetroReport>;
3670
4054
  declare const renderRetroMarkdown: (report: RetroReport) => string;
3671
4055
  /** Learnings the harness can track; a human promotes them with `promoteLearnings`. */
3672
4056
  declare const retroLearnings: (report: RetroReport, markdown: string) => readonly LearningRecord[];
4057
+ interface RetroStageReport {
4058
+ readonly status: 'ok' | 'skipped' | 'failed' | 'dry-run';
4059
+ readonly issue: string | null;
4060
+ readonly digest: string | null;
4061
+ readonly posted: boolean;
4062
+ readonly learningsProposed: number;
4063
+ readonly detail: string;
4064
+ }
4065
+ /** Build the weekly digest, upsert proposed learnings, and comment on `schedule.retroIssue` (idempotent write-id). */
4066
+ declare const runRetroStage: (input: {
4067
+ readonly configPath?: string;
4068
+ readonly loaded?: LoadedLoopConfig;
4069
+ readonly runner: CommandRunner;
4070
+ readonly since?: string;
4071
+ readonly dryRun?: boolean;
4072
+ }) => Promise<RetroStageReport>;
3673
4073
 
3674
- export { ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, type AdapterMetadata, type AdapterTelemetry, type AdversarialReviewResult, type AgentAdapter, type AgentEvalCase, type AgentEvalReport, type AgentEvalSuite, type AgentMemoryAdapter, type AgentMemoryHit, type AgentMemoryKvStore, type AgentMemoryRecord, type AgentSessionOptions, type AgentUsage, type ApprovedAssumption, type ArtifactBinding, type ArtifactEnvelope, type ArtifactEnvelopeInput, type ArtifactType, type AssuranceLevel, type AutomationStatus, type AutonomyMode, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, type BenchmarkBinding, type BenchmarkComparison, type BenchmarkImprovementDirection, type BenchmarkManifest, type BenchmarkObservation, type BenchmarkObservationEvidence, type BenchmarkObservationInput, type BenchmarkObservationStatus, type BenchmarkReport, type BenchmarkRun, type BenchmarkSummary, type BenchmarkTask, type BlockAssessment, type BlockManifest, type BlockStatus, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, CHECK_CATEGORIES, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, type CacheUsage, type CapabilityDescriptor, type CapabilityKind, type CapabilityManifest, type CapabilityManifestInput, type ChangedFile, type CheckCategory, type CheckOutcome, type CheckResult, type ChecksAssessment, type ClaimResult, type CodeReviewInput, type CodeReviewOutcome, type CodingAgentAdapter, type CodingAgentHandlerResult, type CodingAgentRequest, type CodingAgentResult, type CommandResult, type CommandRunOptions, type CommandRunner, type CompatibilityComponent, type CompatibilityComponentId, type CompatibilityManifest, type CompatibilityObservation, type CompatibilityReport, type CompatibilityStatus, type ContextProvider, type ContextQuery, type ContextReference, type ContextSnapshot, type ContractAssessment, type ContractOutcome, ContractOutcomeSchema, type ContractScope, type CooldownEntry, type CooldownState, type CoordinationIdentity, type CriterionStatus, type CycleIterationMetrics, type CycleMatrixRow, type CycleStepResult, type CycleStepStatus, type DebriefInput, type DebriefIssueRow, type DebriefReport, type DecisionPacket, type DeliverInput, type DeliverOutcome, type DeliverReport, type DeliverResult, type DeliveryState, type DetectProvidersInput, type DiscoveryAmbiguity, type DiscoveryCurrentInput, type DiscoveryCurrentResult, type DiscoveryDecisionLogEntry, type DiscoveryInput, type DiscoveryOption, type DiscoveryResult, type DispatchLease, type DispatchLedger, type DispatchRecord, type DispatchRecordFile, type Disposer, type DockerMount, type DockerRuntimeEvidence, type DockerToolDefinition, type DoctorCheck, type DoctorCheckStatus, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, type EvalBatteryReport, type EvalCaseDefinition, type EvalCaseReport, type EvalComponent, type EvalExpectation, type EvalLayer, type EvalManifest, type EvalObservation, type EvalObservationStatus, type EventLogLock, type EventLogLockRecovery, type EventLogLockStatus, type EventLogVerification, type EventStore, type EvidenceArtifact, type EvidenceBundle, type EvidenceBundleFile, type EvidenceBundleSignature, type EvidenceBundleVerification, type EvidenceReference, type ExecutePhaseProfileOptions, type FailureClass, type FailureClassification, type FetchQueueInput, FileArtifactStore, FileEventStore, type FilePreflightPlan, type GateAssessment, type GateBinding, type GateCriterion, type GenerateContractInput, type GitHubCliOptions, type GuidedInstallIO, type GuidedInstallInput, type GuidedInstallReport, HARNESS_ERROR_CATALOG, HARNESS_ERROR_CODES, HARNESS_EVENT_ENVELOPE_SCHEMA_VERSION, HARNESS_EVENT_SCHEMA_VERSION, HARNESS_EVENT_TYPES, HARNESS_PLUGIN_API_VERSION, HARNESS_REPO_URL, HarnessError, type HarnessErrorClassification, type HarnessErrorDisposition, type HarnessEvent, type HarnessEventContext, type HarnessEventEnvelope, type HarnessEventEnvelopeInput, type HarnessEventInput, type HarnessEventListener, type HarnessEventPayloads, type HarnessEventProvenance, type HarnessEventType, type HarnessPlugin, type HarnessPluginContext, IMPROVEMENT_CYCLE_STEPS, type ImprovementCycleAssessment, type ImprovementCycleInput, type ImprovementCycleIteration, type ImprovementCycleStep, type InstallAction, type InstallInput, type InstallReport, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, type LearningRecord, type LearningStatus, type LinearIssueDetail, type LinearListInput, type LinearQueueFilter, type LinearWriteOptions, type LlmCache, type LlmCacheKeyInput, type LlmCacheStats, type LoadedConfig, type LoadedLoopConfig, type LocalConfigAnswers, type LocalConfigPrompter, type LoopConfig, type LoopConfigInput, LoopConfigSchema, type LoopDoctorInput, type LoopDoctorReport, type LoopEvent, type LoopIssue, type LoopProviderConfig, type LoopStage, type LoopState, type LoopStatusReport, MEMORY_SCOPES, MODEL_ROLES, type MachineMetrics, type MachineSample, type MachineThresholds, type MemoryScope, type MemoryUsage, type MetricStatus, type ModelBinding, type ModelPolicy, type ModelReference, type ModelRole, type NormalizedPhaseProfile, type OptimizationComparison, type OptimizationObservation, type OrcaAgentHookState, type OrcaAutomation, type OrcaAutomationSpec, type OrcaCliOptions, type OrcaCreatedWorktree, type OrcaDispatchInput, type OrcaDispatchPlan, type OrcaLeaseState, type OrcaLifecycleInput, type OrcaLifecycleProjection, type OrcaStatus as OrcaRuntimeStatus, type OrcaSendReceipt, type OrcaTerminal, type OrcaWorktree, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, type ParallelismUsage, type PhaseAmbiguity, type PhaseContext, type PhaseDecision, type PhaseDecisionPacket, type PhaseDefinition, type PhaseEffect, type PhaseEffectAction, type PhaseEffectPolicy, type PhaseExecution, type PhaseExecutionReport, type PhaseGateEvaluator, type PhaseGateResult, type PhaseHandler, type PhaseHandlerResult, type PhaseMachineMetrics, type PhaseMode, type PhasePreflight, type PhasePreflightResult, type PhaseProfile, type PhaseResumeState, type PhaseRetryPolicy, type PhaseRoutePlan, type PhaseTelemetry, type PhaseTokenMetrics, type PilotAssessment, type PilotEntry, type PilotManifest, type PluginContribution, type PluginRegistry, type PluginSlot, type PolicyDecision, type PolicyGate, type PolicyRequest, type PolicyRule, type ProcessToolDefinition, type ProductionEvidence, type ProviderAuthStatus, type ProviderAvailability, type ProviderFailure, type ProviderSpec, type ProviderUsage, type PullRequestApproval, type PullRequestCheck, type PullRequestDraft, type PullRequestSnapshot, QUALITY_DIMENSIONS, type QaTransitionAssessment, type QualityDimension, type QualityDimensionScore, type QualityMatrix, REVIEW_SEVERITIES, RUN_STATES, type RankedModel, type RecoveryObservation, type RecoveryPolicy, type RecoveryResult, type RepositoryProfile, type RetroInput, type RetroIssueRow, type RetroReport, type RetroSuggestion, type RetroTarget, type RetroWindow, type ReviewFinding, type ReviewLens, type ReviewSeverity, type ReviewVerdict, type RichIO, type RoutingDecision, type RoutingSkip, type RunOutcome, type RunReconciliation, type RunState, type RuntimeConfig, type RuntimeExperimentCandidate, type RuntimeExperimentResult, STATES, SURFACE_NAMES, type SessionRecorder, type SlotAssessment, type SlotInput, type SourceSnapshot, type StateTransition, type StatusBlock, type StatusSnapshot, type StoredContract, type StructuredEvidence, type SurfaceName, type SurfaceRequirement, type TaskContract, TaskContractSchema, type TeamMember, type TickCandidateResult, type TickInput, type TickOutcome, type TickReport, type TokenUsage, type ToolDefinition, type ToolExecutionRequest, type ToolExecutionResult, type ToolRuntime, type TrackingAdapter, type TrackingConfig, type TrackingTransition, type TrustedEvidenceKey, type UsageWindow, type VerificationCheck, type VerificationConfig, type VerificationRun, WIP_STATES, type WatchEvent, type WatchEventKind, type WatchInput, type WatchReport, type WatchTargetSnapshot, type WatchdogBlocker, type WatchdogBudget, type WatchdogResult, type WipAssessment, type WipAssessmentInput, type WipEntry, type WipState, type WorkerBriefInput, type WorkflowNode, type WorkflowResult, activeCooldowns, adaptiveConcurrency, appendLoopEvent, approveRun, approvedDecision, artifactDigest, artifactFilePath, artifactIsFresh, artifactMarkdownPath, assertHuman, assessAcceptance, assessAgentEval, assessBlock, assessChecks, assessCompatibility, assessContract, assessDiscovery, assessImprovementCycle, assessIntegration, assessPilot, assessPreflight, assessProduction, assessQaTransition, assessSlots, assessWip, assessWorktreeCleanup, atLeast, authStatusFor, authorizeRun, automationName, automationPrompt, automationSpecs, availableMemoryBytes, benchmarkRuns, branchFor, buildDebriefReport, buildListIssuesArgv, buildRetroReport, buildReviewArgv, buildSuggestions, busyIssues, cancelRun, classifyFailure, classifyHarnessError, classifyProviderFailure, classifyWatchEvent, classifyWatchPhase, cleanTaskArtifacts, clearProviderCooldown, compareOptimization, compareVersions, composePullRequest, contractIsFresh, contractPath, cooldownPath, cooldownUntil, countRunningWorkers, createArtifactEnvelope, createCapabilityManifest, createCodingAgentAdapter, createCompatibilityManifest, createConfiguredToolRuntime, createDispatchLedger, createDocBridgeContextProvider, createDockerToolRuntime, createEvalManifest, createHarnessEventEnvelope, createInMemoryMemoryAdapter, createKvMemoryAdapter, createLinearTrackingAdapter, createLlmCache, createLlmCacheKey, createMachineMonitor, createModelPolicy, createOrcaDispatchPlan, createOrcaLifecycleProjection, createPhaseArtifact, createPhaseProfile, createPluginRegistry, createPluginSlot, createPolicyGate, createProcessRunner, createProcessToolRuntime, createPullRequestApproval, createQualityMatrix, createRichIO, createSessionRecorder, createStatusSnapshot, createToolRuntime, createTrackingAdapter, createTrackingTransition, deliveryStatePath, detectProviders, dispatchRecordPath, evaluateWatchdog, executePhaseProfile, exportEvidenceBundle, fetchLinearIssue, fetchLinearQueue, fetchTeamMembers, filterAndOrderQueue, findExecutable, formatWatchEvent, gatherLoopState, generateContract, githubComment, githubCommentArgv, githubCommentExists, githubMerge, githubMergeArgv, githubOpenPullRequests, githubPullRequest, githubPullRequestsForBranch, hasLocalConfig, hashContextSnapshot, hashContextSnapshots, inspectEventLogLock, installLoopAutomations, installPreflight, isDiscoveryCurrent, isWsl, launchWorkerTerminal, linearAttach, linearAttachArgv, linearCommentAdd, linearCommentAddArgv, linearLabelAdd, linearLabelArgv, linearLabelRemove, linearStatusSet, linearStatusSetArgv, listDispatched, loadBenchmarkManifest, loadConfig, loadLatestRun, loadLoopConfig, localConfigPath, loopStatus, markProviderExhausted, mergeLoopConfig, modelFor, normalizeReason, orcaAccountList, orcaAgentHooks, orcaAutomationCreateArgv, orcaAutomationEditArgv, orcaAutomationRemove, orcaAutomationRun, orcaAutomationRuns, orcaAutomationsList, orcaJson, orcaStatus, orcaTerminalCreate, orcaTerminalList, orcaTerminalScreen, orcaTerminalSend, orcaTerminalWait, orcaVersion, orcaWorktreeCreate, orcaWorktreeRemove, orcaWorktreeSet, orcaWorktreeSetArgv, orcaWorktrees, parseAutomationRuns, parseContractOutput, parseJsonEnvelope, parseLinearIssueDetail, parseLinearIssues, parseLoopConfigText, parseMemInfo, parseModelRef, parseOrcaAgentHooks, parseOrcaAutomations, parseOrcaSendReceipt, parseOrcaStatus, parseOrcaTerminals, parseOrcaVersion, parseOrcaWorktreeCreate, parseOrcaWorktrees, parseProviderUsage, parsePullRequest, parseRetro, parseReviewResult, parseSince, parseTeamMembers, parseUsageWindows, parseVmStat, planFilePreflight, planPhaseProfile, planRun, precheckCommand, precheckDeliver, precheckTick, promoteLearnings, promptLocalConfig, providerIdentity, providerSpecs, rankModels, readArtifactFile, readContextSnapshots, readCooldowns, readDeliveryState, readDispatchRecord, readEvidenceTrustStore, readLoopEvents, readStoredContract, reconcileRun, recordBenchmarkObservation, recoverEventLogLock, recoveryDelayMs, renderArtifactMarkdown, renderContractPrompt, renderDebriefMarkdown, renderFindingsForWorker, renderHeadlessArgv, renderLocalConfig, renderRetroMarkdown, renderTuiCommand, renderWorkerBrief, resolveDocContext, resumeStateFromArtifacts, retroLearnings, retryRun, routeAllRoles, runAdversarialReview, runAgentEval, runCodeReview, runDeliver, runEvalBattery, runGuidedInstall, runLoopDoctor, runTick, runWithRecovery, runWorkflow, sampleMachine, selectModel, selectRuntime, severityRank, shellQuote, snapshotWatchTargets, startRun, summarizeMachine, tiersFor, touchesProtectedPaths, transition, uninstallLoopAutomations, unknownTelemetry, untrusted, validateAdapterMetadata, validateArtifactEnvelope, validateBenchmarkManifest, validateBlockManifest, validateCacheableOperation, validateCapabilityManifest, validateCompatibilityManifest, validateConfig, validateContextSnapshot, validateContextSnapshots, validateEvalManifest, validateHarnessErrorClassification, validateHarnessEventEnvelope, validateLoopConfig, validateMemoryRecord, validateOptimizationObservation, validatePhaseTelemetry, validateSafeCommand, validateStatusSnapshot, verifyEvidenceBundle, verifyPullRequestApproval, verifyRun, watchDeliveries, worktreeNameFor, writeIdFor, writeLocalConfig, writeStoredContract };
4074
+ export { AGENT_REGISTRY_SCHEMA_VERSION, ARTIFACT_SCHEMA_VERSION, ARTIFACT_TYPES, ASSURANCE_LEVELS, type AdapterMetadata, type AdapterTelemetry, type AdversarialReviewResult, type AgentAdapter, type AgentEvalCase, type AgentEvalReport, type AgentEvalSuite, type AgentMemoryAdapter, type AgentMemoryHit, type AgentMemoryKvStore, type AgentMemoryRecord, type AgentRegistry, type AgentRegistryEntry, AgentRegistryEntrySchema, AgentRegistrySchema, type AgentSessionOptions, type AgentUsage, type ApprovedAssumption, type ArgvRagContextProviderOptions, type ArtifactBinding, type ArtifactEnvelope, type ArtifactEnvelopeInput, type ArtifactType, type ArtificialAnalysisModel, type AssuranceLevel, type AutomationStatus, type AutonomyMode, BENCHMARK_SCHEMA_VERSION, BLOCK_STATUSES, type BenchmarkBinding, type BenchmarkComparison, type BenchmarkImprovementDirection, type BenchmarkManifest, type BenchmarkObservation, type BenchmarkObservationEvidence, type BenchmarkObservationInput, type BenchmarkObservationStatus, type BenchmarkReport, type BenchmarkRun, type BenchmarkSummary, type BenchmarkTask, type BlockAssessment, type BlockManifest, type BlockStatus, CAPABILITY_KINDS, CAPABILITY_MANIFEST_SCHEMA_VERSION, CHECK_CATEGORIES, COMPATIBILITY_COMPONENTS, COMPATIBILITY_SCHEMA_VERSION, CONTEXT_PROVIDER_SLOT, CONTRACT_CLOSE, CONTRACT_OPEN, CONTRACT_SCHEMA_VERSION, type CacheUsage, type CapabilityDescriptor, type CapabilityKind, type CapabilityManifest, type CapabilityManifestInput, type CatalogModel, type ChangedFile, type CheckCategory, type CheckOutcome, type CheckResult, type ChecksAssessment, type ClaimResult, type CodeReviewInput, type CodeReviewOutcome, type CodingAgentAdapter, type CodingAgentHandlerResult, type CodingAgentRequest, type CodingAgentResult, type CommandResult, type CommandRunOptions, type CommandRunner, type CompatibilityComponent, type CompatibilityComponentId, type CompatibilityManifest, type CompatibilityObservation, type CompatibilityReport, type CompatibilityStatus, type ContextProvider, type ContextQuery, type ContextReference, type ContextSnapshot, type ContractAssessment, type ContractOutcome, ContractOutcomeSchema, type ContractScope, type CooldownEntry, type CooldownState, type CoordinationIdentity, type CriterionStatus, type CycleIterationMetrics, type CycleMatrixRow, type CycleStepResult, type CycleStepStatus, type DebriefInput, type DebriefIssueRow, type DebriefReport, type DecisionPacket, type DeliverInput, type DeliverOutcome, type DeliverReport, type DeliverResult, type DeliveryState, type DetectProvidersInput, type DiscoveryAmbiguity, type DiscoveryCurrentInput, type DiscoveryCurrentResult, type DiscoveryDecisionLogEntry, type DiscoveryInput, type DiscoveryOption, type DiscoveryResult, type DispatchLease, type DispatchLedger, type DispatchRecord, type DispatchRecordFile, type Disposer, type DocBridgeIndexInspection, type DockerMount, type DockerRuntimeEvidence, type DockerToolDefinition, type DoctorCheck, type DoctorCheckStatus, EVAL_COMPONENTS, EVAL_LAYERS, EVAL_MANIFEST_SCHEMA_VERSION, EVENT_LOG_GENESIS, EVIDENCE_BUNDLE_SCHEMA_VERSION, type EvalBatteryReport, type EvalCaseDefinition, type EvalCaseReport, type EvalComponent, type EvalExpectation, type EvalLayer, type EvalManifest, type EvalObservation, type EvalObservationStatus, type EventLogLock, type EventLogLockRecovery, type EventLogLockStatus, type EventLogVerification, type EventStore, type EvidenceArtifact, type EvidenceBundle, type EvidenceBundleFile, type EvidenceBundleSignature, type EvidenceBundleVerification, type EvidenceReference, type ExecutePhaseProfileOptions, type FailureClass, type FailureClassification, type FetchQueueInput, FileArtifactStore, FileEventStore, type FilePreflightPlan, type GateAssessment, type GateBinding, type GateCriterion, type GenerateContractInput, type GitHubCliOptions, type GuidedInstallIO, type GuidedInstallInput, type GuidedInstallReport, HARNESS_ERROR_CATALOG, HARNESS_ERROR_CODES, HARNESS_EVENT_ENVELOPE_SCHEMA_VERSION, HARNESS_EVENT_SCHEMA_VERSION, HARNESS_EVENT_TYPES, HARNESS_PLUGIN_API_VERSION, HARNESS_REPO_URL, HarnessError, type HarnessErrorClassification, type HarnessErrorDisposition, type HarnessEvent, type HarnessEventContext, type HarnessEventEnvelope, type HarnessEventEnvelopeInput, type HarnessEventInput, type HarnessEventListener, type HarnessEventPayloads, type HarnessEventProvenance, type HarnessEventType, type HarnessPlugin, type HarnessPluginContext, IMPROVEMENT_CYCLE_STEPS, type ImprovementCycleAssessment, type ImprovementCycleInput, type ImprovementCycleIteration, type ImprovementCycleStep, type InstallAction, type InstallInput, type InstallReport, LEARNING_STATUSES, LEGAL_TRANSITIONS, LOOP_CONFIG_FILE, LOOP_CONFIG_SCHEMA_VERSION, LOOP_LOCAL_CONFIG_FILE, LOOP_STAGES, type LearningRecord, type LearningStatus, type LearningsLedger, type LinearIssueDetail, type LinearListInput, type LinearQueueFilter, type LinearWriteOptions, type LlmCache, type LlmCacheKeyInput, type LlmCacheStats, type LoadedConfig, type LoadedLoopConfig, type LocalConfigAnswers, type LocalConfigPrompter, type LoopConfig, type LoopConfigInput, LoopConfigSchema, type LoopDoctorInput, type LoopDoctorReport, type LoopEvent, type LoopIssue, type LoopProviderConfig, type LoopStage, type LoopState, type LoopStatusReport, MEMORY_SCOPES, MODEL_ROLES, type MachineMetrics, type MachineSample, type MachineThresholds, type McpPolicy, type McpToolBridge, type McpToolBridgeOptions, type McpToolCallInput, type McpToolCallResult, type MemoryContextPlan, type MemoryPromptSelection, type MemoryScope, type MemoryUsage, type MetricStatus, type ModelBinding, type ModelPolicy, type ModelQuality, type ModelReference, type ModelRole, type NormalizedPhaseProfile, type OptimizationComparison, type OptimizationObservation, type OrcaAgentHookState, type OrcaAutomation, type OrcaAutomationSpec, type OrcaCliOptions, type OrcaCreatedWorktree, type OrcaDispatchInput, type OrcaDispatchPlan, type OrcaLeaseState, type OrcaLifecycleInput, type OrcaLifecycleProjection, type OrcaStatus as OrcaRuntimeStatus, type OrcaSendReceipt, type OrcaTerminal, type OrcaWorktree, PHASE_DECISIONS, PHASE_EFFECTS, PHASE_EFFECT_ACTIONS, PHASE_MODES, PR_FIELDS, type ParallelismUsage, type PhaseAmbiguity, type PhaseContext, type PhaseDecision, type PhaseDecisionPacket, type PhaseDefinition, type PhaseEffect, type PhaseEffectAction, type PhaseEffectPolicy, type PhaseExecution, type PhaseExecutionReport, type PhaseGateEvaluator, type PhaseGateResult, type PhaseHandler, type PhaseHandlerResult, type PhaseMachineMetrics, type PhaseMode, type PhasePreflight, type PhasePreflightResult, type PhaseProfile, type PhaseResumeState, type PhaseRetryPolicy, type PhaseRoutePlan, type PhaseTelemetry, type PhaseTokenMetrics, type PilotAssessment, type PilotEntry, type PilotManifest, type PluginContribution, type PluginRegistry, type PluginSlot, type PolicyDecision, type PolicyGate, type PolicyRequest, type PolicyRule, type ProcessToolDefinition, type ProductionEvidence, type ProviderAuthStatus, type ProviderAvailability, type ProviderCatalog, type ProviderFailure, type ProviderSpec, type ProviderUsage, type PullRequestApproval, type PullRequestCheck, type PullRequestDraft, type PullRequestSnapshot, QUALITY_DIMENSIONS, type QaTransitionAssessment, type QualityDimension, type QualityDimensionScore, type QualityMatrix, REVIEW_SEVERITIES, RUN_STATES, type RagContextProviderOptions, type RagQueryResult, type RankedModel, type RecoveryObservation, type RecoveryPolicy, type RecoveryResult, type RepositoryProfile, type ResolvedAgent, type RetroInput, type RetroIssueRow, type RetroReport, type RetroStageReport, type RetroSuggestion, type RetroTarget, type RetroWindow, type ReviewFinding, type ReviewLens, type ReviewSeverity, type ReviewVerdict, type RichIO, type RoutingDecision, type RoutingSkip, type RunOutcome, type RunReconciliation, type RunState, type RuntimeConfig, type RuntimeExperimentCandidate, type RuntimeExperimentResult, STATES, SURFACE_NAMES, type SessionRecorder, type SlotAssessment, type SlotInput, type SourceSnapshot, type StateTransition, type StatusBlock, type StatusSnapshot, type StoredContract, type StructuredEvidence, type SurfaceName, type SurfaceRequirement, type TaskContract, TaskContractSchema, type TeamMember, type TickCandidateResult, type TickInput, type TickOutcome, type TickReport, type TokenUsage, type ToolDefinition, type ToolExecutionRequest, type ToolExecutionResult, type ToolRuntime, type TrackingAdapter, type TrackingConfig, type TrackingTransition, type TrustedEvidenceKey, type UsageMetric, type UsageWindow, type VerificationCheck, type VerificationConfig, type VerificationRun, WIP_STATES, type WatchEvent, type WatchEventKind, type WatchInput, type WatchReport, type WatchTargetSnapshot, type WatchdogBlocker, type WatchdogBudget, type WatchdogResult, type WipAssessment, type WipAssessmentInput, type WipEntry, type WipState, type WorkerBriefInput, type WorkflowNode, type WorkflowResult, activeCooldowns, adaptiveConcurrency, appendLoopEvent, approveRun, approvedDecision, artifactDigest, artifactFilePath, artifactIsFresh, artifactMarkdownPath, assertHuman, assessAcceptance, assessAgentEval, assessBlock, assessChecks, assessCompatibility, assessContract, assessDiscovery, assessImprovementCycle, assessIntegration, assessPilot, assessPreflight, assessProduction, assessQaTransition, assessSlots, assessWip, assessWorktreeCleanup, atLeast, authStatusFor, authorizeRun, automationName, automationPrompt, automationSpecs, availableMemoryBytes, benchmarkRuns, branchFor, buildDebriefReport, buildListIssuesArgv, buildRetroReport, buildReviewArgv, buildSuggestions, busyIssues, cancelRun, classifyFailure, classifyHarnessError, classifyProviderFailure, classifyWatchEvent, classifyWatchPhase, cleanTaskArtifacts, clearProviderCooldown, compareOptimization, compareVersions, composePullRequest, contractIsFresh, contractPath, cooldownPath, cooldownUntil, countRunningWorkers, createArgvRagContextProvider, createArtifactEnvelope, createCapabilityManifest, createCodingAgentAdapter, createCompatibilityManifest, createConfiguredToolRuntime, createDispatchLedger, createDocBridgeContextProvider, createDockerToolRuntime, createEvalManifest, createFileMemoryAdapter, createFileMemoryKvStore, createHarnessEventEnvelope, createInMemoryMemoryAdapter, createKvMemoryAdapter, createLinearTrackingAdapter, createLlmCache, createLlmCacheKey, createMachineMonitor, createMcpToolBridge, createModelPolicy, createOrcaDispatchPlan, createOrcaLifecycleProjection, createPhaseArtifact, createPhaseProfile, createPluginRegistry, createPluginSlot, createPolicyGate, createProcessRunner, createProcessToolRuntime, createPullRequestApproval, createQualityMatrix, createRagContextProvider, createRichIO, createSessionRecorder, createStatusSnapshot, createToolRuntime, createTrackingAdapter, createTrackingTransition, deliveryStatePath, detectProviders, dispatchRecordPath, evaluateWatchdog, executePhaseProfile, exportEvidenceBundle, fetchArtificialAnalysisModels, fetchLinearIssue, fetchLinearQueue, fetchTeamMembers, filterAndOrderQueue, findExecutable, formatWatchEvent, gatherLoopState, generateContract, githubComment, githubCommentArgv, githubCommentExists, githubMerge, githubMergeArgv, githubOpenPullRequests, githubPullRequest, githubPullRequestsForBranch, hasLocalConfig, hashContextSnapshot, hashContextSnapshots, hashMcpArgs, inspectDocBridgeIndex, inspectEventLogLock, installLoopAutomations, installPreflight, isDiscoveryCurrent, isWsl, launchWorkerTerminal, learningToMemoryRecord, learningsPath, linearAttach, linearAttachArgv, linearCommentAdd, linearCommentAddArgv, linearLabelAdd, linearLabelArgv, linearLabelRemove, linearStatusSet, linearStatusSetArgv, listCliModels, listDispatched, loadAgentRegistry, loadAliases, loadBenchmarkManifest, loadBuiltinCatalog, loadConfig, loadLatestRun, loadLoopConfig, localConfigPath, loopStatus, markProviderExhausted, memoryDigestOf, mergeLoopConfig, modelFor, normalizeReason, openLoopMemory, orcaAccountList, orcaAgentHooks, orcaAutomationCreateArgv, orcaAutomationEditArgv, orcaAutomationRemove, orcaAutomationRun, orcaAutomationRuns, orcaAutomationsList, orcaJson, orcaStatus, orcaTerminalCreate, orcaTerminalList, orcaTerminalScreen, orcaTerminalSend, orcaTerminalWait, orcaVersion, orcaWorktreeCreate, orcaWorktreeRemove, orcaWorktreeSet, orcaWorktreeSetArgv, orcaWorktrees, parseAgentRegistryText, parseArtificialAnalysisPayload, parseAutomationRuns, parseContractOutput, parseGrokModelsOutput, parseJsonEnvelope, parseLinearIssueDetail, parseLinearIssues, parseLoopConfigText, parseMemInfo, parseModelRef, parseOrcaAgentHooks, parseOrcaAutomations, parseOrcaSendReceipt, parseOrcaStatus, parseOrcaTerminals, parseOrcaVersion, parseOrcaWorktreeCreate, parseOrcaWorktrees, parseProviderUsage, parsePullRequest, parseRagQueryOutput, parseRetro, parseReviewResult, parseSince, parseTeamMembers, parseUsageWindows, parseVmStat, planFilePreflight, planMemoryContext, planPhaseProfile, planRun, precheckCommand, precheckDeliver, precheckTick, preferMemoryOverDocBridge, promoteLearnings, promoteLearningsToMemory, promptLocalConfig, providerIdentity, providerSpecs, rankModels, readAaCache, readArtifactFile, readContextSnapshots, readCooldowns, readDeliveryState, readDispatchRecord, readEvidenceTrustStore, readLearningsLedger, readLoopEvents, readStoredContract, reconcileRun, recordBenchmarkObservation, recoverEventLogLock, recoveryDelayMs, remainingUsagePercent, renderArtifactMarkdown, renderContractPrompt, renderDebriefMarkdown, renderFindingsForWorker, renderHeadlessArgv, renderLocalConfig, renderRetroMarkdown, renderTuiCommand, renderWorkerBrief, resolveAgentForRole, resolveAlias, resolveCatalogCandidates, resolveDocContext, resumeStateFromArtifacts, retroLearnings, retryRun, routeAllRoles, runAdversarialReview, runAgentEval, runCodeReview, runDeliver, runEvalBattery, runGuidedInstall, runLoopDoctor, runRetroStage, runTick, runWithRecovery, runWorkflow, sampleMachine, selectMemoryForPrompt, selectModel, selectRuntime, severityRank, shellQuote, snapshotWatchTargets, startRun, summarizeMachine, tiersFor, touchesProtectedPaths, transition, undeclaredOrcaProviders, uninstallLoopAutomations, unknownTelemetry, untrusted, upsertProposedLearnings, usageRankTuple, validateAdapterMetadata, validateArtifactEnvelope, validateBenchmarkManifest, validateBlockManifest, validateCacheableOperation, validateCapabilityManifest, validateCompatibilityManifest, validateConfig, validateContextSnapshot, validateContextSnapshots, validateEvalManifest, validateHarnessErrorClassification, validateHarnessEventEnvelope, validateLoopConfig, validateMemoryRecord, validateOptimizationObservation, validatePhaseTelemetry, validateSafeCommand, validateStatusSnapshot, verifyEvidenceBundle, verifyPullRequestApproval, verifyRun, watchDeliveries, worktreeNameFor, writeAaCache, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };