nolo-cli 0.8.0-alpha.21 → 0.8.0-alpha.23

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 (112) hide show
  1. package/{_executeModel-42U3VOVZ.js → _executeModel-YXTTYRXS.js} +44 -43
  2. package/{action-TLI3V62L.js → action-QM2ONPYZ.js} +9 -9
  3. package/{addContentAction-57RSIIMR.js → addContentAction-UXY3GM53.js} +8 -8
  4. package/{addDialogAgentAction-G3VWEA6E.js → addDialogAgentAction-MUBYOG65.js} +10 -10
  5. package/{agentDeleteCommand-5DD2IM3J.js → agentDeleteCommand-4NO7Y6UI.js} +28 -27
  6. package/{agentEmailCommands-6FACJBU4.js → agentEmailCommands-NPP5TGZV.js} +60 -58
  7. package/{agentListCommands-I6KZYCIG.js → agentListCommands-IP5BNB5W.js} +32 -30
  8. package/{agentMachineCommands-VKLIGMZA.js → agentMachineCommands-24NFTIKY.js} +27 -26
  9. package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-N6UWRTVL.js} +3 -3
  10. package/{agentRecordCommands-7TZICYDT.js → agentRecordCommands-7AWSR46F.js} +51 -49
  11. package/{agentRunCommand-L4OM23KV.js → agentRunCommand-P46WCJ6P.js} +55 -52
  12. package/{agentRunControl-K4VKNEHF.js → agentRunControl-S3G62M6C.js} +3 -3
  13. package/{agentRuntimeLocal-ZYEIPTY4.js → agentRuntimeLocal-V5UV7S4R.js} +14 -12
  14. package/{agentSlice-BX7GXSNO.js → agentSlice-3CVAZZOP.js} +9 -9
  15. package/{authCommand-EB5JSOX5.js → authCommand-B6P2XYLN.js} +11 -11
  16. package/{authCommands-XPEHTKSM.js → authCommands-4YKA4GTU.js} +7 -7
  17. package/{chunk-AS4PVWA4.js → chunk-2CVZSC5L.js} +1 -1
  18. package/{chunk-VUW5FBDB.js → chunk-4VA3UQRF.js} +9 -9
  19. package/{chunk-2JCXITPK.js → chunk-5NYGMN4O.js} +15 -15
  20. package/{chunk-AGFH73SK.js → chunk-6KRA6AWI.js} +1 -1
  21. package/{chunk-P3PKED2I.js → chunk-6OHYC4BY.js} +9 -12
  22. package/{chunk-5KLGBAAR.js → chunk-6UUD2WES.js} +1 -1
  23. package/{chunk-ENOG22KJ.js → chunk-A4MYG3TR.js} +18 -20
  24. package/{chunk-2FTTDCD4.js → chunk-AMJ7LA5D.js} +1 -1
  25. package/chunk-AOKWJZ5N.js +4884 -0
  26. package/{chunk-JRKKFRAV.js → chunk-AWY2AFHN.js} +9 -5
  27. package/{chunk-RL776AGR.js → chunk-BB2PII22.js} +1 -1
  28. package/{chunk-I6XMPTMR.js → chunk-BFDWXLFF.js} +2 -2
  29. package/{chunk-VVX233PH.js → chunk-BT37DVDA.js} +9 -9
  30. package/chunk-BYXBJQAS.js +0 -0
  31. package/{chunk-C3RUNRHT.js → chunk-D55DXHXL.js} +1 -1
  32. package/{chunk-7DAJ4AI4.js → chunk-DSNLHTP3.js} +2 -2
  33. package/{chunk-SDJDLO5W.js → chunk-EUN3SYY7.js} +5 -5
  34. package/{chunk-FSO5B7GH.js → chunk-HAC6GPRE.js} +2 -2
  35. package/{chunk-CKOJQDKR.js → chunk-JEMATI63.js} +1 -1
  36. package/{chunk-7U44LYTR.js → chunk-JTINRTBT.js} +1 -1
  37. package/{chunk-YPRZSPF3.js → chunk-KLOCUWKZ.js} +1 -1
  38. package/{chunk-4O3CARJ4.js → chunk-KTHLAJEY.js} +1 -1
  39. package/{chunk-URUUZLPA.js → chunk-L3KWEH3V.js} +8 -8
  40. package/{chunk-O2ZNTTET.js → chunk-LBUTKV7S.js} +21 -12
  41. package/{chunk-GU3PEVGZ.js → chunk-LFFATN2M.js} +2632 -1578
  42. package/{chunk-UB6SN4NJ.js → chunk-LJCH34R2.js} +6 -6
  43. package/{chunk-5EFXE3O7.js → chunk-LTH6AVG7.js} +3 -3
  44. package/{chunk-7GNGZRLZ.js → chunk-LW6FJFCT.js} +45 -67
  45. package/{chunk-7KCUSYT2.js → chunk-MIQOUMSN.js} +7 -7
  46. package/{chunk-FVYY6MCS.js → chunk-O7VS7JLJ.js} +17 -17
  47. package/{chunk-RCSJFQPB.js → chunk-P7GAHW32.js} +361 -90
  48. package/{chunk-AL2KDGR2.js → chunk-PTT6KSYQ.js} +134 -84
  49. package/{chunk-4IJYA27C.js → chunk-PXZAAB4L.js} +4 -4
  50. package/{chunk-4XENYTF5.js → chunk-Q2WC4KGQ.js} +3 -3
  51. package/{chunk-4QEWT7KD.js → chunk-RBB43B5W.js} +367 -85
  52. package/chunk-RBCENBG7.js +36 -0
  53. package/{chunk-IWX4UW2E.js → chunk-RBCNBU2A.js} +88 -8
  54. package/{chunk-25LCXTML.js → chunk-RQPZX6KP.js} +2 -2
  55. package/{chunk-6KHNO3SK.js → chunk-RYMUT5JO.js} +23 -23
  56. package/{chunk-VX3SXJ3N.js → chunk-UBSKX3LP.js} +6 -6
  57. package/{chunk-4ZDM73SD.js → chunk-V2J635L5.js} +1 -1
  58. package/{chunk-DSZUWUYB.js → chunk-VBKJTOAW.js} +1 -1
  59. package/{chunk-XBUBEFNX.js → chunk-WESWWEVA.js} +1 -1
  60. package/{chunk-2ECQG4YX.js → chunk-ZAUDEKML.js} +253 -159
  61. package/{chunk-N54XAP77.js → chunk-ZJS64PZJ.js} +1 -1
  62. package/{createAgentAutomationAction-RJF3N2QY.js → createAgentAutomationAction-DYQOGAVE.js} +25 -24
  63. package/{createDialogAction-DRSPS6CE.js → createDialogAction-ETB3KQQE.js} +25 -24
  64. package/{createPageAction-6B2WMNO3.js → createPageAction-UF2RHA63.js} +25 -24
  65. package/{dbSlice-Q3TM2FJV.js → dbSlice-R5EJKZBW.js} +7 -7
  66. package/{deleteFile-OW53A6BX.js → deleteFile-WPWVZE4B.js} +5 -5
  67. package/{dialogCommands-4IX4XIZE.js → dialogCommands-LYYC7XHF.js} +23 -22
  68. package/{dialogSlice-3M7KX2TX.js → dialogSlice-IFBZ4IT2.js} +24 -23
  69. package/{docCreateCommands-SIL3NPGT.js → docCreateCommands-I66OI374.js} +22 -21
  70. package/{docDeleteCommands-7IOMLUS4.js → docDeleteCommands-OVRBCHMF.js} +23 -22
  71. package/{docReadCommands-FNFXUA5L.js → docReadCommands-YLWUMEH7.js} +22 -21
  72. package/{docStore-SV7E34D4.js → docStore-65WO7U36.js} +24 -23
  73. package/{docUpdateCommands-X2HNDVUC.js → docUpdateCommands-NSICS4IN.js} +22 -21
  74. package/fetchMessages-KTNM7QAR.js +1 -1
  75. package/{getPricing-3E6UNPKL.js → getPricing-7PUT44ZS.js} +7 -3
  76. package/{handleSendMessageAction-JYETO5RZ.js → handleSendMessageAction-T76HEDOP.js} +29 -28
  77. package/index.js +74 -74
  78. package/{localDialogRead-2VRI24F4.js → localDialogRead-YSKFFRTT.js} +1 -1
  79. package/{machineCommands-RIO3RP5Q.js → machineCommands-4HQY6UVZ.js} +57 -55
  80. package/{machineWsRunDispatch-W7UYLGB5.js → machineWsRunDispatch-7YW2M4FS.js} +49 -47
  81. package/{memoryCommands-O4MIPIWQ.js → memoryCommands-HG4WKTU7.js} +2 -2
  82. package/{models-4OPOOLFS.js → models-MFXNI3TF.js} +2 -2
  83. package/package.json +1 -1
  84. package/{read-GW7ZEI23.js → read-5ZMY7FKP.js} +5 -5
  85. package/{readDocTool-HUFU6OCT.js → readDocTool-2NXDK32S.js} +1 -1
  86. package/{readlineWorkspace-27JR7WPW.js → readlineWorkspace-FLQWOAUR.js} +759 -604
  87. package/{removeDialogAgentAction-CXKR4NJI.js → removeDialogAgentAction-KOLQ2R5W.js} +13 -12
  88. package/{runAgentClientLoop-HZFAPJHS.js → runAgentClientLoop-IUV2TR3X.js} +43 -42
  89. package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-UWR5UDSM.js} +5 -5
  90. package/{setDialogExtraReferencesAction-6RKUSXHX.js → setDialogExtraReferencesAction-OMTEO7X6.js} +10 -10
  91. package/{setPrimaryDialogAgentAction-T3UTBEFG.js → setPrimaryDialogAgentAction-DOCIS6V4.js} +13 -12
  92. package/{settingSlice-IVKXJXMG.js → settingSlice-UWZJYDOA.js} +8 -8
  93. package/{spaceCommands-E7VOF4LO.js → spaceCommands-BDDAT4VU.js} +29 -28
  94. package/{spaceSlice-TSVROA5U.js → spaceSlice-HH633ZA4.js} +23 -22
  95. package/{streamAgentChatTurn-3C5RQZJF.js → streamAgentChatTurn-UBZOVFKV.js} +95 -72
  96. package/{tableCommands-O7O2LBEG.js → tableCommands-M3DJUETS.js} +10 -10
  97. package/{toolApiClient-QI3YBNWB.js → toolApiClient-C7P7YSE4.js} +2 -2
  98. package/{tools-EQDEKR6N.js → tools-OQZ34KCU.js} +31 -30
  99. package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-42AEL3LL.js} +8 -6
  100. package/{updateCommands-VOSPKXFF.js → updateCommands-TC5SX42Y.js} +3 -3
  101. package/{updateDialogTitleAction-3XV7VWSZ.js → updateDialogTitleAction-A3OOMSDO.js} +27 -26
  102. package/chunk-BBYVOSU2.js +0 -792
  103. package/chunk-DCOA4QSN.js +0 -105
  104. package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
  105. package/{chunk-EHLHSX7R.js → chunk-5MMZUWSG.js} +3 -3
  106. package/{chunk-ISNCLGUZ.js → chunk-AVMJVOQY.js} +3 -3
  107. package/{chunk-UTLZINAP.js → chunk-DVRHHFEA.js} +10 -10
  108. package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
  109. package/{chunk-5MIDPSSK.js → chunk-JK7VW2FN.js} +3 -3
  110. package/{chunk-TILFE6LV.js → chunk-YOCHZD7D.js} +3 -3
  111. package/{db-HCJ5PRB5.js → db-6QED3ZVO.js} +3 -3
  112. package/{understanding-3CUQQ6SV.js → understanding-ZOESBLF3.js} +3 -3
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-BBYVOSU2.js";
3
+ } from "./chunk-AOKWJZ5N.js";
4
4
  import {
5
5
  asTrimmedLowercaseString
6
6
  } from "./chunk-QSJ3HFEF.js";
