nolo-cli 0.252.0-alpha.1 → 0.252.0-alpha.2

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 (105) hide show
  1. package/{_executeModel-D6G3B45S.js → _executeModel-RXHY2BDR.js} +31 -31
  2. package/{action-QQOQ2LP3.js → action-4MADDU52.js} +5 -5
  3. package/{addContentAction-MB22YIDV.js → addContentAction-F4XO3VRF.js} +8 -8
  4. package/{addDialogAgentAction-KNTBVVGY.js → addDialogAgentAction-NSCVHTZJ.js} +7 -7
  5. package/{agentDeleteCommand-YCWDGJSF.js → agentDeleteCommand-EJAI2VTH.js} +35 -35
  6. package/{agentEmailCommands-DTWD5FWC.js → agentEmailCommands-YBKHZMMZ.js} +34 -34
  7. package/{agentListCommands-JTOONLYL.js → agentListCommands-M2KYLAOB.js} +10 -10
  8. package/{agentMachineCommands-25X7OTLQ.js → agentMachineCommands-GLY6NJWZ.js} +9 -9
  9. package/{agentRecordCommands-SXE3WV2X.js → agentRecordCommands-JANPX6XI.js} +34 -34
  10. package/{agentRunCommand-QSIED54S.js → agentRunCommand-TNLAXLUU.js} +34 -34
  11. package/{agentRuntimeLocal-HVJJMB4W.js → agentRuntimeLocal-EOW6FFXL.js} +6 -6
  12. package/{agentSlice-NBUJJVRI.js → agentSlice-PVFGBJXB.js} +8 -8
  13. package/{appDeleteCommands-YU6TT6VN.js → appDeleteCommands-3VCRRWUX.js} +10 -10
  14. package/{appDeployCommands-4DEIX7YP.js → appDeployCommands-XN6IEMYK.js} +10 -10
  15. package/{appDeployStatusCommands-3VKS6GBQ.js → appDeployStatusCommands-ZSJJXMVR.js} +10 -10
  16. package/{appGetCommands-22FNNROT.js → appGetCommands-DJ7YQCEE.js} +10 -10
  17. package/{appListCommands-FVGMLHVU.js → appListCommands-4KU5CV5H.js} +10 -10
  18. package/{builtinSkillRegistry-PFTTFPWW.js → builtinSkillRegistry-PQWEXSFW.js} +1 -1
  19. package/{chunk-JF5QT3YY.js → chunk-25GCVHBZ.js} +1 -1
  20. package/{chunk-ZNOXY73P.js → chunk-26KL6533.js} +26 -20
  21. package/{chunk-GO7UC5VH.js → chunk-2HF6DINU.js} +6 -6
  22. package/{chunk-T4VVQHSE.js → chunk-3LL5HRIJ.js} +1 -1
  23. package/{chunk-2LANL4B5.js → chunk-BLBGVSLB.js} +2 -2
  24. package/{chunk-U7BP25PE.js → chunk-BTQU2PRC.js} +2 -2
  25. package/{chunk-YQYYYATY.js → chunk-BVCCRSGK.js} +6 -6
  26. package/{chunk-2GAUJDA5.js → chunk-CGSIW2KI.js} +1 -1
  27. package/{chunk-HMREADP6.js → chunk-CSTCYYCR.js} +11 -11
  28. package/{chunk-FZI2P64R.js → chunk-EPBEZKYK.js} +2 -2
  29. package/{chunk-QMKWSKWA.js → chunk-EQJK6LSN.js} +2 -2
  30. package/{chunk-7ZOVFB2H.js → chunk-F6GZFIGR.js} +10 -10
  31. package/{chunk-5IN2NBDX.js → chunk-FJPVVLP3.js} +4 -4
  32. package/{chunk-CO2NXG2J.js → chunk-GJ4UTSAW.js} +7 -7
  33. package/{chunk-WAOHK3NJ.js → chunk-GUFTHWDO.js} +10 -10
  34. package/{chunk-TDI7ARZO.js → chunk-IQXMWBI6.js} +2 -2
  35. package/{chunk-DU3DJYVA.js → chunk-J4KLOLYP.js} +3 -3
  36. package/{chunk-6HL6E7ZD.js → chunk-JX2IG37T.js} +1 -1
  37. package/{chunk-TDLZA6LJ.js → chunk-K7RWY7JH.js} +9 -9
  38. package/{chunk-TTWNTFTO.js → chunk-KHYSFS3W.js} +47 -6
  39. package/{chunk-P6HMEKLL.js → chunk-KO6JNZCF.js} +4 -4
  40. package/{chunk-SMCKJJXI.js → chunk-KQBGXCKM.js} +3 -3
  41. package/{chunk-NPUHKEOB.js → chunk-MDWHMQON.js} +3 -3
  42. package/{chunk-ITCOQAHS.js → chunk-MOAVLCCM.js} +4 -4
  43. package/{chunk-O6LPLIRS.js → chunk-N2MDL5AZ.js} +9 -9
  44. package/{chunk-UI3Z3HDK.js → chunk-N7UXTVAR.js} +2 -2
  45. package/{chunk-GWS2X7TX.js → chunk-NJDOID7N.js} +13 -13
  46. package/{chunk-LNIA5JVX.js → chunk-NRWZHHOB.js} +3 -3
  47. package/{chunk-3N3JPQBQ.js → chunk-NWZRCUHM.js} +25 -25
  48. package/{chunk-LAQC5FAP.js → chunk-OQOXDQLB.js} +2 -2
  49. package/{chunk-4HAOOY6G.js → chunk-OTNPEE4G.js} +1 -1
  50. package/{chunk-TTUIM3PJ.js → chunk-OTOPQXP5.js} +1 -1
  51. package/{chunk-XBCADGK2.js → chunk-Q5M27DUE.js} +1 -1
  52. package/{chunk-ZMFA2TLE.js → chunk-REINTCQF.js} +8 -2
  53. package/{chunk-JAYPSNGR.js → chunk-SBBSUBY3.js} +1 -1
  54. package/{chunk-NNUIVAC2.js → chunk-SCY2O7CU.js} +2 -2
  55. package/{chunk-A6VIMCWI.js → chunk-U3ZK2MXG.js} +3 -3
  56. package/{chunk-2PB653F5.js → chunk-UDQZ5JT7.js} +9 -9
  57. package/{chunk-A5F6DYP2.js → chunk-UGHNYYOE.js} +2 -2
  58. package/{chunk-GVH2IP2M.js → chunk-UTFTXJU3.js} +2 -2
  59. package/{chunk-JKALGWDL.js → chunk-VZWYP7LD.js} +2 -2
  60. package/{chunk-YB5D2GK4.js → chunk-W4S5FQWQ.js} +1 -1
  61. package/{chunk-SMZFWEMX.js → chunk-WJOC3AEM.js} +2 -2
  62. package/{chunk-ITMBFT35.js → chunk-YWLMUFZ5.js} +1 -1
  63. package/{chunk-F6Q64KRV.js → chunk-Z47UZT27.js} +1 -1
  64. package/{chunk-75TXQ4GY.js → chunk-ZMWDHPNG.js} +15 -29
  65. package/{cliLocalAgentRecordReader-DWU3LBO2.js → cliLocalAgentRecordReader-OHAC4JTY.js} +7 -7
  66. package/{commandRegistry-7FVATZS2.js → commandRegistry-YQMAXCLP.js} +51 -51
  67. package/{contentThunks-25XCB7VY.js → contentThunks-GSMUNWBA.js} +14 -14
  68. package/{createAgentAutomationAction-FC5RI2LW.js → createAgentAutomationAction-RMADR4LG.js} +14 -14
  69. package/{createDialogAction-IL3ISSQQ.js → createDialogAction-CM5CBQVH.js} +15 -15
  70. package/{createPageAction-RVYBEYZV.js → createPageAction-JMGVMCTH.js} +15 -15
  71. package/{db-JMGVD4TB.js → db-VR74ADGC.js} +4 -1
  72. package/{dbSlice-WG3ZG6PZ.js → dbSlice-Q637QR4L.js} +7 -7
  73. package/{deleteFile-4TIG54YN.js → deleteFile-TP6MKFUX.js} +10 -5
  74. package/{dialogCommands-VUJISJZF.js → dialogCommands-ULWP5ASX.js} +10 -10
  75. package/{dialogSlice-UMP55UAW.js → dialogSlice-ARQKXXTD.js} +12 -12
  76. package/{docCreateCommands-S46F6GKP.js → docCreateCommands-ZJFHCZV4.js} +9 -9
  77. package/{docDeleteCommands-LJG4NK6J.js → docDeleteCommands-LY5MF2BI.js} +10 -10
  78. package/{docReadCommands-YPAYGHNM.js → docReadCommands-4X2DHCNZ.js} +9 -9
  79. package/{docStore-VK3MVJ5Q.js → docStore-QWRVKIRI.js} +8 -8
  80. package/{docUpdateCommands-MPTM6267.js → docUpdateCommands-5TIT7DAJ.js} +9 -9
  81. package/{handleSendMessageAction-VPKVNKBU.js → handleSendMessageAction-TVR55KVT.js} +25 -25
  82. package/{hostCredentialCreate-K56HWPNY.js → hostCredentialCreate-SIRXPUFR.js} +34 -34
  83. package/index.js +3 -3
  84. package/{localDialogRead-NXILOV3T.js → localDialogRead-BJJT3TF5.js} +1 -1
  85. package/{localRuntimeAdapter-KVU72FWT.js → localRuntimeAdapter-VRB5EDDZ.js} +33 -33
  86. package/{machineCommands-C3O5RKNJ.js → machineCommands-MG3BB6XM.js} +34 -34
  87. package/{machineWsRunDispatch-ZLART7ZA.js → machineWsRunDispatch-3TOO3NCU.js} +34 -34
  88. package/{memberThunks-7DNR6DRD.js → memberThunks-IGYRMEQC.js} +9 -9
  89. package/package.json +1 -1
  90. package/{projectArchive-UBJFYRL7.js → projectArchive-Q46BYZQ6.js} +15 -15
  91. package/{read-Z2JOK6F6.js → read-MPPXZHAO.js} +10 -5
  92. package/{readDocTool-3QYSVWBT.js → readDocTool-PKZ35PCR.js} +1 -1
  93. package/{readlineWorkspace-TSIYF7C6.js → readlineWorkspace-RBH6PSE7.js} +40 -40
  94. package/{removeDialogAgentAction-LRKDU4RI.js → removeDialogAgentAction-H6S7VLNA.js} +9 -9
  95. package/{runAgentClientLoop-YAHGOWXN.js → runAgentClientLoop-WZJ4HXOH.js} +29 -29
  96. package/{setDialogExtraReferencesAction-KIITOCFP.js → setDialogExtraReferencesAction-CARUTAWS.js} +8 -8
  97. package/{setPrimaryDialogAgentAction-Y36PKFFB.js → setPrimaryDialogAgentAction-VRV56MLG.js} +9 -9
  98. package/{settingThunks-YQNG5L6K.js → settingThunks-4FC4HXGN.js} +7 -7
  99. package/{spaceCommands-P644AAZZ.js → spaceCommands-27Z5JAU3.js} +9 -9
  100. package/{streamAgentChatTurn-5CSYAUAY.js → streamAgentChatTurn-JKMBFM2O.js} +33 -33
  101. package/{switchDialogAgentAction-U2VLPPVO.js → switchDialogAgentAction-O236K6HB.js} +7 -7
  102. package/{tableCommands-44GC4N6J.js → tableCommands-C3P2HHKK.js} +2 -2
  103. package/{tools-UZ3CDIR2.js → tools-4RFLNHUW.js} +25 -25
  104. package/{updateDialogTitleAction-53XCCDK2.js → updateDialogTitleAction-F3ONQM3N.js} +14 -14
  105. package/{chunk-YHNUDTU4.js → chunk-VYRTLHIT.js} +3 -3
