nolo-cli 0.240.0-alpha.3 → 0.242.0-alpha.1

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 (206) hide show
  1. package/README.md +3 -5
  2. package/{_executeModel-5NA4USGG.js → _executeModel-IZ2MCXHO.js} +77 -77
  3. package/{action-X75O3XPH.js → action-VDEW6WLI.js} +9 -9
  4. package/{addContentAction-GVC77QSN.js → addContentAction-7YVXHIPQ.js} +14 -14
  5. package/{addDialogAgentAction-KKDVAMW3.js → addDialogAgentAction-BX7B47HF.js} +17 -17
  6. package/{agentDeleteCommand-2RFGKFAB.js → agentDeleteCommand-N7ELXPLD.js} +107 -108
  7. package/{agentEmailCommands-GQCQKKOR.js → agentEmailCommands-OFS477PV.js} +110 -111
  8. package/{agentListCommands-HSGLDPDQ.js → agentListCommands-IQQHJSXP.js} +202 -164
  9. package/{agentMachineCommands-BISF6PVV.js → agentMachineCommands-NS65BEW7.js} +52 -49
  10. package/{agentProviderCommands-O3Q25PKU.js → agentProviderCommands-SS6M6VGY.js} +2 -2
  11. package/{agentPullCommand-G6U2LHMW.js → agentPullCommand-QQQZSC6S.js} +1 -1
  12. package/{agentRecordCommands-AOXPGYAJ.js → agentRecordCommands-4VE7CNLC.js} +103 -104
  13. package/{agentRunCommand-AFAIP7U7.js → agentRunCommand-2MUXHKNW.js} +109 -108
  14. package/{agentRunControl-VBL7UFSG.js → agentRunControl-55GL6Q3M.js} +11 -9
  15. package/{agentRuntimeLocal-T7BX2WGL.js → agentRuntimeLocal-5DB2P4MU.js} +51 -43
  16. package/{agentSlice-XJNKE3PG.js → agentSlice-5VTAFG43.js} +14 -14
  17. package/{appDeleteCommands-LURUSPY7.js → appDeleteCommands-EDKUPHJM.js} +52 -49
  18. package/{appDeployCommands-SMEW4AK2.js → appDeployCommands-JO74GW4L.js} +52 -49
  19. package/{appDeployStatusCommands-VYPJTBJK.js → appDeployStatusCommands-U77ZUHX7.js} +52 -49
  20. package/{appGetCommands-N4NI5GGJ.js → appGetCommands-QCMHBYPX.js} +52 -49
  21. package/{appListCommands-5C6ONN3Z.js → appListCommands-ZQJYEXI6.js} +52 -49
  22. package/{authCommand-4CVBDADE.js → authCommand-W4KXRZLI.js} +23 -19
  23. package/{authCommands-EHU2BHOX.js → authCommands-6AUYO65N.js} +10 -6
  24. package/{builtinSkillRegistry-AYWYQVA4.js → builtinSkillRegistry-GHE3RD3V.js} +6 -6
  25. package/{chromeCommands-G5UDKVSV.js → chromeCommands-S7AW3AOD.js} +383 -6
  26. package/{chromeOpsCommands-CSDG2HYN.js → chromeOpsCommands-TBPM6MR4.js} +1 -1
  27. package/{chunk-7TTMMOKH.js → chunk-247AAJRK.js} +1 -1
  28. package/{chunk-4X5AVCM7.js → chunk-2BSLGODA.js} +258 -23
  29. package/{chunk-P3IZUMIC.js → chunk-2N4UBHUU.js} +4 -4
  30. package/{chunk-A74QP4FI.js → chunk-2T5BHLID.js} +572 -208
  31. package/{chunk-H7ZYKHAZ.js → chunk-3OQFXODL.js} +102 -31
  32. package/{chunk-BIABIPGW.js → chunk-3ORFJP2Z.js} +1 -1
  33. package/{chunk-3FBAVU2Y.js → chunk-3UNAGTBW.js} +19 -84
  34. package/{chunk-DNZ4JJ7C.js → chunk-4F7SWSWO.js} +19 -6
  35. package/{chunk-2X7WFDT6.js → chunk-4FE3IWRE.js} +1 -1
  36. package/{chunk-N2JROHD3.js → chunk-4UK6UBXF.js} +3 -3
  37. package/{chunk-XS5A3EKX.js → chunk-4YFC3DWW.js} +75 -1
  38. package/chunk-53W5BXLN.js +340 -0
  39. package/{chunk-E5KJOZWY.js → chunk-5GRWWUB4.js} +3 -3
  40. package/{chunk-HCNOO374.js → chunk-6326DRQY.js} +1 -1
  41. package/{chunk-RM4UMFY4.js → chunk-6MQWGA5F.js} +10 -10
  42. package/{chunk-TEMLHVGX.js → chunk-6MX6S6TE.js} +3 -3
  43. package/{chunk-6WOLPIPY.js → chunk-6RSNVJGO.js} +2 -102
  44. package/{chunk-Y5OWZQMJ.js → chunk-6S6CZUXK.js} +19 -19
  45. package/{chunk-PDCV7P5W.js → chunk-6XIE5ZGI.js} +1 -1
  46. package/{chunk-FZKA3XFA.js → chunk-6XLWUNZB.js} +27 -27
  47. package/{chunk-62HXNQVV.js → chunk-776CXKMX.js} +1 -1
  48. package/{chunk-MYPKBJJO.js → chunk-7AWKDRXG.js} +2 -2
  49. package/{chunk-GDUC4VS2.js → chunk-7GTXPS3D.js} +10 -10
  50. package/{chunk-Z2WZAE4P.js → chunk-7HUHOCIY.js} +36 -30
  51. package/{chunk-PWTNI4N7.js → chunk-ANUP75N2.js} +22 -0
  52. package/{chunk-ULLHVDTZ.js → chunk-BH7CEVOH.js} +4 -4
  53. package/{chunk-A3LUWRQK.js → chunk-C4KX626C.js} +5 -5
  54. package/chunk-C5A54QS7.js +108 -0
  55. package/{chunk-DXW5WDHZ.js → chunk-CHYYSFFM.js} +6 -6
  56. package/{chunk-O6IPRAVV.js → chunk-CJTB3OYB.js} +2 -2
  57. package/{chunk-AVJDELEA.js → chunk-DLT2DN4M.js} +1 -1
  58. package/{chunk-LKA64WH4.js → chunk-DMPZMYH4.js} +37 -1
  59. package/{chunk-MM73SP4K.js → chunk-DOK7GDRU.js} +1 -1
  60. package/{chunk-VREG6ANQ.js → chunk-DPAIQLAL.js} +16 -16
  61. package/{chunk-ANJRDS6U.js → chunk-EKXPHL7M.js} +3 -3
  62. package/{chunk-TWTJV35S.js → chunk-ENYTIRIO.js} +3 -3
  63. package/{chunk-PGKA77TZ.js → chunk-ER3P6MBT.js} +170 -107
  64. package/{chunk-EEOOBRA7.js → chunk-F4MCAOWN.js} +2 -2
  65. package/{chunk-7NIBQ4HY.js → chunk-FDZ2GBWO.js} +30 -2
  66. package/{chunk-VSRISJXZ.js → chunk-GAHJLSDO.js} +1 -1
  67. package/{chunk-U3G7RRXJ.js → chunk-GES5GIAU.js} +8 -8
  68. package/{chunk-4IQVE43Z.js → chunk-HQVNO7FH.js} +22 -22
  69. package/{chunk-DVYAFH2Q.js → chunk-HSWEFHFS.js} +1 -1
  70. package/{chunk-MECDGHLK.js → chunk-IIG3TT73.js} +43 -6
  71. package/{chunk-YGCOJNFZ.js → chunk-IZJFTY4R.js} +3 -3
  72. package/{chunk-BXSMFPTG.js → chunk-J25ESVUW.js} +10 -10
  73. package/{chunk-CVJRVBJL.js → chunk-J2XZZXIH.js} +4 -4
  74. package/{chunk-3EMIEC27.js → chunk-JVJ53XCH.js} +1 -1
  75. package/{chunk-AH5R7BYW.js → chunk-KC2QVCI7.js} +6 -6
  76. package/{chunk-MYOSN6BT.js → chunk-KF2DWSAH.js} +34 -13
  77. package/chunk-KK3FCYZM.js +647 -0
  78. package/{chunk-PRMEU7BT.js → chunk-KLD7K5FD.js} +7 -7
  79. package/{chunk-7AJRJGSQ.js → chunk-KMW5CRRM.js} +801 -381
  80. package/{chunk-Y2MF4DCJ.js → chunk-LELADM5Q.js} +1 -1
  81. package/{chunk-RTHFJZ6M.js → chunk-LMFMV5UC.js} +2 -2
  82. package/{chunk-2574ANSV.js → chunk-LZOOUQAZ.js} +4 -4
  83. package/{chunk-HOM6LTEW.js → chunk-M5EA44QU.js} +6 -6
  84. package/{chunk-IUMS6F53.js → chunk-MEDPR36J.js} +9 -5
  85. package/{chunk-6D25V6CB.js → chunk-MFXJY44K.js} +4 -4
  86. package/chunk-MVOZ22RZ.js +26 -0
  87. package/{chunk-CBUZ6DKA.js → chunk-N6EN3HK3.js} +1 -1
  88. package/{chunk-VS276URX.js → chunk-NEG5LYK5.js} +1 -1
  89. package/{chunk-B7DE5XJW.js → chunk-ODGSLWLO.js} +249 -66
  90. package/{chunk-S2MHR4PU.js → chunk-OGZE6BZG.js} +190 -118
  91. package/{chunk-CD3RU7XL.js → chunk-OJRTTERA.js} +62 -2
  92. package/{chunk-GXXY2NL3.js → chunk-OKPC4QNX.js} +37 -2
  93. package/{chunk-5QZSEQSK.js → chunk-ONFFUQYM.js} +1 -1
  94. package/{chunk-BGGAY6OK.js → chunk-P244EH4W.js} +3 -3
  95. package/chunk-P27E22MA.js +203 -0
  96. package/{chunk-UFC4J7OY.js → chunk-PK7VT4ZU.js} +3 -3
  97. package/{chunk-4FIO2S7Z.js → chunk-QLUYDJST.js} +1 -1
  98. package/{chunk-AEQMKYZN.js → chunk-QUJKDFZW.js} +7 -7
  99. package/{chunk-G22P367E.js → chunk-QXUVCIPB.js} +62 -18
  100. package/{chunk-IJTXNLQE.js → chunk-QYNABNNQ.js} +6 -6
  101. package/{chunk-TRHJ4NJB.js → chunk-RGUWOMXU.js} +626 -237
  102. package/{chunk-L32W3PRP.js → chunk-RH44TIHX.js} +165 -16
  103. package/{chunk-EBKHA63G.js → chunk-RIMFTQMC.js} +178 -46
  104. package/{chunk-OOJNQK6V.js → chunk-S25VJYXV.js} +8 -2
  105. package/{chunk-BGGV6B5O.js → chunk-SBRJOYND.js} +280 -139
  106. package/{chunk-KZPEGO6D.js → chunk-SBRSXY67.js} +6 -6
  107. package/chunk-SR4FE5VD.js +9 -0
  108. package/{chunk-4WVJLODK.js → chunk-T23G6PXQ.js} +8 -3
  109. package/{chunk-D374I563.js → chunk-T3WSFTBS.js} +1 -1
  110. package/{chunk-VP3BINY7.js → chunk-TOK555CQ.js} +31 -1
  111. package/{chunk-OBSEKCVK.js → chunk-U4VSBDO5.js} +88 -0
  112. package/{chunk-OX6GNNVT.js → chunk-U5LOKQ2R.js} +24 -13
  113. package/{chunk-LYDEFPQP.js → chunk-UDT4SI37.js} +1 -1
  114. package/{chunk-CKZPMJNU.js → chunk-UQXOORR3.js} +5 -5
  115. package/{chunk-FFYE5ATM.js → chunk-UR7555FE.js} +11 -11
  116. package/{chunk-F3XI6WQP.js → chunk-UWOCASVL.js} +5 -5
  117. package/{chunk-A5EVA6HU.js → chunk-V2V5Q6DU.js} +2 -2
  118. package/{chunk-PROOOQZ3.js → chunk-VCU5GV42.js} +1 -1
  119. package/{chunk-F6YWDVIB.js → chunk-VMWY7TUA.js} +1 -1
  120. package/{chunk-RETQOQ4D.js → chunk-VNALJT32.js} +2 -2
  121. package/{chunk-HGDKT2D6.js → chunk-VTHWBTRE.js} +177 -1
  122. package/{chunk-X7IA2B7R.js → chunk-WBSJAIZP.js} +7 -3
  123. package/{chunk-ZEKUFJLW.js → chunk-WVOZ35E4.js} +7 -7
  124. package/{chunk-B5SV4H3J.js → chunk-XDNXKFWF.js} +4 -4
  125. package/{chunk-4Q6HQORG.js → chunk-XLN2GD6Z.js} +4 -4
  126. package/{chunk-HBRDSQ3M.js → chunk-XNEDFWT4.js} +2 -2
  127. package/{chunk-6CKUO32A.js → chunk-Y22P6ASC.js} +11 -8
  128. package/{chunk-SRCCSTIM.js → chunk-Y3DOUQQQ.js} +4 -4
  129. package/{chunk-6WZVM33D.js → chunk-Y5EBOURK.js} +3 -3
  130. package/{chunk-6OVNSQHN.js → chunk-YLAHYLDQ.js} +5 -0
  131. package/{chunk-T6VROBY7.js → chunk-YTEY27GN.js} +2 -2
  132. package/{chunk-5ZUOVCKT.js → chunk-YUZ2DAIH.js} +3 -1
  133. package/{chunk-IUTUWIKE.js → chunk-ZCVBIIUE.js} +4 -4
  134. package/{chunk-VM72HKW2.js → chunk-ZCZLTJEW.js} +9 -36
  135. package/{cliAgentConfigHelpers-U5OAVAKQ.js → cliAgentConfigHelpers-6OFDHJFT.js} +8 -8
  136. package/{cliAuthorityBrokerClient-S42VMGB6.js → cliAuthorityBrokerClient-SFPC3WVK.js} +1 -1
  137. package/{cliLocalAgentRecordReader-HVZAQCUD.js → cliLocalAgentRecordReader-FHIMCBUK.js} +52 -45
  138. package/{commandRegistry-TME7INFU.js → commandRegistry-OKIWAJIS.js} +101 -93
  139. package/{contentThunks-U6OC4R2N.js → contentThunks-VF2DCU46.js} +33 -32
  140. package/{cooldownCommands-U7XSRVJP.js → cooldownCommands-QL6DWGVU.js} +1 -1
  141. package/{createAgentAutomationAction-IP4LFN3W.js → createAgentAutomationAction-BGET7Q6K.js} +34 -33
  142. package/{createDialogAction-IAGQJ3LH.js → createDialogAction-XYDQZETK.js} +34 -33
  143. package/{createPageAction-AZ3UIFKA.js → createPageAction-74S5RO7U.js} +38 -37
  144. package/{db-M7FU2GNK.js → db-6NRZLEW2.js} +1 -1
  145. package/{dbSlice-DKKMJJYY.js → dbSlice-FI7VNDR5.js} +13 -13
  146. package/{deleteFile-TQSONMVU.js → deleteFile-GD62MPZW.js} +8 -8
  147. package/{dialogCommands-PCDRMBWG.js → dialogCommands-Y6DHZUAM.js} +56 -54
  148. package/{dialogNotifyCommand-O35MWMOS.js → dialogNotifyCommand-MKXL4NGL.js} +10 -10
  149. package/{dialogSlice-QAKYN4DE.js → dialogSlice-XAUKSWZ4.js} +32 -31
  150. package/{dialogUsageCommand-2SSLTXKO.js → dialogUsageCommand-BZPKR3DW.js} +5 -5
  151. package/{docCreateCommands-CFQFZOAD.js → docCreateCommands-PHDFOQBM.js} +51 -48
  152. package/{docDeleteCommands-5CPNTIIS.js → docDeleteCommands-OSHJM67Y.js} +53 -50
  153. package/{docReadCommands-XQILYSAJ.js → docReadCommands-E6QYCFMS.js} +51 -48
  154. package/{docStore-GIVRT7TQ.js → docStore-ZZT2BEBU.js} +15 -15
  155. package/{docUpdateCommands-VETKSUDD.js → docUpdateCommands-DHIOPK2C.js} +51 -48
  156. package/fetchMessages-TQEUZD7H.js +1 -1
  157. package/{getPricing-LF5C4XSI.js → getPricing-RNRITFOP.js} +4 -4
  158. package/{handleSendMessageAction-HKIW4ZNO.js → handleSendMessageAction-ARUU6CNF.js} +71 -70
  159. package/{hostCredentialCreate-6VDJFNDO.js → hostCredentialCreate-SNQT73H4.js} +103 -104
  160. package/index.js +8 -8
  161. package/{localDialogRead-AV2VKKPG.js → localDialogRead-3T2KMCRC.js} +1 -1
  162. package/{localRuntimeAdapter-BQ4F5PZV.js → localRuntimeAdapter-MHI6Y2IZ.js} +112 -111
  163. package/{localRuntimeAuthority-WCNA4A3G.js → localRuntimeAuthority-7DKIT7UH.js} +2 -2
  164. package/{localRuntimeDb-CRNIBOOM.js → localRuntimeDb-5WZ4RJJO.js} +1 -1
  165. package/{machineCommands-K6XIGOAD.js → machineCommands-3O6Y27R4.js} +229 -321
  166. package/{machineWsRunDispatch-4OO7Z6UM.js → machineWsRunDispatch-5PFLR5XC.js} +101 -102
  167. package/markdownToSlate-KIYM7B3P.js +8 -0
  168. package/{mcpLocalAuthorizeCommand-ZP6ESAGE.js → mcpLocalAuthorizeCommand-BQCQ2KRJ.js} +15 -15
  169. package/{memberThunks-PBJPZ2JU.js → memberThunks-TU6A6OBV.js} +16 -16
  170. package/{models-H5NNZRLH.js → models-CINY5UZR.js} +2 -2
  171. package/package.json +1 -1
  172. package/{projectArchive-G7AOQPRW.js → projectArchive-X2EVXU3N.js} +40 -39
  173. package/{providerPresetApply-OPBCAONX.js → providerPresetApply-HUWNV2NI.js} +6 -6
  174. package/{providerRegistry-J2HCVTHE.js → providerRegistry-7FWKDKZJ.js} +6 -6
  175. package/{read-JEGPITEW.js → read-QAHEQID5.js} +8 -8
  176. package/{readDocTool-TE3XIU4Y.js → readDocTool-KG5DP6EM.js} +1 -1
  177. package/{readlineWorkspace-SOW5QUGZ.js → readlineWorkspace-SO3APHVP.js} +3300 -1518
  178. package/rememberExplicit-CPAPONSI.js +15 -0
  179. package/{removeDialogAgentAction-CX3OAH4Y.js → removeDialogAgentAction-QZCCVK2G.js} +19 -19
  180. package/{runAgentClientLoop-HQJPDFGQ.js → runAgentClientLoop-FLHHCOVH.js} +77 -77
  181. package/{runtimeDoctorCommands-GUH2YGMH.js → runtimeDoctorCommands-DN3I52C6.js} +8 -8
  182. package/{secretCommands-NJXFVHZU.js → secretCommands-36BCE3UE.js} +2 -2
  183. package/{setDialogExtraReferencesAction-CGM67EEQ.js → setDialogExtraReferencesAction-PDPTYSEW.js} +15 -15
  184. package/{setPrimaryDialogAgentAction-3ABWPPXR.js → setPrimaryDialogAgentAction-DOUIPR66.js} +19 -19
  185. package/{settingThunks-AY76OHYX.js → settingThunks-MHGGP6UE.js} +23 -23
  186. package/{spaceCommands-G63QGYQO.js → spaceCommands-JH7UYE3K.js} +54 -51
  187. package/{streamAgentChatTurn-E3XH2KFD.js → streamAgentChatTurn-VDDA2TX6.js} +118 -118
  188. package/{switchDialogAgentAction-G6EZRKCQ.js → switchDialogAgentAction-7USK3DAP.js} +17 -17
  189. package/{tableCommands-JI75ZHDI.js → tableCommands-UONBFC7L.js} +6 -6
  190. package/{toolApiClient-62UUPDUA.js → toolApiClient-53YMJ2G6.js} +7 -3
  191. package/{tools-7RSX22FT.js → tools-MIOCXKMG.js} +59 -60
  192. package/{tuiRestart-KAAA7TND.js → tuiRestart-ET3QISZ5.js} +10 -10
  193. package/{tuiSummaryLlmCaller-BVNHMWLR.js → tuiSummaryLlmCaller-MSINBP3M.js} +15 -14
  194. package/{updateCommands-ASK5XYPH.js → updateCommands-5OYND6EF.js} +3 -3
  195. package/{updateDialogTitleAction-SEWV252V.js → updateDialogTitleAction-2L4CC4YO.js} +35 -34
  196. package/{usageCommand-JVT5J3DC.js → usageCommand-JTKDAG6I.js} +2 -2
  197. package/{usageRebuildCommand-IZYYUTEW.js → usageRebuildCommand-4TFZCKXM.js} +3 -3
  198. package/{windowsSelfUpdate-BSDIS2J5.js → windowsSelfUpdate-HIYNL3VR.js} +2 -2
  199. package/{workContext-MM3P5GP5.js → workContext-Y3ADAPZU.js} +2 -1
  200. package/{workloadLifecycle-YIZ7KLUP.js → workloadLifecycle-ZCSQCHG3.js} +6 -6
  201. package/chunk-TUSTONB3.js +0 -81
  202. package/chunk-XBAEM4RI.js +0 -272
  203. package/{accountResolver-EK2S4PWF.js → accountResolver-QETKNC7T.js} +3 -3
  204. package/{chunk-W6RFEDN4.js → chunk-AETZ7AD6.js} +3 -3
  205. package/{chunk-VMJVAJ6W.js → chunk-TB5KTLNB.js} +3 -3
  206. /package/{chunk-FJ23FZXF.js → chunk-VIYVRPMJ.js} +0 -0