7
7
  import {
8
8
  asTrimmedString
9
9
  } from "./chunk-3EUW3WEO.js";
10
+ import {
11
+ isRecord
12
+ } from "./chunk-KUG52IAP.js";
10
13
  import {
11
14
  normalizeServerOrigin
12
15
  } from "./chunk-CF7PE763.js";
13
16
  import {
14
17
  asOptionalTrimmedString
15
18
  } from "./chunk-G3SUCT4W.js";
16
- import {
17
- isRecord
18
- } from "./chunk-KUG52IAP.js";
19
19
 
20
20
  // packages/agent-runtime/agentConfigOptions.ts
21
21
  function pickAgentRuntimeInferenceOptions(agentConfig) {
@@ -56,10 +56,14 @@ function isOpenAiResponsesModel(args) {
56
56
  return false;
57
57
  }
58
58
  }
59
+ var PLATFORM_PROVIDER_ENDPOINT_ALIASES = {
60
+ "ollama-cloud": "nolo"
61
+ };
59
62
  function resolvePlatformChatCompletionsEndpoint(provider) {
60
63
  const key = asTrimmedLowercaseString(provider);
61
64
  if (!key) return void 0;
62
- return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS[key];
65
+ const aliased = PLATFORM_PROVIDER_ENDPOINT_ALIASES[key] ?? key;
66
+ return PLATFORM_CHAT_COMPLETIONS_ENDPOINTS[aliased];
63
67
  }
