@cmdoss/agent-pass-plugin 0.1.2-dev.25.1 → 0.1.2-dev.26.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/dist/http.js CHANGED
@@ -20,7 +20,7 @@ export function setupInfo(port, mode = "paper") {
20
20
  promptPreview: "Set up Senro, connect its MCP, and help me start a strategy.",
21
21
  commands: {
22
22
  codex: `codex mcp add agent-pass-plugin --env AGENT_PASS_PLUGIN_LOCAL_URL=http://127.0.0.1:${port} -- node ${root}/dist/mcp.js`,
23
- claude: `claude mcp add --transport stdio --env AGENT_PASS_PLUGIN_LOCAL_URL=http://127.0.0.1:${port} agent-pass-plugin -- node ${root}/dist/mcp.js`,
23
+ claude: `claude mcp add agent-pass-plugin --transport stdio --env AGENT_PASS_PLUGIN_LOCAL_URL=http://127.0.0.1:${port} -- node ${root}/dist/mcp.js`,
24
24
  },
25
25
  mcpConfig: {
26
26
  mcpServers: {
@@ -4,6 +4,25 @@ import { join, resolve } from "node:path";
4
4
  import { readRuntimeConfig } from "./config.js";
5
5
  import { ensureRuntime } from "./installation.js";
6
6
  import { packageMetadata, packageRoot, payloadFingerprint, workspaceIdentity, } from "./paths.js";
7
+ // Arguments for `<client> mcp add`. The server name goes before any `--env`:
8
+ // Claude Code's `-e/--env` takes a variadic list, so a name placed after it is
9
+ // parsed as another variable and registration fails with
10
+ // "Invalid environment variable format: agent-pass-plugin".
11
+ export function mcpAddArgs(client, origin, command) {
12
+ const env = ["--env", `AGENT_PASS_PLUGIN_LOCAL_URL=${origin}`];
13
+ return client === "codex"
14
+ ? ["mcp", "add", "agent-pass-plugin", ...env, "--", ...command]
15
+ : [
16
+ "mcp",
17
+ "add",
18
+ "agent-pass-plugin",
19
+ "--transport",
20
+ "stdio",
21
+ ...env,
22
+ "--",
23
+ ...command,
24
+ ];
25
+ }
7
26
  export async function setup(args) {
8
27
  const allowed = new Set(["--client", "--register", "--start"]);
9
28
  for (let i = 0; i < args.length; i++) {
@@ -98,29 +117,10 @@ export async function setup(args) {
98
117
  }
99
118
  let registered = false;
100
119
  if (args.includes("--register")) {
101
- const cliArgs = client === "codex"
102
- ? [
103
- "mcp",
104
- "add",
105
- "agent-pass-plugin",
106
- "--env",
107
- `AGENT_PASS_PLUGIN_LOCAL_URL=${origin}`,
108
- "--",
109
- config.command,
110
- ...config.args,
111
- ]
112
- : [
113
- "mcp",
114
- "add",
115
- "--transport",
116
- "stdio",
117
- "--env",
118
- `AGENT_PASS_PLUGIN_LOCAL_URL=${origin}`,
119
- "agent-pass-plugin",
120
- "--",
121
- config.command,
122
- ...config.args,
123
- ];
120
+ const cliArgs = mcpAddArgs(client, origin, [
121
+ config.command,
122
+ ...config.args,
123
+ ]);
124
124
  const result = spawnSync(client, cliArgs, { cwd: root, stdio: "inherit" });
125
125
  if (result.error)
126
126
  throw new Error(`${client} CLI unavailable. Install/open the intended client first, then retry setup.`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@cmdoss/agent-pass-plugin",
3
- "version": "0.1.2-dev.25.1",
3
+ "version": "0.1.2-dev.26.1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@cmdoss/agent-pass-plugin",
9
- "version": "0.1.2-dev.25.1",
9
+ "version": "0.1.2-dev.26.1",
10
10
  "dependencies": {
11
11
  "@fastify/static": "10.1.10",
12
12
  "@modelcontextprotocol/sdk": "1.32.2",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cmdoss/agent-pass-plugin",
3
- "version": "0.1.2-dev.25.1",
3
+ "version": "0.1.2-dev.26.1",
4
4
  "type": "module",
5
5
  "description": "Senro, powered by Agent Pass — local trading strategies, explicit permissions and an independent execution loop",
6
6
  "engines": {