@effect-agent/platform-cloudflare 0.1.0-beta.41 → 0.1.0-beta.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-quick-action.mjs.map +1 -1
- package/dist/browser-rest-capture.mjs.map +1 -1
- package/dist/browser-rest-crawl.mjs.map +1 -1
- package/dist/browser-session-lifecycle-DqntvG-Y.d.mts +21 -0
- package/dist/browser-session-lifecycle-ZGgb3pnK.mjs +84 -0
- package/dist/browser-session-lifecycle-ZGgb3pnK.mjs.map +1 -0
- package/dist/index.d.mts +85 -65
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/dist/interactive-browser.d.mts +1 -18
- package/dist/interactive-browser.mjs +2 -81
- package/dist/interactive-browser.mjs.map +1 -1
- package/dist/prepared-admission-BKp_Upw2.mjs.map +1 -1
- package/dist/protected-browser.d.mts +62 -0
- package/dist/protected-browser.mjs +714 -0
- package/dist/protected-browser.mjs.map +1 -0
- package/dist/scheduling.mjs.map +1 -1
- package/dist/subscriptions.mjs.map +1 -1
- package/package.json +1 -81
- package/src/alarm.ts +41 -0
- package/src/bindings.ts +5 -0
- package/src/boundary.ts +4 -0
- package/src/browser-quick-action.ts +52 -0
- package/src/browser-rest-capture.ts +30 -0
- package/src/browser-rest-crawl.ts +43 -0
- package/src/browser-session-lifecycle.ts +18 -0
- package/src/client.ts +40 -0
- package/src/code-mode-executor.ts +50 -0
- package/src/index.ts +1 -1
- package/src/interactive-browser.ts +176 -0
- package/src/layers.ts +16 -1
- package/src/memory.ts +42 -3
- package/src/prepared-admission.ts +1 -0
- package/src/progress-wait.ts +14 -0
- package/src/protected-browser/binding.ts +185 -0
- package/src/protected-browser/inspect-frame.ts +82 -0
- package/src/protected-browser/native.ts +384 -0
- package/src/protected-browser/policy.ts +594 -0
- package/src/protected-browser.ts +2 -0
- package/src/scheduling.ts +34 -0
- package/src/subscriptions.ts +50 -0
- package/src/thread-object.ts +55 -1
- package/src/transport.ts +1 -0
- package/src/wake-scheduler.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -350,6 +350,19 @@ declare const layerConfig: (options: CloudflareDurableRuntimeOptions) => Layer.L
|
|
|
350
350
|
* Use Layer.unwrap for registration values that need effectful application setup.
|
|
351
351
|
*/
|
|
352
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 {
|
|
353
366
|
readonly agent: infer A extends import("@effect-agent/thread").ExecutableAgentBinding;
|
|
354
367
|
} ? import("@effect-agent/thread").DurableWorkerRequirements<A> : T extends {
|
|
355
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> & {
|
|
@@ -361,6 +374,13 @@ declare const layer: <const Entries extends ReadonlyArray<AgentRegistration>>(re
|
|
|
361
374
|
readonly definition: D;
|
|
362
375
|
readonly model: M;
|
|
363
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>;
|
|
364
384
|
//#endregion
|
|
365
385
|
//#region src/client.d.ts
|
|
366
386
|
/** Truncate a diagnostic string to the host protocol's bounded length. */
|
|
@@ -514,13 +534,13 @@ declare const encodeUnknownResolutionCommand: (input: UnknownResolutionCommand,
|
|
|
514
534
|
readonly author: string;
|
|
515
535
|
readonly reason: string;
|
|
516
536
|
readonly resolution: {
|
|
517
|
-
readonly _tag: "SafeToRetry";
|
|
518
|
-
} | {
|
|
519
537
|
readonly _tag: "CompletedWithResult";
|
|
520
538
|
readonly result: Schema.Json;
|
|
521
539
|
readonly isFailure: boolean;
|
|
522
540
|
} | {
|
|
523
541
|
readonly _tag: "NeverHappened";
|
|
542
|
+
} | {
|
|
543
|
+
readonly _tag: "SafeToRetry";
|
|
524
544
|
} | {
|
|
525
545
|
readonly _tag: "AbortSubmission";
|
|
526
546
|
};
|
|
@@ -595,11 +615,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
595
615
|
readonly createdAt: string;
|
|
596
616
|
readonly deploymentId: string;
|
|
597
617
|
readonly payload: {
|
|
598
|
-
readonly _tag: "AbortRequested";
|
|
599
|
-
readonly submissionId: string;
|
|
600
|
-
readonly author: string;
|
|
601
|
-
readonly reason: string;
|
|
602
|
-
} | {
|
|
603
618
|
readonly _tag: "ThreadCreated";
|
|
604
619
|
readonly agentId: string;
|
|
605
620
|
readonly definitions: {
|
|
@@ -736,6 +751,11 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
736
751
|
readonly runDisposition?: Schema.Json | undefined;
|
|
737
752
|
readonly finishReason?: "budget-exhausted" | undefined;
|
|
738
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;
|
|
739
759
|
} | {
|
|
740
760
|
readonly _tag: "SubmissionSettled";
|
|
741
761
|
readonly submissionId: string;
|
|
@@ -906,13 +926,13 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
906
926
|
readonly author: string;
|
|
907
927
|
readonly reason: string;
|
|
908
928
|
readonly resolution: {
|
|
909
|
-
readonly _tag: "SafeToRetry";
|
|
910
|
-
} | {
|
|
911
929
|
readonly _tag: "CompletedWithResult";
|
|
912
930
|
readonly result: Schema.Json;
|
|
913
931
|
readonly isFailure: boolean;
|
|
914
932
|
} | {
|
|
915
933
|
readonly _tag: "NeverHappened";
|
|
934
|
+
} | {
|
|
935
|
+
readonly _tag: "SafeToRetry";
|
|
916
936
|
} | {
|
|
917
937
|
readonly _tag: "AbortSubmission";
|
|
918
938
|
};
|
|
@@ -922,6 +942,16 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
922
942
|
} | {
|
|
923
943
|
readonly _tag: "HostFailed";
|
|
924
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
|
+
} | {
|
|
925
955
|
readonly _tag: "AdmissionConflict";
|
|
926
956
|
readonly threadId: string;
|
|
927
957
|
readonly principal: string;
|
|
@@ -932,6 +962,15 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
932
962
|
readonly _tag: "SettlementConflict";
|
|
933
963
|
readonly submissionId: string;
|
|
934
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;
|
|
935
974
|
} | {
|
|
936
975
|
readonly _tag: "JoinedToHost";
|
|
937
976
|
readonly submissionId: string;
|
|
@@ -961,6 +1000,14 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
961
1000
|
readonly threadId: string;
|
|
962
1001
|
readonly actualEpoch: number;
|
|
963
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;
|
|
964
1011
|
} | {
|
|
965
1012
|
readonly _tag: "DurableAlarmError";
|
|
966
1013
|
readonly operation: string;
|
|
@@ -972,33 +1019,6 @@ declare const encodeHostResponse: (input: AbortRecorded | ApprovalRecorded | Hos
|
|
|
972
1019
|
readonly reason: string;
|
|
973
1020
|
readonly threadId?: string | undefined;
|
|
974
1021
|
readonly submissionId?: string | undefined;
|
|
975
|
-
} | {
|
|
976
|
-
readonly _tag: "HostProtocolError";
|
|
977
|
-
readonly message: string;
|
|
978
|
-
} | {
|
|
979
|
-
readonly _tag: "AgentInputError";
|
|
980
|
-
readonly message: string;
|
|
981
|
-
} | {
|
|
982
|
-
readonly _tag: "DigestError";
|
|
983
|
-
readonly message: string;
|
|
984
|
-
readonly cause?: Schema.Json | undefined;
|
|
985
|
-
} | {
|
|
986
|
-
readonly _tag: "ApprovalConflict";
|
|
987
|
-
readonly submissionId: string;
|
|
988
|
-
readonly toolCallId: string;
|
|
989
|
-
readonly existingDecision: "approved" | "denied";
|
|
990
|
-
} | {
|
|
991
|
-
readonly _tag: "UnknownResolutionConflict";
|
|
992
|
-
readonly submissionId: string;
|
|
993
|
-
readonly toolCallId: string;
|
|
994
|
-
} | {
|
|
995
|
-
readonly _tag: "DurableRuntimeFailpointError";
|
|
996
|
-
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";
|
|
997
|
-
} | {
|
|
998
|
-
readonly _tag: "AdmissionLimitExceeded";
|
|
999
|
-
readonly limit: "database-bytes" | "input-bytes" | "queue-depth";
|
|
1000
|
-
readonly actual: number;
|
|
1001
|
-
readonly maximum: number;
|
|
1002
1022
|
};
|
|
1003
1023
|
}, Schema.SchemaError, never>;
|
|
1004
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>;
|
|
@@ -1197,13 +1217,13 @@ declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | Obl
|
|
|
1197
1217
|
readonly author: string;
|
|
1198
1218
|
readonly reason: string;
|
|
1199
1219
|
readonly resolution: {
|
|
1220
|
+
readonly _tag: "SafeToRetry";
|
|
1221
|
+
} | {
|
|
1200
1222
|
readonly _tag: "CompletedWithResult";
|
|
1201
1223
|
readonly result: Schema.Json;
|
|
1202
1224
|
readonly isFailure: boolean;
|
|
1203
1225
|
} | {
|
|
1204
1226
|
readonly _tag: "NeverHappened";
|
|
1205
|
-
} | {
|
|
1206
|
-
readonly _tag: "SafeToRetry";
|
|
1207
1227
|
} | {
|
|
1208
1228
|
readonly _tag: "AbortSubmission";
|
|
1209
1229
|
};
|
|
@@ -1543,38 +1563,14 @@ declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | Obl
|
|
|
1543
1563
|
} | {
|
|
1544
1564
|
readonly _tag: "AdminFailed";
|
|
1545
1565
|
readonly failure: {
|
|
1546
|
-
readonly _tag: "
|
|
1547
|
-
readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
|
|
1548
|
-
readonly reason: string;
|
|
1549
|
-
readonly threadId?: string | undefined;
|
|
1550
|
-
readonly submissionId?: string | undefined;
|
|
1551
|
-
} | {
|
|
1552
|
-
readonly _tag: "RetryRefused";
|
|
1566
|
+
readonly _tag: "SettlementConflict";
|
|
1553
1567
|
readonly submissionId: string;
|
|
1554
|
-
readonly
|
|
1555
|
-
readonly decisionTag: string;
|
|
1556
|
-
readonly message: string;
|
|
1568
|
+
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1557
1569
|
} | {
|
|
1558
1570
|
readonly _tag: "LedgerError";
|
|
1559
1571
|
readonly operation: string;
|
|
1560
1572
|
readonly message: string;
|
|
1561
1573
|
readonly cause?: Schema.Json | undefined;
|
|
1562
|
-
} | {
|
|
1563
|
-
readonly _tag: "RunJournalError";
|
|
1564
|
-
readonly message: string;
|
|
1565
|
-
readonly cause?: Schema.Json | undefined;
|
|
1566
|
-
} | {
|
|
1567
|
-
readonly _tag: "DigestError";
|
|
1568
|
-
readonly message: string;
|
|
1569
|
-
readonly cause?: Schema.Json | undefined;
|
|
1570
|
-
} | {
|
|
1571
|
-
readonly _tag: "OwnershipLost";
|
|
1572
|
-
readonly submissionId: string;
|
|
1573
|
-
readonly actualEpoch: number;
|
|
1574
|
-
} | {
|
|
1575
|
-
readonly _tag: "SettlementConflict";
|
|
1576
|
-
readonly submissionId: string;
|
|
1577
|
-
readonly existingOutcome: "aborted" | "completed" | "failed";
|
|
1578
1574
|
} | {
|
|
1579
1575
|
readonly _tag: "ThreadStoreError";
|
|
1580
1576
|
readonly operation: string;
|
|
@@ -1595,6 +1591,30 @@ declare const encodeAdminResponse: (input: AdminFailed | ExplainedRecovery | Obl
|
|
|
1595
1591
|
readonly threadId: string;
|
|
1596
1592
|
readonly actualEpoch: number;
|
|
1597
1593
|
readonly attemptedEpoch: number;
|
|
1594
|
+
} | {
|
|
1595
|
+
readonly _tag: "OperationDenied";
|
|
1596
|
+
readonly operation: "abort" | "awaitSettlement" | "explain" | "observe" | "resolveApproval" | "resolveUnknown" | "retry" | "scanObligations" | "verify" | "wake";
|
|
1597
|
+
readonly reason: string;
|
|
1598
|
+
readonly threadId?: string | undefined;
|
|
1599
|
+
readonly submissionId?: string | undefined;
|
|
1600
|
+
} | {
|
|
1601
|
+
readonly _tag: "RetryRefused";
|
|
1602
|
+
readonly submissionId: string;
|
|
1603
|
+
readonly refusal: "await-approval-decision" | "await-unknown-resolution" | "settled";
|
|
1604
|
+
readonly decisionTag: string;
|
|
1605
|
+
readonly message: string;
|
|
1606
|
+
} | {
|
|
1607
|
+
readonly _tag: "RunJournalError";
|
|
1608
|
+
readonly message: string;
|
|
1609
|
+
readonly cause?: Schema.Json | undefined;
|
|
1610
|
+
} | {
|
|
1611
|
+
readonly _tag: "DigestError";
|
|
1612
|
+
readonly message: string;
|
|
1613
|
+
readonly cause?: Schema.Json | undefined;
|
|
1614
|
+
} | {
|
|
1615
|
+
readonly _tag: "OwnershipLost";
|
|
1616
|
+
readonly submissionId: string;
|
|
1617
|
+
readonly actualEpoch: number;
|
|
1598
1618
|
} | {
|
|
1599
1619
|
readonly _tag: "DurableRuntimeFailpointError";
|
|
1600
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";
|
|
@@ -1809,5 +1829,5 @@ declare const MemoryObject: {
|
|
|
1809
1829
|
make: typeof makeMemoryObject;
|
|
1810
1830
|
};
|
|
1811
1831
|
//#endregion
|
|
1812
|
-
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, makeScheduleOwnerObjectClass, makeSubscriptionPartitionObjectClass, memoryObjectName, sourcePartitionName, threadNamespaceFromEnv, threadNamespaceLayer, threadPortTransportLayer, validateCloudflareSubscriptionLimits };
|
|
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 };
|
|
1813
1833
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.mjs
CHANGED
|
@@ -226,7 +226,12 @@ const layerConfig = (options) => Layer.unwrap(Effect.gen(function* () {
|
|
|
226
226
|
* Use Layer.unwrap for registration values that need effectful application setup.
|
|
227
227
|
*/
|
|
228
228
|
const layer = (registrations) => Layer.unwrap(Effect.map(compileRegistrations(registrations), layerFromBindings));
|
|
229
|
-
/**
|
|
229
|
+
/**
|
|
230
|
+
* Assemble the durable runtime from already-resolved Agent Bindings.
|
|
231
|
+
* Use `ThreadObject.layer` to compile typed Agent registrations instead.
|
|
232
|
+
* Supply host services through `ThreadObject.make` or `ThreadObject.layerConfig` and
|
|
233
|
+
* the Durable Object context and namespace Layers when composing a custom host.
|
|
234
|
+
*/
|
|
230
235
|
const layerFromBindings = (bindings) => Layer.unwrap(Effect.gen(function* () {
|
|
231
236
|
const { ctx } = yield* DurableObjectContext;
|
|
232
237
|
const config = yield* CloudflareDurableRuntimeConfig;
|
|
@@ -1347,6 +1352,6 @@ const MemoryObject = {
|
|
|
1347
1352
|
/** Build the SQLite Durable Object class with the application's owner authorization Layer. */
|
|
1348
1353
|
make: makeMemoryObject };
|
|
1349
1354
|
//#endregion
|
|
1350
|
-
export { AbortRecorded, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBrowser, CloudflareCodeMode, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareMemoryClient, CloudflarePlatformConfigError, CloudflareSchedulingClient, CloudflareSubscriptionConfigError, CloudflareSubscriptionsClient, CloudflareThreadClient, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassReport, MemoryObject, MemoryObjectNamespace, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, ScheduleAlarmProtocolError, ScheduleOwnerIdentity, ScheduleOwnerNamespace, ScheduleOwnerProtocolError, SettlementReached, SubmitRequest, SubmitSucceeded, SubscriptionAlarmProtocolError, SubscriptionPartitionIdentity, SubscriptionPartitionNamespace, SubscriptionPartitionProtocolError, ThreadClientError, ThreadMaintenance, ThreadMaintenanceFailpoint, thread_object_exports as ThreadObject, ThreadObjectIdentity, ThreadObjectNamespace, ThreadObjectPorts, 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, makeScheduleOwnerObjectClass, makeSubscriptionPartitionObjectClass, memoryObjectName, sourcePartitionName, threadNamespaceFromEnv, threadNamespaceLayer, threadPortTransportLayer, validateCloudflareSubscriptionLimits };
|
|
1355
|
+
export { AbortRecorded, AdmissionLimitExceeded, ApprovalRecorded, AwaitProgressRequest, CLOUDFLARE_DATABASE_CAP_BYTES, CLOUDFLARE_RUNTIME_DEFAULTS, CancelProgressRequest, CloudflareAdmissionLimitsValue, CloudflareBindingError, CloudflareBrowser, CloudflareCodeMode, CloudflareDurableRuntimeConfig, CloudflareDurableRuntimeConfigValue, CloudflareMemoryClient, CloudflarePlatformConfigError, CloudflareSchedulingClient, CloudflareSubscriptionConfigError, CloudflareSubscriptionsClient, CloudflareThreadClient, DEFAULT_MAX_DATABASE_BYTES, DurableAlarmError, DurableAlarmService, DurableObjectContext, HostFailed, HostFailure, HostProtocolError, HostResponse, MaintenancePassReport, MemoryObject, MemoryObjectNamespace, ObservePageRequest, ObservedPage, ProgressCancelled, ProgressObserved, ProgressWaitRegistry, ScheduleAlarmProtocolError, ScheduleOwnerIdentity, ScheduleOwnerNamespace, ScheduleOwnerProtocolError, SettlementReached, SubmitRequest, SubmitSucceeded, SubscriptionAlarmProtocolError, SubscriptionPartitionIdentity, SubscriptionPartitionNamespace, SubscriptionPartitionProtocolError, ThreadClientError, ThreadMaintenance, ThreadMaintenanceFailpoint, thread_object_exports as ThreadObject, ThreadObjectIdentity, ThreadObjectNamespace, ThreadObjectPorts, 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 };
|
|
1351
1356
|
|
|
1352
1357
|
//# sourceMappingURL=index.mjs.map
|