nolo-cli 0.82.0-alpha.5 → 0.82.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 (161) hide show
  1. package/README.md +2 -2
  2. package/{_executeModel-225YRU52.js → _executeModel-FHVQOYWX.js} +48 -48
  3. package/{action-D22U6CTH.js → action-YVYQEAAV.js} +11 -11
  4. package/{addContentAction-XAPUTGL4.js → addContentAction-O7R66HEX.js} +9 -9
  5. package/{addDialogAgentAction-M7VLLBZM.js → addDialogAgentAction-74OA7KYP.js} +8 -8
  6. package/{agentDeleteCommand-ZJNQGVR2.js → agentDeleteCommand-4427YKQF.js} +31 -29
  7. package/{agentEmailCommands-VLVWFWX2.js → agentEmailCommands-LYDIAUOP.js} +67 -63
  8. package/{agentGrantCommands-R3VQEZJR.js → agentGrantCommands-M3XFO6EN.js} +2 -2
  9. package/{agentListCommands-GHQGLAUU.js → agentListCommands-O4AEMQVV.js} +40 -32
  10. package/{agentMachineCommands-QDXYENZJ.js → agentMachineCommands-F6IHXMPD.js} +31 -29
  11. package/{agentProviderCommands-65ZC2WB4.js → agentProviderCommands-GNPTL5XR.js} +87 -0
  12. package/{agentPullCommand-N7L2CT7L.js → agentPullCommand-O5MPVJ5E.js} +3 -3
  13. package/agentRecordCommands-BDLFOU7E.js +128 -0
  14. package/{agentRunCommand-YSCD65HH.js → agentRunCommand-HSSYFGMC.js} +65 -61
  15. package/{agentRunControl-T44MESII.js → agentRunControl-WCTKX5VL.js} +2 -2
  16. package/{agentRuntimeLocal-ZOHB7OOO.js → agentRuntimeLocal-IW3IM5P6.js} +27 -25
  17. package/{agentSlice-O2SBU5TK.js → agentSlice-G54NT6PX.js} +10 -10
  18. package/{appDeleteCommands-PRT6K5N2.js → appDeleteCommands-ZXLXNRHF.js} +31 -29
  19. package/{appDeployCommands-63ZONFAN.js → appDeployCommands-PWB4YERK.js} +31 -29
  20. package/{appDeployStatusCommands-AFAYCVR3.js → appDeployStatusCommands-2EZKZP7Y.js} +31 -29
  21. package/{appGetCommands-TNZDZE36.js → appGetCommands-JNUKOWHO.js} +31 -29
  22. package/{appListCommands-IA4SPG2X.js → appListCommands-6X3H67SS.js} +31 -29
  23. package/{authCommand-EVGFLAHO.js → authCommand-F4EFRRX6.js} +164 -24
  24. package/{authCommands-ILTBI6JV.js → authCommands-RGOGCPP6.js} +4 -5
  25. package/builtinSkillRegistry-FUAVTRVZ.js +33 -0
  26. package/{chatQueueReduxAdapter-4SM3DAWX.js → chatQueueReduxAdapter-VJXYSZ2D.js} +24 -24
  27. package/{chromeCommands-VOIRNJBL.js → chromeCommands-FZYAU75D.js} +1 -1
  28. package/{chromeOpsCommands-M7DPCX2T.js → chromeOpsCommands-62P2Q2YB.js} +31 -1
  29. package/{chunk-C3FZR5EC.js → chunk-2F7RJC6L.js} +1 -1
  30. package/{chunk-QC5LGHYP.js → chunk-2YMRWISD.js} +10 -5
  31. package/{chunk-HQUORJTM.js → chunk-3BMYXEUW.js} +1 -1
  32. package/{chunk-3QPYFHAH.js → chunk-3DII57IT.js} +1 -1
  33. package/{chunk-NTW5GWDM.js → chunk-3VNWWVKB.js} +2 -0
  34. package/{chunk-DWUCB2A3.js → chunk-42V6BK2E.js} +1 -1
  35. package/{chunk-KIS76A2P.js → chunk-4EZHSKTB.js} +38 -4
  36. package/{chunk-GBPZKFYK.js → chunk-53HEEOTT.js} +4 -4
  37. package/{chunk-5XTOKQLW.js → chunk-5UTFL4QJ.js} +6 -2
  38. package/chunk-5ZUL4CUO.js +10 -0
  39. package/{chunk-E6RGHPDR.js → chunk-6D6VBVEW.js} +4 -6
  40. package/{chunk-CMH2SYHX.js → chunk-6OZ36FXI.js} +2 -2
  41. package/{chunk-NRALD3CC.js → chunk-76WEAXJB.js} +49 -10
  42. package/{chunk-3W2JJOH3.js → chunk-7REEVK4I.js} +3 -3
  43. package/{chunk-BYEJ7K2Z.js → chunk-7S4YWN7P.js} +1 -1
  44. package/{chunk-SREASRV5.js → chunk-ABQYVJBJ.js} +1 -1
  45. package/chunk-ACTMNVHM.js +93 -0
  46. package/{chunk-XWNRAIUL.js → chunk-AFUORTY4.js} +6 -16
  47. package/{chunk-E36HZARC.js → chunk-ASQYTZTR.js} +46 -9
  48. package/{chunk-73IOJLK2.js → chunk-AVV3M6CX.js} +10 -10
  49. package/{chunk-WL2RKIBF.js → chunk-BLJWCTRL.js} +1 -1
  50. package/chunk-BNGW5ASC.js +344 -0
  51. package/{chunk-SZLVDREM.js → chunk-BP4XNZRM.js} +3 -3
  52. package/{chunk-2KDR4CWE.js → chunk-BYMV6QZG.js} +24 -1
  53. package/{chunk-MYU3MJCF.js → chunk-DHDMC6FO.js} +175 -7
  54. package/{chunk-FP27MNSX.js → chunk-DL2LVM5E.js} +3 -3
  55. package/{chunk-EXMHJN7C.js → chunk-EYAQT56M.js} +4 -3
  56. package/{chunk-5LSS6MFZ.js → chunk-F5OE5KSJ.js} +13 -15
  57. package/{chunk-CJCJF5XB.js → chunk-FDTR4QJ6.js} +4 -2
  58. package/{chunk-NJ6WLAPS.js → chunk-FEEHCOBD.js} +1 -1
  59. package/{chunk-YSKEOTPH.js → chunk-GGMVRZRO.js} +155 -795
  60. package/{chunk-PYXL2CJL.js → chunk-GPCZ7UXG.js} +1 -1
  61. package/{chunk-K7AG465Q.js → chunk-GQBOR3G6.js} +4 -2
  62. package/{chunk-YFADVSZE.js → chunk-H62HCIUP.js} +6 -6
  63. package/{chunk-PZM3EENV.js → chunk-HJUYAD4A.js} +1 -1
  64. package/{chunk-A3NNC2LA.js → chunk-HOBJGHLD.js} +1235 -59
  65. package/{chunk-3JQ2NRYU.js → chunk-HVURBGF3.js} +4 -4
  66. package/{chunk-6SD5OPQ4.js → chunk-IIBAPOTQ.js} +11 -173
  67. package/{chunk-ZVN6I33J.js → chunk-IIVGDG4I.js} +6 -5
  68. package/{chunk-UDQWGU7F.js → chunk-J4MOO56S.js} +1 -1
  69. package/{chunk-KC5FAHVS.js → chunk-JEDZAO7L.js} +1 -1
  70. package/{chunk-6XIE5ZGI.js → chunk-JPGCXHNM.js} +1 -1
  71. package/chunk-JRQFUXY7.js +1625 -0
  72. package/chunk-KQ4ONNQD.js +677 -0
  73. package/{chunk-CPSZJBLK.js → chunk-L7I247DF.js} +105 -26
  74. package/{chunk-RXX4GDIH.js → chunk-LS2ZANRJ.js} +1 -1
  75. package/{chunk-BJIRLHJR.js → chunk-M2EJHDJP.js} +4 -0
  76. package/{chunk-EVBFYPDC.js → chunk-MC4XLIJ7.js} +6 -2
  77. package/{chunk-DSRXPQWA.js → chunk-NEDZDG3M.js} +43 -43
  78. package/{chunk-UJ63UXGE.js → chunk-OIVSQH2O.js} +1006 -801
  79. package/{chunk-AETZ7AD6.js → chunk-Q554LLSI.js} +1 -1
  80. package/chunk-Q5FJJ6XI.js +103 -0
  81. package/{chunk-AJHEFRGJ.js → chunk-Q67DOFOO.js} +214 -5
  82. package/{chunk-UZ6XXCVR.js → chunk-QDSINZM3.js} +15 -2
  83. package/{chunk-D6XYLSOS.js → chunk-QIAVMDHY.js} +1 -1
  84. package/{chunk-YWG6EMH3.js → chunk-RG6JBBX5.js} +10 -6
  85. package/{chunk-YXLXHIT2.js → chunk-RTUYRRBM.js} +6 -6
  86. package/{chunk-HHLTFENG.js → chunk-SDTTBMBU.js} +907 -317
  87. package/{chunk-QCZX4FTW.js → chunk-SH43IESU.js} +173 -15
  88. package/{chunk-LSZXYE64.js → chunk-SL4QHSPQ.js} +756 -80
  89. package/{chunk-FNGAF7C4.js → chunk-SNPMM7H3.js} +137 -12
  90. package/{chunk-EM6MPSEI.js → chunk-SPUTJ4DW.js} +52 -30
  91. package/{chunk-SO7B7NW3.js → chunk-STHU4Y5X.js} +413 -62
  92. package/{chunk-SPAQ4PVV.js → chunk-SV5IJK6K.js} +1 -1
  93. package/{chunk-KVDUCO4Q.js → chunk-TDRTS7QW.js} +16 -12
  94. package/{chunk-BJCWNHVU.js → chunk-TOP2VXOR.js} +2 -2
  95. package/{chunk-4EJ5QYB5.js → chunk-UKZDAFYT.js} +1 -1
  96. package/{chunk-PGSKWZCB.js → chunk-UZGQNTVW.js} +1 -1
  97. package/{chunk-ZZCJUXUI.js → chunk-V4MJDUSR.js} +2 -2
  98. package/{chunk-JYYZCK2Z.js → chunk-V7E4PXQD.js} +1 -1
  99. package/{chunk-OZX2IPKM.js → chunk-VLTIYV3X.js} +1 -1
  100. package/{chunk-NHRQCXIQ.js → chunk-VMFTFOWF.js} +13 -3
  101. package/{chunk-4UW2LDVA.js → chunk-VQW3EKYS.js} +15 -15
  102. package/{chunk-HH65VA5U.js → chunk-WGR3J4Q6.js} +101 -4
  103. package/{chunk-5J7W2VWW.js → chunk-WV42OMV7.js} +6 -265
  104. package/{chunk-Q46HQOW3.js → chunk-XTAZCQUT.js} +7 -7
  105. package/{chunk-DUJWWUGV.js → chunk-YQTQQX2H.js} +1 -1
  106. package/{chunk-BOYUESO7.js → chunk-Z77CRGTW.js} +1 -1
  107. package/{contentThunks-ENAVF2YU.js → contentThunks-D6QQKIPF.js} +25 -25
  108. package/{cooldownCommands-BSCH2W7P.js → cooldownCommands-REAWYVTY.js} +2 -2
  109. package/{createAgentAutomationAction-CH6BYC7K.js → createAgentAutomationAction-UIPWW4DG.js} +25 -25
  110. package/{createDialogAction-23UDOXSO.js → createDialogAction-573VVP3X.js} +28 -28
  111. package/{createPageAction-J6AEMLHK.js → createPageAction-LRFSS6TD.js} +26 -26
  112. package/{dbSlice-GKGGFNOB.js → dbSlice-XVWBAGYN.js} +8 -8
  113. package/{deleteFile-LWSR674W.js → deleteFile-YG6QMJLU.js} +3 -3
  114. package/{dialogCommands-BJJGCCQR.js → dialogCommands-KFK2FF5B.js} +35 -31
  115. package/{dialogSlice-F7RD6PUY.js → dialogSlice-EXLC5XTD.js} +24 -24
  116. package/{docCreateCommands-53GB2FU3.js → docCreateCommands-V777WOZ7.js} +32 -30
  117. package/{docDeleteCommands-TAW5JEBU.js → docDeleteCommands-5KHT7Z5Q.js} +33 -31
  118. package/{docReadCommands-F5N7N5E3.js → docReadCommands-BLROGWP3.js} +32 -30
  119. package/{docStore-WX4YBGXC.js → docStore-DZNGJXX7.js} +9 -9
  120. package/{docUpdateCommands-YQ7TRT35.js → docUpdateCommands-QXOZHQ5H.js} +32 -30
  121. package/{fetchMessages-DRABNDPZ.js → fetchMessages-EIU7UFFK.js} +3 -4
  122. package/{getPricing-HRMSOF3E.js → getPricing-LUSEABA6.js} +4 -4
  123. package/{handleSendMessageAction-CW4LULIR.js → handleSendMessageAction-OROTZBPO.js} +24 -24
  124. package/index.js +102 -85
  125. package/{localDialogRead-PUQKFI73.js → localDialogRead-BTFJ4V2I.js} +2 -2
  126. package/{localRuntimeDb-P37ZTX55.js → localRuntimeDb-SYQGUF4U.js} +1 -1
  127. package/{machineCommands-FIYWY5EU.js → machineCommands-IJWERHRH.js} +64 -60
  128. package/{machineWsRunDispatch-KQ4OFFNR.js → machineWsRunDispatch-XQ36M4L7.js} +62 -58
  129. package/{memberThunks-KATHH3F4.js → memberThunks-QGFLFVCI.js} +9 -9
  130. package/{models-GS72DVJS.js → models-T3SG6MJ5.js} +2 -2
  131. package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HGXZV4XJ.js} +1 -1
  132. package/package.json +1 -1
  133. package/providerPresetApply-FG6NZ57W.js +214 -0
  134. package/providerRegistry-757OWH3O.js +31 -0
  135. package/{read-LC6HVYBN.js → read-COE3ZYR6.js} +5 -4
  136. package/{readDocTool-N3ERJHHF.js → readDocTool-5USN4A6V.js} +1 -1
  137. package/{readlineWorkspace-QYI6BRNA.js → readlineWorkspace-EB3362L3.js} +144 -108
  138. package/{removeDialogAgentAction-F5GPTALR.js → removeDialogAgentAction-IX3MN2ZO.js} +11 -11
  139. package/{runAgentClientLoop-GZ5VUGAW.js → runAgentClientLoop-3MR2NPWR.js} +47 -47
  140. package/{runtimeDoctorCommands-CROTMULY.js → runtimeDoctorCommands-X6WDBEQX.js} +2 -2
  141. package/{setDialogExtraReferencesAction-AY4ZCF3A.js → setDialogExtraReferencesAction-X4HCPNZL.js} +9 -9
  142. package/{setPrimaryDialogAgentAction-HPMG7V3R.js → setPrimaryDialogAgentAction-4GMIQLOD.js} +11 -11
  143. package/{settingSlice-OEJA4NQO.js → settingSlice-ZQZVUPKK.js} +10 -10
  144. package/{spaceCommands-IYMIXCMC.js → spaceCommands-TIDVUPDV.js} +30 -28
  145. package/{streamAgentChatTurn-EAXIUJTK.js → streamAgentChatTurn-CLP2JWCQ.js} +59 -58
  146. package/{switchDialogAgentAction-HMDZTZ4I.js → switchDialogAgentAction-N52LRPA3.js} +8 -8
  147. package/{tableCommands-SUNTHAYX.js → tableCommands-O6NWHFKV.js} +1 -1
  148. package/{toolApiClient-VGYUB4P5.js → toolApiClient-QVJ6HDNN.js} +2 -2
  149. package/{tools-QWQOW6J4.js → tools-OXEEBABR.js} +43 -43
  150. package/tuiSummaryLlmCaller-VJY3YD2Q.js +127 -0
  151. package/{updateCommands-Y363MC3L.js → updateCommands-2M74UL7P.js} +2 -2
  152. package/{updateDialogTitleAction-2HCE2M7S.js → updateDialogTitleAction-4YWKF2OE.js} +45 -28
  153. package/agentRecordCommands-AQFYM5HS.js +0 -124
  154. package/chunk-3IT2PFHL.js +0 -611
  155. package/chunk-I42VC5KR.js +0 -15
  156. package/chunk-NG4UT4K4.js +0 -79
  157. package/codingSkills-E6KSDNSJ.js +0 -48
  158. package/tuiSummaryLlmCaller-3Z24VUWM.js +0 -116
  159. package/{chunk-3RAG2NAD.js → chunk-UKWGR5SS.js} +3 -3
  160. package/{db-VQSAOWAO.js → db-WK5MDZVN.js} +1 -1
  161. package/{localRuntimeAuthority-R5UBODT3.js → localRuntimeAuthority-6IR6BBXE.js} +3 -3