@@ -1,20 +1,17 @@
1
+ import {
2
+ deleteDialog,
3
+ runtime_default,
4
+ toast
5
+ } from "./chunk-ODGSLWLO.js";
1
6
  import {
2
7
  getAllMemberSpaces,
3
8
  getCurrentSpaceId,
4
9
  getCurrentSpaceIdRaw,
5
10
  updateCurrentSpaceIfMatch
6
- } from "./chunk-IUTUWIKE.js";
7
- import {
8
- deleteDialog,
9
- runtime_default,
10
- toast
11
- } from "./chunk-B7DE5XJW.js";
11
+ } from "./chunk-ZCVBIIUE.js";
12
12
  import {
13
13
  require_formatISO
14
14
  } from "./chunk-UVLYNWIE.js";
15
- import {
16
- require_react
17
- } from "./chunk-RD3QLZQV.js";
18
15
  import {
19
16
  UNCATEGORIZED_ID,
20
17
  addContentAction,
@@ -26,7 +23,7 @@ import {
26
23
  patchIndividualContentRecord,
27
24
  readContentRecordForSpaceSync,
28
25
  syncContentRecordSpaceId
29
- } from "./chunk-T6VROBY7.js";
26
+ } from "./chunk-YTEY27GN.js";
30
27
  import {
31
28
  createSpaceKey,
32
29
  normalizeSpaceId
@@ -39,10 +36,13 @@ import {
39
36
  uploadFileAction,
40
37
  upsertSSREntity,
41
38
  write
42
- } from "./chunk-RM4UMFY4.js";
39
+ } from "./chunk-6MQWGA5F.js";
43
40
  import {
44
41
  resolveFileCategory
45
42
  } from "./chunk-3PVYUPXK.js";
