nolo-cli 0.12.0-alpha.1 → 0.12.0-alpha.10

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 (82) hide show
  1. package/{_executeModel-MWAY74HA.js → _executeModel-4F7VZR5U.js} +24 -23
  2. package/{action-RAXNQQKC.js → action-OTOWUMPW.js} +3 -3
  3. package/{addContentAction-ZHI7TVV3.js → addContentAction-JGBUVR7K.js} +2 -2
  4. package/{addDialogAgentAction-JWXPKXNC.js → addDialogAgentAction-V6CL2UCF.js} +1 -1
  5. package/{agentDeleteCommand-LXR5A5FV.js → agentDeleteCommand-MMRSG6AB.js} +15 -14
  6. package/{agentEmailCommands-DXRAP7BB.js → agentEmailCommands-YFVKOGM7.js} +28 -27
  7. package/{agentListCommands-ZFMS5ZLY.js → agentListCommands-2PZHIQ3I.js} +16 -15
  8. package/{agentMachineCommands-ZJLYVV52.js → agentMachineCommands-55UUZNHF.js} +17 -16
  9. package/{agentRecordCommands-DFS626TB.js → agentRecordCommands-BTP3OAPL.js} +28 -27
  10. package/{agentRunCommand-GWBIE2TS.js → agentRunCommand-AA4QLRQZ.js} +29 -28
  11. package/{agentRuntimeLocal-YNZSHMZC.js → agentRuntimeLocal-QDJCBXM2.js} +12 -11
  12. package/{agentSlice-T2PXOEPQ.js → agentSlice-6JAJOU3X.js} +2 -2
  13. package/{chunk-G3B356GF.js → chunk-2BVGERJ2.js} +67 -3
  14. package/{chunk-WWU275LU.js → chunk-3MI5LDDU.js} +2 -2
  15. package/{chunk-OPZYGHUC.js → chunk-3WGLLTK4.js} +59 -1
  16. package/{chunk-EBH7G34M.js → chunk-3XF6LCCN.js} +2 -2
  17. package/chunk-5MMAK75Q.js +15 -0
  18. package/{chunk-ZR4VHQ5D.js → chunk-5S4SWV5G.js} +38 -26
  19. package/{chunk-JUN3HFMN.js → chunk-5V524MHX.js} +25 -15
  20. package/{chunk-JZDIW766.js → chunk-ARSC56DC.js} +1 -1
  21. package/{chunk-3QKO4EHV.js → chunk-AS3ZQ3O2.js} +16 -25
  22. package/{chunk-43UD5ZP7.js → chunk-B4KT7RN2.js} +4 -4
  23. package/{chunk-YTQLJYLB.js → chunk-C3BFP57W.js} +95 -2
  24. package/{chunk-QCA3EPYK.js → chunk-CGDQDXKZ.js} +1 -1
  25. package/{chunk-7MYHLZ3F.js → chunk-DPFWKRHG.js} +1 -1
  26. package/{chunk-LHSJMY5V.js → chunk-EIMX5ER5.js} +3 -3
  27. package/{chunk-AM53Q2SD.js → chunk-FSUZIGIG.js} +28 -39
  28. package/{chunk-4GBNEA5B.js → chunk-H5Y2H2N6.js} +1 -1
  29. package/{chunk-S73OEOHH.js → chunk-JFANOO7I.js} +3 -15
  30. package/{chunk-OCDEWRE2.js → chunk-JKWWVF2I.js} +1 -1
  31. package/{chunk-WTYKCU4W.js → chunk-JU7J7EAV.js} +37 -37
  32. package/{chunk-5ITRDSHY.js → chunk-KWBH4RAL.js} +57 -18
  33. package/{chunk-6OVCRC72.js → chunk-LUKQQJFL.js} +39 -2
  34. package/{chunk-DRMGJFGQ.js → chunk-MG6BVV3T.js} +31 -17
  35. package/{chunk-RSEUHW6T.js → chunk-MQRZ5QUH.js} +1 -1
  36. package/{chunk-RZ735TLX.js → chunk-MZHSAPZP.js} +167 -20
  37. package/{chunk-OPKKB25T.js → chunk-O4FOPRCP.js} +1 -1
  38. package/{chunk-S3UTETIC.js → chunk-OGGHETUE.js} +19 -4
  39. package/{chunk-4EH7AR52.js → chunk-OPM2DE2J.js} +1 -1
  40. package/{chunk-UG3WOFU6.js → chunk-QJSTNKJY.js} +1 -1
  41. package/{chunk-DE5BA4O6.js → chunk-QUHUVG6Y.js} +2 -2
  42. package/{chunk-YDCZVUFP.js → chunk-RQSOAMPJ.js} +16 -0
  43. package/{chunk-ZPFRLGIZ.js → chunk-RUGEW4P7.js} +70 -37
  44. package/{chunk-6LMFFG3K.js → chunk-RWO5DGXI.js} +2 -2
  45. package/{chunk-4BTHUYMY.js → chunk-TA7VKOHU.js} +23 -9
  46. package/{chunk-MEVCDATU.js → chunk-TQYYGE6G.js} +3 -3
  47. package/{chunk-TSKWE74T.js → chunk-TYPHUVK5.js} +13 -1
  48. package/{chunk-RNQ5BLR2.js → chunk-VBSWHE5W.js} +1 -1
  49. package/{chunk-NITP2JDG.js → chunk-VKG4HXYV.js} +1 -1
  50. package/{chunk-3HHTVM6G.js → chunk-WVTBAALN.js} +1 -1
  51. package/{chunk-GPZM7QH6.js → chunk-Y5P3ZRGC.js} +4 -4
  52. package/{chunk-GDBCUWQ3.js → chunk-YUMYYXPI.js} +31 -167
  53. package/{createAgentAutomationAction-G32GKDGV.js → createAgentAutomationAction-4NY4JLOK.js} +9 -8
  54. package/{createDialogAction-TISANRZK.js → createDialogAction-I5WUWFJ6.js} +10 -9
  55. package/{createPageAction-O7KOYNV4.js → createPageAction-HFTIQ7TW.js} +9 -8
  56. package/{dbSlice-WDP2ZZHK.js → dbSlice-J4PUZ6Y5.js} +1 -1
  57. package/{dialogCommands-6JPB3YQY.js → dialogCommands-SVXRJFZS.js} +16 -15
  58. package/{dialogSlice-PRHHYSP5.js → dialogSlice-35LA3ZRG.js} +9 -8
  59. package/{docCreateCommands-75E6TZNN.js → docCreateCommands-Z7RIAYKQ.js} +15 -14
  60. package/{docDeleteCommands-EJHLN7LW.js → docDeleteCommands-NEYHUVZF.js} +16 -15
  61. package/{docReadCommands-RJYBC4FS.js → docReadCommands-I4US2SDE.js} +15 -14
  62. package/{docStore-H5VWKT5D.js → docStore-3CP2IO6M.js} +10 -9
  63. package/{docUpdateCommands-MG4CNISV.js → docUpdateCommands-UU5HQBRP.js} +15 -14
  64. package/{getPricing-6TOZXPAU.js → getPricing-UGDJHI7M.js} +2 -2
  65. package/{handleSendMessageAction-QTUGICSZ.js → handleSendMessageAction-FWTLQGOZ.js} +9 -8
  66. package/index.js +36 -36
  67. package/{machineCommands-MAV7M3TK.js → machineCommands-STHZKBDJ.js} +28 -27
  68. package/{machineWsRunDispatch-ZOEGTKHC.js → machineWsRunDispatch-7YHT4TPT.js} +27 -26
  69. package/package.json +1 -1
  70. package/{readlineWorkspace-SWQKC7ZS.js → readlineWorkspace-OMRWYMB6.js} +203 -75
  71. package/{removeDialogAgentAction-GTX5AN54.js → removeDialogAgentAction-XUZYQBV4.js} +3 -3
  72. package/{runAgentClientLoop-P25HACXX.js → runAgentClientLoop-FP2K33ZO.js} +20 -19
  73. package/{setDialogExtraReferencesAction-WFQ63KYO.js → setDialogExtraReferencesAction-PTAIFKGM.js} +1 -1
  74. package/{setPrimaryDialogAgentAction-P57FXTSU.js → setPrimaryDialogAgentAction-HRFTDB44.js} +3 -3
  75. package/{settingSlice-CK5YZGNI.js → settingSlice-VGRJUSE5.js} +2 -2
  76. package/{skillDiscovery-ZYHSX7VD.js → skillDiscovery-6M2BZUFN.js} +1 -1
  77. package/{spaceCommands-6O5EFEM5.js → spaceCommands-GN73BCOB.js} +15 -14
  78. package/{spaceSlice-4EXTYXS4.js → spaceSlice-WTFNKOVA.js} +11 -8
  79. package/{streamAgentChatTurn-Q3FJAHG2.js → streamAgentChatTurn-HBAQQVNK.js} +244 -26
  80. package/{tools-AHNQE4GP.js → tools-TPQYTLQZ.js} +15 -14
  81. package/{tuiSummaryLlmCaller-TXLF4MEI.js → tuiSummaryLlmCaller-XDC7WG4K.js} +6 -4
  82. package/{updateDialogTitleAction-XZDVLKVX.js → updateDialogTitleAction-AWXNPUQJ.js} +9 -8
