@hile/micro-dynamic-configs 4.0.5 → 4.0.6

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 +5 -0
  2. package/README.md +2 -0
  3. package/package.json +3 -3
package/AI.md CHANGED
@@ -281,6 +281,9 @@ import { MessageWorkerThread } from '@hile/message-worker-thread'
281
281
  - `defineMicroMessage()` handlers receive request streams as `input: Readable | undefined`, separately from structured `data` and `invocation`.
282
282
  - `Application.call(namespace, url, data, options)` requires `options.context` and returns a promise. It accepts `options.input` for a streamed request with a normal response.
283
283
  - `Application.stream(namespace, url, data, options)` requires `options.context` and returns a readable response stream; it can carry a request input stream at the same time.
284
+ - `Application.call()` and `Application.stream()` may target the application's own namespace. Self calls use the same Registry-discovered WebSocket and modem protocol as remote calls, so Context validation, request and response streams, cancellation, timeout, retry, circuit-breaker, and backpressure behavior stay uniform; business handlers do not need a local-call branch.
285
+ - A peer address (`host:port`) is the routing and reuse identity, not an individual WebSocket identity. If both peers dial each other concurrently, including an application dialing itself, the server preserves both physical connections while they are active instead of replacing a connection that may carry an in-flight request. Later calls still reuse the cached peer connection.
286
+ - This connection bookkeeping does not add or change wire frames; request, response, stream, credit, cancel, and abort protocol fields remain unchanged.
284
287
  - `Application.call()` and `Application.stream()` default retries to `0` when request input is streamed. Explicit nonzero retries fail before service discovery because streamed input is non-replayable.
285
288
  - A caller-owned request input source failure is surfaced as `MessageInputError`, aborts the peer invocation, and is not counted against that peer's circuit-breaker health.
286
289
  - `Application.publish(topic, payload)` returns an object with `update()` and `unpublish()`.
@@ -292,6 +295,7 @@ import { MessageWorkerThread } from '@hile/message-worker-thread'
292
295
  - Appending a secondary response getter to `client.request('/x', data)`
293
296
  - Returning a plain object from a handler called through `stream()`.
294
297
  - Retrying a consumed request stream or hiding it inside a replay-unsafe factory.
298
+ - Branching business code on whether a Micro target namespace is local or remote.
295
299
  - Using pub/sub as a durable queue.
296
300
  - Forgetting to register `shutdown(await app.listen(...))`.
297
301
 
@@ -299,6 +303,7 @@ import { MessageWorkerThread } from '@hile/message-worker-thread'
299
303
 
300
304
  - Micro message files default-export `defineMicroMessage(...)` and receive `invocation.context`.
301
305
  - RPC callers use `await app.call(..., { context })`.
306
+ - Same-namespace `call()` and `stream()` use normal Registry discovery, while `streamPeer()` keeps its exact-address selection; all three use the normal WebSocket/modem transport path and callers do not branch on locality.
302
307
  - Streaming handlers are async generators.
303
308
  - Request-stream handlers consume `input` and callers either pass `options.input` alongside metadata or pass a stream directly as `data`.
304
309
  - Streamed request calls do not configure nonzero retries.
package/README.md CHANGED
@@ -80,6 +80,7 @@ const result = await app.call('example.service', '/ping', { hello: 'world' }, {
80
80
  - Appending a secondary response getter to `client.request('/x', data)`
81
81
  - Returning a plain object from a handler called through `stream()`.
82
82
  - Retrying a consumed request stream or hiding it inside a replay-unsafe factory.
83
+ - Branching business code on whether a Micro target namespace is local or remote.
83
84
  - Using pub/sub as a durable queue.
84
85
  - Forgetting to register `shutdown(await app.listen(...))`.
85
86
 
@@ -87,6 +88,7 @@ const result = await app.call('example.service', '/ping', { hello: 'world' }, {
87
88
 
88
89
  - Micro message files default-export `defineMicroMessage(...)` and receive `invocation.context`.
89
90
  - RPC callers use `await app.call(..., { context })`.
91
+ - Same-namespace `call()` and `stream()` use normal Registry discovery, while `streamPeer()` keeps its exact-address selection; all three use the normal WebSocket/modem transport path and callers do not branch on locality.
90
92
  - Streaming handlers are async generators.
91
93
  - Request-stream handlers consume `input` and callers either pass `options.input` alongside metadata or pass a stream directly as `data`.
92
94
  - Streamed request calls do not configure nonzero retries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hile/micro-dynamic-configs",
3
- "version": "4.0.5",
3
+ "version": "4.0.6",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -24,9 +24,9 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@hile/ioredis": "^4.0.2",
27
- "@hile/micro": "^4.0.5",
27
+ "@hile/micro": "^4.0.6",
28
28
  "ioredis": "^5.11.0",
29
29
  "zod": "^4.4.3"
30
30
  },
31
- "gitHead": "c57b2c5a3c017ae56d4a862a089b2af01368c3ba"
31
+ "gitHead": "f845e0eb6a9d56ef72d2305624ad44abcdff5063"
32
32
  }