@harness-engineering/orchestrator 0.13.0 → 0.15.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.mts +615 -22
- package/dist/index.d.ts +615 -22
- package/dist/index.js +747 -133
- package/dist/index.mjs +712 -98
- package/package.json +6 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as _harness_engineering_types from '@harness-engineering/types';
|
|
2
2
|
import { Issue, WorkflowExecutionPlan, StageRun, AgentEvent, WorkflowConfig, TokenUsage, ConcernSignal, ScopeTier, EscalationConfig, IssueRoutingDecision, Result, WorkflowDefinition, BackendDef, RoutingConfig, RoutingDecision, RoutingUseCase, ContainerConfig, SecretConfig, AgentBackend, RoutingRequest, CapabilityTier, WorkspaceConfig, HooksConfig, SessionStartParams, AgentSession, AgentError, TurnParams, TurnResult, CheckScriptDefinition, OutputRetentionConfig, BackendCapabilityRegistry, RoutingPolicy, ComplexityVerdict, RoutingTelemetry, RoutingStatus, RoutingError, PrivacyClass, BackendCapabilities, AgentConfig, LocalModelStatus, CustomTaskDefinition, MaintenanceConfig, TokenScope, AuthToken, AuthTokenPublic, IndexedFileKind, SessionSearchResult, ReindexStats, SessionSummarizationConfig, SessionSummary, SessionSummaryMeta, SessionsConfig, GatewayEvent, NotificationEnvelope, NotificationDeliveryResult, NotificationSinkConfig, NotificationsConfig } from '@harness-engineering/types';
|
|
3
|
-
import { IssueTrackerClient, Issue as Issue$1, CacheMetricsRecorder, TrackerConfig, eventSourcing, ArchiveHooks, SkillProposal, ProposalGateFinding, SkillKind } from '@harness-engineering/core';
|
|
4
|
-
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline, WeightedRecommendation, AnalysisProvider } from '@harness-engineering/intelligence';
|
|
3
|
+
import { IssueTrackerClient, Issue as Issue$1, CacheMetricsRecorder, TrackerConfig, eventSourcing, RoadmapStore, ArchiveHooks, SkillProposal, ProposalGateFinding, SkillKind } from '@harness-engineering/core';
|
|
4
|
+
import { EnrichedSpec, ComplexityScore, SimulationResult, IntelligencePipeline, WeightedRecommendation, AnalysisProvider, PrecedentLookup, ProbeConfig, ProbeInput, GraphScope, TriageVerdict, ForkGenerator, BrainstormOutcome, BrainstormInput, SpecDraft, GoNoGoCandidate } from '@harness-engineering/intelligence';
|
|
5
|
+
export { RankableCandidate, TriageVerdict, pilotScore, rankTriageCandidates } from '@harness-engineering/intelligence';
|
|
5
6
|
import { GraphStore } from '@harness-engineering/graph';
|
|
6
7
|
import { execFile } from 'node:child_process';
|
|
7
8
|
import { EventEmitter } from 'node:events';
|
|
@@ -653,25 +654,6 @@ interface TriageConfig {
|
|
|
653
654
|
* Returns undefined if no prefix is present.
|
|
654
655
|
*/
|
|
655
656
|
declare function extractTitlePrefix(title: string | null | undefined): string | undefined;
|
|
656
|
-
/**
|
|
657
|
-
* Decide which skill/agent the orchestrator should dispatch this issue to.
|
|
658
|
-
*
|
|
659
|
-
* Rule order (first match wins):
|
|
660
|
-
* 1. isRollback → debugging (high)
|
|
661
|
-
* 2. security prefix or security paths → security-review (high)
|
|
662
|
-
* 3. docs prefix or docs-only diff → docs (high)
|
|
663
|
-
* 4. hasFailingTests → debugging (medium)
|
|
664
|
-
* 5. touchesMigrationPaths → planning (high)
|
|
665
|
-
* 6. fix: with small change → code-review (high)
|
|
666
|
-
* 7. feat: → planning (medium)
|
|
667
|
-
* 8. refactor: → refactoring (medium)
|
|
668
|
-
* 9. default → code-review (low)
|
|
669
|
-
*
|
|
670
|
-
* Triage is meant to run BEFORE `routeIssue()`; the selected skill is
|
|
671
|
-
* persisted on the live session so downstream dispatch does not
|
|
672
|
-
* re-derive it.
|
|
673
|
-
*/
|
|
674
|
-
declare function triageIssue(issue: Issue, signals: TriageSignals, config?: TriageConfig): TriageDecision;
|
|
675
657
|
|
|
676
658
|
/**
|
|
677
659
|
* A pending human interaction, typically from an escalation.
|
|
@@ -2620,6 +2602,34 @@ declare class Orchestrator extends EventEmitter {
|
|
|
2620
2602
|
* evaluator's `execution_outcome` persistence is best-effort and never blocks.
|
|
2621
2603
|
*/
|
|
2622
2604
|
private deriveAcceptanceEvalVerdict;
|
|
2605
|
+
/**
|
|
2606
|
+
* Roadmap Auto-Triage Phase 4 (SC1–SC3, SC5, SC7): the post-diff routing
|
|
2607
|
+
* retrospective — a SIBLING quality-verdict source to the 4c feeder above,
|
|
2608
|
+
* extending (not replacing) the proven escalation path. On a normal exit, when AMR
|
|
2609
|
+
* is live AND auto-triage is enabled AND this unit carries a stored pre-dispatch
|
|
2610
|
+
* prediction, it classifies the ACTUAL introduced diff at full strength
|
|
2611
|
+
* (phase:'post-diff') and grades it against that prediction:
|
|
2612
|
+
* - MATCH → records the graded outcome + annotates the PR "AI autonomous —
|
|
2613
|
+
* verify" (stage-2 human-verify handling, SC4) → returns `undefined`
|
|
2614
|
+
* (neutral: a match is not an escalation).
|
|
2615
|
+
* - MISMATCH (diff exceeded prediction, or a missing/garbled prediction, or ANY
|
|
2616
|
+
* error) → records the outcome (when a shape is known) + returns
|
|
2617
|
+
* `'quality-fail'`, which climbs the coherence unit's escalation floor
|
|
2618
|
+
* via `recordAmrOutcome`; exhaustion queues `needs-human` (SC3/SC7).
|
|
2619
|
+
*
|
|
2620
|
+
* Fail-safe & guarded (SC7): an error never a silent pass — it takes the MISMATCH
|
|
2621
|
+
* (block+escalate) path. No-op (byte-identical) when AMR is off, auto-triage is
|
|
2622
|
+
* off, or the unit was not dispatched through triage (no stored prediction) — the
|
|
2623
|
+
* last means an ordinary non-triaged run is never graded.
|
|
2624
|
+
*/
|
|
2625
|
+
private deriveRoutingRetrospectiveVerdict;
|
|
2626
|
+
/**
|
|
2627
|
+
* v1 stage-2 match handling (SC4): annotate the unit's PR/issue with a "verify this
|
|
2628
|
+
* autonomous change" note so a human reviews every autonomous PR. Best-effort — a
|
|
2629
|
+
* missing tracker config / token / a failed comment never breaks completion (the
|
|
2630
|
+
* grade already recorded above). Mirrors `postLifecycleComment`'s adapter wiring.
|
|
2631
|
+
*/
|
|
2632
|
+
private annotateRetrospectiveMatch;
|
|
2623
2633
|
/**
|
|
2624
2634
|
* Informs the state machine that an agent worker has exited.
|
|
2625
2635
|
*/
|
|
@@ -2906,6 +2916,226 @@ declare function launchTUI(orchestrator: Orchestrator): {
|
|
|
2906
2916
|
waitUntilExit: () => Promise<void>;
|
|
2907
2917
|
};
|
|
2908
2918
|
|
|
2919
|
+
/**
|
|
2920
|
+
* Build the pure `ProbeInput` from an `Issue`. Reuses `buildTaskText` for the pre-diff
|
|
2921
|
+
* text-only signals (title+description length, spec/acceptance hints, prompt) and
|
|
2922
|
+
* `extractEntities` for the candidate entity mentions the scope lever will try to resolve.
|
|
2923
|
+
*
|
|
2924
|
+
* Pure over the Issue — unit-testable without instantiating an Orchestrator.
|
|
2925
|
+
*/
|
|
2926
|
+
declare function buildProbeInput(issue: Issue): ProbeInput;
|
|
2927
|
+
/**
|
|
2928
|
+
* The concrete `GraphScope` seam over a loaded `GraphStore`. For each candidate it resolves
|
|
2929
|
+
* a node (name → path → file-id) and simulates the blast radius via `CascadeSimulator`
|
|
2930
|
+
* (`summary.totalAffected`). Returns `null` for unresolved candidates — the S3 contract: an
|
|
2931
|
+
* unresolved candidate does NOT count toward scope. Never throws out of `resolve` (the probe
|
|
2932
|
+
* also guards it, but we keep this defensive so one odd node can't sink the lever).
|
|
2933
|
+
*/
|
|
2934
|
+
declare function makeGraphScope(store: GraphStore): GraphScope;
|
|
2935
|
+
/** Injected dependencies for the wired triage over a single issue. */
|
|
2936
|
+
interface TriageWiringDeps {
|
|
2937
|
+
/** The SEL analysis provider (from `buildAnalysisProviderForLayer('sel', …)`). */
|
|
2938
|
+
provider?: AnalysisProvider | null;
|
|
2939
|
+
/** The loaded knowledge-graph store. Absent ⇒ scope degrades ⇒ everything holds. */
|
|
2940
|
+
graphStore?: GraphStore | null;
|
|
2941
|
+
/** The precedent lever (Phase 4 wires the real one; absent ⇒ cold-start unknown). */
|
|
2942
|
+
precedent?: PrecedentLookup;
|
|
2943
|
+
/** Gate seeds from `roadmap.autoTriage.thresholds`. */
|
|
2944
|
+
config?: Partial<ProbeConfig>;
|
|
2945
|
+
/** Optional model overrides threaded to the classifier tie-break. */
|
|
2946
|
+
models?: {
|
|
2947
|
+
fast?: string;
|
|
2948
|
+
standard?: string;
|
|
2949
|
+
};
|
|
2950
|
+
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Run the scoping probe over a single `Issue`: build the input, resolve the injected SEL
|
|
2953
|
+
* provider + graph seam, and invoke the pure probe. Returns the `TriageVerdict`. Never
|
|
2954
|
+
* throws — the probe itself is total; the only added surface here is graph-store adaptation,
|
|
2955
|
+
* which `makeGraphScope` keeps defensive.
|
|
2956
|
+
*/
|
|
2957
|
+
declare function triageIssue(issue: Issue, deps?: TriageWiringDeps): Promise<TriageVerdict>;
|
|
2958
|
+
|
|
2959
|
+
/** The human-only rubric — named triggers that MUST bias the model to low confidence. */
|
|
2960
|
+
declare const BRAINSTORM_RUBRIC: string;
|
|
2961
|
+
interface SelForkGeneratorOptions {
|
|
2962
|
+
/** Samples per fork for the self-consistency check (default 3; min 2 to detect a flip). */
|
|
2963
|
+
samples?: number;
|
|
2964
|
+
/** Optional model override threaded to the provider. */
|
|
2965
|
+
model?: string;
|
|
2966
|
+
/** Max tokens per sample (default 512). */
|
|
2967
|
+
maxTokens?: number;
|
|
2968
|
+
}
|
|
2969
|
+
/**
|
|
2970
|
+
* Build a real `ForkGenerator` over an `AnalysisProvider`. For each fork index the generator
|
|
2971
|
+
* samples the model N times; it accepts the fork (passing through the model's reported `high`)
|
|
2972
|
+
* only when EVERY sample agrees on the SAME fork identity (`forkId` + normalized `question`)
|
|
2973
|
+
* AND the SAME recommended option, AND that recommendation is non-empty AND is one of the
|
|
2974
|
+
* fork's offered `options`. Any drift, instability, or degenerate/off-menu recommendation
|
|
2975
|
+
* forces `confidence:'low'` (the runner then halts and a human owns the fork). The generator
|
|
2976
|
+
* NEVER throws for a well-formed provider; a provider error propagates and the pure runner maps
|
|
2977
|
+
* it to `halted{ reason:'error' }`.
|
|
2978
|
+
*/
|
|
2979
|
+
declare function makeSelForkGenerator(provider: AnalysisProvider, input: BrainstormInput, opts?: SelForkGeneratorOptions): ForkGenerator;
|
|
2980
|
+
interface BrainstormWiringDeps {
|
|
2981
|
+
/**
|
|
2982
|
+
* An explicit `ForkGenerator` to drive the brainstorm. INJECTED in tests (no live model).
|
|
2983
|
+
* When absent, `provider` is required and a real SEL generator is built.
|
|
2984
|
+
*/
|
|
2985
|
+
generator?: ForkGenerator;
|
|
2986
|
+
/** The SEL provider used to build the real generator when `generator` is absent. */
|
|
2987
|
+
provider?: AnalysisProvider | null;
|
|
2988
|
+
/** Self-consistency / model options for the built generator. */
|
|
2989
|
+
generatorOptions?: SelForkGeneratorOptions;
|
|
2990
|
+
/**
|
|
2991
|
+
* Docs root under which a completed spec is written (`<docsRoot>/changes/<slug>/proposal.md`).
|
|
2992
|
+
* Absent ⇒ no spec is written (dry run) but the outcome is still returned.
|
|
2993
|
+
*/
|
|
2994
|
+
docsRoot?: string;
|
|
2995
|
+
/** Re-score deps threaded to `triageIssue` (SC4). Absent ⇒ re-score is skipped. */
|
|
2996
|
+
rescore?: {
|
|
2997
|
+
graphStore?: GraphStore | null;
|
|
2998
|
+
} & Pick<TriageWiringDeps, 'provider' | 'precedent' | 'config' | 'models'>;
|
|
2999
|
+
}
|
|
3000
|
+
/** The wired result: the pure outcome + (on completion) the written path + the re-score verdict. */
|
|
3001
|
+
interface WiredBrainstormResult {
|
|
3002
|
+
/** The pure decision-core outcome (completed{spec} | halted{fork,reason}). */
|
|
3003
|
+
outcome: BrainstormOutcome;
|
|
3004
|
+
/** Absolute path of the written spec, when a spec was completed AND `docsRoot` was set. */
|
|
3005
|
+
specPath?: string;
|
|
3006
|
+
/** The re-score verdict over the enriched content (SC4), when the brainstorm completed. */
|
|
3007
|
+
rescore?: TriageVerdict;
|
|
3008
|
+
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Build a `BrainstormInput` from an `Issue` + its Phase-1 complexity level. Pure over the Issue.
|
|
3011
|
+
*/
|
|
3012
|
+
declare function brainstormInputFromIssue(issue: Issue, level: BrainstormInput['level']): BrainstormInput;
|
|
3013
|
+
/**
|
|
3014
|
+
* Run the autonomous brainstorm for one issue and, on a clean completion, write a
|
|
3015
|
+
* proposal-shaped spec + re-score the enriched item (SC4). The generator is injected (tests)
|
|
3016
|
+
* or built over the SEL provider (production). Never throws — the pure runner is total, and
|
|
3017
|
+
* the doc-write / re-score are guarded.
|
|
3018
|
+
*/
|
|
3019
|
+
declare function runBrainstormForIssue(issue: Issue, level: BrainstormInput['level'], deps: BrainstormWiringDeps): Promise<WiredBrainstormResult>;
|
|
3020
|
+
/** Slugify an item identity into a docs directory name. */
|
|
3021
|
+
declare function slugFor(spec: SpecDraft): string;
|
|
3022
|
+
/**
|
|
3023
|
+
* Render a `SpecDraft` as a proposal-shaped markdown spec: a decision record where each
|
|
3024
|
+
* accepted fork becomes an "Approach" section (question → recommended option + rationale).
|
|
3025
|
+
*/
|
|
3026
|
+
declare function renderSpecMarkdown(spec: SpecDraft): string;
|
|
3027
|
+
/**
|
|
3028
|
+
* Produce an enriched `Issue` whose description carries the drafted spec's substance, so the
|
|
3029
|
+
* re-score (SC4) reads REAL content — the resolved decisions + rationale — not the original
|
|
3030
|
+
* one-line length proxy. Pure over the inputs.
|
|
3031
|
+
*/
|
|
3032
|
+
declare function enrichIssueWithSpec(issue: Issue, spec: SpecDraft): Issue;
|
|
3033
|
+
|
|
3034
|
+
/**
|
|
3035
|
+
* One approved item to mark, bundling everything the two writes need: the go/no-go verdict
|
|
3036
|
+
* (must be `humanApproved`), the roadmap feature name (→ shard slug), the Phase-2 spec path
|
|
3037
|
+
* to attach, and the probe outputs for the prediction slice.
|
|
3038
|
+
*/
|
|
3039
|
+
interface TriageMarkItem {
|
|
3040
|
+
/** The go/no-go candidate. Only acted on when `candidate.humanApproved` is true (SC5). */
|
|
3041
|
+
candidate: GoNoGoCandidate;
|
|
3042
|
+
/** The roadmap feature's display name — slugified to resolve its shard. */
|
|
3043
|
+
featureName: string;
|
|
3044
|
+
/** Repo-relative path to the generated spec (Phase 2 output) to attach to the feature. */
|
|
3045
|
+
specPath: string;
|
|
3046
|
+
/** Item labels (for the prediction's shapeKey bucket). */
|
|
3047
|
+
labels: readonly string[];
|
|
3048
|
+
/** The pre-diff complexity verdict from the probe (the prediction being made). */
|
|
3049
|
+
verdict: ComplexityVerdict;
|
|
3050
|
+
/** Predicted blast radius (from the scope lever) — recorded for the retrospective. */
|
|
3051
|
+
scopeEstimate: number;
|
|
3052
|
+
/**
|
|
3053
|
+
* The EVIDENCE-DERIVED autonomy stage this item's SHAPE earned (SC6), resolved
|
|
3054
|
+
* per-shape by the caller (`min(resolveStage(history), configuredCeiling, 2)`).
|
|
3055
|
+
* When present it is stamped onto the prediction INSTEAD of the uniform
|
|
3056
|
+
* `config.ratchetStage`, so the ratchet advances per-shape. Absent ⇒ the marker
|
|
3057
|
+
* falls back to `config.ratchetStage` (the Phase-3 uniform behavior).
|
|
3058
|
+
*/
|
|
3059
|
+
effectiveStage?: 1 | 2;
|
|
3060
|
+
}
|
|
3061
|
+
/** The feature-flag + ratchet surface the marker reads (default-off master switch). */
|
|
3062
|
+
interface TriageMarkConfig {
|
|
3063
|
+
/** Master switch. `false` ⇒ complete no-op (SC7). */
|
|
3064
|
+
enabled: boolean;
|
|
3065
|
+
/** Ratchet stage stamped onto the prediction (Phase 3 pins 1). */
|
|
3066
|
+
ratchetStage: 1 | 2 | 3 | 4;
|
|
3067
|
+
}
|
|
3068
|
+
/** Injected prediction writer — the Phase-0 TriageRecord store's append. Fakeable in tests. */
|
|
3069
|
+
type RecordPrediction = (payload: eventSourcing.TriagePredictedInput) => Promise<{
|
|
3070
|
+
ok: boolean;
|
|
3071
|
+
error?: Error;
|
|
3072
|
+
}>;
|
|
3073
|
+
interface TriageMarkDeps {
|
|
3074
|
+
/** The roadmap store to patch (real via `resolveRoadmapStoreForFile`, fake in tests). */
|
|
3075
|
+
store: RoadmapStore;
|
|
3076
|
+
/** Feature-flag + ratchet config. */
|
|
3077
|
+
config: TriageMarkConfig;
|
|
3078
|
+
/** Prediction writer (Phase-0 store). */
|
|
3079
|
+
recordPrediction: RecordPrediction;
|
|
3080
|
+
/**
|
|
3081
|
+
* The orchestrator's self-identity for the assignee gate. When provided, an item assigned
|
|
3082
|
+
* to anyone else is skipped (SC6). When omitted, the gate is inactive (call-sites without
|
|
3083
|
+
* identity — mirrors `candidate-selection.ts`'s `selfAssignee` optionality).
|
|
3084
|
+
*/
|
|
3085
|
+
selfAssignee?: string | null;
|
|
3086
|
+
}
|
|
3087
|
+
/** Why an item was skipped rather than marked (legible, closed set). */
|
|
3088
|
+
type MarkSkipReason =
|
|
3089
|
+
/** The candidate was not human-approved (SC5) — should not reach the marker, guarded anyway. */
|
|
3090
|
+
'not-approved'
|
|
3091
|
+
/** The item is assigned to a non-self assignee (SC6) — never stolen. */
|
|
3092
|
+
| 'assigned-elsewhere'
|
|
3093
|
+
/** The feature was not found in the roadmap (stale externalId / renamed). */
|
|
3094
|
+
| 'feature-not-found';
|
|
3095
|
+
interface MarkSkip {
|
|
3096
|
+
externalId: string;
|
|
3097
|
+
reason: MarkSkipReason;
|
|
3098
|
+
}
|
|
3099
|
+
/** The marker's outcome: which items were made eligible, and which were skipped + why. */
|
|
3100
|
+
interface TriageMarkResult {
|
|
3101
|
+
/** externalIds of items successfully marked eligible (spec attached + prediction recorded). */
|
|
3102
|
+
marked: string[];
|
|
3103
|
+
/** Items intentionally not marked, each with the legible reason. */
|
|
3104
|
+
skipped: MarkSkip[];
|
|
3105
|
+
}
|
|
3106
|
+
/**
|
|
3107
|
+
* Mark human-approved items eligible for the existing orchestrator pickup, and record their
|
|
3108
|
+
* pre-dispatch predictions. Returns `Ok` with the mark/skip partition, or `Err` on the first
|
|
3109
|
+
* store write that fails (so a partial roadmap write surfaces rather than silently dropping).
|
|
3110
|
+
*
|
|
3111
|
+
* NOTE ON DISPATCH: nothing here dispatches. The orchestrator's own pickup loop selects the
|
|
3112
|
+
* now-spec-bearing, active-status item on its next tick and runs it through unchanged gating.
|
|
3113
|
+
*/
|
|
3114
|
+
declare function markApprovedForDispatch(items: readonly TriageMarkItem[], deps: TriageMarkDeps): Promise<{
|
|
3115
|
+
ok: true;
|
|
3116
|
+
value: TriageMarkResult;
|
|
3117
|
+
} | {
|
|
3118
|
+
ok: false;
|
|
3119
|
+
error: Error;
|
|
3120
|
+
}>;
|
|
3121
|
+
|
|
3122
|
+
/** The minimal stored-record shape the precedent aggregation reads (structural mirror). */
|
|
3123
|
+
interface StoredOutcomeRecord {
|
|
3124
|
+
shapeKey: string;
|
|
3125
|
+
outcome?: {
|
|
3126
|
+
matched: boolean;
|
|
3127
|
+
};
|
|
3128
|
+
}
|
|
3129
|
+
/**
|
|
3130
|
+
* The REAL `PrecedentLookup` (SC5) — closes the Phase-1 degrade-empty stub. Aggregates
|
|
3131
|
+
* the autonomous-success base-rate over recorded outcomes sharing a `shapeKey` via the
|
|
3132
|
+
* pure `aggregatePrecedent`. Bridges core's `StoredTriageRecord` (whose `outcome` slice
|
|
3133
|
+
* is structurally `{ matched }` for aggregation purposes) into the intelligence
|
|
3134
|
+
* aggregation. With no outcome-bearing records for a shape it returns `unknown` — the
|
|
3135
|
+
* exact Phase-1 cold-start behavior, now real once outcomes accrue.
|
|
3136
|
+
*/
|
|
3137
|
+
declare function precedentLookupFromStored(records: readonly StoredOutcomeRecord[]): PrecedentLookup;
|
|
3138
|
+
|
|
2909
3139
|
/**
|
|
2910
3140
|
* Fail-closed signal: privacy floor / allowlist emptied the candidate set (S4-001).
|
|
2911
3141
|
* Distinguishable from a tier/cost-only exclusion, which returns `undefined`.
|
|
@@ -3048,54 +3278,244 @@ declare function makeBackendResolver(backends: Record<string, BackendDef> | null
|
|
|
3048
3278
|
*/
|
|
3049
3279
|
declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
3050
3280
|
type: z.ZodLiteral<"mock">;
|
|
3281
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3282
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3283
|
+
costPer1kTokens: z.ZodNumber;
|
|
3284
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3285
|
+
contextWindow: z.ZodNumber;
|
|
3286
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3287
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3288
|
+
}, "strict", z.ZodTypeAny, {
|
|
3289
|
+
tier: "fast" | "standard" | "strong";
|
|
3290
|
+
costPer1kTokens: number;
|
|
3291
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3292
|
+
contextWindow: number;
|
|
3293
|
+
vision?: boolean | undefined;
|
|
3294
|
+
toolUse?: boolean | undefined;
|
|
3295
|
+
}, {
|
|
3296
|
+
tier: "fast" | "standard" | "strong";
|
|
3297
|
+
costPer1kTokens: number;
|
|
3298
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3299
|
+
contextWindow: number;
|
|
3300
|
+
vision?: boolean | undefined;
|
|
3301
|
+
toolUse?: boolean | undefined;
|
|
3302
|
+
}>>;
|
|
3051
3303
|
}, "strict", z.ZodTypeAny, {
|
|
3052
3304
|
type: "mock";
|
|
3305
|
+
capabilities?: {
|
|
3306
|
+
tier: "fast" | "standard" | "strong";
|
|
3307
|
+
costPer1kTokens: number;
|
|
3308
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3309
|
+
contextWindow: number;
|
|
3310
|
+
vision?: boolean | undefined;
|
|
3311
|
+
toolUse?: boolean | undefined;
|
|
3312
|
+
} | undefined;
|
|
3053
3313
|
}, {
|
|
3054
3314
|
type: "mock";
|
|
3315
|
+
capabilities?: {
|
|
3316
|
+
tier: "fast" | "standard" | "strong";
|
|
3317
|
+
costPer1kTokens: number;
|
|
3318
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3319
|
+
contextWindow: number;
|
|
3320
|
+
vision?: boolean | undefined;
|
|
3321
|
+
toolUse?: boolean | undefined;
|
|
3322
|
+
} | undefined;
|
|
3055
3323
|
}>, z.ZodObject<{
|
|
3056
3324
|
type: z.ZodLiteral<"claude">;
|
|
3057
3325
|
command: z.ZodOptional<z.ZodString>;
|
|
3326
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3327
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3328
|
+
costPer1kTokens: z.ZodNumber;
|
|
3329
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3330
|
+
contextWindow: z.ZodNumber;
|
|
3331
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3332
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3333
|
+
}, "strict", z.ZodTypeAny, {
|
|
3334
|
+
tier: "fast" | "standard" | "strong";
|
|
3335
|
+
costPer1kTokens: number;
|
|
3336
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3337
|
+
contextWindow: number;
|
|
3338
|
+
vision?: boolean | undefined;
|
|
3339
|
+
toolUse?: boolean | undefined;
|
|
3340
|
+
}, {
|
|
3341
|
+
tier: "fast" | "standard" | "strong";
|
|
3342
|
+
costPer1kTokens: number;
|
|
3343
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3344
|
+
contextWindow: number;
|
|
3345
|
+
vision?: boolean | undefined;
|
|
3346
|
+
toolUse?: boolean | undefined;
|
|
3347
|
+
}>>;
|
|
3058
3348
|
}, "strict", z.ZodTypeAny, {
|
|
3059
3349
|
type: "claude";
|
|
3350
|
+
capabilities?: {
|
|
3351
|
+
tier: "fast" | "standard" | "strong";
|
|
3352
|
+
costPer1kTokens: number;
|
|
3353
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3354
|
+
contextWindow: number;
|
|
3355
|
+
vision?: boolean | undefined;
|
|
3356
|
+
toolUse?: boolean | undefined;
|
|
3357
|
+
} | undefined;
|
|
3060
3358
|
command?: string | undefined;
|
|
3061
3359
|
}, {
|
|
3062
3360
|
type: "claude";
|
|
3361
|
+
capabilities?: {
|
|
3362
|
+
tier: "fast" | "standard" | "strong";
|
|
3363
|
+
costPer1kTokens: number;
|
|
3364
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3365
|
+
contextWindow: number;
|
|
3366
|
+
vision?: boolean | undefined;
|
|
3367
|
+
toolUse?: boolean | undefined;
|
|
3368
|
+
} | undefined;
|
|
3063
3369
|
command?: string | undefined;
|
|
3064
3370
|
}>, z.ZodObject<{
|
|
3065
3371
|
type: z.ZodLiteral<"anthropic">;
|
|
3066
3372
|
model: z.ZodString;
|
|
3067
3373
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3374
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3375
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3376
|
+
costPer1kTokens: z.ZodNumber;
|
|
3377
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3378
|
+
contextWindow: z.ZodNumber;
|
|
3379
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3380
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3381
|
+
}, "strict", z.ZodTypeAny, {
|
|
3382
|
+
tier: "fast" | "standard" | "strong";
|
|
3383
|
+
costPer1kTokens: number;
|
|
3384
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3385
|
+
contextWindow: number;
|
|
3386
|
+
vision?: boolean | undefined;
|
|
3387
|
+
toolUse?: boolean | undefined;
|
|
3388
|
+
}, {
|
|
3389
|
+
tier: "fast" | "standard" | "strong";
|
|
3390
|
+
costPer1kTokens: number;
|
|
3391
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3392
|
+
contextWindow: number;
|
|
3393
|
+
vision?: boolean | undefined;
|
|
3394
|
+
toolUse?: boolean | undefined;
|
|
3395
|
+
}>>;
|
|
3068
3396
|
}, "strict", z.ZodTypeAny, {
|
|
3069
3397
|
type: "anthropic";
|
|
3070
3398
|
model: string;
|
|
3399
|
+
capabilities?: {
|
|
3400
|
+
tier: "fast" | "standard" | "strong";
|
|
3401
|
+
costPer1kTokens: number;
|
|
3402
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3403
|
+
contextWindow: number;
|
|
3404
|
+
vision?: boolean | undefined;
|
|
3405
|
+
toolUse?: boolean | undefined;
|
|
3406
|
+
} | undefined;
|
|
3071
3407
|
apiKey?: string | undefined;
|
|
3072
3408
|
}, {
|
|
3073
3409
|
type: "anthropic";
|
|
3074
3410
|
model: string;
|
|
3411
|
+
capabilities?: {
|
|
3412
|
+
tier: "fast" | "standard" | "strong";
|
|
3413
|
+
costPer1kTokens: number;
|
|
3414
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3415
|
+
contextWindow: number;
|
|
3416
|
+
vision?: boolean | undefined;
|
|
3417
|
+
toolUse?: boolean | undefined;
|
|
3418
|
+
} | undefined;
|
|
3075
3419
|
apiKey?: string | undefined;
|
|
3076
3420
|
}>, z.ZodObject<{
|
|
3077
3421
|
type: z.ZodLiteral<"openai">;
|
|
3078
3422
|
model: z.ZodString;
|
|
3079
3423
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3424
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3425
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3426
|
+
costPer1kTokens: z.ZodNumber;
|
|
3427
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3428
|
+
contextWindow: z.ZodNumber;
|
|
3429
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3430
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3431
|
+
}, "strict", z.ZodTypeAny, {
|
|
3432
|
+
tier: "fast" | "standard" | "strong";
|
|
3433
|
+
costPer1kTokens: number;
|
|
3434
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3435
|
+
contextWindow: number;
|
|
3436
|
+
vision?: boolean | undefined;
|
|
3437
|
+
toolUse?: boolean | undefined;
|
|
3438
|
+
}, {
|
|
3439
|
+
tier: "fast" | "standard" | "strong";
|
|
3440
|
+
costPer1kTokens: number;
|
|
3441
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3442
|
+
contextWindow: number;
|
|
3443
|
+
vision?: boolean | undefined;
|
|
3444
|
+
toolUse?: boolean | undefined;
|
|
3445
|
+
}>>;
|
|
3080
3446
|
}, "strict", z.ZodTypeAny, {
|
|
3081
3447
|
type: "openai";
|
|
3082
3448
|
model: string;
|
|
3449
|
+
capabilities?: {
|
|
3450
|
+
tier: "fast" | "standard" | "strong";
|
|
3451
|
+
costPer1kTokens: number;
|
|
3452
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3453
|
+
contextWindow: number;
|
|
3454
|
+
vision?: boolean | undefined;
|
|
3455
|
+
toolUse?: boolean | undefined;
|
|
3456
|
+
} | undefined;
|
|
3083
3457
|
apiKey?: string | undefined;
|
|
3084
3458
|
}, {
|
|
3085
3459
|
type: "openai";
|
|
3086
3460
|
model: string;
|
|
3461
|
+
capabilities?: {
|
|
3462
|
+
tier: "fast" | "standard" | "strong";
|
|
3463
|
+
costPer1kTokens: number;
|
|
3464
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3465
|
+
contextWindow: number;
|
|
3466
|
+
vision?: boolean | undefined;
|
|
3467
|
+
toolUse?: boolean | undefined;
|
|
3468
|
+
} | undefined;
|
|
3087
3469
|
apiKey?: string | undefined;
|
|
3088
3470
|
}>, z.ZodObject<{
|
|
3089
3471
|
type: z.ZodLiteral<"gemini">;
|
|
3090
3472
|
model: z.ZodString;
|
|
3091
3473
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3474
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3475
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3476
|
+
costPer1kTokens: z.ZodNumber;
|
|
3477
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3478
|
+
contextWindow: z.ZodNumber;
|
|
3479
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3480
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3481
|
+
}, "strict", z.ZodTypeAny, {
|
|
3482
|
+
tier: "fast" | "standard" | "strong";
|
|
3483
|
+
costPer1kTokens: number;
|
|
3484
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3485
|
+
contextWindow: number;
|
|
3486
|
+
vision?: boolean | undefined;
|
|
3487
|
+
toolUse?: boolean | undefined;
|
|
3488
|
+
}, {
|
|
3489
|
+
tier: "fast" | "standard" | "strong";
|
|
3490
|
+
costPer1kTokens: number;
|
|
3491
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3492
|
+
contextWindow: number;
|
|
3493
|
+
vision?: boolean | undefined;
|
|
3494
|
+
toolUse?: boolean | undefined;
|
|
3495
|
+
}>>;
|
|
3092
3496
|
}, "strict", z.ZodTypeAny, {
|
|
3093
3497
|
type: "gemini";
|
|
3094
3498
|
model: string;
|
|
3499
|
+
capabilities?: {
|
|
3500
|
+
tier: "fast" | "standard" | "strong";
|
|
3501
|
+
costPer1kTokens: number;
|
|
3502
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3503
|
+
contextWindow: number;
|
|
3504
|
+
vision?: boolean | undefined;
|
|
3505
|
+
toolUse?: boolean | undefined;
|
|
3506
|
+
} | undefined;
|
|
3095
3507
|
apiKey?: string | undefined;
|
|
3096
3508
|
}, {
|
|
3097
3509
|
type: "gemini";
|
|
3098
3510
|
model: string;
|
|
3511
|
+
capabilities?: {
|
|
3512
|
+
tier: "fast" | "standard" | "strong";
|
|
3513
|
+
costPer1kTokens: number;
|
|
3514
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3515
|
+
contextWindow: number;
|
|
3516
|
+
vision?: boolean | undefined;
|
|
3517
|
+
toolUse?: boolean | undefined;
|
|
3518
|
+
} | undefined;
|
|
3099
3519
|
apiKey?: string | undefined;
|
|
3100
3520
|
}>, z.ZodObject<{
|
|
3101
3521
|
type: z.ZodLiteral<"local">;
|
|
@@ -3104,10 +3524,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3104
3524
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3105
3525
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3106
3526
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3527
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3528
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3529
|
+
costPer1kTokens: z.ZodNumber;
|
|
3530
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3531
|
+
contextWindow: z.ZodNumber;
|
|
3532
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3533
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3534
|
+
}, "strict", z.ZodTypeAny, {
|
|
3535
|
+
tier: "fast" | "standard" | "strong";
|
|
3536
|
+
costPer1kTokens: number;
|
|
3537
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3538
|
+
contextWindow: number;
|
|
3539
|
+
vision?: boolean | undefined;
|
|
3540
|
+
toolUse?: boolean | undefined;
|
|
3541
|
+
}, {
|
|
3542
|
+
tier: "fast" | "standard" | "strong";
|
|
3543
|
+
costPer1kTokens: number;
|
|
3544
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3545
|
+
contextWindow: number;
|
|
3546
|
+
vision?: boolean | undefined;
|
|
3547
|
+
toolUse?: boolean | undefined;
|
|
3548
|
+
}>>;
|
|
3107
3549
|
}, "strict", z.ZodTypeAny, {
|
|
3108
3550
|
type: "local";
|
|
3109
3551
|
model: string | [string, ...string[]];
|
|
3110
3552
|
endpoint: string;
|
|
3553
|
+
capabilities?: {
|
|
3554
|
+
tier: "fast" | "standard" | "strong";
|
|
3555
|
+
costPer1kTokens: number;
|
|
3556
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3557
|
+
contextWindow: number;
|
|
3558
|
+
vision?: boolean | undefined;
|
|
3559
|
+
toolUse?: boolean | undefined;
|
|
3560
|
+
} | undefined;
|
|
3111
3561
|
apiKey?: string | undefined;
|
|
3112
3562
|
timeoutMs?: number | undefined;
|
|
3113
3563
|
probeIntervalMs?: number | undefined;
|
|
@@ -3115,6 +3565,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3115
3565
|
type: "local";
|
|
3116
3566
|
model: string | [string, ...string[]];
|
|
3117
3567
|
endpoint: string;
|
|
3568
|
+
capabilities?: {
|
|
3569
|
+
tier: "fast" | "standard" | "strong";
|
|
3570
|
+
costPer1kTokens: number;
|
|
3571
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3572
|
+
contextWindow: number;
|
|
3573
|
+
vision?: boolean | undefined;
|
|
3574
|
+
toolUse?: boolean | undefined;
|
|
3575
|
+
} | undefined;
|
|
3118
3576
|
apiKey?: string | undefined;
|
|
3119
3577
|
timeoutMs?: number | undefined;
|
|
3120
3578
|
probeIntervalMs?: number | undefined;
|
|
@@ -3125,10 +3583,40 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3125
3583
|
apiKey: z.ZodOptional<z.ZodString>;
|
|
3126
3584
|
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
3127
3585
|
probeIntervalMs: z.ZodOptional<z.ZodNumber>;
|
|
3586
|
+
capabilities: z.ZodOptional<z.ZodObject<{
|
|
3587
|
+
tier: z.ZodEnum<["fast", "standard", "strong"]>;
|
|
3588
|
+
costPer1kTokens: z.ZodNumber;
|
|
3589
|
+
privacyClass: z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>;
|
|
3590
|
+
contextWindow: z.ZodNumber;
|
|
3591
|
+
vision: z.ZodOptional<z.ZodBoolean>;
|
|
3592
|
+
toolUse: z.ZodOptional<z.ZodBoolean>;
|
|
3593
|
+
}, "strict", z.ZodTypeAny, {
|
|
3594
|
+
tier: "fast" | "standard" | "strong";
|
|
3595
|
+
costPer1kTokens: number;
|
|
3596
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3597
|
+
contextWindow: number;
|
|
3598
|
+
vision?: boolean | undefined;
|
|
3599
|
+
toolUse?: boolean | undefined;
|
|
3600
|
+
}, {
|
|
3601
|
+
tier: "fast" | "standard" | "strong";
|
|
3602
|
+
costPer1kTokens: number;
|
|
3603
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3604
|
+
contextWindow: number;
|
|
3605
|
+
vision?: boolean | undefined;
|
|
3606
|
+
toolUse?: boolean | undefined;
|
|
3607
|
+
}>>;
|
|
3128
3608
|
}, "strict", z.ZodTypeAny, {
|
|
3129
3609
|
type: "pi";
|
|
3130
3610
|
model: string | [string, ...string[]];
|
|
3131
3611
|
endpoint: string;
|
|
3612
|
+
capabilities?: {
|
|
3613
|
+
tier: "fast" | "standard" | "strong";
|
|
3614
|
+
costPer1kTokens: number;
|
|
3615
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3616
|
+
contextWindow: number;
|
|
3617
|
+
vision?: boolean | undefined;
|
|
3618
|
+
toolUse?: boolean | undefined;
|
|
3619
|
+
} | undefined;
|
|
3132
3620
|
apiKey?: string | undefined;
|
|
3133
3621
|
timeoutMs?: number | undefined;
|
|
3134
3622
|
probeIntervalMs?: number | undefined;
|
|
@@ -3136,6 +3624,14 @@ declare const BackendDefSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
3136
3624
|
type: "pi";
|
|
3137
3625
|
model: string | [string, ...string[]];
|
|
3138
3626
|
endpoint: string;
|
|
3627
|
+
capabilities?: {
|
|
3628
|
+
tier: "fast" | "standard" | "strong";
|
|
3629
|
+
costPer1kTokens: number;
|
|
3630
|
+
privacyClass: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud";
|
|
3631
|
+
contextWindow: number;
|
|
3632
|
+
vision?: boolean | undefined;
|
|
3633
|
+
toolUse?: boolean | undefined;
|
|
3634
|
+
} | undefined;
|
|
3139
3635
|
apiKey?: string | undefined;
|
|
3140
3636
|
timeoutMs?: number | undefined;
|
|
3141
3637
|
probeIntervalMs?: number | undefined;
|
|
@@ -3193,6 +3689,69 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3193
3689
|
}>>;
|
|
3194
3690
|
skills: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3195
3691
|
modes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodReadonly<z.ZodArray<z.ZodString, "atleastone">>]>>>;
|
|
3692
|
+
policy: z.ZodOptional<z.ZodObject<{
|
|
3693
|
+
complexityTierMatrix: z.ZodOptional<z.ZodRecord<z.ZodEnum<["trivial", "simple", "moderate", "complex"]>, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3694
|
+
skillTierOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["fast", "standard", "strong"]>>>;
|
|
3695
|
+
privacyFloor: z.ZodOptional<z.ZodEnum<["on-device", "pooled-isolated", "byo-endpoint", "shared-cloud"]>>;
|
|
3696
|
+
budget: z.ZodOptional<z.ZodObject<{
|
|
3697
|
+
capUsd: z.ZodNumber;
|
|
3698
|
+
degradeAtPct: z.ZodOptional<z.ZodNumber>;
|
|
3699
|
+
onBudgetExhausted: z.ZodEnum<["degrade", "pause", "human"]>;
|
|
3700
|
+
}, "strip", z.ZodTypeAny, {
|
|
3701
|
+
capUsd: number;
|
|
3702
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3703
|
+
degradeAtPct?: number | undefined;
|
|
3704
|
+
}, {
|
|
3705
|
+
capUsd: number;
|
|
3706
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3707
|
+
degradeAtPct?: number | undefined;
|
|
3708
|
+
}>>;
|
|
3709
|
+
sensitivePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3710
|
+
escalationThreshold: z.ZodOptional<z.ZodNumber>;
|
|
3711
|
+
allowedProviders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
3712
|
+
acceptanceEval: z.ZodOptional<z.ZodObject<{
|
|
3713
|
+
enabled: z.ZodBoolean;
|
|
3714
|
+
model: z.ZodOptional<z.ZodString>;
|
|
3715
|
+
}, "strip", z.ZodTypeAny, {
|
|
3716
|
+
enabled: boolean;
|
|
3717
|
+
model?: string | undefined;
|
|
3718
|
+
}, {
|
|
3719
|
+
enabled: boolean;
|
|
3720
|
+
model?: string | undefined;
|
|
3721
|
+
}>>;
|
|
3722
|
+
}, "strip", z.ZodTypeAny, {
|
|
3723
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3724
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3725
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3726
|
+
budget?: {
|
|
3727
|
+
capUsd: number;
|
|
3728
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3729
|
+
degradeAtPct?: number | undefined;
|
|
3730
|
+
} | undefined;
|
|
3731
|
+
sensitivePaths?: string[] | undefined;
|
|
3732
|
+
escalationThreshold?: number | undefined;
|
|
3733
|
+
allowedProviders?: string[] | undefined;
|
|
3734
|
+
acceptanceEval?: {
|
|
3735
|
+
enabled: boolean;
|
|
3736
|
+
model?: string | undefined;
|
|
3737
|
+
} | undefined;
|
|
3738
|
+
}, {
|
|
3739
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3740
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3741
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3742
|
+
budget?: {
|
|
3743
|
+
capUsd: number;
|
|
3744
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3745
|
+
degradeAtPct?: number | undefined;
|
|
3746
|
+
} | undefined;
|
|
3747
|
+
sensitivePaths?: string[] | undefined;
|
|
3748
|
+
escalationThreshold?: number | undefined;
|
|
3749
|
+
allowedProviders?: string[] | undefined;
|
|
3750
|
+
acceptanceEval?: {
|
|
3751
|
+
enabled: boolean;
|
|
3752
|
+
model?: string | undefined;
|
|
3753
|
+
} | undefined;
|
|
3754
|
+
}>>;
|
|
3196
3755
|
}, "strict", z.ZodTypeAny, {
|
|
3197
3756
|
default: string | readonly [string, ...string[]];
|
|
3198
3757
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3210,6 +3769,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3210
3769
|
} | undefined;
|
|
3211
3770
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3212
3771
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3772
|
+
policy?: {
|
|
3773
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3774
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3775
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3776
|
+
budget?: {
|
|
3777
|
+
capUsd: number;
|
|
3778
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3779
|
+
degradeAtPct?: number | undefined;
|
|
3780
|
+
} | undefined;
|
|
3781
|
+
sensitivePaths?: string[] | undefined;
|
|
3782
|
+
escalationThreshold?: number | undefined;
|
|
3783
|
+
allowedProviders?: string[] | undefined;
|
|
3784
|
+
acceptanceEval?: {
|
|
3785
|
+
enabled: boolean;
|
|
3786
|
+
model?: string | undefined;
|
|
3787
|
+
} | undefined;
|
|
3788
|
+
} | undefined;
|
|
3213
3789
|
}, {
|
|
3214
3790
|
default: string | readonly [string, ...string[]];
|
|
3215
3791
|
'quick-fix'?: string | readonly [string, ...string[]] | undefined;
|
|
@@ -3227,6 +3803,23 @@ declare const RoutingConfigSchema: z.ZodObject<{
|
|
|
3227
3803
|
} | undefined;
|
|
3228
3804
|
skills?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3229
3805
|
modes?: Record<string, string | readonly [string, ...string[]]> | undefined;
|
|
3806
|
+
policy?: {
|
|
3807
|
+
complexityTierMatrix?: Partial<Record<"trivial" | "simple" | "moderate" | "complex", "fast" | "standard" | "strong">> | undefined;
|
|
3808
|
+
skillTierOverrides?: Record<string, "fast" | "standard" | "strong"> | undefined;
|
|
3809
|
+
privacyFloor?: "on-device" | "pooled-isolated" | "byo-endpoint" | "shared-cloud" | undefined;
|
|
3810
|
+
budget?: {
|
|
3811
|
+
capUsd: number;
|
|
3812
|
+
onBudgetExhausted: "human" | "degrade" | "pause";
|
|
3813
|
+
degradeAtPct?: number | undefined;
|
|
3814
|
+
} | undefined;
|
|
3815
|
+
sensitivePaths?: string[] | undefined;
|
|
3816
|
+
escalationThreshold?: number | undefined;
|
|
3817
|
+
allowedProviders?: string[] | undefined;
|
|
3818
|
+
acceptanceEval?: {
|
|
3819
|
+
enabled: boolean;
|
|
3820
|
+
model?: string | undefined;
|
|
3821
|
+
} | undefined;
|
|
3822
|
+
} | undefined;
|
|
3230
3823
|
}>;
|
|
3231
3824
|
|
|
3232
3825
|
interface ResolverLogger {
|
|
@@ -4535,4 +5128,4 @@ declare function emitProposalCreated(bus: EventEmitter, proposal: SkillProposal)
|
|
|
4535
5128
|
declare function emitProposalApproved(bus: EventEmitter, proposal: SkillProposal): void;
|
|
4536
5129
|
declare function emitProposalRejected(bus: EventEmitter, proposal: SkillProposal): void;
|
|
4537
5130
|
|
|
4538
|
-
export { AdaptiveRouter, type AdaptiveRouterDeps, type AgentDispatchResult, type AgentDispatcher, type AgentDispatcherDeps, type AgentUpdateEvent, AnalysisArchive, type AnalysisRecord, type ApplyEventResult, type ArtifactPresence, type AttemptStats, BUILT_IN_TASKS, BackendDefSchema, type BackendResolver, BackendRouter, type BackendRouterOptions, type BaseRefFallbackEvent, type BuildArchiveHooksOptions, type BuildWorkflowContextDeps, type CheckCommandResult, type CheckCommandRunner, type CheckFailureClassification, type CheckFailureKind, CheckScriptRunner, ClaimManager, type ClaimManagerConfig, type CleanWorkspaceEffect, type CommandExecResult, type CommandExecutor, type CreateTokenInput, type CreateTokenResult, type CustomTaskValidationError, type DispatchEffect, type EmitLogEffect, type EscalateEffect, EscalationState, type ExecFileAsyncFn, type ExecFileError, type ExecFileFn$1 as ExecFileFn, type FromConfigOptions, GateNotReadyError, type GateResult, GateRunError, type HarnessSpawn, type Highlight, type HighlightsInfo, type IndexedDoc, InteractionQueue, LinearGraphQLClient, type LinearGraphQLClientOptions, type LinearGraphQLExtension, LinearGraphQLStub, type LiveSession, LocalModelResolver, type LocalModelResolverOptions, MAINTENANCE_CHECK_MAX_BUFFER, MAINTENANCE_CHECK_TIMEOUT_MS, MAX_ATTEMPTS, MaintenanceReporter, type MaintenanceReporterOptions, type MigrationResult, MockBackend, type NotificationSink, type NotificationSinkDeliverInput, ORCHESTRATOR_IDENTITY_FILE, Orchestrator, OrchestratorBackendFactory, type OrchestratorBackendFactoryOptions, type OrchestratorContext, type OrchestratorEvent, type OrchestratorState, PRDetector, type PRDetectorLogger, type PRLifecycleManager, type PendingInteraction, type PersistedOutputEntry, PrivacyNoMatch, PromotionError, type PromotionResult, PromptRenderer, type ProposalApprovedData, type ProposalCreatedData, type ProposalRejectedData, type PublishedIndex, type QueueInsertInput, type QueueRow, type QueueStats, RETRY_DELAYS_MS, type RateLimitSnapshot as RateLimitComputeSnapshot, type RateLimitConfig, type RateLimitSnapshot$1 as RateLimitSnapshot, type RegistryEntry, type ReleaseClaimEffect, type ResolverLogger, type RetryEntry, type RetryFiredEvent, RoadmapTrackerAdapter, RoutingConfigSchema, RoutingValueSchema, type RunAttemptPhase, type RunHarnessCheckOptions, type RunMode, type RunOrigin, type RunResult, type RunningEntry, type ScheduleRetryEffect, type SearchOptions, type SelectConstraints, type SideEffect, SinkConfigError, SinkRegistry, type SkillCatalogEntry, SlackSink, type SlackSinkOptions, SqliteSearchIndex, type StallDetectedEvent, type StopEffect, type StreamManifest, StreamRecorder, type SummarizeContext, type SummarizeResult, type SyncMainOptions, type SyncMainResult, type SyncSkipReason, type TaskDefinition, TaskOutputStore, TaskRunner, type TaskRunnerOptions, type TaskSelectionFilter, type TaskType, type TickEvent, TokenStore, type TokenTotals, type TriageConfig, type TriageDecision, type TriageSignals, type TriageSkill, type UpdateTokensEffect, type ValidateWorkflowConfigOptions, type ValidatedWorkflowConfig, WebhookQueue, type WorkerExitEvent, WorkflowLoader, type WorkflowRouterDep, WorkspaceHooks, WorkspaceManager, type WorkspaceManagerOptions, applyEvent, artifactPresenceFromIssue, buildArchiveHooks, buildCapabilityRegistry, buildWorkflowContext, calculateRetryDelay, canDispatch, classifyCheckExecutionFailure, computeRateLimitDelay, createAgentDispatcher, createBackend, createEmptyState, crossFieldRoutingIssues, defaultFetchModels, defaultPoolCapabilities, deriveSeedPaths, detectScopeTier, discoverSkillCatalog, discoverSkillCatalogNames, emitProposalApproved, emitProposalCreated, emitProposalRejected, estimateCost, explicitFindingsCount, extractHighlights, extractTitlePrefix, getAvailableSlots, getDefaultConfig, getPerStateCount, indexSessionDirectory, isCheckTimeoutError, isEligible, isSummaryEnabled, launchTUI, loadPublishedIndex, makeBackendResolver, migrateAgentConfig, normalizeFts5Query, normalizeHarnessCommand, normalizeLocalModel, openSearchIndex, promote, reconcile, recoverFindingsCount, reindexFromArchive, renderAnalysisComment, renderLlmSummaryMarkdown, renderPRComment, resolveEscalationConfig, resolveOrchestratorId, routeIssue, routingWarnings, runGate, runHarnessCheck, savePublishedIndex, searchIndexPath, selectCandidates, selectCheapestQualifying, selectTasks, sortCandidates, summarizeArchivedSession, syncMain, triageIssue, truncateForBudget, validateCustomTasks, validateWorkflowConfig, wireNotificationSinks, workflowFor, wrapAsEnvelope };
|
|
5131
|
+
export { AdaptiveRouter, type AdaptiveRouterDeps, type AgentDispatchResult, type AgentDispatcher, type AgentDispatcherDeps, type AgentUpdateEvent, AnalysisArchive, type AnalysisRecord, type ApplyEventResult, type ArtifactPresence, type AttemptStats, BRAINSTORM_RUBRIC, BUILT_IN_TASKS, BackendDefSchema, type BackendResolver, BackendRouter, type BackendRouterOptions, type BaseRefFallbackEvent, type BrainstormWiringDeps, type BuildArchiveHooksOptions, type BuildWorkflowContextDeps, type CheckCommandResult, type CheckCommandRunner, type CheckFailureClassification, type CheckFailureKind, CheckScriptRunner, ClaimManager, type ClaimManagerConfig, type CleanWorkspaceEffect, type CommandExecResult, type CommandExecutor, type CreateTokenInput, type CreateTokenResult, type CustomTaskValidationError, type DispatchEffect, type EmitLogEffect, type EscalateEffect, EscalationState, type ExecFileAsyncFn, type ExecFileError, type ExecFileFn$1 as ExecFileFn, type FromConfigOptions, GateNotReadyError, type GateResult, GateRunError, type HarnessSpawn, type Highlight, type HighlightsInfo, type IndexedDoc, InteractionQueue, LinearGraphQLClient, type LinearGraphQLClientOptions, type LinearGraphQLExtension, LinearGraphQLStub, type LiveSession, LocalModelResolver, type LocalModelResolverOptions, MAINTENANCE_CHECK_MAX_BUFFER, MAINTENANCE_CHECK_TIMEOUT_MS, MAX_ATTEMPTS, MaintenanceReporter, type MaintenanceReporterOptions, type MarkSkip, type MarkSkipReason, type MigrationResult, MockBackend, type NotificationSink, type NotificationSinkDeliverInput, ORCHESTRATOR_IDENTITY_FILE, Orchestrator, OrchestratorBackendFactory, type OrchestratorBackendFactoryOptions, type OrchestratorContext, type OrchestratorEvent, type OrchestratorState, PRDetector, type PRDetectorLogger, type PRLifecycleManager, type PendingInteraction, type PersistedOutputEntry, PrivacyNoMatch, PromotionError, type PromotionResult, PromptRenderer, type ProposalApprovedData, type ProposalCreatedData, type ProposalRejectedData, type PublishedIndex, type QueueInsertInput, type QueueRow, type QueueStats, RETRY_DELAYS_MS, type RateLimitSnapshot as RateLimitComputeSnapshot, type RateLimitConfig, type RateLimitSnapshot$1 as RateLimitSnapshot, type RecordPrediction, type RegistryEntry, type ReleaseClaimEffect, type ResolverLogger, type RetryEntry, type RetryFiredEvent, RoadmapTrackerAdapter, RoutingConfigSchema, RoutingValueSchema, type RunAttemptPhase, type RunHarnessCheckOptions, type RunMode, type RunOrigin, type RunResult, type RunningEntry, type ScheduleRetryEffect, type SearchOptions, type SelForkGeneratorOptions, type SelectConstraints, type SideEffect, SinkConfigError, SinkRegistry, type SkillCatalogEntry, SlackSink, type SlackSinkOptions, SqliteSearchIndex, type StallDetectedEvent, type StopEffect, type StoredOutcomeRecord, type StreamManifest, StreamRecorder, type SummarizeContext, type SummarizeResult, type SyncMainOptions, type SyncMainResult, type SyncSkipReason, type TaskDefinition, TaskOutputStore, TaskRunner, type TaskRunnerOptions, type TaskSelectionFilter, type TaskType, type TickEvent, TokenStore, type TokenTotals, type TriageConfig, type TriageDecision, type TriageMarkConfig, type TriageMarkDeps, type TriageMarkItem, type TriageMarkResult, type TriageSignals, type TriageSkill, type TriageWiringDeps, type UpdateTokensEffect, type ValidateWorkflowConfigOptions, type ValidatedWorkflowConfig, WebhookQueue, type WiredBrainstormResult, type WorkerExitEvent, WorkflowLoader, type WorkflowRouterDep, WorkspaceHooks, WorkspaceManager, type WorkspaceManagerOptions, applyEvent, artifactPresenceFromIssue, brainstormInputFromIssue, buildArchiveHooks, buildCapabilityRegistry, buildProbeInput, buildWorkflowContext, calculateRetryDelay, canDispatch, classifyCheckExecutionFailure, computeRateLimitDelay, createAgentDispatcher, createBackend, createEmptyState, crossFieldRoutingIssues, defaultFetchModels, defaultPoolCapabilities, deriveSeedPaths, detectScopeTier, discoverSkillCatalog, discoverSkillCatalogNames, emitProposalApproved, emitProposalCreated, emitProposalRejected, enrichIssueWithSpec, estimateCost, explicitFindingsCount, extractHighlights, extractTitlePrefix, getAvailableSlots, getDefaultConfig, getPerStateCount, indexSessionDirectory, isCheckTimeoutError, isEligible, isSummaryEnabled, launchTUI, loadPublishedIndex, makeBackendResolver, makeGraphScope, makeSelForkGenerator, markApprovedForDispatch, migrateAgentConfig, normalizeFts5Query, normalizeHarnessCommand, normalizeLocalModel, openSearchIndex, precedentLookupFromStored, promote, reconcile, recoverFindingsCount, reindexFromArchive, renderAnalysisComment, renderLlmSummaryMarkdown, renderPRComment, renderSpecMarkdown, resolveEscalationConfig, resolveOrchestratorId, routeIssue, routingWarnings, runBrainstormForIssue, runGate, runHarnessCheck, savePublishedIndex, searchIndexPath, selectCandidates, selectCheapestQualifying, selectTasks, slugFor, sortCandidates, summarizeArchivedSession, syncMain, triageIssue, truncateForBudget, validateCustomTasks, validateWorkflowConfig, wireNotificationSinks, workflowFor, wrapAsEnvelope };
|