my-pi 0.0.7 → 0.0.9
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 +26 -3
- package/dist/{api-DtthDVIa.js → api-Dcq2JalY.js} +1111 -52
- package/dist/api-Dcq2JalY.js.map +1 -0
- package/dist/api.js +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/extensions/config.test.ts +3 -0
- package/src/extensions/config.ts +10 -1
- package/src/extensions/lsp.test.ts +190 -0
- package/src/extensions/lsp.ts +642 -0
- package/src/extensions/prompt-presets.test.ts +38 -0
- package/src/extensions/prompt-presets.ts +385 -10
- package/src/mcp/client.test.ts +217 -0
- package/src/mcp/client.ts +219 -45
- package/src/mcp/config.test.ts +141 -93
- package/src/mcp/config.ts +110 -22
- package/dist/api-DtthDVIa.js.map +0 -1
package/README.md
CHANGED
|
@@ -112,8 +112,9 @@ await runPrintMode(runtime, {
|
|
|
112
112
|
## MCP Servers
|
|
113
113
|
|
|
114
114
|
MCP servers are configured via `mcp.json` files and managed as a pi
|
|
115
|
-
extension.
|
|
116
|
-
via
|
|
115
|
+
extension. Stdio servers are spawned on startup, HTTP servers are
|
|
116
|
+
connected remotely, and their tools are registered via
|
|
117
|
+
`pi.registerTool()`.
|
|
117
118
|
|
|
118
119
|
### Global config
|
|
119
120
|
|
|
@@ -148,6 +149,25 @@ via `pi.registerTool()`.
|
|
|
148
149
|
}
|
|
149
150
|
```
|
|
150
151
|
|
|
152
|
+
HTTP MCP servers are supported too:
|
|
153
|
+
|
|
154
|
+
```json
|
|
155
|
+
{
|
|
156
|
+
"mcpServers": {
|
|
157
|
+
"pm-platform": {
|
|
158
|
+
"type": "http",
|
|
159
|
+
"url": "https://project.cloudlobsters.com/api/mcp",
|
|
160
|
+
"headers": {
|
|
161
|
+
"Authorization": "Bearer ..."
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Use `"type": "http"` or `"type": "streamable-http"` for remote MCP
|
|
169
|
+
servers. If `url` is present, my-pi treats the entry as HTTP.
|
|
170
|
+
|
|
151
171
|
Project servers merge with global servers. If both define the same
|
|
152
172
|
server name, the project config wins.
|
|
153
173
|
|
|
@@ -185,7 +205,7 @@ In interactive mode:
|
|
|
185
205
|
### How it works
|
|
186
206
|
|
|
187
207
|
1. Pi extension loads `mcp.json` configs (global + project)
|
|
188
|
-
2.
|
|
208
|
+
2. Connects to each MCP server using stdio or HTTP transport
|
|
189
209
|
3. Performs the MCP `initialize` handshake
|
|
190
210
|
4. Calls `tools/list` to discover available tools
|
|
191
211
|
5. Registers each tool via `pi.registerTool()` as
|
|
@@ -272,6 +292,9 @@ CLI layering is supported too:
|
|
|
272
292
|
- `--system-prompt "You are terse and technical."`
|
|
273
293
|
- `--append-system-prompt "Prefer one short paragraph."`
|
|
274
294
|
|
|
295
|
+
Interactive `/preset` selections are also restored on later sessions
|
|
296
|
+
for the same project via `~/.pi/agent/prompt-preset-state.json`.
|
|
297
|
+
|
|
275
298
|
This repo also includes an example `.pi/presets.json` with sample base
|
|
276
299
|
presets and layers.
|
|
277
300
|
|