nolo-cli 0.33.0-alpha.9 → 0.34.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 (158) hide show
  1. package/{_executeModel-2WR4RTZZ.js → _executeModel-BUYCXZCQ.js} +65 -65
  2. package/{action-OQWPNKAH.js → action-KMBZ3LCZ.js} +12 -12
  3. package/{addContentAction-YVINZQTF.js → addContentAction-KQ44UT2U.js} +10 -10
  4. package/{addDialogAgentAction-6IOCIEPI.js → addDialogAgentAction-ILSDCMYL.js} +9 -9
  5. package/{agentDeleteCommand-H22WRYC6.js → agentDeleteCommand-WSS2IJVM.js} +40 -39
  6. package/{agentEmailCommands-DGJVCMCG.js → agentEmailCommands-SHTPJTSX.js} +75 -75
  7. package/{agentListCommands-6NWMLIMQ.js → agentListCommands-GV6UYVAF.js} +47 -37
  8. package/{agentMachineCommands-5MUO6RDI.js → agentMachineCommands-FLD7TAFH.js} +37 -36
  9. package/agentProviderCommands-65ZC2WB4.js +122 -0
  10. package/{agentPullCommand-YH5GEBK4.js → agentPullCommand-TSWAJPS2.js} +1 -1
  11. package/agentRecordCommands-57W6R7QW.js +113 -0
  12. package/{agentRunCommand-LYEMVQJH.js → agentRunCommand-HJGXSMDN.js} +78 -76
  13. package/{agentRunControl-SCIVRZWX.js → agentRunControl-GXOB47YI.js} +5 -1
  14. package/{agentRuntimeLocal-PRAR3NCW.js → agentRuntimeLocal-G7ZV55I6.js} +33 -33
  15. package/{agentSlice-AMDSTXP5.js → agentSlice-HFR7SP3B.js} +12 -12
  16. package/agentSuperviseCommands-Q64S5SPG.js +640 -0
  17. package/{appDeleteCommands-L5PKC42V.js → appDeleteCommands-SHHE56Y2.js} +35 -34
  18. package/{appDeployCommands-3J7Z4XWV.js → appDeployCommands-WUMSO2VS.js} +35 -34
  19. package/{appDeployStatusCommands-YTRPXE72.js → appDeployStatusCommands-VZSVN6SR.js} +35 -34
  20. package/{appGetCommands-JVXV5WXD.js → appGetCommands-ZJ2C3A5Y.js} +35 -34
  21. package/{appListCommands-7KDEOJSO.js → appListCommands-W33L6U5X.js} +35 -34
  22. package/{authCommand-6Y5LTMZB.js → authCommand-B2XRHNJH.js} +19 -19
  23. package/{authCommands-EAPFGNHN.js → authCommands-GWABTFMR.js} +6 -6
  24. package/{chatQueueReduxAdapter-ZKSS6XRV.js → chatQueueReduxAdapter-SYIX4ODY.js} +28 -28
  25. package/{chunk-UM4H3URE.js → chunk-23KKIMD5.js} +7 -7
  26. package/{chunk-HUCT7HID.js → chunk-2KO5QQFV.js} +2 -2
  27. package/{chunk-2UECQ7RE.js → chunk-3AOLVADY.js} +1 -1
  28. package/{chunk-EMW55KKX.js → chunk-3LWZNEGQ.js} +1 -1
  29. package/{chunk-MQWVAOIU.js → chunk-3XZUNRYF.js} +33 -158
  30. package/{chunk-M2YMQOLC.js → chunk-4APLX2RT.js} +75 -10
  31. package/{chunk-ZHYK3N56.js → chunk-4AWH4LQA.js} +3 -1
  32. package/{chunk-3GZXL6FM.js → chunk-4DMPISV6.js} +7 -3
  33. package/chunk-4HOXB6SY.js +297 -0
  34. package/{chunk-OIQPORYI.js → chunk-64KIQZA2.js} +175 -2
  35. package/{chunk-BQ3OHLR5.js → chunk-6KYCG5GW.js} +1216 -690
  36. package/chunk-6XG52ZQ6.js +146 -0
  37. package/{chunk-GOIDVXK5.js → chunk-74IQ5RRO.js} +21 -8
  38. package/{chunk-FMEVI5TG.js → chunk-7CH6U3FL.js} +1 -1
  39. package/{chunk-DSBGWT2C.js → chunk-7YDKVLAE.js} +10 -10
  40. package/{chunk-5X4GQ53C.js → chunk-AUH2LTIY.js} +7 -7
  41. package/{chunk-UNOTBWZZ.js → chunk-B6H5XCT2.js} +8 -8
  42. package/{chunk-NNWHHCVP.js → chunk-BMB563Y6.js} +10 -4
  43. package/{chunk-DFUPZE6V.js → chunk-C6ELZQ7H.js} +249 -34
  44. package/{chunk-BXPBZVRE.js → chunk-DX6BP4K7.js} +285 -251
  45. package/{chunk-6HYVJV7B.js → chunk-ESHYE7WU.js} +2 -1
  46. package/{chunk-JZPBVBIY.js → chunk-FD36SCCD.js} +19 -8
  47. package/{chunk-7L5CQQIT.js → chunk-FDKEDU7R.js} +14 -14
  48. package/{chunk-DKMOY3QI.js → chunk-FGLKRJDI.js} +54 -3
  49. package/{chunk-2QTEYCR7.js → chunk-FTM4KUOZ.js} +17 -17
  50. package/{chunk-U4TRT5V4.js → chunk-GEPHJJW4.js} +1 -1
  51. package/{chunk-7YYHKBJP.js → chunk-GKHV4UH5.js} +1 -1
  52. package/{chunk-2IVEXF7P.js → chunk-GUYMR3JL.js} +6 -33
  53. package/{chunk-YDTYDA5W.js → chunk-GZRMWK5R.js} +6 -4
  54. package/{chunk-VWY2CZD2.js → chunk-HDT2RB7T.js} +3 -3
  55. package/{chunk-X664KVEV.js → chunk-HHBXCRJS.js} +204 -123
  56. package/{chunk-75U775RZ.js → chunk-IFS5CUEH.js} +1 -1
  57. package/{chunk-WLH5BAKX.js → chunk-IIOHYLIG.js} +9 -4
  58. package/{chunk-ADLYMQB6.js → chunk-IZCHPD7T.js} +52 -3
  59. package/{chunk-ITIA6OAQ.js → chunk-IZNJDUJ4.js} +5 -5
  60. package/{chunk-X2DAEZ3X.js → chunk-J5NMOM35.js} +1 -1
  61. package/{chunk-RPRRIFXV.js → chunk-JI2TIPLP.js} +1 -1
  62. package/{chunk-EGRJC4ZN.js → chunk-JIADXJYU.js} +1 -1
  63. package/{chunk-IHEC7VBF.js → chunk-K4KIFRIN.js} +1 -1
  64. package/{chunk-7INB7NXF.js → chunk-KCBK4MDT.js} +294 -54
  65. package/{chunk-WJSW43QZ.js → chunk-L3JWI7WX.js} +0 -1
  66. package/{chunk-XLLTJXAD.js → chunk-LAUUAYLK.js} +39 -2672
  67. package/{chunk-3RUW3ONU.js → chunk-LD6Y6RJY.js} +4 -4
  68. package/{chunk-AN7DGYMW.js → chunk-LQ6PUHW6.js} +5077 -3588
  69. package/chunk-M3JQWYBC.js +387 -0
  70. package/{chunk-GM6PU7B6.js → chunk-MEYIRKDN.js} +0 -1
  71. package/{chunk-6YXDOOSH.js → chunk-MGIHZ5CJ.js} +4 -4
  72. package/chunk-MI2J67UU.js +43 -0
  73. package/{chunk-4F5M2MW5.js → chunk-MJWX4JQO.js} +2 -2
  74. package/{chunk-Q5ITEGIN.js → chunk-N4XRDM26.js} +1 -1
  75. package/{chunk-5CS33IBL.js → chunk-NQ4N4IGO.js} +11 -12
  76. package/{chunk-ZZ2MH7LE.js → chunk-O6OSWFZQ.js} +0 -1
  77. package/{chunk-ZURFOV5J.js → chunk-OFZPJ3NT.js} +13 -4
  78. package/{chunk-RJKIB55Y.js → chunk-OSCSEJJR.js} +15 -8
  79. package/{chunk-SCUETSRP.js → chunk-PV734VZX.js} +1 -1
  80. package/{chunk-7E72JMBB.js → chunk-SMPAUSX5.js} +46 -5
  81. package/{chunk-ASDXPOJH.js → chunk-U6QQLXWI.js} +1 -1
  82. package/{chunk-NUO3QFWD.js → chunk-UNHKVD2N.js} +1 -1
  83. package/{chunk-GE6IWA5N.js → chunk-UNZDCI3O.js} +126 -1
  84. package/{chunk-CPYYM4RJ.js → chunk-V5GA74HI.js} +19 -5
  85. package/{chunk-UEAUAXYS.js → chunk-VBD7W4Q6.js} +2057 -212
  86. package/{chunk-DNQK7M7K.js → chunk-VD2SO4RG.js} +4 -4
  87. package/{chunk-FXFGNOT2.js → chunk-VFVCYIRQ.js} +1 -1
  88. package/{chunk-7KNERA53.js → chunk-VSA6QAGV.js} +47 -3
  89. package/{chunk-G7E4NWFE.js → chunk-W445DPVT.js} +1 -1
  90. package/{chunk-3UG2IIZ3.js → chunk-WN5AJG5I.js} +1 -1
  91. package/{chunk-KSRFVP36.js → chunk-WRN7L5CS.js} +1 -1
  92. package/{chunk-GJXRIOLS.js → chunk-WRP5TTM6.js} +4 -84
  93. package/chunk-X2K2JSO4.js +163 -0
  94. package/{chunk-OR2HNLVO.js → chunk-X6EN3KJX.js} +279 -477
  95. package/{chunk-IKWTTKWG.js → chunk-XQES6LXQ.js} +2 -2
  96. package/{chunk-IR6W62Q6.js → chunk-XT73C4VH.js} +18 -21
  97. package/{chunk-RY57GLGW.js → chunk-YPREESF4.js} +42 -5
  98. package/{chunk-WNHST4IE.js → chunk-YRP7LG4R.js} +4527 -4080
  99. package/{chunk-BQXOGBFN.js → chunk-YZ2WE6CW.js} +2 -2
  100. package/{chunk-3WXRAHCG.js → chunk-ZBB3MZR3.js} +3 -3
  101. package/{cliExecutor-DW3PHGEL.js → cliExecutor-BBUVQU4L.js} +2 -2
  102. package/{clipboardy-MMBYVRLF.js → clipboardy-PRUHGPGC.js} +4 -3
  103. package/{codingSkills-DY5MINPG.js → codingSkills-H6N5EKSX.js} +3 -3
  104. package/cooldownCommands-C2SZLEEO.js +90 -0
  105. package/{createAgentAutomationAction-GVSJL2CI.js → createAgentAutomationAction-BH3D2L2H.js} +28 -30
  106. package/{createDialogAction-VVR46Q2A.js → createDialogAction-U4LDV2RW.js} +31 -33
  107. package/{createPageAction-M2VDKBYS.js → createPageAction-Q2ANG535.js} +30 -32
  108. package/{dbSlice-UI2VCBLG.js → dbSlice-PIQGICNM.js} +9 -9
  109. package/{deleteFile-XQXPBFFB.js → deleteFile-NPZ64DFN.js} +4 -4
  110. package/{dialogCommands-26DBYNBT.js → dialogCommands-C556D6WD.js} +37 -36
  111. package/{dialogSlice-FFGLRCBL.js → dialogSlice-P2VSKG2X.js} +27 -27
  112. package/dist-VODFSGNG.js +7442 -0
  113. package/{docCreateCommands-F2ASWG6B.js → docCreateCommands-AAVGLQWE.js} +36 -35
  114. package/{docDeleteCommands-A4URDZPI.js → docDeleteCommands-PKMKSQD2.js} +37 -36
  115. package/{docReadCommands-DO6VHDZD.js → docReadCommands-2WUH7UXC.js} +36 -35
  116. package/{docStore-EDAE7RNT.js → docStore-J5UWRBB4.js} +29 -31
  117. package/{docUpdateCommands-ZTXZ3RTP.js → docUpdateCommands-B2N4E5HQ.js} +38 -37
  118. package/{fetchMessages-7QRCCRYK.js → fetchMessages-CUEFN4GQ.js} +4 -4
  119. package/{getPricing-L2ENXWHV.js → getPricing-P3E2WRIH.js} +5 -5
  120. package/{handleSendMessageAction-CIRLGHOC.js → handleSendMessageAction-RRZ53YYH.js} +29 -29
  121. package/index.js +92 -77
  122. package/{localDialogRead-SLMPV5SK.js → localDialogRead-P7CHFMIC.js} +1 -1
  123. package/{localRuntimeAuthority-E3R24J4T.js → localRuntimeAuthority-S77B5QVB.js} +6 -2
  124. package/{localRuntimeDb-DDZCJFQZ.js → localRuntimeDb-N3H3HQ7G.js} +1 -1
  125. package/{machineCommands-NIQNCYJV.js → machineCommands-CWKMJG33.js} +77 -77
  126. package/{machineInfo-M6KB6HZN.js → machineInfo-66ZFUMLE.js} +1 -1
  127. package/{machineWsRunDispatch-EMTSQGAR.js → machineWsRunDispatch-UYNVNX4A.js} +69 -69
  128. package/{models-OX2S5C6Q.js → models-L7S2EKPM.js} +2 -2
  129. package/package.json +1 -1
  130. package/{read-2VHEHCAN.js → read-6C2XD3YZ.js} +5 -5
  131. package/{readDocTool-CSWD6NPC.js → readDocTool-Y7AB365O.js} +1 -1
  132. package/{readlineWorkspace-A2JBJWLI.js → readlineWorkspace-VYELP22P.js} +2851 -1515
  133. package/{removeDialogAgentAction-2T7BPM3T.js → removeDialogAgentAction-KG5WMJRZ.js} +13 -13
  134. package/{runAgentClientLoop-BV4736ED.js → runAgentClientLoop-35GKZDOZ.js} +62 -61
  135. package/{runtimeDoctorCommands-KIKM6BIO.js → runtimeDoctorCommands-HT4O2PXL.js} +6 -6
  136. package/{setDialogExtraReferencesAction-GPT37HTW.js → setDialogExtraReferencesAction-O2NLXMSM.js} +10 -10
  137. package/{setPrimaryDialogAgentAction-3746P7IW.js → setPrimaryDialogAgentAction-FYYUY7PB.js} +13 -13
  138. package/{settingSlice-FIFOQ6OR.js → settingSlice-GPLI6E3M.js} +11 -11
  139. package/{skillDiscovery-KLLKXPUO.js → skillDiscovery-COX56OBO.js} +3 -3
  140. package/{slateUtils-VO2FU36K.js → slateUtils-RIZES3PV.js} +1 -1
  141. package/{spaceCommands-AYZQHDB3.js → spaceCommands-AAKQM2PM.js} +223 -37
  142. package/{spaceSlice-43BNF22B.js → spaceSlice-NSNGR4Y2.js} +28 -30
  143. package/{streamAgentChatTurn-OLLRSITV.js → streamAgentChatTurn-D5IDHXMV.js} +116 -129
  144. package/{switchDialogAgentAction-MQTUTQHL.js → switchDialogAgentAction-GH5P6Q3Z.js} +9 -9
  145. package/{chunk-IDAU4UFS.js → syncMapping-N6RGXGBW.js} +11 -11
  146. package/{tableCommands-QE47K72R.js → tableCommands-PQUJ55AS.js} +3 -3
  147. package/{tools-2SI3FXLL.js → tools-JQOETZP5.js} +44 -45
  148. package/{tuiSummaryLlmCaller-EAWQ3IZX.js → tuiSummaryLlmCaller-LH7F2SP7.js} +18 -18
  149. package/{updateCommands-AK2RDOFR.js → updateCommands-MNDUIKN7.js} +2 -2
  150. package/{updateDialogTitleAction-YJEQFYOA.js → updateDialogTitleAction-WOTSDSFQ.js} +31 -33
  151. package/agentRecordCommands-YMGKT2WF.js +0 -113
  152. package/chunk-D5JI6VDM.js +0 -1800
  153. package/chunk-M3JEW6N6.js +0 -193
  154. package/chunk-ZWS6DUHX.js +0 -480
  155. package/syncMapping-RK2MANUX.js +0 -43
  156. package/{chunk-KMSZPTM6.js → chunk-2WKUUY2E.js} +3 -3
  157. package/{chunk-CWMSB67P.js → chunk-AGGIDPCZ.js} +0 -0
  158. package/{chunk-SAQQLJZ5.js → chunk-JDSUTNYY.js} +3 -3
@@ -66,7 +66,8 @@ function detectRuntimeCapabilities(options = {}) {
66
66
  // packages/connector-experimental/machineInfo.ts
67
67
  var CONNECTOR_VERSION = "0.1.0-experimental";
68
68
  function defaultMachineIdPath() {
69
- return join2(homedir(), ".nolo", "machine-id");
69
+ const noloHome = process.env.NOLO_HOME?.trim();
70
+ return noloHome ? join2(noloHome, "machine-id") : join2(homedir(), ".nolo", "machine-id");
70
71
  }
71
72
  function resolveMachineId(path = defaultMachineIdPath()) {
72
73
  try {
@@ -7,14 +7,24 @@ import {
7
7
  unlinkSync,
8
8
  writeFileSync
9
9
  } from "node:fs";
10
+ import { join as join2 } from "node:path";
11
+
12
+ // packages/agent-runtime/noloStateDir.ts
10
13
  import { homedir } from "node:os";
11
14
  import { join } from "node:path";
15
+ function resolveNoloStateDir(name, homeDir) {
16
+ if (homeDir) return join(homeDir, ".nolo", name);
17
+ const noloHome = process.env.NOLO_HOME?.trim();
18
+ return noloHome ? join(noloHome, name) : join(homedir(), ".nolo", name);
19
+ }
20
+
21
+ // packages/agent-runtime/oauthTokenStore.ts
12
22
  var DEFAULT_REFRESH_SKEW_MS = 5 * 60 * 1e3;
13
- function getCredentialsDir(homeDir = homedir()) {
14
- return join(homeDir, ".nolo", "credentials");
23
+ function getCredentialsDir(homeDir) {
24
+ return resolveNoloStateDir("credentials", homeDir);
15
25
  }
16
- function getCredentialPath(provider, homeDir = homedir()) {
17
- return join(getCredentialsDir(homeDir), `${provider}.json`);
26
+ function getCredentialPath(provider, homeDir) {
27
+ return join2(getCredentialsDir(homeDir), `${provider}.json`);
18
28
  }
19
29
  function ensurePrivateDir(dir) {
20
30
  mkdirSync(dir, { recursive: true, mode: 448 });
@@ -30,7 +40,7 @@ function writePrivateFile(path, body) {
30
40
  } catch {
31
41
  }
32
42
  }
33
- function readOAuthCredential(provider, homeDir = homedir()) {
43
+ function readOAuthCredential(provider, homeDir) {
34
44
  const path = getCredentialPath(provider, homeDir);
35
45
  if (!existsSync(path)) return null;
36
46
  const raw = readFileSync(path, "utf8");
@@ -42,18 +52,18 @@ function readOAuthCredential(provider, homeDir = homedir()) {
42
52
  return null;
43
53
  }
44
54
  }
45
- function writeOAuthCredential(provider, credential, homeDir = homedir()) {
55
+ function writeOAuthCredential(provider, credential, homeDir) {
46
56
  const path = getCredentialPath(provider, homeDir);
47
57
  ensurePrivateDir(getCredentialsDir(homeDir));
48
58
  writePrivateFile(path, `${JSON.stringify(credential, null, 2)}
49
59
  `);
50
60
  }
51
- function removeOAuthCredential(provider, homeDir = homedir()) {
61
+ function removeOAuthCredential(provider, homeDir) {
52
62
  const path = getCredentialPath(provider, homeDir);
53
63
  if (!existsSync(path)) return;
54
64
  unlinkSync(path);
55
65
  }
56
- function createOAuthTokenStore(homeDir = homedir()) {
66
+ function createOAuthTokenStore(homeDir) {
57
67
  return {
58
68
  read(provider) {
59
69
  return readOAuthCredential(provider, homeDir);
@@ -85,6 +95,7 @@ async function resolveFreshAccessToken(args) {
85
95
  }
86
96
 
87
97
  export {
98
+ resolveNoloStateDir,
88
99
  getCredentialsDir,
89
100
  readOAuthCredential,
90
101
  writeOAuthCredential,
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-XLLTJXAD.js";
3
+ } from "./chunk-LAUUAYLK.js";
4
4
  import {
5
5
  prepareAndPersistMessage,
6
6
  uiAskChoiceFunc,
7
7
  uiAskChoiceFunctionSchema
8
- } from "./chunk-BXPBZVRE.js";
8
+ } from "./chunk-DX6BP4K7.js";
9
9
  import {
10
10
  require_date_fns
11
11
  } from "./chunk-M76ECQRD.js";
12
12
  import {
13
13
  TOOL_PACKS
14
- } from "./chunk-WLH5BAKX.js";
14
+ } from "./chunk-IIOHYLIG.js";
15
15
  import {
16
16
  buildSkillDocMarkdown
17
17
  } from "./chunk-AETZ7AD6.js";
@@ -19,14 +19,14 @@ import {
19
19
  PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
20
20
  PLATFORM_HOSTED_DEEPSEEK_FLASH_PEAK_PRICE,
21
21
  PLATFORM_HOSTED_KIMI_PROVIDER
22
- } from "./chunk-OR2HNLVO.js";
22
+ } from "./chunk-X6EN3KJX.js";
23
23
  import {
24
24
  read,
25
25
  readAndWait,
26
26
  removeCachedEntity,
27
27
  upsertSSREntity,
28
28
  write
29
- } from "./chunk-UM4H3URE.js";
29
+ } from "./chunk-23KKIMD5.js";
30
30
  import {
31
31
  createAgentKey,
32
32
  createDialogKey,
@@ -35,25 +35,25 @@ import {
35
35
  dialogMessageRange,
36
36
  memoryOwnerRange,
37
37
  memorySubjectKindRange
38
- } from "./chunk-KMSZPTM6.js";
38
+ } from "./chunk-2WKUUY2E.js";
39
+ import {
40
+ extractCustomId
41
+ } from "./chunk-BJIRLHJR.js";
39
42
  import {
40
43
  selectIdentityUserId
41
- } from "./chunk-X664KVEV.js";
44
+ } from "./chunk-HHBXCRJS.js";
42
45
  import {
43
46
  isDevelopment
44
- } from "./chunk-WJSW43QZ.js";
47
+ } from "./chunk-L3JWI7WX.js";
48
+ import {
49
+ isRecord
50
+ } from "./chunk-KUG52IAP.js";
45
51
  import {
46
52
  asTrimmedString
47
53
  } from "./chunk-3EUW3WEO.js";
48
54
  import {
49
55
  asOptionalPositiveFiniteNumber
50
56
  } from "./chunk-U6VC4MU4.js";
51
- import {
52
- extractCustomId
53
- } from "./chunk-BJIRLHJR.js";
54
- import {
55
- isRecord
56
- } from "./chunk-KUG52IAP.js";
57
57
  import {
58
58
  asOptionalTrimmedString
59
59
  } from "./chunk-G3SUCT4W.js";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-DWLEOOGR.js";
4
4
  import {
5
5
  addContentAction
6
- } from "./chunk-4F5M2MW5.js";
6
+ } from "./chunk-MJWX4JQO.js";
7
7
  import {
8
8
  upload
9
- } from "./chunk-UM4H3URE.js";
9
+ } from "./chunk-23KKIMD5.js";
10
10
  import {
11
11
  getRuntimeServerContext
12
- } from "./chunk-X664KVEV.js";
12
+ } from "./chunk-HHBXCRJS.js";
13
13
  import {
14
14
  API_ENDPOINTS
15
15
  } from "./chunk-LCBAMY2M.js";
@@ -318,6 +318,8 @@ var planContextUsage = (params) => {
318
318
  // packages/ai/context/planCompression.ts
319
319
  var MIN_COMPRESS_COUNT = 5;
320
320
  var ACTIVE_SUMMARY_TAIL_KEEP_COUNT = 2;
321
+ var STUB_KEEP_COUNT = 3;
322
+ var TOOL_STUB_TEXT = "[tool output cleared to save context]";
321
323
  var getMessageTokenCount = (msg) => {
322
324
  const content = serializeMessageContent(msg.content) || "";
323
325
  let tokens = estimateTokenCount(content);
@@ -432,6 +434,45 @@ function calculateCompressCount(pendingMsgs, rawMessageBudget, opts) {
432
434
  }
433
435
  return pendingMsgs.length - keepCount;
434
436
  }
437
+ function tryComputeStubPlan(pendingMsgs, totalUsed, historyBudget, startIndex) {
438
+ const toolIndices = [];
439
+ for (let i = 0; i < pendingMsgs.length; i++) {
440
+ if (pendingMsgs[i].role === "tool") {
441
+ const content = serializeMessageContent(pendingMsgs[i].content) || "";
442
+ if (content !== TOOL_STUB_TEXT) toolIndices.push(i);
443
+ }
444
+ }
445
+ if (toolIndices.length <= STUB_KEEP_COUNT) return null;
446
+ const firstStubbedIdx = toolIndices[toolIndices.length - STUB_KEEP_COUNT - 1];
447
+ const beforeMsg = pendingMsgs[firstStubbedIdx];
448
+ if (!beforeMsg) return null;
449
+ const stubOverhead = estimateTokenCount(TOOL_STUB_TEXT);
450
+ const stubbedMsgs = pendingMsgs.slice(0, firstStubbedIdx + 1).filter(
451
+ (m) => m.role === "tool"
452
+ );
453
+ const originalTokens = stubbedMsgs.reduce(
454
+ (s, m) => s + getMessageTokenCount(m),
455
+ 0
456
+ );
457
+ const savedTokens = Math.max(0, originalTokens - stubOverhead * stubbedMsgs.length);
458
+ if (totalUsed - savedTokens > historyBudget) return null;
459
+ const keptMsgs = pendingMsgs.slice(firstStubbedIdx + 1);
460
+ return {
461
+ shouldCompress: true,
462
+ compressCount: stubbedMsgs.length,
463
+ msgsToCompress: stubbedMsgs,
464
+ msgsToKeep: keptMsgs,
465
+ newSummarizedBeforeId: void 0,
466
+ startIndex,
467
+ stub: {
468
+ // beforeId = 第一条被 stub 的 tool 结果的消息 id;投影端按
469
+ // 「abs index <= beforeId 的 index 的 tool 消息」判定是否 stub。
470
+ beforeId: beforeMsg.id,
471
+ stubbedCount: stubbedMsgs.length,
472
+ savedTokens
473
+ }
474
+ };
475
+ }
435
476
  function guardToolChainBoundary(pendingMsgs, compressCount) {
436
477
  let count = compressCount;
437
478
  while (count > 0 && count < pendingMsgs.length && pendingMsgs[count].role === "tool") {
@@ -479,6 +520,13 @@ function planCompression(input) {
479
520
  lastMsg: pendingMsgs[pendingMsgs.length - 1]
480
521
  });
481
522
  if (!trigger) return emptyPlan(startIndex);
523
+ const stubPlan = tryComputeStubPlan(
524
+ pendingMsgs,
525
+ totalUsed,
526
+ historyBudget,
527
+ startIndex
528
+ );
529
+ if (stubPlan) return stubPlan;
482
530
  let compressCount = calculateCompressCount(pendingMsgs, rawMessageBudget, {
483
531
  keepTailCount: shouldRunActiveSummary || triggeredByRealUsage,
484
532
  totalUsed,
@@ -500,6 +548,7 @@ function planCompression(input) {
500
548
  }
501
549
 
502
550
  // packages/ai/context/compactionShared.ts
551
+ var COMPACTION_SUMMARY_SCHEMA_VERSION = 1;
503
552
  var COMPACTION_SUMMARY_SYSTEM_PROMPT = `\u4F60\u662F\u5BF9\u8BDD\u4E0A\u4E0B\u6587\u538B\u7F29\u5668\u3002\u6839\u636E\u3010\u73B0\u6709\u8BB0\u5FC6\u3011\u548C\u3010\u65B0\u589E\u5BF9\u8BDD\u3011\uFF0C\u8F93\u51FA\u53EF\u66FF\u4EE3\u539F\u59CB\u6D88\u606F\u7684\u4E8B\u5B9E\u6027\u8981\u70B9\uFF0C\u4F9B\u540E\u7EED\u5BF9\u8BDD\u76F4\u63A5\u4F7F\u7528\u3002
504
553
 
505
554
  \u4E25\u683C\u53EA\u8F93\u51FA\u4E0B\u9762\u4E09\u90E8\u5206\uFF0C\u6807\u9898\u5FC5\u987B\u5B8C\u5168\u4E00\u81F4\uFF1A
@@ -666,7 +715,9 @@ export {
666
715
  buildDatabaseFileContentUrl,
667
716
  serializeMessageContent,
668
717
  normalizeAssistantContentBuffer,
718
+ TOOL_STUB_TEXT,
669
719
  planCompression,
720
+ COMPACTION_SUMMARY_SCHEMA_VERSION,
670
721
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
671
722
  buildCompactionUserContent,
672
723
  formatFileOperationsFromMessages,
@@ -1,39 +1,44 @@
1
1
  import {
2
2
  cloudflareModels,
3
- deepinfraModels,
4
- fireworksModels,
5
3
  gmiModels,
6
- googleModels,
7
- openAIModels,
8
4
  openrouterModels,
9
5
  platformHostedModels,
10
- xaiModels,
11
6
  zaiModels
12
- } from "./chunk-OR2HNLVO.js";
7
+ } from "./chunk-X6EN3KJX.js";
13
8
 
14
9
  // packages/ai/llm/modelAbility.ts
15
10
  var MODEL_ABILITY_TABLE = {
16
- "claude-opus-5": { passAt1: 74, benchmarkScore: 61 },
17
- "gpt-5.6-sol": { passAt1: 73, benchmarkScore: 59 },
11
+ "claude-opus-5": { passAt1: 74, benchmarkScore: 61, writingScore: 82 },
12
+ "claude-opus-4-6": { passAt1: 65, benchmarkScore: 68, writingScore: 78 },
13
+ "gpt-5.6-sol": { passAt1: 73, benchmarkScore: 59, writingScore: 80 },
18
14
  "claude-fable-5": { passAt1: 70 },
19
15
  "gpt-5.6-terra": { passAt1: 70, benchmarkScore: 55 },
20
- "kimi-k3": { passAt1: 69, benchmarkScore: 57 },
16
+ "kimi-k3": { passAt1: 69, benchmarkScore: 57, writingScore: 81 },
21
17
  "gpt-5.5": { passAt1: 67 },
22
18
  "gpt-5.6-luna": { passAt1: 67, benchmarkScore: 51 },
23
19
  "grok-4.6": { passAt1: 67 },
24
- "deepseek-v4-pro": { passAt1: 63 },
25
- "qwen3.8-max": { passAt1: 57 },
20
+ "deepseek-v4-pro": { passAt1: 63, writingScore: 79 },
21
+ "qwen3.8-max": { passAt1: 57, writingScore: 77 },
26
22
  "muse-spark-1.2": { passAt1: 55 },
27
23
  "grok-4.5": { passAt1: 54, benchmarkScore: 54 },
28
24
  "claude-sonnet-5": { passAt1: 54, benchmarkScore: 53 },
29
25
  "deepseek-v4-flash": { passAt1: 53 },
26
+ "gemini-3.7-flash": { passAt1: 58, benchmarkScore: 65, writingScore: 88 },
30
27
  "muse-spark-1.1": { passAt1: 53 },
31
28
  "gpt-5.4": { passAt1: 52 },
32
29
  "gemini-3.6-flash": { passAt1: 49, benchmarkScore: 50 },
33
30
  "glm-5.3": { passAt1: 52, benchmarkScore: 60 },
34
31
  "glm-5.2": { passAt1: 44, benchmarkScore: 51 }
35
32
  };
36
- var EFFORT_SUFFIXES = ["-extra-low", "-low", "-medium", "-high"];
33
+ var EFFORT_SUFFIXES = [
34
+ "-extra-low",
35
+ "-low",
36
+ "-medium",
37
+ "-high",
38
+ "-thinking",
39
+ "-tiered",
40
+ ":cloud"
41
+ ];
37
42
  function normalizeModelName(raw) {
38
43
  let name = raw.trim().toLowerCase();
39
44
  const slash = name.indexOf("/");
@@ -55,12 +60,7 @@ function getModelAbility(modelName) {
55
60
  var withProvider = (provider) => (models) => models.map((model) => ({ ...model, provider }));
56
61
  var ALL_MODELS = [
57
62
  ...withProvider("nolo")(platformHostedModels),
58
- ...withProvider("google")(googleModels),
59
- ...withProvider("openai")(openAIModels),
60
63
  ...withProvider("openrouter")(openrouterModels),
61
- ...withProvider("xai")(xaiModels),
62
- ...withProvider("deepinfra")(deepinfraModels),
63
- ...withProvider("fireworks")(fireworksModels),
64
64
  ...withProvider("cloudflare")(cloudflareModels),
65
65
  ...withProvider("gmi")(gmiModels),
66
66
  ...withProvider("zai")(zaiModels)
@@ -194,7 +194,7 @@ function readCliAuthorityDriver(env) {
194
194
  function resolveCliAuthorityRunDir(options = {}) {
195
195
  return path.join(resolveNoloHome({
196
196
  ...options,
197
- env: options.env ?? {}
197
+ env: options.env ?? process.env
198
198
  }), "run");
199
199
  }
200
200
  function hashString(value) {
@@ -2,7 +2,7 @@ import {
2
2
  isOpenAiResponsesModel,
3
3
  resolvePlatformChatCompletionsEndpoint,
4
4
  resolvePlatformResponsesEndpoint
5
- } from "./chunk-CPYYM4RJ.js";
5
+ } from "./chunk-V5GA74HI.js";
6
6
  import {
7
7
  asTrimmedLowercaseString
8
8
  } from "./chunk-QSJ3HFEF.js";
@@ -1,9 +1,12 @@
1
1
  import {
2
2
  isOAuthApiKeyRef
3
3
  } from "./chunk-YYLHWIW6.js";
4
+ import {
5
+ compareAgentSelection
6
+ } from "./chunk-IZCHPD7T.js";
4
7
  import {
5
8
  getModelAbility
6
- } from "./chunk-2QTEYCR7.js";
9
+ } from "./chunk-FTM4KUOZ.js";
7
10
  import {
8
11
  isOwnedAgentKey,
9
12
  ownedAgentKey,
@@ -152,40 +155,10 @@ function toSafeAgentSummary(record, options) {
152
155
  };
153
156
  }
154
157
  function sortSafeAgentSummaries(agents) {
155
- return [...agents].sort((left, right) => {
156
- const isUserConfigured = (agent) => agent.isOAuth === true || agent.isOwned === true && agent.apiSource === "custom";
157
- const priority = (agent) => {
158
- const favorite = agent.isFavorite === true;
159
- const configured = isUserConfigured(agent);
160
- if (favorite && configured) return 0;
161
- if (favorite) return 1;
162
- if (configured) return 2;
163
- if (agent.isOwned === true) return 3;
164
- return 4;
165
- };
166
- const priorityDiff = priority(left) - priority(right);
167
- if (priorityDiff !== 0) return priorityDiff;
168
- const leftFav = left.isFavorite === true;
169
- const rightFav = right.isFavorite === true;
170
- if (leftFav && rightFav) {
171
- const leftFavAt = parseTimestamp(left.favoritedAt);
172
- const rightFavAt = parseTimestamp(right.favoritedAt);
173
- if (leftFavAt !== rightFavAt) return rightFavAt - leftFavAt;
174
- }
175
- const leftUpdated = parseTimestamp(left.updatedAt ?? left.createdAt);
176
- const rightUpdated = parseTimestamp(right.updatedAt ?? right.createdAt);
177
- return rightUpdated - leftUpdated;
178
- });
179
- }
180
-
181
- // packages/ai/agent/agentAvailabilityShared.ts
182
- function isAgentUnavailableNow(agent, now = Date.now()) {
183
- const at = agent?.nextAvailableAt;
184
- return typeof at === "number" && Number.isFinite(at) && at > now;
158
+ return [...agents].sort(compareAgentSelection);
185
159
  }
186
160
 
187
161
  export {
188
162
  toSafeAgentSummary,
189
- sortSafeAgentSummaries,
190
- isAgentUnavailableNow
163
+ sortSafeAgentSummaries
191
164
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildLocalAgentLookupKeys,
3
3
  shouldReadAgentKeyRemotely
4
- } from "./chunk-X2DAEZ3X.js";
4
+ } from "./chunk-J5NMOM35.js";
5
5
  import {
6
6
  resolveCliAgentKeyInput
7
7
  } from "./chunk-EKLRRZIN.js";
@@ -21,7 +21,7 @@ import {
21
21
  } from "./chunk-A7GB5UGH.js";
22
22
  import {
23
23
  createAgentKey
24
- } from "./chunk-KMSZPTM6.js";
24
+ } from "./chunk-2WKUUY2E.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,13 +1,13 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-BQ3OHLR5.js";
4
+ } from "./chunk-6KYCG5GW.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
- } from "./chunk-ZZ2MH7LE.js";
7
+ } from "./chunk-O6OSWFZQ.js";
8
8
  import {
9
9
  isNoloHostedProvider
10
- } from "./chunk-OR2HNLVO.js";
10
+ } from "./chunk-X6EN3KJX.js";
11
11
  import {
12
12
  asTrimmedLowercaseString
13
13
  } from "./chunk-QSJ3HFEF.js";