43
+ import {
44
+ require_react
45
+ } from "./chunk-RD3QLZQV.js";
46
46
  import {
47
47
  DEVICE_LOCAL_OWNER_ID,
48
48
  getRuntimeServerContext,
@@ -50,34 +50,31 @@ import {
50
50
  resolveReplicationServers,
51
51
  scheduleDeleteReplication,
52
52
  scheduleWriteReplication
53
- } from "./chunk-GXXY2NL3.js";
53
+ } from "./chunk-OKPC4QNX.js";
54
54
  import {
55
55
  createAsyncThunk
56
- } from "./chunk-7TTMMOKH.js";
56
+ } from "./chunk-247AAJRK.js";
57
57
  import {
58
58
  getIsDesktopApp
59
- } from "./chunk-ULLHVDTZ.js";
60
- import {
61
- selectIdentityUserId
62
- } from "./chunk-PXYBUFDB.js";
59
+ } from "./chunk-BH7CEVOH.js";
63
60
  import {
64
61
  createClientLogger
65
62
  } from "./chunk-QQ56R7KS.js";
66
63
  import {
67
- buildTombstoneRecord
68
- } from "./chunk-BV3FLP2L.js";
64
+ selectIdentityUserId
65
+ } from "./chunk-PXYBUFDB.js";
69
66
  import {
70
67
  asRecordOrEmpty
71
68
  } from "./chunk-KX6YBIHG.js";
