@serve.zone/interfaces 23.2.0 → 24.1.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/readme.md CHANGED
@@ -30,13 +30,14 @@ import { appstore, data, platform, platformservice, requests } from '@serve.zone
30
30
 
31
31
  This package intentionally has no service implementation logic. It is a stable vocabulary for services that need to agree on payload shape, method names, and response types.
32
32
 
33
- ## Secrets v23 Pre-Cutover Contract
33
+ ## Secrets v24 Pre-Cutover Contract
34
34
 
35
- Version 23 removes the old grouped/bundled secret DTOs and plaintext runtime
36
- material API. Secret values enter Cloudly only as strict SmartCrypto X25519
37
- envelopes or an explicit bounded server-generation request. Coreflow receives a
38
- full digest-verified schema-v2 manifest plus one sealed envelope per pinned
39
- SecretVersion through the Node-only runtime export.
35
+ Version 24 retains the value-free v23 architecture while replacing the remaining
36
+ pre-cutover lifecycle and runtime authority gaps. Secret values enter Cloudly
37
+ only as strict SmartCrypto X25519 envelopes or an explicit bounded
38
+ server-generation request. Coreflow receives a full digest-verified schema-v2
39
+ manifest plus one sealed envelope per pinned SecretVersion through the Node-only
40
+ runtime export.
40
41
 
41
42
  This is a contract release before consumer cutover. It does **not** claim that
42
43
  clean-v2 migration, backup verification, historical secret erasure, or storage
@@ -53,12 +54,24 @@ Breaking removals include:
53
54
  credential references.
54
55
  - Hosted-app control-token identities and credential-bearing bootstrap actions.
55
56
 
56
- Primary v23 additions include:
57
+ The current secret contract includes:
57
58
 
58
- - `TSecretValueInput`, `TSecretIngressRecipient`, the
59
+ - `TSecretValueInput`, active-only `IActiveSecretRecipientMetadata`, the
59
60
  `requests.secret.IReq_GetSecretIngressRecipient` contract with method
60
61
  `getSecretIngressRecipient`, and fixed-order create/rotate/App Store context
61
62
  builders.
63
+ - `ISecretEnvelopeAdmissionBindingV1` under the Node-only runtime export binds
64
+ an exact envelope and request context to one recipient generation. The
65
+ binding is reproducible and does not itself prove admission. Retiring-key
66
+ retries require a trusted Cloudly mutation receipt created atomically while
67
+ that recipient was active; caller-supplied admission or issuance timestamps
68
+ are not part of the contract.
69
+ - `getSecretVersionPurgePreflight` returns bounded advisory reference pages and
70
+ complete blocker counts. `purgeSecretVersion` identifies one exact version
71
+ and fences the mutation by secret, version, and target revisions. The
72
+ non-issuable `purge-pending` lifecycle and revisioned
73
+ `pending`/`erasing`/`failed`/`succeeded` operation keep external erasure
74
+ durable across retries without treating preflight as authorization.
62
75
  - Schema-v2 `IResolvedSecretManifest` contracts, stable Docker resource naming,
63
76
  WorkloadInit map/wrapper helpers, and `ISealedResolvedSecretMaterial` under
64
77
  `@serve.zone/interfaces/runtime`.
@@ -67,7 +80,7 @@ Primary v23 additions include:
67
80
  - Mandatory `IImmutableContainerInvocationV1` evidence on immutable image
68
81
  deployment plans.
69
82
 
70
- ### Secrets v23.1 Runtime Registration And Reporting
83
+ ### Secrets v24 Runtime Registration And Reporting
71
84
 
72
85
  The Node-only `@serve.zone/interfaces/runtime` export adds the live contract
73
86
  that Cloudly must validate before publishing secret-bearing desired state to a
@@ -76,17 +89,38 @@ Coreflow connection:
76
89
  - `getSecretRecipientEnrollmentState` returns either an exact generation-zero
77
90
  empty state or the complete valid recipient set for the cluster derived from
78
91
  the verified JWT.
