@yousif_nazhat/penpal-pi 0.2.0-rc.2 → 0.2.0-rc.3
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 +2 -2
- package/index.ts +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@ This PI package adds PenPal's seven read-only, masked workspace tools to PI.
|
|
|
5
5
|
Install the PenPal Python core first, then install this release candidate in PI:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
python3 -m pip install
|
|
9
|
-
pi install npm:@yousif_nazhat/penpal-pi@0.2.0-rc.
|
|
8
|
+
python3 -m pip install penpal-enum
|
|
9
|
+
pi install npm:@yousif_nazhat/penpal-pi@0.2.0-rc.3
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
Set `PENPAL_WORKSPACE` when the workspace is not `penpal-workspace`; set `PENPAL_PYTHON` when Python is not available as `python3`.
|
package/index.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
2
2
|
import { execFile } from "node:child_process";
|
|
3
|
+
import { resolve } from "node:path";
|
|
3
4
|
import { promisify } from "node:util";
|
|
4
5
|
import { Type } from "typebox";
|
|
5
6
|
|
|
@@ -7,6 +8,7 @@ const execFileAsync = promisify(execFile);
|
|
|
7
8
|
const cwd = process.env.PENPAL_CWD ?? process.cwd();
|
|
8
9
|
const python = process.env.PENPAL_PYTHON ?? (process.platform === "win32" ? "python" : "python3");
|
|
9
10
|
const workspace = process.env.PENPAL_WORKSPACE;
|
|
11
|
+
const activeWorkspace = resolve(cwd, workspace ?? "penpal-workspace");
|
|
10
12
|
const readOnlyTools = [
|
|
11
13
|
"penpal_context",
|
|
12
14
|
"penpal_suggest",
|
|
@@ -107,7 +109,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
107
109
|
return;
|
|
108
110
|
}
|
|
109
111
|
ctx.ui.notify(
|
|
110
|
-
`PenPal ready: ${readOnlyTools.length} read-only tools registered; ${report.valid_playbooks} playbooks valid.`,
|
|
112
|
+
`PenPal ready: ${readOnlyTools.length} read-only tools registered; ${report.valid_playbooks} playbooks valid; workspace: ${activeWorkspace}.`,
|
|
111
113
|
"info",
|
|
112
114
|
);
|
|
113
115
|
} catch (error) {
|