@rulvar/core 1.45.0 → 1.47.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 +84 -3
- package/dist/index.js +180 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -965,7 +965,9 @@ interface TranscriptStore {
|
|
|
965
965
|
* sources). The shipped file and in-memory transcript stores do NOT
|
|
966
966
|
* declare it (they are single-writer by contract); a fenced
|
|
967
967
|
* implementation needs the blobs and the lease state in one
|
|
968
|
-
* transactional domain
|
|
968
|
+
* transactional domain, which is exactly how the sqlite twin ships:
|
|
969
|
+
* `SqliteStore.transcripts()` in `@rulvar/store-sqlite` keeps blobs
|
|
970
|
+
* beside the lease rows of the same database.
|
|
969
971
|
*/
|
|
970
972
|
readonly fencedWrites?: true;
|
|
971
973
|
}
|
|
@@ -2225,6 +2227,16 @@ type AbandonAttempt = {
|
|
|
2225
2227
|
type ResolutionOutcome = {
|
|
2226
2228
|
applied: true;
|
|
2227
2229
|
seq: number;
|
|
2230
|
+
/**
|
|
2231
|
+
* The resolution settled a live in-process waiter and the segment
|
|
2232
|
+
* continues in place. Absent when the append landed WITHOUT a
|
|
2233
|
+
* wake (the journal-fold path: a settled segment, or one already
|
|
2234
|
+
* closing when the attempt landed): the append is durable, the
|
|
2235
|
+
* closed body never continues, and the continuation belongs to a
|
|
2236
|
+
* resume (the suspension ownership rule). Hosts that auto-resume
|
|
2237
|
+
* on resolution branch on this instead of racing the settle.
|
|
2238
|
+
*/
|
|
2239
|
+
woke?: true;
|
|
2228
2240
|
} | {
|
|
2229
2241
|
applied: false;
|
|
2230
2242
|
seq: number;
|
|
@@ -6821,13 +6833,82 @@ declare function hasFencedWrites(store: JournalStore | TranscriptStore): boolean
|
|
|
6821
6833
|
* Deployment-time assertion for queue hosts that require the full
|
|
6822
6834
|
* fence: throws a typed ConfigError naming each store that does NOT
|
|
6823
6835
|
* declare `fencedWrites`. A host that tolerates advisory meta or
|
|
6824
|
-
* transcript writes simply never calls this.
|
|
6836
|
+
* transcript writes simply never calls this. The shipped pair that
|
|
6837
|
+
* satisfies it with transcripts present is `@rulvar/store-sqlite`:
|
|
6838
|
+
* the store as the journal plus its `transcripts()` twin.
|
|
6825
6839
|
*/
|
|
6826
6840
|
declare function assertFencedWrites(stores: {
|
|
6827
6841
|
journal: JournalStore;
|
|
6828
6842
|
transcripts?: TranscriptStore;
|
|
6829
6843
|
}): void;
|
|
6830
6844
|
//#endregion
|
|
6845
|
+
//#region src/stores/reconcile.d.ts
|
|
6846
|
+
/** The decisionType of the journaled run settle entry. */
|
|
6847
|
+
declare const RUN_SETTLE_DECISION_TYPE = "run_settle";
|
|
6848
|
+
/** The last journaled run settle of a journal, if any. */
|
|
6849
|
+
declare function lastRunSettle(entries: readonly JournalEntry[]): {
|
|
6850
|
+
runStatus: RunStatus;
|
|
6851
|
+
seq: number;
|
|
6852
|
+
} | undefined;
|
|
6853
|
+
type RunAuditVerdict = "consistent" | "meta-behind" | "stranded" | "suspect";
|
|
6854
|
+
interface RunStateAudit {
|
|
6855
|
+
runId: string;
|
|
6856
|
+
verdict: RunAuditVerdict;
|
|
6857
|
+
/** The stored meta row; absent when the store has none. */
|
|
6858
|
+
meta?: RunMeta;
|
|
6859
|
+
journalEntries: number;
|
|
6860
|
+
/** The last journaled settle, when the journal carries one. */
|
|
6861
|
+
journalSettle?: {
|
|
6862
|
+
runStatus: RunStatus;
|
|
6863
|
+
seq: number;
|
|
6864
|
+
};
|
|
6865
|
+
/** Entries appended after the last journaled settle. */
|
|
6866
|
+
entriesAfterSettle: number;
|
|
6867
|
+
/** Running dispatch entries no terminal ever referenced. */
|
|
6868
|
+
danglingDispatches: number;
|
|
6869
|
+
openSuspensions: number;
|
|
6870
|
+
/** The status a repair would write; absent when no repair is sound. */
|
|
6871
|
+
repairTo?: RunStatus;
|
|
6872
|
+
/** One sentence naming the evidence behind the verdict. */
|
|
6873
|
+
reason: string;
|
|
6874
|
+
}
|
|
6875
|
+
/**
|
|
6876
|
+
* Audits one run: loads the meta row and the journal, derives the state
|
|
6877
|
+
* the journal supports, and names the divergence. Read only.
|
|
6878
|
+
*/
|
|
6879
|
+
declare function auditRun(store: JournalStore, runId: string): Promise<RunStateAudit>;
|
|
6880
|
+
interface AuditRunsOptions {
|
|
6881
|
+
/** Also return runs whose audit found nothing wrong. Default false. */
|
|
6882
|
+
includeConsistent?: boolean;
|
|
6883
|
+
}
|
|
6884
|
+
/**
|
|
6885
|
+
* Audits every run the catalog lists. Loads EVERY journal it audits:
|
|
6886
|
+
* this is operator tooling for finding stranded runs, not a hot path.
|
|
6887
|
+
*/
|
|
6888
|
+
declare function auditRuns(store: JournalStore, opts?: AuditRunsOptions): Promise<RunStateAudit[]>;
|
|
6889
|
+
interface ReconcileOptions {
|
|
6890
|
+
/**
|
|
6891
|
+
* A live lease for the run, passed through to the meta write. Over a
|
|
6892
|
+
* `fencedWrites` store this makes the repair itself takeover safe: a
|
|
6893
|
+
* successor acquiring mid-repair fences the stale rewrite out.
|
|
6894
|
+
*/
|
|
6895
|
+
lease?: Lease;
|
|
6896
|
+
}
|
|
6897
|
+
interface ReconcileResult {
|
|
6898
|
+
audit: RunStateAudit;
|
|
6899
|
+
/** True when a divergent meta row was rewritten from the journal. */
|
|
6900
|
+
repaired: boolean;
|
|
6901
|
+
}
|
|
6902
|
+
/**
|
|
6903
|
+
* Repairs a divergent meta row from the journal: 'meta-behind' and
|
|
6904
|
+
* 'stranded' audits rewrite `status` (every other meta field, unknown
|
|
6905
|
+
* fields included, is preserved byte for byte), 'suspect' and
|
|
6906
|
+
* 'consistent' audits change nothing. Zero model calls, no workflow
|
|
6907
|
+
* needed; the crash residue between a settle's journal flush and its
|
|
6908
|
+
* meta write repairs without resuming the run at all.
|
|
6909
|
+
*/
|
|
6910
|
+
declare function reconcileRunMeta(store: JournalStore, runId: string, opts?: ReconcileOptions): Promise<ReconcileResult>;
|
|
6911
|
+
//#endregion
|
|
6831
6912
|
//#region src/stores/jsonl.d.ts
|
|
6832
6913
|
declare class JsonlFileStore implements MetaLookupStore {
|
|
6833
6914
|
private readonly dir;
|
|
@@ -7291,4 +7372,4 @@ interface SandboxBridge {
|
|
|
7291
7372
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
7292
7373
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
7293
7374
|
//#endregion
|
|
7294
|
-
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, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, 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, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, 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_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateOptions, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, PricedUsage, type Pricing, type PricingTier, type ProviderAdapter, QualityFloors, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, 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, SANDBOX_AGENT_OPT_KEYS, 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, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, 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, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readRunMeta, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, requiredFieldsValidator, requiredSectionsValidator, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
7375
|
+
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, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildIdentityInput, ChildResultPage, type ClaimClass, type ClaimOp, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ConfigError, type CoreEvents, CostAttribution, CostAttributionFacts, CostReport, CreateEngineOptions, Ctx, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, 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, EVENT_SEGMENT_STRIDE, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EntryKind, EntryRef, EntryStatus, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, type EvidenceRef, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, FinishInfo, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, 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_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateOptions, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PhaseTarget, PipelineCollected, PipelineOpts, PlanInvariantError, PriceTable, PricedUsage, type Pricing, type PricingTier, type ProviderAdapter, QualityFloors, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, ReconcileOptions, ReconcileResult, 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, RunAuditVerdict, RunBudget, RunEventSink, 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, 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, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readRunMeta, readTerminationInit, reconcileRunMeta, registryKeyRing, remeasureQueue, replayDisposition, requiredFieldsValidator, requiredSectionsValidator, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/dist/index.js
CHANGED
|
@@ -6350,7 +6350,13 @@ var ExternalRegistry = class ExternalRegistry {
|
|
|
6350
6350
|
const waiter = this.waiters.get(entryRef);
|
|
6351
6351
|
if (waiter !== void 0) {
|
|
6352
6352
|
this.waiters.delete(entryRef);
|
|
6353
|
-
if (!this.closedFlag)
|
|
6353
|
+
if (!this.closedFlag) {
|
|
6354
|
+
waiter.resolve(attempt.value);
|
|
6355
|
+
return {
|
|
6356
|
+
...outcome,
|
|
6357
|
+
woke: true
|
|
6358
|
+
};
|
|
6359
|
+
}
|
|
6354
6360
|
}
|
|
6355
6361
|
}
|
|
6356
6362
|
return outcome;
|
|
@@ -6375,7 +6381,13 @@ var ExternalRegistry = class ExternalRegistry {
|
|
|
6375
6381
|
this.emitResolutionOutcome(waiter.entryRef, "external", outcome);
|
|
6376
6382
|
if (outcome.applied) {
|
|
6377
6383
|
this.waiters.delete(waiter.entryRef);
|
|
6378
|
-
if (!this.closedFlag)
|
|
6384
|
+
if (!this.closedFlag) {
|
|
6385
|
+
waiter.resolve(value);
|
|
6386
|
+
return {
|
|
6387
|
+
...outcome,
|
|
6388
|
+
woke: true
|
|
6389
|
+
};
|
|
6390
|
+
}
|
|
6379
6391
|
}
|
|
6380
6392
|
return outcome;
|
|
6381
6393
|
}
|
|
@@ -6539,7 +6551,9 @@ function hasFencedWrites(store) {
|
|
|
6539
6551
|
* Deployment-time assertion for queue hosts that require the full
|
|
6540
6552
|
* fence: throws a typed ConfigError naming each store that does NOT
|
|
6541
6553
|
* declare `fencedWrites`. A host that tolerates advisory meta or
|
|
6542
|
-
* transcript writes simply never calls this.
|
|
6554
|
+
* transcript writes simply never calls this. The shipped pair that
|
|
6555
|
+
* satisfies it with transcripts present is `@rulvar/store-sqlite`:
|
|
6556
|
+
* the store as the journal plus its `transcripts()` twin.
|
|
6543
6557
|
*/
|
|
6544
6558
|
function assertFencedWrites(stores) {
|
|
6545
6559
|
const unfenced = [];
|
|
@@ -6548,6 +6562,150 @@ function assertFencedWrites(stores) {
|
|
|
6548
6562
|
if (unfenced.length > 0) throw new ConfigError(`the ${unfenced.join(" and ")} store${unfenced.length > 1 ? "s do" : " does"} not declare the fencedWrites capability: run meta, blob, or deletion writes by a superseded worker would land unfenced (https://docs.rulvar.com/contributing/rfc-fenced-run-state)`);
|
|
6549
6563
|
}
|
|
6550
6564
|
//#endregion
|
|
6565
|
+
//#region src/stores/reconcile.ts
|
|
6566
|
+
/** The decisionType of the journaled run settle entry. */
|
|
6567
|
+
const RUN_SETTLE_DECISION_TYPE = "run_settle";
|
|
6568
|
+
const RUN_STATUSES = /* @__PURE__ */ new Set([
|
|
6569
|
+
"ok",
|
|
6570
|
+
"error",
|
|
6571
|
+
"cancelled",
|
|
6572
|
+
"exhausted",
|
|
6573
|
+
"suspended",
|
|
6574
|
+
"running"
|
|
6575
|
+
]);
|
|
6576
|
+
const TERMINAL = /* @__PURE__ */ new Set([
|
|
6577
|
+
"ok",
|
|
6578
|
+
"error",
|
|
6579
|
+
"cancelled",
|
|
6580
|
+
"exhausted"
|
|
6581
|
+
]);
|
|
6582
|
+
const wallClock = Date.now.bind(globalThis);
|
|
6583
|
+
/** The last journaled run settle of a journal, if any. */
|
|
6584
|
+
function lastRunSettle(entries) {
|
|
6585
|
+
for (let i = entries.length - 1; i >= 0; i -= 1) {
|
|
6586
|
+
const entry = entries[i];
|
|
6587
|
+
if (entry === void 0 || entry.kind !== "decision") continue;
|
|
6588
|
+
const value = entry.value;
|
|
6589
|
+
if (value?.decisionType === "run_settle" && typeof value.runStatus === "string" && RUN_STATUSES.has(value.runStatus)) return {
|
|
6590
|
+
runStatus: value.runStatus,
|
|
6591
|
+
seq: entry.seq
|
|
6592
|
+
};
|
|
6593
|
+
}
|
|
6594
|
+
}
|
|
6595
|
+
function structure(entries) {
|
|
6596
|
+
const referenced = /* @__PURE__ */ new Set();
|
|
6597
|
+
for (const entry of entries) if (entry.ref !== void 0) referenced.add(entry.ref);
|
|
6598
|
+
return {
|
|
6599
|
+
dangling: entries.filter((entry) => entry.status === "running" && !referenced.has(entry.seq)).length,
|
|
6600
|
+
open: new ResolutionFold(entries).openSuspensions().length
|
|
6601
|
+
};
|
|
6602
|
+
}
|
|
6603
|
+
/**
|
|
6604
|
+
* Audits one run: loads the meta row and the journal, derives the state
|
|
6605
|
+
* the journal supports, and names the divergence. Read only.
|
|
6606
|
+
*/
|
|
6607
|
+
async function auditRun(store, runId) {
|
|
6608
|
+
const meta = await readRunMeta(store, runId);
|
|
6609
|
+
const entries = await store.load(runId);
|
|
6610
|
+
const settle = lastRunSettle(entries);
|
|
6611
|
+
const { dangling, open } = structure(entries);
|
|
6612
|
+
const tail = settle === void 0 ? entries : entries.filter((e) => e.seq > settle.seq);
|
|
6613
|
+
const base = {
|
|
6614
|
+
runId,
|
|
6615
|
+
verdict: "consistent",
|
|
6616
|
+
...meta === void 0 ? {} : { meta },
|
|
6617
|
+
journalEntries: entries.length,
|
|
6618
|
+
...settle === void 0 ? {} : { journalSettle: settle },
|
|
6619
|
+
entriesAfterSettle: settle === void 0 ? 0 : tail.length,
|
|
6620
|
+
danglingDispatches: dangling,
|
|
6621
|
+
openSuspensions: open,
|
|
6622
|
+
reason: ""
|
|
6623
|
+
};
|
|
6624
|
+
if (meta === void 0) {
|
|
6625
|
+
if (entries.length === 0) return {
|
|
6626
|
+
...base,
|
|
6627
|
+
reason: "no journal and no meta row"
|
|
6628
|
+
};
|
|
6629
|
+
return {
|
|
6630
|
+
...base,
|
|
6631
|
+
verdict: "suspect",
|
|
6632
|
+
reason: "a journal exists but no meta row does (crash before the first meta write)"
|
|
6633
|
+
};
|
|
6634
|
+
}
|
|
6635
|
+
if (settle !== void 0) {
|
|
6636
|
+
const derived = tail.filter((entry) => entry.status === "running" && !entries.some((later) => later.ref === entry.seq)).length > 0 ? "running" : tail.length > 0 ? open > 0 ? "suspended" : "running" : settle.runStatus;
|
|
6637
|
+
if (meta.status === derived) return {
|
|
6638
|
+
...base,
|
|
6639
|
+
reason: "meta matches the journaled settle"
|
|
6640
|
+
};
|
|
6641
|
+
const strands = TERMINAL.has(meta.status) && !TERMINAL.has(derived);
|
|
6642
|
+
return {
|
|
6643
|
+
...base,
|
|
6644
|
+
verdict: strands ? "stranded" : "meta-behind",
|
|
6645
|
+
repairTo: derived,
|
|
6646
|
+
reason: tail.length > 0 ? `the journal continued past the settle at seq ${String(settle.seq)} (derived '${derived}') but the meta row says '${meta.status}'` : `the journal settled '${settle.runStatus}' at seq ${String(settle.seq)} but the meta row says '${meta.status}'`
|
|
6647
|
+
};
|
|
6648
|
+
}
|
|
6649
|
+
if (TERMINAL.has(meta.status)) {
|
|
6650
|
+
if (dangling > 0) return {
|
|
6651
|
+
...base,
|
|
6652
|
+
verdict: "stranded",
|
|
6653
|
+
repairTo: "running",
|
|
6654
|
+
reason: `${String(dangling)} dangling dispatch(es) under terminal meta '${meta.status}': a stale settle overwrote a run that was still working`
|
|
6655
|
+
};
|
|
6656
|
+
if (open > 0 && (meta.status === "ok" || meta.status === "exhausted")) return {
|
|
6657
|
+
...base,
|
|
6658
|
+
verdict: "suspect",
|
|
6659
|
+
reason: `${String(open)} open suspension(s) under terminal meta '${meta.status}'; inspect before resuming by runId`
|
|
6660
|
+
};
|
|
6661
|
+
return {
|
|
6662
|
+
...base,
|
|
6663
|
+
reason: "terminal meta over a structurally quiet journal"
|
|
6664
|
+
};
|
|
6665
|
+
}
|
|
6666
|
+
return {
|
|
6667
|
+
...base,
|
|
6668
|
+
reason: "meta is resumable; worker sweeps can reach this run"
|
|
6669
|
+
};
|
|
6670
|
+
}
|
|
6671
|
+
/**
|
|
6672
|
+
* Audits every run the catalog lists. Loads EVERY journal it audits:
|
|
6673
|
+
* this is operator tooling for finding stranded runs, not a hot path.
|
|
6674
|
+
*/
|
|
6675
|
+
async function auditRuns(store, opts) {
|
|
6676
|
+
const metas = await store.listRuns();
|
|
6677
|
+
const audits = [];
|
|
6678
|
+
for (const meta of metas) {
|
|
6679
|
+
const audit = await auditRun(store, meta.runId);
|
|
6680
|
+
if (opts?.includeConsistent === true || audit.verdict !== "consistent") audits.push(audit);
|
|
6681
|
+
}
|
|
6682
|
+
return audits;
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* Repairs a divergent meta row from the journal: 'meta-behind' and
|
|
6686
|
+
* 'stranded' audits rewrite `status` (every other meta field, unknown
|
|
6687
|
+
* fields included, is preserved byte for byte), 'suspect' and
|
|
6688
|
+
* 'consistent' audits change nothing. Zero model calls, no workflow
|
|
6689
|
+
* needed; the crash residue between a settle's journal flush and its
|
|
6690
|
+
* meta write repairs without resuming the run at all.
|
|
6691
|
+
*/
|
|
6692
|
+
async function reconcileRunMeta(store, runId, opts) {
|
|
6693
|
+
const audit = await auditRun(store, runId);
|
|
6694
|
+
if (audit.repairTo === void 0 || audit.meta === void 0) return {
|
|
6695
|
+
audit,
|
|
6696
|
+
repaired: false
|
|
6697
|
+
};
|
|
6698
|
+
await store.putMeta({
|
|
6699
|
+
...audit.meta,
|
|
6700
|
+
status: audit.repairTo,
|
|
6701
|
+
updatedAt: new Date(wallClock()).toISOString()
|
|
6702
|
+
}, opts?.lease);
|
|
6703
|
+
return {
|
|
6704
|
+
audit,
|
|
6705
|
+
repaired: true
|
|
6706
|
+
};
|
|
6707
|
+
}
|
|
6708
|
+
//#endregion
|
|
6551
6709
|
//#region src/stores/jsonl.ts
|
|
6552
6710
|
/**
|
|
6553
6711
|
* JsonlFileStore (M2-T01): the durable file store. One JSON entry per
|
|
@@ -14643,6 +14801,24 @@ function createEngine(options) {
|
|
|
14643
14801
|
};
|
|
14644
14802
|
if (value !== void 0 && (status === "ok" || status === "exhausted")) outcome.value = value;
|
|
14645
14803
|
if (wireError !== void 0) outcome.error = wireError;
|
|
14804
|
+
if (resumeCtx?.strict !== true) {
|
|
14805
|
+
const priorCount = resumeCtx?.priorEntries.length ?? 0;
|
|
14806
|
+
const appendedHere = replayer.snapshot().length - priorCount;
|
|
14807
|
+
const recorded = lastRunSettle(replayer.snapshot());
|
|
14808
|
+
if (appendedHere > 0 || recorded !== void 0 && recorded.runStatus !== status) await replayer.appendSinglePhase({
|
|
14809
|
+
scope: "",
|
|
14810
|
+
key: deriverV2.deriveKey({ kind: "run-settle" }),
|
|
14811
|
+
kind: "decision",
|
|
14812
|
+
status: "ok",
|
|
14813
|
+
spanId: rootSpanId,
|
|
14814
|
+
site: "run-settle",
|
|
14815
|
+
value: {
|
|
14816
|
+
decisionType: RUN_SETTLE_DECISION_TYPE,
|
|
14817
|
+
runStatus: status,
|
|
14818
|
+
segment: segmentsBefore + 1
|
|
14819
|
+
}
|
|
14820
|
+
}).catch(() => void 0);
|
|
14821
|
+
}
|
|
14646
14822
|
await putMeta(status).catch(() => void 0);
|
|
14647
14823
|
bus.emit({
|
|
14648
14824
|
type: "run:end",
|
|
@@ -15120,4 +15296,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
15120
15296
|
};
|
|
15121
15297
|
}
|
|
15122
15298
|
//#endregion
|
|
15123
|
-
export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DedupIndex, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, 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_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, PlanInvariantError, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, 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, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, 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, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readRunMeta, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, requiredFieldsValidator, requiredSectionsValidator, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
15299
|
+
export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_DEPTH, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DedupIndex, EMIT_RESULT_TOOL, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_TOOL_NAME, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GitWorktreeProvider, 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_CHILD_RESULT_PAGE_CHARS, MAX_DEPTH_CEILING, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, ParallelSiteCounter, PlanInvariantError, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SpanRegistry, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, atCompactionThreshold, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compilePermissionChain, compilePermissionPreset, compileVerifiedLayer, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidencePreservedValidator, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashWorkflowBody, hashWorkflowSource, identityJcs, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, lexShellCommand, liftRetainedParts, lineageWeightOf, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, parallelScope, parseModelRef, parseScopePath, phiInitialOf, pipelineScope, planNodeScope, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readRunMeta, readTerminationInit, reconcileRunMeta, registryKeyRing, remeasureQueue, replayDisposition, requiredFieldsValidator, requiredSectionsValidator, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, selectStructuredOutputTier, shouldCompact, snapshotUsage, spawnDepthOf, summarizeInstruction, summarizeOutput, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolContract, toolsetHash, ttlState, usageViolations, validateEditorialCommit, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateUsageLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.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",
|