@rulvar/core 1.2.0 → 1.3.1

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 CHANGED
@@ -1253,6 +1253,35 @@ interface ModelKnowledgeStore {
1253
1253
  * cross-run medium at all.
1254
1254
  */
1255
1255
  type ModelKnowledgeHandle = Pick<ModelKnowledgeStore, "current">;
1256
+ /** The closed trigger vocabulary of kb_propose (phase 3). */
1257
+ type KbProposalTrigger = "error" | "limit" | "schema-exhausted" | "verify-failed" | "no-progress" | "escalation";
1258
+ /**
1259
+ * One orchestrator model-knowledge proposal (phase 3). A proposal is a
1260
+ * run-ledger record, NOT a claim: it lives ONLY in the RunLedger
1261
+ * section modelObservations, is never rendered into any prompt of any
1262
+ * run before the human gate (absolute quarantine, the note included),
1263
+ * and reaches the gate exclusively through LedgerExport. The engine
1264
+ * assembles it from the tier-relative kb_propose payload: the subject
1265
+ * model is resolved by the engine from the referenced lineage's
1266
+ * declared ladder, never named by the orchestrator; evidence must
1267
+ * resolve into the proposing run's own decision entries.
1268
+ */
1269
+ interface KbProposal {
1270
+ subject: {
1271
+ model: ModelRef;
1272
+ effort?: Effort;
1273
+ };
1274
+ taskClass: TaskClass;
1275
+ polarity: "strength" | "weakness";
1276
+ trigger: KbProposalTrigger;
1277
+ evidence: Array<{
1278
+ kind: "journal";
1279
+ runId: string;
1280
+ entryRef: number;
1281
+ }>;
1282
+ /** <=200 chars; not rendered into any prompt before the gate. */
1283
+ note?: string;
1284
+ }
1256
1285
  //#endregion
1257
1286
  //#region src/knowledge/decay.d.ts
1258
1287
  /**
@@ -1295,6 +1324,14 @@ declare function remeasureQueue(claims: readonly ModelClaim[], at: string): Mode
1295
1324
  declare function archiveDeprecatedModelOps(claims: readonly ModelClaim[], deprecated: readonly ModelRef[]): ClaimOp[];
1296
1325
  //#endregion
1297
1326
  //#region src/knowledge/claims.d.ts
1327
+ /**
1328
+ * The typed statement template for a proposal-born claim (phase 3):
1329
+ * assembled over the closed enum vocabulary ONLY, so tool-output text
1330
+ * is unquotable into persistence, and model-free, because a claim
1331
+ * statement renders into the knowledge card's notes layer, which never
1332
+ * leaks model names to the orchestrator.
1333
+ */
1334
+ declare function proposalStatement(proposal: Pick<KbProposal, "taskClass" | "polarity" | "trigger">): string;
1298
1335
  /** Appendix A: KB active-claims cap, default 8 per (model, taskClass). */
1299
1336
  declare const KB_ACTIVE_CLAIMS_CAP = 8;
1300
1337
  /** The committed data model bound: statement <= 200 chars. */
@@ -5940,4 +5977,4 @@ interface SandboxBridge {
5940
5977
  }
5941
5978
  declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
5942
5979
  //#endregion
5943
- export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, AgentOpts, AgentProfile, AgentProfilePermissions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, BUDGET_ABORT_REASON, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, 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, ChildIdentityInput, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostReport, CreateEngineOptions, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, 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, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DerivedKey, DeriverRegistry, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINISH_SCHEMA, FINISH_TOOL_NAME, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, InvocationRole, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, 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_DEPTH_CEILING, MatchResult, McpConfig, MechanicalGateProfile, MechanicalGateVerdict, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateOptions, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, type Pricing, type ProviderAdapter, QualityFloors, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RandIdentityInput, RandPayload, RefEntryAppender, RefEntryClassification, RefusalInfo, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunBudget, RunEventSink, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStatus, RuntimeEventSink, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, Semaphore, SerializationHook, Settled, 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, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, 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, agentErrorFromWire, agentErrorToWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, atCompactionThreshold, 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, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, escalateTool, evaluatePermission, evaluateReuse, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
5980
+ export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, AgentOpts, AgentProfile, AgentProfilePermissions, AgentResult, AgentResultMeta, AgentStatus, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, BUDGET_ABORT_REASON, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, 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, ChildIdentityInput, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostReport, CreateEngineOptions, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, 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, DebitResult, DeclaredLadder, DedupIndex, DedupNote, DerivedKey, DeriverRegistry, DispositionRule, DispositionTable, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINISH_SCHEMA, FINISH_TOOL_NAME, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, INBOX_PROPOSAL_TTL_DAYS, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, InvocationRole, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, 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_DEPTH_CEILING, MatchResult, McpConfig, MechanicalGateProfile, MechanicalGateVerdict, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateOptions, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, type Pricing, type ProviderAdapter, QualityFloors, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RandIdentityInput, RandPayload, RefEntryAppender, RefEntryClassification, RefusalInfo, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunBudget, RunEventSink, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStatus, RuntimeEventSink, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, Semaphore, SerializationHook, Settled, 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, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, 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, agentErrorFromWire, agentErrorToWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, atCompactionThreshold, 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, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, escalateTool, evaluatePermission, evaluateReuse, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
package/dist/index.js CHANGED
@@ -348,7 +348,7 @@ const PINNED_FIELDS = [
348
348
  "status"
349
349
  ];
350
350
  function assertPinnedFields(before, after, site) {
351
- for (const field of PINNED_FIELDS) if (before[field] !== after[field]) throw new ConfigError(`serialization hook ${site} modified the kernel field '${field}' (docs/03, 12.8: ordering and identity fields MUST pass through unmodified)`);
351
+ for (const field of PINNED_FIELDS) if (before[field] !== after[field]) throw new ConfigError(`serialization hook ${site} modified the kernel field '${field}' (ordering and identity fields MUST pass through unmodified)`);
352
352
  }
353
353
  /** Wraps a journal store with the hook; lease capability is preserved. */
354
354
  function wrapJournalStore(inner, hook) {
@@ -1602,11 +1602,11 @@ function findAnchor(node, anchor) {
1602
1602
  }
1603
1603
  function canonicalizeNode(node, root, refStack) {
1604
1604
  if (typeof node === "boolean") return node;
1605
- if ("$dynamicRef" in node || "$dynamicAnchor" in node) throw new ConfigError("Dynamic references ($dynamicRef/$dynamicAnchor) are forbidden in rulvar schemas (docs/03, section \"schemaHash and toolsetHash derivation\")");
1605
+ if ("$dynamicRef" in node || "$dynamicAnchor" in node) throw new ConfigError("Dynamic references ($dynamicRef/$dynamicAnchor) are forbidden in rulvar schemas ");
1606
1606
  const ref = node.$ref;
1607
1607
  if (typeof ref === "string") {
1608
- if (!ref.startsWith("#")) throw new ConfigError(`Remote $ref '${ref}' is forbidden in rulvar schemas; only fragment-only local references resolve (docs/03, section "schemaHash and toolsetHash derivation")`);
1609
- if (refStack.includes(ref)) throw new ConfigError(`Recursive local $ref '${ref}' cannot be inlined; recursive schemas are not canonicalizable (docs/03, section "schemaHash and toolsetHash derivation")`);
1608
+ if (!ref.startsWith("#")) throw new ConfigError(`Remote $ref '${ref}' is forbidden in rulvar schemas; only fragment-only local references resolve`);
1609
+ if (refStack.includes(ref)) throw new ConfigError(`Recursive local $ref '${ref}' cannot be inlined; recursive schemas are not canonicalizable`);
1610
1610
  const target = ref.startsWith("#/") ? resolvePointer(root, ref.slice(1)) : ref === "#" ? root : findAnchor(root, ref.slice(1));
1611
1611
  if (target === void 0 || typeof target !== "object" && typeof target !== "boolean") throw new ConfigError(`Local $ref '${ref}' does not resolve to a schema`);
1612
1612
  refStack.push(ref);
@@ -1847,6 +1847,16 @@ function archiveDeprecatedModelOps(claims, deprecated) {
1847
1847
  * - statements stay bounded, evidence stays mandatory, TTL fields stay
1848
1848
  * coherent.
1849
1849
  */
1850
+ /**
1851
+ * The typed statement template for a proposal-born claim (phase 3):
1852
+ * assembled over the closed enum vocabulary ONLY, so tool-output text
1853
+ * is unquotable into persistence, and model-free, because a claim
1854
+ * statement renders into the knowledge card's notes layer, which never
1855
+ * leaks model names to the orchestrator.
1856
+ */
1857
+ function proposalStatement(proposal) {
1858
+ return `orchestrator-observed ${proposal.polarity} on ${proposal.taskClass}: trigger ${proposal.trigger}`;
1859
+ }
1850
1860
  /** Appendix A: KB active-claims cap, default 8 per (model, taskClass). */
1851
1861
  const KB_ACTIVE_CLAIMS_CAP = 8;
1852
1862
  /** The committed data model bound: statement <= 200 chars. */
@@ -1869,7 +1879,7 @@ function gateIssues(gate, path) {
1869
1879
  return issues;
1870
1880
  }
1871
1881
  const ruledOut = gate.attribution?.ruledOut;
1872
- if (!Array.isArray(ruledOut) || ruledOut.length === 0) issues.push(`${path}: the human gate requires the attribution attestation (a non-empty ruledOut checklist; docs/05, section "The human gate")`);
1882
+ if (!Array.isArray(ruledOut) || ruledOut.length === 0) issues.push(`${path}: the human gate requires the attribution attestation (a non-empty ruledOut checklist)`);
1873
1883
  else for (const entry of ruledOut) if (typeof entry !== "string" || !RULED_OUT_VOCABULARY.has(entry)) issues.push(`${path}: ruledOut entry '${String(entry)}' is outside the checklist`);
1874
1884
  if (typeof gate.approver !== "string" || gate.approver.length === 0) issues.push(`${path}: the human gate requires an approver`);
1875
1885
  return issues;
@@ -1887,8 +1897,8 @@ function claimIssues(claim, path, options) {
1887
1897
  if (Number.isNaN(Date.parse(claim.expiresAt))) issues.push(`${path}: expiresAt is not a date`);
1888
1898
  else if (!Number.isNaN(Date.parse(claim.observedAt)) && Date.parse(claim.expiresAt) <= Date.parse(claim.observedAt)) issues.push(`${path}: expiresAt must follow observedAt`);
1889
1899
  if (options?.evalCommitter !== true) {
1890
- if (claim.class === "eval-measured") issues.push(`${path}: eval-measured claims are committable only under the eval-committer gate (the eval-committer identity; docs/05, 5.4); the editorial path carries human-editorial only`);
1891
- if (claim.metrics !== void 0) issues.push(`${path}: the metrics block is writable only by the eval-committer identity (docs/05, security channel 4)`);
1900
+ if (claim.class === "eval-measured") issues.push(`${path}: eval-measured claims are committable only under the eval-committer gate (the eval-committer identity); the editorial path carries human-editorial only`);
1901
+ if (claim.metrics !== void 0) issues.push(`${path}: the metrics block is writable only by the eval-committer identity `);
1892
1902
  }
1893
1903
  if (options?.evalCommitter === true && claim.class === "eval-measured") {
1894
1904
  if (claim.metrics === void 0) issues.push(`${path}: an eval-measured claim carries its metrics block`);
@@ -1937,7 +1947,7 @@ function capIssues(claims, cap = 8) {
1937
1947
  counts.set(key, (counts.get(key) ?? 0) + 1);
1938
1948
  }
1939
1949
  const issues = [];
1940
- for (const [key, count] of counts) if (count > cap) issues.push(`active claims for (${key}) would reach ${String(count)}, over the cap ${String(cap)} (docs/06, Appendix A); supersede or archive first`);
1950
+ for (const [key, count] of counts) if (count > cap) issues.push(`active claims for (${key}) would reach ${String(count)}, over the cap ${String(cap)}; supersede or archive first`);
1941
1951
  return issues.sort();
1942
1952
  }
1943
1953
  /**
@@ -2127,10 +2137,10 @@ function checkFloors(options) {
2127
2137
  const { ref, role, floors, taskClass } = options;
2128
2138
  if (floors === void 0) return;
2129
2139
  const roleViolation = violates(ref, floors.byRole?.[role]);
2130
- if (roleViolation !== void 0) throw new ConfigError(`quality floor violation: '${ref}' is floored out for role '${role}' (${roleViolation}); floors are hard router constraints (docs/04, section 9)`);
2140
+ if (roleViolation !== void 0) throw new ConfigError(`quality floor violation: '${ref}' is floored out for role '${role}' (${roleViolation}); floors are hard router constraints`);
2131
2141
  if (taskClass !== void 0) {
2132
2142
  const classViolation = violates(ref, floors.byTaskClass?.[taskClass]);
2133
- if (classViolation !== void 0) throw new ConfigError(`quality floor violation: '${ref}' is floored out for taskClass '${taskClass}' (${classViolation}); floors are hard router constraints (docs/04, section 9)`);
2143
+ if (classViolation !== void 0) throw new ConfigError(`quality floor violation: '${ref}' is floored out for taskClass '${taskClass}' (${classViolation}); floors are hard router constraints`);
2134
2144
  }
2135
2145
  }
2136
2146
  //#endregion
@@ -2513,7 +2523,7 @@ const TOOL_NAME_PATTERN = /^[a-zA-Z0-9_-]{1,64}$/;
2513
2523
  * reference all fail here.
2514
2524
  */
2515
2525
  function tool(init) {
2516
- if (!TOOL_NAME_PATTERN.test(init.name)) throw new ConfigError(`tool name '${init.name}' must match ^[a-zA-Z0-9_-]{1,64}$ (docs/08, section "tool() definition and ToolDef")`);
2526
+ if (!TOOL_NAME_PATTERN.test(init.name)) throw new ConfigError(`tool name '${init.name}' must match ^[a-zA-Z0-9_-]{1,64}$ (https://docs.rulvar.com/guide/tools)`);
2517
2527
  canonicalizeSchema(projectToJsonSchema(init.parameters));
2518
2528
  return {
2519
2529
  kind: "tool",
@@ -2573,7 +2583,7 @@ async function resolveToolset(specs, session) {
2573
2583
  if (specs === void 0 || specs.length === 0) return emptyToolset();
2574
2584
  const tools = [];
2575
2585
  for (const spec of specs) {
2576
- if (typeof spec === "string") throw new ConfigError(`tools by registered name ('${spec}') resolve only inside the worker sandbox; name-based tool registries land with compileScript in M6 (docs/06, section "Script runners")`);
2586
+ if (typeof spec === "string") throw new ConfigError(`tools by registered name ('${spec}') resolve only inside the worker sandbox; name-based tool registries exist for compiled scripts only (https://docs.rulvar.com/guide/planner)`);
2577
2587
  if (isToolDef(spec)) {
2578
2588
  tools.push(spec);
2579
2589
  continue;
@@ -2583,9 +2593,9 @@ async function resolveToolset(specs, session) {
2583
2593
  }
2584
2594
  const seen = /* @__PURE__ */ new Map();
2585
2595
  for (const def of tools) {
2586
- if (!TOOL_NAME_PATTERN.test(def.name)) throw new ConfigError(`imported tool name '${def.name}' must match ^[a-zA-Z0-9_-]{1,64}$; namespace it with the source prefix option (docs/08, section 6.4)`);
2587
- if (seen.has(def.name)) throw new ConfigError(`duplicate tool name '${def.name}' in one toolset; disambiguate with the MCP prefix option (docs/08, sections 1.1 and 6.4)`);
2588
- if (def.executor !== "inprocess") throw new ConfigError(`tool '${def.name}' declares executor '${def.executor}', but this engine implements only 'inprocess' in v1 (docs/08, section 7.1)`);
2596
+ if (!TOOL_NAME_PATTERN.test(def.name)) throw new ConfigError(`imported tool name '${def.name}' must match ^[a-zA-Z0-9_-]{1,64}$; namespace it with the source prefix option`);
2597
+ if (seen.has(def.name)) throw new ConfigError(`duplicate tool name '${def.name}' in one toolset; disambiguate with the MCP prefix option`);
2598
+ if (def.executor !== "inprocess") throw new ConfigError(`tool '${def.name}' declares executor '${def.executor}', but this engine implements only 'inprocess' in v1`);
2589
2599
  seen.set(def.name, def);
2590
2600
  }
2591
2601
  const contracts = tools.map((def) => toolContract(def));
@@ -2627,7 +2637,7 @@ function buildToolContext(seed) {
2627
2637
  */
2628
2638
  function validateConfig(cfg) {
2629
2639
  const forbid = (key) => {
2630
- if (cfg[key] !== void 0) throw new ConfigError(`mcp: '${key}' is not a config key of the '${cfg.transport}' transport (docs/08, section 6.2: exactly the keys matching the chosen transport)`);
2640
+ if (cfg[key] !== void 0) throw new ConfigError(`mcp: '${key}' is not a config key of the '${cfg.transport}' transport (exactly the keys matching the chosen transport)`);
2631
2641
  };
2632
2642
  switch (cfg.transport) {
2633
2643
  case "stdio":
@@ -2722,7 +2732,7 @@ function mcp(cfg) {
2722
2732
  };
2723
2733
  const toDef = (client, wire) => {
2724
2734
  const name = cfg.prefix === void 0 ? wire.name : `${cfg.prefix}_${wire.name}`;
2725
- if (!TOOL_NAME_PATTERN.test(name)) throw new ConfigError(`mcp: imported tool name '${name}' must match ^[a-zA-Z0-9_-]{1,64}$ (docs/08, section 6.4)`);
2735
+ if (!TOOL_NAME_PATTERN.test(name)) throw new ConfigError(`mcp: imported tool name '${name}' must match ^[a-zA-Z0-9_-]{1,64}$ `);
2726
2736
  const risk = cfg.risk?.[wire.name];
2727
2737
  return tool({
2728
2738
  name,
@@ -2816,7 +2826,7 @@ var GitWorktreeProvider = class {
2816
2826
  try {
2817
2827
  await git(this.repoRoot, ["rev-parse", "--git-common-dir"]);
2818
2828
  } catch {
2819
- throw new ConfigError(`worktree isolation requires a git repository at '${this.repoRoot}' (docs/08, section 8.3)`);
2829
+ throw new ConfigError(`worktree isolation requires a git repository at '${this.repoRoot}' `);
2820
2830
  }
2821
2831
  const dir = await mkdtemp(join(tmpdir(), `rulvar-wt-${spawn.runId.slice(0, 8)}-`));
2822
2832
  await git(this.repoRoot, [
@@ -2850,7 +2860,7 @@ var GitWorktreeProvider = class {
2850
2860
  this.pinned.add(dir);
2851
2861
  return;
2852
2862
  }
2853
- this.onWarn(`worktree pin cap (${this.maxPinned}) reached; dropping the tree of a failed agent instead of retaining it (docs/08, section 8.4)`);
2863
+ this.onWarn(`worktree pin cap (${this.maxPinned}) reached; dropping the tree of a failed agent instead of retaining it`);
2854
2864
  }
2855
2865
  try {
2856
2866
  await git(this.repoRoot, [
@@ -3165,7 +3175,7 @@ function isKeyDeriver(value) {
3165
3175
  function buildDeriverRegistry(extraDerivers) {
3166
3176
  const registry = /* @__PURE__ */ new Map([[deriverV1.hashVersion, deriverV1], [deriverV2.hashVersion, deriverV2]]);
3167
3177
  for (const extra of extraDerivers ?? []) {
3168
- if (!isKeyDeriver(extra)) throw new ConfigError("extraDerivers entries must implement the KeyDeriver SPI (docs/03, section 4.2)");
3178
+ if (!isKeyDeriver(extra)) throw new ConfigError("extraDerivers entries must implement the KeyDeriver SPI");
3169
3179
  registry.set(extra.hashVersion, extra);
3170
3180
  }
3171
3181
  return registry;
@@ -3362,7 +3372,7 @@ const DEFAULT_ESCALATION_LIMITS = {
3362
3372
  * change semantics (per logical task, not per node).
3363
3373
  */
3364
3374
  function validateEscalationLimits(raw) {
3365
- if (raw !== void 0 && "maxEscalationsPerNode" in raw) throw new ConfigError("config knob 'maxEscalationsPerNode' was renamed: escalations are counted per logical task across respawns via the lineage chain; use 'maxEscalationsPerLogicalTask' (XF-10; docs/07, section 6.5)");
3375
+ if (raw !== void 0 && "maxEscalationsPerNode" in raw) throw new ConfigError("config knob 'maxEscalationsPerNode' was renamed: escalations are counted per logical task across respawns via the lineage chain; use 'maxEscalationsPerLogicalTask' (XF-10)");
3366
3376
  const limits = { ...DEFAULT_ESCALATION_LIMITS };
3367
3377
  if (raw?.maxEscalationsPerLogicalTask !== void 0) limits.maxEscalationsPerLogicalTask = requireCount(raw.maxEscalationsPerLogicalTask, "maxEscalationsPerLogicalTask");
3368
3378
  if (raw?.maxAttemptsPerLogicalTask !== void 0) limits.maxAttemptsPerLogicalTask = requireCount(raw.maxAttemptsPerLogicalTask, "maxAttemptsPerLogicalTask");
@@ -3840,7 +3850,7 @@ function profileRegistrySnapshotHash(profiles) {
3840
3850
  * must be non-negative integers; kMax at least 1.
3841
3851
  */
3842
3852
  function validateTerminationLimits(raw) {
3843
- if ("maxEscalationsPerNode" in raw) throw new ConfigError("config knob 'maxEscalationsPerNode' was renamed: escalations are counted per logical task across respawns via the lineage chain; use 'maxEscalationsPerLogicalTask' (XF-10; docs/07, section 6.5)");
3853
+ if ("maxEscalationsPerNode" in raw) throw new ConfigError("config knob 'maxEscalationsPerNode' was renamed: escalations are counted per logical task across respawns via the lineage chain; use 'maxEscalationsPerLogicalTask' (XF-10)");
3844
3854
  const record = raw;
3845
3855
  const count = (name, fallback) => {
3846
3856
  const value = record[name] ?? fallback;
@@ -3980,7 +3990,7 @@ var TerminationAccount = class {
3980
3990
  };
3981
3991
  if (lineage !== void 0) {
3982
3992
  const ladderLength = lineage.ladderLength ?? 1;
3983
- if (ladderLength > this.limits.kMax) throw new ConfigError(`ladder length ${String(ladderLength)} exceeds the frozen kMax ${String(this.limits.kMax)}; admit() must reject with ladder_exceeds_frozen before debiting (docs/07, 11.8)`);
3993
+ if (ladderLength > this.limits.kMax) throw new ConfigError(`ladder length ${String(ladderLength)} exceeds the frozen kMax ${String(this.limits.kMax)}; admit() must reject with ladder_exceeds_frozen before debiting`);
3984
3994
  if (lineage.isNew && !this.lineages.has(lineage.logicalTaskId)) this.lineages.set(lineage.logicalTaskId, {
3985
3995
  escalationUnitsRemaining: this.limits.maxEscalationsPerLogicalTask,
3986
3996
  rungsRemaining: ladderLength - 1,
@@ -4057,7 +4067,7 @@ var TerminationAccount = class {
4057
4067
  async debit(resource, lineage, context) {
4058
4068
  const attempt = this.tryDebit(resource, lineage);
4059
4069
  if (attempt.ok) return attempt;
4060
- if (this.deniedWriter === void 0) throw new ConfigError(`termination debit of ${resource} underflowed and no deniedWriter is bound; the denied entry MUST precede the surfaced error (docs/07, 11.3)`);
4070
+ if (this.deniedWriter === void 0) throw new ConfigError(`termination debit of ${resource} underflowed and no deniedWriter is bound; the denied entry MUST precede the surfaced error`);
4061
4071
  return {
4062
4072
  ok: false,
4063
4073
  deniedEntryRef: await this.deniedWriter({
@@ -4164,7 +4174,7 @@ function foldTermination(entries) {
4164
4174
  /** First-closing-wins over resolution targets (DEF-4): losers never debit. */
4165
4175
  const closedTargets = /* @__PURE__ */ new Set();
4166
4176
  const assertBalance = (entry, what, embedded, recomputed) => {
4167
- if (typeof embedded === "number" && embedded !== recomputed) throw new PlanInvariantError(`termination fold divergence at seq ${String(entry.seq)}: ${what} recomputes to ${String(recomputed)} but the entry embeds ${String(embedded)} (docs/07, 11.6: the debit fold is authoritative)`, { data: {
4177
+ if (typeof embedded === "number" && embedded !== recomputed) throw new PlanInvariantError(`termination fold divergence at seq ${String(entry.seq)}: ${what} recomputes to ${String(recomputed)} but the entry embeds ${String(embedded)} (the debit fold is authoritative)`, { data: {
4168
4178
  entryRef: entry.seq,
4169
4179
  what,
4170
4180
  embedded,
@@ -4702,7 +4712,7 @@ function validateEntryShape(entry) {
4702
4712
  return issues;
4703
4713
  }
4704
4714
  const legal = LEGAL_STATUSES[entry.kind];
4705
- if (legal !== void 0 && !legal.includes(entry.status)) issues.push(issue(`status '${entry.status}' is not legal for kind '${entry.kind}' (docs/03 section 5.3)`));
4715
+ if (legal !== void 0 && !legal.includes(entry.status)) issues.push(issue(`status '${entry.status}' is not legal for kind '${entry.kind}'`));
4706
4716
  if (entry.status === "skipped") issues.push(issue("'skipped' is a derived fold status and is never persisted"));
4707
4717
  if (REF_ENTRY_KINDS$1.has(entry.kind)) {
4708
4718
  if (entry.ref === void 0) issues.push(issue(`ref-entry kind '${entry.kind}' requires ref (the target seq)`));
@@ -4724,10 +4734,10 @@ function validateEntryShape(entry) {
4724
4734
  if (payload === void 0 || typeof payload.decisionType !== "string") issues.push(issue("decision entries carry a decisionType discriminator", ["value"]));
4725
4735
  }
4726
4736
  if (entry.kind === "external" || entry.kind === "approval") {
4727
- if (entry.kind === "external" && entry.deadlineAt !== void 0) issues.push(issue("awaitExternal has NO deadline in v1 (docs/03 section 8.1)"));
4737
+ if (entry.kind === "external" && entry.deadlineAt !== void 0) issues.push(issue("awaitExternal has NO deadline in v1"));
4728
4738
  }
4729
4739
  if (entry.deadlineAt !== void 0 && entry.status !== "suspended") issues.push(issue("deadlineAt is legal only on suspended entries"));
4730
- if (entry.status === "escalated" && entry.escalation === void 0) issues.push(issue("terminal escalated entries carry the validated EscalationReport (docs/03 5.4)"));
4740
+ if (entry.status === "escalated" && entry.escalation === void 0) issues.push(issue("terminal escalated entries carry the validated EscalationReport"));
4731
4741
  if (entry.escalation !== void 0 && entry.status !== "escalated") issues.push(issue("the escalation payload is legal only on status 'escalated'"));
4732
4742
  return issues;
4733
4743
  }
@@ -5628,7 +5638,7 @@ var ExternalRegistry = class ExternalRegistry {
5628
5638
  */
5629
5639
  async awaitExternal(scope, spanId, key, options) {
5630
5640
  const scopeKey = `${scope}${key}`;
5631
- if (this.keysByScope.has(scopeKey)) throw new ConfigError(`duplicate awaitExternal key '${key}' in scope '${scope}' (docs/03, section 8.1)`);
5641
+ if (this.keysByScope.has(scopeKey)) throw new ConfigError(`duplicate awaitExternal key '${key}' in scope '${scope}'`);
5632
5642
  this.keysByScope.add(scopeKey);
5633
5643
  const identity = {
5634
5644
  kind: "external",
@@ -6768,7 +6778,7 @@ function resolveModelInvocation(options) {
6768
6778
  if (fields.ladder !== void 0) delete merged.model;
6769
6779
  else if (fields.model !== void 0) delete merged.ladder;
6770
6780
  }
6771
- if (merged.ladder !== void 0) throw new ConfigError(`a ladder ModelSpec wins wire resolution for role '${role}': ladder execution is owned by the PlanRunner ladder driver, which resolves each rung attempt to a concrete model override (docs/07, section 10); dispatch laddered profiles through orchestratePlanned or pass a plain ModelRef or ModelChoice`);
6781
+ if (merged.ladder !== void 0) throw new ConfigError(`a ladder ModelSpec wins wire resolution for role '${role}': ladder execution is owned by the PlanRunner ladder driver, which resolves each rung attempt to a concrete model override; dispatch laddered profiles through orchestratePlanned or pass a plain ModelRef or ModelChoice`);
6772
6782
  if (merged.model === void 0) throw new ConfigError(`no model resolves for role '${role}': set AgentOpts.model, a profile model, or engine defaults.routing`);
6773
6783
  checkFloors({
6774
6784
  ref: merged.model,
@@ -6837,7 +6847,7 @@ const TRIGGER_CLASSES = [
6837
6847
  ];
6838
6848
  function validateGate(gate, rungCount, index) {
6839
6849
  if (gate.kind === "mechanical") {
6840
- if (typeof gate.profile !== "string" || gate.profile === "") throw new ConfigError(`ladder acceptance gate ${String(index)}: a mechanical gate names a registered gate profile (docs/04, section 12)`);
6850
+ if (typeof gate.profile !== "string" || gate.profile === "") throw new ConfigError(`ladder acceptance gate ${String(index)}: a mechanical gate names a registered gate profile`);
6841
6851
  return;
6842
6852
  }
6843
6853
  if (gate.kind === "judge") {
@@ -6859,16 +6869,16 @@ function validateGate(gate, rungCount, index) {
6859
6869
  * member by declaration).
6860
6870
  */
6861
6871
  function canonicalizeLadder(spec, options) {
6862
- if (!Array.isArray(spec.rungs) || spec.rungs.length === 0) throw new ConfigError("a ladder declares at least one rung (docs/04, section 12)");
6872
+ if (!Array.isArray(spec.rungs) || spec.rungs.length === 0) throw new ConfigError("a ladder declares at least one rung");
6863
6873
  if (!Number.isInteger(spec.startTier) || spec.startTier < 0 || spec.startTier >= spec.rungs.length) throw new ConfigError(`ladder startTier ${String(spec.startTier)} is not a declared rung index of a ${String(spec.rungs.length)}-rung ladder`);
6864
- for (const trigger of spec.escalateOn) if (!TRIGGER_CLASSES.includes(trigger)) throw new ConfigError(`unknown ladder trigger '${String(trigger)}': the vocabulary is closed to ${TRIGGER_CLASSES.join(", ")} (docs/04, section 12)`);
6874
+ for (const trigger of spec.escalateOn) if (!TRIGGER_CLASSES.includes(trigger)) throw new ConfigError(`unknown ladder trigger '${String(trigger)}': the vocabulary is closed to ${TRIGGER_CLASSES.join(", ")}`);
6865
6875
  const rungs = spec.rungs.map((rung, index) => {
6866
6876
  parseModelRef(rung.model);
6867
6877
  if (!Number.isInteger(rung.maxTurns) || rung.maxTurns <= 0) throw new ConfigError(`ladder rung ${String(index)}: maxTurns is a positive integer`);
6868
6878
  if (!Number.isInteger(rung.maxTokens) || rung.maxTokens <= 0) throw new ConfigError(`ladder rung ${String(index)}: maxTokens is a positive integer`);
6869
6879
  if (rung.maxCostUsd !== void 0 && !(rung.maxCostUsd > 0)) throw new ConfigError(`ladder rung ${String(index)}: maxCostUsd is positive when present`);
6870
6880
  const effort = rung.effort ?? options?.chainEffort;
6871
- if (effort === void 0) throw new ConfigError(`ladder rung ${String(index)} resolves no effort: the canonical ladder embeds explicit efforts (docs/04, section 8.2); declare rung.effort or a chain effort`);
6881
+ if (effort === void 0) throw new ConfigError(`ladder rung ${String(index)} resolves no effort: the canonical ladder embeds explicit efforts; declare rung.effort or a chain effort`);
6872
6882
  return {
6873
6883
  model: rung.model,
6874
6884
  effort,
@@ -8648,7 +8658,7 @@ var RunBudget = class {
8648
8658
  let cursor = scope;
8649
8659
  while (cursor !== void 0) {
8650
8660
  const account = this.accounts.get(cursor);
8651
- if (account === void 0) throw new ConfigError(`unknown budget account '${cursor}': openAccount precedes any charge (docs/06, 5.4)`);
8661
+ if (account === void 0) throw new ConfigError(`unknown budget account '${cursor}': openAccount precedes any charge`);
8652
8662
  chain.push(account);
8653
8663
  cursor = account.parentScope;
8654
8664
  }
@@ -8902,7 +8912,7 @@ var AdmissionController = class {
8902
8912
  admittedTotal = 0;
8903
8913
  constructor(options) {
8904
8914
  const maxDepth = options.maxDepth ?? 1;
8905
- if (maxDepth < 1 || maxDepth > 4) throw new ConfigError(`maxDepth ${String(maxDepth)} is outside [1, ${String(4)}] (docs/06, Appendix A: default 1, hard ceiling 4)`);
8915
+ if (maxDepth < 1 || maxDepth > 4) throw new ConfigError(`maxDepth ${String(maxDepth)} is outside [1, ${String(4)}] (default 1, hard ceiling 4)`);
8906
8916
  this.budget = options.budget;
8907
8917
  this.maxDepth = maxDepth;
8908
8918
  this.maxChildrenPerNode = options.maxChildrenPerNode ?? 16;
@@ -8934,7 +8944,7 @@ var AdmissionController = class {
8934
8944
  * keep the engine lifetime cap semantics unchanged.
8935
8945
  */
8936
8946
  bindTermination(account) {
8937
- if (this.terminationAccount !== void 0 && this.terminationAccount !== account) throw new ConfigError("one run carries exactly one TerminationAccount (docs/07, 11.2)");
8947
+ if (this.terminationAccount !== void 0 && this.terminationAccount !== account) throw new ConfigError("one run carries exactly one TerminationAccount");
8938
8948
  this.terminationAccount = account;
8939
8949
  }
8940
8950
  /** The bound account, when this is a PlanRunner run (DEF-2). */
@@ -8950,7 +8960,7 @@ var AdmissionController = class {
8950
8960
  * (`lineage_exhausted`); never touches budget or structural limits.
8951
8961
  */
8952
8962
  evaluateLineage(spec) {
8953
- if (spec.lineage !== void 0 && typeof spec.lineage.causeRef !== "number") throw new ConfigError("a lineage continuation demands a causeRef: the seq of the entry that caused the rebirth (docs/03, 10.1, rule 2)");
8963
+ if (spec.lineage !== void 0 && typeof spec.lineage.causeRef !== "number") throw new ConfigError("a lineage continuation demands a causeRef: the seq of the entry that caused the rebirth");
8954
8964
  const index = this.lineage();
8955
8965
  const continued = spec.lineage?.continues;
8956
8966
  const statsBefore = index !== void 0 && continued !== void 0 ? index.statsOf(continued) : void 0;
@@ -9661,7 +9671,7 @@ function createCtx(internals) {
9661
9671
  });
9662
9672
  };
9663
9673
  const isolation = opts.isolation ?? profile?.isolation ?? "none";
9664
- if (typeof isolation === "object" && isolation.kind === "worktree" && internals.isolation === void 0) throw new ConfigError("worktree isolation requires an IsolationProvider: pass defaults.isolation to createEngine (docs/08, section 8.2)");
9674
+ if (typeof isolation === "object" && isolation.kind === "worktree" && internals.isolation === void 0) throw new ConfigError("worktree isolation requires an IsolationProvider: pass defaults.isolation to createEngine");
9665
9675
  const floorContext = {
9666
9676
  ...internals.floors === void 0 ? {} : { floors: internals.floors },
9667
9677
  ...profile?.taskClass === void 0 ? {} : { taskClass: profile.taskClass }
@@ -9707,9 +9717,9 @@ function createCtx(internals) {
9707
9717
  }
9708
9718
  const escalation = opts.escalation ?? profile?.escalation;
9709
9719
  if (escalation !== void 0) {
9710
- if (escalation.flavor === "B" && escalation.deadlineMs === void 0) throw new ConfigError("flavor 'B' escalation requires an explicit deadlineMs: the suspension deadline has no engine default (docs/06, Appendix A; docs/07, section 6.2)");
9720
+ if (escalation.flavor === "B" && escalation.deadlineMs === void 0) throw new ConfigError("flavor 'B' escalation requires an explicit deadlineMs: the suspension deadline has no engine default");
9711
9721
  if (opts.result !== "full" && internals.onEscalation === void 0) throw new ConfigError("a spawn that opts into escalation from a plain value-form call needs an onEscalation hook (or use result: 'full')");
9712
- if (escalation.flavor === "B" && escalation.deadlineMs === void 0) throw new ConfigError("escalation flavor 'B' requires an explicit deadlineMs (docs/06, Appendix A)");
9722
+ if (escalation.flavor === "B" && escalation.deadlineMs === void 0) throw new ConfigError("escalation flavor 'B' requires an explicit deadlineMs");
9713
9723
  }
9714
9724
  const declaredTools = opts.tools ?? profile?.tools ?? [];
9715
9725
  const toolset = await resolveToolset(escalation === void 0 ? declaredTools : [...declaredTools, escalateTool()], { runId: internals.runId });
@@ -10215,7 +10225,7 @@ function createCtx(internals) {
10215
10225
  if (internals.external === void 0) throw new ConfigError("flavor B escalation requires the engine run context");
10216
10226
  const request = result.escalationRequest;
10217
10227
  const deadlineMs = escalation.deadlineMs;
10218
- if (deadlineMs === void 0) throw new ConfigError("flavor 'B' escalation requires an explicit deadlineMs (docs/06, Appendix A)");
10228
+ if (deadlineMs === void 0) throw new ConfigError("flavor 'B' escalation requires an explicit deadlineMs");
10219
10229
  const defaultDecision = escalation.defaultDecision ?? { kind: "accept" };
10220
10230
  let timer;
10221
10231
  const decisionOutcome = await internals.external.awaitDecision({
@@ -10540,9 +10550,9 @@ function createCtx(internals) {
10540
10550
  let name;
10541
10551
  if (typeof wfOrName === "string") {
10542
10552
  const registered = internals.defaults.workflows?.[wfOrName];
10543
- if (registered === void 0) throw new ConfigError(`unknown workflow '${wfOrName}': register it under defaults.workflows (docs/06, 10.4)`);
10553
+ if (registered === void 0) throw new ConfigError(`unknown workflow '${wfOrName}': register it under defaults.workflows`);
10544
10554
  const candidate = registered;
10545
- if (candidate.kind !== "workflow") throw new ConfigError(`registry entry '${wfOrName}' is not a defineWorkflow value (docs/06, 10.4)`);
10555
+ if (candidate.kind !== "workflow") throw new ConfigError(`registry entry '${wfOrName}' is not a defineWorkflow value`);
10546
10556
  wf = candidate;
10547
10557
  name = wfOrName;
10548
10558
  } else {
@@ -10871,12 +10881,12 @@ function resolveDispatchOpts(spec, defaults) {
10871
10881
  const opts = {};
10872
10882
  if (spec.outputSchemaRef !== void 0) {
10873
10883
  const schema = defaults.schemas?.[spec.outputSchemaRef];
10874
- if (schema === void 0) throw new ConfigError(`unknown outputSchemaRef '${spec.outputSchemaRef}': register it under defaults.schemas (docs/08, section "SchemaSpec"; docs/07, 4.2)`);
10884
+ if (schema === void 0) throw new ConfigError(`unknown outputSchemaRef '${spec.outputSchemaRef}': register it under defaults.schemas`);
10875
10885
  opts.schema = schema;
10876
10886
  }
10877
10887
  if (spec.toolsetRef !== void 0) {
10878
10888
  const tools = defaults.toolsets?.[spec.toolsetRef];
10879
- if (tools === void 0) throw new ConfigError(`unknown toolsetRef '${spec.toolsetRef}': register it under defaults.toolsets (docs/08, section "tool() definition"; docs/07, 4.2)`);
10889
+ if (tools === void 0) throw new ConfigError(`unknown toolsetRef '${spec.toolsetRef}': register it under defaults.toolsets (https://docs.rulvar.com/guide/tools)`);
10880
10890
  opts.tools = tools;
10881
10891
  }
10882
10892
  const extended = spec;
@@ -10926,16 +10936,16 @@ function makeOrchestratorWorkflow(goal, opts) {
10926
10936
  const runCeiling = internals.budget.accountView(callingState.budgetScope ?? "run")?.ceilingUsd;
10927
10937
  const spec = opts?.budget;
10928
10938
  const fraction = spec?.capFraction ?? .2;
10929
- if (fraction > 1) throw new OrchestratorCapConfigError(`capFraction ${String(fraction)} exceeds 1.0 (docs/07, 12.2: opting out of the cap is explicit only, up to 1.0 inclusive)`);
10939
+ if (fraction > 1) throw new OrchestratorCapConfigError(`capFraction ${String(fraction)} exceeds 1.0 (opting out of the cap is explicit only, up to 1.0 inclusive)`);
10930
10940
  const fromFraction = runCeiling === void 0 ? void 0 : fraction * runCeiling;
10931
10941
  const bounds = [spec?.capUsd, fromFraction].filter((bound) => bound !== void 0);
10932
- if (extension !== void 0 && bounds.length === 0) throw new OrchestratorCapConfigError("the orchestrator cap is unresolvable: the run has no USD ceiling and no explicit budget.capUsd; PlanRunner requires a resolved effectiveCap (docs/07, 12.2)");
10942
+ if (extension !== void 0 && bounds.length === 0) throw new OrchestratorCapConfigError("the orchestrator cap is unresolvable: the run has no USD ceiling and no explicit budget.capUsd; PlanRunner requires a resolved effectiveCap");
10933
10943
  if (bounds.length > 0) {
10934
10944
  const effectiveCapUsd = Math.min(...bounds);
10935
10945
  const turnEstimateUsd = internals.flatReserveUsd ?? .5;
10936
10946
  const finalizeTurns = spec?.finalizeTurns ?? 2;
10937
10947
  const finalizeReserveUsd = spec?.finalizeReserveUsd ?? finalizeTurns * turnEstimateUsd;
10938
- if (extension !== void 0 && effectiveCapUsd < finalizeReserveUsd) throw new OrchestratorCapConfigError(`effectiveCap ${effectiveCapUsd.toFixed(4)} USD is below the finalize reserve ${finalizeReserveUsd.toFixed(4)} USD (docs/07, 12.2)`);
10948
+ if (extension !== void 0 && effectiveCapUsd < finalizeReserveUsd) throw new OrchestratorCapConfigError(`effectiveCap ${effectiveCapUsd.toFixed(4)} USD is below the finalize reserve ${finalizeReserveUsd.toFixed(4)} USD`);
10939
10949
  orchestratorAccount = callingState.scope === "" ? "orchestrator" : `${callingState.scope}/orchestrator`;
10940
10950
  internals.budget.openAccount(orchestratorAccount, {
10941
10951
  parentScope: callingState.budgetScope ?? "run",
@@ -11272,7 +11282,7 @@ function makeOrchestratorWorkflow(goal, opts) {
11272
11282
  const scope = childScopeOf();
11273
11283
  const profile = internals.defaults.profiles?.[params.agentType];
11274
11284
  const profileModel = profile?.model;
11275
- 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 (docs/07, section 10); spawn a concrete profile instead`);
11285
+ 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`);
11276
11286
  const decision = admission.admit({
11277
11287
  origin: "spawn_agent",
11278
11288
  name: params.agentType,
@@ -11807,7 +11817,7 @@ function createEngine(options) {
11807
11817
  function run(wf, args, opts, resumeCtx) {
11808
11818
  if (wf.kind !== "workflow" && wf.kind !== "compiled-workflow") throw new ConfigError("engine.run accepts in-process Workflow values or compileScript CompiledWorkflow values");
11809
11819
  const compiled = wf.kind === "compiled-workflow" ? wf : void 0;
11810
- if (compiled !== void 0 && options.runners?.sandbox === void 0) throw new ConfigError("running a CompiledWorkflow requires a sandbox runner: pass createEngine({ runners: { sandbox: new WorkerSandboxRunner() } }) from @rulvar/planner (docs/06, sections 8.2 and 10.1)");
11820
+ if (compiled !== void 0 && options.runners?.sandbox === void 0) throw new ConfigError("running a CompiledWorkflow requires a sandbox runner: pass createEngine({ runners: { sandbox: new WorkerSandboxRunner() } }) from @rulvar/planner ");
11811
11821
  const runId = resumeCtx?.runId ?? opts?.runId ?? mintRunId();
11812
11822
  const registry = buildDeriverRegistry(options.extraDerivers);
11813
11823
  const spans = new SpanRegistry();
@@ -12077,12 +12087,12 @@ function createEngine(options) {
12077
12087
  if (supplied === void 0 && meta?.workflowSourceRef === void 0) {
12078
12088
  const name = meta?.workflowName;
12079
12089
  const registered = name === void 0 ? void 0 : defaults.workflows?.[name];
12080
- if (registered === void 0) throw new ConfigError(`engine.resume(runId) with no workflow resolves by the RunMeta-recorded name from defaults.workflows (docs/06, 10.2); run '${runId}' records ` + (name === void 0 ? "no workflowName" : `workflow '${name}', which is not registered`) + "; register it under defaults.workflows or pass the workflow value");
12090
+ if (registered === void 0) throw new ConfigError(`engine.resume(runId) with no workflow resolves by the RunMeta-recorded name from defaults.workflows; run '${runId}' records ` + (name === void 0 ? "no workflowName" : `workflow '${name}', which is not registered`) + "; register it under defaults.workflows or pass the workflow value");
12081
12091
  supplied = registered;
12082
12092
  }
12083
12093
  let bound;
12084
12094
  if (supplied === void 0) {
12085
- if (meta?.workflowSourceRef === void 0) throw new ConfigError("engine.resume requires the workflow for in-process runs (docs/06, section \"Engine and ops API\"); only compiled runs with a persisted source resume bare");
12095
+ if (meta?.workflowSourceRef === void 0) throw new ConfigError("engine.resume requires the workflow for in-process runs (https://docs.rulvar.com/guide/durability); only compiled runs with a persisted source resume bare");
12086
12096
  const blob = await transcripts.get(meta.workflowSourceRef);
12087
12097
  if (blob === null) throw new ConfigError(`resume: run '${runId}' records workflowSourceRef '${meta.workflowSourceRef}' but the transcript store has no such blob`);
12088
12098
  const source = new TextDecoder().decode(blob);
@@ -12097,7 +12107,7 @@ function createEngine(options) {
12097
12107
  if (meta?.workflowName !== void 0 && meta.workflowName !== supplied.name) throw new ConfigError(`resume binding mismatch: run '${runId}' was started by workflow '${meta.workflowName}', not '${supplied.name}'`);
12098
12108
  if (supplied.kind === "compiled-workflow") {
12099
12109
  const expectedHash = hashWorkflowSource(supplied.source);
12100
- if (meta?.workflowHash !== void 0 && meta.workflowHash !== expectedHash) throw new ConfigError(`resume binding mismatch: the supplied CompiledWorkflow source hash differs from the one recorded for run '${runId}' (docs/06, 10.2)`);
12110
+ if (meta?.workflowHash !== void 0 && meta.workflowHash !== expectedHash) throw new ConfigError(`resume binding mismatch: the supplied CompiledWorkflow source hash differs from the one recorded for run '${runId}'`);
12101
12111
  } else {
12102
12112
  const expectedHash = hashWorkflowBody(supplied);
12103
12113
  if (meta?.workflowHash !== void 0 && meta.workflowHash !== expectedHash) process.emitWarning(`resume: the body of workflow '${supplied.name}' changed since run '${runId}' started; orphans and misses will be reported honestly`, {
@@ -12308,7 +12318,7 @@ function createSandboxBridge(ctx, options) {
12308
12318
  for (const key of Object.keys(rawOpts)) if (!SANDBOX_AGENT_OPT_KEYS.has(key)) throw new ConfigError(`sandbox agent option '${key}' is outside the sanctioned dialect; allowed: ` + [...SANDBOX_AGENT_OPT_KEYS].sort().join(", "));
12309
12319
  if (rawOpts.tools !== void 0) {
12310
12320
  const tools = rawOpts.tools;
12311
- if (!(Array.isArray(tools) && tools.every((v) => typeof v === "string"))) throw new ConfigError("sandbox agent tools must be registered profile NAMES (docs/06, 8.3)");
12321
+ if (!(Array.isArray(tools) && tools.every((v) => typeof v === "string"))) throw new ConfigError("sandbox agent tools must be registered profile NAMES");
12312
12322
  }
12313
12323
  const opts = rawOpts;
12314
12324
  return toJournalValue(await ctx.agent(record.prompt, opts) ?? null, "sandbox agent result");
@@ -12324,7 +12334,7 @@ function createSandboxBridge(ctx, options) {
12324
12334
  }
12325
12335
  case "workflow": {
12326
12336
  const record = asRecord(params, "workflow params");
12327
- if (typeof record.name !== "string") throw new ConfigError("sandbox workflow calls take a registered workflow NAME (docs/06, 2.5)");
12337
+ if (typeof record.name !== "string") throw new ConfigError("sandbox workflow calls take a registered workflow NAME");
12328
12338
  const callOpts = {};
12329
12339
  if (typeof record.key === "string") callOpts.key = record.key;
12330
12340
  return toJournalValue(await ctx.workflow(record.name, record.args ?? null, callOpts) ?? null, "sandbox workflow result");
@@ -12468,4 +12478,4 @@ function createSandboxBridge(ctx, options) {
12468
12478
  };
12469
12479
  }
12470
12480
  //#endregion
12471
- 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_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, 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, DedupIndex, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EventBus, ExternalRegistry, FINISH_SCHEMA, FINISH_TOOL_NAME, FileModelKnowledgeStore, FileTranscriptStore, GitWorktreeProvider, INBOX_PROPOSAL_TTL_DAYS, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, 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_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, PlanInvariantError, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SpanRegistry, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, admissionReserveUsd, agentErrorFromWire, agentErrorToWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, atCompactionThreshold, 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, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, escalateTool, evaluatePermission, evaluateReuse, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
12481
+ 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_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, 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, DedupIndex, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EventBus, ExternalRegistry, FINISH_SCHEMA, FINISH_TOOL_NAME, FileModelKnowledgeStore, FileTranscriptStore, GitWorktreeProvider, INBOX_PROPOSAL_TTL_DAYS, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, 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_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, PlanInvariantError, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SpanRegistry, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, admissionReserveUsd, agentErrorFromWire, agentErrorToWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, atCompactionThreshold, 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, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, escalateTool, evaluatePermission, evaluateReuse, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rulvar/core",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
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",