@agentskit/harness 0.8.0 → 0.10.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/CHANGELOG.md +40 -0
- package/capabilities/public-surface.json +187 -76
- package/dist/cli.js +1171 -151
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +342 -7
- package/dist/index.js +1002 -81
- package/dist/index.js.map +1 -1
- package/docs/ADR-0029-loop-resilience-pinning-intake.md +68 -0
- package/docs/ADR-0030-loop-event-bus-orchestration-hooks.md +54 -0
- package/docs/LOOP.md +185 -2
- package/docs/MODULE-BOUNDARIES.md +9 -3
- package/loop.config.example.yaml +54 -1
- package/package.json +2 -2
- package/release/manifest.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2232,6 +2232,27 @@ interface ModelPolicy {
|
|
|
2232
2232
|
declare const createModelPolicy: (bindings: readonly ModelBinding[]) => ModelPolicy;
|
|
2233
2233
|
declare const modelFor: (policy: ModelPolicy, role: ModelRole) => ModelBinding;
|
|
2234
2234
|
|
|
2235
|
+
/**
|
|
2236
|
+
* Deterministic pattern scanner for text that is about to be embedded in a prompt or echoed back into a public
|
|
2237
|
+
* PR/issue comment — a segment lifted from an issue description or a code-review finding can carry a secret that
|
|
2238
|
+
* was never meant to leave the private context it came from. Pure and kernel-safe: no adapters, no network, no
|
|
2239
|
+
* state. Pattern-based, not a claim of completeness — it catches the shapes that show up in practice (emails,
|
|
2240
|
+
* common provider API-key prefixes, phone numbers, card-number-shaped digit runs), not every possible secret.
|
|
2241
|
+
*/
|
|
2242
|
+
type PiiKind = 'email' | 'api-key' | 'phone' | 'credit-card';
|
|
2243
|
+
interface PiiMatch {
|
|
2244
|
+
readonly kind: PiiKind;
|
|
2245
|
+
readonly index: number;
|
|
2246
|
+
readonly length: number;
|
|
2247
|
+
}
|
|
2248
|
+
interface PiiScanResult {
|
|
2249
|
+
readonly matches: readonly PiiMatch[];
|
|
2250
|
+
/** `text` with every match replaced by `[REDACTED:<kind>]`. Equal to `text` when `matches` is empty. */
|
|
2251
|
+
readonly redacted: string;
|
|
2252
|
+
}
|
|
2253
|
+
/** Scan `text` for every configured pattern kind and return both the matches (positions into the *original* text) and a redacted copy. */
|
|
2254
|
+
declare const scanForPii: (text: string) => PiiScanResult;
|
|
2255
|
+
|
|
2235
2256
|
interface OrcaDispatchInput {
|
|
2236
2257
|
readonly repository: string;
|
|
2237
2258
|
readonly worktree: string;
|
|
@@ -2607,6 +2628,12 @@ declare const LOOP_CONFIG_FILE = "loop.config.yaml";
|
|
|
2607
2628
|
/** Optional, gitignored per-machine overlay merged over the versioned config (e.g. `linear.person`, `machine.minFreeRamGb`). */
|
|
2608
2629
|
declare const LOOP_LOCAL_CONFIG_FILE = "loop.config.local.yaml";
|
|
2609
2630
|
declare const LOOP_CONFIG_SCHEMA_VERSION = 1;
|
|
2631
|
+
declare const effortLevel: z.ZodEnum<{
|
|
2632
|
+
low: "low";
|
|
2633
|
+
medium: "medium";
|
|
2634
|
+
high: "high";
|
|
2635
|
+
xhigh: "xhigh";
|
|
2636
|
+
}>;
|
|
2610
2637
|
declare const LoopConfigSchema: z.ZodObject<{
|
|
2611
2638
|
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
2612
2639
|
project: z.ZodObject<{
|
|
@@ -2615,6 +2642,11 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2615
2642
|
baseBranch: z.ZodDefault<z.ZodString>;
|
|
2616
2643
|
root: z.ZodDefault<z.ZodString>;
|
|
2617
2644
|
stateDir: z.ZodDefault<z.ZodString>;
|
|
2645
|
+
setup: z.ZodPrefault<z.ZodObject<{
|
|
2646
|
+
command: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2647
|
+
timeoutSec: z.ZodDefault<z.ZodNumber>;
|
|
2648
|
+
required: z.ZodDefault<z.ZodBoolean>;
|
|
2649
|
+
}, z.core.$strip>>;
|
|
2618
2650
|
}, z.core.$strip>;
|
|
2619
2651
|
orca: z.ZodPrefault<z.ZodObject<{
|
|
2620
2652
|
bin: z.ZodDefault<z.ZodString>;
|
|
@@ -2629,6 +2661,11 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2629
2661
|
teamKey: z.ZodString;
|
|
2630
2662
|
person: z.ZodString;
|
|
2631
2663
|
people: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2664
|
+
rotation: z.ZodPrefault<z.ZodObject<{
|
|
2665
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2666
|
+
owners: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2667
|
+
advanceWhenEmpty: z.ZodDefault<z.ZodBoolean>;
|
|
2668
|
+
}, z.core.$strip>>;
|
|
2632
2669
|
states: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2633
2670
|
excludeLabels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2634
2671
|
requireLabels: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
@@ -2741,6 +2778,33 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2741
2778
|
probe: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2742
2779
|
headless: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2743
2780
|
reviewProvider: z.ZodOptional<z.ZodString>;
|
|
2781
|
+
effortFlag: z.ZodOptional<z.ZodString>;
|
|
2782
|
+
}, z.core.$strip>>;
|
|
2783
|
+
effort: z.ZodPrefault<z.ZodObject<{
|
|
2784
|
+
orchestrator: z.ZodDefault<z.ZodEnum<{
|
|
2785
|
+
low: "low";
|
|
2786
|
+
medium: "medium";
|
|
2787
|
+
high: "high";
|
|
2788
|
+
xhigh: "xhigh";
|
|
2789
|
+
}>>;
|
|
2790
|
+
reviewer: z.ZodDefault<z.ZodEnum<{
|
|
2791
|
+
low: "low";
|
|
2792
|
+
medium: "medium";
|
|
2793
|
+
high: "high";
|
|
2794
|
+
xhigh: "xhigh";
|
|
2795
|
+
}>>;
|
|
2796
|
+
builder: z.ZodDefault<z.ZodEnum<{
|
|
2797
|
+
low: "low";
|
|
2798
|
+
medium: "medium";
|
|
2799
|
+
high: "high";
|
|
2800
|
+
xhigh: "xhigh";
|
|
2801
|
+
}>>;
|
|
2802
|
+
watcher: z.ZodDefault<z.ZodEnum<{
|
|
2803
|
+
low: "low";
|
|
2804
|
+
medium: "medium";
|
|
2805
|
+
high: "high";
|
|
2806
|
+
xhigh: "xhigh";
|
|
2807
|
+
}>>;
|
|
2744
2808
|
}, z.core.$strip>>;
|
|
2745
2809
|
}, z.core.$strip>;
|
|
2746
2810
|
machine: z.ZodPrefault<z.ZodObject<{
|
|
@@ -2773,9 +2837,9 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2773
2837
|
concurrency: z.ZodDefault<z.ZodNumber>;
|
|
2774
2838
|
minSeverity: z.ZodDefault<z.ZodEnum<{
|
|
2775
2839
|
blocker: "blocker";
|
|
2840
|
+
high: "high";
|
|
2776
2841
|
nit: "nit";
|
|
2777
2842
|
med: "med";
|
|
2778
|
-
high: "high";
|
|
2779
2843
|
}>>;
|
|
2780
2844
|
deadlineMs: z.ZodDefault<z.ZodNumber>;
|
|
2781
2845
|
maxCalls: z.ZodDefault<z.ZodNumber>;
|
|
@@ -2793,6 +2857,7 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2793
2857
|
rebase: "rebase";
|
|
2794
2858
|
}>>;
|
|
2795
2859
|
requireChecks: z.ZodDefault<z.ZodBoolean>;
|
|
2860
|
+
requireHumanApproval: z.ZodDefault<z.ZodBoolean>;
|
|
2796
2861
|
}, z.core.$strip>>;
|
|
2797
2862
|
smoke: z.ZodPrefault<z.ZodObject<{
|
|
2798
2863
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2816,12 +2881,14 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2816
2881
|
}, z.core.$strip>>;
|
|
2817
2882
|
maxFixRounds: z.ZodDefault<z.ZodNumber>;
|
|
2818
2883
|
workerIdleTimeoutMin: z.ZodDefault<z.ZodNumber>;
|
|
2884
|
+
maxDispatchMinutes: z.ZodOptional<z.ZodNumber>;
|
|
2819
2885
|
handoff: z.ZodPrefault<z.ZodObject<{
|
|
2820
2886
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2821
2887
|
maxHandoffs: z.ZodDefault<z.ZodNumber>;
|
|
2822
2888
|
onlyWhenProviderUnavailable: z.ZodDefault<z.ZodBoolean>;
|
|
2823
2889
|
}, z.core.$strip>>;
|
|
2824
2890
|
selfEditPaths: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2891
|
+
secretFilePatterns: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2825
2892
|
ignoreChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2826
2893
|
requiredChecks: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2827
2894
|
cleanupWorktree: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -2883,6 +2950,33 @@ declare const LoopConfigSchema: z.ZodObject<{
|
|
|
2883
2950
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2884
2951
|
allowTools: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2885
2952
|
}, z.core.$strip>>;
|
|
2953
|
+
plugins: z.ZodPrefault<z.ZodObject<{
|
|
2954
|
+
modules: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2955
|
+
}, z.core.$strip>>;
|
|
2956
|
+
github: z.ZodPrefault<z.ZodObject<{
|
|
2957
|
+
intakeLabel: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2958
|
+
reviewOnly: z.ZodDefault<z.ZodLiteral<true>>;
|
|
2959
|
+
}, z.core.$strip>>;
|
|
2960
|
+
resilience: z.ZodPrefault<z.ZodObject<{
|
|
2961
|
+
maxConsecutiveFailures: z.ZodDefault<z.ZodNumber>;
|
|
2962
|
+
pausedLabel: z.ZodDefault<z.ZodString>;
|
|
2963
|
+
stagePauseAfterRuns: z.ZodDefault<z.ZodNumber>;
|
|
2964
|
+
maxUsageDeltaPercent: z.ZodOptional<z.ZodNumber>;
|
|
2965
|
+
}, z.core.$strip>>;
|
|
2966
|
+
brief: z.ZodPrefault<z.ZodObject<{
|
|
2967
|
+
skills: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
2968
|
+
maxSkillChars: z.ZodDefault<z.ZodNumber>;
|
|
2969
|
+
}, z.core.$strip>>;
|
|
2970
|
+
security: z.ZodPrefault<z.ZodObject<{
|
|
2971
|
+
pii: z.ZodPrefault<z.ZodObject<{
|
|
2972
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2973
|
+
action: z.ZodDefault<z.ZodEnum<{
|
|
2974
|
+
block: "block";
|
|
2975
|
+
redact: "redact";
|
|
2976
|
+
warn: "warn";
|
|
2977
|
+
}>>;
|
|
2978
|
+
}, z.core.$strip>>;
|
|
2979
|
+
}, z.core.$strip>>;
|
|
2886
2980
|
schedule: z.ZodPrefault<z.ZodObject<{
|
|
2887
2981
|
tick: z.ZodDefault<z.ZodString>;
|
|
2888
2982
|
deliver: z.ZodDefault<z.ZodString>;
|
|
@@ -2929,9 +3023,10 @@ declare const providerIdentity: (config: LoopConfig, provider: string) => {
|
|
|
2929
3023
|
readonly orcaUsageKey: string;
|
|
2930
3024
|
readonly settings: LoopProviderConfig;
|
|
2931
3025
|
};
|
|
2932
|
-
|
|
3026
|
+
type EffortLevel = z.infer<typeof effortLevel>;
|
|
3027
|
+
declare const renderTuiCommand: (settings: LoopProviderConfig, model: string, effort?: EffortLevel) => string;
|
|
2933
3028
|
/** Substitute `{model}` / `{prompt}` inside each headless argv element; the prompt stays one argv element, never shell-joined. */
|
|
2934
|
-
declare const renderHeadlessArgv: (settings: LoopProviderConfig, model: string, prompt: string) => readonly string[] | null;
|
|
3029
|
+
declare const renderHeadlessArgv: (settings: LoopProviderConfig, model: string, prompt: string, effort?: EffortLevel) => readonly string[] | null;
|
|
2935
3030
|
|
|
2936
3031
|
declare const AGENT_REGISTRY_SCHEMA_VERSION: 1;
|
|
2937
3032
|
declare const AgentRegistryEntrySchema: z.ZodObject<{
|
|
@@ -3020,6 +3115,8 @@ interface RankedModel extends ModelReference {
|
|
|
3020
3115
|
readonly remainingPercent: number | null;
|
|
3021
3116
|
readonly reason: string;
|
|
3022
3117
|
readonly preferenceIndex: number;
|
|
3118
|
+
/** Reasoning effort requested for this role (`models.effort.<role>`); only takes effect on providers with `effortFlag` set. */
|
|
3119
|
+
readonly effort: EffortLevel;
|
|
3023
3120
|
}
|
|
3024
3121
|
interface RoutingDecision {
|
|
3025
3122
|
readonly role: ModelRole;
|
|
@@ -3155,7 +3252,7 @@ interface LoopDoctorInput {
|
|
|
3155
3252
|
readonly queueTop?: number;
|
|
3156
3253
|
}
|
|
3157
3254
|
declare const providerSpecs: (config: LoopConfig) => readonly ProviderSpec[];
|
|
3158
|
-
/** Count worktrees
|
|
3255
|
+
/** Count worktrees still doing implementation work. Review/completed worktrees keep their lease for delivery, but must not consume a builder slot. */
|
|
3159
3256
|
declare const countRunningWorkers: (worktrees: readonly OrcaWorktree[]) => number;
|
|
3160
3257
|
declare const runLoopDoctor: (input: LoopDoctorInput) => Promise<LoopDoctorReport>;
|
|
3161
3258
|
|
|
@@ -3214,7 +3311,14 @@ declare const githubPullRequestsForBranch: (runner: CommandRunner, input: {
|
|
|
3214
3311
|
declare const githubOpenPullRequests: (runner: CommandRunner, input: {
|
|
3215
3312
|
readonly repo: string;
|
|
3216
3313
|
readonly limit?: number;
|
|
3314
|
+
readonly label?: string;
|
|
3217
3315
|
}, options?: GitHubCliOptions) => Promise<readonly PullRequestSnapshot[]>;
|
|
3316
|
+
/** Remove a label from a PR (best-effort — `gh` succeeds even if the label was already gone). */
|
|
3317
|
+
declare const githubLabelRemove: (runner: CommandRunner, input: {
|
|
3318
|
+
readonly repo: string;
|
|
3319
|
+
readonly number: number;
|
|
3320
|
+
readonly label: string;
|
|
3321
|
+
}, options?: GitHubCliOptions) => Promise<void>;
|
|
3218
3322
|
/** Squash/merge via REST with optimistic concurrency on the reviewed head SHA; GitHub refuses when the head moved. */
|
|
3219
3323
|
declare const githubMergeArgv: (input: {
|
|
3220
3324
|
readonly repo: string;
|
|
@@ -3381,9 +3485,11 @@ declare const renderContractPrompt: (input: {
|
|
|
3381
3485
|
readonly references: readonly ContextReference[];
|
|
3382
3486
|
readonly memoryBlock?: string;
|
|
3383
3487
|
readonly maxIssueChars?: number;
|
|
3488
|
+
/** Called (once, if `security.pii.enabled`) with the matches found in the issue text, before redaction. */
|
|
3489
|
+
readonly onPiiDetected?: (matches: readonly PiiMatch[]) => void;
|
|
3384
3490
|
}) => string;
|
|
3385
3491
|
declare const parseContractOutput: (stdout: string) => TaskContract;
|
|
3386
|
-
declare const resolveDocContext: (root: string, query: string, max: number, scopes?: readonly string[]) => Promise<readonly ContextReference[]>;
|
|
3492
|
+
declare const resolveDocContext: (root: string, query: string, max: number, scopes?: readonly string[], maxAgeHours?: number) => Promise<readonly ContextReference[]>;
|
|
3387
3493
|
interface ProviderFailure {
|
|
3388
3494
|
readonly provider: string;
|
|
3389
3495
|
readonly model: string;
|
|
@@ -3406,10 +3512,43 @@ interface GenerateContractInput {
|
|
|
3406
3512
|
readonly onProviderFailure?: (failure: ProviderFailure) => void;
|
|
3407
3513
|
/** Observability for memory/doc-bridge char budgets. */
|
|
3408
3514
|
readonly onMemoryPlan?: (plan: MemoryContextPlan) => void;
|
|
3515
|
+
/** Called (once, if `security.pii.enabled`) with the matches found in the issue text, before redaction. */
|
|
3516
|
+
readonly onPiiDetected?: (matches: readonly PiiMatch[]) => void;
|
|
3409
3517
|
}
|
|
3410
3518
|
declare const classifyProviderFailure: (detail: string, timedOut?: boolean) => ProviderFailure["kind"];
|
|
3519
|
+
/**
|
|
3520
|
+
* Best-effort extraction of a reset instant from a CLI's own usage-limit message, e.g.
|
|
3521
|
+
* "resets 10:40pm (America/Sao_Paulo)" or "resets in 3h". Returns null when nothing parses;
|
|
3522
|
+
* callers fall back to the configured exponential cooldown.
|
|
3523
|
+
*/
|
|
3524
|
+
declare const extractResetsAt: (detail: string, now?: Date) => string | null;
|
|
3411
3525
|
declare const generateContract: (input: GenerateContractInput) => Promise<StoredContract>;
|
|
3412
3526
|
|
|
3527
|
+
interface PinnedSkill {
|
|
3528
|
+
/** As configured in `brief.skills` — a path relative to the project root. */
|
|
3529
|
+
readonly path: string;
|
|
3530
|
+
/** sha256 of the content actually embedded (post-truncation), so the digest matches what the worker saw. */
|
|
3531
|
+
readonly digest: string;
|
|
3532
|
+
readonly content: string;
|
|
3533
|
+
readonly truncated: boolean;
|
|
3534
|
+
}
|
|
3535
|
+
interface PinnedSkillRef {
|
|
3536
|
+
readonly path: string;
|
|
3537
|
+
readonly digest: string;
|
|
3538
|
+
}
|
|
3539
|
+
declare const skillDigest: (content: string) => string;
|
|
3540
|
+
/**
|
|
3541
|
+
* Read every configured skill file relative to `root`, hash and truncate each (with a visible note) to `maxChars`
|
|
3542
|
+
* so one large file cannot blow the whole brief's budget. A file listed in `brief.skills` is a promise to the
|
|
3543
|
+
* worker that specific guidance is present — missing or unreadable files fail the dispatch outright (fail-closed)
|
|
3544
|
+
* rather than silently sending a worker without conventions it was told it would have.
|
|
3545
|
+
*/
|
|
3546
|
+
declare const loadPinnedSkills: (root: string, paths: readonly string[], maxChars: number) => readonly PinnedSkill[];
|
|
3547
|
+
/** Rendered once per dispatch and embedded in the worker brief; the digest lets a human or `loop retro` prove which exact revision a given run saw. */
|
|
3548
|
+
declare const renderPinnedSkills: (skills: readonly PinnedSkill[]) => string;
|
|
3549
|
+
/** The `{path, digest}` list persisted in `dispatch.json` — the full content lives only in the brief file, not duplicated per issue. */
|
|
3550
|
+
declare const skillRefs: (skills: readonly PinnedSkill[]) => readonly PinnedSkillRef[];
|
|
3551
|
+
|
|
3413
3552
|
interface WorkerBriefInput {
|
|
3414
3553
|
readonly issue: LinearIssueDetail;
|
|
3415
3554
|
readonly contract: StoredContract;
|
|
@@ -3422,6 +3561,10 @@ interface WorkerBriefInput {
|
|
|
3422
3561
|
readonly memoryBlock?: string;
|
|
3423
3562
|
/** Doc Bridge playbook/for-agents refs (titles/paths only). */
|
|
3424
3563
|
readonly guidanceRefs?: readonly ContextReference[];
|
|
3564
|
+
/** Full content of `brief.skills` files, read and digested once at dispatch time (`loadPinnedSkills`). */
|
|
3565
|
+
readonly skills?: readonly PinnedSkill[];
|
|
3566
|
+
/** Called (once, if `security.pii.enabled`) with the matches found in the issue text, before redaction. */
|
|
3567
|
+
readonly onPiiDetected?: (matches: readonly PiiMatch[]) => void;
|
|
3425
3568
|
}
|
|
3426
3569
|
interface HandoffBriefInput {
|
|
3427
3570
|
readonly issue: string;
|
|
@@ -3444,6 +3587,71 @@ declare const renderHandoffBrief: (input: HandoffBriefInput) => string;
|
|
|
3444
3587
|
/** The prompt a worker receives in its Orca terminal. Issue text is data; the contract and the rules are the instructions. */
|
|
3445
3588
|
declare const renderWorkerBrief: (input: WorkerBriefInput) => string;
|
|
3446
3589
|
|
|
3590
|
+
/**
|
|
3591
|
+
* A local, in-process pub/sub bus over the loop's own event vocabulary (the same free-form `type` strings
|
|
3592
|
+
* `appendLoopEvent` writes to `<stateDir>/events.ndjson`: `contract.failed`, `worker.dispatched`, `pr.reviewed`,
|
|
3593
|
+
* `provider.cooldown`, `issue.paused`, etc.). It exists so a project can react to loop activity in real time
|
|
3594
|
+
* (tick/deliver run) instead of only reading the ndjson after the fact — the ndjson stays the durable log; this is
|
|
3595
|
+
* only a live fan-out on top of it, scoped to the current process.
|
|
3596
|
+
*
|
|
3597
|
+
* Deliberately not `kernel/plugins.ts`: that registry ties into `HARNESS_EVENT_TYPES` (the harness's own
|
|
3598
|
+
* lifecycle events) and requires plugin ids/versions/dependency ordering. The loop's event vocabulary is an open
|
|
3599
|
+
* set of strings owned by composition, not the kernel, so this is a plain listener map with the same "who's
|
|
3600
|
+
* listening" ergonomics, not a copy of the kernel's contract.
|
|
3601
|
+
*/
|
|
3602
|
+
type LoopEventPayload = Readonly<Record<string, unknown>> & {
|
|
3603
|
+
readonly type: string;
|
|
3604
|
+
};
|
|
3605
|
+
type LoopEventListener = (event: LoopEventPayload) => void;
|
|
3606
|
+
/**
|
|
3607
|
+
* Fired around a loop-orchestration decision (not a model/tool call inside the worker's own CLI session — that
|
|
3608
|
+
* loop is opaque to us). A `before*` hook can return `{ block: true, reason }` to stop the action outright; any
|
|
3609
|
+
* other return value (including a thrown error, which is treated as `{ block: true }`) does not block.
|
|
3610
|
+
*/
|
|
3611
|
+
type LoopHookName = 'beforeDispatch' | 'afterDispatch' | 'beforeReview' | 'afterReview' | 'beforeMerge' | 'afterMerge' | 'onPause' | 'onEscalate';
|
|
3612
|
+
type LoopHookPayload = Readonly<Record<string, unknown>>;
|
|
3613
|
+
type LoopHookResult = void | {
|
|
3614
|
+
readonly block: true;
|
|
3615
|
+
readonly reason: string;
|
|
3616
|
+
};
|
|
3617
|
+
type LoopHookListener = (payload: LoopHookPayload) => LoopHookResult | Promise<LoopHookResult>;
|
|
3618
|
+
interface LoopEventBus {
|
|
3619
|
+
/** Emit a loop event to every subscriber of its `type`. Never throws: a listener error is swallowed (composition must not fail because a plugin misbehaves). */
|
|
3620
|
+
emit(event: LoopEventPayload): void;
|
|
3621
|
+
/** Subscribe to one event type (or `'*'` for every event). Returns an unsubscribe function. */
|
|
3622
|
+
on(type: string | '*', listener: LoopEventListener): () => void;
|
|
3623
|
+
/** Register a lifecycle hook. Multiple listeners on the same hook all run; the first `{ block: true }` wins. */
|
|
3624
|
+
hook(name: LoopHookName, listener: LoopHookListener): () => void;
|
|
3625
|
+
/**
|
|
3626
|
+
* Run every listener registered for `name` in registration order and return the first block decision, or
|
|
3627
|
+
* `{ block: false }` when none blocked. A listener that throws is treated as a non-blocking no-op (a broken
|
|
3628
|
+
* plugin must not take down the loop) and its error is appended to `errors`.
|
|
3629
|
+
*/
|
|
3630
|
+
runHook(name: LoopHookName, payload: LoopHookPayload): Promise<{
|
|
3631
|
+
readonly block: boolean;
|
|
3632
|
+
readonly reason?: string;
|
|
3633
|
+
readonly errors: readonly string[];
|
|
3634
|
+
}>;
|
|
3635
|
+
}
|
|
3636
|
+
declare const createLoopEventBus: () => LoopEventBus;
|
|
3637
|
+
/**
|
|
3638
|
+
* Load `plugins.modules` (local `.mjs` files, the same trust level as `agents.registry.yaml`: files the project
|
|
3639
|
+
* owner put in their own repo, never fetched over the network) and give each one the bus to subscribe to. A
|
|
3640
|
+
* module that fails to load or whose `apply` throws is reported, not fatal — one broken plugin must not stop tick
|
|
3641
|
+
* or deliver from running.
|
|
3642
|
+
*/
|
|
3643
|
+
interface LoopPluginModule {
|
|
3644
|
+
readonly id: string;
|
|
3645
|
+
readonly apply: (bus: LoopEventBus) => void | Promise<void>;
|
|
3646
|
+
}
|
|
3647
|
+
declare const loadLoopPlugins: (root: string, modulePaths: readonly string[], bus: LoopEventBus) => Promise<{
|
|
3648
|
+
readonly loaded: readonly string[];
|
|
3649
|
+
readonly errors: readonly {
|
|
3650
|
+
readonly path: string;
|
|
3651
|
+
readonly error: string;
|
|
3652
|
+
}[];
|
|
3653
|
+
}>;
|
|
3654
|
+
|
|
3447
3655
|
type TickOutcome = 'dispatched' | 'dry-run' | 'skipped' | 'escalated' | 'failed';
|
|
3448
3656
|
interface TickCandidateResult {
|
|
3449
3657
|
readonly issue: string;
|
|
@@ -3488,6 +3696,19 @@ interface DispatchRecordFile {
|
|
|
3488
3696
|
readonly leaseId: string;
|
|
3489
3697
|
readonly dispatchedAt: string;
|
|
3490
3698
|
readonly url: string;
|
|
3699
|
+
readonly briefDigest: string;
|
|
3700
|
+
readonly skills: readonly PinnedSkillRef[];
|
|
3701
|
+
readonly setup: {
|
|
3702
|
+
readonly command: readonly string[];
|
|
3703
|
+
readonly exitCode: number | null;
|
|
3704
|
+
readonly durationMs: number;
|
|
3705
|
+
readonly timedOut: boolean;
|
|
3706
|
+
} | null;
|
|
3707
|
+
readonly effort: EffortLevel;
|
|
3708
|
+
/** Builder provider's remaining Orca usage percent at dispatch time (`resilience.maxUsageDeltaPercent` cost guard); `null` when usage was unknown. */
|
|
3709
|
+
readonly initialRemainingPercent: number | null;
|
|
3710
|
+
/** Absolute path to the Orca worktree, so `loop status`/`debrief`/`watch` can best-effort read `progress.json` from it. */
|
|
3711
|
+
readonly worktreePath: string;
|
|
3491
3712
|
}
|
|
3492
3713
|
interface TickInput {
|
|
3493
3714
|
readonly configPath?: string;
|
|
@@ -3529,10 +3750,12 @@ declare const branchFor: (issue: Pick<LoopIssue, "identifier" | "branchName">, p
|
|
|
3529
3750
|
/** Issues the loop must not touch: active leases, worktrees already linked to the issue, or a worktree sitting on the issue's branch. */
|
|
3530
3751
|
declare const busyIssues: (queue: readonly LoopIssue[], leases: readonly DispatchLease[], worktrees: readonly OrcaWorktree[], person: string) => ReadonlySet<string>;
|
|
3531
3752
|
declare const dispatchRecordPath: (stateDir: string, identifier: string) => string;
|
|
3753
|
+
declare const briefPath: (stateDir: string, identifier: string) => string;
|
|
3532
3754
|
declare const readDispatchRecord: (stateDir: string, identifier: string) => DispatchRecordFile | null;
|
|
3533
3755
|
declare const writeDispatchRecord: (stateDir: string, record: DispatchRecordFile) => string;
|
|
3534
|
-
declare const appendLoopEvent: (stateDir: string, event: Record<string, unknown
|
|
3756
|
+
declare const appendLoopEvent: (stateDir: string, event: Record<string, unknown>, bus?: LoopEventBus) => void;
|
|
3535
3757
|
interface LoopState {
|
|
3758
|
+
readonly person: string;
|
|
3536
3759
|
readonly providers: readonly ProviderAvailability[];
|
|
3537
3760
|
readonly routing: Readonly<Record<string, RoutingDecision>>;
|
|
3538
3761
|
readonly worktrees: readonly OrcaWorktree[];
|
|
@@ -3582,6 +3805,8 @@ interface CodeReviewOutcome {
|
|
|
3582
3805
|
readonly provider: string;
|
|
3583
3806
|
readonly model: string | null;
|
|
3584
3807
|
readonly resultParsed: boolean;
|
|
3808
|
+
/** Last 800 chars of combined stderr+stdout, for callers that need to classify *why* a review was incomplete (auth/quota/timeout) beyond the truncated `summary`. */
|
|
3809
|
+
readonly rawTail: string;
|
|
3585
3810
|
}
|
|
3586
3811
|
interface CodeReviewInput {
|
|
3587
3812
|
readonly cli: string;
|
|
@@ -3761,6 +3986,19 @@ declare const parseAutomationRuns: (result: unknown) => readonly {
|
|
|
3761
3986
|
}[];
|
|
3762
3987
|
declare const loopStatus: (input: Pick<InstallInput, "configPath" | "loaded" | "runner">) => Promise<LoopStatusReport>;
|
|
3763
3988
|
|
|
3989
|
+
declare const rotationStatePath: (stateDir: string) => string;
|
|
3990
|
+
/** Effective owner for this machine; without rotation the versioned config remains authoritative. */
|
|
3991
|
+
declare const queueOwner: (loaded: LoadedLoopConfig) => string;
|
|
3992
|
+
/** Advance once, only after the current owner has no dispatchable work and no active lease. */
|
|
3993
|
+
declare const advanceQueueOwner: (loaded: LoadedLoopConfig, input: {
|
|
3994
|
+
readonly queueEmpty: boolean;
|
|
3995
|
+
readonly activeLeases: number;
|
|
3996
|
+
readonly now?: Date;
|
|
3997
|
+
}) => {
|
|
3998
|
+
readonly owner: string;
|
|
3999
|
+
readonly advanced: boolean;
|
|
4000
|
+
};
|
|
4001
|
+
|
|
3764
4002
|
interface GuidedInstallIO {
|
|
3765
4003
|
/** Ask a yes/no question; `fallback` is used when the answer is empty. */
|
|
3766
4004
|
readonly confirm: (question: string, fallback: boolean) => Promise<boolean>;
|
|
@@ -3867,6 +4105,19 @@ declare const promptLocalConfig: (runner: CommandRunner, loaded: LoadedLoopConfi
|
|
|
3867
4105
|
readonly currentUserHint?: string;
|
|
3868
4106
|
}) => Promise<LocalConfigAnswers | null>;
|
|
3869
4107
|
|
|
4108
|
+
/** One outcome id (from the frozen contract) mapped to how far the worker has gotten on it. */
|
|
4109
|
+
type OutcomeProgressStatus = 'in-progress' | 'done';
|
|
4110
|
+
type OutcomeProgress = Readonly<Record<string, OutcomeProgressStatus>>;
|
|
4111
|
+
/**
|
|
4112
|
+
* The worker cannot be asked "what have you done so far" — it is an opaque CLI session, and the contract's
|
|
4113
|
+
* outcome list (`brief.ts`) is a static plan frozen before dispatch, not a live todo list. The brief documents a
|
|
4114
|
+
* lightweight convention instead: the worker writes `progress.json` at its worktree root, one entry per outcome id
|
|
4115
|
+
* it has started or finished, and we read it back best-effort. A missing, unreadable or malformed file is not an
|
|
4116
|
+
* error — it just means no progress has been reported yet — because nothing enforces that a worker keeps it
|
|
4117
|
+
* current, and older dispatches never wrote one at all.
|
|
4118
|
+
*/
|
|
4119
|
+
declare const readOutcomeProgress: (worktreePath: string | null | undefined) => OutcomeProgress | null;
|
|
4120
|
+
|
|
3870
4121
|
interface DebriefInput {
|
|
3871
4122
|
readonly configPath?: string;
|
|
3872
4123
|
readonly loaded?: LoadedLoopConfig;
|
|
@@ -3892,6 +4143,8 @@ interface DebriefIssueRow {
|
|
|
3892
4143
|
readonly heldFor: string | null;
|
|
3893
4144
|
readonly finalOutcome: string | null;
|
|
3894
4145
|
readonly contractIntent: string | null;
|
|
4146
|
+
/** Best-effort read of `progress.json` from the worktree, keyed by outcome id (see brief.ts rule 10); `null` when the worker hasn't written one. */
|
|
4147
|
+
readonly progress: OutcomeProgress | null;
|
|
3895
4148
|
}
|
|
3896
4149
|
interface DebriefReport {
|
|
3897
4150
|
readonly generatedAt: string;
|
|
@@ -4105,4 +4358,86 @@ declare const runRetroStage: (input: {
|
|
|
4105
4358
|
readonly dryRun?: boolean;
|
|
4106
4359
|
}) => Promise<RetroStageReport>;
|
|
4107
4360
|
|
|
4108
|
-
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, type HandoffBriefInput, 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, renderHandoffBrief, 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, writeDispatchRecord, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };
|
|
4361
|
+
/** One recorded failure for an issue, kept for diagnostics (`loop retro`, `loop status`). */
|
|
4362
|
+
interface IssueFailureRecord {
|
|
4363
|
+
readonly kind: string;
|
|
4364
|
+
readonly at: string;
|
|
4365
|
+
readonly reason: string;
|
|
4366
|
+
}
|
|
4367
|
+
interface IssueFailureState {
|
|
4368
|
+
readonly issue: string;
|
|
4369
|
+
/** Consecutive failures since the last success (dispatch, clean/findings review, merge). Resets to 0 on any of those. */
|
|
4370
|
+
readonly consecutive: number;
|
|
4371
|
+
/** Most recent failures first, capped at 10 — enough for a human to see the pattern without the file growing unbounded. */
|
|
4372
|
+
readonly history: readonly IssueFailureRecord[];
|
|
4373
|
+
readonly pausedAt: string | null;
|
|
4374
|
+
readonly pausedReason: string | null;
|
|
4375
|
+
}
|
|
4376
|
+
declare const issueFailurePath: (stateDir: string, issue: string) => string;
|
|
4377
|
+
declare const readIssueFailures: (stateDir: string, issue: string) => IssueFailureState;
|
|
4378
|
+
/**
|
|
4379
|
+
* Record one failure for an issue and return the updated state. Callers decide, from `consecutive`, whether the
|
|
4380
|
+
* `maxConsecutiveFailures` threshold was just crossed and the issue should be paused (see `pauseIssue`).
|
|
4381
|
+
*/
|
|
4382
|
+
declare const recordIssueFailure: (stateDir: string, issue: string, kind: string, reason: string, now?: Date) => IssueFailureState;
|
|
4383
|
+
/** Clear the consecutive-failure counter (and any pause) after progress: a successful dispatch, a clean/findings review, or a merge. */
|
|
4384
|
+
declare const clearIssueFailures: (stateDir: string, issue: string) => void;
|
|
4385
|
+
declare const pauseIssue: (stateDir: string, issue: string, reason: string, now?: Date) => IssueFailureState;
|
|
4386
|
+
/** Manual or label-driven resume: clears the pause and the counter so the issue gets a clean slate; history is kept. */
|
|
4387
|
+
declare const resumeIssue: (stateDir: string, issue: string) => IssueFailureState;
|
|
4388
|
+
declare const isIssuePaused: (stateDir: string, issue: string) => boolean;
|
|
4389
|
+
/** All paused issues under `<stateDir>/issues/*\/failures.json`, for `loop status`/`loop retro`. */
|
|
4390
|
+
declare const listPausedIssues: (stateDir: string) => readonly IssueFailureState[];
|
|
4391
|
+
type LoopStageName = 'tick' | 'deliver';
|
|
4392
|
+
interface StagePauseEntry {
|
|
4393
|
+
readonly consecutiveFailures: number;
|
|
4394
|
+
readonly lastFailureAt: string | null;
|
|
4395
|
+
readonly lastReason: string | null;
|
|
4396
|
+
readonly pausedAt: string | null;
|
|
4397
|
+
readonly pausedReason: string | null;
|
|
4398
|
+
}
|
|
4399
|
+
type StagePauseState = Partial<Record<LoopStageName, StagePauseEntry>>;
|
|
4400
|
+
declare const stagePausePath: (stateDir: string) => string;
|
|
4401
|
+
declare const readStagePause: (stateDir: string) => StagePauseState;
|
|
4402
|
+
declare const stageEntry: (stateDir: string, stage: LoopStageName) => StagePauseEntry;
|
|
4403
|
+
declare const isStagePaused: (stateDir: string, stage: LoopStageName) => boolean;
|
|
4404
|
+
/**
|
|
4405
|
+
* Record the outcome of one `loop stage` run. A thrown exception is a failure; anything that returns a report
|
|
4406
|
+
* (including an idle/no-op tick) is a success and clears both the counter and any existing pause. Crossing
|
|
4407
|
+
* `threshold` consecutive failures pauses the stage; the caller (`loop stage`) checks `isStagePaused` up front and
|
|
4408
|
+
* skips the actual run while paused, so a crash loop cannot spend budget or provider usage.
|
|
4409
|
+
*/
|
|
4410
|
+
declare const recordStageRunResult: (stateDir: string, stage: LoopStageName, outcome: {
|
|
4411
|
+
readonly succeeded: true;
|
|
4412
|
+
} | {
|
|
4413
|
+
readonly succeeded: false;
|
|
4414
|
+
readonly reason: string;
|
|
4415
|
+
}, threshold: number, now?: Date) => StagePauseEntry;
|
|
4416
|
+
declare const resumeStage: (stateDir: string, stage: LoopStageName) => void;
|
|
4417
|
+
|
|
4418
|
+
/** A GitHub PR the loop never dispatched, picked up only because it carries `github.intakeLabel`. */
|
|
4419
|
+
interface IntakeRecord {
|
|
4420
|
+
readonly pr: number;
|
|
4421
|
+
readonly headRef: string;
|
|
4422
|
+
readonly source: 'github-label';
|
|
4423
|
+
readonly addedAt: string;
|
|
4424
|
+
}
|
|
4425
|
+
/** The synthetic "issue" identifier intake state is filed under (`<stateDir>/issues/pr-<n>/…`) — there is no Linear issue for these. */
|
|
4426
|
+
declare const intakeIssueId: (pr: number) => string;
|
|
4427
|
+
declare const intakePath: (stateDir: string, pr: number) => string;
|
|
4428
|
+
declare const readIntake: (stateDir: string, pr: number) => IntakeRecord | null;
|
|
4429
|
+
/** Every PR currently tracked as intake (label may since have been removed on GitHub — `runDeliver` notices that separately). */
|
|
4430
|
+
declare const listIntake: (stateDir: string) => readonly IntakeRecord[];
|
|
4431
|
+
/**
|
|
4432
|
+
* List every open PR carrying `github.intakeLabel` and start tracking the ones not seen before. Idempotent: a PR
|
|
4433
|
+
* already tracked (or already a normal loop dispatch — same repo, so `pr-<n>` cannot collide with a Linear
|
|
4434
|
+
* identifier) is left alone; `runDeliver` handles it from state on every later call, not from this discovery.
|
|
4435
|
+
*/
|
|
4436
|
+
declare const discoverIntake: (runner: CommandRunner, input: {
|
|
4437
|
+
readonly repo: string;
|
|
4438
|
+
readonly label: string;
|
|
4439
|
+
readonly stateDir: string;
|
|
4440
|
+
readonly now: () => Date;
|
|
4441
|
+
}, options?: GitHubCliOptions) => Promise<readonly IntakeRecord[]>;
|
|
4442
|
+
|
|
4443
|
+
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 EffortLevel, 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, type HandoffBriefInput, 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, type IntakeRecord, type IssueFailureRecord, type IssueFailureState, 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 LoopEventBus, type LoopEventListener, type LoopEventPayload, type LoopHookListener, type LoopHookName, type LoopHookPayload, type LoopHookResult, type LoopIssue, type LoopPluginModule, type LoopProviderConfig, type LoopStage, type LoopStageName, 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, type OutcomeProgress, type OutcomeProgressStatus, 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 PiiKind, type PiiMatch, type PiiScanResult, type PilotAssessment, type PilotEntry, type PilotManifest, type PinnedSkill, type PinnedSkillRef, 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 StagePauseEntry, type StagePauseState, 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, advanceQueueOwner, 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, briefPath, buildDebriefReport, buildListIssuesArgv, buildRetroReport, buildReviewArgv, buildSuggestions, busyIssues, cancelRun, classifyFailure, classifyHarnessError, classifyProviderFailure, classifyWatchEvent, classifyWatchPhase, cleanTaskArtifacts, clearIssueFailures, 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, createLoopEventBus, createMachineMonitor, createMcpToolBridge, createModelPolicy, createOrcaDispatchPlan, createOrcaLifecycleProjection, createPhaseArtifact, createPhaseProfile, createPluginRegistry, createPluginSlot, createPolicyGate, createProcessRunner, createProcessToolRuntime, createPullRequestApproval, createQualityMatrix, createRagContextProvider, createRichIO, createSessionRecorder, createStatusSnapshot, createToolRuntime, createTrackingAdapter, createTrackingTransition, deliveryStatePath, detectProviders, discoverIntake, dispatchRecordPath, evaluateWatchdog, executePhaseProfile, exportEvidenceBundle, extractResetsAt, fetchArtificialAnalysisModels, fetchLinearIssue, fetchLinearQueue, fetchTeamMembers, filterAndOrderQueue, findExecutable, formatWatchEvent, gatherLoopState, generateContract, githubComment, githubCommentArgv, githubCommentExists, githubLabelRemove, githubMerge, githubMergeArgv, githubOpenPullRequests, githubPullRequest, githubPullRequestsForBranch, hasLocalConfig, hashContextSnapshot, hashContextSnapshots, hashMcpArgs, inspectDocBridgeIndex, inspectEventLogLock, installLoopAutomations, installPreflight, intakeIssueId, intakePath, isDiscoveryCurrent, isIssuePaused, isStagePaused, isWsl, issueFailurePath, launchWorkerTerminal, learningToMemoryRecord, learningsPath, linearAttach, linearAttachArgv, linearCommentAdd, linearCommentAddArgv, linearLabelAdd, linearLabelArgv, linearLabelRemove, linearStatusSet, linearStatusSetArgv, listCliModels, listDispatched, listIntake, listPausedIssues, loadAgentRegistry, loadAliases, loadBenchmarkManifest, loadBuiltinCatalog, loadConfig, loadLatestRun, loadLoopConfig, loadLoopPlugins, loadPinnedSkills, 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, pauseIssue, planFilePreflight, planMemoryContext, planPhaseProfile, planRun, precheckCommand, precheckDeliver, precheckTick, preferMemoryOverDocBridge, promoteLearnings, promoteLearningsToMemory, promptLocalConfig, providerIdentity, providerSpecs, queueOwner, rankModels, readAaCache, readArtifactFile, readContextSnapshots, readCooldowns, readDeliveryState, readDispatchRecord, readEvidenceTrustStore, readIntake, readIssueFailures, readLearningsLedger, readLoopEvents, readOutcomeProgress, readStagePause, readStoredContract, reconcileRun, recordBenchmarkObservation, recordIssueFailure, recordStageRunResult, recoverEventLogLock, recoveryDelayMs, remainingUsagePercent, renderArtifactMarkdown, renderContractPrompt, renderDebriefMarkdown, renderFindingsForWorker, renderHandoffBrief, renderHeadlessArgv, renderLocalConfig, renderPinnedSkills, renderRetroMarkdown, renderTuiCommand, renderWorkerBrief, resolveAgentForRole, resolveAlias, resolveCatalogCandidates, resolveDocContext, resumeIssue, resumeStage, resumeStateFromArtifacts, retroLearnings, retryRun, rotationStatePath, routeAllRoles, runAdversarialReview, runAgentEval, runCodeReview, runDeliver, runEvalBattery, runGuidedInstall, runLoopDoctor, runRetroStage, runTick, runWithRecovery, runWorkflow, sampleMachine, scanForPii, selectMemoryForPrompt, selectModel, selectRuntime, severityRank, shellQuote, skillDigest, skillRefs, snapshotWatchTargets, stageEntry, stagePausePath, 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, writeDispatchRecord, writeIdFor, writeLearningsLedger, writeLocalConfig, writeStoredContract };
|