@@ -7,10 +7,10 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-WL2RKIBF.js";
10
+ } from "./chunk-BLJWCTRL.js";
11
11
  import {
12
12
  fetchWithTransientRetry
13
- } from "./chunk-5XTOKQLW.js";
13
+ } from "./chunk-5UTFL4QJ.js";
14
14
  import {
15
15
  DRAIN_EXHAUSTED_USER_MESSAGE,
16
16
  isDrainExhaustedResponse
@@ -18,7 +18,7 @@ import {
18
18
  import {
19
19
  buildDialogAttachmentPlan,
20
20
  extractFileContentIds
21
- } from "./chunk-HQUORJTM.js";
21
+ } from "./chunk-3BMYXEUW.js";
22
22
  import {
23
23
  isLevelLockError
24
24
  } from "./chunk-URMS4XY2.js";
@@ -30,7 +30,7 @@ import {
30
30
  boundSummaryText,
31
31
  buildDialogReadEnvelope,
32
32
  projectDialogReadForAgent
33
- } from "./chunk-ZVN6I33J.js";
33
+ } from "./chunk-IIVGDG4I.js";
34
34
  import {
35
35
  toErrorMessage
36
36
  } from "./chunk-HNMXYYJR.js";
@@ -51,19 +51,19 @@ import {
51
51
  import {
52
52
  asNonEmptyStringArray,
53
53
  asTrimmedNonEmptyStringArray
54
- } from "./chunk-I42VC5KR.js";
54
+ } from "./chunk-VMFTFOWF.js";
55
55
  import {
56
56
  createClientLogger
57
57
  } from "./chunk-QOKAKDPE.js";
58
58
  import {
59
59
  isLevelNotFoundError
60
60
  } from "./chunk-OW765XBU.js";
61
- import {
62
- asTrimmedString
63
- } from "./chunk-3EUW3WEO.js";
64
61
  import {
65
62
  isRecord
66
63
  } from "./chunk-KUG52IAP.js";
64
+ import {
65
+ asTrimmedString
66
+ } from "./chunk-3EUW3WEO.js";
67
67
  import {
68
68
  DEFAULT_LOCAL_API_ORIGIN
69
69
  } from "./chunk-4SN6J65J.js";
@@ -210,7 +210,8 @@ var VALUE_FLAGS = /* @__PURE__ */ new Set([
210
210
  "--token",
211
211
  "--machine-key",
212
212
  "--user",
213
- "--max-response-chars"
213
+ "--max-response-chars",
214
+ "--per-dialog"
214
215
  ]);
215
216
  function hasFlag(args, flag) {
216
217
  return args.includes(flag);
@@ -724,7 +725,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
724
725
  return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
725
726
  }
726
727
  async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
727
- const reader = readLocalDialog ?? (await import("./localDialogRead-PUQKFI73.js")).readDialogFromLocalDb;
728
+ const reader = readLocalDialog ?? (await import("./localDialogRead-BTFJ4V2I.js")).readDialogFromLocalDb;
728
729
  const result = await reader({ dialogKey, dialogId, limit });
