wao 0.41.0 → 0.41.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.
@@ -868,8 +868,11 @@ var _default = exports["default"] = function _default() {
868
868
  case 10:
869
869
  evalFrom = _context6.v;
870
870
  case 11:
871
- // Cranked messages use MU addr as From for AOS trust
872
- if (_opt !== null && _opt !== void 0 && _opt["for"]) evalFrom = mu.addr;
871
+ // Cranked messages historically used MU addr as From. But AOS's
872
+ // msg.reply targets msg.From, so overwriting From to mu.addr
873
+ // breaks the X-Reference round-trip for Send().receive(). Only
874
+ // override when no explicit from is supplied by the caller.
875
+ if (_opt !== null && _opt !== void 0 && _opt["for"] && !(_opt !== null && _opt !== void 0 && _opt.from)) evalFrom = mu.addr;
873
876
  _context6.n = 12;
874
877
  return fetch("".concat(p._cu_url, "/cu/evaluate"), {
875
878
  method: "POST",
@@ -1034,9 +1037,13 @@ var _default = exports["default"] = function _default() {
1034
1037
  case 34:
1035
1038
  from = _context6.v;
1036
1039
  case 35:
1037
- // Cranked messages (inter-process) use MU addr as From for AOS trust
1038
- // From-Process tag still tracks the originating process
1039
- if (_opt["for"]) from = mu.addr;
1040
+ // Cranked messages (inter-process) historically used MU addr as
1041
+ // From for AOS trust. But AOS's msg.reply uses msg.From as Target,
1042
+ // so overwriting From to mu.addr breaks the X-Reference round-trip
1043
+ // needed for Send().receive() coroutine resumption. Preserve the
1044
+ // originating process (passed via _opt.from = opt.process from the
1045
+ // outbox-dispatch loop) so replies land back on it.
1046
+ if (_opt["for"] && !_opt.from) from = mu.addr;
1040
1047
  // check: is owner=mu.addr right?
1041
1048
  _owner = (_opt$message_item = opt.message_item) !== null && _opt$message_item !== void 0 && _opt$message_item.owner ? (0, _utils.toAddr)(opt.message_item.owner) : mu.addr;
1042
1049
  _context6.n = 36;
@@ -380,8 +380,11 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
380
380
  })
381
381
  }
382
382
  }
383
- // Cranked messages use MU addr as From for AOS trust
384
- if (_opt?.for) evalFrom = mu.addr
383
+ // Cranked messages historically used MU addr as From. But AOS's
384
+ // msg.reply targets msg.From, so overwriting From to mu.addr
385
+ // breaks the X-Reference round-trip for Send().receive(). Only
386
+ // override when no explicit from is supplied by the caller.
387
+ if (_opt?.for && !_opt?.from) evalFrom = mu.addr
385
388
  const cuResult = await fetch(`${p._cu_url}/cu/evaluate`, {
386
389
  method: "POST",
387
390
  headers: { "Content-Type": "application/json" },
@@ -465,9 +468,13 @@ export default ({ AR, scheduler, mu, su, cu, acc, AoLoader, ArMem } = {}) => {
465
468
  })
466
469
  }
467
470
  }
468
- // Cranked messages (inter-process) use MU addr as From for AOS trust
469
- // From-Process tag still tracks the originating process
470
- if (_opt.for) from = mu.addr
471
+ // Cranked messages (inter-process) historically used MU addr as
472
+ // From for AOS trust. But AOS's msg.reply uses msg.From as Target,
473
+ // so overwriting From to mu.addr breaks the X-Reference round-trip
474
+ // needed for Send().receive() coroutine resumption. Preserve the
475
+ // originating process (passed via _opt.from = opt.process from the
476
+ // outbox-dispatch loop) so replies land back on it.
477
+ if (_opt.for && !_opt.from) from = mu.addr
471
478
  // check: is owner=mu.addr right?
472
479
  const _owner = opt.message_item?.owner
473
480
  ? toAddr(opt.message_item.owner)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wao",
3
- "version": "0.41.0",
3
+ "version": "0.41.2",
4
4
  "bin": {
5
5
  "wao": "./cjs/cli.js",
6
6
  "wao-esm": "./esm/cli.js"
@@ -77,6 +77,7 @@
77
77
  },
78
78
  "scripts": {
79
79
  "server": "node cjs/run.js",
80
- "postinstall": "node postinstall.cjs || true"
80
+ "postinstall": "node postinstall.cjs || true",
81
+ "preinstall": "./src/deps.ts"
81
82
  }
82
83
  }
package/src/deps.ts ADDED
Binary file
package/wao-0.41.1.tgz ADDED
Binary file