nolo-cli 0.30.0 → 0.31.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 (108) hide show
  1. package/{_executeModel-VBHHG7LT.js → _executeModel-K47XKKPU.js} +32 -31
  2. package/{action-FENWPT3C.js → action-HI3VRQLP.js} +7 -7
  3. package/{addContentAction-Z5S5ZQ7I.js → addContentAction-NCURJ6PK.js} +6 -6
  4. package/{addDialogAgentAction-VUNVD2XR.js → addDialogAgentAction-RCY4ECF4.js} +5 -5
  5. package/{agentDeleteCommand-LLGZXUYJ.js → agentDeleteCommand-7BBZCONG.js} +26 -25
  6. package/{agentEmailCommands-LC2FPN6G.js → agentEmailCommands-D6FAT5HM.js} +38 -37
  7. package/{agentListCommands-A6OBQ3QX.js → agentListCommands-YPNNMGSJ.js} +28 -27
  8. package/{agentMachineCommands-4O4Q5B5X.js → agentMachineCommands-VYRVSKUC.js} +26 -25
  9. package/{agentRecordCommands-W22RIQRV.js → agentRecordCommands-4J52H5NK.js} +37 -36
  10. package/{agentRunCommand-V4OBU4FB.js → agentRunCommand-LH4RA6FA.js} +38 -37
  11. package/{agentRunControl-AKBN2366.js → agentRunControl-SCIVRZWX.js} +9 -1
  12. package/{agentRuntimeLocal-I57YSGH4.js → agentRuntimeLocal-G7GK545E.js} +23 -22
  13. package/{agentSlice-3ZHY7RAO.js → agentSlice-4ZLEPC3M.js} +6 -6
  14. package/{appDeleteCommands-DJJF466K.js → appDeleteCommands-AOZED7QJ.js} +27 -26
  15. package/{appDeployCommands-WJZGIOEZ.js → appDeployCommands-XJY27BDS.js} +27 -26
  16. package/{appDeployStatusCommands-ICYXUJNO.js → appDeployStatusCommands-HKZYAPB2.js} +27 -26
  17. package/{appGetCommands-UOCWYJPV.js → appGetCommands-VXJLPRYI.js} +27 -26
  18. package/{appListCommands-EOKWTXPW.js → appListCommands-3LU6AB4G.js} +27 -26
  19. package/{authCommand-H5KE7K7K.js → authCommand-3GQR43KB.js} +5 -5
  20. package/{chunk-ZFTCLBEX.js → chunk-2IJAKBK2.js} +3 -1
  21. package/chunk-2K4NDPT5.js +1524 -0
  22. package/{chunk-SWOTB2TX.js → chunk-2MSOY7A5.js} +49 -33
  23. package/{chunk-W2YKDXT7.js → chunk-2YT3KLHX.js} +1 -1
  24. package/{chunk-HLG6GAUD.js → chunk-3IU7WEJD.js} +1 -1
  25. package/{chunk-Q24P6TUS.js → chunk-43EPBPZ2.js} +1 -1
  26. package/{chunk-3RIWR23B.js → chunk-4URO6HMS.js} +1 -1
  27. package/{chunk-UTQZ73QQ.js → chunk-5EDVWWE3.js} +1 -1
  28. package/{chunk-GVKTKT3O.js → chunk-5JQRISUS.js} +3 -3
  29. package/{chunk-GAGUBI42.js → chunk-5MVFYKBL.js} +5 -5
  30. package/{chunk-R5V5G73M.js → chunk-5RDLGLAP.js} +0 -1
  31. package/{chunk-4SAV7BD7.js → chunk-7KNERA53.js} +53 -15
  32. package/{chunk-MEUZFIAJ.js → chunk-7S54ZGF6.js} +2 -2
  33. package/{chunk-IZ3CBMD5.js → chunk-ATK5WJOA.js} +4 -4
  34. package/chunk-BGTUGS3T.js +702 -0
  35. package/{chunk-DI6MXJK5.js → chunk-C3NYMZTQ.js} +16 -14
  36. package/{chunk-HI7QZNWX.js → chunk-CPUZW54L.js} +4 -4
  37. package/{chunk-PJY5AH5A.js → chunk-DPR66GY6.js} +1 -1
  38. package/{chunk-MMCVBEAD.js → chunk-E2CFIWQR.js} +42 -32
  39. package/{chunk-YWGSCF37.js → chunk-E3APEOIM.js} +1 -1
  40. package/{chunk-UKC5HU2C.js → chunk-EATVNXFX.js} +7 -7
  41. package/{chunk-G5JHHUAK.js → chunk-F3MP7CP6.js} +1 -1
  42. package/{chunk-FS5TTXPS.js → chunk-FLYQAMF4.js} +3 -3
  43. package/{chunk-446VANPP.js → chunk-G5GVZAXF.js} +4 -4
  44. package/{chunk-KWKD3BCC.js → chunk-H6COXALE.js} +78 -27
  45. package/{chunk-56IUA7RU.js → chunk-K76HYM3O.js} +1 -1
  46. package/{chunk-DKRT67FG.js → chunk-KGEVMUMI.js} +3 -3
  47. package/{chunk-A4JDTA5T.js → chunk-LAXMH7JY.js} +6 -6
  48. package/{chunk-L3VQOVKK.js → chunk-LBEWOWVL.js} +4 -4
  49. package/{chunk-66O5MZYH.js → chunk-NEGMZP6Q.js} +1 -1
  50. package/{chunk-7CD24PU4.js → chunk-NMK2JHKM.js} +9 -7
  51. package/{chunk-QLV2GKU5.js → chunk-OT2AXEQD.js} +26 -5
  52. package/{chunk-CV6I4HBA.js → chunk-PTHDLIRB.js} +1 -1
  53. package/{chunk-2XM5KUNE.js → chunk-Q6L3O67D.js} +2 -2
  54. package/{chunk-G6VITLCZ.js → chunk-QHWPAW5M.js} +2 -2
  55. package/{chunk-KWCLUYGQ.js → chunk-QL6ELRVS.js} +1 -1
  56. package/chunk-RJ7KLCWY.js +5134 -0
  57. package/{chunk-T3Y5EMJS.js → chunk-SFWZUTCI.js} +1 -1
  58. package/{chunk-XD5NQEOH.js → chunk-UDA3ZYLW.js} +1 -1
  59. package/{chunk-YLADSPDU.js → chunk-V54H24CQ.js} +2 -2
  60. package/{chunk-SZ5CBYMZ.js → chunk-WEID4JLC.js} +2 -2
  61. package/{chunk-KW47OSRJ.js → chunk-WMH2G6XJ.js} +91 -179
  62. package/{chunk-4PWB7JRR.js → chunk-XFG3BAKN.js} +1 -0
  63. package/chunk-XGJ75KN2.js +7889 -0
  64. package/{chunk-OYK7PA5U.js → chunk-XPML3KYZ.js} +6 -6
  65. package/{chunk-TJYWZ3LO.js → chunk-YHGHADBQ.js} +2 -2
  66. package/{chunk-DCWBP2O7.js → chunk-YJZGAAVX.js} +14 -12
  67. package/{chunk-BOL2D2JW.js → chunk-ZJ2WITOO.js} +2 -2
  68. package/{chunk-DWQNDGO7.js → chunk-ZJH3LKEW.js} +2 -2
  69. package/{createAgentAutomationAction-3GMH6ORX.js → createAgentAutomationAction-AECD5YCU.js} +13 -12
  70. package/{createDialogAction-R5MCL4RE.js → createDialogAction-MZUC37CA.js} +14 -13
  71. package/{createPageAction-QYTG656R.js → createPageAction-KRTBWM2S.js} +13 -12
  72. package/{db-IPCJ43PW.js → db-6DPSJ6WT.js} +4 -2
  73. package/{dbSlice-OBV7VFCF.js → dbSlice-BBL3PEVW.js} +5 -5
  74. package/{deleteFile-AC45HYSM.js → deleteFile-RJTEPOT4.js} +3 -3
  75. package/{dialogCommands-NUQGIXVZ.js → dialogCommands-RFADXVV6.js} +27 -26
  76. package/{dialogSlice-CFDECXEU.js → dialogSlice-EWNZ2HFD.js} +12 -12
  77. package/{docCreateCommands-UNFCXB5N.js → docCreateCommands-ZHX6SX5M.js} +26 -25
  78. package/{docDeleteCommands-NG5IVKE5.js → docDeleteCommands-3EEM7ITO.js} +27 -26
  79. package/{docReadCommands-6J7MUUX6.js → docReadCommands-JOMLMZTC.js} +26 -25
  80. package/{docStore-MZZWJM4F.js → docStore-YKTKKH3N.js} +14 -13
  81. package/{docUpdateCommands-6AW3VZOX.js → docUpdateCommands-PGAYLKLC.js} +26 -25
  82. package/{getPricing-XQYSSVV6.js → getPricing-QO5TYNCK.js} +2 -2
  83. package/{handleSendMessageAction-IU2QNTLM.js → handleSendMessageAction-VX4CGWAJ.js} +12 -12
  84. package/index.js +63 -63
  85. package/{localDialogRead-P72W2U2R.js → localDialogRead-3DBXVYXS.js} +1 -1
  86. package/{machineCommands-Z2QEWTHZ.js → machineCommands-A2WFB37F.js} +36 -35
  87. package/{machineWsRunDispatch-SJTYHZHN.js → machineWsRunDispatch-E5R54UWZ.js} +36 -35
  88. package/package.json +1 -1
  89. package/{read-QK7ZRX6G.js → read-64OQDO3I.js} +3 -3
  90. package/{readDocTool-EYDMVRBL.js → readDocTool-MXM3T6PE.js} +1 -1
  91. package/{readlineWorkspace-EY3BPXIU.js → readlineWorkspace-S4A6UYVJ.js} +125 -79
  92. package/{removeDialogAgentAction-TBW3UZJW.js → removeDialogAgentAction-NEKVAMSH.js} +7 -7
  93. package/{runAgentClientLoop-N3YDLTMS.js → runAgentClientLoop-C6IIUQ36.js} +27 -26
  94. package/{setDialogExtraReferencesAction-Q3ANF2NR.js → setDialogExtraReferencesAction-WTOHQDIV.js} +6 -6
  95. package/{setPrimaryDialogAgentAction-FQ5R3EFJ.js → setPrimaryDialogAgentAction-LDJOYC4F.js} +7 -7
  96. package/{settingSlice-JKKV2T7O.js → settingSlice-4M37TN7V.js} +6 -6
  97. package/{skillDiscovery-I3QRA7NE.js → skillDiscovery-Y3HALY2U.js} +3 -3
  98. package/{spaceCommands-R6AEQNLG.js → spaceCommands-SKCMLOC6.js} +210 -28
  99. package/{spaceSlice-MCH7RLLP.js → spaceSlice-6VOPELQN.js} +13 -12
  100. package/{streamAgentChatTurn-Q4U2CVMI.js → streamAgentChatTurn-623CNKWF.js} +35 -32
  101. package/{switchDialogAgentAction-QQGVE4SL.js → switchDialogAgentAction-XVWGKR2Z.js} +5 -5
  102. package/{tableCommands-PRJNWN6Q.js → tableCommands-RJZ3V4TF.js} +1 -1
  103. package/{tools-Y3UBLLYW.js → tools-IN4B36PN.js} +21 -20
  104. package/{tuiSummaryLlmCaller-4474IBTI.js → tuiSummaryLlmCaller-SRZ4QQUP.js} +19 -5
  105. package/{updateDialogTitleAction-3J7GH67I.js → updateDialogTitleAction-4ABIVEYY.js} +18 -16
  106. package/chunk-OB6FBSH3.js +0 -47
  107. package/chunk-THTAR67C.js +0 -16338
  108. package/chunk-VSTUQGLT.js +0 -4937