729
730
  return {
730
731
  ...result,
@@ -741,7 +742,7 @@ async function readLocalDialogAtDbPathDefault(args) {
741
742
  const [{ Level }, { safeJsonEncoding }, { fetchMessages }] = await Promise.all([
742
743
  import("./levelLazyShim-GZBKODGI.js"),
743
744
  import("./serverStoreFactory-YMXDF4NI.js"),
744
- import("./fetchMessages-DRABNDPZ.js")
745
+ import("./fetchMessages-EIU7UFFK.js")
745
746
  ]);
746
747
  const db = new Level(args.dbPath, {
747
748
  valueEncoding: safeJsonEncoding,
@@ -1820,6 +1821,129 @@ async function runDialogDeleteCommand(args, deps = {}) {
1820
1821
  }
1821
1822
  return hasErrors ? 1 : 0;
1822
1823
  }
1824
+ function printSearchUsage(output) {
1825
+ output.write(`Usage:
1826
+ nolo dialog search <query> [--limit <n>] [--per-dialog <n>] [--json]
1827
+
1828
+ Options:
1829
+ --limit <n> Max dialogs to return (default 20, max 50).
1830
+ --per-dialog <n> Max match snippets per dialog (default 3, max 10).
1831
+ --json Print machine-readable JSON.
1832
+ --server <url> Override NOLO_SERVER/BASE_URL.
1833
+ --token <jwt> Override AUTH_TOKEN.
1834
+
1835
+ Searches messages across the current user's dialogs via the server endpoint.
1836
+ Server requires NOLO_DIALOG_SEARCH=1 to be enabled.
1837
+ `);
1838
+ }
1839
+ async function runDialogSearchCommand(args, deps = {}) {
1840
+ const env = deps.env ?? process.env;
1841
+ const output = deps.output ?? process.stdout;
1842
+ if (hasFlag(args, "--help") || hasFlag(args, "-h")) {
1843
+ printSearchUsage(output);
1844
+ return 0;
1845
+ }
1846
+ const query = readFirstPositional(args);
1847
+ if (!query) {
1848
+ output.write("[nolo] dialog search requires a search query.\n\n");
1849
+ printSearchUsage(output);
1850
+ return 1;
1851
+ }
1852
+ const authToken = resolveAuthToken(args, env);
1853
+ if (!authToken) {
1854
+ output.write("[nolo] dialog search requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
1855
+ return 1;
1856
+ }
1857
+ const fetchImpl = deps.fetchImpl ?? fetch;
1858
+ const serverUrl = resolveServerUrl(args, env);
1859
+ const serverUrls = resolveServerCandidates(args, env, serverUrl);
1860
+ const limitRaw = readOption(args, "--limit");
1861
+ const perDialogRaw = readOption(args, "--per-dialog");
1862
+ const queryParams = new URLSearchParams({ q: query });
1863
+ if (limitRaw) queryParams.set("limit", limitRaw);
1864
+ if (perDialogRaw) queryParams.set("perDialog", perDialogRaw);
1865
+ const isJson = hasFlag(args, "--json");
1866
+ let lastError = null;
1867
+ let lastStatus = null;
1868
+ let searchResult = null;
1869
+ for (const candidateBase of serverUrls) {
1870
+ const trimmedBase = candidateBase.replace(/\/+$/, "");
1871
+ const targetUrl = `${trimmedBase}/api/dialog-search?${queryParams.toString()}`;
1872
+ try {
1873
+ const res = await fetchImpl(targetUrl, {
1874
+ method: "GET",
1875
+ headers: {
1876
+ Authorization: `Bearer ${authToken}`
1877
+ }
1878
+ });
1879
+ lastStatus = res.status;
1880
+ if (!res.ok) {
1881
+ const errorData = await res.json().catch(() => ({}));
1882
+ if (res.status === 403) {
1883
+ const hint = errorData?.hint ? ` (${errorData.hint})` : "";
1884
+ const msg = errorData?.message ? `: ${errorData.message}` : "";
1885
+ throw new Error(`Server returned 403 Forbidden${hint}${msg}. Please ensure NOLO_DIALOG_SEARCH=1 is enabled on the server.`);
1886
+ }
1887
+ if (res.status === 401) {
1888
+ throw new Error(`Server returned 401 Unauthorized. Please check your AUTH_TOKEN.`);
1889
+ }
1890
+ throw new Error(`HTTP ${res.status}: ${JSON.stringify(errorData)}`);
1891
+ }
1892
+ searchResult = await res.json();
1893
+ break;
1894
+ } catch (err) {
1895
+ lastError = err;
1896
+ }
1897
+ }
1898
+ if (!searchResult) {
1899
+ const errorMsg = lastError ? toErrorMessage(lastError) : "Failed to connect to candidate servers";
1900
+ if (isJson) {
1901
+ output.write(JSON.stringify({ error: errorMsg, status: lastStatus }, null, 2) + "\n");
1902
+ } else {
1903
+ output.write(`[nolo] dialog search failed: ${errorMsg}
1904
+ `);
1905
+ }
1906
+ return 1;
1907
+ }
1908
+ if (isJson) {
1909
+ output.write(JSON.stringify(searchResult, null, 2) + "\n");
1910
+ return 0;
1911
+ }
1912
+ const { dialogs, totalMatches, scannedDialogs, scannedMessages, elapsedMs, truncated } = searchResult;
1913
+ output.write(`query: ${query}
1914
+ `);
1915
+ output.write(`scanned: ${scannedDialogs} dialogs, ${scannedMessages} messages (${elapsedMs}ms)
1916
+ `);
1917
+ output.write(`matches: ${totalMatches} total match(es) across ${dialogs?.length ?? 0} dialog(s)`);
1918
+ if (truncated) {
1919
+ output.write(" [truncated]");
1920
+ }
1921
+ output.write("\n");
1922
+ if (!Array.isArray(dialogs) || dialogs.length === 0) {
1923
+ output.write("\nNo matching dialog messages found.\n");
1924
+ return 0;
1925
+ }
1926
+ for (const d of dialogs) {
1927
+ output.write(`
1928
+ ${d.title}
1929
+ `);
1930
+ output.write(`id=${d.dialogId}
1931
+ `);
1932
+ output.write(`updatedAt=${d.updatedAt ?? "-"}
1933
+ `);
1934
+ output.write(`matches=${d.matchCount}
1935
+ `);
1936
+ if (Array.isArray(d.matches) && d.matches.length > 0) {
1937
+ for (const m of d.matches) {
1938
+ const role = m.role ? `[${m.role}]` : "";
1939
+ const snippet = String(m.snippet ?? "").replace(/\r?\n/g, " ");
1940
+ output.write(` - ${role} ${snippet}
1941
+ `);
1942
+ }
1943
+ }
1944
+ }
1945
+ return 0;
1946
+ }
1823
1947
 
1824
1948
  export {
1825
1949
  normalizeDialogRecord,
@@ -1832,5 +1956,6 @@ export {
1832
1956
  runDialogStatusCommand,
1833
1957
  runDialogQueryCommand,
1834
1958
  runDialogListCommand,
1835
- runDialogDeleteCommand
1959
+ runDialogDeleteCommand,
1960
+ runDialogSearchCommand
1836
1961
  };
@@ -6,9 +6,8 @@ import {
6
6
  } from "./chunk-HS7MLR74.js";
7
7
  import {
8
8
  clipMultilineText,
9
- fetchAndSerializeTable,
10
- resolveBuiltinSkillPage
11
- } from "./chunk-YSKEOTPH.js";
9
+ fetchAndSerializeTable
10
+ } from "./chunk-GGMVRZRO.js";
12
11
  import {
13
12
  isGatewayHttpStatus
14
13
  } from "./chunk-NF64D32W.js";
@@ -20,7 +19,7 @@ import {
20
19
  } from "./chunk-3L2WKC3W.js";
21
20
  import {
22
21
  slateToSimplifiedMarkdown
23
- } from "./chunk-UDQWGU7F.js";
22
+ } from "./chunk-J4MOO56S.js";
24
23
  import {
25
24
  waitForAbortableDelay
26
25
  } from "./chunk-N4G4PKQ6.js";
@@ -29,25 +28,27 @@ import {
29
28
  } from "./chunk-MEYIRKDN.js";
30
29
  import {
31
30
  fetchAndCacheMessages
32
- } from "./chunk-SO7B7NW3.js";
31
+ } from "./chunk-STHU4Y5X.js";
33
32
  import {
34
33
  shouldUseServerProxy
35
34
  } from "./chunk-YYLHWIW6.js";
36
35
  import {
37
36
  fetchServerSyncedCredential
38
- } from "./chunk-Q46HQOW3.js";
37
+ } from "./chunk-XTAZCQUT.js";
39
38
  import {
40
39
  buildSkillGuidancePromptBlock,
41
40
  extractRuntimePageCapabilities,
41
+ resolveBuiltinSkillPage,
42
42
  resolveSkillGraphFromRoots
43
- } from "./chunk-3IT2PFHL.js";
43
+ } from "./chunk-JRQFUXY7.js";
44
44
  import {
45
45
  buildIdentityBlock,
46
46
  buildRuntimeGuidanceBlocks,
47
47
  compileContextLayers,
48
+ detectDispatchIntentFromMessages,
48
49
  normalizeChatCompletionsBodyForProvider,
49
50
  resolveToolGuidedSections
50
- } from "./chunk-CPSZJBLK.js";
51
+ } from "./chunk-L7I247DF.js";
51
52
  import {
52
53
  convertMessagesToResponsesInput,
53
54
  getUsageRequestOptions,
@@ -57,26 +58,26 @@ import {
57
58
  import {
58
59
  ANTIGRAVITY_CLOUD_CODE_BASE_URL,
59
60
  isAntigravityOAuthAgent
60
- } from "./chunk-PGSKWZCB.js";
61
+ } from "./chunk-UZGQNTVW.js";
61
62
  import {
62
63
  buildProviderAuthHeaders
63
- } from "./chunk-CMH2SYHX.js";
64
+ } from "./chunk-6OZ36FXI.js";
65
+ import {
66
+ estimateTokenCount
67
+ } from "./chunk-PSCNXBYA.js";
64
68
  import {
65
69
  isOpenAiResponsesModel,
66
70
  resolvePlatformChatCompletionsEndpoint,
67
71
  resolvePlatformResponsesEndpoint
68
- } from "./chunk-K7AG465Q.js";
69
- import {
70
- estimateTokenCount
71
- } from "./chunk-PSCNXBYA.js";
72
+ } from "./chunk-GQBOR3G6.js";
72
73
  import {
73
74
  clampReasoningEffort,
74
75
  getModelConfig,
75
76
  isModelSupportReasoningEffort
76
- } from "./chunk-UJ63UXGE.js";
77
+ } from "./chunk-OIVSQH2O.js";
77
78
  import {
78
79
  createFileCredentialBroker
79
- } from "./chunk-3JQ2NRYU.js";
80
+ } from "./chunk-HVURBGF3.js";
80
81
  import {
81
82
  toErrorMessage
82
83
  } from "./chunk-HNMXYYJR.js";
