effect-agent 0.1.0-beta.124 → 0.1.0-beta.126

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.
Files changed (80) hide show
  1. package/dist/{Records-D88mgvyS.d.mts → Admin-C34cVKlT.d.mts} +2908 -3941
  2. package/dist/{AgentRuntime-BUxDdLpw.d.mts → AgentRuntime-DEDvMkAR.d.mts} +2 -2
  3. package/dist/Digest-U69rDHuO.d.mts +22 -0
  4. package/dist/{DurableAgentRuntime-B-9w7jDt.mjs → DurableAgentRuntime-BydyN_n-.mjs} +89 -15
  5. package/dist/DurableAgentRuntime-BydyN_n-.mjs.map +1 -0
  6. package/dist/{EventSource-CnlZ3Kma.d.mts → EventSource-Bac0SxKL.d.mts} +3 -3
  7. package/dist/{PreparedInputAdmission-BQLGldl-.d.mts → PreparedInputAdmission-DcQGQ0Yp.d.mts} +4 -4
  8. package/dist/Records-B5GFWCpn.d.mts +1104 -0
  9. package/dist/{Schedule-BIOHA6RR.d.mts → Schedule-CtYREFnz.d.mts} +2 -2
  10. package/dist/{Subagent-DCrB7an7.mjs → Subagent-DJeZDrbD.mjs} +6 -2
  11. package/dist/Subagent-DJeZDrbD.mjs.map +1 -0
  12. package/dist/{Subagent-CNik9RiA.d.mts → Subagent-DRFyQxdb.d.mts} +21 -4
  13. package/dist/{SubagentHost-4WB8Hj0C.d.mts → SubagentHost-DQjHFGqH.d.mts} +10 -2
  14. package/dist/{Subscription-CRteOKRf.d.mts → Subscription-Bk2Smmqc.d.mts} +34 -3
  15. package/dist/{SubscriptionInput-oNcwTPti.d.mts → SubscriptionInput-ekbJz3pF.d.mts} +3 -3
  16. package/dist/capabilities/Subagent.d.mts +1 -1
  17. package/dist/capabilities/Subagent.mjs +1 -1
  18. package/dist/durable/ActivityStore.d.mts +1 -1
  19. package/dist/durable/Admin.d.mts +1 -1
  20. package/dist/durable/AgentRegistration.d.mts +1 -1
  21. package/dist/durable/Certification.d.mts +1 -1
  22. package/dist/durable/CommittedActivity.d.mts +3 -1
  23. package/dist/durable/Digest.d.mts +1 -1
  24. package/dist/durable/DurableAgentRuntime.d.mts +1 -1
  25. package/dist/durable/DurableAgentRuntime.mjs +1 -1
  26. package/dist/durable/EventSource.d.mts +1 -1
  27. package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
  28. package/dist/durable/MessageDelivery.d.mts +82 -41
  29. package/dist/durable/MessageDeliveryStoreConformance.d.mts +23 -1
  30. package/dist/durable/PersistentHistory.d.mts +1 -1
  31. package/dist/durable/PreparedInputAdmission.d.mts +1 -1
  32. package/dist/durable/Records.d.mts +2 -2
  33. package/dist/durable/Records.mjs +12 -2
  34. package/dist/durable/Records.mjs.map +1 -1
  35. package/dist/durable/Recovery.d.mts +1 -1
  36. package/dist/durable/RunJournal.d.mts +1 -1
  37. package/dist/durable/Schedule.d.mts +1 -1
  38. package/dist/durable/ScheduleStoreConformance.d.mts +1 -1
  39. package/dist/durable/ScheduleTransition.d.mts +1 -1
  40. package/dist/durable/Scheduling.d.mts +3 -2
  41. package/dist/durable/SqlStorageV2Upgrade.d.mts +2 -2
  42. package/dist/durable/SqlSubscriptionStore.d.mts +2 -2
  43. package/dist/durable/SqlThreadNativeReads.d.mts +2 -1
  44. package/dist/durable/SqlThreadNativeReads.mjs +1 -1
  45. package/dist/durable/SqlThreadNativeReads.mjs.map +1 -1
  46. package/dist/durable/SubmissionLedger.d.mts +1 -1
  47. package/dist/durable/SubmissionLedgerConformance.d.mts +2 -1
  48. package/dist/durable/SubmissionStatus.d.mts +1 -1
  49. package/dist/durable/Subscription.d.mts +1 -1
  50. package/dist/durable/SubscriptionInput.d.mts +1 -1
  51. package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
  52. package/dist/durable/SubscriptionTools.d.mts +4 -3
  53. package/dist/durable/SubscriptionTransition.d.mts +1 -1
  54. package/dist/durable/Subscriptions.d.mts +6 -5
  55. package/dist/durable/ThreadContextHistory.d.mts +1 -1
  56. package/dist/durable/ThreadContextHistoryProjection.d.mts +1 -1
  57. package/dist/durable/ThreadInvariants.d.mts +2 -1
  58. package/dist/durable/ThreadProjection.d.mts +1 -1
  59. package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
  60. package/dist/durable/ThreadStore.d.mts +1 -1
  61. package/dist/durable/ThreadStoreConformance.d.mts +1 -1
  62. package/dist/durable/ThreadStoreConformance.mjs +10 -1
  63. package/dist/durable/ThreadStoreConformance.mjs.map +1 -1
  64. package/dist/durable/WorkerHost.d.mts +9 -2
  65. package/dist/durable/WorkerHost.mjs.map +1 -1
  66. package/dist/engine/AgentRuntime.d.mts +1 -1
  67. package/dist/engine/SubagentHost.d.mts +1 -1
  68. package/dist/engine/SubagentHost.mjs.map +1 -1
  69. package/dist/index.d.mts +12 -10
  70. package/dist/index.mjs +2 -2
  71. package/package.json +1 -1
  72. package/src/capabilities/internal/subagent-background.ts +37 -3
  73. package/src/durable/Records.ts +13 -1
  74. package/src/durable/SqlThreadNativeReads.ts +1 -1
  75. package/src/durable/ThreadStoreConformance.ts +28 -0
  76. package/src/durable/WorkerHost.ts +14 -2
  77. package/src/durable/internal/worker-host.ts +284 -9
  78. package/src/engine/SubagentHost.ts +9 -0
  79. package/dist/DurableAgentRuntime-B-9w7jDt.mjs.map +0 -1
  80. package/dist/Subagent-DCrB7an7.mjs.map +0 -1
