@agoric/swingset-vat 0.32.3-dev-727e4af.0 → 0.32.3-dev-96c9ff5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swingset-vat",
3
- "version": "0.32.3-dev-727e4af.0+727e4af",
3
+ "version": "0.32.3-dev-96c9ff5.0+96c9ff5",
4
4
  "description": "Vat/Container Launcher",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -27,33 +27,33 @@
27
27
  "@types/yargs-parser": "^21.0.0"
28
28
  },
29
29
  "dependencies": {
30
- "@agoric/assert": "0.6.1-dev-727e4af.0+727e4af",
31
- "@agoric/internal": "0.3.3-dev-727e4af.0+727e4af",
32
- "@agoric/kmarshal": "0.1.1-dev-727e4af.0+727e4af",
33
- "@agoric/store": "0.9.3-dev-727e4af.0+727e4af",
34
- "@agoric/swing-store": "0.9.2-dev-727e4af.0+727e4af",
35
- "@agoric/swingset-liveslots": "0.10.3-dev-727e4af.0+727e4af",
36
- "@agoric/swingset-xsnap-supervisor": "0.10.3-dev-727e4af.0+727e4af",
37
- "@agoric/time": "0.3.3-dev-727e4af.0+727e4af",
38
- "@agoric/vat-data": "0.5.3-dev-727e4af.0+727e4af",
39
- "@agoric/xsnap": "0.14.3-dev-727e4af.0+727e4af",
40
- "@agoric/xsnap-lockdown": "0.14.1-dev-727e4af.0+727e4af",
41
- "@endo/base64": "^1.0.4",
42
- "@endo/bundle-source": "^3.2.2",
43
- "@endo/captp": "^4.1.1",
44
- "@endo/check-bundle": "^1.0.6",
45
- "@endo/compartment-mapper": "^1.1.4",
46
- "@endo/eventual-send": "^1.2.1",
47
- "@endo/far": "^1.1.1",
48
- "@endo/import-bundle": "^1.1.1",
49
- "@endo/init": "^1.1.1",
50
- "@endo/marshal": "^1.4.1",
51
- "@endo/nat": "^5.0.6",
52
- "@endo/patterns": "^1.3.1",
53
- "@endo/promise-kit": "^1.1.1",
54
- "@endo/ses-ava": "^1.2.1",
55
- "@endo/stream": "^1.2.1",
56
- "@endo/zip": "^1.0.4",
30
+ "@agoric/assert": "0.6.1-dev-96c9ff5.0+96c9ff5",
31
+ "@agoric/internal": "0.3.3-dev-96c9ff5.0+96c9ff5",
32
+ "@agoric/kmarshal": "0.1.1-dev-96c9ff5.0+96c9ff5",
33
+ "@agoric/store": "0.9.3-dev-96c9ff5.0+96c9ff5",
34
+ "@agoric/swing-store": "0.9.2-dev-96c9ff5.0+96c9ff5",
35
+ "@agoric/swingset-liveslots": "0.10.3-dev-96c9ff5.0+96c9ff5",
36
+ "@agoric/swingset-xsnap-supervisor": "0.10.3-dev-96c9ff5.0+96c9ff5",
37
+ "@agoric/time": "0.3.3-dev-96c9ff5.0+96c9ff5",
38
+ "@agoric/vat-data": "0.5.3-dev-96c9ff5.0+96c9ff5",
39
+ "@agoric/xsnap": "0.14.3-dev-96c9ff5.0+96c9ff5",
40
+ "@agoric/xsnap-lockdown": "0.14.1-dev-96c9ff5.0+96c9ff5",
41
+ "@endo/base64": "^1.0.5",
42
+ "@endo/bundle-source": "^3.2.3",
43
+ "@endo/captp": "^4.2.0",
44
+ "@endo/check-bundle": "^1.0.7",
45
+ "@endo/compartment-mapper": "^1.1.5",
46
+ "@endo/eventual-send": "^1.2.2",
47
+ "@endo/far": "^1.1.2",
48
+ "@endo/import-bundle": "^1.1.2",
49
+ "@endo/init": "^1.1.2",
50
+ "@endo/marshal": "^1.5.0",
51
+ "@endo/nat": "^5.0.7",
52
+ "@endo/patterns": "^1.4.0",
53
+ "@endo/promise-kit": "^1.1.2",
54
+ "@endo/ses-ava": "^1.2.2",
55
+ "@endo/stream": "^1.2.2",
56
+ "@endo/zip": "^1.0.5",
57
57
  "ansi-styles": "^6.2.1",
58
58
  "anylogger": "^0.21.0",
59
59
  "better-sqlite3": "^9.1.1",
@@ -100,7 +100,7 @@
100
100
  "access": "public"
101
101
  },