@@ -91,32 +92,33 @@ import {
91
92
  import {
92
93
  isDeepInfraKimiModel,
93
94
  isFireworksKimiModel,
95
+ isPlatformMimoProviderModel,
94
96
  resolveFireworksKimiModel
95
- } from "./chunk-AJHEFRGJ.js";
97
+ } from "./chunk-Q67DOFOO.js";
96
98
  import {
97
99
  createSpaceKey
98
100
  } from "./chunk-UAD2WT54.js";
99
101
  import {
100
102
  read
101
- } from "./chunk-YFADVSZE.js";
103
+ } from "./chunk-H62HCIUP.js";
102
104
  import {
103
105
  asTrimmedLowercaseString
104
106
  } from "./chunk-QSJ3HFEF.js";
105
107
  import {
106
108
  extractCustomId
107
- } from "./chunk-BJIRLHJR.js";
109
+ } from "./chunk-M2EJHDJP.js";
108
110
  import {
109
111
  getRuntimeServerContext
110
- } from "./chunk-3RAG2NAD.js";
112
+ } from "./chunk-UKWGR5SS.js";
111
113
  import {
112
114
  isAbortError
113
115
  } from "./chunk-QOKAKDPE.js";
114
- import {
115
- asTrimmedString
116
- } from "./chunk-3EUW3WEO.js";
117
116
  import {
118
117
  isRecord
119
118
  } from "./chunk-KUG52IAP.js";
