nolo-cli 0.14.0-alpha.4 → 0.14.0-alpha.6

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 (35) hide show
  1. package/{_executeModel-ERQQ5SO5.js → _executeModel-BDNT3M7C.js} +9 -9
  2. package/{agentEmailCommands-SBGSPBSS.js → agentEmailCommands-HR5GNO5Z.js} +8 -8
  3. package/{agentMachineCommands-Y7RXBTEY.js → agentMachineCommands-5UMPWDEZ.js} +1 -1
  4. package/{agentRecordCommands-LFQ3RK24.js → agentRecordCommands-27XJHS6U.js} +8 -8
  5. package/{agentRunCommand-WARBRXRP.js → agentRunCommand-USJDTEHC.js} +8 -8
  6. package/{agentSlice-F23RHRVB.js → agentSlice-6FLDYJ5L.js} +1 -1
  7. package/{chunk-LAVVL3GH.js → chunk-5R6K4O2K.js} +23 -21
  8. package/{chunk-NFRS3JW4.js → chunk-7BZOSM2E.js} +1 -1
  9. package/{chunk-7EVWUQJZ.js → chunk-7LQV6SPR.js} +4 -4
  10. package/{chunk-NVV3ABII.js → chunk-AOVMTFWV.js} +3 -3
  11. package/{chunk-KPUM5RIE.js → chunk-B5OCTKY4.js} +4 -4
  12. package/{chunk-RLOKCZNX.js → chunk-H7RWYDJI.js} +1 -1
  13. package/{chunk-NARL6TJS.js → chunk-K5X6VB6K.js} +63 -16
  14. package/{chunk-CBLNDNYI.js → chunk-P4ULL2AV.js} +2 -2
  15. package/{chunk-VIPFEPO4.js → chunk-QMGMBQCE.js} +1 -1
  16. package/{chunk-X7NITNY4.js → chunk-QWQLEBOR.js} +1 -1
  17. package/{chunk-PBP4KPF7.js → chunk-RW3RYRDZ.js} +5 -5
  18. package/{chunk-4QUXYE7J.js → chunk-TVDTAB3M.js} +3 -3
  19. package/{chunk-4GTGSUMH.js → chunk-YZ2YZTE3.js} +2 -2
  20. package/{createAgentAutomationAction-YCBXLFWW.js → createAgentAutomationAction-7K5UGUTT.js} +2 -2
  21. package/{createDialogAction-LOE4IBWI.js → createDialogAction-QOWFWYK6.js} +3 -3
  22. package/{createPageAction-MQPKRYSZ.js → createPageAction-6GXB676B.js} +2 -2
  23. package/{dialogSlice-MLJL22KB.js → dialogSlice-JNJLLNVG.js} +2 -2
  24. package/{docStore-CRULGCHQ.js → docStore-EAYEABFN.js} +3 -3
  25. package/{handleSendMessageAction-JSJC7RWU.js → handleSendMessageAction-FCVAJBHI.js} +8 -4
  26. package/index.js +15 -15
  27. package/{machineCommands-7WHQPMXF.js → machineCommands-EB6JTZMM.js} +8 -8
  28. package/{machineWsRunDispatch-EZ2IOYWT.js → machineWsRunDispatch-L3ZC55NE.js} +8 -8
  29. package/package.json +1 -1
  30. package/{readlineWorkspace-2KIRBLOS.js → readlineWorkspace-ZBG7ZV2C.js} +8 -8
  31. package/{runAgentClientLoop-GFC2XHEC.js → runAgentClientLoop-JXGJA2JD.js} +7 -7
  32. package/{spaceSlice-IYTGSETI.js → spaceSlice-KMUD3BJT.js} +4 -2
  33. package/{streamAgentChatTurn-42SBHJ6F.js → streamAgentChatTurn-ZR67N6BK.js} +8 -8
  34. package/{tools-BBNP7OHL.js → tools-5FAAMWSC.js} +5 -5
  35. package/{updateDialogTitleAction-UOULZ7J2.js → updateDialogTitleAction-XGO6IWI6.js} +2 -2
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  fetchAgentContexts
3
- } from "./chunk-NFRS3JW4.js";
3
+ } from "./chunk-7BZOSM2E.js";
4
4
  import {
5
5
  filterAndCleanMessages,
6
6
  sendOpenAICompletionsRequest
7
- } from "./chunk-PBP4KPF7.js";
7
+ } from "./chunk-RW3RYRDZ.js";
8
8
  import "./chunk-JEXVIMYZ.js";
