nolo-cli 0.97.6 → 0.97.8

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 (97) hide show
  1. package/{_executeModel-E64QIKWF.js → _executeModel-V7RANMQR.js} +25 -25
  2. package/{addContentAction-DX6T34JR.js → addContentAction-RBOUD7SJ.js} +5 -5
  3. package/{addDialogAgentAction-6SGG37BF.js → addDialogAgentAction-IODCR6TB.js} +4 -4
  4. package/{agentDeleteCommand-76VXVM3N.js → agentDeleteCommand-CF65LJO2.js} +15 -15
  5. package/{agentEmailCommands-URGNKPPJ.js → agentEmailCommands-HBNZIE5Q.js} +29 -29
  6. package/{agentListCommands-62NGDFOS.js → agentListCommands-5EFAYZ5B.js} +16 -16
  7. package/{agentMachineCommands-SDIABR4D.js → agentMachineCommands-HIGEYGHU.js} +14 -14
  8. package/{agentPullCommand-5DOL6RGF.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  9. package/{agentRecordCommands-ZICUGEEH.js → agentRecordCommands-DIGUK2EV.js} +29 -29
  10. package/{agentRunCommand-66NCRPQ7.js → agentRunCommand-7IYB6QL5.js} +29 -29
  11. package/{agentRuntimeLocal-EZPUCRMS.js → agentRuntimeLocal-IOFBNVIL.js} +12 -12
  12. package/{agentSlice-V2EDVUXC.js → agentSlice-6ON6SBOW.js} +5 -5
  13. package/{appDeleteCommands-7WLUFWPE.js → appDeleteCommands-UZ6MYQJN.js} +12 -12
  14. package/{appDeployCommands-NK22AMAW.js → appDeployCommands-PQD6OJ6V.js} +12 -12
  15. package/{appDeployStatusCommands-PIWSMQET.js → appDeployStatusCommands-4JJSAK6R.js} +12 -12
  16. package/{appGetCommands-J3H6IHUT.js → appGetCommands-4M7DVU5T.js} +12 -12
  17. package/{appListCommands-CF4NYHRY.js → appListCommands-PERJZZRY.js} +12 -12
  18. package/{authCommand-T6UO5KPG.js → authCommand-NHDLY3IB.js} +2 -2
  19. package/{authCommands-KTIUCVVG.js → authCommands-UDBJVSZU.js} +2 -2
  20. package/{chunk-XBIYSBSG.js → chunk-46Y5D2BZ.js} +1 -1
  21. package/{chunk-NVRC52JS.js → chunk-4FFUDT6D.js} +4 -4
  22. package/{chunk-YWLAWZYQ.js → chunk-6RSG6HJR.js} +6 -6
  23. package/{chunk-KFJ7ZWBF.js → chunk-7JIOW5N3.js} +7 -7
  24. package/{chunk-WS2VEVHS.js → chunk-7MMSLEPA.js} +2 -2
  25. package/{chunk-V4UYSDTH.js → chunk-ADBZWMFB.js} +1 -1
  26. package/{chunk-SBFHKTI7.js → chunk-CD7Y7F5H.js} +13 -3
  27. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  28. package/{chunk-Z7A2EDGT.js → chunk-DFX557SE.js} +3 -3
  29. package/{chunk-EPCAQM3U.js → chunk-E73ON47R.js} +1 -1
  30. package/{chunk-ROFPWC4X.js → chunk-FJ5BGMNM.js} +2 -2
  31. package/{chunk-74D5HEDI.js → chunk-FOXQ7BAB.js} +1 -1
  32. package/{chunk-OCZQEXMX.js → chunk-FWBJR7BZ.js} +18 -12
  33. package/{chunk-7MTCBOOS.js → chunk-GARACBQB.js} +1 -1
  34. package/{chunk-ANRWQGOV.js → chunk-GDFA73QZ.js} +45 -11
  35. package/{chunk-SH7KLR4U.js → chunk-I72JY7FP.js} +3 -3
  36. package/{chunk-CERE5KFG.js → chunk-KN25LO6X.js} +1 -1
  37. package/{chunk-JNXHAQPJ.js → chunk-LDCAFLXD.js} +17 -1
  38. package/{chunk-EMQZSES6.js → chunk-LOCNXNOU.js} +1 -1
  39. package/{chunk-4XYBLM4D.js → chunk-LQ4PDQCI.js} +1 -1
  40. package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
  41. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  42. package/{chunk-2TYM4V33.js → chunk-NNCYNBYV.js} +2 -2
  43. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  44. package/{chunk-ELIMCKNX.js → chunk-PCF3QU5Q.js} +1 -1
  45. package/{chunk-RX4HD4H7.js → chunk-PTDYOADJ.js} +1 -1
  46. package/{chunk-RJYTVNWD.js → chunk-RS4ENQ4O.js} +2 -2
  47. package/{chunk-BFWQ65IZ.js → chunk-SNMQMOD2.js} +1 -1
  48. package/{chunk-2LM7XUCX.js → chunk-SPCBJGFO.js} +4 -4
  49. package/{chunk-ZGNDLCYH.js → chunk-TQE6BVFT.js} +22 -22
  50. package/{chunk-SESH42J6.js → chunk-UACUR6N5.js} +1 -1
  51. package/{chunk-PQ6BKMXB.js → chunk-UM4PH574.js} +1 -1
  52. package/{chunk-BS7YHAQP.js → chunk-UWVGKNAL.js} +244 -57
  53. package/{chunk-CV366NXM.js → chunk-V5OWQOJZ.js} +8 -2
  54. package/{chunk-3PELUSVV.js → chunk-WZLHDC7H.js} +2 -2
  55. package/{chunk-LYKHXIQC.js → chunk-X5YVT5HS.js} +2 -2
  56. package/{chunk-QNTL2KFU.js → chunk-XEALKKFF.js} +105 -32
  57. package/{chunk-WGPKQLZO.js → chunk-ZOWXSMIG.js} +7 -7
  58. package/{chunk-OXEHLZNH.js → chunk-ZTZCZV42.js} +3 -3
  59. package/{commandRegistry-N47CRDOH.js → commandRegistry-WSHNW7RD.js} +52 -52
  60. package/{contentThunks-RRD2XMWB.js → contentThunks-2IQTDXY2.js} +12 -12
  61. package/{createAgentAutomationAction-OW4WEVHP.js → createAgentAutomationAction-W42UXDBD.js} +12 -12
  62. package/{createDialogAction-L3WMTD5Z.js → createDialogAction-YWNYTXXK.js} +13 -13
  63. package/{createPageAction-PWG3K3K7.js → createPageAction-UFGCRJ3W.js} +12 -12
  64. package/{dbSlice-BUB77DHH.js → dbSlice-Q25STFGJ.js} +4 -4
  65. package/{deleteFile-HG4BF3CS.js → deleteFile-AJ2EZMHT.js} +2 -2
  66. package/{dialogCommands-CNXJGME5.js → dialogCommands-YQFKAGMA.js} +15 -15
  67. package/{dialogSlice-M7ZWTW5D.js → dialogSlice-34DUPW5Z.js} +11 -11
  68. package/{docCreateCommands-U2TEDZHS.js → docCreateCommands-FCANZT2K.js} +12 -12
  69. package/{docDeleteCommands-K4ME6F6S.js → docDeleteCommands-AJHN65NA.js} +14 -14
  70. package/{docReadCommands-ZUAVR3HH.js → docReadCommands-25KDEVTF.js} +12 -12
  71. package/{docStore-IX7ASJUP.js → docStore-FAQ6XUUA.js} +7 -5
  72. package/{docUpdateCommands-UKEOVRTF.js → docUpdateCommands-KFR7UB3E.js} +12 -12
  73. package/{fetchMessages-N2BW2L62.js → fetchMessages-I5ICDDHM.js} +2 -2
  74. package/{handleSendMessageAction-KMPC6UD4.js → handleSendMessageAction-5XCHOMQH.js} +28 -12
  75. package/index.js +3 -3
  76. package/{localDialogRead-3FHUPYAR.js → localDialogRead-ZHZ3KXDM.js} +1 -1
  77. package/{localRuntimeAuthority-AENMRPGX.js → localRuntimeAuthority-TU6OBC76.js} +5 -2
  78. package/{localRuntimeDb-AXJREE2T.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  79. package/{machineCommands-U4RRZGU6.js → machineCommands-MSUNJQFK.js} +28 -28
  80. package/{machineWsRunDispatch-V3IOP2P2.js → machineWsRunDispatch-VO7TVIB4.js} +28 -28
  81. package/{memberThunks-LEUNURN2.js → memberThunks-R75S3RWP.js} +5 -5
  82. package/package.json +1 -1
  83. package/{read-TBK4DFHP.js → read-SRQMNO26.js} +2 -2
  84. package/{readDocTool-TJFCZ3ND.js → readDocTool-RC3JUNJ2.js} +1 -1
  85. package/{readlineWorkspace-QTCU2BC4.js → readlineWorkspace-QIPJ23JY.js} +33 -33
  86. package/{removeDialogAgentAction-CT5HGRZH.js → removeDialogAgentAction-46XQV5Q7.js} +5 -5
  87. package/{runAgentClientLoop-4VOARXQF.js → runAgentClientLoop-GSJ4FH6L.js} +23 -23
  88. package/{runtimeDoctorCommands-EQJA4MGD.js → runtimeDoctorCommands-PIVSBZRZ.js} +3 -3
  89. package/{setDialogExtraReferencesAction-JOENKFTX.js → setDialogExtraReferencesAction-J4V5ADQF.js} +5 -5
  90. package/{setPrimaryDialogAgentAction-MHWOGXP3.js → setPrimaryDialogAgentAction-UHHV2QZW.js} +5 -5
  91. package/{settingThunks-KLPZNA6L.js → settingThunks-2OFFBLF4.js} +4 -4
  92. package/{spaceCommands-ZESRWSTC.js → spaceCommands-R3SC2VWH.js} +14 -14
  93. package/{streamAgentChatTurn-VDAVK7N3.js → streamAgentChatTurn-IUQH52XL.js} +25 -25
  94. package/{switchDialogAgentAction-JHA4JEYA.js → switchDialogAgentAction-A2TMVGAE.js} +4 -4
  95. package/{tools-VJ3L5V6D.js → tools-BQKPNGWC.js} +19 -19
  96. package/{tuiSummaryLlmCaller-QUCBFGZK.js → tuiSummaryLlmCaller-Q65IBDGO.js} +8 -8
  97. package/{updateDialogTitleAction-GBUSLAQR.js → updateDialogTitleAction-Z7OREKH3.js} +12 -12
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-K6U4NKFJ.js";
7
7
  import {
8
8
  defaultOpenBrowser
9
- } from "./chunk-BFWQ65IZ.js";
9
+ } from "./chunk-SNMQMOD2.js";
10
10
  import {
11
11
  ANTHROPIC_OAUTH_AUTHORIZE_URL,
12
12
  ANTHROPIC_OAUTH_CALLBACK_PORT,
@@ -54,7 +54,7 @@ import "./chunk-JBTJAPUF.js";
54
54
  import {
55
55
  extractGoogleValidationLink
56
56
  } from "./chunk-BMQ2MJUK.js";
57
- import "./chunk-74D5HEDI.js";
57
+ import "./chunk-FOXQ7BAB.js";
58
58
  import "./chunk-GLKOYSRU.js";
59
59
  import {
60
60
  buildDevinAuthUrl,
@@ -7,11 +7,11 @@ import {
7
7
  runLogoutCommand,
8
8
  runWhoamiCommand,
9
9
  saveTokenLogin
10
- } from "./chunk-BFWQ65IZ.js";
10
+ } from "./chunk-SNMQMOD2.js";
11
11
  import "./chunk-TY3TIUJK.js";
12
12
  import "./chunk-ESHYE7WU.js";
13
13
  import "./chunk-JBTJAPUF.js";
14
- import "./chunk-74D5HEDI.js";
14
+ import "./chunk-FOXQ7BAB.js";
15
15
  import "./chunk-GLKOYSRU.js";
16
16
  import "./chunk-A7GB5UGH.js";
17
17
  import "./chunk-OLZBQWZU.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-UJXNKP5V.js";
5
5
  import {
6
6
  buildTombstoneRecord
7
- } from "./chunk-GBRG75BQ.js";
7
+ } from "./chunk-D2MDMY2M.js";
8
8
  import {
9
9
  fetchFromClientDb
10
10
  } from "./chunk-HIM3FCLF.js";
@@ -2,12 +2,12 @@ import {
2
2
  loadFileFromIndexedDb,
3
3
  removeAction,
4
4
  saveFileToIndexedDb
5
- } from "./chunk-XBIYSBSG.js";
5
+ } from "./chunk-46Y5D2BZ.js";
6
6
  import {
7
7
  readAction,
8
8
  readRequestManager,
9
9
  resolveAgentReadServers
10
- } from "./chunk-RX4HD4H7.js";
10
+ } from "./chunk-PTDYOADJ.js";
11
11
  import {
12
12
  compareRemoteRecordsByComparableTime,
13
13
  getRuntimeServerContext,
@@ -26,7 +26,7 @@ import {
26
26
  } from "./chunk-UJXNKP5V.js";
27
27
  import {
28
28
  isTombstoneRecord
29
- } from "./chunk-GBRG75BQ.js";
29
+ } from "./chunk-D2MDMY2M.js";
30
30
  import {
31
31
  isRecord
32
32
  } from "./chunk-KUG52IAP.js";
