@serve.zone/dcrouter 32.1.3 → 32.2.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
@@ -342,6 +342,8 @@ Web Push is disabled by default and does not read its secret configuration while
342
342
 
343
343
  Each key ring has the form `{"currentKeyId":"key-2026-07","keys":{"key-2026-07":"<32-byte-unpadded-base64url>"}}`, supports at most eight distinct keys, and must name a configured current key. Encryption and HMAC rings must never reuse key material.
344
344
 
345
+ All four values are resolved through `@push.rocks/qenv` from the process environment, a `.nogit/env.json` beside the working directory, or a Docker secret, in that order. dcrouter ships no `qenv.yml` and declares no `required:` list, because none of these names is mandatory while the feature is off: with the flag on, `WebPushManager.start()` refuses and names the missing key material, and the `webpush-encryption-context` migration refuses when sealed documents exist without `DCROUTER_WEB_PUSH_MASTER_KEY_RING`. A `qenv.yml` left in the working directory is not enforced at start; it only logs the names it finds missing.
346
+
345
347
  Operational behavior:
346
348
 
347
349
  - Control-plane callers need gateway-client `readWebPush` or `manageWebPush` capability. App calls use the one-time binding credential returned by `syncWebPushBinding`; the active credential record stores only its HMAC verifier. To recover a lost rotation response, dcrouter may return the same issuance again during its 15-minute overlap window; that recovery secret is AES-GCM encrypted at rest and is removed when the window expires.
@@ -676,7 +678,7 @@ const route = await client.routes.build()
676
678
  await route.toggle(true);
