devez-vibe 1.9.41 → 1.9.43
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 +111 -3
- package/package.json +2 -2
package/bin/dvz.exe
CHANGED
|
Binary file
|
|
@@ -2238,6 +2238,8 @@ function upsertStructuredSubagent(session, message) {
|
|
|
2238
2238
|
}
|
|
2239
2239
|
if (toolUseId) running.toolUseId = toolUseId;
|
|
2240
2240
|
if (taskId) running.taskId = taskId;
|
|
2241
|
+
const parentTaskId = firstLine(message.parent_task_id || "", 80);
|
|
2242
|
+
if (parentTaskId) running.parentTaskId = parentTaskId;
|
|
2241
2243
|
// Agent 호출이 붙인 작업 이름이 있으면 SDK가 뒤늦게 알려 주는 에이전트 종류로 덮지 않는다.
|
|
2242
2244
|
if (subagentType && (!running.name || running.name === "agent")) running.name = subagentType;
|
|
2243
2245
|
if (subagentType || isSubagentTaskType(message.task_type)) running.backgroundTask = false;
|
|
@@ -2319,6 +2321,11 @@ function syncBackgroundSubagents(session, tasks) {
|
|
|
2319
2321
|
}
|
|
2320
2322
|
running.background = true;
|
|
2321
2323
|
running.lastSeenAt = Date.now();
|
|
2324
|
+
const parentTaskId = firstLine(task?.parent_task_id || "", 80);
|
|
2325
|
+
if (parentTaskId && parentTaskId !== running.parentTaskId) {
|
|
2326
|
+
running.parentTaskId = parentTaskId;
|
|
2327
|
+
changed = true;
|
|
2328
|
+
}
|
|
2322
2329
|
// 에이전트 행은 이름만 보이지만, 백그라운드 명령 행은 명령문이 곧 내용이다.
|
|
2323
2330
|
const description = isSubagentTaskType(task?.task_type)
|
|
2324
2331
|
? ""
|
|
@@ -2412,8 +2419,14 @@ function processSubagentSystemMessage(session, message) {
|
|
|
2412
2419
|
|
|
2413
2420
|
// 서브에이전트가 실제로 무엇을 했는지는 자식 메시지에만 남는다. 열람용 기록은 여기서
|
|
2414
2421
|
// 한 줄씩 흘려보내고, 목록 행에 쓸 현재 도구만 따로 갱신한다.
|
|
2422
|
+
// 메시지의 agent_id는 그 하위 에이전트 작업의 task_id라 재개 뒤에도 같은 행을 찾는다.
|
|
2423
|
+
function messageSubagent(session, message) {
|
|
2424
|
+
return findSubagent(session, message.parent_tool_use_id)
|
|
2425
|
+
|| (message.agent_id ? findSubagent(session, message.agent_id) : undefined);
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2415
2428
|
function recordSubagentMessage(session, message) {
|
|
2416
|
-
const running =
|
|
2429
|
+
const running = messageSubagent(session, message);
|
|
2417
2430
|
if (!running) return;
|
|
2418
2431
|
running.lastSeenAt = Date.now();
|
|
2419
2432
|
const content = Array.isArray(message.message?.content) ? message.message.content : [];
|
|
@@ -2436,7 +2449,7 @@ function recordSubagentMessage(session, message) {
|
|
|
2436
2449
|
}
|
|
2437
2450
|
|
|
2438
2451
|
function recordSubagentResult(session, message) {
|
|
2439
|
-
const running =
|
|
2452
|
+
const running = messageSubagent(session, message);
|
|
2440
2453
|
if (!running) return;
|
|
2441
2454
|
running.lastSeenAt = Date.now();
|
|
2442
2455
|
const content = Array.isArray(message.message?.content) ? message.message.content : [];
|
|
@@ -2515,6 +2528,37 @@ function firstLine(value, limit) {
|
|
|
2515
2528
|
return String(value ?? "").split("\n")[0].trim().slice(0, limit);
|
|
2516
2529
|
}
|
|
2517
2530
|
|
|
2531
|
+
// SDK 0.3.292부터 하위 에이전트가 띄운 에이전트·명령에 parent_task_id가 붙는다.
|
|
2532
|
+
// 자식 행을 부모 행 바로 아래로 모아 깊이와 함께 보내면 호스트가 들여 그린다.
|
|
2533
|
+
// 부모가 이미 끝났거나 모르는 id면 최상위에 둔다.
|
|
2534
|
+
function subagentRows(session) {
|
|
2535
|
+
const agents = [...session.subagents.values()];
|
|
2536
|
+
const byTask = new Map(agents.filter((agent) => agent.taskId).map((agent) => [agent.taskId, agent]));
|
|
2537
|
+
const children = new Map();
|
|
2538
|
+
const roots = [];
|
|
2539
|
+
for (const agent of agents) {
|
|
2540
|
+
const parent = agent.parentTaskId ? byTask.get(agent.parentTaskId) : null;
|
|
2541
|
+
if (parent && parent !== agent) {
|
|
2542
|
+
if (!children.has(parent)) children.set(parent, []);
|
|
2543
|
+
children.get(parent).push(agent);
|
|
2544
|
+
} else {
|
|
2545
|
+
roots.push(agent);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
const rows = [];
|
|
2549
|
+
const placed = new Set();
|
|
2550
|
+
const place = (agent, depth) => {
|
|
2551
|
+
if (placed.has(agent)) return;
|
|
2552
|
+
placed.add(agent);
|
|
2553
|
+
rows.push({ agent, depth });
|
|
2554
|
+
for (const child of children.get(agent) || []) place(child, depth + 1);
|
|
2555
|
+
};
|
|
2556
|
+
for (const agent of roots) place(agent, 0);
|
|
2557
|
+
// 서로를 부모로 가리키는 행은 뿌리가 없으므로 최상위로 살린다.
|
|
2558
|
+
for (const agent of agents) place(agent, 0);
|
|
2559
|
+
return rows;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2518
2562
|
function emitSubagents(session) {
|
|
2519
2563
|
// 백그라운드 행은 조용하다고 지우지 않는다. 오래 걸리는 조사 에이전트는 진행
|
|
2520
2564
|
// 신호 없이 몇 분을 보내므로, 종료 통지와 level 스냅숏만 행을 거둔다.
|
|
@@ -2528,13 +2572,14 @@ function emitSubagents(session) {
|
|
|
2528
2572
|
notify("turn/subagents/updated", {
|
|
2529
2573
|
threadId: session.id,
|
|
2530
2574
|
turnId: session.turn?.id,
|
|
2531
|
-
subagents:
|
|
2575
|
+
subagents: subagentRows(session).map(({ agent, depth }) => ({
|
|
2532
2576
|
id: agent.id,
|
|
2533
2577
|
name: agent.name,
|
|
2534
2578
|
description: agent.description,
|
|
2535
2579
|
backgroundTask: agent.backgroundTask === true,
|
|
2536
2580
|
tool: agent.tool,
|
|
2537
2581
|
elapsedMs: Date.now() - agent.startedAt,
|
|
2582
|
+
depth,
|
|
2538
2583
|
})),
|
|
2539
2584
|
});
|
|
2540
2585
|
}
|
|
@@ -2778,6 +2823,7 @@ function cancelUsageLimitWait(session) {
|
|
|
2778
2823
|
// 조치를 바로 알기 어려우므로 사유가 있을 때만 앞줄에 한국어 안내를 붙인다.
|
|
2779
2824
|
const STARTUP_FAILURE_GUIDES = {
|
|
2780
2825
|
org_pin_api_key_conflict: "조직 설정이 지정한 로그인 대신 API 키가 설정되어 있습니다. API 키·인증 토큰 환경 변수를 지우고 지정된 계정으로 로그인하세요.",
|
|
2826
|
+
provider_not_allowed: "조직 설정이 허용하지 않는 API 제공자로 연결하도록 설정되어 있습니다. 허용된 제공자로 로그인하거나 관리자에게 문의하세요.",
|
|
2781
2827
|
org_verify_failed: "로그인 계정의 조직을 확인하지 못했습니다. 네트워크를 확인하고 다시 로그인하세요.",
|
|
2782
2828
|
org_pin_mismatch: "조직 설정이 허용하지 않는 계정으로 로그인되어 있습니다. 허용된 조직 계정으로 다시 로그인하세요.",
|
|
2783
2829
|
managed_settings_invalid: "조직 관리 설정을 읽지 못했습니다. 관리자에게 설정 확인을 요청하세요.",
|
|
@@ -5240,6 +5286,68 @@ async function runSelfTest() {
|
|
|
5240
5286
|
throw new Error("Claude background task snapshot did not remove a finished subagent");
|
|
5241
5287
|
}
|
|
5242
5288
|
|
|
5289
|
+
// parent_task_id puts what a subagent launched right under its row, one
|
|
5290
|
+
// level in; a parent that is gone leaves the child at the top level.
|
|
5291
|
+
const nestedSession = {
|
|
5292
|
+
id: "nested-self-test",
|
|
5293
|
+
turn: null,
|
|
5294
|
+
subagents: new Map(),
|
|
5295
|
+
knownSubagents: new Map(),
|
|
5296
|
+
hiddenSubagentTasks: new Set(),
|
|
5297
|
+
ambientSubagentTasks: new Set(),
|
|
5298
|
+
subagentPulse: null,
|
|
5299
|
+
};
|
|
5300
|
+
processSubagentSystemMessage(nestedSession, {
|
|
5301
|
+
type: "system",
|
|
5302
|
+
subtype: "task_started",
|
|
5303
|
+
task_id: "agent-outer",
|
|
5304
|
+
tool_use_id: "toolu_outer",
|
|
5305
|
+
task_type: "local_agent",
|
|
5306
|
+
subagent_type: "Explore",
|
|
5307
|
+
});
|
|
5308
|
+
processSubagentSystemMessage(nestedSession, {
|
|
5309
|
+
type: "system",
|
|
5310
|
+
subtype: "background_tasks_changed",
|
|
5311
|
+
tasks: [
|
|
5312
|
+
{ task_id: "shell-orphan", task_type: "local_bash", description: "npm run dev", parent_task_id: "agent-gone" },
|
|
5313
|
+
{ task_id: "shell-inner", task_type: "local_bash", description: "ping", parent_task_id: "agent-outer" },
|
|
5314
|
+
],
|
|
5315
|
+
});
|
|
5316
|
+
processSubagentSystemMessage(nestedSession, {
|
|
5317
|
+
type: "system",
|
|
5318
|
+
subtype: "task_started",
|
|
5319
|
+
task_id: "agent-inner",
|
|
5320
|
+
tool_use_id: "toolu_inner",
|
|
5321
|
+
task_type: "local_agent",
|
|
5322
|
+
subagent_type: "Plan",
|
|
5323
|
+
parent_task_id: "agent-outer",
|
|
5324
|
+
});
|
|
5325
|
+
const nestedRows = () => captured.join("").trim().split("\n").filter(Boolean)
|
|
5326
|
+
.map((line) => JSON.parse(line))
|
|
5327
|
+
.filter((line) => line.method === "turn/subagents/updated" && line.params.threadId === "nested-self-test")
|
|
5328
|
+
.at(-1)?.params.subagents.map((row) => `${row.depth}:${row.id}`);
|
|
5329
|
+
const expectedNesting = ["0:toolu_outer", "1:task:shell-inner", "1:toolu_inner", "0:task:shell-orphan"];
|
|
5330
|
+
if (JSON.stringify(nestedRows()) !== JSON.stringify(expectedNesting)) {
|
|
5331
|
+
throw new Error(`Claude nested subagent self-test failed: ${JSON.stringify(nestedRows())}`);
|
|
5332
|
+
}
|
|
5333
|
+
// Rows naming each other as parent have no root; none may vanish or repeat.
|
|
5334
|
+
nestedSession.subagents.get("toolu_outer").parentTaskId = "agent-inner";
|
|
5335
|
+
emitSubagents(nestedSession);
|
|
5336
|
+
const looped = nestedRows() || [];
|
|
5337
|
+
if (looped.length !== 4 || new Set(looped.map((row) => row.split(":").slice(1).join(":"))).size !== 4) {
|
|
5338
|
+
throw new Error(`Claude subagent parent loop self-test failed: ${JSON.stringify(looped)}`);
|
|
5339
|
+
}
|
|
5340
|
+
// A resumed subagent's messages find its row through agent_id.
|
|
5341
|
+
recordSubagentMessage(nestedSession, {
|
|
5342
|
+
parent_tool_use_id: "toolu_unknown",
|
|
5343
|
+
agent_id: "agent-inner",
|
|
5344
|
+
message: { content: [{ type: "tool_use", id: "toolu_read", name: "Read", input: { file_path: "a.rs" } }] },
|
|
5345
|
+
});
|
|
5346
|
+
if (nestedSession.subagents.get("toolu_inner")?.tool !== "Read(a.rs)") {
|
|
5347
|
+
throw new Error("Claude subagent agent_id self-test failed");
|
|
5348
|
+
}
|
|
5349
|
+
clearSubagents(nestedSession);
|
|
5350
|
+
|
|
5243
5351
|
processSubagentSystemMessage(structuredSession, {
|
|
5244
5352
|
type: "system",
|
|
5245
5353
|
subtype: "background_tasks_changed",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devez-vibe",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.43",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Stable terminal UI for Codex and Claude Agent SDK",
|
|
6
6
|
"keywords": [
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"postinstall": "node install-skills.mjs && node prepare-search-deps.mjs"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@anthropic-ai/claude-agent-sdk": "0.3.
|
|
48
|
+
"@anthropic-ai/claude-agent-sdk": "0.3.292"
|
|
49
49
|
}
|
|
50
50
|
}
|