@staff0rd/assist 0.1167.0 → 0.1168.0
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/dist/.build-files +79 -79
- package/dist/{addActivity-KFTWNCJC.js → addActivity-7BL2QCUP.js} +2 -2
- package/dist/{addPhase-CYLS4KF3.js → addPhase-UYBZKSW4.js} +3 -3
- package/dist/{advise-3NMJIWEG.js → advise-46JSXUDW.js} +3 -3
- package/dist/{askCheck-QZQNTYSB.js → askCheck-BCCZCYOI.js} +7 -7
- package/dist/{askDesign-XJWLHIKM.js → askDesign-C55JXS4W.js} +1 -1
- package/dist/{branch-7NZPUOFY.js → branch-7L5HGHC3.js} +3 -3
- package/dist/built-version +1 -1
- package/dist/chunk-3HNTLFII.js +50 -0
- package/dist/{chunk-PIZ5WHKY.js → chunk-3PESUAUN.js} +2 -2
- package/dist/{chunk-ZAMEG3EN.js → chunk-425LLTMS.js} +24 -21
- package/dist/{chunk-2IH2A3JK.js → chunk-43MJXI4R.js} +71 -19
- package/dist/{chunk-LRMCAFO3.js → chunk-6ULWRB6I.js} +1 -1
- package/dist/{chunk-KFTPCHSO.js → chunk-6W44RUSM.js} +1 -1
- package/dist/{chunk-SRSCOXZE.js → chunk-7MUNT7JI.js} +5 -1
- package/dist/{chunk-WC7ROMSZ.js → chunk-7QAFWJTK.js} +1 -1
- package/dist/{chunk-3OL7AV66.js → chunk-B7VURMUV.js} +2 -2
- package/dist/{chunk-FF5VHS2Q.js → chunk-DTRDXHGW.js} +1 -1
- package/dist/{chunk-4JI4SMBQ.js → chunk-E3WWV4JR.js} +475 -129
- package/dist/{chunk-4OZ6ULV6.js → chunk-EAREJAOY.js} +1 -1
- package/dist/{chunk-NCTA64LR.js → chunk-FAZEGCRS.js} +2 -2
- package/dist/{chunk-Z4EP2FTM.js → chunk-FYSUHMKS.js} +1 -1
- package/dist/{chunk-IYOKTOCX.js → chunk-H7SSIEZ2.js} +3 -3
- package/dist/{chunk-GSTZWNA7.js → chunk-HL26MMZX.js} +1 -1
- package/dist/{chunk-K3JNJGLB.js → chunk-I3TEQBTO.js} +25 -7
- package/dist/{chunk-HUUPDV55.js → chunk-I552VSJV.js} +1 -1
- package/dist/{chunk-4YTZUN24.js → chunk-IL4DISAP.js} +6 -6
- package/dist/{chunk-BTMRIDZC.js → chunk-KH72TT53.js} +1 -1
- package/dist/{chunk-J4SHN7I2.js → chunk-MVSLFBWG.js} +1 -1
- package/dist/{chunk-PVL3555C.js → chunk-NQRZKLIK.js} +1 -1
- package/dist/{chunk-5TJEQ6SM.js → chunk-QF5UR5N2.js} +1 -1
- package/dist/{chunk-AY4KVQZ2.js → chunk-QTF6XFHS.js} +1 -1
- package/dist/{chunk-W2TBOOCR.js → chunk-RW2B5RU5.js} +1 -1
- package/dist/{chunk-F4ADOEV4.js → chunk-S4FTKZLS.js} +1 -1
- package/dist/{chunk-LD3C7W3Q.js → chunk-UCTFPC6X.js} +2 -2
- package/dist/{chunk-B6TSGDM3.js → chunk-UY75YJI5.js} +1 -1
- package/dist/{chunk-VZ6K4LLZ.js → chunk-VEHHPXW6.js} +1 -1
- package/dist/{chunk-BUX5FETL.js → chunk-WWWNWP3Z.js} +1 -1
- package/dist/{chunk-DRCSMAFZ.js → chunk-X54VUNBQ.js} +1 -1
- package/dist/{chunk-HK7P5QGC.js → chunk-XERYO3NC.js} +1 -1
- package/dist/{chunk-5A63PEQ4.js → chunk-XRLD3NYP.js} +1 -1
- package/dist/{chunk-HL5PHECL.js → chunk-XWSDOQSQ.js} +4 -4
- package/dist/{chunk-XHYDG7UZ.js → chunk-YQJBSNEL.js} +1 -1
- package/dist/{chunk-LMXSHIFC.js → chunk-ZAS2ZWEK.js} +1 -1
- package/dist/{chunk-4AIX7WAZ.js → chunk-ZKPXMOR6.js} +1 -1
- package/dist/{chunk-XRXDSR4I.js → chunk-ZRJFYESX.js} +2 -2
- package/dist/{cliHook-PQ4DICPB.js → cliHook-LXPHXYTG.js} +5 -5
- package/dist/{cliHookCheck-XPQZAA7K.js → cliHookCheck-X3OTARTS.js} +2 -2
- package/dist/{codexHook-OU6CL4R6.js → codexHook-JHA7XAJI.js} +7 -7
- package/dist/commands/extension/extension/content.js +1 -1
- package/dist/commands/extension/extension/docs.js +1 -1
- package/dist/commands/sessions/web/bundle.js +470 -470
- package/dist/{commit-XSLHSHPA.js → commit-S237TZOH.js} +3 -3
- package/dist/{doctorNodes-UJSW3KXP.js → doctorNodes-ZGGPDVHQ.js} +3 -3
- package/dist/{done-RZTGTNXG.js → done-B5OPZGM4.js} +4 -4
- package/dist/{editHook-KBXSEJDB.js → editHook-TIPNG6CB.js} +5 -5
- package/dist/{fixConflict-IQPXBWTV.js → fixConflict-GLENPF7A.js} +4 -4
- package/dist/index.js +48 -48
- package/dist/{indexRules-4M2TAWOE.js → indexRules-65H3IE33.js} +1 -2
- package/dist/{launchMode-CUMEGSJ2.js → launchMode-OATTOTYW.js} +13 -13
- package/dist/{list-6KAXN2EU.js → list-TGEC6P3Q.js} +5 -5
- package/dist/{next-M6ES2GM5.js → next-P63EVBB6.js} +12 -12
- package/dist/{piHook-SMWFJWJW.js → piHook-GCKOXN5A.js} +5 -5
- package/dist/{propose-UZ32UXI7.js → propose-D3F4C3EJ.js} +4 -4
- package/dist/{refine-IMF3B622.js → refine-W7HULKNY.js} +14 -14
- package/dist/{restartNode-DRKXN7BO.js → restartNode-AYPAGM32.js} +5 -5
- package/dist/{review-LV46YDUO.js → review-LQGEHHIW.js} +4 -4
- package/dist/{reviewPrComments-2XMV6JYB.js → reviewPrComments-RXADKZLV.js} +4 -4
- package/dist/{rewindPhase-CIBJCOEB.js → rewindPhase-BPVRXMD5.js} +8 -8
- package/dist/{rulesAdd-T62MTCFM.js → rulesAdd-V4SWWQKL.js} +8 -44
- package/dist/{run-OCENG6SA.js → run-TVFL4EWV.js} +10 -10
- package/dist/{run-LIMV7FRM.js → run-UH5KYOU7.js} +10 -10
- package/dist/{runDaemon-ZWJ5RXI3.js → runDaemon-YEDFUDNN.js} +263 -28
- package/dist/{runRefine-JDE7UBYZ.js → runRefine-FPTFYFMX.js} +14 -14
- package/dist/{scan-DKZKXE2I.js → scan-BO23G2MD.js} +2 -2
- package/dist/{schemaConfirm-JYOLGGGL.js → schemaConfirm-AB6SR5SC.js} +2 -2
- package/dist/{schemaUnlock-4JRJS5RQ.js → schemaUnlock-AT5T43PB.js} +2 -2
- package/dist/{search-CD5NUNSZ.js → search-5EA654VD.js} +5 -5
- package/dist/{show-CQEX3RE3.js → show-OLER6JJU.js} +3 -3
- package/dist/{show-EBJJQQ5G.js → show-QHB5ZN54.js} +3 -3
- package/dist/{signExtension-R2SUZ2TV.js → signExtension-Y5WU4OLB.js} +1 -1
- package/dist/{updateNode-OWAXUOKT.js → updateNode-YBE4MBAO.js} +5 -5
- package/dist/{updatePlan-U6PK425R.js → updatePlan-FWJBNYWK.js} +4 -4
- package/dist/{web-HE7B2H3B.js → web-DL44YNRY.js} +18 -17
- package/dist/{web-C6UIA5QL.js → web-VAXMLL35.js} +18 -17
- package/package.json +1 -1
- package/dist/chunk-IZZJUZZY.js +0 -21
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
findClaudeFiles
|
|
3
|
+
} from "./chunk-I3TEQBTO.js";
|
|
4
|
+
import {
|
|
5
|
+
RULE_BULLET,
|
|
6
|
+
appendRulesSection,
|
|
7
|
+
contentLines,
|
|
8
|
+
parseRulesSection,
|
|
9
|
+
rulesSectionRange
|
|
10
|
+
} from "./chunk-ADLCDG2V.js";
|
|
11
|
+
|
|
12
|
+
// src/commands/rules/ruleBullet.ts
|
|
13
|
+
function ruleBullet({ code, title, text }) {
|
|
14
|
+
return title ? `- **${code}** \u2014 **${title}** \u2014 ${text}` : `- **${code}** \u2014 ${text}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// src/commands/rules/insertRuleBullet.ts
|
|
18
|
+
function insertRuleBullet(content, rule) {
|
|
19
|
+
const bullet = ruleBullet(rule);
|
|
20
|
+
const lines = contentLines(content);
|
|
21
|
+
const range = rulesSectionRange(lines);
|
|
22
|
+
if (!range) return appendRulesSection(lines, bullet);
|
|
23
|
+
const body = lines.slice(range.start + 1, range.end);
|
|
24
|
+
const lastBullet = body.reduce(
|
|
25
|
+
(last, line, index) => RULE_BULLET.test(line) ? index : last,
|
|
26
|
+
-1
|
|
27
|
+
);
|
|
28
|
+
const at = lastBullet === -1 ? range.start + 1 : range.start + lastBullet + 2;
|
|
29
|
+
const inserted = lastBullet === -1 ? ["", bullet] : [bullet];
|
|
30
|
+
return `${[...lines.slice(0, at), ...inserted, ...lines.slice(at)].join("\n")}
|
|
31
|
+
`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// src/commands/rules/nextRuleCode.ts
|
|
35
|
+
import { readFileSync } from "fs";
|
|
36
|
+
var CODE_PREFIX = "R";
|
|
37
|
+
function nextRuleCode(root) {
|
|
38
|
+
const numbers = findClaudeFiles(root).flatMap(
|
|
39
|
+
(file) => parseRulesSection(readFileSync(file, "utf8")).map(
|
|
40
|
+
(rule) => Number(/(\d+)\s*$/.exec(rule.code)?.[1] ?? 0)
|
|
41
|
+
)
|
|
42
|
+
);
|
|
43
|
+
return `${CODE_PREFIX}${Math.max(0, ...numbers) + 1}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
ruleBullet,
|
|
48
|
+
insertRuleBullet,
|
|
49
|
+
nextRuleCode
|
|
50
|
+
};
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isApprovedRead,
|
|
14
14
|
resolvePermission,
|
|
15
15
|
splitCompound
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RW2B5RU5.js";
|
|
17
17
|
import {
|
|
18
18
|
DOCS_LOCK_REASON,
|
|
19
19
|
SCHEMA_LOCK_REASON,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isSchemaPath,
|
|
24
24
|
isSchemaRelativePath,
|
|
25
25
|
mentionsDocsPath
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VEHHPXW6.js";
|
|
27
27
|
import {
|
|
28
28
|
isLiveDaemonSession
|
|
29
29
|
} from "./chunk-C5U44UI7.js";
|
|
@@ -268,8 +268,30 @@ function quoteForPosixShell(value) {
|
|
|
268
268
|
return `'${value.replaceAll("'", `'\\''`)}'`;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
// src/commands/sessions/daemon/
|
|
271
|
+
// src/commands/sessions/daemon/killTree.ts
|
|
272
272
|
import { execFile } from "child_process";
|
|
273
|
+
function killTree(pid) {
|
|
274
|
+
if (process.platform === "win32") {
|
|
275
|
+
execFile(
|
|
276
|
+
"taskkill",
|
|
277
|
+
["/T", "/F", "/PID", String(pid)],
|
|
278
|
+
{ windowsHide: true },
|
|
279
|
+
() => {
|
|
280
|
+
}
|
|
281
|
+
);
|
|
282
|
+
return;
|
|
283
|
+
}
|
|
284
|
+
try {
|
|
285
|
+
process.kill(-pid, "SIGKILL");
|
|
286
|
+
} catch {
|
|
287
|
+
try {
|
|
288
|
+
process.kill(pid, "SIGKILL");
|
|
289
|
+
} catch {
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// src/commands/sessions/daemon/worktree/stopInstall.ts
|
|
273
295
|
var running = /* @__PURE__ */ new Map();
|
|
274
296
|
function trackInstall(worktreePath, child) {
|
|
275
297
|
const children = running.get(worktreePath) ?? /* @__PURE__ */ new Set();
|
|
@@ -293,26 +315,6 @@ function stopInstall(worktreePath) {
|
|
|
293
315
|
killTree(child.pid);
|
|
294
316
|
}
|
|
295
317
|
}
|
|
296
|
-
function killTree(pid) {
|
|
297
|
-
if (process.platform === "win32") {
|
|
298
|
-
execFile(
|
|
299
|
-
"taskkill",
|
|
300
|
-
["/T", "/F", "/PID", String(pid)],
|
|
301
|
-
{ windowsHide: true },
|
|
302
|
-
() => {
|
|
303
|
-
}
|
|
304
|
-
);
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
try {
|
|
308
|
-
process.kill(-pid, "SIGKILL");
|
|
309
|
-
} catch {
|
|
310
|
-
try {
|
|
311
|
-
process.kill(pid, "SIGKILL");
|
|
312
|
-
} catch {
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
318
|
|
|
317
319
|
// src/commands/sessions/daemon/worktree/spawnInstall.ts
|
|
318
320
|
var STDERR_TAIL = 2e3;
|
|
@@ -463,6 +465,7 @@ function worktreeWithBranch(listing, branch) {
|
|
|
463
465
|
export {
|
|
464
466
|
worktreeConfigFor,
|
|
465
467
|
allocateTree,
|
|
468
|
+
killTree,
|
|
466
469
|
stopInstall,
|
|
467
470
|
seedWorktree,
|
|
468
471
|
prCliCommands,
|
|
@@ -899,7 +899,8 @@ function renderPrompt(raw) {
|
|
|
899
899
|
return args ? `${name} ${args}` : name;
|
|
900
900
|
}
|
|
901
901
|
const bashInput = marker(raw, "bash-input");
|
|
902
|
-
if (bashInput)
|
|
902
|
+
if (bashInput)
|
|
903
|
+
return stripBlocks(raw.replace(/<bash-input>[\s\S]*?<\/bash-input>/g, "")) || `! ${bashInput}`;
|
|
903
904
|
return stripBlocks(raw);
|
|
904
905
|
}
|
|
905
906
|
function marker(raw, tag) {
|
|
@@ -910,16 +911,14 @@ function stripBlocks(raw) {
|
|
|
910
911
|
return raw.replace(/<system-reminder>[\s\S]*?<\/system-reminder>/g, "").replace(/<task-notification>[\s\S]*?<\/task-notification>/g, "").replace(/<command-[^>]*>[\s\S]*?<\/command-[^>]*>/g, "").replace(/<local-command-[^>]*>[\s\S]*?<\/local-command-[^>]*>/g, "").replace(/<bash-(stdout|stderr)>[\s\S]*?<\/bash-\1>/g, "").trim();
|
|
911
912
|
}
|
|
912
913
|
|
|
913
|
-
// src/commands/sessions/shared/
|
|
914
|
-
var MAX_LENGTH = 2048;
|
|
914
|
+
// src/commands/sessions/shared/userPromptRaw.ts
|
|
915
915
|
var INTERRUPT_PREFIX2 = "[Request interrupted";
|
|
916
|
-
function
|
|
917
|
-
if (entry.isSidechain || entry.isMeta) return
|
|
918
|
-
if (entry.type !== "user" || isTaskNotification(entry)) return
|
|
916
|
+
function userPromptRaw(entry) {
|
|
917
|
+
if (entry.isSidechain || entry.isMeta) return null;
|
|
918
|
+
if (entry.type !== "user" || isTaskNotification(entry)) return null;
|
|
919
919
|
const raw = promptTextOrNull(entry);
|
|
920
|
-
if (raw === null || parseRestartNudge(raw) !== null) return
|
|
921
|
-
|
|
922
|
-
return message2 ? cap(message2, maxLength) : void 0;
|
|
920
|
+
if (raw === null || parseRestartNudge(raw) !== null) return null;
|
|
921
|
+
return raw;
|
|
923
922
|
}
|
|
924
923
|
function isTaskNotification(entry) {
|
|
925
924
|
return asRecord4(entry.origin)?.kind === "task-notification";
|
|
@@ -938,9 +937,6 @@ function promptTextOrNull(entry) {
|
|
|
938
937
|
}
|
|
939
938
|
return parts.length === 0 ? null : parts.join("\n");
|
|
940
939
|
}
|
|
941
|
-
function cap(message2, maxLength) {
|
|
942
|
-
return message2.length <= maxLength ? message2 : `${message2.slice(0, maxLength).trimEnd()}\u2026`;
|
|
943
|
-
}
|
|
944
940
|
function isInterrupt(value) {
|
|
945
941
|
return value.trimStart().startsWith(INTERRUPT_PREFIX2);
|
|
946
942
|
}
|
|
@@ -948,6 +944,18 @@ function asRecord4(value) {
|
|
|
948
944
|
return value && typeof value === "object" ? value : null;
|
|
949
945
|
}
|
|
950
946
|
|
|
947
|
+
// src/commands/sessions/shared/renderUserPrompt.ts
|
|
948
|
+
var MAX_LENGTH = 2048;
|
|
949
|
+
function renderUserPrompt(entry, maxLength = MAX_LENGTH) {
|
|
950
|
+
const raw = userPromptRaw(entry);
|
|
951
|
+
if (raw === null) return void 0;
|
|
952
|
+
const message2 = renderPrompt(raw);
|
|
953
|
+
return message2 ? cap(message2, maxLength) : void 0;
|
|
954
|
+
}
|
|
955
|
+
function cap(message2, maxLength) {
|
|
956
|
+
return message2.length <= maxLength ? message2 : `${message2.slice(0, maxLength).trimEnd()}\u2026`;
|
|
957
|
+
}
|
|
958
|
+
|
|
951
959
|
// src/commands/sessions/shared/toolTarget.ts
|
|
952
960
|
function toolTarget(input) {
|
|
953
961
|
if (!input || typeof input !== "object") return "";
|
|
@@ -1049,6 +1057,33 @@ function claudeAssistantEvents(content, at) {
|
|
|
1049
1057
|
];
|
|
1050
1058
|
}
|
|
1051
1059
|
|
|
1060
|
+
// src/commands/sessions/shared/splitShellBlocks.ts
|
|
1061
|
+
var SHELL_BLOCK = /<bash-input>([\s\S]*?)<\/bash-input>\s*(?:<bash-stdout>([\s\S]*?)<\/bash-stdout>)?\s*(?:<bash-stderr>([\s\S]*?)<\/bash-stderr>)?/g;
|
|
1062
|
+
function splitShellBlocks(raw) {
|
|
1063
|
+
const shells = [];
|
|
1064
|
+
const text = raw.replace(SHELL_BLOCK, (match, command, stdout, stderr) => {
|
|
1065
|
+
if (stdout === void 0 && stderr === void 0) return match;
|
|
1066
|
+
shells.push({
|
|
1067
|
+
command: String(command).trim(),
|
|
1068
|
+
stdout: stdout ?? "",
|
|
1069
|
+
stderr: stderr ?? ""
|
|
1070
|
+
});
|
|
1071
|
+
return "";
|
|
1072
|
+
});
|
|
1073
|
+
return shells.length ? { shells, text: text.trim() } : null;
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
// src/shared/harnessAdapters/claudeShellEvents.ts
|
|
1077
|
+
function claudeShellEvents(entry, at) {
|
|
1078
|
+
const raw = userPromptRaw(entry);
|
|
1079
|
+
const shell = raw === null ? null : splitShellBlocks(raw);
|
|
1080
|
+
if (!shell) return { events: [], textless: false };
|
|
1081
|
+
return {
|
|
1082
|
+
events: shell.shells.map((block) => ({ kind: "shell", ...block, at })),
|
|
1083
|
+
textless: !shell.text
|
|
1084
|
+
};
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1052
1087
|
// src/shared/harnessAdapters/claudeEntryEvents.ts
|
|
1053
1088
|
function contentOf(entry) {
|
|
1054
1089
|
return entry.message?.content;
|
|
@@ -1058,8 +1093,9 @@ function resultText(content) {
|
|
|
1058
1093
|
return claudeContentBlocksOf(content).filter((block) => block.type === "text").map((block) => String(block.text ?? "")).join("\n");
|
|
1059
1094
|
}
|
|
1060
1095
|
function userEvents(entry, at) {
|
|
1061
|
-
const
|
|
1062
|
-
const
|
|
1096
|
+
const shell = claudeShellEvents(entry, at);
|
|
1097
|
+
const events = shell.events;
|
|
1098
|
+
const text = shell.textless ? void 0 : renderUserPrompt(entry, Number.POSITIVE_INFINITY);
|
|
1063
1099
|
if (text) events.push({ kind: "message", role: "user", text, at });
|
|
1064
1100
|
else {
|
|
1065
1101
|
const normalized = normalizeUser(entry);
|
|
@@ -3444,6 +3480,7 @@ function createSdkExit(emit, child) {
|
|
|
3444
3480
|
function sdkSessionHandle(label) {
|
|
3445
3481
|
const listeners = [];
|
|
3446
3482
|
let turn;
|
|
3483
|
+
let prefixer;
|
|
3447
3484
|
const unbound = (action) => daemonLog(`${label} sdk ${action} dropped: query not started`);
|
|
3448
3485
|
const handle = {
|
|
3449
3486
|
onEvent: (listener) => listeners.push(listener),
|
|
@@ -3454,13 +3491,24 @@ function sdkSessionHandle(label) {
|
|
|
3454
3491
|
unbound("dequeue");
|
|
3455
3492
|
return false;
|
|
3456
3493
|
},
|
|
3457
|
-
stopTask: (taskId) => turn ? turn.stopTask(taskId) : Promise.reject(new Error("query not started"))
|
|
3494
|
+
stopTask: (taskId) => turn ? turn.stopTask(taskId) : Promise.reject(new Error("query not started")),
|
|
3495
|
+
setPrefix: (provider) => {
|
|
3496
|
+
prefixer = provider;
|
|
3497
|
+
}
|
|
3458
3498
|
};
|
|
3459
3499
|
return {
|
|
3460
3500
|
handle,
|
|
3461
3501
|
emit: (event) => {
|
|
3462
3502
|
for (const listener of listeners) listener(event);
|
|
3463
3503
|
},
|
|
3504
|
+
/* why: held shell results join a message only as it reaches Claude, so a
|
|
3505
|
+
* message queued mid-turn still picks up output that finished after it. */
|
|
3506
|
+
prefix: (text) => {
|
|
3507
|
+
const blocks = prefixer?.();
|
|
3508
|
+
return blocks ? `${blocks}
|
|
3509
|
+
|
|
3510
|
+
${text}` : text;
|
|
3511
|
+
},
|
|
3464
3512
|
bind: (controls) => {
|
|
3465
3513
|
turn = controls;
|
|
3466
3514
|
}
|
|
@@ -3496,7 +3544,8 @@ function createSdkSessionProcess(sessionId, abort) {
|
|
|
3496
3544
|
child = spawned;
|
|
3497
3545
|
},
|
|
3498
3546
|
aborted: () => abort.signal.aborted,
|
|
3499
|
-
bind: sdk.bind
|
|
3547
|
+
bind: sdk.bind,
|
|
3548
|
+
prefix: sdk.prefix
|
|
3500
3549
|
};
|
|
3501
3550
|
}
|
|
3502
3551
|
|
|
@@ -3568,7 +3617,7 @@ function createSdkMessageQueue(label, control, push) {
|
|
|
3568
3617
|
flush: () => {
|
|
3569
3618
|
if (!queued.length) return false;
|
|
3570
3619
|
daemonLog(`${label} sdk sending ${queued.length} queued message(s)`);
|
|
3571
|
-
const text = queued.join("\n\n");
|
|
3620
|
+
const text = control.prefix(queued.join("\n\n"));
|
|
3572
3621
|
publish([], text);
|
|
3573
3622
|
push(text);
|
|
3574
3623
|
return true;
|
|
@@ -3907,8 +3956,9 @@ function createSdkTurnTracker(label, control, push) {
|
|
|
3907
3956
|
send: (text) => {
|
|
3908
3957
|
if (busy) return queue.add(text);
|
|
3909
3958
|
daemonLog(`${label} sdk message sent: ${quoteForLog(text)}`);
|
|
3910
|
-
|
|
3911
|
-
|
|
3959
|
+
const message2 = control.prefix(text);
|
|
3960
|
+
push(message2);
|
|
3961
|
+
control.emit({ kind: "pending", texts: [message2] });
|
|
3912
3962
|
setStatus("running");
|
|
3913
3963
|
},
|
|
3914
3964
|
dequeue: queue.remove,
|
|
@@ -4399,6 +4449,7 @@ export {
|
|
|
4399
4449
|
readTranscriptTail,
|
|
4400
4450
|
readTranscriptTailSync,
|
|
4401
4451
|
parseRestartNudge,
|
|
4452
|
+
splitShellBlocks,
|
|
4402
4453
|
emptyScanUsage,
|
|
4403
4454
|
scanUsageTokens,
|
|
4404
4455
|
reviewerLabel,
|
|
@@ -4408,6 +4459,7 @@ export {
|
|
|
4408
4459
|
killSdkChild,
|
|
4409
4460
|
noopDisposable,
|
|
4410
4461
|
sdkTerminalStub,
|
|
4462
|
+
quoteForLog,
|
|
4411
4463
|
setSdkUsageSink,
|
|
4412
4464
|
workflowQueryEnv,
|
|
4413
4465
|
spawnClaudeSdk,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
harnessAdapter,
|
|
6
6
|
parseRolloutEntry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-43MJXI4R.js";
|
|
8
8
|
import {
|
|
9
9
|
harnesses
|
|
10
10
|
} from "./chunk-XDIVXGPQ.js";
|
|
@@ -52,6 +52,10 @@ function toMessages(event) {
|
|
|
52
52
|
...event.description && { description: event.description }
|
|
53
53
|
}
|
|
54
54
|
];
|
|
55
|
+
if (event.kind === "shell") {
|
|
56
|
+
const { command, stdout, stderr } = event;
|
|
57
|
+
return [{ role: "shell", command, stdout, stderr }];
|
|
58
|
+
}
|
|
55
59
|
if (event.kind === "interrupt") return [{ role: "interrupt" }];
|
|
56
60
|
if (event.kind === "restart")
|
|
57
61
|
return [{ role: "restart", killed: event.killed }];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveReviewPhase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YQJBSNEL.js";
|
|
4
4
|
import {
|
|
5
5
|
resolvePlan
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QF5UR5N2.js";
|
|
7
7
|
|
|
8
8
|
// src/commands/backlog/resolveRewindPlan.ts
|
|
9
9
|
function resolveRewindPlan(item) {
|