9
- import "./chunk-RLOKCZNX.js";
9
+ import "./chunk-H7RWYDJI.js";
10
10
  import {
11
11
  generateRequestBody,
12
12
  mergeReferences,
13
13
  performFetchRequest
14
- } from "./chunk-NVV3ABII.js";
14
+ } from "./chunk-AOVMTFWV.js";
15
15
  import "./chunk-OIMX7MM4.js";
16
16
  import "./chunk-VIDPVFP3.js";
17
- import "./chunk-LAVVL3GH.js";
17
+ import "./chunk-5R6K4O2K.js";
18
18
  import "./chunk-RQSOAMPJ.js";
19
19
  import "./chunk-OOIN7HSO.js";
20
20
  import "./chunk-KQHGZWSV.js";
@@ -23,19 +23,19 @@ import "./chunk-3LY4F7SV.js";
23
23
  import "./chunk-VP4WJWKW.js";
24
24
  import "./chunk-63W5N6P3.js";
25
25
  import "./chunk-VF4K2QE6.js";
26
- import "./chunk-4GTGSUMH.js";
27
- import "./chunk-X7NITNY4.js";
26
+ import "./chunk-YZ2YZTE3.js";
27
+ import "./chunk-QWQLEBOR.js";
28
28
  import "./chunk-VC6OZXO5.js";
29
29
  import {
30
30
  selectAllMsgs,
31
31
  selectCurrentDialogConfig,
32
32
  updateTokensAction
33
- } from "./chunk-NARL6TJS.js";
33
+ } from "./chunk-K5X6VB6K.js";
34
34
  import "./chunk-V2J635L5.js";
35
35
  import "./chunk-MRC4Q34M.js";
36
36
  import "./chunk-MTU75CZ2.js";
37
37
  import "./chunk-CWMSB67P.js";
38
- import "./chunk-4QUXYE7J.js";
38
+ import "./chunk-TVDTAB3M.js";
39
39
  import "./chunk-V6VXDXGY.js";
40
40
  import "./chunk-Z4NR32XR.js";
41
41
  import "./chunk-M76ECQRD.js";
@@ -8,8 +8,8 @@ import {
8
8
  } from "./chunk-3QAF2LTL.js";
9
9
  import {
10
10
  runAgentCreateCommand
11
- } from "./chunk-VIPFEPO4.js";
12
- import "./chunk-KPUM5RIE.js";
11
+ } from "./chunk-QMGMBQCE.js";
12
+ import "./chunk-B5OCTKY4.js";
13
13
  import "./chunk-EHLHSX7R.js";
14
14
  import "./chunk-CMKUBIGW.js";
15
15
  import "./chunk-JBTJAPUF.js";
@@ -26,9 +26,9 @@ import {
26
26
  } from "./chunk-VHBWHNVT.js";
27
27
  import "./chunk-T3X232L6.js";
28
28
  import "./chunk-ATNTHIZI.js";
29
- import "./chunk-RLOKCZNX.js";
29
+ import "./chunk-H7RWYDJI.js";
30
30
  import "./chunk-OIMX7MM4.js";
31
- import "./chunk-LAVVL3GH.js";
31
+ import "./chunk-5R6K4O2K.js";
32
32
  import "./chunk-RQSOAMPJ.js";
33
33
  import "./chunk-OOIN7HSO.js";
34
34
  import "./chunk-KQHGZWSV.js";
@@ -37,16 +37,16 @@ import "./chunk-3LY4F7SV.js";
37
37
  import "./chunk-VP4WJWKW.js";
38
38
  import "./chunk-63W5N6P3.js";
39
39
  import "./chunk-VF4K2QE6.js";
40
- import "./chunk-4GTGSUMH.js";
41
- import "./chunk-X7NITNY4.js";
40
+ import "./chunk-YZ2YZTE3.js";
41
+ import "./chunk-QWQLEBOR.js";
42
42
  import "./chunk-VC6OZXO5.js";
43
43
  import "./chunk-OWOHNGCN.js";
44
- import "./chunk-NARL6TJS.js";
44
+ import "./chunk-K5X6VB6K.js";
45
45
  import "./chunk-V2J635L5.js";
46
46
  import "./chunk-MRC4Q34M.js";
47
47
  import "./chunk-MTU75CZ2.js";
48
48
  import "./chunk-CWMSB67P.js";
49
- import "./chunk-4QUXYE7J.js";
49
+ import "./chunk-TVDTAB3M.js";
50
50
  import "./chunk-V6VXDXGY.js";
51
51
  import "./chunk-Z4NR32XR.js";
52
52
  import "./chunk-M76ECQRD.js";
@@ -76,7 +76,7 @@ async function defaultExecuteCli(provider, prompt, options) {
76
76
  return executeCli(provider, prompt, options);
77
77
  }
