@serve.zone/interfaces 32.49.0 → 32.51.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 CHANGED
@@ -1,5 +1,58 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-06 - 32.51.0
4
+
5
+ ### Features
6
+
7
+ - A legacy service's runtime attestation is captured from an administrator's host observation, so
8
+ it no longer needs a fleet Coreflow session or Spark, which legacy hosts do not run.
9
+ `IRequest_Any_Cloudly_CaptureLegacyServiceRuntimeAttestation` now carries `hostObservation`
10
+ (`ILegacyServiceHostObservation`, `data/deploymentlegacyimport.ts`): the Swarm service name, spec
11
+ image and mode (`TLegacyHostSwarmServiceMode`, replicated with its desired replicas, or global),
12
+ and per replica the node hostname, Swarm task id, full container id, the engine's image store
13
+ (`TLegacyHostImageStore`), the container's image id, the image's `RepoDigests`, the container
14
+ state (`TLegacyHostContainerState`) and its health (`TLegacyHostContainerHealth`, `none` when no
15
+ healthcheck applies). `validateLegacyServiceHostObservation` judges its exact shape,
16
+ `selectLegacyServiceHostObservationRootDigest` names the one root every replica runs from the
17
+ service's own repository, and `judgeLegacyServiceHostObservation` judges it against that root as
18
+ Cloudly reads it: exactly the desired replicas of a replicated service, a spec image naming the
19
+ repository by the source tag or the root digest, every replica running and healthy or without a
20
+ healthcheck (`unhealthy` and `starting` are refused), and each container's image id the root
21
+ digest on the containerd image store or a platform image configuration digest of the root on the
22
+ classic store. The source tag need not still name the root.
23
+ `ILegacyServiceRuntimeAttestation.data.runtime` records `evidenceSource`
24
+ (`TLegacyServiceRuntimeEvidenceSource`, `administrator-host-observation`) and the
25
+ `hostObservation` it was built from; `validateLegacyServiceRuntimeAttestation` requires both and
26
+ that `requiredReplicaCount` and `tasks` are the observed desired replicas and Swarm tasks.
27
+ The capture request's `hostObservation` and the record's `evidenceSource`/`hostObservation` are
28
+ new required members, which stays a minor of the one common major 32 because the previous capture
29
+ had no success path on a fleet without a Coreflow session, no shipped store holds an attestation
30
+ record, and Cloudly is the only code consumer.
31
+
32
+ ### Maintenance
33
+
34
+ - Release tooling: `@git.zone/tstest` 7.1.0 → 7.2.0. pnpm stays at 12.8.1 until 12.8.2 is seven days old (2026-10-07 01:15 UTC); `@types/node` stays at 26.6.3 until 26.6.4 is seven days old (2026-10-08 22:39 UTC).
35
+
36
+ ## 2026-10-06 - 32.50.0
37
+
38
+ ### Features
39
+
40
+ - A node can prove which projection bounds its packet authority, so withdrawn flows can be granted
41
+ again. `IRuntimeNetworkProjectionApplicationReceipt` (`data/networkapplication.ts`) is a
42
+ node's durable, monotonic receipt that every packet table it holds was composed from one admitted
43
+ projection, or that it holds none. `admitRuntimeNetworkProjectionApplicationReceipt` binds the
44
+ chain (first generation, exact predecessor, replay, scope and controller) and the head (the
45
+ named projection never goes back and never passes the receiver's head; an older one advances the
46
+ chain only). `selectRuntimeNetworkProjectionAppliedPrevious` turns a receipt into the
47
+ `appliedPrevious` argument of `admitRuntimeNetworkProjection`: the receipt's projection only
48
+ when it is exactly the previous projection. `admitRuntimeNetworkProjection` itself is unchanged.
49
+ `requests.runtimesession.IReq_Pallet_Controller_ReportRuntimeNetworkProjectionApplication`
50
+ (`reportRuntimeNetworkProjectionApplication`) carries a receipt on the current session, bound by
51
+ `bindReportRuntimeNetworkProjectionApplicationRequest` (`current` or `historical`, like
52
+ protection reports) and `bindReportRuntimeNetworkProjectionApplicationResponse`.
53
+ - The workload ingress documentation no longer promises cross-node delivery: a grant is enforced
54
+ only between two workloads behind the same router until cross-node one-way grants exist.
55
+
3
56
  ## 2026-10-06 - 32.49.0
4
57
 
5
58
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '32.49.0',
6
+ version: '32.51.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the serve.zone ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFNBQVM7SUFDbEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -4,8 +4,10 @@ import type { TImmutableContainerPlatform, TOciManifestMediaType, TSha256Digest
4
4
  * service already runs, instead of one built from a source revision.
5
5
  *
