agent-yes 1.307.0 → 1.308.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.
Files changed (123) hide show
  1. package/README.md +53 -0
  2. package/dist/{JsonlStore-CB_0sfdT.js → JsonlStore-fEAVg5aY.js} +1 -1
  3. package/dist/SUPPORTED_CLIS-Ce_7n97m.js +12 -0
  4. package/dist/{SUPPORTED_CLIS-qL9_2DZ8.js → SUPPORTED_CLIS-DFpjQ2Ke.js} +2 -2
  5. package/dist/agent-yes.config-ByXwI-t3.js +47 -0
  6. package/dist/agentPermissions-CgM1bl6m.js +62 -0
  7. package/dist/{agentShare-C2oXrGvf.js → agentShare-Dz_T6b5v.js} +14 -14
  8. package/dist/{askCli-D4czi-_j.js → askCli-BjQOqpvv.js} +6 -6
  9. package/dist/{browser-BW90gl2w.js → browser-BzjhscIR.js} +5 -5
  10. package/dist/{browser-BAFPmEvN.js → browser-CU933aYj.js} +1 -1
  11. package/dist/{callback-ie8yyKma.js → callback-CAWItwdn.js} +5 -5
  12. package/dist/callback-oTjpUn2G.js +17 -0
  13. package/dist/{callbackCore-Deve5pv3.js → callbackCore-DoPrLOFY.js} +1 -1
  14. package/dist/{callbackCore-BZ_10zyc.js → callbackCore-TE7HjQm9.js} +1 -1
  15. package/dist/{channels-jIa5fNjY.js → channels-BGSdyeQs.js} +2 -2
  16. package/dist/{channels-Y36S0ccW.js → channels-bw-b9z0l.js} +6 -6
  17. package/dist/channels.js +5 -5
  18. package/dist/claude-DLN2dvVD.js +180 -0
  19. package/dist/cli.js +60 -15
  20. package/dist/{cmdDsh-DZ8bLsH7.js → cmdDsh-h7V2ThH5.js} +1 -1
  21. package/dist/{cmdKill-DUyZ7Dch.js → cmdKill-b5I7H8wx.js} +5 -5
  22. package/dist/{cmdPs-CfR5qCiO.js → cmdPs-RZU-tTd4.js} +14 -14
  23. package/dist/{agent-yes.config-CRfpdp3A.js → configLoader-CLSX_LND.js} +4 -42
  24. package/dist/configLoader-D9O9zwKR.js +5 -0
  25. package/dist/{configShared-De4bR5hH.js → configShared-B9gyn11R.js} +1 -1
  26. package/dist/{cwdConflictWarn-ml6Qs3Qu.js → cwdConflictWarn-BQ8vH915.js} +2 -2
  27. package/dist/{cwdPassthroughHint-CzWh0hrw.js → cwdPassthroughHint-h4dQQCLO.js} +1 -1
  28. package/dist/detach-B_n7xRl2.js +58 -0
  29. package/dist/{e2e-BdLf8DvY.js → e2e-C34A1uYu.js} +1 -1
  30. package/dist/{expose-Bhsn5yUz.js → expose-BKxcKYt-.js} +1 -1
  31. package/dist/{forceKill-BDqxx4uQ.js → forceKill-BAqKNR_f.js} +2 -2
  32. package/dist/{forkNested-DHuYbpaf.js → forkNested-CVSWfZT6.js} +3 -3
  33. package/dist/{globalPidIndex-DmDCB_X7.js → globalPidIndex-B5c_g_yJ.js} +1 -1
  34. package/dist/{globalPidIndex-C6p_AY4D.js → globalPidIndex-D9fxq9Ad.js} +10 -2
  35. package/dist/{hist-DY16wm7g.js → hist-OSUKO8sb.js} +1 -1
  36. package/dist/{html2canvas-pro.esm-Dp-JZojz.js → html2canvas-pro.esm-BW1GOcB-.js} +1 -1
  37. package/dist/{identity-D3hr59eC.js → identity-BVHHqtvP.js} +1 -1
  38. package/dist/{identity-puvd7hVQ.js → identity-CtwRW1nD.js} +1 -1
  39. package/dist/index.js +8 -8
  40. package/dist/{initMsg-GPU52N-j.js → initMsg-C1tgHfYP.js} +1 -1
  41. package/dist/{initMsg-BEVDWYnv.js → initMsg-CkrZjsX-.js} +1 -1
  42. package/dist/launch-BlKMU2ZA.js +74 -0
  43. package/dist/launch-CMran68t.js +3 -0
  44. package/dist/{messageLog-CEqe4Hk1.js → messageLog-BrXNxItW.js} +1 -1
  45. package/dist/{needsInput-hRiWFjGy.js → needsInput-B3aPVSqs.js} +1 -1
  46. package/dist/{nodeRuntime-DGMQRTGT.js → nodeRuntime-B1nCglgu.js} +1 -1
  47. package/dist/{notifyDaemon-DcAbvP43.js → notifyDaemon-Dh4cLfBU.js} +13 -13
  48. package/dist/{notifyStore-C4pH_-zJ.js → notifyStore-B7DLD83Q.js} +1 -1
  49. package/dist/{notifyStore-DIfkfKB2.js → notifyStore-CNdHlJyW.js} +1 -1
  50. package/dist/{openBrowser-CQAOIrD6.js → openBrowser-CwhGNBhv.js} +1 -1
  51. package/dist/oxmgrService-C0nYf9CD.js +3 -0
  52. package/dist/{oxmgrService-DlYHmqyI.js → oxmgrService-CBlFJ_-C.js} +2 -2
  53. package/dist/{parentLink-UiM6WoKm.js → parentLink-C2gocHk9.js} +2 -2
  54. package/dist/{parentLink-B7_kEM1v.js → parentLink-EVI_0cLu.js} +2 -2
  55. package/dist/{parentPingLoop-BYT4XgfN.js → parentPingLoop-B9QDw20l.js} +7 -7
  56. package/dist/peer-BSZQbKB7.js +4 -0
  57. package/dist/{peer-L-prov9t.js → peer-DI_xxui8.js} +3 -3
  58. package/dist/pidStore-BRU1Q0uN.js +6 -0
  59. package/dist/{pidStore-DUXifdBr.js → pidStore-DXEbQrh-.js} +3 -3
  60. package/dist/{procStats-DwTxj3rs.js → procStats-CkzFrwx7.js} +1 -1
  61. package/dist/{reaper-DsZhX5FH.js → reaper-A_eEjMxS.js} +1 -1
  62. package/dist/{reaper-C2cuougX.js → reaper-BTfq0-5j.js} +1 -1
  63. package/dist/{remotes-CAZymHd7.js → remotes-B0vw-dsd.js} +3 -3
  64. package/dist/{remotes-W6NhMDfP.js → remotes-TKXkCV76.js} +3 -3
  65. package/dist/roomReplyAlias-0xfUQlda.js +6 -0
  66. package/dist/{roomReplyAlias-B1EJft2d.js → roomReplyAlias-CkfEtW2v.js} +3 -3
  67. package/dist/runner-B1vocYOj.js +371 -0
  68. package/dist/{runningLock-DMznYh45.js → runningLock-DaVbNt4d.js} +1 -1
  69. package/dist/{rustBinary-BjsZbiv5.js → rustBinary-B603fLUa.js} +2 -2
  70. package/dist/{rustBinary-CXQGcJEm.js → rustBinary-CTEd2FnZ.js} +2 -2
  71. package/dist/{schedule-zacFV53l.js → schedule-DncJhp1d.js} +15 -15
  72. package/dist/{schedules-BvwTGXU2.js → schedules-D6hZ7VpJ.js} +1 -1
  73. package/dist/{schedulesCli-Donh0LS2.js → schedulesCli-DSBZwREE.js} +3 -3
  74. package/dist/{senderAncestry-KhAUPCQs.js → senderAncestry-Brb-cYni.js} +1 -1
  75. package/dist/{senderAncestry-CVHeKk1Y.js → senderAncestry-DqbNIecg.js} +1 -1
  76. package/dist/{serve-C38WYmzz.js → serve-BJEDb5Az.js} +52 -51
  77. package/dist/{serveRust-76_apYb8.js → serveRust-B50JWdfK.js} +3 -3
  78. package/dist/{setup-CeAisuhv.js → setup-CxQJtnmp.js} +4 -4
  79. package/dist/{share-_TPYAGWC.js → share-CPtJgXt2.js} +2 -2
  80. package/dist/{share-CbFetL5H.js → share-zVt71n2g.js} +2 -2
  81. package/dist/{shareCmd-foO5MbJp.js → shareCmd-96G551OE.js} +10 -10
  82. package/dist/{spawnGate-nUrmf4dd.js → spawnGate-BkkT7GF2.js} +3 -3
  83. package/dist/spawnGate-Ky21E51l.js +5 -0
  84. package/dist/{store-xmBpqPUq.js → store-MjCqeJDI.js} +1 -1
  85. package/dist/{subcommands-DE31Tfv_.js → subcommands-BJezWaHi.js} +455 -124
  86. package/dist/{subcommands-DLQEC24N.js → subcommands-DbdxjvFI.js} +12 -12
  87. package/dist/{systemPathLink-DI9WdoqQ.js → systemPathLink-BQE53HED.js} +1 -1
  88. package/dist/{terminal-CBbp6PfB.js → terminal-CLjXOXI7.js} +2 -2
  89. package/dist/terminal.js +1 -1
  90. package/dist/{todoAutomation-CKlrxuZv.js → todoAutomation-KgmnTAsD.js} +2 -2
  91. package/dist/{todoCli-BllShFnc.js → todoCli-ammnk6Wv.js} +6 -6
  92. package/dist/{todoIdentity-DeDp7LKl.js → todoIdentity-DzjduXlF.js} +2 -2
  93. package/dist/{todoStore-msRCEUi1.js → todoStore-Dre3Yhwt.js} +2 -2
  94. package/dist/{tray-RIjHSw7z.js → tray-C4sCiT8B.js} +2 -2
  95. package/dist/{trayApp-C9SZOPpw.js → trayApp-CZwRPF62.js} +2 -2
  96. package/dist/trayApp-UWX_Bfay.js +5 -0
  97. package/dist/{ts-CO1H1P2R.js → ts-J77_edCv.js} +20 -79
  98. package/dist/{versionChecker-CG--tQsV.js → versionChecker-DcrK7m4z.js} +2 -2
  99. package/dist/{webrtcLink-WxS1nTIs.js → webrtcLink-CGCXjlQJ.js} +2 -2
  100. package/dist/{webrtcLink-DcvacEci.js → webrtcLink-D4pMhyvY.js} +2 -2
  101. package/dist/{webrtcRemote-B4pwES4i.js → webrtcRemote-DdCC3aZC.js} +3 -3
  102. package/dist/{widget-CI7BtN94.js → widget-DU-iJOPF.js} +3 -3
  103. package/dist/widget.js +1 -1
  104. package/dist/widgets.js +5 -5
  105. package/dist/{workspaceConfig-DjEklzxf.js → workspaceConfig-BmK6COFt.js} +1 -1
  106. package/dist/{ws-DLJSBws6.js → ws-AZ6QSr2M.js} +3 -3
  107. package/dist/ws-CNd9TMOE.js +16 -0
  108. package/package.json +1 -1
  109. package/ts/cli.ts +40 -1
  110. package/ts/globalPidIndex.ts +19 -2
  111. package/ts/parseCliArgs.spec.ts +10 -0
  112. package/ts/parseCliArgs.ts +22 -0
  113. package/ts/subcommands.spec.ts +2 -2
  114. package/ts/subcommands.ts +186 -13
  115. package/dist/SUPPORTED_CLIS-BOGmmIrH.js +0 -12
  116. package/dist/callback-CNL-PGwh.js +0 -17
  117. package/dist/oxmgrService-o9L3I6FX.js +0 -3
  118. package/dist/peer-3F7owPWt.js +0 -4
  119. package/dist/pidStore-B89BOF_T.js +0 -6
  120. package/dist/roomReplyAlias-BeGVkAlc.js +0 -6
  121. package/dist/spawnGate-DhPgMs0Y.js +0 -5
  122. package/dist/trayApp-BSOmax2E.js +0 -5
  123. package/dist/ws-W5nWHjDt.js +0 -16