677
679
  ```
678
680
 
679
- Use `@serve.zone/dcrouter/interfaces` or `@serve.zone/dcrouter-interfaces` when you want dcrouter-local raw TypedRequest contracts instead of resource managers. Use `@serve.zone/interfaces` for the canonical machine-facing gateway client route, DNS, domain, and mail contracts shared with Onebox and Cloudly.
681
+ Use `@serve.zone/dcrouter-apiclient/interfaces` (or `@serve.zone/dcrouter/interfaces` from the runtime package) when you want dcrouter-local raw TypedRequest contracts instead of resource managers. Use `@serve.zone/interfaces` for the canonical machine-facing gateway client route, DNS, domain, and mail contracts shared with Onebox and Cloudly.
680
682
 
681
683
  dcrouter 32.0.0 builds against `@serve.zone/interfaces` 32.0.0: the installed interfaces release is the contract version, there is no version field on the wire and no per-shape version suffix. dcrouter serves no session that carries the 32 protocol handshake and opens none — its gateway-client, mail, Web Push and CoreMail gateway contracts are unchanged in 32.0.0 and carry no protocol offer — so no caller has to send one.
682
684
 
@@ -888,17 +890,43 @@ Host networking is the simplest container mode for a gateway that owns HTTP/S, S
888
890
 
889
891
  ## Published Modules
890
892
 
891
- This repository intentionally publishes multiple module boundaries from one codebase.
892
-
893
- | Module | Purpose | Docs |
894
- | --- | --- | --- |
895
- | `@serve.zone/dcrouter` | Main runtime and orchestrator | `./readme.md` |
896
- | `@serve.zone/dcrouter/interfaces` | Shared contracts as a subpath export | `./ts_interfaces/readme.md` |
897
- | `@serve.zone/dcrouter/apiclient` | API client as a subpath export | `./ts_apiclient/readme.md` |
898
- | `@serve.zone/dcrouter-interfaces` | Standalone contracts package | `./ts_interfaces/readme.md` |
899
- | `@serve.zone/dcrouter-apiclient` | Standalone OO API client package | `./ts_apiclient/readme.md` |
900
- | `@serve.zone/dcrouter-migrations` | Standalone migration runner package | `./ts_migrations/readme.md` |
901
- | `@serve.zone/dcrouter-web` | Dashboard frontend module boundary | `./ts_web/readme.md` |
893
+ This repository defines two npm packages from one codebase.
894
+
895
+ | Package | Entry point | Purpose | Platform | Docs |
896
+ | --- | --- | --- | --- | --- |
897
+ | `@serve.zone/dcrouter` | `.` | Runtime and orchestrator | Linux x64/arm64 | `./readme.md` |
898
+ | `@serve.zone/dcrouter` | `./interfaces` | Shared contracts as a subpath of the runtime | Linux x64/arm64 | `./ts_interfaces/readme.md` |
899
+ | `@serve.zone/dcrouter` | `./apiclient` | API client as a subpath of the runtime | Linux x64/arm64 | `./ts_apiclient/readme.md` |
900
+ | `@serve.zone/dcrouter-apiclient` | `.` | API client without the server | Linux x64/arm64 | `./ts_apiclient/readme.md` |
901
+ | `@serve.zone/dcrouter-apiclient` | `./interfaces` | Shared contracts without the server | Linux x64/arm64 | `./ts_interfaces/readme.md` |
902
+
903
+ Install `@serve.zone/dcrouter-apiclient` when you consume the API rather than
904
+ operate the router: it declares 8 dependencies against the runtime package's 48
905
+ and resolves a production closure of 184 packages instead of 579, dropping the
906
+ native `argon2` build, `mongodb`, `@lossless.org/client`, the dashboard
907
+ component library, `@push.rocks/smartdata` and `@push.rocks/smartbucket`.
908
+ `@serve.zone/dcrouter` keeps both subpath exports, so existing consumers
909
+ migrate whenever it suits them, and a consumer whose runtime version has no
910
+ matching `@serve.zone/dcrouter-apiclient` release on the registry imports the
911
+ same client from `@serve.zone/dcrouter/apiclient`.
912
+
913
+ **Both packages install on Linux x64 and arm64 only.** Contract members are
914
+ typed against `@push.rocks/smartmta`, `@push.rocks/smartproxy` and
915
+ `@push.rocks/smartnetwork`, so the client package depends on them even though
916
+ those imports are type-only, and `@push.rocks/smartmta` declares
917
+ `os: ["linux"]` with `cpu: ["x64", "arm64"]`; installing elsewhere fails with
918
+ `ERR_PNPM_UNSUPPORTED_PLATFORM`. The constraint is upstream: it goes away once
919
+ `@push.rocks/smartproxy`, `@push.rocks/smartmta` and `@push.rocks/smartnetwork`
920
+ move their Rust payloads into per-platform optional packages.
921
+
922
+ `ts_migrations` and `ts_web` are internal module boundaries of the runtime
923
+ package and are not published separately (`./ts_migrations/readme.md`,
924
+ `./ts_web/readme.md`).
925
+
926
+ `gitzone release` publishes `@serve.zone/dcrouter` and qualifies the Docker
927
+ images. `@serve.zone/dcrouter-apiclient` is not part of that release:
928
+ `pnpm run publish:packages` publishes it afterwards, at the version the release
929
+ cut, so its registry versions can trail the runtime's.
902
930
 
903
931
  ## Development
904
932
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/dcrouter',
6
- version: '32.1.3',
6
+ version: '32.2.0',
7
7
  description: 'A multifaceted routing service handling mail and SMS delivery functions.'
8
8
  }
@@ -419,8 +419,16 @@ export class DcRouter {
419
419
  // Live DoH routes used during SmartProxy bootstrap before RouteConfigManager re-applies stored routes.
420
420
  private runtimeDnsRoutes: plugins.smartproxy.IRouteConfig[] = [];
421
421
 
422
- // Environment access
423
- private qenv = new plugins.qenv.Qenv('./', '.nogit/');
422
+ // Environment access. dcrouter ships no qenv.yml and declares no `required:` list, because it has
423
+ // no unconditionally mandatory variable: every name it reads is conditional on a feature being
424
+ // switched on or on what is already stored (the Web Push key rings, and the master key ring the
425
+ // reseal migration below only demands when sealed documents exist), and every other name is read
426
+ // straight from `process.env` with a default of its own. The reader owns the refusal in each case
427
+ // and names the missing variable and the feature it blocks, so `failOnMissing` is false here and
428
+ // at the second construction site
429
+ // (`ts/webpush/classes.webpush-manager.ts`): a qenv.yml an operator leaves in the working
430
+ // directory must never take the DNS and mail gateway down for a disabled optional feature.
431
+ private qenv = new plugins.qenv.Qenv('./', '.nogit/', false);
424
432
 
425
433
  constructor(optionsArg: IDcRouterOptions) {
426
434
  const coreTrafficConfig = optionsArg.coreTrafficConfig || optionsArg.smartProxyConfig;
package/ts/readme.md CHANGED
@@ -77,9 +77,9 @@ await router.start();
77
77
  | Need | Module |
78
78
  | --- | --- |
79
79
  | A higher-level client SDK for a running router | `@serve.zone/dcrouter-apiclient` or `@serve.zone/dcrouter/apiclient` |
80
- | Raw TypedRequest request/data contracts | `@serve.zone/dcrouter-interfaces` or `@serve.zone/dcrouter/interfaces` |
81
- | The standalone migration runner | `@serve.zone/dcrouter-migrations` |
82
- | The browser dashboard module boundary | `@serve.zone/dcrouter-web` |
80
+ | Raw TypedRequest request/data contracts | `@serve.zone/dcrouter-apiclient/interfaces` or `@serve.zone/dcrouter/interfaces` |
81
+ | The migration runner | `ts_migrations/` in this repository (`../ts_migrations/readme.md`) |
82
+ | The browser dashboard module boundary | `ts_web/` in this repository (`../ts_web/readme.md`) |
83
83
 
84
84
  ## License and Legal Information
85
85
 
@@ -621,6 +621,9 @@ export class WebPushManager {
621
621
  private inactiveLifecycleCursor?: string;
622
622
 
623
623
  public constructor(optionsArg: IWebPushManagerOptions = {}) {
624
+ // Same arguments as the DcRouter-owned instance (`ts/classes.dcrouter.ts`), for the reason
625
+ // stated there: no qenv.yml declares these names as required, because they are only required
626
+ // once DCROUTER_WEB_PUSH_ENABLED is on — `start()` below is what refuses, naming all three.
624
627
  this.qenv = optionsArg.qenv ?? new plugins.qenv.Qenv('./', '.nogit/', false);
625
628
  this.transport = optionsArg.transport ?? new WebPushHttpTransport();
626
629
  this.startWorker = optionsArg.startWorker !== false;
@@ -2,6 +2,8 @@
2
2
 
3
3
  `@serve.zone/dcrouter-apiclient` is the object-oriented TypeScript client for the dcrouter OpsServer API. It wraps `/typedrequest` calls in managers, builders, and resource classes for routes, certificates, API tokens, remote ingress, email, stats, config, logs, RADIUS, and gateway-client integrations.
4
4
 
5
+ It is the client half of dcrouter without the server: installing it does not pull the runtime, the dashboard, the database client or a native password hasher. It ships the shared contracts alongside the client under the `./interfaces` subpath, so a consumer that only reads request and data types never needs `@serve.zone/dcrouter` either.
6
+
5
7
  ## Issue Reporting and Security
6
8
 
7
9
  For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
@@ -12,12 +14,26 @@ For reporting bugs, issues, or security vulnerabilities, please visit [community
12
14
  pnpm add @serve.zone/dcrouter-apiclient
13
15
  ```
14
16
 
15
- The same client is also exposed as a subpath of the main package:
17
+ Two entry points:
18
+
19
+ ```typescript
20
+ import { DcRouterApiClient } from '@serve.zone/dcrouter-apiclient';
21
+ import { data, requests } from '@serve.zone/dcrouter-apiclient/interfaces';
22
+ ```
23
+
24
+ The same client and contracts remain available as subpaths of the server package for consumers that already depend on it:
16
25
 
17
26
  ```typescript
18
27
  import { DcRouterApiClient } from '@serve.zone/dcrouter/apiclient';
28
+ import { data, requests } from '@serve.zone/dcrouter/interfaces';
19
29
  ```
20
30
 
31
+ ### Platform support
32
+
33
+ **This package installs on Linux x64 and arm64 only.** Several contract members are typed against `@push.rocks/smartmta`, `@push.rocks/smartproxy` and `@push.rocks/smartnetwork`, so those packages are dependencies even though the imports are type-only, and `@push.rocks/smartmta` declares `os: ["linux"]` with `cpu: ["x64", "arm64"]`. Installing anywhere else fails with `ERR_PNPM_UNSUPPORTED_PLATFORM`. `@serve.zone/dcrouter` carries the same constraint today, so this is not a new restriction — but it does mean the client cannot yet be installed on a macOS or Windows developer machine.
34
+
35
+ The restriction is upstream and no change here lifts it. It goes away once `@push.rocks/smartproxy`, `@push.rocks/smartmta` and `@push.rocks/smartnetwork` move their Rust payloads into per-platform optional packages; today each of the three ships both the amd64 and the arm64 binary in one tarball and declares no macOS or Windows build.
36
+
21
37
  ## Quick Start
22
38
 
