arcane-os 0.22.0 → 0.22.1

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.22.1
4
+
5
+ - Change the mail gateway's default HTTPS/HTTP2 port from 8025 to 4433 in
6
+ the CLI and server configuration. Preserve explicit port overrides and the
7
+ existing occupied-port message; update current help, references and gate report.
8
+
3
9
  ## 0.22.0
4
10
 
5
11
  - Export `generateDocumentImportMaps()` from `arcane-os` for explicitly selected
package/README.md CHANGED
@@ -19,11 +19,11 @@ version-locked SDK runtime, while an integrated Arcane checkout uses its live
19
19
  `arcane/` runtime. Both profiles preserve the same app URLs, theme, packaging,
20
20
  event, cancellation, and browser run contracts.
21
21
 
22
- This checkout defines the `0.22.0` SDK contract. Applications pin one exact npm
22
+ This checkout defines the `0.22.1` SDK contract. Applications pin one exact npm
23
23
  version and lockfile; registry state is deliberately not baked into application
24
24
  artifacts.
25
25
 
26
- The [mail gateway](docs/reference/mail.md) serves HTTPS with HTTP/2 on port 8025,
26
+ The [mail gateway](docs/reference/mail.md) serves HTTPS with HTTP/2 on port 4433,
27
27
  using certificate paths from `.env.json`, and defaults browser mail to
28
28
  `/v1/mail` on the current domain. Multiple applications can share
29
29
  one server with explicit allowed origins. Subscription verification is disabled
@@ -48,7 +48,7 @@ meaning and cardinality rules:
48
48
  | `--workspace` | directory | Commands that select an external or integrated workspace; defaults to `.`. |
49
49
  | `--app` | app id or label | Workspace/app operations except shared scope and `verify-bundle`; optional diagnostic label for `mail serve`. |
50
50
  | `--arcane-root` | directory | `doctor`, native `build`/`run`, `native-doctor`, `native-prepare` |
51
- | `--host` / `--port` | host / integer 0–65535 | Browser `dev`/`run` default to HTTPS at `127.0.0.1:8000`; `mail serve` defaults to HTTPS with HTTP/2 at `0.0.0.0:8025` and accepts an explicit bind host. |
51
+ | `--host` / `--port` | host / integer 0–65535 | Browser `dev`/`run` default to HTTPS at `127.0.0.1:8000`; `mail serve` defaults to HTTPS with HTTP/2 at `0.0.0.0:4433` and accepts an explicit bind host. |
52
52
  | `--http-port` | integer 0–65535 | Browser `dev`/`run` HTTP redirect listener; defaults to `0`, which selects an available port. |
53
53
  | `--public` | flag | `dev`; binds to `0.0.0.0` unless `--host` explicitly selects another address. |
54
54
  | `--http` | flag | `dev` only; serves source and PWA routes on one HTTP listener selected by `--port`, without TLS. |
@@ -909,7 +909,7 @@ loss after the attempt begins is ambiguous because Resend may have accepted it.
909
909
  `mail serve` starts one owned HTTPS gateway with HTTP/2:
910
910
 
911
911
  ```text
912
- arcane mail serve [--profile <profile>] [--from <verified-sender>] [--app <label>] [--origin <exact-origin>] [--allow-to <addresses>] [--host 0.0.0.0] [--port 8025] [--request-timeout <ms>]
912
+ arcane mail serve [--profile <profile>] [--from <verified-sender>] [--app <label>] [--origin <exact-origin>] [--allow-to <addresses>] [--host 0.0.0.0] [--port 4433] [--request-timeout <ms>]
913
913
  ```
914
914
 
915
915
  The selected `.env.json` profile supplies only the server-side Resend API key;
@@ -932,9 +932,9 @@ opens; the TLS owner reports PEM file errors. Keep private-key material outside
932
932
  tracked source. The SDK repository already ignores `.arcane/` and `.env.json`.
933
933
 
934
934
  The selected `node-http-server` module negotiates HTTP/2 with HTTP/1.1 fallback