@@ -1,15 +1,15 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import "./JsonlStore-CB_0sfdT.js";
3
- import "./globalPidIndex-C6p_AY4D.js";
4
- import "./pidStore-DUXifdBr.js";
5
- import "./messageLog-CEqe4Hk1.js";
6
- import "./e2e-BdLf8DvY.js";
7
- import "./configShared-De4bR5hH.js";
8
- import { $ as readNotes, A as inspectSubmission, B as isUnknownManagerToken, C as envelopeAttribution, D as extractNeedsInput, E as extractMenu, F as isExitRequest, G as listRecords, H as isUserTyping, I as isPidAlive, J as ownedCollapsedPaste, K as matchKeyword, L as isSlashCommand, M as isAgentIdShaped, N as isAgentStuck, O as extractTaskCounts, P as isBareManagerInvocation, Q as readLogForRender, R as isSubcommand, S as enableRenderDiskCache, T as extractBadges, U as lastReadAt, V as isUnreachableWriteErrno, W as lastStdinAt, X as readAgentPtysize, Y as probeStdinReachable, Z as readComposerState, _ as cursorAbs, _t as submitStableDraft, a as READ_PAGE_DEFAULT, at as renderRawLogLines, b as deriveLiveStatus, bt as writeKeysPaced, c as SEND_EXIT_QUEUED, ct as resolveResumeArgs, d as backoffWhileTyping, dt as saveRenderDisk, et as readPtysize, f as buildEnvelope, ft as sendPayloadCapError, g as controlCodeFromName, gt as submitAndConfirm, h as confirmStdinUnreachable, ht as stopTipForCli, i as MAX_RENDER_BYTES, it as renderRawLog, j as interruptSendTarget, k as finalizedLines, l as SEND_EXIT_UNREACHABLE, lt as restartHintLines, m as cmdHelp, mt as stdinActivityPath, n as DRAFT_STABLE_WAITS_MS, nt as recentReadEdges, o as READ_WINDOW_MS, ot as resolveOne, p as cliDefaults, pt as snapshotStatus, q as menuSelectKeys, r as GRACEFUL_EXIT_COMMANDS, rt as renderLogTailLines, s as SEND_BODY_MAX_CHARS, st as resolveReadWindow, t as COMPOSER_WINDOWS, tt as recentMessageEdges, u as TYPING_WINDOW_MS, ut as runSubcommand, v as cwdLabel, vt as suggestAgents, w as envelopeCostFor, x as drainerLauncher, xt as writeToIpc, y as deriveLiveState, yt as waitForLogQuiet, z as isSubmitCode } from "./subcommands-DE31Tfv_.js";
9
- import "./webrtcLink-DcvacEci.js";
10
- import "./remotes-CAZymHd7.js";
11
- import "./roomReplyAlias-B1EJft2d.js";
12
- import "./notifyStore-DIfkfKB2.js";
13
- import "./senderAncestry-CVHeKk1Y.js";
2
+ import "./JsonlStore-fEAVg5aY.js";
3
+ import "./globalPidIndex-D9fxq9Ad.js";
4
+ import "./pidStore-DXEbQrh-.js";
5
+ import "./messageLog-BrXNxItW.js";
6
+ import "./e2e-C34A1uYu.js";
7
+ import "./configShared-B9gyn11R.js";
8
+ import { $ as readNotes, A as inspectSubmission, B as isUnknownManagerToken, C as envelopeAttribution, D as extractNeedsInput, E as extractMenu, F as isExitRequest, G as listRecords, H as isUserTyping, I as isPidAlive, J as ownedCollapsedPaste, K as matchKeyword, L as isSlashCommand, M as isAgentIdShaped, N as isAgentStuck, O as extractTaskCounts, P as isBareManagerInvocation, Q as readLogForRender, R as isSubcommand, S as enableRenderDiskCache, T as extractBadges, U as lastReadAt, V as isUnreachableWriteErrno, W as lastStdinAt, X as readAgentPtysize, Y as probeStdinReachable, Z as readComposerState, _ as cursorAbs, _t as submitStableDraft, a as READ_PAGE_DEFAULT, at as renderRawLogLines, b as deriveLiveStatus, bt as writeKeysPaced, c as SEND_EXIT_QUEUED, ct as resolveResumeArgs, d as backoffWhileTyping, dt as saveRenderDisk, et as readPtysize, f as buildEnvelope, ft as sendPayloadCapError, g as controlCodeFromName, gt as submitAndConfirm, h as confirmStdinUnreachable, ht as stopTipForCli, i as MAX_RENDER_BYTES, it as renderRawLog, j as interruptSendTarget, k as finalizedLines, l as SEND_EXIT_UNREACHABLE, lt as restartHintLines, m as cmdHelp, mt as stdinActivityPath, n as DRAFT_STABLE_WAITS_MS, nt as recentReadEdges, o as READ_WINDOW_MS, ot as resolveOne, p as cliDefaults, pt as snapshotStatus, q as menuSelectKeys, r as GRACEFUL_EXIT_COMMANDS, rt as renderLogTailLines, s as SEND_BODY_MAX_CHARS, st as resolveReadWindow, t as COMPOSER_WINDOWS, tt as recentMessageEdges, u as TYPING_WINDOW_MS, ut as runSubcommand, v as cwdLabel, vt as suggestAgents, w as envelopeCostFor, x as drainerLauncher, xt as writeToIpc, y as deriveLiveState, yt as waitForLogQuiet, z as isSubmitCode } from "./subcommands-BJezWaHi.js";
9
+ import "./webrtcLink-D4pMhyvY.js";
10
+ import "./remotes-B0vw-dsd.js";
11
+ import "./roomReplyAlias-CkfEtW2v.js";
12
+ import "./notifyStore-CNdHlJyW.js";
13
+ import "./senderAncestry-DqbNIecg.js";
14
14
 