@@ -14,16 +14,16 @@ import {
14
14
  import {
15
15
  addContentToSpace,
16
16
  resolveCreationSpaceId
17
- } from "./chunk-TDLZA6LJ.js";
17
+ } from "./chunk-K7RWY7JH.js";
18
18
  import {
19
19
  runtime_default
20
- } from "./chunk-ZNOXY73P.js";
20
+ } from "./chunk-26KL6533.js";
21
21
  import {
22
22
  getCurrentSpaceId
23
- } from "./chunk-JAYPSNGR.js";
23
+ } from "./chunk-SBBSUBY3.js";
24
24
  import {
25
25
  write
26
- } from "./chunk-CO2NXG2J.js";
26
+ } from "./chunk-GJ4UTSAW.js";
27
27
  import {
28
28
  selectIdentityUserId
29
29
  } from "./chunk-PXYBUFDB.js";
@@ -6,12 +6,12 @@ import {
6
6
  loadFileFromIndexedDb,
7
7
  removeAction,
8
8
  saveFileToIndexedDb
9
- } from "./chunk-UI3Z3HDK.js";
9
+ } from "./chunk-N7UXTVAR.js";
10
10
  import {
11
11
  readAction,
12
12
  readRequestManager,
13
13
  resolveAgentReadServers
14
- } from "./chunk-U7BP25PE.js";
14
+ } from "./chunk-BTQU2PRC.js";
15
15
  import {
16
16
  beginWriteAck,
17
17
  compareRemoteRecordsByComparableTime,
@@ -29,13 +29,13 @@ import {
29
29
  shouldReplaceLocalWithRemoteRecord,
30
30
  shouldReplicateLocalRecord,
31
31
  uploadToCurrentServer
32
- } from "./chunk-ZMFA2TLE.js";
32
+ } from "./chunk-REINTCQF.js";
33
33
  import {
34
34
  asyncThunkCreator,
35
35
  buildCreateSlice,
36
36
  createEntityAdapter,
37
37
  noloDeleteRequest
38
- } from "./chunk-YB5D2GK4.js";
38
+ } from "./chunk-W4S5FQWQ.js";
39
39
  import {
40
40
  fetchFromClientDb,
41
41
  fetchFromServer,
@@ -44,7 +44,7 @@ import {
44
44
  logger,
45
45
  normalizeTimeFields,
46
46
  scopeGoogleSessionServers
47
- } from "./chunk-YHNUDTU4.js";
47
+ } from "./chunk-VYRTLHIT.js";
48
48
  import {
49
49
  isTombstoneRecord
50
50
  } from "./chunk-BV3FLP2L.js";
