@evref-bl/pharo-agent 0.3.10 → 0.4.0
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/.claude-plugin/plugin.json +1 -1
- package/README.md +16 -11
- package/package.json +4 -4
- package/plugin.json +1 -1
- package/skills/pharo-setup/SKILL.md +1 -1
- package/src/cli.js +3 -0
- package/src/live.js +13 -4
package/README.md
CHANGED
|
@@ -26,27 +26,32 @@ pharo-agent image add dev --template 'Pharo 13.0 - 64bit (stable)'
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
`image add` registers a template-created image with the pinned MCP load policy,
|
|
29
|
-
and the first one registered becomes the default.
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
and the first one registered becomes the default. Pass `--profile <id>` to put
|
|
30
|
+
it under a particular launcher profile. `image list`, `image use <id>` (change
|
|
31
|
+
the default) and `image remove <id>` cover the rest; an open image must be
|
|
32
|
+
closed before its declaration is removed.
|
|
32
33
|
|
|
33
34
|
`open` starts an image through PLexus, loads PIFS, and mounts its projection
|
|
34
35
|
below `.pharo-agent/mounts`. `close` unmounts the projection and closes the
|
|
35
|
-
PLexus image. `pharo` calls any exposed MCP tool
|
|
36
|
-
|
|
36
|
+
PLexus image. `pharo <tool> [arguments-json]` calls any exposed MCP tool
|
|
37
|
+
through the same project route and `pharo list` names the tools an image
|
|
38
|
+
offers, while `mcp` exposes that tool surface as a command-scoped stdio MCP
|
|
37
39
|
server.
|
|
38
40
|
|
|
39
|
-
Several images can be open at once. `open`, `close`, `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
Several images can be open at once. `open`, `close`, `pharo` and `mcp` accept
|
|
42
|
+
`--image <id>`; without it the default image answers, so a project with one
|
|
43
|
+
image never mentions an image at all. `open --image <id>` adds an image
|
|
44
|
+
without closing the others, and `close` without `--image` closes every image
|
|
45
|
+
this project opened. `status` takes no `--image`, because it reports every
|
|
46
|
+
open image and which one is the default. Over `mcp`, each Pharo tool takes the
|
|
47
|
+
same optional `image` argument.
|
|
45
48
|
|
|
46
49
|
Pass `--mount-root <path>` to `init` to use a different projection root.
|
|
47
50
|
|
|
48
51
|
## Requirements
|
|
49
52
|
|
|
53
|
+
Node 22.12 or later.
|
|
54
|
+
|
|
50
55
|
PIFS currently supports the macOS workflow and needs
|
|
51
56
|
[fuse-t](https://www.fuse-t.org/). Its matching daemon is downloaded by PIFS;
|
|
52
57
|
Go is not required at runtime.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evref-bl/pharo-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Terminal-first Pharo integration for coding agents.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"test": "node --test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@evref-bl/pharo-mcp": "
|
|
35
|
-
"@evref-bl/plexus": "0.
|
|
36
|
-
"@evref-bl/plexus-gateway": "0.
|
|
34
|
+
"@evref-bl/pharo-mcp": "2.0.0",
|
|
35
|
+
"@evref-bl/plexus": "0.5.1",
|
|
36
|
+
"@evref-bl/plexus-gateway": "0.5.1",
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.32.1"
|
|
38
38
|
}
|
|
39
39
|
}
|
package/plugin.json
CHANGED
|
@@ -8,7 +8,7 @@ Run this only when the user asks to enable Pharo tooling in this project.
|
|
|
8
8
|
From the project root, run the released CLI that matches this plugin:
|
|
9
9
|
|
|
10
10
|
```sh
|
|
11
|
-
npx --yes @evref-bl/pharo-agent@0.
|
|
11
|
+
npx --yes @evref-bl/pharo-agent@0.4.0 init --host codex
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Use `--host claude` in Claude Code and `--host opencode` in OpenCode.
|
package/src/cli.js
CHANGED
|
@@ -146,6 +146,9 @@ export async function main(args) {
|
|
|
146
146
|
}
|
|
147
147
|
if (command === "status") {
|
|
148
148
|
requireNoArguments(command, commandArgs);
|
|
149
|
+
if (image) {
|
|
150
|
+
throw new Error("status reports every open image and does not accept --image");
|
|
151
|
+
}
|
|
149
152
|
console.log(JSON.stringify({ ok: true, ...agentImageStatus(projectRoot) }, null, 2));
|
|
150
153
|
return;
|
|
151
154
|
}
|
package/src/live.js
CHANGED
|
@@ -21,7 +21,13 @@ import {
|
|
|
21
21
|
writeOpenImages,
|
|
22
22
|
} from "./runtime.js";
|
|
23
23
|
|
|
24
|
-
export const pifsRelease = "v0.
|
|
24
|
+
export const pifsRelease = "v0.6.0";
|
|
25
|
+
|
|
26
|
+
// The class-side PIFSServer messages this plugin sends into the image. The
|
|
27
|
+
// release automation checks that a published PIFS still implements them: a pin
|
|
28
|
+
// bump that leaves a removed selector in place passes every test here, because
|
|
29
|
+
// the tests read generated source, and fails only in a live image.
|
|
30
|
+
export const pifsSelectors = ["startMountedAt:named:", "stopOn:"];
|
|
25
31
|
|
|
26
32
|
export function pifsStartCode(mountPath, imageName) {
|
|
27
33
|
return `Metacello new
|
|
@@ -29,11 +35,14 @@ export function pifsStartCode(mountPath, imageName) {
|
|
|
29
35
|
repository: 'github://Evref-BL/pharo-image-fs:${pifsRelease}/src';
|
|
30
36
|
load: 'Core'.
|
|
31
37
|
((Smalltalk globals at: #PIFSServer)
|
|
32
|
-
|
|
33
|
-
mountAt: ${smalltalkString(mountPath)} asFileReference
|
|
38
|
+
startMountedAt: ${smalltalkString(mountPath)} asFileReference
|
|
34
39
|
named: ${smalltalkString(imageName)}) port`;
|
|
35
40
|
}
|
|
36
41
|
|
|
42
|
+
export function pifsStopCode(projectionPort) {
|
|
43
|
+
return `(Smalltalk globals at: #PIFSServer) stopOn: ${projectionPort}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
37
46
|
export function resultPrintString(result) {
|
|
38
47
|
// MCP tool results carry the image's answer as JSON inside a text content part.
|
|
39
48
|
if (typeof result === "string") {
|
|
@@ -200,7 +209,7 @@ async function closeOneImage(projectRoot, openImages, imageId) {
|
|
|
200
209
|
let projectionError;
|
|
201
210
|
try {
|
|
202
211
|
await callImageTool(projectRoot, open, "image_evaluate", {
|
|
203
|
-
code:
|
|
212
|
+
code: pifsStopCode(open.projectionPort),
|
|
204
213
|
});
|
|
205
214
|
} catch (error) {
|
|
206
215
|
projectionError = error;
|