@evref-bl/pharo-agent 0.15.0 → 0.16.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/package.json +3 -3
- package/plugin.json +1 -1
- package/skills/pharo-feedback/SKILL.md +1 -1
- package/skills/pharo-setup/SKILL.md +11 -27
- package/src/help.js +16 -30
- package/src/init.js +19 -49
- package/src/live.js +1 -1
- package/src/mcpServer.js +23 -35
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evref-bl/pharo-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Terminal-first Pharo integration for coding agents.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"test": "node --test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@evref-bl/pharo-mcp": "3.
|
|
36
|
-
"@evref-bl/plexus": "0.
|
|
35
|
+
"@evref-bl/pharo-mcp": "3.5.0",
|
|
36
|
+
"@evref-bl/plexus": "0.15.0",
|
|
37
37
|
"@modelcontextprotocol/sdk": "1.32.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
package/plugin.json
CHANGED
|
@@ -63,7 +63,7 @@ instead of a new issue.
|
|
|
63
63
|
One issue per problem; findings that share a cause make one issue. Title it
|
|
64
64
|
with what goes wrong, in the tool's own terms. Keep the body short:
|
|
65
65
|
|
|
66
|
-
- **Tool:** its name; `pharo-agent 0.
|
|
66
|
+
- **Tool:** its name; `pharo-agent 0.16.0`; the image's Pharo version, which
|
|
67
67
|
`image_list` gives; the host you run in.
|
|
68
68
|
- **What happened:** what you asked for and what came back, the error quoted
|
|
69
69
|
and trimmed.
|
|
@@ -5,21 +5,20 @@ description: Enable or refresh Pharo image tooling in the current Pharo project.
|
|
|
5
5
|
|
|
6
6
|
Run this only when the user asks to enable or refresh Pharo tooling in this project.
|
|
7
7
|
|
|
8
|
-
From the project root, run the released CLI that matches this plugin
|
|
8
|
+
From the project root, run the released CLI that matches this plugin, naming
|
|
9
|
+
the host this chat runs in: `--host claude` in Claude Code, `--host codex` in
|
|
10
|
+
Codex, `--host opencode` in OpenCode.
|
|
9
11
|
|
|
10
12
|
```sh
|
|
11
|
-
npx --yes @evref-bl/pharo-agent@0.
|
|
13
|
+
npx --yes @evref-bl/pharo-agent@0.16.0 init --host claude
|
|
12
14
|
```
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
block and this project's own files, so Pharo guidance stays out of unrelated
|
|
18
|
-
work.
|
|
16
|
+
It writes the project's Pharo guide, skills and references, and a block in the
|
|
17
|
+
host's guide that points to them; no host configuration. Re-running it after
|
|
18
|
+
an upgrade replaces those files and keeps image declarations and image code.
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`.claude/settings.json`:
|
|
20
|
+
In Claude Code, enable the plugin for this project in `.claude/settings.json`;
|
|
21
|
+
the next session gets the tools:
|
|
23
22
|
|
|
24
23
|
```json
|
|
25
24
|
{
|
|
@@ -35,26 +34,11 @@ this project rather than configuring a server by hand. Commit
|
|
|
35
34
|
}
|
|
36
35
|
```
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
one. Enabling it per project keeps every other project untouched.
|
|
40
|
-
|
|
41
|
-
After upgrading the plugin/CLI, re-run the setup command from the project root
|
|
42
|
-
with the same host to refresh the generated guide and copied skills/references.
|
|
43
|
-
Those files are overwritten; keep project-specific guidance outside the host's
|
|
44
|
-
managed block and outside generated/copied paths. Omit `--mount-root` to retain
|
|
45
|
-
existing settings. Image declarations, runtime state, and live image code are
|
|
46
|
-
preserved. This refresh does not install a newer package or upgrade image tools.
|
|
47
|
-
|
|
48
|
-
Setup initializes the current directory, creating `plexus.json` with
|
|
49
|
-
no image when it is absent. Register one before the first
|
|
50
|
-
`pharo-agent image start`:
|
|
37
|
+
Then declare the project's first image, its default:
|
|
51
38
|
|
|
52
39
|
```sh
|
|
53
40
|
pharo-agent image templates
|
|
54
41
|
pharo-agent image add dev --template '<launcher template name>'
|
|
55
42
|
```
|
|
56
43
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
After setup, read `pharo.AGENTS.md` in this chat before doing Pharo work. A
|
|
60
|
-
new chat picks up the conditional project guidance automatically.
|
|
44
|
+
Read `pharo.AGENTS.md` before doing Pharo work.
|
package/src/help.js
CHANGED
|
@@ -3,75 +3,61 @@ import { hostChoices, hostIds } from "./hosts.js";
|
|
|
3
3
|
const commands = {
|
|
4
4
|
init: {
|
|
5
5
|
usage: `init --host <${hostChoices()}> [--mount-root <path>]`,
|
|
6
|
-
description: "
|
|
7
|
-
+ "
|
|
8
|
-
+ "The mount root defaults to .pharo-agent/mounts; omit --mount-root to keep an existing setting.",
|
|
6
|
+
description: "Write this project's Pharo guide, skills and references for the host. Re-run to refresh\n"
|
|
7
|
+
+ "them. --mount-root sets where sources mount, .pharo-agent/mounts by default.",
|
|
9
8
|
example: `init --host ${hostIds[0]}`,
|
|
10
9
|
},
|
|
11
10
|
"image list": {
|
|
12
11
|
usage: "image list",
|
|
13
|
-
description: "List the
|
|
14
|
-
+ "projection port of each image this project has running. An image this project\n"
|
|
15
|
-
+ "started that has since exited is listed as exited.",
|
|
12
|
+
description: "List the declared images, the default, and the mount and port of each running one.",
|
|
16
13
|
example: "image list",
|
|
17
14
|
},
|
|
18
15
|
"image templates": {
|
|
19
16
|
usage: "image templates",
|
|
20
|
-
description: "List
|
|
21
|
-
+ "needs --category when passed to image add.",
|
|
17
|
+
description: "List the templates images can be made from, with their categories.",
|
|
22
18
|
example: "image templates",
|
|
23
19
|
},
|
|
24
20
|
"image add": {
|
|
25
21
|
usage: "image add <id> --template <name> [--category <name>] [--profile <id>]",
|
|
26
|
-
description: "Declare an image
|
|
27
|
-
+ "
|
|
28
|
-
|
|
29
|
-
example: "image add dev --template '<template name>'",
|
|
22
|
+
description: "Declare an image; image start creates it. Name it after what it is for, like a branch.\n"
|
|
23
|
+
+ "The first declared image is the default. --category is for a name two categories offer.",
|
|
24
|
+
example: "image add pretty-print-formatter --template '<template name>'",
|
|
30
25
|
},
|
|
31
26
|
"image use": {
|
|
32
27
|
usage: "image use <id>",
|
|
33
|
-
description: "Make
|
|
28
|
+
description: "Make an image the default.",
|
|
34
29
|
example: "image use dev",
|
|
35
30
|
},
|
|
36
31
|
"image remove": {
|
|
37
32
|
usage: "image remove <id>",
|
|
38
|
-
description: "
|
|
39
|
-
+ "Removing the default image clears the default selection.",
|
|
33
|
+
description: "Drop an image's declaration. Stop it first; its files are kept.",
|
|
40
34
|
example: "image remove dev",
|
|
41
35
|
},
|
|
42
36
|
"image start": {
|
|
43
37
|
usage: "image start [<id>]",
|
|
44
|
-
description: "Create if needed and start an image
|
|
45
|
-
+ "
|
|
46
|
-
+ "mounted on macOS with fuse-t; elsewhere the image starts without one and says so.\n"
|
|
47
|
-
+ "Pharo versions outside the MCP support range start without tools or a projection.",
|
|
38
|
+
description: "Create if needed and start an image, the default one without an id. Others keep running.\n"
|
|
39
|
+
+ "On macOS with fuse-t its source mounts as files.",
|
|
48
40
|
example: "image start dev",
|
|
49
41
|
},
|
|
50
42
|
"image stop": {
|
|
51
43
|
usage: "image stop [<id>] [--all]",
|
|
52
|
-
description: "Stop
|
|
53
|
-
+ "image when no id is given. Use --all to stop every image this project started.",
|
|
44
|
+
description: "Stop an image and its source mount, the default one without an id, or --all of them.",
|
|
54
45
|
example: "image stop dev",
|
|
55
46
|
},
|
|
56
47
|
mcp: {
|
|
57
48
|
usage: "mcp [--image <id>]",
|
|
58
|
-
description: "Serve this project's images as a
|
|
59
|
-
+ "--image to use the project's default image. It starts whether or not an image\n"
|
|
60
|
-
+ "is running: image_start starts one and the image's own tools join the list. The\n"
|
|
61
|
-
+ "server exits with this command, and the plugin's .mcp.json starts it for a host.",
|
|
49
|
+
description: "Serve this project's images as a stdio MCP server, as the plugin does for a host.",
|
|
62
50
|
example: "mcp --image dev",
|
|
63
51
|
},
|
|
64
52
|
"pharo list": {
|
|
65
53
|
usage: "pharo list [--image <id>]",
|
|
66
|
-
description: "List a running image's advertised tools.
|
|
67
|
-
+ "Use tool_search and tool_get to discover and inspect the rest of its catalogue.",
|
|
54
|
+
description: "List a running image's advertised tools. tool_search and tool_get find the rest.",
|
|
68
55
|
example: "pharo list",
|
|
69
56
|
},
|
|
70
57
|
pharo: {
|
|
71
58
|
usage: "pharo <tool> [arguments-json] [--image <id>]",
|
|
72
|
-
description: "Call a tool in a running image
|
|
73
|
-
+ "
|
|
74
|
-
+ "before calling it; a failed tool result makes the command exit unsuccessfully.",
|
|
59
|
+
description: "Call a tool in a running image with a JSON object of arguments, {} by default.\n"
|
|
60
|
+
+ "Read its schema with tool_get first.",
|
|
75
61
|
example: 'pharo tool_get \'{"name":"class_search"}\'',
|
|
76
62
|
},
|
|
77
63
|
};
|
package/src/init.js
CHANGED
|
@@ -110,64 +110,34 @@ function assertRoutingResolves(routing, templates) {
|
|
|
110
110
|
function pharoGuide() {
|
|
111
111
|
return `# Pharo project guide
|
|
112
112
|
|
|
113
|
-
${generatedBy}. Edits here are replaced the next time it
|
|
113
|
+
${generatedBy}. Edits here are replaced the next time it
|
|
114
|
+
runs: re-run it after upgrading the plugin, and keep your own instructions
|
|
115
|
+
elsewhere.
|
|
114
116
|
|
|
115
|
-
|
|
116
|
-
the project root with the same host to refresh this guide and the copied skills
|
|
117
|
-
and references. Omit \`--mount-root\` to keep existing settings. Image declarations,
|
|
118
|
-
runtime state, and live code are preserved. Keep project-specific instructions
|
|
119
|
-
outside generated/copied files and outside the host guide's managed block.
|
|
120
|
-
Refreshing project files does not install a newer package or upgrade image tools.
|
|
117
|
+
## Images
|
|
121
118
|
|
|
122
|
-
\`plexus.json\` declares this
|
|
123
|
-
|
|
124
|
-
pharo-agent plugin enabled, that is \`image_templates\` and then \`image_add\`,
|
|
125
|
-
with no shell. Otherwise:
|
|
119
|
+
\`plexus.json\` declares this workspace's images. With the plugin, use the
|
|
120
|
+
\`image_*\` tools; otherwise:
|
|
126
121
|
|
|
127
122
|
\`\`\`sh
|
|
128
123
|
pharo-agent image templates
|
|
129
|
-
pharo-agent image
|
|
130
|
-
pharo-agent image
|
|
124
|
+
pharo-agent image add <id> --template '<template name>'
|
|
125
|
+
pharo-agent image start <id>
|
|
131
126
|
\`\`\`
|
|
132
127
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
The first image declared is the default, the main line. An image takes one
|
|
129
|
+
writer, and making one takes seconds: add a new one for each new subject or
|
|
130
|
+
parallel agent rather than share one, named like a branch
|
|
131
|
+
(\`pretty-print-formatter\`, not \`p15\`). A running image may be another
|
|
132
|
+
session's. Stop an image and remove its declaration when its subject is done.
|
|
137
133
|
|
|
138
|
-
|
|
139
|
-
use <id>\` changes the default, and \`pharo-agent image remove <id>\` drops a
|
|
140
|
-
declaration. Stop an image before removing its declaration.
|
|
134
|
+
## Tools
|
|
141
135
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
With the pharo-agent plugin enabled for this project, this is all MCP tools:
|
|
148
|
-
declare an image with \`image_add\`, start it with \`image_start\`, and call the
|
|
149
|
-
image's own tools by name. Without it,
|
|
150
|
-
call a tool with \`pharo-agent pharo <tool> [arguments-json]\`, and
|
|
151
|
-
\`pharo-agent mcp\` serves the same surface as a command-scoped stdio MCP
|
|
152
|
-
server.
|
|
153
|
-
|
|
154
|
-
\`pharo-agent pharo list\` names the tools the image advertises, which are the
|
|
155
|
-
common ones rather than all of it. Find the rest through the catalogue rather
|
|
156
|
-
than guessing at a name, then call one the same way as any other:
|
|
157
|
-
|
|
158
|
-
\`\`\`sh
|
|
159
|
-
pharo-agent pharo tool_search '{"query":"repository commit"}'
|
|
160
|
-
pharo-agent pharo tool_get '{"name":"repository_commit"}'
|
|
161
|
-
pharo-agent pharo repository_commit '{"name":"MCP","message":"..."}'
|
|
162
|
-
\`\`\`
|
|
163
|
-
|
|
164
|
-
Several images can run at once. \`pharo-agent image start <id>\` and
|
|
165
|
-
\`pharo-agent image stop <id>\` name their image, \`pharo\` and \`mcp\` take
|
|
166
|
-
\`--image <id>\`, and without either the default image answers.
|
|
167
|
-
\`pharo-agent image list\` says which are running, and
|
|
168
|
-
\`pharo-agent image stop --all\` stops every one this project started.
|
|
169
|
-
|
|
170
|
-
Image, Tonel, Iceberg, disk Git, and host processes are separate states.
|
|
136
|
+
With the plugin, an image's tools are MCP tools. Otherwise call one with
|
|
137
|
+
\`pharo-agent pharo <tool> [arguments-json] [--image <id>]\`, or serve them
|
|
138
|
+
with \`pharo-agent mcp\`. An image lists its common tools; \`tool_search\` and
|
|
139
|
+
\`tool_get\` find the rest. On macOS with fuse-t, \`image start\` also mounts
|
|
140
|
+
the source under \`.pharo-agent/mounts\`.
|
|
171
141
|
|
|
172
142
|
${pharoRouting()}
|
|
173
143
|
`;
|
package/src/live.js
CHANGED
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
writeRunningImages,
|
|
23
23
|
} from "./runtime.js";
|
|
24
24
|
|
|
25
|
-
export const pifsRelease = "v0.10.
|
|
25
|
+
export const pifsRelease = "v0.10.3";
|
|
26
26
|
|
|
27
27
|
// fuse-t ships as a macOS installer package, so it lands in /usr/local
|
|
28
28
|
// whatever Homebrew's prefix is. The unversioned symlink is what the daemon
|
package/src/mcpServer.js
CHANGED
|
@@ -19,18 +19,18 @@ import { readRunningImage } from "./runtime.js";
|
|
|
19
19
|
// defers the rest, so this is what decides whether Pharo tools are searched
|
|
20
20
|
// for at all. It is the conditional guidance the generated guide gives,
|
|
21
21
|
// written where the host can act on it.
|
|
22
|
-
export const serverInstructions = `Live Pharo images for this project: reading and
|
|
23
|
-
|
|
24
|
-
and projecting image source as files on disk.
|
|
22
|
+
export const serverInstructions = `Live Pharo images for this project: reading and changing code, running tests,
|
|
23
|
+
searching and critiquing it.
|
|
25
24
|
|
|
26
|
-
Search these tools
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
image_templates and image_add first.
|
|
25
|
+
Search these tools for any Pharo, Smalltalk, Tonel or .st work. Start an
|
|
26
|
+
image with image_start before calling its tools; a project with no image needs
|
|
27
|
+
image_templates and image_add first. An image lists its common tools;
|
|
28
|
+
tool_search and tool_get find the rest.
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
An image takes one writer, and making one takes seconds: image_add a new one
|
|
31
|
+
for each new subject or parallel agent rather than share one, named like a
|
|
32
|
+
branch (pretty-print-formatter, not p15). The default image is the main line.
|
|
33
|
+
A running image may be another session's.`;
|
|
34
34
|
|
|
35
35
|
// This server's own tools, in the order a project meets them: declare an
|
|
36
36
|
// image, start it, and the image's tools join the list. Listed whether or not
|
|
@@ -40,34 +40,28 @@ and tool_get to find the rest, then call one by name like any other.`;
|
|
|
40
40
|
const projectTools = [
|
|
41
41
|
{
|
|
42
42
|
name: "image_templates",
|
|
43
|
-
description:
|
|
44
|
-
"List the images Pharo Launcher can create, with the category of each. "
|
|
45
|
-
+ "A template name that two categories offer is flagged, and needs its "
|
|
46
|
-
+ "category when it is declared.",
|
|
43
|
+
description: "List the templates images can be made from, with their categories.",
|
|
47
44
|
inputSchema: { type: "object", properties: {} },
|
|
48
45
|
},
|
|
49
46
|
{
|
|
50
47
|
name: "image_add",
|
|
51
48
|
description:
|
|
52
|
-
"Declare an image
|
|
53
|
-
+ "
|
|
54
|
-
+ "does, from this template. The first image declared becomes the "
|
|
55
|
-
+ "project's default.",
|
|
49
|
+
"Declare an image made from a template; image_start creates it. The "
|
|
50
|
+
+ "first image declared is the default.",
|
|
56
51
|
inputSchema: {
|
|
57
52
|
type: "object",
|
|
58
53
|
properties: {
|
|
59
54
|
id: {
|
|
60
55
|
type: "string",
|
|
61
|
-
description: "
|
|
56
|
+
description: "What the image is for, named like a branch.",
|
|
62
57
|
},
|
|
63
58
|
template: {
|
|
64
59
|
type: "string",
|
|
65
|
-
description: "Template name,
|
|
60
|
+
description: "Template name, as image_templates gives it.",
|
|
66
61
|
},
|
|
67
62
|
category: {
|
|
68
63
|
type: "string",
|
|
69
|
-
description:
|
|
70
|
-
"Template category. Needed only for a name two categories offer.",
|
|
64
|
+
description: "Template category, for a name two categories offer.",
|
|
71
65
|
},
|
|
72
66
|
profile: {
|
|
73
67
|
type: "string",
|
|
@@ -80,42 +74,36 @@ const projectTools = [
|
|
|
80
74
|
{
|
|
81
75
|
name: "image_start",
|
|
82
76
|
description:
|
|
83
|
-
"Start
|
|
84
|
-
+ "
|
|
85
|
-
+ "answers. On macOS with fuse-t its source also mounts as files; "
|
|
86
|
-
+ "elsewhere the image starts without that and says so.",
|
|
77
|
+
"Start an image, creating it the first time. Its tools are listed once "
|
|
78
|
+
+ "it answers. On macOS with fuse-t its source also mounts as files.",
|
|
87
79
|
inputSchema: {
|
|
88
80
|
type: "object",
|
|
89
81
|
properties: {
|
|
90
82
|
image: {
|
|
91
83
|
type: "string",
|
|
92
|
-
description: "Image id
|
|
84
|
+
description: "Image id. Defaults to the default image.",
|
|
93
85
|
},
|
|
94
86
|
},
|
|
95
87
|
},
|
|
96
88
|
},
|
|
97
89
|
{
|
|
98
90
|
name: "image_list",
|
|
99
|
-
description:
|
|
100
|
-
"List this project's declared images, which are running, and the route "
|
|
101
|
-
+ "and mount of each running one. An image that was started and has "
|
|
102
|
-
+ "exited since is listed as exited; image_start starts it again.",
|
|
91
|
+
description: "List the declared images, which are running, and the route and mount of each.",
|
|
103
92
|
inputSchema: { type: "object", properties: {} },
|
|
104
93
|
},
|
|
105
94
|
{
|
|
106
95
|
name: "image_stop",
|
|
107
|
-
description:
|
|
108
|
-
"Stop a running image, and any source projection this project started for it.",
|
|
96
|
+
description: "Stop an image and its source mount.",
|
|
109
97
|
inputSchema: {
|
|
110
98
|
type: "object",
|
|
111
99
|
properties: {
|
|
112
100
|
image: {
|
|
113
101
|
type: "string",
|
|
114
|
-
description: "Image id
|
|
102
|
+
description: "Image id. Defaults to the default image.",
|
|
115
103
|
},
|
|
116
104
|
all: {
|
|
117
105
|
type: "boolean",
|
|
118
|
-
description: "Stop every image this project started
|
|
106
|
+
description: "Stop every image this project started.",
|
|
119
107
|
},
|
|
120
108
|
},
|
|
121
109
|
},
|