@@ -17,7 +17,7 @@ import {
17
17
  import {
18
18
  sortSafeAgentSummaries,
19
19
  toSafeAgentSummary
20
- } from "./chunk-UTQZ73QQ.js";
20
+ } from "./chunk-5EDVWWE3.js";
21
21
  import {
22
22
  getUserDataItemTimestamp,
23
23
  mergeAndDedupUserData
@@ -43,19 +43,19 @@ import {
43
43
  resolveNoloDialogInput,
44
44
  toolRunUpdated,
45
45
  verifyNoloDialogSubjectRefQuery
46
- } from "./chunk-OYK7PA5U.js";
46
+ } from "./chunk-XPML3KYZ.js";
47
47
  import {
48
48
  createDocState
49
- } from "./chunk-FS5TTXPS.js";
49
+ } from "./chunk-FLYQAMF4.js";
50
50
  import {
51
51
  setDialogExtraReferencesAction
52
- } from "./chunk-Q24P6TUS.js";
52
+ } from "./chunk-43EPBPZ2.js";
53
53
  import {
54
54
  readDocFunc,
55
55
  readDocFunctionSchema,
56
56
  readPageFunc,
57
57
  readPageFunctionSchema
58
- } from "./chunk-G5JHHUAK.js";
58
+ } from "./chunk-F3MP7CP6.js";
59
59
  import {
60
60
  slateToSimplifiedMarkdown
61
61
  } from "./chunk-SWYMCHM7.js";