78
78
  async function forwardConnectorRunMessage(machine, message, pushMessage, executeCli, env, fetchImpl) {
79
- const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-EZ2IOYWT.js");
79
+ const { handleConnectorRunMessage } = await import("./machineWsRunDispatch-L3ZC55NE.js");
80
80
  return handleConnectorRunMessage(message, pushMessage, executeCli, env, fetchImpl);
81
81
  }
82
82
  async function detectLaunchableMachineInfo() {
@@ -2,8 +2,8 @@ import {
2
2
  runAgentCreateCommand,
3
3
  runAgentReadCommand,
4
4
  runAgentUpdateCommand
5
- } from "./chunk-VIPFEPO4.js";
6
- import "./chunk-KPUM5RIE.js";
5
+ } from "./chunk-QMGMBQCE.js";
6
+ import "./chunk-B5OCTKY4.js";
7
7
  import "./chunk-EHLHSX7R.js";
8
8
  import "./chunk-CMKUBIGW.js";
9
9
  import "./chunk-JBTJAPUF.js";
@@ -13,9 +13,9 @@ import "./chunk-TQCONXQ3.js";
13
13
  import "./chunk-VHBWHNVT.js";
14
14
  import "./chunk-T3X232L6.js";
15
15
  import "./chunk-ATNTHIZI.js";
16
- import "./chunk-RLOKCZNX.js";
16
+ import "./chunk-H7RWYDJI.js";
17
17
  import "./chunk-OIMX7MM4.js";
18
- import "./chunk-LAVVL3GH.js";
18
+ import "./chunk-5R6K4O2K.js";
19
19
  import "./chunk-RQSOAMPJ.js";
20
20
  import "./chunk-OOIN7HSO.js";
21
21
  import "./chunk-KQHGZWSV.js";
@@ -24,16 +24,16 @@ import "./chunk-3LY4F7SV.js";
24
24
  import "./chunk-VP4WJWKW.js";
25
25
  import "./chunk-63W5N6P3.js";
26
26
  import "./chunk-VF4K2QE6.js";
27
- import "./chunk-4GTGSUMH.js";
28
- import "./chunk-X7NITNY4.js";
27
+ import "./chunk-YZ2YZTE3.js";
28
+ import "./chunk-QWQLEBOR.js";
29
29
  import "./chunk-VC6OZXO5.js";
30
30
  import "./chunk-OWOHNGCN.js";
31
- import "./chunk-NARL6TJS.js";
31
+ import "./chunk-K5X6VB6K.js";
32
32
  import "./chunk-V2J635L5.js";
33
33
  import "./chunk-MRC4Q34M.js";
34
34
  import "./chunk-MTU75CZ2.js";
35
35
  import "./chunk-CWMSB67P.js";
36
- import "./chunk-4QUXYE7J.js";
36
+ import "./chunk-TVDTAB3M.js";
37
37
  import "./chunk-V6VXDXGY.js";
38
38
  import "./chunk-Z4NR32XR.js";
39
39
  import "./chunk-M76ECQRD.js";
@@ -6,12 +6,12 @@ import {
6
6
  prependSubjectDialogMarker,
7
7
  resolveWorkflowReference,
8
8
  runAgentRunCommand
9
- } from "./chunk-7EVWUQJZ.js";
9
+ } from "./chunk-7LQV6SPR.js";
10
10
  import "./chunk-6HYVJV7B.js";
11
11
  import {
12
12
  parseAgentRunArgs
13
13
  } from "./chunk-3QAF2LTL.js";
14
- import "./chunk-KPUM5RIE.js";
14
+ import "./chunk-B5OCTKY4.js";
15
15
  import "./chunk-EHLHSX7R.js";
16
16
  import "./chunk-CMKUBIGW.js";
17
17
  import "./chunk-JBTJAPUF.js";
@@ -23,9 +23,9 @@ import "./chunk-LTRXGFMS.js";
23
23
  import "./chunk-T3X232L6.js";
24
24
  import "./chunk-ATNTHIZI.js";
25
25
  import "./chunk-JEXVIMYZ.js";
26
- import "./chunk-RLOKCZNX.js";
26
+ import "./chunk-H7RWYDJI.js";
27
27
  import "./chunk-OIMX7MM4.js";
28
- import "./chunk-LAVVL3GH.js";
28
+ import "./chunk-5R6K4O2K.js";
29
29
  import "./chunk-RQSOAMPJ.js";
30
30
  import "./chunk-OOIN7HSO.js";
31
31
  import "./chunk-KQHGZWSV.js";
@@ -34,16 +34,16 @@ import "./chunk-3LY4F7SV.js";
34
34
  import "./chunk-VP4WJWKW.js";
