nolo-cli 0.248.0-alpha.1 → 0.248.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 (45) hide show
  1. package/{_executeModel-GIFVXKDT.js → _executeModel-H72XB2UR.js} +12 -12
  2. package/{agentDeleteCommand-UF7XVELS.js → agentDeleteCommand-4AFQNHDD.js} +9 -9
  3. package/{agentEmailCommands-SFHRPQYC.js → agentEmailCommands-6FR6TBJM.js} +10 -10
  4. package/{agentMachineCommands-7NX6PWQ6.js → agentMachineCommands-KCTPKYZM.js} +1 -1
  5. package/{agentRecordCommands-IUNX6XD6.js → agentRecordCommands-JG3TB55T.js} +10 -10
  6. package/{agentRunCommand-LCR4XADM.js → agentRunCommand-ZUKU7SYB.js} +10 -10
  7. package/{agentSlice-ZGMOH6TE.js → agentSlice-6EPEKSJT.js} +1 -1
  8. package/{chunk-X22AUZKL.js → chunk-2JWRKVDC.js} +116 -77
  9. package/{chunk-VKCPKCSS.js → chunk-3IQEZYPF.js} +2 -2
  10. package/{chunk-YFW4H6DL.js → chunk-A6BALTVL.js} +8 -8
  11. package/{chunk-R5NRFXGD.js → chunk-E2CYOBQS.js} +1 -1
  12. package/{chunk-SCMYAGQE.js → chunk-IVY2CQBD.js} +5 -5
  13. package/{chunk-N74XL3NI.js → chunk-JT4HJLIL.js} +3 -3
  14. package/{chunk-IIOSZAJX.js → chunk-KABDRAUT.js} +2 -2
  15. package/{chunk-6CXQ3YNJ.js → chunk-KFGL66WO.js} +6 -6
  16. package/{chunk-RMWDKLBE.js → chunk-LDX32FHM.js} +5 -5
  17. package/{chunk-KZ5OD2MO.js → chunk-LQ7WOIVV.js} +2 -2
  18. package/{chunk-HCCQEMTK.js → chunk-OY3XGLWR.js} +1 -1
  19. package/{chunk-LMGFVH65.js → chunk-RMA5H7R5.js} +3 -3
  20. package/{chunk-FTWAOKFU.js → chunk-VFXMN3QM.js} +8 -8
  21. package/{chunk-EQZQUQ33.js → chunk-W2PX6LH4.js} +2 -2
  22. package/{chunk-J2VIGDJN.js → chunk-WZFQBO5N.js} +2 -2
  23. package/{chunk-JU7VN4LF.js → chunk-XSZLVTD3.js} +2 -2
  24. package/{chunk-3DJJ4CFG.js → chunk-Y6DW3JTS.js} +2 -2
  25. package/{chunk-ODBYGVO2.js → chunk-YMKSYLT7.js} +2 -2
  26. package/{commandRegistry-NTH5IAN5.js → commandRegistry-OXNZPSGC.js} +15 -15
  27. package/{contentThunks-SPXTX5U2.js → contentThunks-RHE6A4AH.js} +3 -3
  28. package/{createAgentAutomationAction-KUQKCOXB.js → createAgentAutomationAction-TZ2CN6BM.js} +3 -3
  29. package/{createDialogAction-HJN5U3XS.js → createDialogAction-4JC5EYQT.js} +4 -4
  30. package/{createPageAction-ZAHRDOAU.js → createPageAction-WQREAKL3.js} +4 -4
  31. package/{dialogSlice-BXIERQHO.js → dialogSlice-DI2DW4UP.js} +2 -2
  32. package/{docStore-FZ75HWP2.js → docStore-A4UDG56G.js} +1 -1
  33. package/{handleSendMessageAction-KP6GGBFY.js → handleSendMessageAction-RO647P4V.js} +21 -9
  34. package/{hostCredentialCreate-23TX56G7.js → hostCredentialCreate-4CHXN6U5.js} +10 -10
  35. package/index.js +3 -3
  36. package/{localRuntimeAdapter-MTUWOYPN.js → localRuntimeAdapter-UB3RWVUD.js} +9 -9
  37. package/{machineCommands-4WJUJQHW.js → machineCommands-EMUNGUKT.js} +10 -10
  38. package/{machineWsRunDispatch-V3U4JM67.js → machineWsRunDispatch-GL4IASSZ.js} +10 -10
  39. package/package.json +1 -1
  40. package/{projectArchive-NU2Z5HOR.js → projectArchive-ZRQPLQEI.js} +4 -4
  41. package/{readlineWorkspace-T56MRMS5.js → readlineWorkspace-IUUODHF4.js} +13 -13
  42. package/{runAgentClientLoop-O2GRCGRZ.js → runAgentClientLoop-HHKMRV4B.js} +10 -10
  43. package/{streamAgentChatTurn-OWDJMU5E.js → streamAgentChatTurn-URBDXKCY.js} +15 -37
  44. package/{tools-O7SGGVA3.js → tools-USMXBZZV.js} +7 -7
  45. package/{updateDialogTitleAction-EXSZGTLL.js → updateDialogTitleAction-LTDUWMHQ.js} +3 -3