@@ -18,7 +18,7 @@ import {
18
18
  isBuiltinNoloAgentRef,
19
19
  t,
20
20
  toolLabel
21
- } from "./chunk-5ITRDSHY.js";
21
+ } from "./chunk-KWBH4RAL.js";
22
22
  import {
23
23
  CliProviderQuotaError
24
24
  } from "./chunk-CMKUBIGW.js";
@@ -28,10 +28,10 @@ import {
28
28
  import {
29
29
  readDbRecord,
30
30
  resolveAgentRecordFromHybridStore
31
- } from "./chunk-QCA3EPYK.js";
31
+ } from "./chunk-CGDQDXKZ.js";
32
32
  import {
33
33
  normalizeAgentHandle
34
- } from "./chunk-RNQ5BLR2.js";
34
+ } from "./chunk-VBSWHE5W.js";
35
35
  import {
36
36
  NOLO_PROJECT_MANAGER_AGENT_KEY,
37
37
  isLocalCliAgentKey
@@ -48,14 +48,14 @@ import {
48
48
  formatStatusRunCard,
49
49
  formatStopRunCard,
50
50
  isAgentRunTerminalStatus
51
- } from "./chunk-RZ735TLX.js";
51
+ } from "./chunk-MZHSAPZP.js";
52
52
  import {
53
53
  isGatewayHttpStatus
54
- } from "./chunk-YDCZVUFP.js";
54
+ } from "./chunk-RQSOAMPJ.js";
55
55
  import {
56
56
  buildMemorySubjectsForAgent,
57
57
  resolveAgentMemoryPolicy
58
- } from "./chunk-G3B356GF.js";
58
+ } from "./chunk-2BVGERJ2.js";
59
59
  import {
60
60
  parseExternalSkillMarkdown,
61
61
  parseSkillDocProtocol
@@ -64,14 +64,14 @@ import {
64
64
  API_REPORTED_COST_MULTIPLIER,
65
65
  normalizeUsage,
66
66
  parseUiAskChoiceContent
67
- } from "./chunk-AM53Q2SD.js";
67
+ } from "./chunk-FSUZIGIG.js";
68
68
  import {
69
69
  buildSkillDiscoveryContextBlock
70
- } from "./chunk-3QKO4EHV.js";
70
+ } from "./chunk-AS3ZQ3O2.js";
71
71
  import {
72
72
  buildPlatformChatCompletionRequest,
73
73
  parsePlatformChatCompletionData
74
- } from "./chunk-ZR4VHQ5D.js";
74
+ } from "./chunk-5S4SWV5G.js";
75
75
  import {
76
76
  resolveAgentRuntimeConfigFromRecord
77
77
  } from "./chunk-NCGFB7NN.js";
