Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions packages/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,12 @@
"test:watch": "vitest --config vitest.config.ts"
},
"dependencies": {
"@agoric/swingset-liveslots": "0.10.3-u18.0",
"@agoric/swingset-liveslots": "0.10.3-dev-3d64bee.0",
"@endo/errors": "^1.2.8",
"@endo/eventual-send": "^1.2.6",
"@endo/exo": "^1.5.4",
"@endo/far": "^1.1.9",
"@endo/import-bundle": "^1.3.1",
"@endo/marshal": "^1.6.2",
"@endo/pass-style": "^1.4.7",
"@endo/patterns": "^1.4.4",
"@endo/promise-kit": "^1.1.6",
"@metamask/superstruct": "^3.1.0",
"@metamask/utils": "^11.0.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/kernel/src/Kernel.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { Message, VatOneResolution } from '@agoric/swingset-liveslots';
import { passStyleOf } from '@endo/far';
import type { CapData } from '@endo/marshal';
import { makePromiseKit } from '@endo/promise-kit';
Expand All @@ -10,8 +11,6 @@ import type { DuplexStream } from '@ocap/streams';
import type { Logger } from '@ocap/utils';
import { makeLogger } from '@ocap/utils';

// XXX Once the packaging of liveslots is fixed, these should be imported from there
import type { Message, VatOneResolution } from './ag-types.js';
import { assert, Fail } from './assert.js';
import { kser, kunser, krefOf, kslot } from './kernel-marshal.js';
import type { SlotValue } from './kernel-marshal.js';
Expand Down Expand Up @@ -665,6 +664,7 @@ export class Kernel {
if (bootstrapRoot) {
const bootstrapMessage: Message = {
methargs: kser(['bootstrap', [roots]]),
result: undefined,
};
const bootstrapItem: RunQueueItemSend = {
type: 'send',
Expand Down
15 changes: 6 additions & 9 deletions packages/kernel/src/VatHandle.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import type {
Message,
VatSyscallObject,
VatOneResolution,
} from '@agoric/swingset-liveslots';
import type { CapData } from '@endo/marshal';
import { makePromiseKit } from '@endo/promise-kit';
import { VatDeletedError, StreamReadError } from '@ocap/errors';
import type { DuplexStream } from '@ocap/streams';
import type { Logger } from '@ocap/utils';
import { makeLogger, makeCounter } from '@ocap/utils';
// XXX Reenable the following once the packaging of liveslots is fixed (and at
// the same time remove the below import of ./ag-types.js)
// import type { VatSyscallObject } from '@agoric/swingset-liveslots';

import type {
Message,
VatSyscallObject,
VatOneResolution,
} from './ag-types.js';
import type { Kernel } from './Kernel.js';
import { VatCommandMethod } from './messages/index.js';
import type {
Expand Down Expand Up @@ -348,7 +345,7 @@ export class VatHandle {
// vat. All others will be replies to messages originally sent by the kernel TO the
// vat.
if (payload.method === VatCommandMethod.syscall) {
await this.#handleSyscall(payload.params);
await this.#handleSyscall(payload.params as VatSyscallObject);
} else {
const promiseCallbacks = this.#unresolvedMessages.get(id);
if (promiseCallbacks === undefined) {
Expand Down
11 changes: 6 additions & 5 deletions packages/kernel/src/VatSupervisor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { makeLiveSlots as localMakeLiveSlots } from '@agoric/swingset-liveslots';
// XXX Reenable the following once the packaging of liveslots is fixed (and at
// the same time remove the below import of ./ag-types-index.js)
// import type { VatSyscallObject, VatSyscallResult, VatDeliveryObject } from '@agoric/swingset-liveslots';
import type {
VatDeliveryObject,
VatSyscallObject,
VatSyscallResult,
} from '@agoric/swingset-liveslots';
import { importBundle } from '@endo/import-bundle';
import { makeMarshal } from '@endo/marshal';
import type { CapData } from '@endo/marshal';
Expand All @@ -13,7 +15,6 @@ import type {
MakeLiveSlotsFn,
GCTools,
} from './ag-liveslots-types.js';
import type { VatSyscallObject, VatSyscallResult } from './ag-types-index.js';
import { makeDummyMeterControl } from './dummyMeterControl.js';
import type { VatCommand, VatCommandReply } from './messages/index.js';
import { VatCommandMethod } from './messages/index.js';
Expand Down Expand Up @@ -104,7 +105,7 @@ export class VatSupervisor {
console.error(`cannot deliver before vat is loaded`);
return;
}
await this.#dispatch(harden(payload.params));
await this.#dispatch(harden(payload.params) as VatDeliveryObject);
await Promise.all(this.#syscallsInFlight);
this.#syscallsInFlight.length = 0;
await this.replyToMessage(id, {
Expand Down
12 changes: 4 additions & 8 deletions packages/kernel/src/ag-liveslots-types.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// XXX placeholder to get around @agoric/swingset-liveslots package configuration issues

// These types are defined in the liveslots package, but not exported cleanly.

import type { CapData } from '@endo/marshal';

import type {
VatDeliveryObject,
VatOneResolution,
SwingSetCapData,
} from './ag-types-index.js';
import type { LiveSlotsOptions, MeterControl } from './ag-types.js';
LiveSlotsOptions,
MeterControl,
} from '@agoric/swingset-liveslots';
import type { CapData } from '@endo/marshal';

export type SyscallResult = SwingSetCapData | string | string[] | null;
export type DispatchFn = (vdo: VatDeliveryObject) => Promise<void>;
Expand Down
243 changes: 0 additions & 243 deletions packages/kernel/src/ag-store-types.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/kernel/src/ag-types-index.ts

This file was deleted.

Loading