@ctliz/agent-intercom-codex 0.12.0-connect.1 → 0.12.0-connect.3
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 +10 -7
- package/broker/spawn.ts +2 -0
- package/codex/app-server-client.ts +2 -0
- package/codex/clipboard.ts +2 -2
- package/codex/coi.ts +4 -1
- package/codex/mcp-protocol.ts +16 -1
- package/codex/runtime.ts +1 -0
- package/dist/bridge-daemon.mjs +7 -4
- package/dist/broker.mjs +1 -1
- package/dist/build-info.json +2 -2
- package/dist/codex-server.mjs +15 -4
- package/dist/coi.mjs +16 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<img src="./assets/logo-generated.png" alt="Codex Intercom generated PNG logo" width="96" height="96">
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
-
**Agent Intercom** is a cross-harness, same-machine messaging system for coding agents. Its Pi, Codex, Claude Code, and
|
|
8
|
+
**Agent Intercom** is a cross-harness, same-machine messaging system for coding agents. Its Pi, Codex, Claude Code, OpenCode, Grok Build, and AGY adapters share one local broker and protocol, so sessions can discover and message each other regardless of which harness they run in.
|
|
9
9
|
|
|
10
10
|
| Harness | Repository |
|
|
11
11
|
|---|---|
|
|
@@ -14,8 +14,12 @@
|
|
|
14
14
|
| Codex | [`agent-intercom-codex`](https://github.com/ctliz/agent-intercom-codex) |
|
|
15
15
|
| Claude Code | [`agent-intercom-claude`](https://github.com/ctliz/agent-intercom-claude) |
|
|
16
16
|
| OpenCode | [`agent-intercom-opencode`](https://github.com/ctliz/agent-intercom-opencode) |
|
|
17
|
+
| Grok Build | [`agent-intercom-grok`](https://github.com/ctliz/agent-intercom-grok) |
|
|
18
|
+
| AGY | [`agent-intercom-agy`](https://github.com/ctliz/agent-intercom-agy) |
|
|
17
19
|
| Fleet lifecycle | [`agent-intercom-orchestrator`](https://github.com/ctliz/agent-intercom-orchestrator) |
|
|
18
20
|
|
|
21
|
+
Grok Build and AGY use lightweight npm-packaged MCP launchers backed by the Claude MCP runtime. They retain inbound messages for `intercom_pending` polling but do not provide wake-on-message.
|
|
22
|
+
|
|
19
23
|
## Maintenance & Upstream Provenance
|
|
20
24
|
|
|
21
25
|
- **Maintained by `ctliz`**: This distribution is maintained independently by [ctliz](https://github.com/ctliz).
|
|
@@ -97,12 +101,11 @@ For normal use, install the package so the command-line entry points are on
|
|
|
97
101
|
`PATH`:
|
|
98
102
|
|
|
99
103
|
```bash
|
|
100
|
-
|
|
101
|
-
|
|
104
|
+
npm install -g @ctliz/agent-intercom-codex@connect
|
|
105
|
+
# or by exact prerelease version
|
|
106
|
+
npm install -g @ctliz/agent-intercom-codex@0.12.0-connect.3
|
|
102
107
|
```
|
|
103
108
|
|
|
104
|
-
> The public npm package `@ctliz/agent-intercom-codex` is **not yet published**. GitHub at the exact connect tag is the only supported install path for this release.
|
|
105
|
-
|
|
106
109
|
This provides:
|
|
107
110
|
|
|
108
111
|
- `codex-intercom-mcp`
|
|
@@ -132,8 +135,8 @@ stable names or IDs.
|
|
|
132
135
|
To let a Pi manager create Codex workers with owned systemd cgroups, leases, model/effort selection, logs, and verified cleanup, install the companion Pi packages:
|
|
133
136
|
|
|
134
137
|
```bash
|
|
135
|
-
pi install git:github.com/ctliz/agent-intercom-pi@v0.
|
|
136
|
-
pi install git:github.com/ctliz/agent-intercom-orchestrator@v0.
|
|
138
|
+
pi install git:github.com/ctliz/agent-intercom-pi@v0.12.0-connect.4
|
|
139
|
+
pi install git:github.com/ctliz/agent-intercom-orchestrator@v0.12.0-connect.2
|
|
137
140
|
```
|
|
138
141
|
|
|
139
142
|
Restart Pi or run `/reload`, then call `agent_fleet({ action: "doctor" })`. The orchestrator invokes the installed `coi` command, or a separately configured minimal wrapper such as `coim`; it does not replace this Codex adapter.
|
package/broker/spawn.ts
CHANGED
|
@@ -178,6 +178,7 @@ export function getBrokerSpawnOptions(
|
|
|
178
178
|
cwd: string;
|
|
179
179
|
env: NodeJS.ProcessEnv;
|
|
180
180
|
windowsHide: true;
|
|
181
|
+
shell: false;
|
|
181
182
|
} {
|
|
182
183
|
return {
|
|
183
184
|
detached: true,
|
|
@@ -185,6 +186,7 @@ export function getBrokerSpawnOptions(
|
|
|
185
186
|
cwd: extensionDir,
|
|
186
187
|
env: { ...env, PI_CODING_AGENT_DIR: getAgentDirPath(env), NODE_NO_WARNINGS: "1" },
|
|
187
188
|
windowsHide: true,
|
|
189
|
+
shell: false,
|
|
188
190
|
};
|
|
189
191
|
}
|
|
190
192
|
|
|
@@ -109,6 +109,7 @@ export class CodexAppServerClient extends EventEmitter {
|
|
|
109
109
|
encoding: "utf8",
|
|
110
110
|
env: this.options.env,
|
|
111
111
|
stdio: ["ignore", "pipe", "pipe"],
|
|
112
|
+
shell: false,
|
|
112
113
|
});
|
|
113
114
|
if (started.status !== 0) {
|
|
114
115
|
throw new Error(`Failed to start Codex app-server daemon: ${started.stderr || started.stdout || `exit ${started.status}`}`);
|
|
@@ -124,6 +125,7 @@ export class CodexAppServerClient extends EventEmitter {
|
|
|
124
125
|
const proc = spawn(this.options.command, this.options.args, {
|
|
125
126
|
stdio: ["pipe", "pipe", "pipe"],
|
|
126
127
|
env: this.options.env,
|
|
128
|
+
shell: false,
|
|
127
129
|
});
|
|
128
130
|
this.proc = proc;
|
|
129
131
|
this.rl = readline.createInterface({ input: proc.stdout, crlfDelay: Infinity });
|
package/codex/clipboard.ts
CHANGED
|
@@ -34,7 +34,7 @@ function runDetachedClipboardCommand(
|
|
|
34
34
|
const timeout = setTimeout(() => finish({ ok: false, error: `${command} did not start within ${timeoutMs}ms` }), timeoutMs);
|
|
35
35
|
|
|
36
36
|
try {
|
|
37
|
-
const proc = spawn(command, args, { env, stdio: ["pipe", "ignore", "ignore"] });
|
|
37
|
+
const proc = spawn(command, args, { env, stdio: ["pipe", "ignore", "ignore"], shell: false });
|
|
38
38
|
proc.once("error", (error) => finish({ ok: false, error: error.message }));
|
|
39
39
|
proc.once("spawn", () => {
|
|
40
40
|
proc.stdin.on("error", () => {
|
|
@@ -75,7 +75,7 @@ function runClipboardCommand(
|
|
|
75
75
|
let proc: ReturnType<typeof spawn> | undefined;
|
|
76
76
|
|
|
77
77
|
try {
|
|
78
|
-
proc = spawn(command, args, { env, stdio: ["pipe", "ignore", "pipe"] });
|
|
78
|
+
proc = spawn(command, args, { env, stdio: ["pipe", "ignore", "pipe"], shell: false });
|
|
79
79
|
proc.stderr?.setEncoding("utf8");
|
|
80
80
|
proc.stderr?.on("data", (chunk: string) => {
|
|
81
81
|
if (stderr.length < 4096) stderr += chunk;
|
package/codex/coi.ts
CHANGED
|
@@ -98,6 +98,7 @@ function gitString(cwd: string, args: string[]): string | null {
|
|
|
98
98
|
cwd,
|
|
99
99
|
encoding: "utf8",
|
|
100
100
|
stdio: ["ignore", "pipe", "ignore"],
|
|
101
|
+
shell: false,
|
|
101
102
|
});
|
|
102
103
|
if (result.status !== 0) return null;
|
|
103
104
|
const trimmed = result.stdout.trim();
|
|
@@ -499,7 +500,7 @@ export async function runInteractiveTui(
|
|
|
499
500
|
// cannot reintroduce an ambient-PATH spawn after the initial preflight.
|
|
500
501
|
assertHardenedBossProviderAuthority(protectedBossClient);
|
|
501
502
|
const runInherited = async (): Promise<number> => {
|
|
502
|
-
const tui = spawn(command, args, { cwd, env: launchEnv, stdio: "inherit" });
|
|
503
|
+
const tui = spawn(command, args, { cwd, env: launchEnv, stdio: "inherit", shell: false });
|
|
503
504
|
const [code, signal] = await once(tui, "exit") as [number | null, NodeJS.Signals | null];
|
|
504
505
|
if (typeof code === "number") return code;
|
|
505
506
|
return signal === "SIGINT" ? 130 : 1;
|
|
@@ -634,6 +635,7 @@ export async function runCoi(options: CoiOptions, env: NodeJS.ProcessEnv = proce
|
|
|
634
635
|
cwd: options.cwd,
|
|
635
636
|
env,
|
|
636
637
|
stdio: "inherit",
|
|
638
|
+
shell: false,
|
|
637
639
|
});
|
|
638
640
|
const [code, signal] = await once(help, "exit") as [number | null, NodeJS.Signals | null];
|
|
639
641
|
if (typeof code === "number") return code;
|
|
@@ -669,6 +671,7 @@ export async function runCoi(options: CoiOptions, env: NodeJS.ProcessEnv = proce
|
|
|
669
671
|
cwd: options.cwd,
|
|
670
672
|
env,
|
|
671
673
|
stdio: ["ignore", "ignore", "pipe"],
|
|
674
|
+
shell: false,
|
|
672
675
|
});
|
|
673
676
|
appServer.stderr?.on("data", (chunk) => {
|
|
674
677
|
if (env.CODEX_INTERCOM_DEBUG) process.stderr.write(String(chunk));
|
package/codex/mcp-protocol.ts
CHANGED
|
@@ -16,6 +16,12 @@ interface ToolDefinition {
|
|
|
16
16
|
name: string;
|
|
17
17
|
description: string;
|
|
18
18
|
inputSchema: Record<string, unknown>;
|
|
19
|
+
annotations: {
|
|
20
|
+
readOnlyHint: boolean;
|
|
21
|
+
destructiveHint: boolean;
|
|
22
|
+
idempotentHint: boolean;
|
|
23
|
+
openWorldHint: boolean;
|
|
24
|
+
};
|
|
19
25
|
handler: ToolHandler;
|
|
20
26
|
}
|
|
21
27
|
|
|
@@ -74,18 +80,21 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
74
80
|
name: "intercom_whoami",
|
|
75
81
|
description: "Return this Codex session's intercom identity for reliable targeting.",
|
|
76
82
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
83
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
77
84
|
handler: async () => runtime.whoami(),
|
|
78
85
|
},
|
|
79
86
|
{
|
|
80
87
|
name: "intercom_team",
|
|
81
88
|
description: "Show your current manager and the live coworkers owned by that manager. No arguments are required.",
|
|
82
89
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
90
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
83
91
|
handler: async () => runtime.team(),
|
|
84
92
|
},
|
|
85
93
|
{
|
|
86
94
|
name: "intercom_status",
|
|
87
95
|
description: "Show intercom connection status, active sessions, unread messages, and pending asks.",
|
|
88
96
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
97
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
89
98
|
handler: async () => runtime.status(),
|
|
90
99
|
},
|
|
91
100
|
{
|
|
@@ -99,6 +108,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
99
108
|
},
|
|
100
109
|
additionalProperties: false,
|
|
101
110
|
},
|
|
111
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
102
112
|
handler: async (args) => runtime.list(
|
|
103
113
|
args.scope === "directory" || args.scope === "repo" ? args.scope : "machine",
|
|
104
114
|
asBoolean(args.include_self, false),
|
|
@@ -113,6 +123,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
113
123
|
required: ["summary"],
|
|
114
124
|
additionalProperties: false,
|
|
115
125
|
},
|
|
126
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
116
127
|
handler: async (args) => runtime.setSummary(asString(args.summary, "summary")),
|
|
117
128
|
},
|
|
118
129
|
{
|
|
@@ -128,6 +139,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
128
139
|
required: ["to", "message"],
|
|
129
140
|
additionalProperties: false,
|
|
130
141
|
},
|
|
142
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
131
143
|
handler: async (args) => runtime.send(asString(args.to, "to"), asString(args.message, "message"), asAttachmentArray(args.attachments)),
|
|
132
144
|
},
|
|
133
145
|
{
|
|
@@ -144,6 +156,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
144
156
|
required: ["to", "message"],
|
|
145
157
|
additionalProperties: false,
|
|
146
158
|
},
|
|
159
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
147
160
|
handler: async (args, signal) => runtime.ask(
|
|
148
161
|
asString(args.to, "to"),
|
|
149
162
|
asString(args.message, "message"),
|
|
@@ -160,6 +173,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
160
173
|
properties: { mark_read: { type: "boolean", default: false } },
|
|
161
174
|
additionalProperties: false,
|
|
162
175
|
},
|
|
176
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
163
177
|
handler: async (args) => runtime.pending(asBoolean(args.mark_read, false)),
|
|
164
178
|
},
|
|
165
179
|
{
|
|
@@ -175,6 +189,7 @@ export function buildToolDefinitions(runtime: CodexIntercomRuntime): ToolDefinit
|
|
|
175
189
|
required: ["message"],
|
|
176
190
|
additionalProperties: false,
|
|
177
191
|
},
|
|
192
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
178
193
|
handler: async (args) => runtime.reply(asString(args.message, "message"), typeof args.to === "string" ? args.to : undefined, args.which === "oldest" || args.which === "latest" ? args.which : undefined),
|
|
179
194
|
},
|
|
180
195
|
];
|
|
@@ -217,7 +232,7 @@ export async function handleMcpRequest(request: JsonRpcRequest, runtime: CodexIn
|
|
|
217
232
|
return ok(request.id, {});
|
|
218
233
|
case "tools/list":
|
|
219
234
|
return ok(request.id, {
|
|
220
|
-
tools: tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema })),
|
|
235
|
+
tools: tools.map(({ name, description, inputSchema, annotations }) => ({ name, description, inputSchema, annotations })),
|
|
221
236
|
});
|
|
222
237
|
case "tools/call": {
|
|
223
238
|
const name = request.params?.name;
|
package/codex/runtime.ts
CHANGED
package/dist/bridge-daemon.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.
|
|
2
|
+
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.3 target=bridge-daemon sourceSha256=d7208ae5db4e820dfc584a6a8a4a96f5ccf548f20872199024f6d4c955f85622\n");
|
|
3
3
|
|
|
4
4
|
// codex/bridge-daemon.ts
|
|
5
5
|
import { once } from "node:events";
|
|
@@ -95,7 +95,8 @@ var CodexAppServerClient = class extends EventEmitter {
|
|
|
95
95
|
const started = spawnSync(this.options.startDaemonCommand, this.options.startDaemonArgs, {
|
|
96
96
|
encoding: "utf8",
|
|
97
97
|
env: this.options.env,
|
|
98
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
98
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
99
|
+
shell: false
|
|
99
100
|
});
|
|
100
101
|
if (started.status !== 0) {
|
|
101
102
|
throw new Error(`Failed to start Codex app-server daemon: ${started.stderr || started.stdout || `exit ${started.status}`}`);
|
|
@@ -108,7 +109,8 @@ var CodexAppServerClient = class extends EventEmitter {
|
|
|
108
109
|
}
|
|
109
110
|
const proc = spawn(this.options.command, this.options.args, {
|
|
110
111
|
stdio: ["pipe", "pipe", "pipe"],
|
|
111
|
-
env: this.options.env
|
|
112
|
+
env: this.options.env,
|
|
113
|
+
shell: false
|
|
112
114
|
});
|
|
113
115
|
this.proc = proc;
|
|
114
116
|
this.rl = readline.createInterface({ input: proc.stdout, crlfDelay: Infinity });
|
|
@@ -2435,7 +2437,8 @@ function getBrokerSpawnOptions(extensionDir = EXTENSION_DIR, env = process.env)
|
|
|
2435
2437
|
stdio: "ignore",
|
|
2436
2438
|
cwd: extensionDir,
|
|
2437
2439
|
env: { ...env, PI_CODING_AGENT_DIR: getAgentDirPath(env), NODE_NO_WARNINGS: "1" },
|
|
2438
|
-
windowsHide: true
|
|
2440
|
+
windowsHide: true,
|
|
2441
|
+
shell: false
|
|
2439
2442
|
};
|
|
2440
2443
|
}
|
|
2441
2444
|
function toError2(error) {
|
package/dist/broker.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.
|
|
1
|
+
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.3 target=broker sourceSha256=d7208ae5db4e820dfc584a6a8a4a96f5ccf548f20872199024f6d4c955f85622\n");
|
|
2
2
|
|
|
3
3
|
// broker/broker.ts
|
|
4
4
|
import net from "net";
|
package/dist/build-info.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"package": "@ctliz/agent-intercom-codex",
|
|
4
|
-
"version": "0.12.0-connect.
|
|
5
|
-
"sourceSha256": "
|
|
4
|
+
"version": "0.12.0-connect.3",
|
|
5
|
+
"sourceSha256": "d7208ae5db4e820dfc584a6a8a4a96f5ccf548f20872199024f6d4c955f85622",
|
|
6
6
|
"targets": [
|
|
7
7
|
"codex-server",
|
|
8
8
|
"broker",
|
package/dist/codex-server.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.
|
|
2
|
+
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.3 target=codex-server sourceSha256=d7208ae5db4e820dfc584a6a8a4a96f5ccf548f20872199024f6d4c955f85622\n");
|
|
3
3
|
|
|
4
4
|
// codex/server.ts
|
|
5
5
|
import readline from "node:readline";
|
|
@@ -1738,7 +1738,8 @@ function getBrokerSpawnOptions(extensionDir = EXTENSION_DIR, env = process.env)
|
|
|
1738
1738
|
stdio: "ignore",
|
|
1739
1739
|
cwd: extensionDir,
|
|
1740
1740
|
env: { ...env, PI_CODING_AGENT_DIR: getAgentDirPath(env), NODE_NO_WARNINGS: "1" },
|
|
1741
|
-
windowsHide: true
|
|
1741
|
+
windowsHide: true,
|
|
1742
|
+
shell: false
|
|
1742
1743
|
};
|
|
1743
1744
|
}
|
|
1744
1745
|
function toError2(error2) {
|
|
@@ -2472,7 +2473,8 @@ function detectGitRoot(cwd) {
|
|
|
2472
2473
|
const result = spawnSync("git", ["rev-parse", "--show-toplevel"], {
|
|
2473
2474
|
cwd,
|
|
2474
2475
|
encoding: "utf8",
|
|
2475
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
2476
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
2477
|
+
shell: false
|
|
2476
2478
|
});
|
|
2477
2479
|
if (result.status !== 0) return null;
|
|
2478
2480
|
return result.stdout.trim() || null;
|
|
@@ -2815,18 +2817,21 @@ function buildToolDefinitions(runtime2) {
|
|
|
2815
2817
|
name: "intercom_whoami",
|
|
2816
2818
|
description: "Return this Codex session's intercom identity for reliable targeting.",
|
|
2817
2819
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
2820
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
2818
2821
|
handler: async () => runtime2.whoami()
|
|
2819
2822
|
},
|
|
2820
2823
|
{
|
|
2821
2824
|
name: "intercom_team",
|
|
2822
2825
|
description: "Show your current manager and the live coworkers owned by that manager. No arguments are required.",
|
|
2823
2826
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
2827
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
2824
2828
|
handler: async () => runtime2.team()
|
|
2825
2829
|
},
|
|
2826
2830
|
{
|
|
2827
2831
|
name: "intercom_status",
|
|
2828
2832
|
description: "Show intercom connection status, active sessions, unread messages, and pending asks.",
|
|
2829
2833
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
2834
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
2830
2835
|
handler: async () => runtime2.status()
|
|
2831
2836
|
},
|
|
2832
2837
|
{
|
|
@@ -2840,6 +2845,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2840
2845
|
},
|
|
2841
2846
|
additionalProperties: false
|
|
2842
2847
|
},
|
|
2848
|
+
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
|
|
2843
2849
|
handler: async (args) => runtime2.list(
|
|
2844
2850
|
args.scope === "directory" || args.scope === "repo" ? args.scope : "machine",
|
|
2845
2851
|
asBoolean(args.include_self, false)
|
|
@@ -2854,6 +2860,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2854
2860
|
required: ["summary"],
|
|
2855
2861
|
additionalProperties: false
|
|
2856
2862
|
},
|
|
2863
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
|
|
2857
2864
|
handler: async (args) => runtime2.setSummary(asString(args.summary, "summary"))
|
|
2858
2865
|
},
|
|
2859
2866
|
{
|
|
@@ -2869,6 +2876,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2869
2876
|
required: ["to", "message"],
|
|
2870
2877
|
additionalProperties: false
|
|
2871
2878
|
},
|
|
2879
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
2872
2880
|
handler: async (args) => runtime2.send(asString(args.to, "to"), asString(args.message, "message"), asAttachmentArray(args.attachments))
|
|
2873
2881
|
},
|
|
2874
2882
|
{
|
|
@@ -2885,6 +2893,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2885
2893
|
required: ["to", "message"],
|
|
2886
2894
|
additionalProperties: false
|
|
2887
2895
|
},
|
|
2896
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
|
|
2888
2897
|
handler: async (args, signal) => runtime2.ask(
|
|
2889
2898
|
asString(args.to, "to"),
|
|
2890
2899
|
asString(args.message, "message"),
|
|
@@ -2901,6 +2910,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2901
2910
|
properties: { mark_read: { type: "boolean", default: false } },
|
|
2902
2911
|
additionalProperties: false
|
|
2903
2912
|
},
|
|
2913
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
|
|
2904
2914
|
handler: async (args) => runtime2.pending(asBoolean(args.mark_read, false))
|
|
2905
2915
|
},
|
|
2906
2916
|
{
|
|
@@ -2916,6 +2926,7 @@ function buildToolDefinitions(runtime2) {
|
|
|
2916
2926
|
required: ["message"],
|
|
2917
2927
|
additionalProperties: false
|
|
2918
2928
|
},
|
|
2929
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
2919
2930
|
handler: async (args) => runtime2.reply(asString(args.message, "message"), typeof args.to === "string" ? args.to : void 0, args.which === "oldest" || args.which === "latest" ? args.which : void 0)
|
|
2920
2931
|
}
|
|
2921
2932
|
];
|
|
@@ -2952,7 +2963,7 @@ async function handleMcpRequest(request, runtime2) {
|
|
|
2952
2963
|
return ok(request.id, {});
|
|
2953
2964
|
case "tools/list":
|
|
2954
2965
|
return ok(request.id, {
|
|
2955
|
-
tools: tools.map(({ name, description, inputSchema }) => ({ name, description, inputSchema }))
|
|
2966
|
+
tools: tools.map(({ name, description, inputSchema, annotations }) => ({ name, description, inputSchema, annotations }))
|
|
2956
2967
|
});
|
|
2957
2968
|
case "tools/call": {
|
|
2958
2969
|
const name = request.params?.name;
|
package/dist/coi.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.
|
|
2
|
+
process.stderr.write("[agent-intercom-build] package=@ctliz/agent-intercom-codex version=0.12.0-connect.3 target=coi sourceSha256=d7208ae5db4e820dfc584a6a8a4a96f5ccf548f20872199024f6d4c955f85622\n");
|
|
3
3
|
|
|
4
4
|
// codex/coi.ts
|
|
5
5
|
import { once as once2 } from "node:events";
|
|
@@ -104,7 +104,8 @@ var CodexAppServerClient = class extends EventEmitter {
|
|
|
104
104
|
const started = spawnSync(this.options.startDaemonCommand, this.options.startDaemonArgs, {
|
|
105
105
|
encoding: "utf8",
|
|
106
106
|
env: this.options.env,
|
|
107
|
-
stdio: ["ignore", "pipe", "pipe"]
|
|
107
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
108
|
+
shell: false
|
|
108
109
|
});
|
|
109
110
|
if (started.status !== 0) {
|
|
110
111
|
throw new Error(`Failed to start Codex app-server daemon: ${started.stderr || started.stdout || `exit ${started.status}`}`);
|
|
@@ -117,7 +118,8 @@ var CodexAppServerClient = class extends EventEmitter {
|
|
|
117
118
|
}
|
|
118
119
|
const proc = spawn(this.options.command, this.options.args, {
|
|
119
120
|
stdio: ["pipe", "pipe", "pipe"],
|
|
120
|
-
env: this.options.env
|
|
121
|
+
env: this.options.env,
|
|
122
|
+
shell: false
|
|
121
123
|
});
|
|
122
124
|
this.proc = proc;
|
|
123
125
|
this.rl = readline.createInterface({ input: proc.stdout, crlfDelay: Infinity });
|
|
@@ -2444,7 +2446,8 @@ function getBrokerSpawnOptions(extensionDir = EXTENSION_DIR, env = process.env)
|
|
|
2444
2446
|
stdio: "ignore",
|
|
2445
2447
|
cwd: extensionDir,
|
|
2446
2448
|
env: { ...env, PI_CODING_AGENT_DIR: getAgentDirPath(env), NODE_NO_WARNINGS: "1" },
|
|
2447
|
-
windowsHide: true
|
|
2449
|
+
windowsHide: true,
|
|
2450
|
+
shell: false
|
|
2448
2451
|
};
|
|
2449
2452
|
}
|
|
2450
2453
|
function toError2(error) {
|
|
@@ -3931,7 +3934,7 @@ function runDetachedClipboardCommand(command, args, text, env, timeoutMs) {
|
|
|
3931
3934
|
};
|
|
3932
3935
|
const timeout = setTimeout(() => finish({ ok: false, error: `${command} did not start within ${timeoutMs}ms` }), timeoutMs);
|
|
3933
3936
|
try {
|
|
3934
|
-
const proc = spawn3(command, args, { env, stdio: ["pipe", "ignore", "ignore"] });
|
|
3937
|
+
const proc = spawn3(command, args, { env, stdio: ["pipe", "ignore", "ignore"], shell: false });
|
|
3935
3938
|
proc.once("error", (error) => finish({ ok: false, error: error.message }));
|
|
3936
3939
|
proc.once("spawn", () => {
|
|
3937
3940
|
proc.stdin.on("error", () => {
|
|
@@ -3962,7 +3965,7 @@ function runClipboardCommand(command, args, text, env, timeoutMs) {
|
|
|
3962
3965
|
}, timeoutMs);
|
|
3963
3966
|
let proc;
|
|
3964
3967
|
try {
|
|
3965
|
-
proc = spawn3(command, args, { env, stdio: ["pipe", "ignore", "pipe"] });
|
|
3968
|
+
proc = spawn3(command, args, { env, stdio: ["pipe", "ignore", "pipe"], shell: false });
|
|
3966
3969
|
proc.stderr?.setEncoding("utf8");
|
|
3967
3970
|
proc.stderr?.on("data", (chunk) => {
|
|
3968
3971
|
if (stderr.length < 4096) stderr += chunk;
|
|
@@ -4195,7 +4198,8 @@ function gitString(cwd, args) {
|
|
|
4195
4198
|
const result = spawnSync2("git", args, {
|
|
4196
4199
|
cwd,
|
|
4197
4200
|
encoding: "utf8",
|
|
4198
|
-
stdio: ["ignore", "pipe", "ignore"]
|
|
4201
|
+
stdio: ["ignore", "pipe", "ignore"],
|
|
4202
|
+
shell: false
|
|
4199
4203
|
});
|
|
4200
4204
|
if (result.status !== 0) return null;
|
|
4201
4205
|
const trimmed = result.stdout.trim();
|
|
@@ -4526,7 +4530,7 @@ function terminalNotification(message) {
|
|
|
4526
4530
|
async function runInteractiveTui(command, args, refreshArgs, cwd, onAltI, onAltM, installRefresh, protectedBossClient, launchEnv = process.env) {
|
|
4527
4531
|
assertHardenedBossProviderAuthority(protectedBossClient);
|
|
4528
4532
|
const runInherited = async () => {
|
|
4529
|
-
const tui2 = spawn4(command, args, { cwd, env: launchEnv, stdio: "inherit" });
|
|
4533
|
+
const tui2 = spawn4(command, args, { cwd, env: launchEnv, stdio: "inherit", shell: false });
|
|
4530
4534
|
const [code, signal] = await once2(tui2, "exit");
|
|
4531
4535
|
if (typeof code === "number") return code;
|
|
4532
4536
|
return signal === "SIGINT" ? 130 : 1;
|
|
@@ -4646,7 +4650,8 @@ async function runCoi(options, env = process.env) {
|
|
|
4646
4650
|
const help = spawn4(options.codexCommand, options.codexArgs, {
|
|
4647
4651
|
cwd: options.cwd,
|
|
4648
4652
|
env,
|
|
4649
|
-
stdio: "inherit"
|
|
4653
|
+
stdio: "inherit",
|
|
4654
|
+
shell: false
|
|
4650
4655
|
});
|
|
4651
4656
|
const [code, signal] = await once2(help, "exit");
|
|
4652
4657
|
if (typeof code === "number") return code;
|
|
@@ -4678,7 +4683,8 @@ async function runCoi(options, env = process.env) {
|
|
|
4678
4683
|
const appServer = spawn4(options.codexCommand, buildCodexAppServerArgs(options.codexArgs, socketPath, env), {
|
|
4679
4684
|
cwd: options.cwd,
|
|
4680
4685
|
env,
|
|
4681
|
-
stdio: ["ignore", "ignore", "pipe"]
|
|
4686
|
+
stdio: ["ignore", "ignore", "pipe"],
|
|
4687
|
+
shell: false
|
|
4682
4688
|
});
|
|
4683
4689
|
appServer.stderr?.on("data", (chunk) => {
|
|
4684
4690
|
if (env.CODEX_INTERCOM_DEBUG) process.stderr.write(String(chunk));
|
package/package.json
CHANGED