@theopenbee/engine-pi 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/pi.js CHANGED
@@ -1,9 +1,8 @@
1
- import { execFile } from "node:child_process";
2
1
  import { createReadStream, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
3
2
  import { basename, join } from "node:path";
4
3
  import { createInterface } from "node:readline";
5
4
  import { fileURLToPath } from "node:url";
6
- import { cliVersion, findCli, log, spawnCli } from "@theopenbee/engine-sdk";
5
+ import { cliVersion, execCli, findCli, log, spawnCli } from "@theopenbee/engine-sdk";
7
6
  const EXTENSION_PATH = fileURLToPath(new URL("../assets/openbee-mcp.js", import.meta.url));
8
7
  const MODELS_TIMEOUT_MS = 20_000;
9
8
  const MODELS_MAX_BUFFER = 64 * 1024 * 1024;
@@ -253,7 +252,7 @@ export function parseModels(output) {
253
252
  }
254
253
  function listModels(command) {
255
254
  return new Promise((resolve, reject) => {
256
- execFile(command, ["--list-models"], { timeout: MODELS_TIMEOUT_MS, killSignal: "SIGKILL", maxBuffer: MODELS_MAX_BUFFER, windowsHide: true }, (err, stdout, stderr) => {
255
+ execCli(command, ["--list-models"], { timeout: MODELS_TIMEOUT_MS, killSignal: "SIGKILL", maxBuffer: MODELS_MAX_BUFFER, windowsHide: true }, (err, stdout, stderr) => {
257
256
  if (!err) {
258
257
  resolve(String(stdout));
259
258
  return;
package/icon.svg ADDED
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800">
2
+ <path fill="currentColor" fill-rule="evenodd" d="M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z"/>
3
+ <path fill="currentColor" d="M517.36 400 H634.72 V634.72 H517.36 Z"/>
4
+ </svg>
@@ -5,6 +5,7 @@
5
5
  "name": { "en": "Pi", "zh": "Pi" },
6
6
  "description": { "en": "Runs tasks with the pi coding agent", "zh": "用 pi 编程助手执行任务" },
7
7
  "command": ["node", "dist/index.js"],
8
+ "icon": "icon.svg",
8
9
  "config": [
9
10
  {
10
11
  "key": "path",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theopenbee/engine-pi",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "pi engine plugin for openbee",
5
5
  "keywords": [
6
6
  "openbee",
@@ -22,6 +22,7 @@
22
22
  "files": [
23
23
  "dist",
24
24
  "assets",
25
+ "icon.svg",
25
26
  "openbee.plugin.json"
26
27
  ],
27
28
  "engines": {
@@ -37,7 +38,7 @@
37
38
  "prepare": "npm run build"
38
39
  },
39
40
  "dependencies": {
40
- "@theopenbee/engine-sdk": "^0.2.0"
41
+ "@theopenbee/engine-sdk": "^0.3.0"
41
42
  },
42
43
  "devDependencies": {
43
44
  "@types/node": "^22.10.0",