23
39
  ```typescript
@@ -165,13 +181,13 @@ RemoteIngress resources expose `performance` and `egress` fields. `create()` and
165
181
 
166
182
  - It does not start dcrouter.
167
183
  - It does not serve or bundle the Ops dashboard.
168
- - It does not replace `@serve.zone/dcrouter-interfaces` when you want dcrouter-local raw TypedRequest contracts.
184
+ - It does not replace the raw dcrouter-local TypedRequest contracts under `@serve.zone/dcrouter-apiclient/interfaces` when you want to talk to `/typedrequest` yourself.
169
185
 
170
- Use `@serve.zone/dcrouter` for the server runtime and `@serve.zone/dcrouter-interfaces` for dcrouter-local request/data types. The canonical machine-facing gateway client route, DNS, and domain contracts used by `client.gatewayClients` come from `@serve.zone/interfaces`.
186
+ Use `@serve.zone/dcrouter` for the server runtime. The canonical machine-facing gateway client route, DNS, and domain contracts used by `client.gatewayClients` come from `@serve.zone/interfaces`.
171
187
 
172
188
  ## Development
173
189
 
174
- This folder is published from the dcrouter monorepo via `tspublish.json` with order `5`.
190
+ This folder is published from the dcrouter monorepo through its `tspublish.json`, which also owns `ts_interfaces` and exposes it as the `./interfaces` subpath. Both folders keep the build order they always had (`ts_interfaces` first, then `ts_apiclient`). See `../ts_interfaces/readme.md` for the contract surface. `pnpm run publish:packages` is the publisher: it runs after a `gitzone release` and pushes this package at the version that release cut.
175
191
 
176
192
  Useful source entry points:
177
193
 
@@ -1,3 +1,27 @@
1
1
  {
2
- "order": 5
2
+ "name": "@serve.zone/dcrouter-apiclient",
3
+ "order": 5,
4
+ "description": "Object-oriented TypeScript client and shared TypedRequest contracts for the dcrouter OpsServer API.",
5
+ "dependencies": [
6
+ "@api.global/typedrequest",
7
+ "@api.global/typedrequest-interfaces",
8
+ "@api.global/typedsocket",
9
+ "@push.rocks/smartchallenge",
10
+ "@push.rocks/smartmta",
11
+ "@push.rocks/smartnetwork",
12
+ "@push.rocks/smartproxy",
13
+ "@serve.zone/interfaces"
14
+ ],
15
+ "folders": ["ts_interfaces"],
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist_ts_apiclient/index.d.ts",
19
+ "import": "./dist_ts_apiclient/index.js"
20
+ },
21
+ "./interfaces": {
22
+ "types": "./dist_ts_interfaces/index.d.ts",
23
+ "import": "./dist_ts_interfaces/index.js"
24
+ }
25
+ },
26
+ "registries": ["useBase"]
3
27
  }
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@serve.zone/dcrouter',
6
- version: '32.1.3',
6
+ version: '32.2.0',
7
7
  description: 'A multifaceted routing service handling mail and SMS delivery functions.'
8
8
  }
package/ts_web/readme.md CHANGED
@@ -1,6 +1,6 @@
1
- # @serve.zone/dcrouter-web
1
+ # dcrouter web
2
2
 
3
- `@serve.zone/dcrouter-web` is the browser-side Ops dashboard module for dcrouter. It provides the SPA entry point, route synchronization, app state, and web-component views that OpsServer serves from the main dcrouter runtime.
3
+ This folder is the browser-side Ops dashboard module for dcrouter. It provides the SPA entry point, route synchronization, app state, and web-component views that OpsServer serves from the main dcrouter runtime. It is an internal module boundary of `@serve.zone/dcrouter` and is not published as a package of its own.
4
4
 
5
5
  ## Issue Reporting and Security
6
6
 
@@ -48,7 +48,7 @@ The owner selection filters every displayed route projection. **All** keeps Stan
48
48
  The dashboard talks to the dcrouter OpsServer through:
49
49
 
50
50
  - TypedRequest calls for normal API actions
51
- - shared contracts from `@serve.zone/dcrouter-interfaces`
51
+ - shared contracts from `ts_interfaces`, published as `@serve.zone/dcrouter-apiclient/interfaces`
52
52
  - TypedSocket log streaming for live operational output
53
53
  - Dees web components and app-state subscriptions for UI updates
54
54
  - QR code rendering for VPN client UX
@@ -57,17 +57,11 @@ On a fresh DB-backed instance, the dashboard checks `getAdminBootstrapStatus` an
57
57
 
58
58
  ## Usage
59
59
 
60
- This package is primarily consumed by the main dcrouter build and served by OpsServer. Install it directly only when you intentionally need the dashboard module boundary.
61
-
62
- ```bash
63
- pnpm add @serve.zone/dcrouter-web
64
- ```
65
-
66
- For the full server and hosted dashboard, use `@serve.zone/dcrouter`.
60
+ The dashboard is bundled by the main dcrouter build and served by OpsServer; `@serve.zone/dcrouter` is the only way to consume it. Inside this repository, import from `ts_web/` by relative path.
67
61
 
68
62
  ## Development
69
63
 
70
- This folder is published from the dcrouter monorepo via `tspublish.json` with order `4`.
64
+ This folder builds from the dcrouter monorepo at `tspublish.json` order `4`; the descriptor is unnamed, so it orders the build and publishes nothing on its own.
71
65
 
72
66
  ```bash
73
67
  pnpm run build