@evref-bl/pharo-agent 0.8.0 → 0.9.1
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/package.json +3 -4
- package/plugin.json +1 -1
- package/skills/pharo-setup/SKILL.md +1 -1
- package/src/gateway.js +1 -1
- package/src/live.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evref-bl/pharo-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Terminal-first Pharo integration for coding agents.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,9 +31,8 @@
|
|
|
31
31
|
"test": "node --test"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@evref-bl/pharo-mcp": "3.
|
|
35
|
-
"@evref-bl/plexus": "0.
|
|
36
|
-
"@evref-bl/plexus-gateway": "0.7.0",
|
|
34
|
+
"@evref-bl/pharo-mcp": "3.3.0",
|
|
35
|
+
"@evref-bl/plexus": "0.9.0",
|
|
37
36
|
"@modelcontextprotocol/sdk": "1.32.1"
|
|
38
37
|
}
|
|
39
38
|
}
|
package/plugin.json
CHANGED
|
@@ -8,7 +8,7 @@ Run this only when the user asks to enable or refresh Pharo tooling in this proj
|
|
|
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.9.1 init --host claude
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
Name the host this chat runs in: `--host claude` in Claude Code,
|
package/src/gateway.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { PlexusGateway } from "@evref-bl/plexus
|
|
2
|
+
import { PlexusGateway } from "@evref-bl/plexus/gateway";
|
|
3
3
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
4
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
5
|
import {
|
package/src/live.js
CHANGED
|
@@ -3,10 +3,10 @@ import fs from "node:fs";
|
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import {
|
|
5
5
|
ScopedPharoLauncher,
|
|
6
|
-
closeProject,
|
|
7
6
|
homeDependencyRepositoryCachePath,
|
|
8
|
-
openProject,
|
|
9
7
|
resolvePlexusHomePath,
|
|
8
|
+
startProjectImage,
|
|
9
|
+
stopProjectImage,
|
|
10
10
|
} from "@evref-bl/plexus";
|
|
11
11
|
import { callImageTool } from "./gateway.js";
|
|
12
12
|
import { readProjectConfig, writeProjectConfig } from "./project.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
writeOpenImages,
|
|
24
24
|
} from "./runtime.js";
|
|
25
25
|
|
|
26
|
-
export const pifsRelease = "v0.
|
|
26
|
+
export const pifsRelease = "v0.9.1";
|
|
27
27
|
|
|
28
28
|
// The class-side PIFSServer messages this plugin sends into the image. The
|
|
29
29
|
// release automation checks that a published PIFS still implements them: a pin
|
|
@@ -153,7 +153,7 @@ export function describeLifecycleFailure(failure) {
|
|
|
153
153
|
.join("\n ");
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
//
|
|
156
|
+
// startProjectImage and stopProjectImage throw on failure, carrying the failures on the error.
|
|
157
157
|
export async function runLifecycle(action, fallback) {
|
|
158
158
|
try {
|
|
159
159
|
return await action();
|
|
@@ -210,7 +210,7 @@ export async function openAgentImage(projectRoot, imageId) {
|
|
|
210
210
|
await launcher.createImage(resolved);
|
|
211
211
|
}
|
|
212
212
|
const opened = await runLifecycle(
|
|
213
|
-
() =>
|
|
213
|
+
() => startProjectImage({ projectRoot, imageId: resolved }),
|
|
214
214
|
`PLexus could not open image ${resolved}.`,
|
|
215
215
|
);
|
|
216
216
|
let image;
|
|
@@ -224,7 +224,7 @@ export async function openAgentImage(projectRoot, imageId) {
|
|
|
224
224
|
const withoutMcp = unsupportedRunningImage(opened.state, resolved);
|
|
225
225
|
if (!withoutMcp) {
|
|
226
226
|
// The image is running but unusable to us, so do not leave it behind.
|
|
227
|
-
await
|
|
227
|
+
await stopProjectImage({ projectRoot, imageId: resolved }).catch(() => {});
|
|
228
228
|
throw error;
|
|
229
229
|
}
|
|
230
230
|
const open = { statePath: opened.statePath, imageId: resolved, mcp: false };
|
|
@@ -245,7 +245,7 @@ export async function openAgentImage(projectRoot, imageId) {
|
|
|
245
245
|
} catch (error) {
|
|
246
246
|
// The projection is half-started at best and nothing records it yet, so
|
|
247
247
|
// close the image rather than leave an image and a mount nothing owns.
|
|
248
|
-
await
|
|
248
|
+
await stopProjectImage({ projectRoot, imageId: resolved }).catch(() => {});
|
|
249
249
|
throw error;
|
|
250
250
|
}
|
|
251
251
|
writeOpenImages(projectRoot, { ...openImages, [resolved]: { ...open, projectionPort } });
|
|
@@ -302,7 +302,7 @@ async function closeOneImage(projectRoot, openImages, imageId) {
|
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
304
|
const closed = await runLifecycle(
|
|
305
|
-
() =>
|
|
305
|
+
() => stopProjectImage({ projectRoot, imageId }),
|
|
306
306
|
`PLexus could not close image ${imageId}.`,
|
|
307
307
|
);
|
|
308
308
|
return { stoppedImages: closed.stoppedImages.map((image) => image.id), projectionError };
|