@rulvar/core 1.206.0 → 1.208.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +111 -4
- package/dist/index.js +89 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -496,6 +496,26 @@ interface CacheHint {
|
|
|
496
496
|
}>;
|
|
497
497
|
}
|
|
498
498
|
/**
|
|
499
|
+
* The prompt-cache policy (RV2006): whether and how the agent loop
|
|
500
|
+
* compiles {@link CacheHint} onto every turn of its tool cycle.
|
|
501
|
+
* 'auto' (the default when no policy is declared anywhere) attaches
|
|
502
|
+
* breakpoints after tools, after system, and after the deepest message
|
|
503
|
+
* (sliding each turn) on adapters that declare
|
|
504
|
+
* `ModelCaps.promptCaching: 'explicit'`; adapters without the
|
|
505
|
+
* declaration, and providers whose caching is implicit server-side,
|
|
506
|
+
* never see a hint, so their wire traffic stays byte identical.
|
|
507
|
+
* 'off' is the opt-out. The hint is transport-level cost optimization
|
|
508
|
+
* only: it never enters identity, journals, or cassette keys. The
|
|
509
|
+
* third parity rerun priced the absence: every turn of a ~550k-token
|
|
510
|
+
* worker context re-paid the full input rate because nothing in the
|
|
511
|
+
* core ever populated the hint the adapter could compile.
|
|
512
|
+
*/
|
|
513
|
+
interface CachePolicy {
|
|
514
|
+
mode?: "auto" | "off";
|
|
515
|
+
/** Breakpoint TTL; default '5m'. */
|
|
516
|
+
ttl?: CacheTtl;
|
|
517
|
+
}
|
|
518
|
+
/**
|
|
499
519
|
* The provider-neutral chat request. Sampling parameters (temperature,
|
|
500
520
|
* top_p, top_k) are deliberately absent from the first-class surface: both
|
|
501
521
|
* first-class providers reject them on current reasoning models; where a
|
|
@@ -3182,7 +3202,17 @@ type ModelCaps = {
|
|
|
3182
3202
|
* and a remainder that cannot buy the floor is refused typed before
|
|
3183
3203
|
* the wire. Absent means one, the historical floor.
|
|
3184
3204
|
*/
|
|
3185
|
-
minOutputTokensPerTurn?: number;
|
|
3205
|
+
minOutputTokensPerTurn?: number;
|
|
3206
|
+
/**
|
|
3207
|
+
* How this model's prompt caching is driven (RV2006). 'explicit'
|
|
3208
|
+
* means the adapter compiles ChatRequest.cacheHint into provider
|
|
3209
|
+
* cache directives (Anthropic cache_control) and the agent loop's
|
|
3210
|
+
* cache policy attaches hints by default; 'implicit' means the
|
|
3211
|
+
* provider caches server-side on its own and hints are neither
|
|
3212
|
+
* needed nor sent (OpenAI). Absent means unknown: the loop attaches
|
|
3213
|
+
* nothing and the wire stays byte identical to pre-RV2006 traffic.
|
|
3214
|
+
*/
|
|
3215
|
+
promptCaching?: "explicit" | "implicit"; /** Adapter-reported fallback only; the versioned price table wins. */
|
|
3186
3216
|
pricing?: Pricing;
|
|
3187
3217
|
};
|
|
3188
3218
|
interface ProviderAdapter {
|
|
@@ -5511,6 +5541,16 @@ interface RunAgentOptions<S extends SchemaSpec = JsonSchema> {
|
|
|
5511
5541
|
* three mid-research workers on exactly this path.
|
|
5512
5542
|
*/
|
|
5513
5543
|
exposureWait?: boolean | "child";
|
|
5544
|
+
/**
|
|
5545
|
+
* The prompt-cache policy (RV2006): resolved by the ctx layer from
|
|
5546
|
+
* the call opts, the agentType profile, and the engine defaults, in
|
|
5547
|
+
* that order. Absent means 'auto': the loop attaches CacheHint
|
|
5548
|
+
* breakpoints (after tools, after system, and the sliding deepest
|
|
5549
|
+
* message) on every turn served by an adapter that declares
|
|
5550
|
+
* ModelCaps.promptCaching 'explicit', and attaches nothing anywhere
|
|
5551
|
+
* else. See applyCachePolicy for the exact shape.
|
|
5552
|
+
*/
|
|
5553
|
+
cache?: CachePolicy;
|
|
5514
5554
|
events?: RuntimeEventSink;
|
|
5515
5555
|
transcript?: {
|
|
5516
5556
|
mintRef(): string;
|
|
@@ -6818,6 +6858,25 @@ type AdmitRejectReason = {
|
|
|
6818
6858
|
code: "osc_guard";
|
|
6819
6859
|
spawnKey: SpawnKey;
|
|
6820
6860
|
oscillationCount: number;
|
|
6861
|
+
} | {
|
|
6862
|
+
/**
|
|
6863
|
+
* The sequential roster feasibility refusal (RV2005): under a
|
|
6864
|
+
* declared acceptance.minSpawnedChildren, the whole remaining
|
|
6865
|
+
* roster (priced at this seat's own projection) plus the live
|
|
6866
|
+
* in-flight exposure does not fit the parent remainder, so the
|
|
6867
|
+
* FIRST infeasible seat refuses before any child is paid. The
|
|
6868
|
+
* batchGate symmetry (RV1908) on the seat-by-seat path the
|
|
6869
|
+
* parity rerun's model actually took, where three seats were
|
|
6870
|
+
* paid in full under a floor of four the money could never
|
|
6871
|
+
* reach.
|
|
6872
|
+
*/
|
|
6873
|
+
code: "roster_floor";
|
|
6874
|
+
floor: number;
|
|
6875
|
+
admittedChildren: number;
|
|
6876
|
+
seatsRemaining: number;
|
|
6877
|
+
perSeatProjectionUsd: number;
|
|
6878
|
+
liveExposureUsd: number;
|
|
6879
|
+
remainderUsd: number;
|
|
6821
6880
|
} | {
|
|
6822
6881
|
/**
|
|
6823
6882
|
* The declared estimate cannot fit the child's own ceiling: the
|
|
@@ -6859,6 +6918,20 @@ interface AdmitSpec {
|
|
|
6859
6918
|
*/
|
|
6860
6919
|
pendingReserveUsd?: number;
|
|
6861
6920
|
/**
|
|
6921
|
+
* The sequential roster feasibility inputs (RV2005), passed by the
|
|
6922
|
+
* SINGLE spawn_agent path when acceptance.minSpawnedChildren is
|
|
6923
|
+
* declared: the admission projects the whole REMAINING roster at
|
|
6924
|
+
* this seat's own dispatch projection, live in-flight exposure
|
|
6925
|
+
* included, and refuses the first infeasible seat typed
|
|
6926
|
+
* 'roster_floor' before any child is paid. Batch seats never carry
|
|
6927
|
+
* this: the RV1908 batchGate already judged their batch entire.
|
|
6928
|
+
*/
|
|
6929
|
+
roster?: {
|
|
6930
|
+
floor: number;
|
|
6931
|
+
admittedChildren: number;
|
|
6932
|
+
liveExposureUsd: number;
|
|
6933
|
+
};
|
|
6934
|
+
/**
|
|
6862
6935
|
* Lineage continuation (DEF-3); absence mints a fresh lineage root. A
|
|
6863
6936
|
* continuation demands a causeRef: the seq of the entry that caused the
|
|
6864
6937
|
* rebirth.
|
|
@@ -7287,6 +7360,18 @@ interface EngineDefaults {
|
|
|
7287
7360
|
* (today's behavior); AgentProfile.countTokens overrides per profile.
|
|
7288
7361
|
*/
|
|
7289
7362
|
countTokens?: "allow" | "deny";
|
|
7363
|
+
/**
|
|
7364
|
+
* The engine-wide prompt-cache policy (RV2006). Absent means 'auto':
|
|
7365
|
+
* the agent loop attaches CacheHint breakpoints (after tools, after
|
|
7366
|
+
* system, and the sliding deepest message, TTL '5m') on every turn
|
|
7367
|
+
* served by an adapter that declares ModelCaps.promptCaching
|
|
7368
|
+
* 'explicit', and attaches nothing anywhere else, so wire traffic to
|
|
7369
|
+
* every other adapter stays byte identical. `{ mode: 'off' }` is the
|
|
7370
|
+
* opt-out; AgentProfile.cache and the per-call opts override in that
|
|
7371
|
+
* order. Transport-level cost optimization only: hints never enter
|
|
7372
|
+
* identity, journals, or cassette keys.
|
|
7373
|
+
*/
|
|
7374
|
+
cache?: CachePolicy;
|
|
7290
7375
|
}
|
|
7291
7376
|
interface BudgetDefaults {
|
|
7292
7377
|
/** Last resort of the admission reserve formula; default 0.50. */
|
|
@@ -8751,7 +8836,7 @@ interface OrchestratorRuntime {
|
|
|
8751
8836
|
causeRef: number;
|
|
8752
8837
|
};
|
|
8753
8838
|
taskClass?: string;
|
|
8754
|
-
}): Promise<{
|
|
8839
|
+
}, origin?: "spawn_agent" | "parallel_agents"): Promise<{
|
|
8755
8840
|
handle: number;
|
|
8756
8841
|
}>;
|
|
8757
8842
|
awaitAny(handles: number[]): Promise<TaskDigest>;
|
|
@@ -9552,6 +9637,19 @@ interface OrchestrateOptions {
|
|
|
9552
9637
|
*/
|
|
9553
9638
|
parallelAdmission?: "fail-fast" | "try-all" | "all-or-none";
|
|
9554
9639
|
/**
|
|
9640
|
+
* The batch-spawn discipline (RV2005). The third parity rerun's
|
|
9641
|
+
* model ignored the instruction to spawn its roster in one
|
|
9642
|
+
* parallel_agents call and spawned seat by seat through spawn_agent,
|
|
9643
|
+
* so the RV1908 batchGate never saw a batch and the roster
|
|
9644
|
+
* feasibility rode on per-seat luck. 'reject-spawn-agent' refuses
|
|
9645
|
+
* every SINGLE spawn_agent call typed (code 'batch_required',
|
|
9646
|
+
* nothing journaled, nothing paid) so model disobedience cannot
|
|
9647
|
+
* split the policy: the model reads the refusal and re-issues the
|
|
9648
|
+
* wave as one parallel_agents batch. Absent, both tools behave as
|
|
9649
|
+
* documented.
|
|
9650
|
+
*/
|
|
9651
|
+
requireBatchSpawn?: "reject-spawn-agent";
|
|
9652
|
+
/**
|
|
9555
9653
|
* The opt in deterministic host validation of the finish result, with
|
|
9556
9654
|
* bounded repair; see {@link FinishValidationSpec}.
|
|
9557
9655
|
*/
|
|
@@ -10413,6 +10511,12 @@ interface AgentProfile {
|
|
|
10413
10511
|
/** Flavor B opt-in lives here or on the call. */
|
|
10414
10512
|
escalation?: EscalationOptions;
|
|
10415
10513
|
limits?: UsageLimits;
|
|
10514
|
+
/**
|
|
10515
|
+
* The prompt-cache policy layer (RV2006): call opts over this
|
|
10516
|
+
* profile over the engine default; absent everywhere means 'auto'
|
|
10517
|
+
* (hints on explicit-caching adapters, nothing anywhere else).
|
|
10518
|
+
*/
|
|
10519
|
+
cache?: CachePolicy;
|
|
10416
10520
|
/** Transport RetryPolicy layer: call over profile over engine (M4-T05). */
|
|
10417
10521
|
retry?: RetryPolicy;
|
|
10418
10522
|
/** Declared task class bridging ModelKnowledge; default unclassified (M4-T09). */
|
|
@@ -10543,6 +10647,8 @@ interface AgentOpts<S extends SchemaSpec = SchemaSpec> {
|
|
|
10543
10647
|
estCost?: number;
|
|
10544
10648
|
/** Merged over profile and engine limits. */
|
|
10545
10649
|
limits?: UsageLimits;
|
|
10650
|
+
/** The prompt-cache policy for THIS call (RV2006); wins over profile and engine. */
|
|
10651
|
+
cache?: CachePolicy;
|
|
10546
10652
|
result?: "value" | "full";
|
|
10547
10653
|
/** Telemetry only. */
|
|
10548
10654
|
label?: string;
|
|
@@ -10824,7 +10930,8 @@ interface RunInternals {
|
|
|
10824
10930
|
schemas?: Record<string, SchemaSpec>; /** Registered tool profile names for toolsetRef (M7-T05). */
|
|
10825
10931
|
toolsets?: Record<string, ToolsOption>; /** Registered mechanical gate profiles (M7-T10). */
|
|
10826
10932
|
gates?: Record<string, MechanicalGateProfile>; /** Engine-wide admission countTokens policy (RV1804); default 'allow'. */
|
|
10827
|
-
countTokens?: "allow" | "deny";
|
|
10933
|
+
countTokens?: "allow" | "deny"; /** The engine-wide prompt-cache policy (RV2006); profile and call opts win. */
|
|
10934
|
+
cache?: CachePolicy;
|
|
10828
10935
|
};
|
|
10829
10936
|
/** Telemetry compat posture (RV1810). */
|
|
10830
10937
|
telemetry?: {
|
|
@@ -13862,4 +13969,4 @@ interface SandboxBridge {
|
|
|
13862
13969
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
13863
13970
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
13864
13971
|
//#endregion
|
|
13865
|
-
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, 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, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, 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, type JournalPricingSnapshot, JournalSealedError, 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_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, 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, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, 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, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, PilotAgentProfileOptions, PilotAgentProfileResult, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, ProviderStatement, 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_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, ReconcileStatementOptions, 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, RunFactPairOptions, RunFactPairsFold, RunFactsSheet, 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, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, 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, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, 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, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, 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, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
13972
|
+
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, 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, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, 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, type JournalPricingSnapshot, JournalSealedError, 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_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, 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, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, 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, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, PilotAgentProfileOptions, PilotAgentProfileResult, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, ProviderStatement, 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_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, ReconcileStatementOptions, 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, RunFactPairOptions, RunFactPairsFold, RunFactsSheet, 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, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, 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, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, 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, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, 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, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, 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, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/dist/index.js
CHANGED
|
@@ -10880,6 +10880,48 @@ function outputFloorOf(target) {
|
|
|
10880
10880
|
* limits.maxOutputTokensPerTurn above it; identity is computed at the
|
|
10881
10881
|
* ctx layer and never sees it.
|
|
10882
10882
|
*/
|
|
10883
|
+
/**
|
|
10884
|
+
* The prompt-cache compilation (RV2006): attaches CacheHint to a loop
|
|
10885
|
+
* turn's request when the resolved policy allows it and the SERVING
|
|
10886
|
+
* adapter declared explicit prompt caching. Breakpoints: after tools,
|
|
10887
|
+
* after system, and after the deepest message, the sliding boundary
|
|
10888
|
+
* that moves with the growing history so every turn re-reads the
|
|
10889
|
+
* cached prefix and writes only the extension. The parity rerun
|
|
10890
|
+
* priced the absence of this compilation: workers with ~550k-token
|
|
10891
|
+
* contexts re-paid the full input rate on every turn
|
|
10892
|
+
* (cacheReadTokens 0 across the whole run) because nothing ever
|
|
10893
|
+
* populated the hint the adapter could already compile. Adapters
|
|
10894
|
+
* without the 'explicit' declaration get byte-identical requests; a
|
|
10895
|
+
* caps() throw is treated as no declaration (the outputFloorOf
|
|
10896
|
+
* posture). Transport-level only: the hint never enters identity,
|
|
10897
|
+
* journals, or cassette keys.
|
|
10898
|
+
*/
|
|
10899
|
+
function applyCachePolicy(req, target, policy) {
|
|
10900
|
+
if (policy?.mode === "off") return req;
|
|
10901
|
+
let caching;
|
|
10902
|
+
try {
|
|
10903
|
+
caching = target.adapter.caps(target.resolved.model).promptCaching;
|
|
10904
|
+
} catch {
|
|
10905
|
+
return req;
|
|
10906
|
+
}
|
|
10907
|
+
if (caching !== "explicit") return req;
|
|
10908
|
+
const ttl = policy?.ttl ?? "5m";
|
|
10909
|
+
const breakpoints = [{
|
|
10910
|
+
after: "tools",
|
|
10911
|
+
ttl
|
|
10912
|
+
}, {
|
|
10913
|
+
after: "system",
|
|
10914
|
+
ttl
|
|
10915
|
+
}];
|
|
10916
|
+
if (req.messages.length > 0) breakpoints.push({
|
|
10917
|
+
after: { messageIndex: req.messages.length - 1 },
|
|
10918
|
+
ttl
|
|
10919
|
+
});
|
|
10920
|
+
return {
|
|
10921
|
+
...req,
|
|
10922
|
+
cacheHint: { breakpoints }
|
|
10923
|
+
};
|
|
10924
|
+
}
|
|
10883
10925
|
function applyOutputBudget(req, target, budget) {
|
|
10884
10926
|
const floor = outputFloorOf(target);
|
|
10885
10927
|
if (req.maxOutputTokens !== void 0 && req.maxOutputTokens < floor) throw new ConfigError(`the per-turn output cap ${String(req.maxOutputTokens)} is below the ${String(floor)} token output floor of ${target.resolved.ref}; the provider would reject every dispatch, so raise limits.maxOutputTokensPerTurn to at least the floor`);
|
|
@@ -12594,6 +12636,7 @@ async function runAgent(options) {
|
|
|
12594
12636
|
requestFor: (target) => {
|
|
12595
12637
|
let req = buildRequest(target.resolved, projectHistory(messages, providerOf(target.adapter)), limits, options.tools?.contracts);
|
|
12596
12638
|
if (options.schema !== void 0 && options.canonicalSchema !== void 0 && !separateExtract) req = applyStructuredOutputTier(req, rideTierFor(target), options.canonicalSchema);
|
|
12639
|
+
req = applyCachePolicy(req, target, options.cache);
|
|
12597
12640
|
return applyOutputBudget(req, target, options.budget);
|
|
12598
12641
|
},
|
|
12599
12642
|
streamOptionsFor: (target) => {
|
|
@@ -16047,6 +16090,28 @@ var AdmissionController = class {
|
|
|
16047
16090
|
},
|
|
16048
16091
|
statsBefore
|
|
16049
16092
|
};
|
|
16093
|
+
if (spec.roster !== void 0) {
|
|
16094
|
+
const seatsRemaining = spec.roster.floor - spec.roster.admittedChildren;
|
|
16095
|
+
if (seatsRemaining > 0) {
|
|
16096
|
+
const perSeatProjectionUsd = this.projectedDispatchReserveUsd(spec);
|
|
16097
|
+
const remainder = this.budget.remainderOf(spec.parentAccountScope);
|
|
16098
|
+
if (remainder !== void 0 && remainder < seatsRemaining * perSeatProjectionUsd + spec.roster.liveExposureUsd) return {
|
|
16099
|
+
verdict: {
|
|
16100
|
+
kind: "reject",
|
|
16101
|
+
reason: {
|
|
16102
|
+
code: "roster_floor",
|
|
16103
|
+
floor: spec.roster.floor,
|
|
16104
|
+
admittedChildren: spec.roster.admittedChildren,
|
|
16105
|
+
seatsRemaining,
|
|
16106
|
+
perSeatProjectionUsd,
|
|
16107
|
+
liveExposureUsd: spec.roster.liveExposureUsd,
|
|
16108
|
+
remainderUsd: remainder
|
|
16109
|
+
}
|
|
16110
|
+
},
|
|
16111
|
+
statsBefore
|
|
16112
|
+
};
|
|
16113
|
+
}
|
|
16114
|
+
}
|
|
16050
16115
|
const spawnToolOrigin = spec.origin === "spawn_agent" || spec.origin === "parallel_agents";
|
|
16051
16116
|
let childCeilingUsd;
|
|
16052
16117
|
const parentRemainder = this.budget.remainderOf(spec.parentAccountScope);
|
|
@@ -17934,6 +17999,10 @@ function createCtx(internals, rootWorkflow) {
|
|
|
17934
17999
|
if (canonicalSchema !== void 0) runAgentOptions.canonicalSchema = canonicalSchema;
|
|
17935
18000
|
if (extract !== void 0) runAgentOptions.extract = extract;
|
|
17936
18001
|
if (finalize !== void 0) runAgentOptions.finalize = finalize;
|
|
18002
|
+
{
|
|
18003
|
+
const cachePolicy = opts.cache ?? profile?.cache ?? internals.defaults.cache;
|
|
18004
|
+
if (cachePolicy !== void 0) runAgentOptions.cache = cachePolicy;
|
|
18005
|
+
}
|
|
17937
18006
|
runAgentOptions.summarize = summarize;
|
|
17938
18007
|
if (profile?.compaction !== void 0) runAgentOptions.compaction = profile.compaction;
|
|
17939
18008
|
if (profile?.evidenceContract !== void 0) runAgentOptions.evidenceContract = profile.evidenceContract;
|
|
@@ -19247,7 +19316,7 @@ function buildOrchestratorTools(runtime, profileCardText, options) {
|
|
|
19247
19316
|
for (const [index, task] of tasks.entries()) {
|
|
19248
19317
|
let spawned;
|
|
19249
19318
|
try {
|
|
19250
|
-
spawned = await runtime.spawn(task);
|
|
19319
|
+
spawned = await runtime.spawn(task, "parallel_agents");
|
|
19251
19320
|
} catch (thrown) {
|
|
19252
19321
|
const failure = {
|
|
19253
19322
|
index,
|
|
@@ -21872,8 +21941,16 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
21872
21941
|
};
|
|
21873
21942
|
const executionFactsEnabled = opts?.executionFacts === true;
|
|
21874
21943
|
const orchestratorRuntime = {
|
|
21875
|
-
async spawn(params) {
|
|
21944
|
+
async spawn(params, origin = "spawn_agent") {
|
|
21876
21945
|
await recoveryDone;
|
|
21946
|
+
if (origin === "spawn_agent" && opts?.requireBatchSpawn === "reject-spawn-agent") {
|
|
21947
|
+
internals.events.emit({
|
|
21948
|
+
type: "spawn:rejected",
|
|
21949
|
+
code: "batch_required",
|
|
21950
|
+
agentType: params.agentType
|
|
21951
|
+
}, callingState.spanId);
|
|
21952
|
+
throw new AdmissionRejectedError("orchestrate requireBatchSpawn 'reject-spawn-agent': single spawn_agent calls are refused; submit the whole wave as ONE parallel_agents call so the batch roster feasibility gate sees it entire", { data: { reason: { code: "batch_required" } } });
|
|
21953
|
+
}
|
|
21877
21954
|
const specKey = jcsSerialize(params);
|
|
21878
21955
|
const recoveredOrdinal = unclaimedRecoveredBySpec.get(specKey)?.shift();
|
|
21879
21956
|
if (recoveredOrdinal !== void 0) {
|
|
@@ -21907,14 +21984,20 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
21907
21984
|
const profile = Object.hasOwn(advertisedProfiles, params.agentType) ? advertisedProfiles[params.agentType] : void 0;
|
|
21908
21985
|
const profileModel = profile?.model;
|
|
21909
21986
|
if (profileModel !== void 0 && typeof profileModel !== "string" && "ladder" in profileModel) throw new ConfigError(`agentType '${params.agentType}' declares a ladder; ladder execution is owned by the plan extension, which resolves each rung attempt to a concrete model override; spawn a concrete profile instead`);
|
|
21987
|
+
const rosterFloor = (opts?.acceptance)?.minSpawnedChildren;
|
|
21910
21988
|
const decision = admission.admit({
|
|
21911
|
-
origin
|
|
21989
|
+
origin,
|
|
21912
21990
|
name: params.agentType,
|
|
21913
21991
|
childScope: scope,
|
|
21914
21992
|
parentAccountScope: callingState.budgetScope ?? "run",
|
|
21915
21993
|
nodeKey: scope,
|
|
21916
21994
|
...params.budgetUsd === void 0 ? {} : { budgetUsd: params.budgetUsd },
|
|
21917
21995
|
...profile?.estCost === void 0 ? {} : { estCostUsd: profile.estCost },
|
|
21996
|
+
...origin === "spawn_agent" && rosterFloor !== void 0 ? { roster: {
|
|
21997
|
+
floor: rosterFloor,
|
|
21998
|
+
admittedChildren: admittedSpawnCount,
|
|
21999
|
+
liveExposureUsd: internals.budget.liveExposureUsd
|
|
22000
|
+
} } : {},
|
|
21918
22001
|
...params.lineage === void 0 ? {} : { lineage: {
|
|
21919
22002
|
continues: params.lineage.continues,
|
|
21920
22003
|
causeRef: params.lineage.causeRef,
|
|
@@ -21928,7 +22011,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
21928
22011
|
}, { commitReserve: false });
|
|
21929
22012
|
const admissionValue = {
|
|
21930
22013
|
decisionType: "spawn-admission",
|
|
21931
|
-
origin
|
|
22014
|
+
origin,
|
|
21932
22015
|
orchestratorScope: scope,
|
|
21933
22016
|
spawnOrdinal,
|
|
21934
22017
|
name: params.agentType,
|
|
@@ -25971,7 +26054,8 @@ function createEngine(options) {
|
|
|
25971
26054
|
...defaults.schemas === void 0 ? {} : { schemas: defaults.schemas },
|
|
25972
26055
|
...defaults.toolsets === void 0 ? {} : { toolsets: defaults.toolsets },
|
|
25973
26056
|
...defaults.gates === void 0 ? {} : { gates: defaults.gates },
|
|
25974
|
-
...defaults.countTokens === void 0 ? {} : { countTokens: defaults.countTokens }
|
|
26057
|
+
...defaults.countTokens === void 0 ? {} : { countTokens: defaults.countTokens },
|
|
26058
|
+
...defaults.cache === void 0 ? {} : { cache: defaults.cache }
|
|
25975
26059
|
},
|
|
25976
26060
|
...options.telemetry === void 0 ? {} : { telemetry: options.telemetry },
|
|
25977
26061
|
errorPolicy: wf.errorPolicy,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.208.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",
|