nolo-cli 0.105.0 → 0.106.1

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 (115) hide show
  1. package/{_executeModel-JXG5TLPE.js → _executeModel-EP6HAX3W.js} +38 -37
  2. package/{addContentAction-J3DLDV64.js → addContentAction-NZZNAVCB.js} +4 -4
  3. package/{addDialogAgentAction-PHIXJCF2.js → addDialogAgentAction-5HVGEIXI.js} +4 -4
  4. package/{agentDeleteCommand-2AWJGHXG.js → agentDeleteCommand-M25A6UGB.js} +45 -45
  5. package/{agentEmailCommands-VV5OSILE.js → agentEmailCommands-RUL4NL64.js} +46 -46
  6. package/{agentListCommands-OQMRBDWP.js → agentListCommands-KSPFKHFO.js} +23 -24
  7. package/{agentMachineCommands-3VLLR6RL.js → agentMachineCommands-IHBB6PHD.js} +20 -21
  8. package/{agentProviderCommands-XPJYZSCE.js → agentProviderCommands-ND4S2Q6Q.js} +1 -1
  9. package/{agentRecordCommands-GPIARVOW.js → agentRecordCommands-7OKIBN6H.js} +45 -45
  10. package/{agentRunCommand-LRJTZ7IM.js → agentRunCommand-GBKJTQQU.js} +45 -45
  11. package/{agentRuntimeLocal-PV6AZOEU.js → agentRuntimeLocal-E5HXZNXZ.js} +18 -19
  12. package/{agentSlice-6R3JKS6I.js → agentSlice-7T3ZLYET.js} +4 -4
  13. package/{appDeleteCommands-WEX73P5R.js → appDeleteCommands-TTJUYTQN.js} +21 -22
  14. package/{appDeployCommands-7BAXWA4M.js → appDeployCommands-65WYK2TQ.js} +21 -22
  15. package/{appDeployStatusCommands-EJ6A2U4X.js → appDeployStatusCommands-U4XESYYG.js} +21 -22
  16. package/{appGetCommands-SB355OEX.js → appGetCommands-VNHZZC4D.js} +21 -22
  17. package/{appListCommands-TSZDPIKJ.js → appListCommands-O667ZEU6.js} +21 -22
  18. package/{authCommand-5PB3YRVV.js → authCommand-SUHHTVHA.js} +8 -8
  19. package/{builtinSkillRegistry-SBBWTANC.js → builtinSkillRegistry-PUGT65WS.js} +5 -5
  20. package/{chunk-Z5NGE5DH.js → chunk-2NGKYC3L.js} +3 -3
  21. package/{chunk-S2NSK7AZ.js → chunk-3SXZ6SUC.js} +4 -4
  22. package/{chunk-NSBID7PR.js → chunk-3VKDWQMJ.js} +2 -2
  23. package/{chunk-QKTESDWK.js → chunk-4VDS344D.js} +3 -3
  24. package/{chunk-7KVZ5LDQ.js → chunk-5F7UKMLN.js} +8 -4
  25. package/{chunk-BB7LVBTS.js → chunk-6AIURTE7.js} +3 -3
  26. package/{chunk-HP57OUJO.js → chunk-7I25CBT5.js} +31 -5
  27. package/{chunk-NSAFG343.js → chunk-AM4G3LDJ.js} +59 -47
  28. package/{chunk-NTR4SD3P.js → chunk-AZB6HR4I.js} +13 -48
  29. package/{chunk-AFH5QC6R.js → chunk-BIH7KCDJ.js} +3 -3
  30. package/{chunk-UA324D4O.js → chunk-BPLIXNC6.js} +1 -1
  31. package/{chunk-YK5MHOWM.js → chunk-CEQ75WPL.js} +1 -1
  32. package/{chunk-K6U4NKFJ.js → chunk-DBKRC5O2.js} +1 -1
  33. package/{chunk-UWXDA7L5.js → chunk-DJ3JABG5.js} +22 -37
  34. package/{chunk-HYXABXCZ.js → chunk-DSXRVBTA.js} +98 -21
  35. package/{chunk-3Q7NEHAR.js → chunk-EBS4FKW4.js} +1 -1
  36. package/{chunk-ZBHR642M.js → chunk-EHGIEGLI.js} +161 -43
  37. package/{chunk-YVU4XVJD.js → chunk-FJKZSR5P.js} +1 -1
  38. package/{chunk-54VPQTOA.js → chunk-GMP3NBAA.js} +5 -7
  39. package/{chunk-3BXNTXYI.js → chunk-GU7DC2TD.js} +2 -1
  40. package/{chunk-FGSJ3YMD.js → chunk-HNA5KV37.js} +5 -5
  41. package/{chunk-CYSYR67N.js → chunk-I5YMDACN.js} +1 -1
  42. package/{chunk-WJ3B6FX6.js → chunk-IXH3HKY2.js} +0 -8
  43. package/{chunk-Y3PMXGLH.js → chunk-IYIXAIEB.js} +197 -92
  44. package/{chunk-RWX7AY7J.js → chunk-JWNBEIME.js} +1 -1
  45. package/{chunk-VVJ2ENLY.js → chunk-LGWABBTZ.js} +4 -4
  46. package/{chunk-QYUBY3OZ.js → chunk-LOPP5VT6.js} +1 -1
  47. package/{chunk-GSKPJIHY.js → chunk-LUBFABMJ.js} +2 -6
  48. package/{chunk-BNGW5ASC.js → chunk-LYLO5U3H.js} +15 -2
  49. package/{chunk-L5WOICCV.js → chunk-MJ3CRU77.js} +22 -6
  50. package/{chunk-AWVP7PPG.js → chunk-NTNKA5VL.js} +1 -1
  51. package/{chunk-EP7BWZ4B.js → chunk-OAXBDMT7.js} +1 -1
  52. package/{chunk-4DPP773Q.js → chunk-ODTBO4W6.js} +9 -6
  53. package/{chunk-B7APRSPS.js → chunk-OQ5IVGCV.js} +3 -3
  54. package/{chunk-EKPKW6RM.js → chunk-OYTWDOQV.js} +3 -3
  55. package/{chunk-P5GCTVGV.js → chunk-OZ2IIIRP.js} +2 -2
  56. package/{chunk-D2GQE6AF.js → chunk-PFLF4R4E.js} +1 -1
  57. package/{chunk-RILRSUGC.js → chunk-QDH32WF5.js} +1 -1
  58. package/{chunk-VCAQFMVN.js → chunk-QVAWUJAJ.js} +1 -1
  59. package/{chunk-27ONFIEY.js → chunk-SJ7CUF65.js} +2 -2
  60. package/{chunk-CNA27EMD.js → chunk-SYEBIZOF.js} +1 -1
  61. package/{chunk-ZSUDOTPL.js → chunk-TLKXNTQJ.js} +3 -3
  62. package/{chunk-A4SQRTZ6.js → chunk-TLYSGGPG.js} +1 -1
  63. package/chunk-UM7TA3K4.js +1008 -0
  64. package/{chunk-BZ7NPA6G.js → chunk-VBG7GWWR.js} +218 -6
  65. package/{chunk-DZ7R5V3Y.js → chunk-VBQGO5NX.js} +1 -1
  66. package/{chunk-44CU7CKA.js → chunk-VYKXIHRP.js} +181 -34
  67. package/chunk-VZLO4XJD.js +17 -0
  68. package/{chunk-IEJ5YDA4.js → chunk-WMWYWYK2.js} +2 -2
  69. package/{chunk-LWXE6IFU.js → chunk-XDQ7PHU3.js} +31 -196
  70. package/{chunk-AFSY3ZMB.js → chunk-XGOHDYM2.js} +1 -1
  71. package/{chunk-2WJ57RJA.js → chunk-XLWMNFBZ.js} +1 -1
  72. package/{chunk-3F424ASC.js → chunk-YFU5EELM.js} +1 -1
  73. package/{chunk-QMXJ5KDJ.js → chunk-YQFLBS6A.js} +13 -13
  74. package/{chunk-CFHWVEUJ.js → chunk-ZVGXD7UJ.js} +2 -2
  75. package/{chunk-4WMMIL66.js → chunk-ZYM73IHG.js} +3 -2
  76. package/{commandRegistry-QU62WJQX.js → commandRegistry-6QIAUQDS.js} +49 -49
  77. package/{contentThunks-VGV3JJVB.js → contentThunks-5DDMUQ7B.js} +17 -16
  78. package/{createAgentAutomationAction-ZNVLI4WV.js → createAgentAutomationAction-NQ6AZM42.js} +17 -16
  79. package/{createDialogAction-TTUA46DT.js → createDialogAction-QZ6X4A7O.js} +20 -19
  80. package/{createPageAction-KUFSC5XW.js → createPageAction-NCGEJBVK.js} +17 -16
  81. package/{dbSlice-MYEETO73.js → dbSlice-RCZ7NRAF.js} +3 -3
  82. package/{dialogCommands-DRDPEOTL.js → dialogCommands-OGQLEF63.js} +21 -22
  83. package/{dialogSlice-V2SVSTIV.js → dialogSlice-GIKNUHNW.js} +30 -17
  84. package/{docCreateCommands-M26CFDDQ.js → docCreateCommands-RW6LNYT6.js} +20 -21
  85. package/{docDeleteCommands-LRZHCKVX.js → docDeleteCommands-Z742TRNY.js} +21 -22
  86. package/{docReadCommands-6QJSISHK.js → docReadCommands-5DIGA42Y.js} +20 -21
  87. package/{docStore-4RWAFNDM.js → docStore-6GUOZH52.js} +4 -4
  88. package/{docUpdateCommands-W4KU4U5T.js → docUpdateCommands-ZFZ2QEVK.js} +20 -21
  89. package/{getPricing-NMMFT3YI.js → getPricing-QVSNUFZ6.js} +3 -3
  90. package/{handleSendMessageAction-VEWLGB5Z.js → handleSendMessageAction-B2VXOLMM.js} +16 -15
  91. package/index.js +3 -3
  92. package/{machineCommands-AEHHCJEW.js → machineCommands-AI3N7JHQ.js} +44 -44
  93. package/{machineWsRunDispatch-MY2KHS36.js → machineWsRunDispatch-RPF2D6VV.js} +44 -44
  94. package/{memberThunks-EE6TI3TV.js → memberThunks-YICJI4IS.js} +4 -4
  95. package/{models-ZPU5EDF4.js → models-FTNFVO3D.js} +2 -2
  96. package/package.json +1 -1
  97. package/{providerPresetApply-TEBH7FDX.js → providerPresetApply-OJJXQ7NM.js} +6 -6
  98. package/{providerRegistry-CBJLNCET.js → providerRegistry-DXFBDCGQ.js} +6 -6
  99. package/{read-PJIT2YEJ.js → read-XMBM52Y4.js} +2 -2
  100. package/{readDocTool-DRSXHGNL.js → readDocTool-LAQHKCVT.js} +1 -1
  101. package/{readlineWorkspace-7Q6MITLV.js → readlineWorkspace-EPUCVZ73.js} +48 -48
  102. package/{removeDialogAgentAction-IN4WUKJJ.js → removeDialogAgentAction-HDUI2MU3.js} +5 -5
  103. package/{runAgentClientLoop-H2JALUVD.js → runAgentClientLoop-OXQMDGAN.js} +36 -35
  104. package/{setDialogExtraReferencesAction-VDRF7LPK.js → setDialogExtraReferencesAction-ADBVOP4O.js} +5 -5
  105. package/{setPrimaryDialogAgentAction-RO6LIWJ4.js → setPrimaryDialogAgentAction-PXVXQJ62.js} +5 -5
  106. package/{settingThunks-3OPOLOIA.js → settingThunks-G2MJRKUE.js} +6 -6
  107. package/{spaceCommands-UBLL5EF2.js → spaceCommands-Z662QYY6.js} +20 -21
  108. package/{streamAgentChatTurn-FFJWW3FD.js → streamAgentChatTurn-YJYEJHP7.js} +40 -46
  109. package/{switchDialogAgentAction-MVF2JNE7.js → switchDialogAgentAction-Z3RZACGF.js} +4 -4
  110. package/{toolApiClient-EJT6TMFG.js → toolApiClient-AD7CXTA4.js} +3 -2
  111. package/{tools-AZRYLYNK.js → tools-GHI3WBEI.js} +32 -31
  112. package/{tuiSummaryLlmCaller-7S5HJ3MT.js → tuiSummaryLlmCaller-WTC6GCQC.js} +11 -12
  113. package/{updateDialogTitleAction-5WXTRUJM.js → updateDialogTitleAction-GJCNWTPY.js} +17 -16
  114. package/chunk-M7VLQGQP.js +0 -405
  115. package/chunk-NKWIS6G2.js +0 -442