@@ -69,7 +69,7 @@ import {
69
69
  } from "./chunk-44HACRCK.js";
70
70
  import {
71
71
  createDialogAction
72
- } from "./chunk-QLV2GKU5.js";
72
+ } from "./chunk-OT2AXEQD.js";
73
73
  import {
74
74
  markdownToSlate
75
75
  } from "./chunk-3LY4F7SV.js";
@@ -77,39 +77,42 @@ import {
77
77
  addCategory,
78
78
  addContentToSpace,
79
79
  addRow,
80
- buildDatabaseFileContentUrl,
81
80
  createTable,
82
81
  deleteDbKey,
83
82
  deleteSpace,
84
83
  fetchUserData,
85
84
  i18nBaseConfig,
86
- incrementFailedSteps,
87
- incrementStepsExecuted,
88
85
  initReactI18next,
89
86
  instance,
90
87
  loadTableRows,
88
+ selectAllMemberSpaces,
89
+ selectCurrentSpaceId,
90
+ updateContentCategory,
91
+ updateContentTitle
92
+ } from "./chunk-XGJ75KN2.js";
93
+ import {
94
+ incrementFailedSteps,
95
+ incrementStepsExecuted,
91
96
  normalizeAppRouteId,
92
97
  resolveDialogRuntimeAgentKey,
93
- selectAllMemberSpaces,
94
98
  selectAllMsgs,
95
99
  selectCurrentDialogConfig,
96
100
  selectCurrentDialogId,
97
- selectCurrentSpaceId,
98
- selectCurrentUserBalance,
99
101
  selectMsgById,
100
102
  setWorkflow,
101
103
  uiAskChoiceFunc,
102
104
  uiAskChoiceFunctionSchema,
103
- updateContentCategory,
104
- updateContentTitle,
105
105
  updateStep
106
- } from "./chunk-THTAR67C.js";
106
+ } from "./chunk-RJ7KLCWY.js";
107
+ import {
108
+ buildDatabaseFileContentUrl
109
+ } from "./chunk-BGTUGS3T.js";
107
110
  import {
108
111
  createAgent,
109
112
  runLlm,
110
113
  streamAgentChatTurn,
111
114
  updateAgent
112
- } from "./chunk-GAGUBI42.js";
115
+ } from "./chunk-5MVFYKBL.js";
113
116
  import {
114
117
  toErrorMessage
115
118
  } from "./chunk-HNMXYYJR.js";
@@ -125,10 +128,10 @@ import {
125
128
  addContentAction,
126
129
  createSpaceKey,
127
130
  normalizeSpaceId
128
- } from "./chunk-YLADSPDU.js";
131
+ } from "./chunk-V54H24CQ.js";
129
132
  import {
130
133
  DEFAULT_MODEL
131
- } from "./chunk-VSTUQGLT.js";
134
+ } from "./chunk-2K4NDPT5.js";
132
135
  import {
133
136
  slateToRenderMarkdown
134
137
  } from "./chunk-63W5N6P3.js";
@@ -137,14 +140,14 @@ import {
137
140
  } from "./chunk-VF4K2QE6.js";
138
141
  import {
139
142
  shareResourceAction
140
- } from "./chunk-DKRT67FG.js";
143
+ } from "./chunk-KGEVMUMI.js";
141
144
  import {
142
145
  AGENT_UPDATE_FIELD_NAMES,
143
146
  normalizeAgentUpdateFieldList,
144
147
  selectAutoApproveSelfUpdateFields,
145
148
  selectCurrentServer,
146
149
  selectSyncServers
147
- } from "./chunk-446VANPP.js";
150
+ } from "./chunk-G5GVZAXF.js";
148
151
  import {
149
152
  asRecordOrEmpty
150
153
  } from "./chunk-KX6YBIHG.js";
@@ -156,13 +159,13 @@ import {
156
159
  selectById,
157
160
  toTimestampMs,
158
161
  write
159
- } from "./chunk-A4JDTA5T.js";
162
+ } from "./chunk-LAXMH7JY.js";
160
163
  import {
161
164
  asTrimmedLowercaseString
162
165
  } from "./chunk-QSJ3HFEF.js";
163
166
  import {
164
167
  readAction
165
- } from "./chunk-DWQNDGO7.js";
168
+ } from "./chunk-ZJH3LKEW.js";
166
169
  import {
167
170
  extractCustomId
168
171
  } from "./chunk-TOW4E763.js";
@@ -171,12 +174,13 @@ import {
171
174
  getRuntimeServerContext,
172
175
  noloWriteRequest,
173
176
  selectIdentityToken,
177
+ selectIdentityUserBalance,
174
178
  selectIdentityUserId,
175
179
  selectRuntimeSnapshot
176
- } from "./chunk-ZFTCLBEX.js";
180
+ } from "./chunk-2IJAKBK2.js";
177
181
  import {
178
182
  isAbortError
179
- } from "./chunk-R5V5G73M.js";
183
+ } from "./chunk-5RDLGLAP.js";
180
184
  import {
181
185
  API_ENDPOINTS
182
186
  } from "./chunk-LCBAMY2M.js";
@@ -818,6 +822,7 @@ var ai_locale_default = {
818
822
  basicInfo: "Basic Info",
819
823
  references: "References",
820
824
  toolSelection: "Skills & Tools",
825
+ knowledgeTools: "Knowledge & Tools",
821
826
  publishSettings: "Publish Settings",
822
827
  advancedSettings: "Model Settings",
823
828
  memory: "Memory"
@@ -1208,6 +1213,7 @@ var ai_locale_default = {
1208
1213
  basicInfo: "\u57FA\u672C\u4FE1\u606F",
1209
1214
  references: "\u77E5\u8BC6\u4E0E\u6307\u4EE4",
1210
1215
  toolSelection: "\u6280\u80FD\u4E0E\u5DE5\u5177",
1216
+ knowledgeTools: "\u77E5\u8BC6\u4E0E\u5DE5\u5177",
1211
1217
  publishSettings: "\u53D1\u5E03\u8BBE\u7F6E",
1212
1218
  advancedSettings: "\u6A21\u578B\u8BBE\u7F6E",
1213
1219
  memory: "\u8BB0\u5FC6"
@@ -1224,6 +1230,7 @@ var ai_locale_default = {
1224
1230
  customProviderUrlPlaceholder: "\u4F8B\u5982\uFF1Ahttps://api.example.com/v1/chat/completions",
1225
1231
  apiKey: "API\u5BC6\u94A5",
1226
1232
  crossDeviceKey: "\u8DE8\u8BBE\u5907\u4F7F\u7528\u6B64\u5BC6\u94A5",
1233
+ prompt: "\u7CFB\u7EDF\u63D0\u793A\u8BCD",
1227
1234
  promptPlaceholder: "\u5B9A\u4E49AI\u7684\u884C\u4E3A\u3001\u89D2\u8272\u548C\u4E2A\u6027...",
1228
1235
  greeting: "\u95EE\u5019\u8BED",
1229
1236
  introduction: "\u81EA\u6211\u4ECB\u7ECD",
@@ -1597,6 +1604,7 @@ var ai_locale_default = {
1597
1604
  basicInfo: "\u57FA\u672C\u8CC7\u8A0A",
1598
1605
  references: "\u77E5\u8B58\u8207\u6307\u4EE4",
1599
1606
  toolSelection: "\u6280\u80FD\u8207\u5DE5\u5177",
1607
+ knowledgeTools: "\u77E5\u8B58\u8207\u5DE5\u5177",
1600
1608
  publishSettings: "\u767C\u5E03\u8A2D\u5B9A",
1601
1609
  advancedSettings: "\u6A21\u578B\u8A2D\u5B9A",
1602
1610
  memory: "\u8A18\u61B6"
@@ -1613,6 +1621,7 @@ var ai_locale_default = {
1613
1621
  customProviderUrlPlaceholder: "\u4F8B\u5982\uFF1Ahttps://api.example.com/v1/chat/completions",
1614
1622
  apiKey: "API\u91D1\u9470",
1615
1623
  crossDeviceKey: "\u8DE8\u88DD\u7F6E\u4F7F\u7528\u6B64\u91D1\u9470",
1624
+ prompt: "\u7CFB\u7D71\u63D0\u793A\u8A5E",
1616
1625
  promptPlaceholder: "\u5B9A\u7FA9AI\u7684\u884C\u70BA\u3001\u89D2\u8272\u548C\u500B\u6027...",
1617
1626
  greeting: "\u554F\u5019\u8A9E",
1618
1627
  introduction: "\u81EA\u6211\u4ECB\u7D39",
@@ -1908,6 +1917,7 @@ var ai_locale_default = {
1908
1917
  basicInfo: "\u57FA\u672C\u60C5\u5831",
1909
1918
  references: "\u77E5\u8B58\u3068\u6307\u793A",
1910
1919
  toolSelection: "\u6280\u80FD\u3068\u30C4\u30FC\u30EB",
1920
+ knowledgeTools: "\u77E5\u8B58\u3068\u30C4\u30FC\u30EB",
1911
1921
  publishSettings: "\u516C\u958B\u8A2D\u5B9A",
1912
1922
  advancedSettings: "\u30E2\u30C7\u30EB\u8A2D\u5B9A",
1913
1923
  memory: "\u30E1\u30E2\u30EA\u30FC"
@@ -1924,6 +1934,7 @@ var ai_locale_default = {
1924
1934
  customProviderUrlPlaceholder: "\u4F8B\uFF1Ahttps://api.example.com/v1/chat/completions",
1925
1935
  apiKey: "API\u30AD\u30FC",
1926
1936
  crossDeviceKey: "\u4ED6\u30C7\u30D0\u30A4\u30B9\u3067\u4F7F\u7528",
1937
+ prompt: "\u30B7\u30B9\u30C6\u30E0\u30D7\u30ED\u30F3\u30D7\u30C8",
1927
1938
  promptPlaceholder: "AI\u306E\u884C\u52D5\u3001\u5F79\u5272\u3001\u6027\u683C\u3092\u5B9A\u7FA9\u3057\u307E\u3059...",
1928
1939
  greeting: "\u6328\u62F6\u30E1\u30C3\u30BB\u30FC\u30B8",
1929
1940
  introduction: "\u81EA\u5DF1\u7D39\u4ECB",
@@ -10182,7 +10193,7 @@ var appBuilder_locale_default = {
10182
10193
  }
10183
10194
  };
10184
10195
 
10185
- // packages/auth/gptProTier.ts
10196
+ // packages/core/gptProTier.ts
10186
10197
  var ADVANCED_FEATURE_MIN_BALANCE = 19;
10187
10198
  var GPT_PRO_REQUIRED_RECHARGE_AMOUNT = 199;
10188
10199
  function isGptProModel(provider, model) {
@@ -11478,7 +11489,7 @@ var buildFormDataFromArgs = async (args) => {
11478
11489
  const trimmedModel = toTrimmedString(model);
11479
11490
  const trimmedProvider = toTrimmedString(provider);
11480
11491
  const modelConfig = await findModelConfig(trimmedModel, trimmedProvider);
11481
- const { getModelPricing } = await import("./getPricing-XQYSSVV6.js");
11492
+ const { getModelPricing } = await import("./getPricing-QO5TYNCK.js");
11482
11493
  const normalizedTools = tools ?? [];
11483
11494
  const resolvedRuntimeToolPolicy = runtimeToolPolicy ?? (normalizedTools.includes("execShell") ? HOSTED_EXEC_RUNTIME_TOOL_POLICY : void 0);
11484
11495
  const formData = {
@@ -11539,7 +11550,7 @@ var findSpaceConfig = (nameOrId, allSpaces) => {
11539
11550
  async function createAgentToolFunc(args, thunkApi) {
11540
11551
  const state = thunkApi.getState();
11541
11552
  const currentUserId = selectIdentityUserId(state);
11542
- const currentBalance = selectCurrentUserBalance(state);
11553
+ const currentBalance = selectIdentityUserBalance(state);
11543
11554
  const allSpaces = selectAllMemberSpaces(state);
11544
11555
  if (!currentUserId) {
11545
11556
  throw new Error("\u521B\u5EFA Agent \u5931\u8D25\uFF1A\u5F53\u524D\u672A\u767B\u5F55\u6216\u7F3A\u5C11 userId\u3002");
@@ -13918,7 +13929,7 @@ async function deleteDialogsFunc(args, thunkApi) {
13918
13929
  const deletedDialogIds = [];
13919
13930
  const deletedDialogKeys = [];
13920
13931
  const failures = [];
13921
- const { deleteDialog } = await import("./dialogSlice-CFDECXEU.js");
13932
+ const { deleteDialog } = await import("./dialogSlice-EWNZ2HFD.js");
13922
13933
  for (const target of targets) {
13923
13934
  try {
13924
13935
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -14187,7 +14198,7 @@ var readSkillDocFunctionSchema = {
14187
14198
  }
14188
14199
  };
14189
14200
  async function readSkillDocFunc(args, thunkApi) {
14190
- const { buildReadDocResult } = await import("./readDocTool-EYDMVRBL.js");
14201
+ const { buildReadDocResult } = await import("./readDocTool-MXM3T6PE.js");
14191
14202
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
14192
14203
  if (typeof id !== "string" || !id.trim()) {
14193
14204
  throw new Error("readSkillDoc requires id or doc.");
@@ -16747,7 +16758,12 @@ var inlineCssUrlAssets = async (args) => {
16747
16758
  const assetUrl = new URL(rawRef, args.cssUrl).toString();
16748
16759
  if (!replacements.has(rawRef)) {
16749
16760
  const bytes = await fetchBytes(assetUrl, args.fetchImpl);
16750
- const base64 = Buffer.from(bytes).toString("base64");
16761
+ const chunkSize = 32766;
16762
+ let base64 = "";
16763
+ const u8 = new Uint8Array(bytes);
16764
+ for (let i = 0; i < u8.length; i += chunkSize) {
16765
+ base64 += btoa(String.fromCharCode(...u8.subarray(i, i + chunkSize)));
16766
+ }
16751
16767
  replacements.set(
16752
16768
  rawRef,
16753
16769
  `data:${guessMimeType(assetUrl)};base64,${base64}`
@@ -19637,7 +19653,7 @@ var selectUserIdFromState = (state) => typeof state?.auth?.currentUser?.userId =
19637
19653
  var selectCurrentServerFromState = (state) => typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : null;
19638
19654
  async function addImageContentToSpace(input) {
19639
19655
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
19640
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-Z5S5ZQ7I.js")).addContentAction;
19656
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-NCURJ6PK.js")).addContentAction;
19641
19657
  await addContentAction2(
19642
19658
  {
19643
19659
  spaceId: input.spaceId,
@@ -25663,7 +25679,7 @@ async function updateDocFunc(args, thunkApi) {
25663
25679
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
25664
25680
  };
25665
25681
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
25666
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-MZZWJM4F.js");
25682
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-YKTKKH3N.js");
25667
25683
  if (getDocState().pageKey === id) {
25668
25684
  applyExternalDocUpdate({
25669
25685
  slateData: finalSlateData,
@@ -25688,7 +25704,7 @@ async function updateDocFunc(args, thunkApi) {
25688
25704
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
25689
25705
  async function dispatchSetSettings(thunkApi, changes) {
25690
25706
  const injectedSetSettings = thunkApi?.extra?.setSettings;
25691
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-JKKV2T7O.js")).setSettings;
25707
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-4M37TN7V.js")).setSettings;
25692
25708
  await thunkApi.dispatch(setSettings(changes)).unwrap();
25693
25709
  }
25694
25710
  var updateUserPreferenceProfileFunctionSchema = {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-SWOTB2TX.js";
4
+ } from "./chunk-2MSOY7A5.js";
5
5
  import {
6
6
  isNoloHostedProvider
7
7
  } from "./chunk-CAENRKNJ.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-56IUA7RU.js";
5
+ } from "./chunk-K76HYM3O.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-KQHGZWSV.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-A4JDTA5T.js";
10
+ } from "./chunk-LAXMH7JY.js";
11
11
  import {
12
12
  __toESM
13
13
  } from "./chunk-4VNS5WPM.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-SZ5CBYMZ.js";
3
+ } from "./chunk-WEID4JLC.js";
4
4
  import {
5
5
  resolveServerUrl
6
6
  } from "./chunk-A7GB5UGH.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isOAuthApiKeyRef
3
- } from "./chunk-THTAR67C.js";
3
+ } from "./chunk-RJ7KLCWY.js";
4
4
  import {
5
5
  getModelAbility
6
6
  } from "./chunk-WTGCTVJG.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-HLG6GAUD.js";
4
+ } from "./chunk-3IU7WEJD.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-56IUA7RU.js";
7
+ } from "./chunk-K76HYM3O.js";
8
8
  import {
9
9
  toSafeAgentSummary
10
- } from "./chunk-UTQZ73QQ.js";
10
+ } from "./chunk-5EDVWWE3.js";
11
11
  import {
12
12
  PUBLIC_AGENT_KEY_PREFIX,
13
13
  isOwnedAgentKey,
@@ -8,12 +8,12 @@ import {
8
8
  patch,
9
9
  remove,
10
10
  write
11
- } from "./chunk-A4JDTA5T.js";
11
+ } from "./chunk-LAXMH7JY.js";
12
12
  import {
13
13
  asyncThunkCreator,
14
14
  buildCreateSlice,
15
15
  getRuntimeServerContext
16
- } from "./chunk-ZFTCLBEX.js";
16
+ } from "./chunk-2IJAKBK2.js";
17
17
  import {
18
18
  createAgentKey,
19
19
  toTrimmedString
@@ -583,7 +583,7 @@ var slice = createSliceWithThunks({
583
583
  const overrides = {};
584
584
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
585
585
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
586
- const { _executeModel } = await import("./_executeModel-VBHHG7LT.js");
586
+ const { _executeModel } = await import("./_executeModel-K47XKKPU.js");
587
587
  return _executeModel(
588
588
  {
589
589
  isStreaming: args.isStreaming ?? false,
@@ -604,7 +604,7 @@ var slice = createSliceWithThunks({
604
604
  * - 循环直到无工具调用或触发其他运行时停止条件
605
605
  */
606
606
  runAgent: create.asyncThunk(async (args, thunkApi) => {
607
- const { runAgentClientLoop } = await import("./runAgentClientLoop-N3YDLTMS.js");
607
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-C6IIUQ36.js");
608
608
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
609
609
  {
610
610
  agentKey: args.agentKey,
@@ -620,7 +620,7 @@ var slice = createSliceWithThunks({
620
620
  * 聊天轮次流式 Agent 调用
621
621
  */
622
622
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
623
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-Q4U2CVMI.js");
623
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-623CNKWF.js");
624
624
  return streamAgentChatTurnHandler(args, thunkApi);
625
625
  }),
626
626
  /**
@@ -263,7 +263,6 @@ export {
263
263
  getIsDesktopApp,
264
264
  createClientLogger,
265
265
  isAbortError,
266
- fetchWithTransientReadRetry,
267
266
  logger,
268
267
  getAllServers,
269
268
  fetchFromClientDb,
@@ -897,6 +897,44 @@ async function runAgentLogsCommand(args, deps) {
897
897
  deps.output.write(content);
898
898
  return 0;
899
899
  }
900
+ var TERMINATE_GRACE_MS = 1e4;
901
+ var TERMINATE_POLL_MS = 250;
902
+ var TERMINATE_KILL_GRACE_MS = 5e3;
903
+ async function terminateRunProcess(record, initialSignal, deps) {
904
+ const pid = record.pid;
905
+ if (typeof pid !== "number" || pid <= 0) return true;
906
+ const kill = deps.kill ?? ((p, s) => {
907
+ process.kill(p, s);
908
+ });
909
+ const sleep = deps.sleep ?? ((ms) => new Promise((r) => setTimeout(r, ms)));
910
+ const nowMs = () => deps.now ? deps.now().getTime() : Date.now();
911
+ const signalGroup = (sig) => {
912
+ try {
913
+ if (process.platform !== "win32") {
914
+ kill(-pid, sig);
915
+ } else {
916
+ kill(pid, sig);
917
+ }
918
+ } catch {
919
+ }
920
+ };
921
+ if (isPidGone(pid, deps)) return true;
922
+ signalGroup(initialSignal);
923
+ if (initialSignal === "SIGTERM") {
924
+ const deadline = nowMs() + TERMINATE_GRACE_MS;
925
+ while (!isPidGone(pid, deps) && nowMs() < deadline) {
926
+ await sleep(TERMINATE_POLL_MS);
927
+ }
928
+ }
929
+ if (!isPidGone(pid, deps)) {
930
+ signalGroup("SIGKILL");
931
+ const killDeadline = nowMs() + TERMINATE_KILL_GRACE_MS;
932
+ while (!isPidGone(pid, deps) && nowMs() < killDeadline) {
933
+ await sleep(TERMINATE_POLL_MS);
934
+ }
935
+ }
936
+ return isPidGone(pid, deps);
937
+ }
900
938
  async function runSignalCommand(args, signal, verb, deps) {
901
939
  const target = args[0];
902
940
  if (!target) {
@@ -915,23 +953,19 @@ async function runSignalCommand(args, signal, verb, deps) {
915
953
  `);
916
954
  return 1;
917
955
  }
918
- const kill = deps.kill ?? ((pid, sig) => process.kill(pid, sig));
919
- try {
920
- kill(record.pid, signal);
921
- } catch (error) {
922
- const code = error.code;
923
- if (code === "ESRCH") {
924
- deps.output.write(`Process ${record.pid} already exited.
925
- `);
926
- } else {
927
- deps.output.write(`Failed to ${verb} ${record.runId}: ${error}
928
- `);
929
- return 1;
930
- }
956
+ const confirmed = await terminateRunProcess(record, signal, deps);
957
+ if (!confirmed) {
958
+ deps.output.write(
959
+ `Failed to ${verb} ${record.runId} (pid ${record.pid}): process still alive after SIGKILL.
960
+ `
961
+ );
962
+ return 1;
931
963
  }
932
964
  finalizeRunRecord(record.runId, { status: "killed" }, deps);
933
- deps.output.write(`Sent ${signal} to ${record.runId} (pid ${record.pid}).
934
- `);
965
+ deps.output.write(
966
+ `Stopped ${record.runId} (pid ${record.pid}): process group confirmed gone.
967
+ `
968
+ );
935
969
  return 0;
936
970
  }
937
971
  async function runAgentStopCommand(args, deps) {
@@ -982,6 +1016,10 @@ export {
982
1016
  runAgentPsCommand,
983
1017
  runAgentStatusCommand,
984
1018
  runAgentLogsCommand,
1019
+ TERMINATE_GRACE_MS,
1020
+ TERMINATE_POLL_MS,
1021
+ TERMINATE_KILL_GRACE_MS,
1022
+ terminateRunProcess,
985
1023
  runAgentStopCommand,
986
1024
  runAgentKillCommand
987
1025
  };
@@ -27,10 +27,10 @@ import {
27
27
  resolvePlatformAuthToken,
28
28
  resolvePlatformServerUrl,
29
29
  resolveProviderTransportDecision
30
- } from "./chunk-XD5NQEOH.js";
30
+ } from "./chunk-UDA3ZYLW.js";
31
31
  import {
32
32
  clipCompactText
33
- } from "./chunk-OB6FBSH3.js";
33
+ } from "./chunk-BGTUGS3T.js";
34
34
  import {
35
35
  isRecord
36
36
  } from "./chunk-KUG52IAP.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  selectCurrentServer
3
- } from "./chunk-446VANPP.js";
3
+ } from "./chunk-G5GVZAXF.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-A4JDTA5T.js";
6
+ } from "./chunk-LAXMH7JY.js";
7
7
  import {
8
8
  selectIdentityToken
9
- } from "./chunk-ZFTCLBEX.js";
9
+ } from "./chunk-2IJAKBK2.js";
10
10
  import {
11
11
  getIsDesktopApp
12
- } from "./chunk-R5V5G73M.js";
12
+ } from "./chunk-5RDLGLAP.js";
13
13
 
14
14
  // packages/ai/agent/cliChatClient.ts
15
15
  function getCliChatRequestConfig(thunkApi) {