@rulvar/core 1.71.0 → 1.73.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +256 -1
  2. package/dist/index.js +657 -166
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -4405,6 +4405,18 @@ interface RunAgentOptions<S extends SchemaSpec = JsonSchema> {
4405
4405
  ok: false;
4406
4406
  feedback: Record<string, unknown>;
4407
4407
  }>;
4408
+ /**
4409
+ * The repair reserve (the v1.71 experiment review, P0.4): max EXTRA
4410
+ * turns the loop may grant past limits.maxTurns, one per rejected
4411
+ * terminal-tool exchange, schema-invalid arguments and host
4412
+ * validation rejections alike. The grant count derives from the
4413
+ * message window itself (error tool results named after the
4414
+ * terminal tool, clamped to the reserve), so a resumed segment that
4415
+ * restored the window mid-exchange re-derives the same grants and
4416
+ * nothing needs journaling. Zero (or absent) keeps the ceiling
4417
+ * byte identical to the pre 1.73 loop.
4418
+ */
4419
+ repairTurnReserve?: number;
4408
4420
  };
4409
4421
  agentType?: string;
4410
4422
  /** The primary invocation role of the tool loop; default 'loop' (M6-T05; RV-211 adds synthesize). */
@@ -6265,6 +6277,19 @@ declare function requiredFieldsValidator(options: {
6265
6277
  fields: string[];
6266
6278
  name?: string;
6267
6279
  }): FinishValidator;
6280
+ /**
6281
+ * Requires the result text's word count (whitespace separated tokens;
6282
+ * an empty text counts zero) to sit inside the configured bounds (the
6283
+ * v1.71 experiment review, P0.7: a formal length requirement must be
6284
+ * code, never a natural-language plea the model may round away). At
6285
+ * least one bound is required; both are positive integers with
6286
+ * min <= max. Default name 'word-count'.
6287
+ */
6288
+ declare function wordCountValidator(options: {
6289
+ min?: number;
6290
+ max?: number;
6291
+ name?: string;
6292
+ }): FinishValidator;
6268
6293
  /** The default citation shape: a path with an extension, a colon, a line number. */
6269
6294
  declare const DEFAULT_CITATION_PATTERN = "[\\w./-]+\\.\\w+:\\d+";
6270
6295
  /** The default preserved share, the improvement plan's RV-202 gate. */
@@ -6294,6 +6319,24 @@ declare function evidencePreservedValidator(options?: {
6294
6319
  name?: string;
6295
6320
  }): FinishValidator;