@@ -1516,7 +1516,7 @@ var dbSlice = createSliceWithThunks({
1516
1516
  // 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
1517
1517
  read: create.asyncThunk(
1518
1518
  async (payload, thunkApi) => {
1519
- const { readAction: readAction2 } = await import("./read-Z2JOK6F6.js");
1519
+ const { readAction: readAction2 } = await import("./read-MPPXZHAO.js");
1520
1520
  return readAction2(payload, thunkApi);
1521
1521
  },
1522
1522
  {
@@ -1590,7 +1590,7 @@ var dbSlice = createSliceWithThunks({
1590
1590
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
1591
1591
  share: create.asyncThunk(
1592
1592
  async (config, thunkApi) => {
1593
- const { shareResourceAction } = await import("./action-QQOQ2LP3.js");
1593
+ const { shareResourceAction } = await import("./action-4MADDU52.js");
1594
1594
  return shareResourceAction(config, thunkApi);
1595
1595
  }
1596
1596
  ),
@@ -3,38 +3,38 @@ import {
3
3
  } from "./chunk-VF4K2QE6.js";
4
4
  import {
5
5
  setDialogExtraReferencesAction
6
- } from "./chunk-T4VVQHSE.js";
6
+ } from "./chunk-3LL5HRIJ.js";
7
7
  import {
8
8
  fetchAndCacheTableRows
9
- } from "./chunk-TDLZA6LJ.js";
9
+ } from "./chunk-K7RWY7JH.js";
10
10
  import {
11
11
  resolveDialogRuntimeAgentKey
12
- } from "./chunk-ZNOXY73P.js";
12
+ } from "./chunk-26KL6533.js";
13
13
  import {
14
14
  createSpaceKey
15
15
  } from "./chunk-UAD2WT54.js";
16
16
  import {
17
17
  selectById
18
- } from "./chunk-CO2NXG2J.js";
18
+ } from "./chunk-GJ4UTSAW.js";
19
19
  import {
20
20
  require_react
21
21
  } from "./chunk-RD3QLZQV.js";
22
22
  import {
23
23
  selectRuntimeSnapshot
24
- } from "./chunk-ZMFA2TLE.js";
24
+ } from "./chunk-REINTCQF.js";
25
25
  import {
26
26
  createAsyncThunk
27
- } from "./chunk-YB5D2GK4.js";
27
+ } from "./chunk-W4S5FQWQ.js";
28
28
  import {
29
29
  selectIdentityUserId
30
30
  } from "./chunk-PXYBUFDB.js";
