@rulvar/core 1.221.0 → 1.223.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 +72 -1
- package/dist/index.js +186 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8140,6 +8140,49 @@ declare function evidencePreservedValidator(options?: {
|
|
|
8140
8140
|
name?: string;
|
|
8141
8141
|
}): FinishValidator;
|
|
8142
8142
|
/**
|
|
8143
|
+
* One counted per-section pattern demand of
|
|
8144
|
+
* {@link sectionPatternCountValidator} (RV2206).
|
|
8145
|
+
*/
|
|
8146
|
+
interface SectionPatternEntry {
|
|
8147
|
+
/** The section marker the demand binds to. */
|
|
8148
|
+
section: string;
|
|
8149
|
+
/**
|
|
8150
|
+
* Regex source. A capture group makes the count DISTINCT by the
|
|
8151
|
+
* first capture (the parity contract's N01..N48 ids count once
|
|
8152
|
+
* each, however often an id repeats); without a capture the raw
|
|
8153
|
+
* match count applies.
|
|
8154
|
+
*/
|
|
8155
|
+
pattern: string;
|
|
8156
|
+
flags?: string;
|
|
8157
|
+
/** Matches (distinct captures when capturing) required in the slice. */
|
|
8158
|
+
min: number;
|
|
8159
|
+
/** Short human name for reasons (e.g. 'numbered negative scenarios'). */
|
|
8160
|
+
label?: string;
|
|
8161
|
+
}
|
|
8162
|
+
/**
|
|
8163
|
+
* Counted collections inside named sections (RV2206, the subscription
|
|
8164
|
+
* parity series). The engine validated citations per section since the
|
|
8165
|
+
* v1.71 review, but the numbered collections the parity contract
|
|
8166
|
+
* demands (48 N-case ids, 16 counterexample ids) were policed by
|
|
8167
|
+
* nothing: the second accepted dossier carried 0 and 0 against an
|
|
8168
|
+
* instruction naming both, and only a runner-side format pre-teach
|
|
8169
|
+
* closed the gap, by hope rather than contract. Each entry slices its
|
|
8170
|
+
* section exactly like sectionCitationsValidator (first marker
|
|
8171
|
+
* occurrence to the next marker in position order) and counts matches,
|
|
8172
|
+
* DISTINCT by first capture when the pattern captures; the reasons
|
|
8173
|
+
* name the section, the label, the found count against the minimum,
|
|
8174
|
+
* and with a capturing pattern the missing count in ids, so a repair
|
|
8175
|
+
* turn knows exactly what to add (the RV2105 lesson). Default name
|
|
8176
|
+
* 'section-pattern-counts'.
|
|
8177
|
+
*/
|
|
8178
|
+
declare function sectionPatternCountValidator(options: {
|
|
8179
|
+
sections: readonly string[];
|
|
8180
|
+
entries: readonly SectionPatternEntry[];
|
|
8181
|
+
name?: string;
|
|
8182
|
+
match?: SectionMatchMode;
|
|
8183
|
+
fencedCode?: FencedCodeMode;
|
|
8184
|
+
}): FinishValidator;
|
|
8185
|
+
/**
|
|
8143
8186
|
* Requires at least `min` matches of `pattern` INSIDE every named
|
|
8144
8187
|
* section (the v1.71 experiment review, P1.2: a total citation count
|
|
8145
8188
|
* hides sections carrying zero provenance). A section's slice runs
|
|
@@ -8594,6 +8637,24 @@ interface FinishContractCitations {
|
|
|
8594
8637
|
*/
|
|
8595
8638
|
sample?: string;
|
|
8596
8639
|
}
|
|
8640
|
+
/** One counted per-section collection demand (RV2206). */
|
|
8641
|
+
interface FinishContractSectionPattern {
|
|
8642
|
+
/** A declared section marker this demand binds to. */
|
|
8643
|
+
section: string;
|
|
8644
|
+
/** Regex source; a capture group makes counting DISTINCT by first capture. */
|
|
8645
|
+
pattern: string;
|
|
8646
|
+
flags?: string;
|
|
8647
|
+
/** Matches (distinct captures when capturing) required inside the section. */
|
|
8648
|
+
min: number;
|
|
8649
|
+
/**
|
|
8650
|
+
* Literal matches for the golden fixtures and the prompt. Single
|
|
8651
|
+
* line each; with a capturing pattern they must together carry at
|
|
8652
|
+
* least `min` distinct captures.
|
|
8653
|
+
*/
|
|
8654
|
+
samples: string[];
|
|
8655
|
+
/** Short human name for prompts and reasons. */
|
|
8656
|
+
label?: string;
|
|
8657
|
+
}
|
|
8597
8658
|
/**
|
|
8598
8659
|
* The single source of truth of a textual finish contract: what the
|
|
8599
8660
|
* prompt promises IS what the validators enforce. Declare only textual
|
|
@@ -8622,6 +8683,16 @@ interface FinishContractManifest {
|
|
|
8622
8683
|
/** Citation demands over the result text. */
|
|
8623
8684
|
citations?: FinishContractCitations;
|
|
8624
8685
|
/**
|
|
8686
|
+
* Counted collections inside named sections (RV2206): each entry
|
|
8687
|
+
* demands at least `min` matches of `pattern` inside `section`'s
|
|
8688
|
+
* slice, DISTINCT by first capture when the pattern captures.
|
|
8689
|
+
* Requires `sections`. The `samples` are literal matches embedded in
|
|
8690
|
+
* the golden fixtures and quoted by the prompt: with a capturing
|
|
8691
|
+
* pattern they must carry at least `min` DISTINCT captures, because
|
|
8692
|
+
* the accept skeleton must itself satisfy the demand.
|
|
8693
|
+
*/
|
|
8694
|
+
sectionPatterns?: FinishContractSectionPattern[];
|
|
8695
|
+
/**
|
|
8625
8696
|
* Whether fenced code blocks count (cycle 74): 'counted' (the
|
|
8626
8697
|
* default) or 'excluded' (fenced code is removed before section
|
|
8627
8698
|
* matching, slicing, word counting, and citation matching, so code
|
|
@@ -14118,4 +14189,4 @@ interface SandboxBridge {
|
|
|
14118
14189
|
declare const SANDBOX_AGENT_OPT_KEYS: readonly string[];
|
|
14119
14190
|
declare function createSandboxBridge(ctx: Ctx<never>, options: SandboxBridgeOptions): SandboxBridge;
|
|
14120
14191
|
//#endregion
|
|
14121
|
-
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSealedError, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, PilotAgentProfileOptions, PilotAgentProfileResult, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, ProviderStatement, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, ReconcileStatementOptions, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, RunFactPairOptions, RunFactPairsFold, RunFactsSheet, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, SectionMatchMode, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
14192
|
+
export { AWAIT_SCHEMA, AbandonAttempt, AbandonFold, AbandonPayload, AbandonedSpendView, AbortClass, AcceptanceChildSummary, type AdaptiveEvents, AdmissionController, AdmissionDecision, AdmissionRejectedError, AdmissionStatsBefore, AdmitLineage, AdmitRejectReason, AdmitSpec, AdmitVerdict, AgentCallError, AgentError, type AgentEvents, AgentIdentityInput, type AgentInvocationRow, AgentOpts, AgentProfile, AgentProfilePermissions, AgentProfileTemplateOptions, AgentResult, AgentResultMeta, AgentStatus, type AppliedPricingRow, ApproachSignatureInputs, ApprovalDecision, ApprovalIdentityInput, Artifact, AttemptOutcomeClass, AuditCategory, AuditRecord, AuditRunsOptions, BUDGET_ABORT_REASON, BaseAppend, BillingComponent, BriefOpts, BudgetAccountView, BudgetDefaults, BudgetExhaustedError, BudgetExhaustionDiagnostics, BudgetHooks, BudgetReserve, type Bytes, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, CacheHint, CachePolicy, CacheTtl, CanUseTool, CanonicalId, CanonicalIdentity, CanonicalLadderSpec, CanonicalModelSpec, ChatEvent, ChatRequest, CheckpointState, ChildArtifactPage, ChildExecutionFacts, ChildIdentityInput, ChildResultPage, CitationTarget, type ClaimClass, ClaimContradictionFinding, ClaimCoverageGrade, ClaimCoverageInput, type ClaimOp, ClaimPair, ClaimPairOptions, ClaimPairsFold, ClaimPoolReading, type ClaimStatus, ClaimValidationOptions, CollectOpts, CollectedTurn, CompactionConfig, CompiledPermissionChain, CompiledWorkflow, ComponentDelta, ConfigError, Contradiction, ContradictionClaim, ContradictionOptions, ContradictionSource, type CoreEvents, CostAttribution, CostAttributionFacts, type CostBasis, CostReport, CreateEngineOptions, type CriticalPath, Ctx, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DataKeyProvider, DebitResult, DecisionChainRow, DeclaredLadder, DedupIndex, DedupNote, DedupedClaims, DerivedKey, DeriverRegistry, type DeterminismConfig, DeterminismError, type DeterminismEvents, type DeterminismMode, DispositionRule, DispositionTable, DocumentedRates, DonorCandidate, DonorRef, DroppedItem, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EffectiveUsageLimits, Effort, Engine, EngineDefaults, EngineQuotaConfig, EngineQuotaRuntime, EntryBillingFold, EntryBillingUnit, EntryKind, EntryRef, EntryStatus, EnvelopeEncryption, EnvelopeEncryptionOptions, ErrorClass, ErrorCode, ErrorPolicy, EscalatedResult, EscalationDecision, EscalationDecisionAbortedError, EscalationDigest, EscalationKind, EscalationLimits, EscalationOptions, EscalationReport, EscalationRequest, EventBus, EvidenceContract, type EvidenceRef, type ExecKeyDerivation, type ExecutorRegistry, type ExplorationSummary, ExtensionAppendInput, ExtensionDispatchSpec, ExternalIdentityInput, ExternalRegistry, ExtractNecessityInput, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FailoverTarget, FailoverTrigger, FallbackField, FallbackTrigger, FencedCodeMode, FileModelKnowledgeStore, FileModelKnowledgeStoreOptions, FileTranscriptStore, type FinalizationWindowBudget, FinishContract, FinishContractCitations, FinishContractGoldenReject, FinishContractManifest, FinishContractSectionPattern, FinishInfo, FinishSelfTestFailure, FinishSelfTestFixtures, FinishSelfTestReport, FinishValidationChild, FinishValidationInput, FinishValidationSpec, FinishValidationVerdict, FinishValidator, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, Gate, GateAudit, type GateRecord, GitWorktreeProvider, GitWorktreeProviderOptions, GraftBoot, HashVersion, HookVerdict, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, IdentityInput, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, IncrementalSynthesisResult, InvalidResolutionError, InvocationRole, type InvocationTable, InvoiceCardinality, InvoiceExport, InvoicePricingProvenance, InvoiceReconciliation, InvoiceRow, type IsolatedExecContext, type IsolatedExecRequest, type IsolatedExecutorTag, type IsolationProvider, type IsolationSpec, Issue$1 as Issue, JOURNAL_ENVELOPE_MARKER, JournalCompatSubCode, JournalCompatibilityError, JournalEntry, JournalMatcher, JournalMissError, JournalOperation, JournalOrderViolation, type JournalPricingSnapshot, JournalSealedError, JournalSerializationContext, JournalSerializationHook, type JournalStore, type Json, JsonSchema, JsonlFileStore, KB_ACTIVE_CLAIMS_CAP, KB_CARD_RENDER_BUDGET_CHARS, type KbProposal, type KbProposalTrigger, KeyDeriver, KeyRing, KeyedLimiter, KnowledgeCasError, type KnowledgeSnapshot, LARGE_VALUE_WARN_BYTES, LEGACY_LTID_PREFIX, LEGACY_SIGNATURE_INPUTS, LINEAGE_SIG_VERSION, LadderSpec, type LeasableStore, type Lease, LeaseHeldError, Ledger, LineageCounters, LineageIndex, LineageRef, LineageRelation, LineageStats, LogicalTaskId, MASKED_SECRET, MAX_CHILD_RESULT_PAGE_CHARS, MAX_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, MatchResult, McpConfig, McpToolSource, MechanicalGateProfile, MechanicalGateVerdict, MemoryQuotaLimiter, type MetaLookupStore, type ModelCaps, ModelChoice, type ModelClaim, ModelEpochInputs, type ModelKnowledgeHandle, type ModelKnowledgeStore, ModelListConstraint, ModelRef, ModelRetry, ModelSpec, Msg, NoProgressDetector, NodeId, NodeLinkValue, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OnEscalation, OperationDisposition, OrchestrateAcceptance, OrchestrateClaimConsistency, OrchestrateClaimConsistencyMeta, OrchestrateContradictions, OrchestrateContradictionsMeta, OrchestrateOptions, OrchestrateSynthesis, OrchestrateSynthesisSkipReason, OrchestratorBudgetSpec, OrchestratorCapConfigError, OrchestratorExtension, OrchestratorExtensionIO, OrchestratorRuntime, Out, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, Part, PendingExternal, PendingToolTurn, PermissionConfig, PermissionGate, PermissionHook, PermissionPreset, PermissionRule, PermissionVerdict, PersistedTerminalRefusal, PersistedTerminalResult, type PhaseRow, PhaseTarget, PilotAgentProfileOptions, PilotAgentProfileResult, type PinnedPricingSegment, PipelineCollected, PipelineOpts, PlanInvariantError, type PostFanInBreakdown, PreflightAdmissionRow, PreflightFinding, PreflightInput, PreflightOrchestratorSpec, PreflightReport, PreflightSpawnReport, PreflightSpawnSpec, PreflightToolCeiling, PriceTable, PricedComponent, PricedComponents, PricedUsage, type Pricing, type PricingTier, ProgressReport, type ProviderAdapter, ProviderCallRecord, ProviderStatement, QUOTA_WINDOW_MS, QualityFloors, QuotaCounters, type QuotaDecision, type QuotaEstimate, type QuotaLimiter, type QuotaReservationRequest, QuotaRule, QuotaWindowSnapshot, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, RandIdentityInput, RandPayload, RateLimitObservation, ReconcileOptions, ReconcileResult, ReconcileStatementOptions, RefEntryAppender, RefEntryClassification, RefusalInfo, RepeatedClaim, ReplayDisposition, ReplayMode, ReplayPlanHashMismatch, Replayer, RepositoryResearchToolset, RepositoryResearchToolsetOptions, ResearchAgentProfileOptions, ResearchAgentProfileResult, ResearchEvidenceEntry, ResolutionArbiter, ResolutionAttempt, ResolutionBy, ResolutionFold, ResolutionLayer, ResolutionOutcome, ResolutionPayload, ResolvedInvocation, ResolvedToolset, ResumeHandle, ResumeOptions, ResumePreview, ResumeReport, RetryClass, RetryPolicy, ReuseConfig, RiskRuleValue, Role, RulvarError, RulvarErrorCode, RunAgentOptions, RunAuditVerdict, RunBudget, RunEventSink, RunExport, RunFactPairOptions, RunFactPairsFold, RunFactsSheet, type RunFilter, RunHandle, RunInternals, type RunMeta, RunOptions, RunOutcome, RunProfile, RunStateAudit, RunStatus, RuntimeEventSink, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxBridge, SandboxBridgeOptions, SandboxError, SandboxHostToWorker, SandboxMethod, SandboxWorkerToHost, SchemaPair, SchemaSpec, SchemaValidationResult, ScopeSegment, ScriptRejected, ScriptRunner, ScrubNote, SecretMasker, SectionMatchMode, SectionPatternEntry, SemanticPassSummary, SemanticPassesSummary, Semaphore, SerializationHook, Settled, SettlementError, ShellPatternRules, ShellSegment, ShellVerdict, SinglePhaseAppend, SpanMinter, SpanRegistry, SpawnAdmissionValue, SpawnAgentParams, SpawnKey, SpawnLineage, SpawnLineageOpt, SpawnOrigin, SpawnRecord, Spend, Stage, type StandardJSONSchemaV1, type StandardSchemaV1, StatementCategoryRow, StatementColumnMap, StatementCoverage, StatementReconciliation, StatementRequestRow, StepIdentityInput, type StreamHooks, StructuredOutputTier, SupersededError, SuspendedAppend, SuspensionState, TOOL_NAME_PATTERN, type TaskClass, TaskDigest, TaskSpec, type TerminalEnvelope, TerminalOutcomeFacts, TerminalPatch, TerminationAccount, TerminationAccountSnapshot, TerminationDeniedValue, TerminationDeniedWriter, TerminationInitValue, TerminationLimits, TerminationResource, ToolAuthority, type ToolBudgetSummary, ToolCallRequest, ToolChoice, type ToolContext, ToolContextSeed, ToolContract, type ToolDef, type ToolEvents, type ToolExecutor, type ToolExecutorProvider, ToolInit, type ToolRisk, ToolRuntime, type ToolSource, type ToolSourceSession, ToolsOption, ToolsetAttestation, TranscriptSerializationHook, type TranscriptStore, TriggerClass, TtlState, Usage, UsageLimits, UsageSlice, VerifiedRecommendation, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, WakeBudgetBlock, WakeDigest, WakeTrigger, WireError, Workflow, WorkflowCallOpts, type WorkflowEvent, type WorkflowEventBody, WorkflowRegistry, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/dist/index.js
CHANGED
|
@@ -12719,7 +12719,8 @@ async function runAgent(options) {
|
|
|
12719
12719
|
kind: "budget",
|
|
12720
12720
|
retryable: false
|
|
12721
12721
|
};
|
|
12722
|
-
|
|
12722
|
+
const lastMessage = messages[messages.length - 1];
|
|
12723
|
+
errorMessage = (grantedRepairTurns > 0 && lastMessage !== void 0 && lastMessage.parts.some((part) => part.type === "tool-result" && part.name === options.terminalTool?.name && part.isError === true) ? "the granted repair turn could not be funded: " : "") + (thrown instanceof Error ? thrown.message : String(thrown));
|
|
12723
12724
|
break;
|
|
12724
12725
|
}
|
|
12725
12726
|
turns += 1;
|
|
@@ -20027,6 +20028,80 @@ function evidencePreservedValidator(options) {
|
|
|
20027
20028
|
};
|
|
20028
20029
|
}
|
|
20029
20030
|
/**
|
|
20031
|
+
* Counted collections inside named sections (RV2206, the subscription
|
|
20032
|
+
* parity series). The engine validated citations per section since the
|
|
20033
|
+
* v1.71 review, but the numbered collections the parity contract
|
|
20034
|
+
* demands (48 N-case ids, 16 counterexample ids) were policed by
|
|
20035
|
+
* nothing: the second accepted dossier carried 0 and 0 against an
|
|
20036
|
+
* instruction naming both, and only a runner-side format pre-teach
|
|
20037
|
+
* closed the gap, by hope rather than contract. Each entry slices its
|
|
20038
|
+
* section exactly like sectionCitationsValidator (first marker
|
|
20039
|
+
* occurrence to the next marker in position order) and counts matches,
|
|
20040
|
+
* DISTINCT by first capture when the pattern captures; the reasons
|
|
20041
|
+
* name the section, the label, the found count against the minimum,
|
|
20042
|
+
* and with a capturing pattern the missing count in ids, so a repair
|
|
20043
|
+
* turn knows exactly what to add (the RV2105 lesson). Default name
|
|
20044
|
+
* 'section-pattern-counts'.
|
|
20045
|
+
*/
|
|
20046
|
+
function sectionPatternCountValidator(options) {
|
|
20047
|
+
const sections = requireNonEmptyStrings(options.sections, "sectionPatternCountValidator sections");
|
|
20048
|
+
if (options.entries.length === 0) throw new ConfigError("sectionPatternCountValidator entries must be a non empty array");
|
|
20049
|
+
for (const entry of options.entries) {
|
|
20050
|
+
if (!sections.includes(entry.section)) throw new ConfigError(`sectionPatternCountValidator entry section '${entry.section}' is not a declared section`);
|
|
20051
|
+
const globalFlags = (entry.flags ?? "").includes("g") ? entry.flags ?? "" : `${entry.flags ?? ""}g`;
|
|
20052
|
+
try {
|
|
20053
|
+
new RegExp(entry.pattern, globalFlags);
|
|
20054
|
+
} catch (thrown) {
|
|
20055
|
+
throw new ConfigError(`sectionPatternCountValidator pattern does not compile: ${thrown instanceof Error ? thrown.message : String(thrown)}`);
|
|
20056
|
+
}
|
|
20057
|
+
if (!Number.isInteger(entry.min) || entry.min < 1) throw new ConfigError(`sectionPatternCountValidator min must be a positive integer; got ${String(entry.min)}`);
|
|
20058
|
+
}
|
|
20059
|
+
const match = options.match === void 0 ? "anywhere" : requireSectionMatchMode(options.match, "sectionPatternCountValidator match");
|
|
20060
|
+
const fencedCode = options.fencedCode === void 0 ? "counted" : requireFencedCodeMode(options.fencedCode, "sectionPatternCountValidator fencedCode");
|
|
20061
|
+
const qualifier = missingSectionQualifier(match, fencedCode);
|
|
20062
|
+
const counted = fencedCode === "excluded" ? " (fenced code excluded)" : "";
|
|
20063
|
+
return {
|
|
20064
|
+
name: options.name ?? "section-pattern-counts",
|
|
20065
|
+
validate: (input) => {
|
|
20066
|
+
const scope = fencedCode === "excluded" ? stripFencedBlocks(input.text) : input.text;
|
|
20067
|
+
const positions = /* @__PURE__ */ new Map();
|
|
20068
|
+
for (const section of sections) {
|
|
20069
|
+
const at = sectionPosition(scope, section, match);
|
|
20070
|
+
if (at >= 0) positions.set(section, at);
|
|
20071
|
+
}
|
|
20072
|
+
const ordered = [...positions.entries()].sort((a, b) => a[1] - b[1]);
|
|
20073
|
+
const reasons = [];
|
|
20074
|
+
for (const entry of options.entries) {
|
|
20075
|
+
const at = positions.get(entry.section);
|
|
20076
|
+
const what = entry.label ?? `matches of /${entry.pattern}/`;
|
|
20077
|
+
if (at === void 0) {
|
|
20078
|
+
reasons.push(`required section '${entry.section}' is missing${qualifier}, so its ${what} count cannot be judged`);
|
|
20079
|
+
continue;
|
|
20080
|
+
}
|
|
20081
|
+
const next = ordered.find(([, position]) => position > at);
|
|
20082
|
+
const slice = scope.slice(at, next === void 0 ? scope.length : next[1]);
|
|
20083
|
+
const globalFlags = (entry.flags ?? "").includes("g") ? entry.flags ?? "" : `${entry.flags ?? ""}g`;
|
|
20084
|
+
const captures = /* @__PURE__ */ new Set();
|
|
20085
|
+
let raw = 0;
|
|
20086
|
+
let capturing = false;
|
|
20087
|
+
for (const found of slice.matchAll(new RegExp(entry.pattern, globalFlags))) {
|
|
20088
|
+
raw += 1;
|
|
20089
|
+
if (found[1] !== void 0) {
|
|
20090
|
+
capturing = true;
|
|
20091
|
+
captures.add(found[1]);
|
|
20092
|
+
}
|
|
20093
|
+
}
|
|
20094
|
+
const count = capturing ? captures.size : raw;
|
|
20095
|
+
if (count < entry.min) reasons.push(`section '${entry.section}' carries ${String(count)}${capturing ? " distinct" : ""} ${what} against the required ${String(entry.min)}${counted}; add the missing ${String(entry.min - count)} inside that section`);
|
|
20096
|
+
}
|
|
20097
|
+
return reasons.length === 0 ? ok : {
|
|
20098
|
+
ok: false,
|
|
20099
|
+
reasons
|
|
20100
|
+
};
|
|
20101
|
+
}
|
|
20102
|
+
};
|
|
20103
|
+
}
|
|
20104
|
+
/**
|
|
20030
20105
|
* Requires at least `min` matches of `pattern` INSIDE every named
|
|
20031
20106
|
* section (the v1.71 experiment review, P1.2: a total citation count
|
|
20032
20107
|
* hides sections carrying zero provenance). A section's slice runs
|
|
@@ -20885,7 +20960,7 @@ function countWords(text) {
|
|
|
20885
20960
|
*/
|
|
20886
20961
|
function finishContract(manifest) {
|
|
20887
20962
|
if (typeof manifest !== "object" || manifest === null) throw new ConfigError("finishContract manifest must be an object");
|
|
20888
|
-
const { sections, sectionsMatch, words, citations, fencedCode } = manifest;
|
|
20963
|
+
const { sections, sectionsMatch, words, citations, sectionPatterns, fencedCode } = manifest;
|
|
20889
20964
|
if (sections === void 0 && words === void 0 && citations === void 0) throw new ConfigError("finishContract manifest must declare sections, words, or citations");
|
|
20890
20965
|
let normalizedSections;
|
|
20891
20966
|
if (sections !== void 0) {
|
|
@@ -20941,6 +21016,47 @@ function finishContract(manifest) {
|
|
|
20941
21016
|
...citations.perSection === void 0 ? {} : { perSection: citations.perSection }
|
|
20942
21017
|
};
|
|
20943
21018
|
}
|
|
21019
|
+
let normalizedSectionPatterns;
|
|
21020
|
+
if (sectionPatterns !== void 0) {
|
|
21021
|
+
if (!Array.isArray(sectionPatterns) || sectionPatterns.length === 0) throw new ConfigError("finishContract sectionPatterns must be a non empty array");
|
|
21022
|
+
if (normalizedSections === void 0) throw new ConfigError("finishContract sectionPatterns requires sections");
|
|
21023
|
+
normalizedSectionPatterns = [];
|
|
21024
|
+
for (const entry of sectionPatterns) {
|
|
21025
|
+
if (typeof entry !== "object" || entry === null) throw new ConfigError("finishContract sectionPatterns entries must be objects");
|
|
21026
|
+
if (!normalizedSections.includes(entry.section)) throw new ConfigError(`finishContract sectionPatterns section '${String(entry.section)}' is not a declared section`);
|
|
21027
|
+
requirePositiveInt(entry.min, "finishContract sectionPatterns min");
|
|
21028
|
+
const entryFlags = entry.flags ?? "";
|
|
21029
|
+
const entryGlobal = entryFlags.includes("g") ? entryFlags : `${entryFlags}g`;
|
|
21030
|
+
try {
|
|
21031
|
+
new RegExp(entry.pattern, entryGlobal);
|
|
21032
|
+
} catch (thrown) {
|
|
21033
|
+
throw new ConfigError(`finishContract sectionPatterns pattern does not compile: ${thrown instanceof Error ? thrown.message : String(thrown)}`);
|
|
21034
|
+
}
|
|
21035
|
+
if (!Array.isArray(entry.samples) || entry.samples.length === 0) throw new ConfigError("finishContract sectionPatterns samples must be a non empty array: the golden fixtures embed literal matches");
|
|
21036
|
+
const captures = /* @__PURE__ */ new Set();
|
|
21037
|
+
let capturing = false;
|
|
21038
|
+
for (const sample of entry.samples) {
|
|
21039
|
+
if (typeof sample !== "string" || sample.length === 0 || sample.includes("\n")) throw new ConfigError("finishContract sectionPatterns samples must be non empty single lines");
|
|
21040
|
+
const found = [...sample.matchAll(new RegExp(entry.pattern, entryGlobal))];
|
|
21041
|
+
if (found.length === 0) throw new ConfigError(`finishContract sectionPatterns sample '${sample}' does not match its pattern`);
|
|
21042
|
+
for (const one of found) if (one[1] !== void 0) {
|
|
21043
|
+
capturing = true;
|
|
21044
|
+
captures.add(one[1]);
|
|
21045
|
+
}
|
|
21046
|
+
if (normalizedSections.some((section) => sample.includes(section))) throw new ConfigError("finishContract sectionPatterns samples must not contain a declared section marker");
|
|
21047
|
+
}
|
|
21048
|
+
if (capturing && captures.size < entry.min) throw new ConfigError(`finishContract sectionPatterns samples carry ${String(captures.size)} distinct captures, below min ${String(entry.min)}: the golden accept skeleton could never satisfy the demand it embeds`);
|
|
21049
|
+
if (!capturing && entry.samples.length < entry.min) throw new ConfigError(`finishContract sectionPatterns needs at least min samples without a capture group; got ${String(entry.samples.length)} of ${String(entry.min)}`);
|
|
21050
|
+
normalizedSectionPatterns.push({
|
|
21051
|
+
section: entry.section,
|
|
21052
|
+
pattern: entry.pattern,
|
|
21053
|
+
...entryFlags === "" ? {} : { flags: entryFlags },
|
|
21054
|
+
min: entry.min,
|
|
21055
|
+
samples: [...entry.samples],
|
|
21056
|
+
...entry.label === void 0 ? {} : { label: entry.label }
|
|
21057
|
+
});
|
|
21058
|
+
}
|
|
21059
|
+
}
|
|
20944
21060
|
let normalizedSectionsMatch;
|
|
20945
21061
|
if (sectionsMatch !== void 0) {
|
|
20946
21062
|
if (sectionsMatch !== "anywhere" && sectionsMatch !== "line") throw new ConfigError(`finishContract sectionsMatch must be 'anywhere' or 'line'; got ${String(sectionsMatch)}`);
|
|
@@ -20955,6 +21071,7 @@ function finishContract(manifest) {
|
|
|
20955
21071
|
if (normalizedFencedCode === "excluded") {
|
|
20956
21072
|
const opensFence = /^\s*(`{3,}|~{3,})/;
|
|
20957
21073
|
for (const section of normalizedSections ?? []) if (opensFence.test(section)) throw new ConfigError(`finishContract section '${section}' would open a code fence under fencedCode 'excluded'`);
|
|
21074
|
+
for (const entry of normalizedSectionPatterns ?? []) for (const sample of entry.samples) if (opensFence.test(sample)) throw new ConfigError(`finishContract sectionPatterns sample '${sample}' would open a code fence under fencedCode 'excluded'`);
|
|
20958
21075
|
if (normalizedCitations !== void 0 && opensFence.test(normalizedCitations.sample)) throw new ConfigError(`finishContract citations.sample '${normalizedCitations.sample}' would open a code fence under fencedCode 'excluded'`);
|
|
20959
21076
|
}
|
|
20960
21077
|
const normalized = {
|
|
@@ -20962,12 +21079,20 @@ function finishContract(manifest) {
|
|
|
20962
21079
|
...normalizedSectionsMatch === void 0 ? {} : { sectionsMatch: normalizedSectionsMatch },
|
|
20963
21080
|
...normalizedWords === void 0 ? {} : { words: normalizedWords },
|
|
20964
21081
|
...normalizedCitations === void 0 ? {} : { citations: normalizedCitations },
|
|
21082
|
+
...normalizedSectionPatterns === void 0 ? {} : { sectionPatterns: normalizedSectionPatterns },
|
|
20965
21083
|
...normalizedFencedCode === void 0 ? {} : { fencedCode: normalizedFencedCode }
|
|
20966
21084
|
};
|
|
20967
21085
|
const hash = createHash("sha256").update(jcsSerialize(normalized), "utf8").digest("hex");
|
|
20968
21086
|
if (normalizedSections !== void 0) Object.freeze(normalizedSections);
|
|
20969
21087
|
if (normalizedWords !== void 0) Object.freeze(normalizedWords);
|
|
20970
21088
|
if (normalizedCitations !== void 0) Object.freeze(normalizedCitations);
|
|
21089
|
+
if (normalizedSectionPatterns !== void 0) {
|
|
21090
|
+
for (const entry of normalizedSectionPatterns) {
|
|
21091
|
+
Object.freeze(entry.samples);
|
|
21092
|
+
Object.freeze(entry);
|
|
21093
|
+
}
|
|
21094
|
+
Object.freeze(normalizedSectionPatterns);
|
|
21095
|
+
}
|
|
20971
21096
|
const matchOption = normalizedSectionsMatch === void 0 ? {} : { match: normalizedSectionsMatch };
|
|
20972
21097
|
const fencedOption = normalizedFencedCode === void 0 ? {} : { fencedCode: normalizedFencedCode };
|
|
20973
21098
|
const validators = [];
|
|
@@ -20998,6 +21123,19 @@ function finishContract(manifest) {
|
|
|
20998
21123
|
...matchOption,
|
|
20999
21124
|
...fencedOption
|
|
21000
21125
|
}));
|
|
21126
|
+
if (normalizedSectionPatterns !== void 0 && normalizedSections !== void 0) validators.push(sectionPatternCountValidator({
|
|
21127
|
+
sections: normalizedSections,
|
|
21128
|
+
entries: normalizedSectionPatterns.map((entry) => ({
|
|
21129
|
+
section: entry.section,
|
|
21130
|
+
pattern: entry.pattern,
|
|
21131
|
+
...entry.flags === void 0 ? {} : { flags: entry.flags },
|
|
21132
|
+
min: entry.min,
|
|
21133
|
+
...entry.label === void 0 ? {} : { label: entry.label }
|
|
21134
|
+
})),
|
|
21135
|
+
name: "contract-section-patterns",
|
|
21136
|
+
...matchOption,
|
|
21137
|
+
...fencedOption
|
|
21138
|
+
}));
|
|
21001
21139
|
const promptLines = [];
|
|
21002
21140
|
if (normalizedSections !== void 0) promptLines.push((normalizedSectionsMatch === "line" ? "The final result must contain each of these section markers verbatim, each on its own line: " : "The final result must contain each of these section markers verbatim: ") + normalizedSections.map((section) => `'${section}'`).join(", ") + ".");
|
|
21003
21141
|
if (normalizedWords !== void 0) {
|
|
@@ -21010,6 +21148,10 @@ function finishContract(manifest) {
|
|
|
21010
21148
|
if (normalizedCitations.min !== void 0) promptLines.push(`Include at least ${String(normalizedCitations.min)} citations matching /${normalizedCitations.pattern}/ overall (for example '${normalizedCitations.sample}').`);
|
|
21011
21149
|
if (normalizedCitations.perSection !== void 0) promptLines.push(`Every required section must itself contain at least ${String(normalizedCitations.perSection)} such citations.`);
|
|
21012
21150
|
}
|
|
21151
|
+
for (const entry of normalizedSectionPatterns ?? []) {
|
|
21152
|
+
const what = entry.label ?? `matches of /${entry.pattern}/`;
|
|
21153
|
+
promptLines.push(`Section '${entry.section}' must contain at least ${String(entry.min)} distinct ${what} (for example '${entry.samples[0]}').`);
|
|
21154
|
+
}
|
|
21013
21155
|
if (normalizedFencedCode === "excluded") promptLines.push("Text inside fenced code blocks (``` or ~~~) does not count toward sections, word counts, or citations.");
|
|
21014
21156
|
const lines = [];
|
|
21015
21157
|
const perSection = normalizedCitations?.perSection ?? 0;
|
|
@@ -21019,6 +21161,7 @@ function finishContract(manifest) {
|
|
|
21019
21161
|
const sample = normalizedCitations.sample;
|
|
21020
21162
|
lines.push(Array.from({ length: perSection }, () => sample).join(" "));
|
|
21021
21163
|
}
|
|
21164
|
+
for (const entry of normalizedSectionPatterns ?? []) if (entry.section === section) lines.push(...entry.samples);
|
|
21022
21165
|
}
|
|
21023
21166
|
if (normalizedCitations !== void 0) {
|
|
21024
21167
|
const placed = (normalizedSections?.length ?? 0) * perSection;
|
|
@@ -21076,6 +21219,20 @@ function finishContract(manifest) {
|
|
|
21076
21219
|
addGoldenReject(validator, goldenText.split("\n").filter((line) => line !== last).join("\n"));
|
|
21077
21220
|
break;
|
|
21078
21221
|
}
|
|
21222
|
+
case "contract-section-patterns": {
|
|
21223
|
+
if (normalizedSectionPatterns === void 0 || normalizedSectionPatterns.length === 0) break;
|
|
21224
|
+
const first = normalizedSectionPatterns[0];
|
|
21225
|
+
const dropped = first.samples[first.samples.length - 1];
|
|
21226
|
+
let removed = false;
|
|
21227
|
+
addGoldenReject(validator, goldenText.split("\n").filter((line) => {
|
|
21228
|
+
if (!removed && line === dropped) {
|
|
21229
|
+
removed = true;
|
|
21230
|
+
return false;
|
|
21231
|
+
}
|
|
21232
|
+
return true;
|
|
21233
|
+
}).join("\n"));
|
|
21234
|
+
break;
|
|
21235
|
+
}
|
|
21079
21236
|
case "contract-words": {
|
|
21080
21237
|
const deficit = normalizedWords?.min !== void 0 ? normalizedWords.min - 1 : (normalizedWords?.max ?? 0) + 1;
|
|
21081
21238
|
addGoldenReject(validator, Array.from({ length: deficit }, () => FILLER_WORD).join(" "));
|
|
@@ -24072,8 +24229,32 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24072
24229
|
try {
|
|
24073
24230
|
result = await runtime.runInScope(orchestratorState, () => ctx.agent(orchestratorPrompt(goal, opts?.maxSpawns, promptLines.length === 0 ? void 0 : promptLines), agentOpts));
|
|
24074
24231
|
} catch (thrown) {
|
|
24232
|
+
if (thrown instanceof BudgetExhaustedError) {
|
|
24233
|
+
const repairEntryRef = thrown.data?.entryRef;
|
|
24234
|
+
const repairTerminal = typeof repairEntryRef === "number" ? internals.replayer.snapshot().find((entry) => entry.seq === repairEntryRef) : void 0;
|
|
24235
|
+
const repairMessage = repairTerminal?.error?.message ?? "";
|
|
24236
|
+
if (repairMessage.includes("the granted repair turn could not be funded: ")) {
|
|
24237
|
+
const repairDeclineKey = deriverV2.deriveKey({ kind: "orchestrator-repair-grant-declined" });
|
|
24238
|
+
if (!internals.replayer.snapshot().some((entry) => entry.kind === "decision" && entry.key === repairDeclineKey)) await internals.replayer.appendSinglePhase({
|
|
24239
|
+
scope: callingState.scope,
|
|
24240
|
+
key: repairDeclineKey,
|
|
24241
|
+
kind: "decision",
|
|
24242
|
+
status: "ok",
|
|
24243
|
+
spanId: internals.spans.mint(callingState.spanId),
|
|
24244
|
+
site: "orchestrator-budget",
|
|
24245
|
+
value: {
|
|
24246
|
+
decisionType: "orchestrator_repair_grant_declined",
|
|
24247
|
+
reason: repairMessage.slice(0, 300),
|
|
24248
|
+
terminalRef: repairTerminal?.seq ?? null,
|
|
24249
|
+
remainingUsd: internals.budget.remainingUsd() ?? null
|
|
24250
|
+
}
|
|
24251
|
+
});
|
|
24252
|
+
throw new FailRunError(`the orchestrator finish could not complete its granted repair: ${repairMessage}`, { data: { source: "orchestrator_finish_validation" } });
|
|
24253
|
+
}
|
|
24254
|
+
}
|
|
24075
24255
|
const budgetReason = thrown instanceof BudgetExhaustedError ? thrown.data?.reason : void 0;
|
|
24076
|
-
|
|
24256
|
+
const crossed = thrown instanceof BudgetExhaustedError ? thrown.data : void 0;
|
|
24257
|
+
if (budgetReason !== "in-flight-exposure" && budgetReason !== "output-floor" && crossed?.source !== "root" && crossed?.account !== "run") throw thrown;
|
|
24077
24258
|
const exposureKey = deriverV2.deriveKey({ kind: "orchestrator-exposure-fallback" });
|
|
24078
24259
|
if (!internals.replayer.snapshot().some((entry) => entry.kind === "decision" && entry.key === exposureKey)) await internals.replayer.appendSinglePhase({
|
|
24079
24260
|
scope: callingState.scope,
|
|
@@ -24084,7 +24265,7 @@ function makeOrchestratorWorkflow(goal, opts) {
|
|
|
24084
24265
|
site: "orchestrator-budget",
|
|
24085
24266
|
value: {
|
|
24086
24267
|
decisionType: "orchestrator_finalize_fallback",
|
|
24087
|
-
reason: budgetReason === "output-floor" ? "budget-floor" : "exposure-abort",
|
|
24268
|
+
reason: budgetReason === "output-floor" ? "budget-floor" : budgetReason === "in-flight-exposure" ? "exposure-abort" : "budget-ceiling",
|
|
24088
24269
|
turnsUsed: 0,
|
|
24089
24270
|
foldParams: {
|
|
24090
24271
|
planHash: "",
|
|
@@ -27371,4 +27552,4 @@ function createSandboxBridge(ctx, options) {
|
|
|
27371
27552
|
};
|
|
27372
27553
|
}
|
|
27373
27554
|
//#endregion
|
|
27374
|
-
export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JournalSealedError, 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_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, SupersededError, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
|
27555
|
+
export { AWAIT_SCHEMA, AdmissionController, AdmissionRejectedError, AgentCallError, BUDGET_ABORT_REASON, BudgetExhaustedError, CANCEL_AGENT_SCHEMA, CHECKPOINT_FORMAT_V1, CLAIM_JUDGE_LABEL, CLAIM_STATEMENT_MAX_CHARS, CLAIM_TTL_DAYS, COMPACTION_SUMMARY_PREFIX, CURRENT_HASH_VERSION, ConfigError, DECISION_CHAIN_KINDS, DEFAULT_ANCHOR_PATTERN, DEFAULT_ARTIFACT_PATTERN, DEFAULT_CHILD_BUDGET_FRACTION, DEFAULT_CHILD_RESULT_PAGE_CHARS, DEFAULT_CITATION_PATTERN, DEFAULT_CITATION_SAMPLE, DEFAULT_CLAIM_JUDGE_MAX_TURNS, DEFAULT_COMPACTION_THRESHOLD, DEFAULT_ESCALATION_LIMITS, DEFAULT_EVIDENCE_CALLS_PER_ENTRY, DEFAULT_EVIDENCE_GRADE_PHRASES, DEFAULT_EVIDENCE_MIN_SHARE, DEFAULT_EVIDENCE_OVERHEAD_CALLS, DEFAULT_FINISH_MAX_REPAIRS, DEFAULT_FLAT_RESERVE_USD, DEFAULT_MAX_CHILDREN_PER_NODE, DEFAULT_MAX_CLAIM_PAIRS, DEFAULT_MAX_CONTRADICTIONS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_EXCERPT_CHARS, DEFAULT_MAX_OSCILLATIONS_PER_KEY, DEFAULT_MAX_PAIR_EXCERPT_CHARS, DEFAULT_MAX_PINNED_WORKTREES, DEFAULT_MAX_POOL_PER_PAIR, DEFAULT_MAX_QUOTA_DENIALS, DEFAULT_MAX_REVISIONS_PER_RUN, DEFAULT_MAX_RUN_FACT_PAIRS, DEFAULT_MAX_TOTAL_SPAWNS, DEFAULT_MAX_TURNS, DEFAULT_MODEL_RETRY_ATTEMPTS, DEFAULT_NO_PROGRESS_TURNS, DEFAULT_PER_RUN_CONCURRENCY, DEFAULT_RETRY_POLICY, DEFAULT_STREAM_IDLE_TIMEOUT_MS, DEFAULT_SYNTHESIS_MAX_TURNS, DEFAULT_SYNTHESIS_NOTE_MAX_TURNS, DedupIndex, DeterminismError, EMIT_RESULT_TOOL, EMPTY_AUTHORITY_HASH, EMPTY_SCHEMA_HASH, EMPTY_TOOLSET_HASH, ESCALATE_TOOL_NAME, ESCALATION_REPORT_SCHEMA, ESCALATION_REQUEST_SCHEMA, EVENT_SEGMENT_STRIDE, EXPOSURE_WAIT_SWEEP_MS, EscalationDecisionAbortedError, EventBus, ExternalRegistry, FINALIZE_SYNTHESIS_INSTRUCTION, FINISH_SCHEMA, FINISH_SECTIONAL_SCHEMA, FINISH_TOOL_NAME, FUTURE_RATES_TOLERANCE_MS, FailRunError, FileModelKnowledgeStore, FileTranscriptStore, GET_CHILD_RESULT_SCHEMA, GET_CHILD_RESULT_TOOL_NAME, GET_SETTLED_CHILD_RESULTS_SCHEMA, GET_SETTLED_CHILD_RESULTS_TOOL_NAME, GitWorktreeProvider, IMPLEMENTATION_PROFILE_LIMITS, INBOX_PROPOSAL_TTL_DAYS, IN_FLIGHT_EXPOSURE_REFUSAL_PREFIX, InMemoryStore, InMemoryTranscriptStore, InProcessRunner, InvalidResolutionError, JOURNAL_ENVELOPE_MARKER, JournalCompatibilityError, JournalMatcher, JournalMissError, JournalOrderViolation, JournalSealedError, 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_CRITICAL_UNCOVERED, MAX_DEPTH_CEILING, MAX_RUN_FACTS_SHEET_CHARS, MAX_RUN_ID_LENGTH, MAX_TIMER_DELAY_MS, ModelRetry, NoProgressDetector, NonSerializableValueError, ORCHESTRATE_WORKFLOW_NAME, OrchestratorCapConfigError, PARALLEL_AGENTS_SCHEMA, PROGRESS_REPORT_TOOL_NAME, ParallelSiteCounter, PlanInvariantError, QUOTA_WINDOW_MS, READ_CHILD_ARTIFACT_SCHEMA, READ_CHILD_ARTIFACT_TOOL_NAME, RESEARCH_PROFILE_LIMITS, REVIEW_PROFILE_LIMITS, ROLE_EFFORT_DEFAULTS, ROOT_ACCOUNT, ROOT_SCOPE, RUN_FACTS_ANCHOR, RUN_PROFILES, RUN_SETTLE_DECISION_TYPE, ReplayPlanHashMismatch, Replayer, ResolutionArbiter, ResolutionFold, RulvarError, RunBudget, SANDBOX_AGENT_OPT_KEYS, SPAWN_AGENT_SCHEMA, SandboxError, ScriptRejected, Semaphore, SettlementError, SpanRegistry, SupersededError, TOOL_NAME_PATTERN, TerminationAccount, WAIT_FOR_EVENTS_SCHEMA, WAIT_FOR_EVENTS_TOOL_NAME, WAKE_SUMMARY_RENDER_BUDGET_CHARS, accountSpendFromJournal, admissionReserveUsd, affordableOutputTokens, agentErrorFromWire, agentErrorToWire, agentResultWire, agentScope, applyClaimOps, applyStructuredOutputTier, approachSigCoarse, approachSigOf, archiveDeprecatedModelOps, assertFencedWrites, assertSafeRunId, atCompactionThreshold, attestToolset, auditRun, auditRuns, buildAbandonFold, buildAdapterRegistry, buildCostReport, buildDeriverRegistry, buildOrchestratorTools, buildTerminationInitValue, buildToolContext, canRideLoopTurn, canonicalIsolationTag, canonicalizeLadder, canonicalizeSchema, capIssues, capsHashOf, checkFloors, checkpointRefFor, childCoveragePrefix, citationTargetsValidator, citedValueValidator, claimCoverageOf, claimExpired, claimExpiry, claimIssues, claimOpIssues, classifyAgentError, classifyAttemptOutcome, collectDeclaredLadders, compactMessages, compareRates, compilePermissionChain, compilePermissionPreset, compileSecretMasker, compileVerifiedLayer, constantTimeEqual, costReportFromJournal, countsAgainstLimit, createCanonicalIdMinter, createCtx, createEngine, createEnvelopeEncryption, createSandboxBridge, currentOnlyKeyRing, decodeCheckpoint, dedupeRepeatedClaims, defineWorkflow, deriveContentKey, deriverV1, deriverV2, digestOf, dispatchProjectionReserveUsd, dispositionHook, emptyDigestBlocks, emptyToolset, encodeCheckpoint, enforceToolsetAttestation, entryUsageSlices, escalateTool, evaluatePermission, evaluateReuse, evidenceGradeValidator, evidencePreservedValidator, executeWorkflow, executionFactsOf, exhaustionCodeOf, extractCandidate, failoverTriggerOf, fallbackTriggerOf, filterClaimsForRun, finalizeFires, findContradictions, finishContract, foldLedger, foldTermination, formatCharacterValidator, formatRePrompt, formatScopePath, hasFencedWrites, hasMetaLookup, hashRunArgs, hashRunOutput, hashWorkflowBody, hashWorkflowSource, headingStructureValidator, identityJcs, implementationAgentProfile, invoiceFromJournal, isEscalated, isSchemaPairSpec, isStandardSchemaSpec, isStrictCompatibleSchema, journalPricingSnapshot, kMaxOf, knowledgeHash, ladderLengthOf, ladderRungChoice, lastRunSettle, latestProgressReport, lexShellCommand, liftRetainedParts, lineageWeightOf, localKeyProvider, makeOrchestratorWorkflow, maskSecrets, maskSecretsDeep, maskSecretsJson, matchArgvPattern, matchShellCommand, mcp, memoryQuotaLimiter, mergeQuotaDenial, mergeUsageLimits, metaMatchesFilter, minMatchesValidator, modelEpochOf, modelKnowledgeCard, modelSpecIdentity, needsSeparateExtract, nextFailover, nodeLinkKey, normalizeApproachTag, normalizeEntry, normalizeFallbacks, orchestrate, orchestratorAdmissionEstCostUsd, pairDraftClaims, pairRunFactClaims, parallelScope, parseModelRef, parseScopePath, persistedTerminalEnvelope, phiInitialOf, pilotAgentProfile, pipelineScope, planNodeScope, preflightEstimate, priceComponentsOf, priceEntryBilling, priceEntryUsage, priceUsdOf, profileCard, profileRegistrySnapshotHash, progressReportTool, projectHistory, projectIdentity, projectToJsonSchema, proposalStatement, providerOf, quotaActualRequestsDelta, quotaActualTokens, quotaEstimateTokens, quotaRuleAdmission, quotaRuleKey, quotaRuleMatches, readRunMeta, readTerminationInit, reconcileRunMeta, reconcileStatement, reduceAuditTrail, reduceCriticalPath, reduceDecisionChain, reduceInvocationTable, registryKeyRing, remeasureQueue, replayDisposition, repositoryResearchToolset, requiredFieldsValidator, requiredSectionsValidator, researchAgentProfile, resolveModelInvocation, resolvePricing, resolveToolset, retryClassOf, retryDelayMs, reviewAgentProfile, roleConfiguredInRouting, roundOneDisposition, runAgent, runProfile, sanitizeTerminalText, sanitizeTokenCount, sanitizeUsage, sanitizeUsageDelta, scanJournalCompatibility, schemaHash, schemaHashOfSpec, sectionCitationsValidator, sectionPatternCountValidator, selectStructuredOutputTier, selfTestFinishValidation, shouldCompact, snapshotQuotaRules, snapshotUsage, spawnDepthOf, spliceSections, statementFromRows, stripFencedBlocks, sumUsage, summarizeInstruction, summarizeOutput, terminalEnvelopeOf, terminationConfigDrift, tierWithinCaps, toApprovalDecision, toJournalValue, tool, toolAuthority, toolContract, toolContractHash, toolsetAuthorityHash, toolsetHash, ttlState, usageViolations, validateDetachedResolution, validateEditorialCommit, validateEngineQuotaConfig, validateEntryShape, validateEscalationLimits, validateEscalationReport, validateQuotaRules, validateRetryPolicy, validateSchemaSpec, validateTerminationLimits, validateToolsetAttestation, validateUsageLimits, wordCountValidator, workflowScope, workflowSourceRef, wrapJournalStore, wrapTranscriptStore };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rulvar/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.223.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",
|