64
68
 
65
69
  // packages/agent-runtime/providerResolution.ts
@@ -2,7 +2,7 @@ import {
2
2
  deleteDbRecord,
3
3
  queryUserRecords,
4
4
  readDbRecord
5
- } from "./chunk-SDJDLO5W.js";
5
+ } from "./chunk-EUN3SYY7.js";
6
6
  import {
7
7
  mergeAndDedupUserData
8
8
  } from "./chunk-KQHGZWSV.js";
@@ -4,12 +4,12 @@ import {
4
4
  import {
5
5
  patch,
6
6
  read
7
- } from "./chunk-URUUZLPA.js";
7
+ } from "./chunk-L3KWEH3V.js";
8
8
  import {
9
9
  DEVICE_LOCAL_OWNER_ID,
10
10
  isDeviceLocalSpaceBody,
11
11
  selectIdentityUserId
12
- } from "./chunk-UTLZINAP.js";
12
+ } from "./chunk-DVRHHFEA.js";
13
13
 
14
14
  // packages/create/space/utils/permissions.ts
15
15
  var checkSpaceMembership = (spaceData, userId) => {
@@ -9,15 +9,6 @@ import {
9
9
  loadProfileConfig,
10
10
  saveDefaultProfile
11
11
  } from "./chunk-ROWQEJRP.js";
12
- import {
13
- resolveAuthTokenFromEnv
14
- } from "./chunk-ISNCLGUZ.js";
15
- import {
16
- DEFAULT_NOLO_SERVER_URL
17
- } from "./chunk-OLZBQWZU.js";
18
- import {
19
- getDefaultCliLocalRuntimeDb
20
- } from "./chunk-H33743XH.js";
21
12
  import {
22
13
  createMemoryKey,
23
14
  createMemoryOwnerIndexKey,
@@ -27,6 +18,15 @@ import {
27
18
  import {
28
19
  asTrimmedNonEmptyStringArray
29
20
  } from "./chunk-I42VC5KR.js";
21
+ import {
22
+ resolveAuthTokenFromEnv
23
+ } from "./chunk-AVMJVOQY.js";
24
+ import {
25
+ DEFAULT_NOLO_SERVER_URL
26
+ } from "./chunk-OLZBQWZU.js";
27
+ import {
28
+ getDefaultCliLocalRuntimeDb
29
+ } from "./chunk-H33743XH.js";
30
30
  import {
31
31
  asTrimmedString
32
32
  } from "./chunk-3EUW3WEO.js";
File without changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  trimTrailingSlash
3
- } from "./chunk-JRKKFRAV.js";
3
+ } from "./chunk-AWY2AFHN.js";
4
4
  import {
5
5
  asTrimmedLowercaseString
6
6
  } from "./chunk-QSJ3HFEF.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-RL776AGR.js";
4
+ } from "./chunk-BB2PII22.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-SDJDLO5W.js";
7
+ } from "./chunk-EUN3SYY7.js";
8
8
 
9
9
  // packages/cli/agentListHelpers.ts
10
10
  function parseAgentRecordId(privateKey, explicitId) {
@@ -2,7 +2,7 @@ import {
2
2
  buildLocalAgentLookupKeys,
3
3
  normalizeAgentHandle,
4
4
  shouldReadAgentKeyRemotely
5
- } from "./chunk-N54XAP77.js";
5
+ } from "./chunk-ZJS64PZJ.js";
6
6
  import {
7
7
  resolveCliAgentKeyInput
8
8
  } from "./chunk-VHBWHNVT.js";
@@ -10,19 +10,19 @@ import {
10
10
  readPipeText,
11
11
  spawnProcess
12
12
  } from "./chunk-IDZTNRP2.js";
13
+ import {
14
+ createAgentKey
15
+ } from "./chunk-O4BU24WZ.js";
13
16
  import {
14
17
  parseUserIdFromAuthToken,
15
18
  readOption,
16
19
  resolveAuthToken,
17
20
  resolveServerCandidates,
18
21
  resolveServerUrl
19
- } from "./chunk-ISNCLGUZ.js";
22
+ } from "./chunk-AVMJVOQY.js";
20
23
  import {
21
24
  toErrorMessage
22
25
  } from "./chunk-HNMXYYJR.js";
