@serve.zone/interfaces 27.2.0 → 27.3.1

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/readme.md CHANGED
@@ -887,6 +887,25 @@ When `validateCorestoreObjectStorageCredentialMaterial()` receives a trusted
887
887
  retention expectation, matching retention evidence is mandatory; missing or
888
888
  different evidence fails validation.
889
889
 
890
+ The runtime export also defines exact Corestore database backup receipts,
891
+ allocation references, restore requests, and restore responses. Use
892
+ `normalizeCorestoreDatabaseAllocationReference()`,
893
+ `encodeCorestoreDatabaseAllocationReference()`, and
894
+ `computeCorestoreDatabaseAllocationReferenceSha256()` for the allocation
895
+ boundary; the receipt, restore-request, and restore-response APIs follow the
896
+ same exact normalize, encode, and SHA-256 naming. They enforce bounded canonical
897
+ JSON without performing a backup or restore. A restore request may carry
898
+ `expectedDatabaseAllocation` so the restore implementation can fence the exact
899
+ scratch allocation, and may carry the caller-owned `restoreAttemptId` to select
900
+ a new fenced idempotency attempt. The attempt ID uses the database-backup
901
+ identifier grammar and 256-character maximum. Omitting the snapshot
902
+ `databaseAllocation` field together with request-level
903
+ `expectedDatabaseAllocation` and `restoreAttemptId` preserves legacy request
904
+ bytes and digests exactly.
905
+ `corestoreDatabaseBackupRuntimeLimits` publishes the distinct 96 MiB snapshot
906
+ payload, one-byte-larger framed snapshot-original, 128 MiB verified closure
907
+ plaintext, and 256 MiB closure boundaries used by Corestore.
908
+
890
909
  ### Legacy Deployment Settlement
891
910
 
892
911
  The Node-only `/runtime` export also provides strict, exact-schema codecs for
@@ -894,7 +913,10 @@ Cloudly legacy deployment settlement plans, production requests, check/apply
894
913
  summaries, stable outcomes, and scratch/production receipts. Authenticated
895
914
  artifacts use domain-separated HMAC inputs and references derived from the full
896
915
  authority-metadata SHA-256; authority-aware normalizers enforce metadata fences
897
- and validity windows and require a consumer-owned, constant-time HMAC verifier.
916
+ and artifact-time validity windows. General authority-aware APIs require a
917
+ consumer-owned, constant-time HMAC verifier; private stdio authority-aware APIs
918
+ derive verification from their exact plaintext authority handoffs. They never
919
+ read the current wall clock.
898
920
  Structural normalizers explicitly do not authenticate MACs. Literal portable
899
921
  golden vectors contain only safe
900
922
  metadata, summaries, digests, and MACs. The separately named
@@ -902,6 +924,61 @@ metadata, summaries, digests, and MACs. The separately named
902
924
  exists only for private maintenance-container interoperability and is never part
903
925
  of a safe result, receipt, or golden summary.
904
926
 
927
+ Fenced settlement contracts add deterministic execution-attempt identities and
928
+ prepared, committed, or aborted observations. Resolution bundles distinguish
929
+ `committed-schema1`, `committed-schema2`, `aborted-prepared`,
930
+ `observed-aborted`, `absent-tombstone`, and `legacy-no-op`; only the scratch-only
931
+ legacy no-op has no durable attempt observation. Source and execution authority
932
+ status are bound to the resolution's `observedAt`. Scratch attempts use the same
933
+ authority for both roles and require matching statuses. Historical verification
934
+ remains possible after expiry because status is derived only from the
935
+ authenticated observation time. Production recovery always uses receipt v2 and
936
+ a distinct execution authority B whose metadata names source authority A and
937
+ binds the authenticated plan, request bundle, and scratch receipt digests.
938
+ B is issued strictly after scratch completion; B's `requestedAt` and
939
+ `approvedAt` are independent of A's request timestamp and must remain within
940
+ B's own validity interval.
941
+
942
+ Consumers make trust decisions through
943
+ `normalizeAuthenticatedCloudlyLegacyDeploymentSettlementResolutionForAuthorities()`,
944
+ `normalizeCloudlyLegacyDeploymentSettlementScratchExecutionBundleForAuthority()`,
945
+ `normalizeCloudlyLegacyDeploymentSettlementProductionExecutionBundleV2ForAuthorities()`,
946
+ `normalizeCloudlyLegacyDeploymentSettlementStdioRequestForAuthorities()`, and
947
+ `normalizeCloudlyLegacyDeploymentSettlementStdioResponseForRequestAuthorities()`.
948
+ Every resolution outcome, including an unapplied outcome, is carried in an
949
+ `IAuthenticatedCloudlyLegacyDeploymentSettlementResolutionV1` recovery
950
+ attestation under the dedicated resolution HMAC domain and signed by the
951
+ execution authority. The raw
952
+ `normalizeCloudlyLegacyDeploymentSettlementResolutionBundleForAuthorities()`
953
+ helper verifies referenced artifacts and status only; its result is not an
954
+ authenticated recovery claim. The non-stdio authority-aware APIs use the
955
+ caller-supplied HMAC verifier and never receive plaintext keys. The private
956
+ stdio variants accept no external verifier: they bind each HMAC to the
957
+ authority reference and key in the corresponding request handoff. Interfaces
958
+ never executes a settlement.
959
+
960
+ The stdio contract exposes nine commands from `settlement-plan` through
961
+ `settlement-production-resolve`. Requests and responses are exact canonical
962
+ JSON followed by one LF, bounded by
963
+ `cloudlyLegacyDeploymentSettlementStdioLimits`, and responses use a
964
+ command-discriminated success payload or a finite secret-safe error. Private
965
+ authority handoffs and MongoDB descriptors belong only on protected request
966
+ transport. Production stdio requests reject equal decoded A and B HMAC keys and
967
+ wipe temporary comparison buffers. The handoff-derived verifier uses HMAC-SHA256
968
+ with constant-time MAC comparison, rejects wrong or swapped handoff keys, and
969
+ wipes temporary decoded key and MAC buffers. Handoffs and derived verifiers are
970
+ private in-process capabilities that must never be persisted or logged and must
971
+ be discarded when the stdio exchange ends. Verifier-only integrations do not
972
+ expose key material to Interfaces, so their callers must enforce the same key
973
+ separation.
974
+ Authority-aware response validation also binds settlement-request
975
+ `requestedAt`, production-authorization `requestedAt` and `approvedAt`, and
976
+ resolution `observedAt` to the corresponding request. Production check and
977
+ apply results must be issued by B no earlier than both A's request and B's
978
+ `approvedAt`. Callers remain responsible for process isolation, key
979
+ destruction, logging discipline, database access, and the actual settlement
980
+ transaction.
981
+
905
982
  Launcher environment delivery uses stable `szsv-<base32-sha256>` Docker
906
983
  resource names and `/run/serve.zone/secrets/<resource>` source paths. The
907
984
  nonsecret map is written to `/run/serve.zone/workloadinit-map-v1.json` with mode
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '27.2.0',
6
+ version: '27.3.1',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }