@effect-agent/platform-cloudflare 0.1.0-beta.85 → 0.1.0-beta.86
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/Alarm.d.mts +4 -4
- package/dist/Alarm.mjs +5 -5
- package/dist/Alarm.mjs.map +1 -1
- package/dist/BrowserRestCapture.d.mts +3 -3
- package/dist/BrowserRestCapture.mjs +3 -3
- package/dist/BrowserRestCapture.mjs.map +1 -1
- package/dist/BrowserRestCrawl.d.mts +2 -2
- package/dist/BrowserRestCrawl.mjs +2 -2
- package/dist/BrowserRestCrawl.mjs.map +1 -1
- package/dist/CloudflareBindings.d.mts +2 -2
- package/dist/CloudflareBindings.mjs +2 -2
- package/dist/CloudflareBindings.mjs.map +1 -1
- package/dist/{CloudflareBrowser-D4YqaTAl.mjs → CloudflareBrowser-DV6kya1H.mjs} +4 -4
- package/dist/CloudflareBrowser-DV6kya1H.mjs.map +1 -0
- package/dist/{CloudflareBrowser-DJq53niJ.d.mts → CloudflareBrowser-Doe1M7R5.d.mts} +4 -4
- package/dist/CloudflareBrowser.d.mts +1 -1
- package/dist/CloudflareBrowser.mjs +1 -1
- package/dist/CloudflareCodeMode.d.mts +2 -2
- package/dist/CloudflareCodeMode.mjs +2 -2
- package/dist/CloudflareCodeMode.mjs.map +1 -1
- package/dist/CloudflareConfig.mjs +3 -3
- package/dist/CloudflareConfig.mjs.map +1 -1
- package/dist/CloudflareMemory.d.mts +26 -26
- package/dist/CloudflareMemory.mjs +11 -11
- package/dist/CloudflareMemory.mjs.map +1 -1
- package/dist/CloudflareScheduling.d.mts +3 -3
- package/dist/CloudflareScheduling.mjs +9 -9
- package/dist/CloudflareScheduling.mjs.map +1 -1
- package/dist/CloudflareSubscriptions.d.mts +5 -5
- package/dist/CloudflareSubscriptions.mjs +8 -8
- package/dist/CloudflareSubscriptions.mjs.map +1 -1
- package/dist/CloudflareThreadClient.d.mts +20 -20
- package/dist/CloudflareThreadClient.mjs +11 -11
- package/dist/CloudflareThreadClient.mjs.map +1 -1
- package/dist/InteractiveBrowser.d.mts +2 -2
- package/dist/InteractiveBrowser.mjs +3 -3
- package/dist/InteractiveBrowser.mjs.map +1 -1
- package/dist/ProtectedBrowser.d.mts +2 -2
- package/dist/ProtectedBrowser.mjs +2 -2
- package/dist/ProtectedBrowser.mjs.map +1 -1
- package/dist/{ThreadObject-gyx8Qq03.mjs → ThreadObject-B4gJ7t0d.mjs} +25 -25
- package/dist/ThreadObject-B4gJ7t0d.mjs.map +1 -0
- package/dist/{ThreadObject-DZMkwIBh.d.mts → ThreadObject-BT0c-_vx.d.mts} +60 -60
- package/dist/ThreadObject.d.mts +1 -1
- package/dist/ThreadObject.mjs +1 -1
- package/dist/WakeScheduler.d.mts +1 -1
- package/dist/WakeScheduler.mjs +2 -2
- package/dist/WakeScheduler.mjs.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{prepared-admission-DSi55W-7.mjs → prepared-admission-DU0_T-ev.mjs} +7 -7
- package/dist/prepared-admission-DU0_T-ev.mjs.map +1 -0
- package/package.json +1 -1
- package/src/Alarm.ts +13 -13
- package/src/BrowserRestCapture.ts +3 -3
- package/src/BrowserRestCrawl.ts +12 -12
- package/src/CloudflareBindings.ts +2 -2
- package/src/CloudflareCodeMode.ts +4 -4
- package/src/CloudflareConfig.ts +3 -3
- package/src/CloudflareMemory.ts +22 -22
- package/src/CloudflareScheduling.ts +11 -11
- package/src/CloudflareSubscriptions.ts +10 -14
- package/src/CloudflareThreadClient.ts +13 -13
- package/src/InteractiveBrowser.ts +15 -15
- package/src/ThreadObject.ts +14 -14
- package/src/WakeScheduler.ts +2 -2
- package/src/internal/browser-quick-action.ts +4 -4
- package/src/internal/layers.ts +47 -47
- package/src/internal/message-delivery.ts +4 -4
- package/src/internal/prepared-admission.ts +7 -7
- package/src/internal/transport.ts +1 -1
- package/src/protected-browser/binding.ts +2 -2
- package/src/protected-browser/native.ts +3 -3
- package/src/protected-browser/policy.ts +13 -13
- package/dist/CloudflareBrowser-D4YqaTAl.mjs.map +0 -1
- package/dist/ThreadObject-gyx8Qq03.mjs.map +0 -1
- package/dist/prepared-admission-DSi55W-7.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as CloudflareBindings_exports } from "./CloudflareBindings.mjs";
|
|
2
2
|
import { t as CloudflareConfig_exports } from "./CloudflareConfig.mjs";
|
|
3
3
|
import { t as Alarm_exports } from "./Alarm.mjs";
|
|
4
|
-
import { t as CloudflareBrowser_exports } from "./CloudflareBrowser-
|
|
4
|
+
import { t as CloudflareBrowser_exports } from "./CloudflareBrowser-DV6kya1H.mjs";
|
|
5
5
|
import { t as CloudflareCodeMode_exports } from "./CloudflareCodeMode.mjs";
|
|
6
6
|
import { t as CloudflareMemory_exports } from "./CloudflareMemory.mjs";
|
|
7
7
|
import { t as CloudflareThreadClient_exports } from "./CloudflareThreadClient.mjs";
|
|
8
8
|
import { t as CloudflareScheduling_exports } from "./CloudflareScheduling.mjs";
|
|
9
9
|
import { t as CloudflareSubscriptions_exports } from "./CloudflareSubscriptions.mjs";
|
|
10
10
|
import { t as WakeScheduler_exports } from "./WakeScheduler.mjs";
|
|
11
|
-
import { l as ThreadObject_exports } from "./ThreadObject-
|
|
11
|
+
import { l as ThreadObject_exports } from "./ThreadObject-B4gJ7t0d.mjs";
|
|
12
12
|
import { t as CloudflareAiGateway_exports } from "./CloudflareAiGateway.mjs";
|
|
13
13
|
export { Alarm_exports as Alarm, CloudflareAiGateway_exports as CloudflareAiGateway, CloudflareBindings_exports as CloudflareBindings, CloudflareBrowser_exports as CloudflareBrowser, CloudflareCodeMode_exports as CloudflareCodeMode, CloudflareConfig_exports as CloudflareConfig, CloudflareMemory_exports as CloudflareMemory, CloudflareScheduling_exports as CloudflareScheduling, CloudflareSubscriptions_exports as CloudflareSubscriptions, CloudflareThreadClient_exports as CloudflareThreadClient, ThreadObject_exports as ThreadObject, WakeScheduler_exports as WakeScheduler };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { CloudflareThreadClient } from "./CloudflareThreadClient.mjs";
|
|
2
|
-
import "@effect-agent/core/Identifiers";
|
|
3
|
-
import "@effect-agent/thread/DurableAgentRuntime";
|
|
4
2
|
import { Effect, Layer } from "effect";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import "
|
|
3
|
+
import "effect-agent/durable-agent-runtime";
|
|
4
|
+
import "effect-agent/identifiers";
|
|
5
|
+
import { PersistedJson } from "effect-agent/records";
|
|
6
|
+
import { ScheduleStorageError, ScheduledInputAdmission, ScheduledInputRefused, ScheduledInputRetryable } from "effect-agent/schedule";
|
|
7
|
+
import { PreparedInputAdmission } from "effect-agent/prepared-input-admission";
|
|
8
|
+
import "effect-agent/subscription";
|
|
9
9
|
//#region src/internal/prepared-admission.ts
|
|
10
10
|
const passthroughAgent = (agentId) => ({ definition: {
|
|
11
11
|
id: agentId,
|
|
@@ -70,4 +70,4 @@ const cloudflareScheduledInputAdmissionLayer = Layer.effect(ScheduledInputAdmiss
|
|
|
70
70
|
//#endregion
|
|
71
71
|
export { cloudflareScheduledInputAdmissionLayer as n, cloudflarePreparedInputAdmissionLayer as t };
|
|
72
72
|
|
|
73
|
-
//# sourceMappingURL=prepared-admission-
|
|
73
|
+
//# sourceMappingURL=prepared-admission-DU0_T-ev.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepared-admission-DU0_T-ev.mjs","names":[],"sources":["../src/internal/prepared-admission.ts"],"sourcesContent":["import { Effect, Layer } from \"effect\";\nimport { type DurableSubmitAgent } from \"effect-agent/durable-agent-runtime\";\nimport { type AgentId } from \"effect-agent/identifiers\";\nimport { PreparedInputAdmission } from \"effect-agent/prepared-input-admission\";\nimport { PersistedJson } from \"effect-agent/records\";\nimport {\n type ScheduledEnvelope,\n ScheduledInputAdmission,\n ScheduledInputRetryable,\n ScheduledInputRefused,\n ScheduleStorageError,\n} from \"effect-agent/schedule\";\nimport { type PreparedInput } from \"effect-agent/subscription\";\n\nimport { CloudflareThreadClient, type ThreadClientError } from \"../CloudflareThreadClient.ts\";\n\nconst passthroughAgent = (agentId: AgentId): DurableSubmitAgent<typeof PersistedJson> => ({\n definition: { id: agentId, input: PersistedJson },\n});\n\n/** Ordinary prepared admission through one freshly addressed Thread Object call. */\nexport const cloudflarePreparedInputAdmissionLayer: Layer.Layer<\n PreparedInputAdmission,\n never,\n CloudflareThreadClient\n> = Layer.effect(\n PreparedInputAdmission,\n Effect.gen(function* () {\n const client = yield* CloudflareThreadClient;\n\n return PreparedInputAdmission.of({\n submissionStatus: (receipt) =>\n client\n .submissionStatus(receipt)\n .pipe(Effect.mapError(() => ScheduledInputRetryable.make({ reason: \"storage\" }))),\n submit: (envelope) =>\n client\n .submit(passthroughAgent(envelope.agentId), envelope.input, {\n threadId: envelope.threadId,\n principal: envelope.deliveryPrincipal,\n idempotencyKey: envelope.admissionKey,\n ...(envelope.admissionGroup === undefined\n ? {}\n : { admissionGroup: envelope.admissionGroup }),\n ...(envelope.admissionFence === undefined\n ? {}\n : { admissionFence: envelope.admissionFence }),\n ...(envelope.workerAdmission === undefined\n ? {}\n : { workerAdmission: envelope.workerAdmission }),\n ...(envelope.messageAdmission === undefined\n ? {}\n : { messageAdmission: envelope.messageAdmission }),\n definitions: envelope.definitions,\n })\n .pipe(\n Effect.catchTags({\n AdmissionConflict: () =>\n ScheduleStorageError.make({ operation: \"prepared admission\", reason: \"corrupt\" }),\n AdmissionLimitExceeded: () => ScheduledInputRetryable.make({ reason: \"capacity\" }),\n ThreadClientError: (error: ThreadClientError) =>\n ScheduledInputRetryable.make({\n reason: error.overloaded === true ? \"capacity\" : \"transport\",\n }),\n HostProtocolError: () => ScheduledInputRetryable.make({ reason: \"ambiguous\" }),\n AdmissionPolicyError: (error) =>\n error.reason === \"refused\"\n ? ScheduledInputRefused.make({ code: error.code })\n : ScheduledInputRetryable.make({\n reason: error.reason === \"occupied\" ? \"capacity\" : \"storage\",\n }),\n LedgerError: () => ScheduledInputRetryable.make({ reason: \"storage\" }),\n ThreadStoreError: () => ScheduledInputRetryable.make({ reason: \"storage\" }),\n DurableAlarmError: () => ScheduledInputRetryable.make({ reason: \"storage\" }),\n AgentInputError: () =>\n ScheduleStorageError.make({ operation: \"prepared admission\", reason: \"corrupt\" }),\n DigestError: () =>\n ScheduleStorageError.make({ operation: \"prepared admission\", reason: \"corrupt\" }),\n ThreadNotMaterialized: () => ScheduledInputRetryable.make({ reason: \"storage\" }),\n AppendConflict: () => ScheduledInputRetryable.make({ reason: \"ambiguous\" }),\n FenceRejected: () => ScheduledInputRetryable.make({ reason: \"ambiguous\" }),\n DurableRuntimeFailpointError: () =>\n ScheduledInputRetryable.make({ reason: \"ambiguous\" }),\n }),\n ),\n });\n }),\n);\n\nconst preparedFromSchedule = (envelope: ScheduledEnvelope): PreparedInput => ({\n schemaVersion: 1,\n threadId: envelope.threadId,\n deliveryPrincipal: envelope.deliveryPrincipal,\n ...(envelope.admissionGroup === undefined ? {} : { admissionGroup: envelope.admissionGroup }),\n ...(envelope.admissionFence === undefined ? {} : { admissionFence: envelope.admissionFence }),\n agentId: envelope.agentId,\n definitions: envelope.definitions,\n input: envelope.input,\n inputDigest: envelope.inputDigest,\n admissionKey: envelope.admissionKey,\n authorization: envelope.authorization,\n});\n\n/** Compatibility adapter retaining Scheduling's public admission port. */\nexport const cloudflareScheduledInputAdmissionLayer: Layer.Layer<\n ScheduledInputAdmission,\n never,\n PreparedInputAdmission\n> = Layer.effect(\n ScheduledInputAdmission,\n Effect.map(PreparedInputAdmission, (admission) =>\n ScheduledInputAdmission.of({\n submit: (envelope) => admission.submit(preparedFromSchedule(envelope)),\n }),\n ),\n);\n"],"mappings":";;;;;;;;;AAgBA,MAAM,oBAAoB,aAAgE,EACxF,YAAY;CAAE,IAAI;CAAS,OAAO;AAAc,EAClD;;AAGA,MAAa,wCAIT,MAAM,OACR,wBACA,OAAO,IAAI,aAAa;CACtB,MAAM,SAAS,OAAO;CAEtB,OAAO,uBAAuB,GAAG;EAC/B,mBAAmB,YACjB,OACG,iBAAiB,OAAO,CAAC,CACzB,KAAK,OAAO,eAAe,wBAAwB,KAAK,EAAE,QAAQ,UAAU,CAAC,CAAC,CAAC;EACpF,SAAS,aACP,OACG,OAAO,iBAAiB,SAAS,OAAO,GAAG,SAAS,OAAO;GAC1D,UAAU,SAAS;GACnB,WAAW,SAAS;GACpB,gBAAgB,SAAS;GACzB,GAAI,SAAS,mBAAmB,KAAA,IAC5B,CAAC,IACD,EAAE,gBAAgB,SAAS,eAAe;GAC9C,GAAI,SAAS,mBAAmB,KAAA,IAC5B,CAAC,IACD,EAAE,gBAAgB,SAAS,eAAe;GAC9C,GAAI,SAAS,oBAAoB,KAAA,IAC7B,CAAC,IACD,EAAE,iBAAiB,SAAS,gBAAgB;GAChD,GAAI,SAAS,qBAAqB,KAAA,IAC9B,CAAC,IACD,EAAE,kBAAkB,SAAS,iBAAiB;GAClD,aAAa,SAAS;EACxB,CAAC,CAAC,CACD,KACC,OAAO,UAAU;GACf,yBACE,qBAAqB,KAAK;IAAE,WAAW;IAAsB,QAAQ;GAAU,CAAC;GAClF,8BAA8B,wBAAwB,KAAK,EAAE,QAAQ,WAAW,CAAC;GACjF,oBAAoB,UAClB,wBAAwB,KAAK,EAC3B,QAAQ,MAAM,eAAe,OAAO,aAAa,YACnD,CAAC;GACH,yBAAyB,wBAAwB,KAAK,EAAE,QAAQ,YAAY,CAAC;GAC7E,uBAAuB,UACrB,MAAM,WAAW,YACb,sBAAsB,KAAK,EAAE,MAAM,MAAM,KAAK,CAAC,IAC/C,wBAAwB,KAAK,EAC3B,QAAQ,MAAM,WAAW,aAAa,aAAa,UACrD,CAAC;GACP,mBAAmB,wBAAwB,KAAK,EAAE,QAAQ,UAAU,CAAC;GACrE,wBAAwB,wBAAwB,KAAK,EAAE,QAAQ,UAAU,CAAC;GAC1E,yBAAyB,wBAAwB,KAAK,EAAE,QAAQ,UAAU,CAAC;GAC3E,uBACE,qBAAqB,KAAK;IAAE,WAAW;IAAsB,QAAQ;GAAU,CAAC;GAClF,mBACE,qBAAqB,KAAK;IAAE,WAAW;IAAsB,QAAQ;GAAU,CAAC;GAClF,6BAA6B,wBAAwB,KAAK,EAAE,QAAQ,UAAU,CAAC;GAC/E,sBAAsB,wBAAwB,KAAK,EAAE,QAAQ,YAAY,CAAC;GAC1E,qBAAqB,wBAAwB,KAAK,EAAE,QAAQ,YAAY,CAAC;GACzE,oCACE,wBAAwB,KAAK,EAAE,QAAQ,YAAY,CAAC;EACxD,CAAC,CACH;CACN,CAAC;AACH,CAAC,CACH;AAEA,MAAM,wBAAwB,cAAgD;CAC5E,eAAe;CACf,UAAU,SAAS;CACnB,mBAAmB,SAAS;CAC5B,GAAI,SAAS,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,SAAS,eAAe;CAC3F,GAAI,SAAS,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,SAAS,eAAe;CAC3F,SAAS,SAAS;CAClB,aAAa,SAAS;CACtB,OAAO,SAAS;CAChB,aAAa,SAAS;CACtB,cAAc,SAAS;CACvB,eAAe,SAAS;AAC1B;;AAGA,MAAa,yCAIT,MAAM,OACR,yBACA,OAAO,IAAI,yBAAyB,cAClC,wBAAwB,GAAG,EACzB,SAAS,aAAa,UAAU,OAAO,qBAAqB,QAAQ,CAAC,EACvE,CAAC,CACH,CACF"}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@effect-agent/platform-cloudflare","version":"0.1.0-beta.
|
|
1
|
+
{"name":"@effect-agent/platform-cloudflare","version":"0.1.0-beta.86","dependencies":{"@effect-agent/storage-cloudflare":"0.1.0-beta.86","@effect/platform-browser":"4.0.0-rc.112","@effect/sql-sqlite-do":"4.0.0-rc.112","effect-agent":"0.1.0-beta.86"},"devDependencies":{"@cloudflare/puppeteer":"1.1.0","@cloudflare/vitest-pool-workers":"0.21.3","@cloudflare/workers-types":"5.20260825.1","@effect-agent/testing":"0.1.0-beta.86","@effect/platform-node":"4.0.0-rc.112","@effect/sql-d1":"4.0.0-rc.112","@effect/vitest":"4.0.0-rc.112","effect":"4.0.0-rc.112","effect-cf":"0.41.0","esbuild":"0.28.1","miniflare":"5.20260811.1-alpha","typescript":"7.0.2","vite-plus":"0.3.0","vitest":"4.1.11"},"peerDependencies":{"@cloudflare/puppeteer":"^1.1.0","effect":"^4.0.0-rc.112","effect-cf":"^0.41.0"},"exports":{".":{"types":"./dist/index.d.mts","default":"./dist/index.mjs"},"./alarm":{"types":"./dist/Alarm.d.mts","default":"./dist/Alarm.mjs"},"./browser-rest-capture":{"types":"./dist/BrowserRestCapture.d.mts","default":"./dist/BrowserRestCapture.mjs"},"./browser-rest-crawl":{"types":"./dist/BrowserRestCrawl.d.mts","default":"./dist/BrowserRestCrawl.mjs"},"./cloudflare-bindings":{"types":"./dist/CloudflareBindings.d.mts","default":"./dist/CloudflareBindings.mjs"},"./cloudflare-browser":{"types":"./dist/CloudflareBrowser.d.mts","default":"./dist/CloudflareBrowser.mjs"},"./cloudflare-code-mode":{"types":"./dist/CloudflareCodeMode.d.mts","default":"./dist/CloudflareCodeMode.mjs"},"./cloudflare-config":{"types":"./dist/CloudflareConfig.d.mts","default":"./dist/CloudflareConfig.mjs"},"./cloudflare-memory":{"types":"./dist/CloudflareMemory.d.mts","default":"./dist/CloudflareMemory.mjs"},"./cloudflare-scheduling":{"types":"./dist/CloudflareScheduling.d.mts","default":"./dist/CloudflareScheduling.mjs"},"./cloudflare-subscriptions":{"types":"./dist/CloudflareSubscriptions.d.mts","default":"./dist/CloudflareSubscriptions.mjs"},"./cloudflare-thread-client":{"types":"./dist/CloudflareThreadClient.d.mts","default":"./dist/CloudflareThreadClient.mjs"},"./interactive-browser":{"types":"./dist/InteractiveBrowser.d.mts","default":"./dist/InteractiveBrowser.mjs"},"./protected-browser":{"types":"./dist/ProtectedBrowser.d.mts","default":"./dist/ProtectedBrowser.mjs"},"./thread-object":{"types":"./dist/ThreadObject.d.mts","default":"./dist/ThreadObject.mjs"},"./wake-scheduler":{"types":"./dist/WakeScheduler.d.mts","default":"./dist/WakeScheduler.mjs"},"./cloudflare-ai-gateway":{"types":"./dist/CloudflareAiGateway.d.mts","default":"./dist/CloudflareAiGateway.mjs"}},"description":"Cloudflare Layer assembly for Effect Agent: Durable Objects and Browser Run adapters.","license":"MIT","repository":{"type":"git","url":"git+https://github.com/danieljvdm/effect-agent.git","directory":"packages/platform-cloudflare"},"files":["dist","src"],"type":"module","sideEffects":[],"publishConfig":{"access":"public"},"scripts":{"build":"vp pack","check":"tsc --noEmit -p tsconfig.json"},"peerDependenciesMeta":{"@cloudflare/puppeteer":{"optional":true}}}
|
package/src/Alarm.ts
CHANGED
|
@@ -1,16 +1,3 @@
|
|
|
1
|
-
import { ThreadId } from "@effect-agent/core/Identifiers";
|
|
2
|
-
import { type DurableBindingFailure } from "@effect-agent/thread/AgentRegistration";
|
|
3
|
-
import {
|
|
4
|
-
DurableAgentRuntime,
|
|
5
|
-
type DurableWorkerFailure,
|
|
6
|
-
type RecoveryReport,
|
|
7
|
-
} from "@effect-agent/thread/DurableAgentRuntime";
|
|
8
|
-
import { SubmissionLedger, type SubmissionSnapshot } from "@effect-agent/thread/SubmissionLedger";
|
|
9
|
-
import {
|
|
10
|
-
ThreadProjectionMaintenance,
|
|
11
|
-
drainDue,
|
|
12
|
-
type ThreadProjectionError,
|
|
13
|
-
} from "@effect-agent/thread/ThreadProjectionMaintenance";
|
|
14
1
|
import {
|
|
15
2
|
Cause,
|
|
16
3
|
Clock,
|
|
@@ -28,6 +15,19 @@ import {
|
|
|
28
15
|
Semaphore,
|
|
29
16
|
Stream,
|
|
30
17
|
} from "effect";
|
|
18
|
+
import { type DurableBindingFailure } from "effect-agent/agent-registration";
|
|
19
|
+
import {
|
|
20
|
+
DurableAgentRuntime,
|
|
21
|
+
type DurableWorkerFailure,
|
|
22
|
+
type RecoveryReport,
|
|
23
|
+
} from "effect-agent/durable-agent-runtime";
|
|
24
|
+
import { ThreadId } from "effect-agent/identifiers";
|
|
25
|
+
import { SubmissionLedger, type SubmissionSnapshot } from "effect-agent/submission-ledger";
|
|
26
|
+
import {
|
|
27
|
+
ThreadProjectionMaintenance,
|
|
28
|
+
drainDue,
|
|
29
|
+
type ThreadProjectionError,
|
|
30
|
+
} from "effect-agent/thread-projection-maintenance";
|
|
31
31
|
import { SqlClient } from "effect/unstable/sql/SqlClient";
|
|
32
32
|
|
|
33
33
|
import { DurableObjectContext } from "./CloudflareBindings.ts";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Effect, Layer, Option, Redacted, Schema, Stream } from "effect";
|
|
1
2
|
import {
|
|
2
3
|
PageCapture,
|
|
3
4
|
PageCaptureInferencePolicyError,
|
|
@@ -19,9 +20,8 @@ import {
|
|
|
19
20
|
type PageCaptureError,
|
|
20
21
|
type PageCaptureOutput,
|
|
21
22
|
type PageCaptureRequest,
|
|
22
|
-
} from "
|
|
23
|
-
import { SandboxImplementation } from "
|
|
24
|
-
import { Effect, Layer, Option, Redacted, Schema, Stream } from "effect";
|
|
23
|
+
} from "effect-agent/page-capture";
|
|
24
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
25
25
|
import { HttpClient, HttpClientRequest, type HttpClientError } from "effect/unstable/http";
|
|
26
26
|
|
|
27
27
|
import {
|
package/src/BrowserRestCrawl.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PageCrawl,
|
|
3
|
-
PageCrawlLimitError,
|
|
4
|
-
PageCrawlProtocolError,
|
|
5
|
-
PageCrawlRateLimitedError,
|
|
6
|
-
PageCrawlRecord,
|
|
7
|
-
PageCrawlTerminalError,
|
|
8
|
-
type PageCrawlCrawl,
|
|
9
|
-
type PageCrawlError,
|
|
10
|
-
type PageCrawlRequest,
|
|
11
|
-
} from "@effect-agent/sandbox/PageCrawl";
|
|
12
|
-
import { SandboxImplementation } from "@effect-agent/sandbox/Sandbox";
|
|
13
1
|
import {
|
|
14
2
|
Duration,
|
|
15
3
|
Effect,
|
|
@@ -22,6 +10,18 @@ import {
|
|
|
22
10
|
Scope,
|
|
23
11
|
Stream,
|
|
24
12
|
} from "effect";
|
|
13
|
+
import {
|
|
14
|
+
PageCrawl,
|
|
15
|
+
PageCrawlLimitError,
|
|
16
|
+
PageCrawlProtocolError,
|
|
17
|
+
PageCrawlRateLimitedError,
|
|
18
|
+
PageCrawlRecord,
|
|
19
|
+
PageCrawlTerminalError,
|
|
20
|
+
type PageCrawlCrawl,
|
|
21
|
+
type PageCrawlError,
|
|
22
|
+
type PageCrawlRequest,
|
|
23
|
+
} from "effect-agent/page-crawl";
|
|
24
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
25
25
|
import {
|
|
26
26
|
HttpClient,
|
|
27
27
|
HttpClientRequest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ThreadId } from "@effect-agent/core/Identifiers";
|
|
2
|
-
import { type ProducerId } from "@effect-agent/thread/Records";
|
|
3
1
|
import { Context, Effect, Layer, Predicate, Schema } from "effect";
|
|
2
|
+
import { type ThreadId } from "effect-agent/identifiers";
|
|
3
|
+
import { type ProducerId } from "effect-agent/records";
|
|
4
4
|
import { RpcTargets } from "effect-cf";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RpcTarget } from "cloudflare:workers";
|
|
2
|
+
import { Clock, Duration, Effect, Exit, Fiber, Layer, Option, Queue, Schema } from "effect";
|
|
1
3
|
import {
|
|
2
4
|
CodeExecutionHost,
|
|
3
5
|
CodeExecutionResourceUse,
|
|
@@ -16,10 +18,8 @@ import {
|
|
|
16
18
|
CodeSourceError,
|
|
17
19
|
type CodeExecutorExecute,
|
|
18
20
|
type CodeExecutionRequest,
|
|
19
|
-
} from "
|
|
20
|
-
import { SandboxImplementation } from "
|
|
21
|
-
import { RpcTarget } from "cloudflare:workers";
|
|
22
|
-
import { Clock, Duration, Effect, Exit, Fiber, Layer, Option, Queue, Schema } from "effect";
|
|
21
|
+
} from "effect-agent/code-executor";
|
|
22
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
23
23
|
|
|
24
24
|
import { safeCauseDiagnostic, safeCauseMessage } from "./internal/boundary.ts";
|
|
25
25
|
|
package/src/CloudflareConfig.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DEFAULT_MAX_STORED_VALUE_BYTES } from "@effect-agent/storage-cloudflare/
|
|
2
|
-
import { DeploymentId } from "@effect-agent/thread/Records";
|
|
3
|
-
import { DEFAULT_OWNERSHIP_LEASE_DURATION } from "@effect-agent/thread/SubmissionLedger";
|
|
1
|
+
import { DEFAULT_MAX_STORED_VALUE_BYTES } from "@effect-agent/storage-cloudflare/do-storage-config";
|
|
4
2
|
import { Context, Duration, Schema } from "effect";
|
|
3
|
+
import { DeploymentId } from "effect-agent/records";
|
|
4
|
+
import { DEFAULT_OWNERSHIP_LEASE_DURATION } from "effect-agent/submission-ledger";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Schema-validated configuration for the Cloudflare durable runtime (deployment spec §4:
|
package/src/CloudflareMemory.ts
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import * as Memory from "@effect-agent/core/Memory";
|
|
2
|
-
import * as MemoryNamespace from "@effect-agent/core/MemoryNamespace";
|
|
3
|
-
import { MemoryNamespaceAddress } from "@effect-agent/core/MemoryNamespace";
|
|
4
|
-
import { type MemoryLookup, MemoryRecallLimits } from "@effect-agent/core/MemoryReference";
|
|
5
|
-
import { MemoryAccess } from "@effect-agent/core/MemoryRevalidation";
|
|
6
|
-
import {
|
|
7
|
-
type MemoryReader,
|
|
8
|
-
type MemoryWrite,
|
|
9
|
-
MemoryKey,
|
|
10
|
-
MemoryDocument,
|
|
11
|
-
MemoryMutationFailpoint,
|
|
12
|
-
MemoryStorageError,
|
|
13
|
-
MemoryWriter,
|
|
14
|
-
} from "@effect-agent/core/MemoryStore";
|
|
15
|
-
import {
|
|
16
|
-
type MemoryIndexSearch,
|
|
17
|
-
type SemanticMemoryProfile,
|
|
18
|
-
} from "@effect-agent/core/SemanticMemoryIndex";
|
|
19
|
-
import { type SemanticCandidateLimits } from "@effect-agent/core/SemanticMemoryRevalidation";
|
|
20
1
|
import {
|
|
21
2
|
type DoMemoryStorageLimits,
|
|
22
3
|
defaultDoMemoryStorageLimits,
|
|
23
4
|
doMemoryStoreLayerWithFailpoints,
|
|
24
|
-
} from "@effect-agent/storage-cloudflare/
|
|
5
|
+
} from "@effect-agent/storage-cloudflare/do-memory-store";
|
|
25
6
|
import {
|
|
26
7
|
type MemoryOwnerAuthorizer,
|
|
27
8
|
decodeMemoryWire,
|
|
@@ -34,9 +15,28 @@ import {
|
|
|
34
15
|
MemoryRpcError,
|
|
35
16
|
MemoryRpcLimits,
|
|
36
17
|
type MemoryOwnerFailure,
|
|
37
|
-
} from "@effect-agent/storage-cloudflare/
|
|
38
|
-
import { Principal } from "@effect-agent/thread/SubmissionLedger";
|
|
18
|
+
} from "@effect-agent/storage-cloudflare/memory-protocol";
|
|
39
19
|
import { Clock, Context, Effect, Layer, Schema } from "effect";
|
|
20
|
+
import * as Memory from "effect-agent/memory";
|
|
21
|
+
import * as MemoryNamespace from "effect-agent/memory-namespace";
|
|
22
|
+
import { MemoryNamespaceAddress } from "effect-agent/memory-namespace";
|
|
23
|
+
import { type MemoryLookup, MemoryRecallLimits } from "effect-agent/memory-reference";
|
|
24
|
+
import { MemoryAccess } from "effect-agent/memory-revalidation";
|
|
25
|
+
import {
|
|
26
|
+
type MemoryReader,
|
|
27
|
+
type MemoryWrite,
|
|
28
|
+
MemoryKey,
|
|
29
|
+
MemoryDocument,
|
|
30
|
+
MemoryMutationFailpoint,
|
|
31
|
+
MemoryStorageError,
|
|
32
|
+
MemoryWriter,
|
|
33
|
+
} from "effect-agent/memory-store";
|
|
34
|
+
import {
|
|
35
|
+
type MemoryIndexSearch,
|
|
36
|
+
type SemanticMemoryProfile,
|
|
37
|
+
} from "effect-agent/semantic-memory-index";
|
|
38
|
+
import { type SemanticCandidateLimits } from "effect-agent/semantic-memory-revalidation";
|
|
39
|
+
import { Principal } from "effect-agent/submission-ledger";
|
|
40
40
|
import {
|
|
41
41
|
DurableObject as EffectCfDurableObject,
|
|
42
42
|
DurableObjectState,
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
import { AgentId } from "@effect-agent/core/Identifiers";
|
|
2
1
|
import {
|
|
3
2
|
DoScheduleAlarmControl,
|
|
4
3
|
DoScheduleTransaction,
|
|
5
4
|
scheduleStoreLayer,
|
|
6
|
-
} from "@effect-agent/storage-cloudflare/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
} from "@effect-agent/storage-cloudflare/do-schedule-store";
|
|
6
|
+
import { BrowserCrypto } from "@effect/platform-browser";
|
|
7
|
+
import { SqliteClient } from "@effect/sql-sqlite-do";
|
|
8
|
+
import { Clock, Context, DateTime, Effect, Layer, Schema } from "effect";
|
|
9
|
+
import { type DurableSubmitAgent } from "effect-agent/durable-agent-runtime";
|
|
10
|
+
import { AgentId } from "effect-agent/identifiers";
|
|
11
|
+
import { DefinitionDigests, PersistedJson } from "effect-agent/records";
|
|
9
12
|
import {
|
|
10
13
|
ScheduleAuthorizationError,
|
|
11
14
|
type ScheduleAuthorizer,
|
|
@@ -25,18 +28,15 @@ import {
|
|
|
25
28
|
ScheduleTimingRequest,
|
|
26
29
|
ScheduleValidationError,
|
|
27
30
|
defaultSchedulingLimits,
|
|
28
|
-
} from "
|
|
29
|
-
import { scheduleOwnerKey } from "
|
|
31
|
+
} from "effect-agent/schedule";
|
|
32
|
+
import { scheduleOwnerKey } from "effect-agent/schedule-transition";
|
|
30
33
|
import {
|
|
31
34
|
Scheduling,
|
|
32
35
|
ScheduleDriver,
|
|
33
36
|
type ScheduleManagementFailure,
|
|
34
37
|
ScheduleWakeNoop,
|
|
35
|
-
} from "
|
|
36
|
-
import { AdmissionFence } from "
|
|
37
|
-
import { BrowserCrypto } from "@effect/platform-browser";
|
|
38
|
-
import { SqliteClient } from "@effect/sql-sqlite-do";
|
|
39
|
-
import { Clock, Context, DateTime, Effect, Layer, Schema } from "effect";
|
|
38
|
+
} from "effect-agent/scheduling";
|
|
39
|
+
import { AdmissionFence } from "effect-agent/submission-ledger";
|
|
40
40
|
import {
|
|
41
41
|
DurableObject as EffectCfDurableObject,
|
|
42
42
|
DurableObjectAlarm,
|
|
@@ -2,10 +2,13 @@ import {
|
|
|
2
2
|
DoSubscriptionAlarmControl,
|
|
3
3
|
DoSubscriptionTransaction,
|
|
4
4
|
doSubscriptionStoreLayer,
|
|
5
|
-
} from "@effect-agent/storage-cloudflare/
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
} from "@effect-agent/storage-cloudflare/do-subscription-store";
|
|
6
|
+
import { BrowserCrypto } from "@effect/platform-browser";
|
|
7
|
+
import { SqliteClient } from "@effect/sql-sqlite-do";
|
|
8
|
+
import { Cause, Clock, Context, DateTime, Effect, Layer, Schema, type Scope } from "effect";
|
|
9
|
+
import { type EventSources } from "effect-agent/event-source";
|
|
10
|
+
import { PersistedJson } from "effect-agent/records";
|
|
11
|
+
import { Principal } from "effect-agent/submission-ledger";
|
|
9
12
|
import {
|
|
10
13
|
EventAcknowledgement,
|
|
11
14
|
EventSourceVersion,
|
|
@@ -22,16 +25,9 @@ import {
|
|
|
22
25
|
SubscriptionSnapshot,
|
|
23
26
|
SubscriptionSourceError,
|
|
24
27
|
defaultSubscriptionLimits,
|
|
25
|
-
} from "
|
|
26
|
-
import { type SubscriptionInputBindings } from "
|
|
27
|
-
import {
|
|
28
|
-
SubscriptionDriver,
|
|
29
|
-
SubscriptionIntake,
|
|
30
|
-
Subscriptions,
|
|
31
|
-
} from "@effect-agent/thread/Subscriptions";
|
|
32
|
-
import { BrowserCrypto } from "@effect/platform-browser";
|
|
33
|
-
import { SqliteClient } from "@effect/sql-sqlite-do";
|
|
34
|
-
import { Cause, Clock, Context, DateTime, Effect, Layer, Schema, type Scope } from "effect";
|
|
28
|
+
} from "effect-agent/subscription";
|
|
29
|
+
import { type SubscriptionInputBindings } from "effect-agent/subscription-input";
|
|
30
|
+
import { SubscriptionDriver, SubscriptionIntake, Subscriptions } from "effect-agent/subscriptions";
|
|
35
31
|
import {
|
|
36
32
|
DurableObject as EffectCfDurableObject,
|
|
37
33
|
DurableObjectAlarm,
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { DigestError } from "
|
|
1
|
+
import { BrowserCrypto } from "@effect/platform-browser";
|
|
2
|
+
import { Context, Crypto, Duration, Effect, Layer, Schema } from "effect";
|
|
3
|
+
import { AgentInputError } from "effect-agent/agent-error";
|
|
4
|
+
import { DigestError } from "effect-agent/digest";
|
|
5
5
|
import {
|
|
6
6
|
Receipt,
|
|
7
7
|
type DurableSubmitAgent,
|
|
8
8
|
type DurableSubmitOptions,
|
|
9
|
-
} from "
|
|
10
|
-
import { DurableRuntimeFailpointError } from "
|
|
11
|
-
import {
|
|
9
|
+
} from "effect-agent/durable-agent-runtime";
|
|
10
|
+
import { DurableRuntimeFailpointError } from "effect-agent/durable-failpoint";
|
|
11
|
+
import { AgentId, type ThreadId } from "effect-agent/identifiers";
|
|
12
|
+
import { InputMessage } from "effect-agent/messaging";
|
|
13
|
+
import { OperationDenied } from "effect-agent/operation-authorizer";
|
|
12
14
|
import {
|
|
13
15
|
CanonicalRecordEnvelope,
|
|
14
16
|
CanonicalSequence,
|
|
15
17
|
DefinitionDigests,
|
|
16
18
|
PersistedJson,
|
|
17
19
|
WorkerAdmission,
|
|
18
|
-
} from "
|
|
20
|
+
} from "effect-agent/records";
|
|
19
21
|
import {
|
|
20
22
|
AdmissionFence,
|
|
21
23
|
AdmissionGroup,
|
|
@@ -35,16 +37,14 @@ import {
|
|
|
35
37
|
UnknownResolutionCommand,
|
|
36
38
|
UnknownResolutionConflict,
|
|
37
39
|
UnknownResolutionIntent,
|
|
38
|
-
} from "
|
|
39
|
-
import { SubmissionStatus } from "
|
|
40
|
+
} from "effect-agent/submission-ledger";
|
|
41
|
+
import { SubmissionStatus } from "effect-agent/submission-status";
|
|
40
42
|
import {
|
|
41
43
|
AppendConflict,
|
|
42
44
|
ThreadNotMaterialized,
|
|
43
45
|
ThreadStoreError,
|
|
44
46
|
FenceRejected,
|
|
45
|
-
} from "
|
|
46
|
-
import { BrowserCrypto } from "@effect/platform-browser";
|
|
47
|
-
import { Context, Crypto, Duration, Effect, Layer, Schema } from "effect";
|
|
47
|
+
} from "effect-agent/thread-store";
|
|
48
48
|
import { RpcTracing } from "effect-cf";
|
|
49
49
|
|
|
50
50
|
import { DurableAlarmError } from "./Alarm.ts";
|
|
@@ -7,6 +7,18 @@ import puppeteer, {
|
|
|
7
7
|
type HTTPRequest,
|
|
8
8
|
type Page,
|
|
9
9
|
} from "@cloudflare/puppeteer";
|
|
10
|
+
import {
|
|
11
|
+
Context,
|
|
12
|
+
Clock,
|
|
13
|
+
Duration,
|
|
14
|
+
Effect,
|
|
15
|
+
Layer,
|
|
16
|
+
Redacted,
|
|
17
|
+
Ref,
|
|
18
|
+
Schema,
|
|
19
|
+
Semaphore,
|
|
20
|
+
type Scope,
|
|
21
|
+
} from "effect";
|
|
10
22
|
import {
|
|
11
23
|
BrowserActionResult,
|
|
12
24
|
BrowserScreenshotRequest,
|
|
@@ -27,21 +39,9 @@ import {
|
|
|
27
39
|
type BrowserHandle,
|
|
28
40
|
type InteractiveBrowserError,
|
|
29
41
|
type InteractiveBrowserNetworkPolicy,
|
|
30
|
-
} from "
|
|
31
|
-
import { PageScreenshotResult } from "
|
|
32
|
-
import { SandboxImplementation } from "
|
|
33
|
-
import {
|
|
34
|
-
Context,
|
|
35
|
-
Clock,
|
|
36
|
-
Duration,
|
|
37
|
-
Effect,
|
|
38
|
-
Layer,
|
|
39
|
-
Redacted,
|
|
40
|
-
Ref,
|
|
41
|
-
Schema,
|
|
42
|
-
Semaphore,
|
|
43
|
-
type Scope,
|
|
44
|
-
} from "effect";
|
|
42
|
+
} from "effect-agent/interactive-browser";
|
|
43
|
+
import { PageScreenshotResult } from "effect-agent/page-screenshot";
|
|
44
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
45
45
|
|
|
46
46
|
import {
|
|
47
47
|
BrowserRunSessionLifecycle,
|
package/src/ThreadObject.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { type AgentId, type ThreadId } from "@effect-agent/core/Identifiers";
|
|
2
|
-
import { SubmissionId } from "@effect-agent/core/Identifiers";
|
|
3
1
|
import {
|
|
4
2
|
decodePortRequest,
|
|
5
3
|
encodePortResponse,
|
|
@@ -9,7 +7,8 @@ import {
|
|
|
9
7
|
PortSucceeded,
|
|
10
8
|
type PortRequest,
|
|
11
9
|
type PortResponse,
|
|
12
|
-
} from "@effect-agent/storage-cloudflare/
|
|
10
|
+
} from "@effect-agent/storage-cloudflare/port-protocol";
|
|
11
|
+
import { Effect, Layer, Option, Schema, Stream } from "effect";
|
|
13
12
|
import {
|
|
14
13
|
IntegrityReport,
|
|
15
14
|
ObligationReport,
|
|
@@ -17,22 +16,24 @@ import {
|
|
|
17
16
|
RecoveryExplanation,
|
|
18
17
|
RetryCommand,
|
|
19
18
|
RetryRefused,
|
|
20
|
-
} from "
|
|
21
|
-
import { DigestError } from "
|
|
19
|
+
} from "effect-agent/admin";
|
|
20
|
+
import { DigestError } from "effect-agent/digest";
|
|
22
21
|
import {
|
|
23
22
|
DurableAgentRuntime,
|
|
24
23
|
DurableRuntimeConfig,
|
|
25
24
|
RecoveryReport,
|
|
26
25
|
type DurableSubmitAgent,
|
|
27
|
-
} from "
|
|
28
|
-
import { DurableRuntimeFailpointError } from "
|
|
26
|
+
} from "effect-agent/durable-agent-runtime";
|
|
27
|
+
import { DurableRuntimeFailpointError } from "effect-agent/durable-failpoint";
|
|
28
|
+
import { type AgentId, type ThreadId } from "effect-agent/identifiers";
|
|
29
|
+
import { SubmissionId } from "effect-agent/identifiers";
|
|
29
30
|
import {
|
|
30
31
|
OperationAuthorizationRequest,
|
|
31
32
|
OperationAuthorizer,
|
|
32
33
|
OperationDenied,
|
|
33
|
-
} from "
|
|
34
|
-
import { PersistedJson } from "
|
|
35
|
-
import { RunJournalError } from "
|
|
34
|
+
} from "effect-agent/operation-authorizer";
|
|
35
|
+
import { PersistedJson } from "effect-agent/records";
|
|
36
|
+
import { RunJournalError } from "effect-agent/run-journal";
|
|
36
37
|
import {
|
|
37
38
|
AdmissionPolicyError,
|
|
38
39
|
LedgerError,
|
|
@@ -40,7 +41,7 @@ import {
|
|
|
40
41
|
SettlementConflict,
|
|
41
42
|
SubmissionLedger,
|
|
42
43
|
SubmissionLookupByKey,
|
|
43
|
-
} from "
|
|
44
|
+
} from "effect-agent/submission-ledger";
|
|
44
45
|
import {
|
|
45
46
|
AppendConflict,
|
|
46
47
|
ThreadNotMaterialized,
|
|
@@ -48,9 +49,8 @@ import {
|
|
|
48
49
|
ThreadStore,
|
|
49
50
|
ThreadStoreError,
|
|
50
51
|
FenceRejected,
|
|
51
|
-
} from "
|
|
52
|
-
import { WakeScheduler } from "
|
|
53
|
-
import { Effect, Layer, Option, Schema, Stream } from "effect";
|
|
52
|
+
} from "effect-agent/thread-store";
|
|
53
|
+
import { WakeScheduler } from "effect-agent/wake-scheduler";
|
|
54
54
|
import {
|
|
55
55
|
DurableObject as EffectCfDurableObject,
|
|
56
56
|
DurableObjectState as EffectCfDurableObjectState,
|
package/src/WakeScheduler.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ThreadId } from "@effect-agent/core/Identifiers";
|
|
2
|
-
import { makeWakeSubscriptionHub, WakeScheduler } from "@effect-agent/thread/WakeScheduler";
|
|
3
1
|
import { Effect, Layer, PubSub, Schema, Stream } from "effect";
|
|
2
|
+
import { type ThreadId } from "effect-agent/identifiers";
|
|
3
|
+
import { makeWakeSubscriptionHub, WakeScheduler } from "effect-agent/wake-scheduler";
|
|
4
4
|
|
|
5
5
|
import { DurableAlarmService } from "./Alarm.ts";
|
|
6
6
|
import {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="@cloudflare/workers-types" />
|
|
2
2
|
|
|
3
|
+
import { Context, Effect, Layer, Option, Schema } from "effect";
|
|
3
4
|
import {
|
|
4
5
|
PageCapture,
|
|
5
6
|
PageCaptureInferenceUse,
|
|
@@ -21,7 +22,7 @@ import {
|
|
|
21
22
|
type PageCaptureError,
|
|
22
23
|
type PageCaptureOutput,
|
|
23
24
|
type PageCaptureRequest,
|
|
24
|
-
} from "
|
|
25
|
+
} from "effect-agent/page-capture";
|
|
25
26
|
import {
|
|
26
27
|
PageScreenshot,
|
|
27
28
|
PageScreenshotOutputLimitError,
|
|
@@ -29,9 +30,8 @@ import {
|
|
|
29
30
|
type PageScreenshotCapture,
|
|
30
31
|
type PageScreenshotError,
|
|
31
32
|
type PageScreenshotRequest,
|
|
32
|
-
} from "
|
|
33
|
-
import { SandboxImplementation } from "
|
|
34
|
-
import { Context, Effect, Layer, Option, Schema } from "effect";
|
|
33
|
+
} from "effect-agent/page-screenshot";
|
|
34
|
+
import { SandboxImplementation } from "effect-agent/sandbox";
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* The Cloudflare Browser Run Quick Action `PageCapture` adapter (capability
|