@ewhauser/world-celld 0.8.1 → 0.9.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/CHANGELOG.md +8 -0
- package/README.md +12 -5
- package/dist/index.d.ts +1 -40
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/queue-protocol-8iiZ8o_1.d.ts +42 -0
- package/dist/queue-protocol-8iiZ8o_1.d.ts.map +1 -0
- package/dist/{run-list-DGsdv6Jf.js → run-list-C4B4SBYW.js} +3 -2
- package/dist/{run-list-DGsdv6Jf.js.map → run-list-C4B4SBYW.js.map} +1 -1
- package/dist/testing.d.ts +17 -0
- package/dist/testing.d.ts.map +1 -1
- package/dist/testing.js +303 -4
- package/dist/testing.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 0.9.0 (2026-10-06)
|
|
6
|
+
|
|
7
|
+
## What's Changed
|
|
8
|
+
* feat: support World spec v8 and deliver demo queues by @ewhauser in https://github.com/ewhauser/world-celld/pull/90
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
**Full Changelog**: https://github.com/ewhauser/world-celld/compare/v0.8.1...v0.9.0
|
|
12
|
+
|
|
5
13
|
## 0.8.1 (2026-10-02)
|
|
6
14
|
|
|
7
15
|
## What's Changed
|
package/README.md
CHANGED
|
@@ -14,11 +14,18 @@ self-hosted alternative to platform-specific Workflow backends.
|
|
|
14
14
|
|
|
15
15
|
## World protocol compatibility
|
|
16
16
|
|
|
17
|
-
This adapter supports World spec
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
This adapter supports World spec v8 with the Workflow 5 beta packages. This is
|
|
18
|
+
a breaking upgrade for applications using a v7 Workflow runtime: that runtime
|
|
19
|
+
rejects a World advertising v8. This adapter also rejects event writes to runs
|
|
20
|
+
stamped v7. Keep the v7 adapter and matching Workflow packages in place until
|
|
21
|
+
those runs finish, then upgrade the application and adapter together.
|
|
22
|
+
|
|
23
|
+
Event slots are allocated in the same transaction that stores each event, so
|
|
24
|
+
reads see a dense log and failed writes leave no gaps. No background sealing or
|
|
25
|
+
`noop` events are needed.
|
|
26
|
+
|
|
27
|
+
World v8 adds forced hook claims. This adapter does not advertise the optional
|
|
28
|
+
`hookForceClaim` capability, so `experimental_force` is unavailable.
|
|
22
29
|
|
|
23
30
|
Run listing accepts either a single status or an array of statuses (OR matching).
|
|
24
31
|
An empty status array matches no runs.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { n as NativeQueueSendOptions, r as NativeQueueSendResult, t as NativeQueueEnvelope } from "./queue-protocol-8iiZ8o_1.js";
|
|
1
2
|
import { CreateEventParams, CreateEventRequest, Event, GetChunksOptions, Hook, RunCreatedEventRequest, Step, StreamChunksResponse, StreamInfoResponse, Streamer, TerminalWorkflowRunStatus, Wait, WorkflowRun, WorkflowRunStatus, World } from "@workflow/world";
|
|
2
3
|
//#region src/retention.d.ts
|
|
3
4
|
type CleanupPhase = 'retained' | 'index' | 'streams' | 'queues' | 'payload' | 'tombstoned';
|
|
@@ -312,46 +313,6 @@ interface StreamDOId {
|
|
|
312
313
|
toString(): string;
|
|
313
314
|
}
|
|
314
315
|
//#endregion
|
|
315
|
-
//#region src/queue-protocol.d.ts
|
|
316
|
-
/**
|
|
317
|
-
* Small broker message carried by celld's native Queue.
|
|
318
|
-
*
|
|
319
|
-
* Run-bearing payload bytes live in object storage so the broker's 128 kB limit does not
|
|
320
|
-
* narrow the Workflow World contract and run retention can delete those bytes
|
|
321
|
-
* without waiting for the Queue's fixed four-day retention window.
|
|
322
|
-
*/
|
|
323
|
-
interface NativeQueueEnvelope {
|
|
324
|
-
version: 1;
|
|
325
|
-
messageId: string;
|
|
326
|
-
queueName: string;
|
|
327
|
-
targetBaseUrl: string;
|
|
328
|
-
runId?: string;
|
|
329
|
-
idempotencyKey?: string;
|
|
330
|
-
payloadKey?: string;
|
|
331
|
-
/**
|
|
332
|
-
* Inline body. Health checks always travel inline; a run-bearing body may
|
|
333
|
-
* travel inline when it is small and carries no user data, in which case
|
|
334
|
-
* delivery checks the run's expiry instead of reading a payload object.
|
|
335
|
-
*/
|
|
336
|
-
body?: string;
|
|
337
|
-
/** Absolute workflow redelivery deadline; long waits are chained by the consumer. */
|
|
338
|
-
notBefore?: number;
|
|
339
|
-
/**
|
|
340
|
-
* Where the idempotency claim lives. Absent: the claim cell named by queue
|
|
341
|
-
* and key. `run`: an entry in the run's own cell (requires `runId`).
|
|
342
|
-
*/
|
|
343
|
-
claimScope?: 'run';
|
|
344
|
-
/** Failed deliveries carried across suspension re-publishes. */
|
|
345
|
-
deliveryFailures?: number;
|
|
346
|
-
suspensionCount?: number;
|
|
347
|
-
}
|
|
348
|
-
interface NativeQueueSendOptions {
|
|
349
|
-
delaySeconds?: number;
|
|
350
|
-
}
|
|
351
|
-
interface NativeQueueSendResult {
|
|
352
|
-
messageId: string;
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
316
|
//#region src/queue.d.ts
|
|
356
317
|
interface CelldQueueProducer {
|
|
357
318
|
send(envelope: NativeQueueEnvelope, options?: NativeQueueSendOptions): Promise<NativeQueueSendResult>;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/retention.ts","../src/apply-event.ts","../src/storage.ts","../src/stream-protocol.ts","../src/streamer.ts","../src/queue
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/retention.ts","../src/apply-event.ts","../src/storage.ts","../src/stream-protocol.ts","../src/streamer.ts","../src/queue.ts","../src/run-list.ts","../src/indexes.ts","../src/config.ts","../src/index.ts"],"mappings":";;;KAOY;UAEK;EACf;EACA;EACA;EACA,WA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U,yBACT,QAAQ;;;;KC9FD,YAAY;;UAGP;EACf;EACA,WAAW;EACX;EACA;EACA;;EAEA;;UAGe;EACf,MAAM;EACN;EACA;;;;UCPe;EACf;EACA;;EAEA;EACA;EACA;;UAGe;;EAEf,MAAM;IAAQ;IAAc;IAAe;;EAC3C;EACA;;UAuBe;EACf;EACA;EACA;;KAGU;EACN;EAAgB,aAAa;;EAC7B;EAAiB,QAAQ;;;UAgDd;EACf,UACE,KAAK,aACL,4BACA,+BACC;IAAU;;EACb,SAAS,UAAU,mBAAmB,QAAQ;;;;;EAK9C,kBAAkB,SAAS,iBAAiB,QAAQ;EACpD,eAAe,gBAAgB;EAC/B,YAAY,iBAAiB;EAC7B,YAAY,eAAe,OAAO,iBAAiB,QAAQ;EAC3D,oBACE,eACA,gBACA,wBACA,OAAO,gBACP,cAAc,kBACb;EACH,uBACE,eACA,OAAO,gBACP,aAAa,kBACZ;EACH,mBAAmB,SAAS,4BAA4B,QAAQ;EAChE,UAAU,SAAS,0BAA0B,QAAQ;;;;;KChI3C,iBAAiB;UAEZ;EACf;EACA;;UAGe;EACf,aAAa;EACb,gBAAgB;EAChB,gBAAgB;EAChB,kBAAkB;;UAGH;;;;;;;EAOf;;;;;EAKA;;;;;EAKA,MAAM;;EAEN;;;;;;EAMA;;;;;;EAMA;;EAEA;;EAEA;;EAEA;;;;UCpBe;EACf,UAAU,gBAAgB,QAAQ;EAClC,SAAS,gBAAgB,QAAQ;EACjC,WAAW,gBAAgB,QAAQ;EACnC,MAAM,gBAAgB,QAAQ;;KAGpB,aAAa,QAAQ;EAAkB,WAAW;;iBAS9C,iBAAiB,SAAS,mBAAmB"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { $ as normalizeStreamError, A as boundedIntegerOption, B as MAX_STREAM_LONG_POLL_MS, D as MAX_QUEUE_DERIVED_DEADLINE_HEADROOM_MS, E as MAX_QUEUE_DELIVERY_TIMEOUT_MS, F as queueDelayDeadline, G as STREAM_CHUNK_LIMIT_HEADER, H as MAX_STREAM_READ_CHUNKS, I as strictIntegerSetting, J as decodeStreamWriteResult, K as decodeStreamReadResult, L as MAX_STREAM_BATCH_BYTES, Q as isChunkLimitRejection, R as MAX_STREAM_CHUNK_BYTES, T as MAX_FLEET_RPC_TIMEOUT_MS, U as MAX_STREAM_WRITE_CHUNKS, V as MAX_STREAM_READ_BYTES, W as STREAM_BATCH_CONTENT_TYPE, X as encodeStreamWriteBatch, _ as rpcStringify, b as createWorkflowIndex, c as nativeQueueDelaySeconds, g as rpcParse, h as compact, j as checkedQueueTimestampAdd, l as queueClaimName, n as listRunsPage, v as parse, x as runIndexMetadata, y as stringify, z as MAX_STREAM_ERROR_BYTES } from "./run-list-C4B4SBYW.js";
|
|
2
2
|
import { CreateEventSchema, EventSchema, HookSchema, MessageId, QueuePayloadSchema, SPEC_VERSION_CURRENT, StepSchema, WaitSchema, WorkflowRunSchema, parseQueueName } from "@workflow/world";
|
|
3
3
|
import { EntityConflictError, HookNotFoundError, RunExpiredError, RunNotSupportedError, TooEarlyError, WorkflowRunNotFoundError, WorkflowWorldError } from "@workflow/errors";
|
|
4
4
|
import { monotonicFactory } from "ulid";
|
|
@@ -769,7 +769,7 @@ function createQueue(config) {
|
|
|
769
769
|
queueName: reqQueueName,
|
|
770
770
|
messageId: reqMessageId
|
|
771
771
|
});
|
|
772
|
-
if (result && typeof result.timeoutSeconds === "number") {
|
|
772
|
+
if (!("invoke" in parsedBody.data && parsedBody.data.invoke) && result !== null && typeof result === "object" && "timeoutSeconds" in result && typeof result.timeoutSeconds === "number") {
|
|
773
773
|
if (queueDelayDeadline(Date.now(), result.timeoutSeconds, 1, 900001) === null) throw new Error("Queue handler timeoutSeconds is out of range");
|
|
774
774
|
return Response.json({ timeoutSeconds: result.timeoutSeconds }, {
|
|
775
775
|
status: 503,
|