@hile/micro 4.0.1 → 4.0.2

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 (3) hide show
  1. package/AI.md +6 -0
  2. package/README.md +2 -0
  3. package/package.json +4 -4
package/AI.md CHANGED
@@ -133,6 +133,7 @@ Use the message packages for request/response messaging over WebSocket, process
133
133
  - Do not use `stream()` for normal single-result calls.
134
134
  - Do not rely on message IDs for business idempotency. They are transport IDs.
135
135
  - Do not bypass `defineMessage()` for file-loaded handlers.
136
+ - Do not pass zero, fractional, non-finite, or oversized message timeouts. Explicit timeout values must be safe integers from `1` through `2_147_483_647` milliseconds.
136
137
 
137
138
  ## Install
138
139
 
@@ -163,7 +164,11 @@ import { MessageWorkerThread } from '@hile/message-worker-thread'
163
164
  - `MessageLoader` maps `*.msg.*` files to routes using `@hile/loader`.
164
165
  - `MessageLoader.dispatch(path, data, extras?)` invokes the matched handler.
165
166
  - `MessageModem._send()` returns a `Promise`.
167
+ - `MessageModem._send()` and `_push()` use a `30_000` ms timeout when none is provided. An explicit timeout must be a safe integer from `1` through `2_147_483_647`; invalid values throw `TypeError` before a message is sent.
166
168
  - `MessageModem._stream()` returns a Node `Readable` in object mode.
169
+ - Stream `timeout` and `idleTimeout` values use the same `1` through `2_147_483_647` ms range. The stream `window` must be a safe integer from `1` through `64` and defaults to `1`.
170
+ - Each modem schedules request, total-stream, and idle-stream deadlines through one internal deadline scheduler. This reduces active Node.js timers without changing timeout, cancellation, ordering, or error semantics.
171
+ - `@hile/message-ws` keeps public `decodeMessageFrame()` payloads isolated from caller-owned input by default. Its owned WebSocket `RawData` path uses a zero-copy binary Flight payload view internally.
167
172
  - A stream request requires `exec()` to return an async iterable.
168
173
  - `Application.call(namespace, url, data, options?)` returns a promise.
169
174
  - `Application.stream(namespace, url, data, options?)` returns a readable stream.
@@ -183,6 +188,7 @@ import { MessageWorkerThread } from '@hile/message-worker-thread'
183
188
  - Message files default-export `defineMessage(...)`.
184
189
  - RPC callers use `await app.call(...)`.
185
190
  - Streaming handlers are async generators.
191
+ - Custom modem timeout values use the documented safe-integer range.
186
192
  - Registry is started before application nodes need discovery.
187
193
  - Micro apps use stable namespaces and advertise reachable hosts.
188
194
 
package/README.md CHANGED
@@ -69,6 +69,7 @@ const result = await app.call('example.service', '/ping', { hello: 'world' })
69
69
  - Do not use `stream()` for normal single-result calls.
70
70
  - Do not rely on message IDs for business idempotency. They are transport IDs.
71
71
  - Do not bypass `defineMessage()` for file-loaded handlers.
72
+ - Do not pass zero, fractional, non-finite, or oversized message timeouts. Explicit timeout values must be safe integers from `1` through `2_147_483_647` milliseconds.
72
73
 
73
74
  - Appending a secondary response getter to `client.request('/x', data)`
74
75
  - Returning a plain object from a handler called through `stream()`.
@@ -80,6 +81,7 @@ const result = await app.call('example.service', '/ping', { hello: 'world' })
80
81
  - Message files default-export `defineMessage(...)`.
81
82
  - RPC callers use `await app.call(...)`.
82
83
  - Streaming handlers are async generators.
84
+ - Custom modem timeout values use the documented safe-integer range.
83
85
  - Registry is started before application nodes need discovery.
84
86
  - Micro apps use stable namespaces and advertise reachable hosts.
85
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hile/micro",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -26,11 +26,11 @@
26
26
  "dependencies": {
27
27
  "@hile/context": "^4.0.1",
28
28
  "@hile/logger": "^4.0.0",
29
- "@hile/message-loader": "^4.0.1",
30
- "@hile/message-ws": "^4.0.1",
29
+ "@hile/message-loader": "^4.0.2",
30
+ "@hile/message-ws": "^4.0.2",
31
31
  "internal-ip": "^9.0.0",
32
32
  "ws": "^8.21.0",
33
33
  "yaml": "^2.9.0"
34
34
  },
35
- "gitHead": "fe98c6f8cca2860ccbb213c575cfda44588cbd06"
35
+ "gitHead": "46d7bcfc78a914aa2af8cd96e41b08511f5af38e"
36
36
  }