effect-jobs 0.1.0-alpha.1 → 0.1.0-alpha.3
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 +87 -0
- package/README.md +342 -323
- package/dist/FailureCode.d.ts +2 -2
- package/dist/FailureCode.d.ts.map +1 -1
- package/dist/FailureCode.js.map +1 -1
- package/dist/Job.d.ts +21 -68
- package/dist/Job.d.ts.map +1 -1
- package/dist/Job.js +25 -80
- package/dist/Job.js.map +1 -1
- package/dist/JobApi.d.ts +35 -0
- package/dist/JobApi.d.ts.map +1 -0
- package/dist/JobApi.js +62 -0
- package/dist/JobApi.js.map +1 -0
- package/dist/JobApiBuilder.d.ts +29 -0
- package/dist/JobApiBuilder.d.ts.map +1 -0
- package/dist/JobApiBuilder.js +53 -0
- package/dist/JobApiBuilder.js.map +1 -0
- package/dist/JobContract.d.ts +22 -59
- package/dist/JobContract.d.ts.map +1 -1
- package/dist/JobContract.js +8 -2
- package/dist/JobContract.js.map +1 -1
- package/dist/JobEnqueue.d.ts +12 -11
- package/dist/JobEnqueue.d.ts.map +1 -1
- package/dist/JobEnqueue.js +4 -4
- package/dist/JobEnqueue.js.map +1 -1
- package/dist/JobFailure.d.ts +12 -11
- package/dist/JobFailure.d.ts.map +1 -1
- package/dist/JobFailure.js +6 -5
- package/dist/JobFailure.js.map +1 -1
- package/dist/JobGroup.d.ts +64 -0
- package/dist/JobGroup.d.ts.map +1 -0
- package/dist/JobGroup.js +52 -0
- package/dist/JobGroup.js.map +1 -0
- package/dist/JobId.d.ts +7 -7
- package/dist/JobId.d.ts.map +1 -1
- package/dist/JobId.js +1 -1
- package/dist/JobId.js.map +1 -1
- package/dist/JobIdentity.d.ts +19 -35
- package/dist/JobIdentity.d.ts.map +1 -1
- package/dist/JobIdentity.js +30 -67
- package/dist/JobIdentity.js.map +1 -1
- package/dist/JobLifecycle.d.ts +148 -123
- package/dist/JobLifecycle.d.ts.map +1 -1
- package/dist/JobLifecycle.js +93 -38
- package/dist/JobLifecycle.js.map +1 -1
- package/dist/JobOperators.d.ts +131 -0
- package/dist/JobOperators.d.ts.map +1 -0
- package/dist/JobOperators.js +48 -0
- package/dist/JobOperators.js.map +1 -0
- package/dist/JobPayload.d.ts +4 -2
- package/dist/JobPayload.d.ts.map +1 -1
- package/dist/JobPayload.js +86 -61
- package/dist/JobPayload.js.map +1 -1
- package/dist/JobPayloadCodec.d.ts.map +1 -1
- package/dist/JobPayloadCodec.js +41 -22
- package/dist/JobPayloadCodec.js.map +1 -1
- package/dist/JobPolicy.d.ts +109 -28
- package/dist/JobPolicy.d.ts.map +1 -1
- package/dist/JobPolicy.js +124 -51
- package/dist/JobPolicy.js.map +1 -1
- package/dist/JobPolling.d.ts +34 -0
- package/dist/JobPolling.d.ts.map +1 -0
- package/dist/JobPolling.js +103 -0
- package/dist/JobPolling.js.map +1 -0
- package/dist/JobProducer.d.ts +93 -25
- package/dist/JobProducer.d.ts.map +1 -1
- package/dist/JobProducer.js +174 -29
- package/dist/JobProducer.js.map +1 -1
- package/dist/JobRetryPolicy.d.ts +24 -0
- package/dist/JobRetryPolicy.d.ts.map +1 -0
- package/dist/JobRetryPolicy.js +39 -0
- package/dist/JobRetryPolicy.js.map +1 -0
- package/dist/JobSchedule.d.ts +74 -0
- package/dist/JobSchedule.d.ts.map +1 -0
- package/dist/JobSchedule.js +55 -0
- package/dist/JobSchedule.js.map +1 -0
- package/dist/JobStorage.d.ts +43 -0
- package/dist/JobStorage.d.ts.map +1 -0
- package/dist/JobStorage.js +46 -0
- package/dist/JobStorage.js.map +1 -0
- package/dist/JobStore.d.ts +38 -261
- package/dist/JobStore.d.ts.map +1 -1
- package/dist/JobStore.js +4 -4
- package/dist/JobStore.js.map +1 -1
- package/dist/JobTelemetry.d.ts +15 -5
- package/dist/JobTelemetry.d.ts.map +1 -1
- package/dist/JobTelemetry.js +119 -26
- package/dist/JobTelemetry.js.map +1 -1
- package/dist/JobTransaction.d.ts +9 -7
- package/dist/JobTransaction.d.ts.map +1 -1
- package/dist/JobTransaction.js +3 -3
- package/dist/JobTransaction.js.map +1 -1
- package/dist/JobWorker.d.ts +58 -49
- package/dist/JobWorker.d.ts.map +1 -1
- package/dist/JobWorker.js +42 -175
- package/dist/JobWorker.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/JobTransaction.d.ts +11 -3
- package/dist/internal/JobTransaction.d.ts.map +1 -1
- package/dist/internal/JobTransaction.js +7 -2
- package/dist/internal/JobTransaction.js.map +1 -1
- package/dist/internal/ProducerDeclaration.d.ts +27 -0
- package/dist/internal/ProducerDeclaration.d.ts.map +1 -0
- package/dist/internal/ProducerDeclaration.js +38 -0
- package/dist/internal/ProducerDeclaration.js.map +1 -0
- package/dist/internal/codec/CanonicalJson.d.ts +2 -2
- package/dist/internal/codec/CanonicalJson.d.ts.map +1 -1
- package/dist/internal/codec/CanonicalJson.js +177 -134
- package/dist/internal/codec/CanonicalJson.js.map +1 -1
- package/dist/internal/codec/ProtectedProjection.d.ts.map +1 -1
- package/dist/internal/codec/ProtectedProjection.js +164 -112
- package/dist/internal/codec/ProtectedProjection.js.map +1 -1
- package/dist/internal/lifecycle/Artifacts.d.ts +39 -1
- package/dist/internal/lifecycle/Artifacts.d.ts.map +1 -1
- package/dist/internal/lifecycle/Artifacts.js +5 -5
- package/dist/internal/lifecycle/Artifacts.js.map +1 -1
- package/dist/internal/lifecycle/Reconciliation.d.ts +10 -63
- package/dist/internal/lifecycle/Reconciliation.d.ts.map +1 -1
- package/dist/internal/lifecycle/Reconciliation.js +20 -38
- package/dist/internal/lifecycle/Reconciliation.js.map +1 -1
- package/dist/internal/policy/Retry.d.ts +65 -0
- package/dist/internal/policy/Retry.d.ts.map +1 -0
- package/dist/internal/policy/Retry.js +69 -0
- package/dist/internal/policy/Retry.js.map +1 -0
- package/dist/internal/worker/Capability.d.ts +14 -72
- package/dist/internal/worker/Capability.d.ts.map +1 -1
- package/dist/internal/worker/Capability.js +1 -1
- package/dist/internal/worker/Capability.js.map +1 -1
- package/dist/internal/worker/Drain.d.ts +5 -3
- package/dist/internal/worker/Drain.d.ts.map +1 -1
- package/dist/internal/worker/Drain.js +13 -10
- package/dist/internal/worker/Drain.js.map +1 -1
- package/dist/internal/worker/Execution.d.ts +1 -1
- package/dist/internal/worker/Execution.d.ts.map +1 -1
- package/dist/internal/worker/Execution.js +37 -21
- package/dist/internal/worker/Execution.js.map +1 -1
- package/dist/internal/worker/GroupWorker.d.ts +59 -0
- package/dist/internal/worker/GroupWorker.d.ts.map +1 -0
- package/dist/internal/worker/GroupWorker.js +91 -0
- package/dist/internal/worker/GroupWorker.js.map +1 -0
- package/dist/internal/worker/Handler.d.ts +14 -0
- package/dist/internal/worker/Handler.d.ts.map +1 -0
- package/dist/internal/worker/Handler.js +2 -0
- package/dist/internal/worker/Handler.js.map +1 -0
- package/dist/internal/worker/InstallHandlers.d.ts +9 -0
- package/dist/internal/worker/InstallHandlers.d.ts.map +1 -0
- package/dist/internal/worker/InstallHandlers.js +35 -0
- package/dist/internal/worker/InstallHandlers.js.map +1 -0
- package/dist/internal/worker/QueueRun.d.ts +9 -0
- package/dist/internal/worker/QueueRun.d.ts.map +1 -0
- package/dist/internal/worker/QueueRun.js +2 -0
- package/dist/internal/worker/QueueRun.js.map +1 -0
- package/dist/internal/worker/Results.d.ts +13 -92
- package/dist/internal/worker/Results.d.ts.map +1 -1
- package/dist/internal/worker/Results.js +1 -1
- package/dist/internal/worker/Results.js.map +1 -1
- package/dist/internal/worker/Runtime.d.ts +26 -0
- package/dist/internal/worker/Runtime.d.ts.map +1 -0
- package/dist/internal/worker/Runtime.js +158 -0
- package/dist/internal/worker/Runtime.js.map +1 -0
- package/dist/{PostgreSqlDrizzleSchema.d.ts → postgresql/PostgreSqlDrizzleSchema.d.ts} +93 -9
- package/dist/postgresql/PostgreSqlDrizzleSchema.d.ts.map +1 -0
- package/dist/{PostgreSqlDrizzleSchema.js → postgresql/PostgreSqlDrizzleSchema.js} +27 -10
- package/dist/postgresql/PostgreSqlDrizzleSchema.js.map +1 -0
- package/dist/{PostgreSqlJobs.d.ts → postgresql/PostgreSqlJobs.d.ts} +45 -19
- package/dist/postgresql/PostgreSqlJobs.d.ts.map +1 -0
- package/dist/postgresql/PostgreSqlJobs.js +147 -0
- package/dist/postgresql/PostgreSqlJobs.js.map +1 -0
- package/dist/{PostgreSqlNative.d.ts → postgresql/PostgreSqlNative.d.ts} +2 -2
- package/dist/postgresql/PostgreSqlNative.d.ts.map +1 -0
- package/dist/postgresql/PostgreSqlNative.js +151 -0
- package/dist/postgresql/PostgreSqlNative.js.map +1 -0
- package/dist/{PostgreSqlSchema.d.ts → postgresql/PostgreSqlSchema.d.ts} +20 -3
- package/dist/postgresql/PostgreSqlSchema.d.ts.map +1 -0
- package/dist/postgresql/PostgreSqlSchema.js +168 -0
- package/dist/postgresql/PostgreSqlSchema.js.map +1 -0
- package/dist/postgresql/PostgreSqlTransaction.d.ts.map +1 -0
- package/dist/postgresql/PostgreSqlTransaction.js.map +1 -0
- package/dist/postgresql/internal/Health.d.ts +27 -0
- package/dist/postgresql/internal/Health.d.ts.map +1 -0
- package/dist/postgresql/internal/Health.js +58 -0
- package/dist/postgresql/internal/Health.js.map +1 -0
- package/dist/postgresql/internal/Operators.d.ts +5 -0
- package/dist/postgresql/internal/Operators.d.ts.map +1 -0
- package/dist/postgresql/internal/Operators.js +144 -0
- package/dist/postgresql/internal/Operators.js.map +1 -0
- package/dist/postgresql/internal/Producer.d.ts +23 -0
- package/dist/postgresql/internal/Producer.d.ts.map +1 -0
- package/dist/postgresql/internal/Producer.js +86 -0
- package/dist/postgresql/internal/Producer.js.map +1 -0
- package/dist/{internal/postgresql → postgresql/internal}/Readiness.d.ts +2 -2
- package/dist/postgresql/internal/Readiness.d.ts.map +1 -0
- package/dist/{internal/postgresql → postgresql/internal}/Readiness.js +41 -6
- package/dist/postgresql/internal/Readiness.js.map +1 -0
- package/dist/{internal/postgresql → postgresql/internal}/Rows.d.ts +23 -7
- package/dist/postgresql/internal/Rows.d.ts.map +1 -0
- package/dist/postgresql/internal/Rows.js +119 -0
- package/dist/postgresql/internal/Rows.js.map +1 -0
- package/dist/postgresql/internal/Schedule.d.ts +6 -0
- package/dist/postgresql/internal/Schedule.d.ts.map +1 -0
- package/dist/postgresql/internal/Schedule.js +74 -0
- package/dist/postgresql/internal/Schedule.js.map +1 -0
- package/dist/{internal/postgresql → postgresql/internal}/Store.d.ts +1 -1
- package/dist/postgresql/internal/Store.d.ts.map +1 -0
- package/dist/{internal/postgresql → postgresql/internal}/Store.js +68 -26
- package/dist/postgresql/internal/Store.js.map +1 -0
- package/docs/observability-checklist.md +33 -0
- package/docs/observability.md +204 -0
- package/package.json +121 -36
- package/specs/api-refinements.md +91 -16
- package/specs/architecture-decisions.md +133 -57
- package/specs/core-contract.md +129 -69
- package/specs/drizzle-compatibility.md +75 -21
- package/specs/operator-contract.md +107 -0
- package/specs/{postgresql-backend.md → postgresql-jobs.md} +60 -8
- package/specs/release-qualification.md +149 -139
- package/specs/retry-policy.md +120 -0
- package/dist/JobConsumer.d.ts +0 -87
- package/dist/JobConsumer.d.ts.map +0 -1
- package/dist/JobConsumer.js +0 -71
- package/dist/JobConsumer.js.map +0 -1
- package/dist/JobRegistry.d.ts +0 -82
- package/dist/JobRegistry.d.ts.map +0 -1
- package/dist/JobRegistry.js +0 -75
- package/dist/JobRegistry.js.map +0 -1
- package/dist/JobWorkerRuntime.d.ts +0 -59
- package/dist/JobWorkerRuntime.d.ts.map +0 -1
- package/dist/JobWorkerRuntime.js +0 -48
- package/dist/JobWorkerRuntime.js.map +0 -1
- package/dist/PollingJobWorker.d.ts +0 -24
- package/dist/PollingJobWorker.d.ts.map +0 -1
- package/dist/PollingJobWorker.js +0 -63
- package/dist/PollingJobWorker.js.map +0 -1
- package/dist/PostgreSqlDrizzleSchema.d.ts.map +0 -1
- package/dist/PostgreSqlDrizzleSchema.js.map +0 -1
- package/dist/PostgreSqlJobs.d.ts.map +0 -1
- package/dist/PostgreSqlJobs.js +0 -97
- package/dist/PostgreSqlJobs.js.map +0 -1
- package/dist/PostgreSqlNative.d.ts.map +0 -1
- package/dist/PostgreSqlNative.js +0 -78
- package/dist/PostgreSqlNative.js.map +0 -1
- package/dist/PostgreSqlSchema.d.ts.map +0 -1
- package/dist/PostgreSqlSchema.js +0 -99
- package/dist/PostgreSqlSchema.js.map +0 -1
- package/dist/PostgreSqlTransaction.d.ts.map +0 -1
- package/dist/PostgreSqlTransaction.js.map +0 -1
- package/dist/internal/postgresql/Producer.d.ts +0 -14
- package/dist/internal/postgresql/Producer.d.ts.map +0 -1
- package/dist/internal/postgresql/Producer.js +0 -55
- package/dist/internal/postgresql/Producer.js.map +0 -1
- package/dist/internal/postgresql/Readiness.d.ts.map +0 -1
- package/dist/internal/postgresql/Readiness.js.map +0 -1
- package/dist/internal/postgresql/Rows.d.ts.map +0 -1
- package/dist/internal/postgresql/Rows.js +0 -75
- package/dist/internal/postgresql/Rows.js.map +0 -1
- package/dist/internal/postgresql/Store.d.ts.map +0 -1
- package/dist/internal/postgresql/Store.js.map +0 -1
- /package/dist/{PostgreSqlTransaction.d.ts → postgresql/PostgreSqlTransaction.d.ts} +0 -0
- /package/dist/{PostgreSqlTransaction.js → postgresql/PostgreSqlTransaction.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.3 (unpublished candidate)
|
|
4
|
+
|
|
5
|
+
Breaking prerelease changes since the published alpha.2 package:
|
|
6
|
+
|
|
7
|
+
- Require exact Effect/sql-pg `4.1.0` and optional Drizzle `1.0.0-rc.5`, replacing
|
|
8
|
+
Effect/sql-pg `4.0.5` and the two hash-suffixed Drizzle snapshots. Node `24.15.0`
|
|
9
|
+
and Bun `1.4.2` remain pinned; the local Alchemy example uses `2.0.0-beta.85`.
|
|
10
|
+
- Evaluate lazy `Job.make`, `JobProducer.make`, `JobPolicy.make` and
|
|
11
|
+
`JobPayload.encrypted` setup in their typed Effect channels. Reuse one
|
|
12
|
+
application-owned definitions Layer; do not hide setup in synchronous runners.
|
|
13
|
+
- Move routing and default policy from jobs into immutable producer slot bindings:
|
|
14
|
+
`JobProducer.make(operation).pipe(JobProducer.withSlot(slot, job, { queue }))`.
|
|
15
|
+
Enqueue now takes one object containing `slot`, `operationId` and `payload`.
|
|
16
|
+
Fixed bindings forbid an enqueue queue; selectable `{ queues: [...] }` bindings
|
|
17
|
+
require a declared queue-name string. Job-level enqueue and producer `identity`
|
|
18
|
+
are removed. See [the API migration contract](./specs/api-refinements.md).
|
|
19
|
+
- Replace `JobRegistry`, `JobConsumer`, `JobWorkerRuntime` and `PollingJobWorker`
|
|
20
|
+
public entrypoints with `JobGroup`, `JobApi`, `JobApiBuilder`, `JobStorage`,
|
|
21
|
+
`JobSchedule` and `JobPolling`. Declare complete catalog handlers and compose
|
|
22
|
+
the shared worker/storage graph explicitly; old imports are not aliases.
|
|
23
|
+
- Configure retries through `JobRetryPolicy` and `yield* JobPolicy.make({ retry })`.
|
|
24
|
+
Replace `retryDelay`/`maxAttempts` options with `fixed`/`exponential`, optional
|
|
25
|
+
cap/jitter, and `maxFinalizedAttempts`. Public counters use `finalizedAttempts`;
|
|
26
|
+
stored `maxAttempts`/`attempts_made` keys are retained. Upgrade every reader
|
|
27
|
+
before producing `BackoffV1`/`ProportionalV1` jobs; old readers cannot process
|
|
28
|
+
them safely. Existing `FixedDelayV1` policies keep their semantics.
|
|
29
|
+
- Adapt encrypted codecs to the lazy Schema-native transformation, with explicit
|
|
30
|
+
independent seal/open services. Already-protected envelopes remain supported.
|
|
31
|
+
The application still owns encryption, keys and stable keyed fingerprints.
|
|
32
|
+
|
|
33
|
+
Also included: read-only bounded scheduling, nullable creation metadata and its
|
|
34
|
+
application-owned `creationTimeMigration`, focused PostgreSQL implementation
|
|
35
|
+
subpaths behind the unchanged public PostgreSQL export names, and bounded
|
|
36
|
+
observability with application-owned exporters. Review schema readiness and
|
|
37
|
+
apply required migrations before starting readers; runtime never migrates or
|
|
38
|
+
resets an installation. See [retry rollout](./specs/retry-policy.md) and the
|
|
39
|
+
[PostgreSQL contract](./specs/postgresql-jobs.md).
|
|
40
|
+
|
|
41
|
+
This entry describes prepared source, not publication or a fresh qualification
|
|
42
|
+
PASS. The release handoff binds actual commands, exceptions and cleanup to one
|
|
43
|
+
immutable archive. Completed retention remains 90 days. Website/playground source
|
|
44
|
+
is excluded from npm; no deployment or production guarantee is implied.
|
|
45
|
+
|
|
46
|
+
## 0.1.0-alpha.2 (published)
|
|
47
|
+
|
|
48
|
+
Breaking prerelease changes since alpha.1:
|
|
49
|
+
|
|
50
|
+
- Rename public `Job.make({ kind })` to `{ name }`, definition/catalog and handler
|
|
51
|
+
context access from `.kind` to `.name`, and `JobIdentity.JobKind` to
|
|
52
|
+
`JobIdentity.JobName`. The public Drizzle jobs-column property also becomes
|
|
53
|
+
`.name`, including `extraIndexes` callbacks. Keep existing name values and
|
|
54
|
+
catalog versions: the physical PostgreSQL column is still `kind`, so this
|
|
55
|
+
rename alone needs no column rename, data rewrite/reset or migration. See
|
|
56
|
+
[the API migration contract](./specs/api-refinements.md).
|
|
57
|
+
- Require exact Effect `4.0.5`; the qualified native PostgreSQL companion is
|
|
58
|
+
`@effect/sql-pg@4.0.5`. Optional Drizzle peers are the exact snapshots
|
|
59
|
+
`1.0.0-rc.5-ab785fc` and `1.0.0-rc.5-169397b`.
|
|
60
|
+
- Bind producer slots to definitions with inferred enqueue inputs and explicit
|
|
61
|
+
application-owned transaction/service composition.
|
|
62
|
+
- Extend the PostgreSQL schema/readiness contract for Cancelled jobs, guarded
|
|
63
|
+
operators, corrected redrive and durable repair lineage. Applications own
|
|
64
|
+
migration review and execution; runtime does not migrate old installations.
|
|
65
|
+
|
|
66
|
+
Also included:
|
|
67
|
+
|
|
68
|
+
- Focused `JobOperators` support for guarded retry acceleration, cancellation and
|
|
69
|
+
redrive; corrected redrive creates a new job and preserves source evidence.
|
|
70
|
+
- Current Astro documentation, runnable application examples and the local
|
|
71
|
+
playground. The npm package excludes the website/playground implementation.
|
|
72
|
+
- PostgreSQL Node/Bun CI, real-process crash/recovery tests, and a bounded manual
|
|
73
|
+
soak harness. These are scoped synthetic qualification, not production or
|
|
74
|
+
exactly-once guarantees.
|
|
75
|
+
|
|
76
|
+
Completed retention remains 90 days by default. Upstream Drizzle full-declaration
|
|
77
|
+
checks retain their documented known-failure exceptions; successful own-code
|
|
78
|
+
checks do not mean upstream full strict PASS. The registry contains this release
|
|
79
|
+
with Effect `4.0.5` and the two Drizzle snapshots; current source is not identical
|
|
80
|
+
to those published bytes. Deployment is not established by registry publication.
|
|
81
|
+
|
|
82
|
+
## 0.1.0-alpha.1-effect.4.0.5.local.2 (local only)
|
|
83
|
+
|
|
84
|
+
- Qualify exact Drizzle snapshots `1.0.0-rc.5-ab785fc` and `1.0.0-rc.5-169397b`
|
|
85
|
+
with Effect/sql-pg 4.0.5; use `ab785fc` for the Alchemy beta.83 peer graph.
|
|
86
|
+
- Preserve native PgClient transaction ownership and production runtime bytes.
|
|
87
|
+
- Keep the narrowly approved seven upstream declaration diagnostics as separate
|
|
88
|
+
C FAIL; require independent A+B source and negative controls for both snapshots.
|
|
89
|
+
|
|
3
90
|
## 0.1.0-alpha.1
|
|
4
91
|
|
|
5
92
|
Breaking prerelease API changes since alpha.0:
|