nolo-cli 0.33.0-alpha.3 → 0.33.0-alpha.31

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 (157) hide show
  1. package/{_executeModel-RWPVI3YV.js → _executeModel-BTZJ6QKO.js} +56 -58
  2. package/{action-SMLG6OTB.js → action-LKQAGKHH.js} +11 -11
  3. package/{addContentAction-SFO244QN.js → addContentAction-IP2B6UUB.js} +9 -9
  4. package/{addDialogAgentAction-W44ZCEHB.js → addDialogAgentAction-JNIAUFE6.js} +8 -8
  5. package/{agentDeleteCommand-KU2RXQPP.js → agentDeleteCommand-WG6T4OTP.js} +48 -44
  6. package/{agentEmailCommands-MPCMDENS.js → agentEmailCommands-4CEZD4JW.js} +83 -80
  7. package/{agentListCommands-EPD4N6FX.js → agentListCommands-2YHWZHLD.js} +56 -43
  8. package/{agentMachineCommands-AF7C3YRT.js → agentMachineCommands-LKCUIDHA.js} +46 -42
  9. package/agentProviderCommands-65ZC2WB4.js +122 -0
  10. package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-NYHSK6EW.js} +3 -3
  11. package/{agentRecordCommands-EYE6MZZG.js → agentRecordCommands-VSBYJUBN.js} +74 -71
  12. package/{agentRunCommand-LL22SGTN.js → agentRunCommand-LAD7TRWT.js} +80 -76
  13. package/{agentRuntimeLocal-JX34G47Z.js → agentRuntimeLocal-TEJECMTH.js} +34 -31
  14. package/{agentSlice-TNMFQQOV.js → agentSlice-3U3H657P.js} +11 -11
  15. package/{appDeleteCommands-43K5VXQB.js → appDeleteCommands-5QCUYGTX.js} +41 -37
  16. package/{appDeployCommands-FEEJSVDZ.js → appDeployCommands-GMIAIMDB.js} +41 -37
  17. package/{appDeployStatusCommands-H76CG45R.js → appDeployStatusCommands-ZTJ6APB6.js} +41 -37
  18. package/{appGetCommands-MDZYFTYZ.js → appGetCommands-PI4NTPKT.js} +41 -37
  19. package/{appListCommands-TUJJXPWG.js → appListCommands-QMRCLRJ6.js} +41 -37
  20. package/{authCommand-T7UK4CWS.js → authCommand-4ICNA46V.js} +21 -20
  21. package/{authCommands-EAPFGNHN.js → authCommands-W74NRPA6.js} +6 -6
  22. package/{chatQueueReduxAdapter-LVQXC4ZY.js → chatQueueReduxAdapter-5GNVXJ5T.js} +25 -24
  23. package/{chunk-JZ5AMMXU.js → chunk-244YJUYS.js} +4 -4
  24. package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
  25. package/{chunk-AFV4FOT2.js → chunk-3GDKZAPT.js} +4 -91
  26. package/{chunk-M4NC7NF6.js → chunk-3H3FPUCI.js} +2 -2
  27. package/chunk-3Z32AD6X.js +22 -0
  28. package/{chunk-B2BSG6QQ.js → chunk-4EXK5Q2M.js} +18 -18
  29. package/{chunk-UK5JGQVU.js → chunk-52DHSNJC.js} +14 -20
  30. package/{chunk-LOD75GOS.js → chunk-6PI2635O.js} +3884 -1562
  31. package/{chunk-HDKRSRYU.js → chunk-7CH6ONWB.js} +636 -210
  32. package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
  33. package/{chunk-FSSX3XRY.js → chunk-7URTEFXJ.js} +1 -1
  34. package/{chunk-JTSGWTYZ.js → chunk-ASA3CJSG.js} +2 -2
  35. package/{chunk-6SXC35F4.js → chunk-AXCXE35O.js} +13 -13
  36. package/{chunk-2QTEYCR7.js → chunk-C2UKEL7P.js} +17 -7
  37. package/{chunk-I6N2UVVY.js → chunk-CBYBNR2K.js} +1 -1
  38. package/{chunk-WHD6BG7M.js → chunk-DMOWI2S7.js} +48 -44
  39. package/{chunk-3GZXL6FM.js → chunk-DZPK4YQY.js} +1 -1
  40. package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
  41. package/{chunk-TFPUAELY.js → chunk-ET4UZQN3.js} +3 -3
  42. package/{chunk-3WXRAHCG.js → chunk-EU7POTD4.js} +3 -3
  43. package/{chunk-DPMBNHOJ.js → chunk-FAMAQ3A7.js} +1 -1
  44. package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
  45. package/{chunk-57QJXIB6.js → chunk-FEDK54U6.js} +10 -10
  46. package/{chunk-MPZJVZDC.js → chunk-FL3KRU3X.js} +41 -2674
  47. package/{chunk-ZURFOV5J.js → chunk-FS5VNMPF.js} +3 -3
  48. package/{chunk-2H3XIBY4.js → chunk-FSOCQPX7.js} +4 -82
  49. package/{chunk-M2YMQOLC.js → chunk-G34SHBSK.js} +11 -11
  50. package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
  51. package/{chunk-OIQPORYI.js → chunk-GN6ENM54.js} +178 -2
  52. package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
  53. package/chunk-HJ23CUHW.js +109 -0
  54. package/{chunk-RAZOLMJR.js → chunk-HXV5GJFC.js} +15 -8
  55. package/{chunk-OR2HNLVO.js → chunk-HYQSSY7V.js} +71 -79
  56. package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
  57. package/{chunk-2IVEXF7P.js → chunk-ISQZFROX.js} +2 -9
  58. package/{chunk-IHEC7VBF.js → chunk-J36P3SH5.js} +1 -1
  59. package/{chunk-PREQU5QV.js → chunk-J5STUEYU.js} +1 -1
  60. package/{chunk-O6GEBMIY.js → chunk-JE4J3T7A.js} +5296 -4981
  61. package/{chunk-VH2F7ZB6.js → chunk-JG43PNFR.js} +1 -1
  62. package/{chunk-GTYM4HKV.js → chunk-JZ6JDSWD.js} +5 -5
  63. package/{chunk-X2DAEZ3X.js → chunk-KWPXU3W5.js} +1 -1
  64. package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
  65. package/{chunk-NNWHHCVP.js → chunk-LI6SNQF6.js} +2 -3
  66. package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
  67. package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
  68. package/{chunk-7E72JMBB.js → chunk-N543Q3VR.js} +57 -16
  69. package/{chunk-YDTYDA5W.js → chunk-NBIS3WYT.js} +8 -6
  70. package/{chunk-JMPYDFHY.js → chunk-NI72ISCU.js} +21 -8
  71. package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
  72. package/chunk-OH4Q4VVA.js +38 -0
  73. package/{chunk-CLP2K7U4.js → chunk-OS63QEVB.js} +7 -7
  74. package/{chunk-DFUPZE6V.js → chunk-P35OZHD4.js} +3 -16
  75. package/{chunk-GMXWYXAF.js → chunk-PJT3CCBL.js} +4 -4
  76. package/{chunk-3VAQHAXT.js → chunk-PYLC3472.js} +27 -27
  77. package/{chunk-ADLYMQB6.js → chunk-QUK7UZW7.js} +137 -0
  78. package/{chunk-37V5LNEQ.js → chunk-RRYRKT7X.js} +1 -1
  79. package/{chunk-AAGCMVFT.js → chunk-S6QP3AK4.js} +895 -175
  80. package/{chunk-73GINUCW.js → chunk-SQPMYIR5.js} +135 -56
  81. package/{chunk-XCCGU6QB.js → chunk-SSK4QDFL.js} +1 -1
  82. package/{chunk-IL545V3E.js → chunk-TACRGJZO.js} +7 -7
  83. package/chunk-TVXJEOU2.js +78 -0
  84. package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
  85. package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
  86. package/chunk-UOLENXLQ.js +1132 -0
  87. package/{chunk-5SBK2MTI.js → chunk-UOVE5ZHK.js} +24 -71
  88. package/{chunk-ZJMME4DS.js → chunk-VBJVODPE.js} +6 -6
  89. package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
  90. package/{chunk-AOXVOC6D.js → chunk-W2DNU6FK.js} +3 -3
  91. package/chunk-X6WFECZY.js +97 -0
  92. package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
  93. package/{chunk-HUCT7HID.js → chunk-YXB5JR6N.js} +1 -1
  94. package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
  95. package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
  96. package/{codingSkills-DY5MINPG.js → codingSkills-FXKII4C6.js} +3 -3
  97. package/{createAgentAutomationAction-INQT23LX.js → createAgentAutomationAction-CMOMDO6G.js} +25 -26
  98. package/{createDialogAction-LDCPDI73.js → createDialogAction-QG7DKUA7.js} +28 -29
  99. package/{createPageAction-5YXOG2M4.js → createPageAction-JCMCNMTK.js} +30 -31
  100. package/{dbSlice-3SD5L5H2.js → dbSlice-ZNHRC4BK.js} +8 -8
  101. package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +5 -5
  102. package/{dialogCommands-CHJO47AX.js → dialogCommands-T43TTFWR.js} +40 -36
  103. package/{dialogSlice-DOWKOILN.js → dialogSlice-5VZFBHCA.js} +24 -23
  104. package/{docCreateCommands-OVZARUFX.js → docCreateCommands-DQBKKPOC.js} +42 -38
  105. package/{docDeleteCommands-E2XJ62LD.js → docDeleteCommands-ULM4MTP3.js} +43 -39
  106. package/{docReadCommands-I7OSREPJ.js → docReadCommands-3FXTVWVJ.js} +42 -38
  107. package/{docStore-UAWSKZ2Y.js → docStore-LTAGA6XZ.js} +26 -27
  108. package/{docUpdateCommands-X4Z26VJM.js → docUpdateCommands-ZE6B3SLE.js} +44 -40
  109. package/emscripten-module-EDQBMDVK.js +576 -0
  110. package/emscripten-module-LCBQ7VWY.js +1506 -0
  111. package/emscripten-module-OFHQ7EL3.js +482 -0
  112. package/emscripten-module-XM7NDJQA.js +4536 -0
  113. package/fetchMessages-7QRCCRYK.js +1 -1
  114. package/ffi-6ZSX3QJ4.js +80 -0
  115. package/ffi-742Y76PE.js +92 -0
  116. package/ffi-AEYWSYLM.js +80 -0
  117. package/ffi-KQC27OUM.js +92 -0
  118. package/{getPricing-L2ENXWHV.js → getPricing-5R7P4JLI.js} +4 -4
  119. package/{handleSendMessageAction-C3TSDWKH.js → handleSendMessageAction-7GF5IU4J.js} +26 -25
  120. package/index.js +78 -76
  121. package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
  122. package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
  123. package/{machineCommands-BUOIYJAD.js → machineCommands-57UG5TRO.js} +84 -81
  124. package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
  125. package/{machineWsRunDispatch-7CRWAA6O.js → machineWsRunDispatch-L3GQ7ASL.js} +72 -69
  126. package/{models-OX2S5C6Q.js → models-CQOLEOPZ.js} +2 -2
  127. package/module-ES6BEMUI-AFCVSBMS.js +14 -0
  128. package/module-asyncify-2EFITU5U-DEP2F2QP.js +9 -0
  129. package/package.json +1 -1
  130. package/{read-6G73BMEY.js → read-QOLSHOT5.js} +6 -6
  131. package/{readDocTool-DK4EI2GA.js → readDocTool-X7HLXXBW.js} +1 -1
  132. package/{readlineWorkspace-ZDWEASJV.js → readlineWorkspace-SFUQOD4C.js} +3746 -3155
  133. package/{removeDialogAgentAction-E7H557UO.js → removeDialogAgentAction-UBYX7RVR.js} +12 -12
  134. package/{runAgentClientLoop-U7HYA3O5.js → runAgentClientLoop-VCTFHJVP.js} +53 -54
  135. package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
  136. package/{setDialogExtraReferencesAction-RMMGBR5F.js → setDialogExtraReferencesAction-GMXZTTQA.js} +9 -9
  137. package/{setPrimaryDialogAgentAction-FWBKKLVA.js → setPrimaryDialogAgentAction-JKVEILI3.js} +12 -12
  138. package/{settingSlice-73PV4KG4.js → settingSlice-EQKEXSTU.js} +10 -10
  139. package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-6YSTRCQ7.js} +3 -3
  140. package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
  141. package/{spaceCommands-GEWZXGHM.js → spaceCommands-3PVSEEGH.js} +235 -46
  142. package/{spaceSlice-B6MOVY4N.js → spaceSlice-OEBVDZGG.js} +25 -26
  143. package/{streamAgentChatTurn-T527EQTT.js → streamAgentChatTurn-YLUPK5CI.js} +107 -120
  144. package/{switchDialogAgentAction-US6QNL3N.js → switchDialogAgentAction-DSC2T3JW.js} +8 -8
  145. package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
  146. package/{tableCommands-QE47K72R.js → tableCommands-SQSOF2XK.js} +9 -9
  147. package/{tools-XMWCVMPM.js → tools-IZUS4UM5.js} +41 -42
  148. package/{tuiSummaryLlmCaller-NCAJSVSD.js → tuiSummaryLlmCaller-ZFPTFGXJ.js} +17 -16
  149. package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
  150. package/{updateDialogTitleAction-XPJZRJEL.js → updateDialogTitleAction-BB53DOCT.js} +31 -32
  151. package/chunk-6PO2SYCS.js +0 -1800
  152. package/chunk-M3JEW6N6.js +0 -193
  153. package/syncMapping-RK2MANUX.js +0 -43
  154. package/{agentGrantCommands-2LEZDADN.js → agentGrantCommands-OPIGFRDO.js} +2 -2
  155. package/{chunk-ZHYK3N56.js → chunk-G7HTVVFL.js} +3 -3
  156. package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
  157. package/{offlineMarxistsAgentCommand-GEH6SNNA.js → offlineMarxistsAgentCommand-HDIQVGKN.js} +3 -3
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  requireTokenUser
3
- } from "./chunk-IL545V3E.js";
3
+ } from "./chunk-TACRGJZO.js";
4
4
  import {
5
5
  resolveServerUrl
6
6
  } from "./chunk-A7GB5UGH.js";