72
69
  import {
73
70
  isAbortError
74
71
  } from "./chunk-7DPNBQSV.js";
72
+ import {
73
+ buildTombstoneRecord
74
+ } from "./chunk-BV3FLP2L.js";
75
75
  import {
76
76
  isSystemAdmin
77
77
  } from "./chunk-ZVOL2MAJ.js";
78
- import {
79
- extractUserId
80
- } from "./chunk-M2EJHDJP.js";
81
78
  import {
82
79
  SEPARATOR,
83
80
  createKey,
@@ -91,6 +88,9 @@ import {
91
88
  import {
92
89
  ulid
93
90
  } from "./chunk-OJKUU3LP.js";
91
+ import {
92
+ extractUserId
93
+ } from "./chunk-M2EJHDJP.js";
94
94
  import {
95
95
  asTrimmedNonEmptyStringArray
96
96
  } from "./chunk-I42VC5KR.js";
@@ -100,12 +100,12 @@ import {
100
100
  import {
101
101
  asTrimmedString
102
102
  } from "./chunk-3EUW3WEO.js";
103
- import {
104
- isRecord
105
- } from "./chunk-KUG52IAP.js";
106
103
  import {
107
104
  asOptionalFiniteNumber
108
105
  } from "./chunk-WWC7I6TA.js";
106
+ import {
107
+ isRecord
108
+ } from "./chunk-KUG52IAP.js";
109
109
  import {
110
110
  asOptionalTrimmedString
111
111
  } from "./chunk-G3SUCT4W.js";
@@ -1513,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
1513
1513
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1514
1514
  },
1515
1515
  file: async (key, { thunkAPI }) => {
1516
- const { deleteFileAction } = await import("./deleteFile-TQSONMVU.js");
1516
+ const { deleteFileAction } = await import("./deleteFile-GD62MPZW.js");
1517
1517
  await deleteFileAction(key, thunkAPI);
1518
1518
  },
1519
1519
  image: async (key, { thunkAPI }) => {
1520
- const { deleteFileAction } = await import("./deleteFile-TQSONMVU.js");
1520
+ const { deleteFileAction } = await import("./deleteFile-GD62MPZW.js");
1521
1521
  await deleteFileAction(key, thunkAPI);
1522
1522
  },
1523
1523
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -4,7 +4,7 @@ import {
4
4
  openrouterModels,
5
5
  platformHostedModels,
6
6
  zaiModels
7
- } from "./chunk-OBSEKCVK.js";
7
+ } from "./chunk-U4VSBDO5.js";
8
8
 
9
9
  // packages/ai/llm/modelAbility.ts
10
10
  var MODEL_ABILITY_TABLE = {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-4Q6HQORG.js";
3
+ } from "./chunk-XLN2GD6Z.js";
4
4
  import {
5
5
  resolveServerUrl
6
6
  } from "./chunk-BIDSIRTS.js";
7
7
  import {
8
8
  t
9
- } from "./chunk-S2MHR4PU.js";
9
+ } from "./chunk-OGZE6BZG.js";
10
10
 
