effect-agent 0.1.0-beta.150 → 0.1.0-beta.151

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 (51) hide show
  1. package/dist/{Admin-B8ISZyYf.d.mts → Admin-CKIdJoP8.d.mts} +6 -5
  2. package/dist/{DurableAgentRuntime-DLa4IwFi.mjs → DurableAgentRuntime-R2LUYnRl.mjs} +67 -81
  3. package/dist/DurableAgentRuntime-R2LUYnRl.mjs.map +1 -0
  4. package/dist/{EventSource-CkN05NT3.d.mts → EventSource-CMbXXmwe.d.mts} +2 -2
  5. package/dist/{PreparedInputAdmission-fctZOTnn.d.mts → PreparedInputAdmission-Bt6rgtVu.d.mts} +3 -3
  6. package/dist/{Subscription-B16A-48F.d.mts → Subscription-BJAzYNw1.d.mts} +2 -2
  7. package/dist/{SubscriptionInput-DIU7CiXE.d.mts → SubscriptionInput-CkBJt0AS.d.mts} +2 -2
  8. package/dist/WorkerAdmission-CJ_oWRuS.mjs +171 -0
  9. package/dist/WorkerAdmission-CJ_oWRuS.mjs.map +1 -0
  10. package/dist/durable/Admin.d.mts +1 -1
  11. package/dist/durable/AgentRegistration.d.mts +1 -1
  12. package/dist/durable/Certification.d.mts +1 -1
  13. package/dist/durable/CommittedActivity.d.mts +1 -1
  14. package/dist/durable/DurableAgentRuntime.d.mts +1 -1
  15. package/dist/durable/DurableAgentRuntime.mjs +2 -1
  16. package/dist/durable/EventSource.d.mts +1 -1
  17. package/dist/durable/GitHubWorkflowSource.d.mts +3 -3
  18. package/dist/durable/LifecyclePublication.d.mts +1 -1
  19. package/dist/durable/MessageDelivery.d.mts +41 -41
  20. package/dist/durable/MessageDeliveryStoreConformance.d.mts +39 -39
  21. package/dist/durable/PersistentHistory.d.mts +1 -1
  22. package/dist/durable/PreparedInputAdmission.d.mts +1 -1
  23. package/dist/durable/Recovery.d.mts +1 -1
  24. package/dist/durable/RunJournal.d.mts +1 -1
  25. package/dist/durable/Scheduling.d.mts +1 -1
  26. package/dist/durable/SubmissionLedger.d.mts +1 -1
  27. package/dist/durable/SubmissionLedgerConformance.d.mts +1 -1
  28. package/dist/durable/SubmissionStatus.d.mts +1 -1
  29. package/dist/durable/Subscription.d.mts +1 -1
  30. package/dist/durable/SubscriptionInput.d.mts +1 -1
  31. package/dist/durable/SubscriptionStoreConformance.d.mts +1 -1
  32. package/dist/durable/SubscriptionTools.d.mts +2 -2
  33. package/dist/durable/SubscriptionTransition.d.mts +1 -1
  34. package/dist/durable/Subscriptions.d.mts +5 -5
  35. package/dist/durable/ThreadContextHistory.d.mts +1 -1
  36. package/dist/durable/ThreadInvariants.d.mts +1 -1
  37. package/dist/durable/ThreadProjectionMaintenance.d.mts +1 -1
  38. package/dist/durable/ThreadStore.d.mts +1 -1
  39. package/dist/durable/ThreadStoreConformance.d.mts +1 -1
  40. package/dist/durable/WorkerAdmission.d.mts +172 -0
  41. package/dist/durable/WorkerAdmission.mjs +2 -0
  42. package/dist/durable/WorkerHost.d.mts +1 -1
  43. package/dist/index.d.mts +7 -6
  44. package/dist/index.mjs +3 -2
  45. package/package.json +1 -1
  46. package/src/durable/DurableAgentRuntime.ts +68 -108
  47. package/src/durable/WorkerAdmission.ts +104 -0
  48. package/src/durable/internal/thread-initialization.ts +195 -0
  49. package/src/durable/internal/worker-host.ts +121 -123
  50. package/src/index.ts +1 -0
  51. package/dist/DurableAgentRuntime-DLa4IwFi.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-B16A-48F.mjs";
2
+ import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, t as AcceptedEvent } from "./Subscription-BJAzYNw1.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-CkN05NT3.d.mts.map
51
+ //# sourceMappingURL=EventSource-CMbXXmwe.d.mts.map
@@ -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 { Oi as SubmissionStatus } from "./Admin-B8ISZyYf.mjs";
3
+ import { Oi as SubmissionStatus } from "./Admin-CKIdJoP8.mjs";
4
4
  import { H as ScheduledInputRefused, V as ScheduledInputFailure, j as ScheduleStorageError } from "./Schedule-CtYREFnz.mjs";
