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
1 change: 0 additions & 1 deletion packages/usdk/packages/upstreet-agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"memoize-one": "^6.0.0",
"minimatch": "^9.0.4",
"openai": "^4.56.0",
"path-util": "file:./packages/path-util",
"playwright-core-lite": "file:./packages/playwright-core-lite",
"queue-manager": "file:./packages/queue-manager",
"react": "file:./packages/react",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import path from 'path';
import fs from 'fs';
import { getCurrentDirname } from 'path-util';

const loadWasm = p => {
const b = fs.readFileSync(p);
const m = new WebAssembly.Module(b);
return m;
};

let dirname = getCurrentDirname(import.meta, process);
const dirname = path.dirname(new URL(import.meta.url).pathname);
const wasm = loadWasm(path.join(dirname, '/libopus.wasm'));

const location = new URL('http://localhost');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@ import EmscriptenWASM from "./EmscriptenWasm.js";

import path from 'path';
import fs from 'fs';
import { getCurrentDirname } from "path-util";

const loadWasm = p => {
const b = fs.readFileSync(p);
const m = new WebAssembly.Module(b);
return m;
};

let dirname = getCurrentDirname(import.meta, process);
let dirname = path.dirname(new URL(import.meta.url).pathname);
const wasmAudioDecoderCommon = loadWasm(path.join(dirname, '/wasm-audio-decoder-common.wasm'));
const emscriptenWasm = loadWasm(path.join(dirname, '/emscripten-wasm.wasm'));

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import fs from 'fs';
import { mkdirp } from 'mkdirp';
import { rimraf } from 'rimraf';
import toml from '@iarna/toml';
import { getCurrentDirname } from '../react-agents/util/path-util.mjs';
import { npmInstall } from '../../../../lib/npm-util.mjs';

const dirname = getCurrentDirname(import.meta, process);
const dirname = path.dirname(new URL(import.meta.url).pathname);
const copyWithStringTransform = async (src, dst, transformFn = (s) => s) => {
let s = await fs.promises.readFile(src, 'utf8');
s = transformFn(s);
Expand Down Expand Up @@ -98,9 +96,6 @@ export const installAgent = async (directory) => {
};
await removeDependencies();

// install local dependencies (from the agent's package.json)
await npmInstall(directory);

// symlink node_modules deps
const addDependencies = async () => {
await Promise.all(dependencies.map(async (name) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import path from 'path';
import crossSpawn from 'cross-spawn';
import { devServerPort } from './util/ports.mjs';
import { getCurrentDirname} from '../react-agents/util/path-util.mjs'
import { installAgent } from '../react-agents-node/install-agent.mjs';

//

const localDirectory = getCurrentDirname(import.meta, process);
const localDirectory = path.dirname(new URL(import.meta.url).pathname);

//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import crossSpawn from 'cross-spawn';
import { program } from 'commander';
import { createServer as createViteServer } from 'vite';
import { Debouncer } from 'debouncer';
import { getCurrentDirname } from '../react-agents/util/path-util.mjs';

//

const dirname = getCurrentDirname(import.meta, process);
const dirname = path.dirname(new URL(import.meta.url).pathname);

// watch SIGTERM
process.on('SIGTERM', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ export class GenerativeAgentObject {
text,
actOpts,
debugOpts,
mode: 'basic' // hardcode basic for now. TODO: Make this an argument
});
await executeAgentActionStep(this, step);
});
Expand Down

This file was deleted.