11
11
  // packages/cli/cliApiClient.ts
12
12
  var CliApiError = class extends Error {
@@ -1,9 +1,12 @@
1
+ import {
2
+ defaultOpenBrowser
3
+ } from "./chunk-KC2QVCI7.js";
1
4
  import {
2
5
  generateCloudflareEmailRoutingToken,
3
6
  parseFlagWithOptionalValue,
4
7
  runCloudflareOAuthLogin,
5
8
  upsertEnvVariable
6
- } from "./chunk-HCNOO374.js";
9
+ } from "./chunk-6326DRQY.js";
7
10
  import {
8
11
  ANTHROPIC_OAUTH_AUTHORIZE_URL,
9
12
  ANTHROPIC_OAUTH_CALLBACK_PORT,
@@ -47,10 +50,7 @@ import {
47
50
  startCallbackServer,
48
51
  validateXAIEndpoint,
49
52
  xaiOAuthDiscovery
50
- } from "./chunk-MYOSN6BT.js";
51
- import {
52
- defaultOpenBrowser
53
- } from "./chunk-AH5R7BYW.js";
53
+ } from "./chunk-KF2DWSAH.js";
54
54
  import {
55
55
  extractGoogleValidationLink
56
56
  } from "./chunk-BMQ2MJUK.js";
@@ -60,7 +60,7 @@ import {
60
60
  detectLocalDevinCredentials,
61
61
  extractDevinToken,
62
62
  fetchAntigravityCloudCodeCompletion
63
- } from "./chunk-H7ZYKHAZ.js";
63
+ } from "./chunk-3OQFXODL.js";
64
64
  import {
65
65
  createOAuthTokenStore,
66
66
  resolveFreshAccessToken
@@ -74,19 +74,19 @@ import {
74
74
  } from "./chunk-R5GO3YZP.js";
75
75
  import {
76
76
  t
77
- } from "./chunk-S2MHR4PU.js";
77
+ } from "./chunk-OGZE6BZG.js";
78
78
  import {
79
79
  toErrorMessage
80
80
  } from "./chunk-HNMXYYJR.js";
81
81
  import {
82
82
  asTrimmedString
83
83
  } from "./chunk-3EUW3WEO.js";
84
- import {
85
- isRecord
86
- } from "./chunk-KUG52IAP.js";
87
84
  import {
88
85
  asOptionalFiniteNumber
89
86
  } from "./chunk-WWC7I6TA.js";
87
+ import {
88
+ isRecord
89
+ } from "./chunk-KUG52IAP.js";
90
90
 
91
91
  // packages/cli/oauth/flows/xai.ts
92
92
  function buildXAIAuthorizeUrl(opts) {
@@ -3,35 +3,35 @@ import {
3
3
  mergeReferences,
4
4
  resolveReferenceAssets,
5
5
  resolveToolsFromKeys
6
- } from "./chunk-Y5OWZQMJ.js";
6
+ } from "./chunk-6S6CZUXK.js";
7
7
  import {
8
8
  UI_CARD_ENVELOPE_MAX_BYTES,
9
9
  getAllToolRuns,
10
10
  parseUiCard,
11
11
  uiCardFallback
12
- } from "./chunk-VREG6ANQ.js";
12
+ } from "./chunk-DPAIQLAL.js";
13
13
  import {
14
14
  getDocState
15
- } from "./chunk-DXW5WDHZ.js";
16
- import {
17
- resolveToolBaseUrl
18
- } from "./chunk-XS5A3EKX.js";
15
+ } from "./chunk-CHYYSFFM.js";
19
16
  import {
20
17
  getTableState
21
- } from "./chunk-FZKA3XFA.js";
18
+ } from "./chunk-6XLWUNZB.js";
19
+ import {
20
+ selectAllMsgs
21
+ } from "./chunk-ODGSLWLO.js";
22
22
  import {
23
23
  getCurrentSpaceIdRaw,
24
24
  getViewMode
25
- } from "./chunk-IUTUWIKE.js";
25
+ } from "./chunk-ZCVBIIUE.js";
26
26
  import {
27
- selectAllMsgs
28
- } from "./chunk-B7DE5XJW.js";
27
+ selectById
28
+ } from "./chunk-6MQWGA5F.js";
29
+ import {
30
+ resolveToolBaseUrl
31
+ } from "./chunk-4YFC3DWW.js";
29
32
  import {
30
33
  selectPendingFiles
31
34
  } from "./chunk-I2OYPD3Y.js";
32
- import {
33
- selectById
34
- } from "./chunk-RM4UMFY4.js";
35
35
  import {
36
36
  getSessionSnapshotForState,
37
37
  selectIdentityUserBalance,
@@ -43,12 +43,12 @@ import {
43
43
  import {
44
44
  resolveAgentRecommendedSkillNames,
45
45
  resolveAgentRequiredPackIds
46
- } from "./chunk-MM73SP4K.js";
46
+ } from "./chunk-DOK7GDRU.js";
47
47
  import {
48
48
  attachmentKind,
49
49
  extractReferenceKeysFromMessage,
50
50
  normalizeAttachmentPart
51
- } from "./chunk-DNZ4JJ7C.js";
51
+ } from "./chunk-4F7SWSWO.js";
52
52
  import {
53
53
  asRecordOrEmpty
54
54
  } from "./chunk-KX6YBIHG.js";