119
+ import {
120
+ asTrimmedString
121
+ } from "./chunk-3EUW3WEO.js";
120
122
  import {
121
123
  API_ENDPOINTS
122
124
  } from "./chunk-LCBAMY2M.js";
@@ -367,10 +369,12 @@ function isResponsesConversationStateRejection(status, responseBody) {
367
369
  // packages/agent-runtime/agentCallPlan.ts
368
370
  var CODEX_RESPONSES_URL = "https://chatgpt.com/backend-api/codex/responses";
369
371
  var CURSOR_AGENT_URL = "https://api2.cursor.sh/agent.v1.AgentService/Run";
372
+ var DEVIN_CONNECT_URL = "https://server.codeium.com/exa.api_server_pb.ApiServerService/GetChatMessage";
370
373
  function resolveClientWire(plan) {
371
374
  if (plan.upstreamWire === "gemini-cca") return "chat.completions";
372
375
  if (plan.upstreamWire === "anthropic-messages") return "chat.completions";
373
376
  if (plan.upstreamWire === "cursor-connect") return "chat.completions";
377
+ if (plan.upstreamWire === "devin-connect") return "chat.completions";
374
378
  if (plan.upstreamWire === "responses" && plan.authMethod.kind === "oauth" && plan.authMethod.ref === "chatgpt") {
375
379
  return "chat.completions";
376
380
  }
@@ -450,6 +454,16 @@ function resolveAgentCallPlan(agentConfig, _env) {
450
454
  vendor: provider || "cursor"
451
455
  };
452
456
  }
457
+ if (apiKeyRef === "devin" || provider === "devin") {
458
+ return {
459
+ authMethod: { kind: "oauth", ref: "devin" },
460
+ transport: "server-proxy",
461
+ upstreamWire: "devin-connect",
462
+ endpoint: DEVIN_CONNECT_URL,
463
+ requiredHeaders: ["connect-protocol-version"],
464
+ vendor: provider || "devin"
465
+ };
466
+ }
453
467
  if (agentConfig.cliProvider || agentConfig.apiSource === "cli" || provider === "cli") {
454
468
  return {
455
469
  authMethod: { kind: "cli", provider: agentConfig.cliProvider || provider || "codex" },
@@ -606,7 +620,9 @@ var buildSystemPromptContext = (options) => {
606
620
  ${mainPrompt}` : "";
607
621
  const agentTools = canonicalizeToolNames(agentConfig.tools ?? []);
608
622
  const hasAskTool = agentTools.includes("ask_user");
609
- const toolSections = resolveToolGuidedSections(agentTools);
623
+ const toolSections = resolveToolGuidedSections(agentTools, {
624
+ dispatchIntent: options.dispatchIntent === true
625
+ });
610
626
  const {
611
627
  startupProtocol,
612
628
  contextLayerContract,
@@ -686,8 +702,9 @@ var applyClaudeCache = (stableContent, dynamicContent) => {
686
702
  var prependPromptMessage = (messages, agentConfig, resolvedModel, language, contexts, prependSystemPrompt = true) => {
687
703
  if (!prependSystemPrompt) return messages;
688
704
  if (!contexts && !agentConfig.prompt) return messages;
705
+ const dispatchIntent = detectDispatchIntentFromMessages(messages);
689
706
  if (isClaudeModel(resolvedModel)) {
690
- const compiled = buildSystemPromptContext({ agentConfig, language, contexts });
707
+ const compiled = buildSystemPromptContext({ agentConfig, language, contexts, dispatchIntent });
691
708
  if (!compiled.content.trim()) return messages;
692
709
  const content = applyClaudeCache(
693
710
  compiled.stablePrefixContent,
@@ -696,7 +713,7 @@ var prependPromptMessage = (messages, agentConfig, resolvedModel, language, cont
696
713
  const systemMessage2 = { role: "system", content };
697
714
  return [systemMessage2, ...messages];
698
715
  }
699
- const promptContent = buildSystemPrompt({ agentConfig, language, contexts });
716
+ const promptContent = buildSystemPrompt({ agentConfig, language, contexts, dispatchIntent });
700
717
  if (!promptContent.trim()) return messages;
701
718
  const systemMessage = { role: "system", content: promptContent };
702
719
  return [systemMessage, ...messages];
@@ -706,9 +723,12 @@ var shouldInjectLlamaCppThinkingToggle = (agentConfig) => {
706
723
  if (!isLoopbackUrl(agentConfig.customProviderUrl)) return false;
707
724
  return /qwen/i.test(agentConfig.model ?? "");
708
725
  };
709
- var shouldDisableMiMoThinking = (agentConfig) => {
726
+ var shouldDisableMiMoThinking = (agentConfig, resolvedModel) => {
710
727
  if (agentConfig.enableThinking === true) return false;
711
- return /xiaomimimo\.com/i.test(agentConfig.customProviderUrl ?? "") || (agentConfig.provider ?? "").toLowerCase() === "mimo";
728
+ if (/xiaomimimo\.com/i.test(agentConfig.customProviderUrl ?? "") || (agentConfig.provider ?? "").toLowerCase() === "mimo") {
729
+ return true;
730
+ }
731
+ return isPlatformMimoProviderModel(agentConfig.provider, resolvedModel);
712
732
  };
713
733
  var shouldDisableKimiThinking = (agentConfig, providerName, resolvedModel) => {
714
734
  if (agentConfig.enableThinking !== false) return false;
@@ -823,7 +843,7 @@ var generateOpenAIRequestBody = (agentConfig, providerName, messages, contexts,
823
843
  enable_thinking: agentConfig.enableThinking
824
844
  };
825
845
  }
826
- if (shouldDisableMiMoThinking(agentConfig)) {
846
+ if (shouldDisableMiMoThinking(agentConfig, resolvedModel)) {
827
847
  requestBody.thinking = { type: "disabled" };
828
848
  }
829
849
  if (shouldDisableKimiThinking(agentConfig, providerName, resolvedModel)) {
@@ -876,7 +896,9 @@ function generateResponseRequestBody(agentConfig, msgs, contexts, prependSystemP
876
896
  const promptContent = buildSystemPrompt({
877
897
  agentConfig,
878
898
  language,
879
- contexts
899
+ contexts,
900
+ // 按当前用户输入检测派发意图:无意图只注入最小派发协议(安全硬门常在)。
901
+ dispatchIntent: detectDispatchIntentFromMessages(msgs)
880
902
  });
881
903
  body.instructions = promptContent;
882
904
  }