agentschat-mcp 0.36.23 → 0.36.25
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/CHANGELOG.md +5 -0
- package/README.md +8 -0
- package/codex/README.md +14 -0
- package/codex/app-server.ts +28 -2
- package/codex/bridge.ts +2 -0
- package/codex/run.ts +7 -1
- package/dist/codex-bridge.js +33 -3
- package/dist/server.js +4448 -431
- package/package.json +4 -3
- package/skills/agentschat-team-lead/SKILL.md +1 -1
- package/skills/onboarding.md +21 -2
- package/src/argcheck.ts +1809 -0
- package/src/cli.mjs +42 -0
- package/src/rest-cli.ts +774 -0
- package/src/server.ts +2356 -260
- package/src/session-bind.ts +22 -5
- package/src/tool-annotations.ts +12 -0
- package/src/wake.ts +15 -0
package/src/cli.mjs
CHANGED
|
@@ -198,6 +198,48 @@ if (typeof globalThis.Bun !== "undefined") {
|
|
|
198
198
|
: "./server.ts"
|
|
199
199
|
);
|
|
200
200
|
} else {
|
|
201
|
+
const hasHttpProxy = Boolean(
|
|
202
|
+
process.env.HTTPS_PROXY ||
|
|
203
|
+
process.env.HTTP_PROXY ||
|
|
204
|
+
process.env.https_proxy ||
|
|
205
|
+
process.env.http_proxy,
|
|
206
|
+
);
|
|
207
|
+
if (
|
|
208
|
+
hasHttpProxy &&
|
|
209
|
+
process.env.AGENTCHAT_NO_PROXY !== "1" &&
|
|
210
|
+
!process.env.NODE_USE_ENV_PROXY &&
|
|
211
|
+
!helpRequested &&
|
|
212
|
+
!botsMode &&
|
|
213
|
+
!codexMode
|
|
214
|
+
) {
|
|
215
|
+
const selfPath = fileURLToPath(import.meta.url);
|
|
216
|
+
const childEnv = { ...process.env, NODE_USE_ENV_PROXY: "1" };
|
|
217
|
+
for (const key of ["NO_PROXY", "no_proxy"]) {
|
|
218
|
+
const cur = childEnv[key]?.trim() || "";
|
|
219
|
+
const items = cur ? cur.split(",").map((s) => s.trim()).filter(Boolean) : [];
|
|
220
|
+
for (const host of ["localhost", "127.0.0.1", "::1", "[::1]"]) {
|
|
221
|
+
if (!items.includes(host)) items.push(host);
|
|
222
|
+
}
|
|
223
|
+
childEnv[key] = items.join(",");
|
|
224
|
+
}
|
|
225
|
+
const child = spawn(process.execPath, [selfPath, ...filteredArgs], {
|
|
226
|
+
env: childEnv,
|
|
227
|
+
stdio: "inherit",
|
|
228
|
+
});
|
|
229
|
+
for (const sig of ["SIGINT", "SIGTERM"]) {
|
|
230
|
+
process.on(sig, () => {
|
|
231
|
+
try {
|
|
232
|
+
child.kill(sig);
|
|
233
|
+
} catch {}
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
const exitCode = await new Promise((resolve) => {
|
|
237
|
+
child.on("exit", (code, signal) => resolve(signal ? 128 : (code ?? 0)));
|
|
238
|
+
child.on("error", () => resolve(1));
|
|
239
|
+
});
|
|
240
|
+
process.exit(exitCode);
|
|
241
|
+
}
|
|
242
|
+
|
|
201
243
|
await import(
|
|
202
244
|
botsMode
|
|
203
245
|
? "../dist/codex-bots.js"
|