@@ -12,12 +12,15 @@ import {
12
12
  import {
13
13
  getApproxPricePerImage
14
14
  } from "./chunk-AGGIDPCZ.js";
15
+ import {
16
+ isMediaToolConfirmation
17
+ } from "./chunk-VZLO4XJD.js";
15
18
  import {
16
19
  runLlm
17
- } from "./chunk-S2NSK7AZ.js";
20
+ } from "./chunk-3SXZ6SUC.js";
18
21
  import {
19
22
  cleanupCliSessionForDialog
20
- } from "./chunk-YVU4XVJD.js";
23
+ } from "./chunk-FJKZSR5P.js";
21
24
  import {
22
25
  getActiveDialogAgentId,
23
26
  getDialogAgentIds,
@@ -33,10 +36,12 @@ import {
33
36
  getActiveDialogKey,
34
37
  getDialogRuntimeTokens,
35
38
  resetDialogRuntimeSessionState,
39
+ restoreMediaJobPendingFiles,
36
40
  selectCurrentDialogKey,
37
41
  setActiveDialogKey,
38
- setDialogConfigError
39
- } from "./chunk-BZ7NPA6G.js";
42
+ setDialogConfigError,
43
+ setMediaJobRuntimeActor
44
+ } from "./chunk-VBG7GWWR.js";
40
45
  import {
41
46
  _typeof,
42
47
  addLeadingZeros,
@@ -51,7 +56,7 @@ import {
51
56
  } from "./chunk-5UUIGN6I.js";
52
57
  import {
53
58
  nolotusId
54
- } from "./chunk-A4SQRTZ6.js";
59
+ } from "./chunk-TLYSGGPG.js";
55
60
  import {
56
61
  DEFAULT_AUTO_EXECUTION_PROFILE,
57
62
  DEFAULT_CONTEXT_WINDOW,
@@ -64,7 +69,7 @@ import {
64
69
  getModelInfo,
65
70
  normalizeUsage,
66
71
  resolveAutoExecutionProfile
67
- } from "./chunk-L5WOICCV.js";
72
+ } from "./chunk-MJ3CRU77.js";
68
73
  import {
69
74
  COMPACTION_SUMMARY_SYSTEM_PROMPT,
70
75
  buildCompactionMetricsFromPlan,
@@ -75,7 +80,7 @@ import {
75
80
  normalizeAssistantContentBuffer,
76
81
  planCompression,
77
82
  serializeMessageContent
78
- } from "./chunk-IEJ5YDA4.js";
83
+ } from "./chunk-WMWYWYK2.js";
79
84
  import {
80
85
  asRecordOrEmpty
81
86
  } from "./chunk-KX6YBIHG.js";
