@serve.zone/interfaces 32.48.0 → 32.50.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.
Files changed (39) hide show
  1. package/changelog.md +67 -0
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/appstore/catalog.d.ts +300 -0
  4. package/dist_ts/appstore/catalog.js +544 -0
  5. package/dist_ts/appstore/index.d.ts +2 -0
  6. package/dist_ts/appstore/index.js +3 -1
  7. package/dist_ts/appstore/types.d.ts +9 -0
  8. package/dist_ts/appstore/types.js +1 -1
  9. package/dist_ts/appstore/versionconfig.d.ts +21 -0
  10. package/dist_ts/appstore/versionconfig.js +685 -0
  11. package/dist_ts/data/index.d.ts +1 -0
  12. package/dist_ts/data/index.js +2 -1
  13. package/dist_ts/data/networkapplication.d.ts +84 -0
  14. package/dist_ts/data/networkapplication.js +128 -0
  15. package/dist_ts/data/networkprojection.d.ts +5 -3
  16. package/dist_ts/data/networkprojection.js +6 -4
  17. package/dist_ts/private/keylist.d.ts +5 -0
  18. package/dist_ts/private/keylist.js +2 -0
  19. package/dist_ts/requests/appstore.d.ts +30 -1
  20. package/dist_ts/requests/runtimesession.d.ts +11 -0
  21. package/dist_ts/runtime.appstorecatalog.d.ts +46 -0
  22. package/dist_ts/runtime.appstorecatalog.js +142 -0
  23. package/dist_ts/runtime.d.ts +1 -0
  24. package/dist_ts/runtime.js +2 -1
  25. package/package.json +1 -1
  26. package/readme.md +127 -4
  27. package/ts/00_commitinfo_data.ts +1 -1
  28. package/ts/appstore/catalog.ts +851 -0
  29. package/ts/appstore/index.ts +2 -0
  30. package/ts/appstore/types.ts +9 -0
  31. package/ts/appstore/versionconfig.ts +803 -0
  32. package/ts/data/index.ts +1 -0
  33. package/ts/data/networkapplication.ts +188 -0
  34. package/ts/data/networkprojection.ts +5 -3
  35. package/ts/private/keylist.ts +6 -0
  36. package/ts/requests/appstore.ts +38 -0
  37. package/ts/requests/runtimesession.ts +14 -0
  38. package/ts/runtime.appstorecatalog.ts +195 -0
  39. package/ts/runtime.ts +1 -0
package/changelog.md CHANGED
@@ -1,5 +1,72 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-06 - 32.50.0
4
+
5
+ ### Features
6
+
7
+ - A node can prove which projection bounds its packet authority, so withdrawn flows can be granted
8
+ again. `IRuntimeNetworkProjectionApplicationReceipt` (`data/networkapplication.ts`) is a
9
+ node's durable, monotonic receipt that every packet table it holds was composed from one admitted
10
+ projection, or that it holds none. `admitRuntimeNetworkProjectionApplicationReceipt` binds the
11
+ chain (first generation, exact predecessor, replay, scope and controller) and the head (the
12
+ named projection never goes back and never passes the receiver's head; an older one advances the
13
+ chain only). `selectRuntimeNetworkProjectionAppliedPrevious` turns a receipt into the
14
+ `appliedPrevious` argument of `admitRuntimeNetworkProjection`: the receipt's projection only
15
+ when it is exactly the previous projection. `admitRuntimeNetworkProjection` itself is unchanged.
16
+ `requests.runtimesession.IReq_Pallet_Controller_ReportRuntimeNetworkProjectionApplication`
17
+ (`reportRuntimeNetworkProjectionApplication`) carries a receipt on the current session, bound by
18
+ `bindReportRuntimeNetworkProjectionApplicationRequest` (`current` or `historical`, like
19
+ protection reports) and `bindReportRuntimeNetworkProjectionApplicationResponse`.
20
+ - The workload ingress documentation no longer promises cross-node delivery: a grant is enforced
21
+ only between two workloads behind the same router until cross-node one-way grants exist.
22
+
23
+ ## 2026-10-06 - 32.49.0
24
+
25
+ ### Features
26
+
27
+ - The App Store has a runtime catalog contract, so App Store updates that keep the contract no longer
28
+ need Onebox or Cloudly releases. `appstore.appStoreCatalogContract` (`serve.zone/appstore-catalog`,
29
+ major 1, minor 0, sha256, ed25519) defines `IAppStoreCatalog`: every app with every published
30
+ version, each version carrying its `config` and `configDigest`, under a strictly increasing
31
+ `revision`, `publishedAt` and `sourceRevision`. A publisher ships it as an
32
+ `IAppStoreCatalogEnvelope` (`catalogDigest` plus Ed25519 `signatures` by key id).
33
+ `appstore.validateAppStoreCatalog` judges a catalog with exact keys at every level, digest-pinned
34
+ images, semver or `branch` versions with a listed `latestVersion` that is not withdrawn (under
35
+ semver the highest such one), unique app ids and versions, and judges every supported version
36
+ config in full through
37
+ `appstore.validateAppStoreVersionConfig`: the member rules the `@serve.zone/appstore` resolver
38
+ applied before an install, now owned here (`validateAppStoreVersionPortModel` for `port`,
39
+ `targetPorts`, `domains` and `publicPortMappings`; `validateAppStoreVersionStorage` for the exact
40
+ member set, `platformRequirements`, storage classes, requests, legacy `volumes`, storage feature ids
41
+ and destination collisions; `validateAppStorePublishedPorts`; `appStoreVersionConfigKeys`). Each
42
+ storage request is judged by the same storage contract as `platform.normalizeStorageRequest`, so
43
+ its members, capacity, protection, delivery and mount path are refused with that contract's
44
+ messages and bounds; the version config adds the rules between requests (declared classes and what
45
+ they back, unique ids and destinations, reserved legacy names, storage feature ids), lowercase
46
+ request ids and one file directly below `/run/secrets` per file delivery. Port entries are read as
47
+ exactly their types, so a string port or an unknown member is refused rather than coerced or
48
+ ignored. `requiresFeatures` now gates single versions: a version naming a feature the consumer
49
+ does not fulfil stays listed, is not installable there, and its config is not interpreted, so the
50
+ rest of the catalog still loads. A published version is never removed: a publisher withdraws it
51
+ with `withdrawn: { at, reason }` (`IAppStoreCatalogWithdrawal`), which keeps the entry, its config
52
+ and its digest, and `judgeAppStoreCatalogInstallTarget` refuses a withdrawn or feature-gated
53
+ version as an install or upgrade target. `judgeAppStoreCatalogContract` refuses another id, another
54
+ major or a newer minor as `contractUnsupported`; `judgeAppStoreCatalogSuccession` refuses a revision
55
+ that does not increase (`revisionRegressed`), a published `app@version` that is no longer listed
56
+ (`publishedVersionRemoved`) or whose config digest changed (`publishedVersionMutated`), and a
57
+ withdrawal that is revoked or rewritten (`publishedWithdrawalChanged`).
58
+ `computeAppStoreCatalogConfigDigest`, `computeAppStoreCatalogDigest`,
59
+ `computeAppStoreCatalogSigningKeyId` and `createAppStoreCatalogSignaturePayload` define the exact
60
+ bytes (browser-safe, Web Crypto). The Node-only `./runtime` export adds
61
+ `createAppStoreCatalogSigningKey`, `signAppStoreCatalog` and `verifyAppStoreCatalogEnvelope`, which
62
+ checks shape, digest and a trusted signature before it reads the contract and schema, and answers
63
+ `{ accepted, envelope, keyId }` or a `TAppStoreCatalogRefusalReason`. `TAppStoreCatalogStatus` is
64
+ discriminated by `availability`: `ready` always carries the `active` catalog (a restored
65
+ last-known-good one counts), `unavailable` always carries a `reason` and no active catalog; both
66
+ state the last attempt, the next retry and the last refusal.
67
+ `requests.appstore.getAppStoreCatalogStatus` and `refreshAppStoreCatalog` answer it, and
68
+ `getAppStoreTemplates` may answer it as `catalogStatus`.
69
+
3
70
  ## 2026-10-05 - 32.48.0