31
31
  import {
32
32
  isAgentSkillDisabled
33
- } from "./chunk-6HL6E7ZD.js";
33
+ } from "./chunk-JX2IG37T.js";
34
34
  import {
35
35
  listBuiltinSkills,
36
36
  resolveBuiltinSkillByName
37
- } from "./chunk-75TXQ4GY.js";
37
+ } from "./chunk-ZMWDHPNG.js";
38
38
  import {
39
39
  parseSkillDocProtocol
40
40
  } from "./chunk-AETZ7AD6.js";
@@ -791,7 +791,7 @@ var executeToolRun = createAsyncThunk(
791
791
  if (!executionInput) {
792
792
  throw new Error(`ToolRun ${id} has no input to execute with.`);
793
793
  }
794
- const { findToolExecutor } = await import("./tools-UZ3CDIR2.js");
794
+ const { findToolExecutor } = await import("./tools-4RFLNHUW.js");
795
795
  const { executor } = findToolExecutor(run.toolName);
796
796
  toolRunStarted({
797
797
  id: run.id,
@@ -815,7 +815,7 @@ var executeToolRun = createAsyncThunk(
815
815
  const latestState = thunkApi.getState();
816
816
  const userId = selectIdentityUserId(latestState);
817
817
  if (userId) {
818
- const { fetchUserSpaceMemberships } = await import("./memberThunks-7DNR6DRD.js");
818
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-IGYRMEQC.js");
819
819
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
820
820
  }
821
821
  }
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-GO7UC5VH.js";
4
+ } from "./chunk-2HF6DINU.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-ZNOXY73P.js";
7
+ } from "./chunk-26KL6533.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-U35UUM5K.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-GWS2X7TX.js";
4
+ } from "./chunk-NJDOID7N.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-WAOHK3NJ.js";
7
+ } from "./chunk-GUFTHWDO.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
- } from "./chunk-2PB653F5.js";
10
+ } from "./chunk-UDQZ5JT7.js";
11
11
  import {
12
12
  resolveLocalRuntimeEnvFromPolicy
13
13
  } from "./chunk-USGHJSGO.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  resolveBuiltinCapability,
3
3
  resolveBuiltinSkillEntry
4
- } from "./chunk-75TXQ4GY.js";
4
+ } from "./chunk-ZMWDHPNG.js";
5
5
  import {
6
6
  asTrimmedNonEmptyStringArray
7
7
  } from "./chunk-I42VC5KR.js";
@@ -2,13 +2,13 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-ZNOXY73P.js";
5
+ } from "./chunk-26KL6533.js";
6
6
  import {
7
7
  getAllMemberSpaces,
8
8
  getCurrentSpaceId,
9
9
  getCurrentSpaceIdRaw,
10
10
  updateCurrentSpaceIfMatch
11
- } from "./chunk-JAYPSNGR.js";
11
+ } from "./chunk-SBBSUBY3.js";
12
12
  import {
13
13
  require_formatISO
14
14
  } from "./chunk-UVLYNWIE.js";
