nolo-cli 0.33.0-alpha.2 → 0.33.0-alpha.21

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 (118) hide show
  1. package/{_executeModel-RWPVI3YV.js → _executeModel-XKWVTZAY.js} +35 -34
  2. package/{action-SMLG6OTB.js → action-Q4KO7DDW.js} +4 -4
  3. package/{addContentAction-SFO244QN.js → addContentAction-FRXDZKSI.js} +3 -3
  4. package/{addDialogAgentAction-W44ZCEHB.js → addDialogAgentAction-XL5G3LPR.js} +2 -2
  5. package/{agentDeleteCommand-KU2RXQPP.js → agentDeleteCommand-ZU4H6F6M.js} +19 -18
  6. package/{agentEmailCommands-MPCMDENS.js → agentEmailCommands-6ULFXW4A.js} +41 -40
  7. package/{agentListCommands-EPD4N6FX.js → agentListCommands-VN7WCW7Z.js} +21 -20
  8. package/{agentMachineCommands-AF7C3YRT.js → agentMachineCommands-5PALVQBD.js} +21 -20
  9. package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
  10. package/{agentRecordCommands-EYE6MZZG.js → agentRecordCommands-XEB66KRX.js} +40 -39
  11. package/{agentRunCommand-LL22SGTN.js → agentRunCommand-OJX27NII.js} +42 -41
  12. package/{agentRuntimeLocal-JX34G47Z.js → agentRuntimeLocal-UWDOE55A.js} +20 -19
  13. package/{agentSlice-TNMFQQOV.js → agentSlice-SZRRJ3ZX.js} +5 -5
  14. package/{appDeleteCommands-43K5VXQB.js → appDeleteCommands-R63PZAY7.js} +20 -19
  15. package/{appDeployCommands-FEEJSVDZ.js → appDeployCommands-VNRT54YO.js} +20 -19
  16. package/{appDeployStatusCommands-H76CG45R.js → appDeployStatusCommands-6IPTKLEM.js} +20 -19
  17. package/{appGetCommands-MDZYFTYZ.js → appGetCommands-JPFVMVAI.js} +20 -19
  18. package/{appListCommands-TUJJXPWG.js → appListCommands-B3SLTPII.js} +20 -19
  19. package/{authCommand-T7UK4CWS.js → authCommand-EX5G5PF4.js} +12 -11
  20. package/{authCommands-EAPFGNHN.js → authCommands-VR6Q6GU2.js} +4 -4
  21. package/{chatQueueReduxAdapter-LVQXC4ZY.js → chatQueueReduxAdapter-IEX32ZVP.js} +15 -14
  22. package/{chunk-2H3XIBY4.js → chunk-2CNX3CJE.js} +4 -82
  23. package/{chunk-MPZJVZDC.js → chunk-2UDMTJOM.js} +9 -9
  24. package/{chunk-WHD6BG7M.js → chunk-37LDAHQN.js} +20 -18
  25. package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
  26. package/{chunk-HUCT7HID.js → chunk-42IF53CR.js} +1 -1
  27. package/{chunk-AAGCMVFT.js → chunk-46JSKTPF.js} +189 -38
  28. package/{chunk-3WXRAHCG.js → chunk-6MSSX7FI.js} +1 -1
  29. package/{chunk-57QJXIB6.js → chunk-6YH4UR3E.js} +3 -3
  30. package/{chunk-HDKRSRYU.js → chunk-7BNPRRDS.js} +150 -29
  31. package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
  32. package/{chunk-OR2HNLVO.js → chunk-7EPNNOL4.js} +6 -6
  33. package/{chunk-PREQU5QV.js → chunk-7OGIWPNK.js} +1 -1
  34. package/{chunk-DFUPZE6V.js → chunk-7SLMYTSF.js} +1 -1
  35. package/{chunk-3GZXL6FM.js → chunk-AOWETAXX.js} +1 -1
  36. package/{chunk-2IVEXF7P.js → chunk-BHILFABL.js} +1 -1
  37. package/{chunk-TFPUAELY.js → chunk-DDET6246.js} +1 -1
  38. package/{chunk-ZURFOV5J.js → chunk-DMT4NJXR.js} +1 -1
  39. package/{chunk-RAZOLMJR.js → chunk-EQ6HOWEJ.js} +2 -2
  40. package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
  41. package/{chunk-JZ5AMMXU.js → chunk-FH7VUJN5.js} +2 -2
  42. package/{chunk-I6N2UVVY.js → chunk-FV63ICZC.js} +1 -1
  43. package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
  44. package/{chunk-VH2F7ZB6.js → chunk-GTEHJWXU.js} +1 -1
  45. package/{chunk-AOXVOC6D.js → chunk-HCOIKLSH.js} +2 -2
  46. package/{chunk-GTYM4HKV.js → chunk-IEHZHWN7.js} +2 -2
  47. package/{chunk-2QTEYCR7.js → chunk-JFUW3UTO.js} +1 -1
  48. package/{chunk-73GINUCW.js → chunk-JL2PUYVS.js} +102 -23
  49. package/{chunk-37V5LNEQ.js → chunk-KIL7V27H.js} +1 -1
  50. package/{chunk-JTSGWTYZ.js → chunk-KMMQFY5O.js} +1 -1
  51. package/{chunk-UK5JGQVU.js → chunk-KZB5SNYH.js} +9 -14
  52. package/{chunk-XCCGU6QB.js → chunk-L5XKDBSH.js} +1 -1
  53. package/{chunk-DPMBNHOJ.js → chunk-LAZTMWIU.js} +1 -1
  54. package/{chunk-M4NC7NF6.js → chunk-LJGEEYGC.js} +2 -2
  55. package/{chunk-B2BSG6QQ.js → chunk-LLKHGZME.js} +4 -4
  56. package/{chunk-7E72JMBB.js → chunk-N2WDGMD5.js} +45 -4
  57. package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
  58. package/{chunk-AFV4FOT2.js → chunk-OQVRTSZ5.js} +4 -91
  59. package/{chunk-3VAQHAXT.js → chunk-PU47HKTF.js} +11 -11
  60. package/{chunk-CLP2K7U4.js → chunk-QKCMP3LU.js} +2 -2
  61. package/{chunk-JZPBVBIY.js → chunk-QTZD6HBK.js} +18 -8
  62. package/{chunk-LOD75GOS.js → chunk-REOW4YJX.js} +80 -1099
  63. package/{chunk-6SXC35F4.js → chunk-RO3AEN3L.js} +5 -5
  64. package/{chunk-5CS33IBL.js → chunk-RQFO3CAF.js} +8 -9
  65. package/{chunk-GMXWYXAF.js → chunk-SBPGB6TF.js} +3 -3
  66. package/{chunk-FSSX3XRY.js → chunk-U2FRXKC7.js} +1 -1
  67. package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
  68. package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
  69. package/{chunk-JMPYDFHY.js → chunk-V44VE7R4.js} +2 -2
  70. package/{chunk-IL545V3E.js → chunk-V4MT7AEN.js} +1 -1
  71. package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
  72. package/chunk-VIRTYWWE.js +97 -0
  73. package/{chunk-ZJMME4DS.js → chunk-XS543SNR.js} +5 -5
  74. package/{chunk-O6GEBMIY.js → chunk-XTSVOICC.js} +195 -47
  75. package/{chunk-6PO2SYCS.js → chunk-YH3FPBG6.js} +1569 -204
  76. package/{chunk-WLH5BAKX.js → chunk-YYTTDOWA.js} +2 -2
  77. package/{chunk-5SBK2MTI.js → chunk-ZKUATCEY.js} +20 -69
  78. package/{codingSkills-DY5MINPG.js → codingSkills-5VOV3JVB.js} +2 -2
  79. package/{createAgentAutomationAction-INQT23LX.js → createAgentAutomationAction-72NNXELT.js} +16 -15
  80. package/{createDialogAction-LDCPDI73.js → createDialogAction-3CJ2GXNO.js} +18 -17
  81. package/{createPageAction-5YXOG2M4.js → createPageAction-HZHQGQO6.js} +16 -15
  82. package/{dbSlice-3SD5L5H2.js → dbSlice-2YD2PZER.js} +2 -2
  83. package/{dialogCommands-CHJO47AX.js → dialogCommands-2BF4ZSWH.js} +18 -17
  84. package/{dialogSlice-DOWKOILN.js → dialogSlice-5R4O4377.js} +15 -14
  85. package/{docCreateCommands-OVZARUFX.js → docCreateCommands-HMZUBFGL.js} +19 -18
  86. package/{docDeleteCommands-E2XJ62LD.js → docDeleteCommands-DFR7GCOR.js} +19 -18
  87. package/{docReadCommands-I7OSREPJ.js → docReadCommands-YM7RDUAZ.js} +19 -18
  88. package/{docStore-UAWSKZ2Y.js → docStore-A4SRW2DJ.js} +17 -16
  89. package/{docUpdateCommands-X4Z26VJM.js → docUpdateCommands-TTQBD7IU.js} +19 -18
  90. package/{getPricing-L2ENXWHV.js → getPricing-J4VXWR5B.js} +3 -3
  91. package/{handleSendMessageAction-C3TSDWKH.js → handleSendMessageAction-CIFBZCI2.js} +15 -14
  92. package/index.js +70 -70
  93. package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
  94. package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
  95. package/{machineCommands-BUOIYJAD.js → machineCommands-QSW4JKR2.js} +40 -39
  96. package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
  97. package/{machineWsRunDispatch-7CRWAA6O.js → machineWsRunDispatch-X3ZC7DZJ.js} +39 -38
  98. package/{models-OX2S5C6Q.js → models-SQFOI4FI.js} +2 -2
  99. package/package.json +1 -1
  100. package/{read-6G73BMEY.js → read-526GJR3R.js} +1 -1
  101. package/{readDocTool-DK4EI2GA.js → readDocTool-JNEZUOSM.js} +1 -1
  102. package/{readlineWorkspace-ZDWEASJV.js → readlineWorkspace-J2ARMEUC.js} +2701 -2083
  103. package/{removeDialogAgentAction-E7H557UO.js → removeDialogAgentAction-NPMEFEJW.js} +4 -4
  104. package/{runAgentClientLoop-U7HYA3O5.js → runAgentClientLoop-5I2R74NR.js} +31 -30
  105. package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-KHGQKT3B.js} +3 -3
  106. package/{setDialogExtraReferencesAction-RMMGBR5F.js → setDialogExtraReferencesAction-ZZ6QWAG2.js} +3 -3
  107. package/{setPrimaryDialogAgentAction-FWBKKLVA.js → setPrimaryDialogAgentAction-BG72QA6S.js} +4 -4
  108. package/{settingSlice-73PV4KG4.js → settingSlice-JCCLCXZB.js} +3 -3
  109. package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-AYBKAG6X.js} +3 -3
  110. package/{spaceCommands-GEWZXGHM.js → spaceCommands-EZYMMJJH.js} +18 -17
  111. package/{spaceSlice-B6MOVY4N.js → spaceSlice-TL2FR4AF.js} +16 -15
  112. package/{streamAgentChatTurn-T527EQTT.js → streamAgentChatTurn-UDYSE2ES.js} +45 -54
  113. package/{switchDialogAgentAction-US6QNL3N.js → switchDialogAgentAction-YPGPM2LL.js} +2 -2
  114. package/{tableCommands-QE47K72R.js → tableCommands-64FZBAI3.js} +1 -1
  115. package/{tools-XMWCVMPM.js → tools-KWYWDJ77.js} +25 -24
  116. package/{tuiSummaryLlmCaller-NCAJSVSD.js → tuiSummaryLlmCaller-WUVAOIYU.js} +9 -8
  117. package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
  118. package/{updateDialogTitleAction-XPJZRJEL.js → updateDialogTitleAction-NQCOEOLF.js} +16 -15
@@ -13,10 +13,10 @@ import {
13
13
  } from "./chunk-CWMSB67P.js";
14
14
  import {
15
15
  runLlm
16
- } from "./chunk-ZJMME4DS.js";
16
+ } from "./chunk-XS543SNR.js";
17
17
  import {
18
18
  cleanupCliSessionForDialog
19
- } from "./chunk-JZ5AMMXU.js";
19
+ } from "./chunk-FH7VUJN5.js";
20
20
  import {
21
21
  getActiveDialogAgentId,
22
22
  getDialogAgentIds,
@@ -33,9 +33,8 @@ import {
33
33
  DEFAULT_CONTEXT_WINDOW,
34
34
  getModelContextWindow,
35
35
  getModelInfo,
36
- resolveAutoExecutionProfile,
37
- resolveBuiltinPlatformAgentRecord
38
- } from "./chunk-2H3XIBY4.js";
36
+ resolveAutoExecutionProfile
37
+ } from "./chunk-2CNX3CJE.js";
39
38
  import {
40
39
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
41
40
  buildCompactionMetricsFromPlan,
@@ -47,11 +46,11 @@ import {
47
46
  normalizeAssistantContentBuffer,
48
47
  planCompression,
49
48
  serializeMessageContent
50
- } from "./chunk-AOXVOC6D.js";
49
+ } from "./chunk-HCOIKLSH.js";
51
50
  import {
52
51
  findModelConfig,
53
52
  getModelConfig
54
- } from "./chunk-DFUPZE6V.js";
53
+ } from "./chunk-7SLMYTSF.js";
55
54
  import {
56
55
  abortActiveControllers,
57
56
  addPageReferenceToRuntime,
@@ -73,10 +72,10 @@ import {
73
72
  import {
74
73
  getPlatformHostedDeepSeekV4Price,
75
74
  isPlatformHostedDeepSeekV4Model
76
- } from "./chunk-OR2HNLVO.js";
75
+ } from "./chunk-7EPNNOL4.js";
77
76
  import {
78
77
  nolotusId
79
- } from "./chunk-CLP2K7U4.js";
78
+ } from "./chunk-QKCMP3LU.js";
80
79
  import {
81
80
  asRecordOrEmpty
82
81
  } from "./chunk-KX6YBIHG.js";
@@ -86,7 +85,7 @@ import {
86
85
  remove,
87
86
  selectById,
88
87
  write
89
- } from "./chunk-57QJXIB6.js";
88
+ } from "./chunk-6YH4UR3E.js";
90
89
  import {
91
90
  buildDialogAgentListIndexDeleteOps,
92
91
  createDialogMessageKeyAndId,
@@ -107,6 +106,11 @@ import {
107
106
  import {
108
107
  asTrimmedLowercaseString
109
108
  } from "./chunk-QSJ3HFEF.js";
109
+ import {
110
+ builtinAgentCatalogEntryById,
111
+ builtinRuntimeFallbackEntries,
112
+ isBuiltinPlatformAgentKey
113
+ } from "./chunk-KZB5SNYH.js";
110
114
  import {
111
115
  asyncThunkCreator,
112
116
  buildCreateSlice,
@@ -131,7 +135,9 @@ import {
131
135
  } from "./chunk-3EUW3WEO.js";
132
136
  import {
133
137
  extractCustomId,
134
- extractUserId
138
+ extractUserId,
139
+ parsePublicAgentId,
140
+ publicAgentKey
135
141
  } from "./chunk-BJIRLHJR.js";
136
142
  import {
137
143
  isRecord
@@ -1643,6 +1649,76 @@ var buildPersonalizationDialogPolicyContext = () => [
1643
1649
  "\u9664\u975E\u7528\u6237\u660E\u786E\u8981\u6C42\uFF0C\u5426\u5219\u4E0D\u8981\u521B\u5EFA\u6587\u6863\uFF0C\u4E0D\u8981\u521B\u5EFA\u6216\u4FEE\u6539\u4EFB\u4F55 agent\u3002"
1644
1650
  ].join("\n");
1645
1651
 
1652
+ // packages/agent-runtime/builtinPlatformAgentRoute.ts
1653
+ function resolveBuiltinAgentRuntimeFields(agentKey) {
1654
+ if (!isBuiltinPlatformAgentKey(agentKey)) return null;
1655
+ const entry = builtinAgentCatalogEntryById(parsePublicAgentId(agentKey));
1656
+ if (!entry) return null;
1657
+ return { provider: entry.provider, model: entry.model };
1658
+ }
1659
+
1660
+ // packages/agent-runtime/builtinPlatformAgentConfigs.ts
1661
+ function buildConfig(e) {
1662
+ const key = publicAgentKey(e.id);
1663
+ const rawRecord = {
1664
+ dbKey: key,
1665
+ isPublic: true,
1666
+ provider: e.provider,
1667
+ model: e.model,
1668
+ apiSource: e.apiSource ?? "platform",
1669
+ useServerProxy: e.useServerProxy ?? true
1670
+ };
1671
+ if (e.hasImageOutput) rawRecord.hasImageOutput = true;
1672
+ if (e.imageModel) rawRecord.imageModel = e.imageModel;
1673
+ if (e.imageWorkflow) rawRecord.imageWorkflow = e.imageWorkflow;
1674
+ if (e.imageConfig) rawRecord.imageConfig = e.imageConfig;
1675
+ return {
1676
+ key,
1677
+ name: e.name,
1678
+ provider: e.provider,
1679
+ model: e.model,
1680
+ apiSource: e.apiSource ?? "platform",
1681
+ useServerProxy: e.useServerProxy ?? true,
1682
+ rawRecord
1683
+ };
1684
+ }
1685
+ var BUILTIN_PLATFORM_AGENT_CONFIGS = Object.fromEntries(
1686
+ builtinRuntimeFallbackEntries().map((e) => [publicAgentKey(e.id), buildConfig(e)])
1687
+ );
1688
+ function resolveBuiltinPlatformAgentConfig(agentRef) {
1689
+ return BUILTIN_PLATFORM_AGENT_CONFIGS[agentRef] ?? null;
1690
+ }
1691
+ function resolveBuiltinPlatformAgentRecord(agentRef) {
1692
+ const config = resolveBuiltinPlatformAgentConfig(agentRef);
1693
+ if (!config) return null;
1694
+ return {
1695
+ ...config.rawRecord,
1696
+ dbKey: agentRef,
1697
+ ...config.name ? { name: config.name } : {}
1698
+ };
1699
+ }
1700
+ function applyBuiltinAgentRuntimeOverride(agentKey, record) {
1701
+ const fields = resolveBuiltinAgentRuntimeFields(agentKey);
1702
+ if (!fields) return record;
1703
+ const current = record;
1704
+ const rawNeedsOverride = current.rawRecord != null && (current.rawRecord.provider !== fields.provider || current.rawRecord.model !== fields.model);
1705
+ if (current.provider === fields.provider && current.model === fields.model && !rawNeedsOverride) {
1706
+ return record;
1707
+ }
1708
+ return {
1709
+ ...record,
1710
+ provider: fields.provider,
1711
+ model: fields.model,
1712
+ ...current.rawRecord ? {
1713
+ rawRecord: {
1714
+ ...current.rawRecord,
1715
+ provider: fields.provider,
1716
+ model: fields.model
1717
+ }
1718
+ } : {}
1719
+ };
1720
+ }
1721
+
1646
1722
  // packages/chat/dialog/dialogAgentPolicy.ts
1647
1723
  var resolveDialogAgentMode = (dialog) => {
1648
1724
  if (dialog?.agentMode === "auto") return "auto";
@@ -3444,7 +3520,7 @@ var messageSlice = createSliceWithThunks({
3444
3520
  runtimeOptions: args.runtimeOptions
3445
3521
  });
3446
3522
  if (agentKeyToUse) {
3447
- const { streamAgentChatTurn } = await import("./agentSlice-TNMFQQOV.js");
3523
+ const { streamAgentChatTurn } = await import("./agentSlice-SZRRJ3ZX.js");
3448
3524
  await dispatch(
3449
3525
  streamAgentChatTurn({
3450
3526
  agentKey: agentKeyToUse,
@@ -4703,7 +4779,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4703
4779
  }
4704
4780
  if (isCurrentDialog) {
4705
4781
  await thunkApi.dispatch(resetMsgs());
4706
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-DOWKOILN.js");
4782
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-5R4O4377.js");
4707
4783
  dispatch(clearPendingAttachments2());
4708
4784
  clearWorkflow();
4709
4785
  }
@@ -4712,39 +4788,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
4712
4788
 
4713
4789
  // packages/chat/dialog/dialogSlice.ts
4714
4790
  var runCreateDialogAction = async (args, thunkApi) => {
4715
- const { createDialogAction } = await import("./createDialogAction-LDCPDI73.js");
4791
+ const { createDialogAction } = await import("./createDialogAction-3CJ2GXNO.js");
4716
4792
  return createDialogAction(args, thunkApi);
4717
4793
  };
4718
4794
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
4719
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-INQT23LX.js");
4795
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-72NNXELT.js");
4720
4796
  return createAgentAutomationAction(args, thunkApi);
4721
4797
  };
4722
4798
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
4723
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-XPJZRJEL.js");
4799
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-NQCOEOLF.js");
4724
4800
  return updateDialogTitleAction(args, thunkApi);
4725
4801
  };
4726
4802
  var runAddDialogAgentAction = async (args, thunkApi) => {
4727
- const { addDialogAgentAction } = await import("./addDialogAgentAction-W44ZCEHB.js");
4803
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-XL5G3LPR.js");
4728
4804
  return addDialogAgentAction(args, thunkApi);
4729
4805
  };
4730
4806
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
4731
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-E7H557UO.js");
4807
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-NPMEFEJW.js");
4732
4808
  return removeDialogAgentAction(args, thunkApi);
4733
4809
  };
4734
4810
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
4735
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-FWBKKLVA.js");
4811
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-BG72QA6S.js");
4736
4812
  return setPrimaryDialogAgentAction(args, thunkApi);
4737
4813
  };
4738
4814
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
4739
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-US6QNL3N.js");
4815
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-YPGPM2LL.js");
4740
4816
  return switchDialogAgentAction(args, thunkApi);
4741
4817
  };
4742
4818
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
4743
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-RMMGBR5F.js");
4819
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-ZZ6QWAG2.js");
4744
4820
  return setDialogExtraReferencesAction(args, thunkApi);
4745
4821
  };
4746
4822
  var runHandleSendMessageAction = async (args, thunkApi) => {
4747
- const { handleSendMessageAction } = await import("./handleSendMessageAction-C3TSDWKH.js");
4823
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-CIFBZCI2.js");
4748
4824
  return handleSendMessageAction(args, thunkApi);
4749
4825
  };
4750
4826
  function clearDialogState() {
@@ -4757,7 +4833,7 @@ var createPageAndAddReference = createAsyncThunk(
4757
4833
  async (payload, { dispatch, getState, rejectWithValue }) => {
4758
4834
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
4759
4835
  try {
4760
- const { createDocState } = await import("./docStore-UAWSKZ2Y.js");
4836
+ const { createDocState } = await import("./docStore-A4SRW2DJ.js");
4761
4837
  const pageKey = await createDocState(
4762
4838
  { slateData, title },
4763
4839
  { dispatch, getState }
@@ -4918,6 +4994,9 @@ var selectCurrentDialogTokens = createSelector(
4918
4994
  var selectTotalDialogTokens = selectCurrentDialogTokens;
4919
4995
 
4920
4996
  export {
4997
+ resolveBuiltinPlatformAgentConfig,
4998
+ resolveBuiltinPlatformAgentRecord,
4999
+ applyBuiltinAgentRuntimeOverride,
4921
5000
  isAssistantToolStub,
4922
5001
  fetchAndCacheMessages,
4923
5002
  extractReferenceKeysFromMessage,
@@ -199,7 +199,7 @@ async function readDocFunc(args, thunkApi) {
199
199
  throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
200
200
  }
201
201
  try {
202
- const { readAction } = await import("./read-6G73BMEY.js");
202
+ const { readAction } = await import("./read-526GJR3R.js");
203
203
  const pageData = await readAction({ dbKey: id }, thunkApi);
204
204
  if (!pageData) {
205
205
  throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  patch,
3
3
  read
4
- } from "./chunk-57QJXIB6.js";
4
+ } from "./chunk-6YH4UR3E.js";
5
5
  import {
6
6
  DEVICE_LOCAL_OWNER_ID,
7
7
  isDeviceLocalSpaceBody,
@@ -92,6 +92,14 @@ var BUILTIN_AGENT_CATALOG = [
92
92
  model: "deepseek-v4-pro",
93
93
  runtimeFallback: true
94
94
  },
95
+ {
96
+ id: "01GLM52DIPB00000000I3E2MY",
97
+ group: "public",
98
+ name: "GLM 5.3",
99
+ provider: "nolo",
100
+ model: "glm-5.3",
101
+ runtimeFallback: true
102
+ },
95
103
  {
96
104
  id: "01KIMIK26OLLAMA0000000001",
97
105
  // 已下架的公共入口:保留 internal catalog entry 仅用于旧 Agent 记录的运行时兼容。
@@ -172,16 +180,6 @@ var BUILTIN_AGENT_CATALOG = [
172
180
  model: "gemini-3.7-flash",
173
181
  runtimeFallback: true
174
182
  },
175
- {
176
- id: "01QWEN37FLASH000000000001",
177
- // 内部图片预处理器(imagePreprocessing.ts),不是广场商品:只需运行时兜底
178
- // 拿到 provider/model,不应被 seed 写库、上架或计费。
179
- group: "internal",
180
- name: "Qwen 3.7 Flash",
181
- provider: "nolo",
182
- model: "qwen3.7-flash",
183
- runtimeFallback: true
184
- },
185
183
  {
186
184
  id: "01GPTIMG2GEN00000000SSEBOS",
187
185
  group: "public",
@@ -270,8 +268,6 @@ var PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID = entry("01DSV4PRONPB00000001VIR3EK").id;
270
268
  var PUBLIC_DEEPSEEK_V4_PRO_AGENT_KEY = publicAgentKey(PUBLIC_DEEPSEEK_V4_PRO_AGENT_ID);
271
269
  var PUBLIC_KIMI_K26_IMAGE_AGENT_ID = entry("01KIMIK26OLLAMA0000000001").id;
272
270
  var PUBLIC_KIMI_K26_IMAGE_AGENT_KEY = publicAgentKey(PUBLIC_KIMI_K26_IMAGE_AGENT_ID);
273
- var PUBLIC_QWEN_37_FLASH_AGENT_ID = entry("01QWEN37FLASH000000000001").id;
274
- var PUBLIC_QWEN_37_FLASH_AGENT_KEY = publicAgentKey(PUBLIC_QWEN_37_FLASH_AGENT_ID);
275
271
  var PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID = entry("01GPTIMG2GEN00000000SSEBOS").id;
276
272
  var PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_KEY = publicAgentKey(PUBLIC_GPT_IMAGE_2_GENERATOR_AGENT_ID);
277
273
  var PUBLIC_GPT_IMAGE_2_EDITOR_AGENT_ID = entry("01GPTIMG2EDT00000001R4R4H4").id;
@@ -706,17 +702,16 @@ var readAction = async (payload, thunkApi) => {
706
702
  };
707
703
 
708
704
  export {
705
+ readRequestManager,
709
706
  builtinAgentCatalogEntryById,
710
707
  builtinRuntimeFallbackEntries,
711
708
  BUILTIN_NOLO_AGENT_KEY,
712
709
  BUILTIN_NOLO_AGENT_NAME,
713
710
  BUILTIN_NOLO_AGENT_MODEL,
714
711
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
715
- PUBLIC_QWEN_37_FLASH_AGENT_KEY,
716
712
  DEFAULT_CODE_PLANNER_EXECUTOR_CANDIDATE_KEYS,
717
713
  isSystemBuiltinTrustedAgentKey,
718
714
  isBuiltinPlatformAgentKey,
719
- readRequestManager,
720
715
  resolveAgentReadServers,
721
716
  readAction
722
717
  };
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  selectById
10
- } from "./chunk-57QJXIB6.js";
10
+ } from "./chunk-6YH4UR3E.js";
11
11
  import {
12
12
  __toESM
13
13
  } from "./chunk-4VNS5WPM.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-AFV4FOT2.js";
3
+ } from "./chunk-OQVRTSZ5.js";
4
4
  import {
5
5
  toErrorMessage
6
6
  } from "./chunk-HNMXYYJR.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-HDKRSRYU.js";
4
+ } from "./chunk-7BNPRRDS.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-ZZ2MH7LE.js";
8
8
  import {
9
9
  isNoloHostedProvider
10
- } from "./chunk-OR2HNLVO.js";
10
+ } from "./chunk-7EPNNOL4.js";
11
11
  import {
12
12
  asTrimmedLowercaseString
13
13
  } from "./chunk-QSJ3HFEF.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-O6GEBMIY.js";
4
+ } from "./chunk-XTSVOICC.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-HDKRSRYU.js";
7
+ } from "./chunk-7BNPRRDS.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-6PO2SYCS.js";
10
+ } from "./chunk-YH3FPBG6.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
- } from "./chunk-5CS33IBL.js";
13
+ } from "./chunk-RQFO3CAF.js";
14
14
  import {
15
15
  toErrorMessage
16
16
  } from "./chunk-HNMXYYJR.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  resolveMachineId
3
- } from "./chunk-6HYVJV7B.js";
3
+ } from "./chunk-ESHYE7WU.js";
4
4
  import {
5
5
  getDefaultCliLocalRuntimeDb
6
- } from "./chunk-Q5ITEGIN.js";
6
+ } from "./chunk-N4XRDM26.js";
7
7
  import {
8
8
  buildCliRuntimeEnv,
9
9
  clearProfileAuthToken,
@@ -11,7 +11,7 @@ import {
11
11
  getDefaultProfileConfigPath,
12
12
  loadProfileConfig,
13
13
  saveDefaultProfile
14
- } from "./chunk-GE6IWA5N.js";
14
+ } from "./chunk-UNZDCI3O.js";
15
15
  import {
16
16
  resolveAuthTokenFromEnv
17
17
  } from "./chunk-A7GB5UGH.js";
@@ -40,6 +40,20 @@ import { stdin as input, stdout as output } from "node:process";
40
40
  import { spawn } from "node:child_process";
41
41
 
42
42
  // packages/ai/memory/delete.ts
43
+ function hasExplicitDeleteFilters(filters) {
44
+ return Boolean(
45
+ filters.ids && filters.ids.length > 0 || typeof filters.contentSubstring === "string" && filters.contentSubstring.trim().length > 0 || filters.tags && filters.tags.length > 0 || typeof filters.sourceDialogId === "string" && filters.sourceDialogId.trim().length > 0 || typeof filters.patternKeyPrefix === "string" && filters.patternKeyPrefix.trim().length > 0 || filters.facets && filters.facets.length > 0 || typeof filters.subjectId === "string" && filters.subjectId.trim().length > 0
46
+ );
47
+ }
48
+ function generateMemoryDeletionToken(ownerId, itemIds) {
49
+ const sorted = [...itemIds].sort().join(",");
50
+ const seed = `${ownerId}:${sorted}`;
51
+ let hash = 0;
52
+ for (let i = 0; i < seed.length; i++) {
53
+ hash = (hash << 5) - hash + seed.charCodeAt(i) | 0;
54
+ }
55
+ return `tok-${Math.abs(hash).toString(36)}-${itemIds.length}`;
56
+ }
43
57
  var normalizeSet = (values) => {
44
58
  if (!Array.isArray(values) || values.length === 0) return null;
45
59
  const normalized = asTrimmedNonEmptyStringArray(values);
@@ -66,6 +80,10 @@ var matchesFilters = (item, filters) => {
66
80
  if (!itemTags.has(tag)) return false;
67
81
  }
68
82
  }
83
+ const contentSub = asTrimmedString(filters.contentSubstring);
84
+ if (contentSub && !(item.content ?? "").toLowerCase().includes(contentSub.toLowerCase())) {
85
+ return false;
86
+ }
69
87
  return true;
70
88
  };
71
89
  var deleteMemoryItemWithIndexesInBatch = (batch, item) => {
@@ -89,6 +107,11 @@ var deleteMemoryItemWithIndexesInBatch = (batch, item) => {
89
107
  );
90
108
  };
91
109
  var deleteMemoriesForOwnerFromDb = async (db, owner, filters = {}) => {
110
+ if (!hasExplicitDeleteFilters(filters)) {
111
+ throw new Error(
112
+ "At least one filter is required; delete operation will not delete all memory implicitly."
113
+ );
114
+ }
92
115
  const range = memoryOwnerRange(owner.ownerType, owner.ownerId);
93
116
  const matchedItems = [];
94
117
  const limit = typeof filters.limit === "number" && filters.limit > 0 ? filters.limit : Number.POSITIVE_INFINITY;
@@ -108,6 +131,23 @@ var deleteMemoriesForOwnerFromDb = async (db, owner, filters = {}) => {
108
131
  if (matchedItems.length === 0) {
109
132
  return { deletedCount: 0, deletedIds: [], matchedItems: [] };
110
133
  }
134
+ const token = generateMemoryDeletionToken(
135
+ owner.ownerId,
136
+ matchedItems.map((i) => i.id)
137
+ );
138
+ if (filters.dryRun) {
139
+ return {
140
+ deletedCount: 0,
141
+ deletedIds: [],
142
+ matchedItems,
143
+ deletionToken: token
144
+ };
145
+ }
146
+ if (filters.deletionToken && filters.deletionToken !== token) {
147
+ throw new Error(
148
+ "deletionToken mismatch: memory dataset changed since preview; please rerun dry-run preview before confirming."
149
+ );
150
+ }
111
151
  const batch = db.batch();
112
152
  for (const item of matchedItems) {
113
153
  deleteMemoryItemWithIndexesInBatch(batch, item);
@@ -116,7 +156,8 @@ var deleteMemoriesForOwnerFromDb = async (db, owner, filters = {}) => {
116
156
  return {
117
157
  deletedCount: matchedItems.length,
118
158
  deletedIds: matchedItems.map((item) => item.id),
119
- matchedItems
159
+ matchedItems,
160
+ deletionToken: token
120
161
  };
121
162
  };
122
163
 
@@ -14,7 +14,7 @@ function buildCliLocalRuntimeDbEnv(env = process.env) {
14
14
  };
15
15
  }
16
16
  async function getDefaultCliLocalRuntimeDb(options = {}) {
17
- const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-E3R24J4T.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-S77B5QVB.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -1,16 +1,8 @@
1
1
  import {
2
- getModelConfig
3
- } from "./chunk-DFUPZE6V.js";
4
- import {
5
- PLATFORM_HOSTED_KIMI_K3_MODEL,
6
- isPlatformHostedClaudeModel,
7
- isPlatformHostedDeepseekModel,
8
- isPlatformHostedGeminiModel,
9
- isPlatformHostedGlmModel,
10
- isPlatformHostedGrokModel,
11
- isPlatformHostedKimiK26Model,
12
- isPlatformHostedQwen37FlashModel
13
- } from "./chunk-OR2HNLVO.js";
2
+ isOpenAiResponsesModel,
3
+ resolvePlatformChatCompletionsEndpoint,
4
+ resolvePlatformResponsesEndpoint
5
+ } from "./chunk-VIRTYWWE.js";
14
6
  import {
15
7
  asTrimmedLowercaseString
16
8
  } from "./chunk-QSJ3HFEF.js";
@@ -36,82 +28,6 @@ function pickAgentRuntimeInferenceOptions(agentConfig) {
36
28
  };
37
29
  }
38
30
 
39
- // packages/agent-runtime/platformProviderEndpoints.ts
40
- var OPENAI_RESPONSES_ENDPOINT = "https://api.openai.com/v1/responses";
41
- var DEEPSEEK_RESPONSES_ENDPOINT = "https://api.deepseek.com/responses";
42
- var XAI_CHAT_COMPLETIONS_ENDPOINT = "https://api.x.ai/v1/chat/completions";
43
- var PLATFORM_CHAT_COMPLETIONS_ENDPOINTS = {
44
- deepinfra: "https://api.deepinfra.com/v1/openai/chat/completions",
45
- fireworks: "https://api.fireworks.ai/inference/v1/chat/completions",
46
- google: "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions",
47
- openai: "https://api.openai.com/v1/chat/completions",
48
- openrouter: "https://openrouter.ai/api/v1/chat/completions",
49
- // 千问 AI 平台 OpenAI 兼容模式
50
- qwen: "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions",
51
- // Moonshot AI(月之暗面)开放平台 OpenAI 兼容模式(按量计费)
52
- moonshot: "https://api.moonshot.cn/v1/chat/completions",
53
- // 平台托管 Kimi K3 的实际上游
54
- crof: "https://crof.ai/v1/chat/completions"
55
- // 无 nolo 默认上游:平台托管模型全部显式分流,未识别模型返回 undefined
56
- };
57
- function isOpenAiResponsesModel(args) {
58
- const provider = asTrimmedLowercaseString(args.provider);
59
- if (provider === "openai") {
60
- if (args.endpointKey === "responses") return true;
61
- if (!args.model) return false;
62
- try {
63
- return getModelConfig("openai", args.model).endpointKey === "responses";
64
- } catch {
65
- return false;
66
- }
67
- }
68
- if (provider === "deepseek" || provider === "nolo" || provider === "ollama-cloud") {
69
- if (isPlatformHostedDeepseekModel(args.model)) return true;
70
- }
71
- return false;
72
- }
73
- function resolvePlatformResponsesEndpoint(provider, model) {
74
- const normalized = asTrimmedLowercaseString(provider);
75
- if (normalized === "openai") return OPENAI_RESPONSES_ENDPOINT;
76
- if (normalized === "deepseek" || normalized === "nolo" || normalized === "ollama-cloud") {
77
- if (!model || isPlatformHostedDeepseekModel(model)) {
78
- return DEEPSEEK_RESPONSES_ENDPOINT;
79
- }
80
- }
81
- return void 0;
82
- }
83
- var PLATFORM_PROVIDER_ENDPOINT_ALIASES = {
84
- "ollama-cloud": "nolo",
85
- deepseek: "nolo"
86
- };
87
- function resolvePlatformChatCompletionsEndpoint(provider, model) {
88
- const key = asTrimmedLowercaseString(provider);
89
- if (!key) return void 0;
90
- const aliased = PLATFORM_PROVIDER_ENDPOINT_ALIASES[key] ?? key;
91
- if (aliased === "nolo" && isPlatformHostedClaudeModel(model)) {
92
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS.deepinfra;
93
- }
94
- if (aliased === "nolo" && isPlatformHostedGrokModel(model)) {
95
- return XAI_CHAT_COMPLETIONS_ENDPOINT;
96
- }
97
- if (aliased === "nolo" && (isPlatformHostedKimiK26Model(model) || isPlatformHostedGlmModel(model))) {
98
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS.openrouter;
99
- }
100
- if (aliased === "nolo" && asTrimmedLowercaseString(model) === PLATFORM_HOSTED_KIMI_K3_MODEL) {
101
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS.crof;
102
- }
103
- if (aliased === "nolo" && (isPlatformHostedGeminiModel(model) || isPlatformHostedQwen37FlashModel(model))) {
104
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS.google;
105
- }
106
- if (aliased === "nolo" && isPlatformHostedDeepseekModel(model)) {
107
- return void 0;
108
- }
109
- if (aliased === "nolo") {
110
- return void 0;
111
- }
112
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS[aliased];
113
- }
114
-
115
31
  // packages/agent-runtime/providerResolution.ts
116
32
  function resolvePlatformProviderEndpoint(agentConfig) {
117
33
  const customProviderUrl = agentConfig.customProviderUrl?.trim();
@@ -411,9 +327,6 @@ async function buildProviderExecutionPlan(args) {
411
327
 
412
328
  export {
413
329
  pickAgentRuntimeInferenceOptions,
414
- isOpenAiResponsesModel,
415
- resolvePlatformResponsesEndpoint,
416
- resolvePlatformChatCompletionsEndpoint,
417
330
  trimTrailingSlash,
418
331
  resolvePlatformServerUrl,
419
332
  resolvePlatformAuthToken,
@@ -8,10 +8,10 @@ import {
8
8
  inlineImageUrlsForCustomProvider,
9
9
  prepareTools,
10
10
  shouldInlineImageUrlsForAgent
11
- } from "./chunk-M4NC7NF6.js";
11
+ } from "./chunk-LJGEEYGC.js";
12
12
  import {
13
13
  performFetchRequest
14
- } from "./chunk-WHD6BG7M.js";
14
+ } from "./chunk-37LDAHQN.js";
15
15
  import {
16
16
  createSSEParser,
17
17
  createToolRunId,
@@ -22,22 +22,22 @@ import {
22
22
  toolRunSetPending,
23
23
  toolRunStarted,
24
24
  toolRunSucceeded
25
- } from "./chunk-HDKRSRYU.js";
25
+ } from "./chunk-7BNPRRDS.js";
26
26
  import {
27
27
  getCurrentSpaceId
28
- } from "./chunk-MPZJVZDC.js";
28
+ } from "./chunk-2UDMTJOM.js";
29
29
  import {
30
30
  addToolMessage,
31
31
  messageStreamEnd,
32
32
  messageStreaming,
33
33
  updateToolMessage
34
- } from "./chunk-73GINUCW.js";
34
+ } from "./chunk-JL2PUYVS.js";
35
35
  import {
36
36
  streamAgentChatTurn
37
- } from "./chunk-ZJMME4DS.js";
37
+ } from "./chunk-XS543SNR.js";
38
38
  import {
39
39
  EMPTY_ASSISTANT_REPAIR_PROMPT
40
- } from "./chunk-6PO2SYCS.js";
40
+ } from "./chunk-YH3FPBG6.js";
41
41
  import {
42
42
  accumulateToolCallDelta,
43
43
  createThinkParserState,
@@ -49,10 +49,10 @@ import {
49
49
  } from "./chunk-N7J63Q6C.js";
50
50
  import {
51
51
  getModelInfo
52
- } from "./chunk-2H3XIBY4.js";
52
+ } from "./chunk-2CNX3CJE.js";
53
53
  import {
54
54
  getApiEndpoint
55
- } from "./chunk-DFUPZE6V.js";
55
+ } from "./chunk-7SLMYTSF.js";
56
56
  import {
57
57
  addActiveController,
58
58
  removeActiveController,
@@ -63,10 +63,10 @@ import {
63
63
  } from "./chunk-HNMXYYJR.js";
64
64
  import {
65
65
  selectCurrentServer
66
- } from "./chunk-CLP2K7U4.js";
66
+ } from "./chunk-QKCMP3LU.js";
67
67
  import {
68
68
  write
69
- } from "./chunk-57QJXIB6.js";
69
+ } from "./chunk-6YH4UR3E.js";
70
70
  import {
71
71
  createDialogMessageKeyAndId,
72
72
  dialogMessageKey,