35
35
  import "./chunk-63W5N6P3.js";
36
36
  import "./chunk-VF4K2QE6.js";
37
- import "./chunk-4GTGSUMH.js";
38
- import "./chunk-X7NITNY4.js";
37
+ import "./chunk-YZ2YZTE3.js";
38
+ import "./chunk-QWQLEBOR.js";
39
39
  import "./chunk-VC6OZXO5.js";
40
40
  import "./chunk-OWOHNGCN.js";
41
- import "./chunk-NARL6TJS.js";
41
+ import "./chunk-K5X6VB6K.js";
42
42
  import "./chunk-V2J635L5.js";
43
43
  import "./chunk-MRC4Q34M.js";
44
44
  import "./chunk-MTU75CZ2.js";
45
45
  import "./chunk-CWMSB67P.js";
46
- import "./chunk-4QUXYE7J.js";
46
+ import "./chunk-TVDTAB3M.js";
47
47
  import "./chunk-V6VXDXGY.js";
48
48
  import "./chunk-Z4NR32XR.js";
49
49
  import "./chunk-M76ECQRD.js";
@@ -7,7 +7,7 @@ import {
7
7
  slice,
8
8
  streamAgentChatTurn,
9
9
  updateAgent
10
- } from "./chunk-4QUXYE7J.js";
10
+ } from "./chunk-TVDTAB3M.js";
11
11
  import "./chunk-5CS33IBL.js";
12
12
  import "./chunk-JZPBVBIY.js";
13
13
  import "./chunk-KX6YBIHG.js";
@@ -34,10 +34,10 @@ import {
34
34
  } from "./chunk-VF4K2QE6.js";