@@ -65,17 +65,17 @@ import {
65
65
  expandEnabledPackPromptPatches,
66
66
  expandEnabledPacks,
67
67
  resolveEffectiveEnabledPacks
68
- } from "./chunk-EBKHA63G.js";
68
+ } from "./chunk-RIMFTQMC.js";
69
+ import {
70
+ metaKey
71
+ } from "./chunk-SYTHYBMI.js";
69
72
  import {
70
73
  canonicalizeToolNames,
71
74
  prioritizeToolNames
72
- } from "./chunk-6OVNSQHN.js";
75
+ } from "./chunk-YLAHYLDQ.js";
73
76
  import {
74
77
  extractCustomId
75
78
  } from "./chunk-M2EJHDJP.js";
76
- import {
77
- metaKey
78
- } from "./chunk-SYTHYBMI.js";
79
79
  import {
80
80
  asNonEmptyStringArray
81
81
  } from "./chunk-I42VC5KR.js";
@@ -84,20 +84,20 @@ import {
84
84
  getModelPricing,
85
85
  getPrices,
86
86
  hasExplicitAgentPricing
87
- } from "./chunk-SRCCSTIM.js";
87
+ } from "./chunk-Y3DOUQQQ.js";
88
88
  import {
89
89
  asTrimmedString
90
90
  } from "./chunk-3EUW3WEO.js";
91
+ import {
92
+ asOptionalFiniteNumber
93
+ } from "./chunk-WWC7I6TA.js";
91
94
  import {
92
95
  getModelConfig,
93
96
  getProviderByModelName
94
- } from "./chunk-CD3RU7XL.js";
97
+ } from "./chunk-OJRTTERA.js";
95
98
  import {
96
99
  isRecord
97
100
  } from "./chunk-KUG52IAP.js";
98
- import {
99
- asOptionalFiniteNumber
100
- } from "./chunk-WWC7I6TA.js";
101
101
  import {
102
102
  asOptionalTrimmedString
103
103
  } from "./chunk-G3SUCT4W.js";
@@ -1757,12 +1757,17 @@ async function resolveTurnToolContext(input) {
1757
1757
 
1758
1758
  // packages/app/utils/desktopActionGateChannel.ts
1759
1759
  function targetForRunKind(kind, ctx = {}) {
1760
- if (kind === "server-run" && typeof ctx.server === "string" && ctx.server.length > 0) {
1761
- return { kind: "web", server: ctx.server, token: ctx.token ?? null };
1760
+ if (kind === "server-run") {
1761
+ return {
1762
+ kind: "web",
1763
+ server: ctx.server?.trim() ?? "",
1764
+ token: ctx.token ?? null
1765
+ };
1762
1766
  }
1763
1767
  return { kind: "desktop" };
1764
1768
  }
1765
1769
  var NEEDS_LOGIN_MESSAGE = "\u9700\u8981\u767B\u5F55\u540E\u624D\u80FD\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1770
+ var MISSING_SERVER_MESSAGE = "\u672A\u914D\u7F6E\u670D\u52A1\u5668\u5730\u5740\uFF0C\u65E0\u6CD5\u5904\u7406\u8BE5\u6388\u6743\u8BF7\u6C42";
1766
1771
  var gates = /* @__PURE__ */ new Map();
1767
1772
  var targets = /* @__PURE__ */ new Map();
1768
1773
  var failures = /* @__PURE__ */ new Map();
@@ -1784,12 +1789,13 @@ function notify() {
1784
1789
  function pushGate(gate, target = { kind: "desktop" }, meta) {
1785
1790
  if (!gate || typeof gate.id !== "string" || gate.id.length === 0) return;
1786
1791
  failures.delete(gate.id);
1787
- if (target.kind === "web" && !target.token) {
1788
- if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message: NEEDS_LOGIN_MESSAGE });
1792
+ if (target.kind === "web" && (!target.token || !target.server.trim())) {
1793
+ const message = !target.token ? NEEDS_LOGIN_MESSAGE : MISSING_SERVER_MESSAGE;
1794
+ if (meta) failures.set(gate.id, { gateId: gate.id, meta: { ...meta, storage: "web" }, message });
1789
1795
  gates.delete(gate.id);
1790
1796
  targets.delete(gate.id);
1791
1797
  metadata.delete(gate.id);
1792
- errors.set(gate.id, NEEDS_LOGIN_MESSAGE);
1798
+ errors.set(gate.id, message);
1793
1799
  invalidateSnapshot();
1794
1800
  notify();
1795
1801
  return;
@@ -1,3 +1,24 @@
1
+ // packages/agent-runtime/workspaceSearchPolicy.ts
2
+ var ALWAYS_EXCLUDED_GLOBS = [
3
+ ".git/**",
4
+ ".nolo/**",
5
+ "node_modules/**",
6
+ "*.tsbuildinfo",
7
+ "dist/**",
8
+ "build/**",
9
+ "out/**",
10
+ "coverage/**",
11
+ ".next/**",
12
+ ".turbo/**",
13
+ "public/assets/**",
14
+ "*.min.js",
15
+ "*.min.css",
16
+ "*.map",
17
+ "*.lock",
18
+ "bun.lockb",
19
+ "*.ldb"
20
+ ];
21
+
1
22
  // packages/agent-runtime/executionBackend.ts
2
23
  var EXECUTION_BACKEND_KINDS = [
3
24
  "full-host",
@@ -42,6 +63,7 @@ function buildExecutionTicket(args) {
42
63
  }
43
64
 
44
65
  export {
66
+ ALWAYS_EXCLUDED_GLOBS,
45
67
  EXECUTION_BACKEND_KINDS,
46
68
  buildExecutionTicket
47
69
  };
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  gBase64
3
- } from "./chunk-X7IA2B7R.js";
3
+ } from "./chunk-WBSJAIZP.js";
4
4
  import {
5
5
  createClientLogger
6
6
  } from "./chunk-QQ56R7KS.js";
7
- import {
8
- isAbortError
9
- } from "./chunk-7DPNBQSV.js";
10
7
  import {
11
8
  isLevelNotFoundError
12
9
  } from "./chunk-OW765XBU.js";
10
+ import {
11
+ isAbortError
12
+ } from "./chunk-7DPNBQSV.js";
13
13
  import {
14
14
  isPublicBuiltinPlatformAgentKey
15
15
  } from "./chunk-WRKMXMU7.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  refreshSubscriptionQuotas
3
- } from "./chunk-TUSTONB3.js";
3
+ } from "./chunk-P27E22MA.js";
4
4
  import {
5
5
  getReadableCliDb
6
- } from "./chunk-AVJDELEA.js";
6
+ } from "./chunk-DLT2DN4M.js";
7
7
  import {
8
8
  clearCliLocalRuntimePreparedAgentCache
9
- } from "./chunk-7AJRJGSQ.js";
9
+ } from "./chunk-KMW5CRRM.js";
10
10
  import {
11
11
  readCredentialAvailability
12
12
  } from "./chunk-WWTSEBDF.js";