@@ -1,6 +1,7 @@
1
1
  import { c as SettlementId, r as DelegationId, s as RunId, u as ThreadId } from "./Identifiers-CN2s30fF.mjs";
2
2
  import { i as SubagentBudgetReservation } from "./SubagentContract-DdT7Cqe6.mjs";
3
3
  import { a as Receipt, n as JoinedToHost, t as IdempotencyKey } from "./Receipt-BAHyigAF.mjs";
4
+ import { r as Update } from "./AgentUpdates-DMJ-_xow.mjs";
4
5
  import { a as FailureDiagnostic_d_exports, i as Failure } from "./FailureDiagnostic-CaAkzGHL.mjs";
5
6
  import { t as AgentPolicy } from "./AgentPolicy-BqDoSXO6.mjs";
6
7
  import { r as AnyDefinition, t as Agent_d_exports } from "./Agent-D9cXqfF3.mjs";
@@ -13,6 +14,8 @@ declare namespace SubagentHost_d_exports {
13
14
  /** Prepared values cross this port only to be Schema-decoded before durable storage. */
14
15
  interface StartWorkerRequest {
15
16
  readonly delegationId: DelegationId;
17
+ /** Start a distinct assignment using verified completed predecessor authority. */
18
+ readonly continuationOf?: WorkerRef;
16
19
  readonly target: AnyDefinition;
17
20
  readonly idempotencyKey: IdempotencyKey;
18
21
  readonly encodedInput: unknown;
@@ -32,7 +35,7 @@ interface StartWorkerRequest {
32
35
  * Preparation must be free of external effects: concurrent first admissions can prepare before
33
36
  * the retained delivery chooses its first writer.
34
37
  */
35
- interface DeferredStartWorkerRequest<E = never, R = never> extends Pick<StartWorkerRequest, "delegationId" | "target" | "idempotencyKey" | "encodedParameters" | "encodedGrant" | "budgetScope"> {
38
+ interface DeferredStartWorkerRequest<E = never, R = never> extends Pick<StartWorkerRequest, "delegationId" | "continuationOf" | "target" | "idempotencyKey" | "encodedParameters" | "encodedGrant" | "budgetScope"> {
36
39
  readonly prepare: Effect.Effect<Pick<StartWorkerRequest, "encodedInput" | "policy" | "budget" | "toolCallAllowance">, E, R>;
37
40
  }
38
41
  interface FollowUpWorkerRequest {
@@ -103,6 +106,10 @@ declare class WorkerReportPreparationFailure extends WorkerReportPreparationFail
103
106
  interface WorkerReporting<E = never, R = never> {
104
107
  readonly delegationId: DelegationId;
105
108
  readonly target: AnyDefinition;
109
+ /** Pure first-emission selection. False retains the canonical update without parent delivery. */
110
+ readonly reportUpdate?: (update: Update) => boolean;
111
+ /** False retains a filtered report receipt without waking the parent. */
112
+ readonly reportCompletion?: (report: WorkerRunReport) => boolean;
106
113
  readonly prepare: (report: WorkerRunReport) => Effect.Effect<{
107
114
  readonly message: WorkerCompletion;
108
115
  }, E | WorkerReportPreparationFailure, R>;
@@ -113,6 +120,7 @@ declare const SubagentHost_base: Context.ServiceClass<SubagentHost, "@effect-age
113
120
  readonly context: Effect.Effect<WorkerContext, WorkerError>;
114
121
  /** Resolve prepared input through host authority; None retains legacy target inheritance. */
115
122
  readonly resolveTargetPolicy: (request: {
123
+ readonly continuationOf?: WorkerRef;
116
124
  readonly target: AnyDefinition;
117
125
  readonly encodedInput: unknown;
118
126
  }) => Effect.Effect<Option.Option<AgentPolicy>, WorkerError>;
@@ -161,4 +169,4 @@ declare class SubagentHost extends SubagentHost_base {
161
169
  }
162
170
  //#endregion
163
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 };
164
- //# sourceMappingURL=SubagentHost-4WB8Hj0C.d.mts.map
172
+ //# sourceMappingURL=SubagentHost-DQjHFGqH.d.mts.map
@@ -2,8 +2,9 @@ import { d as SubagentReservationAmounts, l as SubagentGrant, o as SubagentDeleg
2
2
  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
- import { _ as Digest, h as DefinitionDigests } from "./Records-D88mgvyS.mjs";
6
- import { t as ScheduleAuthorizationDecision } from "./Schedule-BIOHA6RR.mjs";
5
+ import { _ as Digest, h as DefinitionDigests } from "./Records-B5GFWCpn.mjs";
6
+ import "./Admin-C34cVKlT.mjs";
7
+ import { t as ScheduleAuthorizationDecision } from "./Schedule-CtYREFnz.mjs";
7
8
  import { Context, Effect, Schema } from "effect";
8
9
  declare namespace Subscription_d_exports {
9
10
  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 };
@@ -225,6 +226,16 @@ declare const PreparedInput: Schema.Struct<{
225
226
  readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
226
227
  readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
227
228
  }>]>;
229
+ readonly continuationOf: Schema.optionalKey<Schema.Struct<{
230
+ readonly worker: Schema.Struct<{
231
+ readonly schemaVersion: Schema.Literal<1>;
232
+ readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
233
+ readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
234
+ readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
235
+ }>;
236
+ readonly receipt: typeof Receipt;
237
+ readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
238
+ }>>;
228
239
  readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
229
240
  readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
230
241
  readonly targetDigests: typeof DefinitionDigests;
@@ -433,6 +444,16 @@ declare const SubscriptionDelivery: Schema.Struct<{
433
444
  readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
434
445
  readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
435
446
  }>]>;
447
+ readonly continuationOf: Schema.optionalKey<Schema.Struct<{
448
+ readonly worker: Schema.Struct<{
449
+ readonly schemaVersion: Schema.Literal<1>;
450
+ readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
451
+ readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
452
+ readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
453
+ }>;
454
+ readonly receipt: typeof Receipt;
455
+ readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
456
+ }>>;
436
457
  readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
437
458
  readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
438
459
  readonly targetDigests: typeof DefinitionDigests;
@@ -757,6 +778,16 @@ declare const DeliveryChange: Schema.Union<readonly [Schema.Struct<{
757
778
  readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
758
779
  readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
759
780
  }>]>;
781
+ readonly continuationOf: Schema.optionalKey<Schema.Struct<{
782
+ readonly worker: Schema.Struct<{
783
+ readonly schemaVersion: Schema.Literal<1>;
784
+ readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
785
+ readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
786
+ readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
787
+ }>;
788
+ readonly receipt: typeof Receipt;
789
+ readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
790
+ }>>;
760
791
  readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
761
792
  readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
762
793
  readonly targetDigests: typeof DefinitionDigests;
@@ -945,4 +976,4 @@ declare const subscriptionKeyString: (key: SubscriptionKey) => string;
945
976
  declare const subscriptionDeliveryKeyString: (key: SubscriptionDeliveryKey) => string;
946
977
  //#endregion
947
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 };
948
- //# sourceMappingURL=Subscription-CRteOKRf.d.mts.map
979
+ //# sourceMappingURL=Subscription-Bk2Smmqc.d.mts.map
@@ -1,6 +1,6 @@
1
1
  import { t as AgentId } from "./Identifiers-CN2s30fF.mjs";
2
- import { O as PersistedJson, h as DefinitionDigests } from "./Records-D88mgvyS.mjs";
3
- import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-CRteOKRf.mjs";
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-Bk2Smmqc.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-oNcwTPti.d.mts.map
41
+ //# sourceMappingURL=SubscriptionInput-ekbJz3pF.d.mts.map
@@ -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-CNik9RiA.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-DRFyQxdb.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-DCrB7an7.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-DJeZDrbD.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 };
@@ -1,4 +1,4 @@
1
- import { _ as Digest } from "../Records-D88mgvyS.mjs";
1
+ import { _ as Digest } from "../Records-B5GFWCpn.mjs";
2
2
  import { Context, Effect, Layer, Schema } from "effect";
3
3
  declare namespace ActivityStore_d_exports {
4
4
  export { ActivityBusy, ActivityClaim, ActivityClaimRequest, ActivityMutationFailpoint, ActivityMutationFailure, ActivityMutationPoint, ActivityOwnershipLost, ActivityProcessorKey, ActivityProcessorStore, ActivityProgress, ActivityStoreError, ActivityStoreFailure, ActivityWorkConflict, PreparedActivity };
@@ -1,2 +1,2 @@
1
- import { $r as ObligationSeverity, Gr as ExplainedUnknownCall, Jr as IntegrityCheckStatus, Kr as IntegrityCheck, Qr as ObligationReport, Ur as ExplainedEvidence, Wr as ExplainedSubmission, Xr as ObligationBlockedOn, Yr as IntegrityReport, Zr as ObligationEntry, ai as RetryRefusalReason, ci as predictRecoveryDisposition, ei as ObligationThresholds, ii as RetryCommand, li as recoveryDecisionMeaning, ni as RecoveryDisposition, oi as RetryRefused, qr as IntegrityCheckName, ri as RecoveryExplanation, si as obligationSeverityOf, ti as RECOVERY_DECISION_MEANINGS, ui as renderRecoveryExplanation } from "../Records-D88mgvyS.mjs";
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-C34cVKlT.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 { Si as definitionDigestsEqual, _i as ExecutableAgentBinding, bi as compileBindingContracts, fi as AgentAttemptContext, gi as DurableWorkerBinding, hi as DurableBindingFailure, mi as BindingUnavailable, pi as AgentRegistration, vi as ReplayVersions, xi as compileRegistrations, yi as ResolvedBinding } from "../Records-D88mgvyS.mjs";
1
+ import { Ca as DurableWorkerBinding, Da as compileBindingContracts, Ea as ResolvedBinding, Oa as compileRegistrations, Sa as DurableBindingFailure, Ta as ReplayVersions, ba as AgentRegistration, ka as definitionDigestsEqual, wa as ExecutableAgentBinding, xa as BindingUnavailable, ya as AgentAttemptContext } from "../Admin-C34cVKlT.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 { Co as SubmissionLedger, Sn as ThreadStore } from "../Records-D88mgvyS.mjs";
1
+ import { Qr as ThreadStore, _n as SubmissionLedger } from "../Admin-C34cVKlT.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,5 +1,7 @@
1
- import { Ci as DigestError, O as PersistedJson, Sn as ThreadStore, dn as ThreadNotMaterialized, l as CanonicalRecordEnvelope, wn as ThreadStoreError } from "../Records-D88mgvyS.mjs";
1
+ import { O as PersistedJson, l as CanonicalRecordEnvelope } from "../Records-B5GFWCpn.mjs";
2
2
  import { ActivityProcessorKey, ActivityProcessorStore, ActivityStoreFailure, PreparedActivity } from "./ActivityStore.mjs";
3
+ import { t as DigestError } from "../Digest-U69rDHuO.mjs";
4
+ import { Qr as ThreadStore, Vr as ThreadNotMaterialized, ei as ThreadStoreError } from "../Admin-C34cVKlT.mjs";
3
5
  import { Crypto, Effect, Schema, Scope } from "effect";
4
6
  declare namespace CommittedActivity_d_exports {
5
7
  export { ActivityPassLimits, ActivityPassResult, ActivityProcessingError, CommittedActivityProcessor, activityWorkId, processCommittedActivity };
@@ -1,2 +1,2 @@
1
- import { Ci as DigestError, Di as digestDefinition, Ei as digestCanonicalBatch, Oi as digestDefinitions, Ti as EMPTY_TAIL_DIGEST, ki as digestJson } from "../Records-D88mgvyS.mjs";
1
+ import { a as digestDefinition, i as digestCanonicalBatch, o as digestDefinitions, r as EMPTY_TAIL_DIGEST, s as digestJson, t as DigestError } from "../Digest-U69rDHuO.mjs";
2
2
  export { DigestError, EMPTY_TAIL_DIGEST, digestCanonicalBatch, digestDefinition, digestDefinitions, digestJson };
@@ -1,3 +1,3 @@
1
1
  import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
2
- import { At as DurableRetryFailure, Bt as RecoveryFailure, Ct as DurableApprovalSuspension, Dt as DurableObserveOptions, Et as DurableObligationFailure, Ft as DurableSubmitOptions, Gt as isolateRecovery, Ht as RecoverySweepOptions, It as DurableVerifyFailure, Jt as threadCreatedBatchId, Kt as recoveryRepairBatchId, Lt as DurableWorkerFailure, Mt as DurableRuntimeConfigOptions, Nt as DurableSubmitAgent, Ot as DurableProgressFailure, Pt as DurableSubmitFailure, Rt as DurableWorkerRequirements, St as DurableApprovalResolver, Tt as DurableExplainFailure, Ut as RecoverySweepResult, Vt as RecoveryReport, Wt as childReservationIdFor, Yt as threadCreatedRecordId, _t as ApprovalSuspensionError, jt as DurableRuntimeConfig, kt as DurableResolveFailure, qt as recoveryRepairRecordId, vt as DurableAbortFailure, wt as DurableAwaitFailure, xt as DurableApprovalFailure, yt as DurableAgentRuntime, zt as RecoveryBlocked } from "../Records-D88mgvyS.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-C34cVKlT.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-B-9w7jDt.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-BydyN_n-.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-CnlZ3Kma.mjs";
1
+ import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-Bac0SxKL.mjs";
2
2
  export { EventSource, EventSources, NormalizedEvent, makeEventSource };
@@ -1,7 +1,7 @@
1
1
  import { r as Principal } from "../Receipt-BAHyigAF.mjs";
2
- import "../Records-D88mgvyS.mjs";
3
- import { E as SubscriptionSourceError } from "../Subscription-CRteOKRf.mjs";
4
- import { t as EventSource } from "../EventSource-CnlZ3Kma.mjs";
2
+ import "../Admin-C34cVKlT.mjs";
3
+ import { E as SubscriptionSourceError } from "../Subscription-Bk2Smmqc.mjs";
4
+ import { t as EventSource } from "../EventSource-Bac0SxKL.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";
@@ -4,9 +4,10 @@ import { a as Receipt, t as IdempotencyKey } from "../Receipt-BAHyigAF.mjs";
4
4
  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
- import { _o as Settlement, h as DefinitionDigests } from "../Records-D88mgvyS.mjs";
8
- import { a as PreparedInput } from "../Subscription-CRteOKRf.mjs";
9
- import { t as PreparedInputAdmission } from "../PreparedInputAdmission-BQLGldl-.mjs";
7
+ import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
8
+ import { dn as Settlement } from "../Admin-C34cVKlT.mjs";
9
+ import { a as PreparedInput } from "../Subscription-Bk2Smmqc.mjs";
10
+ import { t as PreparedInputAdmission } from "../PreparedInputAdmission-DcQGQ0Yp.mjs";
10
11
  import { Context, Crypto, Effect, Layer, Result, Schema } from "effect";
11
12
  declare namespace MessageDelivery_d_exports {
12
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 };
@@ -80,6 +81,16 @@ export declare const MessageDeliveryRecord: Schema.Struct<{
80
81
  readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
81
82
  readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
82
83
  }>]>;
84
+ readonly continuationOf: Schema.optionalKey<Schema.Struct<{
85
+ readonly worker: Schema.Struct<{
86
+ readonly schemaVersion: Schema.Literal<1>;
87
+ readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
88
+ readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
89
+ readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
90
+ }>;
91
+ readonly receipt: typeof Receipt;
92
+ readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
93
+ }>>;
83
94
  readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
84
95
  readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
85
96
  readonly targetDigests: typeof DefinitionDigests;
@@ -336,6 +347,16 @@ export declare const MessageDeliveryPage: Schema.Struct<{
336
347
  readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
337
348
  readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
338
349
  }>]>;
350
+ readonly continuationOf: Schema.optionalKey<Schema.Struct<{
351
+ readonly worker: Schema.Struct<{
352
+ readonly schemaVersion: Schema.Literal<1>;
353
+ readonly delegationId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/DelegationId">;
354
+ readonly targetAgentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
355
+ readonly threadId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/ThreadId">;
356
+ }>;
357
+ readonly receipt: typeof Receipt;
358
+ readonly settlementId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SettlementId">;
359
+ }>>;
339
360
  readonly budgetScope: Schema.optionalKey<Schema.Literals<readonly ["source-subtree", "worker-run"]>>;
340
361
  readonly lifecycle: Schema.optionalKey<Schema.Literal<"assignment">>;
341
362
  readonly targetDigests: typeof DefinitionDigests;
@@ -548,6 +569,16 @@ export declare const readPending: (request: Pick<{
548
569
  readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
549
570
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
550
571
  };
572
+ readonly continuationOf?: {
573
+ readonly worker: {
574
+ readonly schemaVersion: 1;
575
+ readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
576
+ readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
577
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
578
+ };
579
+ readonly receipt: Receipt;
580
+ readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
581
+ } | undefined;
551
582
  readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
552
583
  readonly lifecycle?: "assignment" | undefined;
553
584
  readonly targetDigests: DefinitionDigests;
@@ -585,25 +616,6 @@ export declare const readPending: (request: Pick<{
585
616
  readonly reportKind?: "update" | undefined;
586
617
  } | undefined;
587
618
  readonly messageAdmission?: {
588
- readonly schemaVersion: 1;
589
- readonly message: {
590
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
591
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
592
- };
593
- readonly peerName: string;
594
- readonly sender: {
595
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
596
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
597
- };
598
- readonly returnAddress: {
599
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
600
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
601
- };
602
- readonly inReplyTo?: {
603
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
604
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
605
- } | undefined;
606
- } | {
607
619
  readonly _tag: "WorkerCompletion";
608
620
  readonly budgetExhausted: boolean;
609
621
  readonly schemaVersion: 1;
@@ -644,6 +656,25 @@ export declare const readPending: (request: Pick<{
644
656
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
645
657
  };
646
658
  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;
647
678
  } | undefined;
648
679
  };
649
680
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -739,6 +770,16 @@ export declare const prepareMessageDelivery: (options: {
739
770
  readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
740
771
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
741
772
  };
773
+ readonly continuationOf?: {
774
+ readonly worker: {
775
+ readonly schemaVersion: 1;
776
+ readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
777
+ readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
778
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
779
+ };
780
+ readonly receipt: Receipt;
781
+ readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
782
+ } | undefined;
742
783
  readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
743
784
  readonly lifecycle?: "assignment" | undefined;
744
785
  readonly targetDigests: DefinitionDigests;
@@ -776,25 +817,6 @@ export declare const prepareMessageDelivery: (options: {
776
817
  readonly reportKind?: "update" | undefined;
777
818
  } | undefined;
778
819
  readonly messageAdmission?: {
779
- readonly schemaVersion: 1;
780
- readonly message: {
781
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
782
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
783
- };
784
- readonly peerName: string;
785
- readonly sender: {
786
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
787
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
788
- };
789
- readonly returnAddress: {
790
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
791
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
792
- };
793
- readonly inReplyTo?: {
794
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
795
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
796
- } | undefined;
797
- } | {
798
820
  readonly _tag: "WorkerCompletion";
799
821
  readonly budgetExhausted: boolean;
800
822
  readonly schemaVersion: 1;
@@ -835,6 +857,25 @@ export declare const prepareMessageDelivery: (options: {
835
857
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
836
858
  };
837
859
  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;
838
879
  } | undefined;
839
880
  };
840
881
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -3,7 +3,9 @@ import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
3
3
  import { r as Update } from "../AgentUpdates-DMJ-_xow.mjs";
4
4
  import { r as Diagnostic } from "../FailureDiagnostic-CaAkzGHL.mjs";
5
5
  import { t as AgentPolicy } from "../AgentPolicy-BqDoSXO6.mjs";
6
- import { Ci as DigestError, _o as Settlement, h as DefinitionDigests } from "../Records-D88mgvyS.mjs";
6
+ import { h as DefinitionDigests } from "../Records-B5GFWCpn.mjs";
7
+ import { t as DigestError } from "../Digest-U69rDHuO.mjs";
8
+ import { dn as Settlement } from "../Admin-C34cVKlT.mjs";
7
9
  import { MessageDeliveryError, MessageDeliveryFailure, MessageDeliveryStore } from "./MessageDelivery.mjs";
8
10
  import { Effect, Schema } from "effect";
9
11
  //#region src/durable/MessageDeliveryStoreConformance.d.ts
@@ -56,6 +58,16 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
56
58
  readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
57
59
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
58
60
  };
61
+ readonly continuationOf?: {
62
+ readonly worker: {
63
+ readonly schemaVersion: 1;
64
+ readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
65
+ readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
66
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
67
+ };
68
+ readonly receipt: Receipt;
69
+ readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
70
+ } | undefined;
59
71
  readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
60
72
  readonly lifecycle?: "assignment" | undefined;
61
73
  readonly targetDigests: DefinitionDigests;
@@ -229,6 +241,16 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
229
241
  readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
230
242
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
231
243
  };
244
+ readonly continuationOf?: {
245
+ readonly worker: {
246
+ readonly schemaVersion: 1;
247
+ readonly delegationId: string & import("effect/Brand").Brand<"@effect-agent/core/DelegationId">;
248
+ readonly targetAgentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
249
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
250
+ };
251
+ readonly receipt: Receipt;
252
+ readonly settlementId: string & import("effect/Brand").Brand<"@effect-agent/core/SettlementId">;
253
+ } | undefined;
232
254
  readonly budgetScope?: "source-subtree" | "worker-run" | undefined;
233
255
  readonly lifecycle?: "assignment" | undefined;
234
256
  readonly targetDigests: DefinitionDigests;
@@ -1,5 +1,5 @@
1
1
  import { t as ThreadHistory } from "../ThreadHistory-tS1KwxHR.mjs";
2
- import { Sn as ThreadStore } from "../Records-D88mgvyS.mjs";
2
+ import { Qr as ThreadStore } from "../Admin-C34cVKlT.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-BQLGldl-.mjs";
1
+ import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-DcQGQ0Yp.mjs";
2
2
  export { PreparedInputAdmission, admitPreparedInput };
@@ -1,2 +1,2 @@
1
- import { $ as ToolCallPrepared, A as ProducerId, B as RunStartedRecord, C as ModelCompleted, D as PeerMessagePrepared, E as ObservationOffset, F as ReplayContract, G as SubagentRequested, H as SettlementOutcome, I as RunCompleted, J as SubmissionSettledRecord, K as SubagentStarted, L as RunDurationExhausted, M as RecordId, O as PersistedJson, P as RepairAnnotated, Q as ToolApprovalRequested, R as RunFailed, S as MAX_PERSISTED_JSON_NODES, T as ModelResponseRecorded, U as SubagentJoined, V as SettlementFailureDiagnostic, W as SubagentLineageRecorded, X as ThreadCreated, Y as SubtreeBudgetReserved, Z as ToolApprovalDecided, _ as Digest, a as BatchId, at as ToolStepSettled, b as MAX_PERSISTED_JSON_COLLECTION_LENGTH, c as CanonicalRecord, ct as WorkerAdmission, d as CanonicalSequence, dt as WorkerOrigin, et as ToolCallResolution, f as CompactionCreated, ft as WorkerOriginRecorded, g as DeploymentId, gt as WorkerStopRequested, h as DefinitionDigests, ht as WorkerReportingIntent, i as ApprovalDecision, it as ToolOperation, j as RecordEnvelope, k as ProducerEpoch, l as CanonicalRecordEnvelope, lt as WorkerInputCompleted, m as DefinitionDigestInput, mt as WorkerReportRefused, n as AbortedSubmissionSettled, nt as ToolCallSettled, o as CURRENT_CANONICAL_SCHEMA_VERSION, ot as ToolUnavailable, p as CompletedSubmissionSettled, pt as WorkerReportPrepared, q as SubmissionSettled, r as AgentUpdateEmitted, rt as ToolCallUnknown, s as CanonicalBatch, st as UserInputRecorded, t as AbortRequested, tt as ToolCallResolved, u as CanonicalRecordPayload, ut as WorkerInputRequested, v as FailedSubmissionSettled, w as ModelResponseInterrupted, x as MAX_PERSISTED_JSON_DEPTH, y as MAX_PERSISTED_JSON_BYTES, z as RunPolicyUsageReserved } from "../Records-D88mgvyS.mjs";
2
- export { AbortRequested, AbortedSubmissionSettled, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, CompletedSubmissionSettled, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, FailedSubmissionSettled, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PeerMessagePrepared, PersistedJson, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, RepairAnnotated, ReplayContract, RunCompleted, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallPrepared, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkerAdmission, WorkerInputCompleted, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested };
1
+ import { $ as ToolCallPrepared, A as ProducerId, B as RunStartedRecord, C as ModelCompleted, D as PeerMessagePrepared, E as ObservationOffset, F as ReplayContract, G as SubagentRequested, H as SettlementOutcome, I as RunCompleted, J as SubmissionSettledRecord, K as SubagentStarted, L as RunDurationExhausted, M as RecordId, O as PersistedJson, P as RepairAnnotated, Q as ToolApprovalRequested, R as RunFailed, S as MAX_PERSISTED_JSON_NODES, T as ModelResponseRecorded, U as SubagentJoined, V as SettlementFailureDiagnostic, W as SubagentLineageRecorded, X as ThreadCreated, Y as SubtreeBudgetReserved, Z as ToolApprovalDecided, _ as Digest, _t as WorkerStopRequested, a as BatchId, at as ToolStepSettled, b as MAX_PERSISTED_JSON_COLLECTION_LENGTH, c as CanonicalRecord, ct as WorkerAdmission, d as CanonicalSequence, dt as WorkerInputRequested, et as ToolCallResolution, f as CompactionCreated, ft as WorkerOrigin, g as DeploymentId, gt as WorkerReportingIntent, h as DefinitionDigests, ht as WorkerReportRefused, i as ApprovalDecision, it as ToolOperation, j as RecordEnvelope, k as ProducerEpoch, l as CanonicalRecordEnvelope, lt as WorkerContinuation, m as DefinitionDigestInput, mt as WorkerReportPrepared, n as AbortedSubmissionSettled, nt as ToolCallSettled, o as CURRENT_CANONICAL_SCHEMA_VERSION, ot as ToolUnavailable, p as CompletedSubmissionSettled, pt as WorkerOriginRecorded, q as SubmissionSettled, r as AgentUpdateEmitted, rt as ToolCallUnknown, s as CanonicalBatch, st as UserInputRecorded, t as AbortRequested, tt as ToolCallResolved, u as CanonicalRecordPayload, ut as WorkerInputCompleted, v as FailedSubmissionSettled, w as ModelResponseInterrupted, x as MAX_PERSISTED_JSON_DEPTH, y as MAX_PERSISTED_JSON_BYTES, z as RunPolicyUsageReserved } from "../Records-B5GFWCpn.mjs";
2
+ export { AbortRequested, AbortedSubmissionSettled, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, CompletedSubmissionSettled, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, FailedSubmissionSettled, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PeerMessagePrepared, PersistedJson, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, RepairAnnotated, ReplayContract, RunCompleted, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallPrepared, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkerAdmission, WorkerContinuation, WorkerInputCompleted, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested };
@@ -3,7 +3,7 @@ import { AgentId, AttemptId, DelegationId, ReceiptId, RunId, SettlementId, Submi
3
3
  import { n as utf8ByteLength } from "../utf8-DchGZRBd.mjs";
4
4
  import { ToolParameterRejection } from "../core/ToolResult.mjs";
5
5
  import { AgentPolicy } from "../core/AgentPolicy.mjs";
6
- import { IdempotencyKey, Principal } from "../core/Receipt.mjs";
6
+ import { IdempotencyKey, Principal, Receipt } from "../core/Receipt.mjs";
7
7
  import { Update } from "../core/AgentUpdates.mjs";
8
8
  import { i as Failure } from "../FailureDiagnostic-BElLOoED.mjs";
9
9
  import { PolicyLimit } from "../core/AgentError.mjs";
@@ -77,6 +77,7 @@ var Records_exports = /* @__PURE__ */ __exportAll({
77
77
  ToolUnavailable: () => ToolUnavailable,
78
78
  UserInputRecorded: () => UserInputRecorded,
79
79
  WorkerAdmission: () => WorkerAdmission,
80
+ WorkerContinuation: () => WorkerContinuation,
80
81
  WorkerInputCompleted: () => WorkerInputCompleted,
81
82
  WorkerInputRequested: () => WorkerInputRequested,
82
83
  WorkerOrigin: () => WorkerOrigin,
@@ -650,10 +651,18 @@ const WorkerReportingIntent = Schema.Struct({
650
651
  workerAdmission: Schema.optionalKey(PersistedJson)
651
652
  }))
652
653
  }).check(Schema.makeFilter((value) => value.mode === "standard" === (value.returnAddress !== void 0)));
654
+ /** Exact successful predecessor evidence; a locator alone grants no authority. */
655
+ const WorkerContinuation = Schema.Struct({
656
+ worker: WorkerRef,
657
+ receipt: Receipt,
658
+ settlementId: SettlementId
659
+ }).check(Schema.makeFilter((value) => value.worker.threadId === value.receipt.threadId));
653
660
  /** Immutable worker Thread origin. Each input has its own digest and parameters separately. */
654
661
  const WorkerOrigin = Schema.Struct({
655
662
  worker: WorkerRef,
656
663
  source: WorkerSource,
664
+ /** A new assignment may continue this completed, immutable predecessor. */
665
+ continuationOf: Schema.optionalKey(WorkerContinuation),
657
666
  /** Omitted retains source-subtree funding; worker-run renews only for a new native Run. */
658
667
  budgetScope: Schema.optionalKey(WorkerBudgetScope),
659
668
  /** Frozen at worker creation; older origins remain reusable. */
@@ -733,6 +742,7 @@ var WorkerReportRefused = class extends Schema.TaggedClass()("WorkerReportRefuse
733
742
  runId: RunId,
734
743
  messageId: IdempotencyKey,
735
744
  reason: Schema.Literals([
745
+ "filtered",
736
746
  "declaration-unavailable",
737
747
  "destination",
738
748
  "projection",
@@ -843,6 +853,6 @@ var CanonicalRecordEnvelope = class extends Schema.Class("@effect-agent/thread/C
843
853
  }) {};
844
854
  const CURRENT_CANONICAL_SCHEMA_VERSION = 1;
845
855
  //#endregion
846
- export { AbortRequested, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PeerMessagePrepared, PersistedJson, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, RepairAnnotated, ReplayContract, RunCompleted, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallPrepared, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkerAdmission, WorkerInputCompleted, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested, Records_exports as t };
856
+ export { AbortRequested, AgentUpdateEmitted, ApprovalDecision, BatchId, CURRENT_CANONICAL_SCHEMA_VERSION, CanonicalBatch, CanonicalRecord, CanonicalRecordEnvelope, CanonicalRecordPayload, CanonicalSequence, CompactionCreated, DefinitionDigestInput, DefinitionDigests, DeploymentId, Digest, MAX_PERSISTED_JSON_BYTES, MAX_PERSISTED_JSON_COLLECTION_LENGTH, MAX_PERSISTED_JSON_DEPTH, MAX_PERSISTED_JSON_NODES, ModelCompleted, ModelResponseInterrupted, ModelResponseRecorded, ObservationOffset, PeerMessagePrepared, PersistedJson, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, RepairAnnotated, ReplayContract, RunCompleted, RunDurationExhausted, RunFailed, RunPolicyUsageReserved, RunStartedRecord, SettlementFailureDiagnostic, SettlementOutcome, SubagentJoined, SubagentLineageRecorded, SubagentRequested, SubagentStarted, SubmissionSettled, SubmissionSettledRecord, SubtreeBudgetReserved, ThreadCreated, ToolApprovalDecided, ToolApprovalRequested, ToolCallPrepared, ToolCallResolution, ToolCallResolved, ToolCallSettled, ToolCallUnknown, ToolOperation, ToolStepSettled, ToolUnavailable, UserInputRecorded, WorkerAdmission, WorkerContinuation, WorkerInputCompleted, WorkerInputRequested, WorkerOrigin, WorkerOriginRecorded, WorkerReportPrepared, WorkerReportRefused, WorkerReportingIntent, WorkerStopRequested, Records_exports as t };
847
857
 
848
858
  //# sourceMappingURL=Records.mjs.map