35
35
  import {
36
36
  createDocState
37
- } from "./chunk-4GTGSUMH.js";
37
+ } from "./chunk-YZ2YZTE3.js";
38
38
  import {
39
39
  createDialogAction
40
- } from "./chunk-X7NITNY4.js";
40
+ } from "./chunk-QWQLEBOR.js";
41
41
  import {
42
42
  buildSkillDocMarkdown,
43
43
  normalizeSkillBudgetTier,
@@ -76,13 +76,13 @@ import {
76
76
  updateContentCategory,
77
77
  updateContentTitle,
78
78
  updateStep
79
- } from "./chunk-NARL6TJS.js";
79
+ } from "./chunk-K5X6VB6K.js";
80
80
  import {
81
81
  createAgent,
82
82
  runLlm,
83
83
  streamAgentChatTurn,
84
84
  updateAgent
85
- } from "./chunk-4QUXYE7J.js";
85
+ } from "./chunk-TVDTAB3M.js";
86
86
  import {
87
87
  NOLO_WORKSPACE_TOOL_NAMES,
88
88
  buildNoloSubjectRefQueryTarget,
@@ -11200,9 +11200,10 @@ var TOOL_PACKS = {
11200
11200
  // L1 - 核心:交互 + 自我更新,所有 Agent 必有。
11201
11201
  // rememberMemory 已移至「长期记忆」能力包(defaultEnabled:true),用户可单关。
11202
11202
  CORE: ["ui_ask_choice", "read", "searchDialogMessages", "createDoc", "updateDoc", "search_workspace", "search_all_spaces", "updateSelf", "queryModelUsage", "queryUserGrowthReport", "createAgentAutomation", "notifyUser"],
11203
- // L2 - 联网搜索:配置了 web-capable tools 的 Agent 默认加,纯 QA bot 不加
11204
- LIGHT_WEB: ["exa_search", "read_x_post", "read_xhs_profile"],
11205
- // L3 - 深度浏览器:全套复杂网页交互
11203
+ // L2 - 联网搜索:与 CAPABILITY_PACKS「web-search」对齐。
11204
+ // 社交读工具属于「social-reader」包,不得因 exa_search 被旁路注入。
11205
+ LIGHT_WEB: ["exa_search", "fetchWebpage"],
11206
+ // L3 - 深度浏览器:全套复杂网页交互(与「full-browser」包对齐)
11206
11207
  FULL_BROWSER: [
11207
11208
  "browser_openSession",
11208
11209
  "browser_closeSession",
@@ -11437,16 +11438,17 @@ function applyDisabledTools(toolNames, disabledTools) {
11437
11438
  const forced = new Set(FORCED_TOOLS);
11438
11439
  return toolNames.filter((name) => !disabled.has(name) || forced.has(name));
11439
11440
  }
11440
- var WEB_CAPABLE_TOOL_NAMES = /* @__PURE__ */ new Set([
11441
+ var WEB_SEARCH_TOOL_NAMES = /* @__PURE__ */ new Set([
11441
11442
  "fetchWebpage",
11442
11443
  "exa_search",
11443
11444
  "firecrawl_scrape",
11444
- "firecrawl_search",
11445
- "read_x_post",
11446
- "read_xhs_profile"
11445
+ "firecrawl_search"
11447
11446
  ]);
11448
- function isWebCapableTool(name) {
11449
- return WEB_CAPABLE_TOOL_NAMES.has(name) || name.startsWith("browser_");
11447
+ function isWebSearchTool(name) {
11448
+ return WEB_SEARCH_TOOL_NAMES.has(name);
11449
+ }
11450
+ function isBrowserTool(name) {
11451
+ return name.startsWith("browser_");
11450
11452
  }
11451
11453
  function addDefaultLightWebToolsForConfiguredAgents(toolNames, agentConfig) {
11452
11454
  const explicitToolNames = Array.isArray(
@@ -11454,16 +11456,16 @@ function addDefaultLightWebToolsForConfiguredAgents(toolNames, agentConfig) {
11454
11456
  ) ? agentConfig.toolSurface.explicitToolNames : agentConfig?.toolNames;
11455
11457
  if (!Array.isArray(explicitToolNames) || explicitToolNames.length === 0)
11456
11458
  return toolNames;
11457
- const webCapable = explicitToolNames.some(isWebCapableTool);
11458
- if (!webCapable) return toolNames;
11459
+ const webSearch = explicitToolNames.some(isWebSearchTool);
11460
+ if (!webSearch) return toolNames;
11459
11461
  return [.../* @__PURE__ */ new Set([...toolNames, ...TOOL_PACKS.LIGHT_WEB])];
11460
11462
  }
11461
11463
  function applyDefaultWebToolPacks(args) {
11462
11464
  const enhanced = new Set(args.toolNames);
11463
- if (!args.skipWeb && args.toolNames.some(isWebCapableTool)) {
11465
+ if (!args.skipWeb && args.toolNames.some(isWebSearchTool)) {
11464
11466
  TOOL_PACKS.LIGHT_WEB.forEach((t) => enhanced.add(t));
11465
11467
  }
11466
- if (args.toolNames.some((t) => t.startsWith("browser_"))) {
11468
+ if (args.toolNames.some(isBrowserTool)) {
11467
11469
  TOOL_PACKS.FULL_BROWSER.forEach((t) => enhanced.add(t));
11468
11470
  }
11469
11471
  return [...enhanced];
@@ -14147,7 +14149,7 @@ async function deleteDialogsFunc(args, thunkApi) {
14147
14149
  const deletedDialogIds = [];
14148
14150
  const deletedDialogKeys = [];
14149
14151
  const failures = [];
14150
- const { deleteDialog } = await import("./dialogSlice-MLJL22KB.js");
14152
+ const { deleteDialog } = await import("./dialogSlice-JNJLLNVG.js");
14151
14153
  for (const target of targets) {
14152
14154
  try {
14153
14155
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -23349,7 +23351,7 @@ var executeToolRun = createAsyncThunk(
23349
23351
  if (!executionInput) {
23350
23352
  throw new Error(`ToolRun ${id} has no input to execute with.`);
23351
23353
  }
23352
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-BBNP7OHL.js");
23354
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-5FAAMWSC.js");
23353
23355
  const { executor } = findToolExecutor2(run.toolName);
23354
23356
  toolRunStarted({
23355
23357
  id: run.id,
@@ -23373,7 +23375,7 @@ var executeToolRun = createAsyncThunk(
23373
23375
  const latestState = thunkApi.getState();
23374
23376
  const userId = latestState.auth?.currentUser?.userId;
23375
23377
  if (userId) {
23376
- const { fetchUserSpaceMemberships } = await import("./spaceSlice-IYTGSETI.js");
23378
+ const { fetchUserSpaceMemberships } = await import("./spaceSlice-KMUD3BJT.js");
23377
23379
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
23378
23380
  }
23379
23381
  }
@@ -25776,7 +25778,7 @@ async function updateDocFunc(args, thunkApi) {
25776
25778
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
25777
25779
  };
25778
25780
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
25779
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-CRULGCHQ.js");
25781
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-EAYEABFN.js");
25780
25782
  if (getDocState().pageKey === id) {
25781
25783
  applyExternalDocUpdate({
25782
25784
  slateData: finalSlateData,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-NVV3ABII.js";
4
+ } from "./chunk-AOVMTFWV.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -18,7 +18,7 @@ import {
18
18
  isBuiltinNoloAgentRef,
19
19
  t,
20
20
  toolLabel
21
- } from "./chunk-KPUM5RIE.js";
21
+ } from "./chunk-B5OCTKY4.js";
22
22
  import {
23
23
  CliProviderQuotaError
24
24
  } from "./chunk-CMKUBIGW.js";
@@ -48,7 +48,7 @@ import {
48
48
  formatStatusRunCard,
49
49
  formatStopRunCard,
50
50
  isAgentRunTerminalStatus
51
- } from "./chunk-LAVVL3GH.js";
51
+ } from "./chunk-5R6K4O2K.js";
52
52
  import {
53
53
  isGatewayHttpStatus
54
54
  } from "./chunk-RQSOAMPJ.js";
@@ -57,7 +57,7 @@ import {
57
57
  chooseMemoryOwners,
58
58
  loadMemoryCandidatesFromDb,
59
59
  resolveAgentMemoryPolicy
60
- } from "./chunk-X7NITNY4.js";
60
+ } from "./chunk-QWQLEBOR.js";
61
61
  import {
62
62
  parseExternalSkillMarkdown,
63
63
  parseSkillDocProtocol
@@ -66,7 +66,7 @@ import {
66
66
  API_REPORTED_COST_MULTIPLIER,
67
67
  normalizeUsage,
68
68
  parseUiAskChoiceContent
69
- } from "./chunk-NARL6TJS.js";
69
+ } from "./chunk-K5X6VB6K.js";
70
70
  import {
71
71
  buildSkillDiscoveryContextBlock
72
72
  } from "./chunk-AS3ZQ3O2.js";
@@ -6,7 +6,7 @@ import {
6
6
  clipMultilineText,
7
7
  fetchAndSerializeTable,
8
8
  waitForAbortableDelay
9
- } from "./chunk-LAVVL3GH.js";
9
+ } from "./chunk-5R6K4O2K.js";
10
10
  import {
11
11
  createDrainExhaustedResponse,
12
12
  isCoreDrainingBody,
@@ -26,10 +26,10 @@ import {
26
26
  import {
27
27
  fetchAndCacheMessages,
28
28
  shouldUseServerProxy
29
- } from "./chunk-NARL6TJS.js";
29
+ } from "./chunk-K5X6VB6K.js";
30
30
  import {
31
31
  fetchServerSyncedCredential
32
- } from "./chunk-4QUXYE7J.js";
32
+ } from "./chunk-TVDTAB3M.js";
33
33
  import {
34
34
  buildCurrentTimeBlock,
35
35
  buildIdentityBlock,
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  inlineImageUrlsForCustomProvider,
30
30
  prepareTools
31
- } from "./chunk-RLOKCZNX.js";
31
+ } from "./chunk-H7RWYDJI.js";
32
32
  import {
33
33
  getAntigravityUserAgent,
34
34
  isAntigravityOAuthAgent,
@@ -53,7 +53,7 @@ import {
53
53
  readXhsProfileFunctionSchema,
54
54
  rememberMemoryFunctionSchema,
55
55
  resolveEffectiveEnabledPacks
56
- } from "./chunk-LAVVL3GH.js";
56
+ } from "./chunk-5R6K4O2K.js";
57
57
  import {
58
58
  createDrainExhaustedResponse,
59
59
  isCoreDrainingBody,
@@ -65,13 +65,13 @@ import {
65
65
  } from "./chunk-OWOHNGCN.js";
66
66
  import {
67
67
  prepareTokenUsageData
68
- } from "./chunk-NARL6TJS.js";
68
+ } from "./chunk-K5X6VB6K.js";
69
69
  import {
70
70
  BUILTIN_TITLE_LLM_CONFIG
71
71
  } from "./chunk-V2J635L5.js";
72
72
  import {
73
73
  fetchServerSyncedCredential
74
- } from "./chunk-4QUXYE7J.js";
74
+ } from "./chunk-TVDTAB3M.js";
75
75
  import {
76
76
  buildAgentRuntimeDialogWritePlan,
77
77
  buildLocalWorkspaceOpenAiTools,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-LAVVL3GH.js";
4
+ } from "./chunk-5R6K4O2K.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-B4KT7RN2.js";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  deleteServerSyncedCredential,
17
17
  runLlm
18
- } from "./chunk-4QUXYE7J.js";
18
+ } from "./chunk-TVDTAB3M.js";
19
19
  import {
20
20
  cleanupCliSessionForDialog
21
21
  } from "./chunk-V6VXDXGY.js";
@@ -10498,7 +10498,7 @@ var messageSlice = createSliceWithThunks({
10498
10498
  runtimeOptions: args.runtimeOptions
10499
10499
  });
10500
10500
  if (agentKeyToUse) {
10501
- const { streamAgentChatTurn } = await import("./agentSlice-F23RHRVB.js");
10501
+ const { streamAgentChatTurn } = await import("./agentSlice-6FLDYJ5L.js");
10502
10502
  await dispatch(
10503
10503
  streamAgentChatTurn({
10504
10504
  agentKey: agentKeyToUse,
@@ -13209,7 +13209,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13209
13209
  }
13210
13210
  if (isCurrentDialog) {
13211
13211
  await thunkApi.dispatch(resetMsgs());
13212
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-MLJL22KB.js");
13212
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-JNJLLNVG.js");
13213
13213
  dispatch(clearPendingAttachments2());
13214
13214
  clearWorkflow();
13215
13215
  }
@@ -13218,15 +13218,15 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13218
13218
 
13219
13219
  // packages/chat/dialog/dialogSlice.ts
13220
13220
  var runCreateDialogAction = async (args, thunkApi) => {
13221
- const { createDialogAction } = await import("./createDialogAction-LOE4IBWI.js");
13221
+ const { createDialogAction } = await import("./createDialogAction-QOWFWYK6.js");
13222
13222
  return createDialogAction(args, thunkApi);
13223
13223
  };
13224
13224
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13225
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-YCBXLFWW.js");
13225
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-7K5UGUTT.js");
13226
13226
  return createAgentAutomationAction(args, thunkApi);
13227
13227
  };
13228
13228
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13229
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-UOULZ7J2.js");
13229
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-XGO6IWI6.js");
13230
13230
  return updateDialogTitleAction(args, thunkApi);
13231
13231
  };
13232
13232
  var runAddDialogAgentAction = async (args, thunkApi) => {
@@ -13246,7 +13246,7 @@ var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13246
13246
  return setDialogExtraReferencesAction(args, thunkApi);
13247
13247
  };
13248
13248
  var runHandleSendMessageAction = async (args, thunkApi) => {
13249
- const { handleSendMessageAction } = await import("./handleSendMessageAction-JSJC7RWU.js");
13249
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-FCVAJBHI.js");
13250
13250
  return handleSendMessageAction(args, thunkApi);
13251
13251
  };
13252
13252
  function clearDialogState() {
@@ -13259,7 +13259,7 @@ var createPageAndAddReference = createAsyncThunk(
13259
13259
  async (payload, { dispatch, getState, rejectWithValue }) => {
13260
13260
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13261
13261
  try {
13262
- const { createDocState } = await import("./docStore-CRULGCHQ.js");
13262
+ const { createDocState } = await import("./docStore-EAYEABFN.js");
13263
13263
  const pageKey = await createDocState(
13264
13264
  { slateData, title },
13265
13265
  { dispatch, getState }
@@ -18414,6 +18414,13 @@ var fetchUserSpaceMembershipsAction = async (userId, thunkAPI) => {
18414
18414
  }
18415
18415
  if (membership.sourceServer || membership.requiresRemoteSpaceVerification) {
18416
18416
  if (localSpaceData && isTombstoneRecord(localSpaceData)) return null;
18417
+ if (membership.sourceServer && !membership.requiresRemoteSpaceVerification) {
18418
+ const { sourceServer: _ss, ...verifiedMembership } = membership;
18419
+ return {
18420
+ ...verifiedMembership,
18421
+ spaceId: normalizedSpaceId
18422
+ };
18423
+ }
18417
18424
  try {
18418
18425
  const remoteSpaceServers = Array.from(
18419
18426
  new Set(
@@ -18486,12 +18493,32 @@ var fetchUserSpaceMembershipsAction = async (userId, thunkAPI) => {
18486
18493
  ...activeMemberships
18487
18494
  ].map((membership) => normalizeSpaceId(membership.spaceId))
18488
18495
  );
18489
- const recoveredMemberships = hasRemoteAuthority && hasSuccessfulRemoteFetch && !isLocalActor ? await recoverMembershipsFromContentSpaces({
18490
- servers,
18491
- token,
18492
- userId,
18493
- knownSpaceIds
18494
- }) : [];
18496
+ if (hasRemoteAuthority && hasSuccessfulRemoteFetch && !isLocalActor) {
18497
+ void recoverMembershipsFromContentSpaces({
18498
+ servers,
18499
+ token,
18500
+ userId,
18501
+ knownSpaceIds
18502
+ }).then((rawRecovered) => {
18503
+ const activeUserId = thunkAPI.getState()?.auth?.currentUser?.userId ?? null;
18504
+ if (activeUserId !== userId) return;
18505
+ if (rawRecovered.length === 0) return;
18506
+ const cleaned = rawRecovered.map((membership) => {
18507
+ const {
18508
+ sourceServer: _ss,
18509
+ requiresRemoteSpaceVerification: _rv,
18510
+ deviceLocal: _dl,
18511
+ ...visible
18512
+ } = membership;
18513
+ return { ...visible, spaceId: normalizeSpaceId(membership.spaceId) };
18514
+ });
18515
+ thunkAPI.dispatch?.({
18516
+ type: "space/appendRecoveredMemberships",
18517
+ payload: cleaned
18518
+ });
18519
+ }).catch(() => {
18520
+ });
18521
+ }
18495
18522
  const membershipMap = /* @__PURE__ */ new Map();
18496
18523
  const preferAccountOnCollision = (existing, next) => {
18497
18524
  if (!existing) return next;
@@ -18501,7 +18528,7 @@ var fetchUserSpaceMembershipsAction = async (userId, thunkAPI) => {
18501
18528
  if (!existingLocal && nextLocal) return existing;
18502
18529
  return next;
18503
18530
  };
18504
- [...activeMemberships, ...recoveredMemberships].forEach((membership) => {
18531
+ [...activeMemberships].forEach((membership) => {
18505
18532
  const normalizedSpaceId = normalizeSpaceId(membership.spaceId);
18506
18533
  const {
18507
18534
  sourceServer: _sourceServer,
@@ -19872,6 +19899,24 @@ var spaceSlice = createSliceWithThunks4({
19872
19899
  state3.loading = false;
19873
19900
  }
19874
19901
  ),
19902
+ /** 后台内容空间恢复完成后,把补漏的 membership 追加到列表。
19903
+ * recoverMembershipsFromContentSpaces 查"本地有内容但缺 membership 索引"的 space,
19904
+ * 是一致性兜底,不阻塞首屏。thunk 先返回 verify 后的列表,recover 完成后 dispatch 此 action。
19905
+ * 注意:thunk 端已做 actor 校验(账户切换后旧 recover 不 dispatch),且已剥离
19906
+ * sourceServer/requiresRemoteSpaceVerification/deviceLocal 等传输字段。 */
19907
+ appendRecoveredMemberships: create.reducer(
19908
+ (state3, action2) => {
19909
+ if (!action2.payload || action2.payload.length === 0) return;
19910
+ if (state3.memberSpaces === null) {
19911
+ state3.memberSpaces = dedupeMemberSpacesById(action2.payload);
19912
+ return;
19913
+ }
19914
+ state3.memberSpaces = dedupeMemberSpacesById([
19915
+ ...state3.memberSpaces,
19916
+ ...action2.payload
19917
+ ]).sort((a, b) => toTimestampMs(b.joinedAt) - toTimestampMs(a.joinedAt));
19918
+ }
19919
+ ),
19875
19920
  /** 进入某个对话后清除其未读提示。
19876
19921
  * 当前阶段只做"网页端切换不停止"的第一层体验:
19877
19922
  * - 侧边栏能看到后台对话 done/failed 后有未读点
@@ -19942,7 +19987,8 @@ var {
19942
19987
  resetSpace,
19943
19988
  setViewMode,
19944
19989
  toggleFavoritesCollapse,
19945
- hydrateMemberSpacesFromLocal
19990
+ hydrateMemberSpacesFromLocal,
19991
+ appendRecoveredMemberships
19946
19992
  } = spaceSlice.actions;
19947
19993
  var selectSpaceState = (state3) => state3.space;
19948
19994
  var selectCurrentSpaceId = createSelector(
@@ -20116,6 +20162,7 @@ export {
20116
20162
  setViewMode,
20117
20163
  toggleFavoritesCollapse,
20118
20164
  hydrateMemberSpacesFromLocal,
20165
+ appendRecoveredMemberships,
20119
20166
  selectCurrentSpaceId,
20120
20167
  selectCurrentSpace,
20121
20168
  selectAllMemberSpaces,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-KPUM5RIE.js";
4
+ } from "./chunk-B5OCTKY4.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-LAVVL3GH.js";
7
+ } from "./chunk-5R6K4O2K.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
10
  } from "./chunk-VQFY3VXW.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-KPUM5RIE.js";
3
+ } from "./chunk-B5OCTKY4.js";
4
4
  import {
5
5
  getReadableCliDb
6
6
  } from "./chunk-W4NVOSFF.js";
@@ -3,7 +3,7 @@ import {
3
3
  prepareAndPersistMessage,
4
4
  uiAskChoiceFunc,
5
5
  uiAskChoiceFunctionSchema
6
- } from "./chunk-NARL6TJS.js";
6
+ } from "./chunk-K5X6VB6K.js";
7
7
  import {
8
8
  require_date_fns
9
9
  } from "./chunk-M76ECQRD.js";