@@ -458,7 +458,7 @@ var slice = createSliceWithThunks({
458
458
  const overrides = {};
459
459
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
460
460
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
461
- const { _executeModel } = await import("./_executeModel-GIFVXKDT.js");
461
+ const { _executeModel } = await import("./_executeModel-H72XB2UR.js");
462
462
  return _executeModel(
463
463
  {
464
464
  isStreaming: args.isStreaming ?? false,
@@ -479,7 +479,7 @@ var slice = createSliceWithThunks({
479
479
  * - 循环直到无工具调用或触发其他运行时停止条件
480
480
  */
481
481
  runAgent: create.asyncThunk(async (args, thunkApi) => {
482
- const { runAgentClientLoop } = await import("./runAgentClientLoop-O2GRCGRZ.js");
482
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-HHKMRV4B.js");
483
483
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
484
484
  {
485
485
  agentKey: args.agentKey,
@@ -495,7 +495,7 @@ var slice = createSliceWithThunks({
495
495
  * 聊天轮次流式 Agent 调用
496
496
  */
497
497
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
498
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-OWDJMU5E.js");
498
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-URBDXKCY.js");
499
499
  return streamAgentChatTurnHandler(args, thunkApi);
500
500
  }),
501
501
  /**
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  toolRegistry
3
- } from "./chunk-FTWAOKFU.js";
3
+ } from "./chunk-VFXMN3QM.js";
4
4
  import {
5
5
  runtime_default
6
- } from "./chunk-YFW4H6DL.js";
6
+ } from "./chunk-A6BALTVL.js";
7
7
  import {
8
8
  canonicalizeToolNames
9
9
  } from "./chunk-YLAHYLDQ.js";
@@ -5,7 +5,7 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-IIOSZAJX.js";
8
+ } from "./chunk-KABDRAUT.js";
9
9
  import {
10
10
  CONFIRMATION_INPUT_KEYS,
11
11
  INVALID_TOOL_ARGS_REPLACEMENT,
@@ -14,11 +14,11 @@ import {
14
14
  performFetchRequest,
15
15
  sanitizeOutboundMessages,
16
16
  stripModelToolArgs
17
- } from "./chunk-VKCPKCSS.js";
17
+ } from "./chunk-3IQEZYPF.js";
18
18
  import {
19
19
  findToolExecutor,
20
20
  toolDefinitionsByName
21
- } from "./chunk-FTWAOKFU.js";
21
+ } from "./chunk-VFXMN3QM.js";
22
22
  import {
23
23
  createSSEParser,
24
24
  createToolRunId,
@@ -27,7 +27,7 @@ import {
27
27
  toolRunSetPending,
28
28
  toolRunStarted,
29
29
  toolRunSucceeded
30
- } from "./chunk-LMGFVH65.js";
30
+ } from "./chunk-RMA5H7R5.js";
31
31
  import {
32
32
  addToolMessage,
33
33
  messageStreamEnd,
@@ -35,10 +35,10 @@ import {
35
35
  toast,
36
36
  toolResultNeedsUserConfirmation,
37
37
  updateToolMessage
38
- } from "./chunk-YFW4H6DL.js";
38
+ } from "./chunk-A6BALTVL.js";
39
39
  import {
40
40
  streamAgentChatTurn
41
- } from "./chunk-N74XL3NI.js";
41
+ } from "./chunk-JT4HJLIL.js";
42
42
  import {
43
43
  getCurrentSpaceId
44
44
  } from "./chunk-FFFKAOJN.js";
@@ -33,7 +33,7 @@ import {
33
33
  resolveServerUrl,
34
34
  validateInstaboxWorkspaceSelection,
35
35
  writeUsage
36
- } from "./chunk-SCMYAGQE.js";
36
+ } from "./chunk-IVY2CQBD.js";
37
37
  import {
38
38
  boxGlyphs,
39
39
  displayWidth,
@@ -86,14 +86,14 @@ import {
86
86
  } from "./chunk-S73EPYNC.js";
87
87
  import {
88
88
  resolveCliLocalRuntimeKeyCapability
89
- } from "./chunk-FTWAOKFU.js";
89
+ } from "./chunk-VFXMN3QM.js";
90
90
  import {
91
91
  extractGoogleValidationLink
92
92
  } from "./chunk-BMQ2MJUK.js";
93
93
  import {
94
94
  parseUiCard,
95
95
  uiCardFallback
96
- } from "./chunk-LMGFVH65.js";
96
+ } from "./chunk-RMA5H7R5.js";
97
97
  import {
98
98
  isGatewayHttpStatus
99
99
  } from "./chunk-NF64D32W.js";
@@ -104,7 +104,7 @@ import {
104
104
  loadOwnerItemsFromDb,
105
105
  parseUiAskChoiceContent,
106
106
  resolveAgentMemoryPolicy
107
- } from "./chunk-ODBYGVO2.js";
107
+ } from "./chunk-YMKSYLT7.js";
108
108
  import {
109
109
  API_REPORTED_COST_MULTIPLIER,
110
110
  estimateMessagesTokens,
@@ -113,7 +113,7 @@ import {
113
113
  resolveAgentContextWindow,
114
114
  resolveOccupancy,
115
115
  resolveOccupancyWindow
116
- } from "./chunk-YFW4H6DL.js";
116
+ } from "./chunk-A6BALTVL.js";
117
117
  import {
118
118
  parsePositiveFiniteNumberOrFallback
119
119
  } from "./chunk-Y5GCAMGP.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-JU7VN4LF.js";
4
+ } from "./chunk-XSZLVTD3.js";
5
5
  import {
6
6
  updateTokensAction
7
- } from "./chunk-YFW4H6DL.js";
7
+ } from "./chunk-A6BALTVL.js";
8
8
  import {
9
9
  applyUpdateTokensFulfilled
10
10
  } from "./chunk-U35UUM5K.js";
@@ -2,7 +2,7 @@ import {
2
2
  deleteDialog,
3
3
  runtime_default,
4
4
  toast
5
- } from "./chunk-YFW4H6DL.js";
5
+ } from "./chunk-A6BALTVL.js";
6
6
  import {
7
7
  getAllMemberSpaces,
8
8
  getCurrentSpaceId,
@@ -6,10 +6,10 @@ import {
6
6
  } from "./chunk-OLGFIQN2.js";
7
7
  import {
8
8
  fetchAndCacheTableRows
9
- } from "./chunk-HCCQEMTK.js";
9
+ } from "./chunk-OY3XGLWR.js";
10
10
  import {
11
11
  resolveDialogRuntimeAgentKey
12
- } from "./chunk-YFW4H6DL.js";
12
+ } from "./chunk-A6BALTVL.js";
13
13
  import {
14
14
  createSpaceKey
15
15
  } from "./chunk-UAD2WT54.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-O7SGGVA3.js");
794
+ const { findToolExecutor } = await import("./tools-USMXBZZV.js");
795
795
  const { executor } = findToolExecutor(run.toolName);
796
796
  toolRunStarted({
797
797
  id: run.id,
@@ -38,7 +38,7 @@ import {
38
38
  toolRunUpdated,
39
39
  uiCardFallback,
40
40
  waitForAbortableDelay
41
- } from "./chunk-LMGFVH65.js";
41
+ } from "./chunk-RMA5H7R5.js";
42
42
  import {
43
43
  isGatewayHttpStatus
44
44
  } from "./chunk-NF64D32W.js";
@@ -47,7 +47,7 @@ import {
47
47
  } from "./chunk-UOUMPHS5.js";
48
48
  import {
49
49
  createDocState
50
- } from "./chunk-J2VIGDJN.js";
50
+ } from "./chunk-WZFQBO5N.js";
51
51
  import {
52
52
  readDocFunc,
53
53
  readDocFunctionSchema,
@@ -59,7 +59,7 @@ import {
59
59
  createDialogAction,
60
60
  uiAskChoiceFunc,
61
61
  uiAskChoiceFunctionSchema
62
- } from "./chunk-ODBYGVO2.js";
62
+ } from "./chunk-YMKSYLT7.js";
63
63
  import {
64
64
  DEFAULT_COLLAPSED_CATEGORIES,
65
65
  addContentToSpace,
@@ -76,7 +76,7 @@ import {
76
76
  updateContentCategory,
77
77
  updateContentTitle,
78
78
  writeStoredCollapsedCategories
79
- } from "./chunk-HCCQEMTK.js";
79
+ } from "./chunk-OY3XGLWR.js";
80
80
  import {
81
81
  buildDatabaseFileContentUrl,
82
82
  deleteDialog,
@@ -85,14 +85,14 @@ import {
85
85
  selectCurrentDialogConfig,
86
86
  selectCurrentDialogId,
87
87
  selectMsgById
88
- } from "./chunk-YFW4H6DL.js";
88
+ } from "./chunk-A6BALTVL.js";
89
89
  import {
90
90
  createAgent,
91
91
  deleteServerSyncedCredential,
92
92
  runLlm,
93
93
  streamAgentChatTurn,
94
94
  updateAgent
95
- } from "./chunk-N74XL3NI.js";
95
+ } from "./chunk-JT4HJLIL.js";
96
96
  import {
97
97
  addMemberSpace,
98
98
  getAllMemberSpaces,
@@ -4012,7 +4012,7 @@ async function deleteDialogsFunc(args, thunkApi) {
4012
4012
  const deletedDialogIds = [];
4013
4013
  const deletedDialogKeys = [];
4014
4014
  const failures = [];
4015
- const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-BXIERQHO.js");
4015
+ const { deleteDialog: deleteDialog2 } = await import("./dialogSlice-DI2DW4UP.js");
4016
4016
  for (const target of targets) {
4017
4017
  try {
4018
4018
  await thunkApi.dispatch(deleteDialog2(target.dbKey)).unwrap();
@@ -19396,7 +19396,7 @@ async function updateDocFunc(args, thunkApi) {
19396
19396
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
19397
19397
  };
19398
19398
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
19399
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-FZ75HWP2.js");
19399
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-A4UDG56G.js");
19400
19400
  if (getDocState().pageKey === id) {
19401
19401
  applyExternalDocUpdate({
19402
19402
  slateData: finalSlateData,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-SCMYAGQE.js";
4
+ } from "./chunk-IVY2CQBD.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-LMGFVH65.js";
7
+ } from "./chunk-RMA5H7R5.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
10
  } from "./chunk-XNTZD4AE.js";
@@ -335,7 +335,7 @@ async function saveDocState(arg, { dispatch, getState }) {
335
335
  ).unwrap();
336
336
  if (dbSpaceId) {
337
337
  try {
338
- const { updateContentTitle } = await import("./contentThunks-SPXTX5U2.js");
338
+ const { updateContentTitle } = await import("./contentThunks-RHE6A4AH.js");
339
339
  await dispatch(
340
340
  updateContentTitle({
341
341
  spaceId: dbSpaceId,
@@ -378,7 +378,7 @@ async function saveDocState(arg, { dispatch, getState }) {
378
378
  }
379
379
  }
380
380
  async function createDocState(args, thunkApi) {
381
- const { createPageAction } = await import("./createPageAction-ZAHRDOAU.js");
381
+ const { createPageAction } = await import("./createPageAction-WQREAKL3.js");
382
382
  return createPageAction(args, thunkApi);
383
383
  }
384
384
  function subscribe(listener) {
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-LMGFVH65.js";
5
+ } from "./chunk-RMA5H7R5.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -15,7 +15,7 @@ import {
15
15
  } from "./chunk-AGIM7IMJ.js";
16
16
  import {
17
17
  fetchAndCacheMessages
18
- } from "./chunk-YFW4H6DL.js";
18
+ } from "./chunk-A6BALTVL.js";
19
19
  import {
20
20
  createSpaceKey
21
21
  } from "./chunk-UAD2WT54.js";
@@ -14,10 +14,10 @@ import {
14
14
  import {
15
15
  addContentToSpace,
16
16
  resolveCreationSpaceId
17
- } from "./chunk-HCCQEMTK.js";
17
+ } from "./chunk-OY3XGLWR.js";
18
18
  import {
19
19
  runtime_default
20
- } from "./chunk-YFW4H6DL.js";
20
+ } from "./chunk-A6BALTVL.js";
21
21
  import {
22
22
  getCurrentSpaceId
23
23
  } from "./chunk-FFFKAOJN.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-HCCQEMTK.js";
3
+ } from "./chunk-OY3XGLWR.js";
4
4
  import {
5
5
  prepareAndPersistMessage
6
- } from "./chunk-YFW4H6DL.js";
6
+ } from "./chunk-A6BALTVL.js";
7
7
  import {
8
8
  require_format
9
9
  } from "./chunk-BUDVRYES.js";
@@ -112,7 +112,7 @@ function createDaemonShortcutCommand(path, description, command) {
112
112
  // packages/cli/agentInternalCommandEntries.ts
113
113
  function getAgentInternalCommandEntries() {
114
114
  const createAgentRunCommand = (path, description) => createContextCommand(path, description, async (args, ctx) => {
115
- const { runAgentRunCommand } = await import("./agentRunCommand-LCR4XADM.js");
115
+ const { runAgentRunCommand } = await import("./agentRunCommand-ZUKU7SYB.js");
116
116
  return runAgentRunCommand(args, {
117
117
  env: ctx.env,
118
118
  scriptDir: ctx.scriptDir,
@@ -128,7 +128,7 @@ function getAgentInternalCommandEntries() {
128
128
  return runAgentListCommand(args, deps);
129
129
  }),
130
130
  createEnvCommand(["agent", "create"], "Create a new agent", async (args, deps) => {
131
- const { runAgentCreateCommand } = await import("./agentRecordCommands-IUNX6XD6.js");
131
+ const { runAgentCreateCommand } = await import("./agentRecordCommands-JG3TB55T.js");
132
132
  return runAgentCreateCommand(args, deps);
133
133
  }),
134
134
  createEnvCommand(["agent", "models"], "List models: --preset <id> (server discovery, exit 1 on static fallback) or --url <base> --api-key <key> (OpenAI-compatible /models)", async (args, deps) => {
@@ -144,7 +144,7 @@ function getAgentInternalCommandEntries() {
144
144
  return runAgentPullCommand(args, deps);
145
145
  }),
146
146
  createEnvCommand(["agent", "read"], "Read a single agent", async (args, deps) => {
147
- const { runAgentReadCommand } = await import("./agentRecordCommands-IUNX6XD6.js");
147
+ const { runAgentReadCommand } = await import("./agentRecordCommands-JG3TB55T.js");
148
148
  return runAgentReadCommand(args, deps);
149
149
  }),
150
150
  createAgentRunCommand(["agent", "run"], "Run an agent"),
@@ -177,31 +177,31 @@ function getAgentInternalCommandEntries() {
177
177
  return runSetupOfflineMarxistsAgentCommand(args, deps);
178
178
  }),
179
179
  createEnvCommand(["agent", "update"], "Update agent fields", async (args, deps) => {
180
- const { runAgentUpdateCommand } = await import("./agentRecordCommands-IUNX6XD6.js");
180
+ const { runAgentUpdateCommand } = await import("./agentRecordCommands-JG3TB55T.js");
181
181
  return runAgentUpdateCommand(args, deps);
182
182
  }),
183
183
  createEnvCommand(["agent", "email", "provision"], "Provision a controlled inbox for an agent", async (args, deps) => {
184
- const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-SFHRPQYC.js");
184
+ const { runAgentEmailProvisionCommand } = await import("./agentEmailCommands-6FR6TBJM.js");
185
185
  return runAgentEmailProvisionCommand(args, deps);
186
186
  }),
187
187
  createEnvCommand(["agent", "email", "bind"], "Bind an existing email address to an agent", async (args, deps) => {
188
- const { runAgentEmailBindCommand } = await import("./agentEmailCommands-SFHRPQYC.js");
188
+ const { runAgentEmailBindCommand } = await import("./agentEmailCommands-6FR6TBJM.js");
189
189
  return runAgentEmailBindCommand(args, deps);
190
190
  }),
191
191
  createEnvCommand(["agent", "email", "transfer"], "Transfer an email identity from one agent to another (cross-account)", async (args, deps) => {
192
- const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-SFHRPQYC.js");
192
+ const { runAgentEmailTransferCommand } = await import("./agentEmailCommands-6FR6TBJM.js");
193
193
  return runAgentEmailTransferCommand(args, deps);
194
194
  }),
195
195
  createEnvCommand(
196
196
  ["agent", "email", "create-and-provision"],
197
197
  "Create an agent and provision its controlled inbox",
198
198
  async (args, deps) => {
199
- const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-SFHRPQYC.js");
199
+ const { runAgentEmailCreateAndProvisionCommand } = await import("./agentEmailCommands-6FR6TBJM.js");
200
200
  return runAgentEmailCreateAndProvisionCommand(args, deps);
201
201
  }
202
202
  ),
203
203
  createEnvCommand(["agent", "delete"], "Hard-delete an agent's private and public records", async (args, deps) => {
204
- const { runAgentDeleteCommand } = await import("./agentDeleteCommand-UF7XVELS.js");
204
+ const { runAgentDeleteCommand } = await import("./agentDeleteCommand-4AFQNHDD.js");
205
205
  return runAgentDeleteCommand(args, deps);
206
206
  }),
207
207
  createEnvCommand(["agent", "grant"], "Grant another user access to this agent's owner credentials", async (args, deps) => {
@@ -221,15 +221,15 @@ function getAgentInternalCommandEntries() {
221
221
  return runAgentRevokeGrantCommand(args, deps);
222
222
  }),
223
223
  createEnvCommand(["agent", "bind-current"], "Bind an agent to this machine", async (args, deps) => {
224
- const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-7NX6PWQ6.js");
224
+ const { runAgentBindCurrentCommand } = await import("./agentMachineCommands-KCTPKYZM.js");
225
225
  return runAgentBindCurrentCommand(args, deps);
226
226
  }),
227
227
  createEnvCommand(["agent", "smoke-current"], "Smoke test a bound agent through this machine", async (args, deps) => {
228
- const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-7NX6PWQ6.js");
228
+ const { runAgentSmokeCurrentCommand } = await import("./agentMachineCommands-KCTPKYZM.js");
229
229
  return runAgentSmokeCurrentCommand(args, deps);
230
230
  }),
231
231
  createEnvCommand(["agent", "runtime-doctor"], "Diagnose current machine runtime compatibility", async (args, deps) => {
232
- const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-7NX6PWQ6.js");
232
+ const { runAgentRuntimeDoctorCommand } = await import("./agentMachineCommands-KCTPKYZM.js");
233
233
  return runAgentRuntimeDoctorCommand(args, deps);
234
234
  }),
235
235
  createAgentRunCommand(["agent", "chat"], "Chat with an agent")
@@ -593,15 +593,15 @@ function getSystemInternalCommandEntries(renderHelpText2) {
593
593
  return runWhoamiCommand({ args, env: ctx.env });
594
594
  }),
595
595
  createEntrypointEnvCommand(["connect"], "Hold a connector websocket for this machine", async (args, deps) => {
596
- const { runMachineConnectCommand } = await import("./machineCommands-4WJUJQHW.js");
596
+ const { runMachineConnectCommand } = await import("./machineCommands-EMUNGUKT.js");
597
597
  return runMachineConnectCommand(args, deps);
598
598
  }),
599
599
  createDaemonShortcutCommand(["daemon"], "Run the connector daemon shortcut", async (args, deps) => {
600
- const { runMachineConnectCommand } = await import("./machineCommands-4WJUJQHW.js");
600
+ const { runMachineConnectCommand } = await import("./machineCommands-EMUNGUKT.js");
601
601
  return runMachineConnectCommand(args, deps);
602
602
  }),
603
603
  createEnvCommand(["machine", "status"], "List machines registered to the current profile", async (args, deps) => {
604
- const { runMachineStatusCommand } = await import("./machineCommands-4WJUJQHW.js");
604
+ const { runMachineStatusCommand } = await import("./machineCommands-EMUNGUKT.js");
605
605
  return runMachineStatusCommand(args, deps);
606
606
  }),
607
607
  createEnvCommand(["doctor", "runtime"], "Diagnose local-first agent runtime selection", async (args, deps) => {
@@ -9,12 +9,12 @@ import {
9
9
  updateContentPinned,
10
10
  updateContentTitle,
11
11
  uploadAndAddFileToSpace
12
- } from "./chunk-HCCQEMTK.js";
13
- import "./chunk-YFW4H6DL.js";
12
+ } from "./chunk-OY3XGLWR.js";
13
+ import "./chunk-A6BALTVL.js";
14
14
  import "./chunk-TZXPT53C.js";
15
15
  import "./chunk-BUDVRYES.js";
16
16
  import "./chunk-523DITKR.js";
17
- import "./chunk-N74XL3NI.js";
17
+ import "./chunk-JT4HJLIL.js";
18
18
  import "./chunk-FFFKAOJN.js";
19
19
  import "./chunk-BYXBJQAS.js";
20
20
  import "./chunk-ARFCL53U.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-HCCQEMTK.js";
4
- import "./chunk-YFW4H6DL.js";
3
+ } from "./chunk-OY3XGLWR.js";
4
+ import "./chunk-A6BALTVL.js";
5
5
  import "./chunk-TZXPT53C.js";
6
6
  import "./chunk-BUDVRYES.js";
7
7
  import "./chunk-523DITKR.js";
8
- import "./chunk-N74XL3NI.js";
8
+ import "./chunk-JT4HJLIL.js";
9
9
  import "./chunk-FFFKAOJN.js";
10
10
  import "./chunk-BYXBJQAS.js";
11
11
  import "./chunk-ARFCL53U.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  createDialogAction,
3
3
  isLocalOwnerDialogAgents
4
- } from "./chunk-ODBYGVO2.js";
5
- import "./chunk-HCCQEMTK.js";
6
- import "./chunk-YFW4H6DL.js";
4
+ } from "./chunk-YMKSYLT7.js";
5
+ import "./chunk-OY3XGLWR.js";
6
+ import "./chunk-A6BALTVL.js";
7
7
  import "./chunk-TZXPT53C.js";
8
8
  import "./chunk-BUDVRYES.js";
9
9
  import "./chunk-523DITKR.js";
10
- import "./chunk-N74XL3NI.js";
10
+ import "./chunk-JT4HJLIL.js";
11
11
  import "./chunk-FFFKAOJN.js";
12
12
  import "./chunk-BYXBJQAS.js";
13
13
  import "./chunk-ARFCL53U.js";
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createPageAction
3
- } from "./chunk-3DJJ4CFG.js";
3
+ } from "./chunk-Y6DW3JTS.js";
4
4
  import "./chunk-VIYVRPMJ.js";
5
5
  import "./chunk-VF4K2QE6.js";
6
6
  import "./chunk-AGIM7IMJ.js";
7
7
  import "./chunk-63W5N6P3.js";
8
- import "./chunk-HCCQEMTK.js";
9
- import "./chunk-YFW4H6DL.js";
8
+ import "./chunk-OY3XGLWR.js";
9
+ import "./chunk-A6BALTVL.js";
10
10
  import "./chunk-TZXPT53C.js";
11
11
  import "./chunk-BUDVRYES.js";
12
12
  import "./chunk-523DITKR.js";
13
- import "./chunk-N74XL3NI.js";
13
+ import "./chunk-JT4HJLIL.js";
14
14
  import "./chunk-FFFKAOJN.js";
15
15
  import "./chunk-BYXBJQAS.js";
16
16
  import "./chunk-ARFCL53U.js";
@@ -20,11 +20,11 @@ import {
20
20
  switchDialogAgent,
21
21
  updateDialogTitle,
22
22
  updateTokens
23
- } from "./chunk-YFW4H6DL.js";
23
+ } from "./chunk-A6BALTVL.js";
24
24
  import "./chunk-TZXPT53C.js";
25
25
  import "./chunk-BUDVRYES.js";
26
26
  import "./chunk-523DITKR.js";
27
- import "./chunk-N74XL3NI.js";
27
+ import "./chunk-JT4HJLIL.js";
28
28
  import "./chunk-BYXBJQAS.js";
29
29
  import "./chunk-ARFCL53U.js";
30
30
  import {
@@ -25,7 +25,7 @@ import {
25
25
  updateTitleDoc,
26
26
  useDocField,
27
27
  useDocState
28
- } from "./chunk-J2VIGDJN.js";
28
+ } from "./chunk-WZFQBO5N.js";
29
29
  import "./chunk-UVLYNWIE.js";
30
30
  import "./chunk-YNIYE47Z.js";
31
31
  import "./chunk-HZDK56EK.js";
@@ -8,25 +8,27 @@ import {
8
8
  import {
9
9
  buildForegroundTurnAdmissionFetchInit,
10
10
  consumeAgentRunStream,
11
+ createTurnActionGateReceiver,
11
12
  mergeAgentToolsWithRuntime,
12
13
  projectDesktopToolUiContent,
13
14
  pushGate,
14
- resolveTurnToolContext
15
- } from "./chunk-X22AUZKL.js";
15
+ resolveTurnToolContext,
16
+ targetForRunKind
17
+ } from "./chunk-2JWRKVDC.js";
16
18
  import {
17
19
  resolveUserSkillRuntime
18
20
  } from "./chunk-XSRSAU3O.js";
19
21
  import {
20
22
  performServerProxyFetchWithRetry
21
- } from "./chunk-JU7VN4LF.js";
23
+ } from "./chunk-XSZLVTD3.js";
22
24
  import {
23
25
  createSSEParser,
24
26
  loadSkillFunc,
25
27
  waitForAbortableDelay
26
- } from "./chunk-LMGFVH65.js";
28
+ } from "./chunk-RMA5H7R5.js";
27
29
  import "./chunk-NF64D32W.js";
28
30
  import "./chunk-UOUMPHS5.js";
29
- import "./chunk-J2VIGDJN.js";
31
+ import "./chunk-WZFQBO5N.js";
30
32
  import "./chunk-VF4K2QE6.js";
31
33
  import {
32
34
  DESKTOP_FOLDER_PROJECTS_KEY,
@@ -36,7 +38,7 @@ import {
36
38
  import "./chunk-OLGFIQN2.js";
37
39
  import "./chunk-CD64YXRB.js";
38
40
  import "./chunk-AGIM7IMJ.js";
39
- import "./chunk-HCCQEMTK.js";
41
+ import "./chunk-OY3XGLWR.js";
40
42
  import {
41
43
  admitPendingUserMessages,
42
44
  clearForegroundTurnSettledVisible,
@@ -55,13 +57,13 @@ import {
55
57
  setStreamingMessageId,
56
58
  toolResultNeedsUserConfirmation,
57
59
  updateToolMessage
58
- } from "./chunk-YFW4H6DL.js";
60
+ } from "./chunk-A6BALTVL.js";
59
61
  import "./chunk-TZXPT53C.js";
60
62
  import "./chunk-BUDVRYES.js";
61
63
  import "./chunk-523DITKR.js";
62
64
  import {
63
65
  streamAgentChatTurn
64
- } from "./chunk-N74XL3NI.js";
66
+ } from "./chunk-JT4HJLIL.js";
65
67
  import "./chunk-FFFKAOJN.js";
66
68
  import "./chunk-BYXBJQAS.js";
67
69
  import "./chunk-ARFCL53U.js";
@@ -936,6 +938,8 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
936
938
  },
937
939
  signal: controller.signal
938
940
  });
941
+ const { receiveActionGate, clearActionGates } = createTurnActionGateReceiver(thunk.dispatch, transientId);
942
+ const actionGateTarget = targetForRunKind("server-run", { server: currentServer, token });
939
943
  stageLog.stage(
940
944
  "run-fetch-start",
941
945
  `endpoint=${currentServer}/api/agent/run agentKey=${args.agentKey}`
@@ -985,6 +989,12 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
985
989
  if (payload?.type === "error") {
986
990
  return { reject: payload.message || "Agent execution failed" };
987
991
  }
992
+ if (payload?.type === "action_gate") {
993
+ if (!visibleFinalized && payload.gate) {
994
+ receiveActionGate(payload.gate, actionGateTarget, dialogId);
995
+ }
996
+ return;
997
+ }
988
998
  toolProjection.handlePayload(payload);
989
999
  const nextAssistantStream = applyServerOwnedAssistantStreamPayload(
990
1000
  assistantStream,
@@ -1004,6 +1014,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
1004
1014
  if (payload?.type === "done" && !visibleFinalized) {
1005
1015
  stageLog.stage("done-frame", `executionId=${observedExecutionId}`);
1006
1016
  finalizeVisibleProjectionOnDone();
1017
+ clearActionGates();
1007
1018
  }
1008
1019
  }
1009
1020
  });
@@ -1057,6 +1068,7 @@ async function runServerOwnedWebForegroundTurn(args, thunk) {
1057
1068
  }
1058
1069
  return { serverOwned: true };
1059
1070
  } finally {
1071
+ clearActionGates();
1060
1072
  releaseClientController();
1061
1073
  if (!sawDone && !visibleFinalized) {
1062
1074
  releaseTransientCanonicalHandoff(dialogId, transientId);
@@ -1710,7 +1722,7 @@ var handleSendMessageAction = async (args, thunkApi) => {
1710
1722
  const dialogKey = dialogConfig.dbKey;
1711
1723
  const projectId = isDesktopContext && dialogKey ? readDialogProjectId(window.localStorage, dialogKey) : null;
1712
1724
  if (projectId) {
1713
- const { ensureProjectArchive } = await import("./projectArchive-NU2Z5HOR.js");
1725
+ const { ensureProjectArchive } = await import("./projectArchive-ZRQPLQEI.js");
1714
1726
  const { DESKTOP_FOLDER_PROJECTS_KEY: DESKTOP_FOLDER_PROJECTS_KEY2, readDesktopFolderProjects: readDesktopFolderProjects2 } = await import("./desktopFolderProjects-4POAMVJN.js");
1715
1727
  const project = readDesktopFolderProjects2(window.localStorage.getItem(DESKTOP_FOLDER_PROJECTS_KEY2)).find((entry) => entry.id === projectId);
1716
1728
  if (!project) throw new Error("\u9879\u76EE\u5DF2\u4E0D\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u9879\u76EE");