nolo-cli 0.14.0-alpha.2 → 0.14.0-alpha.3

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 (47) hide show
  1. package/README.md +5 -2
  2. package/{_executeModel-KMUDFYY2.js → _executeModel-ERQQ5SO5.js} +9 -9
  3. package/agentDeleteCommand-AZDVM4HQ.js +1 -1
  4. package/{agentEmailCommands-AP6MX4XN.js → agentEmailCommands-SBGSPBSS.js} +9 -9
  5. package/agentGrantCommands-B4MB23VQ.js +239 -0
  6. package/agentListCommands-OJLOXSKL.js +1 -1
  7. package/{agentMachineCommands-G4T4GU42.js → agentMachineCommands-Y7RXBTEY.js} +2 -2
  8. package/{agentRecordCommands-RNENEXQI.js → agentRecordCommands-LFQ3RK24.js} +9 -9
  9. package/{agentRunCommand-2VTOTQWA.js → agentRunCommand-WARBRXRP.js} +9 -9
  10. package/{agentSlice-BLHSFM3Q.js → agentSlice-F23RHRVB.js} +1 -1
  11. package/{authCommand-O7SL3WW5.js → authCommand-66ME4KZX.js} +8 -4
  12. package/{chunk-XBZL4SGS.js → chunk-4GTGSUMH.js} +2 -2
  13. package/{chunk-CPGQAMHA.js → chunk-4QUXYE7J.js} +3 -3
  14. package/{chunk-ONJIZ7UF.js → chunk-7EVWUQJZ.js} +58 -6
  15. package/{chunk-SE4YDESE.js → chunk-CBLNDNYI.js} +2 -2
  16. package/{chunk-BMZRD37B.js → chunk-KPUM5RIE.js} +35 -17
  17. package/{chunk-2Q5FTOQA.js → chunk-LAVVL3GH.js} +116 -8
  18. package/{chunk-LVJFD5HS.js → chunk-NARL6TJS.js} +8 -8
  19. package/{chunk-S6V2Y72C.js → chunk-NFRS3JW4.js} +1 -1
  20. package/{chunk-HJAMZQFI.js → chunk-NVV3ABII.js} +6 -5
  21. package/{chunk-DQUUZXUZ.js → chunk-PBP4KPF7.js} +5 -5
  22. package/{chunk-RTHJF57Z.js → chunk-RLOKCZNX.js} +1 -1
  23. package/{chunk-GGQW6DXG.js → chunk-VIPFEPO4.js} +1 -1
  24. package/{chunk-VFGBWVXO.js → chunk-X7NITNY4.js} +1 -1
  25. package/{createAgentAutomationAction-RIOI4YZI.js → createAgentAutomationAction-YCBXLFWW.js} +2 -2
  26. package/{createDialogAction-QBHFBWM4.js → createDialogAction-LOE4IBWI.js} +3 -3
  27. package/{createPageAction-GHVLL7YQ.js → createPageAction-MQPKRYSZ.js} +2 -2
  28. package/dialogCommands-BQDGLVMO.js +1 -1
  29. package/{dialogSlice-VNKDTTHR.js → dialogSlice-MLJL22KB.js} +2 -2
  30. package/docCreateCommands-K2MPMXYF.js +1 -1
  31. package/docDeleteCommands-NBAARB77.js +1 -1
  32. package/docReadCommands-S3MO5RPS.js +1 -1
  33. package/{docStore-W4KEEPCW.js → docStore-CRULGCHQ.js} +3 -3
  34. package/docUpdateCommands-EHEI7FCE.js +1 -1
  35. package/{handleSendMessageAction-6BFLKGWQ.js → handleSendMessageAction-JSJC7RWU.js} +29 -3
  36. package/index.js +33 -21
  37. package/{machineCommands-R27VIC5L.js → machineCommands-7WHQPMXF.js} +9 -9
  38. package/{machineWsRunDispatch-5JH6QGHK.js → machineWsRunDispatch-EZ2IOYWT.js} +9 -9
  39. package/package.json +1 -1
  40. package/{readlineWorkspace-RJ3TDGEK.js → readlineWorkspace-2KIRBLOS.js} +9 -9
  41. package/{runAgentClientLoop-6D7FP7CK.js → runAgentClientLoop-GFC2XHEC.js} +7 -7
  42. package/spaceCommands-4R63UST3.js +1 -1
  43. package/{spaceSlice-6PZEMRZM.js → spaceSlice-IYTGSETI.js} +2 -2
  44. package/{streamAgentChatTurn-VW7433O6.js → streamAgentChatTurn-42SBHJ6F.js} +13 -13
  45. package/{tools-MWNK4RKM.js → tools-BBNP7OHL.js} +5 -5
  46. package/{updateDialogTitleAction-3SKUPJIN.js → updateDialogTitleAction-UOULZ7J2.js} +2 -2
  47. package/{agentRuntimeLocal-4CM3VHR3.js → agentRuntimeLocal-DSUBT77I.js} +1 -1