4
71
 
5
72
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '32.48.0',
6
+ version: '32.50.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=
@@ -0,0 +1,300 @@
1
+ /**
2
+ * The App Store catalog contract: the one signed document a consumer loads at runtime.
3
+ *
4
+ * A catalog carries every app, every published version and every version's runtime config, so a
5
+ * consumer that holds one verified catalog holds the whole App Store. What a consumer has to
6
+ * understand is the contract — the shapes below, their digests and signature, and the gates a
7
+ * version declares. Everything else is data: new apps and versions, image digests, changelogs and
8
+ * descriptions arrive with the next catalog revision and need no consumer release.
9
+ *
10
+ * This module is browser-safe: digests use Web Crypto. Ed25519 signing and verification live in
11
+ * the Node-only `./runtime` export (`runtime.appstorecatalog.ts`).
12
+ */
13
+ import type { TSha256Digest } from '../data/immutableimage.js';
14
+ import type { TCompleteKeyList } from '../private/keylist.js';
15
+ import type { IAppStoreVersionConfig, IServezoneAppStoreAppInfo, TAppStoreUpgradeStrategy } from './types.js';
16
+ /**
17
+ * The contract identity, digest domains and bounds every catalog producer and consumer shares.
18
+ *
19
+ * `major` changes when a catalog written against it cannot be read by a consumer of the previous
20
+ * major. `minor` changes when catalog-level structure is added; a consumer reads every catalog of
21
+ * its own major whose minor is not newer than its own, and refuses the rest as
22
+ * `contractUnsupported`. New version-config capabilities do not need a minor: they are gated per
23
+ * version through `requiresFeatures` (see `IAppStoreVersionConfig.requiresFeatures`).
24
+ */
25
+ export declare const appStoreCatalogContract: Readonly<{
26
+ readonly id: "serve.zone/appstore-catalog";
27
+ readonly major: 1;
28
+ readonly minor: 0;
29
+ readonly digestAlgorithm: "sha256";
30
+ readonly signatureAlgorithm: "ed25519";
31
+ readonly configDigestDomain: "serve.zone/appstore-catalog/version-config";
32
+ readonly catalogDigestDomain: "serve.zone/appstore-catalog/catalog";
33
+ readonly signatureDomain: "serve.zone/appstore-catalog/signature";
34
+ readonly signingKeyIdDomain: "serve.zone/appstore-catalog/signing-key";
35
+ readonly maximumApps: 1024;
36
+ readonly maximumVersionsPerApp: 1024;
37
+ readonly maximumSignatures: 8;
38
+ readonly maximumTags: 32;
39
+ readonly maximumLinks: 32;
40
+ readonly maximumConfigListEntries: 256;
41
+ readonly maximumRequiredFeatures: 64;
42
+ }>;
43
+ /** Which contract a catalog was written against. */
44
+ export interface IAppStoreCatalogContractIdentity {
45
+ id: typeof appStoreCatalogContract.id;
46
+ major: number;
47
+ minor: number;
48
+ }
49
+ /**
50
+ * A version's runtime config as a catalog carries it.
51
+ *
52
+ * The members that only exist to resolve a live source (`source`, `resolvedSource`,
53
+ * `resolvedImageDigest`), the per-version `upgradeStrategy` and the `appStoreVersion` override
54
+ * are not part of a signed catalog: the catalog is self-contained, the image is digest-pinned,
55
+ * the app states its upgrade strategy once and the version entry names its own version.
56
+ */
57
+ export type TAppStoreCatalogVersionConfig = Omit<IAppStoreVersionConfig, 'source' | 'resolvedSource' | 'resolvedImageDigest' | 'upgradeStrategy' | 'appStoreVersion'>;
58
+ declare const versionConfigKeyList: readonly ["image", "port", "containerArgs", "targetPorts", "domains", "publicPortMappings", "envVars", "volumes", "storageClasses", "storageRequests", "publishedPorts", "platformRequirements", "platformOidc", "minOneboxVersion", "minCloudlyVersion", "changelog", "breaking", "requiresManualReview", "migrationRequired", "backupBeforeUpgrade", "requiresFeatures", "healthCheck"];
59
+ /** Every member a catalog version config may carry; any other member is refused. */
60
+ export declare const appStoreCatalogVersionConfigKeys: TCompleteKeyList<TAppStoreCatalogVersionConfig, typeof versionConfigKeyList>;
61
+ /** Why and when a publisher withdrew a published version. */
62
+ export interface IAppStoreCatalogWithdrawal {
63
+ /** Canonical UTC timestamp, not later than the catalog's `publishedAt`. */
64
+ at: string;
65
+ /** One line an operator reads, e.g. the advisory that caused it. */
66
+ reason: string;
67
+ }
68
+ /**
69
+ * One published version. Once published, `app@version` stays in every later catalog with the same
70
+ * `configDigest` (`judgeAppStoreCatalogSuccession`).
71
+ */
72
+ export interface IAppStoreCatalogVersion {
73
+ version: string;
74
+ config: TAppStoreCatalogVersionConfig;
75
+ /** `computeAppStoreCatalogConfigDigest(config)`. */
76
+ configDigest: TSha256Digest;
77
+ /**
78
+ * Present once the publisher withdrew the version. A withdrawn version stays listed with its
79
+ * config, so installed services keep reading it, but it is never an install or upgrade target
80
+ * (`judgeAppStoreCatalogInstallTarget`). A withdrawal is final: every later catalog carries the
81
+ * same record.
82
+ */
83
+ withdrawn?: IAppStoreCatalogWithdrawal;
84
+ }
85
+ /** The upgrade strategies a self-contained catalog can express; live digest tracking is not one. */
86
+ export type TAppStoreCatalogUpgradeStrategy = Exclude<TAppStoreUpgradeStrategy, 'dockerDigest'>;
87
+ export interface IAppStoreCatalogApp {
88
+ info: IServezoneAppStoreAppInfo;
89
+ /**
90
+ * Names a listed version that is not withdrawn; under `semver` the highest of them. When every
91
+ * version is withdrawn, the app is withdrawn and `latestVersion` names a listed version (under
92
+ * `semver` the highest).
93
+ */
94
+ latestVersion: string;
95
+ /**
96
+ * Absent means `semver`: every version is `MAJOR.MINOR.PATCH` and `latestVersion` is the
97
+ * highest. `branch` versions are opaque tokens and `latestVersion` is the publisher's choice.
98
+ */
99
+ upgradeStrategy?: TAppStoreCatalogUpgradeStrategy;
100
+ versions: IAppStoreCatalogVersion[];
101
+ }
102
+ export interface IAppStoreCatalog {
103
+ contract: IAppStoreCatalogContractIdentity;
104
+ /**
105
+ * Strictly increasing across every catalog a publisher signs. A consumer activates a catalog
106
+ * only when its revision is greater than the active one (`judgeAppStoreCatalogSuccession`).
107
+ */
108
+ revision: number;
109
+ /** `Date.prototype.toISOString()` form, UTC. */
110
+ publishedAt: string;
111
+ /** The source commit the catalog was generated from (40 or 64 lower-case hex). */
112
+ sourceRevision: string;
113
+ apps: IAppStoreCatalogApp[];
114
+ }
115
+ /** An Ed25519 signature over `createAppStoreCatalogSignaturePayload(catalogDigest)`. */
116
+ export interface IAppStoreCatalogSignature {
117
+ /** `computeAppStoreCatalogSigningKeyId(publicKey)` of the signing key. */
118
+ keyId: TSha256Digest;
119
+ /** 64-byte Ed25519 signature, lower-case hex. */
120
+ signature: string;
121
+ }
122
+ /** What a publisher ships and a consumer stores as its last-known-good catalog. */
123
+ export interface IAppStoreCatalogEnvelope {
124
+ catalog: IAppStoreCatalog;
125
+ /** `computeAppStoreCatalogDigest(catalog)`. */
126
+ catalogDigest: TSha256Digest;
127
+ /** At least one; a consumer needs one valid signature by a key it trusts. */
128
+ signatures: IAppStoreCatalogSignature[];
129
+ }
130
+ /** A signing key a consumer trusts. Shipped with the consumer release, never fetched. */
131
+ export interface IAppStoreCatalogTrustedKey {
132
+ keyId: TSha256Digest;
133
+ /** Raw 32-byte Ed25519 public key, lower-case hex. */
134
+ publicKey: string;
135
+ }
136
+ /** Whether a consumer holds a verified catalog. Nothing outside the App Store depends on it. */
137
+ export type TAppStoreCatalogAvailability = TAppStoreCatalogStatus['availability'];
138
+ export type TAppStoreCatalogRefusalReason =
139
+ /** The catalog names another contract id, another major, or a newer minor. */
140
+ 'contractUnsupported'
141
+ /** No valid signature by a trusted key, or a signature by a trusted key that does not verify. */
142
+ | 'signatureInvalid'
143
+ /** `catalogDigest` or a `configDigest` does not match its content. */
144
+ | 'digestMismatch'
145
+ /** The envelope or catalog does not satisfy this contract's exact schema. */
146
+ | 'schemaInvalid'
147
+ /** The revision is not greater than the active catalog's revision. */
148
+ | 'revisionRegressed'
149
+ /** A version the active catalog published carries a different config digest. */
150
+ | 'publishedVersionMutated'
151
+ /** A version the active catalog published is no longer listed. */
152
+ | 'publishedVersionRemoved'
153
+ /** A withdrawal the active catalog published is revoked or rewritten. */
154
+ | 'publishedWithdrawalChanged';
155
+ export interface IAppStoreCatalogRefusal {
156
+ reason: TAppStoreCatalogRefusalReason;
157
+ message: string;
158
+ }
159
+ /** A refusal as a consumer records it in its status. */
160
+ export interface IAppStoreCatalogRefusalRecord extends IAppStoreCatalogRefusal {
161
+ at: string;
162
+ /** The refused catalog's revision, when it could be read. */
163
+ revision?: number;
164
+ }
165
+ /** Where the active catalog came from. */
166
+ export type TAppStoreCatalogOrigin = 'registry' | 'operatorImport';
167
+ export interface IAppStoreCatalogActiveState {
168
+ contract: IAppStoreCatalogContractIdentity;
169
+ revision: number;
170
+ catalogDigest: TSha256Digest;
171
+ publishedAt: string;
172
+ sourceRevision: string;
173
+ /** When this consumer activated it. */
174
+ loadedAt: string;
175
+ /** The trusted key whose signature this consumer verified. */
176
+ keyId: TSha256Digest;
177
+ origin: TAppStoreCatalogOrigin;
178
+ }
179
+ export type TAppStoreCatalogAttemptOutcome = 'activated' | 'unchanged' | 'refused' | 'failed';
180
+ export interface IAppStoreCatalogAttempt {
181
+ at: string;
182
+ outcome: TAppStoreCatalogAttemptOutcome;
183
+ /** Why a `refused` or `failed` attempt ended; absent for the other outcomes. */
184
+ message?: string;
185
+ }
186
+ /** What every catalog status states, whatever its availability. */
187
+ export interface IAppStoreCatalogStatusBase {
188
+ /** The contract this consumer reads. */
189
+ supportedContract: IAppStoreCatalogContractIdentity;
190
+ /** The feature ids this consumer fulfils, in canonical order. */
191
+ supportedFeatureIds: string[];
192
+ lastAttempt?: IAppStoreCatalogAttempt;
193
+ nextAttemptAt?: string;
194
+ /** The most recent catalog this consumer refused, kept while the active one stays in place. */
195
+ refused?: IAppStoreCatalogRefusalRecord;
196
+ }
197
+ /**
198
+ * A verified catalog is active: the last-known-good one restored at start or the latest one
199
+ * accepted since. A later refused or failed attempt leaves it active and the status `ready`.
200
+ */
201
+ export interface IAppStoreCatalogReadyStatus extends IAppStoreCatalogStatusBase {
202
+ availability: 'ready';
203
+ active: IAppStoreCatalogActiveState;
204
+ reason?: never;
205
+ }
206
+ /** No verified catalog is active, neither a last-known-good one nor a fetched one. */
207
+ export interface IAppStoreCatalogUnavailableStatus extends IAppStoreCatalogStatusBase {
208
+ availability: 'unavailable';
209
+ /** Why no catalog is active, e.g. the last attempt's failure. */
210
+ reason: string;
211
+ active?: never;
212
+ }
213
+ /**
214
+ * The App Store domain's state as an operator sees it, discriminated by `availability`.
215
+ *
216
+ * Loading a catalog never gates the boot, readiness or health of anything else. While no verified
217
+ * catalog is active, `availability` is `unavailable`, `reason` says why and only App Store
218
+ * install, upgrade and upgrade-preview actions are refused with that reason.
219
+ */
220
+ export type TAppStoreCatalogStatus = IAppStoreCatalogReadyStatus | IAppStoreCatalogUnavailableStatus;
221
+ /** The consumer side of `requiresFeatures`. */
222
+ export interface IAppStoreCatalogValidationOptions {
223
+ /** Feature ids this consumer fulfils, e.g. `appStoreStorageFeatureIds` values. */
224
+ supportedFeatureIds: Iterable<string>;
225
+ }
226
+ /**
227
+ * The feature ids a version config requires that the consumer does not fulfil.
228
+ *
229
+ * Empty when the version is installable by this consumer. A malformed `requiresFeatures` is a
230
+ * schema error that `validateAppStoreCatalog` reports; here it yields no missing ids.
231
+ */
232
+ export declare const getAppStoreCatalogMissingFeatureIds: (configArg: unknown, supportedFeatureIdsArg: Iterable<string>) => string[];
233
+ /**
234
+ * Whether a catalog is written against a contract this consumer reads.
235
+ *
236
+ * `null` when it is. A malformed or absent `contract` member is `schemaInvalid`; a well-formed
237
+ * identity naming another id, another major or a newer minor is `contractUnsupported`.
238
+ */
239
+ export declare const judgeAppStoreCatalogContract: (catalogArg: unknown) => IAppStoreCatalogRefusal | null;
240
+ /**
241
+ * Every reason a value is not a catalog this consumer can read; empty when it is.
242
+ *
243
+ * Exact keys at every level: a member this contract does not define is refused, because a
244
+ * consumer that silently ignored it could not be trusted to honour it. The one exception is the
245
+ * config of a version whose `requiresFeatures` names a feature the consumer does not fulfil.
246
+ */
247
+ export declare const validateAppStoreCatalog: (catalogArg: unknown, optionsArg: IAppStoreCatalogValidationOptions) => string[];
248
+ /** The envelope's own members; the catalog inside is judged by `validateAppStoreCatalog`. */
249
+ export declare const validateAppStoreCatalogEnvelopeShape: (envelopeArg: unknown) => string[];
250
+ /** Every reason a value is not an envelope whose catalog this consumer can read. */
251
+ export declare const validateAppStoreCatalogEnvelope: (envelopeArg: unknown, optionsArg: IAppStoreCatalogValidationOptions) => string[];
252
+ /** Narrows a value `validateAppStoreCatalogEnvelope` accepts. */
253
+ export declare const isAppStoreCatalogEnvelope: (envelopeArg: unknown, optionsArg: IAppStoreCatalogValidationOptions) => envelopeArg is IAppStoreCatalogEnvelope;
254
+ /** The digest a catalog version entry carries as `configDigest`. */
255
+ export declare const computeAppStoreCatalogConfigDigest: (configArg: unknown) => Promise<TSha256Digest>;
256
+ /** The digest an envelope carries as `catalogDigest`. */
257
+ export declare const computeAppStoreCatalogDigest: (catalogArg: unknown) => Promise<TSha256Digest>;
258
+ /** The key id of a raw Ed25519 public key (32 bytes, lower-case hex). */
259
+ export declare const computeAppStoreCatalogSigningKeyId: (publicKeyArg: string) => Promise<TSha256Digest>;
260
+ /** The exact bytes a catalog signature covers. */
261
+ export declare const createAppStoreCatalogSignaturePayload: (catalogDigestArg: TSha256Digest) => Uint8Array;
262
+ /**
263
+ * The first version entry whose `configDigest` does not match its config, or `null`.
264
+ *
265
+ * Judge the catalog with `validateAppStoreCatalog` first; an entry it would refuse is skipped.
266
+ */
267
+ export declare const findAppStoreCatalogConfigDigestMismatch: (catalogArg: IAppStoreCatalog) => Promise<string | null>;
268
+ /** Why a listed version is not an install or upgrade target for this consumer. */
269
+ export type TAppStoreCatalogInstallTargetRefusal = {
270
+ reason: 'versionWithdrawn';
271
+ withdrawal: IAppStoreCatalogWithdrawal;
272
+ } | {
273
+ reason: 'featuresUnsupported';
274
+ missingFeatureIds: string[];
275
+ };
276
+ /**
277
+ * Whether a consumer may install a listed version, or upgrade a service to it; `null` when it may.
278
+ * A withdrawn version and a version requiring a feature the consumer does not fulfil stay listed
279
+ * and are refused here, and nowhere else is a second answer needed.
280
+ */
281
+ export declare const judgeAppStoreCatalogInstallTarget: (versionArg: IAppStoreCatalogVersion, supportedFeatureIdsArg: Iterable<string>) => TAppStoreCatalogInstallTargetRefusal | null;
282
+ export type TAppStoreCatalogSuccession = {
283
+ outcome: 'activate';
284
+ } | {
285
+ outcome: 'unchanged';
286
+ } | {
287
+ outcome: 'refused';
288
+ refusal: IAppStoreCatalogRefusal;
289
+ };
290
+ /**
291
+ * Whether a verified candidate may replace the active verified catalog.
292
+ *
293
+ * The same digest is `unchanged`. Otherwise the revision must be greater, and the candidate must
294
+ * keep the active catalog's full history: every `app@version` it lists stays listed
295
+ * (`publishedVersionRemoved`) with its `configDigest` (`publishedVersionMutated`), and every
296
+ * withdrawal stays exactly as published (`publishedWithdrawalChanged`). A candidate may add apps
297
+ * and versions and withdraw versions; it cannot remove, rewrite or reinstate one.
298
+ */
299
+ export declare const judgeAppStoreCatalogSuccession: (activeArg: IAppStoreCatalogEnvelope | null, candidateArg: IAppStoreCatalogEnvelope) => TAppStoreCatalogSuccession;
300
+ export {};