@avatarsd-llc/libtracer-client 0.10.0 → 0.12.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/dist/fwd.d.ts CHANGED
@@ -147,6 +147,15 @@ export interface ParsedFwd {
147
147
  readonly mintRequest: boolean;
148
148
  /** @brief `dst` is a `PATH_REF` (`0x14`), not a canonical `PATH` (RFC-0024 §4). */
149
149
  readonly dstBound: boolean;
150
+ /**
151
+ * @brief The trailing reverse-direction list a mint-flagged FORWARDED request carries — a
152
+ * `PATH_REF_REVERSE` (`0x15`), RFC-0024 §7.1 amendments 1 and 2 (else `null`).
153
+ *
154
+ * Identified by its TYPE, never by its position: a WRITE's payload is whatever stands in
155
+ * the payload slot as long as it is not this code, INCLUDING a raw `PATH_REF`. The origin
156
+ * never emits the child, so this is `null` on every frame a client builds.
157
+ */
158
+ readonly reverse: Tlv | null;
150
159
  }
151
160
  /**
152
161
  * @brief The opcode field of the `op` byte — bits 5-0 (RFC-0024 §7.5).
package/dist/fwd.js CHANGED
@@ -278,7 +278,9 @@ export function parseFwdTlv(fwd) {
278
278
  payload = ch[i++];
279
279
  }
280
280
  else if (op === FWD_OP.WRITE) {
281
- if (i < ch.length)
281
+ // The reverse list is told from the payload by its TYPE (RFC-0024 §7.1 amendment 2), so a
282
+ // raw PATH_REF payload is a payload and only 0x15 is the list.
283
+ if (i < ch.length && ch[i].type !== TYPE.PATH_REF_REVERSE)
282
284
  payload = ch[i++];
283
285
  }
284
286
  else if (op === FWD_OP.AWAIT) {
@@ -287,7 +289,10 @@ export function parseFwdTlv(fwd) {
287
289
  i++;
288
290
  }
289
291
  }
290
- return { op, dst, field, src, kind, payload, awaitTimeoutNs, mintRequest, dstBound };
292
+ // Licensed only on a mint-flagged request (§7.1 amendment 1): on an unflagged frame a
293
+ // trailing 0x15 binds no route and stays unparsed.
294
+ const reverse = mintRequest && ch[i]?.type === TYPE.PATH_REF_REVERSE ? ch[i] : null;
295
+ return { op, dst, field, src, kind, payload, awaitTimeoutNs, mintRequest, dstBound, reverse };
291
296
  }
292
297
  /**
293
298
  * @brief Decode a complete FWD frame's bytes into its parsed children.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avatarsd-llc/libtracer-client",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "description": "EXPERIMENTAL libtracer client SDK (#56, ADR-0034/0035) — a path-addressed client over the cross-validated codec (@avatarsd-llc/libtracer) and an injected transport seam (e.g. @avatarsd-llc/libtracer-ws). Speaks the RFC-0004 remote operations over FWD: read / write / await / readField / subscribe, each a FWD frame whose source-routed FWD{REPLY} is decoded back. Pre-1.0 and experimental.",
5
5
  "author": "avatarsd LLC",
6
6
  "license": "Apache-2.0",
@@ -33,8 +33,8 @@
33
33
  "access": "public"
34
34
  },
35
35
  "peerDependencies": {
36
- "@avatarsd-llc/libtracer": ">=0.10.0 <0.11.0",
37
- "@avatarsd-llc/libtracer-ws": ">=0.10.0 <0.11.0"
36
+ "@avatarsd-llc/libtracer": ">=0.12.0 <0.13.0",
37
+ "@avatarsd-llc/libtracer-ws": ">=0.12.0 <0.13.0"
38
38
  },
39
39
  "peerDependenciesMeta": {
40
40
  "@avatarsd-llc/libtracer-ws": {