@@ -23,7 +23,7 @@ import {
23
23
  patchIndividualContentRecord,
24
24
  readContentRecordForSpaceSync,
25
25
  syncContentRecordSpaceId
26
- } from "./chunk-JKALGWDL.js";
26
+ } from "./chunk-VZWYP7LD.js";
27
27
  import {
28
28
  createSpaceKey,
29
29
  normalizeSpaceId
@@ -36,7 +36,7 @@ import {
36
36
  uploadFileAction,
37
37
  upsertSSREntity,
38
38
  write
39
- } from "./chunk-CO2NXG2J.js";
39
+ } from "./chunk-GJ4UTSAW.js";
40
40
  import {
41
41
  resolveFileCategory
42
42
  } from "./chunk-3PVYUPXK.js";
@@ -50,13 +50,13 @@ import {
50
50
  resolveReplicationServers,
51
51
  scheduleDeleteReplication,
52
52
  scheduleWriteReplication
53
- } from "./chunk-ZMFA2TLE.js";
53
+ } from "./chunk-REINTCQF.js";
54
54
  import {
55
55
  createAsyncThunk
56
- } from "./chunk-YB5D2GK4.js";
56
+ } from "./chunk-W4S5FQWQ.js";
57
57
  import {
58
58
  getIsDesktopApp
59
- } from "./chunk-YHNUDTU4.js";
59
+ } from "./chunk-VYRTLHIT.js";
60
60
  import {
61
61
  createClientLogger
62
62
  } from "./chunk-QQ56R7KS.js";
@@ -1513,11 +1513,11 @@ var ENTITY_DELETE_STRATEGIES = {
1513
1513
  await dispatch(deleteTable({ dbKey: key })).unwrap();
1514
1514
  },
1515
1515
  file: async (key, { thunkAPI }) => {
1516
- const { deleteFileAction } = await import("./deleteFile-4TIG54YN.js");
1516
+ const { deleteFileAction } = await import("./deleteFile-TP6MKFUX.js");
1517
1517
  await deleteFileAction(key, thunkAPI);
1518
1518
  },
1519
1519
  image: async (key, { thunkAPI }) => {
1520
- const { deleteFileAction } = await import("./deleteFile-4TIG54YN.js");
1520
+ const { deleteFileAction } = await import("./deleteFile-TP6MKFUX.js");
1521
1521
  await deleteFileAction(key, thunkAPI);
1522
1522
  },
