nolo-cli 0.224.0-alpha.2 → 0.224.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 (237) hide show
  1. package/{_executeModel-4WBUORCW.js → _executeModel-5NA4USGG.js} +77 -71
  2. package/{action-CK64LS6S.js → action-X75O3XPH.js} +11 -8
  3. package/{addContentAction-EQXMFNPR.js → addContentAction-GVC77QSN.js} +14 -13
  4. package/{addDialogAgentAction-RSDZDASD.js → addDialogAgentAction-KKDVAMW3.js} +15 -14
  5. package/{agentDeleteCommand-BB6KU5AO.js → agentDeleteCommand-2RFGKFAB.js} +127 -119
  6. package/{agentEmailCommands-KMHPL6OH.js → agentEmailCommands-GQCQKKOR.js} +126 -114
  7. package/{agentFavoriteCommands-2LKGKSUD.js → agentFavoriteCommands-7LOP3HUD.js} +5 -5
  8. package/{agentGrantCommands-QQV4N4JW.js → agentGrantCommands-L6O2HVJI.js} +5 -5
  9. package/{agentListCommands-5UNM7CGG.js → agentListCommands-HSGLDPDQ.js} +110 -495
  10. package/{agentMachineCommands-OC5D4YZW.js → agentMachineCommands-BISF6PVV.js} +63 -57
  11. package/{agentProviderCommands-ZCH37KAL.js → agentProviderCommands-O3Q25PKU.js} +6 -6
  12. package/{agentPullCommand-XN6ZPBUW.js → agentPullCommand-G6U2LHMW.js} +6 -6
  13. package/agentRecordCommands-AOXPGYAJ.js +189 -0
  14. package/{agentRunCommand-M22Y3D5U.js → agentRunCommand-AFAIP7U7.js} +129 -115
  15. package/{agentRunControl-QDFW5P2T.js → agentRunControl-VBL7UFSG.js} +20 -14
  16. package/{agentRuntimeLocal-SD7U2EGY.js → agentRuntimeLocal-T7BX2WGL.js} +47 -41
  17. package/{agentSlice-AJPMMBOP.js → agentSlice-XJNKE3PG.js} +18 -17
  18. package/{appDeleteCommands-NE3NQQJL.js → appDeleteCommands-LURUSPY7.js} +56 -50
  19. package/{appDeployCommands-2BAHY522.js → appDeployCommands-SMEW4AK2.js} +56 -50
  20. package/{appDeployStatusCommands-JTW6LZNC.js → appDeployStatusCommands-VYPJTBJK.js} +56 -50
  21. package/{appGetCommands-WKFEJO6A.js → appGetCommands-N4NI5GGJ.js} +56 -50
  22. package/{appListCommands-HNAZZLFX.js → appListCommands-5C6ONN3Z.js} +56 -50
  23. package/{authCommand-VQP625QS.js → authCommand-4CVBDADE.js} +29 -28
  24. package/{authCommands-PAKU3CJZ.js → authCommands-EHU2BHOX.js} +12 -11
  25. package/{builtinSkillRegistry-PXH7EGQB.js → builtinSkillRegistry-AYWYQVA4.js} +4 -4
  26. package/{chromeOpsCommands-YKX2QX3A.js → chromeOpsCommands-CSDG2HYN.js} +6 -6
  27. package/{chunk-OOF7XDZF.js → chunk-2574ANSV.js} +6 -6
  28. package/chunk-2SXN7LAY.js +15 -0
  29. package/{chunk-OGHP3CTL.js → chunk-2X7WFDT6.js} +1 -1
  30. package/{chunk-XI2BWJM5.js → chunk-324FWHUA.js} +20 -3
  31. package/{chunk-D726I5AZ.js → chunk-3EMIEC27.js} +2 -2
  32. package/{chunk-XUJZYUIM.js → chunk-3FBAVU2Y.js} +24 -22
  33. package/{chunk-YL3EFYL3.js → chunk-4D4QD7FT.js} +3 -1
  34. package/{chunk-5RKUPJYL.js → chunk-4FIO2S7Z.js} +11 -3
  35. package/{chunk-EK7PGVPY.js → chunk-4IQVE43Z.js} +63 -32
  36. package/{chunk-6NKA6RKF.js → chunk-4Q6HQORG.js} +8 -8
  37. package/{chunk-P2ZLUIW2.js → chunk-4X5AVCM7.js} +94 -4
  38. package/chunk-4ZCTKB27.js +31 -0
  39. package/{chunk-JWXITTQB.js → chunk-5HUO7SEX.js} +9 -107
  40. package/{chunk-4A2JIXR2.js → chunk-5QZSEQSK.js} +1 -1
  41. package/chunk-5ZUOVCKT.js +32 -0
  42. package/{chunk-TRWT3EE3.js → chunk-62HXNQVV.js} +1 -1
  43. package/{chunk-JC5XLWZK.js → chunk-6CKUO32A.js} +27 -15
  44. package/chunk-6D25V6CB.js +133 -0
  45. package/chunk-6WOLPIPY.js +379 -0
  46. package/{chunk-KOXKKHFE.js → chunk-6WZVM33D.js} +9 -4
  47. package/{chunk-YGMBIXCF.js → chunk-6XRPBZRS.js} +4 -2
  48. package/{chunk-ULK35M44.js → chunk-7AJRJGSQ.js} +1049 -2860
  49. package/chunk-7NIBQ4HY.js +138 -0
  50. package/{chunk-7Z6EW7AH.js → chunk-7TTMMOKH.js} +13 -6
  51. package/{chunk-ZLOSGVCQ.js → chunk-A3LUWRQK.js} +15 -15
  52. package/{chunk-C4WTX5TU.js → chunk-A5EVA6HU.js} +2 -2
  53. package/{chunk-ZLNHUFOF.js → chunk-A74QP4FI.js} +2613 -1297
  54. package/{chunk-ME4XUFTD.js → chunk-AEQMKYZN.js} +15 -15
  55. package/{chunk-6E2NWYT4.js → chunk-AH5R7BYW.js} +22 -176
  56. package/{chunk-H7R3365N.js → chunk-ANJRDS6U.js} +8 -5
  57. package/{chunk-YFLVRVYK.js → chunk-AVJDELEA.js} +1 -1
  58. package/{chunk-GIABSSWQ.js → chunk-B5SV4H3J.js} +4 -4
  59. package/{chunk-S7RA7A4X.js → chunk-B7DE5XJW.js} +387 -347
  60. package/chunk-BEM6LPD2.js +734 -0
  61. package/{chunk-SRL56PI2.js → chunk-BGGAY6OK.js} +46 -8
  62. package/{chunk-BKJSRO66.js → chunk-BGGV6B5O.js} +555 -328
  63. package/{chunk-BGGHA5DV.js → chunk-BIABIPGW.js} +1 -1
  64. package/chunk-BIDSIRTS.js +307 -0
  65. package/{chunk-6D7NVU66.js → chunk-BXSMFPTG.js} +17 -14
  66. package/{chunk-Q6HOUF4O.js → chunk-CBUZ6DKA.js} +3 -3
  67. package/{chunk-LE6LGAJE.js → chunk-CD3RU7XL.js} +17 -2
  68. package/{chunk-GVGOEMNV.js → chunk-CKZPMJNU.js} +3 -3
  69. package/{chunk-HJAGA3GR.js → chunk-CVJRVBJL.js} +3 -3
  70. package/chunk-D374I563.js +62 -0
  71. package/{chunk-XWGDCWXY.js → chunk-DNZ4JJ7C.js} +9 -9
  72. package/chunk-DVYAFH2Q.js +103 -0
  73. package/{chunk-PYIMOZSX.js → chunk-DXW5WDHZ.js} +4 -4
  74. package/{chunk-KFHREHUQ.js → chunk-DXWGFL2Z.js} +89 -1
  75. package/{chunk-KPAFQHRT.js → chunk-E5KJOZWY.js} +4 -4
  76. package/{chunk-GNHMRBYZ.js → chunk-EBKHA63G.js} +106 -14
  77. package/{chunk-PFJNLBRU.js → chunk-EEOOBRA7.js} +6 -6
  78. package/{chunk-M3JEW6N6.js → chunk-F26GAEH3.js} +10 -0
  79. package/{chunk-QLFCTYRH.js → chunk-F3XI6WQP.js} +17 -10
  80. package/{chunk-AFHOCBSP.js → chunk-F6YWDVIB.js} +1 -1
  81. package/{chunk-SJYK3LLP.js → chunk-FFYE5ATM.js} +6 -6
  82. package/{chunk-QG3USDTD.js → chunk-FZKA3XFA.js} +21 -21
  83. package/{chunk-C4VAR65S.js → chunk-G22P367E.js} +153 -117
  84. package/{chunk-WOIURUUV.js → chunk-GDUC4VS2.js} +12 -12
  85. package/{chunk-2VUZSVAS.js → chunk-GXXY2NL3.js} +22 -20
  86. package/{chunk-IWH5SOU4.js → chunk-H7ZYKHAZ.js} +38 -18
  87. package/{chunk-G2EJ7NL4.js → chunk-HBRDSQ3M.js} +2 -2
  88. package/{chunk-EGXPAWLG.js → chunk-HCNOO374.js} +1 -1
  89. package/{chunk-DJSTBAOU.js → chunk-HOM6LTEW.js} +4 -4
  90. package/{chunk-S2NTVGA2.js → chunk-I2OYPD3Y.js} +1 -1
  91. package/{chunk-RXJ26SQW.js → chunk-IJTXNLQE.js} +13 -13
  92. package/{chunk-UYOICCYG.js → chunk-IUMS6F53.js} +59 -88
  93. package/{chunk-MOMR7NMG.js → chunk-IUTUWIKE.js} +2 -2
  94. package/{chunk-JVRQ6YVK.js → chunk-JBWXPACD.js} +1 -1
  95. package/{chunk-SASHAZ67.js → chunk-KZPEGO6D.js} +13 -2
  96. package/{chunk-HCJFGH6Y.js → chunk-L32W3PRP.js} +46 -16
  97. package/{chunk-GGKNJ42M.js → chunk-LYDEFPQP.js} +18 -108
  98. package/{chunk-K5FNYHZC.js → chunk-MECDGHLK.js} +420 -120
  99. package/{chunk-EOWLBDY6.js → chunk-MM73SP4K.js} +1 -1
  100. package/{chunk-J6T25AJ6.js → chunk-MYOSN6BT.js} +82 -18
  101. package/{chunk-Q7WP5RPC.js → chunk-MYPKBJJO.js} +5 -5
  102. package/{chunk-6RQFZCKH.js → chunk-N2JROHD3.js} +4 -4
  103. package/{chunk-VREDDN25.js → chunk-O6IPRAVV.js} +14 -9
  104. package/{chunk-VALBGPM6.js → chunk-OBSEKCVK.js} +17 -20
  105. package/{chunk-AMEOV5VZ.js → chunk-OOJNQK6V.js} +33 -33
  106. package/{chunk-PPJYZRSQ.js → chunk-OX6GNNVT.js} +6 -1
  107. package/{chunk-5R63B62U.js → chunk-P3IZUMIC.js} +8 -8
  108. package/{chunk-FRSBYNWI.js → chunk-PGKA77TZ.js} +52 -217
  109. package/{chunk-H5LWB3D3.js → chunk-PRMEU7BT.js} +347 -14
  110. package/{chunk-2ZKFCIJJ.js → chunk-PROOOQZ3.js} +1 -1
  111. package/{chunk-EUCFKKDM.js → chunk-PVFYPUIM.js} +40 -10
  112. package/{chunk-HOCHUZQ7.js → chunk-QJTZ76CP.js} +24 -6
  113. package/{chunk-MK2Q7ZJD.js → chunk-R7XWZDOH.js} +58 -24
  114. package/{chunk-5FUN7EG4.js → chunk-RD3QLZQV.js} +83 -47
  115. package/chunk-RETQOQ4D.js +33394 -0
  116. package/{chunk-AVHRSJUH.js → chunk-RM4UMFY4.js} +32 -25
  117. package/{chunk-2OLYKYNY.js → chunk-RTHFJZ6M.js} +8 -8
  118. package/{chunk-OB6DVWPF.js → chunk-S2MHR4PU.js} +164 -4
  119. package/{chunk-IWQAOW2X.js → chunk-SRCCSTIM.js} +8 -8
  120. package/{chunk-PVZY6P3S.js → chunk-T6VROBY7.js} +2 -2
  121. package/{chunk-2KTUDBG7.js → chunk-TEMLHVGX.js} +1 -1
  122. package/{chunk-TVFRV3UQ.js → chunk-TRHJ4NJB.js} +673 -1279
  123. package/{chunk-QVBXJNZ2.js → chunk-TUSTONB3.js} +1 -1
  124. package/{chunk-UMRI2IRY.js → chunk-TWTJV35S.js} +6 -6
  125. package/{chunk-5OZC7R7Y.js → chunk-U3G7RRXJ.js} +13 -12
  126. package/{chunk-CXDPIPZ4.js → chunk-UFC4J7OY.js} +3 -3
  127. package/{chunk-CKT6QUE2.js → chunk-UHW6SCVK.js} +1 -1
  128. package/{chunk-AGP3YSEC.js → chunk-ULLHVDTZ.js} +48 -3
  129. package/{chunk-SYQR7FQS.js → chunk-VM72HKW2.js} +97 -29
  130. package/{chunk-KEN3N2TN.js → chunk-VMJVAJ6W.js} +13 -10
  131. package/{chunk-53X6PS42.js → chunk-VREG6ANQ.js} +103 -100
  132. package/{chunk-SOF4OWDM.js → chunk-VS276URX.js} +0 -2
  133. package/{chunk-SH3IKNCG.js → chunk-VSRISJXZ.js} +15 -8
  134. package/chunk-WDWZPASX.js +29 -0
  135. package/chunk-WFGNWWJI.js +326 -0
  136. package/{chunk-UJKTI5PG.js → chunk-WRKMXMU7.js} +2 -1
  137. package/{chunk-FIYSMXHY.js → chunk-WWTSEBDF.js} +1 -1
  138. package/{chunk-E2BESSAW.js → chunk-X4O7FJF5.js} +2 -0
  139. package/chunk-X7IA2B7R.js +166 -0
  140. package/{chunk-5ZMIIR23.js → chunk-XBAEM4RI.js} +7 -0
  141. package/{chunk-4JVNURX4.js → chunk-XS5A3EKX.js} +1 -23
  142. package/{chunk-N5Z2V73W.js → chunk-Y2MF4DCJ.js} +1 -1
  143. package/{chunk-EVYGYDPG.js → chunk-Y5OWZQMJ.js} +39 -30
  144. package/{chunk-AK5O76CC.js → chunk-YGCOJNFZ.js} +3 -3
  145. package/{chunk-L5I543VB.js → chunk-YGDYYFRX.js} +20 -24
  146. package/{chunk-OK4MZRJ6.js → chunk-Z2WZAE4P.js} +128 -149
  147. package/chunk-Z6YTCDU4.js +24 -0
  148. package/chunk-ZEKUFJLW.js +1438 -0
  149. package/{chunk-KN3HEZIQ.js → chunk-ZVOL2MAJ.js} +1 -1
  150. package/{cliAgentConfigHelpers-PO3MVDME.js → cliAgentConfigHelpers-U5OAVAKQ.js} +12 -12
  151. package/{cliAuthorityBrokerClient-XHH7MH2P.js → cliAuthorityBrokerClient-S42VMGB6.js} +1 -1
  152. package/{cliEnvHelpers-VPSJ4XWC.js → cliEnvHelpers-CNMP3RDX.js} +1 -1
  153. package/{cliExecutor-4MAX3PZL.js → cliExecutor-K6FDZTQ2.js} +3 -1
  154. package/{cliLocalAgentRecordReader-Z7CH4K4R.js → cliLocalAgentRecordReader-HVZAQCUD.js} +49 -44
  155. package/{commandRegistry-3JVE76K2.js → commandRegistry-TME7INFU.js} +98 -94
  156. package/{contentThunks-SRKUHSBR.js → contentThunks-U6OC4R2N.js} +37 -35
  157. package/{cooldownCommands-X7P5M2V5.js → cooldownCommands-U7XSRVJP.js} +4 -4
  158. package/{createAgentAutomationAction-B4BQV46J.js → createAgentAutomationAction-IP4LFN3W.js} +37 -35
  159. package/{createDialogAction-IONSKZIX.js → createDialogAction-IAGQJ3LH.js} +38 -37
  160. package/{createPageAction-K75KBQOO.js → createPageAction-AZ3UIFKA.js} +38 -36
  161. package/{db-CS4ZJQKV.js → db-M7FU2GNK.js} +9 -6
  162. package/{dbSlice-ZJPDIFER.js → dbSlice-DKKMJJYY.js} +13 -12
  163. package/{deleteFile-Q3YDB4ML.js → deleteFile-TQSONMVU.js} +11 -8
  164. package/{dialogCommands-6KQEBHSG.js → dialogCommands-PCDRMBWG.js} +60 -55
  165. package/dialogMessageRecord-OAV77LT7.js +7 -0
  166. package/{dialogNotifyCommand-WIZFFEY3.js → dialogNotifyCommand-O35MWMOS.js} +13 -13
  167. package/{dialogSlice-GPALSBQM.js → dialogSlice-QAKYN4DE.js} +35 -33
  168. package/{dialogUsageCommand-HTVPR2CX.js → dialogUsageCommand-2SSLTXKO.js} +3 -3
  169. package/{docCreateCommands-XZOLWBRC.js → docCreateCommands-CFQFZOAD.js} +54 -48
  170. package/{docDeleteCommands-ZSO4LGWE.js → docDeleteCommands-5CPNTIIS.js} +56 -50
  171. package/{docReadCommands-TTMXCDER.js → docReadCommands-XQILYSAJ.js} +54 -48
  172. package/{docStore-O43KOHIX.js → docStore-GIVRT7TQ.js} +15 -14
  173. package/{docUpdateCommands-PRG6WOXL.js → docUpdateCommands-VETKSUDD.js} +54 -48
  174. package/fetchMessages-TQEUZD7H.js +1 -1
  175. package/{getPricing-YH3VMSVU.js → getPricing-LF5C4XSI.js} +5 -5
  176. package/{handleSendMessageAction-I2GHUSHZ.js → handleSendMessageAction-HKIW4ZNO.js} +70 -66
  177. package/{hostCredentialCreate-V775SKCE.js → hostCredentialCreate-6VDJFNDO.js} +118 -105
  178. package/index.js +56 -18
  179. package/keys-RWF7UCB4.js +1 -1
  180. package/{lib-OT5OTXRU.js → lib-62SWPXNF.js} +3 -7
  181. package/{localDialogRead-SVTPA5GY.js → localDialogRead-AV2VKKPG.js} +1 -1
  182. package/{localRecall-2J6QPOK2.js → localRecall-BDYKXB46.js} +3 -1
  183. package/{localRuntimeAdapter-SAMUDW5S.js → localRuntimeAdapter-BQ4F5PZV.js} +120 -108
  184. package/{localRuntimeAuthority-IBJAT62G.js → localRuntimeAuthority-WCNA4A3G.js} +4 -2
  185. package/{localRuntimeDb-N7KHDXS2.js → localRuntimeDb-CRNIBOOM.js} +1 -1
  186. package/{machineCommands-ZXZWGMFE.js → machineCommands-K6XIGOAD.js} +142 -115
  187. package/{machineWsRunDispatch-3ZEI4BEC.js → machineWsRunDispatch-4OO7Z6UM.js} +114 -102
  188. package/mcpLocalAuthorizeCommand-ZP6ESAGE.js +106 -0
  189. package/{memberThunks-JRYNONYV.js → memberThunks-PBJPZ2JU.js} +22 -17
  190. package/{memoryCommands-5WC3T66U.js → memoryCommands-BC6REPQB.js} +4 -4
  191. package/{models-CXINDUJA.js → models-H5NNZRLH.js} +2 -2
  192. package/{overlay-THLKYIWY.js → overlay-JA3SPVUS.js} +7 -3
  193. package/package.json +1 -1
  194. package/{projectArchive-V7EYBAX6.js → projectArchive-G7AOQPRW.js} +43 -41
  195. package/{providerPresetApply-SHT2SUVB.js → providerPresetApply-OPBCAONX.js} +6 -6
  196. package/{providerRegistry-TA7EGCVZ.js → providerRegistry-J2HCVTHE.js} +6 -6
  197. package/{read-Q7GOHGNP.js → read-JEGPITEW.js} +10 -9
  198. package/{readDocTool-Z5OQ6422.js → readDocTool-TE3XIU4Y.js} +1 -1
  199. package/{readlineWorkspace-S4VRNWYG.js → readlineWorkspace-SOW5QUGZ.js} +4412 -4279
  200. package/{removeDialogAgentAction-U3F2MNAY.js → removeDialogAgentAction-CX3OAH4Y.js} +17 -16
  201. package/{runAgentClientLoop-MQLOUDF5.js → runAgentClientLoop-HQJPDFGQ.js} +95 -70
  202. package/{runtimeDoctorCommands-I47JN4HS.js → runtimeDoctorCommands-GUH2YGMH.js} +17 -17
  203. package/{secretCommands-LJXOOYA7.js → secretCommands-NJXFVHZU.js} +4 -4
  204. package/{setDialogExtraReferencesAction-G3WSJ7EM.js → setDialogExtraReferencesAction-CGM67EEQ.js} +16 -15
  205. package/{setPrimaryDialogAgentAction-6FHAHZBB.js → setPrimaryDialogAgentAction-3ABWPPXR.js} +17 -16
  206. package/{settingThunks-AXTBX3Q5.js → settingThunks-AY76OHYX.js} +181 -62
  207. package/{skillDiscovery-B5V23AXP.js → skillDiscovery-MDDKPTW3.js} +4 -3
  208. package/{spaceCommands-IB6FKWIC.js → spaceCommands-G63QGYQO.js} +59 -53
  209. package/{store-JRVN62NM.js → store-Z53ICFL3.js} +3 -1
  210. package/{streamAgentChatTurn-GMNIKJVL.js → streamAgentChatTurn-E3XH2KFD.js} +160 -155
  211. package/{switchDialogAgentAction-UOFIAGPL.js → switchDialogAgentAction-G6EZRKCQ.js} +15 -14
  212. package/{tableCommands-HITDSLHS.js → tableCommands-JI75ZHDI.js} +14 -11
  213. package/{toolApiClient-OGQEBQVX.js → toolApiClient-62UUPDUA.js} +3 -5
  214. package/{tools-MWIF3S4T.js → tools-7RSX22FT.js} +64 -59
  215. package/tuiRestart-KAAA7TND.js +41 -0
  216. package/{tuiSummaryLlmCaller-7LWYTHLM.js → tuiSummaryLlmCaller-BVNHMWLR.js} +19 -19
  217. package/{updateCommands-RJVCRSBP.js → updateCommands-ASK5XYPH.js} +8 -6
  218. package/{updateDialogTitleAction-ZXHMZFSX.js → updateDialogTitleAction-SEWV252V.js} +37 -35
  219. package/{usageCommand-RVKHEPLU.js → usageCommand-JVT5J3DC.js} +3 -3
  220. package/{usageRebuildCommand-GRAFOZF2.js → usageRebuildCommand-IZYYUTEW.js} +4 -4
  221. package/webapi-24RZDIIQ.js +2488 -0
  222. package/{windowsSelfUpdate-KERHIAB4.js → windowsSelfUpdate-BSDIS2J5.js} +2 -2
  223. package/workContext-MM3P5GP5.js +13 -0
  224. package/workContextAccess-UZHDLBUR.js +11 -0
  225. package/workContextWriteNotice-YCSSMHN4.js +7 -0
  226. package/agentRecordCommands-S2IVVEES.js +0 -177
  227. package/chunk-2THCNKE4.js +0 -147
  228. package/chunk-2WZXXAQD.js +0 -57
  229. package/chunk-652XYZGP.js +0 -352
  230. package/chunk-BJF2MHJ3.js +0 -118
  231. package/chunk-KEPOVMF4.js +0 -91
  232. package/chunk-OXKUPBAQ.js +0 -776
  233. package/{chunk-BLVSFYQ3.js → chunk-LISC7BD4.js} +3 -3
  234. package/{chunk-SNBZZPYH.js → chunk-OQHIVPG4.js} +3 -3
  235. package/{chunk-47ITIXO7.js → chunk-USGHJSGO.js} +3 -3
  236. package/{offlineMarxistsAgentCommand-4IC3Y4C6.js → offlineMarxistsAgentCommand-XVXUE6G5.js} +3 -3
  237. package/{workloadLifecycle-O2I3NZ2Q.js → workloadLifecycle-YIZ7KLUP.js} +3 -3
