@serve.zone/interfaces 32.60.0 → 32.62.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 (45) hide show
  1. package/.smartconfig.json +4 -2
  2. package/changelog.md +32 -0
  3. package/dist_ts/00_commitinfo_data.js +1 -1
  4. package/dist_ts/data/coremail.d.ts +37 -1
  5. package/dist_ts/data/coremail.js +23 -1
  6. package/dist_ts/data/coremail.runtime.d.ts +10 -1
  7. package/dist_ts/data/coremail.runtime.js +23 -1
  8. package/dist_ts/data/delegatedadmintoken.d.ts +142 -0
  9. package/dist_ts/data/delegatedadmintoken.js +197 -0
  10. package/dist_ts/data/gateway.d.ts +23 -4
  11. package/dist_ts/data/gateway.js +1 -1
  12. package/dist_ts/data/index.d.ts +2 -0
  13. package/dist_ts/data/index.js +3 -1
  14. package/dist_ts/data/mail.d.ts +36 -0
  15. package/dist_ts/data/mail.js +45 -2
  16. package/dist_ts/data/runtimeassignment.d.ts +4 -1
  17. package/dist_ts/data/runtimeassignment.js +5 -2
  18. package/dist_ts/data/secret.d.ts +23 -0
  19. package/dist_ts/data/secret.js +33 -1
  20. package/dist_ts/data/serviceruntime.d.ts +14 -1
  21. package/dist_ts/data/serviceruntime.js +2 -2
  22. package/dist_ts/data/settings.d.ts +21 -0
  23. package/dist_ts/data/settings.js +38 -1
  24. package/dist_ts/data/workloadreplicaidentity.d.ts +101 -0
  25. package/dist_ts/data/workloadreplicaidentity.js +159 -0
  26. package/dist_ts/requests/admin.d.ts +52 -0
  27. package/dist_ts/requests/coremail.d.ts +6 -1
  28. package/dist_ts/requests/identity.d.ts +4 -0
  29. package/package.json +5 -8
  30. package/readme.md +154 -8
  31. package/ts/00_commitinfo_data.ts +1 -1
  32. package/ts/data/coremail.runtime.ts +26 -1
  33. package/ts/data/coremail.ts +42 -1
  34. package/ts/data/delegatedadmintoken.ts +282 -0
  35. package/ts/data/gateway.ts +24 -3
  36. package/ts/data/index.ts +2 -0
  37. package/ts/data/mail.ts +48 -0
  38. package/ts/data/runtimeassignment.ts +4 -1
  39. package/ts/data/secret.ts +38 -0
  40. package/ts/data/serviceruntime.ts +14 -1
  41. package/ts/data/settings.ts +46 -0
  42. package/ts/data/workloadreplicaidentity.ts +219 -0
  43. package/ts/requests/admin.ts +51 -0
  44. package/ts/requests/coremail.ts +6 -1
  45. package/ts/requests/identity.ts +4 -0
package/.smartconfig.json CHANGED
@@ -47,8 +47,10 @@
47
47
  }
48
48
  }
49
49
  },
50
- "@git.zone/tsdoc": {
51
- "legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license.md](license.md) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
50
+ "@git.zone/tsrepo": {
51
+ "docs": {
52
+ "legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license.md](license.md) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
53
+ }
52
54
  },
53
55
  "@ship.zone/szci": {}
54
56
  }
package/changelog.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-10-23 - 32.62.0
4
+
5
+ ### Features
6
+
7
+ - Workload replica identity (`data.workloadreplicaidentity`): `IWorkloadReplicaIdentity` is exactly `{ serviceId, replicaId, attemptId, imageDigest }`, the runtime assignment's own values (`buildWorkloadReplicaIdentity(assignment)`, read through the assignment's exact schema), with `validateWorkloadReplicaIdentity` (names every violation) and `snapshotWorkloadReplicaIdentity` (detached frozen copy or throws). `workloadReplicaIdentityEnvironmentNames` spells the names every runtime injects into every workload once: `SERVEZONE_WORKLOAD_SERVICE_ID`, `SERVEZONE_WORKLOAD_REPLICA_ID`, `SERVEZONE_WORKLOAD_ATTEMPT_ID`, `SERVEZONE_WORKLOAD_IMAGE_DIGEST`. `composeWorkloadReplicaEnvironment(configEnvironment, identity)` answers the config environment with the identity added, or `refused` with `workload-identity-environment-conflict` naming every colliding key and no value (`TWorkloadReplicaEnvironmentComposition`); `findWorkloadReplicaIdentityEnvironmentConflicts(names)` is the same judgement over an effective environment's keys and its launcher secrets' variable names, for Cloudly's refusal; `readWorkloadReplicaIdentityEnvironment(process.env)` reads the four names only and throws naming every missing or invalid variable. `workloadReplicaIdentityContract.maximumExecutorEnvironmentEntries` (132) is `runtimeConfigContract.maximumEnvironmentEntries` (128, unchanged for a config) plus `injectedEnvironmentEntries` (4), the bound a runtime's executor admits. `TServiceRuntimeRefusal` gains `workload-identity-environment-conflict`. Cloudly alone states it, in the `IServiceRuntimeStatus` it stores and answers on `getServiceRuntimeSpec`, `getServiceRuntimeSpecForCluster` and `getServiceRuntimeSpecs`; those requests carry no protocol offer, so there is no peer version to gate the reason on, and no earlier refusal names this check. A reader built before this release refuses such a status whole, so every client that reads statuses moves to this release before Cloudly does, and a Cloudly that has stored one is not rolled back below this release. A node never states it: a Pallet whose composition refuses (only a Cloudly before this release places such a run) reports the existing `TRuntimeAssignmentFailureCause` `{ kind: 'refused', reason: 'invalid' }`, which every reader since 32.45.0 reads. Cloudly raises the `minimumPeerVersion` of its Pallet runtime sessions to this release in the commit that first deploys CoreMail 34.
8
+ - CoreMail replica identity: `ICoreMailReconciliationStatus.replica` and `IReq_CoreMailAuthenticateControl.response.replica` accept `IWorkloadReplicaIdentity` (CoreMail 34 and later, whose `attemptId` replaces `taskId`) or the deprecated `ICoreMailReplicaIdentity` (CoreMail before 34); `normalizeCoreMailReplicaIdentity` reads each exactly (a record stating `taskId` is the deprecated shape) and now returns the union. `coreMailRuntimeKeys` gains `port` (`COREMAIL_PORT`), `hostnames` (`COREMAIL_HOSTNAMES`) and `mongoDbMaxPoolSize` (`COREMAIL_MONGODB_MAX_POOL_SIZE`), and `coreMailStorageEnvironmentNames` names the storage CoreMail 34 reads under its bindings' names (`MONGODB_URL`, `MONGODB_DATABASE`, `S3_ENDPOINT`, `S3_REGION`, `S3_BUCKET`, `S3_ACCESS_KEY`, `S3_SECRET_KEY`) in place of `COREMAIL_MONGODB_URL`, `COREMAIL_MONGODB_NAME`, `COREMAIL_STORAGE_DESCRIPTOR` and `COREMAIL_BUCKET_NAME`. Readers first: a reader built before this release refuses CoreMail 34's identity (its normalizer requires `taskId`, `rolloutId` and `rolloutGeneration`), and the Pallet session gate does not reach CoreMail's control readers. `@serve.zone/api`'s `CoreMailControlClient`, and through it Cloudly's CoreMail manager and Onebox's CoreMail provider, move to this release before any CoreMail 34 runs: Cloudly deploys CoreMail 34 only once its own reader is on this release, and Onebox moves its CoreMail pin to 34 only in the release that carries this reader. A CoreMail before 34 keeps writing the deprecated shape, which every reader reads as before.
9
+ - Service mail environment: `ICloudlySettings.dcrouterMailEndpointUrl`, the canonical HTTPS URL of dcrouter's tenant mail listener, is the only value of `MAIL_TYPED_URL` and `MAIL_<TOKEN>_TYPED_URL` (never `dcrouterGatewayUrl`, never CoreMail); absent, Cloudly refuses the typed dcrouter-direct binding naming it. `validateDcrouterMailEndpointUrl` accepts only an `https:` URL without credentials, query or fragment, at most `dcrouterMailEndpointUrlMaximumLength` (2,048) characters, in its `new URL(value).href` form. `serviceMailEnvironmentNames` spells the default sender's names (`MAIL_FROM`, `MAIL_TYPED_URL`, `MAIL_API_CREDENTIAL_*`, `SMTP_*`, `MAIL_COREMAIL_*`) and `createServiceMailAddressEnvironmentNames(token)` the `MAIL_<TOKEN>_*` names of a further sender address. Specs: `test.workloadreplicaidentity`, `test.servicemailenvironment`, `test.serviceruntime`.
10
+
11
+ ### Deprecations
12
+
13
+ - `ICoreMailReplicaIdentity` (`taskId`, `serviceId`, `rolloutId`, `rolloutGeneration`, `imageDigest`): CoreMail 34 reports `IWorkloadReplicaIdentity`. The normalizer and both carrying types keep reading it, exactly, from a CoreMail before 34; removed in the next major.
14
+ - Type-level break in this minor, shipped in 32.x by arbiter ruling because an interfaces major makes every Cloudly, Pallet and Spark handshake refuse its peer. On the wire, what existing writers send is unchanged and this release reads it as before; what is new, CoreMail 34's `IWorkloadReplicaIdentity` and the refusal `workload-identity-environment-conflict`, is refused by every reader built before this release, so readers upgrade first (see Features). In source, `ICoreMailReconciliationStatus.replica`, `IReq_CoreMailAuthenticateControl.response.replica` and the return value of `normalizeCoreMailReplicaIdentity` are now `IWorkloadReplicaIdentity | ICoreMailReplicaIdentity`, so code that reads `.taskId`, `.rolloutId` or `.rolloutGeneration` directly no longer compiles until it narrows, e.g. `'taskId' in replica ? replica.taskId : replica.attemptId`. The consumers that move with it: `@serve.zone/api` (`CoreMailControlClient`), Cloudly (CoreMail manager), Onebox (CoreMail provider) and CoreMail.
15
+
16
+ ### Maintenance
17
+
18
+ - Release tooling currency: pnpm 12.13.0 -> 12.14.0 (`@git.zone/tsrepo` ^1.1.1 and `@types/node` 26.6.5 are current).
19
+
20
+ ## 2026-10-21 - 32.61.0
21
+
22
+ ### Features
23
+
24
+ - Delegated admin temp tokens (`data.delegatedAdminTokenContract`): a human administrator who signed in within five minutes mints a token for explicit scopes, which lives one hour by default and at most one hour (`defaultLifetimeMs`, `maximumLifetimeMs`, `minimumLifetimeMs` one minute) and is never extended. `delegatedAdminTokenScopes` is the allowlist (`secrets`, `serviceCredentials`) and `delegatedAdminTokenScopeRequests` names exactly the wire methods each admits (typed as `TDelegatedAdminTokenScopeRequest`, judged by `isDelegatedAdminTokenScopeRequest`): `secrets` the operator-managed secret lifecycle (`getSecretIngressRecipient`, `listSecrets`, `getSecretMetadata`, `createSecret`, `rotateSecret`, `changeSecretLifecycle` with the actions `delegatedAdminTokenSecretLifecycleActions` names, `retire` and `revoke` of a granted key, never `delete`), `serviceCredentials` the service platform credential (`getServiceMachineCredential`, `mutateServiceMachineCredential`). A mint may grant `secretKeyPrefixes` (only with `secrets`, at most `maximumSecretKeyPrefixes` 16, each `isDelegatableSecretKeyPrefix`: `^[A-Z][A-Z0-9]*_$` and overlapping no reserved name either way, so a granted prefix is application-specific such as `GITSYNC_`, and `GIT_`, `NPM_` or `AWS_` are refused), under which alone the token creates, rotates, retires and revokes secrets (`isDelegatedSecretKey`); a token without prefixes does none of these. A token creates a secret only as a launcher-environment variable, never as a file. New requests `requests.admin.IReq_Admin_MintDelegatedAdminToken` (`mintDelegatedAdminToken`: `IDelegatedAdminTokenMint`, i.e. `scopes`, optional `lifetimeMs` and `secretKeyPrefixes`; answers the token once with its metadata), `IReq_Admin_GetDelegatedAdminTokens` (`getDelegatedAdminTokens`: the active tokens, value-free, newest first, at most `maximumListedTokens`, with `truncated`) and `IReq_Admin_RevokeDelegatedAdminToken` (`revokeDelegatedAdminToken`: by `tokenId`, any administrator), with value-free `IDelegatedAdminTokenMetadata` (scopes and `secretKeyPrefixes` included), refusals `delegatedAdminTokenRefusals` as `IDelegatedAdminTokenErrorData`, the exact token form `delegatedAdminToken_<tokenId>_<secret>` (`isDelegatedAdminToken`, `isDelegatedAdminTokenId`, `isDelegatedAdminTokenLifetime`) and exact-key snapshots (`snapshotDelegatedAdminTokenMint`, `snapshotDelegatedAdminTokenMetadata`, `snapshotDelegatedAdminTokenMintResult`). `getIdentityByToken` documents the session a token is exchanged for (`type: 'machine'`, `role: 'api'`, `userId: 'delegated-admin-token:<tokenId>'`). Specs: `test.delegatedadmintoken` (lifetime cap and token form, the scope and request lists and the delegated lifecycle actions, canonical scopes and exact keys, the token answered only by a mint, metadata without any value and with whole revocation, reserved names, grantable prefixes and delegated keys, named refusals).
25
+ - Reserved secret names (`data.secret`): `platformReservedSecretKeyPrefixes` (`SERVEZONE_`, the names the platform injects), `runtimeInjectionSecretKeyPrefixes` (`LD_`, `DYLD_`, `NODE_`, `DENO_`, `BUN_`, `PYTHON`, `PERL`, `RUBY`, `PHP`, `JAVA_`, `JDK_`, `_JAVA_`, `DOTNET_`, `CORECLR_`, `LUA_`, `GEM_`, `BUNDLE_`, `NPM_CONFIG_`, `PIP_`, `GLIBC_`, `MALLOC_`, `GCONV_`, `OPENSSL_`, `SSL_`, `CURL_`, `REQUESTS_`, `GIT_`), `runtimeInjectionSecretKeys` (`PATH`, `HOME`, `SHELL`, `ENV`, `BASH_ENV`, `IFS`, `TMPDIR`, `LOCPATH`, `NLSPATH`, `CLASSPATH`, `HTTP_PROXY`, `HTTPS_PROXY`, `ALL_PROXY`, `NO_PROXY`, `FTP_PROXY`, `AWS_CA_BUNDLE`, `SSLKEYLOGFILE`) and `isReservedSecretKey`. A delegated admin token never writes, retires or revokes such a name; human administrators are not restricted by them yet. The existing key pattern (`^[A-Z_][A-Z0-9_]{0,252}$`) admits a leading underscore, so `_JAVA_*` names exist and are covered.
26
+
27
+ ### Fixes
28
+
29
+ - Gateway route DNS no longer claims manual records (AGL-523): the `reconcile` mode documentation (`data.TGatewayRouteDnsMode`) now says a gateway creates, updates and deletes only the exact-host A or AAAA record its route ownership holds and never adopts, replaces or deletes a record without gateway DNS ownership. Manual records satisfy a route only when no record at the name is owned and every manual A or AAAA record there matches the desired type, value and proxied flag; a differing record, any CNAME, owned and manual records together, or an operator-protected hostname is a non-retryable `record-conflict` with no mutation. While another enabled route on the gateway still serves the hostname, a withdrawn route releases its record to manual ownership instead of deleting it. `data.TGatewayRouteDnsStatus` gains `manual-satisfied` (every manual record matches; the gateway changes and claims nothing and reports them with `managed: false`) and `managed-released` (the record was released instead of deleted and is reported with `managed: false`); `managed-overwrote-manual`, `managed-orphan-deleted` and `IGatewayRouteDnsResult.overwrittenRecords` are deprecated, as no gateway reports them.
30
+
31
+ ### Maintenance
32
+
33
+ - Release tooling: `@git.zone/tsrepo` ^1.1.1 replaces tsbuild, tstest, tsrun and tsdoc (deprecated in its favour): the scripts call `tsrepo build tsfolders`, `tsrepo test` and `tsrepo docs`, the specs import `@git.zone/tsrepo/tapbundle`, and the `.smartconfig.json` section `@git.zone/tsdoc` moved to `"@git.zone/tsrepo"` `docs`. `@types/node` 26.6.5 and pnpm 12.13.0 are current.
34
+
3
35
  ## 2026-10-20 - 32.60.0
4
36
 
5
37
  ### Fixes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/interfaces',
6
- version: '32.60.0',
6
+ version: '32.62.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=
@@ -6,6 +6,7 @@
6
6
  * delivery identifiers only and never caller-selected tenant, service, or
7
7
  * binding authority.
8
8
  */
9
+ import type { IWorkloadReplicaIdentity } from './workloadreplicaidentity.js';
9
10
  export type TCoreMailSha256 = `sha256:${string}`;
10
11
  export type TCoreMailCapability = 'outbound' | 'inbound';
11
12
  export type TCoreMailBindingState = 'active' | 'draining' | 'disabled';
@@ -222,6 +223,15 @@ export interface ICoreMailDesiredState {
222
223
  smtp?: ICoreMailSmtpDesiredState;
223
224
  cursorKeys: ICoreMailRuntimeKeyReference[];
224
225
  }
226
+ /**
227
+ * The replica identity CoreMail before 34 reports, read from the `COREMAIL_*` variables its
228
+ * provisioner fabricated.
229
+ *
230
+ * @deprecated CoreMail 34 and later report `IWorkloadReplicaIdentity`, which its runtime injects
231
+ * (`workloadReplicaIdentityEnvironmentNames`); `taskId` is that identity's `attemptId`.
232
+ * `normalizeCoreMailReplicaIdentity` still reads this shape, exactly, from a CoreMail before 34;
233
+ * removed in the next major.
234
+ */
225
235
  export interface ICoreMailReplicaIdentity {
226
236
  taskId: string;
227
237
  serviceId: string;
@@ -241,7 +251,11 @@ export interface ICoreMailBindingReconciliationStatus {
241
251
  }>;
242
252
  }
243
253
  export interface ICoreMailReconciliationStatus {
244
- replica: ICoreMailReplicaIdentity;
254
+ /**
255
+ * The reporting replica: `IWorkloadReplicaIdentity` from CoreMail 34 on, the deprecated
256
+ * `ICoreMailReplicaIdentity` from an earlier CoreMail. Each is read exactly.
257
+ */
258
+ replica: IWorkloadReplicaIdentity | ICoreMailReplicaIdentity;
245
259
  state: TCoreMailReconciliationState;
246
260
  appliedConfigEpoch: number;
247
261
  appliedDesiredStateDigest: TCoreMailSha256;
@@ -387,4 +401,26 @@ export declare const coreMailRuntimeKeys: Readonly<{
387
401
  readonly controlBootstrap: 'COREMAIL_CONTROL_BOOTSTRAP';
388
402
  readonly controlCredentialSecret: 'COREMAIL_CONTROL_CREDENTIAL_SECRET';
389
403
  readonly gatewayCredentialSecret: 'COREMAIL_GATEWAY_CREDENTIAL';
404
+ /** Optional listener port inside the workload. */
405
+ readonly port: 'COREMAIL_PORT';
406
+ /** Optional comma-separated canonical hostname list. */
407
+ readonly hostnames: 'COREMAIL_HOSTNAMES';
408
+ /** Optional MongoDB connection pool bound. */
409
+ readonly mongoDbMaxPoolSize: 'COREMAIL_MONGODB_MAX_POOL_SIZE';
410
+ }>;
411
+ /**
412
+ * The storage CoreMail 34 and later read, under the names its platform bindings deliver: the
413
+ * Corestore database binding's `MONGODB_URL` and `MONGODB_DATABASE`, the object-storage binding's
414
+ * `S3_ENDPOINT`, `S3_REGION` and `S3_BUCKET`, and that binding's `S3_ACCESS_KEY` and
415
+ * `S3_SECRET_KEY` secrets. They replace `COREMAIL_MONGODB_URL`, `COREMAIL_MONGODB_NAME`,
416
+ * `COREMAIL_STORAGE_DESCRIPTOR` and `COREMAIL_BUCKET_NAME`.
417
+ */
418
+ export declare const coreMailStorageEnvironmentNames: Readonly<{
419
+ readonly databaseUrl: 'MONGODB_URL';
420
+ readonly databaseName: 'MONGODB_DATABASE';
421
+ readonly objectStorageEndpoint: 'S3_ENDPOINT';
422
+ readonly objectStorageRegion: 'S3_REGION';
423
+ readonly objectStorageBucket: 'S3_BUCKET';
424
+ readonly objectStorageAccessKey: 'S3_ACCESS_KEY';
425
+ readonly objectStorageSecretKey: 'S3_SECRET_KEY';
390
426
  }>;
@@ -100,5 +100,27 @@ export const coreMailRuntimeKeys = Object.freeze({
100
100
  controlBootstrap: 'COREMAIL_CONTROL_BOOTSTRAP',
101
101
  controlCredentialSecret: 'COREMAIL_CONTROL_CREDENTIAL_SECRET',
102
102
  gatewayCredentialSecret: 'COREMAIL_GATEWAY_CREDENTIAL',
103
+ /** Optional listener port inside the workload. */
104
+ port: 'COREMAIL_PORT',
105
+ /** Optional comma-separated canonical hostname list. */
106
+ hostnames: 'COREMAIL_HOSTNAMES',
107
+ /** Optional MongoDB connection pool bound. */
108
+ mongoDbMaxPoolSize: 'COREMAIL_MONGODB_MAX_POOL_SIZE',
103
109
  });
104
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZW1haWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2NvcmVtYWlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7O0dBT0c7QUFxWUgsTUFBTSxDQUFDLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDMUMsbUJBQW1CLEVBQUUsRUFBRSxHQUFHLElBQUk7SUFDOUIsaUJBQWlCLEVBQUUsQ0FBQyxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2xDLGFBQWEsRUFBRSxDQUFDLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDOUIsYUFBYSxFQUFFLENBQUMsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUM5QixlQUFlLEVBQUUsRUFBRTtJQUNuQixlQUFlLEVBQUUsRUFBRSxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2pDLHdCQUF3QixFQUFFLEVBQUUsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUMxQyxnQkFBZ0IsRUFBRSxHQUFHLEdBQUcsSUFBSTtJQUM1QixtQkFBbUIsRUFBRSxFQUFFLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDckMsY0FBYyxFQUFFLEdBQUc7SUFDbkIsZUFBZSxFQUFFLEdBQUc7SUFDcEIsZ0JBQWdCLEVBQUUsRUFBRSxHQUFHLElBQUk7SUFDM0IsV0FBVyxFQUFFLEtBQUs7SUFDbEIseUJBQXl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O0NBQ2xELENBQUMsQ0FBQztBQUVILE1BQU0sQ0FBQyxNQUFNLHdCQUF3QixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDcEQsVUFBVSxFQUFFLGFBQWE7SUFDekIsbUJBQW1CLEVBQUUsUUFBUTtJQUM3QixnQkFBZ0IsRUFBRSxHQUFHO0lBQ3JCLGdCQUFnQixFQUFFLEdBQUc7SUFDckIsb0JBQW9CLEVBQUUsSUFBSTtJQUMxQixrQkFBa0IsRUFBRSxJQUFJO0lBQ3hCLGVBQWUsRUFBRSwrQkFBd0M7Q0FDMUQsQ0FBQyxDQUFDO0FBRUgsTUFBTSxDQUFDLE1BQU0sZ0NBQWdDLEdBQUcsTUFBTSxDQUFDLE1BQU0sQ0FBQztJQUM1RCxNQUFNLEVBQUUsVUFBbUI7SUFDM0IsT0FBTyxFQUFFLEVBQUU7SUFDWCxVQUFVLEVBQUUsTUFBTTtJQUNsQixRQUFRLEVBQUUsQ0FBQztJQUNYLFdBQVcsRUFBRSxDQUFDO0lBQ2QsZUFBZSxFQUFFLEVBQUU7SUFDbkIsZUFBZSxFQUFFLEVBQUU7Q0FDWCxDQUFDLENBQUM7QUFFWixNQUFNLENBQUMsTUFBTSxtQkFBbUIsR0FBRyxNQUFNLENBQUMsTUFBTSxDQUFDO0lBQy9DLGdCQUFnQixFQUFFLDRCQUE0QjtJQUM5Qyx1QkFBdUIsRUFBRSxvQ0FBb0M7SUFDN0QsdUJBQXVCLEVBQUUsNkJBQTZCO0NBQzlDLENBQUMsQ0FBQyJ9
110
+ /**
111
+ * The storage CoreMail 34 and later read, under the names its platform bindings deliver: the
112
+ * Corestore database binding's `MONGODB_URL` and `MONGODB_DATABASE`, the object-storage binding's
113
+ * `S3_ENDPOINT`, `S3_REGION` and `S3_BUCKET`, and that binding's `S3_ACCESS_KEY` and
114
+ * `S3_SECRET_KEY` secrets. They replace `COREMAIL_MONGODB_URL`, `COREMAIL_MONGODB_NAME`,
115
+ * `COREMAIL_STORAGE_DESCRIPTOR` and `COREMAIL_BUCKET_NAME`.
116
+ */
117
+ export const coreMailStorageEnvironmentNames = Object.freeze({
118
+ databaseUrl: 'MONGODB_URL',
119
+ databaseName: 'MONGODB_DATABASE',
120
+ objectStorageEndpoint: 'S3_ENDPOINT',
121
+ objectStorageRegion: 'S3_REGION',
122
+ objectStorageBucket: 'S3_BUCKET',
123
+ objectStorageAccessKey: 'S3_ACCESS_KEY',
124
+ objectStorageSecretKey: 'S3_SECRET_KEY',
125
+ });
126
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29yZW1haWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9kYXRhL2NvcmVtYWlsLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7O0dBT0c7QUFzWkgsTUFBTSxDQUFDLE1BQU0sY0FBYyxHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDMUMsbUJBQW1CLEVBQUUsRUFBRSxHQUFHLElBQUk7SUFDOUIsaUJBQWlCLEVBQUUsQ0FBQyxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2xDLGFBQWEsRUFBRSxDQUFDLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDOUIsYUFBYSxFQUFFLENBQUMsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUM5QixlQUFlLEVBQUUsRUFBRTtJQUNuQixlQUFlLEVBQUUsRUFBRSxHQUFHLElBQUksR0FBRyxJQUFJO0lBQ2pDLHdCQUF3QixFQUFFLEVBQUUsR0FBRyxJQUFJLEdBQUcsSUFBSTtJQUMxQyxnQkFBZ0IsRUFBRSxHQUFHLEdBQUcsSUFBSTtJQUM1QixtQkFBbUIsRUFBRSxFQUFFLEdBQUcsSUFBSSxHQUFHLElBQUk7SUFDckMsY0FBYyxFQUFFLEdBQUc7SUFDbkIsZUFBZSxFQUFFLEdBQUc7SUFDcE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aOzs7Ozs7R0FNRztBQUNILE1BQU0sQ0FBQyxNQUFNLCtCQUErQixHQUFHLE1BQU0sQ0FBQyxNQUFNLENBQUM7SUFDM0QsV0FBVyxFQUFFLGFBQWE7SUFDMUIsWUFBWSxFQUFFLGtCQUFrQjtJQUNoQyxxQkFBcUIsRUFBRSxhQUFhO0lBQ3BDLG1CQUFtQixFQUFFLFdBQVc7SUFDaEMsbUJBQW1CLEVBQUUsV0FBVztJQUNoQyxzQkFBc0IsRUFBRSxlQUFlO0lBQ3ZDLHNCQUFzQixFQUFFLGVBQWU7Q0FFOEUsQ0FBQyxDQUFDIn0=
@@ -1,5 +1,6 @@
1
1
  import { type ICoreMailBindingCredentialVerifier, type ICoreMailControlBootstrap, type ICoreMailDesiredState, type ICoreMailDownloadGrant, type ICoreMailEnvelope, type ICoreMailErrorData, type ICoreMailGatewayMessageDescriptor, type ICoreMailGatewayOutboundStatus, type ICoreMailGatewayPeerDesiredState, type ICoreMailInboundDelivery, type ICoreMailInboundDeliveryPage, type ICoreMailOutboundMessageDescriptor, type ICoreMailRecipientResolution, type ICoreMailRuntimeKeyReference, type ICoreMailReconciliationStatus, type ICoreMailReplicaIdentity, type ICoreMailServiceMailStatistics, type ICoreMailSubmission, type ICoreMailTransferGrant, type ICoreMailUploadGrant, type TCoreMailCapability, type TCoreMailBindingState, type TCoreMailErrorCode, type TCoreMailSha256, type TCoreMailWorkloadOperation } from './coremail.js';
2
2
  import type { IMailConnectionInfo } from './mail.js';
3
+ import { type IWorkloadReplicaIdentity } from './workloadreplicaidentity.js';
3
4
  export declare const coreMailCanonicalJsonRules: Readonly<{
4
5
  encoding: 'utf-8';
5
6
  objectKeyOrdering: 'utf-16-code-unit-ascending';
@@ -53,7 +54,15 @@ export declare const normalizeCoreMailInboundDelivery: (valueArg: unknown, pathA
53
54
  export declare const normalizeCoreMailInboundCursor: (valueArg: unknown, pathArg?: string) => string;
54
55
  export declare const normalizeCoreMailInboundDeliveryPage: (valueArg: unknown, pathArg?: string) => ICoreMailInboundDeliveryPage;
55
56
  export declare const normalizeCoreMailDesiredState: (valueArg: unknown) => ICoreMailDesiredState;
56
- export declare const normalizeCoreMailReplicaIdentity: (valueArg: unknown, pathArg?: string) => ICoreMailReplicaIdentity;
57
+ /**
58
+ * The replica a CoreMail reports, read exactly as one of two closed shapes.
59
+ *
60
+ * CoreMail 34 and later report `IWorkloadReplicaIdentity`, the identity its runtime injects, and
61
+ * it is read by that contract's own rules (`validateWorkloadReplicaIdentity`). A CoreMail before
62
+ * 34 reports the deprecated `ICoreMailReplicaIdentity`, recognised by its `taskId`, and it is read
63
+ * as before. Neither shape admits a member of the other.
64
+ */
65
+ export declare const normalizeCoreMailReplicaIdentity: (valueArg: unknown, pathArg?: string) => IWorkloadReplicaIdentity | ICoreMailReplicaIdentity;
57
66
  export declare const normalizeCoreMailReconciliationStatus: (valueArg: unknown, pathArg?: string) => ICoreMailReconciliationStatus;
58
67
  export declare const canonicalizeCoreMailDesiredState: (valueArg: unknown) => string;
59
68
  export declare const createCoreMailDesiredStateDigest: (valueArg: unknown) => Promise<TCoreMailSha256>;