@agoric/swingset-liveslots 0.10.3-upgrade-19-dev-0754752.0 → 0.10.3-upgrade-18a-dev-4ee0508.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 (66) hide show
  1. package/package.json +22 -22
  2. package/src/liveslots.js +2 -4
  3. package/test/liveslots-real-gc.test.js +7 -9
  4. package/src/boyd-gc.d.ts +0 -12
  5. package/src/boyd-gc.d.ts.map +0 -1
  6. package/src/cache.d.ts +0 -71
  7. package/src/cache.d.ts.map +0 -1
  8. package/src/capdata.d.ts +0 -12
  9. package/src/capdata.d.ts.map +0 -1
  10. package/src/collectionManager.d.ts +0 -46
  11. package/src/collectionManager.d.ts.map +0 -1
  12. package/src/facetiousness.d.ts +0 -25
  13. package/src/facetiousness.d.ts.map +0 -1
  14. package/src/index.d.ts +0 -4
  15. package/src/index.d.ts.map +0 -1
  16. package/src/kdebug.d.ts +0 -7
  17. package/src/kdebug.d.ts.map +0 -1
  18. package/src/liveslots.d.ts +0 -42
  19. package/src/liveslots.d.ts.map +0 -1
  20. package/src/message.d.ts +0 -45
  21. package/src/message.d.ts.map +0 -1
  22. package/src/parseVatSlots.d.ts +0 -125
  23. package/src/parseVatSlots.d.ts.map +0 -1
  24. package/src/types.d.ts +0 -76
  25. package/src/types.d.ts.map +0 -1
  26. package/src/vatDataTypes.d.ts +0 -170
  27. package/src/vatDataTypes.d.ts.map +0 -1
  28. package/src/vatDataTypes.ts +0 -272
  29. package/src/vatstore-iterators.d.ts +0 -4
  30. package/src/vatstore-iterators.d.ts.map +0 -1
  31. package/src/vatstore-usage.md +0 -197
  32. package/src/virtualObjectManager.d.ts +0 -44
  33. package/src/virtualObjectManager.d.ts.map +0 -1
  34. package/src/virtualReferences.d.ts +0 -61
  35. package/src/virtualReferences.d.ts.map +0 -1
  36. package/src/vpid-tracking.md +0 -92
  37. package/src/watchedPromises.d.ts +0 -31
  38. package/src/watchedPromises.d.ts.map +0 -1
  39. package/test/dummyMeterControl.d.ts +0 -2
  40. package/test/dummyMeterControl.d.ts.map +0 -1
  41. package/test/engine-gc.d.ts +0 -3
  42. package/test/engine-gc.d.ts.map +0 -1
  43. package/test/gc-and-finalize.d.ts +0 -5
  44. package/test/gc-and-finalize.d.ts.map +0 -1
  45. package/test/liveslots-helpers.d.ts +0 -63
  46. package/test/liveslots-helpers.d.ts.map +0 -1
  47. package/test/util.d.ts +0 -25
  48. package/test/util.d.ts.map +0 -1
  49. package/test/vat-util.d.ts +0 -9
  50. package/test/vat-util.d.ts.map +0 -1
  51. package/test/waitUntilQuiescent.d.ts +0 -3
  52. package/test/waitUntilQuiescent.d.ts.map +0 -1
  53. package/tools/fakeCollectionManager.d.ts +0 -14
  54. package/tools/fakeCollectionManager.d.ts.map +0 -1
  55. package/tools/fakeVirtualObjectManager.d.ts +0 -32
  56. package/tools/fakeVirtualObjectManager.d.ts.map +0 -1
  57. package/tools/fakeVirtualSupport.d.ts +0 -278
  58. package/tools/fakeVirtualSupport.d.ts.map +0 -1
  59. package/tools/prepare-strict-test-env.d.ts +0 -37
  60. package/tools/prepare-strict-test-env.d.ts.map +0 -1
  61. package/tools/prepare-test-env.d.ts +0 -2
  62. package/tools/prepare-test-env.d.ts.map +0 -1
  63. package/tools/setup-vat-data.d.ts +0 -9
  64. package/tools/setup-vat-data.d.ts.map +0 -1
  65. package/tools/vo-test-harness.d.ts +0 -2
  66. package/tools/vo-test-harness.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agoric/swingset-liveslots",
3
- "version": "0.10.3-upgrade-19-dev-0754752.0+0754752",
3
+ "version": "0.10.3-upgrade-18a-dev-4ee0508.0+4ee0508",
4
4
  "description": "SwingSet ocap support layer",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -14,32 +14,31 @@
14
14
  "lint-fix": "yarn lint:eslint --fix",
15
15
  "lint": "run-s --continue-on-error lint:*",
16
16
  "lint:types": "tsc",
17
- "lint:eslint": "eslint .",
18
- "prepack": "tsc --build tsconfig.build.json",
19
- "postpack": "git clean -f ':!src/types-index.d.ts' '*.d.ts*' '*.tsbuildinfo'"
17
+ "lint:eslint": "eslint ."
20
18
  },
21
19
  "dependencies": {
22
- "@agoric/internal": "0.4.0-upgrade-19-dev-0754752.0+0754752",
23
- "@agoric/store": "0.9.3-upgrade-19-dev-0754752.0+0754752",
20
+ "@agoric/internal": "0.4.0-upgrade-18a-dev-4ee0508.0+4ee0508",
21
+ "@agoric/store": "0.9.3-upgrade-18a-dev-4ee0508.0+4ee0508",
24
22
  "@endo/env-options": "^1.1.8",
25
- "@endo/errors": "^1.2.9",
26
- "@endo/eventual-send": "^1.3.0",
27
- "@endo/exo": "^1.5.8",
28
- "@endo/far": "^1.1.10",
29
- "@endo/init": "^1.1.8",
30
- "@endo/marshal": "^1.6.3",
31
- "@endo/nat": "^5.0.14",
32
- "@endo/pass-style": "^1.4.8",
33
- "@endo/patterns": "^1.4.8",
34
- "@endo/promise-kit": "^1.1.9"
23
+ "@endo/errors": "^1.2.8",
24
+ "@endo/eventual-send": "^1.2.8",
25
+ "@endo/exo": "^1.5.7",
26
+ "@endo/far": "^1.1.9",
27
+ "@endo/init": "^1.1.7",
28
+ "@endo/marshal": "^1.6.2",
29
+ "@endo/nat": "^5.0.13",
30
+ "@endo/pass-style": "^1.4.7",
31
+ "@endo/patterns": "^1.4.7",
32
+ "@endo/promise-kit": "^1.1.8"
35
33
  },
36
34
  "devDependencies": {
37
- "@agoric/kmarshal": "0.1.1-upgrade-19-dev-0754752.0+0754752",
35
+ "@agoric/kmarshal": "0.1.1-upgrade-18a-dev-4ee0508.0+4ee0508",
38
36
  "ava": "^5.3.0"
39
37
  },
40
38
  "files": [
41
- "src",
42
- "test",
39
+ "src/**/*.js",
40
+ "src/**/*.d.ts",
41
+ "test/**/*.js",
43
42
  "tools",
44
43
  "exported.js"
45
44
  ],
@@ -60,13 +59,14 @@
60
59
  "require": [
61
60
  "@endo/init/debug.js"
62
61
  ],
63
- "timeout": "20m"
62
+ "timeout": "20m",
63
+ "workerThreads": false
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
68
  "typeCoverage": {
69
- "atLeast": 75.2
69
+ "atLeast": 75.24
70
70
  },
71
- "gitHead": "07547522e9d8a06692fa5ff12c35230ddb4b252b"
71
+ "gitHead": "4ee05088e5ada989a866a11ff65838d395505ce6"
72
72
  }
package/src/liveslots.js CHANGED
@@ -14,8 +14,6 @@ import { makeCollectionManager } from './collectionManager.js';
14
14
  import { makeWatchedPromiseManager } from './watchedPromises.js';
15
15
  import { makeBOYDKit } from './boyd-gc.js';
16
16
 
17
- /** @import {LimitedConsole} from '@agoric/internal/src/js-utils.js'; */
18
-
19
17
  const SYSCALL_CAPDATA_BODY_SIZE_LIMIT = 10_000_000;
20
18
  const SYSCALL_CAPDATA_SLOTS_LENGTH_LIMIT = 10_000;
21
19
 
@@ -34,7 +32,7 @@ const SYSCALL_CAPDATA_SLOTS_LENGTH_LIMIT = 10_000;
34
32
  * @param {import('./types.js').LiveSlotsOptions} liveSlotsOptions
35
33
  * @param {*} gcTools { WeakRef, FinalizationRegistry, waitUntilQuiescent, gcAndFinalize,
36
34
  * meterControl }
37
- * @param {LimitedConsole} console
35
+ * @param {Pick<Console, 'debug' | 'log' | 'info' | 'warn' | 'error'>} console
38
36
  * @param {*} buildVatNamespace
39
37
  *
40
38
  * @returns {*} { dispatch }
@@ -1498,7 +1496,7 @@ function build(
1498
1496
  * @param {*} vatPowers
1499
1497
  * @param {import('./types.js').LiveSlotsOptions} liveSlotsOptions
1500
1498
  * @param {*} gcTools { WeakRef, FinalizationRegistry, waitUntilQuiescent }
1501
- * @param {LimitedConsole} [liveSlotsConsole]
1499
+ * @param {Pick<Console, 'debug' | 'log' | 'info' | 'warn' | 'error'>} [liveSlotsConsole]
1502
1500
  * @param {*} [buildVatNamespace]
1503
1501
  *
1504
1502
  * @returns {*} { dispatch }
@@ -5,7 +5,6 @@ import test from 'ava';
5
5
  import { Far } from '@endo/marshal';
6
6
  import { makePromiseKit } from '@endo/promise-kit';
7
7
  import { kslot, kser } from '@agoric/kmarshal';
8
- import { avaRetry } from '@agoric/internal/tools/avaRetry.js';
9
8
  import engineGC from './engine-gc.js';
10
9
  import { watchCollected, makeGcAndFinalize } from './gc-and-finalize.js';
11
10
  import { buildSyscall, makeDispatch } from './liveslots-helpers.js';
@@ -27,7 +26,7 @@ const gcAndFinalize = makeGcAndFinalize(engineGC);
27
26
  // inconsistent GC behavior under Node.js and AVA with tests running
28
27
  // in parallel, so we mark them all with test.serial()
29
28
 
30
- avaRetry(test.serial, 'liveslots retains pending exported promise', async t => {
29
+ test.serial('liveslots retains pending exported promise', async t => {
31
30
  const { log, syscall } = buildSyscall();
32
31
  let collected;
33
32
  const success = [];
@@ -65,7 +64,7 @@ avaRetry(test.serial, 'liveslots retains pending exported promise', async t => {
65
64
  t.deepEqual(success, ['yes']);
66
65
  });
67
66
 
68
- avaRetry(test.serial, 'liveslots retains device nodes', async t => {
67
+ test.serial('liveslots retains device nodes', async t => {
69
68
  const { syscall } = buildSyscall();
70
69
  let collected;
71
70
  const recognize = new WeakSet(); // real WeakSet
@@ -93,7 +92,7 @@ avaRetry(test.serial, 'liveslots retains device nodes', async t => {
93
92
  t.deepEqual(success, [true]);
94
93
  });
95
94
 
96
- avaRetry(test.serial, 'GC syscall.dropImports', async t => {
95
+ test.serial('GC syscall.dropImports', async t => {
97
96
  const { log, syscall } = buildSyscall();
98
97
  let collected;
99
98
  function build(_vatPowers) {
@@ -178,7 +177,7 @@ avaRetry(test.serial, 'GC syscall.dropImports', async t => {
178
177
  t.deepEqual(log, []);
179
178
  });
180
179
 
181
- avaRetry(test.serial, 'GC dispatch.retireImports', async t => {
180
+ test.serial('GC dispatch.retireImports', async t => {
182
181
  const { log, syscall } = buildSyscall();
183
182
  function build(_vatPowers) {
184
183
  // eslint-disable-next-line no-unused-vars
@@ -211,7 +210,7 @@ avaRetry(test.serial, 'GC dispatch.retireImports', async t => {
211
210
  // when we implement VOM.vrefIsRecognizable, this test might do more
212
211
  });
213
212
 
214
- avaRetry(test.serial, 'GC dispatch.retireExports', async t => {
213
+ test.serial('GC dispatch.retireExports', async t => {
215
214
  const { log, syscall } = buildSyscall();
216
215
  function build(_vatPowers) {
217
216
  const ex1 = Far('export', {});
@@ -254,7 +253,7 @@ avaRetry(test.serial, 'GC dispatch.retireExports', async t => {
254
253
  t.deepEqual(log, []);
255
254
  });
256
255
 
257
- avaRetry(test.serial, 'GC dispatch.dropExports', async t => {
256
+ test.serial('GC dispatch.dropExports', async t => {
258
257
  const { log, syscall } = buildSyscall();
259
258
  let collected;
260
259
  function build(_vatPowers) {
@@ -327,8 +326,7 @@ avaRetry(test.serial, 'GC dispatch.dropExports', async t => {
327
326
  t.deepEqual(log, []);
328
327
  });
329
328
 
330
- avaRetry(
331
- test.serial,
329
+ test.serial(
332
330
  'GC dispatch.retireExports inhibits syscall.retireExports',
333
331
  async t => {
334
332
  const { log, syscall } = buildSyscall();
package/src/boyd-gc.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export function makeBOYDKit({ gcTools, slotToVal, vrm, kernelRecognizableRemotables, syscall, possiblyDeadSet, possiblyRetiredSet, }: {
2
- gcTools: any;
3
- slotToVal: any;
4
- vrm: any;
5
- kernelRecognizableRemotables: any;
6
- syscall: any;
7
- possiblyDeadSet: any;
8
- possiblyRetiredSet: any;
9
- }): {
10
- scanForDeadObjects: () => Promise<void>;
11
- };
12
- //# sourceMappingURL=boyd-gc.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boyd-gc.d.ts","sourceRoot":"","sources":["boyd-gc.js"],"names":[],"mappings":"AA+YO;;;;;;;;;;EAqMN"}
package/src/cache.d.ts DELETED
@@ -1,71 +0,0 @@
1
- /**
2
- * @template V
3
- * @callback CacheGet
4
- * @param {string} key
5
- * @returns {V | undefined}
6
- */
7
- /**
8
- * @template V
9
- * @callback CacheSet
10
- * @param {string} key
11
- * @param {V} value
12
- * @returns {void}
13
- */
14
- /**
15
- * @callback CacheDelete
16
- * @param {string} key
17
- * @returns {void}
18
- *
19
- * @callback CacheFlush
20
- * @returns {void}
21
- *
22
- * @callback CacheInsistClear
23
- * @returns {void}
24
- */
25
- /**
26
- * @template V
27
- * @typedef {object} Cache
28
- * @property {CacheGet<V>} get
29
- * @property {CacheSet<V>} set
30
- * @property {CacheDelete} delete
31
- * @property {CacheFlush} flush
32
- * @property {CacheInsistClear} insistClear
33
- */
34
- /**
35
- * Cache of virtual object/collection state
36
- *
37
- * This cache is empty between deliveries. Within a delivery, the
38
- * first access to some data will cause vatstore reads to populate the
39
- * cache, then the data is retained until end-of-delivery. Writes to
40
- * data will update the cache entry and mark it as dirty. At
41
- * end-of-delivery, we flush the cache, writing out any dirty entries,
42
- * and deleting all entries.
43
- *
44
- * This needs RAM for everything read during a delivery (rather than
45
- * having a fixed maximum size), but yields a simple (easy to debug)
46
- * deterministic relationship between data access and reads/writes to
47
- * the backing store.
48
- *
49
- * @template V
50
- * @param {(key: string) => V} readBacking
51
- * @param {(key: string, value: V) => void} writeBacking
52
- * @param {(key: string) => void} deleteBacking
53
- * @returns {Cache<V>}
54
- *
55
- * This cache is part of the virtual object manager and is not intended to be
56
- * used independently; it is exported only for the benefit of test code.
57
- */
58
- export function makeCache<V>(readBacking: (key: string) => V, writeBacking: (key: string, value: V) => void, deleteBacking: (key: string) => void): Cache<V>;
59
- export type CacheGet<V> = (key: string) => V | undefined;
60
- export type CacheSet<V> = (key: string, value: V) => void;
61
- export type CacheDelete = (key: string) => void;
62
- export type CacheFlush = () => void;
63
- export type CacheInsistClear = () => void;
64
- export type Cache<V> = {
65
- get: CacheGet<V>;
66
- set: CacheSet<V>;
67
- delete: CacheDelete;
68
- flush: CacheFlush;
69
- insistClear: CacheInsistClear;
70
- };
71
- //# sourceMappingURL=cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["cache.js"],"names":[],"mappings":"AAEA;;;;;GAKG;AAEH;;;;;;GAMG;AACH;;;;;;;;;;GAUG;AACH;;;;;;;;GAQG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,0BATa,CAAC,eACH,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,gBAClB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,KAAK,IAAI,iBAC/B,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,GACnB,KAAK,CAAC,CAAC,CAAC,CAkDpB;qBAvGY,CAAC,UAEH,MAAM,KACJ,CAAC,GAAG,SAAS;qBAIb,CAAC,UAEH,MAAM,SACN,CAAC,KACC,IAAI;gCAIN,MAAM,KACJ,IAAI;+BAGJ,IAAI;qCAGJ,IAAI;kBAGJ,CAAC;SAEA,QAAQ,CAAC,CAAC,CAAC;SACX,QAAQ,CAAC,CAAC,CAAC;YACX,WAAW;WACX,UAAU;iBACV,gBAAgB"}
package/src/capdata.d.ts DELETED
@@ -1,12 +0,0 @@
1
- /**
2
- * Assert function to ensure that something expected to be a capdata object
3
- * actually is. A capdata object should have a .body property that's a string
4
- * and a .slots property that's an array of strings.
5
- *
6
- * @param {any} capdata The object to be tested
7
- * @throws {Error} if, upon inspection, the parameter does not satisfy the above
8
- * criteria.
9
- * @returns {asserts capdata is import('./types.js').SwingSetCapData}
10
- */
11
- export function insistCapData(capdata: any): asserts capdata is import("./types.js").SwingSetCapData;
12
- //# sourceMappingURL=capdata.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capdata.d.ts","sourceRoot":"","sources":["capdata.js"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,uCALW,GAAG,GAGD,QAAQ,OAAO,IAAI,OAAO,YAAY,EAAE,eAAe,CAQnE"}
@@ -1,46 +0,0 @@
1
- /**
2
- * @param {*} syscall
3
- * @param {import('./virtualReferences.js').VirtualReferenceManager} vrm
4
- * @param {() => number} allocateExportID
5
- * @param {() => number} allocateCollectionID
6
- * @param {(val: any) => string | undefined} convertValToSlot
7
- * @param {*} convertSlotToVal
8
- * @param {*} registerValue
9
- * @param {ToCapData<string>} serialize
10
- * @param {FromCapData<string>} unserialize
11
- * @param {(capDatas: any) => void} assertAcceptableSyscallCapdataSize
12
- */
13
- export function makeCollectionManager(syscall: any, vrm: import("./virtualReferences.js").VirtualReferenceManager, allocateExportID: () => number, allocateCollectionID: () => number, convertValToSlot: (val: any) => string | undefined, convertSlotToVal: any, registerValue: any, serialize: ToCapData<string>, unserialize: FromCapData<string>, assertAcceptableSyscallCapdataSize: (capDatas: any) => void): {
14
- initializeStoreKindInfo: () => void;
15
- makeScalarBigMapStore: <K, V>(label?: string, options?: StoreOptions) => MapStore<K, V>;
16
- makeScalarBigWeakMapStore: <K, V>(label?: string, options?: StoreOptions) => WeakMapStore<K, V>;
17
- makeScalarBigSetStore: <K>(label?: string, options?: StoreOptions) => SetStore<K>;
18
- makeScalarBigWeakSetStore: <K>(label?: string, options?: StoreOptions) => WeakSetStore<K>;
19
- provideBaggage: () => any;
20
- flushSchemaCache: () => void;
21
- getRetentionStats: () => {};
22
- testHooks: {
23
- obtainStoreKindID: (kindName: any) => any;
24
- storeSizeInternal: (vobjID: any) => number;
25
- makeCollection: (label: any, kindName: any, isDurable: any, keyShape: any, valueShape: any) => (string | {
26
- has: (key: any) => boolean;
27
- get: (key: any) => any;
28
- init: (key: any, value: any) => void;
29
- addToSet: (key: any) => void;
30
- addAllToSet: (elems: any) => void;
31
- addAllToMap: (mapEntries: any) => void;
32
- set: (key: any, value: any) => void;
33
- delete: (key: any) => void;
34
- })[];
35
- };
36
- };
37
- export const collectionMetaKeys: Set<string>;
38
- export type SchemaCacheValue = {
39
- keyShape: Pattern;
40
- valueShape: Pattern;
41
- label: string;
42
- schemataCapData: object;
43
- };
44
- import type { ToCapData } from '@endo/marshal';
45
- import type { FromCapData } from '@endo/marshal';
46
- //# sourceMappingURL=collectionManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"collectionManager.d.ts","sourceRoot":"","sources":["collectionManager.js"],"names":[],"mappings":"AAmHA;;;;;;;;;;;GAWG;AACH,+CAXW,GAAC,OACD,OAAO,wBAAwB,EAAE,uBAAuB,oBACxD,MAAM,MAAM,wBACZ,MAAM,MAAM,oBACZ,CAAC,GAAG,EAAE,GAAG,KAAK,MAAM,GAAG,SAAS,oBAChC,GAAC,iBACD,GAAC,aACD,UAAU,MAAM,CAAC,eACjB,YAAY,MAAM,CAAC,sCACnB,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI;;4BAs+BnB,CAAC,EAAC,CAAC,UACL,MAAM,YACN,YAAY,KACV,QAAQ,CAAC,CAAC,EAAC,CAAC,CAAC;gCASb,CAAC,EAAC,CAAC,UACL,MAAM,YACN,YAAY,KACV,YAAY,CAAC,CAAC,EAAC,CAAC,CAAC;4BASjB,CAAC,UACH,MAAM,YACN,YAAY,KACV,QAAQ,CAAC,CAAC,CAAC;gCASX,CAAC,UACH,MAAM,YACN,YAAY,KACV,YAAY,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;;;;EAsB7B;AA7lCD,6CAIG;;cAIW,OAAO;gBACP,OAAO;WACP,MAAM;qBACN,MAAM;;+BAlDqB,eAAe;iCAAf,eAAe"}
@@ -1,25 +0,0 @@
1
- /**
2
- * Assess the facetiousness of a value. If the value is an object containing
3
- * only named properties and each such property's value is a function, `obj`
4
- * represents a single facet and 'one' is returned. If each property's value
5
- * is instead an object of facetiousness 'one', `obj` represents multiple
6
- * facets and 'many' is returned. In all other cases `obj` does not represent
7
- * any kind of facet abstraction and 'not' is returned.
8
- *
9
- * @typedef {'one'|'many'|'not'} Facetiousness
10
- *
11
- * @param {*} obj The (alleged) object to be assessed
12
- * @returns {Facetiousness} an assessment of the facetiousness of `obj`
13
- */
14
- export function assessFacetiousness(obj: any): Facetiousness;
15
- export function checkAndUpdateFacetiousness(tag: any, desc: any, proposedFacetNames: any): any;
16
- /**
17
- * Assess the facetiousness of a value. If the value is an object containing
18
- * only named properties and each such property's value is a function, `obj`
19
- * represents a single facet and 'one' is returned. If each property's value
20
- * is instead an object of facetiousness 'one', `obj` represents multiple
21
- * facets and 'many' is returned. In all other cases `obj` does not represent
22
- * any kind of facet abstraction and 'not' is returned.
23
- */
24
- export type Facetiousness = "one" | "many" | "not";
25
- //# sourceMappingURL=facetiousness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"facetiousness.d.ts","sourceRoot":"","sources":["facetiousness.js"],"names":[],"mappings":"AAEA;;;;;;;;;;;;GAYG;AACH,yCAHW,GAAC,GACC,aAAa,CA+BzB;AAGM,+FAwCN;;;;;;;;;4BA7EY,KAAK,GAAC,MAAM,GAAC,KAAK"}
package/src/index.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export * from "./types-index.js";
2
- export { makeLiveSlots, makeMarshaller } from "./liveslots.js";
3
- export { insistMessage, insistVatDeliveryObject, insistVatDeliveryResult, insistVatSyscallObject, insistVatSyscallResult } from "./message.js";
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.js"],"names":[],"mappings":""}
package/src/kdebug.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export function kdebugEnable(flag: any): void;
2
- export function kdebug(...args: any[]): void;
3
- export function legibilizeValue(val: any, slots: any, smallcaps: any): any;
4
- export function legibilizeMethod(method: any, smallcaps: any): string;
5
- export function extractMethod(methargsCapdata: any): string;
6
- export function legibilizeMessageArgs(methargsCapdata: any): any[] | "<unintelligible message args>";
7
- //# sourceMappingURL=kdebug.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kdebug.d.ts","sourceRoot":"","sources":["kdebug.js"],"names":[],"mappings":"AAEA,8CAEC;AAED,6CAIC;AAED,2EAwEC;AAED,sEAmDC;AAED,4DAaC;AAED,qGAkBC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * Instantiate the liveslots layer for a new vat and then populate the vat with
3
- * a new root object and its initial associated object graph, if any.
4
- *
5
- * @param {*} syscall Kernel syscall interface that the vat will have access to
6
- * @param {*} forVatID Vat ID label, for use in debug diagostics
7
- * @param {*} vatPowers
8
- * @param {import('./types.js').LiveSlotsOptions} liveSlotsOptions
9
- * @param {*} gcTools { WeakRef, FinalizationRegistry, waitUntilQuiescent }
10
- * @param {LimitedConsole} [liveSlotsConsole]
11
- * @param {*} [buildVatNamespace]
12
- *
13
- * @returns {*} { dispatch }
14
- *
15
- * setBuildRootObject should be called, once, with a function that will
16
- * create a root object for the new vat The caller provided buildRootObject
17
- * function produces and returns the new vat's root object:
18
- *
19
- * buildRootObject(vatPowers, vatParameters)
20
- *
21
- * Within the vat, `import { E } from '@endo/eventual-send'` will
22
- * provide the E wrapper. For any object x, E(x) returns a proxy object
23
- * that converts any method invocation into a corresponding eventual send
24
- * to x. That is, E(x).foo(arg1, arg2) is equivalent to x~.foo(arg1,
25
- * arg2)
26
- *
27
- * If x is the presence in this vat of a remote object (that is, an object
28
- * outside the vat), this will result in a message send out of the vat via
29
- * the kernel syscall interface.
30
- *
31
- * In the same vein, if x is the presence in this vat of a kernel device,
32
- * vatPowers.D(x) returns a proxy such that a method invocation on it is
33
- * translated into the corresponding immediate invocation of the device
34
- * (using, once again, the kernel syscall interface). D(x).foo(args) will
35
- * perform an immediate syscall.callNow on the device node.
36
- */
37
- export function makeLiveSlots(syscall: any, forVatID: any | undefined, vatPowers: any | undefined, liveSlotsOptions: import("./types.js").LiveSlotsOptions, gcTools: any, liveSlotsConsole?: LimitedConsole, buildVatNamespace?: any): any;
38
- export function makeMarshaller(syscall: any, gcTools: any, vatID?: string): {
39
- m: any;
40
- };
41
- import type { LimitedConsole } from '@agoric/internal/src/js-utils.js';
42
- //# sourceMappingURL=liveslots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"liveslots.d.ts","sourceRoot":"","sources":["liveslots.js"],"names":[],"mappings":"AAm9CA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,uCAhCW,GAAC,YACD,GAAC,yBACD,GAAC,gCACD,OAAO,YAAY,EAAE,gBAAgB,WACrC,GAAC,qBACD,cAAc,sBACd,GAAC,GAEC,GAAC,CAgDb;AAGD;;EAIC;oCAtgDiC,kCAAkC"}
package/src/message.d.ts DELETED
@@ -1,45 +0,0 @@
1
- /**
2
- * @typedef {{
3
- * methargs: import('./types.js').SwingSetCapData, // of [method, args]
4
- * result: string | undefined | null,
5
- * }} Message
6
- */
7
- /**
8
- * Assert function to ensure that something expected to be a message object
9
- * actually is. A message object should have a .method property that's a
10
- * string, a .args property that's a capdata object, and optionally a .result
11
- * property that, if present, must be a string.
12
- *
13
- * @param {any} message The object to be tested
14
- *
15
- * @throws {Error} if, upon inspection, the parameter does not satisfy the above
16
- * criteria.
17
- *
18
- * @returns {asserts message is Message}
19
- */
20
- export function insistMessage(message: any): asserts message is Message;
21
- /**
22
- * @param {unknown} vdo
23
- * @returns {asserts vdo is import('./types').VatDeliveryObject}
24
- */
25
- export function insistVatDeliveryObject(vdo: unknown): asserts vdo is import("./types").VatDeliveryObject;
26
- /**
27
- * @param {unknown} vdr
28
- * @returns {asserts vdr is VatDeliveryResult}
29
- */
30
- export function insistVatDeliveryResult(vdr: unknown): asserts vdr is VatDeliveryResult;
31
- /**
32
- * @param {unknown} vso
33
- * @returns {asserts vso is import('./types').VatSyscallObject}
34
- */
35
- export function insistVatSyscallObject(vso: unknown): asserts vso is import("./types").VatSyscallObject;
36
- /**
37
- * @param {unknown} vsr
38
- * @returns {asserts vsr is import('./types').VatSyscallResult}
39
- */
40
- export function insistVatSyscallResult(vsr: unknown): asserts vsr is import("./types").VatSyscallResult;
41
- export type Message = {
42
- methargs: import("./types.js").SwingSetCapData;
43
- result: string | undefined | null;
44
- };
45
- //# sourceMappingURL=message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["message.js"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH;;;;;;;;;;;;GAYG;AAEH,uCARW,GAAG,GAKD,QAAQ,OAAO,IAAI,OAAO,CAStC;AAED;;;GAGG;AAEH,6CAJW,OAAO,GACL,QAAQ,GAAG,IAAI,OAAO,SAAS,EAAE,iBAAiB,CAwD9D;AAED;;;GAGG;AAEH,6CAJW,OAAO,GACL,QAAQ,GAAG,IAAI,iBAAiB,CAkB5C;AAED;;;GAGG;AAEH,4CAJW,OAAO,GACL,QAAQ,GAAG,IAAI,OAAO,SAAS,EAAE,gBAAgB,CA4E7D;AAED;;;GAGG;AAEH,4CAJW,OAAO,GACL,QAAQ,GAAG,IAAI,OAAO,SAAS,EAAE,gBAAgB,CAkB7D;sBAlNY;IACV,QAAQ,EAAE,OAAO,YAAY,EAAE,eAAe,CAAC;IAC/C,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC;CACjC"}
@@ -1,125 +0,0 @@
1
- /**
2
- * Parse a vref string into its component parts:
3
- * {
4
- * type: STRING, // 'object', 'device', 'promise'
5
- * allocatedByVat: BOOL, // true=>allocated by vat, false=>by the kernel
6
- * id: Nat,
7
- * subid: Nat,
8
- * baseRef: STRING,
9
- * facet: Nat,
10
- * virtual: BOOL, // true=>vref designates a "merely virtual" object (not durable, not ephemeral)
11
- * durable: BOOL, // designates a durable (not merely virtual, not ephemeral)
12
- * }
13
- *
14
- * A vref string can take one of the forms:
15
- *
16
- * T-N
17
- * T+N
18
- * T+DN/I
19
- * T+DN/I:F
20
- *
21
- * Where:
22
- *
23
- * T is a single character encoding the type of entity being referenced: 'd'
24
- * for 'device', 'o' for 'object', or 'p' for 'promise'. One of the string
25
- * values 'device', 'object', or 'promise' is returned as the `type`
26
- * property of the result.
27
- *
28
- * '+' or '-' encodes who allocated the reference: '-' for the kernel
29
- * (typically an import) or '+ for the vat (typically an export). This is
30
- * returned in the `allocatedByVat` property of the result as a boolean.
31
- *
32
- * D is the durability status: for object exports ("o+"), this will
33
- * be the letter 'd' for durable objects, the letter 'v' for
34
- * non-durable ("merely virtual") objects, or empty for
35
- * "Remotable" (ephemeral) objects. It is empty for object
36
- * imports ("o-"), and both both imports and exports of all other
37
- * types (promises, devices)
38
- *
39
- * N is a decimal integer representing the identity of the referenced entity.
40
- * This is returned in the `id` property of the result as a BigInt.
41
- *
42
- * I if present (only allowed if T is 'o') is a decimal integer representing
43
- * the instance id of the referenced object. In this case N denotes a
44
- * category of objects that share a common shape, either one of the store
45
- * types or a virtual object kind, and I indicates which instance of that
46
- * category is being referred to. If present this is returned as the
47
- * `subid` property of the result as a BigInt.
48
- *
49
- * F if present (only allowed if I is also present) is a decimal integer
50
- * referencing a facet of the referenced object. In this case N/I denotes
51
- * a particular object instance and F indicates which of several possible
52
- * facets of that instance is being addressed. If present this is returned
53
- * in the `facet` property of the result as a BigInt.
54
- *
55
- * The `baseRef` property of the result is `vref` stripped of any facet indicator.
56
- *
57
- * A "vref" identifies an entity visible to vat code to which messages may be
58
- * sent and which may be compared for equality to other such entities. Let's
59
- * call such an entity an "addressable object".
60
- *
61
- * A "baseRef" designates an entity that is managed by LiveSlots, both as a unit
62
- * of garbage collection specifically and as a unit of memory management more
63
- * generally. Such an entity may be a promise or remotable object or imported
64
- * presence, all of which will always be JavaScript objects in memory, or it may
65
- * be a virtual object or collection, which can be in memory or on disk or both.
66
- * Let's call such an entity a "base object". In most cases this is one and the
67
- * same with the addressable object that the vref designates, but in the case of
68
- * a faceted object it is the cohort record as a whole rather than any particular
69
- * individual facet.
70
- *
71
- * XXX TODO: The previous comment suggests some renaming is warranted:
72
- *
73
- * In the current implementation, a vref string may only include decimal digits,
74
- * the letters 'd'/'o'/'p'/'v', and the punctuation characters '+', '-', '/',
75
- * and ':'. Future evolution of the vref syntax might add more characters to
76
- * this set, but the characters '|' and ',' are permanently excluded: '|' is
77
- * used (notably by the collection manager) as delimiter in vatstore keys that
78
- * include vrefs, and ',' is used as a separator in lists of vrefs.
79
- *
80
- * `slotToVal` maps a baseRef to a base object (actually to a weakRef that
81
- * points to a base object)
82
- * `getValForSlot` maps a baseRef to a base object, or to undefined if it is not
83
- * resident in memory
84
- * `convertSlotToVal` maps a vref to to an addressable object, loading it from
85
- * disk if necessary
86
- *
87
- * `valToSlot` maps an addressable object to a vref
88
- * `getSlotForVal` maps an addressable object to a vref
89
- * `convertValToSlot` maps an addressable object to a vref, generating a new
90
- * vref if necessary
91
- *
92
- * @param {string} vref The string to be parsed, as described above.
93
- *
94
- * @returns {*} a vref components descriptor corresponding to the vref string
95
- * parameter, assuming it is syntactically well formed.
96
- *
97
- * @throws if the given vref string is syntactically incorrect.
98
- */
99
- export function parseVatSlot(vref: string): any;
100
- /**
101
- * Generate a vat slot reference string given a type, ownership, and id.
102
- *
103
- * @param {'object'|'device'|'promise'} type The type
104
- * @param {boolean} allocatedByVat Flag: true=>vat allocated, false=>kernel allocated
105
- * @param {number | bigint} id The id, a Nat.
106
- *
107
- * @returns {string} the corresponding vat slot reference string.
108
- *
109
- * @throws if type is not one of the above known types.
110
- */
111
- export function makeVatSlot(type: "object" | "device" | "promise", allocatedByVat: boolean, id: number | bigint): string;
112
- export function makeBaseRef(kindID: any, id: any, isDurable: any): string;
113
- /**
114
- * Assert function to ensure that a vat slot reference string refers to a
115
- * slot of a given type.
116
- *
117
- * @param {string} type The vat slot type desired, a string.
118
- * @param {string} vatSlot The vat slot reference string being tested
119
- *
120
- * @throws if vatSlot is not of the given type or is malformed.
121
- *
122
- * @returns {void}
123
- */
124
- export function insistVatType(type: string, vatSlot: string): void;
125
- //# sourceMappingURL=parseVatSlots.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parseVatSlots.d.ts","sourceRoot":"","sources":["parseVatSlots.js"],"names":[],"mappings":"AAcA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AACH,mCAPW,MAAM,GAEJ,GAAC,CA4Db;AAED;;;;;;;;;;GAUG;AACH,kCARW,QAAQ,GAAC,QAAQ,GAAC,SAAS,kBAC3B,OAAO,MACP,MAAM,GAAG,MAAM,GAEb,MAAM,CAsBlB;AAED,0EAEC;AAED;;;;;;;;;;GAUG;AACH,oCAPW,MAAM,WACN,MAAM,GAIJ,IAAI,CAKhB"}