@@ -4,7 +4,7 @@ import {
4
4
  openrouterModels,
5
5
  platformHostedModels,
6
6
  zaiModels
7
- } from "./chunk-VALBGPM6.js";
7
+ } from "./chunk-OBSEKCVK.js";
8
8
 
9
9
  // packages/ai/llm/modelAbility.ts
10
10
  var MODEL_ABILITY_TABLE = {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-2OLYKYNY.js";
3
+ } from "./chunk-RTHFJZ6M.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -14,22 +14,22 @@ import {
14
14
  qwenTokenPlanModels,
15
15
  stepfunModels,
16
16
  stepfunStepPlanModels
17
- } from "./chunk-LE6LGAJE.js";
17
+ } from "./chunk-CD3RU7XL.js";
18
+ import {
19
+ asOptionalFiniteNumber
20
+ } from "./chunk-WWC7I6TA.js";
21
+ import {
22
+ asOptionalTrimmedString
23
+ } from "./chunk-G3SUCT4W.js";
18
24
  import {
19
25
  PLATFORM_HOSTED_DEEPSEEK_FLASH_OFF_PEAK_PRICE,
20
26
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
21
27
  PLATFORM_HOSTED_DEEPSEEK_PRO_OFF_PEAK_PRICE,
22
28
  PLATFORM_HOSTED_DEEPSEEK_PRO_PEAK_PRICE
23
- } from "./chunk-VALBGPM6.js";
29
+ } from "./chunk-OBSEKCVK.js";
24
30
  import {
25
31
  asTrimmedLowercaseString
26
32
  } from "./chunk-QSJ3HFEF.js";