102
102
  "typeCoverage": {
103
- "atLeast": 75.02
103
+ "atLeast": 74.99
104
104
  },
105
- "gitHead": "727e4af514a8e92f400dd1671a788c5d3cbe1b8a"
105
+ "gitHead": "96c9ff577fe14cebeb5a38543ba7f8598ffcd0c7"
106
106
  }
@@ -212,6 +212,7 @@ export async function initializeKernel(config, kernelStorage, options = {}) {
212
212
  // See https://github.com/Agoric/agoric-sdk/issues/2780
213
213
  errorIdNum: 60_000,
214
214
  });
215
+ // @ts-expect-error xxx
215
216
  const args = kunser(m.serialize(harden([vatObj0s, deviceObj0s])));
216
217
  const rootKref = exportRootObject(kernelKeeper, bootstrapVatID);
217
218
  const resultKpid = queueToKref(rootKref, 'bootstrap', args, 'panic');
@@ -103,6 +103,7 @@ export function buildDevice(tools, endowments) {
103
103
 
104
104
  const dispatch = {
105
105
  invoke: (dnid, method, argsCapdata) => {
106
+ /** @type {any} */
106
107
  const args = unserialize(argsCapdata);
107
108
 
108
109
  if (dnid === ROOT) {
@@ -156,6 +156,7 @@ export function buildDevice(tools, endowments) {
156
156
 
157
157
  // D(devices.vatAdmin).createMeter(remaining, threshold) -> meterID
158
158
  if (method === 'createMeter') {
159
+ /** @type {any} */
159
160
  const args = unserialize(argsCapdata);
160
161
  const [remaining, threshold] = args;
161
162
  assert.typeof(remaining, 'bigint', 'createMeter() remaining');
@@ -172,6 +173,7 @@ export function buildDevice(tools, endowments) {
172
173
 
173
174
  // D(devices.vatAdmin).addMeterRemaining(meterID, delta)
174
175
  if (method === 'addMeterRemaining') {
176
+ /** @type {any} */
175
177
  const args = unserialize(argsCapdata);
176
178
  const [meterID, delta] = args;
177
179
  assert.typeof(meterID, 'string', 'addMeterRemaining() meterID');
@@ -182,6 +184,7 @@ export function buildDevice(tools, endowments) {
182
184
 
183
185
  // D(devices.vatAdmin).setMeterThreshold(meterID, threshold)
184
186
  if (method === 'setMeterThreshold') {
187
+ /** @type {any} */
185
188
  const args = unserialize(argsCapdata);
186
189
  const [meterID, threshold] = args;
187
190
  assert.typeof(meterID, 'string', 'setMeterThreshold() meterID');
@@ -192,6 +195,7 @@ export function buildDevice(tools, endowments) {
192
195
 
193
196
  // D(devices.vatAdmin).getMeter(meterID) -> { remaining, threshold }
194
197
  if (method === 'getMeter') {
198
+ /** @type {any} */
195
199
  const args = unserialize(argsCapdata);
196
200
  const [meterID] = args;
197
201
  assert.typeof(meterID, 'string', 'getMeter() meterID');
@@ -265,6 +269,7 @@ export function buildDevice(tools, endowments) {
265
269
  // D(devices.bundle).getBundleCap(id) -> bundlecap
266
270
  if (method === 'getBundleCap') {
267
271
  const args = unserialize(argsCapdata);
272
+ /** @type {any} */
268
273
  const [bundleID] = args;
269
274
  assert.typeof(bundleID, 'string', 'getBundleCap() bundleID');
270
275
  assert(bundleIDRE.test(bundleID), 'getBundleCap() not a bundleID');
@@ -273,6 +278,7 @@ export function buildDevice(tools, endowments) {
273
278
  // D(devices.bundle).getNamedBundleCap(name) -> bundlecap
274
279
  if (method === 'getNamedBundleCap') {
275
280
  const args = unserialize(argsCapdata);
281
+ /** @type {any} */
276
282
  const [name] = args;
277
283
  assert.typeof(name, 'string', 'getNamedBundleCap() name');
278
284
  let bundleID;
@@ -287,6 +293,7 @@ export function buildDevice(tools, endowments) {
287
293
  // D(devices.bundle).getBundleIDByName(name) -> id
288
294
  if (method === 'getBundleIDByName') {
289
295
  const args = unserialize(argsCapdata);
296
+ /** @type {any} */
290
297
  const [name] = args;
291
298
  assert.typeof(name, 'string', 'getBundleIDByName() name');
292
299
  let bundleID;
@@ -2,6 +2,11 @@
2
2
 
3
3
  export {};
4
4
 
5
+ /**
6
+ * @import {Guarded} from '@endo/exo')
7
+ * @import {Passable, RemotableObject} from '@endo/pass-style')
8
+ */
9
+
5
10
  /* This file defines types that part of the external API of swingset. That
6
11
  * includes standard services which user-provided vat code might interact
7
12
  * with, like VatAdminService. */
@@ -350,9 +355,7 @@ export {};
350
355
  * incarnation.
351
356
  *
352
357
  *
353
- * @typedef {object} CreateVatResults
354
- * @property {object} root
355
- * @property {VatAdminFacet} adminNode
358
+ * @typedef {{ adminNode: Guarded<VatAdminFacet>, root: object }} CreateVatResults
356
359
  *
357
360
  * @typedef {object} VatAdminSvc
358
361
  * @property {(id: BundleID) => ERef<BundleCap>} waitForBundleCap
@@ -15,6 +15,11 @@ import {
15
15
  import { makeScalarWeakMapStore } from '@agoric/store';
16
16
  import { TimeMath } from '@agoric/time';
17
17
 
18
+ /**
19
+ * @import {Passable, RemotableObject} from '@endo/pass-style')
20
+ * @import {Key} from '@endo/patterns')
21
+ */
22
+
18
23
  // This consumes O(N) RAM only for outstanding promises, via wakeAt(),
19
24
  // delay(), and Notifiers/Iterators (for each actively-waiting
20
25
  // client). Everything else should remain in the DB.
@@ -31,10 +36,10 @@ import { TimeMath } from '@agoric/time';
31
36
  * Handler is a user-provided Far object with .wake(time) used for callbacks
32
37
  * @property {(scheduled: Timestamp) => unknown} wake
33
38
  *
34
- * @typedef {unknown} CancelToken
39
+ * @typedef {Key} CancelToken
35
40
  * CancelToken must be pass-by-reference and durable, either local or remote
36
41
  *
37
- * @typedef {{
42
+ * @typedef {RemotableObject & {
38
43
  * scheduleYourself: () => void,
39
44
  * fired: (now: TimestampValue) => void,
40
45
  * cancel: () => void,
@@ -42,7 +47,7 @@ import { TimeMath } from '@agoric/time';
42
47
  *
43
48
  * @typedef {MapStore<TimestampValue, Event[]>} Schedule
44
49
  *
45
- * @typedef {{ cancel: () => void }} Cancellable
50
+ * @typedef {RemotableObject & { cancel: () => void }} Cancellable
46
51
  *
47
52
  * @typedef {WeakMapStore<CancelToken, Cancellable[]>} CancelTable
48
53
  *