@agoric/swingset-xsnap-supervisor
Advanced tools
Comparing version 0.10.3-dev-39b1586.0 to 0.10.3-dev-39d8f59.0
@@ -1,4 +0,3 @@ | ||
import { Fail } from '@agoric/assert'; | ||
import { Fail } from '@endo/errors'; | ||
/* eslint-disable jsdoc/require-returns-check */ | ||
/** | ||
@@ -5,0 +4,0 @@ * Assert function to ensure that something expected to be a capdata object |
@@ -7,6 +7,6 @@ import { | ||
/** | ||
* @typedef {import('@agoric/swingset-liveslots').VatDeliveryObject} VatDeliveryObject | ||
* @typedef {import('@agoric/swingset-liveslots').VatDeliveryResult} VatDeliveryResult | ||
* @typedef {import('@agoric/swingset-liveslots').VatSyscallObject} VatSyscallObject | ||
* @typedef {import('@agoric/swingset-liveslots').VatSyscallHandler} VatSyscallHandler | ||
* @import {VatDeliveryObject} from '@agoric/swingset-liveslots' | ||
* @import {VatDeliveryResult} from '@agoric/swingset-liveslots' | ||
* @import {VatSyscallObject} from '@agoric/swingset-liveslots' | ||
* @import {VatSyscallHandler} from '@agoric/swingset-liveslots' | ||
* @typedef {import('@endo/marshal').CapData<string>} SwingSetCapData | ||
@@ -13,0 +13,0 @@ * @typedef { (delivery: VatDeliveryObject) => (VatDeliveryResult | Promise<VatDeliveryResult>) } VatDispatcherSyncAsync |
/* global globalThis WeakRef FinalizationRegistry */ | ||
import { assert, Fail } from '@agoric/assert'; | ||
import { assert, Fail } from '@endo/errors'; | ||
import { importBundle } from '@endo/import-bundle'; | ||
@@ -21,9 +21,9 @@ import { | ||
/** | ||
* @typedef {import('@agoric/swingset-liveslots').VatDeliveryObject} VatDeliveryObject | ||
* @typedef {import('@agoric/swingset-liveslots').VatDeliveryResult} VatDeliveryResult | ||
* @typedef {import('@agoric/swingset-liveslots').VatSyscallObject} VatSyscallObject | ||
* @typedef {import('@agoric/swingset-liveslots').VatSyscallResult} VatSyscallResult | ||
* @typedef {import('@agoric/swingset-liveslots').VatSyscallHandler} VatSyscallHandler | ||
* @typedef {import('@agoric/swingset-liveslots').LiveSlotsOptions} LiveSlotsOptions | ||
* @typedef {import('@agoric/swingset-liveslots').MeterControl} MeterControl | ||
* @import {VatDeliveryObject} from '@agoric/swingset-liveslots' | ||
* @import {VatDeliveryResult} from '@agoric/swingset-liveslots' | ||
* @import {VatSyscallObject} from '@agoric/swingset-liveslots' | ||
* @import {VatSyscallResult} from '@agoric/swingset-liveslots' | ||
* @import {VatSyscallHandler} from '@agoric/swingset-liveslots' | ||
* @import {LiveSlotsOptions} from '@agoric/swingset-liveslots' | ||
* @import {MeterControl} from '@agoric/swingset-liveslots' | ||
*/ | ||
@@ -36,3 +36,2 @@ | ||
function workerLog(first, ...args) { | ||
// eslint-disable-next-line | ||
// console.log(`---worker: ${first}`, ...args); | ||
@@ -106,7 +105,7 @@ } | ||
* | ||
* @param {(cmd: ArrayBuffer) => ArrayBuffer} issueCommand as from xsnap | ||
* @param {(cmd: ArrayBufferLike) => ArrayBuffer} issueCommand as from xsnap | ||
* @typedef { [unknown, ...unknown[]] } Tagged tagged array | ||
*/ | ||
function managerPort(issueCommand) { | ||
/** @type { (item: Tagged) => ArrayBuffer } */ | ||
/** @type { (item: Tagged) => ArrayBufferLike } */ | ||
const encode = item => { | ||
@@ -262,3 +261,4 @@ let txt; | ||
console: makeVatConsole(makeLogMaker('vat')), | ||
assert, | ||
// See https://github.com/Agoric/agoric-sdk/issues/9515 | ||
assert: globalThis.assert, | ||
// bootstrap provides HandledPromise | ||
@@ -265,0 +265,0 @@ HandledPromise: globalThis.HandledPromise, |
{ | ||
"name": "@agoric/swingset-xsnap-supervisor", | ||
"version": "0.10.3-dev-39b1586.0+39b1586", | ||
"version": "0.10.3-dev-39d8f59.0+39d8f59", | ||
"description": "Supervisor/Liveslots bundle for swingset xsnap workers", | ||
@@ -19,17 +19,17 @@ "author": "Agoric", | ||
"lint:js": "eslint 'lib/**/*.js' 'src/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", | ||
"lint:types": "tsc -p jsconfig.json", | ||
"lint:types": "tsc", | ||
"lint-fix": "eslint --fix 'lib/**/*.js' 'src/**/*.js' 'scripts/**/*.js' 'test/**/*.js'", | ||
"test": "ava", | ||
"test:c8": "c8 $C8_OPTIONS ava --config=ava-nesm.config.js", | ||
"test:c8": "c8 --all $C8_OPTIONS ava", | ||
"test:xs": "exit 0" | ||
}, | ||
"devDependencies": { | ||
"@agoric/assert": "0.6.1-dev-39b1586.0+39b1586", | ||
"@agoric/swingset-liveslots": "0.10.3-dev-39b1586.0+39b1586", | ||
"@endo/bundle-source": "^2.5.1", | ||
"@endo/import-bundle": "^0.3.4", | ||
"@endo/init": "^0.5.56", | ||
"@endo/marshal": "^0.8.5", | ||
"@agoric/swingset-liveslots": "0.10.3-dev-39d8f59.0+39d8f59", | ||
"@endo/bundle-source": "^3.5.0", | ||
"@endo/errors": "^1.2.8", | ||
"@endo/import-bundle": "^1.3.2", | ||
"@endo/init": "^1.1.7", | ||
"@endo/marshal": "^1.6.2", | ||
"ava": "^5.3.0", | ||
"c8": "^7.13.0" | ||
"c8": "^10.1.2" | ||
}, | ||
@@ -47,8 +47,14 @@ "files": [ | ||
"files": [ | ||
"test/**/test-*.js" | ||
"test/**/*.test.*" | ||
], | ||
"require": [ | ||
"@endo/init/debug.js" | ||
], | ||
"timeout": "2m", | ||
"workerThreads": false | ||
}, | ||
"gitHead": "39b15861be74ddab196be88f24476f04cc4acb6f" | ||
"typeCoverage": { | ||
"atLeast": 83.68 | ||
}, | ||
"gitHead": "39d8f59288dbe1a674a3ab23f077b6fe7de15969" | ||
} |
@@ -5,3 +5,3 @@ # swingset-xsnap-supervisor | ||
The basic xsnap package (@agoric/xsnap) provides two components. The first is the `xsnap` executable, which embeds the XS JavaScript engine inside a driver program that listens for commands on a socket. The second is a library which can launch that program as a child process, and sends/receives messages over the socket. The `@agoric/xsnap` API lets you perform three basic operations on the worker: evaluate a string of code, deliver a string to a globally-registered handler function, and instruct the XS engine to write out a heap snapshot. | ||
The basic xsnap package ([@agoric/xsnap](../xsnap)) provides two components. The first is the `xsnap` executable, which embeds the XS JavaScript engine inside a driver program that listens for commands on a socket. The second is a library which can launch that program as a child process, and sends/receives messages over the socket. The `@agoric/xsnap` API lets you perform three basic operations on the worker: evaluate a string of code, deliver a string to a globally-registered handler function, and instruct the XS engine to write out a heap snapshot. | ||
@@ -8,0 +8,0 @@ However this is not quite sufficient for use as a vat host, which needs a SES environment which can accept vat deliveries and issue syscalls. To build something more suitable, we need additional layers: |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
952381
623
3