@@ -714,7 +714,7 @@ var dbSlice = createSliceWithThunks({
714
714
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
715
715
  read: create.asyncThunk(
716
716
  async (payload, thunkApi) => {
717
- const { readAction: readAction2 } = await import("./read-TBK4DFHP.js");
717
+ const { readAction: readAction2 } = await import("./read-SRQMNO26.js");
718
718
  return readAction2(payload, thunkApi);
719
719
  },
720
720
  {
@@ -7,7 +7,7 @@ import {
7
7
  deleteDialog,
8
8
  runtime_default,
9
9
  toast
10
- } from "./chunk-BS7YHAQP.js";
10
+ } from "./chunk-UWVGKNAL.js";
11
11
  import {
12
12
  formatISO
13
13
  } from "./chunk-ZRAU6T47.js";
@@ -25,7 +25,7 @@ import {
25
25
  addContentAction,
26
26
  checkSpaceMembership,
27
27
  localSpaceAuthorityPatchStamp
28
- } from "./chunk-EPCAQM3U.js";
28
+ } from "./chunk-E73ON47R.js";
29
29
  import {
30
30
  createSpaceKey,
31
31
  normalizeSpaceId
@@ -39,7 +39,7 @@ import {
39
39
  uploadFileAction,
40
40
  upsertSSREntity,
41
41
  write
42
- } from "./chunk-NVRC52JS.js";
42
+ } from "./chunk-4FFUDT6D.js";
43
43
  import {
44
44
  DEVICE_LOCAL_OWNER_ID,
45
45
  getRuntimeServerContext,
@@ -50,7 +50,7 @@ import {
50
50
  } from "./chunk-UJXNKP5V.js";
51
51
  import {
52
52
  buildTombstoneRecord
53
- } from "./chunk-GBRG75BQ.js";
53
+ } from "./chunk-D2MDMY2M.js";
54
54
  import {
55
55
  extractUserId
56
56
  } from "./chunk-M2EJHDJP.js";
@@ -1434,11 +1434,11 @@ var ENTITY_DELETE_STRATEGIES = {
1434
1434
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1435
1435
  },
1436
1436
  file: async (key, { thunkAPI }) => {
1437
- const { deleteFileAction } = await import("./deleteFile-HG4BF3CS.js");
1437
+ const { deleteFileAction } = await import("./deleteFile-AJ2EZMHT.js");
1438
1438
  await deleteFileAction(key, thunkAPI);
1439
1439
  },
1440
1440
  image: async (key, { thunkAPI }) => {
1441
- const { deleteFileAction } = await import("./deleteFile-HG4BF3CS.js");
1441
+ const { deleteFileAction } = await import("./deleteFile-AJ2EZMHT.js");
1442
1442
  await deleteFileAction(key, thunkAPI);
1443
1443
  },
1444
1444
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  clipMultilineText,
9
9
  fetchAndSerializeTable
10
- } from "./chunk-ZGNDLCYH.js";
10
+ } from "./chunk-TQE6BVFT.js";
11
11
  import {
12
12
  isGatewayHttpStatus
13
13
  } from "./chunk-NF64D32W.js";
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  resolvePageReadMarkdown,
22
22
  slateToSimplifiedMarkdown
