effect-agent 0.1.0-beta.132 → 0.1.0-beta.133
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-C34cVKlT.d.mts → Admin-CUja0lmO.d.mts} +21 -3
- package/dist/{DurableAgentRuntime-BydyN_n-.mjs → DurableAgentRuntime-DH2baLGe.mjs} +13 -21
- package/dist/DurableAgentRuntime-DH2baLGe.mjs.map +1 -0
- package/dist/{EventSource-Bac0SxKL.d.mts → EventSource-DoiZF3xv.d.mts} +2 -2
- package/dist/{PreparedInputAdmission-DcQGQ0Yp.d.mts → PreparedInputAdmission-B1bzyIuV.d.mts} +3 -3
- package/dist/{Subscription-Bk2Smmqc.d.mts → Subscription-m_yNfNeN.d.mts} +2 -2
- package/dist/{SubscriptionInput-ekbJz3pF.d.mts → SubscriptionInput-ON3-b8Sl.d.mts} +2 -2
- 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/MessageDelivery.d.mts +41 -41
- package/dist/durable/MessageDeliveryStoreConformance.d.mts +39 -39
- 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/SqlStorageV2Upgrade.d.mts +1 -1
- package/dist/durable/SqlSubscriptionStore.d.mts +1 -1
- package/dist/durable/SqlThreadNativeReads.d.mts +2 -1
- package/dist/durable/SqlThreadNativeReads.mjs +75 -38
- package/dist/durable/SqlThreadNativeReads.mjs.map +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 +2 -2
- package/dist/durable/ThreadStore.mjs +30 -2
- package/dist/durable/ThreadStore.mjs.map +1 -1
- package/dist/durable/ThreadStoreConformance.d.mts +1 -1
- package/dist/durable/ThreadStoreConformance.mjs +34 -3
- package/dist/durable/ThreadStoreConformance.mjs.map +1 -1
- package/dist/durable/WorkerHost.d.mts +1 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/durable/SqlThreadNativeReads.ts +75 -2
- package/src/durable/ThreadStore.ts +63 -1
- package/src/durable/ThreadStoreConformance.ts +113 -1
- package/src/durable/internal/agent-updates.ts +4 -0
- package/src/durable/internal/worker-host.ts +17 -18
- package/dist/DurableAgentRuntime-BydyN_n-.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { O as PersistedJson } from "./Records-B5GFWCpn.mjs";
|
|
2
|
-
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, t as AcceptedEvent } from "./Subscription-
|
|
2
|
+
import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, t as AcceptedEvent } from "./Subscription-m_yNfNeN.mjs";
|
|
3
3
|
import { Context, Effect, Schema, Scope } from "effect";
|
|
4
4
|
declare namespace EventSource_d_exports {
|
|
5
5
|
export { EventSource, EventSources, NormalizedEvent, makeEventSource };
|
|
@@ -48,4 +48,4 @@ declare const makeEventSource: <Event extends Schema.Top, Parameters extends Sch
|
|
|
48
48
|
}) => Effect.Effect<EventSource, never, Exclude<R, Scope.Scope> | Exclude<Event["DecodingServices"], Scope.Scope> | Exclude<Event["EncodingServices"], Scope.Scope> | Exclude<Parameters["DecodingServices"], Scope.Scope> | Exclude<Parameters["EncodingServices"], Scope.Scope>>;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { makeEventSource as a, NormalizedEvent as i, EventSource_d_exports as n, EventSources as r, EventSource as t };
|
|
51
|
-
//# sourceMappingURL=EventSource-
|
|
51
|
+
//# sourceMappingURL=EventSource-DoiZF3xv.d.mts.map
|
package/dist/{PreparedInputAdmission-DcQGQ0Yp.d.mts → PreparedInputAdmission-B1bzyIuV.d.mts}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as Receipt } from "./Receipt-BAHyigAF.mjs";
|
|
2
2
|
import { a as FailureDiagnostic_d_exports, r as Diagnostic } from "./FailureDiagnostic-CaAkzGHL.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { mi as SubmissionStatus } from "./Admin-CUja0lmO.mjs";
|
|
4
4
|
import { H as ScheduledInputRefused, V as ScheduledInputFailure, j as ScheduleStorageError } from "./Schedule-CtYREFnz.mjs";
|
|
5
|
-
import { a as PreparedInput } from "./Subscription-
|
|
5
|
+
import { a as PreparedInput } from "./Subscription-m_yNfNeN.mjs";
|
|
6
6
|
import { Context, Effect } from "effect";
|
|
7
7
|
declare namespace PreparedInputAdmission_d_exports {
|
|
8
8
|
export { PreparedInputAdmission, admitPreparedInput };
|
|
@@ -39,4 +39,4 @@ declare const admitPreparedInput: <R>(submit: Effect.Effect<Receipt, ScheduledIn
|
|
|
39
39
|
}, ScheduleStorageError, R>;
|
|
40
40
|
//#endregion
|
|
41
41
|
export { PreparedInputAdmission_d_exports as n, admitPreparedInput as r, PreparedInputAdmission as t };
|
|
42
|
-
//# sourceMappingURL=PreparedInputAdmission-
|
|
42
|
+
//# sourceMappingURL=PreparedInputAdmission-B1bzyIuV.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-CUja0lmO.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-m_yNfNeN.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-m_yNfNeN.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-ON3-b8Sl.d.mts.map
|
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-CUja0lmO.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 { Ca as
|
|
1
|
+
import { Aa as compileRegistrations, Ca as BindingUnavailable, Da as ReplayVersions, Ea as ExecutableAgentBinding, Oa as ResolvedBinding, Sa as AgentRegistration, Ta as DurableWorkerBinding, ja as definitionDigestsEqual, ka as compileBindingContracts, wa as DurableBindingFailure, xa as AgentAttemptContext } from "../Admin-CUja0lmO.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 {
|
|
1
|
+
import { _n as SubmissionLedger, ei as ThreadStore } from "../Admin-CUja0lmO.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 {
|
|
4
|
+
import { Ur as ThreadNotMaterialized, ei as ThreadStore, ni as ThreadStoreError } from "../Admin-CUja0lmO.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 DurableApprovalSuspension, Cr as recoveryRepairRecordId, Jn as DurableAbortFailure, Qn as DurableApprovalResolver, Sr as recoveryRepairBatchId, Tr as threadCreatedRecordId, Yn as DurableAgentRuntime, Zn as DurableApprovalFailure, _r as RecoveryReport, ar as DurableResolveFailure, br as childReservationIdFor, cr as DurableRuntimeConfigOptions, dr as DurableSubmitOptions, er as DurableAwaitFailure, fr as DurableVerifyFailure, gr as RecoveryFailure, hr as RecoveryBlocked, ir as DurableProgressFailure, lr as DurableSubmitAgent, mr as DurableWorkerRequirements, nr as DurableObligationFailure, or as DurableRetryFailure, pr as DurableWorkerFailure, qn as ApprovalSuspensionError, rr as DurableObserveOptions, sr as DurableRuntimeConfig, tr as DurableExplainFailure, ur as DurableSubmitFailure, vr as RecoverySweepOptions, wr as threadCreatedBatchId, xr as isolateRecovery, yr as RecoverySweepResult } from "../Admin-
|
|
2
|
+
import { $n as DurableApprovalSuspension, Cr as recoveryRepairRecordId, Jn as DurableAbortFailure, Qn as DurableApprovalResolver, Sr as recoveryRepairBatchId, Tr as threadCreatedRecordId, Yn as DurableAgentRuntime, Zn as DurableApprovalFailure, _r as RecoveryReport, ar as DurableResolveFailure, br as childReservationIdFor, cr as DurableRuntimeConfigOptions, dr as DurableSubmitOptions, er as DurableAwaitFailure, fr as DurableVerifyFailure, gr as RecoveryFailure, hr as RecoveryBlocked, ir as DurableProgressFailure, lr as DurableSubmitAgent, mr as DurableWorkerRequirements, nr as DurableObligationFailure, or as DurableRetryFailure, pr as DurableWorkerFailure, qn as ApprovalSuspensionError, rr as DurableObserveOptions, sr as DurableRuntimeConfig, tr as DurableExplainFailure, ur as DurableSubmitFailure, vr as RecoverySweepOptions, wr as threadCreatedBatchId, xr as isolateRecovery, yr as RecoverySweepResult } from "../Admin-CUja0lmO.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-DH2baLGe.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-DoiZF3xv.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-CUja0lmO.mjs";
|
|
3
|
+
import { E as SubscriptionSourceError } from "../Subscription-m_yNfNeN.mjs";
|
|
4
|
+
import { t as EventSource } from "../EventSource-DoiZF3xv.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";
|
|
@@ -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 { dn as Settlement } from "../Admin-
|
|
9
|
-
import { a as PreparedInput } from "../Subscription-
|
|
10
|
-
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-
|
|
8
|
+
import { dn as Settlement } from "../Admin-CUja0lmO.mjs";
|
|
9
|
+
import { a as PreparedInput } from "../Subscription-m_yNfNeN.mjs";
|
|
10
|
+
import { t as PreparedInputAdmission } from "../PreparedInputAdmission-B1bzyIuV.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 };
|
|
@@ -616,6 +616,25 @@ export declare const readPending: (request: Pick<{
|
|
|
616
616
|
readonly reportKind?: "update" | undefined;
|
|
617
617
|
} | undefined;
|
|
618
618
|
readonly messageAdmission?: {
|
|
619
|
+
readonly schemaVersion: 1;
|
|
620
|
+
readonly message: {
|
|
621
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
622
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
623
|
+
};
|
|
624
|
+
readonly peerName: string;
|
|
625
|
+
readonly sender: {
|
|
626
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
627
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
628
|
+
};
|
|
629
|
+
readonly returnAddress: {
|
|
630
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
631
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
632
|
+
};
|
|
633
|
+
readonly inReplyTo?: {
|
|
634
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
635
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
636
|
+
} | undefined;
|
|
637
|
+
} | {
|
|
619
638
|
readonly _tag: "WorkerCompletion";
|
|
620
639
|
readonly budgetExhausted: boolean;
|
|
621
640
|
readonly schemaVersion: 1;
|
|
@@ -656,25 +675,6 @@ export declare const readPending: (request: Pick<{
|
|
|
656
675
|
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
657
676
|
};
|
|
658
677
|
readonly update: Update;
|
|
659
|
-
} | {
|
|
660
|
-
readonly schemaVersion: 1;
|
|
661
|
-
readonly message: {
|
|
662
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
663
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
664
|
-
};
|
|
665
|
-
readonly peerName: string;
|
|
666
|
-
readonly sender: {
|
|
667
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
668
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
669
|
-
};
|
|
670
|
-
readonly returnAddress: {
|
|
671
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
672
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
673
|
-
};
|
|
674
|
-
readonly inReplyTo?: {
|
|
675
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
676
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
677
|
-
} | undefined;
|
|
678
678
|
} | undefined;
|
|
679
679
|
};
|
|
680
680
|
readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
@@ -817,6 +817,25 @@ export declare const prepareMessageDelivery: (options: {
|
|
|
817
817
|
readonly reportKind?: "update" | undefined;
|
|
818
818
|
} | undefined;
|
|
819
819
|
readonly messageAdmission?: {
|
|
820
|
+
readonly schemaVersion: 1;
|
|
821
|
+
readonly message: {
|
|
822
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
823
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
824
|
+
};
|
|
825
|
+
readonly peerName: string;
|
|
826
|
+
readonly sender: {
|
|
827
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
828
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
829
|
+
};
|
|
830
|
+
readonly returnAddress: {
|
|
831
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
832
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
833
|
+
};
|
|
834
|
+
readonly inReplyTo?: {
|
|
835
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
836
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
837
|
+
} | undefined;
|
|
838
|
+
} | {
|
|
820
839
|
readonly _tag: "WorkerCompletion";
|
|
821
840
|
readonly budgetExhausted: boolean;
|
|
822
841
|
readonly schemaVersion: 1;
|
|
@@ -857,25 +876,6 @@ export declare const prepareMessageDelivery: (options: {
|
|
|
857
876
|
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
858
877
|
};
|
|
859
878
|
readonly update: Update;
|
|
860
|
-
} | {
|
|
861
|
-
readonly schemaVersion: 1;
|
|
862
|
-
readonly message: {
|
|
863
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
864
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
865
|
-
};
|
|
866
|
-
readonly peerName: string;
|
|
867
|
-
readonly sender: {
|
|
868
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
869
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
870
|
-
};
|
|
871
|
-
readonly returnAddress: {
|
|
872
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
873
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
874
|
-
};
|
|
875
|
-
readonly inReplyTo?: {
|
|
876
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
877
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
878
|
-
} | undefined;
|
|
879
879
|
} | undefined;
|
|
880
880
|
};
|
|
881
881
|
readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
@@ -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 { dn as Settlement } from "../Admin-
|
|
8
|
+
import { dn as Settlement } from "../Admin-CUja0lmO.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
|
|
@@ -105,25 +105,6 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
|
|
|
105
105
|
readonly reportKind?: "update" | undefined;
|
|
106
106
|
} | undefined;
|
|
107
107
|
readonly messageAdmission?: {
|
|
108
|
-
readonly schemaVersion: 1;
|
|
109
|
-
readonly message: {
|
|
110
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
111
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
112
|
-
};
|
|
113
|
-
readonly peerName: string;
|
|
114
|
-
readonly sender: {
|
|
115
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
116
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
117
|
-
};
|
|
118
|
-
readonly returnAddress: {
|
|
119
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
120
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
121
|
-
};
|
|
122
|
-
readonly inReplyTo?: {
|
|
123
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
124
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
125
|
-
} | undefined;
|
|
126
|
-
} | {
|
|
127
108
|
readonly _tag: "WorkerCompletion";
|
|
128
109
|
readonly budgetExhausted: boolean;
|
|
129
110
|
readonly schemaVersion: 1;
|
|
@@ -164,6 +145,25 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
|
|
|
164
145
|
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
165
146
|
};
|
|
166
147
|
readonly update: Update;
|
|
148
|
+
} | {
|
|
149
|
+
readonly schemaVersion: 1;
|
|
150
|
+
readonly message: {
|
|
151
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
152
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
153
|
+
};
|
|
154
|
+
readonly peerName: string;
|
|
155
|
+
readonly sender: {
|
|
156
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
157
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
158
|
+
};
|
|
159
|
+
readonly returnAddress: {
|
|
160
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
161
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
162
|
+
};
|
|
163
|
+
readonly inReplyTo?: {
|
|
164
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
165
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
166
|
+
} | undefined;
|
|
167
167
|
} | undefined;
|
|
168
168
|
};
|
|
169
169
|
readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
@@ -288,25 +288,6 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
|
|
|
288
288
|
readonly reportKind?: "update" | undefined;
|
|
289
289
|
} | undefined;
|
|
290
290
|
readonly messageAdmission?: {
|
|
291
|
-
readonly schemaVersion: 1;
|
|
292
|
-
readonly message: {
|
|
293
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
294
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
295
|
-
};
|
|
296
|
-
readonly peerName: string;
|
|
297
|
-
readonly sender: {
|
|
298
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
299
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
300
|
-
};
|
|
301
|
-
readonly returnAddress: {
|
|
302
|
-
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
303
|
-
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
304
|
-
};
|
|
305
|
-
readonly inReplyTo?: {
|
|
306
|
-
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
307
|
-
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
308
|
-
} | undefined;
|
|
309
|
-
} | {
|
|
310
291
|
readonly _tag: "WorkerCompletion";
|
|
311
292
|
readonly budgetExhausted: boolean;
|
|
312
293
|
readonly schemaVersion: 1;
|
|
@@ -347,6 +328,25 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
|
|
|
347
328
|
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
348
329
|
};
|
|
349
330
|
readonly update: Update;
|
|
331
|
+
} | {
|
|
332
|
+
readonly schemaVersion: 1;
|
|
333
|
+
readonly message: {
|
|
334
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
335
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
336
|
+
};
|
|
337
|
+
readonly peerName: string;
|
|
338
|
+
readonly sender: {
|
|
339
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
340
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
341
|
+
};
|
|
342
|
+
readonly returnAddress: {
|
|
343
|
+
readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
344
|
+
readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
|
|
345
|
+
};
|
|
346
|
+
readonly inReplyTo?: {
|
|
347
|
+
readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
|
|
348
|
+
readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
|
|
349
|
+
} | undefined;
|
|
350
350
|
} | undefined;
|
|
351
351
|
};
|
|
352
352
|
readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as ThreadHistory } from "../ThreadHistory-tS1KwxHR.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { ei as ThreadStore } from "../Admin-CUja0lmO.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-B1bzyIuV.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-CUja0lmO.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 toolApprovalRequestRecordId, Ai as modelResponseInterruptedBatchId, Bi as runDurationRecordId, Ci as approvalDecisionBatchId, Di as compactionRecordId, Ei as compactionBatchId, Fi as projectRunJournalStream, Gi as subagentJoinedRecordId, Hi as runStartedBatchId, Ii as promptFromCanonicalRecords, Ji as subagentRequestedBatchId, Ki as subagentLineageBatchId, Li as runCompletedRecordId, Mi as modelResponseRecordId, Ni as peerMessageRecordId, Oi as firstWorkerInputRecordId, Pi as projectRunJournal, Qi as toolApprovalDecisionRecordId, Ri as runCompletionDigest, Si as agentUpdateRecordId, Ti as childThreadIdFor, Ui as runStartedRecordId, Vi as runIdForSubmission, Wi as subagentJoinBatchId, Xi as subagentStartedBatchId, Yi as subagentRequestedRecordId, Zi as subagentStartedRecordId, _a as workerInputRecordId, _i as RunJournalError, aa as toolCallUnknownRecordId, ca as turnApprovalsBatchId, da as turnIdForRun, ea as toolCallPreparedRecordId, fa as turnPreparedBatchId, ga as turnResultsBatchId, gi as JournalBoundary, ha as turnResultsBatch, ia as toolCallSettledRecordId, ji as modelResponseInterruptedRecordId, ki as markUnknownBatchId, la as turnBatchId, ma as turnResponseBatchId, na as toolCallResolvedRecordId, oa as toolStepSettledBatchId, pa as turnResponseBatch, qi as subagentLineageRecordId, ra as toolCallResultBatchId, sa as toolStepSettledRecordId, ta as toolCallResolutionBatchId, ua as turnCanonicalBatch, va as workerOriginRecordId, vi as RunJournalProjection, wi as childIdempotencyKeyFor, xi as TurnCommitInput, ya as workerReportRecordId, yi as RunJournalUsage, zi as runDurationBatchId } from "../Admin-CUja0lmO.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 { lr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-
|
|
3
|
+
import { lr as DurableSubmitAgent, pt as AdmissionFence } from "../Admin-CUja0lmO.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,5 +1,5 @@
|
|
|
1
1
|
import { d as ScheduleFailpointError } from "../Schedule-CtYREFnz.mjs";
|
|
2
|
-
import { g as SubscriptionFailpointError } from "../Subscription-
|
|
2
|
+
import { g as SubscriptionFailpointError } from "../Subscription-m_yNfNeN.mjs";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
5
5
|
//#region src/durable/SqlStorageV2Upgrade.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as Digest } from "../Records-B5GFWCpn.mjs";
|
|
2
|
-
import { C as SubscriptionScanCursors, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, _ as SubscriptionKey, b as SubscriptionRecord, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-
|
|
2
|
+
import { C as SubscriptionScanCursors, O as SubscriptionStoreFailure, S as SubscriptionRetentionPolicy, _ as SubscriptionKey, b as SubscriptionRecord, d as SubscriptionDelivery, f as SubscriptionDeliveryKey, g as SubscriptionFailpointError, l as SubscriptionChange, m as SubscriptionError, n as DeliveryChange, o as SourcePartition, t as AcceptedEvent, v as SubscriptionLimits } from "../Subscription-m_yNfNeN.mjs";
|
|
3
3
|
import { Context, Effect } from "effect";
|
|
4
4
|
import * as SqlClientService from "effect/unstable/sql/SqlClient";
|
|
5
5
|
//#region src/durable/SqlSubscriptionStore.d.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as RecordEnvelope, l as CanonicalRecordEnvelope } from "../Records-B5GFWCpn.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { Br as ThreadIdentity, Ur as ThreadNotMaterialized, Vr as ThreadIdentityRequest, ni as ThreadStoreError, qr as ThreadPeerCountRequest } from "../Admin-CUja0lmO.mjs";
|
|
3
3
|
import { Effect, Schema } from "effect";
|
|
4
4
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
5
5
|
declare namespace SqlThreadNativeReads_d_exports {
|
|
@@ -48,6 +48,7 @@ export declare const makeSelectedReads: (envelope: (row: typeof Row.Type) => Eff
|
|
|
48
48
|
};
|
|
49
49
|
}) => Effect.Effect<CanonicalRecordEnvelope[], ThreadNotMaterialized | ThreadStoreError, never>;
|
|
50
50
|
countPeerMessages: (request: ThreadPeerCountRequest) => Effect.Effect<number, ThreadStoreError | ThreadNotMaterialized>;
|
|
51
|
+
readIdentity: (request: ThreadIdentityRequest) => Effect.Effect<ThreadIdentity, ThreadStoreError | ThreadNotMaterialized>;
|
|
51
52
|
}, never, SqlClient.SqlClient>;
|
|
52
53
|
//#endregion
|
|
53
54
|
export { SqlThreadNativeReads_d_exports as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "../rolldown-runtime-D7D4PA-g.mjs";
|
|
2
|
-
import { CanonicalRecord, CanonicalRecordEnvelope, CanonicalSequence, Digest, RecordId } from "./Records.mjs";
|
|
3
|
-
import { S as runIdForSubmission } from "../RunJournal-BXrq0VIK.mjs";
|
|
4
|
-
import { SelectedThreadRead, ThreadNotMaterialized, ThreadPeerCountRequest, ThreadStoreError } from "./ThreadStore.mjs";
|
|
2
|
+
import { CanonicalRecord, CanonicalRecordEnvelope, CanonicalSequence, Digest, ProducerEpoch, RecordId } from "./Records.mjs";
|
|
3
|
+
import { $ as workerOriginRecordId, O as subagentLineageRecordId, S as runIdForSubmission } from "../RunJournal-BXrq0VIK.mjs";
|
|
4
|
+
import { SelectedThreadRead, ThreadIdentity, ThreadIdentityRequest, ThreadNotMaterialized, ThreadPeerCountRequest, ThreadStoreError } from "./ThreadStore.mjs";
|
|
5
5
|
import { Effect, Schema } from "effect";
|
|
6
6
|
import * as SqlClient from "effect/unstable/sql/SqlClient";
|
|
7
7
|
//#region src/durable/SqlThreadNativeReads.ts
|
|
@@ -98,33 +98,32 @@ const makeSelectedReads = Effect.fnUntraced(function* (envelope) {
|
|
|
98
98
|
if (decoded.length !== 1 || decoded[0] === void 0) return yield* failure("native thread tail");
|
|
99
99
|
return decoded[0];
|
|
100
100
|
});
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
rows = (yield* Effect.forEach(["UserInputRecorded", "RunStarted"], (tag) => sql`SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records
|
|
101
|
+
const read = Effect.fnUntraced(function* (request) {
|
|
102
|
+
return yield* sql.withTransaction(Effect.gen(function* () {
|
|
103
|
+
const tail = yield* requireThread(request.threadId);
|
|
104
|
+
const selection = request.selection;
|
|
105
|
+
if ("expectedTailSequence" in selection && (tail.tail_sequence !== selection.expectedTailSequence || tail.tail_digest !== selection.expectedTailDigest)) return yield* failure("selected read tail changed");
|
|
106
|
+
const after = request.page.afterSequence ?? 0;
|
|
107
|
+
let rows;
|
|
108
|
+
switch (selection._tag) {
|
|
109
|
+
case "RecordId":
|
|
110
|
+
rows = yield* sql`SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND record_id = ${selection.recordId} AND sequence > ${after}`;
|
|
111
|
+
break;
|
|
112
|
+
case "RunInput":
|
|
113
|
+
rows = yield* sql`SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND json_extract(record_json, '$.payload._tag') = 'UserInputRecorded' AND json_extract(record_json, '$.payload.kind') = 'user' AND json_extract(record_json, '$.payload.runId') = ${selection.runId} LIMIT 2`;
|
|
114
|
+
break;
|
|
115
|
+
case "Outstanding":
|
|
116
|
+
rows = yield* sql`SELECT thread_id, sequence, record_id, batch_id, record_json, outstanding FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND outstanding <> 0 AND sequence > ${after} ORDER BY sequence LIMIT ${request.page.limit}`;
|
|
117
|
+
break;
|
|
118
|
+
case "WorkerExecution":
|
|
119
|
+
rows = (yield* Effect.forEach(["UserInputRecorded", "RunStarted"], (tag) => sql`SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records
|
|
121
120
|
WHERE thread_id = ${request.threadId} AND json_extract(record_json, '$.payload._tag') = ${tag}
|
|
122
121
|
AND json_extract(record_json, '$.payload.runId') IS NOT NULL
|
|
123
122
|
ORDER BY sequence DESC LIMIT 1`)).flat().filter((row) => Number(row.sequence) > after).sort((a, b) => Number(a.sequence) - Number(b.sequence)).slice(0, request.page.limit);
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
break;
|
|
124
|
+
case "WorkerState": {
|
|
125
|
+
const runId = selection.sourceSubmissionId === void 0 ? null : runIdForSubmission(selection.sourceSubmissionId);
|
|
126
|
+
rows = yield* sql`
|
|
128
127
|
SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records
|
|
129
128
|
WHERE thread_id = ${request.threadId} AND sequence > ${after} AND json_extract(record_json, '$.payload._tag') IN ('ThreadCreated', 'WorkerOriginRecorded', 'SubagentLineageRecorded', 'WorkerInputRequested', 'WorkerInputCompleted', 'WorkerStopRequested')
|
|
130
129
|
UNION ALL
|
|
@@ -134,23 +133,61 @@ const makeSelectedReads = Effect.fnUntraced(function* (envelope) {
|
|
|
134
133
|
SELECT thread_id, sequence, record_id, batch_id, record_json FROM effect_agent_canonical_records
|
|
135
134
|
WHERE thread_id = ${request.threadId} AND sequence > ${after} AND json_extract(record_json, '$.payload._tag') = 'SubagentJoined' AND json_extract(record_json, '$.payload.runId') = ${runId}
|
|
136
135
|
ORDER BY sequence LIMIT ${request.page.limit}`;
|
|
137
|
-
|
|
138
|
-
}
|
|
136
|
+
break;
|
|
139
137
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
138
|
+
}
|
|
139
|
+
const decoded = yield* Schema.decodeUnknownEffect(Schema.Array(Row))(rows);
|
|
140
|
+
if (selection._tag === "RunInput" && decoded.length > 1) return yield* failure("ambiguous original Run input");
|
|
141
|
+
return yield* Effect.forEach(decoded.filter((row) => row.sequence > after), (row) => Effect.gen(function* () {
|
|
142
|
+
const value = yield* envelope(row);
|
|
143
|
+
if (value.record.recordId !== row.record_id || row.thread_id !== request.threadId || selection._tag === "Outstanding" && !(row.outstanding === 1 && value.record.payload._tag === "ToolCallPrepared" || row.outstanding === 2 && value.record.payload._tag === "ToolCallUnknown" || row.outstanding === 3 && value.record.payload._tag === "WorkerInputRequested")) return yield* failure("selected record incomplete or corrupt");
|
|
144
|
+
return value;
|
|
147
145
|
}));
|
|
148
|
-
}
|
|
146
|
+
}));
|
|
147
|
+
}, Effect.mapError((cause) => cause._tag === "ThreadNotMaterialized" || cause._tag === "ThreadStoreError" ? cause : failure("selected read", cause)));
|
|
148
|
+
const readIdentity = Effect.fnUntraced(function* (request) {
|
|
149
|
+
yield* Schema.decodeEffect(Schema.toType(ThreadIdentityRequest))(request);
|
|
150
|
+
return yield* sql.withTransaction(Effect.gen(function* () {
|
|
151
|
+
const tails = yield* sql`SELECT tail_sequence, tail_digest, producer_epoch
|
|
152
|
+
FROM effect_agent_threads WHERE thread_id = ${request.threadId}`;
|
|
153
|
+
if (tails.length === 0) return yield* ThreadNotMaterialized.make({ threadId: request.threadId });
|
|
154
|
+
const decoded = yield* Schema.decodeUnknownEffect(Schema.Array(Schema.Struct({
|
|
155
|
+
tail_sequence: CanonicalSequence,
|
|
156
|
+
tail_digest: Digest,
|
|
157
|
+
producer_epoch: ProducerEpoch
|
|
158
|
+
})))(tails);
|
|
159
|
+
const tail = decoded[0];
|
|
160
|
+
if (decoded.length !== 1 || tail === void 0) return yield* failure("identity tail");
|
|
161
|
+
const origin = workerOriginRecordId(request.threadId);
|
|
162
|
+
const lineage = subagentLineageRecordId(request.threadId);
|
|
163
|
+
const rows = yield* sql`SELECT thread_id, sequence, record_id, batch_id, record_json FROM (
|
|
164
|
+
SELECT thread_id, sequence, record_id, batch_id, record_json, 0 AS identity_order
|
|
165
|
+
FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND sequence = 1
|
|
166
|
+
UNION ALL
|
|
167
|
+
SELECT thread_id, sequence, record_id, batch_id, record_json, 1 AS identity_order
|
|
168
|
+
FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND record_id = ${origin} AND sequence <> 1
|
|
169
|
+
UNION ALL
|
|
170
|
+
SELECT thread_id, sequence, record_id, batch_id, record_json, 2 AS identity_order
|
|
171
|
+
FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND record_id = ${lineage} AND sequence <> 1
|
|
172
|
+
) ORDER BY identity_order`;
|
|
173
|
+
const records = yield* Schema.decodeUnknownEffect(Schema.Array(Row))(rows).pipe(Effect.flatMap(Effect.forEach((row) => envelope(row).pipe(Effect.filterOrFail((value) => value.record.recordId === row.record_id, () => failure("identity record locator"))))));
|
|
174
|
+
return yield* ThreadIdentity.makeEffect({
|
|
175
|
+
threadId: request.threadId,
|
|
176
|
+
tailSequence: tail.tail_sequence,
|
|
177
|
+
tailDigest: tail.tail_digest,
|
|
178
|
+
producerEpoch: tail.producer_epoch,
|
|
179
|
+
records
|
|
180
|
+
});
|
|
181
|
+
}));
|
|
182
|
+
}, Effect.mapError((cause) => cause._tag === "ThreadNotMaterialized" || cause._tag === "ThreadStoreError" ? cause : failure("readIdentity", cause)));
|
|
183
|
+
return {
|
|
184
|
+
read,
|
|
149
185
|
countPeerMessages: Effect.fnUntraced(function* (request) {
|
|
150
186
|
yield* Schema.decodeEffect(ThreadPeerCountRequest)(request);
|
|
151
187
|
yield* requireThread(request.threadId);
|
|
152
188
|
return (yield* sql`SELECT 1 FROM effect_agent_canonical_records WHERE thread_id = ${request.threadId} AND json_extract(record_json, '$.payload._tag') = 'PeerMessagePrepared' LIMIT ${request.limit}`).length;
|
|
153
|
-
}, Effect.mapError((cause) => cause._tag === "ThreadNotMaterialized" || cause._tag === "ThreadStoreError" ? cause : failure("countPeerMessages", cause)))
|
|
189
|
+
}, Effect.mapError((cause) => cause._tag === "ThreadNotMaterialized" || cause._tag === "ThreadStoreError" ? cause : failure("countPeerMessages", cause))),
|
|
190
|
+
readIdentity
|
|
154
191
|
};
|
|
155
192
|
});
|
|
156
193
|
//#endregion
|