27
- import {
28
- asOptionalFiniteNumber
29
- } from "./chunk-WWC7I6TA.js";
30
- import {
31
- asOptionalTrimmedString
32
- } from "./chunk-G3SUCT4W.js";
33
33
 
34
34
  // packages/agent-runtime/antigravityOAuth.ts
35
35
  var decodeBase64 = (s) => typeof Buffer !== "undefined" ? Buffer.from(s, "base64").toString("utf8") : typeof atob === "function" ? atob(s) : s;
@@ -301,11 +301,11 @@ var KIMI_CODE_MODEL_OPTIONS = kimiCodeModels.map((m, i) => ({
301
301
  hasVision: m.hasVision,
302
302
  ...i === 0 ? { recommended: true } : {}
303
303
  }));
304
- var OPENCODE_GO_MODEL_OPTIONS = opencodeGoModels.map((m, i) => ({
304
+ var OPENCODE_GO_MODEL_OPTIONS = opencodeGoModels.map((m) => ({
305
305
  id: m.name,
306
306
  label: m.displayName ?? m.name,
307
307
  hasVision: m.hasVision,
308
- ...i === 0 ? { recommended: true } : {}
308
+ ...m.name === "deepseek-v4.1-flash" ? { recommended: true } : {}
309
309
  }));
310
310
  var COMMAND_CODE_MODEL_OPTIONS = commandCodeModels.map((m, i) => ({
311
311
  id: m.name,
@@ -417,9 +417,21 @@ var SUBSCRIPTION_OAUTH_PROVIDERS = [
417
417
  // 非 Ultra 账号 discovery 返回 gemini-4-argon-disabled,选中后调用 404。标签明示门槛,
418
418
  // 让不具备资格的 Antigravity 用户不会误选;3.1 Pro 保留为所有档位可用的回退。
419
419
  { id: "gemini-4-argon", label: "Gemini 4 Argon\uFF08\u9700 Ultra\uFF09", hasVision: true },
420
+ // Exact wire IDs observed in Antigravity discovery with supportsImages=true.
421
+ { id: "gemini-4-hydrogen-medium", label: "Gemini 4 Hydrogen Medium", hasVision: true },
422
+ // Discovery (2026-11-17) 确认 Carbon 存在且 supportsImages=true;逻辑 id 用裸
423
+ // gemini-4-carbon,effort 变体由 antigravityWireModel 折叠(裸 id 直传会 404)。
424
+ { id: "gemini-4-carbon", label: "Gemini 4 Carbon", hasVision: true },
425
+ { id: "claude-opus-5-5-medium", label: "Claude Opus 5.5 Medium", hasVision: true },
426
+ { id: "claude-sonnet-5-5-high", label: "Claude Sonnet 5.5 High", hasVision: true },
420
427
  { id: "gemini-3.1-pro", label: "Gemini 3.1 Pro", hasVision: true },
421
428
  { id: "gemini-2.5-pro", label: "Gemini 2.5 Pro", hasVision: true },
422
429
  { id: "claude-sonnet-5", label: "Claude Sonnet 5", hasVision: true },
430
+ // Claude 可用 id 随 Antigravity 账号档位变化:2026-11-17 实测 Ultra 账号的
431
+ // discovery 只给 claude-sonnet-4-6 / claude-opus-4-6-thinking,Pro 档位此前给
432
+ // claude-sonnet-5-5-high / claude-opus-5-5-medium。两套都保留在目录里,
433
+ // 谁账号有什么就用什么;缺失的那档调用时上游回 404,不因此删掉另一档。
434
+ { id: "claude-sonnet-4-6", label: "Claude Sonnet 4.6", hasVision: true },
423
435
  { id: "claude-opus-4-6-thinking", label: "Claude Opus 4.6 Thinking", hasVision: true }
424
436
  ],
425
437
  cloudCodeBaseUrl: ANTIGRAVITY_CLOUD_CODE_BASE_URL,
@@ -594,7 +606,7 @@ var CUSTOM_API_KEY_TEMPLATES = [
594
606
  description: "OpenCode Go \u8BA2\u9605\uFF08$5 \u9996\u6708 / $10 \u6708\uFF0C\u805A\u5408 Grok/Kimi/Qwen/GLM/MiMo/MiniMax/DeepSeek\uFF09",
595
607
  provider: "opencode-go",
596
608
  baseUrl: "https://opencode.ai/zen/go/v1",
597
- defaultModel: "qwen3.8-max",
609
+ defaultModel: "deepseek-v4.1-flash",
598
610
  modelOptions: OPENCODE_GO_MODEL_OPTIONS,
599
611
  commercialKind: "subscription",
600
612
  accessVariant: "token_plan_endpoint"
@@ -696,12 +708,12 @@ var CUSTOM_API_KEY_TEMPLATES = [
696
708
  description: "open-design.ai \u805A\u5408\u8BA2\u9605\uFF08\u4E00\u4E2A Key \u805A\u5408 GPT/Claude/DeepSeek/GLM/Kimi/MiMo\uFF0COpenAI \u517C\u5BB9\uFF09",
697
709
  provider: "opendesign",
698
710
  baseUrl: "https://amr-link.open-design.ai/v1",
699
- defaultModel: "gpt-6-luna",
711
+ defaultModel: "deepseek-v4.1-flash",
700
712
  modelOptions: [
701
- { id: "gpt-6-luna", label: "GPT-6 Luna", hasVision: true, recommended: true },
713
+ { id: "gpt-6-luna", label: "GPT-6 Luna", hasVision: true },
702
714
  { id: "claude-haiku-5.5", label: "Claude Haiku 5.5", hasVision: true },
703
715
  { id: "deepseek-v4-pro", label: "DeepSeek V4 Pro" },
704
- { id: "deepseek-v4.1-flash", label: "DeepSeek V4.1 Flash", hasVision: true },
716
+ { id: "deepseek-v4.1-flash", label: "DeepSeek V4.1 Flash", hasVision: true, recommended: true },
705
717
  { id: "deepseek-v4-flash", label: "DeepSeek V4 Flash" },
706
718
  { id: "deepseek-v4-flash-vision-exp", label: "DeepSeek V4 Flash Vision Exp", hasVision: true },
707
719
  { id: "glm-5.3-flashx", label: "GLM 5.3 FlashX", hasVision: true },
@@ -0,0 +1,133 @@
1
+ import {
2
+ isAccountOnDemandWorkflowSkill,
3
+ resolveUserEnabledSkills
4
+ } from "./chunk-DVYAFH2Q.js";
5
+ import {
6
+ collectAgentSkillConfigIssues,
7
+ describeAgentSkillModeValue,
8
+ isAgentSkillDisabled,
9
+ resolveAgentSkillConfig
10
+ } from "./chunk-MM73SP4K.js";
11
+ import {
12
+ dedupeSkillPromptPatches,
13
+ resolveBuiltinSkillEntry,
14
+ resolveBuiltinSkillPage,
15
+ resolveSkillGraphFromRoots
16
+ } from "./chunk-EBKHA63G.js";
17
+ import {
18
+ parseSkillDocProtocol
19
+ } from "./chunk-W6RFEDN4.js";
20
+
21
+ // packages/ai/skills/agentSkillPreferenceDiagnostics.ts
22
+ var hasOwn = (value, key) => Object.prototype.hasOwnProperty.call(value, key);
23
+ var resolveAgentSkillPreferenceSource = (preferences) => {
24
+ if (!preferences || typeof preferences !== "object") {
25
+ return { source: "empty", field: null };
26
+ }
27
+ if (hasOwn(preferences, "enabledSkills")) {
28
+ return { source: "settings-record", field: "enabledSkills" };
29
+ }
30
+ if (hasOwn(preferences, "enabledPromptSkills")) {
31
+ return { source: "legacy-field", field: "enabledPromptSkills" };
32
+ }
33
+ return { source: "empty", field: null };
34
+ };
35
+ var buildAgentSkillPreferenceDiagnostic = (input) => {
36
+ const { source, field } = resolveAgentSkillPreferenceSource(input.preferences);
37
+ const config = resolveAgentSkillConfig(input.agentConfig);
38
+ const agentSkillModes = {};
39
+ for (const slug of Object.keys(config).sort()) {
40
+ agentSkillModes[slug] = config[slug];
41
+ }
42
+ const discardedSkills = collectAgentSkillConfigIssues(input.agentConfig).map(
43
+ (issue) => ({
44
+ slug: issue.slug,
45
+ value: describeAgentSkillModeValue(issue.value),
46
+ reason: issue.reason
47
+ })
48
+ );
49
+ return {
50
+ event: "agent_skill_preference_resolved",
51
+ preferenceSource: source,
52
+ preferenceField: field,
53
+ enabledSkills: [...input.enabledSkills],
54
+ enabledSkillCount: input.enabledSkills.length,
55
+ agentSkillModes,
56
+ agentSkillCount: Object.keys(agentSkillModes).length,
57
+ discardedSkills,
58
+ discardedSkillCount: discardedSkills.length
59
+ };
60
+ };
61
+ var DIAGNOSTIC_PREFIX = "[nolo.skill.diagnostics] ";
62
+ var seenSignatures = /* @__PURE__ */ new Set();
63
+ function skillDiagnosticsEnabled(env = typeof process === "undefined" ? {} : process.env ?? {}) {
64
+ const flag = env.NOLO_SKILL_DIAGNOSTICS?.trim();
65
+ return flag === "1" || flag === "true";
66
+ }
67
+ var reportAgentSkillPreferenceDiagnostic = (diagnostic, sink) => {
68
+ if (!sink && !skillDiagnosticsEnabled()) return false;
69
+ const stderr = typeof process === "undefined" ? void 0 : process.stderr;
70
+ const write = sink ?? (typeof stderr?.write === "function" ? (line) => {
71
+ stderr.write(line);
72
+ } : void 0);
73
+ if (!write) return false;
74
+ const signature = JSON.stringify(diagnostic);
75
+ if (seenSignatures.has(signature)) return false;
76
+ seenSignatures.add(signature);
77
+ write(`${DIAGNOSTIC_PREFIX}${signature}
78
+ `);
79
+ return true;
80
+ };
81
+
82
+ // packages/ai/skills/userSkillRuntime.ts
83
+ async function resolveUserSkillRuntime(agentConfig, preferences) {
84
+ const effectiveConfig = agentConfig && typeof agentConfig === "object" ? "rawRecord" in agentConfig && agentConfig.rawRecord && typeof agentConfig.rawRecord === "object" ? agentConfig.rawRecord : agentConfig : null;
85
+ const disabledSlugs = /* @__PURE__ */ new Set();
86
+ const requiredSlugs = /* @__PURE__ */ new Set();
87
+ for (const [identifier, mode] of Object.entries(resolveAgentSkillConfig(effectiveConfig))) {
88
+ const entry = resolveBuiltinSkillEntry(identifier);
89
+ if (!entry) continue;
90
+ if (mode === "disabled") disabledSlugs.add(entry.slug);
91
+ if (mode === "required") requiredSlugs.add(entry.slug);
92
+ }
93
+ const enabledSkills = resolveUserEnabledSkills(preferences);
94
+ reportAgentSkillPreferenceDiagnostic(
95
+ buildAgentSkillPreferenceDiagnostic({
96
+ agentConfig: effectiveConfig,
97
+ preferences,
98
+ enabledSkills
99
+ })
100
+ );
101
+ const graph = await resolveSkillGraphFromRoots({
102
+ roots: enabledSkills.map((identifier) => ({
103
+ identifier,
104
+ mode: isAccountOnDemandWorkflowSkill(identifier) && !requiredSlugs.has(identifier) ? "recommended" : "required"
105
+ })),
106
+ loadPage: async (identifier) => {
107
+ const entry = resolveBuiltinSkillEntry(identifier);
108
+ return entry ? resolveBuiltinSkillPage(entry.skillId) : null;
109
+ },
110
+ strictRequiredDependencies: true,
111
+ admitSkill: (page, canonicalIdentifier) => {
112
+ const entry = resolveBuiltinSkillEntry(canonicalIdentifier) ?? resolveBuiltinSkillEntry(page?.dbKey);
113
+ return !!entry && !disabledSlugs.has(entry.slug) && !isAgentSkillDisabled(effectiveConfig, entry.slug);
114
+ }
115
+ });
116
+ const admittedKeys = new Set(graph.visits.map((visit) => visit.dbKey));
117
+ const contentByKey = new Map(
118
+ [...graph.contentByKey].filter(([, page]) => page?.dbKey && admittedKeys.has(page.dbKey))
119
+ );
120
+ const skillPromptContributions = dedupeSkillPromptPatches(graph.visits.flatMap((visit) => {
121
+ const entry = resolveBuiltinSkillEntry(visit.meta?.skillConfig?.id) ?? resolveBuiltinSkillEntry(visit.dbKey);
122
+ if (visit.mode !== "required" || !entry) return [];
123
+ const page = contentByKey.get(visit.dbKey);
124
+ const content = (visit.meta?.skillConfig?.promptPatch || parseSkillDocProtocol(page?.content ?? "", visit.meta).content).trim();
125
+ return content ? [{ skillId: entry.skillId, content }] : [];
126
+ }));
127
+ const skillPromptPatches = skillPromptContributions.map(({ content }) => content);
128
+ return { ...graph, contentByKey, skillPromptPatches, skillPromptContributions };
129
+ }
130
+
131
+ export {
132
+ resolveUserSkillRuntime
133
+ };
@@ -0,0 +1,379 @@
1
+ import {
2
+ _appendEntityBatch,
3
+ _appendEvidenceBatch,
4
+ _appendRelationBatch,
5
+ _appendRetiredStateBatch,
6
+ _appendStateBatch,
7
+ getMemoryEntityVNext,
8
+ getMemoryEvidenceVNext,
9
+ getMemoryEvidenceVNextStrict,
10
+ getMemoryStateVNext,
11
+ listMemoryStatesForEntityVNext,
12
+ loadMemoryVNextCatalog
13
+ } from "./chunk-324FWHUA.js";
14
+
15
+ // packages/ai/memory/vnext/workContext.ts
16
+ import { createHash } from "crypto";
17
+
18
+ // packages/ai/memory/vnext/applyMutation.ts
19
+ async function validateMutation(db, ownerId, mutation) {
20
+ const pending = {
21
+ evidenceIds: /* @__PURE__ */ new Set(),
22
+ entityIds: /* @__PURE__ */ new Set(),
23
+ stateIds: /* @__PURE__ */ new Set(),
24
+ relationIds: /* @__PURE__ */ new Set()
25
+ };
26
+ for (const ev of mutation.evidence ?? []) {
27
+ if (!ev.id || typeof ev.id !== "string") {
28
+ throw new Error("evidence id must be a non-empty string");
29
+ }
30
+ if (pending.evidenceIds.has(ev.id)) {
31
+ throw new Error(`duplicate evidence id in mutation: ${ev.id}`);
32
+ }
33
+ pending.evidenceIds.add(ev.id);
34
+ }
35
+ for (const ent of mutation.entities ?? []) {
36
+ if (!ent.id || typeof ent.id !== "string") {
37
+ throw new Error("entity id must be a non-empty string");
38
+ }
39
+ if (pending.entityIds.has(ent.id)) {
40
+ throw new Error(`duplicate entity id in mutation: ${ent.id}`);
41
+ }
42
+ pending.entityIds.add(ent.id);
43
+ }
44
+ for (const st of mutation.states ?? []) {
45
+ if (!st.id || typeof st.id !== "string") {
46
+ throw new Error("state id must be a non-empty string");
47
+ }
48
+ if (pending.stateIds.has(st.id)) {
49
+ throw new Error(`duplicate state id in mutation: ${st.id}`);
50
+ }
51
+ pending.stateIds.add(st.id);
52
+ }
53
+ for (const rel of mutation.relations ?? []) {
54
+ if (!rel.id || typeof rel.id !== "string") {
55
+ throw new Error("relation id must be a non-empty string");
56
+ }
57
+ if (pending.relationIds.has(rel.id)) {
58
+ throw new Error(`duplicate relation id in mutation: ${rel.id}`);
59
+ }
60
+ pending.relationIds.add(rel.id);
61
+ }
62
+ const supersededIds = /* @__PURE__ */ new Set();
63
+ for (const sid of mutation.supersededStateIds ?? []) {
64
+ if (supersededIds.has(sid)) {
65
+ throw new Error(`duplicate supersededStateId in mutation: ${sid}`);
66
+ }
67
+ supersededIds.add(sid);
68
+ }
69
+ for (const ev of mutation.evidence ?? []) {
70
+ if (ev.ownerId !== ownerId) {
71
+ throw new Error(
72
+ `evidence ${ev.id} has ownerId ${ev.ownerId}, expected ${ownerId}`
73
+ );
74
+ }
75
+ }
76
+ for (const ent of mutation.entities ?? []) {
77
+ if (ent.ownerId !== ownerId) {
78
+ throw new Error(
79
+ `entity ${ent.id} has ownerId ${ent.ownerId}, expected ${ownerId}`
80
+ );
81
+ }
82
+ }
83
+ for (const st of mutation.states ?? []) {
84
+ if (st.ownerId !== ownerId) {
85
+ throw new Error(
86
+ `state ${st.id} has ownerId ${st.ownerId}, expected ${ownerId}`
87
+ );
88
+ }
89
+ }
90
+ for (const rel of mutation.relations ?? []) {
91
+ if (rel.ownerId !== ownerId) {
92
+ throw new Error(
93
+ `relation ${rel.id} has ownerId ${rel.ownerId}, expected ${ownerId}`
94
+ );
95
+ }
96
+ }
97
+ for (const st of mutation.states ?? []) {
98
+ if (supersededIds.has(st.id)) {
99
+ throw new Error(
100
+ `state ${st.id} appears in both states and supersededStateIds; a record cannot be created and retired in the same mutation`
101
+ );
102
+ }
103
+ }
104
+ const facetSlots = /* @__PURE__ */ new Set();
105
+ for (const st of mutation.states ?? []) {
106
+ const slot = `${st.entityId} ${st.facet}`;
107
+ if (facetSlots.has(slot)) {
108
+ throw new Error(
109
+ `mutation writes parallel current states for entity ${st.entityId} facet ${st.facet}`
110
+ );
111
+ }
112
+ facetSlots.add(slot);
113
+ }
114
+ for (const ev of mutation.evidence ?? []) {
115
+ const existing = await getMemoryEvidenceVNext(db, ownerId, ev.id);
116
+ if (existing) {
117
+ throw new Error(
118
+ `evidence ${ev.id} already exists (owner ${ownerId}); use a unique id`
119
+ );
120
+ }
121
+ }
122
+ for (const ent of mutation.entities ?? []) {
123
+ const existing = await getMemoryEntityVNext(db, ownerId, ent.id);
124
+ if (existing) {
125
+ throw new Error(
126
+ `entity ${ent.id} already exists (owner ${ownerId}); use a unique id`
127
+ );
128
+ }
129
+ }
130
+ for (const st of mutation.states ?? []) {
131
+ if (!pending.entityIds.has(st.entityId)) {
132
+ const entity = await getMemoryEntityVNext(db, ownerId, st.entityId);
133
+ if (!entity) {
134
+ throw new Error(
135
+ `memory state ${st.id} references missing entity ${st.entityId} (owner ${ownerId})`
136
+ );
137
+ }
138
+ }
139
+ for (const evidenceId of st.evidenceIds) {
140
+ if (!pending.evidenceIds.has(evidenceId)) {
141
+ const ev = await getMemoryEvidenceVNext(db, ownerId, evidenceId);
142
+ if (!ev) {
143
+ throw new Error(
144
+ `memory state ${st.id} references missing evidence ${evidenceId} (owner ${ownerId})`
145
+ );
146
+ }
147
+ }
148
+ }
149
+ const existing = await getMemoryStateVNext(db, ownerId, st.id);
150
+ if (existing) {
151
+ if (existing.retiredAt) {
152
+ throw new Error(
153
+ `cannot update retired memory state ${st.id} (owner ${ownerId})`
154
+ );
155
+ }
156
+ if (existing.entityId !== st.entityId || existing.facet !== st.facet) {
157
+ throw new Error(
158
+ `state ${st.id} already exists with different entity/facet (${existing.entityId}/${existing.facet} vs ${st.entityId}/${st.facet}); use supersede instead`
159
+ );
160
+ }
161
+ }
162
+ if (!existing) {
163
+ const existingStates = await listMemoryStatesForEntityVNext(db, ownerId, st.entityId);
164
+ for (const es of existingStates) {
165
+ if (es.facet === st.facet && !es.retiredAt) {
166
+ if (!supersededIds.has(es.id)) {
167
+ throw new Error(
168
+ `entity ${st.entityId} facet ${st.facet} already has current state ${es.id}; supersede it or use a different facet`
169
+ );
170
+ }
171
+ }
172
+ }
173
+ }
174
+ }
175
+ for (const sid of mutation.supersededStateIds ?? []) {
176
+ const existing = await getMemoryStateVNext(db, ownerId, sid);
177
+ if (!existing) {
178
+ throw new Error(
179
+ `cannot supersede missing memory state: ${sid} (owner ${ownerId})`
180
+ );
181
+ }
182
+ if (existing.retiredAt) {
183
+ throw new Error(
184
+ `cannot supersede already retired memory state: ${sid} (owner ${ownerId})`
185
+ );
186
+ }
187
+ const replacement = (mutation.states ?? []).find(
188
+ (st) => st.entityId === existing.entityId && st.facet === existing.facet
189
+ );
190
+ if (!replacement) {
191
+ throw new Error(
192
+ `superseded state ${sid} (entity ${existing.entityId} facet ${existing.facet}) has no replacement in this mutation`
193
+ );
194
+ }
195
+ }
196
+ for (const rel of mutation.relations ?? []) {
197
+ for (const [side, ref] of [
198
+ ["from", rel.from],
199
+ ["to", rel.to]
200
+ ]) {
201
+ if (pending.entityIds.has(ref) || pending.stateIds.has(ref) || pending.evidenceIds.has(ref)) {
202
+ continue;
203
+ }
204
+ const resolved = await getMemoryEntityVNext(db, ownerId, ref) ?? await getMemoryStateVNext(db, ownerId, ref) ?? await getMemoryEvidenceVNext(db, ownerId, ref);
205
+ if (!resolved) {
206
+ throw new Error(
207
+ `memory relation ${rel.id} references missing ${side} ${ref} (owner ${ownerId})`
208
+ );
209
+ }
210
+ }
211
+ }
212
+ }
213
+ var applyMutationWithoutCoordination = async (db, ownerId, mutation) => {
214
+ await validateMutation(db, ownerId, mutation);
215
+ const completion = mutation.nativeCaptureCompletion;
216
+ if (completion) {
217
+ const prior = await getMemoryEvidenceVNextStrict(db, ownerId, completion.id);
218
+ const withoutOutcome = (ev) => ({
219
+ ...ev,
220
+ nativeCapture: ev.nativeCapture && { ...ev.nativeCapture, outcome: void 0 }
221
+ });
222
+ if (!prior?.nativeCapture || prior.nativeCapture.outcome || completion.ownerId !== ownerId || !["applied", "no_op"].includes(completion.nativeCapture?.outcome ?? "") || completion.nativeCapture?.outcome === "applied" && (["no_op", "ambiguous"].includes(mutation.action) || !mutation.states?.length || mutation.states.some((st) => !st.evidenceIds.includes(completion.id))) || completion.nativeCapture?.outcome === "no_op" && (mutation.action !== "no_op" || !!(mutation.entities?.length || mutation.states?.length || mutation.relations?.length || mutation.evidence?.length || mutation.supersededStateIds?.length)) || JSON.stringify(withoutOutcome(prior)) !== JSON.stringify(withoutOutcome(completion)) || mutation.evidence?.some((ev) => ev.id === completion.id)) {
223
+ throw new Error("invalid native capture completion");
224
+ }
225
+ }
226
+ const batch = db.batch();
227
+ if (completion) _appendEvidenceBatch(batch, completion);
228
+ for (const ev of mutation.evidence ?? []) {
229
+ _appendEvidenceBatch(batch, ev);
230
+ }
231
+ for (const ent of mutation.entities ?? []) {
232
+ _appendEntityBatch(batch, ent);
233
+ }
234
+ for (const st of mutation.states ?? []) {
235
+ _appendStateBatch(batch, st);
236
+ }
237
+ for (const sid of mutation.supersededStateIds ?? []) {
238
+ const existing = await getMemoryStateVNext(db, ownerId, sid);
239
+ if (!existing) {
240
+ throw new Error(
241
+ `cannot supersede missing memory state: ${sid} (owner ${ownerId})`
242
+ );
243
+ }
244
+ const replacement = (mutation.states ?? []).find(
245
+ (st) => st.entityId === existing.entityId && st.facet === existing.facet
246
+ );
247
+ const retired = {
248
+ ...existing,
249
+ retiredAt: replacement?.updatedAt ?? (/* @__PURE__ */ new Date()).toISOString()
250
+ };
251
+ _appendRetiredStateBatch(batch, retired);
252
+ }
253
+ for (const rel of mutation.relations ?? []) {
254
+ _appendRelationBatch(batch, rel);
255
+ }
256
+ await batch.write();
257
+ };
258
+ var pendingByDb = /* @__PURE__ */ new WeakMap();
259
+ var applyMemoryInterpreterMutation = async (db, ownerId, mutation) => {
260
+ let owners = pendingByDb.get(db);
261
+ if (!owners) {
262
+ owners = /* @__PURE__ */ new Map();
263
+ pendingByDb.set(db, owners);
264
+ }
265
+ const previous = owners.get(ownerId) ?? Promise.resolve();
266
+ const operation = previous.then(async () => {
267
+ const resolved = typeof mutation === "function" ? await mutation() : mutation;
268
+ await applyMutationWithoutCoordination(db, ownerId, resolved);
269
+ });
270
+ const settled = operation.then(() => {
271
+ }, () => {
272
+ });
273
+ owners.set(ownerId, settled);
274
+ try {
275
+ await operation;
276
+ } finally {
277
+ if (owners.get(ownerId) === settled) owners.delete(ownerId);
278
+ }
279
+ };
280
+
281
+ // packages/ai/memory/vnext/workContext.ts
282
+ var facet = "work-context";
283
+ var statuses = ["active", "paused", "completed", "cancelled"];
284
+ var hash = (v) => createHash("sha256").update(JSON.stringify(v)).digest("hex");
285
+ var isWorkContextState = (state) => state.facet === facet;
286
+ var bounded = (s, max) => typeof s === "string" && s.trim().length > 0 && s.length <= max;
287
+ var list = (x, maxCount, maxLength) => Array.isArray(x) && x.length <= maxCount && x.every((v) => bounded(v, maxLength));
288
+ var object = (x) => !!x && typeof x === "object" && !Array.isArray(x);
289
+ var validScope = (s) => {
290
+ if (!s || !bounded(s.ownerId, 256) || !bounded(s.dialogId, 512) || !(s.spaceId === null || bounded(s.spaceId, 256))) throw new Error("invalid authorized scope");
291
+ };
292
+ function validValue(v) {
293
+ 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;
294
+ }
295
+ function validPatch(p) {
296
+ if (!object(p) || Object.keys(p).some((k) => !["status", "goal", "constraints", "openItems", "nextStep"].includes(k))) throw new Error("invalid patch");
297
+ if (p.status !== void 0 && !statuses.includes(p.status)) throw new Error("invalid status");
298
+ if (p.goal !== void 0 && !bounded(p.goal, 4096)) throw new Error("invalid goal");
299
+ if (p.nextStep !== void 0 && (typeof p.nextStep !== "string" || p.nextStep.length > 4096)) throw new Error("invalid nextStep");
300
+ for (const a of [p.constraints, p.openItems]) if (a !== void 0 && !list(a, 50, 2048)) throw new Error("invalid list");
301
+ }
302
+ async function updateWorkContext(db, scope, input) {
303
+ validScope(scope);
304
+ if (!object(input) || Object.keys(input).some((k) => !["activityId", "expectedRevision", "itemKey", "originRef", "changeId", "sourceRefs", "patch"].includes(k))) throw new Error("invalid input");
305
+ validPatch(input.patch);
306
+ if (!bounded(input.changeId, 256) || !list(input.sourceRefs, 20, 2048) || !input.sourceRefs.length) throw new Error("source and changeId required");
307
+ const creating = input.activityId === void 0;
308
+ if (creating && (!bounded(input.itemKey, 256) || !bounded(input.originRef, 2048) || input.expectedRevision !== void 0)) throw new Error("origin and itemKey required");
309
+ 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");
310
+ const activityId = creating ? `work-${hash([scope.ownerId, scope.spaceId, input.originRef, input.itemKey])}` : input.activityId;
311
+ const evidenceId = `work-change-${hash([activityId, input.changeId])}`;
312
+ const fingerprint = hash([scope.spaceId, scope.dialogId, input]);
313
+ let result;
314
+ await applyMemoryInterpreterMutation(db, scope.ownerId, async () => {
315
+ const states = (await listMemoryStatesForEntityVNext(db, scope.ownerId, activityId)).filter(isWorkContextState);
316
+ const currents = states.filter((s) => !s.retiredAt);
317
+ if (currents.length > 1 || currents[0] && !validValue(currents[0].value)) throw new Error("invalid work context state");
318
+ const current = currents[0];
319
+ const old = current?.value;
320
+ if (old && old.spaceId !== scope.spaceId) {
321
+ result = { activityId, revision: 0, outcome: "conflict" };
322
+ return { action: "no_op", reason: "scope mismatch" };
323
+ }
324
+ const receipt = await getMemoryEvidenceVNextStrict(db, scope.ownerId, evidenceId);
325
+ if (receipt) {
326
+ const matching = states.find((s) => s.evidenceIds.includes(evidenceId));
327
+ const savedValue = matching && validValue(matching.value) ? matching.value : void 0;
328
+ const match = receipt.text === fingerprint && !!savedValue;
329
+ result = { activityId, revision: match ? savedValue.revision : old?.revision ?? 0, outcome: match ? savedValue.revision === 1 ? "created" : "updated" : "conflict" };
330
+ return { action: "no_op", reason: "duplicate change" };
331
+ }
332
+ if (creating && current || !creating && (!old || old.revision !== input.expectedRevision)) {
333
+ result = { activityId, revision: old?.revision ?? 0, outcome: "conflict" };
334
+ return { action: "no_op", reason: "revision conflict" };
335
+ }
336
+ if (!old && !input.patch.goal) throw new Error("goal required");
337
+ const status = input.patch.status ?? old?.status ?? "active";
338
+ const dialogIds = [.../* @__PURE__ */ new Set([...old?.dialogIds ?? [], scope.dialogId])];
339
+ if (dialogIds.length > 100) throw new Error("dialog association limit exceeded");
340
+ 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 };
341
+ 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]);
342
+ const now = (/* @__PURE__ */ new Date()).toISOString();
343
+ result = { activityId, revision: unchanged ? old.revision : value.revision, outcome: unchanged ? "unchanged" : old ? "updated" : "created" };
344
+ if (unchanged) return { action: "no_op", reason: "unchanged" };
345
+ const evidence = { id: evidenceId, ownerId: scope.ownerId, text: fingerprint, sourceRef: input.sourceRefs[0], confidence: 1, createdAt: now };
346
+ 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] : [] };
347
+ });
348
+ return result;
349
+ }
350
+ async function readWorkContexts(db, scope, query = {}) {
351
+ validScope(scope);
352
+ if (!object(query) || Object.keys(query).some((k) => !["activityId", "status", "query", "limit", "discovery"].includes(k))) throw new Error("invalid query");
353
+ const limit = query.limit ?? 20;
354
+ if (typeof limit !== "number" || !Number.isInteger(limit) || limit < 1 || limit > 100) throw new Error("limit must be 1..100");
355
+ if (query.status !== void 0 && query.status !== "all" && !statuses.some((status) => status === query.status)) throw new Error("invalid status");
356
+ if (query.discovery !== void 0 && query.discovery !== "dialog" && query.discovery !== "scope") throw new Error("invalid discovery");
357
+ if (query.activityId !== void 0 && !bounded(query.activityId, 256)) throw new Error("invalid activityId");
358
+ if (query.query !== void 0 && !bounded(query.query, 512)) throw new Error("invalid query text");
359
+ const states = query.activityId ? await listMemoryStatesForEntityVNext(db, scope.ownerId, query.activityId) : (await loadMemoryVNextCatalog(db, scope.ownerId)).states;
360
+ const items = [];
361
+ for (const state of states) {
362
+ if (!isWorkContextState(state) || state.retiredAt) continue;
363
+ if (!validValue(state.value) || !bounded(state.entityId, 256) || !bounded(state.updatedAt, 128)) throw new Error("invalid work context state");
364
+ const value = state.value;
365
+ if (value.spaceId !== scope.spaceId || !query.activityId && query.discovery !== "scope" && !value.dialogIds.includes(scope.dialogId)) continue;
366
+ if (query.status !== "all" && value.status !== (query.status ?? (query.activityId ? value.status : "active"))) continue;
367
+ if (query.query && !JSON.stringify([value.goal, value.constraints, value.openItems, value.nextStep]).toLowerCase().includes(query.query.toLowerCase())) continue;
368
+ items.push({ activityId: state.entityId, value, updatedAt: state.updatedAt });
369
+ }
370
+ 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));
371
+ return { items: items.slice(0, limit), hasMore: items.length > limit };
372
+ }
373
+
374
+ export {
375
+ applyMemoryInterpreterMutation,
376
+ isWorkContextState,
377
+ updateWorkContext,
378
+ readWorkContexts
379
+ };
@@ -2,15 +2,18 @@ import {
2
2
  getCurrentSpaceIdRaw,
3
3
  setCurrentSpaceBoth,
4
4
  setSpaceInitialized
5
- } from "./chunk-MOMR7NMG.js";
5
+ } from "./chunk-IUTUWIKE.js";
6
6
  import {
7
7
  createSpaceKey,
8
8
  normalizeSpaceId
9
9
  } from "./chunk-UAD2WT54.js";
10
10
  import {
11
11
  fetchFromServer,
12
- getAllServers
13
- } from "./chunk-AGP3YSEC.js";
12
+ getAllServers,
13
+ googleSessionRequestToken,
14
+ isGoogleAuthoritySession,
15
+ scopeGoogleSessionServers
16
+ } from "./chunk-ULLHVDTZ.js";
14
17
  import {
15
18
  selectIdentityToken,
16
19
  selectIdentityUserId
@@ -23,7 +26,7 @@ import {
23
26
  var resolveSpaceRemoteServers = (state) => {
24
27
  const currentServer = typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : void 0;
25
28
  const syncServers = Array.isArray(state?.settings?.syncServers) ? state.settings.syncServers : void 0;
26
- return getAllServers(currentServer, syncServers);
29
+ return scopeGoogleSessionServers(selectIdentityToken(state), currentServer, getAllServers(currentServer, syncServers));
27
30
  };
28
31
  var selectSpaceRemoteAuth = (state) => ({
29
32
  token: selectIdentityToken(state) ?? null,
@@ -40,11 +43,13 @@ var membershipFetchCache = /* @__PURE__ */ new Map();
40
43
  var MEMBERSHIP_FETCH_CACHE_TTL_MS = 3e4;
41
44
  async function fetchMembershipsFromServer(server, token, userId, timeoutMs) {
42
45
  if (!token) return { ok: false, memberships: [] };
46
+ googleSessionRequestToken(token, server);
43
47
  const controller = new AbortController();
44
48
  const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
45
49
  try {
46
50
  const response = await fetch(`${server}/rpc/getUserSpaceMemberships`, {
47
51
  method: "POST",
52
+ ...isGoogleAuthoritySession(token) ? { redirect: "error", credentials: "omit" } : {},
48
53
  headers: {
49
54
  Authorization: `Bearer ${token}`,
50
55
  "Content-Type": "application/json"