@@ -80,18 +80,20 @@ import {
80
80
  LOCAL_TURN_ABORTED_CODE,
81
81
  readActionGate,
82
82
  readCommandActionGatePayload
83
- } from "./chunk-4BTHUYMY.js";
83
+ } from "./chunk-TA7VKOHU.js";
84
84
  import {
85
85
  resolvePlatformChatCompletionsEndpoint
86
- } from "./chunk-TSKWE74T.js";
86
+ } from "./chunk-TYPHUVK5.js";
87
87
  import {
88
88
  DEFAULT_CONTEXT_WINDOW,
89
- clipCompactText,
90
89
  getModelContextWindow
91
- } from "./chunk-S73OEOHH.js";
90
+ } from "./chunk-JFANOO7I.js";
91
+ import {
92
+ clipCompactText
93
+ } from "./chunk-5MMAK75Q.js";
92
94
  import {
93
95
  findModelConfig
94
- } from "./chunk-S3UTETIC.js";
96
+ } from "./chunk-OGGHETUE.js";
95
97
  import {
96
98
  buildMemoryOverlayLayer,
97
99
  buildMemoryUseGuidanceLayer
@@ -151,6 +153,12 @@ var INTENT_PROVIDER = "deepseek";
151
153
  var QUICK_CHAT_INTENT_TIMEOUT_MS = 4e3;
152
154
  var SHORT_GREETING_MAX_LENGTH = 20;
153
155
  var SHORT_GREETING_PATTERN = /^(?:hi|hello|hey|hiya|yo|sup|howdy|嗨|哈喽|哈囉|你好|您好|在吗|在嘛|喂|早上好|中午好|下午好|晚上好|拜拜|再见|谢谢|thanks|thx|ok|好的|收到|了解)[!.。,、~~]?$/iu;
156
+ var VALID_QUICK_CHAT_SKILLS = /* @__PURE__ */ new Set([
157
+ "table",
158
+ "doc",
159
+ "code",
160
+ "pagebuilder"
161
+ ]);
154
162
  function isShortGreeting(text) {
155
163
  const trimmed = text.trim();
156
164
  if (!trimmed) return false;
@@ -206,10 +214,11 @@ ${agentList}
206
214
  - \u7528\u6237\u8981\u65B0\u5EFA/\u6574\u7406/\u5F55\u5165/\u6279\u91CF\u5904\u7406\u8868\u683C\u6570\u636E\uFF08\u5EFA\u8868\u3001\u52A0\u884C\u3001\u6539\u5217\u3001\u6309\u6761\u4EF6\u6574\u7406\u6570\u636E\uFF09\u2192 skills \u542B "table"
207
215
  - \u7528\u6237\u8981\u5199/\u6DA6\u8272/\u6539\u5199/\u7EED\u5199/\u6392\u7248\u4E00\u7BC7\u6587\u6863\u6216\u6587\u7AE0 \u2192 skills \u542B "doc"
208
216
  - \u7528\u6237\u8981\u5199/\u6539/\u5B9E\u73B0/\u4FEE bug/refactor/\u8865\u6D4B\u8BD5/\u5BA1\u67E5\u5E76\u4FEE\u6539\u4EE3\u7801 \u2192 skills \u542B "code"\uFF08\u4EC5\u95EE\u901A\u7528\u77E5\u8BC6\u3001\u7EAF\u95F2\u804A\u3001\u53EA\u67E5\u770B git/\u4ED3\u5E93\u72B6\u6001\u800C\u4E0D\u4FEE\u6539\u4EE3\u7801\u65F6\u4E0D\u6302 "code"\uFF09
217
+ - \u7528\u6237\u60F3\u8981\u4E00\u4E2A\u53EF\u4EA4\u4E92\u7684\u53EF\u89C6\u5316\u9875\u9762/\u62A5\u544A/\u770B\u677F/\u4E3B\u9875/\u6559\u7A0B/\u5BF9\u6BD4\u9875/\u8BA1\u5212\u9875\uFF08\u5982"\u505A\u4E2A\u65E5\u62A5""\u505A\u4E00\u4E2A\u4E2A\u4EBA\u4E3B\u9875""\u505A\u4E2A\u9500\u552E\u770B\u677F""\u505A\u4E2A\u65B9\u6848\u5BF9\u6BD4\u9875""\u505A\u4E2A\u5B66\u4E60\u8BA1\u5212\u9875"\uFF09\u2192 skills \u542B "pagebuilder"
209
218
  - \u666E\u901A\u95EE\u7B54/\u7EAF\u95F2\u804A/\u5EFA\u5E94\u7528 \u2192 skills \u4E3A []
210
219
 
211
220
  \u53EA\u8F93\u51FA JSON\uFF0C\u4E0D\u8981\u8F93\u51FA\u5176\u4ED6\u5185\u5BB9\uFF1A
212
- {"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "needsWorkspace": <true \u6216 false>, "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F "table" | "doc" | "code"\uFF0C\u672A\u547D\u4E2D\u7ED9 []>}`;
221
+ {"confidence": <0\u52301\u4E4B\u95F4\u7684\u5C0F\u6570\uFF0C\u8868\u793A\u4F60\u5BF9\u8FD9\u4E2A\u5206\u7C7B\u5224\u65AD\u7684\u628A\u63E1\u7A0B\u5EA6>, "agentKey": "<\u4ECE\u5217\u8868\u4E2D\u9009\u62E9\u7684 agentKey>", "needsWorkspace": <true \u6216 false>, "skills": <\u5B57\u7B26\u4E32\u6570\u7EC4\uFF0C\u5143\u7D20\u53EA\u80FD\u662F ${[...VALID_QUICK_CHAT_SKILLS].map((s) => `"${s}"`).join(" | ")}\uFF0C\u672A\u547D\u4E2D\u7ED9 []>}`;
213
222
  }
214
223
  function parseQuickChatIntentResult(content, tierAgents) {
215
224
  try {
@@ -226,7 +235,7 @@ function parseQuickChatIntentResult(content, tierAgents) {
226
235
  let skills;
227
236
  if (Array.isArray(rawSkills)) {
228
237
  const filtered = [...new Set(rawSkills)].filter(
229
- (s) => s === "table" || s === "doc" || s === "code"
238
+ (s) => typeof s === "string" && VALID_QUICK_CHAT_SKILLS.has(s)
230
239
  );
231
240
  if (filtered.length > 0) skills = filtered;
232
241
  }
@@ -808,14 +817,14 @@ var THEME_PALETTES = {
808
817
  muted: { hex: "6E7781", ansiFallback: "\x1B[90m" }
809
818
  },
810
819
  dark: {
811
- accent: { hex: "58A6FF", ansiFallback: "\x1B[34m" },
812
- // GitHub sky blue
813
- chrome: { hex: "6E7681", ansiFallback: "\x1B[90m" },
814
- success: { hex: "3FB950", ansiFallback: "\x1B[32m" },
815
- warning: { hex: "D29922", ansiFallback: "\x1B[33m" },
816
- info: { hex: "58A6FF", ansiFallback: "\x1B[36m" },
817
- danger: { hex: "FF7B72", ansiFallback: "\x1B[31m" },
818
- muted: { hex: "B1BAC4", ansiFallback: "\x1B[90m" }
820
+ accent: { hex: "89B4FA", ansiFallback: "\x1B[34m" },
821
+ // Catppuccin Mocha Blue
822
+ chrome: { hex: "6C7086", ansiFallback: "\x1B[90m" },
823
+ success: { hex: "A6E3A1", ansiFallback: "\x1B[32m" },
824
+ warning: { hex: "F9E2AF", ansiFallback: "\x1B[33m" },
825
+ info: { hex: "89B4FA", ansiFallback: "\x1B[36m" },
826
+ danger: { hex: "F38BA8", ansiFallback: "\x1B[31m" },
827
+ muted: { hex: "A6ADC8", ansiFallback: "\x1B[90m" }
819
828
  }
820
829
  },
821
830
  wave: {
@@ -967,7 +976,7 @@ function hexToSgr(hex) {
967
976
  }
968
977
  var SURFACE_HEX = {
969
978
  trail: { light: "E4E8EC", dark: "313244" },
970
- catppuccin: { light: "E8ECF0", dark: "161B22" },
979
+ catppuccin: { light: "E8ECF0", dark: "181825" },
971
980
  wave: { light: "E5E1D6", dark: "2A2A37" },
972
981
  iris: { light: "E9E8F2", dark: "2A2740" },
973
982
  rose: { light: "F2EAE4", dark: "26233A" },
@@ -3151,6 +3160,12 @@ ${options.agentName} > `);
3151
3160
  spinner.show(activeLabel);
3152
3161
  options.activityReporter?.(activeLabel);
3153
3162
  }
3163
+ if (event.type === "tool-result" && options.onAgentRunStatus && (event.toolName === "startAgentRun" || event.toolName === "controlAgentRun")) {
3164
+ const snapshot = extractAgentRunStatusSnapshot(event);
3165
+ if (snapshot) {
3166
+ options.onAgentRunStatus(snapshot);
3167
+ }
3168
+ }
3154
3169
  };
3155
3170
  return {
3156
3171
  spinner,
@@ -3199,6 +3214,30 @@ ${options.agentName} > (no text response)
3199
3214
  }
3200
3215
  };
3201
3216
  }
3217
+ function extractAgentRunStatusSnapshot(event) {
3218
+ if (event.type !== "tool-result") return null;
3219
+ const content = typeof event.content === "string" ? event.content.trim() : "";
3220
+ if (!content.startsWith("{")) return null;
3221
+ try {
3222
+ const parsed = JSON.parse(content);
3223
+ const runId = typeof parsed.runId === "string" ? parsed.runId : "";
3224
+ const status = typeof parsed.status === "string" ? parsed.status : "running";
3225
+ const agentName = typeof parsed.agentName === "string" ? parsed.agentName : typeof parsed.name === "string" ? parsed.name : void 0;
3226
+ const logTail = typeof parsed.logTail === "string" ? parsed.logTail : void 0;
3227
+ const logLines = Array.isArray(parsed.logLines) ? parsed.logLines : void 0;
3228
+ const errorMessage = typeof parsed.errorMessage === "string" ? parsed.errorMessage : void 0;
3229
+ return {
3230
+ runId,
3231
+ agentName,
3232
+ status,
3233
+ logTail,
3234
+ logLines,
3235
+ errorMessage
3236
+ };
3237
+ } catch {
3238
+ return null;
3239
+ }
3240
+ }
3202
3241
 
3203
3242
  // packages/cli/client/agentRunStream.ts
3204
3243
  async function readStreamingAgentRun(options, res, existingSpinner) {
@@ -3581,7 +3620,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
3581
3620
  // packages/cli/client/agentRun.ts
3582
3621
  import { ulid } from "ulid";
3583
3622
  async function loadRunLocalAgentTurn() {
3584
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-YNZSHMZC.js");
3623
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QDJCBXM2.js");
3585
3624
  return runLocalAgentTurn;
3586
3625
  }
3587
3626
  async function resolveCurrentMachineId(options) {
@@ -4018,7 +4057,7 @@ async function runLocalAgentTurnForCli(options, settings) {
4018
4057
  } : void 0;
4019
4058
  const currentDialogId = options.continueDialogId ?? ulid();
4020
4059
  const runChildTurn = async (input) => {
4021
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-YNZSHMZC.js");
4060
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-QDJCBXM2.js");
4022
4061
  return runLocalAgentTurn(input);
4023
4062
  };
4024
4063
  const createFreshChildBaseAdapter = () => {
@@ -4243,8 +4282,7 @@ function workflowRefToCandidatePath(cwd, ref) {
4243
4282
  return resolve(cwd, "docs", "workflows", `${fileName}.md`);
4244
4283
  }
4245
4284
  var SKILL_SEARCH_DIRS = [
4246
- ".agents/skills",
4247
- "docs/skills"
4285
+ ".agents/skills"
4248
4286
  ];
4249
4287
  function skillRefToCandidatePath(cwd, ref) {
4250
4288
  const normalized = ref.trim();
@@ -4255,15 +4293,10 @@ function skillRefToCandidatePath(cwd, ref) {
4255
4293
  }
4256
4294
  const fileName = normalized.replace(/[^a-zA-Z0-9一-鿿]+/g, "-").replace(/^-+|-+$/g, "");
4257
4295
  for (const dir of SKILL_SEARCH_DIRS) {
4258
- if (dir === "docs/skills") {
4259
- const flatPath = resolve(cwd, dir, `${fileName}.md`);
4260
- if (existsSync(flatPath)) return flatPath;
4261
- } else {
4262
- const skillMdPath = resolve(cwd, dir, fileName, "SKILL.md");
4263
- if (existsSync(skillMdPath)) return skillMdPath;
4264
- }
4296
+ const skillMdPath = resolve(cwd, dir, fileName, "SKILL.md");
4297
+ if (existsSync(skillMdPath)) return skillMdPath;
4265
4298
  }
4266
- return resolve(cwd, "docs", "skills", `${fileName}.md`);
4299
+ return resolve(cwd, ".agents", "skills", fileName, "SKILL.md");
4267
4300
  }
4268
4301
  async function resolveWorkflowReference(ref, cwd = process.cwd()) {
4269
4302
  const path = workflowRefToCandidatePath(cwd, ref);
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  selectCurrentServer
3
- } from "./chunk-WTYKCU4W.js";
3
+ } from "./chunk-JU7J7EAV.js";
4
4
  import {
5
5
  patch
6
- } from "./chunk-NITP2JDG.js";
6
+ } from "./chunk-VKG4HXYV.js";
7
7
  import {
8
8
  selectIdentityToken
9
9
  } from "./chunk-TSUJOM6N.js";
@@ -2,22 +2,24 @@ import {
2
2
  buildCurrentTimeBlock,
3
3
  buildIdentityBlock,
4
4
  buildRuntimeGuidanceBlocks
5
- } from "./chunk-6OVCRC72.js";
5
+ } from "./chunk-LUKQQJFL.js";
6
6
  import {
7
7
  canonicalizeToolNames
8
- } from "./chunk-43UD5ZP7.js";
8
+ } from "./chunk-B4KT7RN2.js";
9
9
  import {
10
- clipCompactText,
11
10
  estimateTokenCount,
12
11
  getModelContextWindow,
13
12
  planCompression,
14
13
  planContextUsage,
15
14
  serializeMessageContent
16
- } from "./chunk-S73OEOHH.js";
15
+ } from "./chunk-JFANOO7I.js";
16
+ import {
17
+ clipCompactText
18
+ } from "./chunk-5MMAK75Q.js";
17
19
  import {
18
20
  findModelConfig,
19
21
  getProviderByModelName
20
- } from "./chunk-S3UTETIC.js";
22
+ } from "./chunk-OGGHETUE.js";
21
23
  import {
22
24
  buildDialogSummaryLayer
23
25
  } from "./chunk-QLUFR47U.js";
@@ -99,11 +101,20 @@ function stripEffortSuffix(model) {
99
101
  }
100
102
  return model;
101
103
  }
104
+ function stripPreviewSuffix(model) {
105
+ const suffix = "-preview";
106
+ if (model.endsWith(suffix) && model.length > suffix.length) {
107
+ return model.slice(0, -suffix.length);
108
+ }
109
+ return model;
110
+ }
102
111
  var lookupKnownModelVision = (provider, model) => {
103
112
  if (!model) return void 0;
104
113
  const candidates = [model];
105
- const stripped = stripEffortSuffix(model);
106
- if (stripped !== model) candidates.push(stripped);
114
+ const strippedEffort = stripEffortSuffix(model);
115
+ if (strippedEffort !== model) candidates.push(strippedEffort);
116
+ const strippedPreview = stripPreviewSuffix(model);
117
+ if (strippedPreview !== model) candidates.push(strippedPreview);
107
118
  for (const candidate of candidates) {
108
119
  if (provider) {
109
120
  const direct = findModelConfig(provider, candidate);
@@ -522,7 +533,9 @@ function resolveEmptyAssistantOutcome(args) {
522
533
  if (args.hasToolCalls || args.hasVisibleOutput) return { kind: "ok" };
523
534
  if (args.finishReason === "length") return { kind: "fallback", reason: "length_truncated" };
524
535
  if (!args.repairUsed) return { kind: "repair" };
525
- if (!args.finishReason) return { kind: "fallback", reason: "stream_truncated" };
536
+ if (!args.finishReason && !args.streamComplete) {
537
+ return { kind: "fallback", reason: "stream_truncated" };
538
+ }
526
539
  return { kind: "fallback", reason: "empty_completion" };
527
540
  }
528
541
  function resolveEmptyAssistantFallbackMessage(reason) {
@@ -1288,7 +1301,8 @@ async function runLocalAgentTurn(input) {
1288
1301
  hasToolCalls: rawToolCallsCount > 0,
1289
1302
  hasVisibleOutput: hasAssistantVisibleOutput(result.content),
1290
1303
  repairUsed: emptyAssistantRepairUsed,
1291
- finishReason: result.finish_reason
1304
+ finishReason: result.finish_reason,
1305
+ streamComplete: result.stream_complete
1292
1306
  });
1293
1307
  if (outcome.kind === "repair") {
1294
1308
  emptyAssistantRepairPending = true;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  updateContentTitle
3
- } from "./chunk-AM53Q2SD.js";
3
+ } from "./chunk-FSUZIGIG.js";
4
4
  import {
5
5
  require_date_fns
6
6
  } from "./chunk-M76ECQRD.js";
@@ -13,7 +13,7 @@ import {
13
13
  import {
14
14
  patch,
15
15
  readAndWait
16
- } from "./chunk-NITP2JDG.js";
16
+ } from "./chunk-VKG4HXYV.js";
17
17
  import {
18
18
  asOptionalTrimmedString
19
19
  } from "./chunk-G3SUCT4W.js";
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
367
367
  }
368
368
  }
369
369
  async function createDocState(args, thunkApi) {
370
- const { createPageAction } = await import("./createPageAction-O7KOYNV4.js");
370
+ const { createPageAction } = await import("./createPageAction-HFTIQ7TW.js");
371
371
  return createPageAction(args, thunkApi);
372
372
  }
373
373
  function subscribe(listener) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getModelConfig
3
- } from "./chunk-S3UTETIC.js";
3
+ } from "./chunk-OGGHETUE.js";
4
4
  import {
5
5
  asTrimmedLowercaseString
6
6
  } from "./chunk-QSJ3HFEF.js";
@@ -563,8 +563,20 @@ var extractToolCallsFromResponseOutput = (response) => {
563
563
  return calls;
564
564
  };
565
565
 
566
+ // packages/core/chat/imageParts.ts
567
+ function isImageUrlPart(part) {
568
+ return isRecord(part) && part.type === "image_url";
569
+ }
570
+ function hasImageParts(messages) {
571
+ return messages.some(
572
+ (message) => Array.isArray(message.content) && message.content.some(isImageUrlPart)
573
+ );
574
+ }
575
+
566
576
  export {
567
577
  pickAgentRuntimeInferenceOptions,
578
+ isImageUrlPart,
579
+ hasImageParts,
568
580
  preserveAgentStateFields,
569
581
  toOpenAiCompatibleMessages,
570
582
  isOpenAiResponsesModel,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  buildAgentRuntimeAgentLookupKeys,
3
3
  shouldFetchAgentRuntimeRecordRemotely
4
- } from "./chunk-DRMGJFGQ.js";
4
+ } from "./chunk-MG6BVV3T.js";
5
5
 
6
6
  // packages/cli/client/localAgentRecords.ts
7
7
  var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
@@ -778,7 +778,7 @@ var dbSlice = createSliceWithThunks({
778
778
  // 这里改成动态 import,运行期才解析,彻底断开这条边。
779
779
  share: create.asyncThunk(
780
780
  async (config, thunkApi) => {
781
- const { shareResourceAction } = await import("./action-RAXNQQKC.js");
781
+ const { shareResourceAction } = await import("./action-OTOWUMPW.js");
782
782
  return shareResourceAction(config, thunkApi);
783
783
  }
784
784
  ),
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  patch,
3
3
  read
4
- } from "./chunk-NITP2JDG.js";
4
+ } from "./chunk-VKG4HXYV.js";
5
5
  import {
6
6
  DEVICE_LOCAL_OWNER_ID,
7
7
  isDeviceLocalSpaceBody,
@@ -11,7 +11,7 @@ import {
11
11
  patch,
12
12
  remove,
13
13
  write
14
- } from "./chunk-NITP2JDG.js";
14
+ } from "./chunk-VKG4HXYV.js";
15
15
  import {
16
16
  createAgentKey,
17
17
  toTrimmedString
@@ -300,7 +300,7 @@ var slice = createSliceWithThunks({
300
300
  const overrides = {};
301
301
  if (args.systemPromptOverride !== void 0) overrides.prompt = args.systemPromptOverride;
302
302
  if (args.toolsOverride !== void 0) overrides.tools = args.toolsOverride;
303
- const { _executeModel } = await import("./_executeModel-MWAY74HA.js");
303
+ const { _executeModel } = await import("./_executeModel-4F7VZR5U.js");
304
304
  return _executeModel(
305
305
  {
306
306
  isStreaming: args.isStreaming ?? false,
@@ -321,7 +321,7 @@ var slice = createSliceWithThunks({
321
321
  * - 循环直到无工具调用或触发其他运行时停止条件
322
322
  */
323
323
  runAgent: create.asyncThunk(async (args, thunkApi) => {
324
- const { runAgentClientLoop } = await import("./runAgentClientLoop-P25HACXX.js");
324
+ const { runAgentClientLoop } = await import("./runAgentClientLoop-FP2K33ZO.js");
325
325
  const { content: loopContent, toolCallCount } = await runAgentClientLoop(
326
326
  {
327
327
  agentKey: args.agentKey,
@@ -337,7 +337,7 @@ var slice = createSliceWithThunks({
337
337
  * 聊天轮次流式 Agent 调用
338
338
  */
339
339
  streamAgentChatTurn: create.asyncThunk(async (args, thunkApi) => {
340
- const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-Q3FJAHG2.js");
340
+ const { streamAgentChatTurnHandler } = await import("./streamAgentChatTurn-HBAQQVNK.js");
341
341
  return streamAgentChatTurnHandler(args, thunkApi);
342
342
  }),
343
343
  /**