23
- } from "./chunk-7MTCBOOS.js";
23
+ } from "./chunk-GARACBQB.js";
24
24
  import {
25
25
  waitForAbortableDelay
26
26
  } from "./chunk-N4G4PKQ6.js";
@@ -29,13 +29,13 @@ import {
29
29
  } from "./chunk-AGIM7IMJ.js";
30
30
  import {
31
31
  fetchAndCacheMessages
32
- } from "./chunk-BS7YHAQP.js";
32
+ } from "./chunk-UWVGKNAL.js";
33
33
  import {
34
34
  shouldUseServerProxy
35
35
  } from "./chunk-YYLHWIW6.js";
36
36
  import {
37
37
  fetchServerSyncedCredential
38
- } from "./chunk-2LM7XUCX.js";
38
+ } from "./chunk-SPCBJGFO.js";
39
39
  import {
40
40
  buildSkillGuidancePromptBlock,
41
41
  extractRuntimePageCapabilities,
@@ -50,13 +50,13 @@ import {
50
50
  detectDispatchIntentFromMessages,
51
51
  normalizeChatCompletionsBodyForProvider,
52
52
  resolveToolGuidedSections
53
- } from "./chunk-2TYM4V33.js";
53
+ } from "./chunk-NNCYNBYV.js";
54
54
  import {
55
55
  convertMessagesToResponsesInput,
56
56
  getUsageRequestOptions,
57
57
  preserveAgentStateFields,
58
58
  stablePromptCacheKey
59
- } from "./chunk-PUOC4YRO.js";
59
+ } from "./chunk-M7VLQGQP.js";
60
60
  import {
61
61
  createFileCredentialBroker
62
62
  } from "./chunk-XFUBXRVI.js";
