@staff0rd/assist 0.1213.0 → 0.1213.2
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 +81 -81
- package/dist/{addActivity-JOGJJZE7.js → addActivity-3EIPBUTW.js} +2 -2
- package/dist/{addPhase-RCLTCRDF.js → addPhase-2L44BROM.js} +3 -3
- package/dist/{advise-AG7OMJ3R.js → advise-DQ3PRCPY.js} +3 -3
- package/dist/{askCheck-T3I6Q2EP.js → askCheck-IZBAQIYI.js} +7 -7
- package/dist/{askDesign-KZ4WYWZU.js → askDesign-ACKAWPGF.js} +1 -1
- package/dist/{branch-W5BHBLBB.js → branch-NUGTOJEQ.js} +3 -3
- package/dist/built-version +1 -1
- package/dist/{chunk-335IJSZA.js → chunk-25ORJ4V5.js} +1 -1
- package/dist/{chunk-CUGSML2B.js → chunk-4WJMXSPD.js} +1 -1
- package/dist/{chunk-PIONZPIS.js → chunk-654EZCLQ.js} +1 -1
- package/dist/{chunk-TEPDPWTW.js → chunk-APD2IEY6.js} +1 -1
- package/dist/{chunk-T54TTGXU.js → chunk-BWFIWG5Z.js} +1 -1
- package/dist/{chunk-KJ3OKLBQ.js → chunk-CDI7X4YQ.js} +1 -1
- package/dist/{chunk-LH6L7JLA.js → chunk-DCLGXELS.js} +1 -1
- package/dist/{chunk-2LE4KXEV.js → chunk-DVHJAS57.js} +1 -1
- package/dist/{chunk-UNIRIQVI.js → chunk-EJHSPFJI.js} +1 -1
- package/dist/{chunk-OPGROK7P.js → chunk-EREBM27C.js} +1 -1
- package/dist/{chunk-F434P5UD.js → chunk-EZTEBMK5.js} +2 -2
- package/dist/{chunk-MMEOHVBU.js → chunk-FMP3VC43.js} +213 -1
- package/dist/{chunk-DVKW6CP4.js → chunk-HHQRS2AU.js} +2 -2
- package/dist/{chunk-SVTEKYM2.js → chunk-K5XI4RE3.js} +1 -1
- package/dist/{chunk-S56CW6LZ.js → chunk-KBS7CW76.js} +1 -1
- package/dist/{chunk-DN3DZ6H7.js → chunk-LGY5OE5H.js} +1 -1
- package/dist/{chunk-MV64NHCW.js → chunk-LUHIGYK4.js} +2 -2
- package/dist/{chunk-BL7W6YRK.js → chunk-M5YRR6AZ.js} +5 -5
- package/dist/{chunk-ZHUQP5EF.js → chunk-MKITEB2N.js} +1 -1
- package/dist/{chunk-FYFQQ565.js → chunk-NBFZZQMA.js} +3 -3
- package/dist/{chunk-UNRY64ES.js → chunk-NIJVRUOL.js} +1 -1
- package/dist/{chunk-FTNVJRGH.js → chunk-PBDOARKC.js} +3 -3
- package/dist/{chunk-GRDBSI7H.js → chunk-PBFA5KUQ.js} +1 -1
- package/dist/{chunk-2I3MMPKJ.js → chunk-Q543SWGW.js} +1 -1
- package/dist/{chunk-AREFKCN5.js → chunk-QHWGT3MB.js} +1 -1
- package/dist/{chunk-SVLIH3AL.js → chunk-RI3JT2F6.js} +1 -1
- package/dist/{chunk-WP4VQMD6.js → chunk-SIXXVTQR.js} +2 -2
- package/dist/{chunk-VDOZCOQS.js → chunk-SVUSRDLY.js} +2 -2
- package/dist/{chunk-RGITC6GP.js → chunk-SXPRDIR4.js} +1 -1
- package/dist/{chunk-L4DE4ZRV.js → chunk-TCPFVNSF.js} +1 -1
- package/dist/{chunk-Z3WDRMDL.js → chunk-V3EB3YOL.js} +1 -1
- package/dist/{chunk-PPJGEDUO.js → chunk-V6IHPBP3.js} +2 -2
- package/dist/{chunk-DM7ZP7OH.js → chunk-VRS4UKBC.js} +1 -1
- package/dist/{chunk-IIJ4AI4C.js → chunk-WQN4KHMR.js} +6 -6
- package/dist/{chunk-ZC6RX66V.js → chunk-X76ZC7OC.js} +1 -1
- package/dist/{chunk-HA2J6TGK.js → chunk-Y6P5C6PQ.js} +7 -7
- package/dist/{chunk-XG3C3JSK.js → chunk-ZNXCAHNG.js} +1 -1
- package/dist/{chunk-S65PQ4QX.js → chunk-ZQV2VYHK.js} +1 -1
- package/dist/{cliHook-ZDPXVT7I.js → cliHook-2P55B6BT.js} +6 -6
- package/dist/{cliHookCheck-DZSIPFBE.js → cliHookCheck-TRTDCTAO.js} +2 -2
- package/dist/{codexHook-HM33YTU3.js → codexHook-QQZD6DUH.js} +8 -8
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/{commit-AG5NQTPY.js → commit-2O3IJ5JJ.js} +4 -4
- package/dist/{doctorNodes-LSSTJG3K.js → doctorNodes-XFMNXZKW.js} +3 -3
- package/dist/{done-4AYDCPAI.js → done-MC3YZLNW.js} +4 -4
- package/dist/{editHook-B3YTUZFV.js → editHook-O6RD55H6.js} +6 -6
- package/dist/{fixConflict-QFWLEXN3.js → fixConflict-EID7CDKW.js} +4 -4
- package/dist/index.js +50 -50
- package/dist/{launchMode-NRSERDKC.js → launchMode-SF4N7CFD.js} +14 -14
- package/dist/{list-IC4D5TKK.js → list-LJMNT7KR.js} +5 -5
- package/dist/{migrate-EXFKHV3N.js → migrate-6TR6DPWF.js} +3 -3
- package/dist/{next-J2BFGFPI.js → next-MNLKDCPQ.js} +13 -13
- package/dist/{phaseDone-GPMNF6RZ.js → phaseDone-BJQJZDQL.js} +5 -5
- package/dist/{piHook-R2KLLME5.js → piHook-MHCOKIAX.js} +6 -6
- package/dist/{propose-SOEEJUW3.js → propose-PQN44LHS.js} +4 -4
- package/dist/{refine-EC2USXGN.js → refine-5PWK3FNY.js} +15 -15
- package/dist/{restartNode-SX2VKO5N.js → restartNode-64X6V6OO.js} +5 -5
- package/dist/{review-STB4WEZS.js → review-PRU4WYMP.js} +4 -4
- package/dist/{reviewPrComments-I72GJXNK.js → reviewPrComments-W6NDAEGY.js} +4 -4
- package/dist/{rewindPhase-RKATMLUZ.js → rewindPhase-H7HMW6CP.js} +8 -8
- package/dist/{run-SZ6GHWER.js → run-DBU5B74Q.js} +11 -11
- package/dist/{run-ITDRO7K5.js → run-EZGJ23EC.js} +11 -11
- package/dist/{runDaemon-7XB44V6Z.js → runDaemon-J63CEC4C.js} +142 -73
- package/dist/{runParallelPhase-YLJPYQOM.js → runParallelPhase-L6OAKOGW.js} +7 -7
- package/dist/{runRefine-E3ZLJYXJ.js → runRefine-VO7H5WOU.js} +15 -15
- package/dist/{scan-FBVX2CX4.js → scan-GD5Y6DO3.js} +2 -2
- package/dist/{schemaConfirm-EHLOP77W.js → schemaConfirm-QZHHVKYN.js} +2 -2
- package/dist/{schemaLock-WUY4PMBZ.js → schemaLock-B4N5VBN6.js} +2 -2
- package/dist/{schemaUnlock-USXQOFZV.js → schemaUnlock-6ONJWLFG.js} +2 -2
- package/dist/{search-NZAWFOLS.js → search-5ZOW6C6F.js} +5 -5
- package/dist/{show-6YMUENZE.js → show-BMUONGWF.js} +3 -3
- package/dist/{show-M5TH7EGS.js → show-CTLQ5FE7.js} +3 -3
- package/dist/{signExtension-CY6DCEKH.js → signExtension-MGE6QOGB.js} +1 -1
- package/dist/{updateNode-ICEZQLF4.js → updateNode-RXSKARHZ.js} +5 -5
- package/dist/{updatePlan-YGS3KWES.js → updatePlan-KYPLY23N.js} +4 -4
- package/dist/{web-L4UMWMWQ.js → web-3TMSJGCF.js} +16 -16
- package/dist/{web-SMMQBDM4.js → web-H6EVJR67.js} +16 -16
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
formatScanUsage,
|
|
23
23
|
inboxScanBlocker,
|
|
24
24
|
runInboxScan
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-654EZCLQ.js";
|
|
26
26
|
import {
|
|
27
27
|
allocateTree,
|
|
28
28
|
installFailureMessage,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
seedWorktree,
|
|
32
32
|
stopInstall,
|
|
33
33
|
worktreeWithBranch
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DCLGXELS.js";
|
|
35
35
|
import {
|
|
36
36
|
describePersistedSession,
|
|
37
37
|
loadPersistedSessions,
|
|
@@ -59,11 +59,11 @@ import {
|
|
|
59
59
|
import {
|
|
60
60
|
OneShotUnavailableError,
|
|
61
61
|
runOneShotPrompt
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-DVHJAS57.js";
|
|
63
63
|
import {
|
|
64
64
|
backlogPhaseActivity,
|
|
65
65
|
recordPhaseSession
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-KBS7CW76.js";
|
|
67
67
|
import {
|
|
68
68
|
buildResumePrompt,
|
|
69
69
|
wrapRestartNudge
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
locateConversation,
|
|
83
83
|
readTranscriptHead,
|
|
84
84
|
transcriptMessages
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-25ORJ4V5.js";
|
|
86
86
|
import {
|
|
87
87
|
CHECK_NOTE_KEY,
|
|
88
88
|
CHECK_RESULT_KEY
|
|
@@ -118,7 +118,7 @@ import {
|
|
|
118
118
|
toNodeSessionId,
|
|
119
119
|
usageWindowKey,
|
|
120
120
|
watcherLogPath
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-LGY5OE5H.js";
|
|
122
122
|
import {
|
|
123
123
|
newTraceId
|
|
124
124
|
} from "./chunk-4HKB2TAG.js";
|
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
isHello,
|
|
131
131
|
linkVersionCheck,
|
|
132
132
|
negotiateProtocol
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-Q543SWGW.js";
|
|
134
134
|
import {
|
|
135
135
|
loadLinkSpecs
|
|
136
136
|
} from "./chunk-JWMBBFAS.js";
|
|
@@ -145,7 +145,7 @@ import "./chunk-XV2STPP6.js";
|
|
|
145
145
|
import {
|
|
146
146
|
conversationOf,
|
|
147
147
|
lookupConversation
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-APD2IEY6.js";
|
|
149
149
|
import {
|
|
150
150
|
stripAnsi
|
|
151
151
|
} from "./chunk-YJ72SXVD.js";
|
|
@@ -187,9 +187,9 @@ import {
|
|
|
187
187
|
} from "./chunk-UFMLNNPI.js";
|
|
188
188
|
import {
|
|
189
189
|
resolvePlan
|
|
190
|
-
} from "./chunk-
|
|
191
|
-
import "./chunk-
|
|
192
|
-
import "./chunk-
|
|
190
|
+
} from "./chunk-SXPRDIR4.js";
|
|
191
|
+
import "./chunk-TCPFVNSF.js";
|
|
192
|
+
import "./chunk-CDI7X4YQ.js";
|
|
193
193
|
import "./chunk-6Z7XJJNZ.js";
|
|
194
194
|
import {
|
|
195
195
|
loadItem
|
|
@@ -216,7 +216,7 @@ import {
|
|
|
216
216
|
runConfigBaseDirFrom
|
|
217
217
|
} from "./chunk-7GSALENY.js";
|
|
218
218
|
import "./chunk-NZYSENRR.js";
|
|
219
|
-
import "./chunk-
|
|
219
|
+
import "./chunk-QHWGT3MB.js";
|
|
220
220
|
import "./chunk-QBDPUOLA.js";
|
|
221
221
|
import {
|
|
222
222
|
deriveHistoryFields,
|
|
@@ -244,7 +244,7 @@ import {
|
|
|
244
244
|
viewerSize,
|
|
245
245
|
withHarnessPath,
|
|
246
246
|
workflowQueryEnv
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-FMP3VC43.js";
|
|
248
248
|
import {
|
|
249
249
|
daemonLog,
|
|
250
250
|
recentDaemonLogLines,
|
|
@@ -271,7 +271,7 @@ import {
|
|
|
271
271
|
import "./chunk-APZ6ZTDA.js";
|
|
272
272
|
import "./chunk-K4DJEFDZ.js";
|
|
273
273
|
import "./chunk-D7UZLH36.js";
|
|
274
|
-
import "./chunk-
|
|
274
|
+
import "./chunk-BWFIWG5Z.js";
|
|
275
275
|
import "./chunk-EW2ZM2PC.js";
|
|
276
276
|
import "./chunk-MYH4MQX2.js";
|
|
277
277
|
import {
|
|
@@ -374,17 +374,17 @@ async function failInterruptedJobRuns(startedBefore = /* @__PURE__ */ new Date()
|
|
|
374
374
|
// src/commands/sessions/daemon/inbox/createActivityThrottle.ts
|
|
375
375
|
var ACTIVITY_THROTTLE_MS = 1e3;
|
|
376
376
|
function createActivityThrottle(onActivity) {
|
|
377
|
-
let
|
|
377
|
+
let pending2;
|
|
378
378
|
return {
|
|
379
379
|
schedule() {
|
|
380
|
-
|
|
381
|
-
|
|
380
|
+
pending2 ??= setTimeout(() => {
|
|
381
|
+
pending2 = void 0;
|
|
382
382
|
onActivity();
|
|
383
383
|
}, ACTIVITY_THROTTLE_MS);
|
|
384
384
|
},
|
|
385
385
|
cancel() {
|
|
386
|
-
clearTimeout(
|
|
387
|
-
|
|
386
|
+
clearTimeout(pending2);
|
|
387
|
+
pending2 = void 0;
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
390
|
}
|
|
@@ -1680,6 +1680,13 @@ function applyActivityToSession(session, activity) {
|
|
|
1680
1680
|
session.claudeSessionId = activity.claudeSessionId;
|
|
1681
1681
|
}
|
|
1682
1682
|
|
|
1683
|
+
// src/commands/sessions/daemon/forgetTranscriptPath.ts
|
|
1684
|
+
function forgetTranscriptPath(session) {
|
|
1685
|
+
session.transcriptPath = void 0;
|
|
1686
|
+
session.transcriptPathKey = void 0;
|
|
1687
|
+
session.transcriptFingerprint = void 0;
|
|
1688
|
+
}
|
|
1689
|
+
|
|
1683
1690
|
// src/commands/sessions/daemon/claimedByOthers.ts
|
|
1684
1691
|
var boundBy = /* @__PURE__ */ new Map();
|
|
1685
1692
|
function claimedByOthers(session) {
|
|
@@ -1692,6 +1699,8 @@ function claimedByOthers(session) {
|
|
|
1692
1699
|
return claimed;
|
|
1693
1700
|
}
|
|
1694
1701
|
function claimConversation(session, conversationId) {
|
|
1702
|
+
if (session.harnessSessionId !== conversationId)
|
|
1703
|
+
forgetTranscriptPath(session);
|
|
1695
1704
|
session.harnessSessionId = conversationId;
|
|
1696
1705
|
boundBy.set(conversationId, session);
|
|
1697
1706
|
}
|
|
@@ -1810,6 +1819,7 @@ function applyLateBoundLaunch(session, activity, notify, onBound) {
|
|
|
1810
1819
|
if (activity.harnessSessionId) {
|
|
1811
1820
|
if (session.harnessSessionId === activity.harnessSessionId) return;
|
|
1812
1821
|
session.harnessSessionId = activity.harnessSessionId;
|
|
1822
|
+
forgetTranscriptPath(session);
|
|
1813
1823
|
daemonLog(
|
|
1814
1824
|
`session ${session.id} resumed ${label} conversation ${activity.harnessSessionId}`
|
|
1815
1825
|
);
|
|
@@ -1822,6 +1832,7 @@ function applyLateBoundLaunch(session, activity, notify, onBound) {
|
|
|
1822
1832
|
`session ${session.id} started a fresh ${label} conversation; unbinding ${session.harnessSessionId}`
|
|
1823
1833
|
);
|
|
1824
1834
|
session.harnessSessionId = void 0;
|
|
1835
|
+
forgetTranscriptPath(session);
|
|
1825
1836
|
onBound?.(session);
|
|
1826
1837
|
bindConversation(session, notify, activity.startedAt, onBound);
|
|
1827
1838
|
}
|
|
@@ -2039,6 +2050,46 @@ function ensureProjectDirExists(dir, sessionId) {
|
|
|
2039
2050
|
}
|
|
2040
2051
|
}
|
|
2041
2052
|
|
|
2053
|
+
// src/commands/sessions/daemon/retryTranscriptWatch.ts
|
|
2054
|
+
var RETRY_MS = 1e3;
|
|
2055
|
+
var MAX_ATTEMPTS2 = 120;
|
|
2056
|
+
var pending = /* @__PURE__ */ new WeakMap();
|
|
2057
|
+
function retryTranscriptWatch(session, conversationKey, retry) {
|
|
2058
|
+
const previous = pending.get(session);
|
|
2059
|
+
if (previous) clearTimeout(previous.timer);
|
|
2060
|
+
const attempts = previous?.key === conversationKey ? previous.attempts + 1 : 1;
|
|
2061
|
+
if (attempts > MAX_ATTEMPTS2) {
|
|
2062
|
+
pending.delete(session);
|
|
2063
|
+
daemonLog(
|
|
2064
|
+
`session ${session.id} transcript for ${conversationKey} never appeared; not watching`
|
|
2065
|
+
);
|
|
2066
|
+
return;
|
|
2067
|
+
}
|
|
2068
|
+
if (attempts === 1)
|
|
2069
|
+
daemonLog(
|
|
2070
|
+
`session ${session.id} transcript for ${conversationKey} not found yet; retrying`
|
|
2071
|
+
);
|
|
2072
|
+
const timer = setTimeout(retry, RETRY_MS);
|
|
2073
|
+
timer.unref?.();
|
|
2074
|
+
pending.set(session, { key: conversationKey, attempts, timer });
|
|
2075
|
+
}
|
|
2076
|
+
function cancelTranscriptWatchRetry(session) {
|
|
2077
|
+
const previous = pending.get(session);
|
|
2078
|
+
if (previous) clearTimeout(previous.timer);
|
|
2079
|
+
pending.delete(session);
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
// src/commands/sessions/daemon/locateWatchTarget.ts
|
|
2083
|
+
function locateWatchTarget(session, conversation, retry) {
|
|
2084
|
+
const target = conversation.reader.watchTarget(conversation.ref);
|
|
2085
|
+
if (!target) {
|
|
2086
|
+
retryTranscriptWatch(session, conversation.key, retry);
|
|
2087
|
+
return null;
|
|
2088
|
+
}
|
|
2089
|
+
cancelTranscriptWatchRetry(session);
|
|
2090
|
+
return ensureProjectDirExists(target.dir, session.id) ? target : null;
|
|
2091
|
+
}
|
|
2092
|
+
|
|
2042
2093
|
// src/commands/sessions/shared/unseenPendingTexts.ts
|
|
2043
2094
|
function latestUserRows(rows) {
|
|
2044
2095
|
const texts = [];
|
|
@@ -2054,11 +2105,11 @@ function latestUserRows(rows) {
|
|
|
2054
2105
|
}
|
|
2055
2106
|
var normalize = (text) => text.replace(/\s+/g, " ").trim();
|
|
2056
2107
|
var ownText = (text) => splitShellBlocks(text)?.text ?? text;
|
|
2057
|
-
function unseenPendingTexts(
|
|
2058
|
-
if (!
|
|
2108
|
+
function unseenPendingTexts(pending2, rows) {
|
|
2109
|
+
if (!pending2?.length) return [];
|
|
2059
2110
|
const latest2 = latestUserRows(rows);
|
|
2060
2111
|
const seen = latest2.texts.map(normalize);
|
|
2061
|
-
return
|
|
2112
|
+
return pending2.filter(
|
|
2062
2113
|
(text) => parseRestartNudge(text) === null ? !seen.some((t) => t.includes(normalize(ownText(text)))) : !latest2.restart
|
|
2063
2114
|
);
|
|
2064
2115
|
}
|
|
@@ -2157,15 +2208,28 @@ function applyTranscriptChange(session, reader, entries, fingerprint, notify) {
|
|
|
2157
2208
|
if (changed) notify?.();
|
|
2158
2209
|
}
|
|
2159
2210
|
|
|
2211
|
+
// src/commands/sessions/daemon/cachedTranscriptPath.ts
|
|
2212
|
+
function cachedTranscriptPath(session, conversationKey) {
|
|
2213
|
+
if (conversationKey && session.transcriptPathKey === conversationKey)
|
|
2214
|
+
return session.transcriptPath;
|
|
2215
|
+
if (session.transcriptPath || session.transcriptPathKey)
|
|
2216
|
+
forgetTranscriptPath(session);
|
|
2217
|
+
return void 0;
|
|
2218
|
+
}
|
|
2219
|
+
|
|
2160
2220
|
// src/commands/sessions/daemon/resolveTranscriptPath.ts
|
|
2161
2221
|
async function resolveTranscriptPath(session) {
|
|
2162
|
-
if (session.transcriptPath) return session.transcriptPath;
|
|
2163
2222
|
const conversation = conversationOf(session);
|
|
2223
|
+
const cached = cachedTranscriptPath(session, conversation?.key);
|
|
2224
|
+
if (cached) return cached;
|
|
2164
2225
|
if (!conversation) return null;
|
|
2165
2226
|
const filePath = conversation.reader.locate(conversation.ref) ?? await harnessAdapter(session.harness).conversation.locate(
|
|
2166
2227
|
conversation.id
|
|
2167
2228
|
);
|
|
2168
|
-
if (filePath)
|
|
2229
|
+
if (filePath) {
|
|
2230
|
+
session.transcriptPath = filePath;
|
|
2231
|
+
session.transcriptPathKey = conversation.key;
|
|
2232
|
+
}
|
|
2169
2233
|
return filePath;
|
|
2170
2234
|
}
|
|
2171
2235
|
|
|
@@ -2378,7 +2442,7 @@ function startTranscriptTitleGeneration(session, notify) {
|
|
|
2378
2442
|
if (!source) return;
|
|
2379
2443
|
const conversation = conversationOf(session);
|
|
2380
2444
|
if (!conversation) return;
|
|
2381
|
-
const filePath = session.
|
|
2445
|
+
const filePath = cachedTranscriptPath(session, conversation.key) ?? conversation.reader.locate(conversation.ref);
|
|
2382
2446
|
if (!filePath) return;
|
|
2383
2447
|
const events = readConversationHead(conversation.reader, filePath);
|
|
2384
2448
|
if (!events) return;
|
|
@@ -2403,8 +2467,7 @@ function unwatchTranscript(session) {
|
|
|
2403
2467
|
session.transcriptWatcher?.close();
|
|
2404
2468
|
session.transcriptWatcher = void 0;
|
|
2405
2469
|
session.watchedTranscriptId = void 0;
|
|
2406
|
-
session
|
|
2407
|
-
session.transcriptFingerprint = void 0;
|
|
2470
|
+
forgetTranscriptPath(session);
|
|
2408
2471
|
}
|
|
2409
2472
|
|
|
2410
2473
|
// src/commands/sessions/daemon/watchedConversation.ts
|
|
@@ -2417,8 +2480,10 @@ function watchedConversation(session) {
|
|
|
2417
2480
|
reportedUnreadable.add(session);
|
|
2418
2481
|
return void 0;
|
|
2419
2482
|
}
|
|
2420
|
-
if (!lookup.conversation
|
|
2421
|
-
unwatchTranscript(session);
|
|
2483
|
+
if (!lookup.conversation) {
|
|
2484
|
+
if (session.watchedTranscriptId) unwatchTranscript(session);
|
|
2485
|
+
else forgetTranscriptPath(session);
|
|
2486
|
+
}
|
|
2422
2487
|
return lookup.conversation;
|
|
2423
2488
|
}
|
|
2424
2489
|
|
|
@@ -2428,8 +2493,12 @@ function watchTranscript(session, notify, onStatusChange) {
|
|
|
2428
2493
|
if (!session.cwd) return;
|
|
2429
2494
|
const conversation = watchedConversation(session);
|
|
2430
2495
|
if (!conversation || session.watchedTranscriptId === conversation.key) return;
|
|
2431
|
-
const target =
|
|
2432
|
-
|
|
2496
|
+
const target = locateWatchTarget(
|
|
2497
|
+
session,
|
|
2498
|
+
conversation,
|
|
2499
|
+
() => watchTranscript(session, notify, onStatusChange)
|
|
2500
|
+
);
|
|
2501
|
+
if (!target) return;
|
|
2433
2502
|
unwatchTranscript(session);
|
|
2434
2503
|
let timer = null;
|
|
2435
2504
|
const run2 = () => {
|
|
@@ -2914,10 +2983,10 @@ function clearPendingSubmit(session) {
|
|
|
2914
2983
|
function watchSubmitOutcome(session, onStatusChange) {
|
|
2915
2984
|
clearPendingSubmit(session);
|
|
2916
2985
|
const fingerprint = session.transcriptFingerprint;
|
|
2917
|
-
const
|
|
2986
|
+
const pending2 = { fingerprint, cancel: () => {
|
|
2918
2987
|
} };
|
|
2919
2988
|
const check = async () => {
|
|
2920
|
-
if (session.pendingSubmit !==
|
|
2989
|
+
if (session.pendingSubmit !== pending2) return;
|
|
2921
2990
|
session.pendingSubmit = void 0;
|
|
2922
2991
|
if (session.status !== "running") return;
|
|
2923
2992
|
if (await turnStarted(session, fingerprint)) return;
|
|
@@ -2929,8 +2998,8 @@ function watchSubmitOutcome(session, onStatusChange) {
|
|
|
2929
2998
|
};
|
|
2930
2999
|
const timer = setTimeout(() => void check(), SUBMIT_GRACE_MS);
|
|
2931
3000
|
timer.unref?.();
|
|
2932
|
-
|
|
2933
|
-
session.pendingSubmit =
|
|
3001
|
+
pending2.cancel = () => clearTimeout(timer);
|
|
3002
|
+
session.pendingSubmit = pending2;
|
|
2934
3003
|
}
|
|
2935
3004
|
|
|
2936
3005
|
// src/commands/sessions/daemon/watchPromptSubmit.ts
|
|
@@ -3807,10 +3876,10 @@ function escalateDivergence(ctx, cwd, output) {
|
|
|
3807
3876
|
|
|
3808
3877
|
// src/commands/sessions/daemon/autoUpdate/lineRecorder.ts
|
|
3809
3878
|
function lineRecorder(onLine) {
|
|
3810
|
-
let
|
|
3879
|
+
let pending2 = "";
|
|
3811
3880
|
return (text) => {
|
|
3812
|
-
const lines = (
|
|
3813
|
-
|
|
3881
|
+
const lines = (pending2 + text).split(/\r?\n|\r/);
|
|
3882
|
+
pending2 = lines.pop() ?? "";
|
|
3814
3883
|
for (const line of lines) {
|
|
3815
3884
|
const clean = stripAnsi(line).trimEnd();
|
|
3816
3885
|
if (clean.trim()) onLine(clean);
|
|
@@ -4328,10 +4397,10 @@ function killPtyTree(pty) {
|
|
|
4328
4397
|
|
|
4329
4398
|
// src/commands/sessions/daemon/reportUndeliveredPrompts.ts
|
|
4330
4399
|
function reportUndeliveredPrompts(session, why) {
|
|
4331
|
-
const
|
|
4332
|
-
if (!
|
|
4400
|
+
const pending2 = session.pendingPrompts;
|
|
4401
|
+
if (!pending2?.length) return;
|
|
4333
4402
|
session.pendingPrompts = void 0;
|
|
4334
|
-
for (const text of
|
|
4403
|
+
for (const text of pending2) {
|
|
4335
4404
|
daemonLog(
|
|
4336
4405
|
`session ${session.id} ${why}; queued prompt undelivered: ${JSON.stringify(text)}`
|
|
4337
4406
|
);
|
|
@@ -5141,18 +5210,18 @@ function previewTargetLabel(kind, itemType, prNumber, draft) {
|
|
|
5141
5210
|
|
|
5142
5211
|
// src/commands/sessions/daemon/placeShowPreview.ts
|
|
5143
5212
|
function placeShowPreview(session, show) {
|
|
5144
|
-
const
|
|
5145
|
-
if (!
|
|
5213
|
+
const pending2 = session.pendingPrPreview;
|
|
5214
|
+
if (!pending2 || pending2.kind === "show") {
|
|
5146
5215
|
session.pendingPrPreview = show;
|
|
5147
5216
|
session.pendingShow = void 0;
|
|
5148
5217
|
return false;
|
|
5149
5218
|
}
|
|
5150
5219
|
session.pendingShow = show;
|
|
5151
5220
|
const target = previewTargetLabel(
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5221
|
+
pending2.kind ?? "pr",
|
|
5222
|
+
pending2.itemType ?? "story",
|
|
5223
|
+
pending2.prNumber,
|
|
5224
|
+
pending2.draft === true
|
|
5156
5225
|
);
|
|
5157
5226
|
daemonLog(
|
|
5158
5227
|
`pr-preview show stacked: id=${session.id} requestId=${show.requestId} over=${target}`
|
|
@@ -5168,15 +5237,15 @@ function highLevelReviewHead(preview) {
|
|
|
5168
5237
|
|
|
5169
5238
|
// src/commands/sessions/daemon/supersedePendingPreview.ts
|
|
5170
5239
|
function supersedePendingPreview(session, waiters, newRequestId) {
|
|
5171
|
-
const
|
|
5240
|
+
const pending2 = session.pendingPrPreview;
|
|
5172
5241
|
const waiter = waiters.get(session.id);
|
|
5173
|
-
if (!
|
|
5242
|
+
if (!pending2 || pending2.kind === "show" || !waiter) return void 0;
|
|
5174
5243
|
const notifyWaiter = () => sendTo(waiter, {
|
|
5175
5244
|
type: "pr-superseded",
|
|
5176
|
-
requestId:
|
|
5245
|
+
requestId: pending2.requestId,
|
|
5177
5246
|
supersededBy: newRequestId
|
|
5178
5247
|
});
|
|
5179
|
-
const label = `pr-preview superseded: id=${session.id} old=${
|
|
5248
|
+
const label = `pr-preview superseded: id=${session.id} old=${pending2.requestId} new=${newRequestId}`;
|
|
5180
5249
|
const taskId = session.pendingPreviewTaskId;
|
|
5181
5250
|
const stopTask = session.pty?.sdk?.stopTask;
|
|
5182
5251
|
if (taskId && stopTask) {
|
|
@@ -5189,11 +5258,11 @@ function supersedePendingPreview(session, waiters, newRequestId) {
|
|
|
5189
5258
|
notifyWaiter();
|
|
5190
5259
|
}
|
|
5191
5260
|
);
|
|
5192
|
-
return
|
|
5261
|
+
return pending2.requestId;
|
|
5193
5262
|
}
|
|
5194
5263
|
notifyWaiter();
|
|
5195
5264
|
daemonLog(label);
|
|
5196
|
-
return
|
|
5265
|
+
return pending2.requestId;
|
|
5197
5266
|
}
|
|
5198
5267
|
|
|
5199
5268
|
// src/commands/sessions/daemon/holdBlockingPreview.ts
|
|
@@ -5443,20 +5512,20 @@ function applyUsageRecord(sessions, windows, notify, claudeSessionId, transcript
|
|
|
5443
5512
|
|
|
5444
5513
|
// src/commands/sessions/daemon/flushDeferredResults.ts
|
|
5445
5514
|
function flushDeferredResults(session, host) {
|
|
5446
|
-
const
|
|
5447
|
-
if (!
|
|
5515
|
+
const pending2 = session.pendingDeferredResults;
|
|
5516
|
+
if (!pending2?.length) return;
|
|
5448
5517
|
if (session.status === "done" || session.status === "error") {
|
|
5449
5518
|
session.pendingDeferredResults = void 0;
|
|
5450
5519
|
daemonLog(
|
|
5451
|
-
`session ${session.id} ended (${session.status}); ${
|
|
5520
|
+
`session ${session.id} ended (${session.status}); ${pending2.length} deferred result(s) dropped`
|
|
5452
5521
|
);
|
|
5453
5522
|
return;
|
|
5454
5523
|
}
|
|
5455
5524
|
if (session.status !== "waiting" || !session.pty) return;
|
|
5456
5525
|
session.pendingDeferredResults = void 0;
|
|
5457
|
-
host.io.typePrompt(session.id,
|
|
5526
|
+
host.io.typePrompt(session.id, pending2.join("\n\n"));
|
|
5458
5527
|
daemonLog(
|
|
5459
|
-
`session ${session.id} typed ${
|
|
5528
|
+
`session ${session.id} typed ${pending2.length} queued deferred result(s)`
|
|
5460
5529
|
);
|
|
5461
5530
|
}
|
|
5462
5531
|
|
|
@@ -6293,9 +6362,9 @@ function trackDeferredCommand(session, command) {
|
|
|
6293
6362
|
session.deferredCommands = [...session.deferredCommands ?? [], command];
|
|
6294
6363
|
}
|
|
6295
6364
|
function untrackDeferredCommand(session, command) {
|
|
6296
|
-
const
|
|
6297
|
-
if (!
|
|
6298
|
-
const rest =
|
|
6365
|
+
const pending2 = session.deferredCommands ?? [];
|
|
6366
|
+
if (!pending2.includes(command)) return;
|
|
6367
|
+
const rest = pending2.filter((c) => c !== command);
|
|
6299
6368
|
session.deferredCommands = rest.length > 0 ? rest : void 0;
|
|
6300
6369
|
}
|
|
6301
6370
|
|
|
@@ -6398,16 +6467,16 @@ function runDeferredCommand(command, onDone, spawnChild = spawn3, onOutput) {
|
|
|
6398
6467
|
// src/commands/sessions/daemon/reopenDeferredCommands.ts
|
|
6399
6468
|
function reopenDeferredCommands(sessions, m) {
|
|
6400
6469
|
for (const session of sessions) {
|
|
6401
|
-
const
|
|
6402
|
-
if (
|
|
6470
|
+
const pending2 = session.deferredCommands ?? [];
|
|
6471
|
+
if (pending2.length === 0) continue;
|
|
6403
6472
|
if (!session.pty) {
|
|
6404
6473
|
session.deferredCommands = void 0;
|
|
6405
6474
|
daemonLog(
|
|
6406
|
-
`defer-command ${
|
|
6475
|
+
`defer-command ${pending2.map((c) => deferredCommandLabel(c.argv)).join(", ")} dropped on restore: session ${session.id} is not live`
|
|
6407
6476
|
);
|
|
6408
6477
|
continue;
|
|
6409
6478
|
}
|
|
6410
|
-
for (const command of
|
|
6479
|
+
for (const command of pending2) reopen(session.id, command, m);
|
|
6411
6480
|
}
|
|
6412
6481
|
}
|
|
6413
6482
|
function reopen(id, command, m) {
|
|
@@ -7929,10 +7998,10 @@ function armCreateTimeout(ctx, client, data, traceId) {
|
|
|
7929
7998
|
const node = ctx.spec.name;
|
|
7930
7999
|
const timer = setTimeout(
|
|
7931
8000
|
() => {
|
|
7932
|
-
const
|
|
7933
|
-
const index =
|
|
8001
|
+
const pending2 = ctx.relay.pendingCreators;
|
|
8002
|
+
const index = pending2.findIndex((p) => p.timer === timer);
|
|
7934
8003
|
if (index === -1) return;
|
|
7935
|
-
|
|
8004
|
+
pending2.splice(index, 1);
|
|
7936
8005
|
daemonLog(`link ${node} ws: ${data.type} timed out (cwd=${data.cwd})`);
|
|
7937
8006
|
sendTo(client, {
|
|
7938
8007
|
type: "error",
|
|
@@ -8100,10 +8169,10 @@ function relayReply(state, msg) {
|
|
|
8100
8169
|
function takePendingCreator(state, traceId) {
|
|
8101
8170
|
const index = pendingIndex(state, traceId);
|
|
8102
8171
|
if (index === -1) return void 0;
|
|
8103
|
-
const [
|
|
8104
|
-
if (!
|
|
8105
|
-
clearTimeout(
|
|
8106
|
-
return
|
|
8172
|
+
const [pending2] = state.pendingCreators.splice(index, 1);
|
|
8173
|
+
if (!pending2) return void 0;
|
|
8174
|
+
clearTimeout(pending2.timer);
|
|
8175
|
+
return pending2.client;
|
|
8107
8176
|
}
|
|
8108
8177
|
function pendingIndex(state, traceId) {
|
|
8109
8178
|
if (typeof traceId !== "string") return 0;
|
|
@@ -9945,8 +10014,8 @@ async function readTranscriptEchoes(conversationId) {
|
|
|
9945
10014
|
|
|
9946
10015
|
// src/commands/sessions/daemon/handleFetchSessionTranscript.ts
|
|
9947
10016
|
async function readMessages(session) {
|
|
10017
|
+
const filePath = await resolveTranscriptPath(session);
|
|
9948
10018
|
const conversation = conversationOf(session);
|
|
9949
|
-
const filePath = conversation ? await resolveTranscriptPath(session) : null;
|
|
9950
10019
|
if (!conversation || !filePath) return [];
|
|
9951
10020
|
try {
|
|
9952
10021
|
return transcriptMessages(
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
} from "./chunk-D6WBUFXT.js";
|
|
4
4
|
import {
|
|
5
5
|
executePhase
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-PBDOARKC.js";
|
|
7
|
+
import "./chunk-KBS7CW76.js";
|
|
8
8
|
import "./chunk-7NZOH4LN.js";
|
|
9
9
|
import "./chunk-F7QYFJB2.js";
|
|
10
10
|
import "./chunk-ZYK7V4PG.js";
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
import "./chunk-LQMXLKPW.js";
|
|
29
29
|
import {
|
|
30
30
|
resolvePlan
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
31
|
+
} from "./chunk-SXPRDIR4.js";
|
|
32
|
+
import "./chunk-TCPFVNSF.js";
|
|
33
|
+
import "./chunk-CDI7X4YQ.js";
|
|
34
34
|
import "./chunk-6Z7XJJNZ.js";
|
|
35
35
|
import {
|
|
36
36
|
findOneItem,
|
|
@@ -50,11 +50,11 @@ import "./chunk-2R4VODAU.js";
|
|
|
50
50
|
import "./chunk-J6ULAU7G.js";
|
|
51
51
|
import "./chunk-N3S5RZYX.js";
|
|
52
52
|
import "./chunk-JMHNLOLN.js";
|
|
53
|
-
import "./chunk-
|
|
53
|
+
import "./chunk-QHWGT3MB.js";
|
|
54
54
|
import "./chunk-QBDPUOLA.js";
|
|
55
55
|
import {
|
|
56
56
|
withoutResumeSession
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-FMP3VC43.js";
|
|
58
58
|
import "./chunk-MRUIXQXS.js";
|
|
59
59
|
import "./chunk-YLQAQHRT.js";
|
|
60
60
|
import "./chunk-5AAHWTRQ.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
refine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EZTEBMK5.js";
|
|
4
4
|
import {
|
|
5
5
|
resolveHarness
|
|
6
6
|
} from "./chunk-KQOUE3WV.js";
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-M5YRR6AZ.js";
|
|
8
|
+
import "./chunk-LUHIGYK4.js";
|
|
9
9
|
import "./chunk-HB2TXZX4.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WQN4KHMR.js";
|
|
11
11
|
import "./chunk-BXGPF3TG.js";
|
|
12
12
|
import "./chunk-U3IQIWLI.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-4WJMXSPD.js";
|
|
14
|
+
import "./chunk-DVHJAS57.js";
|
|
15
15
|
import "./chunk-OZNYQOQK.js";
|
|
16
16
|
import "./chunk-HKGCLAZ7.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-PBDOARKC.js";
|
|
18
|
+
import "./chunk-KBS7CW76.js";
|
|
19
19
|
import "./chunk-7NZOH4LN.js";
|
|
20
20
|
import "./chunk-F7QYFJB2.js";
|
|
21
21
|
import "./chunk-ZYK7V4PG.js";
|
|
@@ -25,7 +25,7 @@ import "./chunk-7KDF6H4R.js";
|
|
|
25
25
|
import "./chunk-FQZ6D3OJ.js";
|
|
26
26
|
import "./chunk-PF6E5TS6.js";
|
|
27
27
|
import "./chunk-VVUYBY6D.js";
|
|
28
|
-
import "./chunk-
|
|
28
|
+
import "./chunk-MKITEB2N.js";
|
|
29
29
|
import "./chunk-2T5HRFWP.js";
|
|
30
30
|
import "./chunk-APM22DBI.js";
|
|
31
31
|
import "./chunk-JMWY47DZ.js";
|
|
@@ -42,10 +42,10 @@ import "./chunk-F4XCHVD7.js";
|
|
|
42
42
|
import "./chunk-A7ONLVZD.js";
|
|
43
43
|
import "./chunk-HR7HIPYM.js";
|
|
44
44
|
import "./chunk-LQMXLKPW.js";
|
|
45
|
-
import "./chunk-
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
45
|
+
import "./chunk-RI3JT2F6.js";
|
|
46
|
+
import "./chunk-SXPRDIR4.js";
|
|
47
|
+
import "./chunk-TCPFVNSF.js";
|
|
48
|
+
import "./chunk-CDI7X4YQ.js";
|
|
49
49
|
import "./chunk-6Z7XJJNZ.js";
|
|
50
50
|
import "./chunk-GINJQIVR.js";
|
|
51
51
|
import "./chunk-IB7NXLHT.js";
|
|
@@ -57,9 +57,9 @@ import "./chunk-2R4VODAU.js";
|
|
|
57
57
|
import "./chunk-J6ULAU7G.js";
|
|
58
58
|
import "./chunk-N3S5RZYX.js";
|
|
59
59
|
import "./chunk-JMHNLOLN.js";
|
|
60
|
-
import "./chunk-
|
|
60
|
+
import "./chunk-QHWGT3MB.js";
|
|
61
61
|
import "./chunk-QBDPUOLA.js";
|
|
62
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-FMP3VC43.js";
|
|
63
63
|
import "./chunk-MRUIXQXS.js";
|
|
64
64
|
import "./chunk-YLQAQHRT.js";
|
|
65
65
|
import "./chunk-5AAHWTRQ.js";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
formatScanUsage,
|
|
3
3
|
inboxScanBlocker,
|
|
4
4
|
runInboxScan
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-654EZCLQ.js";
|
|
6
6
|
import "./chunk-2JYMVJGZ.js";
|
|
7
7
|
import "./chunk-U3IQIWLI.js";
|
|
8
8
|
import {
|
|
@@ -18,7 +18,7 @@ import "./chunk-JMHNLOLN.js";
|
|
|
18
18
|
import "./chunk-QBDPUOLA.js";
|
|
19
19
|
import {
|
|
20
20
|
harnessAdapter
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FMP3VC43.js";
|
|
22
22
|
import "./chunk-MRUIXQXS.js";
|
|
23
23
|
import "./chunk-YLQAQHRT.js";
|
|
24
24
|
import "./chunk-5AAHWTRQ.js";
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
currentExecutionIdentity,
|
|
18
18
|
getSchemaSessionApprovalDir,
|
|
19
19
|
getSchemaSessionApprovalPath
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EREBM27C.js";
|
|
21
21
|
import "./chunk-ZMH7UZNP.js";
|
|
22
22
|
import {
|
|
23
23
|
recordGitRef
|
|
@@ -32,7 +32,7 @@ import "./chunk-2R4VODAU.js";
|
|
|
32
32
|
import "./chunk-J6ULAU7G.js";
|
|
33
33
|
import "./chunk-N3S5RZYX.js";
|
|
34
34
|
import "./chunk-JMHNLOLN.js";
|
|
35
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-FMP3VC43.js";
|
|
36
36
|
import "./chunk-MRUIXQXS.js";
|
|
37
37
|
import "./chunk-YLQAQHRT.js";
|
|
38
38
|
import "./chunk-5AAHWTRQ.js";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
currentExecutionIdentity,
|
|
9
9
|
getSchemaSessionApprovalPath
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-EREBM27C.js";
|
|
11
11
|
import "./chunk-ZMH7UZNP.js";
|
|
12
12
|
import "./chunk-FPWL4VRC.js";
|
|
13
13
|
import {
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
import "./chunk-J6ULAU7G.js";
|
|
27
27
|
import "./chunk-N3S5RZYX.js";
|
|
28
28
|
import "./chunk-JMHNLOLN.js";
|
|
29
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-FMP3VC43.js";
|
|
30
30
|
import "./chunk-MRUIXQXS.js";
|
|
31
31
|
import "./chunk-YLQAQHRT.js";
|
|
32
32
|
import "./chunk-5AAHWTRQ.js";
|