1523
1523
  agent: async (key, { dispatch, userId, sourceServerOrigin }) => {
@@ -11,6 +11,9 @@ import {
11
11
  import {
12
12
  Mutex
13
13
  } from "./chunk-IVK2KT3H.js";
14
+ import {
15
+ isDialogRecordKey
16
+ } from "./chunk-OJKUU3LP.js";
14
17
  import {
15
18
  asTrimmedLowercaseString
16
19
  } from "./chunk-QSJ3HFEF.js";
@@ -58,9 +61,41 @@ var SERVER_DB_ROLE_VIOLATION_MESSAGE = "\u5F53\u524D\u8FDB\u7A0B\u89D2\u8272\u4E
58
61
  import fs from "fs";
59
62
  import path from "path";
60
63
 
64
+ // packages/database-engine/activeDialogRunIndex.ts
65
+ var ACTIVE_DIALOG_RUN_PREFIX = "active-dialog-run-";
66
+ var DEPLOYMENT_DIALOG_RUN_PREFIX = "deployment-dialog-run-";
67
+ var DEPLOYMENT_DIALOG_CANCEL_MESSAGE = "Cancelled by deployment (will auto-recover)";
68
+ function dialogRunIndexPrefix(value) {
69
+ if (!value || typeof value !== "object") return;
70
+ const { status, errorMessage } = value;
71
+ if (status === "pending" || status === "running") return ACTIVE_DIALOG_RUN_PREFIX;
72
+ if (status === "cancelled" && errorMessage === DEPLOYMENT_DIALOG_CANCEL_MESSAGE) {
73
+ return DEPLOYMENT_DIALOG_RUN_PREFIX;
74
+ }
75
+ }
76
+ function dialogRunIndexOps(op) {
77
+ if (!isDialogRecordKey(op.key)) return [];
78
+ const member = op.type === "put" ? dialogRunIndexPrefix(op.value) : void 0;
79
+ return [ACTIVE_DIALOG_RUN_PREFIX, DEPLOYMENT_DIALOG_RUN_PREFIX].map((prefix) => {
80
+ const key = prefix + op.key;
81
+ return member === prefix ? { type: "put", key, value: true } : { type: "del", key };
82
+ });
83
+ }
84
+
61
85
  // packages/database-engine/publicationBatch.ts
62
86
  function withPublicationBatch(store) {
63
87
  const lock = new Mutex();
88
+ const batchWrite = (ops) => store.batchWrite(ops.flatMap((op) => [op, ...dialogRunIndexOps(op)]));
89
+ const put = (key, value) => {
90
+ const op = { type: "put", key, value };
91
+ const indexOps = dialogRunIndexOps(op);
92
+ return indexOps.length ? store.batchWrite([op, ...indexOps]) : store.put(key, value);
93
+ };
94
+ const del = (key) => {
95
+ const op = { type: "del", key };
96
+ const indexOps = dialogRunIndexOps(op);
97
+ return indexOps.length ? store.batchWrite([op, ...indexOps]) : store.del(key);
98
+ };
64
99
  const wrapped = {
65
100
  get location() {
66
101
  return store.location;
@@ -72,18 +107,24 @@ function withPublicationBatch(store) {
72
107
  close: () => lock.runExclusive(() => store.close()),
73
108
  get: (key) => store.get(key),
74
109
  iterator: (options) => store.iterator(options),
75
- put: (key, value) => lock.runExclusive(() => store.put(key, value)),
76
- del: (key) => lock.runExclusive(() => store.del(key)),
77
- batchWrite: (ops) => lock.runExclusive(() => store.batchWrite(ops)),
110
+ put: (key, value) => lock.runExclusive(() => put(key, value)),
111
+ del: (key) => lock.runExclusive(() => del(key)),
112
+ batchWrite: (ops) => lock.runExclusive(() => batchWrite(ops)),
78
113
  createBatch: () => {
79
114
  const batch = store.createBatch();
115
+ const stage = (op) => {
116
+ for (const entry of [op, ...dialogRunIndexOps(op)]) {
117
+ if (entry.type === "put") batch.put(entry.key, entry.value);
118
+ else batch.del(entry.key);
119
+ }
120
+ };
80
121
  return {
81
- put: (key, value) => batch.put(key, value),
82
- del: (key) => batch.del(key),
122
+ put: (key, value) => stage({ type: "put", key, value }),
123
+ del: (key) => stage({ type: "del", key }),
83
124
  write: () => lock.runExclusive(() => batch.write())
84
125
  };
85
126
  },
86
- runPublicationBatch: (task) => lock.runExclusive(() => task(store))
127
+ runPublicationBatch: (task) => lock.runExclusive(() => task({ get: wrapped.get, batchWrite }))
87
128
  };
88
129
  return wrapped;
89
130
  }
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-KZ4A7EIV.js";
4
4
  import {
5
5
  performServerProxyFetchWithRetry
6
- } from "./chunk-GO7UC5VH.js";
6
+ } from "./chunk-2HF6DINU.js";
7
7
  import {
8
8
  fetchServerSyncedCredential
9
- } from "./chunk-YQYYYATY.js";
9
+ } from "./chunk-BVCCRSGK.js";
10
10
  import {
11
11
  buildIdentityBlock,
12
12
  buildPlatformStaticContextLayers,
@@ -15,7 +15,7 @@ import {
15
15
  compileContextLayers,
16
16
  detectDispatchIntentFromMessages,
17
17
  resolveToolGuidedSections
18
- } from "./chunk-4HAOOY6G.js";
18
+ } from "./chunk-OTNPEE4G.js";
19
19
  import {
20
20
  convertMessagesToResponsesInput,
21
21
  getUsageRequestOptions,
@@ -45,7 +45,7 @@ import {
45
45
  } from "./chunk-2SXN7LAY.js";
46
46
  import {
47
47
  buildSkillGuidancePromptBlock
48
- } from "./chunk-75TXQ4GY.js";
48
+ } from "./chunk-ZMWDHPNG.js";
49
49
  import {
50
50
  canonicalizeToolNames
51
51
  } from "./chunk-YLAHYLDQ.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  selectCurrentServer,
3
3
  selectRemoteServers
4
- } from "./chunk-NNUIVAC2.js";
4
+ } from "./chunk-SCY2O7CU.js";
5
5
  import {
6
6
  noloDeleteRequest,
7
7
  noloWriteRequest
8
- } from "./chunk-YB5D2GK4.js";
8
+ } from "./chunk-W4S5FQWQ.js";
9
9
  import {
10
10
  normalizeTimeFields
11
- } from "./chunk-YHNUDTU4.js";
11
+ } from "./chunk-VYRTLHIT.js";
12
12
  import {
13
13
  selectIdentityUser,
14
14
  selectIdentityUserId
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  selectCurrentServer
3
- } from "./chunk-NNUIVAC2.js";
3
+ } from "./chunk-SCY2O7CU.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-CO2NXG2J.js";
6
+ } from "./chunk-GJ4UTSAW.js";
7
7
  import {
8
8
  getIsDesktopApp
9
- } from "./chunk-YHNUDTU4.js";
9
+ } from "./chunk-VYRTLHIT.js";
10
10
  import {
11
11
  selectIdentityToken
12
12
  } from "./chunk-PXYBUFDB.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-TDLZA6LJ.js";
3
+ } from "./chunk-K7RWY7JH.js";
4
4
  import {
5
5
  prepareAndPersistMessage
6
- } from "./chunk-ZNOXY73P.js";
6
+ } from "./chunk-26KL6533.js";
7
7
  import {
8
8
  require_format
9
9
  } from "./chunk-BUDVRYES.js";