15
15
  export { READ_WINDOW_MS, cmdHelp, isBareManagerInvocation, isPidAlive, isSubcommand, isUnknownManagerToken, lastReadAt, runSubcommand };
@@ -88,4 +88,4 @@ function linkBunBinsToSystemPath(opts) {
88
88
 
89
89
  //#endregion
90
90
  export { linkBunBinsToSystemPath };
91
- //# sourceMappingURL=systemPathLink-DI9WdoqQ.js.map
91
+ //# sourceMappingURL=systemPathLink-BQE53HED.js.map
@@ -98,7 +98,7 @@ async function cmdTermMint(args) {
98
98
  if (flags.ro && flags.interactive) throw new Error("--ro and --interactive are mutually exclusive");
99
99
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
100
100
  const canSend = flags.interactive === true;
101
- const { mintScopedTermToken } = await import("./serve-C38WYmzz.js");
101
+ const { mintScopedTermToken } = await import("./serve-BJEDb5Az.js");
102
102
  const r = await mintScopedTermToken(pid, {
103
103
  ttlSec,
104
104
  canSend
@@ -135,4 +135,4 @@ async function cmdTerm(args) {
135
135
 
136
136
  //#endregion
137
137
  export { cmdTerm };
138
- //# sourceMappingURL=terminal-CBbp6PfB.js.map
138
+ //# sourceMappingURL=terminal-CLjXOXI7.js.map
package/dist/terminal.js CHANGED
@@ -1,3 +1,3 @@
1
- import { t as AyTerminal } from "./browser-BAFPmEvN.js";
1
+ import { t as AyTerminal } from "./browser-CU933aYj.js";
2
2
 
3
3
  export { AyTerminal, AyTerminal as default };
@@ -1,4 +1,4 @@
1
- import { i as DONE_STATE, o as ORPHANED_STATE, p as transitionsOf } from "./todoStore-msRCEUi1.js";
1
+ import { i as DONE_STATE, o as ORPHANED_STATE, p as transitionsOf } from "./todoStore-Dre3Yhwt.js";
2
2
 
3
3
  //#region ts/removeControlCharacters.ts
4
4
  const ESC = String.fromCharCode(27);
@@ -299,4 +299,4 @@ function reconcileTodos(tasks, agents, registeredGates) {
299
299
 
300
300
  //#endregion
301
301
  export { renderTree as a, describeBlock as c, renderDigest as i, monitorHint as l, buildTreeJSON as n, unblockedTasks as o, openBlockers as r, blockedOnAgent as s, reconcileTodos as t, removeControlCharacters as u };
302
- //# sourceMappingURL=todoAutomation-CKlrxuZv.js.map
302
+ //# sourceMappingURL=todoAutomation-KgmnTAsD.js.map
@@ -1,9 +1,9 @@
1
1
  import "./logger-CDIsZ-Pp.js";
2
- import { a as renderTree, c as describeBlock, i as renderDigest, n as buildTreeJSON, o as unblockedTasks, s as blockedOnAgent, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-CKlrxuZv.js";
3
- import "./JsonlStore-CB_0sfdT.js";
4
- import { o as readGlobalPids } from "./globalPidIndex-C6p_AY4D.js";
5
- import { a as LIFECYCLES, l as isKnownKind, r as openStore, t as CycleError } from "./todoStore-msRCEUi1.js";
6
- import { a as resolveTodoRoot, i as resolveSelf, n as SELF_OWNER, r as ownerLiveness, t as NO_OWNER } from "./todoIdentity-DeDp7LKl.js";
2
+ import { a as renderTree, c as describeBlock, i as renderDigest, n as buildTreeJSON, o as unblockedTasks, s as blockedOnAgent, t as reconcileTodos, u as removeControlCharacters } from "./todoAutomation-KgmnTAsD.js";
3
+ import "./JsonlStore-fEAVg5aY.js";
4
+ import { o as readGlobalPids } from "./globalPidIndex-D9fxq9Ad.js";
5
+ import { a as LIFECYCLES, l as isKnownKind, r as openStore, t as CycleError } from "./todoStore-Dre3Yhwt.js";
6
+ import { a as resolveTodoRoot, i as resolveSelf, n as SELF_OWNER, r as ownerLiveness, t as NO_OWNER } from "./todoIdentity-DzjduXlF.js";
7
7
  import yargs from "yargs";
8
8
 
9
9
  //#region ts/todoCli.ts
@@ -583,4 +583,4 @@ async function runTodoSubcommand(rest0) {
583
583
 
584
584
  //#endregion
585
585
  export { runTodoSubcommand };
586
- //# sourceMappingURL=todoCli-BllShFnc.js.map
586
+ //# sourceMappingURL=todoCli-ammnk6Wv.js.map
@@ -1,4 +1,4 @@
1
- import { o as readGlobalPids } from "./globalPidIndex-C6p_AY4D.js";
1
+ import { o as readGlobalPids } from "./globalPidIndex-D9fxq9Ad.js";
2
2
  import { execFile } from "child_process";
3
3
  import path from "path";
4
4
  import { promisify } from "util";
@@ -135,4 +135,4 @@ function ownerLiveness(owner, agents) {
135
135
 
136
136
  //#endregion
137
137
  export { resolveTodoRoot as a, resolveSelf as i, SELF_OWNER as n, ownerLiveness as r, NO_OWNER as t };
138
- //# sourceMappingURL=todoIdentity-DeDp7LKl.js.map
138
+ //# sourceMappingURL=todoIdentity-DzjduXlF.js.map
@@ -1,4 +1,4 @@
1
- import { t as JsonlStore } from "./JsonlStore-CB_0sfdT.js";
1
+ import { t as JsonlStore } from "./JsonlStore-fEAVg5aY.js";
2
2
  import path from "path";
3
3
  import { lock } from "proper-lockfile";
4
4
 
@@ -741,4 +741,4 @@ async function openStore(projectRoot) {
741
741
 
742
742
  //#endregion
743
743
  export { LIFECYCLES as a, initialState as c, requiredGate as d, statesOf as f, DONE_STATE as i, isKnownKind as l, TodoStore as n, ORPHANED_STATE as o, transitionsOf as p, openStore as r, canTransition as s, CycleError as t, nextStates as u };
744
- //# sourceMappingURL=todoStore-msRCEUi1.js.map
744
+ //# sourceMappingURL=todoStore-Dre3Yhwt.js.map
@@ -1,4 +1,4 @@
1
- import { n as getRunningAgentCount } from "./runningLock-DMznYh45.js";
1
+ import { n as getRunningAgentCount } from "./runningLock-DaVbNt4d.js";
2
2
  import { existsSync } from "fs";
3
3
  import { mkdir, readFile, unlink, writeFile } from "fs/promises";
4
4
  import { homedir } from "os";
@@ -187,4 +187,4 @@ async function startTray() {
187
187
 
188
188
  //#endregion
189
189
  export { ensureTray, startTray };
190
- //# sourceMappingURL=tray-RIjHSw7z.js.map
190
+ //# sourceMappingURL=tray-C4sCiT8B.js.map
@@ -1,4 +1,4 @@
1
- import { u as findTrayLauncher } from "./rustBinary-CXQGcJEm.js";
1
+ import { u as findTrayLauncher } from "./rustBinary-CTEd2FnZ.js";
2
2
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
3
3
  import { existsSync } from "node:fs";
4
4
  import path from "node:path";
@@ -97,4 +97,4 @@ async function cmdTray(args) {
97
97
 
98
98
  //#endregion
99
99
  export { trayHiddenMarker as a, launchTray as i, hasDesktop as n, isTrayHidden as r, cmdTray as t };
100
- //# sourceMappingURL=trayApp-C9SZOPpw.js.map
100
+ //# sourceMappingURL=trayApp-CZwRPF62.js.map
@@ -0,0 +1,5 @@
1
+ import "./versionChecker-DcrK7m4z.js";
2
+ import "./rustBinary-CTEd2FnZ.js";
3
+ import { a as trayHiddenMarker, i as launchTray, n as hasDesktop, r as isTrayHidden, t as cmdTray } from "./trayApp-CZwRPF62.js";
4
+
5
+ export { cmdTray };
@@ -1,19 +1,20 @@
1
1
  import { n as __esmMin, r as __exportAll } from "./chunk-cZBX9HZv.js";
2
2
  import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
3
- import { i as getInstalledPackage } from "./versionChecker-CG--tQsV.js";
3
+ import { i as getInstalledPackage } from "./versionChecker-DcrK7m4z.js";
4
4
  import { t as agentYesHome } from "./agentYesHome-JmJC28YX.js";
5
- import { u as removeControlCharacters } from "./todoAutomation-CKlrxuZv.js";
6
- import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DMznYh45.js";
7
- import { o as readGlobalPids } from "./globalPidIndex-C6p_AY4D.js";
8
- import { t as PidStore } from "./pidStore-DUXifdBr.js";
9
- import { r as recordInbox } from "./messageLog-CEqe4Hk1.js";
10
- import { n as register, r as sweep } from "./reaper-C2cuougX.js";
11
- import { a as LIFECYCLES, r as openStore } from "./todoStore-msRCEUi1.js";
5
+ import { u as removeControlCharacters } from "./todoAutomation-KgmnTAsD.js";
6
+ import { i as stripClaudeSessionPin, t as derivePermissions } from "./agentPermissions-CgM1bl6m.js";
7
+ import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-DaVbNt4d.js";
8
+ import { o as readGlobalPids } from "./globalPidIndex-D9fxq9Ad.js";
9
+ import { t as PidStore } from "./pidStore-DXEbQrh-.js";
10
+ import { r as recordInbox } from "./messageLog-BrXNxItW.js";
11
+ import { n as register, r as sweep } from "./reaper-BTfq0-5j.js";
12
+ import { a as LIFECYCLES, r as openStore } from "./todoStore-Dre3Yhwt.js";
12
13
  import { accessSync, constants, existsSync, statSync } from "node:fs";
13
14
  import path from "node:path";
14
15
  import { arch, platform } from "process";
15
16
  import { execSync } from "child_process";
16
- import { closeSync, constants as constants$1, createReadStream, existsSync as existsSync$1, mkdirSync as mkdirSync$1, openSync } from "fs";
17
+ import { closeSync as closeSync$1, constants as constants$1, createReadStream, existsSync as existsSync$1, mkdirSync as mkdirSync$1, openSync as openSync$1 } from "fs";
17
18
  import { mkdir, open, readFile, readdir, stat, unlink, writeFile } from "fs/promises";
18
19
  import { homedir } from "os";
19
20
  import path$1, { dirname, join } from "path";
@@ -344,23 +345,6 @@ try {
344
345
  const ptyPackage = globalThis.Bun ? "bun-pty" : "node-pty";
345
346
  var pty_default = pty;
346
347
 
347
- //#endregion
348
- //#region ts/sessionEnv.ts
349
- const CLAUDE_SESSION_PIN_ENV = [
350
- "CLAUDECODE",
351
- "CLAUDE_CODE_SSE_PORT",
352
- "CLAUDE_CODE_SESSION_ID",
353
- "CLAUDE_CODE_CHILD_SESSION",
354
- "CLAUDE_CODE_ENTRYPOINT"
355
- ];
356
- /** Delete the parent Claude Code session-pin vars from a mutable env map, in
357
- * place. Idempotent (a no-op when they're already absent, e.g. a console spawn
358
- * whose env came from freshAgentEnv). Returns the same object for chaining. */
359
- function stripClaudeSessionPin(env) {
360
- for (const k of CLAUDE_SESSION_PIN_ENV) delete env[k];
361
- return env;
362
- }
363
-
364
348
  //#endregion
365
349
  //#region ts/beta/fifo.ts
366
350
  /**
@@ -467,14 +451,14 @@ async function createLinuxFifo(cli, customPath) {
467
451
  logger.info(`[${cli}-yes] Created FIFO at ${fifoPath}`);
468
452
  try {
469
453
  fifoStream = createReadStream("", {
470
- fd: openSync(fifoPath, constants$1.O_RDONLY | constants$1.O_NONBLOCK),
454
+ fd: openSync$1(fifoPath, constants$1.O_RDONLY | constants$1.O_NONBLOCK),
471
455
  autoClose: true
472
456
  });
473
- const dummyWriteFd = openSync(fifoPath, constants$1.O_WRONLY | constants$1.O_NONBLOCK);
457
+ const dummyWriteFd = openSync$1(fifoPath, constants$1.O_WRONLY | constants$1.O_NONBLOCK);
474
458
  logger.info(`[${cli}-yes] FIFO opened for reading`);
475
459
  const cleanupFifo = async () => {
476
460
  try {
477
- closeSync(dummyWriteFd);
461
+ closeSync$1(dummyWriteFd);
478
462
  } catch {}
479
463
  if (fifoStream) try {
480
464
  fifoStream.close();
@@ -1439,49 +1423,6 @@ async function notifyWebhook(status, details, cwd = process.cwd()) {
1439
1423
  }
1440
1424
  }
1441
1425
 
1442
- //#endregion
1443
- //#region ts/agentPermissions.ts
1444
- /**
1445
- * Flags that disable a CLI's confirmation gate, recognised regardless of what
1446
- * `yesArgs` the config declares.
1447
- *
1448
- * The configured `yesArgs` are the flags `-y` APPENDS; a user is free to pass
1449
- * the same flag directly, and a config that omits `yesArgs` entirely (some CLIs
1450
- * deliberately have none) must not make a genuinely dangerous flag invisible.
1451
- * So the check is the union: configured flags OR any of these.
1452
- */
1453
- const DANGEROUS_FLAGS = new Set([
1454
- "--dangerously-skip-permissions",
1455
- "--dangerously-bypass-approvals-and-sandbox",
1456
- "--yolo",
1457
- "--full-auto"
1458
- ]);
1459
- /** `--flag=value` and `--flag value` must compare equal — match on the flag part. */
1460
- function flagName(arg) {
1461
- const eq = arg.indexOf("=");
1462
- return eq === -1 ? arg : arg.slice(0, eq);
1463
- }
1464
- function derivePermissions(opts) {
1465
- const configured = new Set((opts.yesArgs ?? []).map(flagName).filter(Boolean));
1466
- return {
1467
- skip_permissions: opts.cliArgs.some((a) => {
1468
- const name = flagName(a);
1469
- return configured.has(name) || DANGEROUS_FLAGS.has(name);
1470
- }),
1471
- robust: Boolean(opts.robust),
1472
- auto_continue: Boolean(opts.autoContinue)
1473
- };
1474
- }
1475
- /**
1476
- * One-word posture for a badge. `skip` is the only one that changes what the
1477
- * agent is ALLOWED to do; the wrapper flags change only how it recovers, so
1478
- * they never soften the label.
1479
- */
1480
- function permissionBadge(p) {
1481
- if (!p) return null;
1482
- return p.skip_permissions ? "skip" : "prompt";
1483
- }
1484
-
1485
1426
  //#endregion
1486
1427
  //#region ts/askApi.ts
1487
1428
  /**
@@ -1599,7 +1540,7 @@ async function compactRawLogTail(logPath, keepBytes = RAW_LOG_KEEP_BYTES) {
1599
1540
  await fh.close();
1600
1541
  }
1601
1542
  }
1602
- const config = await import("./agent-yes.config-CRfpdp3A.js").then((mod) => mod.default || mod);
1543
+ const config = await import("./agent-yes.config-ByXwI-t3.js").then((mod) => mod.default || mod);
1603
1544
  const CLIS_CONFIG = config.clis;
1604
1545
  /**
1605
1546
  * Main function to run agent-cli with automatic yes/no responses
@@ -1672,11 +1613,11 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
1672
1613
  })();
1673
1614
  const originalPrompt = prompt;
1674
1615
  if (prompt && inheritedParentPid) try {
1675
- const { resolveSpawner } = await import("./parentLink-B7_kEM1v.js");
1616
+ const { resolveSpawner } = await import("./parentLink-EVI_0cLu.js");
1676
1617
  const spawner = await resolveSpawner(inheritedParentPid);
1677
1618
  if (spawner) {
1678
- const { buildInitMsg } = await import("./initMsg-GPU52N-j.js");
1679
- const { formatIdentity } = await import("./identity-D3hr59eC.js");
1619
+ const { buildInitMsg } = await import("./initMsg-C1tgHfYP.js");
1620
+ const { formatIdentity } = await import("./identity-BVHHqtvP.js");
1680
1621
  const identity = formatIdentity({
1681
1622
  cwd: spawner.cwd,
1682
1623
  pid: spawner.pid
@@ -2155,7 +2096,7 @@ async function agentYes({ cli, cliArgs = [], skipPermissions = false, prompt, ro
2155
2096
  }, 100);
2156
2097
  const cleanupHeartbeat = () => clearInterval(heartbeatInterval);
2157
2098
  shell.onExit(cleanupHeartbeat);
2158
- const { startParentPingLoop } = await import("./parentPingLoop-BYT4XgfN.js");
2099
+ const { startParentPingLoop } = await import("./parentPingLoop-B9QDw20l.js");
2159
2100
  const parentPingLoop = startParentPingLoop({
2160
2101
  parentPid,
2161
2102
  selfWrapperPid: process.pid,
@@ -2417,5 +2358,5 @@ function sleep(ms) {
2417
2358
  }
2418
2359
 
2419
2360
  //#endregion
2420
- export { hasTodoStore as a, permissionBadge as c, answerAsk as i, AgentContext as l, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t, CLAUDE_SESSION_PIN_ENV as u };
2421
- //# sourceMappingURL=ts-CO1H1P2R.js.map
2361
+ export { hasTodoStore as a, AgentContext as c, answerAsk as i, agentYes as n, listAsks as o, config as r, listAsksForProject as s, CLIS_CONFIG as t };
2362
+ //# sourceMappingURL=ts-J77_edCv.js.map
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  //#region package.json
9
9
  var name = "agent-yes";
10
- var version = "1.307.0";
10
+ var version = "1.308.0";
11
11
 
12
12
  //#endregion
13
13
  //#region ts/versionChecker.ts
@@ -285,4 +285,4 @@ async function displayVersion() {
285
285
 
286
286
  //#endregion
287
287
  export { versionString as a, getInstalledPackage as i, compareVersions as n, displayVersion as r, checkAndAutoUpdate as t };
288
- //# sourceMappingURL=versionChecker-CG--tQsV.js.map
288
+ //# sourceMappingURL=versionChecker-DcrK7m4z.js.map
@@ -1,4 +1,4 @@
1
- import "./e2e-BdLf8DvY.js";
2
- import { a as parseWebrtcLink, i as isWebrtcSpec, n as SIGNAL_SUBPROTOCOL, o as toWebrtcUrl, r as hasJoinSecret, t as DEFAULT_SIGHOST } from "./webrtcLink-DcvacEci.js";
1
+ import "./e2e-C34A1uYu.js";
2
+ import { a as parseWebrtcLink, i as isWebrtcSpec, n as SIGNAL_SUBPROTOCOL, o as toWebrtcUrl, r as hasJoinSecret, t as DEFAULT_SIGHOST } from "./webrtcLink-D4pMhyvY.js";
3
3
 
4
4
  export { parseWebrtcLink };
@@ -1,4 +1,4 @@
1
- import { u as parseSecret } from "./e2e-BdLf8DvY.js";
1
+ import { u as parseSecret } from "./e2e-C34A1uYu.js";
2
2
 
3
3
  //#region ts/webrtcLink.ts
4
4
  const SIGNAL_SUBPROTOCOL = "ay-signal-1";
@@ -87,4 +87,4 @@ function isWebrtcSpec(spec) {
87
87
 
88
88
  //#endregion
89
89
  export { parseWebrtcLink as a, isWebrtcSpec as i, SIGNAL_SUBPROTOCOL as n, toWebrtcUrl as o, hasJoinSecret as r, DEFAULT_SIGHOST as t };
90
- //# sourceMappingURL=webrtcLink-DcvacEci.js.map
90
+ //# sourceMappingURL=webrtcLink-D4pMhyvY.js.map
@@ -1,5 +1,5 @@
1
- import { a as computeTranscriptHash, c as open, d as randomHex, f as seal, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, s as deriveDirKeys } from "./e2e-BdLf8DvY.js";
2
- import { a as parseWebrtcLink, i as isWebrtcSpec, n as SIGNAL_SUBPROTOCOL } from "./webrtcLink-DcvacEci.js";
1
+ import { a as computeTranscriptHash, c as open, d as randomHex, f as seal, l as packEnvelope, n as FLAG_CONFIRM, o as deriveAuthToken, p as unpackEnvelope, s as deriveDirKeys } from "./e2e-C34A1uYu.js";
2
+ import { a as parseWebrtcLink, i as isWebrtcSpec, n as SIGNAL_SUBPROTOCOL } from "./webrtcLink-D4pMhyvY.js";
3
3
  import { hostname } from "os";
4
4
  import { RTCPeerConnection } from "node-datachannel/polyfill";
5
5
 
@@ -680,4 +680,4 @@ async function startWebrtcBridge(link, opts = {}) {
680
680
 
681
681
  //#endregion
682
682
  export { startWebrtcBridge };
683
- //# sourceMappingURL=webrtcRemote-B4pwES4i.js.map
683
+ //# sourceMappingURL=webrtcRemote-DdCC3aZC.js.map
@@ -28,7 +28,7 @@ function parseFlags(args, known) {
28
28
  }
29
29
  /** Resolve the local daemon base URL + token (flags override discovery). */
30
30
  async function daemonTarget(flags) {
31
- const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-C38WYmzz.js");
31
+ const { resolveDaemonHttpBase, loadTokenReadOnly } = await import("./serve-BJEDb5Az.js");
32
32
  const base = typeof flags.base === "string" ? flags.base : await resolveDaemonHttpBase();
33
33
  if (!base) throw new Error("no running ay serve daemon found — start `ay serve` or pass --base <url> (e.g. http://127.0.0.1:PORT)");
34
34
  const token = typeof flags.token === "string" ? flags.token : await loadTokenReadOnly() ?? "";
@@ -186,7 +186,7 @@ async function cmdMint(args) {
186
186
  const bad = caps.filter((c) => !KNOWN_CAPS.has(c));
187
187
  if (bad.length) throw new Error(`unknown cap(s): ${bad.join(", ")} (valid: ${[...KNOWN_CAPS].join(", ")})`);
188
188
  const ttlSec = parseTtlSec(typeof flags.ttl === "string" ? flags.ttl : "15m");
189
- const { mintScopedTermToken } = await import("./serve-C38WYmzz.js");
189
+ const { mintScopedTermToken } = await import("./serve-BJEDb5Az.js");
190
190
  const r = await mintScopedTermToken(target, {
191
191
  ttlSec,
192
192
  caps
@@ -202,4 +202,4 @@ async function cmdMint(args) {
202
202
 
203
203
  //#endregion
204
204
  export { cmdMint, cmdWidget };
205
- //# sourceMappingURL=widget-CI7BtN94.js.map
205
+ //# sourceMappingURL=widget-DU-iJOPF.js.map
package/dist/widget.js CHANGED
@@ -142,7 +142,7 @@ var AyWidget = class {
142
142
  }
143
143
  async h2c(el, viewport, rect, unclipSelector) {
144
144
  const g = globalThis;
145
- const mod = await import("./html2canvas-pro.esm-Dp-JZojz.js");
145
+ const mod = await import("./html2canvas-pro.esm-BW1GOcB-.js");
146
146
  const html2canvas = mod.default ?? mod;
147
147
  const opts = {
148
148
  backgroundColor: viewport ? "#ffffff" : null,
package/dist/widgets.js CHANGED
@@ -1,8 +1,8 @@
1
- import "./e2e-BdLf8DvY.js";
2
- import "./channels-jIa5fNjY.js";
3
- import "./peer-L-prov9t.js";
4
- import { t as AyChannel } from "./browser-BW90gl2w.js";
5
- import { t as AyTerminal } from "./browser-BAFPmEvN.js";
1
+ import "./e2e-C34A1uYu.js";
2
+ import "./channels-BGSdyeQs.js";
3
+ import "./peer-DI_xxui8.js";
4
+ import { t as AyChannel } from "./browser-BzjhscIR.js";
5
+ import { t as AyTerminal } from "./browser-CU933aYj.js";
6
6
  import { AyWidget } from "./widget.js";
7
7
 
8
8
  export { AyChannel, AyTerminal, AyWidget };
@@ -215,4 +215,4 @@ function allowsSkipPermissions() {
215
215
 
216
216
  //#endregion
217
217
  export { getProvisionRoot as a, getWorkspaceRoot as c, isProvisionAllowed as d, resolveSpawnCwd as f, getProvisionHook as i, hasProvisionHook as l, getMaxAgents as n, getSpawnHook as o, setWorkspaceRoot as p, getMinFreeMb as r, getSpawnWaitMs as s, allowsSkipPermissions as t, hasSpawnHook as u };
218
- //# sourceMappingURL=workspaceConfig-DjEklzxf.js.map
218
+ //# sourceMappingURL=workspaceConfig-BmK6COFt.js.map
@@ -1,5 +1,5 @@
1
- import { G as listRecords } from "./subcommands-DE31Tfv_.js";
2
- import { a as getProvisionRoot } from "./workspaceConfig-DjEklzxf.js";
1
+ import { G as listRecords } from "./subcommands-BJezWaHi.js";
2
+ import { a as getProvisionRoot } from "./workspaceConfig-BmK6COFt.js";
3
3
  import { existsSync } from "fs";
4
4
  import { lstat, opendir } from "fs/promises";
5
5
  import path from "path";
@@ -424,4 +424,4 @@ async function cmdWs(args) {
424
424
 
425
425
  //#endregion
426
426
  export { isPathInside as a, walkWorkspaces as c, importProvisionModule as i, workspaceStatus as l, cmdWs as n, loadProvision as o, collectWorkspaces as r, resolveOperand as s, WS_JSON_SCHEMA as t };
427
- //# sourceMappingURL=ws-DLJSBws6.js.map
427
+ //# sourceMappingURL=ws-AZ6QSr2M.js.map
@@ -0,0 +1,16 @@
1
+ import "./logger-CDIsZ-Pp.js";
2
+ import "./JsonlStore-fEAVg5aY.js";
3
+ import "./globalPidIndex-D9fxq9Ad.js";
4
+ import "./pidStore-DXEbQrh-.js";
5
+ import "./messageLog-BrXNxItW.js";
6
+ import "./e2e-C34A1uYu.js";
7
+ import "./configShared-B9gyn11R.js";
8
+ import "./subcommands-BJezWaHi.js";
9
+ import "./webrtcLink-D4pMhyvY.js";
10
+ import "./remotes-B0vw-dsd.js";
11
+ import "./roomReplyAlias-CkfEtW2v.js";
12
+ import "./notifyStore-CNdHlJyW.js";
13
+ import "./senderAncestry-DqbNIecg.js";
14
+ import { a as isPathInside, c as walkWorkspaces, i as importProvisionModule, l as workspaceStatus, n as cmdWs, o as loadProvision, r as collectWorkspaces, s as resolveOperand, t as WS_JSON_SCHEMA } from "./ws-AZ6QSr2M.js";
15
+
16
+ export { WS_JSON_SCHEMA, cmdWs, collectWorkspaces, isPathInside, loadProvision, walkWorkspaces, workspaceStatus };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-yes",
3
- "version": "1.307.0",
3
+ "version": "1.308.0",
4
4
  "description": "A wrapper tool that automates interactions with various AI CLI tools by automatically handling common prompts and responses.",
5
5
  "keywords": [
6
6
  "ai",
package/ts/cli.ts CHANGED
@@ -91,6 +91,17 @@ logger.info(versionString());
91
91
 
92
92
  // Parse CLI arguments (no choices validation — SUPPORTED_CLIS loaded lazily below)
93
93
  const config = parseCliArgs(process.argv);
94
+ const { loadCascadingConfig } = await import("./configLoader.ts");
95
+ const { planClaudeStream } = await import("./stream/launch.ts");
96
+ const streamCliConfig = (await loadCascadingConfig()).clis?.[config.cli];
97
+ if (config.stream && config.cli !== "claude")
98
+ throw new Error("--stream currently supports claude only");
99
+ const streamLaunch = planClaudeStream(
100
+ config.cli,
101
+ [...(streamCliConfig?.defaultArgs ?? []), ...config.nativeArgs],
102
+ config.explicitPrompt,
103
+ config.stream,
104
+ );
94
105
 
95
106
  // --detach is implemented by the Rust-runtime fork below (same path as a nested
96
107
  // agent's fork-by-default). Refuse the contradictions up front rather than
@@ -109,7 +120,7 @@ if (config.detach && (config.attach || process.env.AGENT_YES_ATTACH === "1")) {
109
120
  console.error("--detach and --attach (or AGENT_YES_ATTACH=1) contradict each other.");
110
121
  process.exit(1);
111
122
  }
112
- if (config.detach && !config.useRust) {
123
+ if (config.detach && !config.useRust && !streamLaunch) {
113
124
  console.error("--detach needs the Rust runtime (drop --no-rust / AGENT_YES_NO_RUST).");
114
125
  process.exit(1);
115
126
  }
@@ -158,6 +169,34 @@ if (!config.showVersion && !config.appendPrompt && !config.tray) {
158
169
  await warnIfCwdOccupied(process.argv);
159
170
  }
160
171
 
172
+ // Native stream launches bypass PTY prompt/envelope construction entirely.
173
+ if (streamLaunch) {
174
+ const { runStream } = await import("./stream/runner.ts");
175
+ const args = [...streamLaunch.args];
176
+ if (config.skipPermissions) args.push("--dangerously-skip-permissions");
177
+ if (config.resume) args.push("--continue");
178
+ if (config.detach) {
179
+ const { detachStream } = await import("./stream/detach.ts");
180
+ const record = await detachStream({
181
+ entry: process.argv[1]!,
182
+ args: process.argv.slice(2),
183
+ cwd: config.cwd,
184
+ });
185
+ console.log(`Spawned ${record.cli} stream session as pid ${record.pid}.`);
186
+ console.log(` ay tail ${record.pid}\n ay send ${record.pid} "message"`);
187
+ process.exit(0);
188
+ }
189
+ process.exit(
190
+ await runStream({
191
+ ...config,
192
+ ...streamLaunch,
193
+ cliArgs: args,
194
+ binary: streamCliConfig?.binary,
195
+ input: process.stdin.isTTY ? undefined : process.stdin,
196
+ }),
197
+ );
198
+ }
199
+
161
200
  // Handle --rust: spawn the Rust binary instead, fall back to TypeScript if unavailable
162
201
  if (config.useRust) {
163
202
  let rustBinary: string | undefined;
@@ -28,6 +28,7 @@ import { logger } from "./logger.ts";
28
28
  */
29
29
 
30
30
  export interface GlobalPidRecord {
31
+ mode?: "pty" | "stream";
31
32
  pid: number;
32
33
  cli: string;
33
34
  prompt: string | null;
@@ -137,7 +138,7 @@ export async function appendGlobalPid(record: GlobalPidRecord): Promise<void> {
137
138
  export async function updateGlobalPidStatus(
138
139
  pid: number,
139
140
  patch: Partial<
140
- Pick<GlobalPidRecord, "status" | "exit_code" | "exit_reason" | "log_file" | "title">
141
+ Pick<GlobalPidRecord, "status" | "exit_code" | "exit_reason" | "log_file" | "title" | "mode">
141
142
  >,
142
143
  ): Promise<void> {
143
144
  const file = resolveGlobalFile(); // capture at call time (see withLock)
@@ -190,7 +191,23 @@ export async function readGlobalPids(
190
191
  liveOnly?: boolean;
191
192
  } = {},
192
193
  ): Promise<GlobalPidRecord[]> {
193
- const records = await readGlobalPidsRaw();
194
+ const records = await Promise.all(
195
+ (await readGlobalPidsRaw()).map(async (record) => {
196
+ if (
197
+ record.mode != null ||
198
+ typeof record.cwd !== "string" ||
199
+ typeof record.started_at !== "number"
200
+ )
201
+ return record;
202
+ // Older Rust wrappers rewrite the shared index and drop unknown fields.
203
+ // The session's event file survives that rewrite and identifies its transport.
204
+ const events = path.join(record.cwd, ".agent-yes", `${record.pid}.events.jsonl`);
205
+ const info = await stat(events).catch(() => null);
206
+ if (info?.isFile() && info.mtimeMs >= record.started_at - 1000)
207
+ return { ...record, mode: "stream" as const };
208
+ return record;
209
+ }),
210
+ );
194
211
  if (!opts.liveOnly) return records;
195
212
  return records.filter((r) => r.status !== "exited" && isProcessAlive(r.pid));
196
213
  }
@@ -481,3 +481,13 @@ describe("CLI argument parsing", () => {
481
481
  expect(result.prompt).toContain("--attach");
482
482
  });
483
483
  });
484
+
485
+ describe("stream transport", () => {
486
+ it("consumes --stream before the CLI and retains its prompt", () => {
487
+ const config = parseCliArgs(["bun", "agent-yes", "--stream", "claude", "hello"]);
488
+ expect(config.stream).toBe(true);
489
+ expect(config.cli).toBe("claude");
490
+ expect(config.prompt).toBe("hello");
491
+ expect(config.cliArgs).not.toContain("--stream");
492
+ });
493
+ });
@@ -27,6 +27,11 @@ export function parseCliArgs(argv: string[], supportedClis?: readonly string[])
27
27
  )
28
28
  // TODO: add a --docker option, will tell cli.ts to start docker process with tty and handles all stdio forwarding
29
29
 
30
+ .option("stream", {
31
+ type: "boolean",
32
+ default: false,
33
+ description: "Run Claude using the stream JSON protocol (TypeScript runtime)",
34
+ })
30
35
  .option("robust", {
31
36
  type: "boolean",
32
37
  default: true,
@@ -333,6 +338,23 @@ export function parseCliArgs(argv: string[], supportedClis?: readonly string[])
333
338
 
334
339
  // Return the config object that would be passed to cliYes (same logic as cli.ts:99-121)
335
340
  return {
341
+ // The first separator belongs to the wrapper. Stream launch planning needs
342
+ // the original native tokens, including flags written after that separator.
343
+ nativeArgs: (() => {
344
+ const args =
345
+ parsedArgv._[0] && !cliName
346
+ ? rawArgs.slice((cliArgIndex ?? 0) + 1)
347
+ : [
348
+ ...cliArgsForSpawn,
349
+ ...positionalPromptWords,
350
+ ...(dashIndex === undefined ? [] : rawArgs.slice(dashIndex + 1)),
351
+ ];
352
+ const separator = args.indexOf("--");
353
+ if (parsedArgv._[0] && !cliName && separator !== -1) args.splice(separator, 1);
354
+ return args;
355
+ })(),
356
+ explicitPrompt: parsedArgv.prompt,
357
+ stream: parsedArgv.stream,
336
358
  cwd: process.cwd(),
337
359
  env: process.env as Record<string, string>,
338
360
  cli: (cliName ||