nolo-cli 0.97.0-alpha.1 → 0.97.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 (182) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-JIG7MRXQ.js → _executeModel-DYHTQJZC.js} +68 -63
  3. package/{action-YVYQEAAV.js → action-GI44T4DR.js} +10 -10
  4. package/{addContentAction-O7R66HEX.js → addContentAction-B2DRF7P6.js} +9 -9
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-T3I7IXPK.js} +15 -17
  6. package/{agentDeleteCommand-THAZ5GQS.js → agentDeleteCommand-LLNNP3AM.js} +47 -43
  7. package/{agentEmailCommands-A7T7AJA4.js → agentEmailCommands-EO3H2LDW.js} +90 -82
  8. package/agentListCommands-J3MWAZWO.js +741 -0
  9. package/{agentMachineCommands-DM4N5PK3.js → agentMachineCommands-V65VOQNK.js} +42 -38
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-EMZCM6VA.js} +1 -1
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-HF4A42D4.js} +1 -1
  12. package/agentRecordCommands-VY35OMX3.js +136 -0
  13. package/{agentRunCommand-JVSTGVG2.js → agentRunCommand-CSEX4QIH.js} +90 -80
  14. package/{agentRunControl-WCTKX5VL.js → agentRunControl-5T64LM2M.js} +2 -2
  15. package/{agentRuntimeLocal-73CVIWBB.js → agentRuntimeLocal-AY6YNUAL.js} +44 -36
  16. package/{agentSlice-6X4JL2E3.js → agentSlice-FOZUXW7X.js} +11 -11
  17. package/{appDeleteCommands-S7CK4OYL.js → appDeleteCommands-QTTL3QF3.js} +42 -38
  18. package/{appDeployCommands-U6TMS5GO.js → appDeployCommands-43LJECGV.js} +42 -38
  19. package/{appDeployStatusCommands-DTNQJ3LJ.js → appDeployStatusCommands-L5BKOLYW.js} +42 -38
  20. package/{appGetCommands-3SHZEQD5.js → appGetCommands-HOFZKOPC.js} +42 -38
  21. package/{appListCommands-E2ZMIUB6.js → appListCommands-I7C3SJCE.js} +42 -38
  22. package/{authCommand-F4EFRRX6.js → authCommand-2YPMMIJN.js} +117 -23
  23. package/{authCommands-RGOGCPP6.js → authCommands-FFDS4FVX.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-CALVIJTX.js} +6 -5
  25. package/{chatQueueReduxAdapter-LAQEZQKE.js → chatQueueReduxAdapter-NMEZRYC2.js} +30 -29
  26. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  27. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  28. package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  29. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  30. package/{chunk-YQTQQX2H.js → chunk-2UV22D2F.js} +1 -1
  31. package/{chunk-R2B3MIZA.js → chunk-3BFMH6GE.js} +6 -7
  32. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  33. package/{chunk-QIAVMDHY.js → chunk-3LX6YE3P.js} +4 -4
  34. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  35. package/chunk-4LCOCOR5.js +50 -0
  36. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  37. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  38. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  39. package/chunk-5J3PYNUP.js +255 -0
  40. package/chunk-5MMAK75Q.js +15 -0
  41. package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
  42. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  43. package/{chunk-6YTOJY35.js → chunk-6D2JFXLY.js} +35 -0
  44. package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
  45. package/{chunk-IIVGDG4I.js → chunk-6PHKBY2Q.js} +10 -4
  46. package/{chunk-WADCY6G6.js → chunk-6ZWMH6TJ.js} +111 -41
  47. package/{chunk-ABQYVJBJ.js → chunk-7CHC4W22.js} +1 -1
  48. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  49. package/{chunk-ZWUOR654.js → chunk-7WCQEMPB.js} +971 -1093
  50. package/{chunk-BLJWCTRL.js → chunk-AOPCEXTB.js} +1 -1
  51. package/{chunk-LXF6XQDT.js → chunk-AQ3I6DZE.js} +865 -207
  52. package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
  53. package/{chunk-RG6JBBX5.js → chunk-AWF3WO5R.js} +166 -13
  54. package/{chunk-GPCZ7UXG.js → chunk-AZRHIN5B.js} +1 -1
  55. package/chunk-BMQ2MJUK.js +153 -0
  56. package/{chunk-HWIZU4OL.js → chunk-C3VLSD4K.js} +236 -36
  57. package/{chunk-3IIEFNGY.js → chunk-C53ZG23R.js} +2 -2
  58. package/chunk-CHOZJMJS.js +78 -0
  59. package/{chunk-HJUYAD4A.js → chunk-CPUFH46E.js} +8 -8
  60. package/{chunk-LS2ZANRJ.js → chunk-CTUQJVQM.js} +1 -1
  61. package/{chunk-BP4XNZRM.js → chunk-CU3QB4HW.js} +3 -3
  62. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  63. package/{chunk-KQ4ONNQD.js → chunk-DAWDCRIG.js} +82 -8
  64. package/{chunk-VLTIYV3X.js → chunk-DCLMZ5TX.js} +4 -4
  65. package/{chunk-UKZDAFYT.js → chunk-DSSTTEKI.js} +6 -10
  66. package/{chunk-LZIWMYX4.js → chunk-EKS2APRJ.js} +21 -5
  67. package/{chunk-HVURBGF3.js → chunk-ESRMFY7G.js} +2 -2
  68. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  69. package/chunk-FD5K6MPI.js +7808 -0
  70. package/chunk-GMZLP5DV.js +82 -0
  71. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  72. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  73. package/{chunk-JCIHVIVG.js → chunk-HKTIX4ZE.js} +23 -76
  74. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  75. package/{chunk-H62HCIUP.js → chunk-HYZIYH2H.js} +11 -10
  76. package/{chunk-3VNWWVKB.js → chunk-I3QNET24.js} +30 -17
  77. package/{chunk-WV42OMV7.js → chunk-IAESIMK7.js} +4 -4
  78. package/{chunk-6FVRQBRR.js → chunk-JJ7P5CIY.js} +56 -34
  79. package/{chunk-3WD6RUUJ.js → chunk-JZ5II5UV.js} +15 -20
  80. package/{chunk-JRQFUXY7.js → chunk-KCDUTE5V.js} +96 -19
  81. package/{chunk-Y5HW6GM2.js → chunk-KHVJXNRY.js} +100 -100
  82. package/{chunk-7S4YWN7P.js → chunk-MX574M24.js} +1 -1
  83. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  84. package/{chunk-53HEEOTT.js → chunk-O26PCYLS.js} +80 -13
  85. package/{chunk-3DII57IT.js → chunk-O2OWEFII.js} +1 -1
  86. package/{chunk-TDRTS7QW.js → chunk-O6JPWEEK.js} +77 -17
  87. package/chunk-OCZKATRC.js +129 -0
  88. package/{chunk-6D6VBVEW.js → chunk-OTEMQQZI.js} +80 -14
  89. package/{chunk-7OLPQSMQ.js → chunk-OYOWA3CP.js} +24 -5
  90. package/chunk-P6GMCCAT.js +870 -0
  91. package/{chunk-ESWUWEFS.js → chunk-PQTSOHBT.js} +13 -13
  92. package/{chunk-WGR3J4Q6.js → chunk-Q4GP72HX.js} +9 -3
  93. package/{chunk-DHDMC6FO.js → chunk-QKUMVP3O.js} +11 -6
  94. package/{chunk-TZJJ77KQ.js → chunk-RMAWULCS.js} +498 -480
  95. package/{chunk-V4MJDUSR.js → chunk-RSEEDUMS.js} +2 -2
  96. package/{chunk-UZGQNTVW.js → chunk-S5XGT6GB.js} +5 -3
  97. package/{chunk-76WEAXJB.js → chunk-SACTCJAC.js} +18 -15
  98. package/{chunk-AFUORTY4.js → chunk-SONWNI3L.js} +21 -21
  99. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  100. package/{chunk-OF7AQZUG.js → chunk-TU5NE4U3.js} +9 -84
  101. package/chunk-TY3TIUJK.js +89 -0
  102. package/chunk-UEGYKNHO.js +13349 -0
  103. package/chunk-UNYJU5L6.js +780 -0
  104. package/{chunk-J4MOO56S.js → chunk-UQNS32WZ.js} +10 -2
  105. package/chunk-VIWDGTDA.js +8 -0
  106. package/chunk-VJVNU77E.js +83 -0
  107. package/{chunk-54ADB4W7.js → chunk-VYN7O3OY.js} +1 -1
  108. package/{chunk-JAXOVNM4.js → chunk-WILHZY7K.js} +45 -45
  109. package/{chunk-UKWGR5SS.js → chunk-WIWM4FE3.js} +187 -398
  110. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  111. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  112. package/{chunk-SNPMM7H3.js → chunk-Y6AZRODX.js} +13 -13
  113. package/{chunk-SQQVLHMH.js → chunk-YJKDTJ2X.js} +7 -7
  114. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  115. package/{chunk-TOP2VXOR.js → chunk-Z4CSIXYP.js} +2 -2
  116. package/{chunk-2F7RJC6L.js → chunk-ZOVKKMF6.js} +1 -1
  117. package/chunk-ZRAU6T47.js +56 -0
  118. package/{chunk-Z77CRGTW.js → chunk-ZYWQNCBN.js} +1 -1
  119. package/commandRegistry-MRPLKSWP.js +833 -0
  120. package/{contentThunks-ATLWNC2D.js → contentThunks-TD5YOAQM.js} +32 -30
  121. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  122. package/{createAgentAutomationAction-QYYWTVUR.js → createAgentAutomationAction-XUG62ANM.js} +32 -30
  123. package/{createDialogAction-7I5VGWCR.js → createDialogAction-L3CMZKNL.js} +36 -33
  124. package/{createPageAction-WNURYCWU.js → createPageAction-WJ3MX6JS.js} +38 -36
  125. package/{chunk-YVIV7WT4.js → cursorProvider-YGGNMVWX.js} +2496 -9890
  126. package/{dbSlice-XVWBAGYN.js → dbSlice-DQ32LYTJ.js} +8 -8
  127. package/{deleteFile-YG6QMJLU.js → deleteFile-NX6QHCWZ.js} +3 -3
  128. package/{dialogCommands-RILHDRQ5.js → dialogCommands-VM3I4HBW.js} +45 -41
  129. package/{dialogSlice-W5BYELVR.js → dialogSlice-DSHG3YUE.js} +36 -29
  130. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  131. package/{docCreateCommands-GSTPU7SG.js → docCreateCommands-TYUJPCOP.js} +44 -40
  132. package/{docDeleteCommands-2FC3LSUT.js → docDeleteCommands-5XEG2LXO.js} +44 -40
  133. package/{docReadCommands-27POBA34.js → docReadCommands-M6RO6QHV.js} +43 -39
  134. package/{docStore-7LAHBFP2.js → docStore-RYOGMPEF.js} +11 -10
  135. package/{docUpdateCommands-U4II6VCO.js → docUpdateCommands-DKOFTZRX.js} +44 -40
  136. package/{fetchMessages-EIU7UFFK.js → fetchMessages-67MEFPZR.js} +2 -2
  137. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +3 -3
  138. package/{handleSendMessageAction-SKMJMVRU.js → handleSendMessageAction-XH742B27.js} +91 -83
  139. package/index.js +87 -884
  140. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-EBRS242U.js} +2 -2
  141. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-5W6IJRAD.js} +6 -6
  142. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-3LRMNLCM.js} +1 -1
  143. package/{machineCommands-S2RNYKVJ.js → machineCommands-BKYVMMEG.js} +85 -77
  144. package/{machineWsRunDispatch-JC44LBLP.js → machineWsRunDispatch-QOBSQQ72.js} +82 -74
  145. package/{memberThunks-QGFLFVCI.js → memberThunks-5ZXPR63F.js} +9 -9
  146. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  147. package/oauthTokenStore-ITEB663N.js +23 -0
  148. package/package.json +1 -1
  149. package/pdf-U6KSUEZZ.js +26435 -0
  150. package/processSpawn-SOAV3FEV.js +11 -0
  151. package/profileConfig-ZGOFORWV.js +43 -0
  152. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-76AVU3HD.js} +7 -7
  153. package/{providerRegistry-757OWH3O.js → providerRegistry-Z62NC45X.js} +11 -7
  154. package/{read-COE3ZYR6.js → read-EPTJRAEF.js} +5 -5
  155. package/{readDocTool-5USN4A6V.js → readDocTool-W4NDXNEX.js} +5 -3
  156. package/{readlineWorkspace-VZSBXUH4.js → readlineWorkspace-7P7IORIT.js} +2450 -2022
  157. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-BVAWQKXE.js} +17 -19
  158. package/{runAgentClientLoop-ZYENU7GH.js → runAgentClientLoop-7WXN6I7L.js} +62 -58
  159. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-3USD722U.js} +3 -3
  160. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  161. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-LYY45IAD.js} +12 -11
  162. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-73IL7DLU.js} +18 -20
  163. package/{settingSlice-ZQZVUPKK.js → settingSlice-Q6EKL7EQ.js} +9 -9
  164. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  165. package/{spaceCommands-QB3NNEMN.js → spaceCommands-QFP4ZXKG.js} +44 -40
  166. package/{streamAgentChatTurn-43GPPQSN.js → streamAgentChatTurn-B4PXPJJS.js} +184 -91
  167. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-UUXDSQ6X.js} +15 -17
  168. package/{tableCommands-O6NWHFKV.js → tableCommands-G7RV3RU3.js} +4 -4
  169. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-INIQCPGY.js} +3 -3
  170. package/{tools-SX6Y4STZ.js → tools-QFS2L7BU.js} +55 -51
  171. package/{tuiSummaryLlmCaller-T2SHYMDZ.js → tuiSummaryLlmCaller-74NRRLVW.js} +18 -16
  172. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  173. package/{updateDialogTitleAction-VAKA4ZNY.js → updateDialogTitleAction-HTDYCNNZ.js} +81 -43
  174. package/agentListCommands-BRZFEJQM.js +0 -406
  175. package/agentRecordCommands-TTAEMNHB.js +0 -128
  176. package/chunk-K4YGZD3P.js +0 -18881
  177. package/chunk-M76ECQRD.js +0 -13658
  178. package/chunk-Q5FJJ6XI.js +0 -103
  179. package/chunk-S7Z2HMCN.js +0 -25
  180. package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
  181. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  182. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -1,406 +0,0 @@