79
- - `getCoreflowSecretRuntimeRegistrationExpectation` returns the authoritative
80
- live reporter session, target-node set, active recipient, and approved
81
- WorkloadInit artifacts for the cluster derived from the verified JWT.
92
+ - `getCoreflowSecretRuntimeRegistrationExpectation` returns either an
93
+ `available` v2 expectation or an explicit unavailable reason. The available
94
+ expectation binds the live reporter session, active recipient, fresh
95
+ generation-fenced target authority, and active WorkloadInit approval through
96
+ `expectationDigest`.
97
+ - Spark sends authenticated, sequenced local Swarm membership observations and,
98
+ on managers, complete manager snapshots. Cloudly derives scope from the Spark
99
+ credential, reconciles manager consensus privately, and publishes one fresh
100
+ single-Swarm target authority or a targetless unavailable state. Structural
101
+ contract validation does not itself establish manager consensus.
102
+ - `TSparkSwarmObservationV2` lets workers report only their local Swarm node ID,
103
+ because Docker does not expose the Swarm cluster ID to workers. Cloudly may
104
+ associate that node with a cluster only through authenticated node scope and
105
+ accepted manager consensus. V2 is a producer contract only until a later
106
+ consumer release defines transport, replay handling, and activation.
107
+ `validateSparkSwarmObservationV2` validates the exact structure and any
108
+ attached manager snapshot; it does not establish consensus or runtime
109
+ authority.
110
+ - WorkloadInit approval binds a clean stable release identity, version-tagged
111
+ OCI index, exact amd64 and arm64 platform/executable digests, policy
112
+ generation, and a Cloudly summary of detached Cosign DSSE/SLSA verification.
113
+ Public shape and digest validators do not verify the signature, public-key
114
+ trust root, or private Cloudly policy.
82
115
  - `coreflowSecretRuntimeRegistrationTagId` is the sole dedicated TypedSocket
83
116
  tag identifier. Its payload is exactly
84
- `ICoreflowSecretRuntimeRegistrationV1`; cluster scope comes from the verified
117
+ `ICoreflowSecretRuntimeRegistrationV2`; cluster scope comes from the verified
85
118
  connection identity rather than the tag.
86
- - `ICoreflowSecretRuntimeRegistrationV1` binds a reporter session to the exact
87
- authoritative schedulable target-node set, required secret capabilities,
88
- active recipient, approved WorkloadInit OCI index, and exact per-platform
89
- manifest and installed-executable digests.
119
+ - `ICoreflowSecretRuntimeRegistrationV2` references the exact expectation,
120
+ target generation/digest, and WorkloadInit authority. It must cover every
121
+ Cloudly-node/Swarm-cluster/Swarm-node identity and approved per-platform
122
+ manifest and installed-executable digest without self-asserting placement or
123
+ approval.
90
124
  - `validateCoreflowSecretRuntimeRegistration` compares the registration with a
91
125
  trusted expectation built by Cloudly, including the live reporter session.
92
126
  Missing, extra, duplicate, reordered, or mismatched node evidence fails
@@ -410,6 +444,8 @@ Common data contracts include:
410
444
  aggregate owner fence, while
411
445
  `setServiceSecretSetAttachments` returns the independent
412
446
  `secretConfigurationRevision`. Generic service writes own neither revision.
447
+ Purge is a separate exact-version mutation with its own version revision and
448
+ durable operation; it is not a logical-secret lifecycle action.
413
449
  - Mail gateway contracts for domain authorities, address bindings, WorkApp bindings, managed SMTP/API credentials, spool items, delivery journals, and inbound/outbound message payloads.
414
450
  - Service-level mail configuration through `IService.data.mail`, including per-address inbound `smtpForward` settings and outbound credential metadata. Cloudly settings include dcrouter gateway, SMTP submission, and inbound forward-target keys for reconciling those bindings.
415
451
  - Web Push contracts for environment-specific service bindings, public credential state, public VAPID key rotation metadata, privacy-minimal notification signals, and redacted delivery state. Subscription endpoints, browser key material, provider ciphertext, VAPID private keys, and credential secrets are intentionally absent from public binding and status DTOs.
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '23.2.0',
6
+ version: '24.1.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  }
@@ -5,7 +5,7 @@ import {
5
5
  validateSecretValueInputForRecipient,
6
6
  type TSecretDelivery,
7
7
  type TSecretGeneratedEncoding,
8
- type TSecretIngressRecipient,
8
+ type IActiveSecretRecipientMetadata,
9
9
  type TSecretValueInput,
10
10
  } from '../data/secret.js';
11
11
  import {
@@ -511,7 +511,7 @@ export const validateAppStoreEnvironmentDeclarations = (
511
511
  export const validateAppStoreInstallRequest = async (
512
512
  requestArg: unknown,
513
513
  configArg: IAppStoreVersionConfig,
514
- activeIngressRecipientArg: TSecretIngressRecipient,
514
+ activeIngressRecipientArg: IActiveSecretRecipientMetadata,
515
515
  ): Promise<string[]> => {
516
516
  if (!requestArg || typeof requestArg !== 'object' || Array.isArray(requestArg)) {
517
517
  return ['install request must be an object'];