@rulvar/core 1.25.0 → 1.26.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 +58 -4
- package/dist/index.js +106 -20
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -838,9 +838,30 @@ type RunMeta = {
|
|
|
838
838
|
* round-trip the field (the conformance kit checks).
|
|
839
839
|
*/
|
|
840
840
|
argsHash?: string;
|
|
841
|
+
/**
|
|
842
|
+
* Unique token minted at the run's fresh start (genesis) and preserved
|
|
843
|
+
* verbatim by every later segment, so two runs that reuse the same
|
|
844
|
+
* explicit runId after a `deleteRun` are distinguishable: journal
|
|
845
|
+
* length and workflow identity can coincide, this token cannot (the
|
|
846
|
+
* v1.25.0 scale review: the queue worker's skip cache mistook a
|
|
847
|
+
* recreated run for the old unchanged one and never resumed it).
|
|
848
|
+
* Absent on runs started before the field shipped; readers treat
|
|
849
|
+
* absence as "cannot prove same generation" and act accordingly.
|
|
850
|
+
* Stores must round-trip the field (the conformance kit checks).
|
|
851
|
+
*/
|
|
852
|
+
genesis?: string;
|
|
841
853
|
};
|
|
842
854
|
type RunFilter = {
|
|
843
855
|
status?: string;
|
|
856
|
+
/**
|
|
857
|
+
* Match any of these statuses (the resumable candidate sweep asks for
|
|
858
|
+
* `['running', 'suspended']` in one query). Advisory optimization, not
|
|
859
|
+
* a correctness gate: a store written before this field ignores it and
|
|
860
|
+
* returns a superset, so callers re-check status on what comes back.
|
|
861
|
+
* When both `status` and `statuses` are present, a meta matches if it
|
|
862
|
+
* satisfies either.
|
|
863
|
+
*/
|
|
864
|
+
statuses?: string[];
|
|
844
865
|
tags?: string[];
|
|
845
866
|
name?: string;
|
|
846
867
|
};
|
|
@@ -852,6 +873,18 @@ interface JournalStore {
|
|
|
852
873
|
delete(runId: string): Promise<void>;
|
|
853
874
|
}
|
|
854
875
|
/**
|
|
876
|
+
* Exact lookup capability: fetch one run's meta without materializing
|
|
877
|
+
* the whole catalog (the v1.25.0 scale review: `resume`, HTTP status,
|
|
878
|
+
* and CLI point lookups were O(all runs) through `listRuns`). Optional
|
|
879
|
+
* exactly like the lease capability: engines and shells detect it with
|
|
880
|
+
* `hasMetaLookup` and fall back to `listRuns` + find, so a conformant
|
|
881
|
+
* store written before this capability keeps working unoptimized. A
|
|
882
|
+
* missing run resolves `undefined`, never a rejection.
|
|
883
|
+
*/
|
|
884
|
+
interface MetaLookupStore extends JournalStore {
|
|
885
|
+
getMeta(runId: string): Promise<RunMeta | undefined>;
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
855
888
|
* Lease capability: acquire on a held lease MUST reject with a typed
|
|
856
889
|
* LeaseHeldError; renew MUST run at an interval of at most ttl/3; an
|
|
857
890
|
* append carrying a stale epoch MUST be rejected and never appear in load.
|
|
@@ -894,7 +927,11 @@ interface SerializationHook {
|
|
|
894
927
|
journal?: JournalSerializationHook;
|
|
895
928
|
transcripts?: TranscriptSerializationHook;
|
|
896
929
|
}
|
|
897
|
-
/**
|
|
930
|
+
/**
|
|
931
|
+
* Wraps a journal store with the hook; the lease and meta lookup
|
|
932
|
+
* capabilities are preserved (meta is never hooked, exactly like
|
|
933
|
+
* putMeta/listRuns pass through).
|
|
934
|
+
*/
|
|
898
935
|
declare function wrapJournalStore(inner: JournalStore, hook: JournalSerializationHook): JournalStore;
|
|
899
936
|
/** Wraps a transcript store with the hook. */
|
|
900
937
|
declare function wrapTranscriptStore(inner: TranscriptStore, hook: TranscriptSerializationHook): TranscriptStore;
|
|
@@ -6173,7 +6210,7 @@ declare function toJournalValue(value: unknown, site: string): Json;
|
|
|
6173
6210
|
declare function validateEntryShape(entry: JournalEntry): Issue$1[];
|
|
6174
6211
|
//#endregion
|
|
6175
6212
|
//#region src/stores/inmemory.d.ts
|
|
6176
|
-
declare class InMemoryStore implements
|
|
6213
|
+
declare class InMemoryStore implements MetaLookupStore {
|
|
6177
6214
|
private readonly runs;
|
|
6178
6215
|
private readonly metas;
|
|
6179
6216
|
private warned;
|
|
@@ -6183,6 +6220,7 @@ declare class InMemoryStore implements JournalStore {
|
|
|
6183
6220
|
append(runId: string, e: JournalEntry): Promise<void>;
|
|
6184
6221
|
load(runId: string): Promise<JournalEntry[]>;
|
|
6185
6222
|
putMeta(m: RunMeta): Promise<void>;
|
|
6223
|
+
getMeta(runId: string): Promise<RunMeta | undefined>;
|
|
6186
6224
|
listRuns(f?: RunFilter): Promise<RunMeta[]>;
|
|
6187
6225
|
delete(runId: string): Promise<void>;
|
|
6188
6226
|
private warnOnce;
|
|
@@ -6199,8 +6237,23 @@ declare class InMemoryTranscriptStore implements TranscriptStore {
|
|
|
6199
6237
|
delete(ref: string): Promise<void>;
|
|
6200
6238
|
}
|
|
6201
6239
|
//#endregion
|
|
6240
|
+
//#region src/stores/meta-lookup.d.ts
|
|
6241
|
+
/** Capability guard, same shape as the lease capability detection. */
|
|
6242
|
+
declare function hasMetaLookup(store: JournalStore): store is MetaLookupStore;
|
|
6243
|
+
/**
|
|
6244
|
+
* One run's meta: `getMeta` when the store has the capability, else the
|
|
6245
|
+
* full `listRuns` scan. `undefined` means the run is not in the store.
|
|
6246
|
+
*/
|
|
6247
|
+
declare function readRunMeta(store: JournalStore, runId: string): Promise<RunMeta | undefined>;
|
|
6248
|
+
/**
|
|
6249
|
+
* The RunFilter predicate shared by the shipped stores (and usable by
|
|
6250
|
+
* callers re-checking an advisory `statuses` filter a legacy store may
|
|
6251
|
+
* have ignored). `status` and `statuses` combine as either-matches.
|
|
6252
|
+
*/
|
|
6253
|
+
declare function metaMatchesFilter(meta: RunMeta, f?: RunFilter): boolean;
|
|
6254
|
+
//#endregion
|
|
6202
6255
|
//#region src/stores/jsonl.d.ts
|
|
6203
|
-
declare class JsonlFileStore implements
|
|
6256
|
+
declare class JsonlFileStore implements MetaLookupStore {
|
|
6204
6257
|
private readonly dir;
|
|
6205
6258
|
/**
|
|
6206
6259
|
* The stored tail seq per run, lazily initialized from the file on the
|
|
@@ -6217,6 +6270,7 @@ declare class JsonlFileStore implements JournalStore {
|
|
|
6217
6270
|
load(runId: string): Promise<JournalEntry[]>;
|
|
6218
6271
|
private repairTornTail;
|
|
6219
6272
|
putMeta(m: RunMeta): Promise<void>;
|
|
6273
|
+
getMeta(runId: string): Promise<RunMeta | undefined>;
|
|
6220
6274
|
listRuns(f?: RunFilter): Promise<RunMeta[]>;
|
|
6221
6275
|
delete(runId: string): Promise<void>;
|
|
6222
6276
|
}
|
|
@@ -6645,4 +6699,4 @@ interface SandboxBridge {
|
|
|
6645
6699
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
6646
6700
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
6647
6701
|
//#endregion
|
|
6648
|
-
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, 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, ChildIdentityInput, 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_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, EVENT_SEGMENT_STRIDE, 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, FINALIZE_SYNTHESIS_INSTRUCTION, 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, PricedUsage, type Pricing, type PricingTier, 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, 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, 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, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashRunArgs, 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, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, 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, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
6702
|
+
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, 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, ChildIdentityInput, 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_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, EVENT_SEGMENT_STRIDE, 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, FINALIZE_SYNTHESIS_INSTRUCTION, 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 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, 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, 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, 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, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, 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, 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, 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, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/dist/index.js
CHANGED
|
@@ -350,7 +350,11 @@ const PINNED_FIELDS = [
|
|
|
350
350
|
function assertPinnedFields(before, after, site) {
|
|
351
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
|
+
/**
|
|
354
|
+
* Wraps a journal store with the hook; the lease and meta lookup
|
|
355
|
+
* capabilities are preserved (meta is never hooked, exactly like
|
|
356
|
+
* putMeta/listRuns pass through).
|
|
357
|
+
*/
|
|
354
358
|
function wrapJournalStore(inner, hook) {
|
|
355
359
|
const wrapped = {
|
|
356
360
|
append: async (runId, e, lease) => {
|
|
@@ -373,6 +377,7 @@ function wrapJournalStore(inner, hook) {
|
|
|
373
377
|
wrapped.renew = (l) => inner.renew(l);
|
|
374
378
|
wrapped.release = (l) => inner.release(l);
|
|
375
379
|
}
|
|
380
|
+
if (typeof inner.getMeta === "function") wrapped.getMeta = (runId) => inner.getMeta(runId);
|
|
376
381
|
return wrapped;
|
|
377
382
|
}
|
|
378
383
|
/** Wraps a transcript store with the hook. */
|
|
@@ -6186,6 +6191,36 @@ var ExternalRegistry = class ExternalRegistry {
|
|
|
6186
6191
|
}
|
|
6187
6192
|
};
|
|
6188
6193
|
//#endregion
|
|
6194
|
+
//#region src/stores/meta-lookup.ts
|
|
6195
|
+
/** Capability guard, same shape as the lease capability detection. */
|
|
6196
|
+
function hasMetaLookup(store) {
|
|
6197
|
+
return typeof store.getMeta === "function";
|
|
6198
|
+
}
|
|
6199
|
+
/**
|
|
6200
|
+
* One run's meta: `getMeta` when the store has the capability, else the
|
|
6201
|
+
* full `listRuns` scan. `undefined` means the run is not in the store.
|
|
6202
|
+
*/
|
|
6203
|
+
async function readRunMeta(store, runId) {
|
|
6204
|
+
if (hasMetaLookup(store)) return store.getMeta(runId);
|
|
6205
|
+
return (await store.listRuns()).find((meta) => meta.runId === runId);
|
|
6206
|
+
}
|
|
6207
|
+
/**
|
|
6208
|
+
* The RunFilter predicate shared by the shipped stores (and usable by
|
|
6209
|
+
* callers re-checking an advisory `statuses` filter a legacy store may
|
|
6210
|
+
* have ignored). `status` and `statuses` combine as either-matches.
|
|
6211
|
+
*/
|
|
6212
|
+
function metaMatchesFilter(meta, f) {
|
|
6213
|
+
if (f === void 0) return true;
|
|
6214
|
+
if (f.status !== void 0 || f.statuses !== void 0) {
|
|
6215
|
+
const single = f.status !== void 0 && meta.status === f.status;
|
|
6216
|
+
const multi = f.statuses !== void 0 && f.statuses.includes(meta.status);
|
|
6217
|
+
if (!single && !multi) return false;
|
|
6218
|
+
}
|
|
6219
|
+
if (f.name !== void 0 && meta.name !== f.name) return false;
|
|
6220
|
+
if (f.tags !== void 0 && !f.tags.every((tag) => meta.tags?.includes(tag) === true)) return false;
|
|
6221
|
+
return true;
|
|
6222
|
+
}
|
|
6223
|
+
//#endregion
|
|
6189
6224
|
//#region src/stores/inmemory.ts
|
|
6190
6225
|
/**
|
|
6191
6226
|
* InMemoryStore (M1-T04): the default journal store. Process-local, so
|
|
@@ -6221,13 +6256,12 @@ var InMemoryStore = class {
|
|
|
6221
6256
|
this.metas.set(m.runId, deepCopy(m));
|
|
6222
6257
|
return Promise.resolve();
|
|
6223
6258
|
}
|
|
6259
|
+
getMeta(runId) {
|
|
6260
|
+
const meta = this.metas.get(runId);
|
|
6261
|
+
return Promise.resolve(meta === void 0 ? void 0 : deepCopy(meta));
|
|
6262
|
+
}
|
|
6224
6263
|
listRuns(f) {
|
|
6225
|
-
const filtered = [...this.metas.values()].
|
|
6226
|
-
if (f?.status !== void 0 && meta.status !== f.status) return false;
|
|
6227
|
-
if (f?.name !== void 0 && meta.name !== f.name) return false;
|
|
6228
|
-
if (f?.tags !== void 0 && !f.tags.every((tag) => meta.tags?.includes(tag))) return false;
|
|
6229
|
-
return true;
|
|
6230
|
-
});
|
|
6264
|
+
const filtered = [...this.metas.values()].filter((meta) => metaMatchesFilter(meta, f)).map(deepCopy);
|
|
6231
6265
|
return Promise.resolve(filtered);
|
|
6232
6266
|
}
|
|
6233
6267
|
delete(runId) {
|
|
@@ -6361,6 +6395,13 @@ var JsonlFileStore = class {
|
|
|
6361
6395
|
writeFileSync(temp, JSON.stringify(m, null, 2), "utf8");
|
|
6362
6396
|
renameSync(temp, path);
|
|
6363
6397
|
}
|
|
6398
|
+
async getMeta(runId) {
|
|
6399
|
+
try {
|
|
6400
|
+
return JSON.parse(readFileSync(this.metaPath(runId), "utf8"));
|
|
6401
|
+
} catch {
|
|
6402
|
+
return;
|
|
6403
|
+
}
|
|
6404
|
+
}
|
|
6364
6405
|
async listRuns(f) {
|
|
6365
6406
|
const metas = [];
|
|
6366
6407
|
for (const file of readdirSync(this.dir)) {
|
|
@@ -6369,12 +6410,7 @@ var JsonlFileStore = class {
|
|
|
6369
6410
|
metas.push(JSON.parse(readFileSync(join(this.dir, file), "utf8")));
|
|
6370
6411
|
} catch {}
|
|
6371
6412
|
}
|
|
6372
|
-
return metas.filter((meta) =>
|
|
6373
|
-
if (f?.status !== void 0 && meta.status !== f.status) return false;
|
|
6374
|
-
if (f?.name !== void 0 && meta.name !== f.name) return false;
|
|
6375
|
-
if (f?.tags !== void 0 && !f.tags.every((tag) => meta.tags?.includes(tag))) return false;
|
|
6376
|
-
return true;
|
|
6377
|
-
});
|
|
6413
|
+
return metas.filter((meta) => metaMatchesFilter(meta, f));
|
|
6378
6414
|
}
|
|
6379
6415
|
async delete(runId) {
|
|
6380
6416
|
rmSync(this.journalPath(runId), { force: true });
|
|
@@ -12864,6 +12900,12 @@ var SpanRegistry = class {
|
|
|
12864
12900
|
}
|
|
12865
12901
|
};
|
|
12866
12902
|
/**
|
|
12903
|
+
* Minimum delivered prefix before an iterate() queue compacts in place.
|
|
12904
|
+
* Below it the array keeps at most this many cleared slots, which is
|
|
12905
|
+
* bounded and holds no references either way.
|
|
12906
|
+
*/
|
|
12907
|
+
const ITERATE_COMPACT_MIN = 1024;
|
|
12908
|
+
/**
|
|
12867
12909
|
* The per-run event bus. seq is strictly increasing in emission order;
|
|
12868
12910
|
* `iterate()` yields events from subscription onward; `on()` is the
|
|
12869
12911
|
* callback form over the same stream and the same seq values.
|
|
@@ -12950,6 +12992,7 @@ var EventBus = class {
|
|
|
12950
12992
|
iterate() {
|
|
12951
12993
|
if (this.ended) return (async function* empty() {})();
|
|
12952
12994
|
const queue = [];
|
|
12995
|
+
let head = 0;
|
|
12953
12996
|
let notify;
|
|
12954
12997
|
let done = false;
|
|
12955
12998
|
const subscriber = {
|
|
@@ -12967,7 +13010,17 @@ var EventBus = class {
|
|
|
12967
13010
|
return (async function* stream() {
|
|
12968
13011
|
try {
|
|
12969
13012
|
while (true) {
|
|
12970
|
-
while (queue.length
|
|
13013
|
+
while (head < queue.length) {
|
|
13014
|
+
const event = queue[head];
|
|
13015
|
+
queue[head] = void 0;
|
|
13016
|
+
head += 1;
|
|
13017
|
+
if (head >= ITERATE_COMPACT_MIN && head * 2 >= queue.length) {
|
|
13018
|
+
queue.copyWithin(0, head);
|
|
13019
|
+
queue.length -= head;
|
|
13020
|
+
head = 0;
|
|
13021
|
+
}
|
|
13022
|
+
yield event;
|
|
13023
|
+
}
|
|
12971
13024
|
if (done) return;
|
|
12972
13025
|
await new Promise((resolve) => {
|
|
12973
13026
|
notify = resolve;
|
|
@@ -13296,6 +13349,7 @@ function createEngine(options) {
|
|
|
13296
13349
|
if (resumeCtx.argsProvided !== void 0) argsBinding.argsProvided = resumeCtx.argsProvided;
|
|
13297
13350
|
if (resumeCtx.argsHash !== void 0) argsBinding.argsHash = resumeCtx.argsHash;
|
|
13298
13351
|
}
|
|
13352
|
+
const genesis = resumeCtx === void 0 ? mintRunId() : resumeCtx.genesis;
|
|
13299
13353
|
const putMeta = (status) => resumeCtx?.strict === true ? Promise.resolve() : journal.putMeta({
|
|
13300
13354
|
runId,
|
|
13301
13355
|
status,
|
|
@@ -13306,6 +13360,7 @@ function createEngine(options) {
|
|
|
13306
13360
|
...ceilingUsd === void 0 ? {} : { budgetUsd: ceilingUsd },
|
|
13307
13361
|
...argsBinding.argsProvided === void 0 ? {} : { argsProvided: argsBinding.argsProvided },
|
|
13308
13362
|
...argsBinding.argsHash === void 0 ? {} : { argsHash: argsBinding.argsHash },
|
|
13363
|
+
...genesis === void 0 ? {} : { genesis },
|
|
13309
13364
|
workflowName: wf.name,
|
|
13310
13365
|
workflowHash: compiled === void 0 ? hashWorkflowBody(wf) : hashWorkflowSource(compiled.source),
|
|
13311
13366
|
...compiled === void 0 ? {} : { workflowSourceRef: workflowSourceRef(runId) }
|
|
@@ -13441,7 +13496,7 @@ function createEngine(options) {
|
|
|
13441
13496
|
previewResolve = resolve;
|
|
13442
13497
|
});
|
|
13443
13498
|
const handlePromise = (async () => {
|
|
13444
|
-
const meta =
|
|
13499
|
+
const meta = await readRunMeta(journal, runId);
|
|
13445
13500
|
let supplied = wf;
|
|
13446
13501
|
if (supplied === void 0 && meta?.workflowSourceRef === void 0) {
|
|
13447
13502
|
const name = meta?.workflowName;
|
|
@@ -13492,6 +13547,7 @@ function createEngine(options) {
|
|
|
13492
13547
|
segmentsBefore: typeof meta?.segments === "number" && meta.segments > 0 ? Math.floor(meta.segments) : 1,
|
|
13493
13548
|
...typeof meta?.argsProvided === "boolean" ? { argsProvided: meta.argsProvided } : {},
|
|
13494
13549
|
...typeof meta?.argsHash === "string" ? { argsHash: meta.argsHash } : {},
|
|
13550
|
+
...typeof meta?.genesis === "string" ? { genesis: meta.genesis } : {},
|
|
13495
13551
|
previewResolve
|
|
13496
13552
|
});
|
|
13497
13553
|
})();
|
|
@@ -13532,15 +13588,45 @@ function createEngine(options) {
|
|
|
13532
13588
|
* replay from the journal and never boot their checkpoint again;
|
|
13533
13589
|
* everything else (parked, cancelled, escalated, hanging) keeps its
|
|
13534
13590
|
* blob for park/unpark, DEF-5 retention, and dangling redispatch.
|
|
13591
|
+
*
|
|
13592
|
+
* References are exact whole string matches collected in ONE recursive
|
|
13593
|
+
* pass over every journal value and key (the v1.25.0 scale review: the
|
|
13594
|
+
* previous per-terminal substring scan was O(entries squared) and a
|
|
13595
|
+
* prefix collision such as `ckpt/2` inside `ckpt/20` kept blobs the
|
|
13596
|
+
* docs promise to delete). The conservative direction is unchanged:
|
|
13597
|
+
* any exact mention outside the owning terminal's own checkpointRef
|
|
13598
|
+
* field (park anchors, boot reuse, links, nested payload values)
|
|
13599
|
+
* keeps the blob.
|
|
13535
13600
|
*/
|
|
13536
13601
|
async function pruneRun(runId) {
|
|
13537
13602
|
const entries = (await journal.load(runId)).map((entry) => normalizeEntry(entry));
|
|
13538
13603
|
const existing = new Set(await transcripts.list(runId));
|
|
13604
|
+
const ownerOf = /* @__PURE__ */ new Map();
|
|
13605
|
+
for (const terminal of entries) if (terminal.kind === "agent" && terminal.status === "ok" && terminal.ref !== void 0 && terminal.checkpointRef !== void 0 && existing.has(terminal.checkpointRef)) ownerOf.set(terminal.checkpointRef, terminal.seq);
|
|
13606
|
+
if (ownerOf.size === 0) return 0;
|
|
13607
|
+
const keep = /* @__PURE__ */ new Set();
|
|
13608
|
+
const visit = (value) => {
|
|
13609
|
+
if (typeof value === "string") {
|
|
13610
|
+
if (ownerOf.has(value)) keep.add(value);
|
|
13611
|
+
return;
|
|
13612
|
+
}
|
|
13613
|
+
if (Array.isArray(value)) {
|
|
13614
|
+
for (const item of value) visit(item);
|
|
13615
|
+
return;
|
|
13616
|
+
}
|
|
13617
|
+
if (value !== null && typeof value === "object") for (const [key, inner] of Object.entries(value)) {
|
|
13618
|
+
if (ownerOf.has(key)) keep.add(key);
|
|
13619
|
+
visit(inner);
|
|
13620
|
+
}
|
|
13621
|
+
};
|
|
13622
|
+
for (const entry of entries) {
|
|
13623
|
+
const { checkpointRef, ...rest } = entry;
|
|
13624
|
+
if (checkpointRef !== void 0 && ownerOf.get(checkpointRef) !== entry.seq) keep.add(checkpointRef);
|
|
13625
|
+
visit(rest);
|
|
13626
|
+
}
|
|
13539
13627
|
let pruned = 0;
|
|
13540
|
-
for (const
|
|
13541
|
-
if (
|
|
13542
|
-
const ref = terminal.checkpointRef;
|
|
13543
|
-
if (entries.some((entry) => entry.seq !== terminal.seq && JSON.stringify(entry).includes(ref))) continue;
|
|
13628
|
+
for (const ref of ownerOf.keys()) {
|
|
13629
|
+
if (keep.has(ref)) continue;
|
|
13544
13630
|
await transcripts.delete(ref);
|
|
13545
13631
|
pruned += 1;
|
|
13546
13632
|
}
|
|
@@ -13852,4 +13938,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
13852
13938
|
};
|
|
13853
13939
|
}
|
|
13854
13940
|
//#endregion
|
|
13855
|
-
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, EVENT_SEGMENT_STRIDE, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, 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, 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, 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, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, hashRunArgs, 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, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, readTerminationInit, registryKeyRing, remeasureQueue, replayDisposition, 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, validateSchemaSpec, validateTerminationLimits, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
13941
|
+
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, EVENT_SEGMENT_STRIDE, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, 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, 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, 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, executeWorkflow, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, foldTermination, formatRePrompt, formatScopePath, 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, 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, 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, validateSchemaSpec, validateTerminationLimits, 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.26.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",
|