@@ -68,7 +68,7 @@ import {
68
68
  } from "./chunk-UAD2WT54.js";
69
69
  import {
70
70
  read
71
- } from "./chunk-NVRC52JS.js";
71
+ } from "./chunk-4FFUDT6D.js";
72
72
  import {
73
73
  MEMORY_USE_GUIDANCE,
74
74
  buildUserResponseLanguageContext,
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-PSCNXBYA.js";
4
4
  import {
5
5
  addContentAction
6
- } from "./chunk-EPCAQM3U.js";
6
+ } from "./chunk-E73ON47R.js";
7
7
  import {
8
8
  upload
9
- } from "./chunk-NVRC52JS.js";
9
+ } from "./chunk-4FFUDT6D.js";
10
10
  import {
11
11
  getRuntimeServerContext
12
12
  } from "./chunk-UJXNKP5V.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isTombstoneRecord
3
- } from "./chunk-GBRG75BQ.js";
3
+ } from "./chunk-D2MDMY2M.js";
4
4
  import {
5
5
  isRecord
6
6
  } from "./chunk-KUG52IAP.js";
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  patch,
9
9
  readAndWait
10
- } from "./chunk-NVRC52JS.js";
10
+ } from "./chunk-4FFUDT6D.js";
11
11
  import {
12
12
  toErrorMessage
13
13
  } from "./chunk-HNMXYYJR.js";