6296
6321
  /**
6322
+ * Requires at least `min` matches of `pattern` INSIDE every named
6323
+ * section (the v1.71 experiment review, P1.2: a total citation count
6324
+ * hides sections carrying zero provenance). A section's slice runs
6325
+ * from its FIRST occurrence to the next found section marker in text
6326
+ * position order, or to the end of the text; a marker absent from the
6327
+ * text is its own failure reason, because coverage of a missing
6328
+ * section cannot silently count as satisfied.
6329
+ * requiredSectionsValidator still owns plain presence. Default name
6330
+ * 'section-citations'.
6331
+ */
6332
+ declare function sectionCitationsValidator(options: {
6333
+ sections: string[];
6334
+ pattern?: string;
6335
+ flags?: string;
6336
+ min: number;
6337
+ name?: string;
6338
+ }): FinishValidator;
6339
+ /**
6297
6340
  * Requires at least `min` matches of `pattern` in the result text (the
6298
6341
  * plan's citation and source count checks: a file:line pattern, a URL
6299
6342
  * pattern). The pattern compiles at construction (invalid patterns are a
@@ -6308,6 +6351,113 @@ declare function minMatchesValidator(options: {
6308
6351
  name?: string;
6309
6352
  }): FinishValidator;
6310
6353
  //#endregion
6354
+ //#region src/orchestrator/output-contract.d.ts
6355
+ /** The golden citation sample used with {@link DEFAULT_CITATION_PATTERN}. */
6356
+ declare const DEFAULT_CITATION_SAMPLE = "docs/output-contract.md:1";
6357
+ /** The citation demands of a {@link FinishContractManifest}. */
6358
+ interface FinishContractCitations {
6359
+ /** Regex source over the result text; default {@link DEFAULT_CITATION_PATTERN}. */
6360
+ pattern?: string;
6361
+ flags?: string;
6362
+ /** Total matches required across the whole result text. */
6363
+ min?: number;
6364
+ /** Matches required inside EVERY declared section; requires `sections`. */
6365
+ perSection?: number;
6366
+ /**
6367
+ * A literal string matching `pattern`, embedded in the golden
6368
+ * fixtures (a regex cannot be sampled mechanically). REQUIRED with a
6369
+ * custom pattern; defaults to {@link DEFAULT_CITATION_SAMPLE} for
6370
+ * the default pattern. Must contain no whitespace and no declared
6371
+ * section marker.
6372
+ */
6373
+ sample?: string;
6374
+ }
6375
+ /**
6376
+ * The single source of truth of a textual finish contract: what the
6377
+ * prompt promises IS what the validators enforce. Declare only textual
6378
+ * demands here (sections, length, citations); an object-shaped result
6379
+ * belongs to {@link requiredSectionsValidator}'s sibling
6380
+ * requiredFieldsValidator and a host-provided selfTest accept fixture.
6381
+ */
6382
+ interface FinishContractManifest {
6383
+ /** Literal section markers the result must contain. */
6384
+ sections?: string[];
6385
+ /** Word bounds over the result text (whitespace separated tokens). */
6386
+ words?: {
6387
+ min?: number;
6388
+ max?: number;
6389
+ };
6390
+ /** Citation demands over the result text. */
6391
+ citations?: FinishContractCitations;
6392
+ }
6393
+ /** What {@link finishContract} builds from a manifest. */
6394
+ interface FinishContract {
6395
+ /** The normalized manifest (defaults applied), frozen. */
6396
+ readonly manifest: FinishContractManifest;
6397
+ /** sha256 hex over the JCS serialization of the normalized manifest. */
6398
+ readonly hash: string;
6399
+ /** The stock validators enforcing the manifest; names are 'contract-*'. */
6400
+ readonly validators: FinishValidator[];
6401
+ /** The contract statement for the model, one demand per line. */
6402
+ readonly promptLines: readonly string[];
6403
+ /** A generated fixture every contract validator accepts. */
6404
+ readonly goldenAccept: FinishValidationInput;
6405
+ /**
6406
+ * A generated fixture at least one contract validator rejects.
6407
+ * Absent when the manifest carries only upper bounds, because an
6408
+ * empty result is then legitimately acceptable.
6409
+ */
6410
+ readonly goldenReject?: FinishValidationInput;
6411
+ }
6412
+ /**
6413
+ * Builds a {@link FinishContract} from one manifest: validation and the
6414
+ * golden fixtures happen HERE, at configuration time, so a
6415
+ * self-contradictory contract (mandatory content alone above words.max,
6416
+ * an unsampled custom pattern) fails before any run exists. Spread
6417
+ * `contract.validators` into finishValidation.validators and pass the
6418
+ * contract itself as finishValidation.contract; the orchestrator then
6419
+ * injects `promptLines` into the coordination and synthesis prompts,
6420
+ * runs the golden self test at construction, and journals the frozen
6421
+ * bundle descriptor.
6422
+ */
6423
+ declare function finishContract(manifest: FinishContractManifest): FinishContract;
6424
+ /** Golden fixtures of the construction self test. */
6425
+ interface FinishSelfTestFixtures {
6426
+ /** Every configured validator must accept this input. */
6427
+ accept?: FinishValidationInput;
6428
+ /** At least one configured validator must reject this input. */
6429
+ reject?: FinishValidationInput;
6430
+ }
6431
+ /** One self test failure. */
6432
+ interface FinishSelfTestFailure {
6433
+ fixture: "accept" | "reject";
6434
+ /** The rejecting validator on the accept side; absent on the vacuous reject side. */
6435
+ validator?: string;
6436
+ reasons: string[];
6437
+ }
6438
+ /** The self test verdict over one validator set. */
6439
+ interface FinishSelfTestReport {
6440
+ ok: boolean;
6441
+ failures: FinishSelfTestFailure[];
6442
+ }
6443
+ /**
6444
+ * Runs a configured validator set against golden fixtures BEFORE any
6445
+ * provider call exists (the v1.71 experiment review, P0.3): the accept
6446
+ * fixture must pass every validator (a stale validator rejecting a
6447
+ * correct skeleton is exactly the drift the experiment died of, three
6448
+ * renamed sections deep into a paid run), and the reject fixture must
6449
+ * fail at least one (a set that accepts the known-bad input validates
6450
+ * nothing). A validator that THROWS here is a host defect and the
6451
+ * ConfigError propagates, the same posture the live loop takes.
6452
+ * Deterministic and free: validators are pure synchronous host code by
6453
+ * contract, so this costs zero provider calls.
6454
+ */
6455
+ declare function selfTestFinishValidation(options: {
6456
+ validators: FinishValidator[];
6457
+ accept?: FinishValidationInput;
6458
+ reject?: FinishValidationInput;
6459
+ }): FinishSelfTestReport;
6460
+ //#endregion
6311
6461
  //#region src/orchestrator/handles.d.ts