935
- on the same HTTPS port, default `8025`, with no plain-HTTP listener. Callers use
935
+ on the same HTTPS port, default `4433`, with no plain-HTTP listener. Callers use
936
936
  a hostname covered by the certificate, such as
937
- `https://mail.example.com:8025/v1/mail`; `0.0.0.0` identifies the bind address.
937
+ `https://mail.example.com:4433/v1/mail`; `0.0.0.0` identifies the bind address.
938
938
  Restart the gateway after replacing renewed certificate files. Certificate
939
939
  issuance and renewal remain with the deployment's certificate owner.
940
940
 
@@ -364,10 +364,10 @@ deadline.
364
364
  Start the gateway:
365
365
 
366
366
  ```text
367
- npm exec -- arcane mail serve --profile mail --host 0.0.0.0 --port 8025
367
+ npm exec -- arcane mail serve --profile mail --host 0.0.0.0 --port 4433
368
368
  ```
369
369
 
370
- The default listener is `0.0.0.0:8025`; `--host` and `--port` select its bind
370
+ The default listener is `0.0.0.0:4433`; `--host` and `--port` select its bind
371
371
  address and port. The server can serve callers from multiple domains on the
372
372
  same machine. Route the page's `/v1/mail` to this listener, or configure an
373
373
  explicit shared endpoint in the caller.
@@ -376,7 +376,7 @@ explicit shared endpoint in the caller.
376
376
  `node-http-server` PEM API owns TLS and negotiates HTTP/2 or HTTP/1.1 on the
377
377
  same listener. It creates no additional plain-HTTP listener. The returned URL
378
378
  uses `https://`; `0.0.0.0` is the bind address, so callers use the deployed
379
- domain, for example `https://mail.example.com:8025/v1/mail`.
379
+ domain, for example `https://mail.example.com:4433/v1/mail`.
380
380
 
381
381
  Set `MAIL_TLS_CERT_PATH` to the PEM certificate chain and `MAIL_TLS_KEY_PATH`
382
382
  to its PEM private-key file. These top-level settings belong to the listener
@@ -52,7 +52,7 @@ Configuration and foundational methods follow. Each baseline name is recorded so
52
52
  | `positiveInteger` | Resolves the retry delay; baseline exposes unused `allowZero`. | Y/Y/Y — Simplify. | The uncalled zero branch and its extra option/prose are removed. Current name: `readRetryDelayMs`, which resolves the actual retry-delay setting. |
53
53
  | `optionalTimeoutMs` | Reads body/provider deadlines only when supplied. | Y/Y/N — Keep. | Omitting a deadline produces no timer. Node timer-range handling prevents caller-selected delays from changing meaning. Current name remains `optionalTimeoutMs`. |
54
54
  | `normalizeRetryAfter` | Error and result constructors keep a usable retry delay. | Y/Y/N — Keep. | Retry scheduling consumes this value. It is control metadata, not a transformation of message content. Current name: `retryDelayOrZero`. |
55
- | `portNumber` | Startup resolves default or configured port, including ephemeral port zero. | Y/Y/Y — Remove wrapper; retain configuration value. | The HTTP owner handles actual port binding. Preserve default 8025 and explicit port zero; no extra port validator or domain policy is required. |
55
+ | `portNumber` | Startup resolves default or configured port, including ephemeral port zero. | Y/Y/Y — Remove wrapper; retain configuration value. | The HTTP owner handles actual port binding. Use the selected default 4433 and preserve explicit port zero; no extra port validator or domain policy is required. |
56
56
  | `validateSignal` | Direct send and server options accept caller cancellation. | Y/Y/Y — Remove wrapper; retain original signal. | Native signal operations already own their contract. Cancellation controllers/listeners and the abortable adapter remain. |
57
57
  | `validateApiKey` | Provider configuration supplies the credential used by Resend Fetch. | Y/Y/Y — Remove local format validator. | CLI credential retrieval reports missing provider credentials; Fetch/provider own actual transport validity. Never echo the credential. |
58
58
  | `validateAppId` | Validates application identity using the old lowercase-slug grammar. | Y/Y/Y — Remove the grammar and closed-list/equality admission. | Per-request identity matters and remains an ordinary string. Any application may use the shared server. Read the supplied identity for subscription verification without rewriting it; no standalone wrapper is needed solely to restrict spelling. |
@@ -395,7 +395,7 @@ cancellation before writes, and CLI defaults. Local tests and checks were not ru
395
395
  ## HTTPS and HTTP/2 follow-up
396
396
 
397
397
  The user explicitly selected HTTPS with HTTP/2. The mail listener remains on
398
- its dedicated configured port, default 8025, with the published
398
+ its dedicated configured port, now default 4433, with the published
399
399
  `node-http-server` module owning TLS, protocol negotiation and listener/session
400
400
  shutdown. This increment preserves the provider attempt, report content,
401
401
  subscription callback, sender selection, recipient configuration and cancellation.
@@ -423,3 +423,16 @@ JSON paths and missing TLS settings. Synthetic TLS selection is not evidence of
423
423
  an encrypted handshake. No local tests, checks, server launch, real TLS
424
424
  negotiation or provider send were performed for this follow-up review. Selected
425
425
  package and publication results belong to the delivery record.
426
+
427
+ ## Main mail port follow-up
428
+
429
+ The user selected 4433 as the main mail-server port. Both the CLI's omitted-port
430
+ setting and the server's programmatic default now select 4433. Explicit ports,
431
+ including ephemeral port zero, continue through the existing configuration.
432
+
433
+ The port setting passes Y/Y/N: the listener needs a bind port, deployments need
434
+ an override, and removing either would lose required behavior. Changing the two
435
+ defaults adds no runtime work or helper. TLS negotiation, the returned endpoint
436
+ and the occupied-port message already use the selected port. Existing test
437
+ source was updated for the omitted-port path; explicit-port cases were retained.
438
+ No local tests, checks or server launch were performed for this increment.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
package/src/cli/main.mjs CHANGED
@@ -85,7 +85,7 @@ Usage:
85
85
  ${CLI_NAME} mail key status [profile]
86
86
  ${CLI_NAME} mail key delete [profile]
87
87
  ${CLI_NAME} mail send [--profile <profile>] [--from <address>] --report-key <id> --report-stdin [--request-timeout <ms>]
88
- ${CLI_NAME} mail serve [--profile <profile>] [--from <address>] [--app <label>] [--origin <origin>] [--allow-to <addresses>] [--host 0.0.0.0] [--port 8025] [--request-timeout <ms>]
88
+ ${CLI_NAME} mail serve [--profile <profile>] [--from <address>] [--app <label>] [--origin <origin>] [--allow-to <addresses>] [--host 0.0.0.0] [--port 4433] [--request-timeout <ms>]
89
89
  HTTPS/HTTP2; .env.json supplies RESEND_API_KEY, MAIL_TLS_CERT_PATH, and MAIL_TLS_KEY_PATH.
90
90
 
91
91
  Development:
@@ -698,7 +698,7 @@ function operationOptions(command,parsed,cwd){
698
698
  origin:values.origin,
699
699
  allowTo:values['allow-to'],
700
700
  host:values.host??'0.0.0.0',
701
- port:readPort(values.port,8025),
701
+ port:readPort(values.port,4433),
702
702
  requestTimeout:readMailRequestTimeout(values['request-timeout']),
703
703
  };
704
704
  }
@@ -113,7 +113,7 @@ function resolveMailServerConfiguration(options={}){
113
113
  host:options.host??'0.0.0.0',
114
114
  callerAuthentication:options.verifySubscription?'subscription':'none',
115
115
  onEvent:options.onEvent,
116
- port:options.port??8025,
116
+ port:options.port??4433,
117
117
  providerTimeoutMs:optionalTimeoutMs(options.providerTimeoutMs,'providerTimeoutMs'),
118
118
  requestIdFactory:options.requestIdFactory??randomUUID,
119
119
  retryableDelayMs:readRetryDelayMs(options.retryableDelayMs),