Skip to content

Commit

Permalink
fix: installing packages from new registry (#3609)
Browse files Browse the repository at this point in the history
* feat: use default isolated node-linker setting on pnpm

* fix: types to avoid issues in fresh builds like docker

* refactor: rm postgres plugin installation
  • Loading branch information
daniel-trevino authored Feb 20, 2025
1 parent 80defc6 commit 4d3ea18
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 21 deletions.
3 changes: 1 addition & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node-linker=hoisted
frozen-lockfile=true
frozen-lockfile=true
2 changes: 1 addition & 1 deletion client/src/lib/info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "0.25.6-alpha.1"}
{"version": "0.25.7"}
4 changes: 3 additions & 1 deletion packages/adapter-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"@elizaos/core": "workspace:*",
"@types/better-sqlite3": "7.6.12",
"better-sqlite3": "11.8.1",
"sqlite-vec": "0.1.6"
"sqlite-vec": "0.1.6",
"uuid": "11.0.5"
},
"devDependencies": {
"@types/uuid": "10.0.0",
"tsup": "8.3.5",
"vitest": "^3.0.2",
"@vitest/coverage-v8": "^3.0.2"
Expand Down
34 changes: 17 additions & 17 deletions packages/client-direct/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
import bodyParser from "body-parser";
import cors from "cors";
import express, { type Request as ExpressRequest } from "express";
import multer from "multer";
import { z } from "zod";
import {
type AgentRuntime,
composeContext,
elizaLogger,
messageCompletionFooter,
generateCaption,
generateImage,
type Media,
getEmbeddingZeroVector,
composeContext,
generateMessageResponse,
generateObject,
type Content,
type Memory,
getEmbeddingZeroVector,
messageCompletionFooter,
ModelClass,
type Client,
stringToUuid,
settings,
stringToUuid,
type AgentRuntime,
type Client,
type Content,
type IAgentRuntime,
type Media,
type Memory,
type Plugin,
} from "@elizaos/core";
import { createApiRouter } from "./api.ts";
import bodyParser from "body-parser";
import cors from "cors";
import express, { type Request as ExpressRequest } from "express";
import * as fs from "fs";
import multer from "multer";
import OpenAI from "openai";
import * as path from "path";
import { z } from "zod";
import { createApiRouter } from "./api.ts";
import { createVerifiableLogApiRouter } from "./verifiable-log-api.ts";
import OpenAI from "openai";

const storage = multer.diskStorage({
destination: (req, file, cb) => {
Expand Down Expand Up @@ -700,7 +700,7 @@ export class DirectClient {
const filePath = path.join(downloadDir, fileName);
elizaLogger.log("Full file path:", filePath);

await fs.promises.writeFile(filePath, buffer);
await fs.promises.writeFile(filePath, new Uint8Array(buffer));

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.

// Verify file was written

Check failure

Code scanning / CodeQL

Uncontrolled data used in path expression High

This path depends on a
user-provided value
.
const stats = await fs.promises.stat(filePath);
Expand Down
1 change: 1 addition & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"@types/uuid": "10.0.0",
"ai": "4.1.16",
"anthropic-vertex-ai": "1.0.2",
"bignumber.js": "9.1.2",
"dotenv": "16.4.5",
"fastembed": "1.14.1",
"fastestsmallesttextencoderdecoder": "1.0.22",
Expand Down
3 changes: 3 additions & 0 deletions packages/plugin-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
"@elizaos/core": "workspace:*",
"tsup": "8.3.5"
},
"devDependencies": {
"@types/node": "^22.10.5"
},
"scripts": {
"build": "tsup --format esm --dts",
"dev": "tsup --format esm --dts --watch",
Expand Down
19 changes: 19 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4d3ea18

Please sign in to comment.