23
- import {
24
- createAgentKey
25
- } from "./chunk-O4BU24WZ.js";
26
26
 
27
27
  // packages/cli/agentRecordHelpers.ts
28
28
  import { readFileSync } from "node:fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-AL2KDGR2.js";
4
+ } from "./chunk-PTT6KSYQ.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
- } from "./chunk-P3PKED2I.js";
7
+ } from "./chunk-6OHYC4BY.js";
8
8
  import {
9
9
  asTrimmedLowercaseString
10
10
  } from "./chunk-QSJ3HFEF.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-IDZTNRP2.js";
7
7
  import {
8
8
  isCompiledBinary
9
- } from "./chunk-ISNCLGUZ.js";
9
+ } from "./chunk-AVMJVOQY.js";
10
10
  import {
11
11
  DEFAULT_NOLO_SERVER_URL
12
12
  } from "./chunk-OLZBQWZU.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-UTLZINAP.js";
4
+ } from "./chunk-DVRHHFEA.js";
5
5
  import {
6
6
  fetchFromClientDb
7
7
  } from "./chunk-OOSFSFMA.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-CWMSB67P.js";
7
7
  import {
8
8
  getModelConfig
9
- } from "./chunk-BBYVOSU2.js";
9
+ } from "./chunk-AOKWJZ5N.js";
10
10
  import {
11
11
  asOptionalFiniteNumber
12
12
  } from "./chunk-WWC7I6TA.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DEFAULT_AGENT_BASE_POLICY,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE
4
- } from "./chunk-VX3SXJ3N.js";
4
+ } from "./chunk-UBSKX3LP.js";
5
5
 
6
6
  // packages/ai/policy/runtimePolicy.ts
7
7
  var clampLevel = (value, fallback) => {
@@ -5,7 +5,7 @@ import {
5
5
  loadFileFromIndexedDb,
6
6
  removeAction,
7
7
  saveFileToIndexedDb
8
- } from "./chunk-7U44LYTR.js";
8
+ } from "./chunk-JTINRTBT.js";
9
9
  import {
10
10
  fileKey,
11
11
  getFileIdFromKey,
@@ -15,7 +15,7 @@ import {
15
15
  readAction,
16
16
  readRequestManager,
17
17
  resolveAgentReadServers
18
- } from "./chunk-DSZUWUYB.js";
18
+ } from "./chunk-VBKJTOAW.js";
19
19
  import {
20
20
  asyncThunkCreator,
21
21
  buildCreateSlice,
@@ -35,7 +35,7 @@ import {
35
35
  shouldReplaceLocalWithRemoteRecord,
36
36
  shouldReplicateLocalRecord,
37
37
  uploadToCurrentServer
38
- } from "./chunk-UTLZINAP.js";
38
+ } from "./chunk-DVRHHFEA.js";
39
39
  import {
40
40
  fetchFromClientDb,
41
41
  fetchFromServer,
@@ -45,12 +45,12 @@ import {
45
45
  import {
46
46
  isTombstoneRecord
47
47
  } from "./chunk-GBRG75BQ.js";
48
- import {
49
- API_ENDPOINTS
50
- } from "./chunk-LCBAMY2M.js";
51
48
  import {
52
49
  isRecord
53
50
  } from "./chunk-KUG52IAP.js";
51
+ import {
52
+ API_ENDPOINTS
53
+ } from "./chunk-LCBAMY2M.js";
54
54
 
55
55
  // packages/database/actions/readAndWait.ts
56
56
  var hashTokenScope = (currentToken) => {
@@ -674,7 +674,7 @@ var dbSlice = createSliceWithThunks({
674
674
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
675
675
  read: create.asyncThunk(
676
676
  async (payload, thunkApi) => {
677
- const { readAction: readAction2 } = await import("./read-GW7ZEI23.js");
677
+ const { readAction: readAction2 } = await import("./read-5ZMY7FKP.js");
678
678
  return readAction2(payload, thunkApi);
679
679
  },
680
680
  {
@@ -748,7 +748,7 @@ var dbSlice = createSliceWithThunks({
748
748
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
749
749
  share: create.asyncThunk(
750
750
  async (config, thunkApi) => {
751
- const { shareResourceAction } = await import("./action-TLI3V62L.js");
751
+ const { shareResourceAction } = await import("./action-QM2ONPYZ.js");
752
752
  return shareResourceAction(config, thunkApi);
753
753
  }
754
754
  ),
@@ -5,10 +5,10 @@ import {
5
5
  readSseFrames,
6
6
  throwIfChatCompletionStreamFailed,
7
7
  toOpenAiCompatibleMessages
8
- } from "./chunk-5KLGBAAR.js";
8
+ } from "./chunk-6UUD2WES.js";
9
9
  import {
10
10
  parseToolArgumentsJson
11
- } from "./chunk-4QEWT7KD.js";
11
+ } from "./chunk-RBB43B5W.js";
12
12
  import {
13
13
  createThinkParserState,
14
14
  extractThinkContent
@@ -16,15 +16,12 @@ import {
16
16
  import {
17
17
  buildProviderAuthHeaders,
18
18
  buildProviderExecutionPlan
19
- } from "./chunk-JRKKFRAV.js";
19
+ } from "./chunk-AWY2AFHN.js";
20
20
  import {
21
21
  canonicalizeToolName,
22
22
  createGlob,
23
23
  resolveExecutableOnPath
24
- } from "./chunk-P3PKED2I.js";
25
- import {
26
- toErrorMessage
27
- } from "./chunk-HNMXYYJR.js";
24
+ } from "./chunk-6OHYC4BY.js";
28
25
  import {
29
26
  asRecordOrEmpty
30
27
  } from "./chunk-KX6YBIHG.js";
@@ -40,21 +37,24 @@ import {
40
37
  import {
41
38
  asTrimmedLowercaseString
42
39
  } from "./chunk-QSJ3HFEF.js";
40
+ import {
41
+ toErrorMessage
42
+ } from "./chunk-HNMXYYJR.js";
43
43
  import {
44
44
  asTrimmedString
45
45
  } from "./chunk-3EUW3WEO.js";
46
46
  import {
47
47
  asOptionalPositiveFiniteNumber
48
48
  } from "./chunk-U6VC4MU4.js";
49
+ import {
50
+ isRecord
51
+ } from "./chunk-KUG52IAP.js";
49
52
  import {
50
53
  normalizeServerOrigin
51
54
  } from "./chunk-CF7PE763.js";
52
55
  import {
53
56
  asOptionalTrimmedString
54
57
  } from "./chunk-G3SUCT4W.js";
55
- import {
56
- isRecord
57
- } from "./chunk-KUG52IAP.js";
58
58
 
59
59
  // packages/agent-runtime/kimiUserAgent.ts
60
60
  var KIMI_CODE_CLI_VERSION = "0.29.2";
@@ -389,6 +389,7 @@ function dialogMessageRecordToAgentRuntimeMessage(record) {
389
389
  return {
390
390
  role: record.role,
391
391
  content: record.content ?? "",
392
+ ...record.contextReference !== void 0 ? { context_reference: record.contextReference } : {},
392
393
  ...typeof record.reasoning_content === "string" ? { reasoning_content: record.reasoning_content } : {},
393
394
  ...typeof record.toolCallId === "string" ? { tool_call_id: record.toolCallId } : {},
394
395
  ...Array.isArray(record.tool_calls) ? { tool_calls: record.tool_calls } : {},
@@ -469,6 +470,7 @@ function buildDialogMessageWriteOps(args) {
469
470
  dialogId: args.dialogId,
470
471
  role: message.role,
471
472
  content: message.content ?? "",
473
+ ...message.context_reference !== void 0 ? { contextReference: message.context_reference } : {},
472
474
  // 持久化思维链(reasoning):空轮/异常排查的关键证据,
473
475
  // 回读由 dialogMessageRecordToAgentRuntimeMessage 还原。
474
476
  ...typeof message.reasoning_content === "string" ? { reasoning_content: message.reasoning_content } : {},
@@ -878,7 +880,14 @@ var DEFAULT_LOCAL_TOOLS = /* @__PURE__ */ new Set([
878
880
  "searchFiles",
879
881
  "execShell",
880
882
  "launchProcess",
881
- "listProcesses"
883
+ "listProcesses",
884
+ // Scheduling tools: forking/observing sub-agents is a declared capability
885
+ // of capable agents, and the blast radius is strictly narrower than
886
+ // execShell (already default-enabled). Requiring an env allowlist for these
887
+ // while execShell is open by default inverted the risk model and forced every
888
+ // new local user to hand-edit .env files before sub-agent tasks worked.
889
+ "startAgentRun",
890
+ "controlAgentRun"
882
891
  ]);
883
892
  function parseToolAllowlist(value) {
884
893
  return (value ?? "").split(",").flatMap((item) => {
@@ -951,7 +960,7 @@ function resolveLocalToolPolicy(args) {
951
960
  return {
952
961
  allowed: false,
953
962
  toolName,
954
- reason: `${toolName} is not enabled for local runtime runs. Set NOLO_LOCAL_ALLOWED_TOOLS and make sure the agent declares the tool before using it locally.`
963
+ reason: `${toolName} is not enabled for local runtime runs. The agent must declare the tool in its manifest; in restricted mode (NOLO_LOCAL_TOOL_MODE=restricted) non-default tools also require adding to NOLO_LOCAL_ALLOWED_TOOLS (e.g. NOLO_LOCAL_ALLOWED_TOOLS=someCustomTool) and restarting the session so the env var loads.`
955
964
  };
956
965
  }
957
966
  async function executeLocalToolWithPolicy(args) {