devez-vibe 1.9.4 → 1.9.6
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 +22 -32
- package/package.json +1 -1
package/bin/dvz.exe
CHANGED
|
Binary file
|
|
@@ -1940,7 +1940,8 @@ const SUBAGENT_TOOLS = ["Agent", "Task"];
|
|
|
1940
1940
|
// 행 요약 상한. 사용자가 읽는 한 줄이라 지침의 80자 요청과 같은 값으로 자른다.
|
|
1941
1941
|
const SUBAGENT_DESCRIPTION_LIMIT = 80;
|
|
1942
1942
|
const SUBAGENT_PULSE_MS = 5000;
|
|
1943
|
-
|
|
1943
|
+
// 자체 시험에서 "오래 조용한 행"을 만들 때 쓰는 나이.
|
|
1944
|
+
const IDLE_ROW_AGE_MS = 120_000;
|
|
1944
1945
|
|
|
1945
1946
|
function startSubagent(session, block) {
|
|
1946
1947
|
const input = block.input || {};
|
|
@@ -2405,25 +2406,11 @@ function firstLine(value, limit) {
|
|
|
2405
2406
|
return String(value ?? "").split("\n")[0].trim().slice(0, limit);
|
|
2406
2407
|
}
|
|
2407
2408
|
|
|
2408
|
-
function emitSubagents(session
|
|
2409
|
-
//
|
|
2410
|
-
//
|
|
2411
|
-
// 종료 edge와 level 신호를 모두 놓친 행만 유한 시간 뒤 제거된다.
|
|
2412
|
-
// 백그라운드 명령(셸로 띄운 검증자 포함)에는 task_progress가 오지 않으므로
|
|
2413
|
-
// lease를 적용하면 살아 있는 행이 1분 뒤 사라진다. 명령 행은 종료 통지와
|
|
2414
|
-
// level 스냅숏으로만 지운다.
|
|
2415
|
-
if (pulse) {
|
|
2416
|
-
const now = Date.now();
|
|
2417
|
-
for (const [id, agent] of session.subagents) {
|
|
2418
|
-
const lastSeenAt = agent.lastSeenAt || agent.startedAt || now;
|
|
2419
|
-
if (agent.background && !agent.command
|
|
2420
|
-
&& now - lastSeenAt >= BACKGROUND_SUBAGENT_LEASE_MS) {
|
|
2421
|
-
session.subagents.delete(id);
|
|
2422
|
-
}
|
|
2423
|
-
}
|
|
2424
|
-
}
|
|
2409
|
+
function emitSubagents(session) {
|
|
2410
|
+
// 백그라운드 행은 조용하다고 지우지 않는다. 오래 걸리는 조사 에이전트는 진행
|
|
2411
|
+
// 신호 없이 몇 분을 보내므로, 종료 통지와 level 스냅숏만 행을 거둔다.
|
|
2425
2412
|
if (session.subagents.size && !session.subagentPulse) {
|
|
2426
|
-
session.subagentPulse = setInterval(() => emitSubagents(session
|
|
2413
|
+
session.subagentPulse = setInterval(() => emitSubagents(session), SUBAGENT_PULSE_MS);
|
|
2427
2414
|
session.subagentPulse.unref?.();
|
|
2428
2415
|
} else if (!session.subagents.size && session.subagentPulse) {
|
|
2429
2416
|
clearInterval(session.subagentPulse);
|
|
@@ -4877,14 +4864,16 @@ async function runSelfTest() {
|
|
|
4877
4864
|
name: "Explore",
|
|
4878
4865
|
description: "",
|
|
4879
4866
|
tool: "",
|
|
4880
|
-
startedAt: Date.now() -
|
|
4881
|
-
lastSeenAt: Date.now() -
|
|
4867
|
+
startedAt: Date.now() - IDLE_ROW_AGE_MS,
|
|
4868
|
+
lastSeenAt: Date.now() - IDLE_ROW_AGE_MS,
|
|
4882
4869
|
});
|
|
4883
|
-
commandRow.lastSeenAt = Date.now() -
|
|
4884
|
-
emitSubagents(commandSession
|
|
4885
|
-
|
|
4886
|
-
|
|
4870
|
+
commandRow.lastSeenAt = Date.now() - IDLE_ROW_AGE_MS;
|
|
4871
|
+
emitSubagents(commandSession);
|
|
4872
|
+
// 오래 조용해도 명령 행과 에이전트 행 모두 남는다. 행은 종료 신호로만 사라진다.
|
|
4873
|
+
if (!commandSession.subagents.has("toolu_bash") || !commandSession.subagents.has("toolu_agent_idle")) {
|
|
4874
|
+
throw new Error(`Claude idle background row self-test failed: ${JSON.stringify([...commandSession.subagents.keys()])}`);
|
|
4887
4875
|
}
|
|
4876
|
+
commandSession.subagents.delete("toolu_agent_idle");
|
|
4888
4877
|
processUser(commandSession, {
|
|
4889
4878
|
origin: { kind: "task-notification" },
|
|
4890
4879
|
message: { content: `<task-notification>
|
|
@@ -4902,8 +4891,8 @@ async function runSelfTest() {
|
|
|
4902
4891
|
tasks: [{ task_id: "bash-2", task_type: "local_bash", description: "빌드 감시" }],
|
|
4903
4892
|
});
|
|
4904
4893
|
const plainCommand = findSubagent(commandSession, "bash-2");
|
|
4905
|
-
plainCommand.lastSeenAt = Date.now() -
|
|
4906
|
-
emitSubagents(commandSession
|
|
4894
|
+
plainCommand.lastSeenAt = Date.now() - IDLE_ROW_AGE_MS;
|
|
4895
|
+
emitSubagents(commandSession);
|
|
4907
4896
|
if (!findSubagent(commandSession, "bash-2") || plainCommand.name !== "Bash" || plainCommand.command !== true) {
|
|
4908
4897
|
throw new Error(`Claude plain background command lease self-test failed: ${JSON.stringify([...commandSession.subagents])}`);
|
|
4909
4898
|
}
|
|
@@ -5116,13 +5105,14 @@ async function runSelfTest() {
|
|
|
5116
5105
|
name: "Explore",
|
|
5117
5106
|
description: "",
|
|
5118
5107
|
tool: "",
|
|
5119
|
-
startedAt: Date.now() -
|
|
5120
|
-
lastSeenAt: Date.now() -
|
|
5108
|
+
startedAt: Date.now() - IDLE_ROW_AGE_MS,
|
|
5109
|
+
lastSeenAt: Date.now() - IDLE_ROW_AGE_MS,
|
|
5121
5110
|
});
|
|
5122
|
-
emitSubagents(structuredSession
|
|
5123
|
-
if (structuredSession.subagents.size !==
|
|
5124
|
-
throw new Error("Claude
|
|
5111
|
+
emitSubagents(structuredSession);
|
|
5112
|
+
if (structuredSession.subagents.size !== 1) {
|
|
5113
|
+
throw new Error("Claude idle background subagent self-test failed");
|
|
5125
5114
|
}
|
|
5115
|
+
structuredSession.subagents.clear();
|
|
5126
5116
|
} finally {
|
|
5127
5117
|
process.stdout.write = stdoutWrite;
|
|
5128
5118
|
}
|