@@ -18,7 +18,7 @@ import {
18
18
  isBuiltinNoloAgentRef,
19
19
  t,
20
20
  toolLabel
21
- } from "./chunk-BMZRD37B.js";
21
+ } from "./chunk-KPUM5RIE.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-2Q5FTOQA.js";
51
+ } from "./chunk-LAVVL3GH.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-VFGBWVXO.js";
60
+ } from "./chunk-X7NITNY4.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-LVJFD5HS.js";
69
+ } from "./chunk-NARL6TJS.js";
70
70
  import {
71
71
  buildSkillDiscoveryContextBlock
72
72
  } from "./chunk-AS3ZQ3O2.js";
@@ -2540,6 +2540,10 @@ function isFetchToolName(name) {
2540
2540
  if (!name) return false;
2541
2541
  return name === "fetchWebpage" || name === "fetch_webpage";
2542
2542
  }
2543
+ function isWebSearchToolName(name) {
2544
+ if (!name) return false;
2545
+ return name === "exa_search" || name === "exaSearch";
2546
+ }
2543
2547
  function isRunResultFoldable(event) {
2544
2548
  return Boolean(event.metadata?.actionGate) === false;
2545
2549
  }
@@ -2615,6 +2619,30 @@ function formatRunTreeBlockForCli(items, colorEnabled) {
2615
2619
  return `${headerLine}${treeLines}
2616
2620
  `;
2617
2621
  }
2622
+ function formatWebSearchTreeBlockForCli(items, colorEnabled) {
2623
+ if (items.length === 0) return "";
2624
+ const { count, lines } = formatSearchTreeLines(items);
2625
+ const titleText = toolLabel("exa_search");
2626
+ if (!colorEnabled) {
2627
+ const headerLine2 = `\u2022 ${titleText} (${count})
2628
+ `;
2629
+ const treeLines2 = lines.map((l) => ` ${l.connector}${l.queryText}`).join("\n");
2630
+ return `${headerLine2}${treeLines2}
2631
+ `;
2632
+ }
2633
+ const bullet = themeText("\u2022", "chrome", true);
2634
+ const title = styleCliText(titleText, "bold", true);
2635
+ const countText = themeText(`(${count})`, "muted", true);
2636
+ const headerLine = `${bullet} ${title} ${countText}
2637
+ `;
2638
+ const treeLines = lines.map((l) => {
2639
+ const connector = themeText(` ${l.connector}`, "chrome", true);
2640
+ const queryText = themeText(l.queryText, "muted", true);
2641
+ return `${connector}${queryText}`;
2642
+ }).join("\n");
2643
+ return `${headerLine}${treeLines}
2644
+ `;
2645
+ }
2618
2646
  function formatFetchTreeBlockForCli(items, colorEnabled) {
2619
2647
  if (items.length === 0) return "";
2620
2648
  const { count, lines } = formatFetchTreeLines(items);
@@ -2738,6 +2766,7 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2738
2766
  let searchBuffer = [];
2739
2767
  let runBuffer = [];
2740
2768
  let fetchBuffer = [];
2769
+ let webSearchBuffer = [];
2741
2770
  let statusFold = null;
2742
2771
  const lastEmittedLogByRunId = /* @__PURE__ */ new Map();
2743
2772
  const flushStatusFold = () => {
@@ -2808,6 +2837,16 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2808
2837
  fetchBuffer = [];
2809
2838
  out += formatFetchTreeBlockForCli(items, colorEnabled);
2810
2839
  }
2840
+ if (webSearchBuffer.length > 0) {
2841
+ const items = webSearchBuffer.map((evt) => {
2842
+ const call = pending.get(evt.toolCallId);
2843
+ const rawQuery = (typeof evt.metadata?.query === "string" ? evt.metadata.query : void 0) || (typeof evt.metadata?.pattern === "string" ? evt.metadata.pattern : void 0) || evt.argumentsPreview || call?.argumentsPreview || "";
2844
+ return { query: rawQuery };
2845
+ });
2846
+ for (const evt of webSearchBuffer) pending.delete(evt.toolCallId);
2847
+ webSearchBuffer = [];
2848
+ out += formatWebSearchTreeBlockForCli(items, colorEnabled);
2849
+ }
2811
2850
  return out;
2812
2851
  };
2813
2852
  const formatter = (event) => {
@@ -2916,6 +2955,19 @@ function createToolEventFormatter(mode, colorEnabled = resolveCliColorEnabled())
2916
2955
  return "";
2917
2956
  }
2918
2957
  }
2958
+ if (isWebSearchToolName(event.toolName)) {
2959
+ if (event.type === "tool-call") {
2960
+ pending.set(event.toolCallId, {
2961
+ toolName: event.toolName,
2962
+ argumentsPreview: event.argumentsPreview
2963
+ });
2964
+ return "";
2965
+ }
2966
+ if (event.type === "tool-result") {
2967
+ webSearchBuffer.push(event);
2968
+ return "";
2969
+ }
2970
+ }
2919
2971
  const flushed = flushBuffers();
2920
2972
  if (event.type === "tool-call") {
2921
2973
  pending.set(event.toolCallId, {
@@ -3618,7 +3670,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3618
3670
  // packages/cli/client/agentRun.ts
3619
3671
  import { ulid } from "ulid";
3620
3672
  async function loadRunLocalAgentTurn() {
3621
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-4CM3VHR3.js");
3673
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-DSUBT77I.js");
3622
3674
  return runLocalAgentTurn;
3623
3675
  }
3624
3676
  async function resolveCurrentMachineId(options) {
@@ -4055,7 +4107,7 @@ async function runLocalAgentTurnForCli(options, settings) {
4055
4107
  } : void 0;
4056
4108
  const currentDialogId = options.continueDialogId ?? ulid();
4057
4109
  const runChildTurn = async (input) => {
4058
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-4CM3VHR3.js");
4110
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-DSUBT77I.js");
4059
4111
  return runLocalAgentTurn(input);
4060
4112
  };
4061
4113
  const createFreshChildBaseAdapter = () => {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  createCliLocalRuntimeAdapter,
3
3
  summarizeEndpoint
4
- } from "./chunk-BMZRD37B.js";
4
+ } from "./chunk-KPUM5RIE.js";
5
5
  import {
6
6
  clipMultilineText
7
- } from "./chunk-2Q5FTOQA.js";
7
+ } from "./chunk-LAVVL3GH.js";
8
8
  import {
9
9
  runLocalAgentTurn
10
10
  } from "./chunk-VQFY3VXW.js";
@@ -28,7 +28,7 @@ import {
28
28
  import {
29
29
  inlineImageUrlsForCustomProvider,
30
30
  prepareTools
31
- } from "./chunk-RTHJF57Z.js";
31
+ } from "./chunk-RLOKCZNX.js";
32
32
  import {
33
33
  getAntigravityUserAgent,
34
34
  isAntigravityOAuthAgent,
@@ -51,8 +51,9 @@ import {
51
51
  readXPostFunctionSchema,
52
52
  readXhsProfileFunc,
53
53
  readXhsProfileFunctionSchema,
54
- rememberMemoryFunctionSchema
55
- } from "./chunk-2Q5FTOQA.js";
54
+ rememberMemoryFunctionSchema,
55
+ resolveEffectiveEnabledPacks
56
+ } from "./chunk-LAVVL3GH.js";
56
57
  import {
57
58
  createDrainExhaustedResponse,
58
59
  isCoreDrainingBody,
@@ -64,13 +65,13 @@ import {
64
65
  } from "./chunk-OWOHNGCN.js";
65
66
  import {
66
67
  prepareTokenUsageData
67
- } from "./chunk-LVJFD5HS.js";
68
+ } from "./chunk-NARL6TJS.js";
68
69
  import {
69
70
  BUILTIN_TITLE_LLM_CONFIG
70
71
  } from "./chunk-V2J635L5.js";
71
72
  import {
72
73
  fetchServerSyncedCredential
73
- } from "./chunk-CPGQAMHA.js";
74
+ } from "./chunk-4QUXYE7J.js";
74
75
  import {
75
76
  buildAgentRuntimeDialogWritePlan,
76
77
  buildLocalWorkspaceOpenAiTools,
@@ -911,7 +912,7 @@ var TOOL_LABELS = {
911
912
  // ("Fetch" / "抓取网页"), not a longer "Fetch page" phrase.
912
913
  fetchWebpage: { en: "Fetch", zh: "\u6293\u53D6\u7F51\u9875" },
913
914
  readPage: { en: "Read page", zh: "\u8BFB\u53D6\u7F51\u9875" },
914
- exaSearch: { en: "Web search", zh: "\u8054\u7F51\u641C\u7D22" },
915
+ exa_search: { en: "Web search", zh: "\u8054\u7F51\u641C\u7D22" },
915
916
  // Skill loading
916
917
  loadSkill: { en: "Used Skill", zh: "\u4F7F\u7528\u6280\u80FD" }
917
918
  };
@@ -2790,6 +2791,14 @@ import { randomUUID as randomUUID2 } from "node:crypto";
2790
2791
  var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
2791
2792
  var ANTHROPIC_API_VERSION = "2023-06-01";
2792
2793
  var ANTHROPIC_OAUTH_BETA = "oauth-2025-04-20";
2794
+ var CLAUDE_CODE_VERSION = "2.1.220";
2795
+ var CLAUDE_CODE_USER_AGENT = `claude-cli/${CLAUDE_CODE_VERSION} (external, local-agent, agent-sdk/0.1.0)`;
2796
+ var ANTHROPIC_OAUTH_BETA_HEADER = `claude-code-20250219,${ANTHROPIC_OAUTH_BETA}`;
2797
+ var CLAUDE_CODE_SYSTEM_INSTRUCTION = "You are a Claude agent, built on Anthropic's Claude Agent SDK.";
2798
+ var CLAUDE_CODE_IDENTITY_PATTERNS = [
2799
+ CLAUDE_CODE_SYSTEM_INSTRUCTION,
2800
+ "You are Claude Code"
2801
+ ];
2793
2802
  function stringValue(value) {
2794
2803
  return typeof value === "string" && value.length > 0 ? value : void 0;
2795
2804
  }
@@ -2824,6 +2833,15 @@ function pushMessage(messages, role, content) {
2824
2833
  }
2825
2834
  messages.push({ role, content });
2826
2835
  }
2836
+ function hasClaudeCodeIdentity(system) {
2837
+ return system.some((block) => {
2838
+ if (!block || typeof block !== "object") return false;
2839
+ const text = stringValue(block.text);
2840
+ return Boolean(
2841
+ text && CLAUDE_CODE_IDENTITY_PATTERNS.some((pattern) => text.includes(pattern))
2842
+ );
2843
+ });
2844
+ }
2827
2845
  function buildAnthropicMessagesBody(args) {
2828
2846
  const rawMessages = Array.isArray(args.openAiBody.messages) ? args.openAiBody.messages : [];
2829
2847
  const system = [];
@@ -2875,6 +2893,9 @@ function buildAnthropicMessagesBody(args) {
2875
2893
  }
2876
2894
  pushMessage(messages, role, blocks);
2877
2895
  }
2896
+ if (!hasClaudeCodeIdentity(system)) {
2897
+ system.unshift({ type: "text", text: CLAUDE_CODE_SYSTEM_INSTRUCTION });
2898
+ }
2878
2899
  const tools = Array.isArray(args.openAiBody.tools) ? args.openAiBody.tools.flatMap((raw) => {
2879
2900
  if (!raw || typeof raw !== "object") return [];
2880
2901
  const fn = raw.function;
@@ -2949,8 +2970,9 @@ async function fetchAnthropicMessagesCompletion(args) {
2949
2970
  "Content-Type": "application/json",
2950
2971
  Accept: "application/json",
2951
2972
  "anthropic-version": ANTHROPIC_API_VERSION,
2952
- "anthropic-beta": ANTHROPIC_OAUTH_BETA,
2953
- "User-Agent": "nolo-cli"
2973
+ "anthropic-beta": ANTHROPIC_OAUTH_BETA_HEADER,
2974
+ "User-Agent": CLAUDE_CODE_USER_AGENT,
2975
+ "x-app": "cli"
2954
2976
  },
2955
2977
  body: JSON.stringify(buildAnthropicMessagesBody(args)),
2956
2978
  signal: args.signal
@@ -9305,15 +9327,11 @@ function addDefaultCliCoreTools(toolNames, env) {
9305
9327
  return [.../* @__PURE__ */ new Set([...toolNames, ...injected])];
9306
9328
  }
9307
9329
  function resolveCliEffectiveEnabledPacks(args) {
9308
- if (args.declaredOnly === true) {
9309
- return args.enabledPacks ?? [];
9310
- }
9311
- const base = args.enabledPacks ?? [];
9312
- if (base.length === 0) {
9313
- return ["code", "agent-orchestration", "skills"];
9314
- }
9315
- const withOrchestration = base.includes("agent-orchestration") ? base : [...base, "agent-orchestration"];
9316
- return withOrchestration.includes("skills") ? withOrchestration : [...withOrchestration, "skills"];
9330
+ return resolveEffectiveEnabledPacks({
9331
+ enabledPacks: args.enabledPacks,
9332
+ declaredOnly: args.declaredOnly,
9333
+ emptyFallbackPacks: ["code"]
9334
+ });
9317
9335
  }
9318
9336
  function withRuntimeEnabledPacksAndPrompt(config) {
9319
9337
  const rawRecord = config.rawRecord ?? {};
@@ -34,10 +34,10 @@ import {
34
34
  } from "./chunk-VF4K2QE6.js";
35
35
  import {
36
36
  createDocState
37
- } from "./chunk-XBZL4SGS.js";
37
+ } from "./chunk-4GTGSUMH.js";
38
38
  import {
39
39
  createDialogAction
40
- } from "./chunk-VFGBWVXO.js";
40
+ } from "./chunk-X7NITNY4.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-LVJFD5HS.js";
79
+ } from "./chunk-NARL6TJS.js";
80
80
  import {
81
81
  createAgent,
82
82
  runLlm,
83
83
  streamAgentChatTurn,
84
84
  updateAgent
85
- } from "./chunk-CPGQAMHA.js";
85
+ } from "./chunk-4QUXYE7J.js";
86
86
  import {
87
87
  NOLO_WORKSPACE_TOOL_NAMES,
88
88
  buildNoloSubjectRefQueryTarget,
@@ -11348,6 +11348,22 @@ var CAPABILITY_PACKS = [
11348
11348
  \u{1F517} \u8BBF\u95EE\u94FE\u63A5\uFF1A[URL]
11349
11349
 
11350
11350
  \u8FD9\u4E2A\u5E94\u7528\u53EF\u4EE5\u5E2E\u4F60 [\u4E00\u53E5\u8BDD\u529F\u80FD\u63CF\u8FF0]\u3002\u60F3\u8981\u4FEE\u6539\u6216\u6DFB\u52A0\u529F\u80FD\uFF0C\u76F4\u63A5\u544A\u8BC9\u6211\u5C31\u884C\uFF01"`
11351
+ },
11352
+ {
11353
+ id: "video-transcription",
11354
+ label: "\u89C6\u9891\u8F6C\u5199",
11355
+ description: "\u8D34\u89C6\u9891\u94FE\u63A5\u5373\u53EF\u8F6C\u5199\u4E3A\u5E26\u6807\u70B9\u6587\u672C\u4E0E SRT\u3002\u652F\u6301 B \u7AD9\u5206 P\uFF08\u9ED8\u8BA4\u5168\u90E8\u5904\u7406\uFF09\u3001YouTube \u7B49\uFF1B\u6296\u97F3\u8BF7\u5728\u684C\u9762\u7AEF\u6D4F\u89C8\u5668\u4F7F\u7528\u3002",
11356
+ tools: ["transcribeVideo"],
11357
+ defaultEnabled: false,
11358
+ icon: "\u{1F3AC}",
11359
+ promptPatch: `# \u89C6\u9891\u8F6C\u5199\u80FD\u529B\u5305
11360
+
11361
+ ## \u7528\u6CD5
11362
+ - \u7528\u6237\u8D34\u4E0A\u89C6\u9891\u94FE\u63A5\u65F6\uFF0C\u76F4\u63A5\u8C03\u7528 \`transcribeVideo({ url })\`\uFF0C\u4E0D\u8981\u5148\u95EE\u8981\u4E0D\u8981\u8F6C\u5199\u3002
11363
+ - B \u7AD9\u5206 P / \u5408\u96C6\uFF1A\u7F3A\u7701\u5904\u7406\u5168\u90E8\uFF1B\u82E5\u7528\u6237\u6307\u5B9A\u300C\u53EA\u8981\u7B2C 3\u30014 \u96C6\u300D\u5219\u4F20 \`p: [3, 4]\`\u3002
11364
+ - \u8FD4\u56DE\u91CC\u7684 \`processedParts\` / \`availableParts\` \u5FC5\u987B\u5411\u7528\u6237\u8BF4\u6E05\u695A\uFF0C\u907F\u514D\u9759\u9ED8\u4E22\u5206 P\u3002
11365
+ - \u6296\u97F3\u82E5\u62A5\u300C\u8BE5\u5E73\u53F0\u9700\u8981\u767B\u5F55\u6001\uFF0C\u8BF7\u5728\u684C\u9762\u7AEF\u6D4F\u89C8\u5668\u4E2D\u4F7F\u7528\u300D\uFF0C\u63D0\u793A\u7528\u6237\u6539\u8D70\u684C\u9762\u7AEF\u6D4F\u89C8\u80FD\u529B\uFF0C\u4E0D\u8981\u5C1D\u8BD5\u4F20 cookie\u3002
11366
+ `
11351
11367
  }
11352
11368
  ];