@@ -85,11 +90,11 @@ import {
85
90
  remove,
86
91
  selectById,
87
92
  write
88
- } from "./chunk-4WMMIL66.js";
93
+ } from "./chunk-ZYM73IHG.js";
89
94
  import {
90
95
  findModelConfig,
91
96
  getModelConfig
92
- } from "./chunk-3BXNTXYI.js";
97
+ } from "./chunk-GU7DC2TD.js";
93
98
  import {
94
99
  toErrorMessage
95
100
  } from "./chunk-HNMXYYJR.js";
@@ -100,8 +105,11 @@ import {
100
105
  getPlatformHostedDeepSeekV4Price,
101
106
  isPlatformHostedDeepSeekV4Model,
102
107
  isPlatformHostedImageModel,
103
- isPlatformHostedOpenAIImageModel
104
- } from "./chunk-Y3PMXGLH.js";
108
+ isPlatformHostedOpenAIImageModel,
109
+ isPlatformManagedProvider,
110
+ resolvePlatformEffectiveModel,
111
+ resolvePlatformHostedRouting
112
+ } from "./chunk-IYIXAIEB.js";
105
113
  import {
106
114
  asTrimmedLowercaseString
107
115
  } from "./chunk-QSJ3HFEF.js";
@@ -120,7 +128,7 @@ import {
120
128
  builtinAgentCatalogEntryById,
121
129
  builtinRuntimeFallbackEntries,
122
130
  isBuiltinPlatformAgentKey
123
- } from "./chunk-BNGW5ASC.js";
131
+ } from "./chunk-LYLO5U3H.js";
124
132
  import {
125
133
  extractCustomId,
126
134
  extractUserId,
@@ -224,6 +232,23 @@ function inferMessageDialogIdFromDbKey(dbKey) {
224
232
 
225
233
  // packages/chat/messages/toolPresentation.ts
226
234
  var SUMMARY_EMOJI_PREFIX = new RegExp("^(\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\[[vx!]\\])\\s*", "u");
235
+ function toolResultNeedsUserConfirmation(toolName, result) {
236
+ const name = asTrimmedString(toolName);
237
+ if (name !== "transcribe" && name !== "translate") return false;
238
+ const record = parseJsonRecordOrNull(result);
239
+ const data = isRecord(record) ? record : null;
240
+ if (!data) return false;
241
+ if (isMediaToolConfirmation(data)) return true;
242
+ return data.status === "requires_confirmation" || data.status === "awaiting_confirmation" || data.reason === "unauthorized" || data.reason === "budget_overrun";
243
+ }
244
+ var parseJsonRecordOrNull = (value) => {
245
+ if (typeof value !== "string") return value;
246
+ try {
247
+ return JSON.parse(value);
248
+ } catch {
249
+ return value;
250
+ }
251
+ };
227
252
 
228
253
  // packages/chat/messages/assistantMessageFacts.ts
229
254
  var isAssistantToolStub = (msg) => msg?.role === "assistant" && (msg.content == null || typeof msg.content === "string" && msg.content.trim().length === 0 || Array.isArray(msg.content) && msg.content.length === 0) && Array.isArray(msg?.tool_calls) && msg.tool_calls.length > 0;
@@ -4715,6 +4740,15 @@ var chat_locale_default = {
4715
4740
  en: {
4716
4741
  translation: {
4717
4742
  AddAgent: "Add Agent",
4743
+ mediaJob: {
4744
+ auto: "Auto",
4745
+ none: "None",
4746
+ languageLine: "Language: {{source}} \u2192 {{target}}",
4747
+ sourceLanguage: "Source language",
4748
+ targetLanguage: "Target language",
4749
+ autoDetect: "Detect automatically",
4750
+ noTranslate: "Do not translate"
4751
+ },
4718
4752
  selectedAgentsCount: "Selected {{count}} Agents",
4719
4753
  addSelectedAgents: "Add selected",
4720
4754
  clearSelection: "Clear",
@@ -4913,6 +4947,13 @@ var chat_locale_default = {
4913
4947
  imagePickerError: "Image picker error: {{error}}",
4914
4948
  shareAttachmentWarning: "Attachments ignored for share command",
4915
4949
  uploading: "Uploading...",
4950
+ mediaFileTooLarge: "Audio/video files must be 120 MB or smaller",
4951
+ mediaUploadingPercent: "Uploading {{percent}}%",
4952
+ mediaJobCreating: "Creating job\u2026",
4953
+ mediaUploadFailed: "Upload failed",
4954
+ mediaJobCreateFailed: "Failed to create media job",
4955
+ mediaUploadRemove: "Remove {{name}}",
4956
+ mediaUploadFailedShort: "Failed",
4916
4957
  uploadSuccess: "Upload success",
4917
4958
  uploadFailed: "Upload failed",
4918
4959
  deleteMessageTitle: "Delete Message",
@@ -5029,7 +5070,6 @@ var chat_locale_default = {
5029
5070
  releasePreview: "Release preview",
5030
5071
  captureVisualState: "Screenshot",
5031
5072
  appDeploy: "Deploy app",
5032
- setTodoList: "Update plan",
5033
5073
  ask_user: "Ask",
5034
5074
  runStreamingAgent: "Handoff"
5035
5075
  },
@@ -5041,6 +5081,13 @@ var chat_locale_default = {
5041
5081
  list: "Task list",
5042
5082
  wait: "Wait for task"
5043
5083
  },
5084
+ toolExecLocation: {
5085
+ line: "Ran on {{device}} \xB7 {{root}}",
5086
+ unknown: "Execution location unknown"
5087
+ },
5088
+ runtimeTarget: {
5089
+ intentBadge: "Target: {{device}} (intent)"
5090
+ },
5044
5091
  gemini: {
5045
5092
  title: "Image Generation",
5046
5093
  count: "{{count}} images generated"
@@ -5277,6 +5324,13 @@ var chat_locale_default = {
5277
5324
  excelParseError: "\u89E3\u6790 Excel \u6587\u4EF6\u5931\u8D25",
5278
5325
  FailedToLoadAgents: "\u52A0\u8F7D\u667A\u80FD\u4F53\u5931\u8D25",
5279
5326
  fileReadError: "\u8BFB\u53D6\u6587\u4EF6\u5185\u5BB9\u5931\u8D25",
5327
+ mediaFileTooLarge: "\u97F3\u89C6\u9891\u6587\u4EF6\u4E0D\u80FD\u8D85\u8FC7 120 MB",
5328
+ mediaUploadingPercent: "\u4E0A\u4F20\u4E2D {{percent}}%",
5329
+ mediaJobCreating: "\u521B\u5EFA\u4EFB\u52A1\u4E2D\u2026",
5330
+ mediaUploadFailed: "\u4E0A\u4F20\u5931\u8D25",
5331
+ mediaJobCreateFailed: "\u521B\u5EFA\u5A92\u4F53\u4EFB\u52A1\u5931\u8D25",
5332
+ mediaUploadRemove: "\u79FB\u9664 {{name}}",
5333
+ mediaUploadFailedShort: "\u5931\u8D25",
5280
5334
  First: "\u9996\u4E2A",
5281
5335
  Info: "\u4FE1\u606F",
5282
5336
  LoadingAgents: "\u6B63\u5728\u52A0\u8F7D\u667A\u80FD\u4F53...",
@@ -5530,7 +5584,6 @@ var chat_locale_default = {
5530
5584
  releasePreview: "\u91CA\u653E\u9884\u89C8",
5531
5585
  captureVisualState: "\u622A\u56FE\u68C0\u67E5",
5532
5586
  appDeploy: "\u90E8\u7F72\u5E94\u7528",
5533
- setTodoList: "\u66F4\u65B0\u8BA1\u5212",
5534
5587
  ask_user: "\u63D0\u95EE",
5535
5588
  runStreamingAgent: "\u8F6C\u4EA4"
5536
5589
  },
@@ -5542,6 +5595,13 @@ var chat_locale_default = {
5542
5595
  list: "\u4EFB\u52A1\u5217\u8868",
5543
5596
  wait: "\u7B49\u5F85\u5B8C\u6210"
5544
5597
  },
5598
+ toolExecLocation: {
5599
+ line: "\u5728 {{device}} \xB7 {{root}} \u6267\u884C",
5600
+ unknown: "\u6267\u884C\u4F4D\u7F6E\u672A\u77E5"
5601
+ },
5602
+ runtimeTarget: {
5603
+ intentBadge: "\u76EE\u6807\uFF1A{{device}}\uFF08\u610F\u56FE\uFF09"
5604
+ },
5545
5605
  gemini: {
5546
5606
  title: "\u56FE\u50CF\u751F\u6210",
5547
5607
  count: "\u751F\u6210\u4E86 {{count}} \u5F20\u56FE\u7247"
@@ -5778,6 +5838,13 @@ var chat_locale_default = {
5778
5838
  excelParseError: "\u89E3\u6790 Excel \u6A94\u6848\u5931\u6557",
5779
5839
  FailedToLoadAgents: "\u8F09\u5165\u667A\u80FD\u9AD4\u5931\u6557",
5780
5840
  fileReadError: "\u8B80\u53D6\u6A94\u6848\u5167\u5BB9\u5931\u6557",
5841
+ mediaFileTooLarge: "\u97F3\u8996\u983B\u6A94\u6848\u4E0D\u80FD\u8D85\u904E 120 MB",
5842
+ mediaUploadingPercent: "\u4E0A\u50B3\u4E2D {{percent}}%",
5843
+ mediaJobCreating: "\u5EFA\u7ACB\u4EFB\u52D9\u4E2D\u2026",
5844
+ mediaUploadFailed: "\u4E0A\u50B3\u5931\u6557",
5845
+ mediaJobCreateFailed: "\u5EFA\u7ACB\u5A92\u9AD4\u4EFB\u52D9\u5931\u6557",
5846
+ mediaUploadRemove: "\u79FB\u9664 {{name}}",
5847
+ mediaUploadFailedShort: "\u5931\u6557",
5781
5848
  First: "\u9996\u500B",
5782
5849
  Info: "\u8CC7\u8A0A",
5783
5850
  LoadingAgents: "\u6B63\u5728\u8F09\u5165\u667A\u80FD\u9AD4...",
@@ -6031,7 +6098,6 @@ var chat_locale_default = {
6031
6098
  releasePreview: "\u91CB\u653E\u9810\u89BD",
6032
6099
  captureVisualState: "\u622A\u5716\u6AA2\u67E5",
6033
6100
  appDeploy: "\u90E8\u7F72\u61C9\u7528",
6034
- setTodoList: "\u66F4\u65B0\u8A08\u756B",
6035
6101
  ask_user: "\u63D0\u554F",
6036
6102
  runStreamingAgent: "\u8F49\u4EA4"
6037
6103
  },
@@ -6043,6 +6109,13 @@ var chat_locale_default = {
6043
6109
  list: "\u4EFB\u52D9\u5217\u8868",
6044
6110
  wait: "\u7B49\u5F85\u5B8C\u6210"
6045
6111
  },
6112
+ toolExecLocation: {
6113
+ line: "\u5728 {{device}} \xB7 {{root}} \u57F7\u884C",
6114
+ unknown: "\u57F7\u884C\u4F4D\u7F6E\u672A\u77E5"
6115
+ },
6116
+ runtimeTarget: {
6117
+ intentBadge: "\u76EE\u6A19\uFF1A{{device}}\uFF08\u610F\u5716\uFF09"
6118
+ },
6046
6119
  gemini: {
6047
6120
  title: "\u5716\u50CF\u751F\u6210",
6048
6121
  count: "\u751F\u6210\u4E86 {{count}} \u5F35\u5716\u7247"
@@ -6279,6 +6352,13 @@ var chat_locale_default = {
6279
6352
  excelParseError: "Excel\u30D5\u30A1\u30A4\u30EB\u306E\u89E3\u6790\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
6280
6353
  FailedToLoadAgents: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
6281
6354
  fileReadError: "\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
6355
+ mediaFileTooLarge: "\u97F3\u58F0\u30FB\u52D5\u753B\u30D5\u30A1\u30A4\u30EB\u306F 120 MB \u4EE5\u4E0B\u306B\u3057\u3066\u304F\u3060\u3055\u3044",
6356
+ mediaUploadingPercent: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u4E2D {{percent}}%",
6357
+ mediaJobCreating: "\u30BF\u30B9\u30AF\u3092\u4F5C\u6210\u4E2D\u2026",
6358
+ mediaUploadFailed: "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
6359
+ mediaJobCreateFailed: "\u30E1\u30C7\u30A3\u30A2\u30BF\u30B9\u30AF\u306E\u4F5C\u6210\u306B\u5931\u6557\u3057\u307E\u3057\u305F",
6360
+ mediaUploadRemove: "{{name}} \u3092\u524A\u9664",
6361
+ mediaUploadFailedShort: "\u5931\u6557",
6282
6362
  First: "\u6700\u521D",
6283
6363
  Info: "\u60C5\u5831",
6284
6364
  LoadingAgents: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u307F\u4E2D...",
@@ -6538,7 +6618,6 @@ var chat_locale_default = {
6538
6618
  releasePreview: "\u30D7\u30EC\u30D3\u30E5\u30FC\u89E3\u653E",
6539
6619
  captureVisualState: "\u30B9\u30AF\u30EA\u30FC\u30F3\u30B7\u30E7\u30C3\u30C8",
6540
6620
  appDeploy: "\u30A2\u30D7\u30EA\u30C7\u30D7\u30ED\u30A4",
6541
- setTodoList: "\u8A08\u753B\u3092\u66F4\u65B0",
6542
6621
  ask_user: "\u8CEA\u554F",
6543
6622
  runStreamingAgent: "\u5F15\u304D\u7D99\u304E"
6544
6623
  },
@@ -6550,6 +6629,13 @@ var chat_locale_default = {
6550
6629
  list: "\u30BF\u30B9\u30AF\u4E00\u89A7",
6551
6630
  wait: "\u30BF\u30B9\u30AF\u5F85\u6A5F"
6552
6631
  },
6632
+ toolExecLocation: {
6633
+ line: "{{device}} \xB7 {{root}} \u3067\u5B9F\u884C",
6634
+ unknown: "\u5B9F\u884C\u5834\u6240\u306F\u4E0D\u660E\u3067\u3059"
6635
+ },
6636
+ runtimeTarget: {
6637
+ intentBadge: "\u30BF\u30FC\u30B2\u30C3\u30C8: {{device}}\uFF08\u610F\u56F3\uFF09"
6638
+ },
6553
6639
  gemini: {
6554
6640
  title: "\u753B\u50CF\u751F\u6210",
6555
6641
  count: "{{count}} \u679A\u306E\u753B\u50CF\u3092\u751F\u6210\u3057\u307E\u3057\u305F"
@@ -9560,6 +9646,7 @@ var createEmptyMessageSessionState = () => ({
9560
9646
  currentLoadOlderRequestId: void 0,
9561
9647
  streamingMessageId: null,
9562
9648
  canonicalHandoffTransient: null,
9649
+ foregroundTurnSettledVisible: false,
9563
9650
  lastAbortTimestamp: 0
9564
9651
  });
9565
9652
  var activeDialogId = null;
@@ -9641,6 +9728,10 @@ function setStreamingMessageId(dialogId, messageId) {
9641
9728
  session.streamingMessageId = messageId;
9642
9729
  notify();
9643
9730
  }
9731
+ function getStreamingMessageId(dialogId) {
9732
+ if (dialogId === null) return null;
9733
+ return getMessageSession(dialogId).streamingMessageId;
9734
+ }
9644
9735
  function getHasStreamingMessage(dialogId) {
9645
9736
  if (dialogId === null) return false;
9646
9737
  return !!getMessageSession(dialogId).streamingMessageId;
@@ -9835,6 +9926,9 @@ var messageSlice = createSliceWithThunks({
9835
9926
  const dialogId = payload.dialogId ?? findDialogIdByMessageId(state, payload.id);
9836
9927
  const dialogState = ensureMessageDialogState(state, dialogId);
9837
9928
  removeOneMessage(dialogState, payload.id);
9929
+ if (dialogId && getStreamingMessageId(dialogId) === payload.id) {
9930
+ setStreamingMessageId(dialogId, null);
9931
+ }
9838
9932
  }
9839
9933
  ),
9840
9934
  // Error-path finalizer: keep whatever the transient message already shows
@@ -9956,7 +10050,8 @@ var messageSlice = createSliceWithThunks({
9956
10050
  dialogId,
9957
10051
  dialogKey,
9958
10052
  limit,
9959
- isNew
10053
+ isNew,
10054
+ preferredServerOrigin
9960
10055
  }, thunkApi) => {
9961
10056
  const { db } = thunkApi.extra;
9962
10057
  const { getState, signal, dispatch } = thunkApi;
@@ -9967,7 +10062,7 @@ var messageSlice = createSliceWithThunks({
9967
10062
  });
9968
10063
  }
9969
10064
  const state = getState();
9970
- const { currentToken: token, remoteServers } = getRuntimeServerContext(state);
10065
+ const { currentToken: token, remoteServers } = preferredServerOrigin ? getRuntimeServerContext(state, preferredServerOrigin) : getRuntimeServerContext(state);
9971
10066
  const {
9972
10067
  localMessages,
9973
10068
  remotePromise,
@@ -10528,7 +10623,7 @@ var messageSlice = createSliceWithThunks({
10528
10623
  runtimeOptions: args.runtimeOptions
10529
10624
  });
10530
10625
  if (agentKeyToUse) {
10531
- const { streamAgentChatTurn } = await import("./agentSlice-6R3JKS6I.js");
10626
+ const { streamAgentChatTurn } = await import("./agentSlice-7T3ZLYET.js");
10532
10627
  await dispatch(
10533
10628
  streamAgentChatTurn({
10534
10629
  agentKey: agentKeyToUse,
@@ -12376,6 +12471,38 @@ var calculateCacheBasedCost = (resolvedPrice, usage, externalPrice) => {
12376
12471
  }
12377
12472
  };
12378
12473
  };
12474
+ var calculateCanonicalInputTotalCost = (resolvedPrice, usage, externalPrice) => {
12475
+ const { input: effectiveInputPrice, output: effectiveOutputPrice } = getEffectivePrices(resolvedPrice, externalPrice);
12476
+ const totalInputTokens = Math.max(0, usage.input_tokens ?? 0);
12477
+ const cachingWriteTokens = Math.max(0, usage.cache_creation_input_tokens ?? 0);
12478
+ const cachingReadTokens = Math.max(0, usage.cache_read_input_tokens ?? 0);
12479
+ const outputTokens = Math.max(0, usage.output_tokens ?? 0);
12480
+ const regularInputTokens = Math.max(
12481
+ 0,
12482
+ totalInputTokens - cachingWriteTokens - cachingReadTokens
12483
+ );
12484
+ const cachingWritePrice = resolvedPrice.cachingWrite ?? 0;
12485
+ const cachingReadPrice = resolvedPrice.cachingRead ?? 0;
12486
+ const regularTotal = (regularInputTokens * resolvedPrice.input + outputTokens * resolvedPrice.output + cachingWriteTokens * cachingWritePrice + cachingReadTokens * cachingReadPrice) / 1e6;
12487
+ const chargeTotal = (regularInputTokens * effectiveInputPrice + outputTokens * effectiveOutputPrice + cachingWriteTokens * cachingWritePrice + cachingReadTokens * cachingReadPrice) / 1e6;
12488
+ return {
12489
+ regular: regularTotal,
12490
+ charge: chargeTotal,
12491
+ details: {
12492
+ inputCost: regularInputTokens * resolvedPrice.input / 1e6,
12493
+ outputCost: outputTokens * resolvedPrice.output / 1e6,
12494
+ cachingWriteCost: cachingWriteTokens * cachingWritePrice / 1e6,
12495
+ cachingReadCost: cachingReadTokens * cachingReadPrice / 1e6
12496
+ }
12497
+ };
12498
+ };
12499
+ var resolvePlatformCloudflareCacheCost = (modelName, resolvedPrice, usage, externalPrice) => {
12500
+ const routing = resolvePlatformHostedRouting(modelName);
12501
+ const isCloudflareUpstream = routing?.usageProvider === "cloudflare";
12502
+ const hasExplicitCachingPrices = typeof resolvedPrice.cachingWrite === "number" && typeof resolvedPrice.cachingRead === "number";
12503
+ if (!isCloudflareUpstream || !hasExplicitCachingPrices) return null;
12504
+ return calculateCanonicalInputTotalCost(resolvedPrice, usage, externalPrice);
12505
+ };
12379
12506
  var calculateSimpleCost = (resolvedPrice, usage, externalPrice) => {
12380
12507
  const { input_tokens, output_tokens } = usage;
12381
12508
  const { input: effectiveInputPrice, output: effectiveOutputPrice } = getEffectivePrices(resolvedPrice, externalPrice);
@@ -12462,8 +12589,16 @@ var calculateBasicCost = (model, usage, provider, externalPrice, billingServiceT
12462
12589
  // without it keep simple full-price billing so cached tokens are not
12463
12590
  // priced at 0 — but a platform-hosted model用于 agentic 循环时必须补上
12464
12591
  // 这一项,否则每轮重放的上下文会被按 input 原价重复计费。
12465
- case "nolo":
12592
+ case "nolo": {
12593
+ const platformCloudflareCosts = resolvePlatformCloudflareCacheCost(
12594
+ model.name,
12595
+ resolvedPrice,
12596
+ usage,
12597
+ externalPrice
12598
+ );
12599
+ if (platformCloudflareCosts) return platformCloudflareCosts;
12466
12600
  return typeof resolvedPrice.inputCacheHit === "number" ? calculateCacheBasedCost(resolvedPrice, usage, externalPrice) : calculateSimpleCost(resolvedPrice, usage, externalPrice);
12601
+ }
12467
12602
  case "anthropic":
12468
12603
  return calculateAnthropicCost(resolvedPrice, usage, externalPrice);
12469
12604
  case "google":
@@ -12638,14 +12773,16 @@ var resolveBillingModel = (usageModel, fallbackModel) => {
12638
12773
  var resolveBillingTarget = ({
12639
12774
  usage,
12640
12775
  fallbackProvider,
12641
- fallbackModel
12776
+ fallbackModel,
12777
+ isPlatformBilled
12642
12778
  }) => {
12643
12779
  const provider = normalizeString2(usage?.billing_provider) ?? normalizeString2(fallbackProvider);
12644
12780
  const model = resolveBillingModel(usage?.billing_model, fallbackModel);
12645
12781
  const serviceTier = normalizeString2(usage?.billing_service_tier);
12782
+ const billedModel = isPlatformBilled === true && isPlatformManagedProvider(provider, model) ? resolvePlatformEffectiveModel(model) ?? model : model;
12646
12783
  return {
12647
12784
  provider,
12648
- model,
12785
+ model: billedModel,
12649
12786
  serviceTier
12650
12787
  };
12651
12788
  };
@@ -12660,7 +12797,10 @@ function resolveTokenUsagePricing(args) {
12660
12797
  const billingTarget = resolveBillingTarget({
12661
12798
  usage,
12662
12799
  fallbackProvider: agentConfig.provider,
12663
- fallbackModel: agentConfig.model
12800
+ fallbackModel: agentConfig.model,
12801
+ // 可信平台计费身份:apiSource=platform 或代码内置 agent 守卫(canonical key)。
12802
+ // 仅此二者允许平台别名规范化,避免把 BYOK / custom / OAuth 的旧 id 也改写。
12803
+ isPlatformBilled: agentConfig.apiSource === "platform" || isBuiltinPlatformAgentKey(args.agentId?.trim())
12664
12804
  });
12665
12805
  const billedProvider = billingTarget.provider;
12666
12806
  const billedModel = billingTarget.model;
@@ -12673,6 +12813,10 @@ function resolveTokenUsagePricing(args) {
12673
12813
  console.warn(
12674
12814
  `[billing] platform agent ignored persisted prices (input=${agentConfig.inputPrice}, output=${agentConfig.outputPrice}); canonical key missing or not in builtin set: "${canonicalAgentId || ""}"`
12675
12815
  );
12816
+ } else if (!isPlatformBilled && isCodeOwnedBuiltin && hasPersistedPrices) {
12817
+ console.warn(
12818
+ `[billing] code-owned builtin identity ignored persisted prices (input=${agentConfig.inputPrice}, output=${agentConfig.outputPrice}); apiSource="${agentConfig.apiSource || ""}" key="${canonicalAgentId || ""}"`
12819
+ );
12676
12820
  }
12677
12821
  const hasExternalPrice = !isCodeOwnedBuiltin && !isPlatformBilled && hasPersistedPrices;
12678
12822
  const { cost, pay } = calculatePrice({
@@ -13273,7 +13417,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13273
13417
  }
13274
13418
  if (isCurrentDialog) {
13275
13419
  await thunkApi.dispatch(resetMsgs());
13276
- const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-V2SVSTIV.js");
13420
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-GIKNUHNW.js");
13277
13421
  dispatch(clearPendingAttachments2());
13278
13422
  }
13279
13423
  return { dialogKey, isCurrentDialog, attachmentPlan };
@@ -13281,39 +13425,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
13281
13425
 
13282
13426
  // packages/chat/dialog/dialogSlice.ts
13283
13427
  var runCreateDialogAction = async (args, thunkApi) => {
13284
- const { createDialogAction } = await import("./createDialogAction-TTUA46DT.js");
13428
+ const { createDialogAction } = await import("./createDialogAction-QZ6X4A7O.js");
13285
13429
  return createDialogAction(args, thunkApi);
13286
13430
  };
13287
13431
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13288
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-ZNVLI4WV.js");
13432
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-NQ6AZM42.js");
13289
13433
  return createAgentAutomationAction(args, thunkApi);
13290
13434
  };
13291
13435
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13292
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-5WXTRUJM.js");
13436
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-GJCNWTPY.js");
13293
13437
  return updateDialogTitleAction(args, thunkApi);
13294
13438
  };
13295
13439
  var runAddDialogAgentAction = async (args, thunkApi) => {
13296
- const { addDialogAgentAction } = await import("./addDialogAgentAction-PHIXJCF2.js");
13440
+ const { addDialogAgentAction } = await import("./addDialogAgentAction-5HVGEIXI.js");
13297
13441
  return addDialogAgentAction(args, thunkApi);
13298
13442
  };
13299
13443
  var runRemoveDialogAgentAction = async (args, thunkApi) => {
13300
- const { removeDialogAgentAction } = await import("./removeDialogAgentAction-IN4WUKJJ.js");
13444
+ const { removeDialogAgentAction } = await import("./removeDialogAgentAction-HDUI2MU3.js");
13301
13445
  return removeDialogAgentAction(args, thunkApi);
13302
13446
  };
13303
13447
  var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
13304
- const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-RO6LIWJ4.js");
13448
+ const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-PXVXQJ62.js");
13305
13449
  return setPrimaryDialogAgentAction(args, thunkApi);
13306
13450
  };
13307
13451
  var runSwitchDialogAgentAction = async (args, thunkApi) => {
13308
- const { switchDialogAgentAction } = await import("./switchDialogAgentAction-MVF2JNE7.js");
13452
+ const { switchDialogAgentAction } = await import("./switchDialogAgentAction-Z3RZACGF.js");
13309
13453
  return switchDialogAgentAction(args, thunkApi);
13310
13454
  };
13311
13455
  var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
13312
- const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-VDRF7LPK.js");
13456
+ const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-ADBVOP4O.js");
13313
13457
  return setDialogExtraReferencesAction(args, thunkApi);
13314
13458
  };
13315
13459
  var runHandleSendMessageAction = async (args, thunkApi) => {
13316
- const { handleSendMessageAction } = await import("./handleSendMessageAction-VEWLGB5Z.js");
13460
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-B2VXOLMM.js");
13317
13461
  return handleSendMessageAction(args, thunkApi);
13318
13462
  };
13319
13463
  function clearDialogState() {
@@ -13326,7 +13470,7 @@ var createPageAndAddReference = createAsyncThunk(
13326
13470
  async (payload, { dispatch, getState, rejectWithValue }) => {
13327
13471
  const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
13328
13472
  try {
13329
- const { createDocState } = await import("./docStore-4RWAFNDM.js");
13473
+ const { createDocState } = await import("./docStore-6GUOZH52.js");
13330
13474
  const pageKey = await createDocState(
13331
13475
  { slateData, title },
13332
13476
  { dispatch, getState }
@@ -13368,6 +13512,8 @@ var initDialog = createAsyncThunk(
13368
13512
  async (id, { dispatch, signal, getState }) => {
13369
13513
  setActiveDialogKey(id);
13370
13514
  resetDialogRuntimeSessionState(id);
13515
+ setMediaJobRuntimeActor(selectIdentityUserId(getState()) ?? null);
13516
+ restoreMediaJobPendingFiles(id);
13371
13517
  try {
13372
13518
  const { currentServer: preferredServerOrigin } = getRuntimeServerContext(
13373
13519
  getState()
@@ -13491,6 +13637,7 @@ export {
13491
13637
  parseUiAskChoiceContent,
13492
13638
  API_REPORTED_COST_MULTIPLIER,
13493
13639
  runtime_default,
13640
+ toolResultNeedsUserConfirmation,
13494
13641
  isAssistantToolStub,
13495
13642
  fetchAndCacheMessages,
13496
13643
  toast,
@@ -0,0 +1,17 @@
1
+ // packages/ai/lecture/mediaToolConfirm.ts
2
+ var MEDIA_TOOL_CONFIRM_STATUS = "requires_confirmation";
3
+ var MEDIA_TOOL_NEEDS_USER_INPUT = true;
4
+ var MEDIA_TOOL_CONFIRM_INTERACTION = "authorize";
5
+ function normalizeMediaConfirmExecutionRevision(value) {
6
+ return typeof value === "number" && Number.isInteger(value) && value >= 0 ? value : void 0;
7
+ }
8
+ function isMediaToolConfirmation(value) {
9
+ if (!value || typeof value !== "object" || Array.isArray(value)) return false;
10
+ const v = value;
11
+ return v.status === MEDIA_TOOL_CONFIRM_STATUS && v.needsUserInput === MEDIA_TOOL_NEEDS_USER_INPUT && v.interaction === MEDIA_TOOL_CONFIRM_INTERACTION && (v.reason === "unauthorized" || v.reason === "budget_overrun") && typeof v.jobId === "string" && (v.step === "transcribe" || v.step === "translate") && typeof v.summary === "string";
12
+ }
13
+
14
+ export {
15
+ normalizeMediaConfirmExecutionRevision,
16
+ isMediaToolConfirmation
17
+ };
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-PSCNXBYA.js";
4
4
  import {
5
5
  addContentAction
6
- } from "./chunk-3F424ASC.js";
6
+ } from "./chunk-YFU5EELM.js";
7
7
  import {
8
8
  upload
9
- } from "./chunk-4WMMIL66.js";
9
+ } from "./chunk-ZYM73IHG.js";
10
10
  import {
11
11
  getRuntimeServerContext
12
12
  } from "./chunk-O7SVKKLY.js";