6312
6462
  /** The per-child digest handed to the orchestrator. */
6313
6463
  interface TaskDigest {
@@ -6899,6 +7049,49 @@ interface FinishValidationSpec {
6899
7049
  * finish fails the run.
6900
7050
  */
6901
7051
  maxRepairs?: number;
7052
+ /**
7053
+ * The repair turn reserve (the v1.71 experiment review, P0.4; the
7054
+ * reserve RV-204 deliberately deferred). A nonnegative integer,
7055
+ * default 0: max EXTRA turns the invocation the validators bind (the
7056
+ * synthesis invocation when `synthesis` is configured, the
7057
+ * coordination loop otherwise) may consume past its `maxTurns`, one
7058
+ * granted per rejected finish exchange, schema-invalid finish
7059
+ * arguments and host validation rejections alike. Without it, repair
7060
+ * exchanges and generation compete for the same turn budget: the
7061
+ * v1.71 experiment lost its whole run to one malformed finish plus
7062
+ * one validator rejection inside maxTurns 3. The reserve is bounded,
7063
+ * spends from the ordinary budget ceilings (a granted turn is a paid
7064
+ * provider turn), and folds into the preflight turn projection
7065
+ * (`projectedProviderTurns` and the run ceiling) when declared
7066
+ * there. Zero keeps the pre 1.73 ceiling byte identical.
7067
+ */
7068
+ repairTurnReserve?: number;
7069
+ /**
7070
+ * The unified output contract this validator set enforces (the v1.71
7071
+ * experiment review, P0.1/P0.2). Construction then runs the golden
7072
+ * self test with the contract's fixtures as defaults, the contract's
7073
+ * promptLines join the validator statement in BOTH the coordination
7074
+ * and synthesis prompts, every contract validator must appear in
7075
+ * `validators` by name (a promised contract nobody enforces is drift
7076
+ * by omission, a ConfigError), and the run journals ONE frozen
7077
+ * bundle descriptor (decisionType
7078
+ * 'orchestrator_finish_validation_bundle') recording the contract
7079
+ * hash and the validator names. A resumed segment whose live
7080
+ * contract hash differs appends a SUPERSEDING descriptor instead of
7081
+ * failing, because fixing a stale validator and resuming is the
7082
+ * intended remedy, never a fault. Absent = byte identical pre 1.72
7083
+ * behavior.
7084
+ */
7085
+ contract?: FinishContract;
7086
+ /**
7087
+ * Golden fixtures of the construction self test (the v1.71
7088
+ * experiment review, P0.3), overriding the contract's generated
7089
+ * fixtures: a host with custom validators supplies an accept fixture
7090
+ * those validators actually accept. Fixtures without a contract run
7091
+ * the self test on their own. Absent with no contract = no self
7092
+ * test, the pre 1.72 behavior.
7093
+ */
7094
+ selfTest?: FinishSelfTestFixtures;
6902
7095
  }
6903
7096
  interface OrchestrateOptions {
6904
7097
  model?: ModelSpec;
@@ -8585,6 +8778,23 @@ interface PreflightOrchestratorSpec {
8585
8778
  * root, so only they subtract it from spawn-admission headroom.
8586
8779
  */
8587
8780
  extension?: boolean;
8781
+ /**
8782
+ * The separate synthesis invocation (RV-211), when the orchestration
8783
+ * configures one (the v1.71 experiment review: the run ceiling used
8784
+ * to stop at the coordination loop, undercounting the synthesis
8785
+ * turns). `limits` mirrors OrchestrateSynthesis.limits exactly
8786
+ * (absent = the DEFAULT_SYNTHESIS_MAX_TURNS invocation), `model`
8787
+ * mirrors its model override (absent = defaults.routing.synthesize),
8788
+ * and `estInputTokens` is the prompt-size stand-in for the derived
8789
+ * synthesis prompt. When `finishValidation.repairTurnReserve` is
8790
+ * declared, the reserve folds into THIS invocation's projected turns,
8791
+ * because the validators bind the synthesis finish.
8792
+ */
8793
+ synthesis?: {
8794
+ model?: ModelSpec;
8795
+ limits?: UsageLimits;
8796
+ estInputTokens?: number;
8797
+ };
8588
8798
  }
8589
8799
  /** The full input: engine surface, run surface, and the declared wave. */
8590
8800
  interface PreflightInput {
@@ -8603,6 +8813,29 @@ interface PreflightInput {
8603
8813
  * demand comparison needs them declared here.
8604
8814
  */
8605
8815
  quotaRules?: readonly QuotaRule[];
8816
+ /**
8817
+ * The opt in finish validation self test (the v1.71 experiment
8818
+ * review, P1.1). Programmatic only: validator functions cannot ride
8819
+ * a JSON config file, so the CLI never carries this. When present,
8820
+ * preflight runs the SAME golden self test orchestrate runs at
8821
+ * construction and reports every drift as an error finding (code
8822
+ * 'output-contract-validator-mismatch') instead of throwing, so a
8823
+ * planner surfaces it next to the quota and budget findings.
8824
+ */
8825
+ finishValidation?: {
8826
+ validators: FinishValidator[];
8827
+ contract?: FinishContract;
8828
+ selfTest?: FinishSelfTestFixtures;
8829
+ /**
8830
+ * Mirrors FinishValidationSpec.repairTurnReserve: folds the
8831
+ * declared repair headroom into the projected turns of the
8832
+ * invocation the validators bind (the synthesis invocation when
8833
+ * orchestrator.synthesis is declared, the coordination loop
8834
+ * otherwise), so the run ceiling prices the repair exchange the
8835
+ * runtime would actually grant.
8836
+ */
8837
+ repairTurnReserve?: number;
8838
+ };
8606
8839
  }
8607
8840
  /** One linter verdict; `spawn` names the wave entry it is about. */
8608
8841
  interface PreflightFinding {
@@ -8683,6 +8916,16 @@ interface PreflightReport {
8683
8916
  finalizeTurns: number; /** Whether the finalize reserve is committed against the run root (extension runs). */
8684
8917
  reserveCommitted: boolean; /** The orchestrator agent's own loop ceiling, derived exactly like a spawn's. */
8685
8918
  projectedProviderTurns: number;
8919
+ /**
8920
+ * The separate synthesis invocation's projection, present when
8921
+ * input.orchestrator.synthesis was declared and the role
8922
+ * resolves: its turn ceiling (the repair turn reserve folded in
8923
+ * when declared) and its serving model.
8924
+ */
8925
+ synthesis?: {
8926
+ projectedProviderTurns: number;
8927
+ servedBy?: ModelRef;
8928
+ };
8686
8929
  };
8687
8930
  };
8688
8931
  quota: {
@@ -8728,6 +8971,18 @@ interface PreflightReport {
8728
8971
  tokens: number;
8729
8972
  };
8730
8973
  };
8974
+ /**
8975
+ * Present when input.finishValidation was provided: the self test
8976
+ * echo. `selfTest` reflects the golden fixture run alone
8977
+ * ('skipped' = no fixture resolvable); containment drift between a
8978
+ * contract and the validator set reports through findings either
8979
+ * way.
8980
+ */
8981
+ finishValidation?: {
8982
+ contractHash?: string;
8983
+ validators: string[];
8984
+ selfTest: "passed" | "failed" | "skipped";
8985
+ };
8731
8986
  findings: PreflightFinding[];
8732
8987
  }
8733
8988
  /**
@@ -9241,4 +9496,4 @@ interface SandboxBridge {
9241
9496
  declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
9242
9497
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
9243
9498
  //#endregion
9244
- export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceExport, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, type PhaseRow, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, StructuredOutputTier, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
9499
+ export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishContract, FinishContractCitations, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceExport, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, type PhaseRow, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, ReconcileOptions, ReconcileResult, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StepIdentityInput, StructuredOutputTier, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, finishContract, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, preflightEstimate, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reduceAuditTrail, reduceCriticalPath, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };