magpie-pi 0.1.1 → 0.1.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/README.md CHANGED
@@ -15,7 +15,7 @@ pi install npm:magpie-pi
15
15
  pi
16
16
  ```
17
17
 
18
- The npm package includes prebuilt supervisor binaries: **no Go installation or build command is needed**. Bun is still required at runtime (locally tested with 1.3.14).
18
+ The npm package includes prebuilt supervisor binaries: **no Go installation or build command is needed**. Bun is required to run configured community plugins (tested with 1.3.14), not to load the extension or open its plugin manager.
19
19
 
20
20
  ## Usage
21
21
 
package/README.zh-CN.md CHANGED
@@ -15,7 +15,7 @@ pi install npm:magpie-pi
15
15
  pi
16
16
  ```
17
17
 
18
- npm 包包含预编译宿主程序,**无需安装 Go,也无需执行构建命令**。Bun 是运行依赖,仍需安装(本机测试版本为 1.3.14)。
18
+ npm 包包含预编译宿主程序,**无需安装 Go,也无需执行构建命令**。运行已配置的社区插件需要 Bun(测试版本为 1.3.14),加载扩展或打开插件管理器则不需要。
19
19
 
20
20
  ## 使用
21
21
 
package/bin/magpie-pi CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -3,8 +3,8 @@ import {fileURLToPath} from "node:url";
3
3
  import path from "node:path";
4
4
  import os from "node:os";
5
5
  import type {ExtensionAPI} from "@earendil-works/pi-coding-agent";
6
- import * as completions from "@earendil-works/pi-ai/api/openai-completions";
7
- import * as anthropic from "@earendil-works/pi-ai/api/anthropic-messages";
6
+ // The Pi extension loader exposes the compat entry, not the per-API subpaths.
7
+ import {openAICompletionsApi,anthropicMessagesApi} from "@earendil-works/pi-ai/compat";
8
8
  import {Bridge} from "./bridge.mjs";
9
9
  import {supervisorPath} from "./platform.mjs";
10
10
  import {registerPlugins,PluginManager} from "./plugins.mjs";
@@ -43,6 +43,8 @@ export default async function(pi:ExtensionAPI){
43
43
  const initialized=await bridge.call("init",{plugins:config.plugins,config:config.opencode || {},authPath:path.join(state,"plugin-auth.json"),directory:state});
44
44
  for(const p of initialized.plugins)if(p.error)throw new Error(p.error);
45
45
  const rows=await bridge.call("providers");
46
+ const completions=openAICompletionsApi();
47
+ const anthropic=anthropicMessagesApi();
46
48
  for(const initial of rows){
47
49
  let row=initial;
48
50
  const id="magpie-"+row.id;
package/package.json CHANGED
@@ -1,10 +1,19 @@
1
1
  {
2
2
  "name": "magpie-pi",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Magpie community plugin integration for Pi",
5
5
  "license": "UNLICENSED",
6
- "keywords": ["pi-package"],
7
- "files": ["extension/", "vendor/", "bin/", "extraction.json", "README.md", "README.zh-CN.md"],
6
+ "keywords": [
7
+ "pi-package"
8
+ ],
9
+ "files": [
10
+ "extension/",
11
+ "vendor/",
12
+ "bin/",
13
+ "extraction.json",
14
+ "README.md",
15
+ "README.zh-CN.md"
16
+ ],
8
17
  "repository": {
9
18
  "type": "git",
10
19
  "url": "https://github.com/arklee/magpie-pi.git"