1
- import {
2
- decorateAgentsWithPublicStatusAcrossServers,
3
- listFavoriteAgentIdsAcrossServers,
4
- listLocalCachedAgents,
5
- listRemoteAgents,
6
- listRemoteAgentsAcrossServers,
7
- listRemotePublicAgents,
8
- normalizeListedAgent,
9
- parseAgentListArgs,
10
- toSafeListedAgentSummary
11
- } from "./chunk-TDRTS7QW.js";
12
- import {
13
- buildSpaceLookup,
14
- getSpaceContentKeys
15
- } from "./chunk-ID4G2MAR.js";
16
- import {
17
- readLiveDbRecordAfterTombstoneMerge
18
- } from "./chunk-BLJWCTRL.js";
19
- import {
20
- applyCredentialAvailability,
21
- readCredentialAvailability
22
- } from "./chunk-42V6BK2E.js";
23
- import {
24
- getReadableCliDb
25
- } from "./chunk-LS2ZANRJ.js";
26
- import {
27
- queryUserRecords,
28
- readDbRecord
29
- } from "./chunk-76WEAXJB.js";
30
- import "./chunk-Z77CRGTW.js";
31
- import "./chunk-SV5IJK6K.js";
32
- import {
33
- omitNullishAgentSummaryFields,
34
- sortSafeAgentSummaries,
35
- summarizeCredentialGroups,
36
- toCompactAgentSummary,
37
- toSafeAgentSummary,
38
- toUnavailableAgentSummary
39
- } from "./chunk-RG6JBBX5.js";
40
- import "./chunk-KQHGZWSV.js";
41
- import "./chunk-YYLHWIW6.js";
42
- import "./chunk-ZWUOR654.js";
43
- import "./chunk-OF7AQZUG.js";
44
- import "./chunk-Q5FJJ6XI.js";
45
- import "./chunk-ZNFJWEN4.js";
46
- import "./chunk-3IIEFNGY.js";
47
- import "./chunk-CQ3WA2NE.js";
48
- import "./chunk-5ZUL4CUO.js";
49
- import "./chunk-N7J63Q6C.js";
50
- import "./chunk-LZIWMYX4.js";
51
- import "./chunk-PUOC4YRO.js";
52
- import "./chunk-IIVGDG4I.js";
53
- import {
54
- isAgentUnavailableNow
55
- } from "./chunk-FDTR4QJ6.js";
56
- import "./chunk-UZGQNTVW.js";
57
- import "./chunk-6OZ36FXI.js";
58
- import "./chunk-2MBTWINN.js";
59
- import "./chunk-JAXOVNM4.js";
60
- import "./chunk-WADCY6G6.js";
61
- import "./chunk-PSCNXBYA.js";
62
- import "./chunk-GQBOR3G6.js";
63
- import "./chunk-BYXBJQAS.js";
64
- import "./chunk-OIVSQH2O.js";
65
- import "./chunk-DWLEOOGR.js";
66
- import "./chunk-HVURBGF3.js";
67
- import "./chunk-ONXOABJR.js";
68
- import "./chunk-W7XHHYWM.js";
69
- import {
70
- toErrorMessage
71
- } from "./chunk-HNMXYYJR.js";
72
- import "./chunk-DVINR3PL.js";
73
- import "./chunk-2GRGFCF6.js";
74
- import "./chunk-O6OSWFZQ.js";
75
- import "./chunk-X7HHHIOZ.js";
76
- import {
77
- parseUserIdFromAuthToken,
78
- readOption,
79
- resolveAuthToken,
80
- resolveServerCandidates,
81
- resolveServerUrl
82
- } from "./chunk-A7GB5UGH.js";
83
- import "./chunk-OLZBQWZU.js";
84
- import "./chunk-ACTMNVHM.js";
85
- import "./chunk-Q67DOFOO.js";
86
- import "./chunk-KX6YBIHG.js";
87
- import "./chunk-V4MJDUSR.js";
88
- import "./chunk-UAD2WT54.js";
89
- import "./chunk-H62HCIUP.js";
90
- import "./chunk-VMFTFOWF.js";
91
- import "./chunk-WWC7I6TA.js";
92
- import "./chunk-ABQYVJBJ.js";
93
- import "./chunk-QSJ3HFEF.js";
94
- import "./chunk-WV42OMV7.js";
95
- import "./chunk-BNGW5ASC.js";
96
- import "./chunk-M2EJHDJP.js";
97
- import "./chunk-UKWGR5SS.js";
98
- import "./chunk-QOKAKDPE.js";
99
- import "./chunk-OW765XBU.js";
100
- import "./chunk-SEJ5OS6F.js";
101
- import "./chunk-GBRG75BQ.js";
102
- import "./chunk-KUG52IAP.js";
103
- import "./chunk-3EUW3WEO.js";
104
- import "./chunk-U6VC4MU4.js";
105
- import "./chunk-LCBAMY2M.js";
106
- import "./chunk-4SN6J65J.js";
107
- import "./chunk-CF7PE763.js";
108
- import "./chunk-G3SUCT4W.js";
109
- import "./chunk-4VNS5WPM.js";
110
-
111
- // packages/cli/agentListCommands.ts
112
- async function runAgentListCommand(args, deps = {}) {
113
- const env = deps.env ?? process.env;
114
- const output = deps.output ?? process.stdout;
115
- const { wantJson, wantSafe, publicOnly, scope: requestedScope, idsOnly, showUnavailable, verbose } = parseAgentListArgs(args);
116
- if (requestedScope && !["preferred", "public", "all"].includes(requestedScope)) {
117
- throw new Error(`Invalid scope '${requestedScope}'`);
118
- }
119
- if (requestedScope && publicOnly && requestedScope !== "public") {
120
- throw new Error(`Conflicting arguments: scope='${requestedScope}' conflicts with publicOnly=true.`);
121
- }
122
- const scope = requestedScope ?? "preferred";
123
- const spaceInput = readOption(args, "--space") ?? readOption(args, "--space-id");
124
- const authToken = resolveAuthToken(args, env);
125
- if (!authToken) {
126
- output.write("[nolo] agent list requires an auth token. Run `nolo login` or set AUTH_TOKEN.\n");
127
- return 1;
128
- }
129
- const userId = parseUserIdFromAuthToken(authToken);
130
- if (!userId) {
131
- output.write("[nolo] agent list could not read userId from AUTH_TOKEN.\n");
132
- return 1;
133
- }
134
- const fetchImpl = deps.fetchImpl ?? fetch;
135
- const fallbackFetchImpl = deps.fallbackFetchImpl;
136
- const serverUrl = resolveServerUrl(args, env);
137
- const serverUrls = resolveServerCandidates(args, env, serverUrl);
138
- try {
139
- let agents;
140
- let source;
141
- let serverFailures = [];
142
- try {
143
- const remoteResult = await listRemoteAgentsAcrossServers({
144
- authToken,
145
- fallbackFetchImpl,
146
- fetchImpl,
147
- serverUrls,
148
- userId
149
- });
150
- agents = remoteResult.agents;
151
- serverFailures = remoteResult.failures;
152
- source = "global-cache";
153
- } catch {
154
- try {
155
- const db = deps.db ?? await getReadableCliDb(output);
156
- agents = await listLocalCachedAgents({ db, userId });
157
- source = "local-cache";
158
- } catch {
159
- agents = await listRemoteAgents({
160
- authToken,
161
- fallbackFetchImpl,
162
- fetchImpl,
163
- serverUrl,
164
- userId,
165
- queryUserRecords,
166
- readDbRecord
167
- });
168
- source = "remote-cache";
169
- }
170
- }
171
- if (scope !== "preferred") {
172
- const publicAgents = await Promise.all(serverUrls.map((url) => listRemotePublicAgents({
173
- authToken,
174
- fetchImpl,
175
- serverUrl: url,
176
- limit: 500
177
- })));
178
- agents = publicAgents.flat();
179
- if (scope === "all") {
180
- const preferred = await listRemoteAgentsAcrossServers({
181
- authToken,
182
- fallbackFetchImpl,
183
- fetchImpl,
184
- serverUrls,
185
- userId
186
- });
187
- agents = [...preferred.agents, ...agents];
188
- }
189
- }
190
- agents = agents.filter((agent) => agent.privateKey.startsWith("agent-"));
191
- let resolvedSpaceId = null;
192
- let spaceContentKeys = null;
193
- if (spaceInput) {
194
- const { spaceId, spaceKey } = buildSpaceLookup(spaceInput);
195
- resolvedSpaceId = spaceId;
196
- const spaceRead = await readLiveDbRecordAfterTombstoneMerge({
197
- authToken,
198
- dbKey: spaceKey,
199
- fallbackFetchImpl,
200
- fetchImpl,
201
- serverUrls
202
- });
203
- serverFailures = [...serverFailures, ...spaceRead.failures];
204
- const spaceRecord = spaceRead.record;
205
- const currentSpaceContentKeys = getSpaceContentKeys(spaceRecord);
206
- spaceContentKeys = currentSpaceContentKeys;
207
- agents = agents.filter(
208
- (agent) => currentSpaceContentKeys.has(agent.privateKey) || currentSpaceContentKeys.has(agent.publicKey) || currentSpaceContentKeys.has(agent.id)
209
- );
210
- }
211
- if (source === "global-cache") {
212
- await decorateAgentsWithPublicStatusAcrossServers({
213
- agents,
214
- authToken,
215
- fallbackFetchImpl,
216
- fetchImpl,
217
- serverUrls
218
- });
219
- }
220
- if (publicOnly) {
221
- agents = agents.filter((agent) => agent.publicRecordExists);
222
- }
223
- agents = applyCredentialAvailability(
224
- agents,
225
- await readCredentialAvailability(env).catch(() => ({}))
226
- );
227
- const unavailableCount = agents.filter((agent) => isAgentUnavailableNow(agent)).length;
228
- const agentsForOutput = showUnavailable ? agents : agents.filter((agent) => !isAgentUnavailableNow(agent));
229
- if (idsOnly) {
230
- output.write(`${agentsForOutput.map((agent) => agent.id).join("\n")}
231
- `);
232
- return 0;
233
- }
234
- if (wantSafe) {
235
- const favoritesMap = await listFavoriteAgentIdsAcrossServers({
236
- authToken,
237
- fetchImpl,
238
- serverUrls
239
- }).catch(() => ({}));
240
- const existingKeys = /* @__PURE__ */ new Set();
241
- for (const agent of agents) {
242
- existingKeys.add(agent.privateKey);
243
- existingKeys.add(agent.publicKey);
244
- existingKeys.add(agent.id);
245
- }
246
- const extraFavoriteRecords = [];
247
- const hydratedFavoriteAgents = [];
248
- for (const favKey of Object.keys(favoritesMap)) {
249
- if (existingKeys.has(favKey)) continue;
250
- try {
251
- const favRead = await readLiveDbRecordAfterTombstoneMerge({
252
- authToken,
253
- dbKey: favKey,
254
- fallbackFetchImpl,
255
- fetchImpl,
256
- serverUrls
257
- });
258
- const record = favRead.record;
259
- if (!record || record.type && record.type !== "agent") continue;
260
- const norm = normalizeListedAgent(record);
261
- const candidateKeys = [record.dbKey, record.publicKey, record.id].filter((key) => typeof key === "string" && key.length > 0);
262
- if (spaceContentKeys && !candidateKeys.some((key) => spaceContentKeys?.has(key))) {
263
- continue;
264
- }
265
- if (norm) {
266
- if (!favKey.startsWith("agent-pub-")) {
267
- norm.verifiedAgentKey = favKey;
268
- if (typeof record.userId === "string" && record.userId) {
269
- norm.ownerId = record.userId;
270
- }
271
- }
272
- agents.push(norm);
273
- hydratedFavoriteAgents.push(norm);
274
- existingKeys.add(norm.privateKey);
275
- existingKeys.add(norm.publicKey);
276
- existingKeys.add(norm.id);
277
- } else {
278
- extraFavoriteRecords.push(record);
279
- for (const key of candidateKeys) existingKeys.add(key);
280
- }
281
- } catch {
282
- }
283
- }
284
- if (source === "global-cache" && hydratedFavoriteAgents.length > 0) {
285
- await decorateAgentsWithPublicStatusAcrossServers({
286
- agents: hydratedFavoriteAgents,
287
- authToken,
288
- fallbackFetchImpl,
289
- fetchImpl,
290
- serverUrls
291
- });
292
- }
293
- let safeCandidates = [
294
- ...agents.map((agent) => toSafeListedAgentSummary(agent, { favoritesMap, userId })),
295
- ...extraFavoriteRecords.map(
296
- (record) => toSafeAgentSummary(record, { favoritesMap, userId })
297
- )
298
- ];
299
- if (publicOnly) {
300
- safeCandidates = safeCandidates.filter((agent) => agent.isPublic);
301
- }
302
- const safeUnavailableList = safeCandidates.filter(
303
- (agent) => isAgentUnavailableNow(agent)
304
- );
305
- const safeUnavailableCount = safeUnavailableList.length;
306
- const safeUnavailableSummaries = safeUnavailableList;
307
- const safeUnavailableAgents = sortSafeAgentSummaries(
308
- safeUnavailableSummaries
309
- ).map(toUnavailableAgentSummary);
310
- const safeAgents = showUnavailable ? safeCandidates : safeCandidates.filter((agent) => !isAgentUnavailableNow(agent));
311
- const sortedSafeAgents = sortSafeAgentSummaries(safeAgents);
312
- const safeOutputAgents = verbose ? sortedSafeAgents.map(omitNullishAgentSummaryFields) : sortedSafeAgents.map(toCompactAgentSummary);
313
- const credentialGroups = summarizeCredentialGroups(safeCandidates);
314
- output.write(JSON.stringify({
315
- success: true,
316
- userId,
317
- ...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
318
- total: sortedSafeAgents.length,
319
- unavailableCount: safeUnavailableCount,
320
- unavailableAgents: safeUnavailableAgents,
321
- credentialGroups,
322
- agents: safeOutputAgents
323
- }, null, 2));
324
- output.write("\n");
325
- return 0;
326
- }
327
- if (wantJson) {
328
- const credentialGroups = summarizeCredentialGroups(agentsForOutput);
329
- output.write(JSON.stringify({
330
- userId,
331
- ...resolvedSpaceId ? { spaceId: resolvedSpaceId } : {},
332
- targetServers: serverUrls,
333
- ...serverFailures.length ? { serverFailures } : {},
334
- total: agentsForOutput.length,
335
- publicCount: agentsForOutput.filter((agent) => agent.publicRecordExists).length,
336
- unavailableCount,
337
- credentialGroups,
338
- source,
339
- agents: agentsForOutput
340
- }, null, 2));
341
- output.write("\n");
342
- return 0;
343
- }
344
- output.write(`userId: ${userId}
345
- `);
346
- if (resolvedSpaceId) {
347
- output.write(`spaceId: ${resolvedSpaceId}
348
- `);
349
- }
350
- output.write(`targetServers: ${serverUrls.join(", ")}
351
- `);
352
- if (serverFailures.length) {
353
- output.write(`serverFailures: ${serverFailures.length}
354
- `);
355
- }
356
- output.write(`total agents: ${agentsForOutput.length}
357
- `);
358
- output.write(`public agents: ${agentsForOutput.filter((agent) => agent.publicRecordExists).length}
359
- `);
360
- if (unavailableCount > 0 && !showUnavailable) {
361
- output.write(`\u26D4 ${unavailableCount} agent(s) temporarily unavailable (429) hidden. Use --show-unavailable to list them.
362
- `);
363
- }
364
- output.write(`source: ${source}
365
- `);
366
- if (agentsForOutput.length === 0) {
367
- output.write("\n(no agents found)\n");
368
- return 0;
369
- }
370
- for (const agent of agentsForOutput) {
371
- const status = agent.publicRecordExists ? "public" : "private";
372
- const flagMismatch = agent.isPublicFlag !== agent.publicRecordExists ? ` flag=${agent.isPublicFlag}` : "";
373
- const credentialLine = agent.credentialConfigured ? `credentialConfigured=true${agent.credentialRef ? ` credentialRef=${agent.credentialRef}` : ""}${agent.apiKeyRef ? ` apiKeyRef=${agent.apiKeyRef}` : ""}` : "credentialConfigured=false";
374
- const availabilityLine = typeof agent.nextAvailableAt === "number" && agent.nextAvailableAt > Date.now() ? `nextAvailableAt=${new Date(agent.nextAvailableAt).toISOString()}` : "nextAvailableAt=now";
375
- output.write(
376
- [
377
- `
378
- [${status}] ${agent.name}`,
379
- `id=${agent.id}`,
380
- `type=${agent.type ?? "-"}`,
381
- `model=${agent.model}`,
382
- `updatedAt=${agent.updatedAt ?? "-"}`,
383
- // 不输出 privateKey(dbKey 属敏感标识,与 web 端 listAgentsFunc 降权
384
- // 对齐;需要完整记录请用 --json)。
385
- // 私有 agent(publicRecordExists=false)的公开记录不存在,输出 "-" 而非
386
- // 一个库里不存在的 agent-pub-<id>,避免误导调用方拿它去 readAgent。
387
- `publicKey=${agent.publicRecordExists ? agent.publicKey : "-"}${flagMismatch}`,
388
- `tools=${agent.tools.join(", ") || "-"}`,
389
- credentialLine,
390
- availabilityLine
391
- ].join("\n")
392
- );
393
- output.write("\n");
394
- }
395
- return 0;
396
- } catch (error) {
397
- output.write(
398
- `[nolo] agent list failed: ${toErrorMessage(error)}
399
- `
400
- );
401
- return 1;
402
- }
403
- }
404
- export {
405
- runAgentListCommand
406
- };
@@ -1,128 +0,0 @@
1
- import {
2
- runAgentCreateCommand,
3
- runAgentReadCommand,
4
- runAgentUpdateCommand
5
- } from "./chunk-7OLPQSMQ.js";
6
- import "./chunk-YVIV7WT4.js";
7
- import "./chunk-53HEEOTT.js";
8
- import "./chunk-EADNWBAZ.js";
9
- import "./chunk-SH43IESU.js";
10
- import "./chunk-WGR3J4Q6.js";
11
- import "./chunk-42V6BK2E.js";
12
- import "./chunk-LS2ZANRJ.js";
13
- import "./chunk-76WEAXJB.js";
14
- import "./chunk-Z77CRGTW.js";
15
- import "./chunk-SV5IJK6K.js";
16
- import "./chunk-MP64VFGD.js";
17
- import "./chunk-JBTJAPUF.js";
18
- import "./chunk-3DII57IT.js";
19
- import "./chunk-ATNTHIZI.js";
20
- import "./chunk-Y5HW6GM2.js";
21
- import "./chunk-HS7MLR74.js";
22
- import "./chunk-TZJJ77KQ.js";
23
- import "./chunk-5UTFL4QJ.js";
24
- import "./chunk-NF64D32W.js";
25
- import "./chunk-3L2WKC3W.js";
26
- import "./chunk-3VNWWVKB.js";
27
- import "./chunk-RG6JBBX5.js";
28
- import "./chunk-KQHGZWSV.js";
29
- import "./chunk-J4MOO56S.js";
30
- import "./chunk-HJUYAD4A.js";
31
- import "./chunk-EYAQT56M.js";
32
- import "./chunk-VIDPVFP3.js";
33
- import "./chunk-VLTIYV3X.js";
34
- import "./chunk-UKZDAFYT.js";
35
- import "./chunk-N4G4PKQ6.js";
36
- import "./chunk-FZGV4FGK.js";
37
- import "./chunk-MEYIRKDN.js";
38
- import "./chunk-63W5N6P3.js";
39
- import "./chunk-VF4K2QE6.js";
40
- import "./chunk-R2B3MIZA.js";
41
- import "./chunk-3WD6RUUJ.js";
42
- import "./chunk-HWIZU4OL.js";
43
- import "./chunk-ZJ7UHBJS.js";
44
- import "./chunk-K4YGZD3P.js";
45
- import "./chunk-MC4XLIJ7.js";
46
- import "./chunk-3BMYXEUW.js";
47
- import "./chunk-YYLHWIW6.js";
48
- import "./chunk-AGGIDPCZ.js";
49
- import "./chunk-SQQVLHMH.js";
50
- import "./chunk-TOP2VXOR.js";
51
- import "./chunk-5RGU3J7P.js";
52
- import "./chunk-6YTOJY35.js";
53
- import "./chunk-M76ECQRD.js";
54
- import "./chunk-YDH3FDFQ.js";
55
- import "./chunk-2F7RJC6L.js";
56
- import "./chunk-GLKOYSRU.js";
57
- import "./chunk-JRQFUXY7.js";
58
- import "./chunk-DHDMC6FO.js";
59
- import "./chunk-Q554LLSI.js";
60
- import "./chunk-KHCLMKZZ.js";
61
- import "./chunk-ZWUOR654.js";
62
- import "./chunk-OF7AQZUG.js";
63
- import "./chunk-Q5FJJ6XI.js";
64
- import "./chunk-ZNFJWEN4.js";
65
- import "./chunk-3IIEFNGY.js";
66
- import "./chunk-CQ3WA2NE.js";
67
- import "./chunk-5ZUL4CUO.js";
68
- import "./chunk-N7J63Q6C.js";
69
- import "./chunk-LZIWMYX4.js";
70
- import "./chunk-PUOC4YRO.js";
71
- import "./chunk-IIVGDG4I.js";
72
- import "./chunk-FDTR4QJ6.js";
73
- import "./chunk-UZGQNTVW.js";
74
- import "./chunk-6OZ36FXI.js";
75
- import "./chunk-2MBTWINN.js";
76
- import "./chunk-JAXOVNM4.js";
77
- import "./chunk-WADCY6G6.js";
78
- import "./chunk-PSCNXBYA.js";
79
- import "./chunk-GQBOR3G6.js";
80
- import "./chunk-BYXBJQAS.js";
81
- import "./chunk-OIVSQH2O.js";
82
- import "./chunk-DWLEOOGR.js";
83
- import "./chunk-HVURBGF3.js";
84
- import "./chunk-ONXOABJR.js";
85
- import "./chunk-W7XHHYWM.js";
86
- import "./chunk-HNMXYYJR.js";
87
- import "./chunk-DVINR3PL.js";
88
- import "./chunk-2GRGFCF6.js";
89
- import "./chunk-O6OSWFZQ.js";
90
- import "./chunk-7S4YWN7P.js";
91
- import "./chunk-X7HHHIOZ.js";
92
- import "./chunk-A7GB5UGH.js";
93
- import "./chunk-OLZBQWZU.js";
94
- import "./chunk-ACTMNVHM.js";
95
- import "./chunk-Q67DOFOO.js";
96
- import "./chunk-BP4XNZRM.js";
97
- import "./chunk-AFUORTY4.js";
98
- import "./chunk-Y5GCAMGP.js";
99
- import "./chunk-QDSINZM3.js";
100
- import "./chunk-KX6YBIHG.js";
101
- import "./chunk-V4MJDUSR.js";
102
- import "./chunk-UAD2WT54.js";
103
- import "./chunk-H62HCIUP.js";
104
- import "./chunk-VMFTFOWF.js";
105
- import "./chunk-WWC7I6TA.js";
106
- import "./chunk-ABQYVJBJ.js";
107
- import "./chunk-QSJ3HFEF.js";
108
- import "./chunk-WV42OMV7.js";
109
- import "./chunk-BNGW5ASC.js";
110
- import "./chunk-M2EJHDJP.js";
111
- import "./chunk-UKWGR5SS.js";
112
- import "./chunk-QOKAKDPE.js";
113
- import "./chunk-OW765XBU.js";
114
- import "./chunk-SEJ5OS6F.js";
115
- import "./chunk-GBRG75BQ.js";
116
- import "./chunk-KUG52IAP.js";
117
- import "./chunk-3EUW3WEO.js";
118
- import "./chunk-U6VC4MU4.js";
119
- import "./chunk-LCBAMY2M.js";
120
- import "./chunk-4SN6J65J.js";
121
- import "./chunk-CF7PE763.js";
122
- import "./chunk-G3SUCT4W.js";
123
- import "./chunk-4VNS5WPM.js";
124
- export {
125
- runAgentCreateCommand,
126
- runAgentReadCommand,
127
- runAgentUpdateCommand
128
- };