effect-agent 0.1.0-beta.144 → 0.1.0-beta.149
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/{Admin-CQMppCcy.d.mts → Admin-B8ISZyYf.d.mts} +37 -22
- package/dist/Agent-1DMSO_Fl.mjs.map +1 -1
- package/dist/{Agent-BWhD4Dvu.d.mts → Agent-Cjd_ZveM.d.mts} +7 -3
- package/dist/{AgentRuntime-xeCUXutN.mjs → AgentRuntime-D8U9gl9Q.mjs} +23 -18
- package/dist/AgentRuntime-D8U9gl9Q.mjs.map +1 -0
- package/dist/{AgentRuntime-B4kIzmSF.d.mts → AgentRuntime-sXpKcyxu.d.mts} +5 -5
- package/dist/{DurableAgentRuntime-D8GI66mP.mjs → DurableAgentRuntime-DLa4IwFi.mjs} +87 -49
- package/dist/DurableAgentRuntime-DLa4IwFi.mjs.map +1 -0
- package/dist/{EventSource-w9PonN9X.d.mts → EventSource-CkN05NT3.d.mts} +2 -2
- package/dist/{Messaging-Dnmk31yq.d.mts → Messaging-ccQURKCf.d.mts} +3 -3
- package/dist/{MessagingHost-CajpPDPG.d.mts → MessagingHost-D04wE-7W.d.mts} +2 -2
- package/dist/{Output-DhtWbBcw.d.mts → Output-CFD1CPfU.d.mts} +2 -2
- package/dist/{PreparedInputAdmission-BfcLy_k4.d.mts → PreparedInputAdmission-fctZOTnn.d.mts} +3 -3
- package/dist/{RunOptions-IlEXLG5F.d.mts → RunOptions-Bv9NpkPZ.d.mts} +10 -2
- package/dist/{Subagent-Cl8D1mFM.d.mts → Subagent-VHrANXFy.d.mts} +5 -5
- package/dist/{Subagent-8RzJkqJ9.mjs → Subagent-hG9lJ7tJ.mjs} +2 -2
- package/dist/{Subagent-8RzJkqJ9.mjs.map → Subagent-hG9lJ7tJ.mjs.map} +1 -1
- package/dist/{SubagentHost-B6f4PBC2.d.mts → SubagentHost-C-4A7tA2.d.mts} +2 -2
- package/dist/{Subscription-ClkC4_T0.d.mts → Subscription-B16A-48F.d.mts} +2 -2
- package/dist/{SubscriptionInput-CMjEKL1z.d.mts → SubscriptionInput-DIU7CiXE.d.mts} +2 -2
- package/dist/capabilities/Commands.d.mts +1 -1
- package/dist/capabilities/Messaging.d.mts +1 -1
- package/dist/capabilities/RunHooks.d.mts +1 -1
- package/dist/capabilities/Subagent.d.mts +1 -1
- package/dist/capabilities/Subagent.mjs +1 -1
- package/dist/core/Agent.d.mts +1 -1
- package/dist/durable/Admin.d.mts +1 -1
- package/dist/durable/AgentRegistration.d.mts +1 -1
- package/dist/durable/Certification.d.mts +1 -1
- package/dist/durable/CommittedActivity.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.d.mts +1 -1
- package/dist/durable/DurableAgentRuntime.mjs +1 -1
- package/dist/durable/EventSource.d.mts +1 -1
- package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
- package/dist/durable/LifecyclePublication.d.mts +2 -2
- package/dist/durable/LifecyclePublication.mjs +32 -12
- package/dist/durable/LifecyclePublication.mjs.map +1 -1
- package/dist/durable/MessageDelivery.d.mts +3 -3
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +1 -1
- package/dist/durable/PersistentHistory.d.mts +1 -1
- package/dist/durable/PreparedInputAdmission.d.mts +1 -1
- package/dist/durable/Recovery.d.mts +1 -1
- package/dist/durable/RunJournal.d.mts +1 -1
- package/dist/durable/Scheduling.d.mts +1 -1
- package/dist/durable/SubmissionLedger.d.mts +1 -1
- package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
- package/dist/durable/SubmissionStatus.d.mts +1 -1
- package/dist/durable/Subscription.d.mts +1 -1
- package/dist/durable/SubscriptionInput.d.mts +1 -1
- package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
- package/dist/durable/SubscriptionTools.d.mts +2 -2
- package/dist/durable/SubscriptionTransition.d.mts +1 -1
- package/dist/durable/Subscriptions.d.mts +5 -5
- package/dist/durable/ThreadContextHistory.d.mts +1 -1
- package/dist/durable/ThreadInvariants.d.mts +1 -1
- package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
- package/dist/durable/ThreadStore.d.mts +1 -1
- package/dist/durable/ThreadStoreConformance.d.mts +1 -1
- package/dist/durable/WorkerHost.d.mts +25 -5
- package/dist/durable/WorkerHost.mjs.map +1 -1
- package/dist/engine/AgentRuntime.d.mts +1 -1
- package/dist/engine/AgentRuntime.mjs +1 -1
- package/dist/engine/MessagingHost.d.mts +1 -1
- package/dist/engine/Output.d.mts +1 -1
- package/dist/engine/Output.mjs +1 -1
- package/dist/engine/RunOptions.d.mts +1 -1
- package/dist/engine/RunOptions.mjs.map +1 -1
- package/dist/engine/SubagentHost.d.mts +1 -1
- package/dist/index.d.mts +13 -13
- package/dist/index.mjs +3 -3
- package/dist/{output-contract-CANJJGA5.mjs → output-contract-DS-S8mTv.mjs} +46 -10
- package/dist/{output-contract-CANJJGA5.mjs.map → output-contract-DS-S8mTv.mjs.map} +1 -1
- package/package.json +1 -1
- package/src/core/Agent.ts +6 -2
- package/src/durable/DurableAgentRuntime.ts +86 -78
- package/src/durable/LifecyclePublication.ts +79 -25
- package/src/durable/WorkerHost.ts +23 -1
- package/src/durable/internal/worker-host.ts +169 -17
- package/src/engine/RunOptions.ts +8 -0
- package/src/engine/internal/agent-runtime.ts +80 -18
- package/src/engine/internal/output-contract.ts +67 -8
- package/dist/AgentRuntime-xeCUXutN.mjs.map +0 -1
- package/dist/DurableAgentRuntime-D8GI66mP.mjs.map +0 -1
|
@@ -4,7 +4,7 @@ import { a as Receipt, n as JoinedToHost, t as IdempotencyKey } from "./Receipt-
|
|
|
4
4
|
import { r as Update } from "./AgentUpdates-DMJ-_xow.mjs";
|
|
5
5
|
import { a as FailureDiagnostic_d_exports, i as Failure } from "./FailureDiagnostic-CaAkzGHL.mjs";
|
|
6
6
|
import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
7
|
-
import { r as AnyDefinition, t as Agent_d_exports } from "./Agent-
|
|
7
|
+
import { r as AnyDefinition, t as Agent_d_exports } from "./Agent-Cjd_ZveM.mjs";
|
|
8
8
|
import { _ as WorkerStop, a as WorkerBudgetScope, c as WorkerError, d as WorkerPage, f as WorkerRef, g as WorkerStarted, h as WorkerSource, l as WorkerHistoryEntry, o as WorkerCompletion, s as WorkerContext, v as WorkerStopped, y as WorkerSummary } from "./Worker-fwWkBg12.mjs";
|
|
9
9
|
import { c as MessageRef, l as MessageStatus } from "./Messaging-Dkg87ebg.mjs";
|
|
10
10
|
import { Context, Effect, Option, Schema, Stream } from "effect";
|
|
@@ -169,4 +169,4 @@ declare class SubagentHost extends SubagentHost_base {
|
|
|
169
169
|
}
|
|
170
170
|
//#endregion
|
|
171
171
|
export { StartWorkerRequest as a, WorkerMessageRequest as c, WorkerReportPreparationFailure as d, WorkerReporting as f, FollowUpWorkerRequest as i, WorkerObservation as l, DeferredFollowUpWorkerRequest as n, SubagentHost as o, WorkerRunReport as p, DeferredStartWorkerRequest as r, SubagentHost_d_exports as s, BackgroundReporting as t, WorkerReceiptRequest as u };
|
|
172
|
-
//# sourceMappingURL=SubagentHost-
|
|
172
|
+
//# sourceMappingURL=SubagentHost-C-4A7tA2.d.mts.map
|
|
@@ -3,7 +3,7 @@ import { a as Receipt, r as Principal } from "./Receipt-BAHyigAF.mjs";
|
|
|
3
3
|
import { r as Update } from "./AgentUpdates-DMJ-_xow.mjs";
|
|
4
4
|
import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
|
|
5
5
|
import { _ as Digest, h as DefinitionDigests } from "./Records-B5GFWCpn.mjs";
|
|
6
|
-
import "./Admin-
|
|
6
|
+
import "./Admin-B8ISZyYf.mjs";
|
|
7
7
|
import { t as ScheduleAuthorizationDecision } from "./Schedule-CtYREFnz.mjs";
|
|
8
8
|
import { Context, Effect, Schema } from "effect";
|
|
9
9
|
declare namespace Subscription_d_exports {
|
|
@@ -976,4 +976,4 @@ declare const subscriptionKeyString: (key: SubscriptionKey) => string;
|
|
|
976
976
|
declare const subscriptionDeliveryKeyString: (key: SubscriptionDeliveryKey) => string;
|
|
977
977
|
//#endregion
|
|
978
978
|
export { defaultSubscriptionLimits as A, SubscriptionScanCursors as C, SubscriptionStore as D, SubscriptionSourceError as E, subscriptionKeyString as M, SubscriptionStoreFailure as O, SubscriptionRetentionPolicy as S, SubscriptionSnapshot as T, SubscriptionKey as _, PreparedInput as a, SubscriptionRecord as b, SubscriptionAuthorizer as c, SubscriptionDelivery as d, SubscriptionDeliveryKey as f, SubscriptionFailpointError as g, SubscriptionFailpoint as h, EventSourceVersion as i, subscriptionDeliveryKeyString as j, Subscription_d_exports as k, SubscriptionChange as l, SubscriptionError as m, DeliveryChange as n, SourcePartition as o, SubscriptionDeliverySnapshot as p, EventAcknowledgement as r, SourceRecovery as s, AcceptedEvent as t, SubscriptionConfiguration as u, SubscriptionLimits as v, SubscriptionScope as w, SubscriptionRefusal as x, SubscriptionName as y };
|
|
979
|
-
//# sourceMappingURL=Subscription-
|
|
979
|
+
//# sourceMappingURL=Subscription-B16A-48F.d.mts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as AgentId } from "./Identifiers-CN2s30fF.mjs";
|
|
2
2
|
import { O as PersistedJson, h as DefinitionDigests } from "./Records-B5GFWCpn.mjs";
|
|
3
|
-
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-
|
|
3
|
+
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-B16A-48F.mjs";
|
|
4
4
|
import { Context, Effect, Schema, Scope } from "effect";
|
|
5
5
|
declare namespace SubscriptionInput_d_exports {
|
|
6
6
|
export { SubscriptionInputBinding, SubscriptionInputBindings, makeSubscriptionInputBinding, resolveSubscriptionInput };
|
|
@@ -38,4 +38,4 @@ declare const makeSubscriptionInputBinding: <Event extends Schema.Top, Parameter
|
|
|
38
38
|
}) => Effect.Effect<SubscriptionInputBinding, never, Exclude<R, Scope.Scope> | Exclude<Continuation["DecodingServices"], Scope.Scope> | Exclude<Continuation["EncodingServices"], Scope.Scope> | Exclude<Event["DecodingServices"], Scope.Scope> | Exclude<Input["EncodingServices"], Scope.Scope> | Exclude<Parameters["DecodingServices"], Scope.Scope>>;
|
|
39
39
|
//#endregion
|
|
40
40
|
export { resolveSubscriptionInput as a, makeSubscriptionInputBinding as i, SubscriptionInputBindings as n, SubscriptionInput_d_exports as r, SubscriptionInputBinding as t };
|
|
41
|
-
//# sourceMappingURL=SubscriptionInput-
|
|
41
|
+
//# sourceMappingURL=SubscriptionInput-DIU7CiXE.d.mts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as CommandDrainPolicy } from "../RunOptions-
|
|
1
|
+
import { o as CommandDrainPolicy } from "../RunOptions-Bv9NpkPZ.mjs";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
3
|
declare namespace Commands_d_exports {
|
|
4
4
|
export { FollowUpCommand, RunCommand, RunCommandQueue, RunCommandQueueClosed, RunCommandQueueConfig, SteeringCommand, makeRunCommandQueue };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as MessageAdmission, c as MessageRef, i as MessageAddress, l as MessageStatus, n as InboxPage, o as MessagingError, r as InputMessage, s as PeerName, t as InboxEntry } from "../Messaging-Dkg87ebg.mjs";
|
|
2
|
-
import { a as inspect, c as reply, d as retryTool, f as send, i as inboxTool, l as replyTool, n as Peer, o as inspectTool, p as sendTool, r as inbox, s as peer, u as retry } from "../Messaging-
|
|
2
|
+
import { a as inspect, c as reply, d as retryTool, f as send, i as inboxTool, l as replyTool, n as Peer, o as inspectTool, p as sendTool, r as inbox, s as peer, u as retry } from "../Messaging-ccQURKCf.mjs";
|
|
3
3
|
export { InboxEntry, InboxPage, InputMessage, MessageAddress, MessageAdmission, MessageRef, MessageStatus, MessagingError, Peer, PeerName, inbox, inboxTool, inspect, inspectTool, peer, reply, replyTool, retry, retryTool, send, sendTool };
|
|
@@ -2,7 +2,7 @@ import { c as ThreadLimitExceeded, i as ThreadEncodingError, s as ThreadHistoryD
|
|
|
2
2
|
import { RedactionError, Redactor } from "./Redaction.mjs";
|
|
3
3
|
import { ApprovalAudit, ApprovalAuditLimitExceeded, ApprovalDecisionMismatch, ApprovalRequestDraft, ApprovalResolver, ApprovalResolverError } from "./Approval.mjs";
|
|
4
4
|
import { BudgetExceeded, UsageBudgetNode } from "./Budget.mjs";
|
|
5
|
-
import { M as RunOptions, R as RunSchedulingHook, _ as RunBudgetHook, b as RunContextHook, g as RunApprovalRequest, h as RunApprovalHook, j as RunInputHook, w as RunContextRequest } from "../RunOptions-
|
|
5
|
+
import { M as RunOptions, R as RunSchedulingHook, _ as RunBudgetHook, b as RunContextHook, g as RunApprovalRequest, h as RunApprovalHook, j as RunInputHook, w as RunContextRequest } from "../RunOptions-Bv9NpkPZ.mjs";
|
|
6
6
|
import { RunCommandQueue } from "./Commands.mjs";
|
|
7
7
|
import { Prompt } from "effect/unstable/ai";
|
|
8
8
|
import { Effect, Schema } from "effect";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { c as SubagentExecutionFailureClassification, l as SubagentGrant, s as SubagentExecutionFailure } from "../SubagentContract-DdT7Cqe6.mjs";
|
|
2
2
|
import { o as WorkerCompletion, p as WorkerReport } from "../Worker-fwWkBg12.mjs";
|
|
3
|
-
import { A as inspect, B as delegationCapsFromPolicy, C as BackgroundOptions, D as awaitWorker, E as WorkerObservation, F as SubagentPolicy, I as SubagentPolicyInput, L as SubagentPrestartDenied, M as observe, N as start, O as cancel, P as stop, R as SubagentProjectionFailure, S as make, T as Worker, _ as SubagentTools, a as SubagentDelegation, b as define, c as SubagentFailureMode, d as SubagentResult, f as SubagentResultContext, g as SubagentToolFailure, h as SubagentTool, i as SubagentDefineOptions, j as list, k as followUp, l as SubagentLayerRequirements, m as SubagentRuntimeOptions, n as SubagentContainedFailure, o as SubagentDurableAccounting, p as SubagentReturnModeFailure, r as SubagentDeclarationOptions, s as SubagentDurableOptions, t as SubagentChildRunFailure, u as SubagentPrepareContext, w as BackgroundTools, x as layer, y as background, z as delegationAllocationFromPolicy } from "../Subagent-
|
|
3
|
+
import { A as inspect, B as delegationCapsFromPolicy, C as BackgroundOptions, D as awaitWorker, E as WorkerObservation, F as SubagentPolicy, I as SubagentPolicyInput, L as SubagentPrestartDenied, M as observe, N as start, O as cancel, P as stop, R as SubagentProjectionFailure, S as make, T as Worker, _ as SubagentTools, a as SubagentDelegation, b as define, c as SubagentFailureMode, d as SubagentResult, f as SubagentResultContext, g as SubagentToolFailure, h as SubagentTool, i as SubagentDefineOptions, j as list, k as followUp, l as SubagentLayerRequirements, m as SubagentRuntimeOptions, n as SubagentContainedFailure, o as SubagentDurableAccounting, p as SubagentReturnModeFailure, r as SubagentDeclarationOptions, s as SubagentDurableOptions, t as SubagentChildRunFailure, u as SubagentPrepareContext, w as BackgroundTools, x as layer, y as background, z as delegationAllocationFromPolicy } from "../Subagent-VHrANXFy.mjs";
|
|
4
4
|
export { type BackgroundOptions, type BackgroundTools, SubagentChildRunFailure, SubagentContainedFailure, SubagentDeclarationOptions, SubagentDefineOptions, SubagentDelegation, SubagentDurableAccounting, SubagentDurableOptions, SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentFailureMode, SubagentGrant, SubagentLayerRequirements, SubagentPolicy, type SubagentPolicyInput, SubagentPrepareContext, SubagentPrestartDenied, SubagentProjectionFailure, SubagentResult, SubagentResultContext, SubagentReturnModeFailure, SubagentRuntimeOptions, SubagentTool, SubagentToolFailure, SubagentTools, Worker, WorkerCompletion, WorkerObservation, WorkerReport, awaitWorker as await, background, cancel, define, delegationAllocationFromPolicy, delegationCapsFromPolicy, followUp, inspect, layer, list, make, observe, start, stop };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentGrant } from "../core/SubagentContract.mjs";
|
|
2
2
|
import { o as WorkerCompletion, p as WorkerReport } from "../Worker-CfwzMZEK.mjs";
|
|
3
3
|
import "./SubagentReservations.mjs";
|
|
4
|
-
import { S as delegationCapsFromPolicy, _ as stop, a as define, b as SubagentProjectionFailure, c as Worker, d as cancel, f as followUp, g as start, h as observe, i as background, l as WorkerObservation, m as list, n as SubagentResult, o as layer, p as inspect, s as make, t as SubagentDurableAccounting, u as awaitWorker, v as SubagentPolicy, x as delegationAllocationFromPolicy, y as SubagentPrestartDenied } from "../Subagent-
|
|
4
|
+
import { S as delegationCapsFromPolicy, _ as stop, a as define, b as SubagentProjectionFailure, c as Worker, d as cancel, f as followUp, g as start, h as observe, i as background, l as WorkerObservation, m as list, n as SubagentResult, o as layer, p as inspect, s as make, t as SubagentDurableAccounting, u as awaitWorker, v as SubagentPolicy, x as delegationAllocationFromPolicy, y as SubagentPrestartDenied } from "../Subagent-hG9lJ7tJ.mjs";
|
|
5
5
|
export { SubagentDurableAccounting, SubagentExecutionFailure, SubagentExecutionFailureClassification, SubagentGrant, SubagentPolicy, SubagentPrestartDenied, SubagentProjectionFailure, SubagentResult, Worker, WorkerCompletion, WorkerObservation, WorkerReport, awaitWorker as await, background, cancel, define, delegationAllocationFromPolicy, delegationCapsFromPolicy, followUp, inspect, layer, list, make, observe, start, stop };
|
package/dist/core/Agent.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as ToolUnion, C as OutputSchema, D as RunDispositionFailure, E as RunDispositionDeclaration, F as isModelResolver, I as make, L as withModel, M as Update, N as UpdatesSchema, O as RunDispositionSchema, P as inspectTools, S as Output, T as RunDisposition, _ as InstructionSource, a as CompletionFromToolDeclaration, b as Name, c as Definition, d as EncodedInput, f as Failure, g as InstructionResult, h as InputSchema, i as Binding, j as Tools, k as ToolInspection, l as DefinitionOptions, m as InputPromptSource, n as Any, o as CompletionProjectionInput, p as Input, r as AnyDefinition, s as CompletionToolDeclaration, u as DefinitionRequirements, v as ModelResolver, w as Requirements, x as NativeModel, y as ModelServices } from "../Agent-
|
|
1
|
+
import { A as ToolUnion, C as OutputSchema, D as RunDispositionFailure, E as RunDispositionDeclaration, F as isModelResolver, I as make, L as withModel, M as Update, N as UpdatesSchema, O as RunDispositionSchema, P as inspectTools, S as Output, T as RunDisposition, _ as InstructionSource, a as CompletionFromToolDeclaration, b as Name, c as Definition, d as EncodedInput, f as Failure, g as InstructionResult, h as InputSchema, i as Binding, j as Tools, k as ToolInspection, l as DefinitionOptions, m as InputPromptSource, n as Any, o as CompletionProjectionInput, p as Input, r as AnyDefinition, s as CompletionToolDeclaration, u as DefinitionRequirements, v as ModelResolver, w as Requirements, x as NativeModel, y as ModelServices } from "../Agent-Cjd_ZveM.mjs";
|
|
2
2
|
export { Any, AnyDefinition, Binding, CompletionFromToolDeclaration, CompletionProjectionInput, CompletionToolDeclaration, Definition, DefinitionOptions, DefinitionRequirements, EncodedInput, Failure, Input, InputPromptSource, InputSchema, InstructionResult, InstructionSource, ModelResolver, ModelServices, Name, NativeModel, Output, OutputSchema, Requirements, RunDisposition, RunDispositionDeclaration, RunDispositionFailure, RunDispositionSchema, ToolInspection, ToolUnion, Tools, Update, UpdatesSchema, inspectTools, isModelResolver, make, withModel };
|
package/dist/durable/Admin.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as renderRecoveryExplanation, S as recoveryDecisionMeaning, _ as RetryCommand, a as IntegrityCheck, b as obligationSeverityOf, c as IntegrityReport, d as ObligationReport, f as ObligationSeverity, g as RecoveryExplanation, h as RecoveryDisposition, i as ExplainedUnknownCall, l as ObligationBlockedOn, m as RECOVERY_DECISION_MEANINGS, n as ExplainedEvidence, o as IntegrityCheckName, p as ObligationThresholds, r as ExplainedSubmission, s as IntegrityCheckStatus, u as ObligationEntry, v as RetryRefusalReason, x as predictRecoveryDisposition, y as RetryRefused } from "../Admin-
|
|
1
|
+
import { C as renderRecoveryExplanation, S as recoveryDecisionMeaning, _ as RetryCommand, a as IntegrityCheck, b as obligationSeverityOf, c as IntegrityReport, d as ObligationReport, f as ObligationSeverity, g as RecoveryExplanation, h as RecoveryDisposition, i as ExplainedUnknownCall, l as ObligationBlockedOn, m as RECOVERY_DECISION_MEANINGS, n as ExplainedEvidence, o as IntegrityCheckName, p as ObligationThresholds, r as ExplainedSubmission, s as IntegrityCheckStatus, u as ObligationEntry, v as RetryRefusalReason, x as predictRecoveryDisposition, y as RetryRefused } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { ExplainedEvidence, ExplainedSubmission, ExplainedUnknownCall, IntegrityCheck, IntegrityCheckName, IntegrityCheckStatus, IntegrityReport, ObligationBlockedOn, ObligationEntry, ObligationReport, ObligationSeverity, ObligationThresholds, RECOVERY_DECISION_MEANINGS, RecoveryDisposition, RecoveryExplanation, RetryCommand, RetryRefusalReason, RetryRefused, obligationSeverityOf, predictRecoveryDisposition, recoveryDecisionMeaning, renderRecoveryExplanation };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ba as
|
|
1
|
+
import { Ba as ExecutableAgentBinding, Fa as AgentAttemptContext, Ga as definitionDigestsEqual, Ha as ResolvedBinding, Ia as AgentRegistration, La as BindingUnavailable, Ra as DurableBindingFailure, Ua as compileBindingContracts, Va as ReplayVersions, Wa as compileRegistrations, za as DurableWorkerBinding } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { type AgentAttemptContext, type AgentRegistration, BindingUnavailable, type DurableBindingFailure, DurableWorkerBinding, type ExecutableAgentBinding, type ReplayVersions, type ResolvedBinding, compileBindingContracts, compileRegistrations, definitionDigestsEqual };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ni as ThreadStore, vn as SubmissionLedger } from "../Admin-
|
|
1
|
+
import { ni as ThreadStore, vn as SubmissionLedger } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
import { Crypto, Effect, Schema } from "effect";
|
|
3
3
|
//#region src/durable/Certification.d.ts
|
|
4
4
|
declare const CertifiedAdapterIdentity_base: Schema.Class<CertifiedAdapterIdentity, Schema.Struct<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { O as PersistedJson, l as CanonicalRecordEnvelope } from "../Records-B5GFWCpn.mjs";
|
|
2
2
|
import { ActivityProcessorKey, ActivityProcessorStore, ActivityStoreFailure, PreparedActivity } from "./ActivityStore.mjs";
|
|
3
3
|
import { t as DigestError } from "../Digest-U69rDHuO.mjs";
|
|
4
|
-
import { Gr as ThreadNotMaterialized, ii as ThreadStoreError, ni as ThreadStore } from "../Admin-
|
|
4
|
+
import { Gr as ThreadNotMaterialized, ii as ThreadStoreError, ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
|
|
5
5
|
import { Crypto, Effect, Schema, Scope } from "effect";
|
|
6
6
|
declare namespace CommittedActivity_d_exports {
|
|
7
7
|
export { ActivityPassLimits, ActivityPassResult, ActivityProcessingError, CommittedActivityProcessor, activityWorkId, processCommittedActivity };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
|
|
2
|
-
import { $n as DurableApprovalFailure, Cr as isolateRecovery, Dr as threadCreatedRecordId, Er as threadCreatedBatchId, Sr as childReservationIdFor, Tr as recoveryRepairRecordId, Xn as DurableAbortFailure, Yn as ApprovalSuspensionError, Zn as DurableAgentRuntime, _r as RecoveryBlocked, ar as DurableObserveOptions, br as RecoverySweepOptions, cr as DurableRetryFailure, dr as DurableSubmitAgent, er as DurableApprovalResolver, fr as DurableSubmitFailure, gr as DurableWorkerRequirements, hr as DurableWorkerFailure, ir as DurableObligationFailure, lr as DurableRuntimeConfig, mr as DurableVerifyFailure, nr as DurableAwaitFailure, or as DurableProgressFailure, pr as DurableSubmitOptions, rr as DurableExplainFailure, sr as DurableResolveFailure, tr as DurableApprovalSuspension, ur as DurableRuntimeConfigOptions, vr as RecoveryFailure, wr as recoveryRepairBatchId, xr as RecoverySweepResult, yr as RecoveryReport } from "../Admin-
|
|
2
|
+
import { $n as DurableApprovalFailure, Cr as isolateRecovery, Dr as threadCreatedRecordId, Er as threadCreatedBatchId, Sr as childReservationIdFor, Tr as recoveryRepairRecordId, Xn as DurableAbortFailure, Yn as ApprovalSuspensionError, Zn as DurableAgentRuntime, _r as RecoveryBlocked, ar as DurableObserveOptions, br as RecoverySweepOptions, cr as DurableRetryFailure, dr as DurableSubmitAgent, er as DurableApprovalResolver, fr as DurableSubmitFailure, gr as DurableWorkerRequirements, hr as DurableWorkerFailure, ir as DurableObligationFailure, lr as DurableRuntimeConfig, mr as DurableVerifyFailure, nr as DurableAwaitFailure, or as DurableProgressFailure, pr as DurableSubmitOptions, rr as DurableExplainFailure, sr as DurableResolveFailure, tr as DurableApprovalSuspension, ur as DurableRuntimeConfigOptions, vr as RecoveryFailure, wr as recoveryRepairBatchId, xr as RecoverySweepResult, yr as RecoveryReport } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
export { ApprovalSuspensionError, DurableAbortFailure, DurableAgentRuntime, DurableApprovalFailure, DurableApprovalResolver, DurableApprovalSuspension, DurableAwaitFailure, DurableExplainFailure, DurableObligationFailure, DurableObserveOptions, DurableProgressFailure, DurableResolveFailure, DurableRetryFailure, DurableRuntimeConfig, DurableRuntimeConfigOptions, DurableSubmitAgent, DurableSubmitFailure, DurableSubmitOptions, DurableVerifyFailure, DurableWorkerFailure, DurableWorkerRequirements, Receipt, RecoveryBlocked, RecoveryFailure, RecoveryReport, RecoverySweepOptions, RecoverySweepResult, childReservationIdFor, isolateRecovery, recoveryRepairBatchId, recoveryRepairRecordId, threadCreatedBatchId, threadCreatedRecordId };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Receipt } from "../core/Receipt.mjs";
|
|
2
|
-
import { a as DurableApprovalSuspension, c as RecoveryFailure, d as childReservationIdFor, f as isolateRecovery, g as threadCreatedRecordId, h as threadCreatedBatchId, i as DurableApprovalResolver, l as RecoveryReport, m as recoveryRepairRecordId, n as DurableAgentRuntime, o as DurableRuntimeConfig, p as recoveryRepairBatchId, s as RecoveryBlocked, t as ApprovalSuspensionError, u as RecoverySweepResult } from "../DurableAgentRuntime-
|
|
2
|
+
import { a as DurableApprovalSuspension, c as RecoveryFailure, d as childReservationIdFor, f as isolateRecovery, g as threadCreatedRecordId, h as threadCreatedBatchId, i as DurableApprovalResolver, l as RecoveryReport, m as recoveryRepairRecordId, n as DurableAgentRuntime, o as DurableRuntimeConfig, p as recoveryRepairBatchId, s as RecoveryBlocked, t as ApprovalSuspensionError, u as RecoverySweepResult } from "../DurableAgentRuntime-DLa4IwFi.mjs";
|
|
3
3
|
export { ApprovalSuspensionError, DurableAgentRuntime, DurableApprovalResolver, DurableApprovalSuspension, DurableRuntimeConfig, Receipt, RecoveryBlocked, RecoveryFailure, RecoveryReport, RecoverySweepResult, childReservationIdFor, isolateRecovery, recoveryRepairBatchId, recoveryRepairRecordId, threadCreatedBatchId, threadCreatedRecordId };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-
|
|
1
|
+
import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-CkN05NT3.mjs";
|
|
2
2
|
export { EventSource, EventSources, NormalizedEvent, makeEventSource };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as Principal } from "../Receipt-BAHyigAF.mjs";
|
|
2
|
-
import "../Admin-
|
|
3
|
-
import { E as SubscriptionSourceError } from "../Subscription-
|
|
4
|
-
import { t as EventSource } from "../EventSource-
|
|
2
|
+
import "../Admin-B8ISZyYf.mjs";
|
|
3
|
+
import { E as SubscriptionSourceError } from "../Subscription-B16A-48F.mjs";
|
|
4
|
+
import { t as EventSource } from "../EventSource-CkN05NT3.mjs";
|
|
5
5
|
import { SubscriptionFailure, SubscriptionIntake } from "./Subscriptions.mjs";
|
|
6
6
|
import { Context, Effect, Layer, Redacted, Schema } from "effect";
|
|
7
7
|
import { HttpClient } from "effect/unstable/http";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Ci as
|
|
2
|
-
export { LifecyclePublication, LifecyclePublicationConfig, LifecyclePublicationError, LifecyclePublicationFact, LifecyclePublicationHandler, LifecyclePublicationSource, LifecyclePublicationStorage, drainLifecyclePublications, lifecyclePublicationLayer };
|
|
1
|
+
import { Ci as drainLifecyclePublications, Ti as lifecyclePublicationLayer, _i as LifecyclePublicationError, bi as LifecyclePublicationSource, gi as LifecyclePublicationConfig, hi as LifecyclePublicationBatch, mi as LifecyclePublication, vi as LifecyclePublicationFact, wi as lifecyclePublicationBatchMaxFacts, xi as LifecyclePublicationStorage, yi as LifecyclePublicationHandler } from "../Admin-B8ISZyYf.mjs";
|
|
2
|
+
export { LifecyclePublication, LifecyclePublicationBatch, LifecyclePublicationConfig, LifecyclePublicationError, LifecyclePublicationFact, LifecyclePublicationHandler, LifecyclePublicationSource, LifecyclePublicationStorage, drainLifecyclePublications, lifecyclePublicationBatchMaxFacts, lifecyclePublicationLayer };
|
|
@@ -7,16 +7,18 @@ import { AbortIntent, Settlement, SubmissionLedger, SubmissionLookupById, Submis
|
|
|
7
7
|
import { getRunInput } from "./ThreadStore.mjs";
|
|
8
8
|
import { PreparedInput } from "./Subscription.mjs";
|
|
9
9
|
import { MessageDeliveryKey } from "./MessageDelivery.mjs";
|
|
10
|
-
import { Clock, Context, Crypto, Effect, Layer, Option, Schema } from "effect";
|
|
10
|
+
import { Cause, Clock, Context, Crypto, Effect, Layer, Option, Schema } from "effect";
|
|
11
11
|
//#region src/durable/LifecyclePublication.ts
|
|
12
12
|
var LifecyclePublication_exports = /* @__PURE__ */ __exportAll({
|
|
13
13
|
LifecyclePublication: () => LifecyclePublication,
|
|
14
|
+
LifecyclePublicationBatch: () => LifecyclePublicationBatch,
|
|
14
15
|
LifecyclePublicationConfig: () => LifecyclePublicationConfig,
|
|
15
16
|
LifecyclePublicationError: () => LifecyclePublicationError,
|
|
16
17
|
LifecyclePublicationFact: () => LifecyclePublicationFact,
|
|
17
18
|
LifecyclePublicationHandler: () => LifecyclePublicationHandler,
|
|
18
19
|
LifecyclePublicationSource: () => LifecyclePublicationSource,
|
|
19
20
|
drainLifecyclePublications: () => drainLifecyclePublications,
|
|
21
|
+
lifecyclePublicationBatchMaxFacts: () => 8,
|
|
20
22
|
lifecyclePublicationLayer: () => lifecyclePublicationLayer
|
|
21
23
|
});
|
|
22
24
|
/** Immutable native admission evidence. It is private and grants no application authority. */
|
|
@@ -108,11 +110,20 @@ var LifecyclePublicationError = class extends Schema.TaggedError()("LifecyclePub
|
|
|
108
110
|
]),
|
|
109
111
|
cause: Schema.optionalKey(Schema.Defect())
|
|
110
112
|
}) {};
|
|
113
|
+
/** Bound both retained facts and the immutable admission evidence resolved before dispatch. */
|
|
114
|
+
const lifecyclePublicationBatchMaxFacts = 8;
|
|
115
|
+
/** One owner's bounded pending prefix, strictly ordered by its durable ordinals. */
|
|
116
|
+
const LifecyclePublicationBatch = Schema.NonEmptyArray(LifecyclePublication).check(Schema.isMaxLength(8), Schema.makeFilter((facts) => facts.every((fact, index) => {
|
|
117
|
+
const previous = facts[index - 1];
|
|
118
|
+
return fact.ownerThreadId === facts[0].ownerThreadId && (previous === void 0 || fact.ordinal > previous.ordinal);
|
|
119
|
+
}), { expected: "One owner with strictly increasing publication ordinals" }));
|
|
111
120
|
/**
|
|
112
|
-
* Publish
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
121
|
+
* Publish one owner's ordered batch in one idempotent host transaction, including authorization,
|
|
122
|
+
* records, receipts and delivery intents. Larger backlogs continue in later batches.
|
|
123
|
+
* Return only after the entire batch commits. Retries
|
|
124
|
+
* may include already committed identities plus later facts; deduplicate each fact's `id`.
|
|
125
|
+
* Private input/update/result fields remain private; select declared public fields explicitly.
|
|
126
|
+
* Revocation/deletion is an acknowledged domain decision, not an infrastructure retry.
|
|
116
127
|
*/
|
|
117
128
|
var LifecyclePublicationHandler = class extends Context.Service()("@effect-agent/thread/LifecyclePublicationHandler") {};
|
|
118
129
|
/** Adapter configuration; the opt-in layer captures its explicit Crypto requirement once. */
|
|
@@ -147,23 +158,32 @@ const withSource = Effect.fn("LifecyclePublication.withSource")(function* (publi
|
|
|
147
158
|
})));
|
|
148
159
|
/**
|
|
149
160
|
* One finite wave for the host's existing maintenance coordinator. Persist the next deadline
|
|
150
|
-
* before dispatch, so interruption and process loss retain the same
|
|
161
|
+
* before dispatch, so interruption and process loss retain the same facts without another timer.
|
|
162
|
+
* Finish independent owner batches before surfacing failures; interruption stops the wave.
|
|
151
163
|
* Acknowledgements are exact and idempotent. No producer or external Tool is re-executed here.
|
|
152
164
|
*/
|
|
153
165
|
const drainLifecyclePublications = Effect.fn("LifecyclePublication.drain")(function* (storage, timeoutMillis = 1e4, limit = 4) {
|
|
154
166
|
const handler = yield* LifecyclePublicationHandler;
|
|
155
167
|
const pending = yield* storage.pending(yield* Clock.currentTimeMillis, limit);
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
yield*
|
|
168
|
+
let failures = Cause.empty;
|
|
169
|
+
for (const batch of pending) yield* Effect.gen(function* () {
|
|
170
|
+
if (!(yield* storage.claim(batch, yield* Clock.currentTimeMillis, timeoutMillis))) return;
|
|
171
|
+
yield* Effect.scoped(Effect.gen(function* () {
|
|
172
|
+
const publications = yield* Effect.forEach(batch, withSource);
|
|
173
|
+
yield* handler.publish(publications);
|
|
174
|
+
})).pipe(Effect.timeoutOrElse({
|
|
159
175
|
duration: timeoutMillis,
|
|
160
176
|
orElse: () => LifecyclePublicationError.make({ reason: "unavailable" })
|
|
161
177
|
}));
|
|
162
|
-
yield* storage.acknowledge(
|
|
163
|
-
}
|
|
178
|
+
yield* storage.acknowledge(batch);
|
|
179
|
+
}).pipe(Effect.catchCauseIf((cause) => !Cause.hasInterrupts(cause), (cause) => {
|
|
180
|
+
failures = Cause.combine(failures, cause);
|
|
181
|
+
return Effect.void;
|
|
182
|
+
}));
|
|
183
|
+
if (failures.reasons.length > 0) return yield* Effect.failCause(failures);
|
|
164
184
|
return pending.length;
|
|
165
185
|
});
|
|
166
186
|
//#endregion
|
|
167
|
-
export { LifecyclePublication, LifecyclePublicationConfig, LifecyclePublicationError, LifecyclePublicationFact, LifecyclePublicationHandler, LifecyclePublicationSource, drainLifecyclePublications, lifecyclePublicationLayer, LifecyclePublication_exports as t };
|
|
187
|
+
export { LifecyclePublication, LifecyclePublicationBatch, LifecyclePublicationConfig, LifecyclePublicationError, LifecyclePublicationFact, LifecyclePublicationHandler, LifecyclePublicationSource, drainLifecyclePublications, lifecyclePublicationBatchMaxFacts, lifecyclePublicationLayer, LifecyclePublication_exports as t };
|
|
168
188
|
|
|
169
189
|
//# sourceMappingURL=LifecyclePublication.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LifecyclePublication.mjs","names":[],"sources":["../../src/durable/LifecyclePublication.ts"],"sourcesContent":["import { Clock, Context, Crypto, Effect, Layer, Option, Schema, type Scope } from \"effect\";\n\nimport { SubmissionId, ThreadId } from \"../core/Identifiers.ts\";\nimport { Receipt } from \"../core/Receipt.ts\";\nimport { AssignmentTerminal } from \"../core/Worker.ts\";\nimport { MessageDeliveryKey } from \"./MessageDelivery.ts\";\nimport {\n AbortRequested,\n AgentUpdateEmitted,\n CanonicalSequence,\n RunStartedRecord,\n SubagentJoined,\n SubagentRequested,\n SubagentStarted,\n SubmissionSettledRecord,\n ToolApprovalDecided,\n ToolApprovalRequested,\n UserInputRecorded,\n WorkerInputCompleted,\n WorkerInputRequested,\n WorkerStopRequested,\n} from \"./Records.ts\";\nimport {\n AbortIntent,\n Settlement,\n SubmissionLedger,\n SubmissionLookupById,\n SubmissionSnapshot,\n SuspensionReason,\n} from \"./SubmissionLedger.ts\";\nimport { PreparedInput } from \"./Subscription.ts\";\nimport { getRunInput } from \"./ThreadStore.ts\";\n\n/** Immutable native admission evidence. It is private and grants no application authority. */\nexport const LifecyclePublicationSource = SubmissionSnapshot.mapFields((fields) => ({\n submissionId: fields.submissionId,\n threadId: fields.threadId,\n queueSequence: fields.queueSequence,\n principal: fields.principal,\n idempotencyKey: fields.idempotencyKey,\n agentId: fields.agentId,\n agentDigests: fields.agentDigests,\n inputPayload: fields.inputPayload,\n inputDigest: fields.inputDigest,\n receiptId: fields.receiptId,\n parentLinkage: fields.parentLinkage,\n workerAdmission: fields.workerAdmission,\n messageAdmission: fields.messageAdmission,\n createdAt: fields.createdAt,\n}));\n\nexport type LifecyclePublicationSource = typeof LifecyclePublicationSource.Type;\n\n/** Closed producer facts; model history, Tool payloads and diagnostics are not a publication API. */\nexport const LifecyclePublicationFact = Schema.Union([\n Schema.TaggedStruct(\"DeliveryRetained\", {\n key: MessageDeliveryKey,\n envelope: PreparedInput,\n createdAtMillis: Schema.Natural,\n }),\n Schema.TaggedStruct(\"DeliveryChanged\", {\n key: MessageDeliveryKey,\n envelope: PreparedInput,\n status: Schema.Literals([\"pending\", \"accepted\", \"processed\", \"refused\", \"parked\"]),\n receipt: Schema.NullOr(Receipt),\n settlement: Schema.NullOr(Settlement),\n version: Schema.Natural,\n }),\n Schema.TaggedStruct(\"WorkerInboxSealed\", {\n threadId: ThreadId,\n activeSubmissionIds: Schema.Array(SubmissionId),\n /** First native seal winner; null is an explicit stop rather than assignment completion. */\n terminal: Schema.NullOr(AssignmentTerminal),\n }),\n Schema.TaggedStruct(\"SubmissionReady\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"SubmissionSuspended\", {\n submissionId: SubmissionId,\n reason: SuspensionReason,\n }),\n Schema.TaggedStruct(\"SubmissionUnknown\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"SubmissionResumed\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"AbortIntentRecorded\", { intent: AbortIntent }),\n UserInputRecorded,\n RunStartedRecord,\n AgentUpdateEmitted,\n ToolApprovalRequested,\n ToolApprovalDecided,\n AbortRequested,\n WorkerInputCompleted,\n WorkerInputRequested,\n WorkerStopRequested,\n SubagentRequested,\n SubagentStarted,\n SubagentJoined,\n SubmissionSettledRecord,\n]);\n\nexport type LifecyclePublicationFact = typeof LifecyclePublicationFact.Type;\n\n/**\n * An exact undelivered native fact. `id` is stable across retries and lost acknowledgements.\n * Ordinals order facts only within ownerThreadId. Accepted input order is source.queueSequence;\n * never compare ordinals from the launching Thread and its worker Thread.\n */\nexport class LifecyclePublication extends Schema.Class<LifecyclePublication>(\n \"@effect-agent/thread/LifecyclePublication\",\n)({\n id: Schema.NonEmptyString.check(Schema.isMaxLength(4096)),\n ownerThreadId: ThreadId,\n ordinal: Schema.Int.check(Schema.isGreaterThan(0)),\n createdAt: Schema.DateTimeUtcFromString,\n canonicalSequence: Schema.optionalKey(CanonicalSequence),\n source: Schema.optionalKey(LifecyclePublicationSource),\n fact: LifecyclePublicationFact,\n}) {}\n\nexport class LifecyclePublicationError extends Schema.TaggedError<LifecyclePublicationError>()(\n \"LifecyclePublicationError\",\n {\n reason: Schema.Literals([\"unavailable\", \"conflict\", \"corrupt\", \"capacity\"]),\n cause: Schema.optionalKey(Schema.Defect()),\n },\n) {}\n\n/** Native recovery state, not a second application record or launch queue. */\nexport interface LifecyclePublicationStorage {\n readonly pending: (\n nowMillis: number,\n limit: number,\n ) => Effect.Effect<ReadonlyArray<LifecyclePublication>, LifecyclePublicationError>;\n readonly acknowledge: (\n publication: LifecyclePublication,\n ) => Effect.Effect<void, LifecyclePublicationError>;\n readonly defer: (\n publication: LifecyclePublication,\n untilMillis: number,\n ) => Effect.Effect<void, LifecyclePublicationError>;\n readonly pendingDeadline: Effect.Effect<Option.Option<number>, LifecyclePublicationError>;\n /** Earliest retained owner obligation, including deferred facts that still gate execution. */\n readonly pendingDeadlineFor: (\n ownerThreadId: ThreadId,\n ) => Effect.Effect<Option.Option<number>, LifecyclePublicationError>;\n}\n\n/**\n * Publish an idempotent domain command, including its authorization, exact receipt and delivery\n * intent. Return only after that command commits. Treat private input/update/result fields as\n * private; the application must select its declared public fields. Revocation/deletion is an\n * acknowledged domain decision, not an indefinitely retryable infrastructure failure.\n */\nexport class LifecyclePublicationHandler extends Context.Service<\n LifecyclePublicationHandler,\n {\n readonly publish: (\n publication: LifecyclePublication,\n ) => Effect.Effect<void, LifecyclePublicationError, Scope.Scope>;\n }\n>()(\"@effect-agent/thread/LifecyclePublicationHandler\") {}\n\n/** Adapter configuration; the opt-in layer captures its explicit Crypto requirement once. */\nexport const LifecyclePublicationConfig = Context.Reference<Option.Option<Crypto.Crypto>>(\n \"@effect-agent/thread/LifecyclePublicationConfig\",\n { defaultValue: () => Option.none() },\n);\n\n/** Enable native SQL obligations without changing dependencies of disabled storage assemblies. */\nexport const lifecyclePublicationLayer = Layer.effect(LifecyclePublicationConfig)(\n Effect.map(Crypto.Crypto, Option.some),\n);\n\n/** Resolve immutable evidence by its exact native identity, never by scanning execution history. */\nconst withSource = Effect.fn(\"LifecyclePublication.withSource\")(\n function* (publication: LifecyclePublication) {\n if (\n publication.source !== undefined ||\n (publication.fact._tag === \"WorkerInputCompleted\" &&\n publication.fact.workerThreadId !== publication.ownerThreadId)\n )\n return publication;\n const fact = publication.fact;\n\n let submissionId =\n fact._tag === \"AbortIntentRecorded\"\n ? fact.intent.submissionId\n : \"submissionId\" in fact\n ? fact.submissionId\n : undefined;\n\n const runId =\n fact._tag === \"AgentUpdateEmitted\"\n ? fact.update.runId\n : \"runId\" in fact\n ? fact.runId\n : undefined;\n\n if (submissionId === undefined && runId !== undefined) {\n const input = yield* getRunInput({ threadId: publication.ownerThreadId, runId });\n\n if (Option.isNone(input) || input.value.record.payload._tag !== \"UserInputRecorded\")\n return yield* LifecyclePublicationError.make({ reason: \"unavailable\" });\n submissionId = input.value.record.payload.submissionId;\n }\n if (submissionId === undefined) return publication;\n const ledger = yield* SubmissionLedger;\n const found = yield* ledger.lookup(SubmissionLookupById.make({ submissionId }));\n\n if (Option.isNone(found))\n return yield* LifecyclePublicationError.make({ reason: \"unavailable\" });\n\n const source = yield* Schema.decodeEffect(Schema.toType(LifecyclePublicationSource))(\n found.value,\n );\n\n return LifecyclePublication.make({ ...publication, source });\n },\n Effect.mapError((cause) => LifecyclePublicationError.make({ reason: \"unavailable\", cause })),\n);\n\n/**\n * One finite wave for the host's existing maintenance coordinator. Persist the next deadline\n * before dispatch, so interruption and process loss retain the same fact without another timer.\n * Acknowledgements are exact and idempotent. No producer or external Tool is re-executed here.\n */\nexport const drainLifecyclePublications = Effect.fn(\"LifecyclePublication.drain\")(function* (\n storage: LifecyclePublicationStorage,\n timeoutMillis = 10_000,\n limit = 4,\n) {\n const handler = yield* LifecyclePublicationHandler;\n const pending = yield* storage.pending(yield* Clock.currentTimeMillis, limit);\n\n for (const publication of pending) {\n yield* storage.defer(publication, (yield* Clock.currentTimeMillis) + timeoutMillis);\n yield* Effect.scoped(withSource(publication).pipe(Effect.flatMap(handler.publish))).pipe(\n Effect.timeoutOrElse({\n duration: timeoutMillis,\n orElse: () => LifecyclePublicationError.make({ reason: \"unavailable\" }),\n }),\n );\n yield* storage.acknowledge(publication);\n }\n\n return pending.length;\n});\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"LifecyclePublication.mjs","names":[],"sources":["../../src/durable/LifecyclePublication.ts"],"sourcesContent":["import { Cause, Clock, Context, Crypto, Effect, Layer, Option, Schema, type Scope } from \"effect\";\n\nimport { SubmissionId, ThreadId } from \"../core/Identifiers.ts\";\nimport { Receipt } from \"../core/Receipt.ts\";\nimport { AssignmentTerminal } from \"../core/Worker.ts\";\nimport { MessageDeliveryKey } from \"./MessageDelivery.ts\";\nimport {\n AbortRequested,\n AgentUpdateEmitted,\n CanonicalSequence,\n RunStartedRecord,\n SubagentJoined,\n SubagentRequested,\n SubagentStarted,\n SubmissionSettledRecord,\n ToolApprovalDecided,\n ToolApprovalRequested,\n UserInputRecorded,\n WorkerInputCompleted,\n WorkerInputRequested,\n WorkerStopRequested,\n} from \"./Records.ts\";\nimport {\n AbortIntent,\n Settlement,\n SubmissionLedger,\n SubmissionLookupById,\n SubmissionSnapshot,\n SuspensionReason,\n} from \"./SubmissionLedger.ts\";\nimport { PreparedInput } from \"./Subscription.ts\";\nimport { getRunInput } from \"./ThreadStore.ts\";\n\n/** Immutable native admission evidence. It is private and grants no application authority. */\nexport const LifecyclePublicationSource = SubmissionSnapshot.mapFields((fields) => ({\n submissionId: fields.submissionId,\n threadId: fields.threadId,\n queueSequence: fields.queueSequence,\n principal: fields.principal,\n idempotencyKey: fields.idempotencyKey,\n agentId: fields.agentId,\n agentDigests: fields.agentDigests,\n inputPayload: fields.inputPayload,\n inputDigest: fields.inputDigest,\n receiptId: fields.receiptId,\n parentLinkage: fields.parentLinkage,\n workerAdmission: fields.workerAdmission,\n messageAdmission: fields.messageAdmission,\n createdAt: fields.createdAt,\n}));\n\nexport type LifecyclePublicationSource = typeof LifecyclePublicationSource.Type;\n\n/** Closed producer facts; model history, Tool payloads and diagnostics are not a publication API. */\nexport const LifecyclePublicationFact = Schema.Union([\n Schema.TaggedStruct(\"DeliveryRetained\", {\n key: MessageDeliveryKey,\n envelope: PreparedInput,\n createdAtMillis: Schema.Natural,\n }),\n Schema.TaggedStruct(\"DeliveryChanged\", {\n key: MessageDeliveryKey,\n envelope: PreparedInput,\n status: Schema.Literals([\"pending\", \"accepted\", \"processed\", \"refused\", \"parked\"]),\n receipt: Schema.NullOr(Receipt),\n settlement: Schema.NullOr(Settlement),\n version: Schema.Natural,\n }),\n Schema.TaggedStruct(\"WorkerInboxSealed\", {\n threadId: ThreadId,\n activeSubmissionIds: Schema.Array(SubmissionId),\n /** First native seal winner; null is an explicit stop rather than assignment completion. */\n terminal: Schema.NullOr(AssignmentTerminal),\n }),\n Schema.TaggedStruct(\"SubmissionReady\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"SubmissionSuspended\", {\n submissionId: SubmissionId,\n reason: SuspensionReason,\n }),\n Schema.TaggedStruct(\"SubmissionUnknown\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"SubmissionResumed\", { submissionId: SubmissionId }),\n Schema.TaggedStruct(\"AbortIntentRecorded\", { intent: AbortIntent }),\n UserInputRecorded,\n RunStartedRecord,\n AgentUpdateEmitted,\n ToolApprovalRequested,\n ToolApprovalDecided,\n AbortRequested,\n WorkerInputCompleted,\n WorkerInputRequested,\n WorkerStopRequested,\n SubagentRequested,\n SubagentStarted,\n SubagentJoined,\n SubmissionSettledRecord,\n]);\n\nexport type LifecyclePublicationFact = typeof LifecyclePublicationFact.Type;\n\n/**\n * An exact undelivered native fact. `id` is stable across retries and lost acknowledgements.\n * Ordinals order facts only within ownerThreadId. Accepted input order is source.queueSequence;\n * never compare ordinals from the launching Thread and its worker Thread.\n */\nexport class LifecyclePublication extends Schema.Class<LifecyclePublication>(\n \"@effect-agent/thread/LifecyclePublication\",\n)({\n id: Schema.NonEmptyString.check(Schema.isMaxLength(4096)),\n ownerThreadId: ThreadId,\n ordinal: Schema.Int.check(Schema.isGreaterThan(0)),\n createdAt: Schema.DateTimeUtcFromString,\n canonicalSequence: Schema.optionalKey(CanonicalSequence),\n source: Schema.optionalKey(LifecyclePublicationSource),\n fact: LifecyclePublicationFact,\n}) {}\n\nexport class LifecyclePublicationError extends Schema.TaggedError<LifecyclePublicationError>()(\n \"LifecyclePublicationError\",\n {\n reason: Schema.Literals([\"unavailable\", \"conflict\", \"corrupt\", \"capacity\"]),\n cause: Schema.optionalKey(Schema.Defect()),\n },\n) {}\n\n/** Bound both retained facts and the immutable admission evidence resolved before dispatch. */\nexport const lifecyclePublicationBatchMaxFacts = 8;\n\n/** One owner's bounded pending prefix, strictly ordered by its durable ordinals. */\nexport const LifecyclePublicationBatch = Schema.NonEmptyArray(LifecyclePublication).check(\n Schema.isMaxLength(lifecyclePublicationBatchMaxFacts),\n Schema.makeFilter(\n (facts) =>\n facts.every((fact, index) => {\n const previous = facts[index - 1];\n\n return (\n fact.ownerThreadId === facts[0].ownerThreadId &&\n (previous === undefined || fact.ordinal > previous.ordinal)\n );\n }),\n { expected: \"One owner with strictly increasing publication ordinals\" },\n ),\n);\n\nexport type LifecyclePublicationBatch = typeof LifecyclePublicationBatch.Type;\n\n/** Native recovery state, independent of Attempts. Hosts serialize drains per storage owner. */\nexport interface LifecyclePublicationStorage {\n /** Select up to `limit` due owners, with a bounded pending prefix for each selected owner. */\n readonly pending: (\n nowMillis: number,\n limit: number,\n ) => Effect.Effect<ReadonlyArray<LifecyclePublicationBatch>, LifecyclePublicationError>;\n /** Atomically acknowledge the exact batch, retaining its identities and fingerprints. */\n readonly acknowledge: (\n publications: LifecyclePublicationBatch,\n ) => Effect.Effect<void, LifecyclePublicationError>;\n /**\n * Claim a due owner batch and persist its retry before dispatch. Eight automatic attempts;\n * 1s exponential backoff capped at 60s, after the dispatch timeout. The final attempt parks\n * the payload before dispatch so process loss cannot renew its budget. False means not due.\n */\n readonly claim: (\n publications: LifecyclePublicationBatch,\n nowMillis: number,\n timeoutMillis: number,\n ) => Effect.Effect<boolean, LifecyclePublicationError>;\n readonly pendingDeadline: Effect.Effect<Option.Option<number>, LifecyclePublicationError>;\n /** Explicit operator retry after repairing a parked owner's destination. */\n readonly retryParked: (\n ownerThreadId: ThreadId,\n nowMillis: number,\n ) => Effect.Effect<void, LifecyclePublicationError>;\n}\n\n/**\n * Publish one owner's ordered batch in one idempotent host transaction, including authorization,\n * records, receipts and delivery intents. Larger backlogs continue in later batches.\n * Return only after the entire batch commits. Retries\n * may include already committed identities plus later facts; deduplicate each fact's `id`.\n * Private input/update/result fields remain private; select declared public fields explicitly.\n * Revocation/deletion is an acknowledged domain decision, not an infrastructure retry.\n */\nexport class LifecyclePublicationHandler extends Context.Service<\n LifecyclePublicationHandler,\n {\n readonly publish: (\n publications: LifecyclePublicationBatch,\n ) => Effect.Effect<void, LifecyclePublicationError, Scope.Scope>;\n }\n>()(\"@effect-agent/thread/LifecyclePublicationHandler\") {}\n\n/** Adapter configuration; the opt-in layer captures its explicit Crypto requirement once. */\nexport const LifecyclePublicationConfig = Context.Reference<Option.Option<Crypto.Crypto>>(\n \"@effect-agent/thread/LifecyclePublicationConfig\",\n { defaultValue: () => Option.none() },\n);\n\n/** Enable native SQL obligations without changing dependencies of disabled storage assemblies. */\nexport const lifecyclePublicationLayer = Layer.effect(LifecyclePublicationConfig)(\n Effect.map(Crypto.Crypto, Option.some),\n);\n\n/** Resolve immutable evidence by its exact native identity, never by scanning execution history. */\nconst withSource = Effect.fn(\"LifecyclePublication.withSource\")(\n function* (publication: LifecyclePublication) {\n if (\n publication.source !== undefined ||\n (publication.fact._tag === \"WorkerInputCompleted\" &&\n publication.fact.workerThreadId !== publication.ownerThreadId)\n )\n return publication;\n const fact = publication.fact;\n\n let submissionId =\n fact._tag === \"AbortIntentRecorded\"\n ? fact.intent.submissionId\n : \"submissionId\" in fact\n ? fact.submissionId\n : undefined;\n\n const runId =\n fact._tag === \"AgentUpdateEmitted\"\n ? fact.update.runId\n : \"runId\" in fact\n ? fact.runId\n : undefined;\n\n if (submissionId === undefined && runId !== undefined) {\n const input = yield* getRunInput({ threadId: publication.ownerThreadId, runId });\n\n if (Option.isNone(input) || input.value.record.payload._tag !== \"UserInputRecorded\")\n return yield* LifecyclePublicationError.make({ reason: \"unavailable\" });\n submissionId = input.value.record.payload.submissionId;\n }\n if (submissionId === undefined) return publication;\n const ledger = yield* SubmissionLedger;\n const found = yield* ledger.lookup(SubmissionLookupById.make({ submissionId }));\n\n if (Option.isNone(found))\n return yield* LifecyclePublicationError.make({ reason: \"unavailable\" });\n\n const source = yield* Schema.decodeEffect(Schema.toType(LifecyclePublicationSource))(\n found.value,\n );\n\n return LifecyclePublication.make({ ...publication, source });\n },\n Effect.mapError((cause) => LifecyclePublicationError.make({ reason: \"unavailable\", cause })),\n);\n\n/**\n * One finite wave for the host's existing maintenance coordinator. Persist the next deadline\n * before dispatch, so interruption and process loss retain the same facts without another timer.\n * Finish independent owner batches before surfacing failures; interruption stops the wave.\n * Acknowledgements are exact and idempotent. No producer or external Tool is re-executed here.\n */\nexport const drainLifecyclePublications = Effect.fn(\"LifecyclePublication.drain\")(function* (\n storage: LifecyclePublicationStorage,\n timeoutMillis = 10_000,\n limit = 4,\n) {\n const handler = yield* LifecyclePublicationHandler;\n const pending = yield* storage.pending(yield* Clock.currentTimeMillis, limit);\n\n let failures: Cause.Cause<LifecyclePublicationError> = Cause.empty;\n\n for (const batch of pending) {\n yield* Effect.gen(function* () {\n if (!(yield* storage.claim(batch, yield* Clock.currentTimeMillis, timeoutMillis))) return;\n yield* Effect.scoped(\n Effect.gen(function* () {\n const publications = yield* Effect.forEach(batch, withSource);\n\n yield* handler.publish(publications);\n }),\n ).pipe(\n Effect.timeoutOrElse({\n duration: timeoutMillis,\n orElse: () => LifecyclePublicationError.make({ reason: \"unavailable\" }),\n }),\n );\n yield* storage.acknowledge(batch);\n }).pipe(\n Effect.catchCauseIf(\n (cause) => !Cause.hasInterrupts(cause),\n (cause) => {\n failures = Cause.combine(failures, cause);\n\n return Effect.void;\n },\n ),\n );\n }\n if (failures.reasons.length > 0) return yield* Effect.failCause(failures);\n\n return pending.length;\n});\n"],"mappings":"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"}
|
|
@@ -5,9 +5,9 @@ import { r as Update } from "../AgentUpdates-DMJ-_xow.mjs";
|
|
|
5
5
|
import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "../FailureDiagnostic-CaAkzGHL.mjs";
|
|
6
6
|
import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
|
|
7
7
|
import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
|
|
8
|
-
import {
|
|
9
|
-
import { a as PreparedInput } from "../Subscription-
|
|
10
|
-
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-
|
|
8
|
+
import { fn as Settlement, xi as LifecyclePublicationStorage } from "../Admin-B8ISZyYf.mjs";
|
|
9
|
+
import { a as PreparedInput } from "../Subscription-B16A-48F.mjs";
|
|
10
|
+
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-fctZOTnn.mjs";
|
|
11
11
|
import { Context, Crypto, Effect, Layer, Result, Schema } from "effect";
|
|
12
12
|
declare namespace MessageDelivery_d_exports {
|
|
13
13
|
export { MessageDeliveryChange, MessageDeliveryDriver, MessageDeliveryDriverLimits, MessageDeliveryError, MessageDeliveryFailpoint, MessageDeliveryFailpointError, MessageDeliveryFailure, MessageDeliveryKey, MessageDeliveryPage, MessageDeliveryPageRequest, MessageDeliveryPolicy, MessageDeliveryRecord, MessageDeliveryStore, MessageDeliveryStoreLimits, applyMessageDeliveryChange, defaultMessageDeliveryPolicy, defaultMessageDeliveryStoreLimits, isWorkerUpdateDelivery, messageDeliveryCapacity, messageDeliveryDeadline, messageDeliveryKeyString, messageDeliveryUsesCapacity, prepareMessageDelivery, readPending, sameMessageDeliveryIdentity, validateMessageDelivery };
|
|
@@ -5,7 +5,7 @@ import { r as Diagnostic } from "../FailureDiagnostic-CaAkzGHL.mjs";
|
|
|
5
5
|
import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
|
|
6
6
|
import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
|
|
7
7
|
import { t as DigestError } from "../Digest-U69rDHuO.mjs";
|
|
8
|
-
import { fn as Settlement } from "../Admin-
|
|
8
|
+
import { fn as Settlement } from "../Admin-B8ISZyYf.mjs";
|
|
9
9
|
import { MessageDeliveryError, MessageDeliveryFailure, MessageDeliveryStore } from "./MessageDelivery.mjs";
|
|
10
10
|
import { Effect, Schema } from "effect";
|
|
11
11
|
//#region src/durable/MessageDeliveryStoreConformance.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ThreadHistory } from "../ThreadHistory-tS1KwxHR.mjs";
|
|
2
|
-
import { ni as ThreadStore } from "../Admin-
|
|
2
|
+
import { ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
4
|
declare namespace PersistentHistory_d_exports {
|
|
5
5
|
export { layer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-
|
|
1
|
+
import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-fctZOTnn.mjs";
|
|
2
2
|
export { PreparedInputAdmission, admitPreparedInput };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as RepairSubagentStartLink, A as AwaitChildSettlement, B as MarkUnknown, D as ApplyUnknownResolutions, E as ApplyJoinAccounting, F as CompleteMaterialization, G as PropagateChildAbort, H as OpenDelegationCallEvidence, I as DeclaredPendingBatchEvidence, K as RecoveryDecision, L as DelegationAdmissionEvidence, M as AwaitParentEstablishment, N as AwaitUnknownResolution, O as AwaitApprovalDecision, P as CompleteChildAdmission, Q as RepairReadiness, R as EnsureWaitingForChild, T as ApplyInput, U as OpenToolCallEvidence, V as NoAction, W as PendingApprovalEvidence, X as RepairInputMarker, Y as ReleaseOrphanChildReservation, Z as RepairJoinMarker, at as SettleAborted, et as ResumeFromTurnBoundary, it as RevertJoining, j as AwaitHostSettlement, k as AwaitChildAdmissionResolution, nt as ResumeSuspended, ot as SettleJoinedWithHost, q as RecoveryEvidence, rt as ResumeWaitingParent, st as classifyRecovery, tt as ResumePendingToolBatch, w as AppendReservedSettlement, z as FinalizeLedgerFromHistory } from "../Admin-
|
|
1
|
+
import { $ as RepairSubagentStartLink, A as AwaitChildSettlement, B as MarkUnknown, D as ApplyUnknownResolutions, E as ApplyJoinAccounting, F as CompleteMaterialization, G as PropagateChildAbort, H as OpenDelegationCallEvidence, I as DeclaredPendingBatchEvidence, K as RecoveryDecision, L as DelegationAdmissionEvidence, M as AwaitParentEstablishment, N as AwaitUnknownResolution, O as AwaitApprovalDecision, P as CompleteChildAdmission, Q as RepairReadiness, R as EnsureWaitingForChild, T as ApplyInput, U as OpenToolCallEvidence, V as NoAction, W as PendingApprovalEvidence, X as RepairInputMarker, Y as ReleaseOrphanChildReservation, Z as RepairJoinMarker, at as SettleAborted, et as ResumeFromTurnBoundary, it as RevertJoining, j as AwaitHostSettlement, k as AwaitChildAdmissionResolution, nt as ResumeSuspended, ot as SettleJoinedWithHost, q as RecoveryEvidence, rt as ResumeWaitingParent, st as classifyRecovery, tt as ResumePendingToolBatch, w as AppendReservedSettlement, z as FinalizeLedgerFromHistory } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { AppendReservedSettlement, ApplyInput, ApplyJoinAccounting, ApplyUnknownResolutions, AwaitApprovalDecision, AwaitChildAdmissionResolution, AwaitChildSettlement, AwaitHostSettlement, AwaitParentEstablishment, AwaitUnknownResolution, CompleteChildAdmission, CompleteMaterialization, DeclaredPendingBatchEvidence, DelegationAdmissionEvidence, EnsureWaitingForChild, FinalizeLedgerFromHistory, MarkUnknown, NoAction, OpenDelegationCallEvidence, OpenToolCallEvidence, PendingApprovalEvidence, PropagateChildAbort, RecoveryDecision, RecoveryEvidence, ReleaseOrphanChildReservation, RepairInputMarker, RepairJoinMarker, RepairReadiness, RepairSubagentStartLink, ResumeFromTurnBoundary, ResumePendingToolBatch, ResumeSuspended, ResumeWaitingParent, RevertJoining, SettleAborted, SettleJoinedWithHost, classifyRecovery };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $i as
|
|
1
|
+
import { $i as runDurationBatchId, Aa as turnResultsBatchId, Ai as JournalBoundary, Bi as compactionBatchId, Ca as turnBatchId, Da as turnResponseBatch, Ea as turnPreparedBatchId, Fi as TurnCommitInput, Gi as modelResponseInterruptedRecordId, Hi as firstWorkerInputRecordId, Ii as agentUpdateRecordId, Ji as projectRunJournal, Ki as modelResponseRecordId, Li as approvalDecisionBatchId, Ma as workerOriginRecordId, Mi as RunJournalProjection, Na as workerReportRecordId, Ni as RunJournalUsage, Oa as turnResponseBatchId, Qi as runCompletionDigest, Ri as childIdempotencyKeyFor, Sa as turnApprovalsBatchId, Ta as turnIdForRun, Ui as markUnknownBatchId, Vi as compactionRecordId, Wi as modelResponseInterruptedBatchId, Xi as promptFromCanonicalRecords, Yi as projectRunJournalStream, Zi as runCompletedRecordId, _a as toolCallResultBatchId, aa as subagentJoinedRecordId, ba as toolStepSettledBatchId, ca as subagentRequestedBatchId, da as subagentStartedRecordId, ea as runDurationRecordId, fa as toolApprovalDecisionRecordId, ga as toolCallResolvedRecordId, ha as toolCallResolutionBatchId, ia as subagentJoinBatchId, ja as workerInputRecordId, ji as RunJournalError, ka as turnResultsBatch, la as subagentRequestedRecordId, ma as toolCallPreparedRecordId, na as runStartedBatchId, oa as subagentLineageBatchId, pa as toolApprovalRequestRecordId, qi as peerMessageRecordId, ra as runStartedRecordId, sa as subagentLineageRecordId, ta as runIdForSubmission, ua as subagentStartedBatchId, va as toolCallSettledRecordId, wa as turnCanonicalBatch, xa as toolStepSettledRecordId, ya as toolCallUnknownRecordId, zi as childThreadIdFor } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { JournalBoundary, RunJournalError, RunJournalProjection, RunJournalUsage, TurnCommitInput, agentUpdateRecordId, approvalDecisionBatchId, childIdempotencyKeyFor, childThreadIdFor, compactionBatchId, compactionRecordId, firstWorkerInputRecordId, markUnknownBatchId, modelResponseInterruptedBatchId, modelResponseInterruptedRecordId, modelResponseRecordId, peerMessageRecordId, projectRunJournal, projectRunJournalStream, promptFromCanonicalRecords, runCompletedRecordId, runCompletionDigest, runDurationBatchId, runDurationRecordId, runIdForSubmission, runStartedBatchId, runStartedRecordId, subagentJoinBatchId, subagentJoinedRecordId, subagentLineageBatchId, subagentLineageRecordId, subagentRequestedBatchId, subagentRequestedRecordId, subagentStartedBatchId, subagentStartedRecordId, toolApprovalDecisionRecordId, toolApprovalRequestRecordId, toolCallPreparedRecordId, toolCallResolutionBatchId, toolCallResolvedRecordId, toolCallResultBatchId, toolCallSettledRecordId, toolCallUnknownRecordId, toolStepSettledBatchId, toolStepSettledRecordId, turnApprovalsBatchId, turnBatchId, turnCanonicalBatch, turnIdForRun, turnPreparedBatchId, turnResponseBatch, turnResponseBatchId, turnResultsBatch, turnResultsBatchId, workerInputRecordId, workerOriginRecordId, workerReportRecordId };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as Principal } from "../Receipt-BAHyigAF.mjs";
|
|
2
2
|
import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
|
|
3
|
-
import { dr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-
|
|
3
|
+
import { dr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-B8ISZyYf.mjs";
|
|
4
4
|
import { A as ScheduleSnapshotPage, B as ScheduledInputAdmission, C as ScheduleRecord, D as ScheduleScope, F as ScheduleTimingRequest, I as ScheduleValidationError, L as ScheduleWake, M as ScheduleStore, N as ScheduleStoreFailure, W as SchedulingLimits, c as ScheduleDestination, f as ScheduleId, j as ScheduleStorageError, k as ScheduleSnapshot, m as ScheduleKey, n as ScheduleAuthorizationError, r as ScheduleAuthorizer, y as ScheduleOwner } from "../Schedule-CtYREFnz.mjs";
|
|
5
5
|
import { Context, Crypto, Effect, Layer, Schema } from "effect";
|
|
6
6
|
declare namespace Scheduling_d_exports {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as QueueSequence, n as JoinedToHost, r as Principal, t as IdempotencyKey } from "../Receipt-BAHyigAF.mjs";
|
|
2
|
-
import { $t as ParentLinkage, An as SuspensionReason, At as ChildReservationConflict, Bn as settlementFailureFromRecord, Bt as InputAppliedMarker, Cn as SubmissionLookupByKey, Ct as ApprovalDecisionIntent, Dn as SubmissionWorkItem, Dt as ChildAttachmentSnapshot, En as SubmissionState, Et as BeginChildBudgetReleaseRequest, Fn as UnknownResolutionIntent, Ft as Claim, Gn as submissionSettlementBatchId, Gt as MarkInputAppliedRequest, Hn as submissionAbortRecordId, Ht as JoiningClaim, In as WaitingChild, It as ClaimHandoff, Jn as workerTerminalFromRecord, Jt as MarkUnknownRequest, Kn as submissionSettlementId, Kt as MarkJoinedRequest, Ln as WaitingForChildSuspension, Lt as ClaimJoiningRequest, Mn as UnknownResolution, Mt as ChildReservationStatus, Nn as UnknownResolutionCommand, Nt as ChildSettledNotification, On as SuspendRequest, Ot as ChildBudgetReservationRequest, Pn as UnknownResolutionConflict, Pt as ChildSettledOutcome, Qt as OwnershipToken, Rn as WorkerLedgerState, Rt as ClaimRequest, Sn as SubmissionLookupById, St as ApprovalDecisionCommand, Tn as SubmissionSnapshot, Tt as AttachChildToReservationRequest, Un as submissionInputBatchId, Ut as LedgerCapabilities, Vn as submissionAbortBatchId, Vt as JoinSnapshot, Wn as submissionInputRecordId, Wt as LedgerError, Xt as OwnershipRenewal, Yt as OwnershipLost, Zt as OwnershipSnapshot, _n as SubmissionAdmissionFence, _t as AdmissionPolicyError, an as ReservedChildBudget, bt as AdmissionResult, cn as ResolutionCompletedWithResult, ct as AbortCommand, dn as RevertJoiningRequest, dt as AdmissionAdmitted, en as RecoverySnapshot, fn as Settlement, ft as AdmissionConflict, gn as SettlementReservationSnapshot, gt as AdmissionNotAdmitted, hn as SettlementReservation, ht as AdmissionIndeterminate, in as RenewOwnershipRequest, jn as SuspensionSnapshot, jt as ChildReservationId, kn as SuspensionOutcome, kt as ChildBudgetReservationSnapshot, ln as ResolutionNeverHappened, lt as AbortIntent, mn as SettlementFinalization, mt as AdmissionGroup, nn as ReleaseChildBudgetRequest, on as ReservedSettlement, pn as SettlementConflict, pt as AdmissionFence, qn as submissionSettlementRecordId, qt as MarkReadyRequest, rn as ReleaseOwnershipRequest, sn as ResolutionAbortSubmission, tn as RecoverySnapshotRequest, un as ResolutionSafeToRetry, ut as AbortIntentRequest, vn as SubmissionLedger, vt as AdmissionRequest, wn as SubmissionScheduling, wt as ApprovalPendingSuspension, xn as SubmissionLookup, xt as ApprovalConflict, yn as SubmissionLedgerFailure, yt as AdmissionResolution, zn as WorkerStopCommand, zt as DEFAULT_OWNERSHIP_LEASE_DURATION } from "../Admin-
|
|
2
|
+
import { $t as ParentLinkage, An as SuspensionReason, At as ChildReservationConflict, Bn as settlementFailureFromRecord, Bt as InputAppliedMarker, Cn as SubmissionLookupByKey, Ct as ApprovalDecisionIntent, Dn as SubmissionWorkItem, Dt as ChildAttachmentSnapshot, En as SubmissionState, Et as BeginChildBudgetReleaseRequest, Fn as UnknownResolutionIntent, Ft as Claim, Gn as submissionSettlementBatchId, Gt as MarkInputAppliedRequest, Hn as submissionAbortRecordId, Ht as JoiningClaim, In as WaitingChild, It as ClaimHandoff, Jn as workerTerminalFromRecord, Jt as MarkUnknownRequest, Kn as submissionSettlementId, Kt as MarkJoinedRequest, Ln as WaitingForChildSuspension, Lt as ClaimJoiningRequest, Mn as UnknownResolution, Mt as ChildReservationStatus, Nn as UnknownResolutionCommand, Nt as ChildSettledNotification, On as SuspendRequest, Ot as ChildBudgetReservationRequest, Pn as UnknownResolutionConflict, Pt as ChildSettledOutcome, Qt as OwnershipToken, Rn as WorkerLedgerState, Rt as ClaimRequest, Sn as SubmissionLookupById, St as ApprovalDecisionCommand, Tn as SubmissionSnapshot, Tt as AttachChildToReservationRequest, Un as submissionInputBatchId, Ut as LedgerCapabilities, Vn as submissionAbortBatchId, Vt as JoinSnapshot, Wn as submissionInputRecordId, Wt as LedgerError, Xt as OwnershipRenewal, Yt as OwnershipLost, Zt as OwnershipSnapshot, _n as SubmissionAdmissionFence, _t as AdmissionPolicyError, an as ReservedChildBudget, bt as AdmissionResult, cn as ResolutionCompletedWithResult, ct as AbortCommand, dn as RevertJoiningRequest, dt as AdmissionAdmitted, en as RecoverySnapshot, fn as Settlement, ft as AdmissionConflict, gn as SettlementReservationSnapshot, gt as AdmissionNotAdmitted, hn as SettlementReservation, ht as AdmissionIndeterminate, in as RenewOwnershipRequest, jn as SuspensionSnapshot, jt as ChildReservationId, kn as SuspensionOutcome, kt as ChildBudgetReservationSnapshot, ln as ResolutionNeverHappened, lt as AbortIntent, mn as SettlementFinalization, mt as AdmissionGroup, nn as ReleaseChildBudgetRequest, on as ReservedSettlement, pn as SettlementConflict, pt as AdmissionFence, qn as submissionSettlementRecordId, qt as MarkReadyRequest, rn as ReleaseOwnershipRequest, sn as ResolutionAbortSubmission, tn as RecoverySnapshotRequest, un as ResolutionSafeToRetry, ut as AbortIntentRequest, vn as SubmissionLedger, vt as AdmissionRequest, wn as SubmissionScheduling, wt as ApprovalPendingSuspension, xn as SubmissionLookup, xt as ApprovalConflict, yn as SubmissionLedgerFailure, yt as AdmissionResolution, zn as WorkerStopCommand, zt as DEFAULT_OWNERSHIP_LEASE_DURATION } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
export { AbortCommand, AbortIntent, AbortIntentRequest, AdmissionAdmitted, AdmissionConflict, AdmissionFence, AdmissionGroup, AdmissionIndeterminate, AdmissionNotAdmitted, AdmissionPolicyError, AdmissionRequest, AdmissionResolution, AdmissionResult, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, ApprovalPendingSuspension, AttachChildToReservationRequest, BeginChildBudgetReleaseRequest, ChildAttachmentSnapshot, ChildBudgetReservationRequest, ChildBudgetReservationSnapshot, ChildReservationConflict, ChildReservationId, ChildReservationStatus, ChildSettledNotification, ChildSettledOutcome, Claim, ClaimHandoff, ClaimJoiningRequest, ClaimRequest, DEFAULT_OWNERSHIP_LEASE_DURATION, IdempotencyKey, InputAppliedMarker, JoinSnapshot, JoinedToHost, JoiningClaim, LedgerCapabilities, LedgerError, MarkInputAppliedRequest, MarkJoinedRequest, MarkReadyRequest, MarkUnknownRequest, OwnershipLost, OwnershipRenewal, OwnershipSnapshot, OwnershipToken, ParentLinkage, Principal, QueueSequence, RecoverySnapshot, RecoverySnapshotRequest, ReleaseChildBudgetRequest, ReleaseOwnershipRequest, RenewOwnershipRequest, ReservedChildBudget, ReservedSettlement, ResolutionAbortSubmission, ResolutionCompletedWithResult, ResolutionNeverHappened, ResolutionSafeToRetry, RevertJoiningRequest, Settlement, SettlementConflict, SettlementFinalization, SettlementReservation, SettlementReservationSnapshot, SubmissionAdmissionFence, SubmissionLedger, SubmissionLedgerFailure, SubmissionLookup, SubmissionLookupById, SubmissionLookupByKey, SubmissionScheduling, SubmissionSnapshot, SubmissionState, SubmissionWorkItem, SuspendRequest, SuspensionOutcome, SuspensionReason, SuspensionSnapshot, UnknownResolution, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WaitingChild, WaitingForChildSuspension, WorkerLedgerState, WorkerStopCommand, settlementFailureFromRecord, submissionAbortBatchId, submissionAbortRecordId, submissionInputBatchId, submissionInputRecordId, submissionSettlementBatchId, submissionSettlementId, submissionSettlementRecordId, workerTerminalFromRecord };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as DigestError } from "../Digest-U69rDHuO.mjs";
|
|
2
|
-
import { vn as SubmissionLedger, yn as SubmissionLedgerFailure } from "../Admin-
|
|
2
|
+
import { vn as SubmissionLedger, yn as SubmissionLedgerFailure } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
import { Crypto, Effect, Schema } from "effect";
|
|
4
4
|
//#region src/durable/SubmissionLedgerConformance.d.ts
|
|
5
5
|
declare const SubmissionLedgerConformanceViolation_base: Schema.Class<SubmissionLedgerConformanceViolation, Schema.TaggedStruct<"SubmissionLedgerConformanceViolation", {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Di as SettledSubmission, Ei as PendingSubmission, Oi as SubmissionStatus } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { PendingSubmission, SettledSubmission, SubmissionStatus };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as defaultSubscriptionLimits, C as SubscriptionScanCursors, D as SubscriptionStore, E as SubscriptionSourceError, M as subscriptionKeyString, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, T as SubscriptionSnapshot, _ as SubscriptionKey, a as PreparedInput, b as SubscriptionRecord, c as SubscriptionAuthorizer, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, h as SubscriptionFailpoint, i as EventSourceVersion, j as subscriptionDeliveryKeyString, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, s as SourceRecovery, t as AcceptedEvent, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope, x as SubscriptionRefusal, y as SubscriptionName } from "../Subscription-
|
|
1
|
+
import { A as defaultSubscriptionLimits, C as SubscriptionScanCursors, D as SubscriptionStore, E as SubscriptionSourceError, M as subscriptionKeyString, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, T as SubscriptionSnapshot, _ as SubscriptionKey, a as PreparedInput, b as SubscriptionRecord, c as SubscriptionAuthorizer, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, h as SubscriptionFailpoint, i as EventSourceVersion, j as subscriptionDeliveryKeyString, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, s as SourceRecovery, t as AcceptedEvent, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope, x as SubscriptionRefusal, y as SubscriptionName } from "../Subscription-B16A-48F.mjs";
|
|
2
2
|
export { AcceptedEvent, DeliveryChange, EventAcknowledgement, EventSourceVersion, PreparedInput, SourcePartition, SourceRecovery, SubscriptionAuthorizer, SubscriptionChange, SubscriptionConfiguration, SubscriptionDelivery, SubscriptionDeliveryKey, SubscriptionDeliverySnapshot, SubscriptionError, SubscriptionFailpoint, SubscriptionFailpointError, SubscriptionKey, SubscriptionLimits, SubscriptionName, SubscriptionRecord, SubscriptionRefusal, SubscriptionRetentionPolicy, SubscriptionScanCursors, SubscriptionScope, SubscriptionSnapshot, SubscriptionSourceError, SubscriptionStore, SubscriptionStoreFailure, defaultSubscriptionLimits, subscriptionDeliveryKeyString, subscriptionKeyString };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as resolveSubscriptionInput, i as makeSubscriptionInputBinding, n as SubscriptionInputBindings, t as SubscriptionInputBinding } from "../SubscriptionInput-
|
|
1
|
+
import { a as resolveSubscriptionInput, i as makeSubscriptionInputBinding, n as SubscriptionInputBindings, t as SubscriptionInputBinding } from "../SubscriptionInput-DIU7CiXE.mjs";
|
|
2
2
|
export { SubscriptionInputBinding, SubscriptionInputBindings, makeSubscriptionInputBinding, resolveSubscriptionInput };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as SubscriptionStore, O as SubscriptionStoreFailure, o as SourcePartition } from "../Subscription-
|
|
1
|
+
import { D as SubscriptionStore, O as SubscriptionStoreFailure, o as SourcePartition } from "../Subscription-B16A-48F.mjs";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
3
|
//#region src/durable/SubscriptionStoreConformance.d.ts
|
|
4
4
|
declare const SubscriptionStoreConformanceViolation_base: Schema.Class<SubscriptionStoreConformanceViolation, Schema.TaggedStruct<"SubscriptionStoreConformanceViolation", {
|
|
@@ -2,9 +2,9 @@ import { t as AgentId, u as ThreadId } from "../Identifiers-CN2s30fF.mjs";
|
|
|
2
2
|
import { r as Principal } from "../Receipt-BAHyigAF.mjs";
|
|
3
3
|
import { t as DurableStep } from "../DurableStep-Cry_iol4.mjs";
|
|
4
4
|
import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
|
|
5
|
-
import "../Admin-
|
|
5
|
+
import "../Admin-B8ISZyYf.mjs";
|
|
6
6
|
import { c as ScheduleDestination } from "../Schedule-CtYREFnz.mjs";
|
|
7
|
-
import { E as SubscriptionSourceError, g as SubscriptionFailpointError, i as EventSourceVersion, m as SubscriptionError, w as SubscriptionScope } from "../Subscription-
|
|
7
|
+
import { E as SubscriptionSourceError, g as SubscriptionFailpointError, i as EventSourceVersion, m as SubscriptionError, w as SubscriptionScope } from "../Subscription-B16A-48F.mjs";
|
|
8
8
|
import { Subscriptions } from "./Subscriptions.mjs";
|
|
9
9
|
import { Tool, Toolkit } from "effect/unstable/ai";
|
|
10
10
|
import { Crypto, Layer, Schema } from "effect";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as SubscriptionRecord, d as SubscriptionDelivery, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-
|
|
1
|
+
import { b as SubscriptionRecord, d as SubscriptionDelivery, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-B16A-48F.mjs";
|
|
2
2
|
import { Result } from "effect";
|
|
3
3
|
declare namespace SubscriptionTransition_d_exports {
|
|
4
4
|
export { applySubscriptionChange, applySubscriptionDeliveryChange, sameAcceptedEventIdentity, sameSourcePartition, sameSubscriptionDelivery, subscriptionCanSelect, subscriptionDeliveryCanSelect, subscriptionMatchesEvent, validateEventRetention };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as Principal } from "../Receipt-BAHyigAF.mjs";
|
|
2
2
|
import { O as PersistedJson } from "../Records-B5GFWCpn.mjs";
|
|
3
|
-
import { pt as AdmissionFence } from "../Admin-
|
|
4
|
-
import { D as SubscriptionStore, E as SubscriptionSourceError, O as SubscriptionStoreFailure, T as SubscriptionSnapshot, _ as SubscriptionKey, c as SubscriptionAuthorizer, f as SubscriptionDeliveryKey, i as EventSourceVersion, m as SubscriptionError, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope } from "../Subscription-
|
|
5
|
-
import { r as EventSources } from "../EventSource-
|
|
6
|
-
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-
|
|
7
|
-
import { n as SubscriptionInputBindings } from "../SubscriptionInput-
|
|
3
|
+
import { pt as AdmissionFence } from "../Admin-B8ISZyYf.mjs";
|
|
4
|
+
import { D as SubscriptionStore, E as SubscriptionSourceError, O as SubscriptionStoreFailure, T as SubscriptionSnapshot, _ as SubscriptionKey, c as SubscriptionAuthorizer, f as SubscriptionDeliveryKey, i as EventSourceVersion, m as SubscriptionError, p as SubscriptionDeliverySnapshot, r as EventAcknowledgement, u as SubscriptionConfiguration, v as SubscriptionLimits, w as SubscriptionScope } from "../Subscription-B16A-48F.mjs";
|
|
5
|
+
import { r as EventSources } from "../EventSource-CkN05NT3.mjs";
|
|
6
|
+
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-fctZOTnn.mjs";
|
|
7
|
+
import { n as SubscriptionInputBindings } from "../SubscriptionInput-DIU7CiXE.mjs";
|
|
8
8
|
import { Context, Crypto, Effect, Layer } from "effect";
|
|
9
9
|
declare namespace Subscriptions_d_exports {
|
|
10
10
|
export { SubscribeOptions, SubscriptionDriver, SubscriptionFailure, SubscriptionIntake, Subscriptions };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContextHistory, ContextHistoryError } from "../engine/ContextHistory.mjs";
|
|
2
|
-
import { ni as ThreadStore } from "../Admin-
|
|
2
|
+
import { ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
import { Layer, Schema } from "effect";
|
|
4
4
|
declare namespace ThreadContextHistory_d_exports {
|
|
5
5
|
export { ThreadContextHistoryOptions, layer };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as ProducerId, a as BatchId } from "../Records-B5GFWCpn.mjs";
|
|
2
|
-
import { Br as ThreadExport, Rr as ThreadCheckpoint, Tn as SubmissionSnapshot, c as IntegrityReport } from "../Admin-
|
|
2
|
+
import { Br as ThreadExport, Rr as ThreadCheckpoint, Tn as SubmissionSnapshot, c as IntegrityReport } from "../Admin-B8ISZyYf.mjs";
|
|
3
3
|
import { Crypto, Effect } from "effect";
|
|
4
4
|
declare namespace ThreadInvariants_d_exports {
|
|
5
5
|
export { ThreadInvariantInput, verifyThreadInvariants };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mr as FencedAppendRequest, kr as AppendResult } from "../Admin-
|
|
1
|
+
import { Mr as FencedAppendRequest, kr as AppendResult } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
import { Context, Effect, Layer, Option, Schema } from "effect";
|
|
3
3
|
declare namespace ThreadProjectionMaintenance_d_exports {
|
|
4
4
|
export { ThreadProjectionError, ThreadProjectionMaintenance, ThreadProjectionMaintenanceService, drainDue };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $r as ThreadRecoveryCheckpoints, Ar as CheckpointRejected, Br as ThreadExport, Fr as SaveCheckpointRequest, Gr as ThreadNotMaterialized, Hr as ThreadIdentity, Ir as SaveRecoveryCheckpointRequest, Jr as ThreadOutstandingRequest, Kr as ThreadObservation, Lr as SelectedThreadRead, Mr as FencedAppendRequest, Nr as LoadCheckpointRequest, Or as AppendConflict, Pr as MAX_THREAD_EXPORT_RECORDS, Qr as ThreadRecordRequest, Rr as ThreadCheckpoint, Ur as ThreadIdentityRequest, Vr as ThreadExportRequest, Wr as ThreadMaterialization, Xr as ThreadRead, Yr as ThreadPeerCountRequest, Zr as ThreadReadRequest, ai as ThreadStoreFailure, ci as ThreadTailRequest, di as getRunInput, ei as ThreadRunInputRequest, fi as readOutstanding, ii as ThreadStoreError, jr as FenceRejected, kr as AppendResult, li as ThreadWorkerStateRequest, ni as ThreadStore, pi as readWorkerState, qr as ThreadOutstanding, ri as ThreadStoreDiagnostic, si as ThreadTail, ti as ThreadSelection, ui as getRecord, zr as ThreadCheckpoints } from "../Admin-
|
|
1
|
+
import { $r as ThreadRecoveryCheckpoints, Ar as CheckpointRejected, Br as ThreadExport, Fr as SaveCheckpointRequest, Gr as ThreadNotMaterialized, Hr as ThreadIdentity, Ir as SaveRecoveryCheckpointRequest, Jr as ThreadOutstandingRequest, Kr as ThreadObservation, Lr as SelectedThreadRead, Mr as FencedAppendRequest, Nr as LoadCheckpointRequest, Or as AppendConflict, Pr as MAX_THREAD_EXPORT_RECORDS, Qr as ThreadRecordRequest, Rr as ThreadCheckpoint, Ur as ThreadIdentityRequest, Vr as ThreadExportRequest, Wr as ThreadMaterialization, Xr as ThreadRead, Yr as ThreadPeerCountRequest, Zr as ThreadReadRequest, ai as ThreadStoreFailure, ci as ThreadTailRequest, di as getRunInput, ei as ThreadRunInputRequest, fi as readOutstanding, ii as ThreadStoreError, jr as FenceRejected, kr as AppendResult, li as ThreadWorkerStateRequest, ni as ThreadStore, pi as readWorkerState, qr as ThreadOutstanding, ri as ThreadStoreDiagnostic, si as ThreadTail, ti as ThreadSelection, ui as getRecord, zr as ThreadCheckpoints } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
export { AppendConflict, AppendResult, CheckpointRejected, FenceRejected, FencedAppendRequest, LoadCheckpointRequest, MAX_THREAD_EXPORT_RECORDS, SaveCheckpointRequest, SaveRecoveryCheckpointRequest, SelectedThreadRead, ThreadCheckpoint, ThreadCheckpoints, ThreadExport, ThreadExportRequest, ThreadIdentity, ThreadIdentityRequest, ThreadMaterialization, ThreadNotMaterialized, ThreadObservation, ThreadOutstanding, ThreadOutstandingRequest, ThreadPeerCountRequest, ThreadRead, ThreadReadRequest, ThreadRecordRequest, ThreadRecoveryCheckpoints, ThreadRunInputRequest, ThreadSelection, ThreadStore, ThreadStoreDiagnostic, ThreadStoreError, ThreadStoreFailure, ThreadTail, ThreadTailRequest, ThreadWorkerStateRequest, getRecord, getRunInput, readOutstanding, readWorkerState };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ar as CheckpointRejected, ai as ThreadStoreFailure, ni as ThreadStore } from "../Admin-
|
|
1
|
+
import { Ar as CheckpointRejected, ai as ThreadStoreFailure, ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
|
|
2
2
|
import { Effect, Schema } from "effect";
|
|
3
3
|
//#region src/durable/ThreadStoreConformance.d.ts
|
|
4
4
|
declare const ThreadStoreConformanceViolation_base: Schema.Class<ThreadStoreConformanceViolation, Schema.TaggedStruct<"ThreadStoreConformanceViolation", {
|