@moinulmoin/eden-runtime-cloudflare 0.8.0 → 0.10.0
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/eden-eve-host-worker.mjs +18836 -16582
- package/dist/eve-host-runtime.d.ts +36 -7
- package/dist/eve-host-runtime.js +759 -83
- package/dist/eve-host.d.ts +45 -5
- package/dist/eve-host.js +56 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -8,11 +8,19 @@ export declare const EVE_HOST_CARRY_LIMITS: {
|
|
|
8
8
|
chunkBytes: number;
|
|
9
9
|
maxBytes: number;
|
|
10
10
|
};
|
|
11
|
+
interface EveQueueDeliveryClaim {
|
|
12
|
+
readonly messageId: string;
|
|
13
|
+
readonly attempt: number;
|
|
14
|
+
}
|
|
15
|
+
type EveSandboxImportResult = "source-export-failed" | undefined;
|
|
11
16
|
/** The deployment's single SQLite-backed Workflow World. */
|
|
12
|
-
export declare class EdenWorldDurableObject {
|
|
17
|
+
export declare class EdenWorldDurableObject extends DurableObject<EveHostContainerEnvironment> {
|
|
13
18
|
private readonly core;
|
|
14
19
|
constructor(ctx: DurableObjectState, env: EveHostContainerEnvironment);
|
|
15
20
|
fetch(request: Request): Promise<Response>;
|
|
21
|
+
deploymentBusy(deploymentId: string): boolean;
|
|
22
|
+
deliverySettled(messageId: string, attempt: number): void;
|
|
23
|
+
controlFetch(request: Request): Promise<Response>;
|
|
16
24
|
alarm(): Promise<void>;
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
@@ -23,11 +31,11 @@ export declare class EdenWorldDurableObject {
|
|
|
23
31
|
* URLs stay correct; the DO registers an outbound-HTTPS intercept for that
|
|
24
32
|
* hostname aimed at `EveHostLoopback`, and this function routes the request:
|
|
25
33
|
* non-public hosts egress plainly, `/__eden/world/rpc` reaches the World
|
|
26
|
-
* Durable Object, and
|
|
27
|
-
* internal port
|
|
28
|
-
* unauthenticated queue
|
|
34
|
+
* Durable Object, and local World queue deliveries re-enter the container
|
|
35
|
+
* over its internal port. Cloudflare World queue delivery uses direct DO RPC,
|
|
36
|
+
* so its unauthenticated outbound queue requests remain forbidden.
|
|
29
37
|
*/
|
|
30
|
-
export declare function routeEveOutboundRequest(request: Request, env: EveHostContainerEnvironment): Promise<Response>;
|
|
38
|
+
export declare function routeEveOutboundRequest(request: Request, env: EveHostContainerEnvironment, sourceDeploymentId?: string, expectedWorldToken?: string): Promise<Response>;
|
|
31
39
|
/**
|
|
32
40
|
* This module is the only Eve-host surface that depends on provider runtime
|
|
33
41
|
* packages. It is bundled into the deployed Worker directory instead of the
|
|
@@ -73,6 +81,20 @@ export declare class EveHostDurableContainer extends DurableObject<EveHostContai
|
|
|
73
81
|
private readonly envVars;
|
|
74
82
|
private readonly sleepAfterMs;
|
|
75
83
|
private readonly readiness;
|
|
84
|
+
private deploymentId;
|
|
85
|
+
private readonly imports;
|
|
86
|
+
private importQueue;
|
|
87
|
+
private activeExports;
|
|
88
|
+
private activeDeliveries;
|
|
89
|
+
private activeForwarding;
|
|
90
|
+
private schedulerRoleReconcile;
|
|
91
|
+
private retainedFences;
|
|
92
|
+
private readonly deliveryClaims;
|
|
93
|
+
private identifyDeployment;
|
|
94
|
+
private fenceRetainedSchedules;
|
|
95
|
+
private deploymentBusy;
|
|
96
|
+
private reconcileSchedulerRole;
|
|
97
|
+
private expectedImage;
|
|
76
98
|
constructor(ctx: DurableObjectState, env: EveHostContainerEnvironment);
|
|
77
99
|
private containerRuntime;
|
|
78
100
|
/** Container lifetime the platform keeps after the DO goes inactive: long
|
|
@@ -128,14 +150,20 @@ export declare class EveHostDurableContainer extends DurableObject<EveHostContai
|
|
|
128
150
|
* carried files are missing.
|
|
129
151
|
*/
|
|
130
152
|
private carrySandboxSessionsIn;
|
|
131
|
-
ensureEveReady(signal?: AbortSignal): Promise<EveHostReadinessEvidence>;
|
|
153
|
+
ensureEveReady(signal?: AbortSignal, requireSchedulerRole?: boolean): Promise<EveHostReadinessEvidence>;
|
|
132
154
|
fetch(request: Request): Promise<Response>;
|
|
155
|
+
retire(deploymentId: string): Promise<void>;
|
|
156
|
+
/** Read-only export: never replace the source carry or stop its process. */
|
|
157
|
+
exportSandboxSessions(deploymentId: string, sessionId: string): Promise<Response>;
|
|
158
|
+
/** Retry-idempotent imports finish before the migrated queue is dispatched. */
|
|
159
|
+
importSandboxSessions(sourceDeploymentId: string, deploymentId: string, transferId: string, sessionId: string): Promise<EveSandboxImportResult>;
|
|
133
160
|
/**
|
|
134
161
|
* Queue deliveries and loopback traffic enter here: same readiness and
|
|
135
162
|
* forwarding as `fetch` without the deployment-header echo rules (the
|
|
136
163
|
* loopback path is not a deployment-health signal).
|
|
137
164
|
*/
|
|
138
|
-
loopbackFetch(request: Request): Promise<Response>;
|
|
165
|
+
loopbackFetch(request: Request, claim?: EveQueueDeliveryClaim): Promise<Response>;
|
|
166
|
+
private settleQueueDelivery;
|
|
139
167
|
private forwardToEve;
|
|
140
168
|
/**
|
|
141
169
|
* The idle-sleep path: once the container has been quiet for `sleepAfter`,
|
|
@@ -165,4 +193,5 @@ export interface EveHostWorkerHandler {
|
|
|
165
193
|
}): void;
|
|
166
194
|
}
|
|
167
195
|
export declare function createEveHostWorker(options: EveHostWorkerOptions): EveHostWorkerHandler;
|
|
196
|
+
export {};
|
|
168
197
|
//# sourceMappingURL=eve-host-runtime.d.ts.map
|