@agoric/swingset-vat 0.32.3-dev-b8d96c7.0 → 0.32.3-dev-3a87731.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.
Files changed (2) hide show
  1. package/package.json +11 -11
  2. package/tools/run-utils.js +26 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swingset-vat",
3
- "version": "0.32.3-dev-b8d96c7.0+b8d96c7",
3
+ "version": "0.32.3-dev-3a87731.0+3a87731",
4
4
  "description": "Vat/Container Launcher",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -27,15 +27,15 @@
27
27
  "@types/yargs-parser": "^21.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@agoric/internal": "0.3.3-dev-b8d96c7.0+b8d96c7",
31
- "@agoric/kmarshal": "0.1.1-dev-b8d96c7.0+b8d96c7",
32
- "@agoric/store": "0.9.3-dev-b8d96c7.0+b8d96c7",
33
- "@agoric/swing-store": "0.9.2-dev-b8d96c7.0+b8d96c7",
34
- "@agoric/swingset-liveslots": "0.10.3-dev-b8d96c7.0+b8d96c7",
35
- "@agoric/swingset-xsnap-supervisor": "0.10.3-dev-b8d96c7.0+b8d96c7",
36
- "@agoric/time": "0.3.3-dev-b8d96c7.0+b8d96c7",
37
- "@agoric/vat-data": "0.5.3-dev-b8d96c7.0+b8d96c7",
38
- "@agoric/xsnap-lockdown": "0.14.1-dev-b8d96c7.0+b8d96c7",
30
+ "@agoric/internal": "0.3.3-dev-3a87731.0+3a87731",
31
+ "@agoric/kmarshal": "0.1.1-dev-3a87731.0+3a87731",
32
+ "@agoric/store": "0.9.3-dev-3a87731.0+3a87731",
33
+ "@agoric/swing-store": "0.9.2-dev-3a87731.0+3a87731",
34
+ "@agoric/swingset-liveslots": "0.10.3-dev-3a87731.0+3a87731",
35
+ "@agoric/swingset-xsnap-supervisor": "0.10.3-dev-3a87731.0+3a87731",
36
+ "@agoric/time": "0.3.3-dev-3a87731.0+3a87731",
37
+ "@agoric/vat-data": "0.5.3-dev-3a87731.0+3a87731",
38
+ "@agoric/xsnap-lockdown": "0.14.1-dev-3a87731.0+3a87731",
39
39
  "@endo/base64": "^1.0.9",
40
40
  "@endo/bundle-source": "^3.5.1",
41
41
  "@endo/captp": "^4.4.4",
@@ -102,5 +102,5 @@
102
102
  "typeCoverage": {
103
103
  "atLeast": 76.28
104
104
  },
105
- "gitHead": "b8d96c7314cc9edd47b960876f23a88c18f70070"
105
+ "gitHead": "3a877313d3b84f02739d5c3ce9ca25b7c127d37e"
106
106
  }
@@ -53,7 +53,7 @@ export const makeRunUtils = (controller, harness) => {
53
53
  };
54
54
 
55
55
  /**
56
- * @typedef {import('@endo/eventual-send').EProxy | object} EVProxyMethods
56
+ * @typedef EVProxyMethods
57
57
  * @property {(presence: unknown) => Record<string, (...args: any) => Promise<void>>} sendOnly
58
58
  * Returns a "methods proxy" for the presence that ignores the results of
59
59
  * each method invocation.
@@ -118,28 +118,39 @@ export const makeRunUtils = (controller, harness) => {
118
118
  // promise that can remain pending indefinitely, possibly to be settled by a
119
119
  // future message delivery.
120
120
 
121
+ /**
122
+ * @template {(typeof controller.queueToVatObject) | (typeof controller.queueToVatRoot)} T
123
+ * @param {T} invoker
124
+ * @param {Parameters<T>[0]} target
125
+ * @param {boolean} [voidResult]
126
+ */
121
127
  const makeMethodsProxy = (invoker, target, voidResult = false) =>
122
128
  new Proxy(harden({}), {
123
129
  get: (_t, method, _rx) => {
130
+ const resultPolicy = voidResult ? 'none' : undefined;
124
131
  const boundMethod = (...args) =>
125
- queueAndRun(() => invoker(target, method, args), voidResult);
132
+ queueAndRun(
133
+ () => invoker(target, method, args, resultPolicy),
134
+ voidResult,
135
+ );
126
136
  return harden(boundMethod);
127
137
  },
128
138
  });
129
139
 
130
- /** @type {EVProxy} */
131
- const EV = Object.assign(
132
- presence => makeMethodsProxy(controller.queueToVatObject, presence),
133
- {
134
- vat: vatName => makeMethodsProxy(controller.queueToVatRoot, vatName),
135
- sendOnly: presence =>
136
- makeMethodsProxy(controller.queueToVatObject, presence, true),
137
- get: presence =>
138
- new Proxy(harden({}), {
139
- get: (_t, key, _rx) =>
140
- EV.vat('bootstrap').awaitVatObject(presence, [key]),
141
- }),
142
- },
140
+ const EV = /** @type {EVProxy} */ (
141
+ Object.assign(
142
+ presence => makeMethodsProxy(controller.queueToVatObject, presence),
143
+ {
144
+ vat: vatName => makeMethodsProxy(controller.queueToVatRoot, vatName),
145
+ sendOnly: presence =>
146
+ makeMethodsProxy(controller.queueToVatObject, presence, true),
147
+ get: presence =>
148
+ new Proxy(harden({}), {
149
+ get: (_t, key, _rx) =>
150
+ EV.vat('bootstrap').awaitVatObject(presence, [key]),
151
+ }),
152
+ },
153
+ )
143
154
  );
144
155
  return harden({ queueAndRun, EV });
145
156
  };