@@ -16,10 +16,10 @@ import {
16
16
  removeCachedEntity,
17
17
  upsertSSREntity,
18
18
  write
19
- } from "./chunk-CO2NXG2J.js";
19
+ } from "./chunk-GJ4UTSAW.js";
20
20
  import {
21
21
  isDevelopment
22
- } from "./chunk-YHNUDTU4.js";
22
+ } from "./chunk-VYRTLHIT.js";
23
23
  import {
24
24
  selectIdentityUserId
25
25
  } from "./chunk-PXYBUFDB.js";
@@ -3,29 +3,29 @@ import {
3
3
  mergeReferences,
4
4
  resolveReferenceAssets,
5
5
  resolveToolsFromKeys
6
- } from "./chunk-GO7UC5VH.js";
6
+ } from "./chunk-2HF6DINU.js";
7
7
  import {
8
8
  UI_CARD_ENVELOPE_MAX_BYTES,
9
9
  getAllToolRuns,
10
10
  parseUiCard,
11
11
  uiCardFallback
12
- } from "./chunk-WAOHK3NJ.js";
12
+ } from "./chunk-GUFTHWDO.js";
13
13
  import {
14
14
  getDocState
15
- } from "./chunk-A6VIMCWI.js";
15
+ } from "./chunk-U3ZK2MXG.js";
16
16
  import {
17
17
  getTableState
18
- } from "./chunk-TDLZA6LJ.js";
18
+ } from "./chunk-K7RWY7JH.js";
19
19
  import {
20
20
  selectAllMsgs
21
- } from "./chunk-ZNOXY73P.js";
21
+ } from "./chunk-26KL6533.js";
22
22
  import {
23
23
  getCurrentSpaceIdRaw,
24
24
  getViewMode
25
- } from "./chunk-JAYPSNGR.js";
25
+ } from "./chunk-SBBSUBY3.js";
26
26
  import {
27
27
  selectById
28
- } from "./chunk-CO2NXG2J.js";
28
+ } from "./chunk-GJ4UTSAW.js";
29
29
  import {
30
30
  resolveToolBaseUrl
31
31
  } from "./chunk-KQHEGELM.js";
@@ -41,7 +41,7 @@ import {
41
41
  projectToolMessageContent,
42
42
  resolveAgentRecommendedSkillNames,
43
43
  resolveAgentRequiredPackIds
44
- } from "./chunk-6HL6E7ZD.js";
44
+ } from "./chunk-JX2IG37T.js";
45
45
  import {
46
46
  attachmentKind,
47
47
  extractReferenceKeysFromMessage,
@@ -63,7 +63,7 @@ import {
63
63
  expandEnabledPackPromptPatches,
64
64
  expandEnabledPacks,
65
65
  resolveEffectiveEnabledPacks
66
- } from "./chunk-75TXQ4GY.js";
66
+ } from "./chunk-ZMWDHPNG.js";
67
67
  import {
68
68
  metaKey
69
69
  } from "./chunk-SYTHYBMI.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getRuntimeServerContext,
3
3
  scheduleDeleteReplication
4
- } from "./chunk-ZMFA2TLE.js";
4
+ } from "./chunk-REINTCQF.js";
5
5
  import {
6
6
  fetchFromClientDb
7
- } from "./chunk-YHNUDTU4.js";
7
+ } from "./chunk-VYRTLHIT.js";
8
8
  import {
9
9
  selectIdentityToken
10
10
  } from "./chunk-PXYBUFDB.js";
@@ -71,11 +71,11 @@ import {
71
71
  } from "./chunk-ATNTHIZI.js";
72
72
  import {
73
73
  resolveUserSkillRuntime
74
- } from "./chunk-A5F6DYP2.js";
74
+ } from "./chunk-UGHNYYOE.js";
75
75
  import {
76
76
  inlineImageUrlsForCustomProvider,
77
77
  prepareTools
78
- } from "./chunk-FZI2P64R.js";
78
+ } from "./chunk-EPBEZKYK.js";
79
79
  import {
80
80
  getServerProviderSecret
81
81
  } from "./chunk-KZ4A7EIV.js";
@@ -98,7 +98,7 @@ import {
98
98
  resolveCliLocalSpawnDispatch,
99
99
  resolveRunContextFacts,
100
100
  resolveStartAgentRunCwd
101
- } from "./chunk-3N3JPQBQ.js";
101
+ } from "./chunk-NWZRCUHM.js";
102
102
  import {
103
103
  deriveCredentialGroup,
104
104
  deriveCustomProviderCredentialGroup
@@ -109,11 +109,11 @@ import {
109
109
  } from "./chunk-WMMKHEGQ.js";
110
110
  import {
111
111
  validateAskChoiceInput
112
- } from "./chunk-ITCOQAHS.js";
112
+ } from "./chunk-MOAVLCCM.js";
113
113
  import {
114
114
  prepareTokenUsageData,
115
115
  runKeyed
116
- } from "./chunk-ZNOXY73P.js";
116
+ } from "./chunk-26KL6533.js";
117
117
  import {
118
118
  applyTokenUsageToDayStats,
119
119
  require_format
@@ -124,7 +124,7 @@ import {
124
124
  } from "./chunk-523DITKR.js";
125
125
  import {
126
126
  fetchServerSyncedCredential
127
- } from "./chunk-YQYYYATY.js";
127
+ } from "./chunk-BVCCRSGK.js";
128
128
  import {
129
129
  getDefaultCliLocalRuntimeDb
130
130
  } from "./chunk-7RYODZDD.js";