11353
11369
  var CAPABILITY_PACK_BY_ID = CAPABILITY_PACKS.reduce(
@@ -11363,6 +11379,23 @@ var PACK_MANAGED_TOOLS = new Set(
11363
11379
  var DEFAULT_ENABLED_PACKS = CAPABILITY_PACKS.filter(
11364
11380
  (pack) => pack.defaultEnabled
11365
11381
  ).map((pack) => pack.id);
11382
+ var ALWAYS_ON_PACK_IDS = [
11383
+ "long-term-memory",
11384
+ "agent-orchestration",
11385
+ "skills"
11386
+ ];
11387
+ function resolveEffectiveEnabledPacks(args) {
11388
+ const base = args.enabledPacks ?? [];
11389
+ if (args.declaredOnly === true) return [...base];
11390
+ return [
11391
+ .../* @__PURE__ */ new Set([
11392
+ ...base,
11393
+ ...base.length === 0 ? args.emptyFallbackPacks ?? [] : [],
11394
+ ...args.hostPacks ?? [],
11395
+ ...ALWAYS_ON_PACK_IDS
11396
+ ])
11397
+ ];
11398
+ }
11366
11399
  var SYSTEM_BUILTIN_SKILL_PACK_IDS = SYSTEM_AGENT_CAPABILITY_IDS;
11367
11400
  function applySystemBuiltinSkillFilter(toolNames, systemBuiltinSkills) {
11368
11401
  if (!systemBuiltinSkills) return toolNames;
@@ -14114,7 +14147,7 @@ async function deleteDialogsFunc(args, thunkApi) {
14114
14147
  const deletedDialogIds = [];
14115
14148
  const deletedDialogKeys = [];
14116
14149
  const failures = [];
14117
- const { deleteDialog } = await import("./dialogSlice-VNKDTTHR.js");
14150
+ const { deleteDialog } = await import("./dialogSlice-MLJL22KB.js");
14118
14151
  for (const target of targets) {
14119
14152
  try {
14120
14153
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -18697,6 +18730,68 @@ var whisperV3Func = async (input, thunkApi) => {
18697
18730
  };
18698
18731
  };
18699
18732
 
18733
+ // packages/ai/tools/transcribeVideoTool.ts
18734
+ var transcribeVideoSchema = {
18735
+ name: "transcribeVideo",
18736
+ description: "\u5C06\u89C6\u9891\u94FE\u63A5\u8F6C\u5199\u4E3A\u5E26\u6807\u70B9\u7684\u6587\u672C\u4E0E SRT \u5B57\u5E55\u3002\u652F\u6301 B \u7AD9\u5206 P/\u5408\u96C6\uFF08\u9ED8\u8BA4\u5904\u7406\u5168\u90E8\uFF0C\u4E5F\u53EF\u6307\u5B9A p\uFF09\u3001YouTube \u7B49 yt-dlp \u5E73\u53F0\uFF1B\u6296\u97F3\u9700\u5728\u684C\u9762\u7AEF\u6D4F\u89C8\u5668\u4F7F\u7528\u3002\u4E0B\u8F7D\u540E\u4E0D\u8F6C\u7801\uFF0C\u4FDD\u7559\u539F\u59CB\u97F3\u8F68\u8D28\u91CF\u3002",
18737
+ parameters: {
18738
+ type: "object",
18739
+ properties: {
18740
+ url: {
18741
+ type: "string",
18742
+ description: "\u89C6\u9891\u94FE\u63A5\uFF08B \u7AD9 / YouTube \u7B49\uFF09\u3002\u5206 P \u5408\u96C6\u7F3A\u7701\u4F1A\u5904\u7406\u5168\u90E8\uFF0C\u7ED3\u679C\u91CC\u4F1A\u5217\u51FA processedParts\u3002"
18743
+ },
18744
+ p: {
18745
+ description: "\u53EF\u9009\uFF0C1-based \u5206 P \u9009\u62E9\u3002\u4F20\u5355\u4E2A\u6570\u5B57\u6216\u6570\u5B57\u6570\u7EC4\uFF1B\u7F3A\u7701=\u5168\u90E8\u5904\u7406\uFF08\u7EDD\u4E0D\u9759\u9ED8\u53EA\u6293\u7B2C\u4E00\u4E2A\uFF09\u3002",
18746
+ oneOf: [
18747
+ { type: "number" },
18748
+ { type: "array", items: { type: "number" } }
18749
+ ]
18750
+ },
18751
+ language: {
18752
+ type: "string",
18753
+ description: "\u53EF\u9009\u8BED\u8A00\u63D0\u793A\uFF0C\u9ED8\u8BA4 zh\u3002"
18754
+ }
18755
+ },
18756
+ required: ["url"]
18757
+ }
18758
+ };
18759
+ async function transcribeVideoFunc(input, thunkApi) {
18760
+ const url = typeof input?.url === "string" ? input.url.trim() : "";
18761
+ if (!url) {
18762
+ throw new Error("\u5FC5\u987B\u63D0\u4F9B\u6709\u6548\u7684 url");
18763
+ }
18764
+ const body = { url };
18765
+ if (input.p !== void 0) body.p = input.p;
18766
+ if (input.language !== void 0) body.language = input.language;
18767
+ const data = await callToolApi(thunkApi, "/api/transcribe-video", body, {
18768
+ withAuth: true
18769
+ });
18770
+ const processed = Array.isArray(data?.processedParts) && data.processedParts.length ? data.processedParts.join(",") : "?";
18771
+ const available = data?.availableParts ?? "?";
18772
+ const preview = String(data?.text || "").slice(0, 240);
18773
+ return {
18774
+ summary: `\u89C6\u9891\u8F6C\u5199\u5B8C\u6210\uFF08\u5904\u7406\u5206 P: ${processed} / \u5171 ${available}\uFF09`,
18775
+ title: data?.title,
18776
+ duration: data?.duration,
18777
+ text: data?.text || "",
18778
+ srt: data?.srt || "",
18779
+ degradedChunks: data?.degradedChunks ?? 0,
18780
+ processedParts: data?.processedParts,
18781
+ availableParts: data?.availableParts,
18782
+ parts: data?.parts,
18783
+ displayData: `\u{1F3AC} \u89C6\u9891\u8F6C\u5199\u5B8C\u6210
18784
+ - \u6807\u9898: ${data?.title ?? "?"}
18785
+ - \u5904\u7406\u5206 P: ${processed}\uFF08\u5171 ${available}\uFF09
18786
+ - \u964D\u7EA7\u5757: ${data?.degradedChunks ?? 0}
18787
+
18788
+ **\u6B63\u6587\u9884\u89C8\uFF1A**
18789
+
18790
+ ${preview}${String(data?.text || "").length > 240 ? "\u2026" : ""}`,
18791
+ rawData: data
18792
+ };
18793
+ }
18794
+
18700
18795
  // packages/ai/tools/apifyActorClient.ts
18701
18796
  async function callApifyActor(thunkApi, params) {
18702
18797
  const { actorId, input, resultType = "datasetItems", displayName } = params;
@@ -23254,7 +23349,7 @@ var executeToolRun = createAsyncThunk(
23254
23349
  if (!executionInput) {
23255
23350
  throw new Error(`ToolRun ${id} has no input to execute with.`);
23256
23351
  }
23257
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-MWNK4RKM.js");
23352
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-BBNP7OHL.js");
23258
23353
  const { executor } = findToolExecutor2(run.toolName);
23259
23354
  toolRunStarted({
23260
23355
  id: run.id,
@@ -23278,7 +23373,7 @@ var executeToolRun = createAsyncThunk(
23278
23373
  const latestState = thunkApi.getState();
23279
23374
  const userId = latestState.auth?.currentUser?.userId;
23280
23375
  if (userId) {
23281
- const { fetchUserSpaceMemberships } = await import("./spaceSlice-6PZEMRZM.js");
23376
+ const { fetchUserSpaceMemberships } = await import("./spaceSlice-IYTGSETI.js");
23282
23377
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
23283
23378
  }
23284
23379
  }
@@ -25681,7 +25776,7 @@ async function updateDocFunc(args, thunkApi) {
25681
25776
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
25682
25777
  };
25683
25778
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
25684
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-W4KEEPCW.js");
25779
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-CRULGCHQ.js");
25685
25780
  if (getDocState().pageKey === id) {
25686
25781
  applyExternalDocUpdate({
25687
25782
  slateData: finalSlateData,
@@ -27533,6 +27628,18 @@ var baseToolDefinitions = [
27533
27628
  },
27534
27629
  behavior: "data"
27535
27630
  },
27631
+ {
27632
+ id: "transcribeVideo",
27633
+ schema: transcribeVideoSchema,
27634
+ executor: transcribeVideoFunc,
27635
+ description: {
27636
+ name: "transcribeVideo",
27637
+ description: "\u5C06\u89C6\u9891\u94FE\u63A5\u8F6C\u5199\u4E3A\u5E26\u6807\u70B9\u6587\u672C\u4E0E SRT \u5B57\u5E55\u3002\u652F\u6301 B \u7AD9\u5206 P/\u5408\u96C6\uFF08\u7F3A\u7701\u5904\u7406\u5168\u90E8\uFF0C\u7EDD\u4E0D\u9759\u9ED8\u4E22\u5206 P\uFF09\u3001YouTube \u7B49\uFF1B\u6296\u97F3\u9700\u5728\u684C\u9762\u7AEF\u6D4F\u89C8\u5668\u4F7F\u7528\u3002",
27638
+ category: "\u5A92\u4F53\u5904\u7406"
27639
+ },
27640
+ behavior: "data",
27641
+ uiGroup: "general"
27642
+ },
27536
27643
  // --- Cloudflare Browser Rendering ---
27537
27644
  {
27538
27645
  id: "cfScreenshot",
@@ -27918,6 +28025,7 @@ export {
27918
28025
  formatNotFoundRunCard,
27919
28026
  isAgentRunTerminalStatus,
27920
28027
  TOOL_PACKS,
28028
+ resolveEffectiveEnabledPacks,
27921
28029
  applySystemBuiltinSkillFilter,
27922
28030
  expandEnabledPacks,
27923
28031
  expandEnabledPackPromptPatches,
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  deleteServerSyncedCredential,
17
17
  runLlm
18
- } from "./chunk-CPGQAMHA.js";
18
+ } from "./chunk-4QUXYE7J.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-BLHSFM3Q.js");
10501
+ const { streamAgentChatTurn } = await import("./agentSlice-F23RHRVB.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-VNKDTTHR.js");
13212
+ const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-MLJL22KB.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-QBHFBWM4.js");
13221
+ const { createDialogAction } = await import("./createDialogAction-LOE4IBWI.js");
13222
13222
  return createDialogAction(args, thunkApi);
13223
13223
  };
13224
13224
  var runCreateAgentAutomationAction = async (args, thunkApi) => {
13225
- const { createAgentAutomationAction } = await import("./createAgentAutomationAction-RIOI4YZI.js");
13225
+ const { createAgentAutomationAction } = await import("./createAgentAutomationAction-YCBXLFWW.js");
13226
13226
  return createAgentAutomationAction(args, thunkApi);
13227
13227
  };
13228
13228
  var runUpdateDialogTitleAction = async (args, thunkApi) => {
13229
- const { updateDialogTitleAction } = await import("./updateDialogTitleAction-3SKUPJIN.js");
13229
+ const { updateDialogTitleAction } = await import("./updateDialogTitleAction-UOULZ7J2.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-6BFLKGWQ.js");
13249
+ const { handleSendMessageAction } = await import("./handleSendMessageAction-JSJC7RWU.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-W4KEEPCW.js");
13262
+ const { createDocState } = await import("./docStore-CRULGCHQ.js");
13263
13263
  const pageKey = await createDocState(
13264
13264
  { slateData, title },
13265
13265
  { dispatch, getState }
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  fetchReferenceContents,
3
3
  resolveReferenceAssets
4
- } from "./chunk-HJAMZQFI.js";
4
+ } from "./chunk-NVV3ABII.js";
5
5
 
6
6
  // packages/ai/agent/fetchAgentContexts.ts
7
7
  async function fetchAgentContexts(references, dispatch) {
@@ -6,7 +6,7 @@ import {
6
6
  clipMultilineText,
7
7
  fetchAndSerializeTable,
8
8
  waitForAbortableDelay
9
- } from "./chunk-2Q5FTOQA.js";
9
+ } from "./chunk-LAVVL3GH.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-LVJFD5HS.js";
29
+ } from "./chunk-NARL6TJS.js";
30
30
  import {
31
31
  fetchServerSyncedCredential
32
- } from "./chunk-CPGQAMHA.js";
32
+ } from "./chunk-4QUXYE7J.js";
33
33
  import {
34
34
  buildCurrentTimeBlock,
35
35
  buildIdentityBlock,
@@ -472,7 +472,8 @@ var ANTHROPIC_MESSAGES_URL = "https://api.anthropic.com/v1/messages";
472
472
  var CODEX_REQUIRED_HEADERS = [
473
473
  "chatgpt-account-id",
474
474
  "OpenAI-Beta",
475
- "originator"
475
+ "originator",
476
+ "version"
476
477
  ];
477
478
  var ANTIGRAVITY_REQUIRED_HEADERS = [
478
479
  "User-Agent"
@@ -529,7 +530,7 @@ function resolveAgentCallPlan(agentConfig, _env) {
529
530
  if (apiKeyRef === "cursor") {
530
531
  return {
531
532
  authMethod: { kind: "oauth", ref: "cursor" },
532
- transport: "direct",
533
+ transport: "server-proxy",
533
534
  upstreamWire: "cursor-connect",
534
535
  endpoint: CURSOR_AGENT_URL,
535
536
  requiredHeaders: [
@@ -5,10 +5,10 @@ import {
5
5
  inlineImageUrlsForCustomProvider,
6
6
  prepareTools,
7
7
  shouldInlineImageUrlsForAgent
8
- } from "./chunk-RTHJF57Z.js";
8
+ } from "./chunk-RLOKCZNX.js";
9
9
  import {
10
10
  performFetchRequest
11
- } from "./chunk-HJAMZQFI.js";
11
+ } from "./chunk-NVV3ABII.js";
12
12
  import {
13
13
  getPublicImageAgentMode
14
14
  } from "./chunk-VIDPVFP3.js";
@@ -22,17 +22,17 @@ import {
22
22
  toolRunSetPending,
23
23
  toolRunStarted,
24
24
  toolRunSucceeded
25
- } from "./chunk-2Q5FTOQA.js";
25
+ } from "./chunk-LAVVL3GH.js";
26
26
  import {
27
27
  addToolMessage,
28
28
  messageStreamEnd,
29
29
  messageStreaming,
30
30
  selectCurrentSpaceId,
31
31
  updateToolMessage
32
- } from "./chunk-LVJFD5HS.js";
32
+ } from "./chunk-NARL6TJS.js";
33
33
  import {
34
34
  streamAgentChatTurn
35
- } from "./chunk-CPGQAMHA.js";
35
+ } from "./chunk-4QUXYE7J.js";
36
36
  import {
37
37
  EMPTY_ASSISTANT_REPAIR_PROMPT
38
38
  } from "./chunk-VQFY3VXW.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  i18n_default,
3
3
  toolRegistry
4
- } from "./chunk-2Q5FTOQA.js";
4
+ } from "./chunk-LAVVL3GH.js";
5
5
  import {
6
6
  canonicalizeToolNames
7
7
  } from "./chunk-B4KT7RN2.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  clearCliLocalRuntimePreparedAgentCache
3
- } from "./chunk-BMZRD37B.js";
3
+ } from "./chunk-KPUM5RIE.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-LVJFD5HS.js";
6
+ } from "./chunk-NARL6TJS.js";
7
7
  import {
8
8
  require_date_fns
9
9
  } from "./chunk-M76ECQRD.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-LVJFD5HS.js";
3
+ } from "./chunk-NARL6TJS.js";
4
4
  import "./chunk-V2J635L5.js";
5
5
  import "./chunk-MRC4Q34M.js";
6
6
  import "./chunk-MTU75CZ2.js";
7
7
  import "./chunk-CWMSB67P.js";
8
- import "./chunk-CPGQAMHA.js";
8
+ import "./chunk-4QUXYE7J.js";
9
9
  import "./chunk-V6VXDXGY.js";
10
10
  import "./chunk-Z4NR32XR.js";
11
11
  import "./chunk-M76ECQRD.js";