5
- import { a as PreparedInput } from "./Subscription-B16A-48F.mjs";
5
+ import { a as PreparedInput } from "./Subscription-BJAzYNw1.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-fctZOTnn.d.mts.map
42
+ //# sourceMappingURL=PreparedInputAdmission-Bt6rgtVu.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-B8ISZyYf.mjs";
6
+ import "./Admin-CKIdJoP8.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-B16A-48F.d.mts.map
979
+ //# sourceMappingURL=Subscription-BJAzYNw1.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-B16A-48F.mjs";
3
+ import { E as SubscriptionSourceError, b as SubscriptionRecord, i as EventSourceVersion, m as SubscriptionError, t as AcceptedEvent, u as SubscriptionConfiguration } from "./Subscription-BJAzYNw1.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-DIU7CiXE.d.mts.map
41
+ //# sourceMappingURL=SubscriptionInput-CkBJt0AS.d.mts.map
@@ -0,0 +1,171 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
+ import { c as WorkerError } from "./Worker-CfwzMZEK.mjs";
3
+ import { BatchId, CanonicalBatch, ProducerEpoch, ProducerId, RecordEnvelope, RecordId, ThreadCreated, WorkerAdmission, WorkerOrigin, WorkerOriginRecorded } from "./durable/Records.mjs";
4
+ import { AdmissionConflict, AdmissionPolicyError, AdmissionRequest, LedgerError, MarkReadyRequest, SubmissionLedger } from "./durable/SubmissionLedger.mjs";
5
+ import { a as definitionDigestsEqual } from "./agent-registration-CKNsrpwo.mjs";
6
+ import { $ as workerOriginRecordId } from "./RunJournal-Gd83HYqG.mjs";
7
+ import { AppendConflict, FenceRejected, FencedAppendRequest, ThreadIdentityRequest, ThreadMaterialization, ThreadNotMaterialized, ThreadStore, ThreadStoreError, ThreadTailRequest } from "./durable/ThreadStore.mjs";
8
+ import { DurableRuntimeFailpoint, DurableRuntimeFailpointError } from "./durable/DurableFailpoint.mjs";
9
+ import { WakeScheduler } from "./durable/WakeScheduler.mjs";
10
+ import { Context, DateTime, Effect, Schema } from "effect";
11
+ //#region src/durable/internal/thread-initialization.ts
12
+ /** Stable identities retained across admission retries and recovery. */
13
+ const threadCreatedBatchId = (threadId) => Schema.decodeSync(BatchId)(`thread-created:${threadId}`);
14
+ const threadCreatedRecordId = (threadId) => Schema.decodeSync(RecordId)(`thread-created:${threadId}`);
15
+ /**
16
+ * Coordinator invariant: every Thread's first canonical record is `ThreadCreated`,
17
+ * so `tailSequence >= 1` is the deterministic already-created check. A lost race (conflict or
18
+ * fence) is verified against that invariant instead of being trusted blindly. An admitted
19
+ * child can be claimed before it is runnable; that advances the shared storage fence without
20
+ * appending anything. Re-read and retry that initialization race with the current fence.
21
+ */
22
+ const ensureThreadCreated = Effect.fn("DurableAgentRuntime.ensureThreadCreated")(function* (config, threadId, agentId, definitions) {
23
+ const store = yield* ThreadStore;
24
+ const wake = yield* WakeScheduler;
25
+ const tail = yield* store.inspectTail(ThreadTailRequest.make({ threadId }));
26
+ if (tail.tailSequence > 0) return;
27
+ const record = yield* Effect.map(DateTime.now, (createdAt) => RecordEnvelope.make({
28
+ recordId: threadCreatedRecordId(threadId),
29
+ family: "thread",
30
+ schemaVersion: 1,
31
+ createdAt,
32
+ deploymentId: config.deploymentId,
33
+ payload: ThreadCreated.make({
34
+ agentId,
35
+ definitions
36
+ })
37
+ }));
38
+ yield* store.append(FencedAppendRequest.make({
39
+ threadId,
40
+ batch: CanonicalBatch.make({
41
+ batchId: threadCreatedBatchId(threadId),
42
+ producerId: config.producerId,
43
+ records: [record]
44
+ }),
45
+ expectedTailSequence: tail.tailSequence,
46
+ expectedTailDigest: tail.tailDigest,
47
+ producerEpoch: tail.producerEpoch
48
+ })).pipe(Effect.catchTag(["AppendConflict", "FenceRejected"], (error) => store.inspectTail(ThreadTailRequest.make({ threadId })).pipe(Effect.flatMap((current) => current.tailSequence > 0 ? Effect.void : Effect.fail(error)))), Effect.andThen(wake.notify(threadId)), Effect.asVoid);
49
+ }, (effect) => effect.pipe(Effect.retry({
50
+ times: 7,
51
+ while: (error) => error._tag === "AppendConflict" || error._tag === "FenceRejected"
52
+ })));
53
+ const sameOrigin = Schema.toEquivalence(WorkerOrigin);
54
+ const ensureWorkerOrigin = Effect.fn("WorkerHost.ensureOrigin")(function* (config, origin) {
55
+ const store = yield* ThreadStore;
56
+ const failpoint = yield* DurableRuntimeFailpoint;
57
+ for (let attempt = 0; attempt < 16; attempt++) {
58
+ const current = yield* store.readIdentity(ThreadIdentityRequest.make({ threadId: origin.worker.threadId }));
59
+ const existing = current.records.find(({ record }) => record.payload._tag === "WorkerOriginRecorded")?.record.payload;
60
+ if (existing?._tag === "WorkerOriginRecorded") {
61
+ if (!sameOrigin(existing.origin, origin)) return yield* WorkerError.make({
62
+ operation: "start",
63
+ reason: "worker-mismatch"
64
+ });
65
+ return;
66
+ }
67
+ const first = current.records[0]?.record.payload;
68
+ if (first?._tag !== "ThreadCreated" || first.agentId !== origin.worker.targetAgentId || !definitionDigestsEqual(first.definitions, origin.targetDigests) || current.records.some(({ record }) => record.payload._tag === "SubagentLineageRecorded")) return yield* WorkerError.make({
69
+ operation: "start",
70
+ reason: "worker-mismatch"
71
+ });
72
+ const id = workerOriginRecordId(origin.worker.threadId);
73
+ yield* failpoint.hit("worker:before-origin-append");
74
+ if (yield* store.append(FencedAppendRequest.make({
75
+ threadId: origin.worker.threadId,
76
+ producerEpoch: current.producerEpoch,
77
+ expectedTailSequence: current.tailSequence,
78
+ expectedTailDigest: current.tailDigest,
79
+ batch: CanonicalBatch.make({
80
+ batchId: Schema.decodeSync(BatchId)(id),
81
+ producerId: config.producerId,
82
+ records: [RecordEnvelope.make({
83
+ recordId: id,
84
+ family: "thread",
85
+ schemaVersion: 1,
86
+ createdAt: DateTime.makeUnsafe(origin.createdAtMillis),
87
+ deploymentId: config.deploymentId,
88
+ payload: WorkerOriginRecorded.make({ origin })
89
+ })]
90
+ })
91
+ })).pipe(Effect.as(true), Effect.catchTag(["AppendConflict", "FenceRejected"], () => Effect.succeed(false)))) {
92
+ yield* failpoint.hit("worker:after-origin-append");
93
+ return;
94
+ }
95
+ }
96
+ return yield* WorkerError.make({
97
+ operation: "start",
98
+ reason: "storage"
99
+ });
100
+ }, Effect.mapError((cause) => cause._tag === "WorkerError" ? cause : WorkerError.make({
101
+ operation: "start",
102
+ reason: "storage",
103
+ cause
104
+ })));
105
+ //#endregion
106
+ //#region src/durable/WorkerAdmission.ts
107
+ var WorkerAdmission_exports = /* @__PURE__ */ __exportAll({
108
+ WorkerAdmissionFailure: () => WorkerAdmissionFailure,
109
+ WorkerAdmissionPort: () => WorkerAdmissionPort,
110
+ WorkerAdmissionRequest: () => WorkerAdmissionRequest,
111
+ admitWorker: () => admitWorker
112
+ });
113
+ /**
114
+ * Storage admission after source authorization, input validation and capacity reservation.
115
+ * This is an internal host port, not an authorization entrypoint. Hosts route the whole
116
+ * operation to the destination owner and enroll recovery before executing it.
117
+ */
118
+ var WorkerAdmissionRequest = class extends Schema.Class("@effect-agent/thread/WorkerAdmissionRequest")({
119
+ ...AdmissionRequest.fields,
120
+ workerAdmission: WorkerAdmission,
121
+ producerId: ProducerId
122
+ }) {};
123
+ const WorkerAdmissionFailure = Schema.Union([
124
+ AdmissionConflict,
125
+ AdmissionPolicyError,
126
+ LedgerError,
127
+ ThreadStoreError,
128
+ ThreadNotMaterialized,
129
+ AppendConflict,
130
+ FenceRejected,
131
+ DurableRuntimeFailpointError
132
+ ]);
133
+ /** Local implementation shared by every host; retries finish the same admitted row. */
134
+ const admitWorker = Effect.fn("WorkerAdmission.admitWorker")(function* (request) {
135
+ const origin = request.workerAdmission.origin;
136
+ if (origin.worker.threadId !== request.threadId || origin.worker.targetAgentId !== request.agentId || request.parentLinkage !== void 0) return yield* LedgerError.make({
137
+ operation: "admit worker",
138
+ message: "Worker admission does not belong to the destination Thread"
139
+ });
140
+ const ledger = yield* SubmissionLedger;
141
+ const store = yield* ThreadStore;
142
+ const wake = yield* WakeScheduler;
143
+ const failpoint = yield* DurableRuntimeFailpoint;
144
+ const admitted = yield* ledger.admit(AdmissionRequest.make(request));
145
+ yield* failpoint.hit("submit:after-admit");
146
+ if (admitted.replayed && admitted.state !== "admitted") return admitted;
147
+ yield* store.materialize(ThreadMaterialization.make({
148
+ threadId: request.threadId,
149
+ producerEpoch: Schema.decodeSync(ProducerEpoch)(0)
150
+ })).pipe(Effect.catchTag("FenceRejected", () => Effect.void));
151
+ const config = {
152
+ producerId: request.producerId,
153
+ deploymentId: request.deploymentId
154
+ };
155
+ yield* ensureThreadCreated(config, request.threadId, request.agentId, request.agentDigests);
156
+ yield* ensureWorkerOrigin(config, origin).pipe(Effect.mapError((cause) => LedgerError.make({
157
+ operation: "worker-origin",
158
+ message: cause.reason,
159
+ cause
160
+ })));
161
+ yield* failpoint.hit("submit:after-materialize");
162
+ yield* ledger.markReady(MarkReadyRequest.make({ submissionId: admitted.submissionId }));
163
+ yield* wake.notify(request.threadId);
164
+ return admitted;
165
+ });
166
+ /** Placement adapter for the composite operation; local hosts use the same implementation. */
167
+ const WorkerAdmissionPort = Context.Reference("@effect-agent/thread/WorkerAdmissionPort", { defaultValue: () => ({ admit: admitWorker }) });
168
+ //#endregion
169
+ export { admitWorker as a, threadCreatedBatchId as c, WorkerAdmission_exports as i, threadCreatedRecordId as l, WorkerAdmissionPort as n, ensureThreadCreated as o, WorkerAdmissionRequest as r, ensureWorkerOrigin as s, WorkerAdmissionFailure as t };
170
+
171
+ //# sourceMappingURL=WorkerAdmission-CJ_oWRuS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkerAdmission-CJ_oWRuS.mjs","names":[],"sources":["../src/durable/internal/thread-initialization.ts","../src/durable/WorkerAdmission.ts"],"sourcesContent":["import { DateTime, Effect, Schema } from \"effect\";\n\nimport type { AgentId, ThreadId } from \"../../core/Identifiers.ts\";\nimport { WorkerError } from \"../../core/Worker.ts\";\nimport { DurableRuntimeFailpoint } from \"../DurableFailpoint.ts\";\nimport {\n BatchId,\n CanonicalBatch,\n RecordEnvelope,\n RecordId,\n ThreadCreated,\n WorkerOrigin,\n WorkerOriginRecorded,\n type DefinitionDigests,\n type DeploymentId,\n type ProducerId,\n} from \"../Records.ts\";\nimport { workerOriginRecordId } from \"../RunJournal.ts\";\nimport type {\n AppendConflict,\n FenceRejected,\n ThreadNotMaterialized,\n ThreadStoreError,\n} from \"../ThreadStore.ts\";\nimport {\n FencedAppendRequest,\n ThreadIdentityRequest,\n ThreadTailRequest,\n ThreadStore,\n} from \"../ThreadStore.ts\";\nimport { WakeScheduler } from \"../WakeScheduler.ts\";\nimport { definitionDigestsEqual } from \"./agent-registration.ts\";\n\ninterface InitializationConfig {\n readonly producerId: ProducerId;\n readonly deploymentId: DeploymentId;\n}\n\n/** Stable identities retained across admission retries and recovery. */\nexport const threadCreatedBatchId = (threadId: ThreadId): BatchId =>\n Schema.decodeSync(BatchId)(`thread-created:${threadId}`);\n\nexport const threadCreatedRecordId = (threadId: ThreadId): RecordId =>\n Schema.decodeSync(RecordId)(`thread-created:${threadId}`);\n\n/**\n * Coordinator invariant: every Thread's first canonical record is `ThreadCreated`,\n * so `tailSequence >= 1` is the deterministic already-created check. A lost race (conflict or\n * fence) is verified against that invariant instead of being trusted blindly. An admitted\n * child can be claimed before it is runnable; that advances the shared storage fence without\n * appending anything. Re-read and retry that initialization race with the current fence.\n */\nexport const ensureThreadCreated = Effect.fn(\"DurableAgentRuntime.ensureThreadCreated\")(\n function* (\n config: InitializationConfig,\n threadId: ThreadId,\n agentId: AgentId,\n definitions: DefinitionDigests,\n ): Effect.fn.Return<\n void,\n ThreadStoreError | ThreadNotMaterialized | AppendConflict | FenceRejected,\n ThreadStore | WakeScheduler\n > {\n const store = yield* ThreadStore;\n const wake = yield* WakeScheduler;\n const tail = yield* store.inspectTail(ThreadTailRequest.make({ threadId }));\n\n if (tail.tailSequence > 0) return;\n\n const record = yield* Effect.map(DateTime.now, (createdAt) =>\n RecordEnvelope.make({\n recordId: threadCreatedRecordId(threadId),\n family: \"thread\",\n schemaVersion: 1,\n createdAt,\n deploymentId: config.deploymentId,\n payload: ThreadCreated.make({ agentId, definitions }),\n }),\n );\n\n yield* store\n .append(\n FencedAppendRequest.make({\n threadId,\n batch: CanonicalBatch.make({\n batchId: threadCreatedBatchId(threadId),\n producerId: config.producerId,\n records: [record],\n }),\n expectedTailSequence: tail.tailSequence,\n expectedTailDigest: tail.tailDigest,\n producerEpoch: tail.producerEpoch,\n }),\n )\n .pipe(\n Effect.catchTag([\"AppendConflict\", \"FenceRejected\"], (error) =>\n store\n .inspectTail(ThreadTailRequest.make({ threadId }))\n .pipe(\n Effect.flatMap((current) =>\n current.tailSequence > 0 ? Effect.void : Effect.fail(error),\n ),\n ),\n ),\n Effect.andThen(wake.notify(threadId)),\n Effect.asVoid,\n );\n },\n (effect) =>\n effect.pipe(\n Effect.retry({\n times: 7,\n while: (error) => error._tag === \"AppendConflict\" || error._tag === \"FenceRejected\",\n }),\n ),\n);\n\nconst sameOrigin = Schema.toEquivalence(WorkerOrigin);\n\nexport const ensureWorkerOrigin = Effect.fn(\"WorkerHost.ensureOrigin\")(\n function* (config: InitializationConfig, origin: WorkerOrigin) {\n const store = yield* ThreadStore;\n const failpoint = yield* DurableRuntimeFailpoint;\n\n for (let attempt = 0; attempt < 16; attempt++) {\n const current = yield* store.readIdentity(\n ThreadIdentityRequest.make({ threadId: origin.worker.threadId }),\n );\n\n const existing = current.records.find(\n ({ record }) => record.payload._tag === \"WorkerOriginRecorded\",\n )?.record.payload;\n\n if (existing?._tag === \"WorkerOriginRecorded\") {\n if (!sameOrigin(existing.origin, origin))\n return yield* WorkerError.make({ operation: \"start\", reason: \"worker-mismatch\" });\n\n return;\n }\n const first = current.records[0]?.record.payload;\n\n if (\n first?._tag !== \"ThreadCreated\" ||\n first.agentId !== origin.worker.targetAgentId ||\n !definitionDigestsEqual(first.definitions, origin.targetDigests) ||\n current.records.some(({ record }) => record.payload._tag === \"SubagentLineageRecorded\")\n )\n return yield* WorkerError.make({ operation: \"start\", reason: \"worker-mismatch\" });\n const id = workerOriginRecordId(origin.worker.threadId);\n\n yield* failpoint.hit(\"worker:before-origin-append\");\n\n const appended = yield* store\n .append(\n FencedAppendRequest.make({\n threadId: origin.worker.threadId,\n producerEpoch: current.producerEpoch,\n expectedTailSequence: current.tailSequence,\n expectedTailDigest: current.tailDigest,\n batch: CanonicalBatch.make({\n batchId: Schema.decodeSync(BatchId)(id),\n producerId: config.producerId,\n records: [\n RecordEnvelope.make({\n recordId: id,\n family: \"thread\",\n schemaVersion: 1,\n createdAt: DateTime.makeUnsafe(origin.createdAtMillis),\n deploymentId: config.deploymentId,\n payload: WorkerOriginRecorded.make({ origin }),\n }),\n ],\n }),\n }),\n )\n .pipe(\n Effect.as(true),\n Effect.catchTag([\"AppendConflict\", \"FenceRejected\"], () => Effect.succeed(false)),\n );\n\n if (appended) {\n yield* failpoint.hit(\"worker:after-origin-append\");\n\n return;\n }\n }\n\n return yield* WorkerError.make({ operation: \"start\", reason: \"storage\" });\n },\n Effect.mapError((cause) =>\n cause._tag === \"WorkerError\"\n ? cause\n : WorkerError.make({ operation: \"start\", reason: \"storage\", cause }),\n ),\n);\n","import { Context, Effect, Schema } from \"effect\";\n\nimport { DurableRuntimeFailpoint, DurableRuntimeFailpointError } from \"./DurableFailpoint.ts\";\nimport { ensureThreadCreated, ensureWorkerOrigin } from \"./internal/thread-initialization.ts\";\nimport { ProducerEpoch, ProducerId, WorkerAdmission } from \"./Records.ts\";\nimport {\n AdmissionConflict,\n AdmissionPolicyError,\n AdmissionRequest,\n LedgerError,\n MarkReadyRequest,\n SubmissionLedger,\n} from \"./SubmissionLedger.ts\";\nimport {\n AppendConflict,\n FenceRejected,\n ThreadMaterialization,\n ThreadNotMaterialized,\n ThreadStore,\n ThreadStoreError,\n} from \"./ThreadStore.ts\";\nimport { WakeScheduler } from \"./WakeScheduler.ts\";\n\n/**\n * Storage admission after source authorization, input validation and capacity reservation.\n * This is an internal host port, not an authorization entrypoint. Hosts route the whole\n * operation to the destination owner and enroll recovery before executing it.\n */\nexport class WorkerAdmissionRequest extends Schema.Class<WorkerAdmissionRequest>(\n \"@effect-agent/thread/WorkerAdmissionRequest\",\n)({\n ...AdmissionRequest.fields,\n workerAdmission: WorkerAdmission,\n producerId: ProducerId,\n}) {}\n\nexport const WorkerAdmissionFailure = Schema.Union([\n AdmissionConflict,\n AdmissionPolicyError,\n LedgerError,\n ThreadStoreError,\n ThreadNotMaterialized,\n AppendConflict,\n FenceRejected,\n DurableRuntimeFailpointError,\n]);\n\n/** Local implementation shared by every host; retries finish the same admitted row. */\nexport const admitWorker = Effect.fn(\"WorkerAdmission.admitWorker\")(function* (\n request: WorkerAdmissionRequest,\n) {\n const origin = request.workerAdmission.origin;\n\n if (\n origin.worker.threadId !== request.threadId ||\n origin.worker.targetAgentId !== request.agentId ||\n request.parentLinkage !== undefined\n )\n return yield* LedgerError.make({\n operation: \"admit worker\",\n message: \"Worker admission does not belong to the destination Thread\",\n });\n\n const ledger = yield* SubmissionLedger;\n const store = yield* ThreadStore;\n const wake = yield* WakeScheduler;\n const failpoint = yield* DurableRuntimeFailpoint;\n const admitted = yield* ledger.admit(AdmissionRequest.make(request));\n\n yield* failpoint.hit(\"submit:after-admit\");\n if (admitted.replayed && admitted.state !== \"admitted\") return admitted;\n\n yield* store\n .materialize(\n ThreadMaterialization.make({\n threadId: request.threadId,\n producerEpoch: Schema.decodeSync(ProducerEpoch)(0),\n }),\n )\n .pipe(Effect.catchTag(\"FenceRejected\", () => Effect.void));\n\n const config = {\n producerId: request.producerId,\n deploymentId: request.deploymentId,\n };\n\n yield* ensureThreadCreated(config, request.threadId, request.agentId, request.agentDigests);\n yield* ensureWorkerOrigin(config, origin).pipe(\n Effect.mapError((cause) =>\n LedgerError.make({ operation: \"worker-origin\", message: cause.reason, cause }),\n ),\n );\n yield* failpoint.hit(\"submit:after-materialize\");\n yield* ledger.markReady(MarkReadyRequest.make({ submissionId: admitted.submissionId }));\n yield* wake.notify(request.threadId);\n\n return admitted;\n});\n\n/** Placement adapter for the composite operation; local hosts use the same implementation. */\nexport const WorkerAdmissionPort = Context.Reference<{ readonly admit: typeof admitWorker }>(\n \"@effect-agent/thread/WorkerAdmissionPort\",\n { defaultValue: () => ({ admit: admitWorker }) },\n);\n"],"mappings":";;;;;;;;;;;;AAuCA,MAAa,wBAAwB,aACnC,OAAO,WAAW,OAAO,CAAC,CAAC,kBAAkB,UAAU;AAEzD,MAAa,yBAAyB,aACpC,OAAO,WAAW,QAAQ,CAAC,CAAC,kBAAkB,UAAU;;;;;;;;AAS1D,MAAa,sBAAsB,OAAO,GAAG,yCAAyC,CAAC,CACrF,WACE,QACA,UACA,SACA,aAKA;CACA,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO;CACpB,MAAM,OAAO,OAAO,MAAM,YAAY,kBAAkB,KAAK,EAAE,SAAS,CAAC,CAAC;CAE1E,IAAI,KAAK,eAAe,GAAG;CAE3B,MAAM,SAAS,OAAO,OAAO,IAAI,SAAS,MAAM,cAC9C,eAAe,KAAK;EAClB,UAAU,sBAAsB,QAAQ;EACxC,QAAQ;EACR,eAAe;EACf;EACA,cAAc,OAAO;EACrB,SAAS,cAAc,KAAK;GAAE;GAAS;EAAY,CAAC;CACtD,CAAC,CACH;CAEA,OAAO,MACJ,OACC,oBAAoB,KAAK;EACvB;EACA,OAAO,eAAe,KAAK;GACzB,SAAS,qBAAqB,QAAQ;GACtC,YAAY,OAAO;GACnB,SAAS,CAAC,MAAM;EAClB,CAAC;EACD,sBAAsB,KAAK;EAC3B,oBAAoB,KAAK;EACzB,eAAe,KAAK;CACtB,CAAC,CACH,CAAC,CACA,KACC,OAAO,SAAS,CAAC,kBAAkB,eAAe,IAAI,UACpD,MACG,YAAY,kBAAkB,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CACjD,KACC,OAAO,SAAS,YACd,QAAQ,eAAe,IAAI,OAAO,OAAO,OAAO,KAAK,KAAK,CAC5D,CACF,CACJ,GACA,OAAO,QAAQ,KAAK,OAAO,QAAQ,CAAC,GACpC,OAAO,MACT;AACJ,IACC,WACC,OAAO,KACL,OAAO,MAAM;CACX,OAAO;CACP,QAAQ,UAAU,MAAM,SAAS,oBAAoB,MAAM,SAAS;AACtE,CAAC,CACH,CACJ;AAEA,MAAM,aAAa,OAAO,cAAc,YAAY;AAEpD,MAAa,qBAAqB,OAAO,GAAG,yBAAyB,CAAC,CACpE,WAAW,QAA8B,QAAsB;CAC7D,MAAM,QAAQ,OAAO;CACrB,MAAM,YAAY,OAAO;CAEzB,KAAK,IAAI,UAAU,GAAG,UAAU,IAAI,WAAW;EAC7C,MAAM,UAAU,OAAO,MAAM,aAC3B,sBAAsB,KAAK,EAAE,UAAU,OAAO,OAAO,SAAS,CAAC,CACjE;EAEA,MAAM,WAAW,QAAQ,QAAQ,MAC9B,EAAE,aAAa,OAAO,QAAQ,SAAS,sBAC1C,CAAC,EAAE,OAAO;EAEV,IAAI,UAAU,SAAS,wBAAwB;GAC7C,IAAI,CAAC,WAAW,SAAS,QAAQ,MAAM,GACrC,OAAO,OAAO,YAAY,KAAK;IAAE,WAAW;IAAS,QAAQ;GAAkB,CAAC;GAElF;EACF;EACA,MAAM,QAAQ,QAAQ,QAAQ,EAAE,EAAE,OAAO;EAEzC,IACE,OAAO,SAAS,mBAChB,MAAM,YAAY,OAAO,OAAO,iBAChC,CAAC,uBAAuB,MAAM,aAAa,OAAO,aAAa,KAC/D,QAAQ,QAAQ,MAAM,EAAE,aAAa,OAAO,QAAQ,SAAS,yBAAyB,GAEtF,OAAO,OAAO,YAAY,KAAK;GAAE,WAAW;GAAS,QAAQ;EAAkB,CAAC;EAClF,MAAM,KAAK,qBAAqB,OAAO,OAAO,QAAQ;EAEtD,OAAO,UAAU,IAAI,6BAA6B;EA8BlD,IAAI,OA5BoB,MACrB,OACC,oBAAoB,KAAK;GACvB,UAAU,OAAO,OAAO;GACxB,eAAe,QAAQ;GACvB,sBAAsB,QAAQ;GAC9B,oBAAoB,QAAQ;GAC5B,OAAO,eAAe,KAAK;IACzB,SAAS,OAAO,WAAW,OAAO,CAAC,CAAC,EAAE;IACtC,YAAY,OAAO;IACnB,SAAS,CACP,eAAe,KAAK;KAClB,UAAU;KACV,QAAQ;KACR,eAAe;KACf,WAAW,SAAS,WAAW,OAAO,eAAe;KACrD,cAAc,OAAO;KACrB,SAAS,qBAAqB,KAAK,EAAE,OAAO,CAAC;IAC/C,CAAC,CACH;GACF,CAAC;EACH,CAAC,CACH,CAAC,CACA,KACC,OAAO,GAAG,IAAI,GACd,OAAO,SAAS,CAAC,kBAAkB,eAAe,SAAS,OAAO,QAAQ,KAAK,CAAC,CAClF,GAEY;GACZ,OAAO,UAAU,IAAI,4BAA4B;GAEjD;EACF;CACF;CAEA,OAAO,OAAO,YAAY,KAAK;EAAE,WAAW;EAAS,QAAQ;CAAU,CAAC;AAC1E,GACA,OAAO,UAAU,UACf,MAAM,SAAS,gBACX,QACA,YAAY,KAAK;CAAE,WAAW;CAAS,QAAQ;CAAW;AAAM,CAAC,CACvE,CACF;;;;;;;;;;;;;;ACtKA,IAAa,yBAAb,cAA4C,OAAO,MACjD,6CACF,CAAC,CAAC;CACA,GAAG,iBAAiB;CACpB,iBAAiB;CACjB,YAAY;AACd,CAAC,CAAC,CAAC,CAAC;AAEJ,MAAa,yBAAyB,OAAO,MAAM;CACjD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,MAAa,cAAc,OAAO,GAAG,6BAA6B,CAAC,CAAC,WAClE,SACA;CACA,MAAM,SAAS,QAAQ,gBAAgB;CAEvC,IACE,OAAO,OAAO,aAAa,QAAQ,YACnC,OAAO,OAAO,kBAAkB,QAAQ,WACxC,QAAQ,kBAAkB,KAAA,GAE1B,OAAO,OAAO,YAAY,KAAK;EAC7B,WAAW;EACX,SAAS;CACX,CAAC;CAEH,MAAM,SAAS,OAAO;CACtB,MAAM,QAAQ,OAAO;CACrB,MAAM,OAAO,OAAO;CACpB,MAAM,YAAY,OAAO;CACzB,MAAM,WAAW,OAAO,OAAO,MAAM,iBAAiB,KAAK,OAAO,CAAC;CAEnE,OAAO,UAAU,IAAI,oBAAoB;CACzC,IAAI,SAAS,YAAY,SAAS,UAAU,YAAY,OAAO;CAE/D,OAAO,MACJ,YACC,sBAAsB,KAAK;EACzB,UAAU,QAAQ;EAClB,eAAe,OAAO,WAAW,aAAa,CAAC,CAAC,CAAC;CACnD,CAAC,CACH,CAAC,CACA,KAAK,OAAO,SAAS,uBAAuB,OAAO,IAAI,CAAC;CAE3D,MAAM,SAAS;EACb,YAAY,QAAQ;EACpB,cAAc,QAAQ;CACxB;CAEA,OAAO,oBAAoB,QAAQ,QAAQ,UAAU,QAAQ,SAAS,QAAQ,YAAY;CAC1F,OAAO,mBAAmB,QAAQ,MAAM,CAAC,CAAC,KACxC,OAAO,UAAU,UACf,YAAY,KAAK;EAAE,WAAW;EAAiB,SAAS,MAAM;EAAQ;CAAM,CAAC,CAC/E,CACF;CACA,OAAO,UAAU,IAAI,0BAA0B;CAC/C,OAAO,OAAO,UAAU,iBAAiB,KAAK,EAAE,cAAc,SAAS,aAAa,CAAC,CAAC;CACtF,OAAO,KAAK,OAAO,QAAQ,QAAQ;CAEnC,OAAO;AACT,CAAC;;AAGD,MAAa,sBAAsB,QAAQ,UACzC,4CACA,EAAE,qBAAqB,EAAE,OAAO,YAAY,GAAG,CACjD"}
@@ -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-B8ISZyYf.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-CKIdJoP8.mjs";
2
2
  export { ExplainedEvidence, ExplainedSubmission, ExplainedUnknownCall, IntegrityCheck, IntegrityCheckName, IntegrityCheckStatus, IntegrityReport, ObligationBlockedOn, ObligationEntry, ObligationReport, ObligationSeverity, ObligationThresholds, RECOVERY_DECISION_MEANINGS, RecoveryDisposition, RecoveryExplanation, RetryCommand, RetryRefusalReason, RetryRefused, obligationSeverityOf, predictRecoveryDisposition, recoveryDecisionMeaning, renderRecoveryExplanation };
@@ -1,2 +1,2 @@
1
- import { Ba as ExecutableAgentBinding, Fa as AgentAttemptContext, Ga as definitionDigestsEqual, Ha as ResolvedBinding, Ia as AgentRegistration, La as BindingUnavailable, Ra as DurableBindingFailure, Ua as compileBindingContracts, Va as ReplayVersions, Wa as compileRegistrations, za as DurableWorkerBinding } from "../Admin-B8ISZyYf.mjs";
1
+ import { Ba as ExecutableAgentBinding, Fa as AgentAttemptContext, Ga as definitionDigestsEqual, Ha as ResolvedBinding, Ia as AgentRegistration, La as BindingUnavailable, Ra as DurableBindingFailure, Ua as compileBindingContracts, Va as ReplayVersions, Wa as compileRegistrations, za as DurableWorkerBinding } from "../Admin-CKIdJoP8.mjs";
2
2
  export { type AgentAttemptContext, type AgentRegistration, BindingUnavailable, type DurableBindingFailure, DurableWorkerBinding, type ExecutableAgentBinding, type ReplayVersions, type ResolvedBinding, compileBindingContracts, compileRegistrations, definitionDigestsEqual };
@@ -1,4 +1,4 @@
1
- import { ni as ThreadStore, vn as SubmissionLedger } from "../Admin-B8ISZyYf.mjs";
1
+ import { ni as ThreadStore, vn as SubmissionLedger } from "../Admin-CKIdJoP8.mjs";
2
2
  import { Crypto, Effect, Schema } from "effect";
3
3
  //#region src/durable/Certification.d.ts
4
4
  declare const CertifiedAdapterIdentity_base: Schema.Class<CertifiedAdapterIdentity, Schema.Struct<{
@@ -1,7 +1,7 @@
1
1
  import { O as PersistedJson, l as CanonicalRecordEnvelope } from "../Records-B5GFWCpn.mjs";
2
2
  import { ActivityProcessorKey, ActivityProcessorStore, ActivityStoreFailure, PreparedActivity } from "./ActivityStore.mjs";
3
3
  import { t as DigestError } from "../Digest-U69rDHuO.mjs";
4
- import { Gr as ThreadNotMaterialized, ii as ThreadStoreError, ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
4
+ import { Gr as ThreadNotMaterialized, ii as ThreadStoreError, ni as ThreadStore } from "../Admin-CKIdJoP8.mjs";
5
5
  import { Crypto, Effect, Schema, Scope } from "effect";
6
6
  declare namespace CommittedActivity_d_exports {
7
7
  export { ActivityPassLimits, ActivityPassResult, ActivityProcessingError, CommittedActivityProcessor, activityWorkId, processCommittedActivity };
@@ -1,3 +1,3 @@
1
1
  import { a as Receipt } from "../Receipt-BAHyigAF.mjs";
2
- import { $n as DurableApprovalFailure, Cr as isolateRecovery, Dr as threadCreatedRecordId, Er as threadCreatedBatchId, Sr as childReservationIdFor, Tr as recoveryRepairRecordId, Xn as DurableAbortFailure, Yn as ApprovalSuspensionError, Zn as DurableAgentRuntime, _r as RecoveryBlocked, ar as DurableObserveOptions, br as RecoverySweepOptions, cr as DurableRetryFailure, dr as DurableSubmitAgent, er as DurableApprovalResolver, fr as DurableSubmitFailure, gr as DurableWorkerRequirements, hr as DurableWorkerFailure, ir as DurableObligationFailure, lr as DurableRuntimeConfig, mr as DurableVerifyFailure, nr as DurableAwaitFailure, or as DurableProgressFailure, pr as DurableSubmitOptions, rr as DurableExplainFailure, sr as DurableResolveFailure, tr as DurableApprovalSuspension, ur as DurableRuntimeConfigOptions, vr as RecoveryFailure, wr as recoveryRepairBatchId, xr as RecoverySweepResult, yr as RecoveryReport } from "../Admin-B8ISZyYf.mjs";
2
+ import { $n as DurableApprovalFailure, Cr as isolateRecovery, Dr as threadCreatedRecordId, Er as threadCreatedBatchId, Sr as childReservationIdFor, Tr as recoveryRepairRecordId, Xn as DurableAbortFailure, Yn as ApprovalSuspensionError, Zn as DurableAgentRuntime, _r as RecoveryBlocked, ar as DurableObserveOptions, br as RecoverySweepOptions, cr as DurableRetryFailure, dr as DurableSubmitAgent, er as DurableApprovalResolver, fr as DurableSubmitFailure, gr as DurableWorkerRequirements, hr as DurableWorkerFailure, ir as DurableObligationFailure, lr as DurableRuntimeConfig, mr as DurableVerifyFailure, nr as DurableAwaitFailure, or as DurableProgressFailure, pr as DurableSubmitOptions, rr as DurableExplainFailure, sr as DurableResolveFailure, tr as DurableApprovalSuspension, ur as DurableRuntimeConfigOptions, vr as RecoveryFailure, wr as recoveryRepairBatchId, xr as RecoverySweepResult, yr as RecoveryReport } from "../Admin-CKIdJoP8.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,4 @@
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-DLa4IwFi.mjs";
2
+ import { a as DurableApprovalSuspension, c as RecoveryFailure, d as childReservationIdFor, f as isolateRecovery, 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-R2LUYnRl.mjs";
3
+ import { c as threadCreatedBatchId, l as threadCreatedRecordId } from "../WorkerAdmission-CJ_oWRuS.mjs";
3
4
  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-CkN05NT3.mjs";
1
+ import { a as makeEventSource, i as NormalizedEvent, r as EventSources, t as EventSource } from "../EventSource-CMbXXmwe.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-B8ISZyYf.mjs";
3
- import { E as SubscriptionSourceError } from "../Subscription-B16A-48F.mjs";
4
- import { t as EventSource } from "../EventSource-CkN05NT3.mjs";
2
+ import "../Admin-CKIdJoP8.mjs";
3
+ import { E as SubscriptionSourceError } from "../Subscription-BJAzYNw1.mjs";
4
+ import { t as EventSource } from "../EventSource-CMbXXmwe.mjs";
5
5
  import { SubscriptionFailure, SubscriptionIntake } from "./Subscriptions.mjs";
6
6
  import { Context, Effect, Layer, Redacted, Schema } from "effect";
7
7
  import { HttpClient } from "effect/unstable/http";
@@ -1,2 +1,2 @@
1
- import { Ci as drainLifecyclePublications, Ti as lifecyclePublicationLayer, _i as LifecyclePublicationError, bi as LifecyclePublicationSource, gi as LifecyclePublicationConfig, hi as LifecyclePublicationBatch, mi as LifecyclePublication, vi as LifecyclePublicationFact, wi as lifecyclePublicationBatchMaxFacts, xi as LifecyclePublicationStorage, yi as LifecyclePublicationHandler } from "../Admin-B8ISZyYf.mjs";
1
+ import { Ci as drainLifecyclePublications, Ti as lifecyclePublicationLayer, _i as LifecyclePublicationError, bi as LifecyclePublicationSource, gi as LifecyclePublicationConfig, hi as LifecyclePublicationBatch, mi as LifecyclePublication, vi as LifecyclePublicationFact, wi as lifecyclePublicationBatchMaxFacts, xi as LifecyclePublicationStorage, yi as LifecyclePublicationHandler } from "../Admin-CKIdJoP8.mjs";
2
2
  export { LifecyclePublication, LifecyclePublicationBatch, LifecyclePublicationConfig, LifecyclePublicationError, LifecyclePublicationFact, LifecyclePublicationHandler, LifecyclePublicationSource, LifecyclePublicationStorage, drainLifecyclePublications, lifecyclePublicationBatchMaxFacts, lifecyclePublicationLayer };
@@ -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 { fn as Settlement, xi as LifecyclePublicationStorage } from "../Admin-B8ISZyYf.mjs";
9
- import { a as PreparedInput } from "../Subscription-B16A-48F.mjs";
10
- import { t as PreparedInputAdmission } from "../PreparedInputAdmission-fctZOTnn.mjs";
8
+ import { fn as Settlement, xi as LifecyclePublicationStorage } from "../Admin-CKIdJoP8.mjs";
9
+ import { a as PreparedInput } from "../Subscription-BJAzYNw1.mjs";
10
+ import { t as PreparedInputAdmission } from "../PreparedInputAdmission-Bt6rgtVu.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 };
@@ -617,6 +617,25 @@ export declare const readPending: (request: Pick<{
617
617
  readonly reportKind?: "update" | undefined;
618
618
  } | undefined;
619
619
  readonly messageAdmission?: {
620
+ readonly schemaVersion: 1;
621
+ readonly message: {
622
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
623
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
624
+ };
625
+ readonly peerName: string;
626
+ readonly sender: {
627
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
628
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
629
+ };
630
+ readonly returnAddress: {
631
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
632
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
633
+ };
634
+ readonly inReplyTo?: {
635
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
636
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
637
+ } | undefined;
638
+ } | {
620
639
  readonly _tag: "WorkerCompletion";
621
640
  readonly budgetExhausted: boolean;
622
641
  readonly schemaVersion: 1;
@@ -657,25 +676,6 @@ export declare const readPending: (request: Pick<{
657
676
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
658
677
  };
659
678
  readonly update: Update;
660
- } | {
661
- readonly schemaVersion: 1;
662
- readonly message: {
663
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
664
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
665
- };
666
- readonly peerName: string;
667
- readonly sender: {
668
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
669
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
670
- };
671
- readonly returnAddress: {
672
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
673
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
674
- };
675
- readonly inReplyTo?: {
676
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
677
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
678
- } | undefined;
679
679
  } | undefined;
680
680
  };
681
681
  readonly envelopeDigest: string & import("effect/Brand").Brand<"@effect-agent/thread/Digest">;
@@ -818,6 +818,25 @@ export declare const prepareMessageDelivery: (options: {
818
818
  readonly reportKind?: "update" | undefined;
819
819
  } | undefined;
820
820
  readonly messageAdmission?: {
821
+ readonly schemaVersion: 1;
822
+ readonly message: {
823
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
824
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
825
+ };
826
+ readonly peerName: string;
827
+ readonly sender: {
828
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
829
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
830
+ };
831
+ readonly returnAddress: {
832
+ readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
833
+ readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
834
+ };
835
+ readonly inReplyTo?: {
836
+ readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
837
+ readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
838
+ } | undefined;
839
+ } | {
821
840
  readonly _tag: "WorkerCompletion";
822
841
  readonly budgetExhausted: boolean;
823
842
  readonly schemaVersion: 1;
@@ -858,25 +877,6 @@ export declare const prepareMessageDelivery: (options: {
858
877
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
859
878
  };
860
879
  readonly update: Update;
861
- } | {
862
- readonly schemaVersion: 1;
863
- readonly message: {
864
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
865
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
866
- };
867
- readonly peerName: string;
868
- readonly sender: {
869
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
870
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
871
- };
872
- readonly returnAddress: {
873
- readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
874
- readonly agentId: string & import("effect/Brand").Brand<"@effect-agent/core/AgentId">;
875
- };
876
- readonly inReplyTo?: {
877
- readonly ownerThreadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
878
- readonly messageId: string & import("effect/Brand").Brand<"@effect-agent/thread/IdempotencyKey">;
879
- } | undefined;
880
880
  } | undefined;
881
881
  };
882
882
  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 { fn as Settlement } from "../Admin-B8ISZyYf.mjs";
8
+ import { fn as Settlement } from "../Admin-CKIdJoP8.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,6 +105,25 @@ 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
+ } | {
108
127
  readonly _tag: "WorkerCompletion";
109
128
  readonly budgetExhausted: boolean;
110
129
  readonly schemaVersion: 1;
@@ -145,25 +164,6 @@ export declare const makeMessageDeliveryFixture: (messageId?: any, owner?: any,
145
164
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
146
165
  };
147
166
  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,6 +288,25 @@ 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
+ } | {
291
310
  readonly _tag: "WorkerCompletion";
292
311
  readonly budgetExhausted: boolean;
293
312
  readonly schemaVersion: 1;
@@ -328,25 +347,6 @@ export declare const makeWorkerUpdateDeliveryFixture: (id: string) => Effect.Eff
328
347
  readonly threadId: string & import("effect/Brand").Brand<"@effect-agent/core/ThreadId">;
329
348
  };
330
349
  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 { ni as ThreadStore } from "../Admin-B8ISZyYf.mjs";
2
+ import { ni as ThreadStore } from "../Admin-CKIdJoP8.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-fctZOTnn.mjs";
1
+ import { r as admitPreparedInput, t as PreparedInputAdmission } from "../PreparedInputAdmission-Bt6rgtVu.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-B8ISZyYf.mjs";
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-CKIdJoP8.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 runDurationBatchId, Aa as turnResultsBatchId, Ai as JournalBoundary, Bi as compactionBatchId, Ca as turnBatchId, Da as turnResponseBatch, Ea as turnPreparedBatchId, Fi as TurnCommitInput, Gi as modelResponseInterruptedRecordId, Hi as firstWorkerInputRecordId, Ii as agentUpdateRecordId, Ji as projectRunJournal, Ki as modelResponseRecordId, Li as approvalDecisionBatchId, Ma as workerOriginRecordId, Mi as RunJournalProjection, Na as workerReportRecordId, Ni as RunJournalUsage, Oa as turnResponseBatchId, Qi as runCompletionDigest, Ri as childIdempotencyKeyFor, Sa as turnApprovalsBatchId, Ta as turnIdForRun, Ui as markUnknownBatchId, Vi as compactionRecordId, Wi as modelResponseInterruptedBatchId, Xi as promptFromCanonicalRecords, Yi as projectRunJournalStream, Zi as runCompletedRecordId, _a as toolCallResultBatchId, aa as subagentJoinedRecordId, ba as toolStepSettledBatchId, ca as subagentRequestedBatchId, da as subagentStartedRecordId, ea as runDurationRecordId, fa as toolApprovalDecisionRecordId, ga as toolCallResolvedRecordId, ha as toolCallResolutionBatchId, ia as subagentJoinBatchId, ja as workerInputRecordId, ji as RunJournalError, ka as turnResultsBatch, la as subagentRequestedRecordId, ma as toolCallPreparedRecordId, na as runStartedBatchId, oa as subagentLineageBatchId, pa as toolApprovalRequestRecordId, qi as peerMessageRecordId, ra as runStartedRecordId, sa as subagentLineageRecordId, ta as runIdForSubmission, ua as subagentStartedBatchId, va as toolCallSettledRecordId, wa as turnCanonicalBatch, xa as toolStepSettledRecordId, ya as toolCallUnknownRecordId, zi as childThreadIdFor } from "../Admin-B8ISZyYf.mjs";
1
+ import { $i as runDurationBatchId, Aa as turnResultsBatchId, Ai as JournalBoundary, Bi as compactionBatchId, Ca as turnBatchId, Da as turnResponseBatch, Ea as turnPreparedBatchId, Fi as TurnCommitInput, Gi as modelResponseInterruptedRecordId, Hi as firstWorkerInputRecordId, Ii as agentUpdateRecordId, Ji as projectRunJournal, Ki as modelResponseRecordId, Li as approvalDecisionBatchId, Ma as workerOriginRecordId, Mi as RunJournalProjection, Na as workerReportRecordId, Ni as RunJournalUsage, Oa as turnResponseBatchId, Qi as runCompletionDigest, Ri as childIdempotencyKeyFor, Sa as turnApprovalsBatchId, Ta as turnIdForRun, Ui as markUnknownBatchId, Vi as compactionRecordId, Wi as modelResponseInterruptedBatchId, Xi as promptFromCanonicalRecords, Yi as projectRunJournalStream, Zi as runCompletedRecordId, _a as toolCallResultBatchId, aa as subagentJoinedRecordId, ba as toolStepSettledBatchId, ca as subagentRequestedBatchId, da as subagentStartedRecordId, ea as runDurationRecordId, fa as toolApprovalDecisionRecordId, ga as toolCallResolvedRecordId, ha as toolCallResolutionBatchId, ia as subagentJoinBatchId, ja as workerInputRecordId, ji as RunJournalError, ka as turnResultsBatch, la as subagentRequestedRecordId, ma as toolCallPreparedRecordId, na as runStartedBatchId, oa as subagentLineageBatchId, pa as toolApprovalRequestRecordId, qi as peerMessageRecordId, ra as runStartedRecordId, sa as subagentLineageRecordId, ta as runIdForSubmission, ua as subagentStartedBatchId, va as toolCallSettledRecordId, wa as turnCanonicalBatch, xa as toolStepSettledRecordId, ya as toolCallUnknownRecordId, zi as childThreadIdFor } from "../Admin-CKIdJoP8.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 };