@staff0rd/assist 0.1174.3 → 0.1176.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 +73 -73
- package/dist/{addActivity-7ZXVIR6V.js → addActivity-HMULWVAE.js} +2 -2
- package/dist/{addPhase-ROKM75ZR.js → addPhase-GDFLFVAW.js} +3 -3
- package/dist/{advise-QGCTCJPB.js → advise-PTDTTAJM.js} +3 -3
- package/dist/{askCheck-JRDEJANP.js → askCheck-MZ5TZQIL.js} +7 -7
- package/dist/{askDesign-WPFOKRIB.js → askDesign-3GDEDLOS.js} +1 -1
- package/dist/{branch-JCCOTNXS.js → branch-FEGHBGSM.js} +3 -3
- package/dist/built-version +1 -1
- package/dist/{chunk-742ZE4JJ.js → chunk-3OPLEVRF.js} +1 -1
- package/dist/{chunk-ZOVIPCHL.js → chunk-7HOOPQCG.js} +1 -1
- package/dist/{chunk-PKCSDK5V.js → chunk-7WQ6XW6H.js} +1 -1
- package/dist/{chunk-33422ILV.js → chunk-7XLZ5PIW.js} +1 -1
- package/dist/{chunk-KP4SDIUQ.js → chunk-BCODH55S.js} +1 -1
- package/dist/{chunk-C4VFOR26.js → chunk-CE3IBI6J.js} +2 -2
- package/dist/{chunk-OJGHTUBO.js → chunk-DUDZAFVK.js} +7 -7
- package/dist/{chunk-OUCSUCNC.js → chunk-EWLY7COZ.js} +10 -5
- package/dist/{chunk-2FJN2OWL.js → chunk-EZRENPTJ.js} +2 -2
- package/dist/{chunk-UGSJUDK4.js → chunk-FZZRFRDB.js} +1 -1
- package/dist/{chunk-4HX7OKJW.js → chunk-GY2735TY.js} +4 -4
- package/dist/{chunk-XGZDPGJJ.js → chunk-ICVMDDIK.js} +6 -6
- package/dist/{chunk-OTIHHF7M.js → chunk-J6IDOIVY.js} +1 -1
- package/dist/{chunk-RQMUYHWT.js → chunk-JENJLKHU.js} +1 -1
- package/dist/{chunk-6ERC43OB.js → chunk-KOHPFCX6.js} +1 -1
- package/dist/{chunk-V6VXRBKV.js → chunk-KXTTC4KU.js} +1 -1
- package/dist/{chunk-THHCIIDC.js → chunk-KYMDHDXC.js} +1 -1
- package/dist/{chunk-VNR2A4FO.js → chunk-LFZUHYV5.js} +1 -1
- package/dist/{chunk-OZ2LVAY5.js → chunk-MSWG2GGI.js} +1 -1
- package/dist/{chunk-VBJARYVL.js → chunk-MT76WK6E.js} +1 -1
- package/dist/{chunk-XDVCNEVO.js → chunk-MTN37C4V.js} +1 -1
- package/dist/{chunk-5FFRWNY2.js → chunk-MVFHRTPB.js} +1 -1
- package/dist/{chunk-2HIZ7LU7.js → chunk-MW2SU7QX.js} +1 -1
- package/dist/{chunk-WRGQCICE.js → chunk-PA3Z7HIH.js} +1 -1
- package/dist/{chunk-XG7Q2TOP.js → chunk-QUA3MKDI.js} +1 -1
- package/dist/{chunk-4LIVFVJ6.js → chunk-R7PLAKNF.js} +1 -1
- package/dist/{chunk-D3NNPY5A.js → chunk-RGMAUOOR.js} +1 -1
- package/dist/{chunk-H7CFED56.js → chunk-RHE5G4R7.js} +3 -3
- package/dist/{chunk-KTFTOUWC.js → chunk-RILCJ3PN.js} +1 -1
- package/dist/{chunk-6YXIRU6X.js → chunk-SGYCDSBF.js} +1 -1
- package/dist/{chunk-XBW6KSCX.js → chunk-TWHFLOJS.js} +2 -2
- package/dist/{chunk-BVKAOQY4.js → chunk-V2UWYFAM.js} +2 -2
- package/dist/{chunk-LHY3XSQY.js → chunk-WXVVO4LF.js} +1 -1
- package/dist/{chunk-UOZ2PUPM.js → chunk-YPPA5Z3U.js} +75 -17
- package/dist/{cliHook-BMUSNYH7.js → cliHook-7XUKUZMI.js} +5 -5
- package/dist/{cliHookCheck-INKME7YJ.js → cliHookCheck-IBH5EDWF.js} +2 -2
- package/dist/{codexHook-Y7XAGSDN.js → codexHook-XZCX2IML.js} +7 -7
- package/dist/commands/sessions/web/bundle.js +431 -431
- package/dist/{commit-JMO7HYHV.js → commit-DVBBSH6B.js} +3 -3
- package/dist/{doctorNodes-PV6YML37.js → doctorNodes-FIUVFWPG.js} +3 -3
- package/dist/{done-LWJNYARZ.js → done-3UYUB6T4.js} +4 -4
- package/dist/{editHook-EZXUBYBQ.js → editHook-DWCUXU4G.js} +5 -5
- package/dist/{fixConflict-GOLKE4QB.js → fixConflict-6SCGNOHF.js} +2 -2
- package/dist/index.js +46 -46
- package/dist/{launchMode-KIEL7XCX.js → launchMode-MLGYLVZG.js} +13 -13
- package/dist/{list-2RSFPWBE.js → list-TP35UEF4.js} +5 -5
- package/dist/{next-SHGXSMSR.js → next-OISQZZ4J.js} +12 -12
- package/dist/{piHook-3PYJBTHI.js → piHook-RGPHKBJR.js} +5 -5
- package/dist/{propose-OKGN2KQA.js → propose-P4FKRBJG.js} +4 -4
- package/dist/{refine-DOI3YV4X.js → refine-Q2KCM2VH.js} +14 -14
- package/dist/{restartNode-I4UX6HG7.js → restartNode-LCG6U3PY.js} +5 -5
- package/dist/{review-QN6WAMDL.js → review-BSVYVLJU.js} +2 -2
- package/dist/{reviewPrComments-AAPY7IZ6.js → reviewPrComments-TNFVZID4.js} +2 -2
- package/dist/{rewindPhase-2JOOPII2.js → rewindPhase-D2W6JK2M.js} +8 -8
- package/dist/{run-27PKI5VY.js → run-WMDSFFZX.js} +10 -10
- package/dist/{run-GOSXQQLM.js → run-Y42G36KG.js} +10 -10
- package/dist/{runDaemon-YMGZ6IYC.js → runDaemon-BNUVZXDB.js} +19 -17
- package/dist/{runRefine-GNXFRLWH.js → runRefine-SO4LXPEG.js} +14 -14
- package/dist/{scan-I3LHSVLX.js → scan-WHCF7SGN.js} +2 -2
- package/dist/{schemaConfirm-BF3UUASW.js → schemaConfirm-F3KHOXQK.js} +2 -2
- package/dist/{schemaUnlock-3SG5RKVJ.js → schemaUnlock-XZZXKAYM.js} +2 -2
- package/dist/{search-5JUOWISN.js → search-XSLH3HO4.js} +5 -5
- package/dist/{show-3VXG4ZKO.js → show-CISZ7PE7.js} +3 -3
- package/dist/{show-I54BMBOQ.js → show-Z4ECMAUB.js} +3 -3
- package/dist/{signExtension-6RJIZ6NR.js → signExtension-XWDSWTCA.js} +1 -1
- package/dist/{updateNode-SS3XE57M.js → updateNode-2YUDSGFR.js} +5 -5
- package/dist/{updatePlan-N67RCSC3.js → updatePlan-YEAFHGHN.js} +4 -4
- package/dist/{web-PAIENZ3Z.js → web-GGYB5X6E.js} +16 -16
- package/dist/{web-3VQJEOWP.js → web-ZW3RTYVR.js} +16 -16
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
resolveLinkTarget,
|
|
14
14
|
usageWindowKey,
|
|
15
15
|
watcherLogPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-J6IDOIVY.js";
|
|
17
17
|
import {
|
|
18
18
|
readNodeRuntimeReport
|
|
19
19
|
} from "./chunk-SURCYYQ6.js";
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./chunk-GZ7EEHJH.js";
|
|
32
32
|
import {
|
|
33
33
|
firstBrokenHop
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-KXTTC4KU.js";
|
|
35
35
|
import {
|
|
36
36
|
TRACE_HEADER,
|
|
37
37
|
newTraceId
|
|
@@ -39,7 +39,7 @@ import {
|
|
|
39
39
|
import {
|
|
40
40
|
ASSIST_VERSION,
|
|
41
41
|
PROTOCOL_VERSION
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-MW2SU7QX.js";
|
|
43
43
|
import {
|
|
44
44
|
queryNodes
|
|
45
45
|
} from "./chunk-B7VOTF5Q.js";
|
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
} from "./chunk-UJBW7FVI.js";
|
|
85
85
|
import {
|
|
86
86
|
targetConversationEvents
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-CE3IBI6J.js";
|
|
88
88
|
import {
|
|
89
89
|
configEntryLayers,
|
|
90
90
|
ghFailure,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
} from "./chunk-C2SYKKB5.js";
|
|
242
242
|
import {
|
|
243
243
|
rewindItemToPhase
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-KOHPFCX6.js";
|
|
245
245
|
import {
|
|
246
246
|
loadBacklogSummaries,
|
|
247
247
|
searchBacklogSummaries
|
|
@@ -268,7 +268,7 @@ import {
|
|
|
268
268
|
} from "./chunk-OVT3MIV3.js";
|
|
269
269
|
import {
|
|
270
270
|
resolveRewindPlan
|
|
271
|
-
} from "./chunk-
|
|
271
|
+
} from "./chunk-EZRENPTJ.js";
|
|
272
272
|
import {
|
|
273
273
|
deleteItem,
|
|
274
274
|
getOrigin,
|
|
@@ -317,7 +317,7 @@ import {
|
|
|
317
317
|
discoverSessionJsonlPaths,
|
|
318
318
|
harnessAdapter,
|
|
319
319
|
parseSessionFile
|
|
320
|
-
} from "./chunk-
|
|
320
|
+
} from "./chunk-YPPA5Z3U.js";
|
|
321
321
|
import {
|
|
322
322
|
harnessLabel
|
|
323
323
|
} from "./chunk-DUNO7WBT.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
import {
|
|
5
5
|
harnessAdapter,
|
|
6
6
|
parseRolloutEntry
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-YPPA5Z3U.js";
|
|
8
8
|
import {
|
|
9
9
|
harnesses
|
|
10
10
|
} from "./chunk-XDIVXGPQ.js";
|
|
@@ -40,8 +40,8 @@ async function locateConversation(conversationId) {
|
|
|
40
40
|
return void 0;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
// src/commands/sessions/shared/
|
|
44
|
-
function
|
|
43
|
+
// src/commands/sessions/shared/eventTranscriptMessages.ts
|
|
44
|
+
function eventTranscriptMessages(event) {
|
|
45
45
|
if (event.kind === "message") return [{ role: event.role, text: event.text }];
|
|
46
46
|
if (event.kind === "tool")
|
|
47
47
|
return [
|
|
@@ -49,7 +49,10 @@ function toMessages(event) {
|
|
|
49
49
|
role: "tool",
|
|
50
50
|
tool: event.tool,
|
|
51
51
|
target: event.target,
|
|
52
|
-
...event.description && { description: event.description }
|
|
52
|
+
...event.description && { description: event.description },
|
|
53
|
+
...event.label && { label: event.label },
|
|
54
|
+
...event.fields && { fields: event.fields },
|
|
55
|
+
...event.resultUrl && { resultUrl: event.resultUrl }
|
|
53
56
|
}
|
|
54
57
|
];
|
|
55
58
|
if (event.kind === "shell") {
|
|
@@ -61,6 +64,8 @@ function toMessages(event) {
|
|
|
61
64
|
return [{ role: "restart", killed: event.killed }];
|
|
62
65
|
return [];
|
|
63
66
|
}
|
|
67
|
+
|
|
68
|
+
// src/commands/sessions/shared/transcriptMessages.ts
|
|
64
69
|
function echoMessages(pending, until) {
|
|
65
70
|
const due = [];
|
|
66
71
|
while (pending.length && (until === void 0 || pending[0].at < until))
|
|
@@ -75,7 +80,7 @@ function transcriptMessages(reader, lines, echoes = []) {
|
|
|
75
80
|
const pending = [...echoes].sort((a, b) => a.at.localeCompare(b.at));
|
|
76
81
|
const messages = reader.events(entries).flatMap((event) => [
|
|
77
82
|
...event.at ? echoMessages(pending, event.at) : [],
|
|
78
|
-
...
|
|
83
|
+
...eventTranscriptMessages(event)
|
|
79
84
|
]);
|
|
80
85
|
return [...messages, ...echoMessages(pending)];
|
|
81
86
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveReviewPhase
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MSWG2GGI.js";
|
|
4
4
|
import {
|
|
5
5
|
resolvePlan
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KYMDHDXC.js";
|
|
7
7
|
|
|
8
8
|
// src/commands/backlog/resolveRewindPlan.ts
|
|
9
9
|
function resolveRewindPlan(item) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
next
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RHE5G4R7.js";
|
|
4
4
|
import {
|
|
5
5
|
pullIfConfigured
|
|
6
6
|
} from "./chunk-U5LCESHQ.js";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
run,
|
|
11
11
|
stopWatching,
|
|
12
12
|
watchForMarker
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-ICVMDDIK.js";
|
|
14
14
|
import {
|
|
15
15
|
resumeNudge
|
|
16
16
|
} from "./chunk-7NZOH4LN.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
} from "./chunk-NWNODYLQ.js";
|
|
30
30
|
import {
|
|
31
31
|
isBlocked
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-RGMAUOOR.js";
|
|
33
33
|
import {
|
|
34
34
|
loadItemSummaries
|
|
35
35
|
} from "./chunk-LERYBWFS.js";
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "./chunk-N65VOEFI.js";
|
|
48
48
|
import {
|
|
49
49
|
harnessAdapter
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-YPPA5Z3U.js";
|
|
51
51
|
|
|
52
52
|
// src/commands/backlog/launchMode.ts
|
|
53
53
|
import chalk3 from "chalk";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isPausePending,
|
|
10
10
|
recordPhaseSession,
|
|
11
11
|
releaseLock
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RILCJ3PN.js";
|
|
13
13
|
import {
|
|
14
14
|
resumeNudge
|
|
15
15
|
} from "./chunk-7NZOH4LN.js";
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
createBranch,
|
|
31
31
|
generateBranchSlug
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-SGYCDSBF.js";
|
|
33
33
|
import {
|
|
34
34
|
setSessionStatus
|
|
35
35
|
} from "./chunk-7KDF6H4R.js";
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
buildReviewPhase,
|
|
44
44
|
resolveReviewPhase
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MSWG2GGI.js";
|
|
46
46
|
import {
|
|
47
47
|
resolvePlan
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-KYMDHDXC.js";
|
|
49
49
|
import {
|
|
50
50
|
buildPhasePrompt
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QUA3MKDI.js";
|
|
52
52
|
import {
|
|
53
53
|
findOneItem,
|
|
54
54
|
getOrigin,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
import {
|
|
73
73
|
harnessAdapter,
|
|
74
74
|
withoutResumeSession
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-YPPA5Z3U.js";
|
|
76
76
|
import {
|
|
77
77
|
buildFeature
|
|
78
78
|
} from "./chunk-PXQTFJ2N.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-U5LCESHQ.js";
|
|
4
4
|
import {
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ICVMDDIK.js";
|
|
7
7
|
import {
|
|
8
8
|
isLockedByOther
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-RILCJ3PN.js";
|
|
10
10
|
import {
|
|
11
11
|
isBlocked,
|
|
12
12
|
typeLabel
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-RGMAUOOR.js";
|
|
14
14
|
import {
|
|
15
15
|
loadBacklog
|
|
16
16
|
} from "./chunk-EJ47RKEE.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isSchemaPath,
|
|
14
14
|
isSchemaRelativePath,
|
|
15
15
|
mentionsDocsPath
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3OPLEVRF.js";
|
|
17
17
|
import {
|
|
18
18
|
findBuiltinDenyRaw,
|
|
19
19
|
findDeny,
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isApprovedRead,
|
|
24
24
|
resolvePermission,
|
|
25
25
|
splitCompound
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-MT76WK6E.js";
|
|
27
27
|
import {
|
|
28
28
|
isLiveDaemonSession
|
|
29
29
|
} from "./chunk-H63MI5HI.js";
|
|
@@ -923,6 +923,34 @@ function transcriptTailFingerprint(entries) {
|
|
|
923
923
|
return null;
|
|
924
924
|
}
|
|
925
925
|
|
|
926
|
+
// src/shared/harnessAdapters/claudeContentBlocksOf.ts
|
|
927
|
+
function claudeContentBlocksOf(content) {
|
|
928
|
+
return Array.isArray(content) ? content.filter(
|
|
929
|
+
(b) => !!b && typeof b === "object"
|
|
930
|
+
) : [];
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
// src/shared/harnessAdapters/claudeArtifactResultUrls.ts
|
|
934
|
+
var ARTIFACT_RESULT_URL = /^(?:Published|Created|Updated)\b[^\n]*? at (https:\/\/claude\.ai\/(?:code\/)?artifact\/[\w-]+)/;
|
|
935
|
+
function resultText(content) {
|
|
936
|
+
if (typeof content === "string") return content;
|
|
937
|
+
return claudeContentBlocksOf(content).map((block) => typeof block.text === "string" ? block.text : "").join("\n");
|
|
938
|
+
}
|
|
939
|
+
function claudeArtifactResultUrls(entries) {
|
|
940
|
+
const urls = /* @__PURE__ */ new Map();
|
|
941
|
+
for (const entry of entries) {
|
|
942
|
+
if (entry.type !== "user") continue;
|
|
943
|
+
const content = entry.message?.content;
|
|
944
|
+
for (const block of claudeContentBlocksOf(content)) {
|
|
945
|
+
if (block.type !== "tool_result" || block.is_error) continue;
|
|
946
|
+
if (typeof block.tool_use_id !== "string") continue;
|
|
947
|
+
const url = resultText(block.content).trimStart().match(ARTIFACT_RESULT_URL)?.[1];
|
|
948
|
+
if (url) urls.set(block.tool_use_id, url);
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
return urls;
|
|
952
|
+
}
|
|
953
|
+
|
|
926
954
|
// src/commands/sessions/shared/renderPrompt.ts
|
|
927
955
|
function renderPrompt(raw) {
|
|
928
956
|
const command = marker(raw, "command-name");
|
|
@@ -993,16 +1021,29 @@ function cap(message2, maxLength) {
|
|
|
993
1021
|
function toolTarget(input) {
|
|
994
1022
|
if (!input || typeof input !== "object") return "";
|
|
995
1023
|
const i = input;
|
|
996
|
-
const
|
|
997
|
-
const target =
|
|
1024
|
+
const str2 = (v) => typeof v === "string" ? v : "";
|
|
1025
|
+
const target = str2(i.file_path) || str2(i.path) || str2(i.notebook_path) || str2(i.command) || str2(i.pattern) || str2(i.skill) || str2(i.url) || str2(i.query) || str2(i.description) || str2(i.prompt);
|
|
998
1026
|
return target.replace(/\s+/g, " ").trim().slice(0, 120);
|
|
999
1027
|
}
|
|
1000
1028
|
|
|
1001
|
-
// src/shared/harnessAdapters/
|
|
1002
|
-
function
|
|
1003
|
-
return
|
|
1004
|
-
|
|
1005
|
-
|
|
1029
|
+
// src/shared/harnessAdapters/artifactCallLabel.ts
|
|
1030
|
+
function str(v) {
|
|
1031
|
+
return typeof v === "string" ? v.trim() : "";
|
|
1032
|
+
}
|
|
1033
|
+
function artifactAction(input) {
|
|
1034
|
+
if (str(input.type_url)) return "create";
|
|
1035
|
+
return str(input.action) || "publish";
|
|
1036
|
+
}
|
|
1037
|
+
function artifactKeyValue(input) {
|
|
1038
|
+
const filePath = str(input.file_path);
|
|
1039
|
+
return str(input.intent) || filePath && (filePath.split(/[\\/]/).pop() ?? filePath) || str(input.url);
|
|
1040
|
+
}
|
|
1041
|
+
function artifactCallLabel(input) {
|
|
1042
|
+
const title = str(input.title);
|
|
1043
|
+
if (title) return title;
|
|
1044
|
+
const action = artifactAction(input);
|
|
1045
|
+
const value = artifactKeyValue(input);
|
|
1046
|
+
return value ? `${action} \xB7 ${value}` : action;
|
|
1006
1047
|
}
|
|
1007
1048
|
|
|
1008
1049
|
// src/shared/harnessAdapters/editTexts.ts
|
|
@@ -1063,30 +1104,44 @@ function claudeToolOperations({
|
|
|
1063
1104
|
return [];
|
|
1064
1105
|
}
|
|
1065
1106
|
|
|
1107
|
+
// src/shared/harnessAdapters/toolInputFields.ts
|
|
1108
|
+
function toolInputFields(input) {
|
|
1109
|
+
return Object.entries(input).filter(([, value]) => value !== void 0 && value !== null).map(([name, value]) => ({
|
|
1110
|
+
name,
|
|
1111
|
+
value: typeof value === "string" ? value : JSON.stringify(value)
|
|
1112
|
+
}));
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1066
1115
|
// src/shared/harnessAdapters/claudeAssistantEvents.ts
|
|
1067
1116
|
function assistantText(content) {
|
|
1068
1117
|
if (typeof content === "string") return content.trim();
|
|
1069
1118
|
return claudeContentBlocksOf(content).filter((b) => b.type === "text" && typeof b.text === "string").map((b) => String(b.text).trim()).filter(Boolean).join("\n");
|
|
1070
1119
|
}
|
|
1071
|
-
function toolEvent(block, at) {
|
|
1120
|
+
function toolEvent(block, at, resultUrls) {
|
|
1072
1121
|
const tool = typeof block.name === "string" ? block.name : "tool";
|
|
1073
1122
|
const input = block.input && typeof block.input === "object" ? block.input : {};
|
|
1123
|
+
const resultUrl = typeof block.id === "string" ? resultUrls?.get(block.id) : void 0;
|
|
1074
1124
|
const description = typeof input.description === "string" ? input.description.trim() : "";
|
|
1075
1125
|
return {
|
|
1076
1126
|
kind: "tool",
|
|
1077
1127
|
tool,
|
|
1078
1128
|
target: toolTarget(block.input),
|
|
1079
1129
|
...description && { description },
|
|
1130
|
+
...tool === "Artifact" && {
|
|
1131
|
+
label: artifactCallLabel(input),
|
|
1132
|
+
fields: toolInputFields(input),
|
|
1133
|
+
...resultUrl && { resultUrl }
|
|
1134
|
+
},
|
|
1080
1135
|
operations: claudeToolOperations({ toolName: tool, toolInput: input }),
|
|
1081
1136
|
at
|
|
1082
1137
|
};
|
|
1083
1138
|
}
|
|
1084
|
-
function claudeAssistantEvents(content, at) {
|
|
1139
|
+
function claudeAssistantEvents(content, at, resultUrls) {
|
|
1085
1140
|
const text = assistantText(content);
|
|
1086
1141
|
const message2 = text ? [{ kind: "message", role: "assistant", text, at }] : [];
|
|
1087
1142
|
return [
|
|
1088
1143
|
...message2,
|
|
1089
|
-
...claudeContentBlocksOf(content).filter((block) => block.type === "tool_use").map((block) => toolEvent(block, at))
|
|
1144
|
+
...claudeContentBlocksOf(content).filter((block) => block.type === "tool_use").map((block) => toolEvent(block, at, resultUrls))
|
|
1090
1145
|
];
|
|
1091
1146
|
}
|
|
1092
1147
|
|
|
@@ -1121,7 +1176,7 @@ function claudeShellEvents(entry, at) {
|
|
|
1121
1176
|
function contentOf(entry) {
|
|
1122
1177
|
return entry.message?.content;
|
|
1123
1178
|
}
|
|
1124
|
-
function
|
|
1179
|
+
function resultText2(content) {
|
|
1125
1180
|
if (typeof content === "string") return content;
|
|
1126
1181
|
return claudeContentBlocksOf(content).filter((block) => block.type === "text").map((block) => String(block.text ?? "")).join("\n");
|
|
1127
1182
|
}
|
|
@@ -1138,17 +1193,17 @@ function userEvents(entry, at) {
|
|
|
1138
1193
|
}
|
|
1139
1194
|
for (const block of claudeContentBlocksOf(contentOf(entry))) {
|
|
1140
1195
|
if (block.type !== "tool_result" || block.is_error) continue;
|
|
1141
|
-
const body =
|
|
1196
|
+
const body = resultText2(block.content).trim();
|
|
1142
1197
|
if (body) events.push({ kind: "toolResult", text: body, at });
|
|
1143
1198
|
}
|
|
1144
1199
|
return events;
|
|
1145
1200
|
}
|
|
1146
|
-
function claudeEntryEvents(entry) {
|
|
1201
|
+
function claudeEntryEvents(entry, resultUrls) {
|
|
1147
1202
|
if (entry.isSidechain || entry.isMeta) return [];
|
|
1148
1203
|
const at = typeof entry.timestamp === "string" ? entry.timestamp : void 0;
|
|
1149
1204
|
if (entry.type === "user") return userEvents(entry, at);
|
|
1150
1205
|
if (entry.type === "assistant")
|
|
1151
|
-
return claudeAssistantEvents(contentOf(entry), at);
|
|
1206
|
+
return claudeAssistantEvents(contentOf(entry), at, resultUrls);
|
|
1152
1207
|
return [];
|
|
1153
1208
|
}
|
|
1154
1209
|
|
|
@@ -1205,7 +1260,10 @@ var claudeConversationReader = {
|
|
|
1205
1260
|
headBytes: 65536,
|
|
1206
1261
|
locate: ({ cwd, claudeSessionId }) => cwd && claudeSessionId ? findTranscriptPathSync(cwd, claudeSessionId) : null,
|
|
1207
1262
|
watchTarget: ({ cwd, claudeSessionId }) => cwd && claudeSessionId ? { dir: projectDirForCwd(cwd), file: `${claudeSessionId}.jsonl` } : null,
|
|
1208
|
-
events: (entries) =>
|
|
1263
|
+
events: (entries) => {
|
|
1264
|
+
const resultUrls = claudeArtifactResultUrls(entries);
|
|
1265
|
+
return entries.flatMap((entry) => claudeEntryEvents(entry, resultUrls));
|
|
1266
|
+
},
|
|
1209
1267
|
lifecycle: (entries, options) => ({
|
|
1210
1268
|
status: deriveTranscriptStatus(entries, options),
|
|
1211
1269
|
asking: awaitsQuestionAnswer(entries)
|
|
@@ -1367,7 +1425,7 @@ function claudeConnectorResult(result, failure, usage) {
|
|
|
1367
1425
|
function claudeContentBlocks(content) {
|
|
1368
1426
|
return Array.isArray(content) ? content : [];
|
|
1369
1427
|
}
|
|
1370
|
-
function
|
|
1428
|
+
function resultText3(content) {
|
|
1371
1429
|
if (typeof content === "string") return content;
|
|
1372
1430
|
return claudeContentBlocks(content).map((block) => typeof block.text === "string" ? block.text : "").join("");
|
|
1373
1431
|
}
|
|
@@ -1375,7 +1433,7 @@ function claudeToolResults(content) {
|
|
|
1375
1433
|
return claudeContentBlocks(content).filter((block) => block.type === "tool_result").map((block) => ({
|
|
1376
1434
|
type: "toolResult",
|
|
1377
1435
|
callId: String(block.tool_use_id),
|
|
1378
|
-
text:
|
|
1436
|
+
text: resultText3(block.content)
|
|
1379
1437
|
}));
|
|
1380
1438
|
}
|
|
1381
1439
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decideToolOperations,
|
|
3
3
|
logPolicyDeny
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-V2UWYFAM.js";
|
|
5
5
|
import "./chunk-CDU6M5IX.js";
|
|
6
6
|
import "./chunk-HKGCLAZ7.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-3OPLEVRF.js";
|
|
8
8
|
import "./chunk-CUOHHT2F.js";
|
|
9
9
|
import {
|
|
10
10
|
currentExecutionIdentity
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-MTN37C4V.js";
|
|
12
|
+
import "./chunk-MT76WK6E.js";
|
|
13
13
|
import "./chunk-VDXS55BC.js";
|
|
14
14
|
import "./chunk-ZMH7UZNP.js";
|
|
15
15
|
import "./chunk-FPWL4VRC.js";
|
|
@@ -27,7 +27,7 @@ import "./chunk-JG2I5RTS.js";
|
|
|
27
27
|
import "./chunk-OUSMW4D6.js";
|
|
28
28
|
import {
|
|
29
29
|
claudeAdapter
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-YPPA5Z3U.js";
|
|
31
31
|
import "./chunk-MRUIXQXS.js";
|
|
32
32
|
import "./chunk-HO7RNI6V.js";
|
|
33
33
|
import "./chunk-DIAC4XYA.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
findTruncatedReadDenyRaw,
|
|
6
6
|
isApprovedRead,
|
|
7
7
|
splitCompound
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MT76WK6E.js";
|
|
9
9
|
import "./chunk-VDXS55BC.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-YPPA5Z3U.js";
|
|
11
11
|
import "./chunk-MRUIXQXS.js";
|
|
12
12
|
import "./chunk-HO7RNI6V.js";
|
|
13
13
|
import "./chunk-DIAC4XYA.js";
|