6
6
  * A legacy service without deployable source still has an image in Cloudly's registry and, until
7
- * its runtime is frozen, healthy replicas running it. An administrator captures that fact once as
8
- * a {@link ILegacyServiceRuntimeAttestation} while the replicas still run. A greenfield successor
7
+ * its runtime is frozen, replicas running it. An administrator observes those replicas on the
8
+ * hosts that run them ({@link ILegacyServiceHostObservation}) while they still run, and Cloudly
9
+ * captures that observation once as a {@link ILegacyServiceRuntimeAttestation} after it verified
10
+ * the observed root against its own registry. A greenfield successor
9
11
  * reservation names the attestation in `legacyImport` instead of a `sourceRevision`, and Cloudly
10
12
  * then imports the attested image into the successor's own repository and release tag itself:
11
13
  * the bytes never leave the registry and the release records that it was imported, not built.
@@ -44,18 +46,86 @@ export interface ILegacyServiceImageSource {
44
46
  */
45
47
  platforms: ILegacyImagePlatformManifest[];
46
48
  }
47
- /** One healthy replica of the legacy service, observed running the attested digest. */
49
+ /**
50
+ * One replica of the legacy service, observed running the attested digest in its own stated
51
+ * health: healthy, or running with no healthcheck that could state one.
52
+ */
48
53
  export interface ILegacyServiceRuntimeTaskAttestation {
54
+ /** The replica's runtime identity: the Swarm task it was observed as. */
49
55
  deploymentId: string;
56
+ /** The hostname of the node the replica was observed on. */
50
57
  nodeName: string;
51
58
  observedDigest: TSha256Digest;
52
59
  }
60
+ /**
61
+ * Where the runtime part of an attestation comes from. `administrator-host-observation`: an
62
+ * administrator read the legacy Swarm service and its containers on the hosts that run them, and
63
+ * Cloudly judged that observation against its own registry.
64
+ */
65
+ export type TLegacyServiceRuntimeEvidenceSource = 'administrator-host-observation';
66
+ /** A container's state as the Docker engine reports it (`State.Status`). */
67
+ export type TLegacyHostContainerState = 'created' | 'running' | 'paused' | 'restarting' | 'removing' | 'exited' | 'dead';
68
+ /**
69
+ * A container's health as the Docker engine reports it (`State.Health.Status`). `none`: no
70
+ * healthcheck applies to the container — the image declares none and the service adds none — so
71
+ * the engine reports no health state at all.
72
+ */
73
+ export type TLegacyHostContainerHealth = 'healthy' | 'unhealthy' | 'starting' | 'none';
74
+ /**
75
+ * The image store of the Docker engine that runs a container. On the `containerd` store a
76
+ * container's image id is the digest of the root it was pulled as; on the `classic` store it is
77
+ * the image configuration digest of the platform manifest the engine pulled.
78
+ */
79
+ export type TLegacyHostImageStore = 'containerd' | 'classic';
80
+ /** A Swarm service's mode (`Spec.Mode`): a replicated service states its desired replicas. */
81
+ export type TLegacyHostSwarmServiceMode = {
82
+ kind: 'replicated';
83
+ desiredReplicas: number;
84
+ } | {
85
+ kind: 'global';
86
+ };
87
+ /** One replica of a legacy Swarm service, as an administrator read it on the node that runs it. */
88
+ export interface ILegacyHostReplicaObservation {
89
+ /** The hostname of the node the task runs on. */
90
+ nodeHostname: string;
91
+ /** The Swarm task id (25 lowercase base-36 characters). */
92
+ swarmTaskId: string;
93
+ /** The full container id of the task (64 lowercase hex characters). */
94
+ containerId: string;
95
+ imageStore: TLegacyHostImageStore;
96
+ /** The container's image id (`Image`), a sha256 digest. */
97
+ containerImageId: TSha256Digest;
98
+ /** The `RepoDigests` of the container's image, exactly as the engine lists them. */
99
+ imageRepoDigests: string[];
100
+ state: TLegacyHostContainerState;
101
+ health: TLegacyHostContainerHealth;
102
+ }
103
+ /**
104
+ * An administrator's observation of the legacy Swarm service of one legacy service and of every
105
+ * container its tasks run, read on the hosts while the legacy runtime still runs.
106
+ *
107
+ * It states facts, not conclusions: Cloudly judges it against its own registry
108
+ * ({@link judgeLegacyServiceHostObservation}) before it attests anything.
109
+ */
110
+ export interface ILegacyServiceHostObservation {
111
+ /** The Swarm service name. */
112
+ swarmServiceName: string;
113
+ /** The image reference of the Swarm service spec (`Spec.TaskTemplate.ContainerSpec.Image`). */
114
+ specImage: string;
115
+ mode: TLegacyHostSwarmServiceMode;
116
+ /** When the administrator read the hosts, in milliseconds since the epoch. */
117
+ observedAt: number;
118
+ /** Every running task's replica, sorted by `swarmTaskId`. */
119
+ replicas: ILegacyHostReplicaObservation[];
120
+ }
53
121
  /**
54
122
  * Durable evidence, captured by an administrator while the legacy runtime still ran, that every
55
- * required replica of a legacy service was healthy and ran exactly the registry root it names.
123
+ * desired replica of a legacy service ran, in its own stated health, exactly the registry root it
124
+ * names.
56
125
  *
57
126
  * Cloudly writes one and never changes it. A capture only succeeds on complete evidence, so a
58
- * stored attestation is by construction one whose runtime digest is its source root digest.
127
+ * stored attestation is by construction one whose runtime digest is its source root digest and
128
+ * whose runtime part is exactly the host observation it records.
59
129
  */
60
130
  export interface ILegacyServiceRuntimeAttestation {
61
131
  id: string;
@@ -64,11 +134,16 @@ export interface ILegacyServiceRuntimeAttestation {
64
134
  organizationId: string;
65
135
  source: ILegacyServiceImageSource;
66
136
  runtime: {
137
+ /** The desired replicas of the observed replicated Swarm service. */
67
138
  requiredReplicaCount: number;
139
+ /** Replicas observed running healthy, or running with no healthcheck (`health: 'none'`). */
68
140
  healthyReplicaCount: number;
69
141
  runtimeDigest: TSha256Digest;
70
- /** Sorted by deploymentId, one per required replica. */
142
+ /** Sorted by deploymentId, one per required replica: the observed replicas. */
71
143
  tasks: ILegacyServiceRuntimeTaskAttestation[];
144
+ evidenceSource: TLegacyServiceRuntimeEvidenceSource;
145
+ /** The observation the runtime part was built from, as the administrator submitted it. */
146
+ hostObservation: ILegacyServiceHostObservation;
72
147
  };
73
148
  capturedByUserId: string;
74
149
  capturedAt: number;
@@ -89,4 +164,43 @@ export declare const isLegacyImagePlatformManifestMediaType: (valueArg: unknown)
89
164
  /** True when a media type names an index of either family. */
90
165
  export declare const isLegacyImageImportIndexMediaType: (valueArg: unknown) => valueArg is TLegacyImageImportIndexMediaType;
91
166
  export declare const validateLegacyImageImportReference: (referenceArg: unknown) => string[];
167
+ /**
168
+ * The shape of a host observation: exact keys at every level, Docker's own value sets, at most 64
169
+ * replicas, unique and sorted by Swarm task id, each container observed once. It judges nothing
170
+ * against a registry; {@link judgeLegacyServiceHostObservation} does.
171
+ */
172
+ export declare const validateLegacyServiceHostObservation: (observationArg: unknown, labelArg?: string) => string[];
173
+ /** True when a value is a well-formed host observation. */
174
+ export declare const isLegacyServiceHostObservation: (valueArg: unknown) => valueArg is ILegacyServiceHostObservation;
175
+ /**
176
+ * The one root digest every observed replica runs from the legacy service's own repository, which
177
+ * is the digest Cloudly then inspects in its registry. Refused when a replica's root from that
178
+ * repository is unknown, when the replicas run more than one root, or when nothing was observed.
179
+ */
180
+ export declare const selectLegacyServiceHostObservationRootDigest: (argsArg: {
181
+ observation: ILegacyServiceHostObservation;
182
+ registryHost: string;
183
+ repository: string;
184
+ }) => {
185
+ rootDigest?: TSha256Digest;
186
+ errors: string[];
187
+ };
188
+ /**
189
+ * Judges a well-formed host observation against the registry source Cloudly inspected for it.
190
+ * Every rule an attestation's runtime part must meet:
191
+ *
192
+ * - the Swarm service is replicated, with at least one desired replica, and exactly its desired
193
+ * replicas were observed;
194
+ * - its spec image names the source repository by the source tag, by the root digest, or by both;
195
+ * - every replica is `running`, and `healthy` or without a healthcheck (`none`) — `unhealthy` and
196
+ * `starting` are refused;
197
+ * - every replica runs the source root from the source repository: its image lists
198
+ * `registryHost/repository@rootDigest`, and its image id is the root digest on the containerd
199
+ * store or one of the root's platform image configuration digests on the classic store.
200
+ */
201
+ export declare const judgeLegacyServiceHostObservation: (argsArg: {
202
+ observation: ILegacyServiceHostObservation;
203
+ source: ILegacyServiceImageSource;
204
+ label?: string;
205
+ }) => string[];
92
206
  export declare const validateLegacyServiceRuntimeAttestation: (attestationArg: unknown) => string[];