devez-vibe 1.9.36 → 1.9.37
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/bin/dvz.exe +0 -0
- package/bridge/claude-agent-sdk-bridge.mjs +0 -63
- package/package.json +1 -1
package/bin/dvz.exe
CHANGED
|
Binary file
|
|
@@ -1485,41 +1485,11 @@ async function createSession(params, resumeId) {
|
|
|
1485
1485
|
session.model = visibleModel(capabilities.value);
|
|
1486
1486
|
}
|
|
1487
1487
|
session.effort = supportedEffort(capabilities, params.effort);
|
|
1488
|
-
watchMcpStartup(session);
|
|
1489
1488
|
const account = initialization.account || await safeAccount(agentQuery);
|
|
1490
1489
|
const usage = await safeUsage(agentQuery);
|
|
1491
1490
|
return { session, initialization, account, usage };
|
|
1492
1491
|
}
|
|
1493
1492
|
|
|
1494
|
-
// Claude connects MCP servers in the background and reports a failure only
|
|
1495
|
-
// through mcpServerStatus(). Once nothing is pending, each failed or signed-out
|
|
1496
|
-
// server goes to the host as Codex's startup notification, so both providers
|
|
1497
|
-
// warn the same way. The first look waits a second so the host already knows
|
|
1498
|
-
// this thread when the notice arrives.
|
|
1499
|
-
async function watchMcpStartup(session, attempts = 30, delay = 1000) {
|
|
1500
|
-
for (let attempt = 0; attempt < attempts; attempt += 1) {
|
|
1501
|
-
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
1502
|
-
if (sessions.get(session.id) !== session) return;
|
|
1503
|
-
let statuses;
|
|
1504
|
-
try { statuses = await session.query.mcpServerStatus(); } catch { return; }
|
|
1505
|
-
if (!Array.isArray(statuses)) return;
|
|
1506
|
-
if (statuses.some((server) => server?.status === "pending")) continue;
|
|
1507
|
-
for (const server of statuses) {
|
|
1508
|
-
if (server?.status !== "failed" && server?.status !== "needs-auth") continue;
|
|
1509
|
-
const source = server.source || server.scope;
|
|
1510
|
-
notify("mcpServer/startupStatus/updated", {
|
|
1511
|
-
threadId: session.id,
|
|
1512
|
-
name: String(server.name || "MCP"),
|
|
1513
|
-
status: "failed",
|
|
1514
|
-
...(server.status === "needs-auth" ? { failureReason: "authenticationRequired" } : {}),
|
|
1515
|
-
...(server.error ? { error: String(server.error) } : {}),
|
|
1516
|
-
...(source ? { source: String(source) } : {}),
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
return;
|
|
1520
|
-
}
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
1493
|
async function safeAccount(agentQuery) {
|
|
1524
1494
|
try { return await agentQuery.accountInfo(); } catch { return null; }
|
|
1525
1495
|
}
|
|
@@ -4282,39 +4252,6 @@ async function runSelfTest() {
|
|
|
4282
4252
|
if (reconnected.join(",") !== "connected,disabled") {
|
|
4283
4253
|
throw new Error(`Claude MCP reconnect self-test failed: ${reconnected.join(",")}`);
|
|
4284
4254
|
}
|
|
4285
|
-
// Startup failures wait out pending servers, then go out once each.
|
|
4286
|
-
const startupPolls = [
|
|
4287
|
-
[{ name: "slow", status: "pending" }],
|
|
4288
|
-
[
|
|
4289
|
-
{ name: "ok", status: "connected" },
|
|
4290
|
-
{ name: "broken", status: "failed", error: "HTTP 401: token_expired" },
|
|
4291
|
-
{ name: "claude.ai Notion", status: "needs-auth", scope: "claudeai" },
|
|
4292
|
-
],
|
|
4293
|
-
];
|
|
4294
|
-
const startupSession = {
|
|
4295
|
-
id: "mcp-startup-self-test",
|
|
4296
|
-
query: { mcpServerStatus: async () => startupPolls.shift() || [] },
|
|
4297
|
-
};
|
|
4298
|
-
sessions.set(startupSession.id, startupSession);
|
|
4299
|
-
const startupNotices = [];
|
|
4300
|
-
const startupWrite = process.stdout.write;
|
|
4301
|
-
process.stdout.write = (chunk) => { startupNotices.push(JSON.parse(String(chunk))); return true; };
|
|
4302
|
-
try {
|
|
4303
|
-
await watchMcpStartup(startupSession, 3, 0);
|
|
4304
|
-
} finally {
|
|
4305
|
-
process.stdout.write = startupWrite;
|
|
4306
|
-
sessions.delete(startupSession.id);
|
|
4307
|
-
}
|
|
4308
|
-
const startupNames = startupNotices.map((notice) => notice.params?.name).join(",");
|
|
4309
|
-
if (startupNames !== "broken,claude.ai Notion"
|
|
4310
|
-
|| startupNotices.some((notice) => notice.method !== "mcpServer/startupStatus/updated"
|
|
4311
|
-
|| notice.params?.threadId !== startupSession.id
|
|
4312
|
-
|| notice.params?.status !== "failed")
|
|
4313
|
-
|| startupNotices[0].params.error !== "HTTP 401: token_expired"
|
|
4314
|
-
|| startupNotices[1].params.failureReason !== "authenticationRequired"
|
|
4315
|
-
|| startupNotices[1].params.source !== "claudeai") {
|
|
4316
|
-
throw new Error(`Claude MCP startup self-test failed: ${JSON.stringify(startupNotices)}`);
|
|
4317
|
-
}
|
|
4318
4255
|
const user = (uuid, text) => ({
|
|
4319
4256
|
type: "user",
|
|
4320
4257
|
uuid,
|