@@ -11,22 +11,22 @@ import {
11
11
  getAntigravityUserAgent,
12
12
  normalizeAntigravityTokenPayload,
13
13
  refreshAntigravityToken
14
- } from "./chunk-DPMBNHOJ.js";
14
+ } from "./chunk-FAMAQ3A7.js";
15
15
  import {
16
16
  writeOAuthCredential
17
- } from "./chunk-JZPBVBIY.js";
17
+ } from "./chunk-FD36SCCD.js";
18
18
  import {
19
19
  toErrorMessage
20
20
  } from "./chunk-HNMXYYJR.js";
21
21
  import {
22
22
  asOptionalFiniteNumber
23
23
  } from "./chunk-WWC7I6TA.js";
24
- import {
25
- asTrimmedString
26
- } from "./chunk-3EUW3WEO.js";
27
24
  import {
28
25
  isRecord
29
26
  } from "./chunk-KUG52IAP.js";
27
+ import {
28
+ asTrimmedString
29
+ } from "./chunk-3EUW3WEO.js";
30
30
 
31
31
  // packages/cli/oauth/callback-server.ts
32
32
  import { createServer } from "node:http";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-ADLYMQB6.js";
4
+ } from "./chunk-QUK7UZW7.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -259,7 +259,6 @@ export {
259
259
  getIsDesktopApp,
260
260
  createClientLogger,
261
261
  isAbortError,
262
- fetchWithTransientReadRetry,
263
262
  logger,
264
263
  getAllServers,
265
264
  fetchFromClientDb,
@@ -30,11 +30,10 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
30
30
  // always-on include_usage).
31
31
  "deepseek",
32
32
  "ollama",
33
- // Platform Kimi K3 remap (provider=nolo + kimi-k3) routes to crof.ai, an
34
33
  // OpenAI-compatible /v1/chat/completions endpoint; the hosted branch passes
35
- // "crof" as the usage provider so K3 streams request the terminal usage
34
+ // "upstream-k3" as the usage provider so K3 streams request the terminal usage
36
35
  // chunk (same capability decision as deepinfra/vultr).
37
- "crof"
36
+ "upstream-k3"
38
37
  ]);
39
38
  var EXTRA_USAGE_FIELD_PROVIDERS = /* @__PURE__ */ new Set(["openrouter"]);
40
39
  var normalizeProviderName = (providerName) => asTrimmedLowercaseString(providerName);
@@ -7,7 +7,6 @@ import {
7
7
  var require_is_plain_object = __commonJS({
8
8
  "node_modules/is-plain-object/dist/is-plain-object.js"(exports) {
9
9
  "use strict";
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
10
  function isObject(o) {
12
11
  return Object.prototype.toString.call(o) === "[object Object]";
13
12
  }
@@ -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,9 +1,21 @@
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
+ import {
8
+ createMemoryKey,
9
+ createMemoryOwnerIndexKey,
10
+ createMemorySubjectKindIndexKey,
11
+ memoryOwnerRange
12
+ } from "./chunk-KMSZPTM6.js";
13
+ import {
14
+ asTrimmedNonEmptyStringArray
15
+ } from "./chunk-I42VC5KR.js";
16
+ import {
17
+ asTrimmedString
18
+ } from "./chunk-3EUW3WEO.js";
7
19
  import {
8
20
  buildCliRuntimeEnv,
9
21
  clearProfileAuthToken,
@@ -11,25 +23,13 @@ import {
11
23
  getDefaultProfileConfigPath,
12
24
  loadProfileConfig,
13
25
  saveDefaultProfile
14
- } from "./chunk-GE6IWA5N.js";
26
+ } from "./chunk-UNZDCI3O.js";
15
27
  import {
16
28
  resolveAuthTokenFromEnv
17
29
  } from "./chunk-A7GB5UGH.js";
18
30
  import {
19
31
  DEFAULT_NOLO_SERVER_URL
20
32
  } from "./chunk-OLZBQWZU.js";
21
- import {
22
- createMemoryKey,
23
- createMemoryOwnerIndexKey,
24
- createMemorySubjectKindIndexKey,
25
- memoryOwnerRange
26
- } from "./chunk-KMSZPTM6.js";
27
- import {
28
- asTrimmedNonEmptyStringArray
29
- } from "./chunk-I42VC5KR.js";
30
- import {
31
- asTrimmedString
32
- } from "./chunk-3EUW3WEO.js";
33
33
  import {
34
34
  normalizeServerOrigin
35
35
  } from "./chunk-CF7PE763.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
 
@@ -1,13 +1,16 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-X2DAEZ3X.js";
4
+ } from "./chunk-KWPXU3W5.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
7
  } from "./chunk-EKLRRZIN.js";
8
8
  import {
9
9
  toErrorMessage
10
10
  } from "./chunk-HNMXYYJR.js";
11
+ import {
12
+ createAgentKey
13
+ } from "./chunk-KMSZPTM6.js";
11
14
  import {
12
15
  readPipeText,
13
16
  spawnProcess
@@ -19,9 +22,6 @@ import {
19
22
  resolveServerCandidates,
20
23
  resolveServerUrl
21
24
  } from "./chunk-A7GB5UGH.js";
22
- import {
23
- createAgentKey
24
- } from "./chunk-KMSZPTM6.js";
25
25
 
26
26
  // packages/cli/agentRecordHelpers.ts
27
27
  import { readFileSync } from "node:fs";
@@ -458,7 +458,9 @@ function parseAgentUpdateArgs(args) {
458
458
  const copyProviderFrom = readOption(args, "--copy-provider-from");
459
459
  const name = readOption(args, "--name");
460
460
  const customProviderUrl = readOption(args, "--custom-provider-url");
461
- const apiKey = readOption(args, "--api-key");
461
+ const apiKey = readOption(args, "--api-key") ?? readOption(args, "--provider-api-key");
462
+ const verify = args.includes("--verify");
463
+ const verifyPrompt = readOption(args, "--verify-prompt");
462
464
  const maxConcurrent = parsePositiveIntegerOption(
463
465
  readOption(args, "--max-concurrent"),
464
466
  "--max-concurrent"
@@ -496,7 +498,7 @@ function parseAgentUpdateArgs(args) {
496
498
  throw new Error("No updates provided. Use --model / --cli-provider / --api-source / --field key=value.");
497
499
  }
498
500
  }
499
- return { agentInput, updates, promptDoc, copyProviderFrom };
501
+ return { agentInput, updates, promptDoc, copyProviderFrom, verify, verifyPrompt };
500
502
  }
501
503
  async function buildCreatedAgentRecord(args) {
502
504
  const serverUrl = args.cliArgs ? resolveServerUrl(args.cliArgs, args.env) : resolveServerUrl(args.env);
@@ -1,6 +1,9 @@
1
+ import {
2
+ clearCliLocalRuntimePreparedAgentCache
3
+ } from "./chunk-JE4J3T7A.js";
1
4
  import {
2
5
  getReadableCliDb
3
- } from "./chunk-NUO3QFWD.js";
6
+ } from "./chunk-UNHKVD2N.js";
4
7
  import {
5
8
  buildCreatedAgentRecord,
6
9
  buildUpdatedAgentRecord,
@@ -9,10 +12,7 @@ import {
9
12
  resolveAgentRecordFromHybridStore,
10
13
  sanitizeAgentRecordForCliOutput,
11
14
  writeAgentRecord
12
- } from "./chunk-YDTYDA5W.js";
13
- import {
14
- clearCliLocalRuntimePreparedAgentCache
15
- } from "./chunk-O6GEBMIY.js";
15
+ } from "./chunk-NBIS3WYT.js";
16
16
  import {
17
17
  resolveCliAgentKeyInput
18
18
  } from "./chunk-EKLRRZIN.js";
@@ -94,7 +94,7 @@ async function runAgentUpdateCommand(args, deps = {}) {
94
94
  }
95
95
  if (!parsed) {
96
96
  output.write(
97
- "Usage: nolo agent update <agent> [--model <id>] [--cli-provider <provider>] [--api-source <source>] [--max-concurrent <n>] [--expires-at <iso>] [--prompt <text> | --prompt-file <path> | --prompt-doc <pageKey>] [--tools <json>] [--copy-provider-from <agent>] [--field key=value]\n".replace("[--field key=value]", `[--handle <name>] [--field key=value] (e.g. --field disabledTools='["exa_search"]' to disable default tools)`)
97
+ "Usage: nolo agent update <agent> [--model <id>] [--cli-provider <provider>] [--api-source <source>] [--max-concurrent <n>] [--expires-at <iso>] [--prompt <text> | --prompt-file <path> | --prompt-doc <pageKey>] [--tools <json>] [--copy-provider-from <agent>] [--name <name>] [--custom-provider-url <url>] [--api-key <key>|--provider-api-key <key>] [--field key=value]\n".replace("[--field key=value]", `[--handle <name>] [--field key=value] (e.g. --field disabledTools='["exa_search"]' to disable default tools)`)
98
98
  );
99
99
  return args[0] ? 0 : 1;
100
100
  }
@@ -167,7 +167,7 @@ async function runAgentCreateCommand(args, deps = {}) {
167
167
  }
168
168
  if (!parsed) {
169
169
  output.write(
170
- "Usage: nolo agent create <agent> [--model <id>] [--cli-provider <provider>] [--api-source <source>] [--max-concurrent <n>] [--expires-at <iso>] [--prompt <text> | --prompt-file <path> | --prompt-doc <pageKey>] [--tools <json>] [--copy-provider-from <agent>] [--name <name>] [--custom-provider-url <url>] [--provider-api-key <key>] [--field key=value]\n".replace("[--field key=value]", "[--handle <name>] [--field key=value]")
170
+ "Usage: nolo agent create <agent> [--model <id>] [--cli-provider <provider>] [--api-source <source>] [--max-concurrent <n>] [--expires-at <iso>] [--prompt <text> | --prompt-file <path> | --prompt-doc <pageKey>] [--tools <json>] [--copy-provider-from <agent>] [--name <name>] [--custom-provider-url <url>] [--api-key <key>|--provider-api-key <key>] [--verify] [--field key=value]\n".replace("[--field key=value]", "[--handle <name>] [--field key=value]")
171
171
  );
172
172
  return args[0] ? 0 : 1;
173
173
  }
@@ -210,12 +210,25 @@ async function runAgentCreateCommand(args, deps = {}) {
210
210
  serverOrigin: built.serverUrl
211
211
  });
212
212
  clearCliLocalRuntimePreparedAgentCache();
213
+ let verifyResult;
214
+ if (parsed.verify) {
215
+ const { verifyCustomProvider } = await import("./agentProviderCommands-65ZC2WB4.js");
216
+ const rec = built.nextRecord;
217
+ verifyResult = await verifyCustomProvider({
218
+ providerUrl: rec.customProviderUrl,
219
+ apiKey: rec.apiKey,
220
+ model: rec.model,
221
+ prompt: parsed.verifyPrompt,
222
+ fetchImpl
223
+ });
224
+ }
213
225
  output.write(JSON.stringify({
214
226
  ok: true,
215
227
  agentKey: built.agentKey,
216
228
  baseUrl: built.serverUrl,
217
229
  updates: sanitizeAgentRecordForCliOutput(built.updates),
218
- record: sanitizeAgentRecordForCliOutput(built.nextRecord)
230
+ record: sanitizeAgentRecordForCliOutput(built.nextRecord),
231
+ ...verifyResult ? { verify: verifyResult } : {}
219
232
  }, null, 2));
220
233
  output.write("\n");
221
234
  return 0;
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  getCredentialsDir
3
- } from "./chunk-JZPBVBIY.js";
3
+ } from "./chunk-FD36SCCD.js";
4
4
  import {
5
5
  asNonEmptyStringArray
6
6
  } from "./chunk-I42VC5KR.js";
7
+ import {
8
+ isRecord
9
+ } from "./chunk-KUG52IAP.js";
7
10
  import {
8
11
  asTrimmedString
9
12
  } from "./chunk-3EUW3WEO.js";
10
13
  import {
11
14
  asOptionalPositiveFiniteNumber
12
15
  } from "./chunk-U6VC4MU4.js";
13
- import {
14
- isRecord
15
- } from "./chunk-KUG52IAP.js";
16
16
 
17
17
  // packages/agent-runtime/fileCredentialBroker.ts
18
18
  import {
@@ -23,7 +23,6 @@ import {
23
23
  unlinkSync,
24
24
  writeFileSync
25
25
  } from "node:fs";
26
- import { homedir } from "node:os";
27
26
  import { join } from "node:path";
28
27
 
29
28
  // packages/agent-runtime/credentialBroker.ts
@@ -39,7 +38,7 @@ function assertCredentialRef(ref) {
39
38
  }
40
39
 
41
40
  // packages/agent-runtime/fileCredentialBroker.ts
42
- function getApiKeyCredentialsDir(homeDir = homedir()) {
41
+ function getApiKeyCredentialsDir(homeDir) {
43
42
  return join(getCredentialsDir(homeDir), "keys");
44
43
  }
45
44
  function credentialRefToFileName(ref) {
@@ -49,7 +48,7 @@ function credentialRefToFileName(ref) {
49
48
  }
50
49
  return `${safe}.json`;
51
50
  }
52
- function getApiKeyCredentialPath(ref, homeDir = homedir()) {
51
+ function getApiKeyCredentialPath(ref, homeDir) {
53
52
  return join(getApiKeyCredentialsDir(homeDir), credentialRefToFileName(ref));
54
53
  }
55
54
  function ensurePrivateDir(dir) {
@@ -66,7 +65,7 @@ function writePrivateFile(path, body) {
66
65
  } catch {
67
66
  }
68
67
  }
69
- function readApiKeyCredential(ref, homeDir = homedir()) {
68
+ function readApiKeyCredential(ref, homeDir) {
70
69
  const path = getApiKeyCredentialPath(ref, homeDir);
71
70
  if (!existsSync(path)) return null;
72
71
  try {
@@ -78,7 +77,7 @@ function readApiKeyCredential(ref, homeDir = homedir()) {
78
77
  return null;
79
78
  }
80
79
  }
81
- function writeApiKeyCredential(ref, secret, homeDir = homedir(), now = Date.now()) {
80
+ function writeApiKeyCredential(ref, secret, homeDir, now = Date.now()) {
82
81
  const trimmedSecret = secret.trim();
83
82
  if (!trimmedSecret) {
84
83
  throw new Error("Cannot store an empty credential secret.");
@@ -94,17 +93,17 @@ function writeApiKeyCredential(ref, secret, homeDir = homedir(), now = Date.now(
94
93
  writePrivateFile(path, `${JSON.stringify(payload, null, 2)}
95
94
  `);
96
95
  }
97
- function removeApiKeyCredential(ref, homeDir = homedir()) {
96
+ function removeApiKeyCredential(ref, homeDir) {
98
97
  assertCredentialRef(ref);
99
98
  const path = getApiKeyCredentialPath(ref, homeDir);
100
99
  if (!existsSync(path)) return;
101
100
  unlinkSync(path);
102
101
  }
103
- function hasApiKeyCredential(ref, homeDir = homedir()) {
102
+ function hasApiKeyCredential(ref, homeDir) {
104
103
  return readApiKeyCredential(ref, homeDir) !== null;
105
104
  }
106
105
  function createFileCredentialBroker(options = {}) {
107
- const homeDir = options.homeDir ?? homedir();
106
+ const homeDir = options.homeDir;
108
107
  const now = options.now ?? Date.now;
109
108
  return {
110
109
  get(ref) {
@@ -0,0 +1,38 @@
1
+ // packages/agent-runtime/emptyAssistantRepair.ts
2
+ var EMPTY_ASSISTANT_REPAIR_PROMPT = "\u8BF7\u7ED9\u51FA\u660E\u786E\u7684\u6587\u5B57\u56DE\u7B54\u6216\u6267\u884C\u4E0B\u4E00\u6B65\uFF1A\u5982\u679C\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF0C\u8BF7\u76F4\u63A5\u603B\u7ED3\u7ED3\u679C\uFF1B\u5982\u679C\u9700\u8981\u8C03\u7528\u5DE5\u5177\uFF0C\u8BF7\u76F4\u63A5\u8F93\u51FA tool_calls\u3002\u8BF7\u5207\u52FF\u8FD4\u56DE\u7A7A\u5185\u5BB9\u3002";
3
+ var EMPTY_ASSISTANT_FALLBACK_MESSAGE = "\u6A21\u578B\u8FDE\u7EED\u8FD4\u56DE\u7A7A\u6D88\u606F\uFF0C\u5F53\u524D\u4EFB\u52A1\u672A\u5B8C\u6210\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\uFF0C\u6216\u7ED9\u51FA\u66F4\u5177\u4F53\u7684\u4FEE\u6539\u8303\u56F4\u3002";
4
+ var LENGTH_TRUNCATED_FALLBACK_MESSAGE = "\u8F93\u51FA\u8FBE\u5230\u957F\u5EA6\u4E0A\u9650\u88AB\u622A\u65AD\uFF0C\u5EFA\u8BAE\u7F29\u77ED\u4EFB\u52A1\u6216\u63D0\u9AD8\u8F93\u51FA\u4E0A\u9650\u3002";
5
+ var STREAM_TRUNCATED_FALLBACK_MESSAGE = "\u4E0A\u6E38\u54CD\u5E94\u6D41\u5728\u6536\u5C3E\u524D\u88AB\u4E2D\u65AD\uFF08\u672A\u6536\u5230\u7ED3\u675F\u6807\u8BB0\uFF09\uFF0C\u672C\u8F6E\u8F93\u51FA\u4E0D\u5B8C\u6574\u3002\u8BF7\u91CD\u8BD5\u5F53\u524D\u6B65\u9AA4\u3002";
6
+ function resolveEmptyAssistantOutcome(args) {
7
+ if (args.hasToolCalls || args.hasVisibleOutput) return { kind: "ok" };
8
+ if (args.finishReason === "length") return { kind: "fallback", reason: "length_truncated" };
9
+ if (!args.repairUsed) return { kind: "repair" };
10
+ if (!args.finishReason && !args.streamComplete) {
11
+ return { kind: "fallback", reason: "stream_truncated" };
12
+ }
13
+ return { kind: "fallback", reason: "empty_completion" };
14
+ }
15
+ function resolveEmptyAssistantFallbackMessage(reason) {
16
+ if (reason === "length_truncated") return LENGTH_TRUNCATED_FALLBACK_MESSAGE;
17
+ if (reason === "stream_truncated") return STREAM_TRUNCATED_FALLBACK_MESSAGE;
18
+ return EMPTY_ASSISTANT_FALLBACK_MESSAGE;
19
+ }
20
+ function hasAssistantVisibleOutput(content) {
21
+ if (typeof content === "string") return content.trim().length > 0;
22
+ if (!Array.isArray(content)) return false;
23
+ return content.some((part) => {
24
+ if (part?.type === "text" && String(part.text ?? "").trim()) return true;
25
+ if (part?.type === "image_url") {
26
+ const url = part?.image_url?.url;
27
+ return typeof url === "string" && url.trim().length > 0;
28
+ }
29
+ return false;
30
+ });
31
+ }
32
+
33
+ export {
34
+ EMPTY_ASSISTANT_REPAIR_PROMPT,
35
+ resolveEmptyAssistantOutcome,
36
+ resolveEmptyAssistantFallbackMessage,
37
+ hasAssistantVisibleOutput
38
+ };
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  parsePositiveFiniteNumberOrFallback
3
3
  } from "./chunk-Y5GCAMGP.js";
4
- import {
5
- asRecordOrEmpty
6
- } from "./chunk-KX6YBIHG.js";
7
4
  import {
8
5
  DEFAULT_SYSTEM_AGENT_CAPABILITIES
9
6
  } from "./chunk-UZ6XXCVR.js";
7
+ import {
8
+ asRecordOrEmpty
9
+ } from "./chunk-KX6YBIHG.js";
10
10
  import {
11
11
  patch,
12
12
  readAndWait,
13
13
  toTimestampMs,
14
14
  upsert,
15
15
  write
16
- } from "./chunk-57QJXIB6.js";
16
+ } from "./chunk-FEDK54U6.js";
17
17
  import {
18
18
  createUserKey,
19
19
  createUserPreferenceKey,
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-QSJ3HFEF.js";
25
25
  import {
26
26
  BUILTIN_NOLO_AGENT_KEY
27
- } from "./chunk-UK5JGQVU.js";
27
+ } from "./chunk-52DHSNJC.js";
28
28
  import {
29
29
  asyncThunkCreator,
30
30
  buildCreateSlice,
@@ -32,12 +32,12 @@ import {
32
32
  createAsyncThunk,
33
33
  createSelector,
34
34
  selectIdentityUserId
35
- } from "./chunk-X664KVEV.js";
35
+ } from "./chunk-HHBXCRJS.js";
36
36
  import {
37
37
  getAllServers,
38
38
  getIsDesktopApp,
39
39
  isProduction
40
- } from "./chunk-WJSW43QZ.js";
40
+ } from "./chunk-L3JWI7WX.js";
41
41
  import {
42
42
  SERVERS
43
43
  } from "./chunk-LCBAMY2M.js";
@@ -13,7 +13,7 @@ import {
13
13
  platformHostedModels,
14
14
  xaiModels,
15
15
  zaiModels
16
- } from "./chunk-OR2HNLVO.js";
16
+ } from "./chunk-HYQSSY7V.js";
17
17
 
18
18
  // packages/integrations/anthropic/anthropicModels.ts
19
19
  var anthropicModels = [
@@ -26,13 +26,9 @@ var anthropicModels = [
26
26
  maxOutputTokens: 8192,
27
27
  price: {
28
28
  input: 27,
29
- // $3/MTok * 9
30
29
  output: 135,
31
- // $15/MTok * 9
32
30
  cachingWrite: 33.75,
33
- // $3.75/MTok * 9
34
31
  cachingRead: 2.7
35
- // $0.30/MTok * 9
36
32
  }
37
33
  },
38
34
  {
@@ -44,13 +40,9 @@ var anthropicModels = [
44
40
  maxOutputTokens: 8192,
45
41
  price: {
46
42
  input: 27,
47
- // $3/MTok * 9
48
43
  output: 135,
49
- // $15/MTok * 9
50
44
  cachingWrite: 33.75,
51
- // $3.75/MTok * 9
52
45
  cachingRead: 2.7
53
- // $0.30/MTok * 9
54
46
  }
55
47
  },
56
48
  {
@@ -62,13 +54,9 @@ var anthropicModels = [
62
54
  maxOutputTokens: 8192,
63
55
  price: {
64
56
  input: 7.2,
65
- // $0.80/MTok * 9
66
57
  output: 36,
67
- // $4/MTok * 9
68
58
  cachingWrite: 9,
69
- // $1/MTok * 9
70
59
  cachingRead: 0.72
71
- // $0.08/MTok * 9
72
60
  }
73
61
  }
74
62
  ];
@@ -418,7 +406,7 @@ var moonshotModels = [
418
406
  fnCall: true,
419
407
  supportsTool: true,
420
408
  supportsReasoningEffort: true,
421
- price: { input: 3 * 7, output: 15 * 7 },
409
+ price: { input: 21, output: 105 },
422
410
  provider: "moonshot",
423
411
  description: "Moonshot \u65D7\u8230\u6A21\u578B\uFF0C\u539F\u751F\u591A\u6A21\u6001\uFF0C1M \u4E0A\u4E0B\u6587\uFF0C\u957F\u7A0B\u7F16\u7A0B\u4E0E\u6DF1\u5EA6\u63A8\u7406\u3002"
424
412
  },
@@ -433,7 +421,7 @@ var moonshotModels = [
433
421
  fnCall: true,
434
422
  supportsTool: true,
435
423
  supportsReasoningEffort: true,
436
- price: { input: 0.6 * 7, output: 2.4 * 7 },
424
+ price: { input: 4.2, output: 16.8 },
437
425
  provider: "moonshot",
438
426
  description: "Moonshot \u9AD8\u6027\u80FD\u901A\u7528\u6A21\u578B\u3002"
439
427
  }
@@ -1230,7 +1218,6 @@ var REASONING_MODEL_NAMES = /* @__PURE__ */ new Set([
1230
1218
  "gpt-5.4-pro",
1231
1219
  "gpt-5",
1232
1220
  "gpt-5-mini",
1233
- // Legacy model ids from retired Fireworks/DeepInfra/GMI/CF/Z.AI catalog rows
1234
1221
  "@cf/zai-org/glm-5.2",
1235
1222
  "zai-org/GLM-5.2",
1236
1223
  "accounts/fireworks/models/glm-5p2",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateContentTitle
3
- } from "./chunk-MPZJVZDC.js";
3
+ } from "./chunk-FL3KRU3X.js";
4
4
  import {
5
5
  require_date_fns
6
6
  } from "./chunk-M76ECQRD.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  patch,
15
15
  readAndWait
16
- } from "./chunk-57QJXIB6.js";
16
+ } from "./chunk-FEDK54U6.js";
17
17
  import {
18
18
  asOptionalTrimmedString
19
19
  } from "./chunk-G3SUCT4W.js";
@@ -303,7 +303,7 @@ async function saveDocState(arg, { dispatch, getState }) {
303
303
  { slateToRenderMarkdown },
304
304
  { buildSkillSummaryMarker }
305
305
  ] = await Promise.all([
306
- import("./slateUtils-VO2FU36K.js"),
306
+ import("./slateUtils-RIZES3PV.js"),
307
307
  import("./slateToRenderMarkdown-Y5IYN73U.js"),
308
308
  import("./skillSummaryMarker-42HKSXYY.js")
309
309
  ]);
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
367
367
  }
368
368
  }
369
369
  async function createDocState(args, thunkApi) {
370
- const { createPageAction } = await import("./createPageAction-5YXOG2M4.js");
370
+ const { createPageAction } = await import("./createPageAction-JCMCNMTK.js");
371
371
  return createPageAction(args, thunkApi);
372
372
  }
373
373
  function subscribe(listener) {