@openlup/platform 0.21.0 → 0.22.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 +210 -47
- package/README.md +27 -4
- package/dist/composition/composeBundle.d.ts +7 -0
- package/dist/composition/composeBundle.js +2 -0
- package/dist/composition/fulfillmentContribution.d.ts +21 -0
- package/dist/composition/fulfillmentContribution.js +19 -0
- package/dist/composition/index.d.ts +1 -0
- package/dist/composition/index.js +1 -0
- package/dist/fulfillment/adapterConformance.d.ts +3 -0
- package/dist/fulfillment/adapterConformance.js +223 -0
- package/dist/fulfillment/bindings.d.ts +3 -0
- package/dist/fulfillment/bindings.js +29 -0
- package/dist/fulfillment/commerceFulfillmentHandlers.d.ts +29 -0
- package/dist/fulfillment/commerceFulfillmentHandlers.js +184 -0
- package/dist/fulfillment/commerceFulfillmentReadModel.d.ts +86 -0
- package/dist/fulfillment/commerceFulfillmentReadModel.js +131 -0
- package/dist/fulfillment/contracts/alignment.d.ts +25 -0
- package/dist/fulfillment/contracts/alignment.js +1 -0
- package/dist/fulfillment/contracts/bindings.d.ts +51 -0
- package/dist/fulfillment/contracts/bindings.js +1 -0
- package/dist/fulfillment/contracts/capabilities.d.ts +29 -0
- package/dist/fulfillment/contracts/capabilities.js +1 -0
- package/dist/fulfillment/contracts/conformance.d.ts +93 -0
- package/dist/fulfillment/contracts/conformance.js +1 -0
- package/dist/fulfillment/contracts/customerAlignment.d.ts +6 -0
- package/dist/fulfillment/contracts/customerAlignment.js +1 -0
- package/dist/fulfillment/contracts/dispatch.d.ts +105 -0
- package/dist/fulfillment/contracts/dispatch.js +1 -0
- package/dist/fulfillment/contracts/index.d.ts +18 -0
- package/dist/fulfillment/contracts/index.js +1 -0
- package/dist/fulfillment/contracts/label.d.ts +35 -0
- package/dist/fulfillment/contracts/label.js +1 -0
- package/dist/fulfillment/contracts/nativeUnsupported.d.ts +6 -0
- package/dist/fulfillment/contracts/nativeUnsupported.js +1 -0
- package/dist/fulfillment/contracts/observation.d.ts +52 -0
- package/dist/fulfillment/contracts/observation.js +1 -0
- package/dist/fulfillment/contracts/operator.d.ts +64 -0
- package/dist/fulfillment/contracts/operator.js +1 -0
- package/dist/fulfillment/contracts/read.d.ts +110 -0
- package/dist/fulfillment/contracts/read.js +1 -0
- package/dist/fulfillment/contracts/readback.d.ts +38 -0
- package/dist/fulfillment/contracts/readback.js +1 -0
- package/dist/fulfillment/contracts/replacement.d.ts +34 -0
- package/dist/fulfillment/contracts/replacement.js +1 -0
- package/dist/fulfillment/contracts/store.d.ts +86 -0
- package/dist/fulfillment/contracts/store.js +1 -0
- package/dist/fulfillment/contracts/sync.d.ts +170 -0
- package/dist/fulfillment/contracts/sync.js +1 -0
- package/dist/fulfillment/currentFulfillmentParcel.d.ts +2 -0
- package/dist/fulfillment/currentFulfillmentParcel.js +1 -0
- package/dist/fulfillment/delayReadModel.d.ts +11 -0
- package/dist/fulfillment/delayReadModel.js +45 -0
- package/dist/fulfillment/deliveryAlignmentReadModel.d.ts +4 -0
- package/dist/fulfillment/deliveryAlignmentReadModel.js +12 -0
- package/dist/fulfillment/dispatchProjection.d.ts +7 -0
- package/dist/fulfillment/dispatchProjection.js +18 -0
- package/dist/fulfillment/fulfillmentObservationEffects.d.ts +66 -0
- package/dist/fulfillment/fulfillmentObservationEffects.js +36 -0
- package/dist/fulfillment/handlerSchemas.d.ts +647 -0
- package/dist/fulfillment/handlerSchemas.js +213 -0
- package/dist/fulfillment/handlerSupport.d.ts +33 -0
- package/dist/fulfillment/handlerSupport.js +25 -0
- package/dist/fulfillment/index.d.ts +37 -0
- package/dist/fulfillment/index.js +37 -0
- package/dist/fulfillment/labelLifecycle.d.ts +24 -0
- package/dist/fulfillment/labelLifecycle.js +9 -0
- package/dist/fulfillment/lowStockEvidenceHandler.d.ts +36 -0
- package/dist/fulfillment/lowStockEvidenceHandler.js +46 -0
- package/dist/fulfillment/migrations.d.ts +27 -0
- package/dist/fulfillment/migrations.js +8 -0
- package/dist/fulfillment/nativeUnsupported.d.ts +10 -0
- package/dist/fulfillment/nativeUnsupported.js +18 -0
- package/dist/fulfillment/normalizedFulfillmentFacts.d.ts +2 -0
- package/dist/fulfillment/normalizedFulfillmentFacts.js +1 -0
- package/dist/fulfillment/observationProjection.d.ts +11 -0
- package/dist/fulfillment/observationProjection.js +37 -0
- package/dist/fulfillment/omnipack/capabilities.d.ts +3 -0
- package/dist/fulfillment/omnipack/capabilities.js +16 -0
- package/dist/fulfillment/omnipack/client.d.ts +37 -0
- package/dist/fulfillment/omnipack/client.js +162 -0
- package/dist/fulfillment/omnipack/index.d.ts +52 -0
- package/dist/fulfillment/omnipack/index.js +349 -0
- package/dist/fulfillment/omnipack/mappers.d.ts +73 -0
- package/dist/fulfillment/omnipack/mappers.js +177 -0
- package/dist/fulfillment/omnipack/observation.d.ts +21 -0
- package/dist/fulfillment/omnipack/observation.js +57 -0
- package/dist/fulfillment/omnipack/omnipackDispatchPayload.d.ts +36 -0
- package/dist/fulfillment/omnipack/omnipackDispatchPayload.js +63 -0
- package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.d.ts +83 -0
- package/dist/fulfillment/omnipack/omnipackOutboundOrderPayload.js +113 -0
- package/dist/fulfillment/omnipack/omnipackProductPackPayload.d.ts +11 -0
- package/dist/fulfillment/omnipack/omnipackProductPackPayload.js +38 -0
- package/dist/fulfillment/omnipack/omnipackProductPayload.d.ts +18 -0
- package/dist/fulfillment/omnipack/omnipackProductPayload.js +51 -0
- package/dist/fulfillment/omnipack/omnipackReconciliationPayload.d.ts +1 -0
- package/dist/fulfillment/omnipack/omnipackReconciliationPayload.js +3 -0
- package/dist/fulfillment/omnipack/omnipackStatusVocabulary.d.ts +4 -0
- package/dist/fulfillment/omnipack/omnipackStatusVocabulary.js +87 -0
- package/dist/fulfillment/omnipack/omnipackWebhookPayload.d.ts +9 -0
- package/dist/fulfillment/omnipack/omnipackWebhookPayload.js +76 -0
- package/dist/fulfillment/omnipack/productSyncMappers.d.ts +18 -0
- package/dist/fulfillment/omnipack/productSyncMappers.js +43 -0
- package/dist/fulfillment/omnipack/providerError.d.ts +25 -0
- package/dist/fulfillment/omnipack/providerError.js +47 -0
- package/dist/fulfillment/omnipack/trackingReferences.d.ts +16 -0
- package/dist/fulfillment/omnipack/trackingReferences.js +52 -0
- package/dist/fulfillment/paidFulfillmentRecovery.d.ts +67 -0
- package/dist/fulfillment/paidFulfillmentRecovery.js +154 -0
- package/dist/fulfillment/paidHandoff.d.ts +27 -0
- package/dist/fulfillment/paidHandoff.js +86 -0
- package/dist/fulfillment/paidHandoffPorts.d.ts +24 -0
- package/dist/fulfillment/paidHandoffPorts.js +3 -0
- package/dist/fulfillment/postgresDeliveryAlignment.d.ts +4 -0
- package/dist/fulfillment/postgresDeliveryAlignment.js +12 -0
- package/dist/fulfillment/postgresDispatchStore.d.ts +16 -0
- package/dist/fulfillment/postgresDispatchStore.js +44 -0
- package/dist/fulfillment/postgresEvidenceReadPort.d.ts +25 -0
- package/dist/fulfillment/postgresEvidenceReadPort.js +45 -0
- package/dist/fulfillment/postgresPaidFulfillmentRecovery.d.ts +25 -0
- package/dist/fulfillment/postgresPaidFulfillmentRecovery.js +26 -0
- package/dist/fulfillment/postgresPaidHandoffStore.d.ts +4 -0
- package/dist/fulfillment/postgresPaidHandoffStore.js +10 -0
- package/dist/fulfillment/postgresShipmentSpine.d.ts +63 -0
- package/dist/fulfillment/postgresShipmentSpine.js +232 -0
- package/dist/fulfillment/postgresStockSyncPort.d.ts +8 -0
- package/dist/fulfillment/postgresStockSyncPort.js +63 -0
- package/dist/fulfillment/productReconciliationEvidenceHandler.d.ts +36 -0
- package/dist/fulfillment/productReconciliationEvidenceHandler.js +50 -0
- package/dist/fulfillment/providerCapabilities.d.ts +9 -0
- package/dist/fulfillment/providerCapabilities.js +17 -0
- package/dist/fulfillment/providerCommandLedger.d.ts +143 -0
- package/dist/fulfillment/providerCommandLedger.js +14 -0
- package/dist/fulfillment/providerDispatchAcceptance.d.ts +26 -0
- package/dist/fulfillment/providerDispatchAcceptance.js +23 -0
- package/dist/fulfillment/providerDispatchError.d.ts +6 -0
- package/dist/fulfillment/providerDispatchError.js +5 -0
- package/dist/fulfillment/providerDispatchWorker.d.ts +31 -0
- package/dist/fulfillment/providerDispatchWorker.js +172 -0
- package/dist/fulfillment/providerProductSyncWorker.d.ts +28 -0
- package/dist/fulfillment/providerProductSyncWorker.js +122 -0
- package/dist/fulfillment/providerReconciliationError.d.ts +9 -0
- package/dist/fulfillment/providerReconciliationError.js +17 -0
- package/dist/fulfillment/providerReconciliationTerminalSkip.d.ts +2 -0
- package/dist/fulfillment/providerReconciliationTerminalSkip.js +6 -0
- package/dist/fulfillment/providerReconciliationTimestamp.d.ts +1 -0
- package/dist/fulfillment/providerReconciliationTimestamp.js +27 -0
- package/dist/fulfillment/providerReconciliationWorker.d.ts +82 -0
- package/dist/fulfillment/providerReconciliationWorker.js +151 -0
- package/dist/fulfillment/providerStockAvailability.d.ts +13 -0
- package/dist/fulfillment/providerStockAvailability.js +51 -0
- package/dist/fulfillment/providerStockSyncWorker.d.ts +37 -0
- package/dist/fulfillment/providerStockSyncWorker.js +186 -0
- package/dist/fulfillment/providerTrackingReferences.d.ts +15 -0
- package/dist/fulfillment/providerTrackingReferences.js +23 -0
- package/dist/fulfillment/replacementRefusals.d.ts +5 -0
- package/dist/fulfillment/replacementRefusals.js +38 -0
- package/dist/fulfillment/replacementShipmentHandler.d.ts +5 -0
- package/dist/fulfillment/replacementShipmentHandler.js +46 -0
- package/dist/fulfillment/schemaCapabilities.d.ts +13 -0
- package/dist/fulfillment/schemaCapabilities.js +7 -0
- package/dist/fulfillment/shipmentsOverviewHandler.d.ts +16 -0
- package/dist/fulfillment/shipmentsOverviewHandler.js +54 -0
- package/dist/fulfillment/statusMap.d.ts +2 -0
- package/dist/fulfillment/statusMap.js +1 -0
- package/dist/fulfillment/trackingProgress.d.ts +1 -0
- package/dist/fulfillment/trackingProgress.js +1 -0
- package/dist/fulfillment/verifiedIngress.d.ts +52 -0
- package/dist/fulfillment/verifiedIngress.js +66 -0
- package/dist/payments/stripe/index.d.ts +25 -0
- package/dist/payments/stripe/index.js +25 -0
- package/dist/payments/tpay/index.d.ts +30 -0
- package/dist/payments/tpay/index.js +30 -0
- package/package.json +17 -2
- package/release-gates.json +44 -3
- package/sql/20260808210000_fulfillment_shipment_rail.sql +810 -0
- package/sql/20260819150000_fulfillment_shipment_sequence.sql +98 -0
- package/sql/20261022080000_fulfillment_command_ledger.sql +786 -0
- package/sql/20261022090000_fulfillment_delivery_alignment.sql +1106 -0
- package/src/composition/composeBundle.ts +4 -0
- package/src/composition/fulfillmentContribution.ts +28 -0
- package/src/composition/index.ts +1 -0
- package/src/fulfillment/adapterConformance.ts +195 -0
- package/src/fulfillment/bindings.ts +26 -0
- package/src/fulfillment/commerceFulfillmentHandlers.ts +263 -0
- package/src/fulfillment/commerceFulfillmentReadModel.ts +257 -0
- package/src/fulfillment/contracts/alignment.ts +13 -0
- package/src/fulfillment/contracts/bindings.ts +30 -0
- package/src/fulfillment/contracts/capabilities.ts +15 -0
- package/src/fulfillment/contracts/conformance.ts +61 -0
- package/src/fulfillment/contracts/customerAlignment.ts +4 -0
- package/src/fulfillment/contracts/dispatch.ts +58 -0
- package/src/fulfillment/contracts/index.ts +18 -0
- package/src/fulfillment/contracts/label.ts +9 -0
- package/src/fulfillment/contracts/nativeUnsupported.ts +6 -0
- package/src/fulfillment/contracts/observation.ts +18 -0
- package/src/fulfillment/contracts/operator.ts +31 -0
- package/src/fulfillment/contracts/read.ts +42 -0
- package/src/fulfillment/contracts/readback.ts +11 -0
- package/src/fulfillment/contracts/replacement.ts +15 -0
- package/src/fulfillment/contracts/store.ts +26 -0
- package/src/fulfillment/contracts/sync.ts +61 -0
- package/src/fulfillment/currentFulfillmentParcel.ts +2 -0
- package/src/fulfillment/delayReadModel.ts +60 -0
- package/src/fulfillment/deliveryAlignmentReadModel.ts +15 -0
- package/src/fulfillment/dispatchProjection.ts +20 -0
- package/src/fulfillment/fulfillmentObservationEffects.ts +86 -0
- package/src/fulfillment/handlerSchemas.ts +255 -0
- package/src/fulfillment/handlerSupport.ts +25 -0
- package/src/fulfillment/index.ts +38 -0
- package/src/fulfillment/labelLifecycle.ts +11 -0
- package/src/fulfillment/lowStockEvidenceHandler.ts +60 -0
- package/src/fulfillment/migrations.ts +8 -0
- package/src/fulfillment/nativeUnsupported.ts +23 -0
- package/src/fulfillment/normalizedFulfillmentFacts.ts +2 -0
- package/src/fulfillment/observationProjection.ts +41 -0
- package/src/fulfillment/omnipack/capabilities.ts +18 -0
- package/src/fulfillment/omnipack/client.ts +258 -0
- package/src/fulfillment/omnipack/index.ts +312 -0
- package/src/fulfillment/omnipack/mappers.ts +261 -0
- package/src/fulfillment/omnipack/observation.ts +61 -0
- package/src/fulfillment/omnipack/omnipackDispatchPayload.ts +93 -0
- package/src/fulfillment/omnipack/omnipackOutboundOrderPayload.ts +194 -0
- package/src/fulfillment/omnipack/omnipackProductPackPayload.ts +47 -0
- package/src/fulfillment/omnipack/omnipackProductPayload.ts +67 -0
- package/src/fulfillment/omnipack/omnipackReconciliationPayload.ts +7 -0
- package/src/fulfillment/omnipack/omnipackStatusVocabulary.ts +103 -0
- package/src/fulfillment/omnipack/omnipackWebhookPayload.ts +73 -0
- package/src/fulfillment/omnipack/productSyncMappers.ts +74 -0
- package/src/fulfillment/omnipack/providerError.ts +64 -0
- package/src/fulfillment/omnipack/trackingReferences.ts +77 -0
- package/src/fulfillment/paidFulfillmentRecovery.ts +252 -0
- package/src/fulfillment/paidHandoff.ts +122 -0
- package/src/fulfillment/paidHandoffPorts.ts +21 -0
- package/src/fulfillment/postgresDeliveryAlignment.ts +14 -0
- package/src/fulfillment/postgresDispatchStore.ts +55 -0
- package/src/fulfillment/postgresEvidenceReadPort.ts +59 -0
- package/src/fulfillment/postgresPaidFulfillmentRecovery.ts +29 -0
- package/src/fulfillment/postgresPaidHandoffStore.ts +11 -0
- package/src/fulfillment/postgresShipmentSpine.ts +321 -0
- package/src/fulfillment/postgresStockSyncPort.ts +65 -0
- package/src/fulfillment/productReconciliationEvidenceHandler.ts +64 -0
- package/src/fulfillment/providerCapabilities.ts +18 -0
- package/src/fulfillment/providerCommandLedger.ts +53 -0
- package/src/fulfillment/providerDispatchAcceptance.ts +31 -0
- package/src/fulfillment/providerDispatchError.ts +7 -0
- package/src/fulfillment/providerDispatchWorker.ts +131 -0
- package/src/fulfillment/providerProductSyncWorker.ts +154 -0
- package/src/fulfillment/providerReconciliationError.ts +20 -0
- package/src/fulfillment/providerReconciliationTerminalSkip.ts +8 -0
- package/src/fulfillment/providerReconciliationTimestamp.ts +34 -0
- package/src/fulfillment/providerReconciliationWorker.ts +150 -0
- package/src/fulfillment/providerStockAvailability.ts +60 -0
- package/src/fulfillment/providerStockSyncWorker.ts +222 -0
- package/src/fulfillment/providerTrackingReferences.ts +31 -0
- package/src/fulfillment/replacementRefusals.ts +43 -0
- package/src/fulfillment/replacementShipmentHandler.ts +47 -0
- package/src/fulfillment/schemaCapabilities.ts +7 -0
- package/src/fulfillment/shipmentsOverviewHandler.ts +73 -0
- package/src/fulfillment/statusMap.ts +2 -0
- package/src/fulfillment/trackingProgress.ts +1 -0
- package/src/fulfillment/verifiedIngress.ts +80 -0
- package/src/payments/stripe/index.ts +30 -0
- package/src/payments/tpay/index.ts +36 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,216 @@ in the source repository.
|
|
|
10
10
|
|
|
11
11
|
## [Unreleased]
|
|
12
12
|
|
|
13
|
+
## [0.22.0]
|
|
14
|
+
|
|
15
|
+
- Publishable on the npm `latest` dist-tag as `0.22.0`, from tag
|
|
16
|
+
`openlup-platform-v0.22.0`.
|
|
17
|
+
|
|
18
|
+
- Add eleven experimental reference-application support exports on the existing payment vendor subpaths. Reuse contributed execution, readback, mapping and diagnostic helpers; preserve the no-charge error class identity. Neutral payment exports and default activation remain unchanged.
|
|
19
|
+
|
|
20
|
+
Migration: none.
|
|
21
|
+
|
|
22
|
+
### Opt-in warehouse fulfillment example
|
|
23
|
+
|
|
24
|
+
Add the experimental, opt-in warehouse fulfillment entry described in the README behind the frozen neutral fulfillment ports: explicit injected I/O, prepared-byte binding, closed evidence, token observations and positive readback. Default-off; account readiness is host-owned. Exact absence, label create/void and cancellation remain unsupported.
|
|
25
|
+
|
|
26
|
+
Missing or malformed evidence refuses before credential resolution or HTTP.
|
|
27
|
+
|
|
28
|
+
Migration: none
|
|
29
|
+
|
|
30
|
+
### Offline warehouse fulfillment conformance
|
|
31
|
+
|
|
32
|
+
Prove the opt-in warehouse fulfillment entry described in the README with M08's offline conformance runner using injected
|
|
33
|
+
HTTP and synthetic fixtures. Cover dispatch replay and refusals, observation,
|
|
34
|
+
readback, stock and product sync, plus real-worker host-ledger fences after
|
|
35
|
+
restart and retention eviction. No provider-account or activation proof is claimed.
|
|
36
|
+
|
|
37
|
+
Migration: none
|
|
38
|
+
|
|
39
|
+
### Fulfillment contracts and status canon
|
|
40
|
+
|
|
41
|
+
Add experimental `fulfillment` and type-only `fulfillment/contracts` entries with
|
|
42
|
+
contributed status decisions, strict core parser bindings, concrete provider/store
|
|
43
|
+
ports and injected default-off capabilities. No adapter, executor, route or default
|
|
44
|
+
profile is activated; existing reference integrations remain unchanged.
|
|
45
|
+
|
|
46
|
+
Declared adaptation: empty or absent provider selection is a typed refusal in the
|
|
47
|
+
new package, rather than the donor host's implicit simulator alias. The donor alias
|
|
48
|
+
remains an open owner follow-up; this contribution does not change donor logic.
|
|
49
|
+
Private provider trace columns and registry/environment values are excluded from
|
|
50
|
+
the neutral package; persisted command fingerprints and opaque host keys are retained.
|
|
51
|
+
|
|
52
|
+
Migration: none (new surface; no existing reference behavior changes).
|
|
53
|
+
|
|
54
|
+
### Fulfillment paid handoff and fenced dispatch
|
|
55
|
+
|
|
56
|
+
Add the paid outbox handler/recovery classifier, injected dispatch worker and
|
|
57
|
+
separate durable command-ledger protocol through the new fulfillment entry.
|
|
58
|
+
Preserve one contact remap, opaque host keys, actual-command fingerprints,
|
|
59
|
+
readback/attempt/begin order and local accepted-proof repair without another POST.
|
|
60
|
+
Provider/money/inventory authority remains injected; no SQL, route or activation.
|
|
61
|
+
|
|
62
|
+
Approved port amendment G14 adds recordProviderAttempt to the new
|
|
63
|
+
FulfillmentStorePort. It records only sanitized prepared DispatchEvidence plus
|
|
64
|
+
mode/recorded status and opaque references, after authoritative claim readback;
|
|
65
|
+
same-key replay writes no second attempt and contact remap retains its own key.
|
|
66
|
+
No new named export or subpath is added by this method. Other contracts are unchanged.
|
|
67
|
+
|
|
68
|
+
Correctable draft re-claim must refresh fingerprint and evidence atomically.
|
|
69
|
+
Store conformance and native durability/fencing and SQL proofs remain later work.
|
|
70
|
+
|
|
71
|
+
Migration: none (new surface; contracts and orchestration land in one release).
|
|
72
|
+
|
|
73
|
+
### Fulfillment observation and sync workers
|
|
74
|
+
|
|
75
|
+
Add neutral observation effects, verified ingress, observation reconciliation,
|
|
76
|
+
tracking, stock/product sync, read-only evidence handlers and the offline
|
|
77
|
+
runFulfillmentAdapterConformance at the existing fulfillment entry.
|
|
78
|
+
|
|
79
|
+
Migration: approved G15 extends the unreleased SyncCursor with optional
|
|
80
|
+
coverageGapSkus (legacy absence reads as []). Only consecutive succeeded runs
|
|
81
|
+
confirm a reservation coverage gap; running/failed cursors clear the set.
|
|
82
|
+
Migration: approved G16 changes readLocalInventoryStock(requestedAt) to typed
|
|
83
|
+
unaggregated lines with skuRef, quantity balances, fulfillable, locationStatus,
|
|
84
|
+
lotStatus and expiresAt. The worker filters/sums at the captured clock; expiry
|
|
85
|
+
exactly then is excluded. Inventory authority and the provider stock-sync shape
|
|
86
|
+
are unchanged.
|
|
87
|
+
Migration: approved G17 adds inline localPersistence: ingress records eventKey
|
|
88
|
+
receipts preserving firstReceivedAt and marks processing idempotently;
|
|
89
|
+
reconciliation reads local status/latestStatusOccurredAt/handedOverAt. No named
|
|
90
|
+
persistence type is exported. Durable replay and processing remain host obligations.
|
|
91
|
+
A superseding conflict returns superseded but persists only processed status,
|
|
92
|
+
without a dedicated superseded-reason field.
|
|
93
|
+
|
|
94
|
+
Correlated ingress requires a nonblank observation or dispatch external reference
|
|
95
|
+
before acceptance/status/effects/processed mark; failure leaves the receipt
|
|
96
|
+
unprocessed. Stock-contention annotation is best-effort before the original stock
|
|
97
|
+
failure is rethrown; recovered-picked receipt diagnostics remain typed. Effects
|
|
98
|
+
retain stock → handover → tracking → invoice and callback/throw order.
|
|
99
|
+
Reconciliation fails the run on unknown readback and projects unmapped correlation
|
|
100
|
+
evidence before host calls. Product evidence reads retain safe authorization/read
|
|
101
|
+
refusal detail. Private codecs, keys, carrier URLs and provider errors stay
|
|
102
|
+
host-owned; typed evidence replaces raw payload pass-through. The conformance
|
|
103
|
+
runner accepts adapter-owned offline subjects and returns sanitized evidence;
|
|
104
|
+
fixture checks do not establish durable store atomicity or arrival alignment.
|
|
105
|
+
|
|
106
|
+
### Fulfillment native persistence and delivery alignment
|
|
107
|
+
|
|
108
|
+
Add native shipment, evidence, stock, recovery, dispatch, paid-handoff and
|
|
109
|
+
alignment stores through the existing fulfillment entry. Sparse migration
|
|
110
|
+
projections bind native units 5/27/51/73/74; install the complete catalogue.
|
|
111
|
+
Coverage-gap cursor state and received/status/processed evidence are
|
|
112
|
+
durable, while local inventory lines and contact preparation remain explicit
|
|
113
|
+
host inputs. Native 3pl acceptance uses a dispatch evidence receipt and preserves
|
|
114
|
+
the cancellation fence without inventing an owned label or physical packing.
|
|
115
|
+
|
|
116
|
+
Native admission: overdue-delivery admission guards only NEW cycle
|
|
117
|
+
admission/insert, matching the donor's guard_cycle_insert. Existing-cycle retries
|
|
118
|
+
through renewal operations and dunning bypass admission and neither mint nor
|
|
119
|
+
consume a one-use receipt. No retry_scheduled state or payments lifecycle change is
|
|
120
|
+
introduced. Native continuity requires the complete canonical migration graph,
|
|
121
|
+
real-PostgreSQL installation, replay and access-control checks.
|
|
122
|
+
|
|
123
|
+
### Fulfillment operator lifecycle and customer delay projection
|
|
124
|
+
|
|
125
|
+
Add host-owned operator and replacement handlers through the fulfillment entry.
|
|
126
|
+
Mutation callbacks require actor attribution and idempotency keys; the host owns
|
|
127
|
+
atomic replay receipts and replacement eligibility, reservation and hold effects.
|
|
128
|
+
Native bindings return a shared typed unsupported refusal without writing.
|
|
129
|
+
Customer delay projection keeps absent cases distinct, hides aligned history
|
|
130
|
+
when the schedule advances and never presents manual review as protection.
|
|
131
|
+
Label helpers preserve transient downloads and cleanup uncertainty. Current
|
|
132
|
+
parcel helpers retain sequence selection and companion attribution. These
|
|
133
|
+
exports mount no route, dispatch no parcel and attest no replacement arrival.
|
|
134
|
+
|
|
135
|
+
### Fulfillment commerce reads and recorded progress
|
|
136
|
+
|
|
137
|
+
Add host-owned commerce list/detail projections, a shipments overview handler and
|
|
138
|
+
typed read callbacks. Projected payment status passes through unchanged and
|
|
139
|
+
native reads return the shared unsupported refusal. Preserve opaque host overview
|
|
140
|
+
buckets and the legacy shipment-status facade. Progress completion requires
|
|
141
|
+
recorded milestones and uses the host-resolved customer step.
|
|
142
|
+
|
|
143
|
+
### Fulfillment internal simplification
|
|
144
|
+
|
|
145
|
+
Reuse the empty stock-balance constructor in aggregation and sync, and append to
|
|
146
|
+
private recovery groups without copying each growing array. Fulfillment results,
|
|
147
|
+
public contracts, key bytes and effect order remain unchanged.
|
|
148
|
+
|
|
149
|
+
### Fulfillment service composition and preparation
|
|
150
|
+
|
|
151
|
+
Add explicit default-off fulfillment services, a structural contribution and an
|
|
152
|
+
inert reference preparation binding. Authoritative source edits and redacted
|
|
153
|
+
context synchronization share the native dispatch and shipment locks. Missing
|
|
154
|
+
preparation refuses readiness. No route, schedule, renewal wrapper or automatic
|
|
155
|
+
dispatch is activated.
|
|
156
|
+
|
|
157
|
+
### Fulfillment presentation ownership
|
|
158
|
+
|
|
159
|
+
The status canon, actual-evidence tracking progress, current-parcel selection and
|
|
160
|
+
canonical fact parsers belong to `@openlup/core/fulfillment`. Platform keeps thin
|
|
161
|
+
compatibility re-exports and preserves its existing narrowed fact type names.
|
|
162
|
+
Fulfillment contracts re-export the shared status and progress types from core.
|
|
163
|
+
Server orchestration remains in platform. Browser code, including the host
|
|
164
|
+
status, fact and current-parcel facades and the account order views, imports
|
|
165
|
+
these helpers from core, so no browser graph loads the platform fulfillment
|
|
166
|
+
runtime.
|
|
167
|
+
|
|
168
|
+
Migration: existing platform imports remain valid; no application or schema
|
|
169
|
+
migration is required. Core exposes narrowed fact aliases with a `Canonical`
|
|
170
|
+
prefix while its generic fact exports retain their names.
|
|
171
|
+
|
|
172
|
+
Migration: upgrade core, outbox and platform together from `0.21.0` to `0.22.0` for exact peer pins. Install the complete canonical native migration chain through units 73/74 (`20261022080000_fulfillment_command_ledger.sql` and `20261022090000_fulfillment_delivery_alignment.sql`), never the sparse package projections alone. Before, these fulfillment services were host-owned; after, explicitly compose selected ports and default-off services. Nothing mounts routes, schedules dispatch or composes the native renewal runner automatically. Keep native alignment off or shadow until the G23 decorator is composed. Arrival alignment remains once and later-only; undelivered replacements remain outstanding, and replacement confirmation must only record actual customer arrival. Preserve G15–G17 cursor, receipt and local-status persistence when implementing host stores. An application rollback does not reverse the forward migrations; older runners refuse the extended ledger.
|
|
173
|
+
|
|
174
|
+
### Known limitations
|
|
175
|
+
|
|
176
|
+
- Portable dunning repair has no managed twin: exhaustion still pauses active subscriptions there; retaining active status needs a managed forward.
|
|
177
|
+
- D8-1: native advisory v2 promo-code candidates/rejection details unavailable.
|
|
178
|
+
- D8-2: native mounted v2 issue/honor/fallback unavailable.
|
|
179
|
+
- D8-3: native acquisition-only mounted issuance/honor unavailable.
|
|
180
|
+
- D8-4: full native/managed eligibility equivalence unavailable.
|
|
181
|
+
- Bundle-1: independent DB human-only actor-kind enforcement absent natively; first in the native-backend parity round.
|
|
182
|
+
- Bundle-2: managed-equivalent actor-kind/email history absent natively.
|
|
183
|
+
- Bundle-3 closes injected-reader M05 mounted admin/feed readback only. Native new-purchase stock read absent despite P5a installed-store proof; deferred second after bundle-1 (owner 2026-10-21); readiness refuses.
|
|
184
|
+
- Bundle-4: incumbent real-PostgreSQL contention only; no exactly-once guarantee.
|
|
185
|
+
- Managed schema/pgTAP retain `44.404`; removal needs owner decision/forward; reference composition supplies it to app code.
|
|
186
|
+
- A1 offline only; account/hosted-time/owner TEST evidence unclaimed; `communications/klaviyo` verification-pending.
|
|
187
|
+
- M05 omitted opt-ins preserve defaults/outputs/read order/schedules/refusals/acceptance-token bytes/SQL.
|
|
188
|
+
- Native inventory adjustment unavailable; address writes refuse readiness. Flat-rate save needs selected port/Core readiness/applied-seed observation.
|
|
189
|
+
- Native shipping audit unavailable; handler swallows best-effort audit failure.
|
|
190
|
+
- Native flat-rate integer bounds (0 through host maximum; reference 100,000 minor units) use request schema, not DB CHECK.
|
|
191
|
+
- Managed ATP/forecast/dated-supply/pagination readback unproved/pending M06.
|
|
192
|
+
- Managed two-session locks/concurrency/uncovered compensation unproved/pending M06.
|
|
193
|
+
- Managed exact-prefix upgrade/ledger unproved/pending M06.
|
|
194
|
+
- Managed address idempotency/conflict/readback unproved/pending M06.
|
|
195
|
+
- Managed successful flat-rate read/save unproved/pending host authority.
|
|
196
|
+
- M06 stock-wait lifecycle/durable timing/staging controls retain C5/C6; busy/try-gate, continuity/flag/TTL transfers are dispositions, not PASS.
|
|
197
|
+
- Shipping national-registry fields/locale-specific `canonicalAddressKey` fold await M16 host market pack/key migration; reference shipping copy stays locale-specific until M16.
|
|
198
|
+
- Native durable prepared storage, method setup, absence reopen and cumulative refunds unavailable; no production installation parity claimed.
|
|
199
|
+
- Typed refusal-envelope forwarding unavailable (`failureReason` only); reusable registration needs host ownership resolution.
|
|
200
|
+
- Incomplete chargebacks stay refunds/unapplied: reclassification bypasses evidence validation into dispute apply; limited operator recovery.
|
|
201
|
+
- Audit compatibility still detects `chargeId`; refund operation identity/original money supply no typed charge identity.
|
|
202
|
+
- M07 follow-up: repair poll can clear host redirect; post-timeout verify never restarts polling; unlocalized poller; fixture builds/never calls handler.
|
|
203
|
+
- M07 follow-up: reference status route wrong-rail witness.
|
|
204
|
+
- M07 follow-up: explicit reference-route refusal for unsupported method setup.
|
|
205
|
+
- M07 follow-up: deployment-neutral disabled-verify reason.
|
|
206
|
+
- M07 follow-up: reference card normalizer missing-amount path; package settling evidence already requires positive money.
|
|
207
|
+
|
|
208
|
+
- Native delivery alignment stays off or shadow until a host composes the native automatic-renewal runner with the G23 renewal admission decorator. The decorator alone neither composes nor activates the runner.
|
|
209
|
+
- The core fulfillment status map carries localized adopter labels; replace them with host-injected labels or internationalization keys before any stable-framework claim.
|
|
210
|
+
- The warehouse adapter example is opt-in and has offline conformance only; no provider-account proof or activation is established. Exact absence, label create/void and cancellation remain unsupported.
|
|
211
|
+
- After an alignment extension, a deferred renewal operation at the old schedule remains claimed with no reader or reservation effect. Changed terms snapshots conflict under the existing snapshot-conflict rules.
|
|
212
|
+
|
|
213
|
+
Native parity remains host-owned at these seams. Missing native bindings use the shared `FULFILLMENT_NATIVE_UNSUPPORTED` refusal; no partial write or parity claim is implied.
|
|
214
|
+
|
|
215
|
+
| Amendment | Host-owned seam and native boundary |
|
|
216
|
+
| --- | --- |
|
|
217
|
+
| G18 | Replacement creation and atomic eligibility/replay receipts; native replacement callback refuses. |
|
|
218
|
+
| G19 | Operator mutations, actor attribution and replay receipts; native mutation callbacks refuse. |
|
|
219
|
+
| G20 | Customer alignment rows; native reader refuses, while the pure delay projection remains callable. |
|
|
220
|
+
| G21 | Commerce list/detail and shipments overview; native read callbacks refuse. |
|
|
221
|
+
| G22 | Authoritative preparation edits, authorization and replay receipts; missing preparation binding refuses before dispatch, after disabled/selection/readiness checks. |
|
|
222
|
+
|
|
13
223
|
## [0.21.0]
|
|
14
224
|
|
|
15
225
|
- Publishable on the npm `latest` dist-tag as `0.21.0`, from tag
|
|
@@ -167,50 +377,3 @@ projections as an installation chain.
|
|
|
167
377
|
`canonicalAddressKey` retains a locale-specific character fold. M16 owns their
|
|
168
378
|
move behind a host-supplied market pack with a canonical-key migration plan.
|
|
169
379
|
- Reference shipping UI copy remains locale-specific until M16.
|
|
170
|
-
|
|
171
|
-
## [0.19.0]
|
|
172
|
-
|
|
173
|
-
- Publishable on the npm `latest` dist-tag as `0.19.0`, from tag
|
|
174
|
-
`openlup-platform-v0.19.0`.
|
|
175
|
-
|
|
176
|
-
### 0.18.0 → 0.19.0 set scope
|
|
177
|
-
|
|
178
|
-
- Prepare the complete development-preview minor set at `0.19.0`, including everything on main since `0.18.0`; core and outbox are unchanged republications, and UI stays private `0.0.0`.
|
|
179
|
-
- M05 parity adds opt-in shipping-promise consent, post-discount threshold shipping and acquisition orchestration to the experimental pricing, promotions and shipping entries; financial policy and acquisition capability remain host supplied.
|
|
180
|
-
- M05 parity adds effective native bundle selection and an authoritative preview hook, optional resolved-target/detail/feed context fields and `selectEffectiveBundleTargetPrice`; effective feeds require unambiguous gross unit anchors and whole-BOM readiness.
|
|
181
|
-
- Add `createConcurrentCommercePriceAuthorityPort` with concurrent history scheduling, selected-list identity and base-refusal precedence; browser additions are type-only.
|
|
182
|
-
- Catalog/contracts draft canonical JSON detects lone surrogates without regex lookbehind so it loads in Safari before 16.4, with unchanged behavior.
|
|
183
|
-
- M06 P5a adds explicit inventory store/provider bindings and structural inventory contribution, keeping reference catalog-stock composition inert and managed authorization intact; native new-purchase stock reads remain unsupported pending an owner decision and native adjustment still refuses.
|
|
184
|
-
- M06 P5a retains focused installed-consumer, runtime-role, managed FEFO/adjustment and consume/refund replay evidence with unproved parity gates retained in the M06 ledger.
|
|
185
|
-
- M06 P5b adds opt-in shipping selection, address and flat-rate bindings with injected validation and authority; native address writes remain unsupported and refuse required readiness.
|
|
186
|
-
- M06 P5b adds the final isolated installed inventory/shipping consumer, preserving incumbent selection errors and flat-rate behavior.
|
|
187
|
-
- M06 in progress: inventory and shipping entries are early surfaces; module not complete
|
|
188
|
-
- Supporting main changes sort platform registration lists one item per line and use the database clock in the M05 P7 quote witness; neither adds runtime behavior.
|
|
189
|
-
|
|
190
|
-
Migration: upgrade the complete `@openlup/*` set from `0.18.0` to `0.19.0` for exact internal pins; existing bindings need no change and new module adoption remains explicit and experimental. Hosts selecting shipping promises must forward `shippingTerms` through both acceptance callbacks and use a context schema that preserves the selected terms. Bind `resolveQuoteShippingPromotions` to the promotions factory to select the bounded two-pass threshold path; financial policy and acquisition capability remain host supplied. The additive APIs require a minor set and introduce no activation. For both M05 24b and M06 P5b, the pricing and promotions API reports reorder existing enum/union members because declaration emit order changed (24b follows the catalog-to-pricing import); no member is added, removed or changed and callers need no migration for that reorder. Install the complete canonical migration catalogue, never sparse package projections as an installation chain; this preparation adds no SQL migration.
|
|
191
|
-
|
|
192
|
-
### Known limitations
|
|
193
|
-
|
|
194
|
-
- D8-1: native advisory v2 promo-code candidates and rejection details are not supported on the native backend.
|
|
195
|
-
- D8-2: native mounted v2 code issue/honor/fallback is not supported on the native backend.
|
|
196
|
-
- D8-3: acquisition-only mounted issuance/honor is not supported on the native backend.
|
|
197
|
-
- D8-4: full native/managed eligibility equivalence is not supported on the native backend.
|
|
198
|
-
- Bundle-1: independent database human-only actor-kind enforcement is not supported on the native backend and is the first item of a future native-backend parity round.
|
|
199
|
-
- Bundle-2: managed-equivalent actor-kind/email history is not supported on the native backend.
|
|
200
|
-
- Bundle-3 remains closed for M05 mounted admin/feed readback with an injected stock reader, while native new-purchase stock reads remain unsupported despite P5a's installed native inventory-store read proof.
|
|
201
|
-
- Bundle-4 establishes only incumbent real-PostgreSQL contention characterization and provides no exactly-once guarantee.
|
|
202
|
-
- The managed baseline schema and its pgTAP tests retain the incumbent legacy value `44.404`; removing it needs a forward migration and an owner decision, while reference composition supplies that value to application code.
|
|
203
|
-
- A1 evidence is offline only: account verification, hosted-time behaviour and owner TEST certification are not claimed, and the `communications/klaviyo` adapter's capabilities stay verification-pending.
|
|
204
|
-
- M05 parity seams are opt-in and omitted bindings preserve incumbent defaults, outputs, read order, scheduling, refusals, acceptance-token bytes and exported SQL.
|
|
205
|
-
- Native inventory adjustment remains unsupported; native address writes and flat-rate saves refuse required-capability readiness.
|
|
206
|
-
- M06 managed host ATP/forecast/supply/pagination, remaining compensation/concurrency/lock-order, exact-prefix upgrade/ledger, address idempotency/conflict/readback and runtime rate authority remain pending in the M06 ledger.
|
|
207
|
-
- M06 adopter stock-wait lifecycle, durable subscription timing and staging control observations retain their separate C5/C6 evidence gates.
|
|
208
|
-
|
|
209
|
-
### Size note
|
|
210
|
-
|
|
211
|
-
Only platform `pack.docs.maxPackedBytes` rises from 40,960 to 49,152 B; all other caps and budgets remain unchanged. All three baselines use integrity-verified published `0.18.0` tarballs.
|
|
212
|
-
|
|
213
|
-
Question (2026-10-21): "The platform package's root docs (README + CHANGELOG) will exceed their 40,960 B gzip cap at the next release. What should we do?"
|
|
214
|
-
Owner's answer: "Raise to 49,152 B (Recommended)"
|
|
215
|
-
Option description shown to the owner: "Same figure as core. Unblocks the next few releases; the CHANGELOG grows every release, so this cap would otherwise block each one."
|
|
216
|
-
Recorded as an owner decision taken through the coordinator's question on 2026-10-21.
|
package/README.md
CHANGED
|
@@ -4,12 +4,12 @@ Development preview. This package is part of the publishable set with core and o
|
|
|
4
4
|
|
|
5
5
|
It holds the runnable server substrate an OpenLup application composes: the Node HTTP runtime, BFF dispatch, scheduling and job leases, blob storage, data gateways, the node-postgres migration runner and bundle composition. Ports and their contracts stay in `@openlup/core/platform-runtime`.
|
|
6
6
|
|
|
7
|
-
For the prepared `0.
|
|
8
|
-
limitations](CHANGELOG.md#
|
|
9
|
-
M06 composition bindings,
|
|
7
|
+
For the prepared `0.22.0` set, read the [adjacent-release migration and known
|
|
8
|
+
limitations](CHANGELOG.md#0220) before selecting the opt-in M05 parity seams or
|
|
9
|
+
M06 composition bindings, the M07 payment selectors, or M08 fulfillment services. Native delivery alignment stays off or shadow until a host composes its automatic-renewal runner with the G23 admission decorator. M07 payment truth is complete for this wave; its selectors are default-off. M06 remains incomplete: inventory and shipping entries
|
|
10
10
|
are development-preview surfaces, with managed-host proof classes pending in the
|
|
11
11
|
[M06 parity ledger](../../docs/platform/plans/oss-m06-stock-reservations-delivery.md#parity-pending-rows).
|
|
12
|
-
The size gate compares the prepared `0.
|
|
12
|
+
The size gate compares the prepared `0.22.0` set with the published `0.21.0` tarball;
|
|
13
13
|
preparation, offline adapter evidence and a passing size cap grant no publication
|
|
14
14
|
or provider-account certification.
|
|
15
15
|
|
|
@@ -34,7 +34,9 @@ or provider-account certification.
|
|
|
34
34
|
| `./communications/contracts` | Pure renderer, block builders, copy-injected commerce/subscription factories and email/newsletter/Auth/intake/receipt types; no Zod, Node or provider runtime imports |
|
|
35
35
|
| `./payments/stripe` | Opt-in Node payment example with an injected structural client, verified observations and purpose-sensitive readback; no SDK dependency or default activation. |
|
|
36
36
|
| `./payments/tpay` | Opt-in Node payment example with injected HTTP/certificate I/O, Model O aliases and verified observations; no default activation. |
|
|
37
|
+
| `./fulfillment/omnipack` | Opt-in Node fulfillment example with injected I/O; default-off. |
|
|
37
38
|
| `./payments` | Experimental prepared-attempt ordering with injected persistence, execution and failure policy; contracts at `./payments/contracts`. |
|
|
39
|
+
| `./fulfillment`, `./fulfillment/contracts` | [Experimental fulfillment services, contracts and status canon](../../docs/platform/ARCHITECTURE_AND_EXTENSIONS.md#fulfillment-contracts). |
|
|
38
40
|
| `./inventory` | Experimental schemas/ports, handlers, native stores, projection, injected forecast and SQL descriptor; `./inventory/contracts` DTOs. |
|
|
39
41
|
| `./catalog` | Experimental neutral catalog schemas, drafts, reads, media source packs and publication ports |
|
|
40
42
|
| `./catalog/contracts` | Dependency-free catalog DTOs, media resolver, authority and canonicalization helpers |
|
|
@@ -1218,3 +1220,24 @@ provenance and failure prose stay absent. Payer, authorization, certificates and
|
|
|
1218
1220
|
raw bodies never enter the evidence; audit facts do not affect event identity or
|
|
1219
1221
|
fingerprints. The offline M07 P2 conformance witness uses two distinct intents,
|
|
1220
1222
|
attempts, amounts and provider references, with replay and refusal boundaries.
|
|
1223
|
+
|
|
1224
|
+
### Reference-support surface
|
|
1225
|
+
|
|
1226
|
+
The vendor subpaths additionally expose these experimental helpers for the
|
|
1227
|
+
reference application's existing host bindings. Each declaration names its exact
|
|
1228
|
+
reference consumer and carries `@experimental`: Reference-application support
|
|
1229
|
+
surface; may change.
|
|
1230
|
+
|
|
1231
|
+
| Entry | Additional exports |
|
|
1232
|
+
| --- | --- |
|
|
1233
|
+
| `@openlup/platform/payments/stripe` | `createStripeSandboxPaymentExecutionAdapter`, `createStripePaymentReconciliationProvider`, `mapStripeIntent`, `mapSetupIntent`, `normalizeStripeFailureEvidence` |
|
|
1234
|
+
| `@openlup/platform/payments/tpay` | `createTpayPaymentExecutionAdapter`, `createTpayPaymentReconciliationProvider`, `createTpayHttpClient`, `normalizeTpayFailureEvidence`, `aliasValue`, `ProviderAttemptPreDispatchError` |
|
|
1235
|
+
|
|
1236
|
+
Types are inferred from those functions; no extra type export or neutral payment
|
|
1237
|
+
entry is added. These are the existing contributed implementations, including
|
|
1238
|
+
rich execution, recovery and filtered audit carriers. The host still owns SDK
|
|
1239
|
+
construction, environment/feature flags, callback/return presentation, account
|
|
1240
|
+
readiness and simulator composition. Its prepared-attempt facade re-exports the
|
|
1241
|
+
same error class so `instanceof` preserves the no-charge trust boundary.
|
|
1242
|
+
The M07 factories' neutral envelopes and capability limits remain unchanged;
|
|
1243
|
+
reference-support availability establishes no provider activation or stable API.
|
|
@@ -5,6 +5,9 @@ interface PaymentServices {
|
|
|
5
5
|
}
|
|
6
6
|
type Env = Record<string, string | undefined>;
|
|
7
7
|
export interface PlatformBundlePorts {
|
|
8
|
+
fulfillment?: {
|
|
9
|
+
runDispatch(): Promise<unknown>;
|
|
10
|
+
} | null;
|
|
8
11
|
payments?: PaymentServices | null;
|
|
9
12
|
http: HttpRuntimePort | null;
|
|
10
13
|
scheduler: SchedulerPort | null;
|
|
@@ -25,6 +28,10 @@ export interface PlatformBundle {
|
|
|
25
28
|
* transactional binder also receives the bundle's data capability.
|
|
26
29
|
*/
|
|
27
30
|
export interface PlatformBundleBinders {
|
|
31
|
+
/** Explicit host selection only; no default binder. */
|
|
32
|
+
fulfillment?: (env: Env) => {
|
|
33
|
+
runDispatch(): Promise<unknown>;
|
|
34
|
+
} | null;
|
|
28
35
|
/** Explicit host selection only; no default payment executor. */
|
|
29
36
|
payments?: (env: Env) => PaymentServices | null;
|
|
30
37
|
/**
|
|
@@ -39,6 +39,8 @@ export function createBundleComposer(binders = {}) {
|
|
|
39
39
|
analytics: binders.analytics?.(capabilities.analytics, env) ?? null,
|
|
40
40
|
transactional: binders.transactional?.(capabilities.transactional, capabilities.data, env) ?? null,
|
|
41
41
|
};
|
|
42
|
+
if (binders.fulfillment)
|
|
43
|
+
ports.fulfillment = binders.fulfillment(env);
|
|
42
44
|
if (binders.payments)
|
|
43
45
|
ports.payments = binders.payments(env);
|
|
44
46
|
ports.scheduler = binders.scheduler?.(capabilities.scheduler, env) ?? null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Contribution, RequiredSchema } from '@openlup/core/readiness';
|
|
2
|
+
/** Structural callables keep composition independent of fulfillment implementation types. */
|
|
3
|
+
export declare function createFulfillmentContribution(input: {
|
|
4
|
+
version: string;
|
|
5
|
+
requiredSchema: RequiredSchema;
|
|
6
|
+
fulfillment: Readonly<Record<string, ((...args: never[]) => unknown) | null>>;
|
|
7
|
+
handlers: Contribution['handlers'];
|
|
8
|
+
schedules: Contribution['schedules'];
|
|
9
|
+
routes: Contribution['routes'];
|
|
10
|
+
}): {
|
|
11
|
+
contributions: Contribution[];
|
|
12
|
+
ports: {
|
|
13
|
+
[k: string]: ((...args: never[]) => unknown) | null;
|
|
14
|
+
};
|
|
15
|
+
routes: {
|
|
16
|
+
[k: string]: (...args: never[]) => unknown;
|
|
17
|
+
};
|
|
18
|
+
triggers: {
|
|
19
|
+
[k: string]: (...args: never[]) => unknown;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** Structural callables keep composition independent of fulfillment implementation types. */
|
|
2
|
+
export function createFulfillmentContribution(input) {
|
|
3
|
+
const contribution = {
|
|
4
|
+
manifest: {
|
|
5
|
+
name: '@openlup/platform', version: input.version, kind: 'rail',
|
|
6
|
+
module: { id: 'fulfillment', kind: 'capability', provides: ['./fulfillment'], dependsOn: [] },
|
|
7
|
+
emits: [], handles: input.handlers.map(handler => handler.eventType),
|
|
8
|
+
schedules: input.schedules.map(({ id, cadenceSeconds }) => ({ id, cadenceSeconds })), env: [],
|
|
9
|
+
requiredPorts: Object.keys(input.fulfillment), routes: input.routes.map(route => route.id), requiredSchema: input.requiredSchema,
|
|
10
|
+
},
|
|
11
|
+
handlers: input.handlers, schedules: input.schedules, routes: input.routes,
|
|
12
|
+
};
|
|
13
|
+
return {
|
|
14
|
+
contributions: [contribution],
|
|
15
|
+
ports: Object.fromEntries(Object.entries(input.fulfillment).filter(([, fn]) => typeof fn === 'function').map(([name, fn]) => [`@openlup/platform/fulfillment:${name}`, fn])),
|
|
16
|
+
routes: Object.fromEntries(input.routes.map(route => [`@openlup/platform/fulfillment:${route.id}`, route.handle])),
|
|
17
|
+
triggers: Object.fromEntries(input.schedules.map(schedule => [`@openlup/platform/fulfillment:${schedule.id}`, schedule.run])),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
@@ -4,3 +4,4 @@ export { createNodeHost, type NodeHost, type NodeHostAdmission, type NodeHostDep
|
|
|
4
4
|
export { createCatalogContribution, type CatalogContributionInput } from "./catalogContribution.js";
|
|
5
5
|
export { createInventoryContribution } from "./inventoryContribution.js";
|
|
6
6
|
export { createShippingContribution } from "./shippingContribution.js";
|
|
7
|
+
export { createFulfillmentContribution } from "./fulfillmentContribution.js";
|
|
@@ -5,3 +5,4 @@ export { createNodeHost, } from "./nodeHost.js";
|
|
|
5
5
|
export { createCatalogContribution } from "./catalogContribution.js";
|
|
6
6
|
export { createInventoryContribution } from "./inventoryContribution.js";
|
|
7
7
|
export { createShippingContribution } from "./shippingContribution.js";
|
|
8
|
+
export { createFulfillmentContribution } from "./fulfillmentContribution.js";
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { FulfillmentAdapterConformanceEvidence, FulfillmentAdapterConformanceSubject } from "./contracts/index.js";
|
|
2
|
+
/** Runner-independent offline proof using only adapter-owned fixtures. Throws on a violated contract. */
|
|
3
|
+
export declare function runFulfillmentAdapterConformance(subjects: readonly FulfillmentAdapterConformanceSubject[]): Promise<FulfillmentAdapterConformanceEvidence>;
|