@staff0rd/assist 0.1159.0 → 0.1160.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/agent/advice/ask.md +1 -1
- package/agent/commands/ask.md +6 -3
- package/dist/.build-files +99 -97
- package/dist/{addActivity-MJYWFO7U.js → addActivity-TNE2FRPB.js} +3 -2
- package/dist/{addPhase-GONWNOTL.js → addPhase-V4Z636NN.js} +6 -5
- package/dist/{advise-P44JLFTH.js → advise-RTJV7NU2.js} +4 -3
- package/dist/{ask-ZZRX33YD.js → ask-7JXPMU2X.js} +38 -3
- package/dist/{askCheck-A5HDVJP2.js → askCheck-3JCSRRAQ.js} +10 -9
- package/dist/{askDesign-TJIJH5UI.js → askDesign-Q4HBBLJD.js} +5 -4
- package/dist/{askQuestion-5RDETJHR.js → askQuestion-QXVDXZZY.js} +2 -2
- package/dist/{branch-AVZC3L36.js → branch-LSX2L22U.js} +4 -3
- package/dist/built-version +1 -1
- package/dist/{chunk-X2JAOVWA.js → chunk-25PQYD5B.js} +2 -2
- package/dist/{chunk-TYXGQOBI.js → chunk-4X2UUOFH.js} +1 -1
- package/dist/{chunk-ED3ITGJN.js → chunk-5AJWUYA3.js} +1 -1
- package/dist/{chunk-LWM73IG5.js → chunk-5THMDW42.js} +1 -1
- package/dist/chunk-6MNX5ZMQ.js +6 -0
- package/dist/{chunk-XLZPMAEW.js → chunk-6ZECLGYV.js} +13 -2
- package/dist/{chunk-NCK7BMMP.js → chunk-7I2Q27D6.js} +7 -7
- package/dist/{chunk-YLARQOLU.js → chunk-7M657DAU.js} +25 -5
- package/dist/{chunk-2GZAGNPD.js → chunk-7MIAK3SD.js} +2 -2
- package/dist/{chunk-LFRSZIAS.js → chunk-7NZOH4LN.js} +1 -1
- package/dist/{chunk-MRM2NZZG.js → chunk-C4247LMI.js} +1 -1
- package/dist/{chunk-KI7RHWH5.js → chunk-C5YM3YO4.js} +3 -4
- package/dist/{chunk-6QVHLP3E.js → chunk-C6AKA3GY.js} +2 -2
- package/dist/{chunk-TECUUDTX.js → chunk-CKJ4SDVJ.js} +1 -1
- package/dist/{chunk-ZN3KF5EG.js → chunk-D2337HWD.js} +1 -1
- package/dist/{chunk-CJUZTNRQ.js → chunk-EOALZG4Y.js} +1 -1
- package/dist/chunk-F7QYFJB2.js +17 -0
- package/dist/{chunk-Z3X5QNYY.js → chunk-GMXZUWBU.js} +1 -1
- package/dist/{chunk-A77PB42R.js → chunk-I3XPML6O.js} +7 -7
- package/dist/{chunk-OG7C3FPS.js → chunk-JR3LZHBZ.js} +1 -1
- package/dist/{chunk-KLQFCFQS.js → chunk-JVJOXBO2.js} +3 -3
- package/dist/{chunk-VDZOW3Q3.js → chunk-K5K7LATN.js} +1 -1
- package/dist/{chunk-PSE4HC7Y.js → chunk-K5MYLLFM.js} +2 -2
- package/dist/{chunk-E5GBQHKU.js → chunk-L3RJER2C.js} +1 -1
- package/dist/{chunk-FVXUYW7R.js → chunk-L4PVKBXS.js} +1 -1
- package/dist/{chunk-OFWIPLFY.js → chunk-LO4K3OUQ.js} +1 -1
- package/dist/{chunk-D3KXEPW5.js → chunk-LYQWAGLE.js} +1 -1
- package/dist/{chunk-WVAZNDJ7.js → chunk-MG4IJB47.js} +1 -1
- package/dist/{chunk-EXSITFJA.js → chunk-MOQ2IEPI.js} +1 -1
- package/dist/{chunk-JHRRWQR2.js → chunk-MSPCQ5L7.js} +1 -1
- package/dist/{chunk-VEMLL2MB.js → chunk-O7X46AAU.js} +1 -1
- package/dist/{chunk-NDXE7MIB.js → chunk-OLFUSXO3.js} +1 -1
- package/dist/{chunk-GOQK3KCL.js → chunk-OTYBOGWB.js} +1 -1
- package/dist/{chunk-JTUTO5BL.js → chunk-Q4CX4OJJ.js} +1 -1
- package/dist/{chunk-RTTC6DG3.js → chunk-QSUS3RLF.js} +3 -1
- package/dist/{chunk-Y74XIZCO.js → chunk-S55TRXFP.js} +2 -2
- package/dist/{chunk-YTJ7HVKR.js → chunk-SQKNRK6D.js} +1 -1
- package/dist/{chunk-5XEL2RHJ.js → chunk-SUO2246Y.js} +1 -1
- package/dist/{chunk-DYGEMDS7.js → chunk-TESRDGY7.js} +1 -1
- package/dist/{chunk-HSE5HLCK.js → chunk-VEMNENJ2.js} +1 -1
- package/dist/{chunk-BAHQJHYD.js → chunk-VWVLMTH2.js} +4 -0
- package/dist/chunk-VXIZ5DUA.js +6 -0
- package/dist/{chunk-VWO3F27D.js → chunk-VYOVPMBH.js} +1 -1
- package/dist/{chunk-DU5CHLWL.js → chunk-XDQFHWGO.js} +5 -5
- package/dist/{chunk-APCMTNP5.js → chunk-YHZUTP5K.js} +1 -1
- package/dist/{cliHook-VGYS3GDX.js → cliHook-XFH6QLH7.js} +6 -5
- package/dist/{cliHookCheck-Z3T7T6DN.js → cliHookCheck-QXSRKVUJ.js} +3 -2
- package/dist/{codexHook-OGXRUKIN.js → codexHook-KGR76TSJ.js} +8 -7
- package/dist/commands/extension/extension/content.js +1 -1
- package/dist/commands/extension/extension/docs.js +7 -7
- package/dist/commands/sessions/web/bundle.js +440 -438
- package/dist/{comment-CADYMIUH.js → comment-2T2VC3NL.js} +4 -4
- package/dist/{commentIssue-2VMPDQ74.js → commentIssue-KOQ5PSTG.js} +3 -3
- package/dist/{commit-O2SBMPOL.js → commit-DXTHQVIK.js} +4 -3
- package/dist/{createIssue-J6QLUACO.js → createIssue-EE5W4LLB.js} +2 -2
- package/dist/{doctorNodes-MK564ECD.js → doctorNodes-HBQW5L3M.js} +3 -3
- package/dist/{done-RYXCEDM6.js → done-MQBZZSGP.js} +5 -4
- package/dist/{edit-XOU2IWSF.js → edit-OBXC5Z6J.js} +2 -2
- package/dist/{editHook-BVXWHGQN.js → editHook-PIDVOHE3.js} +6 -5
- package/dist/{editIssue-6I3BU4YO.js → editIssue-CR4SFOIS.js} +2 -2
- package/dist/{editIssueComment-OLT3MQDH.js → editIssueComment-SVTPJ6CU.js} +3 -3
- package/dist/{fixConflict-GCB74B3L.js → fixConflict-2DB66U4A.js} +5 -4
- package/dist/index.js +61 -61
- package/dist/{launchMode-V73UJ7IY.js → launchMode-4TWOI76X.js} +16 -15
- package/dist/{list-RAZHIR56.js → list-QFKV7MEU.js} +6 -5
- package/dist/{next-WWQA4T7M.js → next-TJGY3KDH.js} +15 -14
- package/dist/{piHook-BGIGXEC3.js → piHook-7QDAYTIX.js} +6 -5
- package/dist/{postSlackMessage-IPJ2HPKC.js → postSlackMessage-MH6BMLGC.js} +3 -3
- package/dist/{propose-OI54ENNV.js → propose-JF27BF42.js} +7 -6
- package/dist/{raise-AWHJN5PS.js → raise-5YMRZJLP.js} +2 -2
- package/dist/{refine-MO363W3J.js → refine-DPA5BYQI.js} +17 -16
- package/dist/{reply-QXSMUPXO.js → reply-RF5XWST2.js} +3 -3
- package/dist/{restartNode-ZBXTI22O.js → restartNode-I3C4XEWU.js} +5 -5
- package/dist/{review-SCBWQ5YI.js → review-GXVALUWY.js} +7 -6
- package/dist/{reviewPrComments-EB2ZL3GE.js → reviewPrComments-CICNPWVX.js} +5 -4
- package/dist/{rewindPhase-CYVR62ZI.js → rewindPhase-DDTS4N6S.js} +9 -8
- package/dist/{rulesAdd-QI27Q4JE.js → rulesAdd-2PHHDPJ3.js} +3 -3
- package/dist/{run-4OKNZHTT.js → run-6AHR53L7.js} +13 -12
- package/dist/{run-GYUYQID4.js → run-BDQCSTCF.js} +13 -12
- package/dist/{runDaemon-U4MIZFAC.js → runDaemon-FE3XZEUT.js} +137 -37
- package/dist/{runExtract-VK32OSQH.js → runExtract-43B4PDWU.js} +2 -2
- package/dist/{runRefine-QHTLLTX6.js → runRefine-ZNMBCAAN.js} +17 -16
- package/dist/{scan-R4S6NWXP.js → scan-NKKHHGL2.js} +3 -2
- package/dist/{schemaConfirm-OHIS7AMM.js → schemaConfirm-6NZ3JBDT.js} +3 -2
- package/dist/{schemaUnlock-T5DN3YOY.js → schemaUnlock-N53NXNUF.js} +3 -2
- package/dist/{search-B3CRZVFU.js → search-X52HVMA3.js} +6 -5
- package/dist/{show-7N3J7LLJ.js → show-N2KOJIBG.js} +4 -3
- package/dist/{show-DNTQYROH.js → show-PR4OSVLY.js} +4 -3
- package/dist/{signExtension-BX4P5B4F.js → signExtension-WUVAF67T.js} +1 -1
- package/dist/{slack-4ZPQ5C5L.js → slack-4YK2TTH5.js} +3 -3
- package/dist/{updateNode-IX5XTZX4.js → updateNode-PZMQ2BSE.js} +5 -5
- package/dist/{updatePlan-SESXRANJ.js → updatePlan-IOSLPULZ.js} +7 -6
- package/dist/{web-YVATG6S2.js → web-H4GKNDJW.js} +17 -16
- package/dist/{web-ECGAG7CY.js → web-T44LOGKB.js} +17 -16
- package/dist/{wontfix-PHYW2KQ7.js → wontfix-62MHC5KB.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-5PKWV3WT.js +0 -8
|
@@ -3,23 +3,24 @@ import {
|
|
|
3
3
|
adviceHookPayload,
|
|
4
4
|
composeAdvice,
|
|
5
5
|
selectAdvice
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6ZECLGYV.js";
|
|
7
7
|
import {
|
|
8
8
|
loadAdviceFragments
|
|
9
9
|
} from "./chunk-P7FVAGFQ.js";
|
|
10
10
|
import {
|
|
11
11
|
readStdin
|
|
12
12
|
} from "./chunk-NGYZK6AF.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-K5K7LATN.js";
|
|
14
14
|
import "./chunk-MELBVXKL.js";
|
|
15
15
|
import "./chunk-OGJ6AZK4.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-7M657DAU.js";
|
|
17
17
|
import "./chunk-MRUIXQXS.js";
|
|
18
18
|
import "./chunk-HO7RNI6V.js";
|
|
19
19
|
import "./chunk-DIAC4XYA.js";
|
|
20
20
|
import "./chunk-UU77KEL6.js";
|
|
21
21
|
import "./chunk-W7TRZLEM.js";
|
|
22
22
|
import "./chunk-P26XSDFU.js";
|
|
23
|
+
import "./chunk-VXIZ5DUA.js";
|
|
23
24
|
import "./chunk-IBPSXDUB.js";
|
|
24
25
|
import "./chunk-DUNO7WBT.js";
|
|
25
26
|
import "./chunk-G44QYJ57.js";
|
|
@@ -1,20 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
deferredRunEnv
|
|
3
|
+
} from "./chunk-6MNX5ZMQ.js";
|
|
1
4
|
import {
|
|
2
5
|
printApprovedComments
|
|
3
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-TESRDGY7.js";
|
|
4
7
|
import {
|
|
5
8
|
awaitPreviewApproval
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-C5YM3YO4.js";
|
|
10
|
+
import "./chunk-VWVLMTH2.js";
|
|
8
11
|
import {
|
|
9
12
|
readBodyArgument
|
|
10
13
|
} from "./chunk-K4T24UGW.js";
|
|
11
14
|
import "./chunk-54QTHCXV.js";
|
|
15
|
+
import {
|
|
16
|
+
requestDaemonReply
|
|
17
|
+
} from "./chunk-OFLEIPAR.js";
|
|
12
18
|
import "./chunk-2EW62DM5.js";
|
|
19
|
+
import {
|
|
20
|
+
sdkAgentEnv
|
|
21
|
+
} from "./chunk-VXIZ5DUA.js";
|
|
13
22
|
import "./chunk-ZH6HKQOY.js";
|
|
14
23
|
import "./chunk-ELF4PBZX.js";
|
|
15
24
|
|
|
16
25
|
// src/commands/ask.ts
|
|
17
26
|
import { randomUUID } from "crypto";
|
|
27
|
+
|
|
28
|
+
// src/commands/sessions/shared/deferToDaemon.ts
|
|
29
|
+
async function deferToDaemon(stdin) {
|
|
30
|
+
const sessionId = process.env.ASSIST_SESSION_ID;
|
|
31
|
+
if (!sessionId || process.env[sdkAgentEnv] !== "1" || process.env[deferredRunEnv] === "1")
|
|
32
|
+
return false;
|
|
33
|
+
const reply = await requestDaemonReply(
|
|
34
|
+
{
|
|
35
|
+
type: "defer-command",
|
|
36
|
+
sessionId,
|
|
37
|
+
argv: process.argv.slice(2),
|
|
38
|
+
stdin,
|
|
39
|
+
cwd: process.cwd(),
|
|
40
|
+
env: process.env
|
|
41
|
+
},
|
|
42
|
+
"defer-command-result"
|
|
43
|
+
);
|
|
44
|
+
if (!reply?.accepted) return false;
|
|
45
|
+
console.log(
|
|
46
|
+
"The preview is open in the session's web preview pane. End your turn now and do nothing else: the user's decision will arrive as your next message."
|
|
47
|
+
);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/commands/ask.ts
|
|
18
52
|
async function ask(options) {
|
|
19
53
|
const body = await readBodyArgument(options.body);
|
|
20
54
|
if (body.trim().length === 0) {
|
|
@@ -26,6 +60,7 @@ async function ask(options) {
|
|
|
26
60
|
console.log(body);
|
|
27
61
|
return;
|
|
28
62
|
}
|
|
63
|
+
if (await deferToDaemon(options.body === "-" ? body : void 0)) return;
|
|
29
64
|
const decision = await awaitPreviewApproval(
|
|
30
65
|
options.title,
|
|
31
66
|
{
|
|
@@ -15,18 +15,18 @@ import {
|
|
|
15
15
|
} from "./chunk-C5U44UI7.js";
|
|
16
16
|
import {
|
|
17
17
|
awaitPreviewApproval
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import "./chunk-
|
|
18
|
+
} from "./chunk-C5YM3YO4.js";
|
|
19
|
+
import "./chunk-VWVLMTH2.js";
|
|
20
20
|
import "./chunk-54QTHCXV.js";
|
|
21
21
|
import {
|
|
22
22
|
resolveRewindPlan
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-K5MYLLFM.js";
|
|
24
24
|
import {
|
|
25
25
|
buildReviewPhase
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
29
|
-
import "./chunk-
|
|
26
|
+
} from "./chunk-MSPCQ5L7.js";
|
|
27
|
+
import "./chunk-L3RJER2C.js";
|
|
28
|
+
import "./chunk-SQKNRK6D.js";
|
|
29
|
+
import "./chunk-MG4IJB47.js";
|
|
30
30
|
import {
|
|
31
31
|
getReady,
|
|
32
32
|
serializeManualChecks
|
|
@@ -49,16 +49,17 @@ import "./chunk-LMUTL44M.js";
|
|
|
49
49
|
import "./chunk-6NDXAN45.js";
|
|
50
50
|
import {
|
|
51
51
|
previewAnswerWaitBlocker
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-K5K7LATN.js";
|
|
53
53
|
import "./chunk-MELBVXKL.js";
|
|
54
54
|
import "./chunk-OGJ6AZK4.js";
|
|
55
|
-
import "./chunk-
|
|
55
|
+
import "./chunk-7M657DAU.js";
|
|
56
56
|
import "./chunk-MRUIXQXS.js";
|
|
57
57
|
import "./chunk-HO7RNI6V.js";
|
|
58
58
|
import "./chunk-DIAC4XYA.js";
|
|
59
59
|
import "./chunk-UU77KEL6.js";
|
|
60
60
|
import "./chunk-W7TRZLEM.js";
|
|
61
61
|
import "./chunk-P26XSDFU.js";
|
|
62
|
+
import "./chunk-VXIZ5DUA.js";
|
|
62
63
|
import {
|
|
63
64
|
askQuestionEnabled
|
|
64
65
|
} from "./chunk-IBPSXDUB.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
printApprovedComments
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TESRDGY7.js";
|
|
4
4
|
import {
|
|
5
5
|
isLiveDaemonSession
|
|
6
6
|
} from "./chunk-C5U44UI7.js";
|
|
7
7
|
import {
|
|
8
8
|
awaitPreviewApproval
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
9
|
+
} from "./chunk-C5YM3YO4.js";
|
|
10
|
+
import "./chunk-VWVLMTH2.js";
|
|
11
11
|
import {
|
|
12
12
|
readBodyArgument
|
|
13
13
|
} from "./chunk-K4T24UGW.js";
|
|
@@ -21,13 +21,14 @@ import {
|
|
|
21
21
|
import "./chunk-OGJ6AZK4.js";
|
|
22
22
|
import {
|
|
23
23
|
harnessAdapter
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-7M657DAU.js";
|
|
25
25
|
import "./chunk-MRUIXQXS.js";
|
|
26
26
|
import "./chunk-HO7RNI6V.js";
|
|
27
27
|
import "./chunk-DIAC4XYA.js";
|
|
28
28
|
import "./chunk-UU77KEL6.js";
|
|
29
29
|
import "./chunk-W7TRZLEM.js";
|
|
30
30
|
import "./chunk-P26XSDFU.js";
|
|
31
|
+
import "./chunk-VXIZ5DUA.js";
|
|
31
32
|
import "./chunk-DUNO7WBT.js";
|
|
32
33
|
import {
|
|
33
34
|
activeHarness
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
} from "./chunk-C5U44UI7.js";
|
|
10
10
|
import {
|
|
11
11
|
awaitPreviewApproval
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-C5YM3YO4.js";
|
|
13
|
+
import "./chunk-VWVLMTH2.js";
|
|
14
14
|
import "./chunk-54QTHCXV.js";
|
|
15
15
|
import "./chunk-OFLEIPAR.js";
|
|
16
16
|
import "./chunk-2EW62DM5.js";
|
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
createBranch,
|
|
3
3
|
generateBranchSlug,
|
|
4
4
|
isConciseSlug
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-MOQ2IEPI.js";
|
|
6
|
+
import "./chunk-VEMNENJ2.js";
|
|
7
7
|
import "./chunk-OZNYQOQK.js";
|
|
8
8
|
import "./chunk-ORSRBZ2X.js";
|
|
9
9
|
import "./chunk-PCF66ALO.js";
|
|
@@ -18,13 +18,14 @@ import "./chunk-LMUTL44M.js";
|
|
|
18
18
|
import "./chunk-6NDXAN45.js";
|
|
19
19
|
import "./chunk-MELBVXKL.js";
|
|
20
20
|
import "./chunk-OGJ6AZK4.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-7M657DAU.js";
|
|
22
22
|
import "./chunk-MRUIXQXS.js";
|
|
23
23
|
import "./chunk-HO7RNI6V.js";
|
|
24
24
|
import "./chunk-DIAC4XYA.js";
|
|
25
25
|
import "./chunk-UU77KEL6.js";
|
|
26
26
|
import "./chunk-W7TRZLEM.js";
|
|
27
27
|
import "./chunk-P26XSDFU.js";
|
|
28
|
+
import "./chunk-VXIZ5DUA.js";
|
|
28
29
|
import "./chunk-DUNO7WBT.js";
|
|
29
30
|
import "./chunk-D7UZLH36.js";
|
|
30
31
|
import "./chunk-EW2ZM2PC.js";
|
package/dist/built-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.1160.0
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
isApprovedRead,
|
|
14
14
|
resolvePermission,
|
|
15
15
|
splitCompound
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L4PVKBXS.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-5THMDW42.js";
|
|
27
27
|
import {
|
|
28
28
|
isLiveDaemonSession
|
|
29
29
|
} from "./chunk-C5U44UI7.js";
|
|
@@ -3,7 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-P7FVAGFQ.js";
|
|
4
4
|
import {
|
|
5
5
|
previewAnswerWaitBlocker
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K5K7LATN.js";
|
|
7
|
+
import {
|
|
8
|
+
sdkAgentEnv
|
|
9
|
+
} from "./chunk-VXIZ5DUA.js";
|
|
7
10
|
import {
|
|
8
11
|
askQuestionEnabled
|
|
9
12
|
} from "./chunk-IBPSXDUB.js";
|
|
@@ -21,10 +24,17 @@ function adviceContextFor(cwd, env = process.env) {
|
|
|
21
24
|
config: loadConfigFrom(cwd),
|
|
22
25
|
rootDir: findConfigUp(cwd)?.rootDir ?? cwd,
|
|
23
26
|
assistSession: env.ASSIST_SESSION === "1",
|
|
24
|
-
previewAnswerWait: previewAnswerWaitBlocker() === void 0
|
|
27
|
+
previewAnswerWait: previewAnswerWaitBlocker() === void 0,
|
|
28
|
+
sdkSession: env[sdkAgentEnv] === "1"
|
|
25
29
|
};
|
|
26
30
|
}
|
|
27
31
|
|
|
32
|
+
// src/commands/advise/previewWaitAdvice.ts
|
|
33
|
+
var previewWaitAdvice = {
|
|
34
|
+
previewWait: ({ sdkSession }) => sdkSession ? "in the foreground. It returns at once; then end your turn and do nothing else \u2014 when the user decides, the command's output and exit code arrive as your next message" : "as a background task, doing no other work until it returns. It blocks until the user decides",
|
|
35
|
+
previewRevise: ({ sdkSession }) => sdkSession ? "To revise a still-pending preview, re-run it; the earlier one is superseded and delivers nothing." : "To revise a still-pending preview, re-run it directly without stopping the earlier task; that task then exits 0 as superseded \u2014 ignore its result."
|
|
36
|
+
};
|
|
37
|
+
|
|
28
38
|
// src/commands/advise/verifyRunCommandNames.ts
|
|
29
39
|
function verifyRunCommandNames({
|
|
30
40
|
config,
|
|
@@ -35,6 +45,7 @@ function verifyRunCommandNames({
|
|
|
35
45
|
|
|
36
46
|
// src/commands/advise/renderAdviceBody.ts
|
|
37
47
|
var adviceVariables = {
|
|
48
|
+
...previewWaitAdvice,
|
|
38
49
|
verifyCommands: (context) => verifyRunCommandNames(context).map((name) => `\`${name}\``).join(", ")
|
|
39
50
|
};
|
|
40
51
|
var adviceOverrides = {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
resolveLinkTarget,
|
|
12
12
|
usageWindowKey,
|
|
13
13
|
watcherLogPath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YHZUTP5K.js";
|
|
15
15
|
import {
|
|
16
16
|
readLogTail
|
|
17
17
|
} from "./chunk-JNCFHWBK.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-3NPVVAAT.js";
|
|
27
27
|
import {
|
|
28
28
|
firstBrokenHop
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-JR3LZHBZ.js";
|
|
30
30
|
import {
|
|
31
31
|
TRACE_HEADER,
|
|
32
32
|
newTraceId
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
import {
|
|
35
35
|
ASSIST_VERSION,
|
|
36
36
|
PROTOCOL_VERSION
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-LO4K3OUQ.js";
|
|
38
38
|
import {
|
|
39
39
|
queryNodes
|
|
40
40
|
} from "./chunk-OD7CMDGZ.js";
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
} from "./chunk-UJBW7FVI.js";
|
|
80
80
|
import {
|
|
81
81
|
targetConversationEvents
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-S55TRXFP.js";
|
|
83
83
|
import {
|
|
84
84
|
configEntryLayers,
|
|
85
85
|
ghFailure,
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
} from "./chunk-AOTNNZPH.js";
|
|
229
229
|
import {
|
|
230
230
|
rewindItemToPhase
|
|
231
|
-
} from "./chunk-
|
|
231
|
+
} from "./chunk-SUO2246Y.js";
|
|
232
232
|
import {
|
|
233
233
|
loadBacklogSummaries,
|
|
234
234
|
searchBacklogSummaries
|
|
@@ -255,7 +255,7 @@ import {
|
|
|
255
255
|
} from "./chunk-IZBQH3LW.js";
|
|
256
256
|
import {
|
|
257
257
|
resolveRewindPlan
|
|
258
|
-
} from "./chunk-
|
|
258
|
+
} from "./chunk-K5MYLLFM.js";
|
|
259
259
|
import {
|
|
260
260
|
deleteItem,
|
|
261
261
|
getOrigin,
|
|
@@ -304,7 +304,7 @@ import {
|
|
|
304
304
|
discoverSessionJsonlPaths,
|
|
305
305
|
harnessAdapter,
|
|
306
306
|
parseSessionFile
|
|
307
|
-
} from "./chunk-
|
|
307
|
+
} from "./chunk-7M657DAU.js";
|
|
308
308
|
import {
|
|
309
309
|
harnessLabel
|
|
310
310
|
} from "./chunk-DUNO7WBT.js";
|
|
@@ -20,6 +20,9 @@ import {
|
|
|
20
20
|
MANAGED_BLOCK_END,
|
|
21
21
|
assistCodexHookKeys
|
|
22
22
|
} from "./chunk-P26XSDFU.js";
|
|
23
|
+
import {
|
|
24
|
+
sdkAgentEnv
|
|
25
|
+
} from "./chunk-VXIZ5DUA.js";
|
|
23
26
|
import {
|
|
24
27
|
harnessLabel,
|
|
25
28
|
resolveHarness
|
|
@@ -745,6 +748,14 @@ function lastDecisiveIndex(events) {
|
|
|
745
748
|
return -1;
|
|
746
749
|
}
|
|
747
750
|
|
|
751
|
+
// src/commands/sessions/shared/parseRestartNudge.ts
|
|
752
|
+
var RESTART_NUDGE = /^\s*<assist-restart killed="(\d+)">[\s\S]*<\/assist-restart>\s*$/;
|
|
753
|
+
function parseRestartNudge(text) {
|
|
754
|
+
if (typeof text !== "string") return null;
|
|
755
|
+
const match = RESTART_NUDGE.exec(text);
|
|
756
|
+
return match ? Number(match[1]) : null;
|
|
757
|
+
}
|
|
758
|
+
|
|
748
759
|
// src/commands/sessions/shared/normalizeUser.ts
|
|
749
760
|
var INTERRUPT_PREFIX = "[Request interrupted";
|
|
750
761
|
var TASK_NOTIFICATION = "<task-notification>";
|
|
@@ -777,6 +788,8 @@ function asRecord2(value) {
|
|
|
777
788
|
}
|
|
778
789
|
function normalizeUserText(text) {
|
|
779
790
|
if (isInterruptText(text)) return { kind: "interrupt" };
|
|
791
|
+
const killed = parseRestartNudge(text);
|
|
792
|
+
if (killed !== null) return { kind: "restart", killed };
|
|
780
793
|
if (typeof text === "string" && text.trimStart().startsWith(TASK_NOTIFICATION))
|
|
781
794
|
return { kind: "taskNotification" };
|
|
782
795
|
return { kind: "user" };
|
|
@@ -855,7 +868,7 @@ function deriveTranscriptStatus(entries, opts2 = {}) {
|
|
|
855
868
|
if (lastIdx === -1) return null;
|
|
856
869
|
const ev = events[lastIdx];
|
|
857
870
|
if (ev.kind === "interrupt") return "waiting";
|
|
858
|
-
if (ev.kind === "user") return "running";
|
|
871
|
+
if (ev.kind === "user" || ev.kind === "restart") return "running";
|
|
859
872
|
if (ev.kind === "toolResult" || ev.kind === "taskNotification") return null;
|
|
860
873
|
if (ev.stopReason != null && TURN_END_STOP_REASONS.has(ev.stopReason))
|
|
861
874
|
return "waiting";
|
|
@@ -904,7 +917,7 @@ function renderUserPrompt(entry, maxLength = MAX_LENGTH) {
|
|
|
904
917
|
if (entry.isSidechain || entry.isMeta) return void 0;
|
|
905
918
|
if (entry.type !== "user" || isTaskNotification(entry)) return void 0;
|
|
906
919
|
const raw = promptTextOrNull(entry);
|
|
907
|
-
if (raw === null) return void 0;
|
|
920
|
+
if (raw === null || parseRestartNudge(raw) !== null) return void 0;
|
|
908
921
|
const message2 = renderPrompt(raw);
|
|
909
922
|
return message2 ? cap(message2, maxLength) : void 0;
|
|
910
923
|
}
|
|
@@ -1048,8 +1061,12 @@ function userEvents(entry, at) {
|
|
|
1048
1061
|
const events = [];
|
|
1049
1062
|
const text = renderUserPrompt(entry, Number.POSITIVE_INFINITY);
|
|
1050
1063
|
if (text) events.push({ kind: "message", role: "user", text, at });
|
|
1051
|
-
else
|
|
1052
|
-
|
|
1064
|
+
else {
|
|
1065
|
+
const normalized = normalizeUser(entry);
|
|
1066
|
+
if (normalized.kind === "interrupt") events.push({ kind: "interrupt", at });
|
|
1067
|
+
if (normalized.kind === "restart")
|
|
1068
|
+
events.push({ kind: "restart", killed: normalized.killed, at });
|
|
1069
|
+
}
|
|
1053
1070
|
for (const block of claudeContentBlocksOf(contentOf(entry))) {
|
|
1054
1071
|
if (block.type !== "tool_result" || block.is_error) continue;
|
|
1055
1072
|
const body = resultText(block.content).trim();
|
|
@@ -4082,7 +4099,8 @@ function workflowQueryEnv(base, sessionId, launcherEnv2) {
|
|
|
4082
4099
|
const env = {
|
|
4083
4100
|
...sessionChildEnv(base, sessionId),
|
|
4084
4101
|
// why: claude turns the Artifact tool off for SDK-driven runs unless this opts back in
|
|
4085
|
-
CLAUDE_CODE_ARTIFACT: base.CLAUDE_CODE_ARTIFACT ?? "1"
|
|
4102
|
+
CLAUDE_CODE_ARTIFACT: base.CLAUDE_CODE_ARTIFACT ?? "1",
|
|
4103
|
+
[sdkAgentEnv]: "1"
|
|
4086
4104
|
};
|
|
4087
4105
|
if (!launcherEnv2) return env;
|
|
4088
4106
|
const { ASSIST_ACTIVITY_ID: _activityId, ...rest } = env;
|
|
@@ -4205,6 +4223,7 @@ import { createInterface as createInterface2 } from "readline";
|
|
|
4205
4223
|
// src/shared/harnessAdapters/launcherEnv.ts
|
|
4206
4224
|
var OWNED_BY_DAEMON = /* @__PURE__ */ new Set([
|
|
4207
4225
|
"ASSIST_ACTIVITY_ID",
|
|
4226
|
+
"ASSIST_SDK_AGENT",
|
|
4208
4227
|
"ASSIST_SDK_SESSION",
|
|
4209
4228
|
"ASSIST_SESSION",
|
|
4210
4229
|
"ASSIST_SESSION_ID"
|
|
@@ -4343,6 +4362,7 @@ export {
|
|
|
4343
4362
|
withoutResumeSession,
|
|
4344
4363
|
readTranscriptTail,
|
|
4345
4364
|
readTranscriptTailSync,
|
|
4365
|
+
parseRestartNudge,
|
|
4346
4366
|
emptyScanUsage,
|
|
4347
4367
|
scanUsageTokens,
|
|
4348
4368
|
reviewerLabel,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-WQF27PEJ.js";
|
|
4
4
|
import {
|
|
5
5
|
resumeNudge
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7NZOH4LN.js";
|
|
7
7
|
import {
|
|
8
8
|
HARNESS_SPAWN_FAILED,
|
|
9
9
|
awaitHarness
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
} from "./chunk-NWNODYLQ.js";
|
|
20
20
|
import {
|
|
21
21
|
harnessAdapter
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7M657DAU.js";
|
|
23
23
|
|
|
24
24
|
// src/commands/launchPrSkill.ts
|
|
25
25
|
import chalk from "chalk";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
supersededPreviewMessage,
|
|
2
3
|
toAttachments
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VWVLMTH2.js";
|
|
4
5
|
import {
|
|
5
6
|
readSocketLines
|
|
6
7
|
} from "./chunk-2EW62DM5.js";
|
|
@@ -213,9 +214,7 @@ async function awaitPreviewApproval(subject, request, options = {}) {
|
|
|
213
214
|
exitNoPreview(error);
|
|
214
215
|
}
|
|
215
216
|
if (outcome === "superseded") {
|
|
216
|
-
console.log(
|
|
217
|
-
"Superseded by a newer preview \u2014 no decision; ignore this result."
|
|
218
|
-
);
|
|
217
|
+
console.log(supersededPreviewMessage);
|
|
219
218
|
process.exit(0);
|
|
220
219
|
}
|
|
221
220
|
if (outcome.body !== void 0) options.saveEditedBody?.(outcome.body);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/commands/sessions/shared/wrapRestartNudge.ts
|
|
2
|
+
function wrapRestartNudge(text, killed) {
|
|
3
|
+
return `<assist-restart killed="${killed}">${text}</assist-restart>`;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// src/commands/backlog/buildResumePrompt.ts
|
|
7
|
+
function buildResumePrompt() {
|
|
8
|
+
return wrapRestartNudge(
|
|
9
|
+
"A restart interrupted this conversation. Continue from where you left off.",
|
|
10
|
+
0
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
wrapRestartNudge,
|
|
16
|
+
buildResumePrompt
|
|
17
|
+
};
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
isPausePending,
|
|
10
10
|
recordPhaseSession,
|
|
11
11
|
releaseLock
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5AJWUYA3.js";
|
|
13
13
|
import {
|
|
14
14
|
resumeNudge
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7NZOH4LN.js";
|
|
16
16
|
import {
|
|
17
17
|
HARNESS_SPAWN_FAILED,
|
|
18
18
|
awaitHarness
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
import {
|
|
30
30
|
createBranch,
|
|
31
31
|
generateBranchSlug
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MOQ2IEPI.js";
|
|
33
33
|
import {
|
|
34
34
|
setSessionStatus
|
|
35
35
|
} from "./chunk-WTQRIUSK.js";
|
|
@@ -42,13 +42,13 @@ import {
|
|
|
42
42
|
import {
|
|
43
43
|
buildReviewPhase,
|
|
44
44
|
resolveReviewPhase
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MSPCQ5L7.js";
|
|
46
46
|
import {
|
|
47
47
|
resolvePlan
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-L3RJER2C.js";
|
|
49
49
|
import {
|
|
50
50
|
buildPhasePrompt
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-MG4IJB47.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-7M657DAU.js";
|
|
76
76
|
import {
|
|
77
77
|
buildFeature
|
|
78
78
|
} from "./chunk-PXQTFJ2N.js";
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-SB4BG7PH.js";
|
|
4
4
|
import {
|
|
5
5
|
run
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I3XPML6O.js";
|
|
7
7
|
import {
|
|
8
8
|
isLockedByOther
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5AJWUYA3.js";
|
|
10
10
|
import {
|
|
11
11
|
isBlocked,
|
|
12
12
|
typeLabel
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-O7X46AAU.js";
|
|
14
14
|
import {
|
|
15
15
|
loadBacklog
|
|
16
16
|
} from "./chunk-PYZUB3JT.js";
|