@rulvar/core 1.77.0 → 1.79.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 +179 -18
  2. package/dist/index.js +302 -56
  3. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3476,6 +3476,16 @@ type CoreEvents = {
3476
3476
  * nonnegative integers. Absent otherwise.
3477
3477
  */
3478
3478
  childStatusCounts?: Record<string, number>;
3479
+ /**
3480
+ * Per-child degradation notes, lifted from the same envelope (or
3481
+ * typed error data) when it carries a valid string array (the
3482
+ * fifth experiment, cycle 75). An empty array is the workflow's
3483
+ * claim of zero degradation; absence means no claim. The outcome
3484
+ * mirror spreads the SAME lift, so the surfaces cannot disagree.
3485
+ */
3486
+ degradedReasons?: string[]; /** Children accepted by acceptPartialChildren; same lift. */
3487
+ salvagedPartialChildren?: string[]; /** Children accepted through validated terminal output salvage on 'limit'; same lift. */
3488
+ salvagedTerminalOutputChildren?: string[];
3479
3489
  } | {
3480
3490
  type: "phase:start";
3481
3491
  phase: string;
@@ -5682,7 +5692,23 @@ type RunOutcome<R> = {
5682
5692
  * nonnegative integers; the mirror of the `run:end` field. Absent
5683
5693
  * otherwise.
5684
5694
  */
5685
- childStatusCounts?: Record<string, number>; /** Pipeline drops and onError:'null' losses; silent losses are forbidden. */
5695
+ childStatusCounts?: Record<string, number>;
5696
+ /**
5697
+ * Per-child degradation notes, lifted from the same envelope (or
5698
+ * typed error data) when it carries a valid string array (the fifth
5699
+ * experiment, cycle 75): the facts the orchestrator acceptance path
5700
+ * has always emitted beside completion, now on the outcome itself so
5701
+ * a host stops digging error.data on the rejected path. An empty
5702
+ * array is the workflow's claim of zero degradation; absence means no
5703
+ * claim was made.
5704
+ */
5705
+ degradedReasons?: string[]; /** Children accepted by acceptPartialChildren; same lift and posture. */
5706
+ salvagedPartialChildren?: string[];
5707
+ /**
5708
+ * Children accepted through validated terminal output salvage on
5709
+ * 'limit'; same lift and posture.
5710
+ */
5711
+ salvagedTerminalOutputChildren?: string[]; /** Pipeline drops and onError:'null' losses; silent losses are forbidden. */
5686
5712
  dropped: DroppedItem[]; /** Suspensions open at settle time (M2). */
5687
5713
  pending: PendingExternal[];
5688
5714
  usage: Usage;
@@ -6327,13 +6353,47 @@ interface FinishValidator {
6327
6353
  validate(input: FinishValidationInput): FinishValidationVerdict;
6328
6354
  }
6329
6355
  /**
6356
+ * How section markers must appear in the judged text (cycle 74):
6357
+ * 'anywhere' is the historical substring test; 'line' demands the
6358
+ * marker as its own line (surrounding whitespace ignored), so a
6359
+ * mid sentence mention or a quoted marker no longer satisfies a
6360
+ * heading requirement.
6361
+ */
6362
+ type SectionMatchMode = "anywhere" | "line";
6363
+ /**
6364
+ * Whether fenced code participates in textual validation (cycle 74):
6365
+ * 'counted' is the historical behavior; 'excluded' removes fenced code
6366
+ * blocks (see {@link stripFencedBlocks}) before matching, counting, or
6367
+ * slicing, so code samples can neither satisfy a section marker nor
6368
+ * inflate word and citation counts.
6369
+ */
6370
+ type FencedCodeMode = "counted" | "excluded";
6371
+ /**
6372
+ * Removes fenced code blocks from a text, the delimiter lines
6373
+ * included, and returns the remaining lines joined by newlines. The
6374
+ * grammar is the CommonMark shape as a deliberate line heuristic: a
6375
+ * fence opens at a line starting (after at most three spaces) with
6376
+ * three or more backticks or tildes, an optional info string allowed;
6377
+ * it closes at the next line carrying only at least as many of the
6378
+ * SAME character; an unclosed fence runs to the end of the text.
6379
+ * Indented (four space) code blocks are not treated as code. This is
6380
+ * the exact exclusion the `fencedCode: 'excluded'` validator option
6381
+ * applies, exported so custom host validators can stay symmetric.
6382
+ */
6383
+ declare function stripFencedBlocks(text: string): string;
6384
+ /**
6330
6385
  * Requires every named section to appear LITERALLY in the result text
6331
6386
  * (a heading like 'FINDINGS' or any marker the goal demands). Default
6332
6387
  * name 'required-sections'; pass `name` to run several instances.
6388
+ * `match: 'line'` demands each marker as its own line and
6389
+ * `fencedCode: 'excluded'` ignores markers inside fenced code blocks
6390
+ * (cycle 74); both default to the historical byte identical behavior.
6333
6391
  */
6334
6392
  declare function requiredSectionsValidator(options: {
6335
- sections: string[];
6393
+ sections: readonly string[];
6336
6394
  name?: string;
6395
+ match?: SectionMatchMode;
6396
+ fencedCode?: FencedCodeMode;
6337
6397
  }): FinishValidator;
6338
6398
  /**
6339
6399
  * Requires the result to be a JSON object carrying every named field
@@ -6343,7 +6403,7 @@ declare function requiredSectionsValidator(options: {
6343
6403
  * validator). Default name 'required-fields'.
6344
6404
  */
6345
6405
  declare function requiredFieldsValidator(options: {
6346
- fields: string[];
6406
+ fields: readonly string[];
6347
6407
  name?: string;
6348
6408
  }): FinishValidator;
6349
6409
  /**
@@ -6352,12 +6412,16 @@ declare function requiredFieldsValidator(options: {
6352
6412
  * v1.71 experiment review, P0.7: a formal length requirement must be
6353
6413
  * code, never a natural-language plea the model may round away). At
6354
6414
  * least one bound is required; both are positive integers with
6355
- * min <= max. Default name 'word-count'.
6415
+ * min <= max. Default name 'word-count'. `fencedCode: 'excluded'`
6416
+ * counts only words outside fenced code blocks (cycle 74), so code
6417
+ * samples cannot pad a length requirement; the default counts
6418
+ * everything, byte identical to the historical behavior.
6356
6419
  */
6357
6420
  declare function wordCountValidator(options: {
6358
6421
  min?: number;
6359
6422
  max?: number;
6360
6423
  name?: string;
6424
+ fencedCode?: FencedCodeMode;
6361
6425
  }): FinishValidator;
6362
6426
  /** The default citation shape: a path with an extension, a colon, a line number. */
6363
6427
  declare const DEFAULT_CITATION_PATTERN = "[\\w./-]+\\.\\w+:\\d+";
@@ -6396,14 +6460,20 @@ declare function evidencePreservedValidator(options?: {
6396
6460
  * text is its own failure reason, because coverage of a missing
6397
6461
  * section cannot silently count as satisfied.
6398
6462
  * requiredSectionsValidator still owns plain presence. Default name
6399
- * 'section-citations'.
6463
+ * 'section-citations'. `match: 'line'` anchors each section at the
6464
+ * first line equal to its marker and `fencedCode: 'excluded'` removes
6465
+ * fenced code before anchoring, slicing, and counting (cycle 74), so a
6466
+ * marker echoed inside a code sample can neither anchor a slice nor
6467
+ * donate citations; both default to the historical behavior.
6400
6468
  */
6401
6469
  declare function sectionCitationsValidator(options: {
6402
- sections: string[];
6470
+ sections: readonly string[];
6403
6471
  pattern?: string;
6404
6472
  flags?: string;
6405
6473
  min: number;
6406
6474
  name?: string;
6475
+ match?: SectionMatchMode;
6476
+ fencedCode?: FencedCodeMode;
6407
6477
  }): FinishValidator;
6408
6478
  /**
6409
6479
  * Requires at least `min` matches of `pattern` in the result text (the
@@ -6412,12 +6482,17 @@ declare function sectionCitationsValidator(options: {
6412
6482
  * ConfigError before any run exists) and matches globally; `min` is a
6413
6483
  * positive integer. Default name 'min-matches'; pass `name` to run
6414
6484
  * several instances, because names must be unique per orchestrate call.
6485
+ * `fencedCode: 'excluded'` matches only outside fenced code blocks
6486
+ * (cycle 74), so citations quoted inside code samples do not count;
6487
+ * the default matches everything, byte identical to the historical
6488
+ * behavior.
6415
6489
  */
6416
6490
  declare function minMatchesValidator(options: {
6417
6491
  pattern: string;
6418
6492
  flags?: string;
6419
6493
  min: number;
6420
6494
  name?: string;
6495
+ fencedCode?: FencedCodeMode;
6421
6496
  }): FinishValidator;
6422
6497
  //#endregion
6423
6498
  //#region src/orchestrator/output-contract.d.ts
@@ -6451,6 +6526,16 @@ interface FinishContractCitations {
6451
6526
  interface FinishContractManifest {
6452
6527
  /** Literal section markers the result must contain. */
6453
6528
  sections?: string[];
6529
+ /**
6530
+ * How section markers must appear (cycle 74): 'anywhere' (the
6531
+ * default, a plain substring test) or 'line' (each marker must
6532
+ * stand as its own line, surrounding whitespace ignored, so a mid
6533
+ * sentence mention no longer satisfies a heading). Requires
6534
+ * `sections`. Joins the hash and the prompt statement only when
6535
+ * 'line'; an explicit 'anywhere' normalizes away, keeping the hash
6536
+ * of the plain manifest.
6537
+ */
6538
+ sectionsMatch?: SectionMatchMode;
6454
6539
  /** Word bounds over the result text (whitespace separated tokens). */
6455
6540
  words?: {
6456
6541
  min?: number;
@@ -6458,14 +6543,52 @@ interface FinishContractManifest {
6458
6543
  };
6459
6544
  /** Citation demands over the result text. */
6460
6545
  citations?: FinishContractCitations;
6546
+ /**
6547
+ * Whether fenced code blocks count (cycle 74): 'counted' (the
6548
+ * default) or 'excluded' (fenced code is removed before section
6549
+ * matching, slicing, word counting, and citation matching, so code
6550
+ * samples can neither satisfy a marker nor pad a count). Joins the
6551
+ * hash and adds a prompt statement only when 'excluded'; an explicit
6552
+ * 'counted' normalizes away. With 'excluded', a section marker or a
6553
+ * citation sample that would itself OPEN a fence is a ConfigError,
6554
+ * because the golden fixtures embed both at line starts.
6555
+ */
6556
+ fencedCode?: FencedCodeMode;
6557
+ }
6558
+ /**
6559
+ * One per validator reject golden (cycle 74): a fixture the NAMED
6560
+ * contract validator is proven to reject at construction time.
6561
+ * {@link selfTestFinishValidation} holds the CONFIGURED validator of
6562
+ * that name against it, so a same-name replacement weaker than the
6563
+ * contract's own validator (a words minimum of one standing in for
6564
+ * three thousand) is caught before any provider call instead of
6565
+ * silently accepting what the journaled contract hash forbids.
6566
+ */
6567
+ interface FinishContractGoldenReject {
6568
+ /** The contract validator this fixture targets, by name. */
6569
+ readonly validator: string;
6570
+ /** The fixture that validator must reject. */
6571
+ readonly input: FinishValidationInput;
6461
6572
  }
6462
- /** What {@link finishContract} builds from a manifest. */
6573
+ /**
6574
+ * What {@link finishContract} builds from a manifest. The whole bundle
6575
+ * is DEEPLY frozen (cycle 74): the nested manifest objects, the
6576
+ * sections array, the validators array, and each validator object, so
6577
+ * a post construction mutation throws instead of silently diverging
6578
+ * behavior from the journaled contract hash.
6579
+ */
6463
6580
  interface FinishContract {
6464
- /** The normalized manifest (defaults applied), frozen. */
6581
+ /** The normalized manifest (defaults applied), deeply frozen. */
6465
6582
  readonly manifest: FinishContractManifest;
6466
6583
  /** sha256 hex over the JCS serialization of the normalized manifest. */
6467
6584
  readonly hash: string;
6468
- /** The stock validators enforcing the manifest; names are 'contract-*'. */
6585
+ /**
6586
+ * The stock validators enforcing the manifest; names are
6587
+ * 'contract-*'. The array and each validator object are frozen at
6588
+ * runtime (the type stays mutable for source compatibility), so an
6589
+ * in-place pop or a validate() swap throws instead of silently
6590
+ * weakening what the hash promises.
6591
+ */
6469
6592
  readonly validators: FinishValidator[];
6470
6593
  /** The contract statement for the model, one demand per line. */
6471
6594
  readonly promptLines: readonly string[];
@@ -6477,6 +6600,13 @@ interface FinishContract {
6477
6600
  * empty result is then legitimately acceptable.
6478
6601
  */
6479
6602
  readonly goldenReject?: FinishValidationInput;
6603
+ /**
6604
+ * One reject golden PER contract validator (cycle 74), in validator
6605
+ * order, each verified at construction; boundary sharp where a
6606
+ * boundary is mechanically safe (the words fixture sits exactly one
6607
+ * word outside the bound), the empty text otherwise.
6608
+ */
6609
+ readonly goldenRejects: readonly FinishContractGoldenReject[];
6480
6610
  }
6481
6611
  /**
6482
6612
  * Builds a {@link FinishContract} from one manifest: validation and the
@@ -6500,7 +6630,11 @@ interface FinishSelfTestFixtures {
6500
6630
  /** One self test failure. */
6501
6631
  interface FinishSelfTestFailure {
6502
6632
  fixture: "accept" | "reject";
6503
- /** The rejecting validator on the accept side; absent on the vacuous reject side. */
6633
+ /**
6634
+ * The failing validator: the rejecting one on the accept side, the
6635
+ * named one on a per validator reject golden (cycle 74); absent
6636
+ * only on the vacuous single-fixture reject side.
6637
+ */
6504
6638
  validator?: string;
6505
6639
  reasons: string[];
6506
6640
  }
@@ -6519,12 +6653,18 @@ interface FinishSelfTestReport {
6519
6653
  * nothing). A validator that THROWS here is a host defect and the
6520
6654
  * ConfigError propagates, the same posture the live loop takes.
6521
6655
  * Deterministic and free: validators are pure synchronous host code by
6522
- * contract, so this costs zero provider calls.
6656
+ * contract, so this costs zero provider calls. `rejects` (cycle 74)
6657
+ * carries the contract's per validator reject goldens: for each one
6658
+ * the CONFIGURED validator of that name must exist and must reject
6659
+ * the fixture, so a same-name replacement weaker than the contract's
6660
+ * own validator fails here instead of silently accepting what the
6661
+ * journaled contract hash forbids.
6523
6662
  */
6524
6663
  declare function selfTestFinishValidation(options: {
6525
- validators: FinishValidator[];
6664
+ validators: readonly FinishValidator[];
6526
6665
  accept?: FinishValidationInput;
6527
6666
  reject?: FinishValidationInput;
6667
+ rejects?: readonly FinishContractGoldenReject[];
6528
6668
  }): FinishSelfTestReport;
6529
6669
  //#endregion
6530
6670
  //#region src/orchestrator/handles.d.ts
@@ -7181,8 +7321,13 @@ interface FinishValidationSpec {
7181
7321
  * identical and the loop continues to a live repair turn). Decisions
7182
7322
  * recorded before 1.77 carry no hash and bind to the current
7183
7323
  * contract only while the journal holds a single bundle descriptor;
7184
- * once a supersession is recorded they are stale. Absent = byte
7185
- * identical pre 1.72 behavior.
7324
+ * once a supersession is recorded they are stale. The bundle is
7325
+ * deeply frozen and the construction self test also runs the
7326
+ * contract's per validator reject goldens against the CONFIGURED
7327
+ * set (cycle 74), so a post construction mutation throws and a
7328
+ * same-name replacement weaker than the contract's own validator is
7329
+ * a ConfigError before any provider call. Absent = byte identical
7330
+ * pre 1.72 behavior.
7186
7331
  */
7187
7332
  contract?: FinishContract;
7188
7333
  /**
@@ -8966,9 +9111,12 @@ interface PreflightInput {
8966
9111
  * review, P1.1). Programmatic only: validator functions cannot ride
8967
9112
  * a JSON config file, so the CLI never carries this. When present,
8968
9113
  * preflight runs the SAME golden self test orchestrate runs at
8969
- * construction and reports every drift as an error finding (code
8970
- * 'output-contract-validator-mismatch') instead of throwing, so a
8971
- * planner surfaces it next to the quota and budget findings.
9114
+ * construction and reports every drift as an error finding instead
9115
+ * of throwing, so a planner surfaces it next to the quota and budget
9116
+ * findings: 'output-contract-validator-mismatch' for containment and
9117
+ * accept-side drift, 'output-contract-validator-weakened' (cycle 74)
9118
+ * when a configured validator fails the contract's per validator
9119
+ * reject golden, the same-name weakened replacement.
8972
9120
  */
8973
9121
  finishValidation?: {
8974
9122
  validators: FinishValidator[];
@@ -8990,6 +9138,19 @@ interface PreflightInput {
8990
9138
  * the repair-reserve-unfunded warning stays silent.
8991
9139
  */
8992
9140
  maxRepairs?: number;
9141
+ /**
9142
+ * Mirrors FinishValidationSpec.draftPolicy (the fifth experiment,
9143
+ * cycle 75): declaring it lets the estimator compare the draft
9144
+ * gate's word floor against the contract's own word minimum. The
9145
+ * experiment gated drafts at 3200 words under a 4500 word contract,
9146
+ * so the gate admitted a draft the final validators had to reject
9147
+ * and the synthesis started from an underlength base; the
9148
+ * draft-gate-below-contract warning names exactly that shape.
9149
+ */
9150
+ draftPolicy?: {
9151
+ minWords?: number;
9152
+ requireSections?: string[];
9153
+ };
8993
9154
  };
8994
9155
  }
8995
9156
  /** One linter verdict; `spawn` names the wave entry it is about. */
@@ -9651,4 +9812,4 @@ interface SandboxBridge {
9651
9812
  declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
9652
9813
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
9653
9814
  //#endregion
9654
- 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, RateLimitObservation, 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 };
9815
+ 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, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishContract, FinishContractCitations, FinishContractGoldenReject, 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, RateLimitObservation, 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, SectionMatchMode, 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, stripFencedBlocks, 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 };
package/dist/index.js CHANGED
@@ -10740,24 +10740,35 @@ async function runAgent(options) {
10740
10740
  skipped: true
10741
10741
  }));
10742
10742
  };
10743
+ let terminalAdmitted = false;
10743
10744
  for (const [index, call] of calls.entries()) {
10744
- if (limits.maxToolCalls !== void 0 && toolCallsUsed >= limits.maxToolCalls) {
10745
- closeSkippedTail(calls.slice(index), "maxToolCalls");
10746
- return {
10747
- parts,
10748
- limitHit: true,
10749
- limiter: "maxToolCalls",
10750
- skipped: calls.length - index
10751
- };
10752
- }
10753
- if (guard !== void 0 && guard.unitsExhausted()) {
10754
- closeSkippedTail(calls.slice(index), "toolUnits");
10755
- return {
10756
- parts,
10757
- limitHit: true,
10758
- limiter: "toolUnits",
10759
- skipped: calls.length - index
10760
- };
10745
+ const expiredLimiter = limits.maxToolCalls !== void 0 && toolCallsUsed >= limits.maxToolCalls ? "maxToolCalls" : guard !== void 0 && guard.unitsExhausted() ? "toolUnits" : void 0;
10746
+ if (expiredLimiter !== void 0) {
10747
+ const tail = calls.slice(index);
10748
+ const terminalName = options.terminalTool?.name;
10749
+ if (!(terminalName !== void 0 && (terminalAdmitted || tail.some((candidate) => candidate.name === terminalName)))) {
10750
+ closeSkippedTail(tail, expiredLimiter);
10751
+ return {
10752
+ parts,
10753
+ limitHit: true,
10754
+ limiter: expiredLimiter,
10755
+ skipped: calls.length - index
10756
+ };
10757
+ }
10758
+ if (call.name !== terminalName) {
10759
+ parts.push(errorPart(call, {
10760
+ error: "skipped: the tool budget is exhausted; the call was not executed",
10761
+ limiter: expiredLimiter,
10762
+ skipped: true
10763
+ }));
10764
+ continue;
10765
+ }
10766
+ terminalAdmitted = true;
10767
+ events?.emit({
10768
+ type: "log",
10769
+ level: "warn",
10770
+ msg: `terminal tool '${call.name}' admitted at the exhausted tool budget (${expiredLimiter}): terminal calls do not consume the budget`
10771
+ });
10761
10772
  }
10762
10773
  const def = runtime.defs.find((candidate) => candidate.name === call.name);
10763
10774
  events?.emit({
@@ -15346,22 +15357,92 @@ const ok = { ok: true };
15346
15357
  function requireNonEmptyStrings(values, what) {
15347
15358
  if (!Array.isArray(values) || values.length === 0) throw new ConfigError(`${what} must be a non empty array of strings`);
15348
15359
  for (const value of values) if (typeof value !== "string" || value.length === 0) throw new ConfigError(`${what} must contain only non empty strings`);
15349
- return values;
15360
+ return [...values];
15361
+ }
15362
+ const FENCE_OPEN = /^ {0,3}(`{3,}|~{3,})/;
15363
+ const FENCE_CLOSE = /^ {0,3}(`{3,}|~{3,})[ \t]*$/;
15364
+ /**
15365
+ * Removes fenced code blocks from a text, the delimiter lines
15366
+ * included, and returns the remaining lines joined by newlines. The
15367
+ * grammar is the CommonMark shape as a deliberate line heuristic: a
15368
+ * fence opens at a line starting (after at most three spaces) with
15369
+ * three or more backticks or tildes, an optional info string allowed;
15370
+ * it closes at the next line carrying only at least as many of the
15371
+ * SAME character; an unclosed fence runs to the end of the text.
15372
+ * Indented (four space) code blocks are not treated as code. This is
15373
+ * the exact exclusion the `fencedCode: 'excluded'` validator option
15374
+ * applies, exported so custom host validators can stay symmetric.
15375
+ */
15376
+ function stripFencedBlocks(text) {
15377
+ const kept = [];
15378
+ let fence;
15379
+ for (const line of text.split("\n")) {
15380
+ if (fence === void 0) {
15381
+ const delimiter = FENCE_OPEN.exec(line)?.[1];
15382
+ if (delimiter !== void 0) {
15383
+ fence = {
15384
+ char: delimiter.charAt(0),
15385
+ length: delimiter.length
15386
+ };
15387
+ continue;
15388
+ }
15389
+ kept.push(line);
15390
+ continue;
15391
+ }
15392
+ const close = FENCE_CLOSE.exec(line)?.[1];
15393
+ if (close !== void 0 && close.charAt(0) === fence.char && close.length >= fence.length) fence = void 0;
15394
+ }
15395
+ return kept.join("\n");
15396
+ }
15397
+ function requireSectionMatchMode(value, what) {
15398
+ if (value !== "anywhere" && value !== "line") throw new ConfigError(`${what} must be 'anywhere' or 'line'; got ${String(value)}`);
15399
+ return value;
15400
+ }
15401
+ function requireFencedCodeMode(value, what) {
15402
+ if (value !== "counted" && value !== "excluded") throw new ConfigError(`${what} must be 'counted' or 'excluded'; got ${String(value)}`);
15403
+ return value;
15404
+ }
15405
+ /**
15406
+ * The first position of a section marker in the (already fence
15407
+ * filtered) scope under the configured match mode: the plain substring
15408
+ * offset for 'anywhere', the offset of the first line whose trimmed
15409
+ * content EQUALS the marker for 'line'; -1 when absent. One shared
15410
+ * primitive so presence checks and slice anchoring can never disagree.
15411
+ */
15412
+ function sectionPosition(scope, section, match) {
15413
+ if (match === "anywhere") return scope.indexOf(section);
15414
+ let offset = 0;
15415
+ for (const line of scope.split("\n")) {
15416
+ if (line.trim() === section) return offset;
15417
+ offset += line.length + 1;
15418
+ }
15419
+ return -1;
15420
+ }
15421
+ function missingSectionQualifier(match, fencedCode) {
15422
+ const demands = (match === "line" ? " as its own line" : "") + (fencedCode === "excluded" ? " outside fenced code" : "");
15423
+ return demands === "" ? "" : ` (required${demands})`;
15350
15424
  }
15351
15425
  /**
15352
15426
  * Requires every named section to appear LITERALLY in the result text
15353
15427
  * (a heading like 'FINDINGS' or any marker the goal demands). Default
15354
15428
  * name 'required-sections'; pass `name` to run several instances.
15429
+ * `match: 'line'` demands each marker as its own line and
15430
+ * `fencedCode: 'excluded'` ignores markers inside fenced code blocks
15431
+ * (cycle 74); both default to the historical byte identical behavior.
15355
15432
  */
15356
15433
  function requiredSectionsValidator(options) {
15357
15434
  const sections = requireNonEmptyStrings(options.sections, "requiredSectionsValidator sections");
15435
+ const match = options.match === void 0 ? "anywhere" : requireSectionMatchMode(options.match, "requiredSectionsValidator match");
15436
+ const fencedCode = options.fencedCode === void 0 ? "counted" : requireFencedCodeMode(options.fencedCode, "requiredSectionsValidator fencedCode");
15437
+ const qualifier = missingSectionQualifier(match, fencedCode);
15358
15438
  return {
15359
15439
  name: options.name ?? "required-sections",
15360
15440
  validate: (input) => {
15361
- const missing = sections.filter((section) => !input.text.includes(section));
15441
+ const scope = fencedCode === "excluded" ? stripFencedBlocks(input.text) : input.text;
15442
+ const missing = sections.filter((section) => sectionPosition(scope, section, match) < 0);
15362
15443
  return missing.length === 0 ? ok : {
15363
15444
  ok: false,
15364
- reasons: missing.map((section) => `required section '${section}' is missing`)
15445
+ reasons: missing.map((section) => `required section '${section}' is missing${qualifier}`)
15365
15446
  };
15366
15447
  }
15367
15448
  };
@@ -15403,21 +15484,26 @@ function requiredFieldsValidator(options) {
15403
15484
  * v1.71 experiment review, P0.7: a formal length requirement must be
15404
15485
  * code, never a natural-language plea the model may round away). At
15405
15486
  * least one bound is required; both are positive integers with
15406
- * min <= max. Default name 'word-count'.
15487
+ * min <= max. Default name 'word-count'. `fencedCode: 'excluded'`
15488
+ * counts only words outside fenced code blocks (cycle 74), so code
15489
+ * samples cannot pad a length requirement; the default counts
15490
+ * everything, byte identical to the historical behavior.
15407
15491
  */
15408
15492
  function wordCountValidator(options) {
15409
15493
  const { min, max } = options;
15410
15494
  if (min === void 0 && max === void 0) throw new ConfigError("wordCountValidator requires min, max, or both");
15411
15495
  for (const [label, value] of [["min", min], ["max", max]]) if (value !== void 0 && (!Number.isInteger(value) || value < 1)) throw new ConfigError(`wordCountValidator ${label} must be a positive integer; got ${String(value)}`);
15412
15496
  if (min !== void 0 && max !== void 0 && min > max) throw new ConfigError(`wordCountValidator min ${String(min)} exceeds max ${String(max)}`);
15497
+ const fencedCode = options.fencedCode === void 0 ? "counted" : requireFencedCodeMode(options.fencedCode, "wordCountValidator fencedCode");
15498
+ const counted = fencedCode === "excluded" ? " (fenced code excluded)" : "";
15413
15499
  return {
15414
15500
  name: options.name ?? "word-count",
15415
15501
  validate: (input) => {
15416
- const trimmed = input.text.trim();
15502
+ const trimmed = (fencedCode === "excluded" ? stripFencedBlocks(input.text) : input.text).trim();
15417
15503
  const count = trimmed.length === 0 ? 0 : trimmed.split(/\s+/).length;
15418
15504
  const reasons = [];
15419
- if (min !== void 0 && count < min) reasons.push(`result word count ${String(count)} is below the required minimum ${String(min)}`);
15420
- if (max !== void 0 && count > max) reasons.push(`result word count ${String(count)} exceeds the maximum ${String(max)}`);
15505
+ if (min !== void 0 && count < min) reasons.push(`result word count ${String(count)}${counted} is below the required minimum ${String(min)}`);
15506
+ if (max !== void 0 && count > max) reasons.push(`result word count ${String(count)}${counted} exceeds the maximum ${String(max)}`);
15421
15507
  return reasons.length === 0 ? ok : {
15422
15508
  ok: false,
15423
15509
  reasons
@@ -15495,7 +15581,11 @@ function evidencePreservedValidator(options) {
15495
15581
  * text is its own failure reason, because coverage of a missing
15496
15582
  * section cannot silently count as satisfied.
15497
15583
  * requiredSectionsValidator still owns plain presence. Default name
15498
- * 'section-citations'.
15584
+ * 'section-citations'. `match: 'line'` anchors each section at the
15585
+ * first line equal to its marker and `fencedCode: 'excluded'` removes
15586
+ * fenced code before anchoring, slicing, and counting (cycle 74), so a
15587
+ * marker echoed inside a code sample can neither anchor a slice nor
15588
+ * donate citations; both default to the historical behavior.
15499
15589
  */
15500
15590
  function sectionCitationsValidator(options) {
15501
15591
  const sections = requireNonEmptyStrings(options.sections, "sectionCitationsValidator sections");
@@ -15508,12 +15598,17 @@ function sectionCitationsValidator(options) {
15508
15598
  throw new ConfigError(`sectionCitationsValidator pattern does not compile: ${thrown instanceof Error ? thrown.message : String(thrown)}`);
15509
15599
  }
15510
15600
  if (!Number.isInteger(options.min) || options.min < 1) throw new ConfigError(`sectionCitationsValidator min must be a positive integer; got ${String(options.min)}`);
15601
+ const match = options.match === void 0 ? "anywhere" : requireSectionMatchMode(options.match, "sectionCitationsValidator match");
15602
+ const fencedCode = options.fencedCode === void 0 ? "counted" : requireFencedCodeMode(options.fencedCode, "sectionCitationsValidator fencedCode");
15603
+ const qualifier = missingSectionQualifier(match, fencedCode);
15604
+ const counted = fencedCode === "excluded" ? " (fenced code excluded)" : "";
15511
15605
  return {
15512
15606
  name: options.name ?? "section-citations",
15513
15607
  validate: (input) => {
15608
+ const scope = fencedCode === "excluded" ? stripFencedBlocks(input.text) : input.text;
15514
15609
  const positions = /* @__PURE__ */ new Map();
15515
15610
  for (const section of sections) {
15516
- const at = input.text.indexOf(section);
15611
+ const at = sectionPosition(scope, section, match);
15517
15612
  if (at >= 0) positions.set(section, at);
15518
15613
  }
15519
15614
  const ordered = [...positions.entries()].sort((a, b) => a[1] - b[1]);
@@ -15521,12 +15616,12 @@ function sectionCitationsValidator(options) {
15521
15616
  for (const section of sections) {
15522
15617
  const at = positions.get(section);
15523
15618
  if (at === void 0) {
15524
- reasons.push(`required section '${section}' is missing, so its citation coverage cannot be judged`);
15619
+ reasons.push(`required section '${section}' is missing${qualifier}, so its citation coverage cannot be judged`);
15525
15620
  continue;
15526
15621
  }
15527
15622
  const next = ordered.find(([, position]) => position > at);
15528
- const matches = input.text.slice(at, next === void 0 ? input.text.length : next[1]).match(new RegExp(pattern, globalFlags))?.length ?? 0;
15529
- if (matches < options.min) reasons.push(`section '${section}' carries ${String(matches)} citations matching /${pattern}/; at least ${String(options.min)} required`);
15623
+ const matches = scope.slice(at, next === void 0 ? scope.length : next[1]).match(new RegExp(pattern, globalFlags))?.length ?? 0;
15624
+ if (matches < options.min) reasons.push(`section '${section}' carries ${String(matches)} citations matching /${pattern}/${counted}; at least ${String(options.min)} required`);
15530
15625
  }
15531
15626
  return reasons.length === 0 ? ok : {
15532
15627
  ok: false,
@@ -15542,6 +15637,10 @@ function sectionCitationsValidator(options) {
15542
15637
  * ConfigError before any run exists) and matches globally; `min` is a
15543
15638
  * positive integer. Default name 'min-matches'; pass `name` to run
15544
15639
  * several instances, because names must be unique per orchestrate call.
15640
+ * `fencedCode: 'excluded'` matches only outside fenced code blocks
15641
+ * (cycle 74), so citations quoted inside code samples do not count;
15642
+ * the default matches everything, byte identical to the historical
15643
+ * behavior.
15545
15644
  */
15546
15645
  function minMatchesValidator(options) {
15547
15646
  const flags = options.flags ?? "";
@@ -15552,13 +15651,15 @@ function minMatchesValidator(options) {
15552
15651
  throw new ConfigError(`minMatchesValidator pattern does not compile: ${thrown instanceof Error ? thrown.message : String(thrown)}`);
15553
15652
  }
15554
15653
  if (!Number.isInteger(options.min) || options.min < 1) throw new ConfigError(`minMatchesValidator min must be a positive integer; got ${String(options.min)}`);
15654
+ const fencedCode = options.fencedCode === void 0 ? "counted" : requireFencedCodeMode(options.fencedCode, "minMatchesValidator fencedCode");
15655
+ const counted = fencedCode === "excluded" ? " (fenced code excluded)" : "";
15555
15656
  return {
15556
15657
  name: options.name ?? "min-matches",
15557
15658
  validate: (input) => {
15558
- const found = input.text.match(new RegExp(options.pattern, globalFlags))?.length ?? 0;
15659
+ const found = (fencedCode === "excluded" ? stripFencedBlocks(input.text) : input.text).match(new RegExp(options.pattern, globalFlags))?.length ?? 0;
15559
15660
  return found >= options.min ? ok : {
15560
15661
  ok: false,
15561
- reasons: [`expected at least ${String(options.min)} matches of /${options.pattern}/${flags}; found ${String(found)}`]
15662
+ reasons: [`expected at least ${String(options.min)} matches of /${options.pattern}/${flags}; found ${String(found)}${counted}`]
15562
15663
  };
15563
15664
  }
15564
15665
  };
@@ -15602,7 +15703,7 @@ function countWords(text) {
15602
15703
  */
15603
15704
  function finishContract(manifest) {
15604
15705
  if (typeof manifest !== "object" || manifest === null) throw new ConfigError("finishContract manifest must be an object");
15605
- const { sections, words, citations } = manifest;
15706
+ const { sections, sectionsMatch, words, citations, fencedCode } = manifest;
15606
15707
  if (sections === void 0 && words === void 0 && citations === void 0) throw new ConfigError("finishContract manifest must declare sections, words, or citations");
15607
15708
  let normalizedSections;
15608
15709
  if (sections !== void 0) {
@@ -15658,36 +15759,65 @@ function finishContract(manifest) {
15658
15759
  ...citations.perSection === void 0 ? {} : { perSection: citations.perSection }
15659
15760
  };
15660
15761
  }
15762
+ let normalizedSectionsMatch;
15763
+ if (sectionsMatch !== void 0) {
15764
+ if (sectionsMatch !== "anywhere" && sectionsMatch !== "line") throw new ConfigError(`finishContract sectionsMatch must be 'anywhere' or 'line'; got ${String(sectionsMatch)}`);
15765
+ if (normalizedSections === void 0) throw new ConfigError("finishContract sectionsMatch requires sections");
15766
+ if (sectionsMatch === "line") normalizedSectionsMatch = "line";
15767
+ }
15768
+ let normalizedFencedCode;
15769
+ if (fencedCode !== void 0) {
15770
+ if (fencedCode !== "counted" && fencedCode !== "excluded") throw new ConfigError(`finishContract fencedCode must be 'counted' or 'excluded'; got ${String(fencedCode)}`);
15771
+ if (fencedCode === "excluded") normalizedFencedCode = "excluded";
15772
+ }
15773
+ if (normalizedFencedCode === "excluded") {
15774
+ const opensFence = /^\s*(`{3,}|~{3,})/;
15775
+ for (const section of normalizedSections ?? []) if (opensFence.test(section)) throw new ConfigError(`finishContract section '${section}' would open a code fence under fencedCode 'excluded'`);
15776
+ if (normalizedCitations !== void 0 && opensFence.test(normalizedCitations.sample)) throw new ConfigError(`finishContract citations.sample '${normalizedCitations.sample}' would open a code fence under fencedCode 'excluded'`);
15777
+ }
15661
15778
  const normalized = {
15662
15779
  ...normalizedSections === void 0 ? {} : { sections: normalizedSections },
15780
+ ...normalizedSectionsMatch === void 0 ? {} : { sectionsMatch: normalizedSectionsMatch },
15663
15781
  ...normalizedWords === void 0 ? {} : { words: normalizedWords },
15664
- ...normalizedCitations === void 0 ? {} : { citations: normalizedCitations }
15782
+ ...normalizedCitations === void 0 ? {} : { citations: normalizedCitations },
15783
+ ...normalizedFencedCode === void 0 ? {} : { fencedCode: normalizedFencedCode }
15665
15784
  };
15666
15785
  const hash = createHash("sha256").update(jcsSerialize(normalized), "utf8").digest("hex");
15786
+ if (normalizedSections !== void 0) Object.freeze(normalizedSections);
15787
+ if (normalizedWords !== void 0) Object.freeze(normalizedWords);
15788
+ if (normalizedCitations !== void 0) Object.freeze(normalizedCitations);
15789
+ const matchOption = normalizedSectionsMatch === void 0 ? {} : { match: normalizedSectionsMatch };
15790
+ const fencedOption = normalizedFencedCode === void 0 ? {} : { fencedCode: normalizedFencedCode };
15667
15791
  const validators = [];
15668
15792
  if (normalizedSections !== void 0) validators.push(requiredSectionsValidator({
15669
15793
  sections: normalizedSections,
15670
- name: "contract-sections"
15794
+ name: "contract-sections",
15795
+ ...matchOption,
15796
+ ...fencedOption
15671
15797
  }));
15672
15798
  if (normalizedWords !== void 0) validators.push(wordCountValidator({
15673
15799
  ...normalizedWords,
15674
- name: "contract-words"
15800
+ name: "contract-words",
15801
+ ...fencedOption
15675
15802
  }));
15676
15803
  if (normalizedCitations?.min !== void 0) validators.push(minMatchesValidator({
15677
15804
  pattern: normalizedCitations.pattern,
15678
15805
  flags: normalizedCitations.flags,
15679
15806
  min: normalizedCitations.min,
15680
- name: "contract-citations"
15807
+ name: "contract-citations",
15808
+ ...fencedOption
15681
15809
  }));
15682
15810
  if (normalizedCitations?.perSection !== void 0 && normalizedSections !== void 0) validators.push(sectionCitationsValidator({
15683
15811
  sections: normalizedSections,
15684
15812
  pattern: normalizedCitations.pattern,
15685
15813
  flags: normalizedCitations.flags,
15686
15814
  min: normalizedCitations.perSection,
15687
- name: "contract-section-citations"
15815
+ name: "contract-section-citations",
15816
+ ...matchOption,
15817
+ ...fencedOption
15688
15818
  }));
15689
15819
  const promptLines = [];
15690
- if (normalizedSections !== void 0) promptLines.push("The final result must contain each of these section markers verbatim: " + normalizedSections.map((section) => `'${section}'`).join(", ") + ".");
15820
+ if (normalizedSections !== void 0) promptLines.push((normalizedSectionsMatch === "line" ? "The final result must contain each of these section markers verbatim, each on its own line: " : "The final result must contain each of these section markers verbatim: ") + normalizedSections.map((section) => `'${section}'`).join(", ") + ".");
15691
15821
  if (normalizedWords !== void 0) {
15692
15822
  const { min, max } = normalizedWords;
15693
15823
  if (min !== void 0 && max !== void 0) promptLines.push(`The final result must be between ${String(min)} and ${String(max)} words (whitespace separated).`);
@@ -15698,6 +15828,7 @@ function finishContract(manifest) {
15698
15828
  if (normalizedCitations.min !== void 0) promptLines.push(`Include at least ${String(normalizedCitations.min)} citations matching /${normalizedCitations.pattern}/ overall (for example '${normalizedCitations.sample}').`);
15699
15829
  if (normalizedCitations.perSection !== void 0) promptLines.push(`Every required section must itself contain at least ${String(normalizedCitations.perSection)} such citations.`);
15700
15830
  }
15831
+ if (normalizedFencedCode === "excluded") promptLines.push("Text inside fenced code blocks (``` or ~~~) does not count toward sections, word counts, or citations.");
15701
15832
  const lines = [];
15702
15833
  const perSection = normalizedCitations?.perSection ?? 0;
15703
15834
  for (const section of normalizedSections ?? []) {
@@ -15737,13 +15868,69 @@ function finishContract(manifest) {
15737
15868
  text: "",
15738
15869
  children: Object.freeze([])
15739
15870
  }) : void 0;
15871
+ for (const validator of validators) {
15872
+ const verdict = validator.validate(goldenAccept);
15873
+ if (!verdict.ok) throw new ConfigError(`finishContract self check failed: '${validator.name}' rejects the generated golden accept fixture: ${verdict.reasons.join("; ")}`);
15874
+ }
15875
+ const rejectInput = (text) => Object.freeze({
15876
+ result: text,
15877
+ text,
15878
+ children: Object.freeze([])
15879
+ });
15880
+ const goldenRejects = [];
15881
+ const addGoldenReject = (validator, candidate) => {
15882
+ let fixture = rejectInput(candidate);
15883
+ if (validator.validate(fixture).ok) fixture = rejectInput("");
15884
+ if (validator.validate(fixture).ok) throw new ConfigError(`finishContract cannot build a reject golden for '${validator.name}': it accepts both the boundary fixture and the empty text, so it validates nothing`);
15885
+ goldenRejects.push(Object.freeze({
15886
+ validator: validator.name,
15887
+ input: fixture
15888
+ }));
15889
+ };
15890
+ for (const validator of validators) switch (validator.name) {
15891
+ case "contract-sections": {
15892
+ if (normalizedSections === void 0) break;
15893
+ const last = normalizedSections[normalizedSections.length - 1];
15894
+ addGoldenReject(validator, goldenText.split("\n").filter((line) => line !== last).join("\n"));
15895
+ break;
15896
+ }
15897
+ case "contract-words": {
15898
+ const deficit = normalizedWords?.min !== void 0 ? normalizedWords.min - 1 : (normalizedWords?.max ?? 0) + 1;
15899
+ addGoldenReject(validator, Array.from({ length: deficit }, () => FILLER_WORD).join(" "));
15900
+ break;
15901
+ }
15902
+ case "contract-citations": {
15903
+ if (normalizedCitations === void 0) break;
15904
+ const sample = normalizedCitations.sample;
15905
+ addGoldenReject(validator, Array.from({ length: (normalizedCitations.min ?? 1) - 1 }, () => sample).join(" "));
15906
+ break;
15907
+ }
15908
+ case "contract-section-citations": {
15909
+ if (normalizedSections === void 0 || normalizedCitations === void 0) break;
15910
+ const markers = normalizedSections;
15911
+ const sample = normalizedCitations.sample;
15912
+ const per = normalizedCitations.perSection ?? 1;
15913
+ const rows = [];
15914
+ markers.forEach((section, index) => {
15915
+ rows.push(section);
15916
+ const grant = index === markers.length - 1 ? per - 1 : per;
15917
+ if (grant > 0) rows.push(Array.from({ length: grant }, () => sample).join(" "));
15918
+ });
15919
+ addGoldenReject(validator, rows.join("\n"));
15920
+ break;
15921
+ }
15922
+ default: break;
15923
+ }
15924
+ for (const validator of validators) Object.freeze(validator);
15925
+ Object.freeze(validators);
15740
15926
  return Object.freeze({
15741
15927
  manifest: Object.freeze(normalized),
15742
15928
  hash,
15743
15929
  validators,
15744
15930
  promptLines: Object.freeze(promptLines),
15745
15931
  goldenAccept,
15746
- ...goldenReject === void 0 ? {} : { goldenReject }
15932
+ ...goldenReject === void 0 ? {} : { goldenReject },
15933
+ goldenRejects: Object.freeze(goldenRejects)
15747
15934
  });
15748
15935
  }
15749
15936
  /**
@@ -15756,7 +15943,12 @@ function finishContract(manifest) {
15756
15943
  * nothing). A validator that THROWS here is a host defect and the
15757
15944
  * ConfigError propagates, the same posture the live loop takes.
15758
15945
  * Deterministic and free: validators are pure synchronous host code by
15759
- * contract, so this costs zero provider calls.
15946
+ * contract, so this costs zero provider calls. `rejects` (cycle 74)
15947
+ * carries the contract's per validator reject goldens: for each one
15948
+ * the CONFIGURED validator of that name must exist and must reject
15949
+ * the fixture, so a same-name replacement weaker than the contract's
15950
+ * own validator fails here instead of silently accepting what the
15951
+ * journaled contract hash forbids.
15760
15952
  */
15761
15953
  function selfTestFinishValidation(options) {
15762
15954
  const run = (validator, input) => {
@@ -15783,6 +15975,22 @@ function selfTestFinishValidation(options) {
15783
15975
  reasons: ["every configured validator accepts the known-bad fixture; the validation is vacuous"]
15784
15976
  });
15785
15977
  }
15978
+ for (const golden of options.rejects ?? []) {
15979
+ const named = options.validators.find((validator) => validator.name === golden.validator);
15980
+ if (named === void 0) {
15981
+ failures.push({
15982
+ fixture: "reject",
15983
+ validator: golden.validator,
15984
+ reasons: [`no configured validator is named '${golden.validator}', so its reject golden cannot run`]
15985
+ });
15986
+ continue;
15987
+ }
15988
+ if (run(named, golden.input).ok) failures.push({
15989
+ fixture: "reject",
15990
+ validator: golden.validator,
15991
+ reasons: ["the configured validator accepts the fixture the contract's own validator rejects; a same name replacement must be at least as strict"]
15992
+ });
15993
+ }
15786
15994
  return {
15787
15995
  ok: failures.length === 0,
15788
15996
  failures
@@ -15915,13 +16123,15 @@ function validateOrchestrateOptions(opts) {
15915
16123
  const acceptFixture = selfTest?.accept ?? contract?.goldenAccept;
15916
16124
  const rejectFixture = selfTest?.reject ?? contract?.goldenReject;
15917
16125
  if (selfTest !== void 0 && acceptFixture === void 0 && rejectFixture === void 0) throw new ConfigError("orchestrate finishValidation.selfTest requires an accept or reject fixture");
15918
- if (acceptFixture !== void 0 || rejectFixture !== void 0) {
16126
+ const rejectGoldens = contract?.goldenRejects;
16127
+ if (acceptFixture !== void 0 || rejectFixture !== void 0 || rejectGoldens !== void 0) {
15919
16128
  const report = selfTestFinishValidation({
15920
16129
  validators: fv.validators,
15921
16130
  ...acceptFixture === void 0 ? {} : { accept: acceptFixture },
15922
- ...rejectFixture === void 0 ? {} : { reject: rejectFixture }
16131
+ ...rejectFixture === void 0 ? {} : { reject: rejectFixture },
16132
+ ...rejectGoldens === void 0 ? {} : { rejects: rejectGoldens }
15923
16133
  });
15924
- if (!report.ok) throw new ConfigError("the finish validation self test failed BEFORE any provider call: " + report.failures.map((failure) => failure.validator === void 0 ? failure.reasons.join("; ") : `validator '${failure.validator}' rejected the accept fixture: ` + failure.reasons.join("; ")).join("; "));
16134
+ if (!report.ok) throw new ConfigError("the finish validation self test failed BEFORE any provider call: " + report.failures.map((failure) => failure.validator === void 0 ? failure.reasons.join("; ") : failure.fixture === "reject" ? `validator '${failure.validator}' failed its reject golden: ` + failure.reasons.join("; ") : `validator '${failure.validator}' rejected the accept fixture: ` + failure.reasons.join("; ")).join("; "));
15925
16135
  }
15926
16136
  }
15927
16137
  if (opts.synthesis !== void 0) {
@@ -18055,6 +18265,16 @@ function preflightEstimate(input) {
18055
18265
  spawn: "synthesis"
18056
18266
  });
18057
18267
  }
18268
+ {
18269
+ const synthesisToolCap = synthesis.limits?.maxToolCalls;
18270
+ const expectedReads = input.orchestrator?.maxSpawns ?? 1;
18271
+ if (synthesis.exposeChildResultTools === true && synthesisToolCap !== void 0 && synthesisToolCap < expectedReads) say({
18272
+ severity: "warning",
18273
+ code: "synthesis-terminal-tool-headroom",
18274
+ message: `synthesis.limits.maxToolCalls ${String(synthesisToolCap)} cannot cover one get_child_result read per child (${input.orchestrator?.maxSpawns === void 0 ? "at least 1 read" : `maxSpawns ${String(expectedReads)}`}): the reads exhaust the tool budget and the synthesis loses evidence access (the terminal finish is admitted budget free and needs no slot); raise the cap to at least the child count plus paging margin, or use context 'full' without the read tools`,
18275
+ spawn: "synthesis"
18276
+ });
18277
+ }
18058
18278
  const servedBy = resolveServing(synthesis.model) ?? resolveServing(defaults.routing?.synthesize);
18059
18279
  if (servedBy === void 0) say({
18060
18280
  severity: "error",
@@ -18306,6 +18526,16 @@ function preflightEstimate(input) {
18306
18526
  message: `finishValidation grants up to ${String(grantedRepairs)} repair exchange(s) but declares no repairTurnReserve: a rejected finish burns an ordinary turn and a window at maxTurns settles 'limit' with the repair unspent; set finishValidation.repairTurnReserve to fund the repair exchanges`
18307
18527
  });
18308
18528
  }
18529
+ {
18530
+ const draftMinWords = fv.draftPolicy?.minWords;
18531
+ if (draftMinWords !== void 0) requireNonNegativeInteger(draftMinWords, "preflight finishValidation.draftPolicy.minWords");
18532
+ const contractMinWords = fv.contract?.manifest.words?.min;
18533
+ if (draftMinWords !== void 0 && contractMinWords !== void 0 && draftMinWords < contractMinWords) findings.push({
18534
+ severity: "warning",
18535
+ code: "draft-gate-below-contract",
18536
+ message: `draftPolicy.minWords ${String(draftMinWords)} sits below the contract word minimum ${String(contractMinWords)}: the draft gate admits drafts the final validators must reject, so the synthesis starts from an underlength base; raise draftPolicy.minWords to the contract minimum or above`
18537
+ });
18538
+ }
18309
18539
  if (fv.contract !== void 0) {
18310
18540
  for (const contractValidator of fv.contract.validators) if (!names.has(contractValidator.name)) findings.push({
18311
18541
  severity: "error",
@@ -18315,19 +18545,24 @@ function preflightEstimate(input) {
18315
18545
  }
18316
18546
  const acceptFixture = fv.selfTest?.accept ?? fv.contract?.goldenAccept;
18317
18547
  const rejectFixture = fv.selfTest?.reject ?? fv.contract?.goldenReject;
18548
+ const rejectGoldens = fv.contract?.goldenRejects;
18318
18549
  let selfTestOutcome = "skipped";
18319
- if (acceptFixture !== void 0 || rejectFixture !== void 0) {
18550
+ if (acceptFixture !== void 0 || rejectFixture !== void 0 || rejectGoldens !== void 0) {
18320
18551
  const report = selfTestFinishValidation({
18321
18552
  validators: fv.validators,
18322
18553
  ...acceptFixture === void 0 ? {} : { accept: acceptFixture },
18323
- ...rejectFixture === void 0 ? {} : { reject: rejectFixture }
18554
+ ...rejectFixture === void 0 ? {} : { reject: rejectFixture },
18555
+ ...rejectGoldens === void 0 ? {} : { rejects: rejectGoldens }
18324
18556
  });
18325
18557
  selfTestOutcome = report.ok ? "passed" : "failed";
18326
- for (const failure of report.failures) findings.push({
18327
- severity: "error",
18328
- code: "output-contract-validator-mismatch",
18329
- message: failure.validator === void 0 ? failure.reasons.join("; ") : `validator '${failure.validator}' rejected the golden accept fixture: ` + failure.reasons.join("; ")
18330
- });
18558
+ for (const failure of report.failures) {
18559
+ const weakened = failure.fixture === "reject" && failure.validator !== void 0;
18560
+ findings.push({
18561
+ severity: "error",
18562
+ code: weakened ? "output-contract-validator-weakened" : "output-contract-validator-mismatch",
18563
+ message: failure.validator === void 0 ? failure.reasons.join("; ") : weakened ? `validator '${failure.validator}' failed its reject golden: ` + failure.reasons.join("; ") : `validator '${failure.validator}' rejected the golden accept fixture: ` + failure.reasons.join("; ")
18564
+ });
18565
+ }
18331
18566
  }
18332
18567
  finishValidationEcho = {
18333
18568
  ...fv.contract === void 0 ? {} : { contractHash: fv.contract.hash },
@@ -19121,15 +19356,23 @@ function liftRunCompletion(candidate) {
19121
19356
  if (typeof candidate !== "object" || candidate === null || Array.isArray(candidate)) return;
19122
19357
  const completion = candidate.completion;
19123
19358
  if (completion !== "complete" && completion !== "partial" && completion !== "rejected") return;
19359
+ const lifted = { completion };
19124
19360
  const counts = candidate.childStatusCounts;
19125
19361
  if (typeof counts === "object" && counts !== null && !Array.isArray(counts)) {
19126
19362
  const entries = Object.entries(counts);
19127
- if (entries.every(([, value]) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0)) return {
19128
- completion,
19129
- childStatusCounts: Object.fromEntries(entries)
19130
- };
19363
+ if (entries.every(([, value]) => typeof value === "number" && Number.isSafeInteger(value) && value >= 0)) lifted.childStatusCounts = Object.fromEntries(entries);
19131
19364
  }
19132
- return { completion };
19365
+ const liftStringList = (key) => {
19366
+ const value = candidate[key];
19367
+ return Array.isArray(value) && value.every((entry) => typeof entry === "string") ? [...value] : void 0;
19368
+ };
19369
+ const degradedReasons = liftStringList("degradedReasons");
19370
+ if (degradedReasons !== void 0) lifted.degradedReasons = degradedReasons;
19371
+ const salvagedPartialChildren = liftStringList("salvagedPartialChildren");
19372
+ if (salvagedPartialChildren !== void 0) lifted.salvagedPartialChildren = salvagedPartialChildren;
19373
+ const salvagedTerminalOutputChildren = liftStringList("salvagedTerminalOutputChildren");
19374
+ if (salvagedTerminalOutputChildren !== void 0) lifted.salvagedTerminalOutputChildren = salvagedTerminalOutputChildren;
19375
+ return lifted;
19133
19376
  }
19134
19377
  /**
19135
19378
  * sha256 hex over the JCS canonical serialization of a run's args: the
@@ -19584,6 +19827,9 @@ function createEngine(options) {
19584
19827
  if (lifted !== void 0) {
19585
19828
  outcome.completion = lifted.completion;
19586
19829
  if (lifted.childStatusCounts !== void 0) outcome.childStatusCounts = lifted.childStatusCounts;
19830
+ if (lifted.degradedReasons !== void 0) outcome.degradedReasons = lifted.degradedReasons;
19831
+ if (lifted.salvagedPartialChildren !== void 0) outcome.salvagedPartialChildren = lifted.salvagedPartialChildren;
19832
+ if (lifted.salvagedTerminalOutputChildren !== void 0) outcome.salvagedTerminalOutputChildren = lifted.salvagedTerminalOutputChildren;
19587
19833
  }
19588
19834
  let settlementFailure;
19589
19835
  if (resumeCtx?.strict !== true) {
@@ -20155,4 +20401,4 @@ function createSandboxBridge(ctx, options) {
20155
20401
  };
20156
20402
  }
20157
20403
  //#endregion
20158
- export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, 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, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, KeyedLimiter, KnowledgeCasError, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LeaseHeldError, LineageIndex, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, 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, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, 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 };
20404
+ export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, 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, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, KeyedLimiter, KnowledgeCasError, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LeaseHeldError, LineageIndex, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, 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, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, 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, stripFencedBlocks, 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/core",
3
- "version": "1.77.0",
3
+ "version": "1.79.0",
4
4
  "description": "Rulvar core: L0 contracts, journal kernel, ctx primitives, agent runtime, model router, tool system, dynamic orchestrator, InMemory and JSONL stores, event stream.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",