@automatalabs/pi-acp 0.4.0 → 0.5.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/README.md +4 -9
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +6 -30
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -50,18 +50,13 @@ Pi-acp serves stdio, Streamable HTTP, and legacy SSE MCP servers and consumes st
|
|
|
50
50
|
|
|
51
51
|
## Authentication
|
|
52
52
|
|
|
53
|
-
Credentials are ambient. The server advertises
|
|
53
|
+
Credentials are ambient. The server advertises exactly one method unconditionally:
|
|
54
54
|
|
|
55
55
|
| id | name | source |
|
|
56
56
|
| --- | --- | --- |
|
|
57
|
-
| `
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
| `xai-api-key` | xAI API key | `XAI_API_KEY` |
|
|
61
|
-
| `openrouter-api-key` | OpenRouter API key | `OPENROUTER_API_KEY` |
|
|
62
|
-
| `pi-stored-credentials` | pi stored credentials | pi's `~/.pi/agent/auth.json` |
|
|
63
|
-
|
|
64
|
-
Authentication requests are no-op acknowledgements because the environment or pi's credential store supplies the secret. A selected or otherwise resolvable model whose credential is missing rejects with `-32000` so clients can pause for authentication. Having no model at all is distinct: it rejects with `-32602` / `invalid_model`.
|
|
57
|
+
| `pi-stored-credentials` | pi stored credentials | pi's `~/.pi/agent/auth.json`, or a provider API key in the server's environment (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, `XAI_API_KEY`, `OPENROUTER_API_KEY`) |
|
|
58
|
+
|
|
59
|
+
The per-provider API-key methods that used to sit alongside it were `env_var`-typed; ACP schema 1.21.0 (`@agentclientprotocol/sdk` 1.4.0) removed that variant from the protocol, so they are no longer advertised — the environment variables themselves are still honored. Authentication requests are no-op acknowledgements because the environment or pi's credential store supplies the secret. A selected or otherwise resolvable model whose credential is missing rejects with `-32000` so clients can pause for authentication. Having no model at all is distinct: it rejects with `-32602` / `invalid_model`.
|
|
65
60
|
|
|
66
61
|
## Reserved tool namespaces
|
|
67
62
|
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAS3D,eAAO,MAAM,YAAY,EAAE,UAAU,EAEpC,CAAC;AAIF,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAG1E"}
|
package/dist/auth.js
CHANGED
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
import { adapterError } from "./errors.js";
|
|
2
|
+
// ACP schema 1.21.0 (`@agentclientprotocol/sdk` 1.4.0) removed the `env_var` auth method variant
|
|
3
|
+
// (agentclientprotocol/agent-client-protocol #1796/#2000), so the five provider API-key methods this
|
|
4
|
+
// server used to advertise (`anthropic-api-key`, `openai-api-key`, `gemini-api-key`, `xai-api-key`,
|
|
5
|
+
// `openrouter-api-key`) no longer have a wire shape. Provider keys stay ambient: pi reads
|
|
6
|
+
// ANTHROPIC_API_KEY / OPENAI_API_KEY / GEMINI_API_KEY / XAI_API_KEY / OPENROUTER_API_KEY from the
|
|
7
|
+
// spawn environment exactly as before; only the advertisement is gone.
|
|
2
8
|
export const AUTH_METHODS = [
|
|
3
|
-
{
|
|
4
|
-
id: "anthropic-api-key",
|
|
5
|
-
name: "Anthropic API key",
|
|
6
|
-
type: "env_var",
|
|
7
|
-
vars: [{ name: "ANTHROPIC_API_KEY", secret: true }],
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
id: "openai-api-key",
|
|
11
|
-
name: "OpenAI API key",
|
|
12
|
-
type: "env_var",
|
|
13
|
-
vars: [{ name: "OPENAI_API_KEY", secret: true }],
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
id: "gemini-api-key",
|
|
17
|
-
name: "Google Gemini API key",
|
|
18
|
-
type: "env_var",
|
|
19
|
-
vars: [{ name: "GEMINI_API_KEY", secret: true }],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "xai-api-key",
|
|
23
|
-
name: "xAI API key",
|
|
24
|
-
type: "env_var",
|
|
25
|
-
vars: [{ name: "XAI_API_KEY", secret: true }],
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: "openrouter-api-key",
|
|
29
|
-
name: "OpenRouter API key",
|
|
30
|
-
type: "env_var",
|
|
31
|
-
vars: [{ name: "OPENROUTER_API_KEY", secret: true }],
|
|
32
|
-
},
|
|
33
9
|
{ id: "pi-stored-credentials", name: "pi stored credentials" },
|
|
34
10
|
];
|
|
35
11
|
const IDS = new Set(AUTH_METHODS.map(({ id }) => id));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automatalabs/pi-acp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.19.0"
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@agentclientprotocol/sdk": "1.
|
|
34
|
-
"@earendil-works/pi-ai": "0.84.
|
|
35
|
-
"@earendil-works/pi-coding-agent": "0.84.
|
|
33
|
+
"@agentclientprotocol/sdk": "1.4.0",
|
|
34
|
+
"@earendil-works/pi-ai": "0.84.2",
|
|
35
|
+
"@earendil-works/pi-coding-agent": "0.84.2",
|
|
36
36
|
"@modelcontextprotocol/sdk": "1.29.0",
|
|
37
37
|
"typebox": "1.3.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@earendil-works/pi-agent-core": "0.84.
|
|
40
|
+
"@earendil-works/pi-agent-core": "0.84.2"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsc -b",
|