@@ -51,6 +51,7 @@ var createInitialState = () => ({
51
51
  var listeners = /* @__PURE__ */ new Set();
52
52
  var version = 0;
53
53
  var state = createInitialState();
54
+ var latestInitRequestKey = null;
54
55
  var notify = () => {
55
56
  for (const listener of listeners) {
56
57
  try {
@@ -101,6 +102,9 @@ function getDocField(selector) {
101
102
  function getDocPageKey() {
102
103
  return state.pageKey;
103
104
  }
105
+ function isDocStateForPage(state2, pageKey) {
106
+ return Boolean(pageKey) && state2.pageKey === pageKey;
107
+ }
104
108
  function getDocIsInitialized() {
105
109
  return state.isInitialized;
106
110
  }
@@ -142,6 +146,7 @@ function updateDocTags(tags) {
142
146
  setState((prev) => ({ ...prev, tags }));
143
147
  }
144
148
  function resetDocState() {
149
+ latestInitRequestKey = null;
145
150
  setState(createInitialState());
146
151
  }
147
152
  function previewDocState(payload) {
@@ -189,6 +194,7 @@ function applyExternalDocUpdate(payload) {
189
194
  }
190
195
  async function initDocState(args, { dispatch }) {
191
196
  const { pageKey, isReadOnly } = args;
197
+ latestInitRequestKey = pageKey;
192
198
  setState((prev) => ({
193
199
  ...createInitialState(),
194
200
  isLoading: true,
@@ -197,6 +203,7 @@ async function initDocState(args, { dispatch }) {
197
203
  }));
198
204
  try {
199
205
  const readAction = await dispatch(readAndWait(pageKey));
206
+ if (latestInitRequestKey !== pageKey) return;
200
207
  if (readAndWait.fulfilled.match(readAction) && readAction.payload) {
201
208
  const data = readAction.payload;
202
209
  if (data.type !== "page" /* DOC */) {
@@ -246,6 +253,7 @@ async function initDocState(args, { dispatch }) {
246
253
  }));
247
254
  }
248
255
  } catch (e) {
256
+ if (latestInitRequestKey !== pageKey) return;
249
257
  setState((prev) => ({
250
258
  ...prev,
251
259
  isLoading: false,
@@ -325,7 +333,7 @@ async function saveDocState(arg, { dispatch, getState }) {
325
333
  ).unwrap();
326
334
  if (dbSpaceId) {
327
335
  try {
328
- const { updateContentTitle } = await import("./contentThunks-RRD2XMWB.js");
336
+ const { updateContentTitle } = await import("./contentThunks-2IQTDXY2.js");
329
337
  await dispatch(
330
338
  updateContentTitle({
331
339
  spaceId: dbSpaceId,
@@ -364,7 +372,7 @@ async function saveDocState(arg, { dispatch, getState }) {
364
372
  }
365
373
  }
366
374
  async function createDocState(args, thunkApi) {
367
- const { createPageAction } = await import("./createPageAction-PWG3K3K7.js");
375
+ const { createPageAction } = await import("./createPageAction-UFGCRJ3W.js");
368
376
  return createPageAction(args, thunkApi);
369
377
  }
370
378
  function subscribe(listener) {
@@ -386,6 +394,7 @@ function useDocField(selector) {
386
394
  }
387
395
  function resetDocStoreForTests() {
388
396
  state = createInitialState();
397
+ latestInitRequestKey = null;
389
398
  bump();
390
399
  }
391
400
 
@@ -393,6 +402,7 @@ export {
393
402
  getDocState,
394
403
  getDocField,
395
404
  getDocPageKey,
405
+ isDocStateForPage,
396
406
  getDocIsInitialized,
397
407
  getDocIsReadOnly,
398
408
  getDocHasPendingChanges,
@@ -80,6 +80,7 @@ var buildTombstoneRecord = (record, nowIso) => {
80
80
 
81
81
  export {
82
82
  getRecordTimestamp,
83
+ getTombstoneTimestamp,
83
84
  isTombstoneRecord,
84
85
  shouldReplaceWithNextRecord,
85
86
  buildTombstoneRecord
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-QNTL2KFU.js";
4
+ } from "./chunk-XEALKKFF.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-ZGNDLCYH.js";
7
+ } from "./chunk-TQE6BVFT.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-ANRWQGOV.js";
10
+ } from "./chunk-GDFA73QZ.js";
11
11
  import {
12
12
  applyToolSurfaceConstraints
13
13
  } from "./chunk-4YSOUKUR.js";
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  patch,
6
6
  read
7
- } from "./chunk-NVRC52JS.js";
7
+ } from "./chunk-4FFUDT6D.js";
8
8
  import {
9
9
  DEVICE_LOCAL_OWNER_ID,
10
10
  isDeviceLocalSpaceBody
@@ -7,10 +7,10 @@ import {
7
7
  } from "./chunk-UAD2WT54.js";
8
8
  import {
9
9
  toTimestampMs
10
- } from "./chunk-NVRC52JS.js";
10
+ } from "./chunk-4FFUDT6D.js";
11
11
  import {
12
12
  isTombstoneRecord
13
- } from "./chunk-GBRG75BQ.js";
13
+ } from "./chunk-D2MDMY2M.js";
14
14
  import {
15
15
  fetchFromServer,
16
16
  getAllServers
@@ -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-AENMRPGX.js");
17
+ const { getDefaultCliLocalRuntimeDb: getAuthorityBackedDb } = await import("./localRuntimeAuthority-TU6OBC76.js");
18
18
  return getAuthorityBackedDb(options);
19
19
  }
20
20
 
@@ -28,7 +28,7 @@ import {
28
28
  t,
29
29
  toolLabel,
30
30
  toolLabelVariants
31
- } from "./chunk-QNTL2KFU.js";
31
+ } from "./chunk-XEALKKFF.js";
32
32
  import {
33
33
  clearCredentialAvailability,
34
34
  readCredentialEntry,
@@ -36,7 +36,7 @@ import {
36
36
  } from "./chunk-62IL3KQV.js";
37
37
  import {
38
38
  getReadableCliDb
39
- } from "./chunk-EMQZSES6.js";
39
+ } from "./chunk-LOCNXNOU.js";
40
40
  import {
41
41
  _appendEntityBatch,
42
42
  _appendEvidenceBatch,
@@ -83,7 +83,7 @@ import {
83
83
  chooseMemoryOwners,
84
84
  loadMemoryCandidatesFromDb,
85
85
  resolveAgentMemoryPolicy
86
- } from "./chunk-SH7KLR4U.js";
86
+ } from "./chunk-I72JY7FP.js";
87
87
  import {
88
88
  createRunActivityTracker,
89
89
  popSingleQueueMessage,
@@ -109,11 +109,11 @@ import {
109
109
  } from "./chunk-EXAJ6DCR.js";
110
110
  import {
111
111
  getDefaultCliLocalRuntimeDb
112
- } from "./chunk-74D5HEDI.js";
112
+ } from "./chunk-FOXQ7BAB.js";
113
113
  import {
114
114
  API_REPORTED_COST_MULTIPLIER,
115
115
  parseUiAskChoiceContent
116
- } from "./chunk-BS7YHAQP.js";
116
+ } from "./chunk-UWVGKNAL.js";
117
117
  import {
118
118
  isOAuthApiKeyRef
119
119
  } from "./chunk-YYLHWIW6.js";
@@ -128,10 +128,10 @@ import {
128
128
  LOCAL_AGENT_CONFIG_MISSING_CODE,
129
129
  LOCAL_TURN_ABORTED_CODE,
130
130
  readActionGate
131
- } from "./chunk-ANRWQGOV.js";
131
+ } from "./chunk-GDFA73QZ.js";
132
132
  import {
133
133
  resolveAgentRuntimeConfigFromRecord
134
- } from "./chunk-4XYBLM4D.js";
134
+ } from "./chunk-LQ4PDQCI.js";
135
135
  import {
136
136
  createThinkParserState,
137
137
  flushThinkParser,
@@ -149,7 +149,7 @@ import {
149
149
  DEFAULT_CONTEXT_WINDOW,
150
150
  getModelContextWindow,
151
151
  normalizeUsage
152
- } from "./chunk-JNXHAQPJ.js";
152
+ } from "./chunk-LDCAFLXD.js";
153
153
  import {
154
154
  clipCompactText
155
155
  } from "./chunk-5MMAK75Q.js";
@@ -10722,7 +10722,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
10722
10722
  // packages/cli/client/agentRun.ts
10723
10723
  import { ulid as ulid2 } from "ulid";
10724
10724
  async function loadRunLocalAgentTurn() {
10725
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-EZPUCRMS.js");
10725
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-IOFBNVIL.js");
10726
10726
  return runLocalAgentTurn;
10727
10727
  }
10728
10728
  var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
@@ -11042,7 +11042,8 @@ function classifyLocalRunError(message) {
11042
11042
  }
11043
11043
  return { kind: "generic" };
11044
11044
  }
11045
- var HISTORY_REPLAY_REJECTION_RE = /invalid_request_error|invalid\s+tool\s+call\s+arguments?/i;
11045
+ var HISTORY_REPLAY_REJECTION_RE = /invalid\s+tool\s+call\s+arguments?/i;
11046
+ var REASONING_REPLAY_CONTRACT_RE = /reasoning_content[^.]*must be passed back/i;
11046
11047
  var RUN_UNAVAILABLE_PREFIX = "[nolo] auto runtime: local run unavailable";
11047
11048
  var NO_FALLBACK = "Not falling back to server.";
11048
11049
  var SERVER_FALLBACK_HINT = "or use --server to run on the server explicitly.";
@@ -11072,8 +11073,9 @@ function isAuthNoTokenBody(message) {
11072
11073
  return /"authCode"\s*:\s*"AUTH_NO_TOKEN"/i.test(message) || /no authentication token provided/i.test(message);
11073
11074
  }
11074
11075
  function buildRejectedPayloadFailure(ctx) {
11075
- const looksLikeHistoryReplay = HISTORY_REPLAY_REJECTION_RE.test(ctx.message);
11076
- const cause = looksLikeHistoryReplay ? ` This usually happens when the dialog history contains tool_calls or reasoning produced by a different model/provider (e.g. after /switch); the new provider rejects that history. Start a fresh dialog, or clean the offending history.` : "";
11076
+ const looksLikeReasoningReplay = REASONING_REPLAY_CONTRACT_RE.test(ctx.message);
11077
+ const looksLikeHistoryReplay = !looksLikeReasoningReplay && HISTORY_REPLAY_REJECTION_RE.test(ctx.message);
11078
+ const cause = looksLikeReasoningReplay ? ` This is a thinking-mode replay contract violation: the history contains an assistant tool-call turn without reasoning_content, but this model requires every such turn to pass reasoning back to the API. The upstream may not have returned reasoning for that turn, or the history came from a different model.` : looksLikeHistoryReplay ? ` This usually happens when the dialog history contains tool_calls or reasoning produced by a different model/provider (e.g. after /switch); the new provider rejects that history. Start a fresh dialog, or clean the offending history.` : "";
11077
11079
  return `${RUN_UNAVAILABLE_PREFIX} (${ctx.where} returned HTTP ${ctx.status}, the provider rejected the request body \u2014 this is NOT a local credential/config issue). Detail: ${ctx.message}${cause} ${NO_FALLBACK} Use --server to run on the server explicitly, or start a fresh dialog.
11078
11080
  `;
11079
11081
  }
@@ -11168,6 +11170,10 @@ function describeLocalRunFailure(message, rawError) {
11168
11170
  }
11169
11171
  if (/CLI authority broker could not attach or take ownership/i.test(message)) {
11170
11172
  const cleaned = stripDebugNoise(message);
11173
+ if (/EADDRINUSE/i.test(message)) {
11174
+ return `${RUN_UNAVAILABLE_PREFIX} (${cleaned}). ${NO_FALLBACK} Use --server to run on the server explicitly.
11175
+ `;
11176
+ }
11171
11177
  return `${RUN_UNAVAILABLE_PREFIX} (${cleaned}). ${NO_FALLBACK} The local runtime could not attach to an existing broker or take database ownership. Check running broker processes holding the local authority store or retry, ${SERVER_FALLBACK_HINT}.
11172
11178
  `;
11173
11179
  }
@@ -206,7 +206,7 @@ async function readDocFunc(args, thunkApi) {
206
206
  throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
207
207
  }
208
208
  try {
209
- const { readAction } = await import("./read-TBK4DFHP.js");
209
+ const { readAction } = await import("./read-SRQMNO26.js");
210
210
  const pageData = await readAction({ dbKey: id }, thunkApi);
211
211
  if (!pageData) {
212
212
  throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
@@ -11,7 +11,7 @@ import {
11
11
  flushChatCompletionStream,
12
12
  providerHttpFailure,
13
13
  throwIfChatCompletionStreamFailed
14
- } from "./chunk-CV366NXM.js";
14
+ } from "./chunk-V5OWQOJZ.js";
15
15
  import {
16
16
  readSseFrames
17
17
  } from "./chunk-GMZLP5DV.js";
@@ -27,7 +27,7 @@ import {
27
27
  resolveHistoricalToolContentCap,
28
28
  resolveToolOutputProfile,
29
29
  stripImagePartsFromMessages
30
- } from "./chunk-4XYBLM4D.js";
30
+ } from "./chunk-LQ4PDQCI.js";
31
31
  import {
32
32
  downgradeUnparsableToolCalls,
33
33
  hasParsableObjectArguments,
@@ -54,17 +54,18 @@ import {
54
54
  requiresBareImageUrl,
55
55
  resolveToolGuidedSections,
56
56
  toBareImageUrlMessages
57
- } from "./chunk-2TYM4V33.js";
57
+ } from "./chunk-NNCYNBYV.js";
58
58
  import {
59
59
  convertMessagesToResponsesInput,
60
60
  extractReasoningFromResponseOutput,
61
61
  extractTextFromResponseOutput,
62
62
  extractToolCallsFromResponseOutput,
63
63
  getUsageRequestOptions,
64
+ shouldReplayReasoningContentForOutbound,
64
65
  shouldStripReasoningContentForOutbound,
65
66
  toOpenAiCompatibleMessages,
66
67
  toResponsesTools
67
- } from "./chunk-PUOC4YRO.js";
68
+ } from "./chunk-M7VLQGQP.js";
68
69
  import {
69
70
  BRIDGE_STREAM_MAX_CHARS,
70
71
  DEFAULT_READ_DIALOG_MAX_RESPONSE_CHARS,
@@ -93,7 +94,7 @@ import {
93
94
  resolveEmptyAssistantFallbackMessage,
94
95
  resolveEmptyAssistantOutcome,
95
96
  resolveTruncatedReasoningTailLog
96
- } from "./chunk-JNXHAQPJ.js";
97
+ } from "./chunk-LDCAFLXD.js";
97
98
  import {
98
99
  COMPACTION_SUMMARY_SCHEMA_VERSION,
99
100
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
@@ -111,7 +112,7 @@ import {
111
112
  resolveCompressionTriggerRatio,
112
113
  truncateToolOutputForContext,
113
114
  withProviderCallTimingFields
114
- } from "./chunk-WS2VEVHS.js";
115
+ } from "./chunk-7MMSLEPA.js";
115
116
  import {
116
117
  clipCompactText
117
118
  } from "./chunk-5MMAK75Q.js";
@@ -14574,6 +14575,7 @@ async function readResponsesSseCompletion(args2) {
14574
14575
  }
14575
14576
 
14576
14577
  // packages/agent-runtime/openAiCompatibleProvider.ts
14578
+ var REASONING_REPLAY_PLACEHOLDER = "(reasoning not captured for this turn)";
14577
14579
  function isOpenAiResponsesEndpoint(endpoint) {
14578
14580
  return endpoint.includes("/responses");
14579
14581
  }
@@ -14587,9 +14589,14 @@ function buildOpenAiCompatibleChatCompletionRequest(args2) {
14587
14589
  args2.providerConfig.provider,
14588
14590
  args2.providerConfig.model
14589
14591
  );
14592
+ const shouldReplayReasoning = shouldReplayReasoningContentForOutbound(
14593
+ args2.providerConfig.provider,
14594
+ args2.providerConfig.model
14595
+ );
14590
14596
  const sanitizedMessages = sanitizeForOutbound(args2.messages, args2.tools);
14591
14597
  const messages = toOpenAiCompatibleMessages(sanitizedMessages, {
14592
- stripReasoningContent: shouldStripReasoning
14598
+ stripReasoningContent: shouldStripReasoning,
14599
+ ...shouldReplayReasoning && !shouldStripReasoning ? { replayReasoningPlaceholder: REASONING_REPLAY_PLACEHOLDER } : {}
14593
14600
  });
14594
14601
  const rawBody = {
14595
14602
  model: args2.providerConfig.model,
@@ -20048,6 +20055,25 @@ No skills were discovered in this workspace.`;
20048
20055
  Available skills: ${available.join(", ")}`;
20049
20056
  }
20050
20057
 
20058
+ // packages/agent-runtime/sessionIdentity.ts
20059
+ import { createHash as createHash4 } from "node:crypto";
20060
+ var SALT = "nolo-session-identity-v1";
20061
+ function isStableSessionIdentityEnabled(env = process.env) {
20062
+ const v = env.NOLO_STABLE_SESSION_IDENTITY?.trim().toLowerCase();
20063
+ return !(v === "0" || v === "false" || v === "off");
20064
+ }
20065
+ function deriveStableUuid(sessionKey, purpose) {
20066
+ const h = createHash4("sha256").update(`${SALT}\0${purpose}\0${sessionKey}`).digest();
20067
+ h[6] = h[6] & 15 | 80;
20068
+ h[8] = h[8] & 63 | 128;
20069
+ const x = h.subarray(0, 16).toString("hex");
20070
+ return `${x.slice(0, 8)}-${x.slice(8, 12)}-${x.slice(12, 16)}-${x.slice(16, 20)}-${x.slice(20, 32)}`;
20071
+ }
20072
+ function resolveSessionKey(args2) {
20073
+ const d = args2.dialogId?.trim();
20074
+ return d ? `dialog:${d}` : void 0;
20075
+ }
20076
+
20051
20077
  // packages/agent-runtime/devin/devinProvider.ts
20052
20078
  import { randomBytes, randomUUID } from "node:crypto";
20053
20079
  var CLIENT_NAME = "chisel";
@@ -20108,10 +20134,13 @@ function encodeDevinClientMetadata(token) {
20108
20134
  writeStringField(31, generateFingerprint())
20109
20135
  ]);
20110
20136
  }
20111
- function encodeDevinChatMessage(msg) {
20137
+ function devinId(id, purpose) {
20138
+ return id?.sessionKey && isStableSessionIdentityEnabled() ? deriveStableUuid(id.sessionKey, purpose) : randomUUID();
20139
+ }
20140
+ function encodeDevinChatMessage(msg, identity2, index = 0) {
20112
20141
  const source = msg.role === "assistant" ? 2 : msg.role === "tool" ? 4 : 1;
20113
20142
  return Buffer.concat([
20114
- writeStringField(1, randomUUID()),
20143
+ writeStringField(1, devinId(identity2, `msg:${index}:${msg.role}`)),
20115
20144
  writeVarint(2, source),
20116
20145
  writeStringField(3, msg.text),
20117
20146
  ...(msg.toolCalls ?? []).map(
@@ -20167,6 +20196,7 @@ function buildCompletionConfig(params) {
20167
20196
  }
20168
20197
  function buildGetChatMessageRequest(params) {
20169
20198
  const { token, messages, model, tools = [], temperature } = params;
20199
+ const identity2 = { sessionKey: params.sessionKey };
20170
20200
  const metadata = encodeDevinClientMetadata(token);
20171
20201
  let systemPrompt = "";
20172
20202
  const filteredMessages = [];
@@ -20196,7 +20226,7 @@ ${item.text}`;
20196
20226
  coalesced.push({ ...item });
20197
20227
  }
20198
20228
  }
20199
- const chatMessageBuffers = coalesced.map((m) => encodeDevinChatMessage(m));
20229
+ const chatMessageBuffers = coalesced.map((m, i) => encodeDevinChatMessage(m, identity2, i));
20200
20230
  const completionConfig = buildCompletionConfig({ temperature });
20201
20231
  const modelConfig = Buffer.concat([
20202
20232
  writeStringField(1, randomUUID()),
@@ -20442,7 +20472,8 @@ function createDevinProvider(options) {
20442
20472
  messages,
20443
20473
  model: selectedModel,
20444
20474
  tools,
20445
- temperature
20475
+ temperature,
20476
+ sessionKey: resolveSessionKey({ dialogId: opts?.dialogId })
20446
20477
  });
20447
20478
  const frame = buildDevinConnectFrame(requestPayload);
20448
20479
  const timingTracker = createProviderCallTimingTracker();
@@ -20624,6 +20655,9 @@ export {
20624
20655
  buildLocalDialogWritePlan,
20625
20656
  buildNoloWorkspaceCliToolExecutors,
20626
20657
  buildLoadSkillExecutor,
20658
+ isStableSessionIdentityEnabled,
20659
+ deriveStableUuid,
20660
+ resolveSessionKey,
20627
20661
  readDevinUpstreamFailure,
20628
20662
  createDevinProvider
20629
20663
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-YWLAWZYQ.js";
3
+ } from "./chunk-6RSG6HJR.js";
4
4
  import {
5
5
  format,
6
6
  prepareAndPersistMessage,
7
7
  uiAskChoiceFunc,
8
8
  uiAskChoiceFunctionSchema
9
- } from "./chunk-BS7YHAQP.js";
9
+ } from "./chunk-UWVGKNAL.js";
10
10
  import {
11
11
  formatISO
12
12
  } from "./chunk-ZRAU6T47.js";
@@ -19,7 +19,7 @@ import {
19
19
  removeCachedEntity,
20
20
  upsertSSREntity,
21
21
  write
22
- } from "./chunk-NVRC52JS.js";
22
+ } from "./chunk-4FFUDT6D.js";
23
23
  import {
24
24
  PLATFORM_HOSTED_DEEPSEEK_FLASH_MODEL,
25
25
  PLATFORM_HOSTED_KIMI_PROVIDER
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-KFJ7ZWBF.js";
4
+ } from "./chunk-7JIOW5N3.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {