@effect-agent/platform-cloudflare 0.1.0-beta.45 → 0.1.0-beta.47

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 (97) hide show
  1. package/dist/Alarm.d.mts +119 -0
  2. package/dist/Alarm.mjs +317 -0
  3. package/dist/Alarm.mjs.map +1 -0
  4. package/dist/{browser-rest-capture.d.mts → BrowserRestCapture.d.mts} +5 -4
  5. package/dist/{browser-rest-capture.mjs → BrowserRestCapture.mjs} +5 -4
  6. package/dist/BrowserRestCapture.mjs.map +1 -0
  7. package/dist/{browser-rest-crawl.d.mts → BrowserRestCrawl.d.mts} +4 -3
  8. package/dist/{browser-rest-crawl.mjs → BrowserRestCrawl.mjs} +4 -3
  9. package/dist/BrowserRestCrawl.mjs.map +1 -0
  10. package/dist/{bindings-BrVEOkfe.d.mts → CloudflareBindings.d.mts} +7 -5
  11. package/dist/CloudflareBindings.mjs +98 -0
  12. package/dist/CloudflareBindings.mjs.map +1 -0
  13. package/dist/{browser-quick-action.mjs → CloudflareBrowser-1jeZx3_g.mjs} +19 -4
  14. package/dist/CloudflareBrowser-1jeZx3_g.mjs.map +1 -0
  15. package/dist/{browser-quick-action.d.mts → CloudflareBrowser-DJq53niJ.d.mts} +9 -18
  16. package/dist/CloudflareBrowser.d.mts +2 -0
  17. package/dist/CloudflareBrowser.mjs +2 -0
  18. package/dist/CloudflareCodeMode.d.mts +44 -0
  19. package/dist/CloudflareCodeMode.mjs +618 -0
  20. package/dist/CloudflareCodeMode.mjs.map +1 -0
  21. package/dist/CloudflareConfig-f3CqTel1.d.mts +101 -0
  22. package/dist/CloudflareConfig.d.mts +2 -0
  23. package/dist/CloudflareConfig.mjs +122 -0
  24. package/dist/CloudflareConfig.mjs.map +1 -0
  25. package/dist/CloudflareMemory.d.mts +140 -0
  26. package/dist/CloudflareMemory.mjs +168 -0
  27. package/dist/CloudflareMemory.mjs.map +1 -0
  28. package/dist/{scheduling.d.mts → CloudflareScheduling.d.mts} +9 -6
  29. package/dist/{scheduling.mjs → CloudflareScheduling.mjs} +22 -8
  30. package/dist/CloudflareScheduling.mjs.map +1 -0
  31. package/dist/{subscriptions.d.mts → CloudflareSubscriptions.d.mts} +11 -6
  32. package/dist/{subscriptions.mjs → CloudflareSubscriptions.mjs} +26 -7
  33. package/dist/CloudflareSubscriptions.mjs.map +1 -0
  34. package/dist/CloudflareThreadClient.d.mts +715 -0
  35. package/dist/CloudflareThreadClient.mjs +364 -0
  36. package/dist/CloudflareThreadClient.mjs.map +1 -0
  37. package/dist/{interactive-browser.d.mts → InteractiveBrowser.d.mts} +5 -4
  38. package/dist/{interactive-browser.mjs → InteractiveBrowser.mjs} +6 -4
  39. package/dist/InteractiveBrowser.mjs.map +1 -0
  40. package/dist/{protected-browser.d.mts → ProtectedBrowser.d.mts} +4 -3
  41. package/dist/{protected-browser.mjs → ProtectedBrowser.mjs} +4 -3
  42. package/dist/ProtectedBrowser.mjs.map +1 -0
  43. package/dist/ThreadObject-IrGuIO4a.mjs +575 -0
  44. package/dist/ThreadObject-IrGuIO4a.mjs.map +1 -0
  45. package/dist/ThreadObject-TEgOO0YM.d.mts +735 -0
  46. package/dist/ThreadObject.d.mts +2 -0
  47. package/dist/ThreadObject.mjs +3 -0
  48. package/dist/WakeScheduler.d.mts +23 -0
  49. package/dist/WakeScheduler.mjs +60 -0
  50. package/dist/WakeScheduler.mjs.map +1 -0
  51. package/dist/boundary-BguazVkh.mjs +42 -0
  52. package/dist/boundary-BguazVkh.mjs.map +1 -0
  53. package/dist/{browser-session-lifecycle-ZGgb3pnK.mjs → browser-session-lifecycle-CUbVfEgP.mjs} +2 -2
  54. package/dist/browser-session-lifecycle-CUbVfEgP.mjs.map +1 -0
  55. package/dist/{browser-session-lifecycle-DqntvG-Y.d.mts → browser-session-lifecycle-DJpqLXy_.d.mts} +2 -2
  56. package/dist/index.d.mts +12 -1833
  57. package/dist/index.mjs +12 -1357
  58. package/dist/prepared-admission-DRBhl2Sp.mjs +63 -0
  59. package/dist/prepared-admission-DRBhl2Sp.mjs.map +1 -0
  60. package/package.json +1 -1
  61. package/src/{alarm.ts → Alarm.ts} +6 -7
  62. package/src/{browser-rest-capture.ts → BrowserRestCapture.ts} +3 -3
  63. package/src/{browser-rest-crawl.ts → BrowserRestCrawl.ts} +2 -2
  64. package/src/{bindings.ts → CloudflareBindings.ts} +2 -2
  65. package/src/CloudflareBrowser.ts +15 -0
  66. package/src/{code-mode-executor.ts → CloudflareCodeMode.ts} +3 -3
  67. package/src/{config.ts → CloudflareConfig.ts} +3 -2
  68. package/src/{memory.ts → CloudflareMemory.ts} +15 -12
  69. package/src/{scheduling.ts → CloudflareScheduling.ts} +12 -11
  70. package/src/{subscriptions.ts → CloudflareSubscriptions.ts} +14 -12
  71. package/src/{client.ts → CloudflareThreadClient.ts} +27 -20
  72. package/src/{interactive-browser.ts → InteractiveBrowser.ts} +9 -5
  73. package/src/{thread-object.ts → ThreadObject.ts} +37 -29
  74. package/src/{wake-scheduler.ts → WakeScheduler.ts} +5 -5
  75. package/src/index.ts +11 -30
  76. package/src/{browser-quick-action.ts → internal/browser-quick-action.ts} +10 -8
  77. package/src/{layers.ts → internal/layers.ts} +39 -30
  78. package/src/{prepared-admission.ts → internal/prepared-admission.ts} +7 -7
  79. package/src/{transport.ts → internal/transport.ts} +5 -2
  80. package/src/protected-browser/binding.ts +3 -2
  81. package/src/protected-browser/native.ts +2 -2
  82. package/src/protected-browser/policy.ts +2 -2
  83. package/dist/browser-quick-action.mjs.map +0 -1
  84. package/dist/browser-rest-capture.mjs.map +0 -1
  85. package/dist/browser-rest-crawl.mjs.map +0 -1
  86. package/dist/browser-session-lifecycle-ZGgb3pnK.mjs.map +0 -1
  87. package/dist/index.mjs.map +0 -1
  88. package/dist/interactive-browser.mjs.map +0 -1
  89. package/dist/prepared-admission-BhW2eT_a.mjs +0 -890
  90. package/dist/prepared-admission-BhW2eT_a.mjs.map +0 -1
  91. package/dist/protected-browser.mjs.map +0 -1
  92. package/dist/scheduling.mjs.map +0 -1
  93. package/dist/subscriptions.mjs.map +0 -1
  94. /package/src/{protected-browser.ts → ProtectedBrowser.ts} +0 -0
  95. /package/src/{boundary.ts → internal/boundary.ts} +0 -0
  96. /package/src/{browser-session-lifecycle.ts → internal/browser-session-lifecycle.ts} +0 -0
  97. /package/src/{progress-wait.ts → internal/progress-wait.ts} +0 -0
package/dist/index.d.mts CHANGED
@@ -1,1833 +1,12 @@
1
- import { CloudflareBrowser, CloudflareBrowserOptions } from "./browser-quick-action.mjs";
2
- import { a as ThreadObjectRpc, i as ThreadObjectNamespace, n as DurableObjectContext, o as threadNamespaceFromEnv, r as ThreadObjectIdentity, s as threadNamespaceLayer, t as CloudflareBindingError } from "./bindings-BrVEOkfe.mjs";
3
- import { CloudflareSchedulingClient, ScheduleAlarmProtocolError, ScheduleOwnerIdentity, ScheduleOwnerNamespace, ScheduleOwnerObjectClass, ScheduleOwnerObjectInstance, ScheduleOwnerObjectRpc, ScheduleOwnerProtocolError, makeScheduleOwnerObjectClass } from "./scheduling.mjs";
4
- import { CloudflareSubscriptionConfigError, CloudflareSubscriptionsClient, SubscriptionAlarmProtocolError, SubscriptionPartitionIdentity, SubscriptionPartitionNamespace, SubscriptionPartitionObjectClass, SubscriptionPartitionObjectInstance, SubscriptionPartitionObjectRpc, SubscriptionPartitionProtocolError, makeSubscriptionPartitionObjectClass, sourcePartitionName, validateCloudflareSubscriptionLimits } from "./subscriptions.mjs";
5
- import { Context, Crypto, Effect, Layer, Option, Schema, Scope } from "effect";
6
- import { DoMemoryStorageLimits, DoStorageFailpoint, DoStorageFailpointHandler, DoStorageInitializationError, MemoryOwnerAuthorizer, MemoryOwnerIdentity, MemoryRpcError, MemoryRpcLimits, PortRequest, PortResponse, ThreadPortTransport } from "@effect-agent/storage-cloudflare";
7
- import { AbortCommand, AbortIntent, AdmissionConflict, AgentRegistration, AppendConflict, ApprovalConflict, ApprovalDecisionCommand, ApprovalDecisionIntent, CanonicalRecordEnvelope, CanonicalSequence, DefinitionDigests, DigestError, DurableAgentRuntime, DurableBindingFailure, DurableRuntimeConfig, DurableRuntimeFailpoint, DurableRuntimeFailpointError, DurableRuntimeFailpointHandler, DurableSubmitAgent, DurableSubmitOptions, DurableWorkerFailure, FenceRejected, IntegrityReport, JoinedToHost, LedgerError, ObligationReport, ObligationThresholds, OperationAuthorizerService, OperationDenied, OwnershipLost, PreparedInputAdmission, Principal, Receipt, RecoveryExplanation, RecoveryReport, ResolvedBinding, RetryCommand, RetryRefused, RunJournalError, ScheduledInputAdmission, Settlement, SettlementConflict, SubmissionLedger, ThreadNotMaterialized, ThreadStore, ThreadStoreError, ToolReconciler, UnknownResolutionCommand, UnknownResolutionConflict, UnknownResolutionIntent, WakeScheduler } from "@effect-agent/thread";
8
- import { AgentInputError, MemoryAccess, MemoryDocument, MemoryIndexSearch, MemoryMutationFailpoint, MemoryNamespace, MemoryReader, MemoryRecallLimits, MemoryStorageError, MemoryWrite, MemoryWriter, SemanticCandidateLimits, SemanticMemoryProfile, ThreadId } from "@effect-agent/core";
9
- import { RunContextPreparation, RunCostEstimator, RunToolAuthorization, RunToolFailureObserver } from "@effect-agent/engine";
10
- import { DurableObject, DurableObjectState as DurableObjectState$1, WorkerEnvironment } from "effect-cf";
11
- import { CodeExecutor, SandboxImplementation } from "@effect-agent/sandbox";
12
- //#region src/config.d.ts
13
- declare const CloudflarePlatformConfigError_base: Schema.Class<CloudflarePlatformConfigError, Schema.TaggedStruct<"CloudflarePlatformConfigError", {
14
- readonly message: Schema.String;
15
- readonly cause: Schema.optionalKey<Schema.Defect>;
16
- }>, import("effect/Cause").YieldableError>;
17
- /** The supplied Cloudflare durable runtime configuration failed validation (DEPLOY-003). */
18
- declare class CloudflarePlatformConfigError extends CloudflarePlatformConfigError_base {}
19
- declare const AdmissionLimitExceeded_base: Schema.Class<AdmissionLimitExceeded, Schema.TaggedStruct<"AdmissionLimitExceeded", {
20
- readonly limit: Schema.Literals<readonly ["queue-depth", "input-bytes", "database-bytes"]>;
21
- readonly actual: Schema.Int;
22
- readonly maximum: Schema.Int;
23
- }>, import("effect/Cause").YieldableError>;
24
- /**
25
- * An admission was refused by a host resource limit BEFORE any ledger row existed
26
- * (deployment spec §8, DEPLOY-007: "Admission has explicit bounded quota and overload
27
- * behavior... a typed rejection"). This is the DC analogue of `NodeDurableHost`'s
28
- * `AdmissionClosed` host gate: the port surface stays untouched, the refusal happens in the
29
- * Thread Object's submit entry point before `DurableAgentRuntime.submit` runs, and
30
- * nothing was admitted or written.
31
- */
32
- declare class AdmissionLimitExceeded extends AdmissionLimitExceeded_base {
33
- get message(): string;
34
- }
35
- /** The platform's hard per-Object database cap (10 GB, developers.cloudflare.com limits). */
36
- declare const CLOUDFLARE_DATABASE_CAP_BYTES = 10000000000;
37
- /** Default database-size admission ceiling: a 1 GB safety margin under the platform cap. */
38
- declare const DEFAULT_MAX_DATABASE_BYTES = 9000000000;
39
- declare const CloudflareAdmissionLimitsValue_base: Schema.Class<CloudflareAdmissionLimitsValue, Schema.Struct<{
40
- /** Maximum nonterminal Submissions per Thread lane before new admissions refuse. */
41
- readonly maxQueueDepthPerLane: Schema.Int;
42
- /** Maximum encoded input bytes; never above the storage per-value bound. */
43
- readonly maxInputBytes: Schema.Int;
44
- /** Maximum `ctx.storage.sql.databaseSize` at admission; stays under the 10 GB platform cap. */
45
- readonly maxDatabaseBytes: Schema.Int;
46
- }>, {}>;
47
- /**
48
- * Explicit bounded admission quotas checked by the Thread Object BEFORE admission
49
- * (exit gate "resource limits are checked before admission").
50
- */
51
- declare class CloudflareAdmissionLimitsValue extends CloudflareAdmissionLimitsValue_base {}
52
- declare const CloudflareDurableRuntimeConfigValue_base: Schema.Class<CloudflareDurableRuntimeConfigValue, Schema.Struct<{
53
- readonly deploymentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/DeploymentId">;
54
- /** Head of the minted producer identity `{producerPrefix}:{threadId}`. */
55
- readonly producerPrefix: Schema.NonEmptyString;
56
- /** Submission ownership lease duration (D5); fences work across Object incarnations. */
57
- readonly ownershipLeaseDuration: Schema.Int;
58
- /** Base delay of the alarm re-arm backoff when a pass makes no progress. */
59
- readonly alarmBackoffBase: Schema.Int;
60
- /** Ceiling of the alarm re-arm backoff. */
61
- readonly alarmBackoffCap: Schema.Int;
62
- /**
63
- * The maintenance-pass scan cadence and the ceiling of every re-arm delay: nonterminal
64
- * work is revisited at least this often (wake/scan pairing, persistence §14).
65
- */
66
- readonly wakeScanInterval: Schema.Int;
67
- /** `awaitSettlement` ledger re-check cadence when no wake arrives. */
68
- readonly settlementPollInterval: Schema.Int;
69
- /** Worker ownership-lease renewal cadence during an active Attempt. */
70
- readonly leaseRenewalInterval: Schema.Int;
71
- /** Active-Run abort-intent poll cadence. */
72
- readonly abortPollInterval: Schema.Int;
73
- /** Canonical observation poll cadence of the Durable Object store. */
74
- readonly observationPollInterval: Schema.Int;
75
- /** Per-value byte bound; must stay under the platform's 2 MB SQLite value limit. */
76
- readonly maxStoredValueBytes: Schema.Int;
77
- /** Opt-in full payload/digest-chain audit while opening the store. */
78
- readonly verifyOnOpen: Schema.Boolean;
79
- readonly limits: typeof CloudflareAdmissionLimitsValue;
80
- }>, {}>;
81
- /**
82
- * Validated Cloudflare durable runtime configuration. The producer identity of one
83
- * Thread Object is `{producerPrefix}:{threadId}` — stable across incarnations of
84
- * the same deployment, distinct across deployments — and producer-epoch fencing (not the
85
- * producer name) remains the correctness authority (DUR-006).
86
- */
87
- declare class CloudflareDurableRuntimeConfigValue extends CloudflareDurableRuntimeConfigValue_base {}
88
- declare const CloudflareDurableRuntimeConfig_base: Context.ServiceClass<CloudflareDurableRuntimeConfig, "@effect-agent/platform-cloudflare/CloudflareDurableRuntimeConfig", CloudflareDurableRuntimeConfigValue>;
89
- /** Explicit configuration authority for the assembled Cloudflare durable runtime. */
90
- declare class CloudflareDurableRuntimeConfig extends CloudflareDurableRuntimeConfig_base {}
91
- /** Documented production defaults applied by `ThreadObject.layer`. */
92
- declare const CLOUDFLARE_RUNTIME_DEFAULTS: {
93
- readonly ownershipLeaseDuration: number;
94
- readonly alarmBackoffBase: 100;
95
- readonly alarmBackoffCap: 5000;
96
- readonly wakeScanInterval: 1000;
97
- readonly settlementPollInterval: 500;
98
- readonly leaseRenewalInterval: 10000;
99
- readonly abortPollInterval: 500;
100
- readonly observationPollInterval: 25;
101
- readonly maxStoredValueBytes: 1900000;
102
- readonly verifyOnOpen: false;
103
- readonly maxQueueDepthPerLane: 256;
104
- readonly maxInputBytes: 1900000;
105
- readonly maxDatabaseBytes: 9000000000;
106
- };
107
- //#endregion
108
- //#region src/alarm.d.ts
109
- declare const DurableAlarmError_base: Schema.Class<DurableAlarmError, Schema.TaggedStruct<"DurableAlarmError", {
110
- readonly operation: Schema.String;
111
- readonly message: Schema.String;
112
- readonly cause: Schema.optionalKey<Schema.Defect>;
113
- }>, import("effect/Cause").YieldableError>;
114
- /**
115
- * The single multiplexed Durable Object alarm (decision D-P6-2). A Durable Object has ONE
116
- * alarm slot; every cadence the Node host ran on fibers (wake scan, lease expiry, settlement
117
- * and abort re-checks, retry backoff) multiplexes into one idempotent maintenance pass, and
118
- * the slot always holds the EARLIEST deadline any caller asked for.
119
- *
120
- * The alarm invariant (plan §1.4): every committed actionable mutation carries a newer durable
121
- * maintenance generation and a committed alarm. Stable externally-driven waits may be
122
- * nonterminal without retaining an alarm; their resolving mutation advances the generation and
123
- * restores the alarm atomically.
124
- */
125
- /** The Durable Object alarm API failed; surfaces on host entry points as a typed refusal. */
126
- declare class DurableAlarmError extends DurableAlarmError_base {}
127
- declare const DurableAlarmService_base: Context.ServiceClass<DurableAlarmService, "@effect-agent/platform-cloudflare/DurableAlarmService", {
128
- /** The scheduled deadline in epoch milliseconds, if any. */
129
- readonly scheduled: Effect.Effect<Option.Option<number>, DurableAlarmError>;
130
- /** Replace the slot with this deadline. */
131
- readonly scheduleAt: (epochMillis: number) => Effect.Effect<void, DurableAlarmError>;
132
- /** Keep the EARLIER of the existing deadline and this one (the multiplexing rule). */
133
- readonly ensureScheduledBy: (epochMillis: number) => Effect.Effect<void, DurableAlarmError>;
134
- /**
135
- * Arm an immediate alarm (the durable, coalescing local wake) — DEFERRED while a
136
- * maintenance pass is executing. Workerd cancels an in-flight alarm handler when a new
137
- * EARLIER deadline is written during its execution (`requestScheduledAlarm`), and the
138
- * maintenance pass runs INSIDE the alarm handler: an immediate wake landing mid-pass
139
- * (a routed port mutation, a sibling's `wake()`, the coordinator's own local notify)
140
- * would kill the running Attempt — manufacturing an ownership loss no real eviction
141
- * caused, and routing open uncertain-class Tool Calls into spurious Unknown Outcomes.
142
- * Deferral is contract-safe: wakes are droppable hints, every mutating entry point
143
- * pre-arms BEFORE its first durable mutation (the alarm invariant never rests on this
144
- * call). The pass's durable generation check observes any racing mutation, so the
145
- * in-memory hint does not need to be flushed after a stable wait is acknowledged.
146
- */
147
- readonly scheduleNow: Effect.Effect<void, DurableAlarmError>;
148
- /**
149
- * Run one maintenance pass with wake deferral (see `scheduleNow`). Calls made while `body`
150
- * executes are droppable promptness hints; correctness rests on the durable generation.
151
- */
152
- readonly withWakesDeferred: <A, E, R>(body: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
153
- /** Clear the slot; correctness-sensitive clears live in maintenance generation transactions. */
154
- readonly cancel: Effect.Effect<void, DurableAlarmError>;
155
- }>;
156
- /** `ctx.storage` alarm slot as an Effect service; storage is truth, never a memory field. */
157
- declare class DurableAlarmService extends DurableAlarmService_base {
158
- static readonly layer: Layer.Layer<DurableAlarmService, never, DurableObjectContext>;
159
- }
160
- declare const MaintenancePassReport_base: Schema.Class<MaintenancePassReport, Schema.Struct<{
161
- /** `caught-up` is generation-only; `actionable` ran recovery and one bounded drain. */
162
- readonly phase: Schema.Literals<readonly ["caught-up", "actionable"]>;
163
- /** Recovery decisions executed (or deferred) BEFORE any new claim in this pass. */
164
- readonly recovered: Schema.Int;
165
- /** Settlements the drain pass finalized. */
166
- readonly settled: Schema.Int;
167
- /** Submissions still nonterminal after the pass (suspended/unknown lanes stay honest). */
168
- readonly nonterminal: Schema.Int;
169
- /** `rearmed` for dirty/autonomous work, `cleared` for stable waits or settlement. */
170
- readonly alarm: Schema.Literals<readonly ["rearmed", "cleared"]>;
171
- }>, {}>;
172
- /** What one maintenance pass did — auditable evidence mirroring `NodeDurableHost`'s report. */
173
- declare class MaintenancePassReport extends MaintenancePassReport_base {}
174
- /** Fault boundaries around every maintenance-owned durable mutation. */
175
- type ThreadMaintenanceFailpointLocation = "maintenance:dirty:before" | "maintenance:dirty:after" | "maintenance:mutation:armed" | "maintenance:mutation:finished" | "maintenance:ensure:before" | "maintenance:ensure:after" | "maintenance:begin:before" | "maintenance:begin:after" | "maintenance:finish:before" | "maintenance:finish:after";
176
- type ThreadMaintenanceFailpointHandler = (location: ThreadMaintenanceFailpointLocation) => Effect.Effect<void>;
177
- declare const ThreadMaintenanceFailpoint_base: Context.ServiceClass<ThreadMaintenanceFailpoint, "@effect-agent/platform-cloudflare/ThreadMaintenanceFailpoint", {
178
- readonly hit: ThreadMaintenanceFailpointHandler;
179
- }>;
180
- /** Test-only fault authority; production uses the inert layer. */
181
- declare class ThreadMaintenanceFailpoint extends ThreadMaintenanceFailpoint_base {
182
- static readonly layer: Layer.Layer<ThreadMaintenanceFailpoint, never, never>;
183
- }
184
- type MaintenancePassFailure = DurableWorkerFailure | DurableBindingFailure | DurableAlarmError;
185
- declare const ThreadMaintenance_base: Context.ServiceClass<ThreadMaintenance, "@effect-agent/platform-cloudflare/ThreadMaintenance", {
186
- /** One idempotent maintenance pass; failures propagate so workerd retries the alarm. */
187
- readonly pass: Effect.Effect<MaintenancePassReport, MaintenancePassFailure>;
188
- /**
189
- * Constructor gate: initialize/inspect only the O(1) maintenance record and ensure a dirty
190
- * generation has an alarm. It never scans the ledger or canonical history.
191
- */
192
- readonly ensureAlarm: Effect.Effect<void, MaintenancePassFailure>;
193
- /**
194
- * Serialize the pre-arm boundary with pass acknowledgement, advance the durable dirty
195
- * generation and arm the alarm in one transaction BEFORE running the caller's mutation.
196
- * A pass cannot acknowledge while that mutation remains in flight.
197
- */
198
- readonly withMutation: <A, E, R>(body: Effect.Effect<A, E, R>) => Effect.Effect<A, E | DurableAlarmError, R>;
199
- }>;
200
- /**
201
- * Incremental, quiescent maintenance over a durable dirty/processed generation (issue #93).
202
- *
203
- * `pass` = generation snapshot/pre-arm → recovery → bounded drain → generation acknowledgement:
204
- *
205
- * 1. One storage transaction reads dirty/processed and re-arms before work. A caught-up forced
206
- * alarm takes an O(1) path without recovery, ledger scans, or canonical-history reads.
207
- * 2. Recovery still strictly precedes a new claim, and one bounded drain advances the lane.
208
- * 3. The final transaction acknowledges only the generation observed at pass start. A racing
209
- * mutation therefore remains `dirty > processed` and retains its atomically-established alarm.
210
- * 4. Stable external waits acknowledge and clear. Autonomous retry, indeterminate, and lease
211
- * recovery states leave their generation dirty and retain bounded backoff rearming.
212
- */
213
- declare class ThreadMaintenance extends ThreadMaintenance_base {
214
- static readonly layer: Layer.Layer<ThreadMaintenance, never, DurableAgentRuntime | SubmissionLedger | DurableAlarmService | ThreadMaintenanceFailpoint | CloudflareDurableRuntimeConfig | ThreadObjectIdentity | DurableObjectContext>;
215
- }
216
- //#endregion
217
- //#region src/wake-scheduler.d.ts
218
- /**
219
- * The DC `WakeScheduler` (plan §1.4):
220
- *
221
- * - `notify(local)` → `setAlarm(now)` — durable, cheap, coalescing (the alarm slot keeps the
222
- * earliest deadline) — plus a same-incarnation PubSub hint for `awaitSettlement` waiters.
223
- * - `notify(remote)` → fire-and-forget `wake()` on the owning Object's stub with every error
224
- * swallowed and logged: hints are droppable, and the target's own alarm/scan pairing (the
225
- * maintenance pass re-polls unsettled children) guarantees liveness without this call.
226
- * - `wakes` → the bounded sliding PubSub only. No important state lives in memory: the
227
- * subscription accelerates waiters within one incarnation and the settlement poll interval
228
- * is the correctness path.
229
- */
230
- declare const cloudflareWakeSchedulerLayer: Layer.Layer<WakeScheduler, never, DurableAlarmService | ThreadObjectIdentity | ThreadObjectNamespace>;
231
- //#endregion
232
- //#region src/progress-wait.d.ts
233
- declare const ProgressWaitRegistry_base: Context.ServiceClass<ProgressWaitRegistry, "@effect-agent/platform-cloudflare/ProgressWaitRegistry", {
234
- /** Register a Scope-owned cancellation signal, observing any early cancel tombstone. */
235
- readonly subscribe: (waiterId: string) => Effect.Effect<Effect.Effect<void>, never, Scope.Scope>;
236
- /** Cancel a registered waiter, or remember a bounded early cancellation. */
237
- readonly cancel: (waiterId: string) => Effect.Effect<void>;
238
- }>;
239
- /**
240
- * Per-incarnation cancellation registry for long-lived progress RPCs. The public runtime owns
241
- * the actual wake registration; this host-only registry lets an interrupted Worker Effect ask
242
- * the Object to interrupt its scoped wait before the Worker execution context itself ends.
243
- */
244
- declare class ProgressWaitRegistry extends ProgressWaitRegistry_base {
245
- static readonly layer: Layer.Layer<ProgressWaitRegistry>;
246
- }
247
- //#endregion
248
- //#region src/transport.d.ts
249
- /**
250
- * `ThreadPortTransport` over native Durable Object JS RPC (decision D-P6-3): one
251
- * `portCall(envelope)` on the stub of the Object that owns the addressed Thread
252
- * (`namespace.idFromName(threadId)` — the identity rule, plan §1.2). The envelopes are
253
- * already Schema-encoded JSON, so the RPC boundary carries only structured-cloneable values;
254
- * the protocol module stays transport-agnostic and fetch-with-JSON remains the documented
255
- * fallback carrier.
256
- *
257
- * Every delivery problem — stub construction, RPC rejection, overload, deploy-in-progress —
258
- * surfaces as `PortTransportError` (preserving the platform stub's own `retryable` signal
259
- * when present) and NEVER as a fabricated answer: on `resolveAdmission` the routing layer
260
- * turns exactly this error into `AdmissionIndeterminate` (SUB-031).
261
- */
262
- declare const threadPortTransportLayer: Layer.Layer<ThreadPortTransport, never, ThreadObjectNamespace>;
263
- //#endregion
264
- //#region src/layers.d.ts
265
- /**
266
- * Raw (unvalidated) construction options for `ThreadObject.make`, mirroring
267
- * `NodeDurableAgentRuntimeOptions`. Optional fields default to the documented production values
268
- * (`CLOUDFLARE_RUNTIME_DEFAULTS`); everything is schema-decoded into
269
- * `CloudflareDurableRuntimeConfigValue` before any resource opens (deployment §5 gate 1).
270
- */
271
- interface CloudflareDurableRuntimeOptions {
272
- readonly deploymentId: string;
273
- /** Head of the minted producer identity `{producerPrefix}:{threadId}`. */
274
- readonly producerPrefix: string;
275
- /** Milliseconds; default 30s (D5). */
276
- readonly ownershipLeaseDuration?: number | undefined;
277
- /** Milliseconds; default 100. */
278
- readonly alarmBackoffBase?: number | undefined;
279
- /** Milliseconds; default 5000. */
280
- readonly alarmBackoffCap?: number | undefined;
281
- /** Milliseconds; default 1000. Bounds every alarm re-arm delay. */
282
- readonly wakeScanInterval?: number | undefined;
283
- /** Milliseconds; default 500. */
284
- readonly settlementPollInterval?: number | undefined;
285
- /** Milliseconds; default 10000. */
286
- readonly leaseRenewalInterval?: number | undefined;
287
- /** Milliseconds; default 500. */
288
- readonly abortPollInterval?: number | undefined;
289
- /** Deployment-owned pricing authority used by durable cost budgets and settlements. */
290
- readonly estimateCostMicrousd?: RunCostEstimator | undefined;
291
- /** Closed trusted Tool failure reporting. Omission masks ambient observers at construction. */
292
- readonly toolFailureObserver?: RunToolFailureObserver | undefined;
293
- /** Milliseconds; default 25. */
294
- readonly observationPollInterval?: number | undefined;
295
- /** Bytes; default just under the 2 MB platform value limit. */
296
- readonly maxStoredValueBytes?: number | undefined;
297
- /** Default false. */
298
- readonly verifyOnOpen?: boolean | undefined;
299
- /** Nonterminal Submissions per lane before admission refuses; default 256. */
300
- readonly maxQueueDepthPerLane?: number | undefined;
301
- /** Encoded input bytes per Submission; default = the stored-value bound. */
302
- readonly maxInputBytes?: number | undefined;
303
- /** `ctx.storage.sql.databaseSize` ceiling at admission; default 9 GB (10 GB platform cap). */
304
- readonly maxDatabaseBytes?: number | undefined;
305
- /**
306
- * Durable Object storage fault injection (`ledger:*` / `append:*` locations). Handlers are
307
- * constructed per incarnation WITH the live `DurableObjectState`, so eviction harnesses can
308
- * map an armed hit to `ctx.abort()` — the platform's real failure mode. Default none.
309
- */
310
- readonly storageFailpoint?: ((ctx: DurableObjectState) => DoStorageFailpointHandler) | undefined;
311
- /** Coordinator fault injection (`submit:*` / `terminalize:*` locations); default none. */
312
- readonly runtimeFailpoint?: ((ctx: DurableObjectState) => DurableRuntimeFailpointHandler) | undefined;
313
- /** Thread-maintenance generation/alarm fault injection; default none. */
314
- readonly maintenanceFailpoint?: ((ctx: DurableObjectState) => ThreadMaintenanceFailpointHandler) | undefined;
315
- /** Host-supplied fail-closed authorization policy; defaults to service possession. */
316
- readonly operationAuthorizer?: OperationAuthorizerService | undefined;
317
- /**
318
- * Reconciliation policy consulted for open ordinary Tool Calls before an Unknown Outcome
319
- * is recorded (durability §10, DUR-009). Defaults to the fail-closed
320
- * `ToolReconciler.uncertain`.
321
- */
322
- readonly toolReconciler?: Layer.Layer<ToolReconciler> | undefined;
323
- }
324
- /** Services supplied before the application graph is built, including its dependencies. */
325
- type CloudflareBootstrapServices = CloudflareDurableRuntimeConfig | ThreadObjectIdentity | DurableRuntimeConfig | Crypto.Crypto | DoStorageFailpoint | DurableRuntimeFailpoint | ThreadMaintenanceFailpoint | RunContextPreparation | RunToolAuthorization | ToolReconciler;
326
- /** Every construction failure of the assembled Cloudflare durable runtime stack. */
327
- type CloudflareDurableRuntimeInitializationError = CloudflarePlatformConfigError | DigestError | DoStorageInitializationError;
328
- /** The services `ThreadObject.layer` provides. */
329
- type CloudflareDurableRuntimeServices = DurableAgentRuntime | SubmissionLedger | ThreadStore | WakeScheduler | DurableAlarmService | ThreadMaintenance | ThreadObjectPorts | ProgressWaitRegistry;
330
- declare const ThreadObjectPorts_base: Context.ServiceClass<ThreadObjectPorts, "@effect-agent/platform-cloudflare/ThreadObjectPorts", {
331
- readonly handle: (request: PortRequest) => Effect.Effect<PortResponse>;
332
- }>;
333
- /**
334
- * Owner-side execution port for a `portCall` request the wire endpoint has already decoded.
335
- * It executes against THIS Object's LOCAL port facets — never the routed decorators, so a
336
- * request cannot bounce between Objects — and returns the typed response for the endpoint to
337
- * encode.
338
- */
339
- declare class ThreadObjectPorts extends ThreadObjectPorts_base {}
340
- /**
341
- * Validate deployment settings and derive services before building application dependencies.
342
- * The native class factory builds this Layer inside its constructor gate. Custom Effect hosts
343
- * can provide it around the complete application Layer with the native context already supplied.
344
- */
345
- declare const layerConfig: (options: CloudflareDurableRuntimeOptions) => Layer.Layer<CloudflareBootstrapServices, CloudflarePlatformConfigError, DurableObjectContext>;
346
- /**
347
- * Register typed Agents and version declarations. Hashing and dependency capture happen in
348
- * this Layer's Scope, after application Layers have been provided. Every Agent's instruction,
349
- * Tool, Schema, and model requirements remain visible until satisfied by Layer composition.
350
- * Use Layer.unwrap for registration values that need effectful application setup.
351
- */
352
- declare const layer: <const Entries extends ReadonlyArray<AgentRegistration>>(registrations: Entries) => Layer.Layer<CloudflareDurableRuntimeServices, DigestError | DoStorageInitializationError, DurableObjectContext | ThreadObjectNamespace | Exclude<[Entries[number]] extends [never] ? never : Entries[number] extends (infer T) ? T extends Entries[number] ? T extends {
353
- readonly attemptLayer: (context: import("@effect-agent/thread").AgentAttemptContext) => Layer.Layer<infer Provides, never, infer Requires>;
354
- } ? Requires | Exclude<T extends (infer T_1) ? T_1 extends T ? T_1 extends {
355
- readonly agent: infer A extends import("@effect-agent/thread").ExecutableAgentBinding;
356
- } ? import("@effect-agent/thread").DurableWorkerRequirements<A> : T_1 extends {
357
- readonly agent: infer D extends import("@effect-agent/core").Definition<Schema.Top, Schema.Top, unknown, import("effect/unstable/ai/Toolkit").Any, import("@effect-agent/core").RunDispositionDeclaration<never, Schema.Top> | undefined, unknown> & {
358
- readonly instructions: import("@effect-agent/core").InstructionSource<never, unknown, unknown>;
359
- readonly inputPrompt?: import("@effect-agent/core").InputPromptSource<never, unknown, unknown> | undefined;
360
- };
361
- readonly model: infer M extends import("@effect-agent/thread").ExecutableAgentBinding["model"];
362
- } ? import("@effect-agent/thread").DurableWorkerRequirements<{
363
- readonly definition: D;
364
- readonly model: M;
365
- }> : never : never : never, Provides> : T extends {
366
- readonly agent: infer A extends import("@effect-agent/thread").ExecutableAgentBinding;
367
- } ? import("@effect-agent/thread").DurableWorkerRequirements<A> : T extends {
368
- readonly agent: infer D extends import("@effect-agent/core").Definition<Schema.Top, Schema.Top, unknown, import("effect/unstable/ai/Toolkit").Any, import("@effect-agent/core").RunDispositionDeclaration<never, Schema.Top> | undefined, unknown> & {
369
- readonly instructions: import("@effect-agent/core").InstructionSource<never, unknown, unknown>;
370
- readonly inputPrompt?: import("@effect-agent/core").InputPromptSource<never, unknown, unknown> | undefined;
371
- };
372
- readonly model: infer M extends import("@effect-agent/thread").ExecutableAgentBinding["model"];
373
- } ? import("@effect-agent/thread").DurableWorkerRequirements<{
374
- readonly definition: D;
375
- readonly model: M;
376
- }> : never : never : never, import("effect/Scope").Scope> | CloudflareBootstrapServices>;
377
- /**
378
- * Assemble the durable runtime from already-resolved Agent Bindings.
379
- * Use `ThreadObject.layer` to compile typed Agent registrations instead.
380
- * Supply host services through `ThreadObject.make` or `ThreadObject.layerConfig` and
381
- * the Durable Object context and namespace Layers when composing a custom host.
382
- */
383
- declare const layerFromBindings: (bindings: ReadonlyArray<ResolvedBinding>) => Layer.Layer<CloudflareDurableRuntimeServices, DoStorageInitializationError, DurableObjectContext | ThreadObjectNamespace | CloudflareBootstrapServices>;
384
- //#endregion
385
- //#region src/client.d.ts
386
- /** Truncate a diagnostic string to the host protocol's bounded length. */
387
- declare const boundHostDiagnostic: (value: string) => string;
388
- declare const HostProtocolError_base: Schema.Class<HostProtocolError, Schema.TaggedStruct<"HostProtocolError", {
389
- readonly message: Schema.String;
390
- }>, import("effect/Cause").YieldableError>;
391
- /**
392
- * The envelope itself could not be honored: the Object could not decode the request, or a
393
- * response could not be encoded/decoded. Never carries operation semantics.
394
- */
395
- declare class HostProtocolError extends HostProtocolError_base {}
396
- declare const ThreadClientError_base: Schema.Class<ThreadClientError, Schema.TaggedStruct<"ThreadClientError", {
397
- readonly threadId: Schema.String;
398
- readonly message: Schema.String;
399
- readonly cause: Schema.optionalKey<Schema.Defect>;
400
- /** Cloudflare's own classification for a failure safe to retry with a fresh stub. */
401
- readonly retryable: Schema.optionalKey<Schema.Boolean>;
402
- /** Cloudflare overloads are surfaced immediately instead of adding retry pressure. */
403
- readonly overloaded: Schema.optionalKey<Schema.Boolean>;
404
- }>, import("effect/Cause").YieldableError>;
405
- /** The Worker-side stub call itself failed (RPC rejection, overload, eviction mid-call). */
406
- declare class ThreadClientError extends ThreadClientError_base {}
407
- declare const SubmitRequest_base: Schema.Class<SubmitRequest, Schema.Struct<{
408
- readonly agentId: Schema.brand<Schema.NonEmptyString, "@effect-agent/core/AgentId">;
409
- readonly principal: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/Principal">;
410
- readonly idempotencyKey: Schema.brand<Schema.NonEmptyString, "@effect-agent/thread/IdempotencyKey">;
411
- readonly definitions: typeof DefinitionDigests;
412
- readonly inputPayload: Schema.declare<Schema.Json, Schema.Json>;
413
- }>, {}>;
414
- /**
415
- * One durable submission, input ALREADY encoded by the caller through the Agent Binding's
416
- * input schema (the Worker bundles the same Agent definitions as the Object, so schema
417
- * validation happens client-side; the resolved Binding re-validates at claim time). The
418
- * Thread identity is deliberately absent — the addressed Object IS the lane.
419
- */
420
- declare class SubmitRequest extends SubmitRequest_base {}
421
- declare const ObservePageRequest_base: Schema.Class<ObservePageRequest, Schema.Struct<{
422
- readonly afterSequence: Schema.optionalKey<Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">>;
423
- readonly limit: Schema.Int;
424
- }>, {}>;
425
- /** One bounded page of canonical records after an optional sequence. */
426
- declare class ObservePageRequest extends ObservePageRequest_base {}
427
- declare const AwaitProgressRequest_base: Schema.Class<AwaitProgressRequest, Schema.Struct<{
428
- readonly afterSequence: Schema.brand<Schema.Natural, "@effect-agent/thread/CanonicalSequence">;
429
- readonly waiterId: Schema.String;
430
- }>, {}>;
431
- /** One event-driven wait for canonical progress strictly after this sequence. */
432
- declare class AwaitProgressRequest extends AwaitProgressRequest_base {}
433
- declare const CancelProgressRequest_base: Schema.Class<CancelProgressRequest, Schema.Struct<{
434
- readonly waiterId: Schema.String;
435
- }>, {}>;
436
- /** Best-effort cancellation of one in-flight progress RPC. */
437
- declare class CancelProgressRequest extends CancelProgressRequest_base {}
438
- /**
439
- * Every typed failure a host entry point can produce, plus the protocol's own errors. Same
440
- * closed-union discipline as the WP2 `PortFailure`: members re-decode to the SAME tagged
441
- * classes on the Worker side; `cause` chains travel as Schema defects without instance
442
- * fidelity (plan §2.8).
443
- */
444
- declare const HostFailure: Schema.Union<readonly [typeof AgentInputError, typeof DigestError, typeof AdmissionConflict, typeof SettlementConflict, typeof ApprovalConflict, typeof UnknownResolutionConflict, typeof JoinedToHost, typeof LedgerError, typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof AdmissionLimitExceeded, typeof DurableAlarmError, typeof OperationDenied, typeof HostProtocolError]>;
445
- type HostFailure = typeof HostFailure.Type;
446
- declare const SubmitSucceeded_base: Schema.Class<SubmitSucceeded, Schema.TaggedStruct<"SubmitSucceeded", {
447
- readonly receipt: typeof Receipt;
448
- }>, {}>;
449
- declare class SubmitSucceeded extends SubmitSucceeded_base {}
450
- declare const SettlementReached_base: Schema.Class<SettlementReached, Schema.TaggedStruct<"SettlementReached", {
451
- readonly settlement: typeof Settlement;
452
- }>, {}>;
453
- declare class SettlementReached extends SettlementReached_base {}
454
- declare const ObservedPage_base: Schema.Class<ObservedPage, Schema.TaggedStruct<"ObservedPage", {
455
- readonly records: Schema.$Array<typeof CanonicalRecordEnvelope>;
456
- }>, {}>;
457
- declare class ObservedPage extends ObservedPage_base {}
458
- declare const ProgressObserved_base: Schema.Class<ProgressObserved, Schema.TaggedStruct<"ProgressObserved", {}>, {}>;
459
- /** A record was already committed or an incarnation-local hint says the caller should re-read. */
460
- declare class ProgressObserved extends ProgressObserved_base {}
461
- declare const ProgressCancelled_base: Schema.Class<ProgressCancelled, Schema.TaggedStruct<"ProgressCancelled", {}>, {}>;
462
- declare class ProgressCancelled extends ProgressCancelled_base {}
463
- declare const AbortRecorded_base: Schema.Class<AbortRecorded, Schema.TaggedStruct<"AbortRecorded", {
464
- readonly intent: typeof AbortIntent;
465
- }>, {}>;
466
- declare class AbortRecorded extends AbortRecorded_base {}
467
- declare const ApprovalRecorded_base: Schema.Class<ApprovalRecorded, Schema.TaggedStruct<"ApprovalRecorded", {
468
- readonly intent: typeof ApprovalDecisionIntent;
469
- }>, {}>;
470
- declare class ApprovalRecorded extends ApprovalRecorded_base {}
471
- declare const UnknownResolutionRecorded_base: Schema.Class<UnknownResolutionRecorded, Schema.TaggedStruct<"UnknownResolutionRecorded", {
472
- readonly intent: typeof UnknownResolutionIntent;
473
- }>, {}>;
474
- declare class UnknownResolutionRecorded extends UnknownResolutionRecorded_base {}
475
- declare const HostFailed_base: Schema.Class<HostFailed, Schema.TaggedStruct<"HostFailed", {
476
- readonly failure: Schema.Union<readonly [typeof AgentInputError, typeof DigestError, typeof AdmissionConflict, typeof SettlementConflict, typeof ApprovalConflict, typeof UnknownResolutionConflict, typeof JoinedToHost, typeof LedgerError, typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof AdmissionLimitExceeded, typeof DurableAlarmError, typeof OperationDenied, typeof HostProtocolError]>;
477
- }>, {}>;
478
- /** The entry point failed TYPED on the Object; the failure re-decodes verbatim. */
479
- declare class HostFailed extends HostFailed_base {}
480
- /** The uniform answer of one host entry point. Callers narrow by the tag their call implies. */
481
- declare const HostResponse: Schema.Union<readonly [typeof SubmitSucceeded, typeof SettlementReached, typeof ObservedPage, typeof ProgressObserved, typeof ProgressCancelled, typeof AbortRecorded, typeof ApprovalRecorded, typeof UnknownResolutionRecorded, typeof HostFailed]>;
482
- type HostResponse = typeof HostResponse.Type;
483
- declare const decodeSubmitRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<SubmitRequest, Schema.SchemaError, never>;
484
- declare const encodeSubmitRequest: (input: SubmitRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
485
- readonly agentId: string;
486
- readonly principal: string;
487
- readonly idempotencyKey: string;
488
- readonly definitions: {
489
- readonly agent: string;
490
- readonly model: string;
491
- readonly tools: string;
492
- };
493
- readonly inputPayload: Schema.Json;
494
- }, Schema.SchemaError, never>;
495
- declare const decodeReceipt: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<Receipt, Schema.SchemaError, never>;
496
- declare const encodeReceipt: (input: Receipt, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
497
- readonly receiptId: string;
498
- readonly submissionId: string;
499
- readonly threadId: string;
500
- readonly queueSequence: number;
501
- }, Schema.SchemaError, never>;
502
- declare const decodeObservePageRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ObservePageRequest, Schema.SchemaError, never>;
503
- declare const encodeObservePageRequest: (input: ObservePageRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
504
- readonly afterSequence?: number | undefined;
505
- readonly limit: number;
506
- }, Schema.SchemaError, never>;
507
- declare const decodeAwaitProgressRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AwaitProgressRequest, Schema.SchemaError, never>;
508
- declare const encodeAwaitProgressRequest: (input: AwaitProgressRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
509
- readonly afterSequence: number;
510
- readonly waiterId: string;
511
- }, Schema.SchemaError, never>;
512
- declare const decodeCancelProgressRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<CancelProgressRequest, Schema.SchemaError, never>;
513
- declare const encodeCancelProgressRequest: (input: CancelProgressRequest, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
514
- readonly waiterId: string;
515
- }, Schema.SchemaError, never>;
516
- declare const decodeAbortCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortCommand, Schema.SchemaError, never>;
517
- declare const encodeAbortCommand: (input: AbortCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
518
- readonly submissionId: string;
519
- readonly author: string;
520
- readonly reason: string;
521
- }, Schema.SchemaError, never>;
522
- declare const decodeApprovalDecisionCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ApprovalDecisionCommand, Schema.SchemaError, never>;
523
- declare const encodeApprovalDecisionCommand: (input: ApprovalDecisionCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
524
- readonly submissionId: string;
525
- readonly toolCallId: string;
526
- readonly decision: "approved" | "denied";
527
- readonly resolver: string;
528
- readonly reason: string;
529
- }, Schema.SchemaError, never>;
530
- declare const decodeUnknownResolutionCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<UnknownResolutionCommand, Schema.SchemaError, never>;
531
- declare const encodeUnknownResolutionCommand: (input: UnknownResolutionCommand, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
532
- readonly submissionId: string;
533
- readonly toolCallId: string;
534
- readonly author: string;
535
- readonly reason: string;
536
- readonly resolution: {
537
- readonly _tag: "CompletedWithResult";
538
- readonly result: Schema.Json;
539
- readonly isFailure: boolean;
540
- } | {
541
- readonly _tag: "NeverHappened";
542
- } | {
543
- readonly _tag: "SafeToRetry";
544
- } | {
545
- readonly _tag: "AbortSubmission";
546
- };
547
- }, Schema.SchemaError, never>;
548
- declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | ProgressCancelled | ProgressObserved | SettlementReached | SubmitSucceeded | UnknownResolutionRecorded, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
549
- readonly _tag: "SubmitSucceeded";
550
- readonly receipt: {
551
- readonly receiptId: string;
552
- readonly submissionId: string;
553
- readonly threadId: string;
554
- readonly queueSequence: number;
555
- };
556
- } | {
557
- readonly _tag: "SettlementReached";
558
- readonly settlement: {
559
- readonly submissionId: string;
560
- readonly settlementId: string;
561
- readonly receiptId: string;
562
- readonly outcome: "aborted" | "completed" | "failed";
563
- readonly runDisposition?: Schema.Json | undefined;
564
- readonly usageSummary?: {
565
- readonly modelCalls: number;
566
- readonly inputTokens: {
567
- readonly total: number;
568
- readonly uncached: number;
569
- readonly cacheRead: number;
570
- readonly cacheWrite: number;
571
- };
572
- readonly outputTokens: {
573
- readonly total: number;
574
- readonly text: number;
575
- readonly reasoning: number;
576
- };
577
- readonly costMicrousd: number;
578
- readonly byModel: readonly {
579
- readonly provider: string;
580
- readonly model: string;
581
- readonly serviceTier?: string | undefined;
582
- readonly pricingVersion?: string | undefined;
583
- readonly modelCalls: number;
584
- readonly inputTokens: {
585
- readonly total: number;
586
- readonly uncached: number;
587
- readonly cacheRead: number;
588
- readonly cacheWrite: number;
589
- };
590
- readonly outputTokens: {
591
- readonly total: number;
592
- readonly text: number;
593
- readonly reasoning: number;
594
- };
595
- readonly costMicrousd: number;
596
- }[];
597
- } | undefined;
598
- readonly failure?: {
599
- readonly errorTag: string;
600
- readonly message: string;
601
- } | undefined;
602
- readonly settledAt: string;
603
- };
604
- } | {
605
- readonly _tag: "ObservedPage";
606
- readonly records: readonly {
607
- readonly threadId: string;
608
- readonly batchId: string;
609
- readonly sequence: number;
610
- readonly offset: string;
611
- readonly record: {
612
- readonly recordId: string;
613
- readonly family: "thread";
614
- readonly schemaVersion: 1;
615
- readonly createdAt: string;
616
- readonly deploymentId: string;
617
- readonly payload: {
618
- readonly _tag: "ThreadCreated";
619
- readonly agentId: string;
620
- readonly definitions: {
621
- readonly agent: string;
622
- readonly model: string;
623
- readonly tools: string;
624
- };
625
- } | {
626
- readonly _tag: "UserInputRecorded";
627
- readonly submissionId?: string | undefined;
628
- readonly kind: "follow-up" | "steering" | "user";
629
- readonly runId?: string | undefined;
630
- readonly input: Schema.Json;
631
- } | {
632
- readonly _tag: "RunStarted";
633
- readonly runId: string;
634
- readonly policyAccountingVersion: 1;
635
- readonly maxDurationMillis: number;
636
- } | {
637
- readonly _tag: "RunPolicyUsageReserved";
638
- readonly runId: string;
639
- readonly programmaticToolCalls: number;
640
- readonly finalizationUsed: boolean;
641
- } | {
642
- readonly _tag: "ModelCompleted";
643
- readonly runId: string;
644
- readonly output: Schema.Json;
645
- readonly messages?: Schema.Json | undefined;
646
- } | {
647
- readonly _tag: "ModelResponseRecorded";
648
- readonly runId: string;
649
- readonly turnId: string;
650
- readonly turn: number;
651
- readonly messages: Schema.Json;
652
- readonly messagesDigest: string;
653
- readonly runScopedPrefixLength?: number | undefined;
654
- readonly modelUsage?: readonly {
655
- readonly provider: string;
656
- readonly model: string;
657
- readonly serviceTier?: string | undefined;
658
- readonly pricingVersion?: string | undefined;
659
- readonly inputTokens: {
660
- readonly total: number;
661
- readonly uncached: number;
662
- readonly cacheRead: number;
663
- readonly cacheWrite: number;
664
- };
665
- readonly outputTokens: {
666
- readonly total: number;
667
- readonly text: number;
668
- readonly reasoning: number;
669
- };
670
- readonly costMicrousd: number;
671
- }[] | undefined;
672
- readonly inputTokens?: number | undefined;
673
- readonly outputTokens?: number | undefined;
674
- readonly costMicrousd?: number | undefined;
675
- } | {
676
- readonly _tag: "ToolCallPrepared";
677
- readonly runId: string;
678
- readonly turnId: string;
679
- readonly turn: number;
680
- readonly toolCallId: string;
681
- readonly toolName: string;
682
- readonly parameters: Schema.Json;
683
- readonly parametersDigest: string;
684
- readonly executionKind?: "delegation" | "ordinary" | undefined;
685
- } | {
686
- readonly _tag: "ToolCallSettled";
687
- readonly runId: string;
688
- readonly toolCallId: string;
689
- readonly toolName: string;
690
- readonly result: Schema.Json;
691
- readonly isFailure: boolean;
692
- readonly budgetRejected?: true | undefined;
693
- } | {
694
- readonly _tag: "ToolCallUnknown";
695
- readonly runId: string;
696
- readonly turn: number;
697
- readonly toolCallId: string;
698
- readonly toolName: string;
699
- readonly reason: string;
700
- } | {
701
- readonly _tag: "ToolCallResolved";
702
- readonly runId: string;
703
- readonly toolCallId: string;
704
- readonly resolution: "completed-with-result" | "failed-with-error" | "never-started" | "safe-retry";
705
- readonly author: string;
706
- readonly reason: string;
707
- } | {
708
- readonly _tag: "ToolStepSettled";
709
- readonly runId: string;
710
- readonly toolCallId: string;
711
- readonly stepName: string;
712
- readonly output: Schema.Json;
713
- readonly outputDigest: string;
714
- } | {
715
- readonly _tag: "ToolApprovalRequested";
716
- readonly runId: string;
717
- readonly turnId: string;
718
- readonly turn: number;
719
- readonly toolCallId: string;
720
- readonly toolName: string;
721
- readonly parametersDigest: string;
722
- } | {
723
- readonly _tag: "ToolApprovalDecided";
724
- readonly runId: string;
725
- readonly turn: number;
726
- readonly toolCallId: string;
727
- readonly decision: "approved" | "denied";
728
- readonly resolver: string;
729
- readonly reason: string;
730
- } | {
731
- readonly _tag: "ModelResponseInterrupted";
732
- readonly runId: string;
733
- readonly supersededEpoch: number;
734
- readonly attemptId: string;
735
- readonly reason: string;
736
- } | {
737
- readonly _tag: "CompactionCreated";
738
- readonly runId: string;
739
- readonly turn: number;
740
- readonly kind: "clear-tool-results" | "summarize";
741
- readonly coversThrough: number;
742
- readonly summary?: string | undefined;
743
- } | {
744
- readonly _tag: "RunFailed";
745
- readonly runId: string;
746
- readonly failure: Schema.Json;
747
- } | {
748
- readonly _tag: "RunCompleted";
749
- readonly runId: string;
750
- readonly output: Schema.Json;
751
- readonly runDisposition?: Schema.Json | undefined;
752
- readonly finishReason?: "budget-exhausted" | undefined;
753
- readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
754
- } | {
755
- readonly _tag: "AbortRequested";
756
- readonly submissionId: string;
757
- readonly author: string;
758
- readonly reason: string;
759
- } | {
760
- readonly _tag: "SubmissionSettled";
761
- readonly submissionId: string;
762
- readonly settlementId: string;
763
- readonly receiptId: string;
764
- readonly outcome: "aborted" | "completed" | "failed";
765
- readonly runId?: string | undefined;
766
- readonly result?: Schema.Json | undefined;
767
- readonly runDisposition?: Schema.Json | undefined;
768
- readonly finishReason?: "budget-exhausted" | undefined;
769
- readonly exhausted?: "tokens" | "tool-calls" | "turns" | undefined;
770
- readonly policyLimit?: "cost" | "duration" | "repeated-failures" | "tokens" | "tool-calls" | "turns" | "usage" | undefined;
771
- readonly usageSummary?: {
772
- readonly modelCalls: number;
773
- readonly inputTokens: {
774
- readonly total: number;
775
- readonly uncached: number;
776
- readonly cacheRead: number;
777
- readonly cacheWrite: number;
778
- };
779
- readonly outputTokens: {
780
- readonly total: number;
781
- readonly text: number;
782
- readonly reasoning: number;
783
- };
784
- readonly costMicrousd: number;
785
- readonly byModel: readonly {
786
- readonly provider: string;
787
- readonly model: string;
788
- readonly serviceTier?: string | undefined;
789
- readonly pricingVersion?: string | undefined;
790
- readonly modelCalls: number;
791
- readonly inputTokens: {
792
- readonly total: number;
793
- readonly uncached: number;
794
- readonly cacheRead: number;
795
- readonly cacheWrite: number;
796
- };
797
- readonly outputTokens: {
798
- readonly total: number;
799
- readonly text: number;
800
- readonly reasoning: number;
801
- };
802
- readonly costMicrousd: number;
803
- }[];
804
- } | undefined;
805
- } | {
806
- readonly _tag: "SubagentRequested";
807
- readonly runId: string;
808
- readonly turnId: string;
809
- readonly turn: number;
810
- readonly toolCallId: string;
811
- readonly delegationId: string;
812
- readonly targetAgentId: string;
813
- readonly targetDigests: {
814
- readonly agent: string;
815
- readonly model: string;
816
- readonly tools: string;
817
- };
818
- readonly childInput: Schema.Json;
819
- readonly childInputDigest: string;
820
- readonly grantDigest: string;
821
- readonly reservationId: string;
822
- readonly reservationDigest: string;
823
- readonly childThreadId: string;
824
- readonly childPrincipal: string;
825
- readonly childIdempotencyKey: string;
826
- readonly toolCallAllowance?: number | undefined;
827
- readonly policy?: Schema.Json | undefined;
828
- readonly budget?: {
829
- readonly caps: {
830
- readonly maxTotalChildInvocations?: number | undefined;
831
- readonly maxConcurrentChildren?: number | undefined;
832
- readonly maxTurns?: number | undefined;
833
- readonly maxToolCalls?: number | undefined;
834
- readonly maxDurationMillis?: number | undefined;
835
- readonly maxInputTokens?: number | undefined;
836
- readonly maxOutputTokens?: number | undefined;
837
- readonly maxCostMicrousd?: number | undefined;
838
- readonly maxResultBytes?: number | undefined;
839
- };
840
- readonly allocation: {
841
- readonly turns: number;
842
- readonly toolCalls: number;
843
- readonly durationMillis: number;
844
- readonly inputTokens: number;
845
- readonly outputTokens: number;
846
- readonly costMicrousd: number;
847
- readonly resultBytes: number;
848
- };
849
- } | undefined;
850
- } | {
851
- readonly _tag: "SubagentStarted";
852
- readonly runId: string;
853
- readonly toolCallId: string;
854
- readonly childThreadId: string;
855
- readonly childSubmissionId: string;
856
- readonly childReceiptId: string;
857
- readonly childRunId: string;
858
- } | {
859
- readonly _tag: "SubagentJoined";
860
- readonly runId: string;
861
- readonly toolCallId: string;
862
- readonly childSubmissionId: string;
863
- readonly childSettlementId: string;
864
- readonly childOutcome: "aborted" | "completed" | "failed";
865
- readonly childResultDigest: string;
866
- readonly projectedResultDigest: string;
867
- readonly usageSummary: Schema.Json;
868
- readonly reservationId: string;
869
- readonly finalAccounting: Schema.Json;
870
- } | {
871
- readonly _tag: "SubagentLineageRecorded";
872
- readonly parentLink: {
873
- readonly delegationId: string;
874
- readonly parentAgentId: string;
875
- readonly parentThreadId: string;
876
- readonly parentRunId: string;
877
- readonly parentToolCallId: string;
878
- readonly depth: number;
879
- };
880
- readonly parentSubmissionId: string;
881
- readonly childDefinitionDigests: {
882
- readonly agent: string;
883
- readonly model: string;
884
- readonly tools: string;
885
- };
886
- readonly childInputDigest: string;
887
- readonly grantDigest: string;
888
- readonly toolCallAllowance?: number | undefined;
889
- readonly policy?: Schema.Json | undefined;
890
- } | {
891
- readonly _tag: "RepairAnnotated";
892
- readonly reason: string;
893
- readonly details: Schema.Json;
894
- };
895
- };
896
- }[];
897
- } | {
898
- readonly _tag: "ProgressObserved";
899
- } | {
900
- readonly _tag: "ProgressCancelled";
901
- } | {
902
- readonly _tag: "AbortRecorded";
903
- readonly intent: {
904
- readonly submissionId: string;
905
- readonly author: string;
906
- readonly reason: string;
907
- readonly requestedAt: string;
908
- readonly canonicalRecordId?: string | undefined;
909
- };
910
- } | {
911
- readonly _tag: "ApprovalRecorded";
912
- readonly intent: {
913
- readonly submissionId: string;
914
- readonly toolCallId: string;
915
- readonly decision: "approved" | "denied";
916
- readonly resolver: string;
917
- readonly reason: string;
918
- readonly decidedAt: string;
919
- readonly canonicalRecordId?: string | undefined;
920
- };
921
- } | {
922
- readonly _tag: "UnknownResolutionRecorded";
923
- readonly intent: {
924
- readonly submissionId: string;
925
- readonly toolCallId: string;
926
- readonly author: string;
927
- readonly reason: string;
928
- readonly resolution: {
929
- readonly _tag: "CompletedWithResult";
930
- readonly result: Schema.Json;
931
- readonly isFailure: boolean;
932
- } | {
933
- readonly _tag: "NeverHappened";
934
- } | {
935
- readonly _tag: "SafeToRetry";
936
- } | {
937
- readonly _tag: "AbortSubmission";
938
- };
939
- readonly resolvedAt: string;
940
- readonly canonicalRecordId?: string | undefined;
941
- };
942
- } | {
943
- readonly _tag: "HostFailed";
944
- readonly failure: {
945
- readonly _tag: "HostProtocolError";
946
- readonly message: string;
947
- } | {
948
- readonly _tag: "AgentInputError";
949
- readonly message: string;
950
- } | {
951
- readonly _tag: "DigestError";
952
- readonly message: string;
953
- readonly cause?: Schema.Json | undefined;
954
- } | {
955
- readonly _tag: "AdmissionConflict";
956
- readonly threadId: string;
957
- readonly principal: string;
958
- readonly idempotencyKey: string;
959
- readonly existingInputDigest: string;
960
- readonly attemptedInputDigest: string;
961
- } | {
962
- readonly _tag: "SettlementConflict";
963
- readonly submissionId: string;
964
- readonly existingOutcome: "aborted" | "completed" | "failed";
965
- } | {
966
- readonly _tag: "ApprovalConflict";
967
- readonly submissionId: string;
968
- readonly toolCallId: string;
969
- readonly existingDecision: "approved" | "denied";
970
- } | {
971
- readonly _tag: "UnknownResolutionConflict";
972
- readonly submissionId: string;
973
- readonly toolCallId: string;
974
- } | {
975
- readonly _tag: "JoinedToHost";
976
- readonly submissionId: string;
977
- readonly hostSubmissionId: string;
978
- } | {
979
- readonly _tag: "LedgerError";
980
- readonly operation: string;
981
- readonly message: string;
982
- readonly cause?: Schema.Json | undefined;
983
- } | {
984
- readonly _tag: "ThreadStoreError";
985
- readonly operation: string;
986
- readonly message: string;
987
- readonly cause?: Schema.Json | undefined;
988
- } | {
989
- readonly _tag: "ThreadNotMaterialized";
990
- readonly threadId: string;
991
- } | {
992
- readonly _tag: "AppendConflict";
993
- readonly threadId: string;
994
- readonly batchId: string;
995
- readonly reason: "batch-digest" | "record-identity" | "tail";
996
- readonly actualTailSequence?: number | undefined;
997
- readonly actualTailDigest?: string | undefined;
998
- } | {
999
- readonly _tag: "FenceRejected";
1000
- readonly threadId: string;
1001
- readonly actualEpoch: number;
1002
- readonly attemptedEpoch: number;
1003
- } | {
1004
- readonly _tag: "DurableRuntimeFailpointError";
1005
- readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "compaction:after-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-start-append" | "run:before-start-append" | "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" | "tools:before-prepared-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append";
1006
- } | {
1007
- readonly _tag: "AdmissionLimitExceeded";
1008
- readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
1009
- readonly actual: number;
1010
- readonly maximum: number;
1011
- } | {
1012
- readonly _tag: "DurableAlarmError";
1013
- readonly operation: string;
1014
- readonly message: string;
1015
- readonly cause?: Schema.Json | undefined;
1016
- } | {
1017
- readonly _tag: "OperationDenied";
1018
- readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
1019
- readonly reason: string;
1020
- readonly threadId?: string | undefined;
1021
- readonly submissionId?: string | undefined;
1022
- };
1023
- }, Schema.SchemaError, never>;
1024
- declare const decodeHostResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AbortRecorded | ApprovalRecorded | HostFailed | ObservedPage | ProgressCancelled | ProgressObserved | SettlementReached | SubmitSucceeded | UnknownResolutionRecorded, Schema.SchemaError, never>;
1025
- /** Failure surface of `CloudflareThreadClient.submit`. */
1026
- declare const ClientSubmitHostFailure: Schema.Union<readonly [typeof AgentInputError, typeof DigestError, typeof AdmissionConflict, typeof LedgerError, typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof AdmissionLimitExceeded, typeof DurableAlarmError, typeof HostProtocolError]>;
1027
- declare const ClientAwaitHostFailure: Schema.Union<readonly [typeof LedgerError, typeof SettlementConflict, typeof OperationDenied, typeof HostProtocolError]>;
1028
- declare const ClientObserveHostFailure: Schema.Union<readonly [typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof OperationDenied, typeof HostProtocolError]>;
1029
- declare const ClientAbortHostFailure: Schema.Union<readonly [typeof OperationDenied, typeof LedgerError, typeof SettlementConflict, typeof JoinedToHost, typeof DurableRuntimeFailpointError, typeof DurableAlarmError, typeof HostProtocolError]>;
1030
- declare const ClientApprovalHostFailure: Schema.Union<readonly [typeof LedgerError, typeof SettlementConflict, typeof ApprovalConflict, typeof OperationDenied, typeof DurableAlarmError, typeof HostProtocolError]>;
1031
- declare const ClientUnknownHostFailure: Schema.Union<readonly [typeof LedgerError, typeof SettlementConflict, typeof UnknownResolutionConflict, typeof JoinedToHost, typeof DurableRuntimeFailpointError, typeof OperationDenied, typeof DurableAlarmError, typeof HostProtocolError]>;
1032
- type ClientSubmitFailure = typeof ClientSubmitHostFailure.Type | ThreadClientError;
1033
- type ClientAwaitFailure = typeof ClientAwaitHostFailure.Type | ThreadClientError;
1034
- type ClientObserveFailure = typeof ClientObserveHostFailure.Type | ThreadClientError;
1035
- type ClientProgressFailure = ClientObserveFailure;
1036
- type ClientAbortFailure = typeof ClientAbortHostFailure.Type | ThreadClientError;
1037
- type ClientApprovalFailure = typeof ClientApprovalHostFailure.Type | ThreadClientError;
1038
- type ClientUnknownFailure = typeof ClientUnknownHostFailure.Type | ThreadClientError;
1039
- declare const CloudflareThreadClient_base: Context.ServiceClass<CloudflareThreadClient, "@effect-agent/platform-cloudflare/CloudflareThreadClient", {
1040
- /** Encode the input client-side, then durably submit to the owning Object. */
1041
- readonly submit: <InputSchema extends Schema.Top>(agent: DurableSubmitAgent<InputSchema>, input: InputSchema["Type"], options: DurableSubmitOptions) => Effect.Effect<Receipt, ClientSubmitFailure, InputSchema["EncodingServices"]>;
1042
- /** Wake-hinted, poll-guaranteed settlement wait executed inside the owning Object. */
1043
- readonly awaitSettlement: (receipt: Receipt) => Effect.Effect<Settlement, ClientAwaitFailure>;
1044
- /**
1045
- * Wait without polling until progress after `afterSequence` is already durable or hinted.
1046
- * The result is deliberately void: canonical records remain authoritative and must be read.
1047
- */
1048
- readonly awaitProgress: (threadId: ThreadId, afterSequence: CanonicalSequence) => Effect.Effect<void, ClientProgressFailure>;
1049
- /** One bounded page of canonical records. */
1050
- readonly readPage: (threadId: ThreadId, options?: {
1051
- readonly afterSequence?: CanonicalSequence | undefined;
1052
- readonly limit?: number | undefined;
1053
- }) => Effect.Effect<ReadonlyArray<CanonicalRecordEnvelope>, ClientObserveFailure>;
1054
- /**
1055
- * Every canonical record up to the CURRENT committed tail, via repeated pages. A
1056
- * snapshot read, not a live observation — callers wanting liveness re-read after
1057
- * `awaitSettlement`.
1058
- */
1059
- readonly readAll: (threadId: ThreadId) => Effect.Effect<ReadonlyArray<CanonicalRecordEnvelope>, ClientObserveFailure>;
1060
- /**
1061
- * Submission-addressed operations take the owning Thread explicitly (from the
1062
- * Receipt): minted Submission identities stay OPAQUE outside the storage adapter that
1063
- * minted them (D-P6-5), so the client never parses one to find the lane.
1064
- */
1065
- readonly abort: (threadId: ThreadId, command: AbortCommand) => Effect.Effect<AbortIntent, ClientAbortFailure>;
1066
- readonly resolveApproval: (threadId: ThreadId, command: ApprovalDecisionCommand) => Effect.Effect<ApprovalDecisionIntent, ClientApprovalFailure>;
1067
- readonly resolveUnknown: (threadId: ThreadId, command: UnknownResolutionCommand) => Effect.Effect<UnknownResolutionIntent, ClientUnknownFailure>;
1068
- }>;
1069
- /** Worker-side client over the Thread Object namespace (DEPLOY-010). */
1070
- declare class CloudflareThreadClient extends CloudflareThreadClient_base {
1071
- /**
1072
- * Assemble the client from a resolved namespace and the platform Crypto implementation.
1073
- * rpcTracing is the binding name and remains opt-in. Caller authentication, principals,
1074
- * idempotency keys, and definition digests are still explicit submission inputs.
1075
- */
1076
- static layerFromBinding(options: {
1077
- readonly namespace: DurableObjectNamespace<ThreadObjectRpc>;
1078
- readonly rpcTracing?: string;
1079
- }): Layer.Layer<CloudflareThreadClient>;
1080
- static readonly layer: Layer.Layer<CloudflareThreadClient, never, ThreadObjectNamespace | Crypto.Crypto>;
1081
- }
1082
- declare namespace thread_object_d_exports {
1083
- export { AdminExplainRequest, AdminFailed, AdminFailure, AdminResponse, AdminVerifyRequest, CloudflareBootstrapServices as BootstrapServices, Class, ExplainedRecovery, CloudflareDurableRuntimeInitializationError as InitializationError, Instance, ObligationsScanned, Options, RetryExecuted, CloudflareDurableRuntimeOptions as RuntimeOptions, CloudflareDurableRuntimeServices as Services, VerifiedIntegrity, decodeAdminExplainRequest, decodeAdminResponse, decodeAdminVerifyRequest, decodeObligationThresholds, decodeRetryCommand, encodeAdminResponse, layer, layerConfig, make };
1084
- }
1085
- /**
1086
- * `ThreadObject.make(application, options)` — the Thread Durable Object
1087
- * (plan §1.4,
1088
- * D-P6-1): a factory returning a class that applications export from their Worker entry.
1089
- * One SQLite-backed Object per Thread is the serialized owner (durability §6); the
1090
- * Object never runs `runResolvedWorker`'s infinite loop — each ingress event or alarm runs
1091
- * ONE bounded `runRecovery` + `processThreadResolved` pass, and the persisted alarm
1092
- * (the single multiplexed slot, D-P6-2) finishes accepted work across evictions WITHOUT any
1093
- * incoming request.
1094
- *
1095
- * Constructor gate (`blockConcurrencyWhile`) is LOCAL-ONLY: schema migration and the
1096
- * exact-version check, configuration decode, and the defensive ensure-alarm half of the
1097
- * alarm invariant. It deliberately does NOT run the recovery pass: parent recovery can
1098
- * require child-Object reads and vice versa, and two Objects blocked in constructor gates
1099
- * awaiting each other's RPC would deadlock (plan §1.4). Instead every pass runs
1100
- * `runRecovery` BEFORE any claim, so reconciliation still strictly precedes new work.
1101
- */
1102
- /** Construction options for one deployed Thread Object class. */
1103
- interface Options<ApplicationServices = never, EventServices = never, EventLayerError = never> extends CloudflareDurableRuntimeOptions {
1104
- /** Accept transient native RPC tracing through effect-cf; disabled by default. */
1105
- readonly rpcTracing?: boolean;
1106
- /**
1107
- * Name of the Worker `env` binding carrying THIS class's `DurableObjectNamespace` — the
1108
- * Object's route back to sibling Thread Objects for the WP2 cross-Object port calls
1109
- * and remote wakes (DEPLOY-010: the binding enters through a Layer, never ambiently).
1110
- */
1111
- readonly namespaceBinding: string;
1112
- /** Acquired and finalized per native event, with access to the complete application runtime. */
1113
- readonly eventLayer?: Layer.Layer<EventServices, EventLayerError, RuntimeServices | ApplicationServices | DurableObjectState$1.DurableObjectState | WorkerEnvironment>;
1114
- }
1115
- type EndpointServices = CloudflareDurableRuntimeServices | CloudflareBootstrapServices | DurableObjectContext;
1116
- type RuntimeServices = EndpointServices | ThreadObjectNamespace;
1117
- declare const AdminExplainRequest_base: Schema.Class<AdminExplainRequest, Schema.Struct<{
1118
- readonly submissionId: Schema.optionalKey<Schema.brand<Schema.NonEmptyString, "@effect-agent/core/SubmissionId">>;
1119
- }>, {}>;
1120
- /** Explain one Submission (`submissionId` present) or every nonterminal lane member. */
1121
- declare class AdminExplainRequest extends AdminExplainRequest_base {}
1122
- declare const AdminVerifyRequest_base: Schema.Class<AdminVerifyRequest, Schema.Struct<{}>, {}>;
1123
- /** Verify carries no parameters — the addressed Object IS the lane. */
1124
- declare class AdminVerifyRequest extends AdminVerifyRequest_base {}
1125
- /** Every typed failure of the four admin entry points, plus the protocol's own errors. */
1126
- declare const AdminFailure: Schema.Union<readonly [typeof OperationDenied, typeof RetryRefused, typeof LedgerError, typeof RunJournalError, typeof DigestError, typeof OwnershipLost, typeof SettlementConflict, typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof DurableAlarmError, typeof HostProtocolError]>;
1127
- type AdminFailure = typeof AdminFailure.Type;
1128
- declare const ExplainedRecovery_base: Schema.Class<ExplainedRecovery, Schema.TaggedStruct<"ExplainedRecovery", {
1129
- readonly explanations: Schema.$Array<typeof RecoveryExplanation>;
1130
- }>, {}>;
1131
- declare class ExplainedRecovery extends ExplainedRecovery_base {}
1132
- declare const VerifiedIntegrity_base: Schema.Class<VerifiedIntegrity, Schema.TaggedStruct<"VerifiedIntegrity", {
1133
- readonly report: typeof IntegrityReport;
1134
- }>, {}>;
1135
- declare class VerifiedIntegrity extends VerifiedIntegrity_base {}
1136
- declare const RetryExecuted_base: Schema.Class<RetryExecuted, Schema.TaggedStruct<"RetryExecuted", {
1137
- readonly report: typeof RecoveryReport;
1138
- }>, {}>;
1139
- declare class RetryExecuted extends RetryExecuted_base {}
1140
- declare const ObligationsScanned_base: Schema.Class<ObligationsScanned, Schema.TaggedStruct<"ObligationsScanned", {
1141
- readonly report: typeof ObligationReport;
1142
- }>, {}>;
1143
- declare class ObligationsScanned extends ObligationsScanned_base {}
1144
- declare const AdminFailed_base: Schema.Class<AdminFailed, Schema.TaggedStruct<"AdminFailed", {
1145
- readonly failure: Schema.Union<readonly [typeof OperationDenied, typeof RetryRefused, typeof LedgerError, typeof RunJournalError, typeof DigestError, typeof OwnershipLost, typeof SettlementConflict, typeof ThreadStoreError, typeof ThreadNotMaterialized, typeof AppendConflict, typeof FenceRejected, typeof DurableRuntimeFailpointError, typeof DurableAlarmError, typeof HostProtocolError]>;
1146
- }>, {}>;
1147
- /** The admin entry point failed TYPED on the Object; the failure re-decodes verbatim. */
1148
- declare class AdminFailed extends AdminFailed_base {}
1149
- /** The uniform answer of one admin entry point. Callers narrow by the tag their call implies. */
1150
- declare const AdminResponse: Schema.Union<readonly [typeof ExplainedRecovery, typeof VerifiedIntegrity, typeof RetryExecuted, typeof ObligationsScanned, typeof AdminFailed]>;
1151
- type AdminResponse = typeof AdminResponse.Type;
1152
- declare const decodeAdminExplainRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminExplainRequest, Schema.SchemaError, never>;
1153
- declare const decodeAdminVerifyRequest: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminVerifyRequest, Schema.SchemaError, never>;
1154
- declare const decodeRetryCommand: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<RetryCommand, Schema.SchemaError, never>;
1155
- declare const decodeObligationThresholds: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<ObligationThresholds, Schema.SchemaError, never>;
1156
- declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | ObligationsScanned | RetryExecuted | VerifiedIntegrity, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<{
1157
- readonly _tag: "ExplainedRecovery";
1158
- readonly explanations: readonly {
1159
- readonly submission: {
1160
- readonly submissionId: string;
1161
- readonly threadId: string;
1162
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1163
- readonly queueSequence: number;
1164
- readonly createdAt: string;
1165
- readonly readyAt?: string | undefined;
1166
- readonly ageSeconds: number;
1167
- readonly readyAgeSeconds?: number | undefined;
1168
- readonly parentLinkage?: {
1169
- readonly parentSubmissionId: string;
1170
- readonly parentToolCallId: string;
1171
- } | undefined;
1172
- };
1173
- readonly evidence: {
1174
- readonly threadMaterialized: boolean;
1175
- readonly inputRecorded: boolean;
1176
- readonly abortRecorded: boolean;
1177
- readonly recordedSettlementOutcome?: "aborted" | "completed" | "failed" | undefined;
1178
- readonly openToolCalls: readonly {
1179
- readonly toolCallId: string;
1180
- readonly toolName: string;
1181
- readonly turn: number;
1182
- }[];
1183
- readonly openDelegationCalls: readonly {
1184
- readonly toolCallId: string;
1185
- readonly toolName: string;
1186
- readonly turn: number;
1187
- readonly requested: boolean;
1188
- readonly started: boolean;
1189
- readonly joined: boolean;
1190
- readonly childThreadId?: string | undefined;
1191
- readonly childSubmissionId?: string | undefined;
1192
- readonly admission?: "admitted" | "indeterminate" | "not-admitted" | undefined;
1193
- }[];
1194
- readonly approvalsPending: readonly {
1195
- readonly toolCallId: string;
1196
- readonly turn: number;
1197
- }[];
1198
- readonly unknownCalls: readonly {
1199
- readonly toolCallId: string;
1200
- readonly toolName: string;
1201
- readonly reason: string;
1202
- readonly recordedAt: string;
1203
- readonly resolved: boolean;
1204
- }[];
1205
- readonly approvalDecisions: readonly {
1206
- readonly submissionId: string;
1207
- readonly toolCallId: string;
1208
- readonly decision: "approved" | "denied";
1209
- readonly resolver: string;
1210
- readonly reason: string;
1211
- readonly decidedAt: string;
1212
- readonly canonicalRecordId?: string | undefined;
1213
- }[];
1214
- readonly unknownResolutions: readonly {
1215
- readonly submissionId: string;
1216
- readonly toolCallId: string;
1217
- readonly author: string;
1218
- readonly reason: string;
1219
- readonly resolution: {
1220
- readonly _tag: "CompletedWithResult";
1221
- readonly result: Schema.Json;
1222
- readonly isFailure: boolean;
1223
- } | {
1224
- readonly _tag: "NeverHappened";
1225
- } | {
1226
- readonly _tag: "SafeToRetry";
1227
- } | {
1228
- readonly _tag: "AbortSubmission";
1229
- };
1230
- readonly resolvedAt: string;
1231
- readonly canonicalRecordId?: string | undefined;
1232
- }[];
1233
- readonly childAttachments: readonly {
1234
- readonly toolCallId: string;
1235
- readonly childSubmissionId: string;
1236
- readonly childState: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1237
- readonly childOutcome?: "aborted" | "completed" | "failed" | undefined;
1238
- }[];
1239
- readonly joins: readonly {
1240
- readonly submissionId: string;
1241
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1242
- readonly hostSubmissionId: string;
1243
- }[];
1244
- readonly hostSubmissionId?: string | undefined;
1245
- readonly suspension?: {
1246
- readonly reason: {
1247
- readonly _tag: "ApprovalPending";
1248
- readonly toolCallIds: readonly [string, ...string[]];
1249
- } | {
1250
- readonly _tag: "WaitingForChild";
1251
- readonly children: readonly [{
1252
- readonly toolCallId: string;
1253
- readonly childSubmissionId: string;
1254
- }, ...{
1255
- readonly toolCallId: string;
1256
- readonly childSubmissionId: string;
1257
- }[]];
1258
- };
1259
- readonly suspendedAt: string;
1260
- } | undefined;
1261
- readonly abortIntent?: {
1262
- readonly submissionId: string;
1263
- readonly author: string;
1264
- readonly reason: string;
1265
- readonly requestedAt: string;
1266
- readonly canonicalRecordId?: string | undefined;
1267
- } | undefined;
1268
- };
1269
- readonly decision: {
1270
- readonly _tag: "CompleteMaterialization";
1271
- readonly submissionId: string;
1272
- } | {
1273
- readonly _tag: "RepairReadiness";
1274
- readonly submissionId: string;
1275
- } | {
1276
- readonly _tag: "ApplyInput";
1277
- readonly submissionId: string;
1278
- } | {
1279
- readonly _tag: "RepairInputMarker";
1280
- readonly submissionId: string;
1281
- } | {
1282
- readonly _tag: "ResumeFromTurnBoundary";
1283
- readonly submissionId: string;
1284
- } | {
1285
- readonly _tag: "AppendReservedSettlement";
1286
- readonly submissionId: string;
1287
- readonly settlementId: string;
1288
- readonly outcome: "aborted" | "completed" | "failed";
1289
- } | {
1290
- readonly _tag: "FinalizeLedgerFromHistory";
1291
- readonly submissionId: string;
1292
- readonly settlementId: string;
1293
- readonly outcome: "aborted" | "completed" | "failed";
1294
- } | {
1295
- readonly _tag: "SettleAborted";
1296
- readonly submissionId: string;
1297
- } | {
1298
- readonly _tag: "MarkUnknown";
1299
- readonly submissionId: string;
1300
- readonly reason: string;
1301
- readonly openToolCallIds: readonly string[];
1302
- } | {
1303
- readonly _tag: "ResumePendingToolBatch";
1304
- readonly submissionId: string;
1305
- readonly turn: number;
1306
- } | {
1307
- readonly _tag: "AwaitApprovalDecision";
1308
- readonly submissionId: string;
1309
- } | {
1310
- readonly _tag: "ResumeSuspended";
1311
- readonly submissionId: string;
1312
- } | {
1313
- readonly _tag: "AwaitUnknownResolution";
1314
- readonly submissionId: string;
1315
- } | {
1316
- readonly _tag: "ApplyUnknownResolutions";
1317
- readonly submissionId: string;
1318
- } | {
1319
- readonly _tag: "RevertJoining";
1320
- readonly submissionId: string;
1321
- } | {
1322
- readonly _tag: "RepairJoinMarker";
1323
- readonly submissionId: string;
1324
- } | {
1325
- readonly _tag: "SettleJoinedWithHost";
1326
- readonly submissionId: string;
1327
- readonly outcome: "aborted" | "completed" | "failed";
1328
- } | {
1329
- readonly _tag: "AwaitHostSettlement";
1330
- readonly submissionId: string;
1331
- readonly hostSubmissionId?: string | undefined;
1332
- } | {
1333
- readonly _tag: "CompleteChildAdmission";
1334
- readonly submissionId: string;
1335
- readonly toolCallId: string;
1336
- } | {
1337
- readonly _tag: "AwaitChildAdmissionResolution";
1338
- readonly submissionId: string;
1339
- readonly toolCallId: string;
1340
- } | {
1341
- readonly _tag: "RepairSubagentStartLink";
1342
- readonly submissionId: string;
1343
- readonly toolCallId: string;
1344
- } | {
1345
- readonly _tag: "EnsureWaitingForChild";
1346
- readonly submissionId: string;
1347
- readonly children: readonly [{
1348
- readonly toolCallId: string;
1349
- readonly childSubmissionId: string;
1350
- }, ...{
1351
- readonly toolCallId: string;
1352
- readonly childSubmissionId: string;
1353
- }[]];
1354
- } | {
1355
- readonly _tag: "AwaitChildSettlement";
1356
- readonly submissionId: string;
1357
- } | {
1358
- readonly _tag: "ResumeWaitingParent";
1359
- readonly submissionId: string;
1360
- readonly children: readonly [{
1361
- readonly toolCallId: string;
1362
- readonly childSubmissionId: string;
1363
- }, ...{
1364
- readonly toolCallId: string;
1365
- readonly childSubmissionId: string;
1366
- }[]];
1367
- } | {
1368
- readonly _tag: "ApplyJoinAccounting";
1369
- readonly submissionId: string;
1370
- readonly toolCallId: string;
1371
- readonly reservationId: string;
1372
- } | {
1373
- readonly _tag: "PropagateChildAbort";
1374
- readonly submissionId: string;
1375
- readonly children: readonly [{
1376
- readonly toolCallId: string;
1377
- readonly childSubmissionId: string;
1378
- }, ...{
1379
- readonly toolCallId: string;
1380
- readonly childSubmissionId: string;
1381
- }[]];
1382
- } | {
1383
- readonly _tag: "ReleaseOrphanChildReservation";
1384
- readonly submissionId: string;
1385
- readonly reservationIds: readonly [string, ...string[]];
1386
- } | {
1387
- readonly _tag: "AwaitParentEstablishment";
1388
- readonly submissionId: string;
1389
- readonly parentSubmissionId: string;
1390
- readonly parentToolCallId: string;
1391
- } | {
1392
- readonly _tag: "NoAction";
1393
- readonly submissionId: string;
1394
- };
1395
- readonly decisionMeaning: string;
1396
- readonly disposition: "deferred" | "none" | "repaired" | "unknown";
1397
- readonly explainedAt: string;
1398
- }[];
1399
- } | {
1400
- readonly _tag: "VerifiedIntegrity";
1401
- readonly report: {
1402
- readonly threadId: string;
1403
- readonly tailSequence: number;
1404
- readonly recordCount: number;
1405
- readonly submissionCount: number;
1406
- readonly checks: readonly {
1407
- 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";
1408
- readonly status: "failed" | "passed" | "skipped";
1409
- readonly detail?: string | undefined;
1410
- }[];
1411
- readonly ok: boolean;
1412
- };
1413
- } | {
1414
- readonly _tag: "RetryExecuted";
1415
- readonly report: {
1416
- readonly submissionId: string;
1417
- readonly threadId: string;
1418
- readonly decision: {
1419
- readonly _tag: "CompleteMaterialization";
1420
- readonly submissionId: string;
1421
- } | {
1422
- readonly _tag: "RepairReadiness";
1423
- readonly submissionId: string;
1424
- } | {
1425
- readonly _tag: "ApplyInput";
1426
- readonly submissionId: string;
1427
- } | {
1428
- readonly _tag: "RepairInputMarker";
1429
- readonly submissionId: string;
1430
- } | {
1431
- readonly _tag: "ResumeFromTurnBoundary";
1432
- readonly submissionId: string;
1433
- } | {
1434
- readonly _tag: "AppendReservedSettlement";
1435
- readonly submissionId: string;
1436
- readonly settlementId: string;
1437
- readonly outcome: "aborted" | "completed" | "failed";
1438
- } | {
1439
- readonly _tag: "FinalizeLedgerFromHistory";
1440
- readonly submissionId: string;
1441
- readonly settlementId: string;
1442
- readonly outcome: "aborted" | "completed" | "failed";
1443
- } | {
1444
- readonly _tag: "SettleAborted";
1445
- readonly submissionId: string;
1446
- } | {
1447
- readonly _tag: "MarkUnknown";
1448
- readonly submissionId: string;
1449
- readonly reason: string;
1450
- readonly openToolCallIds: readonly string[];
1451
- } | {
1452
- readonly _tag: "ResumePendingToolBatch";
1453
- readonly submissionId: string;
1454
- readonly turn: number;
1455
- } | {
1456
- readonly _tag: "AwaitApprovalDecision";
1457
- readonly submissionId: string;
1458
- } | {
1459
- readonly _tag: "ResumeSuspended";
1460
- readonly submissionId: string;
1461
- } | {
1462
- readonly _tag: "AwaitUnknownResolution";
1463
- readonly submissionId: string;
1464
- } | {
1465
- readonly _tag: "ApplyUnknownResolutions";
1466
- readonly submissionId: string;
1467
- } | {
1468
- readonly _tag: "RevertJoining";
1469
- readonly submissionId: string;
1470
- } | {
1471
- readonly _tag: "RepairJoinMarker";
1472
- readonly submissionId: string;
1473
- } | {
1474
- readonly _tag: "SettleJoinedWithHost";
1475
- readonly submissionId: string;
1476
- readonly outcome: "aborted" | "completed" | "failed";
1477
- } | {
1478
- readonly _tag: "AwaitHostSettlement";
1479
- readonly submissionId: string;
1480
- readonly hostSubmissionId?: string | undefined;
1481
- } | {
1482
- readonly _tag: "CompleteChildAdmission";
1483
- readonly submissionId: string;
1484
- readonly toolCallId: string;
1485
- } | {
1486
- readonly _tag: "AwaitChildAdmissionResolution";
1487
- readonly submissionId: string;
1488
- readonly toolCallId: string;
1489
- } | {
1490
- readonly _tag: "RepairSubagentStartLink";
1491
- readonly submissionId: string;
1492
- readonly toolCallId: string;
1493
- } | {
1494
- readonly _tag: "EnsureWaitingForChild";
1495
- readonly submissionId: string;
1496
- readonly children: readonly [{
1497
- readonly toolCallId: string;
1498
- readonly childSubmissionId: string;
1499
- }, ...{
1500
- readonly toolCallId: string;
1501
- readonly childSubmissionId: string;
1502
- }[]];
1503
- } | {
1504
- readonly _tag: "AwaitChildSettlement";
1505
- readonly submissionId: string;
1506
- } | {
1507
- readonly _tag: "ResumeWaitingParent";
1508
- readonly submissionId: string;
1509
- readonly children: readonly [{
1510
- readonly toolCallId: string;
1511
- readonly childSubmissionId: string;
1512
- }, ...{
1513
- readonly toolCallId: string;
1514
- readonly childSubmissionId: string;
1515
- }[]];
1516
- } | {
1517
- readonly _tag: "ApplyJoinAccounting";
1518
- readonly submissionId: string;
1519
- readonly toolCallId: string;
1520
- readonly reservationId: string;
1521
- } | {
1522
- readonly _tag: "PropagateChildAbort";
1523
- readonly submissionId: string;
1524
- readonly children: readonly [{
1525
- readonly toolCallId: string;
1526
- readonly childSubmissionId: string;
1527
- }, ...{
1528
- readonly toolCallId: string;
1529
- readonly childSubmissionId: string;
1530
- }[]];
1531
- } | {
1532
- readonly _tag: "ReleaseOrphanChildReservation";
1533
- readonly submissionId: string;
1534
- readonly reservationIds: readonly [string, ...string[]];
1535
- } | {
1536
- readonly _tag: "AwaitParentEstablishment";
1537
- readonly submissionId: string;
1538
- readonly parentSubmissionId: string;
1539
- readonly parentToolCallId: string;
1540
- } | {
1541
- readonly _tag: "NoAction";
1542
- readonly submissionId: string;
1543
- };
1544
- readonly disposition: "deferred" | "none" | "repaired" | "unknown";
1545
- };
1546
- } | {
1547
- readonly _tag: "ObligationsScanned";
1548
- readonly report: {
1549
- readonly thresholds: {
1550
- readonly agingSeconds: number;
1551
- readonly overdueSeconds: number;
1552
- };
1553
- readonly entries: readonly {
1554
- readonly submissionId: string;
1555
- readonly threadId: string;
1556
- readonly state: "admitted" | "input-applied" | "joined" | "joining" | "ready" | "running" | "settled" | "suspended" | "terminalizing" | "unknown";
1557
- readonly blockedOn: "approval" | "ready-aged" | "running-aged" | "unknown" | "waitingForChild";
1558
- readonly ageSeconds: number;
1559
- readonly severity: "aging" | "ok" | "overdue";
1560
- }[];
1561
- readonly generatedAt: string;
1562
- };
1563
- } | {
1564
- readonly _tag: "AdminFailed";
1565
- readonly failure: {
1566
- readonly _tag: "OperationDenied";
1567
- readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
1568
- readonly reason: string;
1569
- readonly threadId?: string | undefined;
1570
- readonly submissionId?: string | undefined;
1571
- } | {
1572
- readonly _tag: "RetryRefused";
1573
- readonly submissionId: string;
1574
- readonly refusal: "await-approval-decision" | "await-unknown-resolution" | "settled";
1575
- readonly decisionTag: string;
1576
- readonly message: string;
1577
- } | {
1578
- readonly _tag: "LedgerError";
1579
- readonly operation: string;
1580
- readonly message: string;
1581
- readonly cause?: Schema.Json | undefined;
1582
- } | {
1583
- readonly _tag: "RunJournalError";
1584
- readonly message: string;
1585
- readonly cause?: Schema.Json | undefined;
1586
- } | {
1587
- readonly _tag: "DigestError";
1588
- readonly message: string;
1589
- readonly cause?: Schema.Json | undefined;
1590
- } | {
1591
- readonly _tag: "OwnershipLost";
1592
- readonly submissionId: string;
1593
- readonly actualEpoch: number;
1594
- } | {
1595
- readonly _tag: "SettlementConflict";
1596
- readonly submissionId: string;
1597
- readonly existingOutcome: "aborted" | "completed" | "failed";
1598
- } | {
1599
- readonly _tag: "ThreadStoreError";
1600
- readonly operation: string;
1601
- readonly message: string;
1602
- readonly cause?: Schema.Json | undefined;
1603
- } | {
1604
- readonly _tag: "ThreadNotMaterialized";
1605
- readonly threadId: string;
1606
- } | {
1607
- readonly _tag: "AppendConflict";
1608
- readonly threadId: string;
1609
- readonly batchId: string;
1610
- readonly reason: "batch-digest" | "record-identity" | "tail";
1611
- readonly actualTailSequence?: number | undefined;
1612
- readonly actualTailDigest?: string | undefined;
1613
- } | {
1614
- readonly _tag: "FenceRejected";
1615
- readonly threadId: string;
1616
- readonly actualEpoch: number;
1617
- readonly attemptedEpoch: number;
1618
- } | {
1619
- readonly _tag: "DurableRuntimeFailpointError";
1620
- readonly location: "abort:after-intent" | "approval:after-request-append" | "approval:after-suspend" | "claim:after-claim" | "compaction:after-canonical-append" | "input:after-canonical-append" | "join:after-canonical-append" | "join:after-claim" | "policy:after-reservation-append" | "policy:before-reservation-append" | "resolve:after-intent" | "run:after-start-append" | "run:before-start-append" | "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" | "tools:before-prepared-append" | "turn:after-canonical-append" | "turn:after-response-append" | "turn:after-results-append";
1621
- } | {
1622
- readonly _tag: "DurableAlarmError";
1623
- readonly operation: string;
1624
- readonly message: string;
1625
- readonly cause?: Schema.Json | undefined;
1626
- } | {
1627
- readonly _tag: "HostProtocolError";
1628
- readonly message: string;
1629
- };
1630
- }, Schema.SchemaError, never>;
1631
- declare const decodeAdminResponse: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<AdminFailed | ExplainedRecovery | ObligationsScanned | RetryExecuted | VerifiedIntegrity, Schema.SchemaError, never>;
1632
- /** The public endpoints and effect-cf invocation hook of one Thread Object instance. */
1633
- interface Instance<EventServices = never> extends InstanceType<DurableObject.DurableObjectClass<Record<never, never>, RuntimeServices | EventServices>> {
1634
- submitEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1635
- awaitSettlementEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1636
- awaitProgressEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1637
- cancelProgressEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1638
- observePage(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1639
- abortEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1640
- resolveApprovalEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1641
- resolveUnknownEncoded(encoded: unknown, traceContext?: unknown): Promise<unknown>;
1642
- explainEncoded(encoded: unknown): Promise<unknown>;
1643
- verifyEncoded(encoded: unknown): Promise<unknown>;
1644
- retryEncoded(encoded: unknown): Promise<unknown>;
1645
- obligationsEncoded(encoded: unknown): Promise<unknown>;
1646
- portCall(encoded: unknown): Promise<unknown>;
1647
- wake(): Promise<void>;
1648
- alarm(alarmInfo?: AlarmInvocationInfo): Promise<void> | void;
1649
- }
1650
- /** The constructor shape workerd instantiates for each Thread Object. */
1651
- interface Class<EventServices = never> {
1652
- new (ctx: DurableObjectState, env: Cloudflare.Env): Instance<EventServices>;
1653
- }
1654
- /**
1655
- * Export a composed application Layer as a native Durable Object class.
1656
- * Bootstrap services are provided to the whole graph before it acquires, so application Layers
1657
- * can yield effect-cf's WorkerEnvironment and DurableObjectState, derived identity, and Crypto.
1658
- * Application dependencies remain visible until Layer.provide satisfies them. effect-cf owns the
1659
- * cached ManagedRuntime, native RPC methods, event scopes, and telemetry flushing.
1660
- * Initialization is local and bounded inside the constructor gate. Cloudflare eviction does not
1661
- * guarantee finalizers; put resources requiring timely release in scoped operations or eventLayer.
1662
- */
1663
- declare const make: <ApplicationServices, ApplicationError, EventServices = never, EventLayerError = never>(applicationLayer: Layer.Layer<CloudflareDurableRuntimeServices | ApplicationServices, ApplicationError, CloudflareBootstrapServices | DurableObjectState$1.DurableObjectState | WorkerEnvironment | DurableObjectContext | ThreadObjectNamespace>, options: Options<ApplicationServices, EventServices, EventLayerError>) => Class<ApplicationServices | EventServices>;
1664
- //#endregion
1665
- //#region src/prepared-admission.d.ts
1666
- /** Ordinary prepared admission through one freshly addressed Thread Object call. */
1667
- declare const cloudflarePreparedInputAdmissionLayer: Layer.Layer<PreparedInputAdmission, never, CloudflareThreadClient>;
1668
- /** Compatibility adapter retaining Scheduling's public admission port. */
1669
- declare const cloudflareScheduledInputAdmissionLayer: Layer.Layer<ScheduledInputAdmission, never, PreparedInputAdmission>;
1670
- //#endregion
1671
- //#region src/code-mode-executor.d.ts
1672
- /**
1673
- * The Cloudflare Dynamic Worker `CodeExecutor` adapter (C4 of ADR-0017;
1674
- * DEPLOY-011). Each pass loads one fresh Worker through the Worker Loader
1675
- * with `globalOutbound: null`, so generated code has no ambient network,
1676
- * bindings, or secrets; its only authority is the pass-scoped RPC target that
1677
- * routes back into the owning event's `CodeExecutionHost` service. Platform
1678
- * CPU limits stop synchronous runaway programs; the executor-owned wall-clock
1679
- * deadline interrupts asynchronously suspended passes. Deployment class `E`
1680
- * only: the adapter records no persistent state and a later pass may run in a
1681
- * completely different isolate.
1682
- */
1683
- declare const dynamicWorkerImplementation: SandboxImplementation;
1684
- /** Dispose a Cloudflare RPC handle when the runtime supplies its untyped disposal hook. @internal */
1685
- declare const disposeRpcHandle: (handle: unknown) => Effect.Effect<void>;
1686
- interface DynamicWorkerCodeExecutorOptions {
1687
- /** The `worker_loader` binding. */
1688
- readonly loader: WorkerLoader;
1689
- /** Compatibility date for dynamic workers; defaults to `2025-05-01`. */
1690
- readonly compatibilityDate?: string | undefined;
1691
- }
1692
- /** Layer building the Dynamic Worker `CodeExecutor` from resolved bindings. */
1693
- declare const dynamicWorkerCodeExecutorLayer: (options: DynamicWorkerCodeExecutorOptions) => Layer.Layer<CodeExecutor>;
1694
- /** Assemble Code Mode handlers with the isolated Dynamic Worker executor. */
1695
- declare const CloudflareCodeMode: {
1696
- /**
1697
- * Provide the selected tool handlers at construction, where Code Mode captures them.
1698
- * Their errors and remaining dependencies stay visible. The definition still owns the
1699
- * allowlist and limits; the runtime supplies the live Tool broker for each scoped pass.
1700
- */
1701
- layer: <A, E, R, Handlers, HandlerError, HandlerRequirements>(definition: {
1702
- readonly handlers: Layer.Layer<A, E, R>;
1703
- }, options: DynamicWorkerCodeExecutorOptions & {
1704
- readonly handlers: Layer.Layer<Handlers, HandlerError, HandlerRequirements>;
1705
- }) => Layer.Layer<A, E | HandlerError, Exclude<HandlerRequirements, CodeExecutor> | Exclude<Exclude<R, Handlers>, CodeExecutor>>;
1706
- };
1707
- //#endregion
1708
- //#region src/memory.d.ts
1709
- interface MemoryObjectRpc extends Rpc.DurableObjectBranded {
1710
- memory(encoded: string): Promise<string>;
1711
- }
1712
- declare const MemoryObjectNamespace_base: Context.ServiceClass<MemoryObjectNamespace, "@effect-agent/platform-cloudflare/MemoryObjectNamespace", {
1713
- readonly namespace: DurableObjectNamespace<MemoryObjectRpc>;
1714
- }>;
1715
- declare class MemoryObjectNamespace extends MemoryObjectNamespace_base {}
1716
- /** Namespace version and identity are already canonicalized by MemoryNamespace. */
1717
- declare const memoryObjectName: (namespace: MemoryNamespace.Any) => string;
1718
- declare const CloudflareMemoryClient: {
1719
- /** Bind access and principal using the MemoryObjectNamespace supplied by the application. */
1720
- make: <Namespace extends MemoryNamespace.Any>(access: MemoryAccess<Namespace>, principal: string & import("effect/Brand").Brand<"@effect-agent/thread/Principal">, rpcLimits?: MemoryRpcLimits | undefined) => Effect.Effect<{
1721
- recall: (lookup: {
1722
- readonly _tag: "Found";
1723
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1724
- } | {
1725
- readonly _tag: "NoMatch";
1726
- } | {
1727
- readonly _tag: "Unavailable";
1728
- readonly message: string;
1729
- } | {
1730
- readonly _tag: "InsufficientFreshness";
1731
- readonly message: string;
1732
- }, limits: MemoryRecallLimits, estimateTokens?: ((text: string) => number) | undefined) => Effect.Effect<import("@effect-agent/core").RecalledMemory, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1733
- revalidate: (lookup: {
1734
- readonly _tag: "Found";
1735
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1736
- } | {
1737
- readonly _tag: "NoMatch";
1738
- } | {
1739
- readonly _tag: "Unavailable";
1740
- readonly message: string;
1741
- } | {
1742
- readonly _tag: "InsufficientFreshness";
1743
- readonly message: string;
1744
- }, limits: MemoryRecallLimits) => Effect.Effect<{
1745
- readonly _tag: "Found";
1746
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1747
- } | {
1748
- readonly _tag: "NoMatch";
1749
- } | {
1750
- readonly _tag: "Unavailable";
1751
- readonly message: string;
1752
- } | {
1753
- readonly _tag: "InsufficientFreshness";
1754
- readonly message: string;
1755
- }, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1756
- revalidateSemantic: (found: MemoryIndexSearch<Namespace>, profile: SemanticMemoryProfile, limits: SemanticCandidateLimits) => Effect.Effect<import("@effect-agent/core").SemanticCandidateResult, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1757
- change: (write: MemoryWrite<Namespace>) => Effect.Effect<MemoryDocument<Namespace>, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1758
- }, MemoryRpcError, MemoryObjectNamespace>;
1759
- /** Use a resolved Worker or Durable Object binding without manual service provisioning. */
1760
- fromBinding: <Namespace extends MemoryNamespace.Any>(binding: DurableObjectNamespace<MemoryObjectRpc>, options: {
1761
- readonly access: MemoryAccess<Namespace>;
1762
- readonly principal: Principal;
1763
- readonly rpcLimits?: MemoryRpcLimits;
1764
- }) => Effect.Effect<{
1765
- recall: (lookup: {
1766
- readonly _tag: "Found";
1767
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1768
- } | {
1769
- readonly _tag: "NoMatch";
1770
- } | {
1771
- readonly _tag: "Unavailable";
1772
- readonly message: string;
1773
- } | {
1774
- readonly _tag: "InsufficientFreshness";
1775
- readonly message: string;
1776
- }, limits: MemoryRecallLimits, estimateTokens?: ((text: string) => number) | undefined) => Effect.Effect<import("@effect-agent/core").RecalledMemory, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1777
- revalidate: (lookup: {
1778
- readonly _tag: "Found";
1779
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1780
- } | {
1781
- readonly _tag: "NoMatch";
1782
- } | {
1783
- readonly _tag: "Unavailable";
1784
- readonly message: string;
1785
- } | {
1786
- readonly _tag: "InsufficientFreshness";
1787
- readonly message: string;
1788
- }, limits: MemoryRecallLimits) => Effect.Effect<{
1789
- readonly _tag: "Found";
1790
- readonly passages: readonly import("@effect-agent/core").MemoryPassage[];
1791
- } | {
1792
- readonly _tag: "NoMatch";
1793
- } | {
1794
- readonly _tag: "Unavailable";
1795
- readonly message: string;
1796
- } | {
1797
- readonly _tag: "InsufficientFreshness";
1798
- readonly message: string;
1799
- }, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1800
- revalidateSemantic: (found: MemoryIndexSearch<Namespace>, profile: SemanticMemoryProfile, limits: SemanticCandidateLimits) => Effect.Effect<import("@effect-agent/core").SemanticCandidateResult, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1801
- change: (write: MemoryWrite<Namespace>) => Effect.Effect<MemoryDocument<Namespace>, import("@effect-agent/core").MemoryConflict | import("@effect-agent/core").MemoryIndexError | import("@effect-agent/core").MemoryMutationFailure | import("@effect-agent/core").MemoryOperationConflict | import("@effect-agent/core").MemoryRecallError | MemoryRpcError | MemoryStorageError | import("@effect-agent/core").MemoryWithdrawn | import("@effect-agent/core").SemanticMemoryError, never>;
1802
- }, MemoryRpcError, never>;
1803
- };
1804
- /**
1805
- * Optional activity-processor destination. Keeps domain write errors intact; transport,
1806
- * authorization and deadline failures become the existing MemoryStorageError contract.
1807
- * Receipts remain authoritative, including after caller interruption or lost replies.
1808
- */
1809
- declare const cloudflareMemoryWriterLayer: (access: MemoryAccess, principal: Principal, limits?: MemoryRpcLimits) => Layer.Layer<MemoryWriter, MemoryRpcError, MemoryObjectNamespace>;
1810
- type OwnerServices = MemoryReader | MemoryWriter | MemoryOwnerAuthorizer | MemoryOwnerIdentity;
1811
- interface MemoryObjectInstance extends InstanceType<DurableObject.DurableObjectClass<Record<never, never>, OwnerServices>> {
1812
- memory(encoded: string): Promise<string>;
1813
- }
1814
- interface MemoryObjectClass {
1815
- new (ctx: globalThis.DurableObjectState, env: Cloudflare.Env): MemoryObjectInstance;
1816
- }
1817
- /**
1818
- * Dedicated SQLite owner, independent of Thread lifetimes. The host binds authorization
1819
- * after restoring its namespace definition from MemoryOwnerIdentity. Do not retain
1820
- * cleanup-scoped resources in the host Layer; it lives for the DO incarnation.
1821
- */
1822
- declare const makeMemoryObject: <E>(host: Layer.Layer<MemoryOwnerAuthorizer, E, MemoryOwnerIdentity | DurableObjectState$1.DurableObjectState | WorkerEnvironment>, options?: {
1823
- readonly storageLimits?: DoMemoryStorageLimits;
1824
- readonly rpcLimits?: MemoryRpcLimits;
1825
- readonly failpoints?: Layer.Layer<MemoryMutationFailpoint, never, DurableObjectState$1.DurableObjectState>;
1826
- }) => MemoryObjectClass;
1827
- declare const MemoryObject: {
1828
- /** Build the SQLite Durable Object class with the application's owner authorization Layer. */
1829
- make: typeof makeMemoryObject;
1830
- };
1831
- //#endregion
1832
- export { AbortRecorded, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, ClientAbortFailure, ClientApprovalFailure, ClientAwaitFailure, ClientObserveFailure, ClientProgressFailure, ClientSubmitFailure, ClientUnknownFailure, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBrowser, type CloudflareBrowserOptions, CloudflareCodeMode, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareMemoryClient, CloudflarePlatformConfigError, CloudflareSchedulingClient, CloudflareSubscriptionConfigError, CloudflareSubscriptionsClient, CloudflareThreadClient, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, DynamicWorkerCodeExecutorOptions, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassFailure, MaintenancePassReport, MemoryObject, MemoryObjectClass, MemoryObjectInstance, MemoryObjectNamespace, MemoryObjectRpc, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, ScheduleAlarmProtocolError, ScheduleOwnerIdentity, ScheduleOwnerNamespace, ScheduleOwnerObjectClass, ScheduleOwnerObjectInstance, ScheduleOwnerObjectRpc, ScheduleOwnerProtocolError, SettlementReached, SubmitRequest, SubmitSucceeded, SubscriptionAlarmProtocolError, SubscriptionPartitionIdentity, SubscriptionPartitionNamespace, SubscriptionPartitionObjectClass, SubscriptionPartitionObjectInstance, SubscriptionPartitionObjectRpc, SubscriptionPartitionProtocolError, ThreadClientError, ThreadMaintenance, ThreadMaintenanceFailpoint, ThreadMaintenanceFailpointHandler, ThreadMaintenanceFailpointLocation, thread_object_d_exports as ThreadObject, ThreadObjectIdentity, ThreadObjectNamespace, ThreadObjectPorts, ThreadObjectRpc, UnknownResolutionRecorded, boundHostDiagnostic, cloudflareMemoryWriterLayer, cloudflarePreparedInputAdmissionLayer, cloudflareScheduledInputAdmissionLayer, cloudflareWakeSchedulerLayer, decodeAbortCommand, decodeApprovalDecisionCommand, decodeAwaitProgressRequest, decodeCancelProgressRequest, decodeHostResponse, decodeObservePageRequest, decodeReceipt, decodeSubmitRequest, decodeUnknownResolutionCommand, disposeRpcHandle, dynamicWorkerCodeExecutorLayer, dynamicWorkerImplementation, encodeAbortCommand, encodeApprovalDecisionCommand, encodeAwaitProgressRequest, encodeCancelProgressRequest, encodeHostResponse, encodeObservePageRequest, encodeReceipt, encodeSubmitRequest, encodeUnknownResolutionCommand, layerFromBindings, makeScheduleOwnerObjectClass, makeSubscriptionPartitionObjectClass, memoryObjectName, sourcePartitionName, threadNamespaceFromEnv, threadNamespaceLayer, threadPortTransportLayer, validateCloudflareSubscriptionLimits };
1833
- //# sourceMappingURL=index.d.mts.map
1
+ import { t as CloudflareBindings_d_exports } from "./CloudflareBindings.mjs";
2
+ import { a as CloudflareConfig_d_exports } from "./CloudflareConfig-f3CqTel1.mjs";
3
+ import { t as Alarm_d_exports } from "./Alarm.mjs";
4
+ import { t as CloudflareBrowser_d_exports } from "./CloudflareBrowser-DJq53niJ.mjs";
5
+ import { t as CloudflareCodeMode_d_exports } from "./CloudflareCodeMode.mjs";
6
+ import { t as CloudflareMemory_d_exports } from "./CloudflareMemory.mjs";
7
+ import { t as CloudflareScheduling_d_exports } from "./CloudflareScheduling.mjs";
8
+ import { t as CloudflareSubscriptions_d_exports } from "./CloudflareSubscriptions.mjs";
9
+ import { t as CloudflareThreadClient_d_exports } from "./CloudflareThreadClient.mjs";
10
+ import { f as ThreadObject_d_exports } from "./ThreadObject-TEgOO0YM.mjs";
11
+ import { t as WakeScheduler_d_exports } from "./WakeScheduler.mjs";
12
+ export { Alarm_d_exports as Alarm, 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 };