@@ -25,7 +25,7 @@ import {
25
25
  resolveAgentRecordFromHybridStore,
26
26
  sanitizeAgentRecordForCliOutput,
27
27
  writeAgentRecord
28
- } from "./chunk-BXSMFPTG.js";
28
+ } from "./chunk-J25ESVUW.js";
29
29
  import {
30
30
  resolveCliAgentKeyInput
31
31
  } from "./chunk-BR3GT6MR.js";
@@ -256,7 +256,7 @@ async function runAgentCreateCommand(args, deps = {}) {
256
256
  let verifyResult;
257
257
  if (parsed.verify) {
258
258
  try {
259
- const { verifyCustomProvider } = await import("./agentProviderCommands-O3Q25PKU.js");
259
+ const { verifyCustomProvider } = await import("./agentProviderCommands-SS6M6VGY.js");
260
260
  const rec = built.nextRecord;
261
261
  const verifyCredentialRef = typeof rec.credentialRef === "string" && rec.credentialRef.trim() ? rec.credentialRef.trim() : "";
262
262
  if (verifyCredentialRef) {
@@ -0,0 +1,108 @@
1
+ import {
2
+ applyMemoryInterpreterMutation
3
+ } from "./chunk-6RSNVJGO.js";
4
+ import {
5
+ getMemoryEvidenceVNextStrict,
6
+ listMemoryStatesForEntityVNext,
7
+ loadMemoryVNextCatalog
8
+ } from "./chunk-324FWHUA.js";
9
+
10
+ // packages/ai/memory/vnext/workContext.ts
11
+ import { createHash } from "crypto";
12
+ var facet = "work-context";
13
+ var statuses = ["active", "paused", "completed", "cancelled"];
14
+ var hash = (v) => createHash("sha256").update(JSON.stringify(v)).digest("hex");
15
+ var isWorkContextState = (state) => state.facet === facet;
16
+ var bounded = (s, max) => typeof s === "string" && s.trim().length > 0 && s.length <= max;
17
+ var list = (x, maxCount, maxLength) => Array.isArray(x) && x.length <= maxCount && x.every((v) => bounded(v, maxLength));
18
+ var object = (x) => !!x && typeof x === "object" && !Array.isArray(x);
19
+ var validScope = (s) => {
20
+ if (!s || !bounded(s.ownerId, 256) || !bounded(s.dialogId, 512) || !(s.spaceId === null || bounded(s.spaceId, 256))) throw new Error("invalid authorized scope");
21
+ };
22
+ function validValue(v) {
23
+ return object(v) && v.version === 1 && Number.isSafeInteger(v.revision) && v.revision > 0 && statuses.includes(v.status) && bounded(v.goal, 4096) && list(v.constraints, 50, 2048) && list(v.openItems, 50, 2048) && (v.nextStep === void 0 || typeof v.nextStep === "string" && v.nextStep.length <= 4096) && list(v.latestSourceRefs, 20, 2048) && v.latestSourceRefs.length > 0 && (v.spaceId === null || bounded(v.spaceId, 256)) && list(v.dialogIds, 100, 512) && v.dialogIds.length > 0;
24
+ }
25
+ function validPatch(p) {
26
+ if (!object(p) || Object.keys(p).some((k) => !["status", "goal", "constraints", "openItems", "nextStep"].includes(k))) throw new Error("invalid patch");
27
+ if (p.status !== void 0 && !statuses.includes(p.status)) throw new Error("invalid status");
28
+ if (p.goal !== void 0 && !bounded(p.goal, 4096)) throw new Error("invalid goal");
29
+ if (p.nextStep !== void 0 && (typeof p.nextStep !== "string" || p.nextStep.length > 4096)) throw new Error("invalid nextStep");
30
+ for (const a of [p.constraints, p.openItems]) if (a !== void 0 && !list(a, 50, 2048)) throw new Error("invalid list");
31
+ }
32
+ async function updateWorkContext(db, scope, input) {
33
+ validScope(scope);
34
+ if (!object(input) || Object.keys(input).some((k) => !["activityId", "expectedRevision", "itemKey", "originRef", "changeId", "sourceRefs", "patch"].includes(k))) throw new Error("invalid input");
35
+ validPatch(input.patch);
36
+ if (!bounded(input.changeId, 256) || !list(input.sourceRefs, 20, 2048) || !input.sourceRefs.length) throw new Error("source and changeId required");
37
+ const creating = input.activityId === void 0;
38
+ if (creating && (!bounded(input.itemKey, 256) || !bounded(input.originRef, 2048) || input.expectedRevision !== void 0)) throw new Error("origin and itemKey required");
39
+ if (!creating && (!bounded(input.activityId, 256) || !Number.isSafeInteger(input.expectedRevision) || input.expectedRevision < 1 || input.itemKey !== void 0 || input.originRef !== void 0)) throw new Error("activityId and revision required");
40
+ const activityId = creating ? `work-${hash([scope.ownerId, scope.spaceId, input.originRef, input.itemKey])}` : input.activityId;
41
+ const evidenceId = `work-change-${hash([activityId, input.changeId])}`;
42
+ const fingerprint = hash([scope.spaceId, scope.dialogId, input]);
43
+ let result;
44
+ await applyMemoryInterpreterMutation(db, scope.ownerId, async () => {
45
+ const states = (await listMemoryStatesForEntityVNext(db, scope.ownerId, activityId)).filter(isWorkContextState);
46
+ const currents = states.filter((s) => !s.retiredAt);
47
+ if (currents.length > 1 || currents[0] && !validValue(currents[0].value)) throw new Error("invalid work context state");
48
+ const current = currents[0];
49
+ const old = current?.value;
50
+ if (old && old.spaceId !== scope.spaceId) {
51
+ result = { activityId, revision: 0, outcome: "conflict" };
52
+ return { action: "no_op", reason: "scope mismatch" };
53
+ }
54
+ const receipt = await getMemoryEvidenceVNextStrict(db, scope.ownerId, evidenceId);
55
+ if (receipt) {
56
+ const matching = states.find((s) => s.evidenceIds.includes(evidenceId));
57
+ const savedValue = matching && validValue(matching.value) ? matching.value : void 0;
58
+ const match = receipt.text === fingerprint && !!savedValue;
59
+ result = { activityId, revision: match ? savedValue.revision : old?.revision ?? 0, outcome: match ? savedValue.revision === 1 ? "created" : "updated" : "conflict" };
60
+ return { action: "no_op", reason: "duplicate change" };
61
+ }
62
+ if (creating && current || !creating && (!old || old.revision !== input.expectedRevision)) {
63
+ result = { activityId, revision: old?.revision ?? 0, outcome: "conflict" };
64
+ return { action: "no_op", reason: "revision conflict" };
65
+ }
66
+ if (!old && !input.patch.goal) throw new Error("goal required");
67
+ const status = input.patch.status ?? old?.status ?? "active";
68
+ const dialogIds = [.../* @__PURE__ */ new Set([...old?.dialogIds ?? [], scope.dialogId])];
69
+ if (dialogIds.length > 100) throw new Error("dialog association limit exceeded");
70
+ const value = { version: 1, revision: (old?.revision ?? 0) + 1, status, goal: input.patch.goal ?? old.goal, constraints: input.patch.constraints ?? old?.constraints ?? [], openItems: input.patch.openItems ?? old?.openItems ?? [], nextStep: input.patch.nextStep ?? old?.nextStep, latestSourceRefs: input.sourceRefs, spaceId: scope.spaceId, dialogIds };
71
+ const unchanged = !!old && JSON.stringify([old.status, old.goal, old.constraints, old.openItems, old.nextStep]) === JSON.stringify([value.status, value.goal, value.constraints, value.openItems, value.nextStep]);
72
+ const now = (/* @__PURE__ */ new Date()).toISOString();
73
+ result = { activityId, revision: unchanged ? old.revision : value.revision, outcome: unchanged ? "unchanged" : old ? "updated" : "created" };
74
+ if (unchanged) return { action: "no_op", reason: "unchanged" };
75
+ const evidence = { id: evidenceId, ownerId: scope.ownerId, text: fingerprint, sourceRef: input.sourceRefs[0], confidence: 1, createdAt: now };
76
+ return { action: old ? "update" : "create", reason: "work context", entities: old ? [] : [{ id: activityId, ownerId: scope.ownerId, type: "activity", subtype: facet, name: value.goal, createdAt: now, updatedAt: now }], evidence: [evidence], states: [{ id: `work-state-${hash([activityId, value.revision])}`, ownerId: scope.ownerId, entityId: activityId, facet, value, text: value.goal, evidenceIds: [evidenceId], createdAt: now, updatedAt: now }], supersededStateIds: current ? [current.id] : [] };
77
+ });
78
+ return result;
79
+ }
80
+ async function readWorkContexts(db, scope, query = {}) {
81
+ validScope(scope);
82
+ if (!object(query) || Object.keys(query).some((k) => !["activityId", "status", "query", "limit", "discovery"].includes(k))) throw new Error("invalid query");
83
+ const limit = query.limit ?? 20;
84
+ if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("limit must be 1..100");
85
+ if (query.status !== void 0 && query.status !== "all" && !statuses.some((status) => status === query.status)) throw new Error("invalid status");
86
+ if (query.discovery !== void 0 && query.discovery !== "dialog" && query.discovery !== "scope") throw new Error("invalid discovery");
87
+ if (query.activityId !== void 0 && !bounded(query.activityId, 256)) throw new Error("invalid activityId");
88
+ if (query.query !== void 0 && !bounded(query.query, 512)) throw new Error("invalid query text");
89
+ const states = query.activityId ? await listMemoryStatesForEntityVNext(db, scope.ownerId, query.activityId) : (await loadMemoryVNextCatalog(db, scope.ownerId)).states;
90
+ const items = [];
91
+ for (const state of states) {
92
+ if (!isWorkContextState(state) || state.retiredAt) continue;
93
+ if (!validValue(state.value) || !bounded(state.entityId, 256) || !bounded(state.updatedAt, 128)) throw new Error("invalid work context state");
94
+ const value = state.value;
95
+ if (value.spaceId !== scope.spaceId || !query.activityId && query.discovery !== "scope" && !value.dialogIds.includes(scope.dialogId)) continue;
96
+ if (query.status !== "all" && value.status !== (query.status ?? (query.activityId ? value.status : "active"))) continue;
97
+ if (query.query && !JSON.stringify([value.goal, value.constraints, value.openItems, value.nextStep]).toLowerCase().includes(query.query.toLowerCase())) continue;
98
+ items.push({ activityId: state.entityId, value, updatedAt: state.updatedAt });
99
+ }
100
+ items.sort((a, b) => Number(b.value.dialogIds.includes(scope.dialogId)) - Number(a.value.dialogIds.includes(scope.dialogId)) || b.updatedAt.localeCompare(a.updatedAt) || a.activityId.localeCompare(b.activityId));
101
+ return { items: items.slice(0, limit), hasMore: items.length > limit };
102
+ }
103
+
104
+ export {
105
+ isWorkContextState,
106
+ updateWorkContext,
107
+ readWorkContexts
108
+ };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  require_formatISO
3
3
  } from "./chunk-UVLYNWIE.js";
4
- import {
5
- require_react
6
- } from "./chunk-RD3QLZQV.js";
7
4
  import {
8
5
  patch,
9
6
  readAndWait
10
- } from "./chunk-RM4UMFY4.js";
7
+ } from "./chunk-6MQWGA5F.js";
8
+ import {
9
+ require_react
10
+ } from "./chunk-RD3QLZQV.js";
11
11
  import {
12
12
  toErrorMessage
13
13
  } from "./chunk-HNMXYYJR.js";
@@ -335,7 +335,7 @@ async function saveDocState(arg, { dispatch, getState }) {
335
335
  ).unwrap();
336
336
  if (dbSpaceId) {
337
337
  try {
338
- const { updateContentTitle } = await import("./contentThunks-U6OC4R2N.js");
338
+ const { updateContentTitle } = await import("./contentThunks-VF2DCU46.js");
339
339
  await dispatch(
340
340
  updateContentTitle({
341
341
  spaceId: dbSpaceId,
@@ -378,7 +378,7 @@ async function saveDocState(arg, { dispatch, getState }) {
378
378
  }
379
379
  }
380
380
  async function createDocState(args, thunkApi) {
381
- const { createPageAction } = await import("./createPageAction-AZ3UIFKA.js");
381
+ const { createPageAction } = await import("./createPageAction-74S5RO7U.js");
382
382
  return createPageAction(args, thunkApi);
383
383
  }
384
384
  function subscribe(listener) {
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createSelector
3
- } from "./chunk-7TTMMOKH.js";
3
+ } from "./chunk-247AAJRK.js";
4
4
  import {
5
5
  getAllServers,
6
6
  getIsDesktopApp,
7
7
  googleSessionServer,
8
8
  scopeGoogleSessionServers
9
- } from "./chunk-ULLHVDTZ.js";
9
+ } from "./chunk-BH7CEVOH.js";
10
10
  import {
11
11
  selectIdentityToken
12
12
  } from "./chunk-PXYBUFDB.js";
@@ -4,7 +4,7 @@ import {
4
4
 
5
5
  // packages/cli/agentCommandSupport.ts
6
6
  async function getDefaultCliDb() {
7
- const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-CRNIBOOM.js");
7
+ const { getDefaultCliLocalRuntimeDb } = await import("./localRuntimeDb-5WZ4RJJO.js");
8
8
  return getDefaultCliLocalRuntimeDb();
9
9
  }
10
10
  function createNullCliDb() {