Skip to content

Commit

Permalink
feat(repl)!: add @agoric/far exports to REPL, remove ui-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Dec 2, 2021
1 parent aa2c2de commit 3f41296
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 65 deletions.
16 changes: 4 additions & 12 deletions packages/vats/src/repl.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { isPromise } from '@agoric/promise-kit';
import { E } from '@agoric/eventual-send';
import { getInterfaceOf, Remotable, Far, isObject } from '@agoric/marshal';
import { Far } from '@agoric/far';
import * as farExports from '@agoric/far';

import { Nat } from '@agoric/nat';
import makeUIAgentMakers from './ui-agent.js';

const UNJSONABLES = new Map([
[NaN, 'NaN'],
Expand All @@ -19,7 +18,7 @@ export const dump = (value, spaces = '') =>
dump0(value, spaces, new WeakSet(), 0);

function dump0(value, spaces, inProgress, depth) {
if (!isObject(value)) {
if (Object(value) !== value) {
if (typeof value === 'bigint') {
return `${value}n`;
}
Expand Down Expand Up @@ -188,19 +187,12 @@ export function getReplHandler(replObjects, send) {

replConsole.log(`Welcome to Agoric!`);

// TODO: Remove
const agentMakers = makeUIAgentMakers({ harden, console: replConsole });

const endowments = {
Remotable,
Far,
getInterfaceOf,
...farExports,
console: replConsole,
E,
commands,
history,
harden,
agent: agentMakers, // TODO: Remove
...replObjects,
};
const c = new Compartment(endowments);
Expand Down
53 changes: 0 additions & 53 deletions packages/vats/src/ui-agent.js

This file was deleted.

0 comments on commit 3f41296

Please sign in to comment.