@@ -136,10 +136,10 @@ import {
136
136
  CREDENTIAL_STORE_SESSION_FALLBACK_WARNING,
137
137
  OAUTH_PROVIDER_REFS,
138
138
  getSharedSessionCredentialBroker
139
- } from "./chunk-QMKWSKWA.js";
139
+ } from "./chunk-EQJK6LSN.js";
140
140
  import {
141
141
  resolveDispatchReasoningEffort
142
- } from "./chunk-2GAUJDA5.js";
142
+ } from "./chunk-CGSIW2KI.js";
143
143
  import {
144
144
  fetchWithTransientRetry,
145
145
  isTransientFetchError
@@ -192,7 +192,7 @@ import {
192
192
  readDialogMessageRecords,
193
193
  readDialogMessages,
194
194
  resolveBuiltinLocalCliAgentConfig
195
- } from "./chunk-LAQC5FAP.js";
195
+ } from "./chunk-OQOXDQLB.js";
196
196
  import {
197
197
  applyPublicAgentCatalogOverride
198
198
  } from "./chunk-D3WOFN6N.js";
@@ -249,7 +249,7 @@ import {
249
249
  runExecShellGates,
250
250
  validateConfiguredRootExecutionLease,
251
251
  verifyOwnerRouteAck
252
- } from "./chunk-2PB653F5.js";
252
+ } from "./chunk-UDQZ5JT7.js";
253
253
  import {
254
254
  createHostCredentialBrokerChain,
255
255
  createStrictHostCredentialBroker
@@ -289,7 +289,7 @@ import {
289
289
  } from "./chunk-HNUWUO75.js";
290
290
  import {
291
291
  resolveAgentRuntimeConfigFromRecord
292
- } from "./chunk-TTUIM3PJ.js";
292
+ } from "./chunk-OTOPQXP5.js";
293
293
  import {
294
294
  resolveAgentImageInputSupport,
295
295
  resolveCatalogImageSupport,
@@ -331,7 +331,7 @@ import {
331
331
  resolveAgentRequiredPackIds,
332
332
  resolveAgentSkillConfig,
333
333
  resolveHistoricalToolContentCap
334
- } from "./chunk-6HL6E7ZD.js";
334
+ } from "./chunk-JX2IG37T.js";
335
335
  import {
336
336
  MCP_TOOL_NAMES
337
337
  } from "./chunk-KXOPLLFP.js";
@@ -416,7 +416,7 @@ import {
416
416
  expandEnabledPacks,
417
417
  resolveBuiltinSkillEntry,
418
418
  resolveEffectiveEnabledPacks
419
- } from "./chunk-75TXQ4GY.js";
419
+ } from "./chunk-ZMWDHPNG.js";
420
420
  import {
421
421
  DIALOG_AGENT_LIST_INDEX_PREFIX,
422
422
  TOKEN_DIALOG_INDEX_PREFIX,
@@ -7,7 +7,7 @@ import {
7
7
  listUserRecordsFromServers,
8
8
  readDbRecordFromServers,
9
9
  readLiveDbRecordAfterTombstoneMerge
10
- } from "./chunk-ITMBFT35.js";
10
+ } from "./chunk-YWLMUFZ5.js";
11
11
  import {
12
12
  parsePositiveFiniteNumberOrFallback
13
13
  } from "./chunk-Y5GCAMGP.js";
@@ -825,7 +825,7 @@ function isExplicitDialogIdMismatch(meta, dialogId) {
825
825
  return meta && typeof meta === "object" && "id" in meta && meta.id != null && String(meta.id) !== dialogId;
826
826
  }
827
827
  async function readDialogFromLocalDb(dialogKey, dialogId, limit, readLocalDialog) {
828
- const reader = readLocalDialog ?? (await import("./localDialogRead-NXILOV3T.js")).readDialogFromLocalDb;
828
+ const reader = readLocalDialog ?? (await import("./localDialogRead-BJJT3TF5.js")).readDialogFromLocalDb;
829
829
  const result = await reader({ dialogKey, dialogId, limit });
830
830
  return {
831
831
  ...result,
@@ -840,7 +840,7 @@ async function readLocalDialogAtDbPathDefault(args) {
840
840
  );
841
841
  }
842
842
  const db = await getDefaultCliLocalRuntimeDb();
843
- const { readDialogFromLocalDb: reader } = await import("./localDialogRead-NXILOV3T.js");
843
+ const { readDialogFromLocalDb: reader } = await import("./localDialogRead-BJJT3TF5.js");
844
844
  return reader({ ...args, db });
845
845
  }
846
846
  async function readDialogFromLocalDbWithFallback(args) {