@effect-agent/platform-cloudflare 0.0.1-beta.6 → 0.1.0-beta.100

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 (102) hide show
  1. package/dist/Alarm.d.mts +207 -0
  2. package/dist/Alarm.mjs +578 -0
  3. package/dist/Alarm.mjs.map +1 -0
  4. package/dist/BrowserRestCapture.d.mts +34 -0
  5. package/dist/BrowserRestCapture.mjs +238 -0
  6. package/dist/BrowserRestCapture.mjs.map +1 -0
  7. package/dist/BrowserRestCrawl.d.mts +16 -0
  8. package/dist/BrowserRestCrawl.mjs +244 -0
  9. package/dist/BrowserRestCrawl.mjs.map +1 -0
  10. package/dist/CloudflareAiGateway.d.mts +64 -0
  11. package/dist/CloudflareAiGateway.mjs +70 -0
  12. package/dist/CloudflareAiGateway.mjs.map +1 -0
  13. package/dist/CloudflareBindings.d.mts +115 -0
  14. package/dist/CloudflareBindings.mjs +113 -0
  15. package/dist/CloudflareBindings.mjs.map +1 -0
  16. package/dist/CloudflareBrowser-DV6kya1H.mjs +495 -0
  17. package/dist/CloudflareBrowser-DV6kya1H.mjs.map +1 -0
  18. package/dist/CloudflareBrowser-Doe1M7R5.d.mts +80 -0
  19. package/dist/CloudflareBrowser.d.mts +2 -0
  20. package/dist/CloudflareBrowser.mjs +2 -0
  21. package/dist/CloudflareCodeMode.d.mts +44 -0
  22. package/dist/CloudflareCodeMode.mjs +616 -0
  23. package/dist/CloudflareCodeMode.mjs.map +1 -0
  24. package/dist/CloudflareConfig-DKXGo8L3.d.mts +106 -0
  25. package/dist/CloudflareConfig.d.mts +2 -0
  26. package/dist/CloudflareConfig.mjs +128 -0
  27. package/dist/CloudflareConfig.mjs.map +1 -0
  28. package/dist/CloudflareMemory.d.mts +142 -0
  29. package/dist/CloudflareMemory.mjs +202 -0
  30. package/dist/CloudflareMemory.mjs.map +1 -0
  31. package/dist/CloudflareScheduling.d.mts +52 -0
  32. package/dist/CloudflareScheduling.mjs +396 -0
  33. package/dist/CloudflareScheduling.mjs.map +1 -0
  34. package/dist/CloudflareSubscriptions.d.mts +87 -0
  35. package/dist/CloudflareSubscriptions.mjs +530 -0
  36. package/dist/CloudflareSubscriptions.mjs.map +1 -0
  37. package/dist/CloudflareThreadClient.d.mts +1600 -0
  38. package/dist/CloudflareThreadClient.mjs +382 -0
  39. package/dist/CloudflareThreadClient.mjs.map +1 -0
  40. package/dist/InteractiveBrowser-BCS9g0tn.mjs +1180 -0
  41. package/dist/InteractiveBrowser-BCS9g0tn.mjs.map +1 -0
  42. package/dist/InteractiveBrowser-BR16UPbF.d.mts +169 -0
  43. package/dist/InteractiveBrowser.d.mts +2 -0
  44. package/dist/InteractiveBrowser.mjs +2 -0
  45. package/dist/ProtectedBrowser.d.mts +123 -0
  46. package/dist/ProtectedBrowser.mjs +1135 -0
  47. package/dist/ProtectedBrowser.mjs.map +1 -0
  48. package/dist/ThreadObject-CMQiW2uX.d.mts +827 -0
  49. package/dist/ThreadObject-DXavwaU-.mjs +853 -0
  50. package/dist/ThreadObject-DXavwaU-.mjs.map +1 -0
  51. package/dist/ThreadObject.d.mts +2 -0
  52. package/dist/ThreadObject.mjs +3 -0
  53. package/dist/WakeScheduler.d.mts +23 -0
  54. package/dist/WakeScheduler.mjs +57 -0
  55. package/dist/WakeScheduler.mjs.map +1 -0
  56. package/dist/boundary-BguazVkh.mjs +42 -0
  57. package/dist/boundary-BguazVkh.mjs.map +1 -0
  58. package/dist/index.d.mts +13 -1580
  59. package/dist/index.mjs +13 -1941
  60. package/dist/prepared-admission-DU0_T-ev.mjs +73 -0
  61. package/dist/prepared-admission-DU0_T-ev.mjs.map +1 -0
  62. package/dist/rolldown-runtime-D7D4PA-g.mjs +13 -0
  63. package/package.json +1 -52
  64. package/src/Alarm.ts +1270 -0
  65. package/src/BrowserRestCapture.ts +477 -0
  66. package/src/BrowserRestCrawl.ts +540 -0
  67. package/src/CloudflareAiGateway.ts +170 -0
  68. package/src/CloudflareBindings.ts +199 -0
  69. package/src/CloudflareBrowser.ts +15 -0
  70. package/src/{code-mode-executor.ts → CloudflareCodeMode.ts} +372 -204
  71. package/src/{config.ts → CloudflareConfig.ts} +19 -15
  72. package/src/CloudflareMemory.ts +420 -0
  73. package/src/CloudflareScheduling.ts +747 -0
  74. package/src/CloudflareSubscriptions.ts +1041 -0
  75. package/src/CloudflareThreadClient.ts +809 -0
  76. package/src/InteractiveBrowser.ts +2418 -0
  77. package/src/ProtectedBrowser.ts +9 -0
  78. package/src/ThreadObject.ts +1179 -0
  79. package/src/{wake-scheduler.ts → WakeScheduler.ts} +32 -26
  80. package/src/index.ts +12 -24
  81. package/src/internal/boundary.ts +55 -0
  82. package/src/internal/browser-quick-action.ts +857 -0
  83. package/src/internal/browser-session-lifecycle.ts +160 -0
  84. package/src/internal/layers.ts +756 -0
  85. package/src/internal/message-delivery.ts +181 -0
  86. package/src/internal/prepared-admission.ts +116 -0
  87. package/src/internal/progress-wait.ts +121 -0
  88. package/src/internal/transport.ts +44 -0
  89. package/src/protected-browser/binding.ts +313 -0
  90. package/src/protected-browser/host.ts +344 -0
  91. package/src/protected-browser/inspect-frame.ts +125 -0
  92. package/src/protected-browser/native.ts +445 -0
  93. package/src/protected-browser/policy.ts +821 -0
  94. package/dist/index.mjs.map +0 -1
  95. package/src/alarm.ts +0 -334
  96. package/src/bindings.ts +0 -145
  97. package/src/client.ts +0 -646
  98. package/src/conversation-object.ts +0 -847
  99. package/src/layers.ts +0 -385
  100. package/src/telemetry-internal.ts +0 -432
  101. package/src/telemetry.ts +0 -37
  102. package/src/transport.ts +0 -38
package/dist/index.d.mts CHANGED
@@ -1,1580 +1,13 @@
1
- import { Context, Effect, Layer, Option, Schema } from "effect";
2
- import { AbortCommand, AbortIntent, AdmissionConflict, AgentBindingResolver, AppendConflict, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, CanonicalRecordEnvelope, CanonicalSequence, ConversationNotMaterialized, ConversationStore, ConversationStoreError, DefinitionDigests, DigestError, DurableAgentRuntime, DurableBindingFailure, DurableRuntimeConfig, DurableRuntimeFailpointError, DurableRuntimeFailpointHandler, DurableSubmitAgent, DurableSubmitOptions, DurableWorkerFailure, FenceRejected, IntegrityReport, JoinedToHost, LedgerError, ObligationReport, ObligationThresholds, OperationDenied, OwnershipLost, ProducerId, Receipt, RecoveryExplanation, RecoveryReport, ResolvedBinding, RetryCommand, RetryRefused, RunJournalError, Settlement, SettlementConflict, SubmissionLedger, ToolReconciler, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WakeScheduler } from "@effect-agent/session";
3
- import { ConversationPortTransport, DoStorageFailpointHandler, DoStorageInitializationError } from "@effect-agent/storage-cloudflare";
4
- import { AgentInputError, ConversationId } from "@effect-agent/core";
5
- import { DurableObject, WorkerEntrypoint } from "cloudflare:workers";
6
- import { CodeExecutor, SandboxImplementation } from "@effect-agent/sandbox";
7
- //#region src/bindings.d.ts
8
- declare const CloudflareBindingError_base: Schema.Class<CloudflareBindingError, Schema.TaggedStruct<"CloudflareBindingError", {
9
- readonly binding: Schema.String;
10
- readonly message: Schema.String;
11
- }>, import("effect/Cause").YieldableError>;
12
- /**
13
- * Cloudflare platform bindings as Effect services (DEPLOY-010: "Cloudflare platform bindings
14
- * are supplied as Effect services/Layers"). Application code never reads `env` or touches a
15
- * `DurableObjectState` directly — the Conversation Object class constructs these Layers once
16
- * per incarnation and everything downstream consumes the services.
17
- */
18
- /** A Cloudflare platform binding was missing or carried the wrong shape (DEPLOY-003/010). */
19
- declare class CloudflareBindingError extends CloudflareBindingError_base {}
20
- /**
21
- * The RPC surface one Conversation Durable Object exposes to Workers and to sibling
22
- * Conversation Objects. `makeConversationObjectClass` implements it; the Worker-side client
23
- * and the cross-Object transport call it through `DurableObjectNamespace` stubs. Every
24
- * `encoded` value is a Schema-encoded envelope (`client.ts` wire schemas for host entry
25
- * points, `@effect-agent/storage-cloudflare` port envelopes for `portCall`), so the RPC
26
- * boundary carries only structured-cloneable JSON.
27
- */
28
- interface ConversationObjectRpc extends Rpc.DurableObjectBranded {
29
- /** Admission-limits gate + `DurableAgentRuntime.submit`; answers a `SubmitResponse`. */
30
- submitEncoded(encoded: unknown): Promise<unknown>;
31
- /** Wake-hinted, poll-guaranteed settlement wait; answers an `AwaitSettlementResponse`. */
32
- awaitSettlementEncoded(encoded: unknown): Promise<unknown>;
33
- /** One bounded page of canonical records; answers an `ObservePageResponse`. */
34
- observePage(encoded: unknown): Promise<unknown>;
35
- /** Durable abort intent; answers an `AbortResponse`. */
36
- abortEncoded(encoded: unknown): Promise<unknown>;
37
- /** Durable approval decision (plan §2.6); answers a `ResolveApprovalResponse`. */
38
- resolveApprovalEncoded(encoded: unknown): Promise<unknown>;
39
- /** Authorized DUR-017 Unknown-Outcome resolution; answers a `ResolveUnknownResponse`. */
40
- resolveUnknownEncoded(encoded: unknown): Promise<unknown>;
41
- /** Owner-side cross-Object port endpoint (WP2 envelopes, executed on LOCAL facets). */
42
- portCall(encoded: unknown): Promise<unknown>;
43
- /** Droppable liveness hint from another Object: arms an immediate alarm. */
44
- wake(): Promise<void>;
45
- }
46
- declare const ConversationObjectNamespace_base: Context.ServiceClass<ConversationObjectNamespace, "@effect-agent/platform-cloudflare/ConversationObjectNamespace", {
47
- readonly namespace: DurableObjectNamespace<ConversationObjectRpc>;
48
- }>;
49
- /**
50
- * The `DurableObjectNamespace` binding that addresses Conversation Objects. The Object
51
- * identity rule is `namespace.idFromName(conversationId)` (plan §1.2): Conversation IDs are
52
- * globally unique, so the mapping is total and deterministic and no directory service exists.
53
- */
54
- declare class ConversationObjectNamespace extends ConversationObjectNamespace_base {
55
- static layer(namespace: DurableObjectNamespace<ConversationObjectRpc>): Layer.Layer<ConversationObjectNamespace>;
56
- }
57
- /**
58
- * Narrow one `env` member to a `DurableObjectNamespace`. `env` is an untyped platform value,
59
- * and a namespace binding is a host object no Schema can decode, so this is the documented
60
- * narrowest-boundary check (structural probe for the namespace surface the transport uses);
61
- * a missing or misshaped binding fails typed before any Layer is built.
62
- */
63
- declare const conversationNamespaceFromEnv: (env: unknown, binding: string) => Effect.Effect<DurableObjectNamespace<ConversationObjectRpc>, CloudflareBindingError>;
64
- /** `ConversationObjectNamespace` built from the untyped Worker `env` (fails typed). */
65
- declare const conversationNamespaceLayer: (env: unknown, binding: string) => Layer.Layer<ConversationObjectNamespace, CloudflareBindingError>;
66
- declare const DurableObjectContext_base: Context.ServiceClass<DurableObjectContext, "@effect-agent/platform-cloudflare/DurableObjectContext", {
67
- readonly ctx: DurableObjectState;
68
- readonly env: unknown;
69
- }>;
70
- /**
71
- * The live Durable Object execution context of THIS incarnation. Only Layer construction and
72
- * the alarm service consume it; important state never lives on it (`ctx.storage` is truth,
73
- * everything in memory is a cache — deployment spec §11).
74
- */
75
- declare class DurableObjectContext extends DurableObjectContext_base {
76
- static layer(ctx: DurableObjectState, env: unknown): Layer.Layer<DurableObjectContext>;
77
- }
78
- declare const ConversationObjectIdentity_base: Context.ServiceClass<ConversationObjectIdentity, "@effect-agent/platform-cloudflare/ConversationObjectIdentity", {
79
- readonly conversationId: ConversationId;
80
- readonly producerId: ProducerId;
81
- }>;
82
- /**
83
- * The Conversation identity this Object serializes and the producer identity its Attempts
84
- * write with (`{producerPrefix}:{conversationId}`, plan §1.4). Derived once per incarnation
85
- * from `ctx.id.name` — the Object identity rule guarantees the name IS the Conversation ID.
86
- */
87
- declare class ConversationObjectIdentity extends ConversationObjectIdentity_base {}
88
- //#endregion
89
- //#region src/config.d.ts
90
- declare const CloudflarePlatformConfigError_base: Schema.Class<CloudflarePlatformConfigError, Schema.TaggedStruct<"CloudflarePlatformConfigError", {
91
- readonly message: Schema.String;
92
- readonly cause: Schema.optionalKey<Schema.Defect>;
93
- }>, import("effect/Cause").YieldableError>;
94
- /** The supplied Cloudflare durable runtime configuration failed validation (DEPLOY-003). */
95
- declare class CloudflarePlatformConfigError extends CloudflarePlatformConfigError_base {}
96
- declare const AdmissionLimitExceeded_base: Schema.Class<AdmissionLimitExceeded, Schema.TaggedStruct<"AdmissionLimitExceeded", {
97
- readonly limit: Schema.Literals<readonly ["queue-depth", "input-bytes", "database-bytes"]>;
98
- readonly actual: Schema.Int;
99
- readonly maximum: Schema.Int;
100
- }>, import("effect/Cause").YieldableError>;
101
- /**
102
- * An admission was refused by a host resource limit BEFORE any ledger row existed
103
- * (deployment spec §8, DEPLOY-007: "Admission has explicit bounded quota and overload
104
- * behavior... a typed rejection"). This is the DC analogue of `NodeDurableHost`'s
105
- * `AdmissionClosed` host gate: the port surface stays untouched, the refusal happens in the
106
- * Conversation Object's submit entry point before `DurableAgentRuntime.submit` runs, and
107
- * nothing was admitted or written.
108
- */
109
- declare class AdmissionLimitExceeded extends AdmissionLimitExceeded_base {
110
- get message(): string;
111
- }
112
- /** The platform's hard per-Object database cap (10 GB, developers.cloudflare.com limits). */
113
- declare const CLOUDFLARE_DATABASE_CAP_BYTES = 10000000000;
114
- /** Default database-size admission ceiling: a 1 GB safety margin under the platform cap. */
115
- declare const DEFAULT_MAX_DATABASE_BYTES = 9000000000;
116
- declare const CloudflareAdmissionLimitsValue_base: Schema.Class<CloudflareAdmissionLimitsValue, Schema.Struct<{
117
- /** Maximum nonterminal Submissions per Conversation lane before new admissions refuse. */
118
- readonly maxQueueDepthPerLane: Schema.Int;
119
- /** Maximum encoded input bytes; never above the storage per-value bound. */
120
- readonly maxInputBytes: Schema.Int;
121
- /** Maximum `ctx.storage.sql.databaseSize` at admission; stays under the 10 GB platform cap. */
122
- readonly maxDatabaseBytes: Schema.Int;
123
- }>, {}>;
124
- /**
125
- * Explicit bounded admission quotas checked by the Conversation Object BEFORE admission
126
- * (exit gate "resource limits are checked before admission").
127
- */
128
- declare class CloudflareAdmissionLimitsValue extends CloudflareAdmissionLimitsValue_base {}
129
- declare const CloudflareDurableRuntimeConfigValue_base: Schema.Class<CloudflareDurableRuntimeConfigValue, Schema.Struct<{
130
- readonly deploymentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/session/DeploymentId">;
131
- /** Head of the minted producer identity `{producerPrefix}:{conversationId}`. */
132
- readonly producerPrefix: Schema.NonEmptyString;
133
- /** Submission ownership lease duration (D5); fences work across Object incarnations. */
134
- readonly ownershipLeaseDuration: Schema.Int;
135
- /** Base delay of the alarm re-arm backoff when a pass makes no progress. */
136
- readonly alarmBackoffBase: Schema.Int;
137
- /** Ceiling of the alarm re-arm backoff. */
138
- readonly alarmBackoffCap: Schema.Int;
139
- /**
140
- * The maintenance-pass scan cadence and the ceiling of every re-arm delay: nonterminal
141
- * work is revisited at least this often (wake/scan pairing, persistence §14).
142
- */
143
- readonly wakeScanInterval: Schema.Int;
144
- /** `awaitSettlement` ledger re-check cadence when no wake arrives. */
145
- readonly settlementPollInterval: Schema.Int;
146
- /** Worker ownership-lease renewal cadence during an active Attempt. */
147
- readonly leaseRenewalInterval: Schema.Int;
148
- /** Active-Run abort-intent poll cadence. */
149
- readonly abortPollInterval: Schema.Int;
150
- /** Canonical observation poll cadence of the Durable Object store. */
151
- readonly observationPollInterval: Schema.Int;
152
- /** Cooperative background-export budget; native Object delivery never awaits the flush. */
153
- readonly telemetryFlushTimeout: Schema.Int;
154
- /** Per-value byte bound; must stay under the platform's 2 MB SQLite value limit. */
155
- readonly maxStoredValueBytes: Schema.Int;
156
- /** Opt-in full payload/digest-chain audit while opening the store. */
157
- readonly verifyOnOpen: Schema.Boolean;
158
- readonly limits: typeof CloudflareAdmissionLimitsValue;
159
- }>, {}>;
160
- /**
161
- * Validated Cloudflare durable runtime configuration. The producer identity of one
162
- * Conversation Object is `{producerPrefix}:{conversationId}` — stable across incarnations of
163
- * the same deployment, distinct across deployments — and producer-epoch fencing (not the
164
- * producer name) remains the correctness authority (DUR-006).
165
- */
166
- declare class CloudflareDurableRuntimeConfigValue extends CloudflareDurableRuntimeConfigValue_base {}
167
- declare const CloudflareDurableRuntimeConfig_base: Context.ServiceClass<CloudflareDurableRuntimeConfig, "@effect-agent/platform-cloudflare/CloudflareDurableRuntimeConfig", CloudflareDurableRuntimeConfigValue>;
168
- /** Explicit configuration authority for the assembled Cloudflare durable runtime. */
169
- declare class CloudflareDurableRuntimeConfig extends CloudflareDurableRuntimeConfig_base {}
170
- /** Documented production defaults applied by `CloudflareDurableRuntime.layer`. */
171
- declare const CLOUDFLARE_RUNTIME_DEFAULTS: {
172
- readonly ownershipLeaseDuration: number;
173
- readonly alarmBackoffBase: 100;
174
- readonly alarmBackoffCap: 5000;
175
- readonly wakeScanInterval: 1000;
176
- readonly settlementPollInterval: 500;
177
- readonly leaseRenewalInterval: 10000;
178
- readonly abortPollInterval: 500;
179
- readonly observationPollInterval: 25;
180
- readonly telemetryFlushTimeout: 2000;
181
- readonly maxStoredValueBytes: 1900000;
182
- readonly verifyOnOpen: false;
183
- readonly maxQueueDepthPerLane: 256;
184
- readonly maxInputBytes: 1900000;
185
- readonly maxDatabaseBytes: 9000000000;
186
- };
187
- //#endregion
188
- //#region src/alarm.d.ts
189
- declare const DurableAlarmError_base: Schema.Class<DurableAlarmError, Schema.TaggedStruct<"DurableAlarmError", {
190
- readonly operation: Schema.String;
191
- readonly message: Schema.String;
192
- readonly cause: Schema.optionalKey<Schema.Defect>;
193
- }>, import("effect/Cause").YieldableError>;
194
- /**
195
- * The single multiplexed Durable Object alarm (decision D-P6-2). A Durable Object has ONE
196
- * alarm slot; every cadence the Node host ran on fibers (wake scan, lease expiry, settlement
197
- * and abort re-checks, retry backoff) multiplexes into one idempotent maintenance pass, and
198
- * the slot always holds the EARLIEST deadline any caller asked for.
199
- *
200
- * The alarm invariant (plan §1.4): committed nonterminal work implies a committed alarm.
201
- * It is established by pre-arming — every mutating entry point and every pass arms the alarm
202
- * BEFORE its durable mutations — so an eviction at any failpoint leaves a persisted alarm
203
- * that workerd re-delivers to a fresh incarnation WITHOUT any incoming request. Spurious
204
- * alarms are harmless by design: a pass over an all-settled lane simply deletes the slot.
205
- */
206
- /** The Durable Object alarm API failed; surfaces on host entry points as a typed refusal. */
207
- declare class DurableAlarmError extends DurableAlarmError_base {}
208
- declare const DurableAlarmService_base: Context.ServiceClass<DurableAlarmService, "@effect-agent/platform-cloudflare/DurableAlarmService", {
209
- /** The scheduled deadline in epoch milliseconds, if any. */
210
- readonly scheduled: Effect.Effect<Option.Option<number>, DurableAlarmError>;
211
- /** Replace the slot with this deadline. */
212
- readonly scheduleAt: (epochMillis: number) => Effect.Effect<void, DurableAlarmError>;
213
- /** Keep the EARLIER of the existing deadline and this one (the multiplexing rule). */
214
- readonly ensureScheduledBy: (epochMillis: number) => Effect.Effect<void, DurableAlarmError>;
215
- /**
216
- * Arm an immediate alarm (the durable, coalescing local wake) — DEFERRED while a
217
- * maintenance pass is executing. Workerd cancels an in-flight alarm handler when a new
218
- * EARLIER deadline is written during its execution (`requestScheduledAlarm`), and the
219
- * maintenance pass runs INSIDE the alarm handler: an immediate wake landing mid-pass
220
- * (a routed port mutation, a sibling's `wake()`, the coordinator's own local notify)
221
- * would kill the running Attempt — manufacturing an ownership loss no real eviction
222
- * caused, and routing open uncertain-class Tool Calls into spurious Unknown Outcomes.
223
- * Deferral is contract-safe: wakes are droppable hints, every mutating entry point
224
- * pre-arms BEFORE its first durable mutation (the alarm invariant never rests on this
225
- * call), and the deferred wake is flushed when the pass completes.
226
- */
227
- readonly scheduleNow: Effect.Effect<void, DurableAlarmError>;
228
- /**
229
- * Run one maintenance pass with wake deferral (see `scheduleNow`): `scheduleNow` calls
230
- * while `body` executes coalesce into one flag, flushed as an immediate re-arm after the
231
- * pass — failures of the flush are logged and swallowed (hints are droppable; the pass's
232
- * own re-arm policy already bounded the next delivery).
233
- */
234
- readonly withWakesDeferred: <A, E, R>(body: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
235
- /** Clear the slot; only the maintenance pass does this, and only when all work settled. */
236
- readonly cancel: Effect.Effect<void, DurableAlarmError>;
237
- }>;
238
- /** `ctx.storage` alarm slot as an Effect service; storage is truth, never a memory field. */
239
- declare class DurableAlarmService extends DurableAlarmService_base {
240
- static readonly layer: Layer.Layer<DurableAlarmService, never, DurableObjectContext>;
241
- }
242
- declare const MaintenancePassReport_base: Schema.Class<MaintenancePassReport, Schema.Struct<{
243
- /** Recovery decisions executed (or deferred) BEFORE any new claim in this pass. */
244
- readonly recovered: Schema.Int;
245
- /** Settlements the drain pass finalized. */
246
- readonly settled: Schema.Int;
247
- /** Submissions still nonterminal after the pass (suspended/unknown lanes stay honest). */
248
- readonly nonterminal: Schema.Int;
249
- /** `rearmed` while nonterminal work remains, `cleared` once everything settled. */
250
- readonly alarm: Schema.Literals<readonly ["rearmed", "cleared"]>;
251
- }>, {}>;
252
- /** What one maintenance pass did — auditable evidence mirroring `NodeDurableHost`'s report. */
253
- declare class MaintenancePassReport extends MaintenancePassReport_base {}
254
- type MaintenancePassFailure = DurableWorkerFailure | DurableBindingFailure | DurableAlarmError;
255
- declare const ConversationMaintenance_base: Context.ServiceClass<ConversationMaintenance, "@effect-agent/platform-cloudflare/ConversationMaintenance", {
256
- /** One idempotent maintenance pass; failures propagate so workerd retries the alarm. */
257
- readonly pass: Effect.Effect<MaintenancePassReport, MaintenancePassFailure>;
258
- /**
259
- * Defensive half of the alarm invariant, run by the constructor gate: if any local
260
- * Submission is nonterminal and no alarm is scheduled, arm one within the scan interval.
261
- * Local-only (one ledger scan + the alarm slot) — never a recovery pass, never transport.
262
- */
263
- readonly ensureAlarm: Effect.Effect<void, MaintenancePassFailure>;
264
- /**
265
- * The pre-arm every mutating entry point runs BEFORE its first durable mutation: with
266
- * the alarm committed first, a committed admission (or any other committed nonterminal
267
- * transition) can never be observed without the alarm that will finish it.
268
- */
269
- readonly preArm: Effect.Effect<void, DurableAlarmError>;
270
- }>;
271
- /**
272
- * The idempotent maintenance pass and the alarm-invariant helpers (plan §1.4, D-P6-1/2).
273
- *
274
- * `pass` = pre-arm → `runRecovery` → `processConversationResolved` → re-arm-or-clear:
275
- *
276
- * 1. **Pre-arm**: the alarm is re-armed at `now + wakeScanInterval` BEFORE any work, so an
277
- * eviction (or thrown failure → workerd alarm retry) at any point of the pass leaves a
278
- * committed alarm and the fresh incarnation converges without an incoming request.
279
- * 2. **Reconcile before new work** (exit gate): every pass classifies and repairs every
280
- * nonterminal Submission before the drain claims anything; the pure classifier and the
281
- * repair executors are idempotent, so at-least-once alarm delivery re-runs them safely.
282
- * 3. **Drain**: one bounded `processConversationResolved` pass over this Object's lane — the
283
- * D-P6-1 shape; no infinite `runResolvedWorker` loop ever pins the Object.
284
- * 4. **Re-arm policy**: nonterminal work re-arms at `now + min(backoff-with-jitter,
285
- * wakeScanInterval)` — the scan interval bounds every wait (lease expiry of a dead
286
- * incarnation included, since claims retry each pass) and the backoff (reset on progress,
287
- * grown otherwise) keeps stuck lanes from busy-spinning; all settled clears the slot.
288
- *
289
- * Every step is a durability-protocol step that already tolerates re-execution, which is
290
- * what makes double-fired alarms harmless (the alarm.test.ts gate).
291
- */
292
- declare class ConversationMaintenance extends ConversationMaintenance_base {
293
- static readonly layer: Layer.Layer<ConversationMaintenance, never, DurableAgentRuntime | AgentBindingResolver | SubmissionLedger | DurableAlarmService | CloudflareDurableRuntimeConfig | ConversationObjectIdentity>;
294
- }
295
- //#endregion
296
- //#region src/wake-scheduler.d.ts
297
- /**
298
- * The DC `WakeScheduler` (plan §1.4):
299
- *
300
- * - `notify(local)` → `setAlarm(now)` — durable, cheap, coalescing (the alarm slot keeps the
301
- * earliest deadline) — plus a same-incarnation PubSub hint for `awaitSettlement` waiters.
302
- * - `notify(remote)` → fire-and-forget `wake()` on the owning Object's stub with every error
303
- * swallowed and logged: hints are droppable, and the target's own alarm/scan pairing (the
304
- * maintenance pass re-polls unsettled children) guarantees liveness without this call.
305
- * - `wakes` → the bounded sliding PubSub only. No important state lives in memory: the
306
- * subscription accelerates waiters within one incarnation and the settlement poll interval
307
- * is the correctness path.
308
- */
309
- declare const cloudflareWakeSchedulerLayer: Layer.Layer<WakeScheduler, never, DurableAlarmService | ConversationObjectIdentity | ConversationObjectNamespace>;
310
- //#endregion
311
- //#region src/transport.d.ts
312
- /**
313
- * `ConversationPortTransport` over native Durable Object JS RPC (decision D-P6-3): one
314
- * `portCall(envelope)` on the stub of the Object that owns the addressed Conversation
315
- * (`namespace.idFromName(conversationId)` — the identity rule, plan §1.2). The envelopes are
316
- * already Schema-encoded JSON, so the RPC boundary carries only structured-cloneable values;
317
- * the protocol module stays transport-agnostic and fetch-with-JSON remains the documented
318
- * fallback carrier.
319
- *
320
- * Every delivery problem — stub construction, RPC rejection, overload, deploy-in-progress —
321
- * surfaces as `PortTransportError` (preserving the platform stub's own `retryable` signal
322
- * when present) and NEVER as a fabricated answer: on `resolveAdmission` the routing layer
323
- * turns exactly this error into `AdmissionIndeterminate` (SUB-031).
324
- */
325
- declare const conversationPortTransportLayer: Layer.Layer<ConversationPortTransport, never, ConversationObjectNamespace>;
326
- //#endregion
327
- //#region src/telemetry.d.ts
328
- declare const CloudflareTelemetryExportError_base: Schema.Class<CloudflareTelemetryExportError, Schema.TaggedStruct<"CloudflareTelemetryExportError", {
329
- /** The original exporter failure, retained for host-side diagnostics. */
330
- readonly cause: Schema.Defect;
331
- }>, import("effect/Cause").YieldableError>;
332
- /** A host exporter failed during one coalesced background export attempt. */
333
- declare class CloudflareTelemetryExportError extends CloudflareTelemetryExportError_base {}
334
- declare const CloudflareRuntimeTelemetry_base: Context.ServiceClass<CloudflareRuntimeTelemetry, "@effect-agent/platform-cloudflare/CloudflareRuntimeTelemetry", {
335
- readonly flush: Effect.Effect<void, CloudflareTelemetryExportError>;
336
- }>;
337
- /**
338
- * Host-owned exporter lifecycle for one Cloudflare Conversation Object incarnation.
339
- *
340
- * The platform package creates measurements but deliberately does not select an exporter or
341
- * vendor. Native entrypoint instrumentation consumes this service at the Worker composition edge;
342
- * applications pass its provider as the second `makeConversationObjectClass` argument together
343
- * with their Effect Logger, Tracer, and Metric layers. That provider may read `DurableObjectContext` or
344
- * `ConversationObjectNamespace`, and its typed acquisition error remains visible in construction.
345
- * `flush` must attempt to export every configured signal. After the native span closes, the
346
- * Conversation Object reserves it into a shared post-settlement batch before `ctx.waitUntil` under
347
- * a cooperative timeout. Only each pending/trailing/queued batch's first owner registers its
348
- * shared Promise. Cycles remain capped at one first exporter attempt plus at most one trailing
349
- * attempt, with one queued cycle while trailing runs; exporter completion never holds endpoint
350
- * delivery open and exporter failure never replaces endpoint behavior.
351
- */
352
- declare class CloudflareRuntimeTelemetry extends CloudflareRuntimeTelemetry_base {
353
- /** Content-free default selected by `makeConversationObjectClass` when no host Layer is passed. */
354
- static readonly layerNoop: Layer.Layer<CloudflareRuntimeTelemetry, never, never>;
355
- }
356
- //#endregion
357
- //#region src/layers.d.ts
358
- /**
359
- * Raw (unvalidated) construction options for `CloudflareDurableRuntime.layer`, mirroring
360
- * `NodeDurableRuntimeOptions`. Optional fields default to the documented production values
361
- * (`CLOUDFLARE_RUNTIME_DEFAULTS`); everything is schema-decoded into
362
- * `CloudflareDurableRuntimeConfigValue` before any resource opens (deployment §5 gate 1).
363
- */
364
- interface CloudflareDurableRuntimeOptions {
365
- readonly deploymentId: string;
366
- /** Head of the minted producer identity `{producerPrefix}:{conversationId}`. */
367
- readonly producerPrefix: string;
368
- /** Milliseconds; default 30s (D5). */
369
- readonly ownershipLeaseDuration?: number | undefined;
370
- /** Milliseconds; default 100. */
371
- readonly alarmBackoffBase?: number | undefined;
372
- /** Milliseconds; default 5000. */
373
- readonly alarmBackoffCap?: number | undefined;
374
- /** Milliseconds; default 1000. Bounds every alarm re-arm delay. */
375
- readonly wakeScanInterval?: number | undefined;
376
- /** Milliseconds; default 500. */
377
- readonly settlementPollInterval?: number | undefined;
378
- /** Milliseconds; default 10000. */
379
- readonly leaseRenewalInterval?: number | undefined;
380
- /** Milliseconds; default 500. */
381
- readonly abortPollInterval?: number | undefined;
382
- /** Milliseconds; default 25. */
383
- readonly observationPollInterval?: number | undefined;
384
- /**
385
- * Milliseconds; default 2000. Cooperative budget for the background exporter flush registered
386
- * after each native RPC, wake, or alarm span. Delivery never awaits the flush.
387
- */
388
- readonly telemetryFlushTimeout?: number | undefined;
389
- /** Bytes; default just under the 2 MB platform value limit. */
390
- readonly maxStoredValueBytes?: number | undefined;
391
- /** Default false. */
392
- readonly verifyOnOpen?: boolean | undefined;
393
- /** Nonterminal Submissions per lane before admission refuses; default 256. */
394
- readonly maxQueueDepthPerLane?: number | undefined;
395
- /** Encoded input bytes per Submission; default = the stored-value bound. */
396
- readonly maxInputBytes?: number | undefined;
397
- /** `ctx.storage.sql.databaseSize` ceiling at admission; default 9 GB (10 GB platform cap). */
398
- readonly maxDatabaseBytes?: number | undefined;
399
- /**
400
- * Durable Object storage fault injection (`ledger:*` / `append:*` locations). Handlers are
401
- * constructed per incarnation WITH the live `DurableObjectState`, so eviction harnesses can
402
- * map an armed hit to `ctx.abort()` — the platform's real failure mode. Default none.
403
- */
404
- readonly storageFailpoint?: ((ctx: DurableObjectState) => DoStorageFailpointHandler) | undefined;
405
- /** Coordinator fault injection (`submit:*` / `terminalize:*` locations); default none. */
406
- readonly runtimeFailpoint?: ((ctx: DurableObjectState) => DurableRuntimeFailpointHandler) | undefined;
407
- /**
408
- * Reconciliation policy consulted for open ordinary Tool Calls before an Unknown Outcome
409
- * is recorded (durability §10, DUR-009). Defaults to the fail-closed
410
- * `ToolReconciler.uncertain`.
411
- */
412
- readonly toolReconciler?: Layer.Layer<ToolReconciler> | undefined;
413
- /**
414
- * Registered worker Bindings resolved at durable claim time (S2, spec/subagents.md §11):
415
- * build each with `DurableWorkerBinding.make(binding, digests)`. An Effect or callback form is
416
- * accepted because capture can be effectful. The callback receives the live Object context and
417
- * derived identities and is evaluated once per incarnation during Layer construction. Defaults
418
- * to the empty registration (every resolved claim fails closed).
419
- */
420
- readonly bindings?: CloudflareBindingSource | undefined;
421
- }
422
- /** Per-incarnation host values available while registered worker Bindings are captured. */
423
- interface CloudflareBindingSourceContext {
424
- readonly ctx: DurableObjectState;
425
- readonly env: unknown;
426
- readonly conversationId: ConversationId;
427
- readonly producerId: ProducerId;
428
- }
429
- /**
430
- * Registered worker Bindings, or a closed Effect/callback that captures them once for each
431
- * Durable Object incarnation. Callback Effects cannot require services or fail typed.
432
- */
433
- type CloudflareBindingSource = ReadonlyArray<ResolvedBinding> | Effect.Effect<ReadonlyArray<ResolvedBinding>, never, never> | ((context: CloudflareBindingSourceContext) => ReadonlyArray<ResolvedBinding> | Effect.Effect<ReadonlyArray<ResolvedBinding>, never, never>);
434
- /** Every construction failure of the assembled Cloudflare durable runtime stack. */
435
- type CloudflareDurableRuntimeInitializationError = CloudflarePlatformConfigError | DoStorageInitializationError;
436
- /** The services `CloudflareDurableRuntime.layer` provides. */
437
- type CloudflareDurableRuntimeServices = DurableAgentRuntime | SubmissionLedger | ConversationStore | WakeScheduler | DurableRuntimeConfig | AgentBindingResolver | CloudflareDurableRuntimeConfig | ConversationObjectIdentity | DurableAlarmService | ConversationMaintenance | ConversationObjectPorts;
438
- declare const ConversationObjectPorts_base: Context.ServiceClass<ConversationObjectPorts, "@effect-agent/platform-cloudflare/ConversationObjectPorts", {
439
- readonly handle: (encoded: unknown) => Effect.Effect<unknown>;
440
- }>;
441
- /**
442
- * Owner-side endpoint body for the Conversation Object's `portCall` (plan §1.3): decode,
443
- * execute against THIS Object's LOCAL port facets — never the routed decorators, so a
444
- * request cannot bounce between Objects — and answer the encoded response envelope. Total by
445
- * construction (protocol anomalies answer `PortFailed(PortProtocolError)`).
446
- */
447
- declare class ConversationObjectPorts extends ConversationObjectPorts_base {}
448
- /**
449
- * The DC Layer assembly (deployment §12: a Layer-assembly library, not an app entrypoint;
450
- * plan §1.4). `layer(options)` decodes the configuration, derives this Object's Conversation
451
- * and producer identities, opens the Object's private SQLite database through
452
- * `@effect/sql-sqlite-do` for BOTH the Conversation Log and the Submission Ledger (so claims
453
- * fence the same producer epochs — ADR-0011 D7 transposed), wraps the local port facets with
454
- * the WP2 cross-Object routing decorators over the Durable Object RPC transport, wires the
455
- * alarm-backed wake scheduler and the maintenance pass, defaults reconciliation to the
456
- * fail-closed `ToolReconciler.uncertain`, and provides a ready `DurableAgentRuntime` on top.
457
- *
458
- * Storage compatibility is verified during construction: an incompatible database fails the
459
- * Layer typed (`DoStorageCompatibilityError`) before anything is mutated (DEPLOY-008).
460
- *
461
- * Requires the two binding services (`DurableObjectContext`, `ConversationObjectNamespace`).
462
- * Host observability belongs to the Worker composition edge because native entrypoint lifecycle
463
- * instrumentation, rather than this durable runtime assembly, consumes it (DEPLOY-010).
464
- */
465
- declare class CloudflareDurableRuntime {
466
- static layer(options: CloudflareDurableRuntimeOptions): Layer.Layer<CloudflareDurableRuntimeServices, CloudflareDurableRuntimeInitializationError, DurableObjectContext | ConversationObjectNamespace>;
467
- }
468
- //#endregion
469
- //#region src/client.d.ts
470
- /** Truncate a diagnostic string to the host protocol's bounded length. */
471
- declare const boundHostDiagnostic: (value: string) => string;
472
- declare const HostProtocolError_base: Schema.Class<HostProtocolError, Schema.TaggedStruct<"HostProtocolError", {
473
- readonly message: Schema.String;
474
- }>, import("effect/Cause").YieldableError>;
475
- /**
476
- * The envelope itself could not be honored: the Object could not decode the request, or a
477
- * response could not be encoded/decoded. Never carries operation semantics.
478
- */
479
- declare class HostProtocolError extends HostProtocolError_base {}
480
- declare const ConversationClientError_base: Schema.Class<ConversationClientError, Schema.TaggedStruct<"ConversationClientError", {
481
- readonly conversationId: Schema.String;
482
- readonly message: Schema.String;
483
- readonly cause: Schema.optionalKey<Schema.Defect>;
484
- }>, import("effect/Cause").YieldableError>;
485
- /** The Worker-side stub call itself failed (RPC rejection, overload, eviction mid-call). */
486
- declare class ConversationClientError extends ConversationClientError_base {}
487
- declare const SubmitRequest_base: Schema.Class<SubmitRequest, Schema.Struct<{
488
- readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
489
- readonly principal: Schema.brand<Schema.NonEmptyString, "@effect-agent/session/Principal">;
490
- readonly idempotencyKey: Schema.brand<Schema.NonEmptyString, "@effect-agent/session/IdempotencyKey">;
491
- readonly definitions: typeof DefinitionDigests;
492
- readonly inputPayload: Schema.declare<Schema.Json, Schema.Json>;
493
- }>, {}>;
494
- /**
495
- * One durable submission, input ALREADY encoded by the caller through the Agent Binding's
496
- * input schema (the Worker bundles the same Agent definitions as the Object, so schema
497
- * validation happens client-side; the resolved Binding re-validates at claim time). The
498
- * Conversation identity is deliberately absent — the addressed Object IS the lane.
499
- */
500
- declare class SubmitRequest extends SubmitRequest_base {}
501
- declare const ObservePageRequest_base: Schema.Class<ObservePageRequest, Schema.Struct<{
502
- readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/session/CanonicalSequence">>;
503
- readonly limit: Schema.Int;
504
- }>, {}>;
505
- /** One bounded page of canonical records after an optional sequence. */
506
- declare class ObservePageRequest extends ObservePageRequest_base {}
507
- /**
508
- * Every typed failure a host entry point can produce, plus the protocol's own errors. Same
509
- * closed-union discipline as the WP2 `PortFailure`: members re-decode to the SAME tagged
510
- * classes on the Worker side; `cause` chains travel as Schema defects without instance
511
- * fidelity (plan §2.8).
512
- */
513
- declare const HostFailure: Schema.Union<readonly [typeof AgentInputError, typeof DigestError, typeof AdmissionConflict, typeof SettlementConflict, typeof ApprovalConflict, typeof UnknownResolutionConflict, typeof JoinedToHost, typeof LedgerError, typeof ConversationStoreError, typeof ConversationNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof AdmissionLimitExceeded, typeof DurableAlarmError, typeof HostProtocolError]>;
514
- type HostFailure = typeof HostFailure.Type;
515
- declare const SubmitSucceeded_base: Schema.Class<SubmitSucceeded, Schema.TaggedStruct<"SubmitSucceeded", {
516
- readonly receipt: typeof Receipt;
517
- }>, {}>;
518
- declare class SubmitSucceeded extends SubmitSucceeded_base {}
519
- declare const SettlementReached_base: Schema.Class<SettlementReached, Schema.TaggedStruct<"SettlementReached", {
520
- readonly settlement: typeof Settlement;
521
- }>, {}>;
522
- declare class SettlementReached extends SettlementReached_base {}
523
- declare const ObservedPage_base: Schema.Class<ObservedPage, Schema.TaggedStruct<"ObservedPage", {
524
- readonly records: Schema.$Array<typeof CanonicalRecordEnvelope>;
525
- }>, {}>;
526
- declare class ObservedPage extends ObservedPage_base {}
527
- declare const AbortRecorded_base: Schema.Class<AbortRecorded, Schema.TaggedStruct<"AbortRecorded", {
528
- readonly intent: typeof AbortIntent;
529
- }>, {}>;
530
- declare class AbortRecorded extends AbortRecorded_base {}
531
- declare const ApprovalRecorded_base: Schema.Class<ApprovalRecorded, Schema.TaggedStruct<"ApprovalRecorded", {
532
- readonly intent: typeof ApprovalDecisionIntent;
533
- }>, {}>;
534
- declare class ApprovalRecorded extends ApprovalRecorded_base {}
535
- declare const UnknownResolutionRecorded_base: Schema.Class<UnknownResolutionRecorded, Schema.TaggedStruct<"UnknownResolutionRecorded", {
536
- readonly intent: typeof UnknownResolutionIntent;
537
- }>, {}>;
538
- declare class UnknownResolutionRecorded extends UnknownResolutionRecorded_base {}
539
- declare const HostFailed_base: Schema.Class<HostFailed, Schema.TaggedStruct<"HostFailed", {
540
- readonly failure: Schema.Union<readonly [typeof AgentInputError, typeof DigestError, typeof AdmissionConflict, typeof SettlementConflict, typeof ApprovalConflict, typeof UnknownResolutionConflict, typeof JoinedToHost, typeof LedgerError, typeof ConversationStoreError, typeof ConversationNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof AdmissionLimitExceeded, typeof DurableAlarmError, typeof HostProtocolError]>;
541
- }>, {}>;
542
- /** The entry point failed TYPED on the Object; the failure re-decodes verbatim. */
543
- declare class HostFailed extends HostFailed_base {}
544
- /** The uniform answer of one host entry point. Callers narrow by the tag their call implies. */
545
- declare const HostResponse: Schema.Union<readonly [typeof SubmitSucceeded, typeof SettlementReached, typeof ObservedPage, typeof AbortRecorded, typeof ApprovalRecorded, typeof UnknownResolutionRecorded, typeof HostFailed]>;
546
- type HostResponse = typeof HostResponse.Type;
547
- declare const decodeSubmitRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<SubmitRequest, Schema.SchemaError, never>;
548
- declare const encodeSubmitRequest: (input: SubmitRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
549
- readonly agentId: string;
550
- readonly principal: string;
551
- readonly idempotencyKey: string;
552
- readonly definitions: {
553
- readonly agent: string;
554
- readonly model: string;
555
- readonly tools: string;
556
- };
557
- readonly inputPayload: Schema.Json;
558
- }, Schema.SchemaError, never>;
559
- declare const decodeReceipt: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<Receipt, Schema.SchemaError, never>;
560
- declare const encodeReceipt: (input: Receipt, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
561
- readonly receiptId: string;
562
- readonly submissionId: string;
563
- readonly conversationId: string;
564
- readonly queueSequence: number;
565
- }, Schema.SchemaError, never>;
566
- declare const decodeObservePageRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ObservePageRequest, Schema.SchemaError, never>;
567
- declare const encodeObservePageRequest: (input: ObservePageRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
568
- readonly afterSequence?: number | undefined;
569
- readonly limit: number;
570
- }, Schema.SchemaError, never>;
571
- declare const decodeAbortCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortCommand, Schema.SchemaError, never>;
572
- declare const encodeAbortCommand: (input: AbortCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
573
- readonly submissionId: string;
574
- readonly author: string;
575
- readonly reason: string;
576
- }, Schema.SchemaError, never>;
577
- declare const decodeApprovalDecisionCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ApprovalDecisionCommand, Schema.SchemaError, never>;
578
- declare const encodeApprovalDecisionCommand: (input: ApprovalDecisionCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
579
- readonly submissionId: string;
580
- readonly toolCallId: string;
581
- readonly decision: "approved" | "denied";
582
- readonly resolver: string;
583
- readonly reason: string;
584
- }, Schema.SchemaError, never>;
585
- declare const decodeUnknownResolutionCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<UnknownResolutionCommand, Schema.SchemaError, never>;
586
- declare const encodeUnknownResolutionCommand: (input: UnknownResolutionCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
587
- readonly submissionId: string;
588
- readonly toolCallId: string;
589
- readonly author: string;
590
- readonly reason: string;
591
- readonly resolution: {
592
- readonly _tag: "CompletedWithResult";
593
- readonly result: Schema.Json;
594
- readonly isFailure: boolean;
595
- } | {
596
- readonly _tag: "NeverHappened";
597
- } | {
598
- readonly _tag: "SafeToRetry";
599
- } | {
600
- readonly _tag: "AbortSubmission";
601
- };
602
- }, Schema.SchemaError, never>;
603
- declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | SettlementReached | SubmitSucceeded | UnknownResolutionRecorded, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
604
- readonly _tag: "SubmitSucceeded";
605
- readonly receipt: {
606
- readonly receiptId: string;
607
- readonly submissionId: string;
608
- readonly conversationId: string;
609
- readonly queueSequence: number;
610
- };
611
- } | {
612
- readonly _tag: "SettlementReached";
613
- readonly settlement: {
614
- readonly submissionId: string;
615
- readonly settlementId: string;
616
- readonly receiptId: string;
617
- readonly outcome: "aborted" | "completed" | "failed";
618
- readonly settledAt: string;
619
- };
620
- } | {
621
- readonly _tag: "ObservedPage";
622
- readonly records: readonly {
623
- readonly conversationId: string;
624
- readonly batchId: string;
625
- readonly sequence: number;
626
- readonly offset: string;
627
- readonly record: {
628
- readonly recordId: string;
629
- readonly family: "conversation";
630
- readonly schemaVersion: 1;
631
- readonly createdAt: string;
632
- readonly deploymentId: string;
633
- readonly payload: {
634
- readonly _tag: "ConversationCreated";
635
- readonly agentId: string;
636
- readonly definitions: {
637
- readonly agent: string;
638
- readonly model: string;
639
- readonly tools: string;
640
- };
641
- } | {
642
- readonly _tag: "UserInputRecorded";
643
- readonly submissionId: string;
644
- readonly kind: "follow-up" | "steering" | "user";
645
- readonly runId?: string | undefined;
646
- readonly input: Schema.Json;
647
- } | {
648
- readonly _tag: "ModelCompleted";
649
- readonly runId: string;
650
- readonly output: Schema.Json;
651
- } | {
652
- readonly _tag: "ModelResponseRecorded";
653
- readonly runId: string;
654
- readonly turnId: string;
655
- readonly turn: number;
656
- readonly messages: Schema.Json;
657
- readonly messagesDigest: string;
658
- } | {
659
- readonly _tag: "ToolCallPrepared";
660
- readonly runId: string;
661
- readonly turnId: string;
662
- readonly turn: number;
663
- readonly toolCallId: string;
664
- readonly toolName: string;
665
- readonly parameters: Schema.Json;
666
- readonly parametersDigest: string;
667
- } | {
668
- readonly _tag: "ToolCallSettled";
669
- readonly runId: string;
670
- readonly toolCallId: string;
671
- readonly toolName: string;
672
- readonly result: Schema.Json;
673
- readonly isFailure: boolean;
674
- } | {
675
- readonly _tag: "ToolCallUnknown";
676
- readonly runId: string;
677
- readonly turn: number;
678
- readonly toolCallId: string;
679
- readonly toolName: string;
680
- readonly reason: string;
681
- } | {
682
- readonly _tag: "ToolCallResolved";
683
- readonly runId: string;
684
- readonly toolCallId: string;
685
- readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
686
- readonly author: string;
687
- readonly reason: string;
688
- } | {
689
- readonly _tag: "ToolStepSettled";
690
- readonly runId: string;
691
- readonly toolCallId: string;
692
- readonly stepName: string;
693
- readonly output: Schema.Json;
694
- readonly outputDigest: string;
695
- } | {
696
- readonly _tag: "ToolApprovalRequested";
697
- readonly runId: string;
698
- readonly turnId: string;
699
- readonly turn: number;
700
- readonly toolCallId: string;
701
- readonly toolName: string;
702
- readonly parametersDigest: string;
703
- } | {
704
- readonly _tag: "ToolApprovalDecided";
705
- readonly runId: string;
706
- readonly turn: number;
707
- readonly toolCallId: string;
708
- readonly decision: "approved" | "denied";
709
- readonly resolver: string;
710
- readonly reason: string;
711
- } | {
712
- readonly _tag: "ModelResponseInterrupted";
713
- readonly runId: string;
714
- readonly supersededEpoch: number;
715
- readonly attemptId: string;
716
- readonly reason: string;
717
- } | {
718
- readonly _tag: "CompactionCreated";
719
- readonly runId: string;
720
- readonly sourceDigest: string;
721
- readonly summary: string;
722
- } | {
723
- readonly _tag: "RunFailed";
724
- readonly runId: string;
725
- readonly failure: Schema.Json;
726
- } | {
727
- readonly _tag: "RunCompleted";
728
- readonly runId: string;
729
- readonly output: Schema.Json;
730
- } | {
731
- readonly _tag: "AbortRequested";
732
- readonly submissionId: string;
733
- readonly author: string;
734
- readonly reason: string;
735
- } | {
736
- readonly _tag: "SubmissionSettled";
737
- readonly submissionId: string;
738
- readonly settlementId: string;
739
- readonly receiptId: string;
740
- readonly outcome: "aborted" | "completed" | "failed";
741
- readonly runId?: string | undefined;
742
- readonly result?: Schema.Json | undefined;
743
- } | {
744
- readonly _tag: "SubagentRequested";
745
- readonly runId: string;
746
- readonly turnId: string;
747
- readonly turn: number;
748
- readonly toolCallId: string;
749
- readonly delegationId: string;
750
- readonly targetAgentId: string;
751
- readonly targetDigests: {
752
- readonly agent: string;
753
- readonly model: string;
754
- readonly tools: string;
755
- };
756
- readonly childInput: Schema.Json;
757
- readonly childInputDigest: string;
758
- readonly grantDigest: string;
759
- readonly reservationId: string;
760
- readonly reservationDigest: string;
761
- readonly childConversationId: string;
762
- readonly childPrincipal: string;
763
- readonly childIdempotencyKey: string;
764
- } | {
765
- readonly _tag: "SubagentStarted";
766
- readonly runId: string;
767
- readonly toolCallId: string;
768
- readonly childConversationId: string;
769
- readonly childSubmissionId: string;
770
- readonly childReceiptId: string;
771
- readonly childRunId: string;
772
- } | {
773
- readonly _tag: "SubagentJoined";
774
- readonly runId: string;
775
- readonly toolCallId: string;
776
- readonly childSubmissionId: string;
777
- readonly childSettlementId: string;
778
- readonly childOutcome: "aborted" | "completed" | "failed";
779
- readonly childResultDigest: string;
780
- readonly projectedResultDigest: string;
781
- readonly usageSummary: Schema.Json;
782
- readonly reservationId: string;
783
- readonly finalAccounting: Schema.Json;
784
- } | {
785
- readonly _tag: "SubagentLineageRecorded";
786
- readonly parentLink: {
787
- readonly delegationId: string;
788
- readonly parentAgentId: string;
789
- readonly parentConversationId: string;
790
- readonly parentRunId: string;
791
- readonly parentToolCallId: string;
792
- readonly depth: number;
793
- };
794
- readonly parentSubmissionId: string;
795
- readonly childDefinitionDigests: {
796
- readonly agent: string;
797
- readonly model: string;
798
- readonly tools: string;
799
- };
800
- readonly childInputDigest: string;
801
- readonly grantDigest: string;
802
- } | {
803
- readonly _tag: "RepairAnnotated";
804
- readonly reason: string;
805
- readonly details: Schema.Json;
806
- };
807
- };
808
- }[];
809
- } | {
810
- readonly _tag: "AbortRecorded";
811
- readonly intent: {
812
- readonly submissionId: string;
813
- readonly author: string;
814
- readonly reason: string;
815
- readonly requestedAt: string;
816
- readonly canonicalRecordId?: string | undefined;
817
- };
818
- } | {
819
- readonly _tag: "ApprovalRecorded";
820
- readonly intent: {
821
- readonly submissionId: string;
822
- readonly toolCallId: string;
823
- readonly decision: "approved" | "denied";
824
- readonly resolver: string;
825
- readonly reason: string;
826
- readonly decidedAt: string;
827
- readonly canonicalRecordId?: string | undefined;
828
- };
829
- } | {
830
- readonly _tag: "UnknownResolutionRecorded";
831
- readonly intent: {
832
- readonly submissionId: string;
833
- readonly toolCallId: string;
834
- readonly author: string;
835
- readonly reason: string;
836
- readonly resolution: {
837
- readonly _tag: "CompletedWithResult";
838
- readonly result: Schema.Json;
839
- readonly isFailure: boolean;
840
- } | {
841
- readonly _tag: "NeverHappened";
842
- } | {
843
- readonly _tag: "SafeToRetry";
844
- } | {
845
- readonly _tag: "AbortSubmission";
846
- };
847
- readonly resolvedAt: string;
848
- readonly canonicalRecordId?: string | undefined;
849
- };
850
- } | {
851
- readonly _tag: "HostFailed";
852
- readonly failure: {
853
- readonly _tag: "HostProtocolError";
854
- readonly message: string;
855
- } | {
856
- readonly _tag: "AgentInputError";
857
- readonly message: string;
858
- } | {
859
- readonly _tag: "DigestError";
860
- readonly message: string;
861
- readonly cause?: Schema.Json | undefined;
862
- } | {
863
- readonly _tag: "AdmissionConflict";
864
- readonly conversationId: string;
865
- readonly principal: string;
866
- readonly idempotencyKey: string;
867
- readonly existingInputDigest: string;
868
- readonly attemptedInputDigest: string;
869
- } | {
870
- readonly _tag: "SettlementConflict";
871
- readonly submissionId: string;
872
- readonly existingOutcome: "aborted" | "completed" | "failed";
873
- } | {
874
- readonly _tag: "ApprovalConflict";
875
- readonly submissionId: string;
876
- readonly toolCallId: string;
877
- readonly existingDecision: "approved" | "denied";
878
- } | {
879
- readonly _tag: "UnknownResolutionConflict";
880
- readonly submissionId: string;
881
- readonly toolCallId: string;
882
- } | {
883
- readonly _tag: "JoinedToHost";
884
- readonly submissionId: string;
885
- readonly hostSubmissionId: string;
886
- } | {
887
- readonly _tag: "LedgerError";
888
- readonly operation: string;
889
- readonly message: string;
890
- readonly cause?: Schema.Json | undefined;
891
- } | {
892
- readonly _tag: "ConversationStoreError";
893
- readonly operation: string;
894
- readonly message: string;
895
- readonly cause?: Schema.Json | undefined;
896
- } | {
897
- readonly _tag: "ConversationNotMaterialized";
898
- readonly conversationId: string;
899
- } | {
900
- readonly _tag: "AppendConflict";
901
- readonly conversationId: string;
902
- readonly batchId: string;
903
- readonly reason: "batch-digest" | "record-identity" | "tail";
904
- readonly actualTailSequence?: number | undefined;
905
- readonly actualTailDigest?: string | undefined;
906
- } | {
907
- readonly _tag: "FenceRejected";
908
- readonly conversationId: string;
909
- readonly actualEpoch: number;
910
- readonly attemptedEpoch: number;
911
- } | {
912
- readonly _tag: "DurableRuntimeFailpointError";
913
- readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "resolve:after-intent" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:after-reserve" | "tools:after-prepared-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append";
914
- } | {
915
- readonly _tag: "AdmissionLimitExceeded";
916
- readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
917
- readonly actual: number;
918
- readonly maximum: number;
919
- } | {
920
- readonly _tag: "DurableAlarmError";
921
- readonly operation: string;
922
- readonly message: string;
923
- readonly cause?: Schema.Json | undefined;
924
- };
925
- }, Schema.SchemaError, never>;
926
- declare const decodeHostResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | SettlementReached | SubmitSucceeded | UnknownResolutionRecorded, Schema.SchemaError, never>;
927
- /** Failure surface of `CloudflareConversationClient.submit`. */
928
- type ClientSubmitFailure = AgentInputError | DigestError | AdmissionConflict | LedgerError | ConversationStoreError | ConversationNotMaterialized | AppendConflict | FenceRejected | DurableRuntimeFailpointError | AdmissionLimitExceeded | DurableAlarmError | HostProtocolError | ConversationClientError;
929
- type ClientAwaitFailure = LedgerError | SettlementConflict | HostProtocolError | ConversationClientError;
930
- type ClientObserveFailure = ConversationStoreError | ConversationNotMaterialized | HostProtocolError | ConversationClientError;
931
- type ClientAbortFailure = LedgerError | SettlementConflict | JoinedToHost | DurableRuntimeFailpointError | DurableAlarmError | HostProtocolError | ConversationClientError;
932
- type ClientApprovalFailure = LedgerError | SettlementConflict | ApprovalConflict | DurableAlarmError | HostProtocolError | ConversationClientError;
933
- type ClientUnknownFailure = LedgerError | SettlementConflict | UnknownResolutionConflict | JoinedToHost | DurableRuntimeFailpointError | DurableAlarmError | HostProtocolError | ConversationClientError;
934
- declare const CloudflareConversationClient_base: Context.ServiceClass<CloudflareConversationClient, "@effect-agent/platform-cloudflare/CloudflareConversationClient", {
935
- /** Encode the input client-side, then durably submit to the owning Object. */
936
- readonly submit: <InputSchema extends Schema.Top>(agent: DurableSubmitAgent<InputSchema>, input: InputSchema["Type"], options: DurableSubmitOptions) => Effect.Effect<Receipt, ClientSubmitFailure, InputSchema["EncodingServices"]>;
937
- /** Wake-hinted, poll-guaranteed settlement wait executed inside the owning Object. */
938
- readonly awaitSettlement: (receipt: Receipt) => Effect.Effect<Settlement, ClientAwaitFailure>;
939
- /** One bounded page of canonical records. */
940
- readonly readPage: (conversationId: ConversationId, options?: {
941
- readonly afterSequence?: CanonicalSequence | undefined;
942
- readonly limit?: number | undefined;
943
- }) => Effect.Effect<ReadonlyArray<CanonicalRecordEnvelope>, ClientObserveFailure>;
944
- /**
945
- * Every canonical record up to the CURRENT committed tail, via repeated pages. A
946
- * snapshot read, not a live observation — callers wanting liveness re-read after
947
- * `awaitSettlement`.
948
- */
949
- readonly readAll: (conversationId: ConversationId) => Effect.Effect<ReadonlyArray<CanonicalRecordEnvelope>, ClientObserveFailure>;
950
- /**
951
- * Submission-addressed operations take the owning Conversation explicitly (from the
952
- * Receipt): minted Submission identities stay OPAQUE outside the storage adapter that
953
- * minted them (D-P6-5), so the client never parses one to find the lane.
954
- */
955
- readonly abort: (conversationId: ConversationId, command: AbortCommand) => Effect.Effect<AbortIntent, ClientAbortFailure>;
956
- readonly resolveApproval: (conversationId: ConversationId, command: ApprovalDecisionCommand) => Effect.Effect<ApprovalDecisionIntent, ClientApprovalFailure>;
957
- readonly resolveUnknown: (conversationId: ConversationId, command: UnknownResolutionCommand) => Effect.Effect<UnknownResolutionIntent, ClientUnknownFailure>;
958
- }>;
959
- /** Worker-side client over the Conversation Object namespace (DEPLOY-010). */
960
- declare class CloudflareConversationClient extends CloudflareConversationClient_base {
961
- static readonly layer: Layer.Layer<CloudflareConversationClient, never, ConversationObjectNamespace>;
962
- }
963
- //#endregion
964
- //#region src/conversation-object.d.ts
965
- /**
966
- * `makeConversationObjectClass(options, telemetry?)` — the Conversation Durable Object (plan §1.4,
967
- * D-P6-1): a factory returning a class that applications export from their Worker entry.
968
- * One SQLite-backed Object per Conversation is the serialized owner (durability §6); the
969
- * Object never runs `runResolvedWorker`'s infinite loop — each ingress event or alarm runs
970
- * ONE bounded `runRecovery` + `processConversationResolved` pass, and the persisted alarm
971
- * (the single multiplexed slot, D-P6-2) finishes accepted work across evictions WITHOUT any
972
- * incoming request.
973
- *
974
- * Constructor gate (`blockConcurrencyWhile`) is LOCAL-ONLY: schema migration and the
975
- * exact-version check, configuration decode, and the defensive ensure-alarm half of the
976
- * alarm invariant. It deliberately does NOT run the recovery pass: parent recovery can
977
- * require child-Object reads and vice versa, and two Objects blocked in constructor gates
978
- * awaiting each other's RPC would deadlock (plan §1.4). Instead every pass runs
979
- * `runRecovery` BEFORE any claim, so reconciliation still strictly precedes new work.
980
- */
981
- /** Construction options for one deployed Conversation Object class. */
982
- interface ConversationObjectOptions extends CloudflareDurableRuntimeOptions {
983
- /**
984
- * Name of the Worker `env` binding carrying THIS class's `DurableObjectNamespace` — the
985
- * Object's route back to sibling Conversation Objects for the WP2 cross-Object port calls
986
- * and remote wakes (DEPLOY-010: the binding enters through a Layer, never ambiently).
987
- */
988
- readonly namespaceBinding: string;
989
- }
990
- declare const AdminExplainRequest_base: Schema.Class<AdminExplainRequest, Schema.Struct<{
991
- readonly submissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
992
- }>, {}>;
993
- /** Explain one Submission (`submissionId` present) or every nonterminal lane member. */
994
- declare class AdminExplainRequest extends AdminExplainRequest_base {}
995
- declare const AdminVerifyRequest_base: Schema.Class<AdminVerifyRequest, Schema.Struct<{}>, {}>;
996
- /** Verify carries no parameters — the addressed Object IS the lane. */
997
- declare class AdminVerifyRequest extends AdminVerifyRequest_base {}
998
- /** Every typed failure of the four admin entry points, plus the protocol's own errors. */
999
- declare const AdminFailure: Schema.Union<readonly [typeof OperationDenied, typeof RetryRefused, typeof LedgerError, typeof RunJournalError, typeof DigestError, typeof OwnershipLost, typeof SettlementConflict, typeof ConversationStoreError, typeof ConversationNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof DurableAlarmError, typeof HostProtocolError]>;
1000
- type AdminFailure = typeof AdminFailure.Type;
1001
- declare const ExplainedRecovery_base: Schema.Class<ExplainedRecovery, Schema.TaggedStruct<"ExplainedRecovery", {
1002
- readonly explanations: Schema.$Array<typeof RecoveryExplanation>;
1003
- }>, {}>;
1004
- declare class ExplainedRecovery extends ExplainedRecovery_base {}
1005
- declare const VerifiedIntegrity_base: Schema.Class<VerifiedIntegrity, Schema.TaggedStruct<"VerifiedIntegrity", {
1006
- readonly report: typeof IntegrityReport;
1007
- }>, {}>;
1008
- declare class VerifiedIntegrity extends VerifiedIntegrity_base {}
1009
- declare const RetryExecuted_base: Schema.Class<RetryExecuted, Schema.TaggedStruct<"RetryExecuted", {
1010
- readonly report: typeof RecoveryReport;
1011
- }>, {}>;
1012
- declare class RetryExecuted extends RetryExecuted_base {}
1013
- declare const ObligationsScanned_base: Schema.Class<ObligationsScanned, Schema.TaggedStruct<"ObligationsScanned", {
1014
- readonly report: typeof ObligationReport;
1015
- }>, {}>;
1016
- declare class ObligationsScanned extends ObligationsScanned_base {}
1017
- declare const AdminFailed_base: Schema.Class<AdminFailed, Schema.TaggedStruct<"AdminFailed", {
1018
- readonly failure: Schema.Union<readonly [typeof OperationDenied, typeof RetryRefused, typeof LedgerError, typeof RunJournalError, typeof DigestError, typeof OwnershipLost, typeof SettlementConflict, typeof ConversationStoreError, typeof ConversationNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof DurableAlarmError, typeof HostProtocolError]>;
1019
- }>, {}>;
1020
- /** The admin entry point failed TYPED on the Object; the failure re-decodes verbatim. */
1021
- declare class AdminFailed extends AdminFailed_base {}
1022
- /** The uniform answer of one admin entry point. Callers narrow by the tag their call implies. */
1023
- declare const AdminResponse: Schema.Union<readonly [typeof ExplainedRecovery, typeof VerifiedIntegrity, typeof RetryExecuted, typeof ObligationsScanned, typeof AdminFailed]>;
1024
- type AdminResponse = typeof AdminResponse.Type;
1025
- declare const decodeAdminExplainRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminExplainRequest, Schema.SchemaError, never>;
1026
- declare const decodeAdminVerifyRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminVerifyRequest, Schema.SchemaError, never>;
1027
- declare const decodeRetryCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<RetryCommand, Schema.SchemaError, never>;
1028
- declare const decodeObligationThresholds: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ObligationThresholds, Schema.SchemaError, never>;
1029
- declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | ObligationsScanned | RetryExecuted | VerifiedIntegrity, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
1030
- readonly _tag: "ExplainedRecovery";
1031
- readonly explanations: readonly {
1032
- readonly submission: {
1033
- readonly submissionId: string;
1034
- readonly conversationId: string;
1035
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1036
- readonly queueSequence: number;
1037
- readonly createdAt: string;
1038
- readonly readyAt?: string | undefined;
1039
- readonly ageSeconds: number;
1040
- readonly readyAgeSeconds?: number | undefined;
1041
- readonly parentLinkage?: {
1042
- readonly parentSubmissionId: string;
1043
- readonly parentToolCallId: string;
1044
- } | undefined;
1045
- };
1046
- readonly evidence: {
1047
- readonly conversationMaterialized: boolean;
1048
- readonly inputRecorded: boolean;
1049
- readonly abortRecorded: boolean;
1050
- readonly recordedSettlementOutcome?: "aborted" | "completed" | "failed" | undefined;
1051
- readonly openToolCalls: readonly {
1052
- readonly toolCallId: string;
1053
- readonly toolName: string;
1054
- readonly turn: number;
1055
- }[];
1056
- readonly openDelegationCalls: readonly {
1057
- readonly toolCallId: string;
1058
- readonly toolName: string;
1059
- readonly turn: number;
1060
- readonly requested: boolean;
1061
- readonly started: boolean;
1062
- readonly joined: boolean;
1063
- readonly childConversationId?: string | undefined;
1064
- readonly childSubmissionId?: string | undefined;
1065
- readonly admission?: "admitted" | "indeterminate" | "not-admitted" | undefined;
1066
- }[];
1067
- readonly approvalsPending: readonly {
1068
- readonly toolCallId: string;
1069
- readonly turn: number;
1070
- }[];
1071
- readonly unknownCalls: readonly {
1072
- readonly toolCallId: string;
1073
- readonly toolName: string;
1074
- readonly reason: string;
1075
- readonly recordedAt: string;
1076
- readonly resolved: boolean;
1077
- }[];
1078
- readonly approvalDecisions: readonly {
1079
- readonly submissionId: string;
1080
- readonly toolCallId: string;
1081
- readonly decision: "approved" | "denied";
1082
- readonly resolver: string;
1083
- readonly reason: string;
1084
- readonly decidedAt: string;
1085
- readonly canonicalRecordId?: string | undefined;
1086
- }[];
1087
- readonly unknownResolutions: readonly {
1088
- readonly submissionId: string;
1089
- readonly toolCallId: string;
1090
- readonly author: string;
1091
- readonly reason: string;
1092
- readonly resolution: {
1093
- readonly _tag: "CompletedWithResult";
1094
- readonly result: Schema.Json;
1095
- readonly isFailure: boolean;
1096
- } | {
1097
- readonly _tag: "NeverHappened";
1098
- } | {
1099
- readonly _tag: "SafeToRetry";
1100
- } | {
1101
- readonly _tag: "AbortSubmission";
1102
- };
1103
- readonly resolvedAt: string;
1104
- readonly canonicalRecordId?: string | undefined;
1105
- }[];
1106
- readonly childAttachments: readonly {
1107
- readonly toolCallId: string;
1108
- readonly childSubmissionId: string;
1109
- readonly childState: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1110
- readonly childOutcome?: "aborted" | "completed" | "failed" | undefined;
1111
- }[];
1112
- readonly joins: readonly {
1113
- readonly submissionId: string;
1114
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1115
- readonly hostSubmissionId: string;
1116
- }[];
1117
- readonly hostSubmissionId?: string | undefined;
1118
- readonly suspension?: {
1119
- readonly reason: {
1120
- readonly _tag: "ApprovalPending";
1121
- readonly toolCallIds: readonly [string, ...string[]];
1122
- } | {
1123
- readonly _tag: "WaitingForChild";
1124
- readonly children: readonly [{
1125
- readonly toolCallId: string;
1126
- readonly childSubmissionId: string;
1127
- }, ...{
1128
- readonly toolCallId: string;
1129
- readonly childSubmissionId: string;
1130
- }[]];
1131
- };
1132
- readonly suspendedAt: string;
1133
- } | undefined;
1134
- readonly abortIntent?: {
1135
- readonly submissionId: string;
1136
- readonly author: string;
1137
- readonly reason: string;
1138
- readonly requestedAt: string;
1139
- readonly canonicalRecordId?: string | undefined;
1140
- } | undefined;
1141
- };
1142
- readonly decision: {
1143
- readonly _tag: "CompleteMaterialization";
1144
- readonly submissionId: string;
1145
- } | {
1146
- readonly _tag: "RepairReadiness";
1147
- readonly submissionId: string;
1148
- } | {
1149
- readonly _tag: "ApplyInput";
1150
- readonly submissionId: string;
1151
- } | {
1152
- readonly _tag: "RepairInputMarker";
1153
- readonly submissionId: string;
1154
- } | {
1155
- readonly _tag: "ResumeFromTurnBoundary";
1156
- readonly submissionId: string;
1157
- } | {
1158
- readonly _tag: "AppendReservedSettlement";
1159
- readonly submissionId: string;
1160
- readonly settlementId: string;
1161
- readonly outcome: "aborted" | "completed" | "failed";
1162
- } | {
1163
- readonly _tag: "FinalizeLedgerFromHistory";
1164
- readonly submissionId: string;
1165
- readonly settlementId: string;
1166
- readonly outcome: "aborted" | "completed" | "failed";
1167
- } | {
1168
- readonly _tag: "SettleAborted";
1169
- readonly submissionId: string;
1170
- } | {
1171
- readonly _tag: "MarkUnknown";
1172
- readonly submissionId: string;
1173
- readonly reason: string;
1174
- readonly openToolCallIds: readonly string[];
1175
- } | {
1176
- readonly _tag: "ResumePendingToolBatch";
1177
- readonly submissionId: string;
1178
- readonly turn: number;
1179
- } | {
1180
- readonly _tag: "AwaitApprovalDecision";
1181
- readonly submissionId: string;
1182
- } | {
1183
- readonly _tag: "ResumeSuspended";
1184
- readonly submissionId: string;
1185
- } | {
1186
- readonly _tag: "AwaitUnknownResolution";
1187
- readonly submissionId: string;
1188
- } | {
1189
- readonly _tag: "ApplyUnknownResolutions";
1190
- readonly submissionId: string;
1191
- } | {
1192
- readonly _tag: "RevertJoining";
1193
- readonly submissionId: string;
1194
- } | {
1195
- readonly _tag: "RepairJoinMarker";
1196
- readonly submissionId: string;
1197
- } | {
1198
- readonly _tag: "SettleJoinedWithHost";
1199
- readonly submissionId: string;
1200
- readonly outcome: "aborted" | "completed" | "failed";
1201
- } | {
1202
- readonly _tag: "AwaitHostSettlement";
1203
- readonly submissionId: string;
1204
- readonly hostSubmissionId?: string | undefined;
1205
- } | {
1206
- readonly _tag: "CompleteChildAdmission";
1207
- readonly submissionId: string;
1208
- readonly toolCallId: string;
1209
- } | {
1210
- readonly _tag: "AwaitChildAdmissionResolution";
1211
- readonly submissionId: string;
1212
- readonly toolCallId: string;
1213
- } | {
1214
- readonly _tag: "RepairSubagentStartLink";
1215
- readonly submissionId: string;
1216
- readonly toolCallId: string;
1217
- } | {
1218
- readonly _tag: "EnsureWaitingForChild";
1219
- readonly submissionId: string;
1220
- readonly children: readonly [{
1221
- readonly toolCallId: string;
1222
- readonly childSubmissionId: string;
1223
- }, ...{
1224
- readonly toolCallId: string;
1225
- readonly childSubmissionId: string;
1226
- }[]];
1227
- } | {
1228
- readonly _tag: "AwaitChildSettlement";
1229
- readonly submissionId: string;
1230
- } | {
1231
- readonly _tag: "ResumeWaitingParent";
1232
- readonly submissionId: string;
1233
- readonly children: readonly [{
1234
- readonly toolCallId: string;
1235
- readonly childSubmissionId: string;
1236
- }, ...{
1237
- readonly toolCallId: string;
1238
- readonly childSubmissionId: string;
1239
- }[]];
1240
- } | {
1241
- readonly _tag: "ApplyJoinAccounting";
1242
- readonly submissionId: string;
1243
- readonly toolCallId: string;
1244
- readonly reservationId: string;
1245
- } | {
1246
- readonly _tag: "PropagateChildAbort";
1247
- readonly submissionId: string;
1248
- readonly children: readonly [{
1249
- readonly toolCallId: string;
1250
- readonly childSubmissionId: string;
1251
- }, ...{
1252
- readonly toolCallId: string;
1253
- readonly childSubmissionId: string;
1254
- }[]];
1255
- } | {
1256
- readonly _tag: "ReleaseOrphanChildReservation";
1257
- readonly submissionId: string;
1258
- readonly reservationIds: readonly [string, ...string[]];
1259
- } | {
1260
- readonly _tag: "AwaitParentEstablishment";
1261
- readonly submissionId: string;
1262
- readonly parentSubmissionId: string;
1263
- readonly parentToolCallId: string;
1264
- } | {
1265
- readonly _tag: "NoAction";
1266
- readonly submissionId: string;
1267
- };
1268
- readonly decisionMeaning: string;
1269
- readonly disposition: "deferred" | "none" | "repaired" | "unknown";
1270
- readonly explainedAt: string;
1271
- }[];
1272
- } | {
1273
- readonly _tag: "VerifiedIntegrity";
1274
- readonly report: {
1275
- readonly conversationId: string;
1276
- readonly tailSequence: number;
1277
- readonly recordCount: number;
1278
- readonly submissionCount: number;
1279
- readonly checks: readonly {
1280
- readonly name: "all-settled" | "checkpoint-binding" | "digest-chain" | "fifo-input-order" | "fifo-settlement-order" | "ledger-canonical-agreement" | "record-identity" | "schema-round-trip" | "sequence-contiguity" | "terminal-uniqueness";
1281
- readonly status: "failed" | "passed" | "skipped";
1282
- readonly detail?: string | undefined;
1283
- }[];
1284
- readonly ok: boolean;
1285
- };
1286
- } | {
1287
- readonly _tag: "RetryExecuted";
1288
- readonly report: {
1289
- readonly submissionId: string;
1290
- readonly conversationId: string;
1291
- readonly decision: {
1292
- readonly _tag: "CompleteMaterialization";
1293
- readonly submissionId: string;
1294
- } | {
1295
- readonly _tag: "RepairReadiness";
1296
- readonly submissionId: string;
1297
- } | {
1298
- readonly _tag: "ApplyInput";
1299
- readonly submissionId: string;
1300
- } | {
1301
- readonly _tag: "RepairInputMarker";
1302
- readonly submissionId: string;
1303
- } | {
1304
- readonly _tag: "ResumeFromTurnBoundary";
1305
- readonly submissionId: string;
1306
- } | {
1307
- readonly _tag: "AppendReservedSettlement";
1308
- readonly submissionId: string;
1309
- readonly settlementId: string;
1310
- readonly outcome: "aborted" | "completed" | "failed";
1311
- } | {
1312
- readonly _tag: "FinalizeLedgerFromHistory";
1313
- readonly submissionId: string;
1314
- readonly settlementId: string;
1315
- readonly outcome: "aborted" | "completed" | "failed";
1316
- } | {
1317
- readonly _tag: "SettleAborted";
1318
- readonly submissionId: string;
1319
- } | {
1320
- readonly _tag: "MarkUnknown";
1321
- readonly submissionId: string;
1322
- readonly reason: string;
1323
- readonly openToolCallIds: readonly string[];
1324
- } | {
1325
- readonly _tag: "ResumePendingToolBatch";
1326
- readonly submissionId: string;
1327
- readonly turn: number;
1328
- } | {
1329
- readonly _tag: "AwaitApprovalDecision";
1330
- readonly submissionId: string;
1331
- } | {
1332
- readonly _tag: "ResumeSuspended";
1333
- readonly submissionId: string;
1334
- } | {
1335
- readonly _tag: "AwaitUnknownResolution";
1336
- readonly submissionId: string;
1337
- } | {
1338
- readonly _tag: "ApplyUnknownResolutions";
1339
- readonly submissionId: string;
1340
- } | {
1341
- readonly _tag: "RevertJoining";
1342
- readonly submissionId: string;
1343
- } | {
1344
- readonly _tag: "RepairJoinMarker";
1345
- readonly submissionId: string;
1346
- } | {
1347
- readonly _tag: "SettleJoinedWithHost";
1348
- readonly submissionId: string;
1349
- readonly outcome: "aborted" | "completed" | "failed";
1350
- } | {
1351
- readonly _tag: "AwaitHostSettlement";
1352
- readonly submissionId: string;
1353
- readonly hostSubmissionId?: string | undefined;
1354
- } | {
1355
- readonly _tag: "CompleteChildAdmission";
1356
- readonly submissionId: string;
1357
- readonly toolCallId: string;
1358
- } | {
1359
- readonly _tag: "AwaitChildAdmissionResolution";
1360
- readonly submissionId: string;
1361
- readonly toolCallId: string;
1362
- } | {
1363
- readonly _tag: "RepairSubagentStartLink";
1364
- readonly submissionId: string;
1365
- readonly toolCallId: string;
1366
- } | {
1367
- readonly _tag: "EnsureWaitingForChild";
1368
- readonly submissionId: string;
1369
- readonly children: readonly [{
1370
- readonly toolCallId: string;
1371
- readonly childSubmissionId: string;
1372
- }, ...{
1373
- readonly toolCallId: string;
1374
- readonly childSubmissionId: string;
1375
- }[]];
1376
- } | {
1377
- readonly _tag: "AwaitChildSettlement";
1378
- readonly submissionId: string;
1379
- } | {
1380
- readonly _tag: "ResumeWaitingParent";
1381
- readonly submissionId: string;
1382
- readonly children: readonly [{
1383
- readonly toolCallId: string;
1384
- readonly childSubmissionId: string;
1385
- }, ...{
1386
- readonly toolCallId: string;
1387
- readonly childSubmissionId: string;
1388
- }[]];
1389
- } | {
1390
- readonly _tag: "ApplyJoinAccounting";
1391
- readonly submissionId: string;
1392
- readonly toolCallId: string;
1393
- readonly reservationId: string;
1394
- } | {
1395
- readonly _tag: "PropagateChildAbort";
1396
- readonly submissionId: string;
1397
- readonly children: readonly [{
1398
- readonly toolCallId: string;
1399
- readonly childSubmissionId: string;
1400
- }, ...{
1401
- readonly toolCallId: string;
1402
- readonly childSubmissionId: string;
1403
- }[]];
1404
- } | {
1405
- readonly _tag: "ReleaseOrphanChildReservation";
1406
- readonly submissionId: string;
1407
- readonly reservationIds: readonly [string, ...string[]];
1408
- } | {
1409
- readonly _tag: "AwaitParentEstablishment";
1410
- readonly submissionId: string;
1411
- readonly parentSubmissionId: string;
1412
- readonly parentToolCallId: string;
1413
- } | {
1414
- readonly _tag: "NoAction";
1415
- readonly submissionId: string;
1416
- };
1417
- readonly disposition: "deferred" | "none" | "repaired" | "unknown";
1418
- };
1419
- } | {
1420
- readonly _tag: "ObligationsScanned";
1421
- readonly report: {
1422
- readonly thresholds: {
1423
- readonly agingSeconds: number;
1424
- readonly overdueSeconds: number;
1425
- };
1426
- readonly entries: readonly {
1427
- readonly submissionId: string;
1428
- readonly conversationId: string;
1429
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1430
- readonly blockedOn: "approval" | "ready-aged" | "running-aged" | "unknown" | "waitingForChild";
1431
- readonly ageSeconds: number;
1432
- readonly severity: "aging" | "ok" | "overdue";
1433
- }[];
1434
- readonly generatedAt: string;
1435
- };
1436
- } | {
1437
- readonly _tag: "AdminFailed";
1438
- readonly failure: {
1439
- readonly _tag: "OperationDenied";
1440
- readonly operation: "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
1441
- readonly reason: string;
1442
- readonly conversationId?: string | undefined;
1443
- readonly submissionId?: string | undefined;
1444
- } | {
1445
- readonly _tag: "RetryRefused";
1446
- readonly submissionId: string;
1447
- readonly refusal: "await-approval-decision" | "await-unknown-resolution" | "settled";
1448
- readonly decisionTag: string;
1449
- readonly message: string;
1450
- } | {
1451
- readonly _tag: "LedgerError";
1452
- readonly operation: string;
1453
- readonly message: string;
1454
- readonly cause?: Schema.Json | undefined;
1455
- } | {
1456
- readonly _tag: "RunJournalError";
1457
- readonly message: string;
1458
- readonly cause?: Schema.Json | undefined;
1459
- } | {
1460
- readonly _tag: "DigestError";
1461
- readonly message: string;
1462
- readonly cause?: Schema.Json | undefined;
1463
- } | {
1464
- readonly _tag: "OwnershipLost";
1465
- readonly submissionId: string;
1466
- readonly actualEpoch: number;
1467
- } | {
1468
- readonly _tag: "SettlementConflict";
1469
- readonly submissionId: string;
1470
- readonly existingOutcome: "aborted" | "completed" | "failed";
1471
- } | {
1472
- readonly _tag: "ConversationStoreError";
1473
- readonly operation: string;
1474
- readonly message: string;
1475
- readonly cause?: Schema.Json | undefined;
1476
- } | {
1477
- readonly _tag: "ConversationNotMaterialized";
1478
- readonly conversationId: string;
1479
- } | {
1480
- readonly _tag: "AppendConflict";
1481
- readonly conversationId: string;
1482
- readonly batchId: string;
1483
- readonly reason: "batch-digest" | "record-identity" | "tail";
1484
- readonly actualTailSequence?: number | undefined;
1485
- readonly actualTailDigest?: string | undefined;
1486
- } | {
1487
- readonly _tag: "FenceRejected";
1488
- readonly conversationId: string;
1489
- readonly actualEpoch: number;
1490
- readonly attemptedEpoch: number;
1491
- } | {
1492
- readonly _tag: "DurableRuntimeFailpointError";
1493
- readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "resolve:after-intent" | "step:after-step-append" | "subagent:after-admit" | "subagent:after-child-abort-intent" | "subagent:after-child-ready" | "subagent:after-join-append" | "subagent:after-release" | "subagent:after-release-pending" | "subagent:after-request-append" | "subagent:after-reserve" | "subagent:after-sibling-settle" | "subagent:after-start-append" | "subagent:after-suspend" | "submit:after-admit" | "submit:after-materialize" | "terminalize:after-canonical-append" | "terminalize:after-reserve" | "tools:after-prepared-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append";
1494
- } | {
1495
- readonly _tag: "DurableAlarmError";
1496
- readonly operation: string;
1497
- readonly message: string;
1498
- readonly cause?: Schema.Json | undefined;
1499
- } | {
1500
- readonly _tag: "HostProtocolError";
1501
- readonly message: string;
1502
- };
1503
- }, Schema.SchemaError, never>;
1504
- declare const decodeAdminResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminFailed | ExplainedRecovery | ObligationsScanned | RetryExecuted | VerifiedIntegrity, Schema.SchemaError, never>;
1505
- /** The public endpoint surface of one Conversation Object instance. */
1506
- interface ConversationObjectInstance extends DurableObject {
1507
- submitEncoded(encoded: unknown): Promise<unknown>;
1508
- awaitSettlementEncoded(encoded: unknown): Promise<unknown>;
1509
- observePage(encoded: unknown): Promise<unknown>;
1510
- abortEncoded(encoded: unknown): Promise<unknown>;
1511
- resolveApprovalEncoded(encoded: unknown): Promise<unknown>;
1512
- resolveUnknownEncoded(encoded: unknown): Promise<unknown>;
1513
- explainEncoded(encoded: unknown): Promise<unknown>;
1514
- verifyEncoded(encoded: unknown): Promise<unknown>;
1515
- retryEncoded(encoded: unknown): Promise<unknown>;
1516
- obligationsEncoded(encoded: unknown): Promise<unknown>;
1517
- portCall(encoded: unknown): Promise<unknown>;
1518
- wake(): Promise<void>;
1519
- alarm(): Promise<void>;
1520
- }
1521
- /** The constructor shape workerd instantiates for each Conversation Object. */
1522
- interface ConversationObjectClass {
1523
- new (ctx: DurableObjectState, env: Cloudflare.Env): ConversationObjectInstance;
1524
- }
1525
- /**
1526
- * Build the application's Conversation Object class (export it from the Worker entry).
1527
- * `telemetry` is the host composition boundary: it may require the Object context/namespace and
1528
- * retain a typed acquisition error, while any additional output services remain available to the
1529
- * cached runtime. `TelemetryError` stays the first explicit generic for source compatibility;
1530
- * additional outputs infer from the Layer. Omitting it installs the content-free no-op service.
1531
- * The explicit return type is what makes declaration emit possible: the class body carries a
1532
- * private runtime field, and TS4094 rejects inferring an exported anonymous class type around it.
1533
- */
1534
- declare const makeConversationObjectClass: <TelemetryError = never, AdditionalTelemetryOutputs = never>(options: ConversationObjectOptions, telemetry?: Layer.Layer<CloudflareRuntimeTelemetry | AdditionalTelemetryOutputs, TelemetryError, DurableObjectContext | ConversationObjectNamespace>) => ConversationObjectClass;
1535
- //#endregion
1536
- //#region src/code-mode-executor.d.ts
1537
- /**
1538
- * The Cloudflare Dynamic Worker `CodeExecutor` adapter (C4 of ADR-0017;
1539
- * DEPLOY-011). Each pass loads one fresh Worker through the Worker Loader
1540
- * with `globalOutbound: null`, so generated code has no ambient network,
1541
- * bindings, or secrets; its only authority is the pass-scoped host stub that
1542
- * routes back to `CodeModeHostEntrypoint` and, from there, into the pass's
1543
- * `CodeExecutionHost` service. Platform CPU limits stop synchronous runaway
1544
- * programs; the executor-owned wall-clock deadline interrupts asynchronously
1545
- * suspended passes. Deployment class `E` only: the adapter records no
1546
- * persistent state and a later pass may run in a completely different
1547
- * isolate.
1548
- */
1549
- declare const dynamicWorkerImplementation: SandboxImplementation;
1550
- /** The narrow host stub the dynamic worker receives (Workers RPC). */
1551
- interface CodeModeHostStub {
1552
- readonly call: (passId: string, hostCall: unknown) => Promise<unknown>;
1553
- }
1554
- /**
1555
- * The host-side RPC target for dynamic workers. The application exposes it
1556
- * from its Worker entry (`export { CodeModeHostEntrypoint }`) and hands the
1557
- * adapter a same-instance stub — `ctx.exports.CodeModeHostEntrypoint()` in
1558
- * production (a self service binding may reach a different instance and must
1559
- * not be used there); tests bind it through Miniflare's `kCurrentWorker`.
1560
- */
1561
- declare class CodeModeHostEntrypoint extends WorkerEntrypoint {
1562
- call(passId: unknown, hostCall: unknown): Promise<unknown>;
1563
- }
1564
- interface DynamicWorkerCodeExecutorOptions {
1565
- /** The `worker_loader` binding. */
1566
- readonly loader: WorkerLoader;
1567
- /**
1568
- * A SAME-INSTANCE stub of `CodeModeHostEntrypoint`. In production create it
1569
- * with `ctx.exports.CodeModeHostEntrypoint()`; a cross-instance stub would
1570
- * dispatch host calls into an isolate without this pass's registry entry.
1571
- */
1572
- readonly hostStub: CodeModeHostStub;
1573
- /** Compatibility date for dynamic workers; defaults to `2025-05-01`. */
1574
- readonly compatibilityDate?: string | undefined;
1575
- }
1576
- /** Layer building the Dynamic Worker `CodeExecutor` from resolved bindings. */
1577
- declare const dynamicWorkerCodeExecutorLayer: (options: DynamicWorkerCodeExecutorOptions) => Layer.Layer<CodeExecutor>;
1578
- //#endregion
1579
- export { AbortRecorded, AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, AdmissionLimitExceeded, ApprovalRecorded, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, ClientAbortFailure, ClientApprovalFailure, ClientAwaitFailure, ClientObserveFailure, ClientSubmitFailure, ClientUnknownFailure, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBindingSource, CloudflareBindingSourceContext, CloudflareConversationClient, CloudflareDurableRuntime, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareDurableRuntimeInitializationError, CloudflareDurableRuntimeOptions, CloudflareDurableRuntimeServices, CloudflarePlatformConfigError, CloudflareRuntimeTelemetry, CloudflareTelemetryExportError, CodeModeHostEntrypoint, CodeModeHostStub, ConversationClientError, ConversationMaintenance, ConversationObjectClass, ConversationObjectIdentity, ConversationObjectInstance, ConversationObjectNamespace, ConversationObjectOptions, ConversationObjectPorts, ConversationObjectRpc, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, DynamicWorkerCodeExecutorOptions, ExplainedRecovery, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassFailure, MaintenancePassReport, ObligationsScanned, ObservePageRequest, ObservedPage, RetryExecuted, SettlementReached, SubmitRequest, SubmitSucceeded, UnknownResolutionRecorded, VerifiedIntegrity, boundHostDiagnostic, cloudflareWakeSchedulerLayer, conversationNamespaceFromEnv, conversationNamespaceLayer, conversationPortTransportLayer, decodeAbortCommand, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeApprovalDecisionCommand, decodeHostResponse, decodeObligationThresholds, decodeObservePageRequest, decodeReceipt, decodeRetryCommand, decodeSubmitRequest, decodeUnknownResolutionCommand, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeAdminResponse, encodeApprovalDecisionCommand, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, makeConversationObjectClass };
1580
- //# sourceMappingURL=index.d.mts.map
1
+ import { t as CloudflareBindings_d_exports } from "./CloudflareBindings.mjs";
2
+ import { o as CloudflareConfig_d_exports } from "./CloudflareConfig-DKXGo8L3.mjs";
3
+ import { t as Alarm_d_exports } from "./Alarm.mjs";
4
+ import { t as CloudflareBrowser_d_exports } from "./CloudflareBrowser-Doe1M7R5.mjs";
5
+ import { t as CloudflareAiGateway_d_exports } from "./CloudflareAiGateway.mjs";
6
+ import { t as CloudflareCodeMode_d_exports } from "./CloudflareCodeMode.mjs";
7
+ import { t as CloudflareMemory_d_exports } from "./CloudflareMemory.mjs";
8
+ import { t as CloudflareScheduling_d_exports } from "./CloudflareScheduling.mjs";
9
+ import { t as CloudflareSubscriptions_d_exports } from "./CloudflareSubscriptions.mjs";
10
+ import { t as CloudflareThreadClient_d_exports } from "./CloudflareThreadClient.mjs";
11
+ import { f as ThreadObject_d_exports } from "./ThreadObject-CMQiW2uX.mjs";
12
+ import { t as WakeScheduler_d_exports } from "./WakeScheduler.mjs";
13
+ export { Alarm_d_exports as Alarm, CloudflareAiGateway_d_exports as CloudflareAiGateway, CloudflareBindings_d_exports as CloudflareBindings, CloudflareBrowser_d_exports as CloudflareBrowser, CloudflareCodeMode_d_exports as CloudflareCodeMode, CloudflareConfig_d_exports as CloudflareConfig, CloudflareMemory_d_exports as CloudflareMemory, CloudflareScheduling_d_exports as CloudflareScheduling, CloudflareSubscriptions_d_exports as CloudflareSubscriptions, CloudflareThreadClient_d_exports as CloudflareThreadClient, ThreadObject_d_exports as ThreadObject, WakeScheduler_d_exports as WakeScheduler };