nolo-cli 0.10.0 → 0.11.0

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 (106) hide show
  1. package/{_executeModel-YAXYAUOK.js → _executeModel-ZEDPX6OF.js} +47 -45
  2. package/{action-TLI3V62L.js → action-AA4IJ5K2.js} +9 -9
  3. package/{addContentAction-PLWJSCOZ.js → addContentAction-QYVO4SYP.js} +8 -8
  4. package/{addDialogAgentAction-BJ6SB76X.js → addDialogAgentAction-WVVKT5WQ.js} +10 -10
  5. package/{agentDeleteCommand-2VYX73U5.js → agentDeleteCommand-RDPGYIWF.js} +25 -25
  6. package/{agentEmailCommands-3GDZIX64.js → agentEmailCommands-2HJJKS5F.js} +59 -56
  7. package/{agentListCommands-UWVBT3LH.js → agentListCommands-HFEVV3ZW.js} +30 -29
  8. package/{agentMachineCommands-WOKMUG2Y.js → agentMachineCommands-25ZOENJU.js} +28 -28
  9. package/{agentRecordCommands-MVNZRH3U.js → agentRecordCommands-GTCOAM3L.js} +50 -47
  10. package/{agentRunCommand-K7THIJLA.js → agentRunCommand-YBS3JDLD.js} +57 -53
  11. package/{agentRuntimeLocal-WJIGU24U.js → agentRuntimeLocal-UQBMQI2M.js} +11 -11
  12. package/{agentSlice-LL5TKZEO.js → agentSlice-6EKOBCCS.js} +9 -9
  13. package/{authCommand-TC2SW2CQ.js → authCommand-O2OWACN4.js} +12 -12
  14. package/{authCommands-XPEHTKSM.js → authCommands-H7365TZP.js} +6 -6
  15. package/{chunk-TYSCFY6S.js → chunk-2W2VYVI5.js} +334 -90
  16. package/{chunk-4SIMLBEU.js → chunk-3NSIQZZ6.js} +3 -3
  17. package/{chunk-AUQ747NZ.js → chunk-4SOKXIW4.js} +70 -6
  18. package/{chunk-PIVFPOW6.js → chunk-5MOUAAMK.js} +75 -71
  19. package/{chunk-A67QFHAA.js → chunk-5OIFWVX7.js} +1 -1
  20. package/{chunk-5JGGZCZL.js → chunk-7D3JY6C2.js} +2 -2
  21. package/{chunk-OR2XR25C.js → chunk-AEZAORLG.js} +4 -4
  22. package/chunk-AFON4QUU.js +112 -0
  23. package/{chunk-6KUOUWMP.js → chunk-BX6U3ETE.js} +19 -12
  24. package/{chunk-CDTLMEB3.js → chunk-C2MDQQ4O.js} +1 -1
  25. package/{chunk-SL35K7AH.js → chunk-C4FTUXVF.js} +2 -82
  26. package/{chunk-GAKEBQD6.js → chunk-D6OQHXVG.js} +11 -7
  27. package/{chunk-WPE4F4Z6.js → chunk-DWGAEFJL.js} +1 -1
  28. package/{chunk-HJGEVL7C.js → chunk-E4HNJSHC.js} +19 -19
  29. package/{chunk-TNPIMII7.js → chunk-EVZKZF32.js} +72 -39
  30. package/{chunk-C3RUNRHT.js → chunk-FXXSGWAJ.js} +1 -1
  31. package/{chunk-7KNKFIRO.js → chunk-GBDSZATH.js} +3 -3
  32. package/{chunk-7U44LYTR.js → chunk-IPYUUY4E.js} +1 -1
  33. package/{chunk-QAALPJS7.js → chunk-KJR5KAUQ.js} +2 -2
  34. package/{chunk-OZMMKDBI.js → chunk-KQQVGRA3.js} +23 -23
  35. package/{chunk-AVMKZHBC.js → chunk-L53FGHA4.js} +3 -2
  36. package/{chunk-CL3IOKGK.js → chunk-LAX2JSTX.js} +2 -2
  37. package/{chunk-NPVBXJY2.js → chunk-LP65VRCI.js} +5 -5
  38. package/chunk-LTRXGFMS.js +83 -0
  39. package/{chunk-KBKYAONQ.js → chunk-MQI77IRB.js} +2 -2
  40. package/{chunk-HFASY3WO.js → chunk-NEM67FX7.js} +1 -1
  41. package/{chunk-BE2OOJ5P.js → chunk-O26GI2JP.js} +8 -8
  42. package/{chunk-PAKN26FP.js → chunk-OUI3ZHYD.js} +1 -1
  43. package/{chunk-2O4IZNTG.js → chunk-PXQN7IBQ.js} +2 -2
  44. package/{chunk-4IJYA27C.js → chunk-PXZAAB4L.js} +4 -4
  45. package/{chunk-I5URP43I.js → chunk-Q3UKJVU4.js} +9 -9
  46. package/{chunk-AS4PVWA4.js → chunk-QNMFBBZK.js} +1 -1
  47. package/{chunk-6SLCD4RB.js → chunk-S3GS2PRL.js} +10 -10
  48. package/{chunk-T7R3NGUU.js → chunk-SV5MWASH.js} +16 -16
  49. package/{chunk-6JJWFVZ6.js → chunk-TACHTH5D.js} +15 -15
  50. package/chunk-VC6OZXO5.js +298 -0
  51. package/{chunk-ZQ2UM4KG.js → chunk-WZSRQNQG.js} +1 -292
  52. package/{chunk-EXXFGKF7.js → chunk-X2S7JTIG.js} +222 -45
  53. package/{chunk-DSZUWUYB.js → chunk-XFOLQLDN.js} +1 -1
  54. package/{chunk-YIHFXH5Q.js → chunk-XYZA7S7V.js} +6 -6
  55. package/{chunk-3Y3HW5PX.js → chunk-ZEYDOXHF.js} +105 -126
  56. package/{chunk-5KLGBAAR.js → chunk-ZPRK73XY.js} +1 -1
  57. package/{cliExecutor-DNE7TCC4.js → cliExecutor-K3F7DMRO.js} +2 -2
  58. package/{createAgentAutomationAction-CCE7CWGQ.js → createAgentAutomationAction-LTI5QU35.js} +21 -21
  59. package/{createDialogAction-QTRR4AT7.js → createDialogAction-OJJ7L3L3.js} +23 -22
  60. package/{createPageAction-Y4KQOAJE.js → createPageAction-5MXWVRGY.js} +26 -25
  61. package/{dbSlice-WWNV2SGX.js → dbSlice-RQFQQVHT.js} +7 -7
  62. package/{deleteFile-OW53A6BX.js → deleteFile-7XP5BGC7.js} +5 -5
  63. package/{dialogCommands-SMKIAC3Y.js → dialogCommands-JTJ3RPPW.js} +21 -21
  64. package/{dialogSlice-PT7YBWNE.js → dialogSlice-OWROKURJ.js} +19 -19
  65. package/{docCreateCommands-RFNA4HNM.js → docCreateCommands-WJBEW2V7.js} +22 -21
  66. package/{docDeleteCommands-4YZ325M6.js → docDeleteCommands-BVEHJOY5.js} +24 -23
  67. package/{docReadCommands-RT6VAFFG.js → docReadCommands-NEWOZIJV.js} +22 -21
  68. package/{docStore-QUQZAFZF.js → docStore-3DXRYBMD.js} +20 -20
  69. package/{docUpdateCommands-EKKKNYPW.js → docUpdateCommands-C7WHT7UU.js} +22 -21
  70. package/fetchMessages-KTNM7QAR.js +1 -1
  71. package/{handleSendMessageAction-5NSYAS53.js → handleSendMessageAction-B5PRR7BE.js} +24 -24
  72. package/index.js +58 -58
  73. package/{localDialogRead-2VRI24F4.js → localDialogRead-YSKFFRTT.js} +1 -1
  74. package/{machineCommands-DOOSIUKG.js → machineCommands-IIIREAEK.js} +64 -59
  75. package/{machineWsRunDispatch-PIOIQRBW.js → machineWsRunDispatch-3SIU6ILW.js} +49 -46
  76. package/package.json +1 -1
  77. package/{read-GW7ZEI23.js → read-QJNKRROM.js} +5 -5
  78. package/{readDocTool-HUFU6OCT.js → readDocTool-H6X6KO6X.js} +1 -1
  79. package/{readlineWorkspace-QEAOH5EP.js → readlineWorkspace-HGP3I3OC.js} +80 -67
  80. package/{removeDialogAgentAction-OHMCNSSD.js → removeDialogAgentAction-TCT35SOF.js} +12 -12
  81. package/{runAgentClientLoop-AIGLXC3R.js → runAgentClientLoop-EFM4PTVI.js} +43 -41
  82. package/{setDialogExtraReferencesAction-YJUM5BWQ.js → setDialogExtraReferencesAction-CGYLZMFH.js} +10 -10
  83. package/{setPrimaryDialogAgentAction-EBAREZDM.js → setPrimaryDialogAgentAction-F6BFQDJU.js} +12 -12
  84. package/{settingSlice-UW4IUI5L.js → settingSlice-2I5HMG47.js} +8 -8
  85. package/skillDiscovery-UGSQGX2U.js +16 -0
  86. package/{spaceCommands-BKHSPR73.js → spaceCommands-MT7BWCIL.js} +27 -27
  87. package/{spaceSlice-TYNWE3OC.js → spaceSlice-BS5TSW3W.js} +19 -19
  88. package/{streamAgentChatTurn-HRMFFA7E.js → streamAgentChatTurn-I3VBFNR3.js} +82 -78
  89. package/{tableCommands-O7O2LBEG.js → tableCommands-M3DJUETS.js} +10 -10
  90. package/{toolApiClient-QI3YBNWB.js → toolApiClient-C7P7YSE4.js} +2 -2
  91. package/{tools-3JNDS3WH.js → tools-XSD2BOEN.js} +31 -29
  92. package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-32NRHTT2.js} +3 -3
  93. package/{updateDialogTitleAction-OCETSKCP.js → updateDialogTitleAction-7FYNJOGP.js} +22 -22
  94. package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-GOL2S4W2.js} +1 -1
  95. package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
  96. package/{chunk-EHLHSX7R.js → chunk-5MMZUWSG.js} +3 -3
  97. package/{chunk-X7W4TNB4.js → chunk-CMKUBIGW.js} +3 -3
  98. package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
  99. package/{chunk-5MIDPSSK.js → chunk-JK7VW2FN.js} +3 -3
  100. package/{chunk-UTLZINAP.js → chunk-OOM6SJNR.js} +9 -9
  101. package/{chunk-VVX233PH.js → chunk-PNEW2Z3T.js} +9 -9
  102. package/{chunk-TILFE6LV.js → chunk-YOCHZD7D.js} +3 -3
  103. package/{chunk-JRKKFRAV.js → chunk-YTBMA7NO.js} +3 -3
  104. package/{db-HCJ5PRB5.js → db-6QED3ZVO.js} +3 -3
  105. package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-ID43Z7VX.js} +3 -3
  106. package/{understanding-3CUQQ6SV.js → understanding-ZOESBLF3.js} +3 -3
@@ -1,8 +1,6 @@
1
1
  import {
2
- createRunActivityTracker,
3
- finalizeRunRecord,
4
- spawnLocalBackgroundRun
5
- } from "./chunk-2FTTDCD4.js";
2
+ resolveMachineId
3
+ } from "./chunk-6HYVJV7B.js";
6
4
  import {
7
5
  buildLocalRunEnv,
8
6
  isFullstackCodingAgentRef,
@@ -11,51 +9,51 @@ import {
11
9
  resolveRawAgentInput,
12
10
  resolveServerUrl,
13
11
  writeUsage
14
- } from "./chunk-DZ3XJVET.js";
12
+ } from "./chunk-3QAF2LTL.js";
15
13
  import {
16
14
  createCliCallAgentToolExecutor,
17
15
  createCliLocalRuntimeAdapter,
18
16
  isBuiltinNoloAgentRef
19
- } from "./chunk-EXXFGKF7.js";
17
+ } from "./chunk-X2S7JTIG.js";
18
+ import {
19
+ CliProviderQuotaError
20
+ } from "./chunk-CMKUBIGW.js";
20
21
  import {
21
22
  getReadableCliDb
22
23
  } from "./chunk-W4NVOSFF.js";
23
24
  import {
24
25
  readDbRecord,
25
26
  resolveAgentRecordFromHybridStore
26
- } from "./chunk-OR2XR25C.js";
27
+ } from "./chunk-AEZAORLG.js";
27
28
  import {
28
29
  normalizeAgentHandle
29
- } from "./chunk-CDTLMEB3.js";
30
+ } from "./chunk-C2MDQQ4O.js";
30
31
  import {
31
32
  NOLO_PROJECT_MANAGER_AGENT_KEY,
32
33
  isLocalCliAgentKey
33
34
  } from "./chunk-VHBWHNVT.js";
34
35
  import {
35
36
  applyModelLayerOverride,
36
- buildMemoryOverlayLayer,
37
- buildMemoryUseGuidanceLayer,
38
- buildModelLayerOverride,
39
- buildSkillDiscoveryLayer
40
- } from "./chunk-SL35K7AH.js";
41
- import {
42
- CliProviderQuotaError
43
- } from "./chunk-X7W4TNB4.js";
44
- import {
45
- resolveMachineId
46
- } from "./chunk-6HYVJV7B.js";
37
+ buildModelLayerOverride
38
+ } from "./chunk-LTRXGFMS.js";
47
39
  import {
48
40
  isGatewayHttpStatus
49
- } from "./chunk-GAKEBQD6.js";
41
+ } from "./chunk-D6OQHXVG.js";
50
42
  import {
51
43
  buildMemorySubjectsForAgent,
52
44
  resolveAgentMemoryPolicy
53
- } from "./chunk-HJGEVL7C.js";
45
+ } from "./chunk-E4HNJSHC.js";
54
46
  import {
55
- load,
56
47
  parseExternalSkillMarkdown,
57
48
  parseSkillDocProtocol
58
- } from "./chunk-ZQ2UM4KG.js";
49
+ } from "./chunk-VC6OZXO5.js";
50
+ import {
51
+ getModelContextWindow,
52
+ parseUiAskChoiceContent
53
+ } from "./chunk-5MOUAAMK.js";
54
+ import {
55
+ parsePositiveFiniteNumberOrFallback
56
+ } from "./chunk-Y5GCAMGP.js";
59
57
  import {
60
58
  touchMemoryItemsInDb
61
59
  } from "./chunk-HNW7IJSK.js";
@@ -63,66 +61,71 @@ import {
63
61
  chooseMemoryOwners,
64
62
  loadMemoryCandidatesFromDb
65
63
  } from "./chunk-XENYHRUE.js";
66
- import {
67
- getModelContextWindow,
68
- parseUiAskChoiceContent
69
- } from "./chunk-PIVFPOW6.js";
70
64
  import {
71
65
  readPipeText,
72
66
  spawnProcess
73
67
  } from "./chunk-IDZTNRP2.js";
74
68
  import {
75
- resolveAuthToken
76
- } from "./chunk-ISNCLGUZ.js";
69
+ buildSkillDiscoveryContextBlock
70
+ } from "./chunk-AFON4QUU.js";
71
+ import {
72
+ buildMemoryOverlayLayer,
73
+ buildMemoryUseGuidanceLayer
74
+ } from "./chunk-C4FTUXVF.js";
77
75
  import {
78
76
  buildPlatformChatCompletionRequest,
79
77
  parsePlatformChatCompletionData
80
- } from "./chunk-5KLGBAAR.js";
78
+ } from "./chunk-ZPRK73XY.js";
81
79
  import {
82
80
  resolveAgentRuntimeConfigFromRecord
83
- } from "./chunk-TILFE6LV.js";
81
+ } from "./chunk-YOCHZD7D.js";
84
82
  import {
85
83
  LOCAL_AGENT_CONFIG_MISSING_CODE,
86
84
  LOCAL_TURN_ABORTED_CODE,
87
85
  readActionGate,
88
86
  readCommandActionGatePayload
89
- } from "./chunk-6SLCD4RB.js";
87
+ } from "./chunk-S3GS2PRL.js";
90
88
  import {
91
89
  resolvePlatformChatCompletionsEndpoint
92
- } from "./chunk-JRKKFRAV.js";
90
+ } from "./chunk-YTBMA7NO.js";
93
91
  import {
94
92
  clipCompactText
95
93
  } from "./chunk-5MMAK75Q.js";
96
94
  import {
97
95
  findModelConfig
98
96
  } from "./chunk-BBYVOSU2.js";
97
+ import {
98
+ asTrimmedLowercaseString
99
+ } from "./chunk-QSJ3HFEF.js";
99
100
  import {
100
101
  compactWhitespace
101
102
  } from "./chunk-DWLEOOGR.js";
103
+ import {
104
+ createRunActivityTracker,
105
+ finalizeRunRecord,
106
+ spawnLocalBackgroundRun
107
+ } from "./chunk-2FTTDCD4.js";
108
+ import {
109
+ resolveAuthToken
110
+ } from "./chunk-ISNCLGUZ.js";
102
111
  import {
103
112
  toErrorMessage
104
113
  } from "./chunk-HNMXYYJR.js";
105
114
  import {
106
115
  getDefaultCliLocalRuntimeDb
107
116
  } from "./chunk-H33743XH.js";
108
- import {
109
- parsePositiveFiniteNumberOrFallback
110
- } from "./chunk-Y5GCAMGP.js";
111
- import {
112
- asTrimmedLowercaseString
113
- } from "./chunk-QSJ3HFEF.js";
114
117
  import {
115
118
  PUBLIC_DEEPSEEK_V4_FLASH_AGENT_KEY,
116
119
  PUBLIC_DEEPSEEK_V4_PRO_AGENT_KEY,
117
120
  PUBLIC_GLM_52_AGENT_KEY,
118
121
  PUBLIC_KIMI_K26_IMAGE_AGENT_KEY
119
- } from "./chunk-DSZUWUYB.js";
120
- import {
121
- isLoopbackUrl
122
- } from "./chunk-4SN6J65J.js";
122
+ } from "./chunk-XFOLQLDN.js";
123
123
  import {
124
124
  asTrimmedString
125
125
  } from "./chunk-3EUW3WEO.js";
126
+ import {
127
+ isLoopbackUrl
128
+ } from "./chunk-4SN6J65J.js";
126
129
  import {
127
130
  asOptionalTrimmedString
128
131
  } from "./chunk-G3SUCT4W.js";
@@ -1795,7 +1798,9 @@ var TOOL_LABELS = {
1795
1798
  // Web
1796
1799
  fetchWebpage: { en: "Fetch page", zh: "\u6293\u53D6\u7F51\u9875" },
1797
1800
  readPage: { en: "Read page", zh: "\u8BFB\u53D6\u7F51\u9875" },
1798
- exaSearch: { en: "Web search", zh: "\u8054\u7F51\u641C\u7D22" }
1801
+ exaSearch: { en: "Web search", zh: "\u8054\u7F51\u641C\u7D22" },
1802
+ // Skill loading
1803
+ loadSkill: { en: "Used Skill", zh: "\u4F7F\u7528\u6280\u80FD" }
1799
1804
  };
1800
1805
  function toolLabel(name) {
1801
1806
  return TOOL_LABELS[name]?.[currentLocale] ?? name;
@@ -2090,6 +2095,16 @@ function formatFetchTreeBlockForCli(items, colorEnabled) {
2090
2095
  return `${headerLine}${treeLines}
2091
2096
  `;
2092
2097
  }
2098
+ function resolveLoadSkillName(event) {
2099
+ const metaName = typeof event.metadata?.name === "string" ? event.metadata.name : void 0;
2100
+ if (metaName) return metaName;
2101
+ const argName = event.argumentsPreview?.trim();
2102
+ if (argName && !argName.startsWith("{")) return argName;
2103
+ const content = typeof event.content === "string" ? event.content : "";
2104
+ const match = content.match(/Skill "([^"]+)" loaded inline/);
2105
+ if (match?.[1]) return match[1];
2106
+ return argName || "skill";
2107
+ }
2093
2108
  function formatCompactToolLine(event, pending, colorEnabled) {
2094
2109
  const toolName = event.toolName || pending?.toolName || "tool";
2095
2110
  if (isReadToolName(toolName) && event.type === "tool-result") {
@@ -2118,6 +2133,28 @@ function formatCompactToolLine(event, pending, colorEnabled) {
2118
2133
  const message = clip(event.message ?? t("toolFailed"), 96);
2119
2134
  return formatToolTraceLine(`\u25B8 ${label} \u2717 ${message}`, colorEnabled, "error");
2120
2135
  }
2136
+ if (event.type === "tool-result" && toolName === "loadSkill") {
2137
+ const skillName = resolveLoadSkillName(event);
2138
+ const content = typeof event.content === "string" ? event.content : "";
2139
+ const failed2 = /^Skill\s+"[^"]*"\s+not found/.test(content) || isFailedToolResult(event);
2140
+ if (failed2) {
2141
+ const message = clip(content.split("\n")[0] || t("toolFailed"), 96);
2142
+ return formatToolTraceLine(`\u25B8 Used Skill (${skillName}) \u2717 ${message}`, colorEnabled, "error");
2143
+ }
2144
+ const resultLine = `Skill "${skillName}" loaded inline. Follow its instructions.`;
2145
+ if (!colorEnabled) {
2146
+ return `\u25CF Used Skill (${skillName})
2147
+ ${resultLine}
2148
+ `;
2149
+ }
2150
+ const bullet = themeText("\u25CF", "success", true);
2151
+ const labelPart = themeText("Used Skill", "muted", true);
2152
+ const namePart = themeText(`(${skillName})`, "chrome", true);
2153
+ const detail = themeText(` ${resultLine}`, "muted", true);
2154
+ return `${bullet} ${labelPart} ${namePart}
2155
+ ${detail}
2156
+ `;
2157
+ }
2121
2158
  if (event.type === "tool-result" && (event.toolName === "ui_ask_choice" || event.metadata?.uiAskChoice)) {
2122
2159
  const block = formatUiAskChoiceBlock(event, colorEnabled);
2123
2160
  if (block) return block;
@@ -2801,7 +2838,7 @@ function isKnownServerPlatformAgent(options) {
2801
2838
  // packages/cli/client/agentRun.ts
2802
2839
  import { ulid } from "ulid";
2803
2840
  async function loadRunLocalAgentTurn() {
2804
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-WJIGU24U.js");
2841
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-UQBMQI2M.js");
2805
2842
  return runLocalAgentTurn;
2806
2843
  }
2807
2844
  async function resolveCurrentMachineId(options) {
@@ -3228,7 +3265,7 @@ async function runLocalAgentTurnForCli(options, settings) {
3228
3265
  } : void 0;
3229
3266
  const currentDialogId = options.continueDialogId ?? ulid();
3230
3267
  const runChildTurn = async (input) => {
3231
- const { runLocalAgentTurn } = await import("./agentRuntimeLocal-WJIGU24U.js");
3268
+ const { runLocalAgentTurn } = await import("./agentRuntimeLocal-UQBMQI2M.js");
3232
3269
  return runLocalAgentTurn(input);
3233
3270
  };
3234
3271
  const createFreshChildBaseAdapter = () => {
@@ -3420,8 +3457,8 @@ async function runAgentTurn(options) {
3420
3457
  }
3421
3458
 
3422
3459
  // packages/cli/agentRunCommand.ts
3423
- import { existsSync as existsSync3, readFileSync as readFileSync3 } from "node:fs";
3424
- import { join as join3 } from "node:path";
3460
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
3461
+ import { join as join2 } from "node:path";
3425
3462
 
3426
3463
  // packages/agent-runtime/quickChatIntentCore.ts
3427
3464
  var INTENT_MODEL = "deepseek-v4-flash";
@@ -3613,72 +3650,15 @@ async function classifyCliAutoRoute(text, options) {
3613
3650
  }
3614
3651
  }
3615
3652
 
3616
- // packages/agent-runtime/skillDiscovery.ts
3617
- import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
3618
- import { join } from "node:path";
3619
- var SKILL_SCAN_DIRS = [".agents/skills", "docs/skills"];
3620
- var MAX_DISCOVERED_SKILLS = 50;
3621
- function parseSkillFrontmatter(filePath) {
3622
- try {
3623
- const content = readFileSync(filePath, "utf8").slice(0, 2048);
3624
- const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
3625
- if (!fmMatch) return {};
3626
- const fm = load(fmMatch[1]);
3627
- if (!fm || typeof fm !== "object") return {};
3628
- const name = typeof fm.name === "string" ? fm.name : void 0;
3629
- const rawDesc = fm.description;
3630
- const description = typeof rawDesc === "string" ? rawDesc : rawDesc == null ? void 0 : String(rawDesc);
3631
- const sanitize = (s) => s?.trim().replace(/^["']|["']$/g, "").replace(/[\n\r]+/g, " ").slice(0, 200);
3632
- return { name: sanitize(name), description: sanitize(description) };
3633
- } catch {
3634
- return {};
3635
- }
3636
- }
3637
- function discoverSkills(cwd) {
3638
- const skills = [];
3639
- for (const dir of SKILL_SCAN_DIRS) {
3640
- if (skills.length >= MAX_DISCOVERED_SKILLS) break;
3641
- const absDir = join(cwd, dir);
3642
- if (!existsSync(absDir) || !statSync(absDir).isDirectory()) continue;
3643
- try {
3644
- for (const entry of readdirSync(absDir)) {
3645
- if (skills.length >= MAX_DISCOVERED_SKILLS) break;
3646
- const skillMdPath = join(absDir, entry, "SKILL.md");
3647
- if (existsSync(skillMdPath)) {
3648
- const { name, description } = parseSkillFrontmatter(skillMdPath);
3649
- skills.push({ name: name ?? entry, description: description ?? "", relativePath: join(dir, entry, "SKILL.md") });
3650
- continue;
3651
- }
3652
- if (dir === "docs/skills" && entry.endsWith(".md")) {
3653
- const flatPath = join(absDir, entry);
3654
- const { name, description } = parseSkillFrontmatter(flatPath);
3655
- skills.push({ name: name ?? entry.replace(/\.md$/, ""), description: description ?? "", relativePath: join(dir, entry) });
3656
- }
3657
- }
3658
- } catch {
3659
- }
3660
- }
3661
- return skills;
3662
- }
3663
- function buildSkillDiscoveryContextBlock(cwd) {
3664
- try {
3665
- const discovered = discoverSkills(cwd);
3666
- const layer = buildSkillDiscoveryLayer(discovered, cwd);
3667
- return layer?.content ?? null;
3668
- } catch {
3669
- return null;
3670
- }
3671
- }
3672
-
3673
3653
  // packages/cli/agentRunPrompts.ts
3674
- import { existsSync as existsSync2, readFileSync as readFileSync2, readdirSync as readdirSync2, statSync as statSync2 } from "node:fs";
3675
- import { dirname, extname, isAbsolute, join as join2, relative as relativePath, resolve, sep } from "node:path";
3654
+ import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
3655
+ import { dirname, extname, isAbsolute, join, relative as relativePath, resolve, sep } from "node:path";
3676
3656
  function workflowRefToCandidatePath(cwd, ref) {
3677
3657
  const normalized = ref.trim();
3678
3658
  if (!normalized) return "";
3679
3659
  if (normalized.endsWith(".md") || normalized.includes("/") || normalized.includes("\\")) {
3680
3660
  const directPath = resolve(cwd, normalized);
3681
- if (existsSync2(directPath)) return directPath;
3661
+ if (existsSync(directPath)) return directPath;
3682
3662
  }
3683
3663
  const fileName = normalized.replace(/[^a-zA-Z0-9一-鿿]+/g, "-").replace(/^-+|-+$/g, "");
3684
3664
  return resolve(cwd, "docs", "workflows", `${fileName}.md`);
@@ -3692,26 +3672,26 @@ function skillRefToCandidatePath(cwd, ref) {
3692
3672
  if (!normalized) return "";
3693
3673
  if (normalized.endsWith(".md") || normalized.includes("/") || normalized.includes("\\")) {
3694
3674
  const directPath = resolve(cwd, normalized);
3695
- if (existsSync2(directPath)) return directPath;
3675
+ if (existsSync(directPath)) return directPath;
3696
3676
  }
3697
3677
  const fileName = normalized.replace(/[^a-zA-Z0-9一-鿿]+/g, "-").replace(/^-+|-+$/g, "");
3698
3678
  for (const dir of SKILL_SEARCH_DIRS) {
3699
3679
  if (dir === "docs/skills") {
3700
3680
  const flatPath = resolve(cwd, dir, `${fileName}.md`);
3701
- if (existsSync2(flatPath)) return flatPath;
3681
+ if (existsSync(flatPath)) return flatPath;
3702
3682
  } else {
3703
3683
  const skillMdPath = resolve(cwd, dir, fileName, "SKILL.md");
3704
- if (existsSync2(skillMdPath)) return skillMdPath;
3684
+ if (existsSync(skillMdPath)) return skillMdPath;
3705
3685
  }
3706
3686
  }
3707
3687
  return resolve(cwd, "docs", "skills", `${fileName}.md`);
3708
3688
  }
3709
3689
  async function resolveWorkflowReference(ref, cwd = process.cwd()) {
3710
3690
  const path = workflowRefToCandidatePath(cwd, ref);
3711
- if (!path || !existsSync2(path)) {
3691
+ if (!path || !existsSync(path)) {
3712
3692
  throw new Error(`Workflow reference not found: ${ref}`);
3713
3693
  }
3714
- const markdown = readFileSync2(path, "utf8");
3694
+ const markdown = readFileSync(path, "utf8");
3715
3695
  const parsed = parseSkillDocProtocol(markdown);
3716
3696
  return {
3717
3697
  ref,
@@ -3728,8 +3708,8 @@ function inlineRelativeRefs(body, skillDir) {
3728
3708
  const absPath = resolve(skillDir, cleaned);
3729
3709
  const relative = relativePath(normalizedSkillDir, absPath);
3730
3710
  if (relative.startsWith("..") || isAbsolute(relative)) return match;
3731
- if (!existsSync2(absPath) || !absPath.endsWith(".md")) return match;
3732
- const refContent = readFileSync2(absPath, "utf8");
3711
+ if (!existsSync(absPath) || !absPath.endsWith(".md")) return match;
3712
+ const refContent = readFileSync(absPath, "utf8");
3733
3713
  return `
3734
3714
 
3735
3715
  ### ${label}
@@ -3740,9 +3720,9 @@ ${refContent}
3740
3720
  });
3741
3721
  }
3742
3722
  function listSkillScripts(skillDir) {
3743
- const scriptsDir = join2(skillDir, "scripts");
3744
- if (!existsSync2(scriptsDir) || !statSync2(scriptsDir).isDirectory()) return null;
3745
- const entries = readdirSync2(scriptsDir).filter((e) => !e.startsWith("."));
3723
+ const scriptsDir = join(skillDir, "scripts");
3724
+ if (!existsSync(scriptsDir) || !statSync(scriptsDir).isDirectory()) return null;
3725
+ const entries = readdirSync(scriptsDir).filter((e) => !e.startsWith("."));
3746
3726
  if (entries.length === 0) return null;
3747
3727
  return [
3748
3728
  "",
@@ -3768,10 +3748,10 @@ async function resolveSkillReference(ref, options = {}) {
3768
3748
  } else {
3769
3749
  const cwd = options.cwd ?? process.cwd();
3770
3750
  const path = skillRefToCandidatePath(cwd, ref);
3771
- if (!path || !existsSync2(path)) {
3751
+ if (!path || !existsSync(path)) {
3772
3752
  throw new Error(`Skill reference not found: ${ref}`);
3773
3753
  }
3774
- markdown = readFileSync2(path, "utf8");
3754
+ markdown = readFileSync(path, "utf8");
3775
3755
  filePath = path;
3776
3756
  skillDir = dirname(path);
3777
3757
  }
@@ -3862,8 +3842,8 @@ function prependSubjectDialogMarker(message, subjectDialogKey) {
3862
3842
  function normalizeCliImageInput(input) {
3863
3843
  if (/^(https?:|data:|file:)/i.test(input)) return input;
3864
3844
  const absolutePath = resolve(input);
3865
- if (!existsSync2(absolutePath)) return input;
3866
- const base64 = readFileSync2(absolutePath).toString("base64");
3845
+ if (!existsSync(absolutePath)) return input;
3846
+ const base64 = readFileSync(absolutePath).toString("base64");
3867
3847
  return `data:${imageMimeTypeForPath(absolutePath)};base64,${base64}`;
3868
3848
  }
3869
3849
  function imageMimeTypeForPath(path) {
@@ -4512,10 +4492,10 @@ async function runAgentRunCommand(args, deps) {
4512
4492
  const extraContextBlocks = [];
4513
4493
  const AGENTS_MD_MAX = 8192;
4514
4494
  for (const name of ["AGENTS.md", "CLAUDE.md"]) {
4515
- const agentsMdPath = join3(cliCwd, name);
4516
- if (existsSync3(agentsMdPath)) {
4495
+ const agentsMdPath = join2(cliCwd, name);
4496
+ if (existsSync2(agentsMdPath)) {
4517
4497
  try {
4518
- let mdContent = readFileSync3(agentsMdPath, "utf8").trim();
4498
+ let mdContent = readFileSync2(agentsMdPath, "utf8").trim();
4519
4499
  if (!mdContent) continue;
4520
4500
  if (Buffer.byteLength(mdContent, "utf8") > AGENTS_MD_MAX) {
4521
4501
  mdContent = Buffer.from(mdContent, "utf8").subarray(0, AGENTS_MD_MAX).toString("utf8") + "\n\n<!-- AGENTS.md truncated -->";
@@ -4796,7 +4776,6 @@ export {
4796
4776
  CLI_IMAGE_AGENT_KEY,
4797
4777
  CLI_AUTO_TIER_AGENT_KEY_TABLE,
4798
4778
  classifyCliAutoRoute,
4799
- buildSkillDiscoveryContextBlock,
4800
4779
  resolveWorkflowReference,
4801
4780
  resolveSkillReference,
4802
4781
  buildSkillContextBlocks,
@@ -15,7 +15,7 @@ import {
15
15
  resolvePlatformServerUrl,
16
16
  resolveProviderTransportDecision,
17
17
  toResponsesTools
18
- } from "./chunk-JRKKFRAV.js";
18
+ } from "./chunk-YTBMA7NO.js";
19
19
 
20
20
  // packages/agent-runtime/openAiCompatibleMessages.ts
21
21
  function toOpenAiCompatibleMessages(messages) {
@@ -12,11 +12,11 @@ import {
12
12
  isBufferedCliStreamingProvider,
13
13
  materializeCliImageInputs,
14
14
  startCliSession
15
- } from "./chunk-X7W4TNB4.js";
15
+ } from "./chunk-CMKUBIGW.js";
16
+ import "./chunk-JBTJAPUF.js";
16
17
  import {
17
18
  buildCliPrompt
18
19
  } from "./chunk-ATNTHIZI.js";
19
- import "./chunk-JBTJAPUF.js";
20
20
  import "./chunk-4VNS5WPM.js";
21
21
  export {
22
22
  CLI_PROBE_BINARIES,
@@ -1,35 +1,31 @@
1
1
  import {
2
2
  addContentToSpace
3
- } from "./chunk-PIVFPOW6.js";
3
+ } from "./chunk-5MOUAAMK.js";
4
4
  import "./chunk-4ZDM73SD.js";
5
5
  import "./chunk-MRC4Q34M.js";
6
6
  import "./chunk-MTU75CZ2.js";
7
7
  import "./chunk-CWMSB67P.js";
8
- import "./chunk-I5URP43I.js";
9
- import "./chunk-7KNKFIRO.js";
8
+ import "./chunk-Q3UKJVU4.js";
9
+ import "./chunk-GBDSZATH.js";
10
10
  import "./chunk-Z4NR32XR.js";
11
11
  import "./chunk-M76ECQRD.js";
12
+ import "./chunk-3NSIQZZ6.js";
13
+ import "./chunk-Y5GCAMGP.js";
12
14
  import "./chunk-SOTZ6RDN.js";
13
- import "./chunk-5JGGZCZL.js";
15
+ import "./chunk-7D3JY6C2.js";
14
16
  import "./chunk-UAD2WT54.js";
17
+ import {
18
+ write
19
+ } from "./chunk-O26GI2JP.js";
20
+ import "./chunk-AZPCASRE.js";
15
21
  import "./chunk-DCOA4QSN.js";
22
+ import "./chunk-IPYUUY4E.js";
16
23
  import "./chunk-5MMAK75Q.js";
17
24
  import "./chunk-BBYVOSU2.js";
18
25
  import "./chunk-5CS33IBL.js";
19
26
  import "./chunk-JZPBVBIY.js";
20
- import "./chunk-IWX4UW2E.js";
21
- import "./chunk-DFFIZ25G.js";
22
- import "./chunk-3ASDTTEI.js";
23
- import "./chunk-DWLEOOGR.js";
24
- import "./chunk-HNMXYYJR.js";
25
- import "./chunk-4SIMLBEU.js";
26
- import "./chunk-Y5GCAMGP.js";
27
- import {
28
- write
29
- } from "./chunk-BE2OOJ5P.js";
30
- import "./chunk-AZPCASRE.js";
31
- import "./chunk-7U44LYTR.js";
32
27
  import "./chunk-KX6YBIHG.js";
28
+ import "./chunk-IWX4UW2E.js";
33
29
  import {
34
30
  buildAgentAutomationOwnerIndexValue,
35
31
  createAgentAutomationKey,
@@ -37,24 +33,28 @@ import {
37
33
  } from "./chunk-O4BU24WZ.js";
38
34
  import "./chunk-I42VC5KR.js";
39
35
  import "./chunk-WWC7I6TA.js";
36
+ import "./chunk-DFFIZ25G.js";
37
+ import "./chunk-3ASDTTEI.js";
40
38
  import "./chunk-QSJ3HFEF.js";
41
- import "./chunk-DSZUWUYB.js";
39
+ import "./chunk-DWLEOOGR.js";
40
+ import "./chunk-HNMXYYJR.js";
41
+ import "./chunk-XFOLQLDN.js";
42
42
  import {
43
43
  selectIdentityUserId
44
- } from "./chunk-UTLZINAP.js";
44
+ } from "./chunk-OOM6SJNR.js";
45
45
  import "./chunk-OOSFSFMA.js";
46
46
  import "./chunk-GBRG75BQ.js";
47
- import "./chunk-4SN6J65J.js";
48
- import "./chunk-LCBAMY2M.js";
49
47
  import {
50
48
  asTrimmedString
51
49
  } from "./chunk-3EUW3WEO.js";
52
50
  import "./chunk-U6VC4MU4.js";
51
+ import "./chunk-KUG52IAP.js";
52
+ import "./chunk-4SN6J65J.js";
53
+ import "./chunk-LCBAMY2M.js";
53
54
  import "./chunk-CF7PE763.js";
54
55
  import {
55
56
  asOptionalTrimmedString
56
57
  } from "./chunk-G3SUCT4W.js";
57
- import "./chunk-KUG52IAP.js";
58
58
  import "./chunk-4VNS5WPM.js";
59
59
 
60
60
  // node_modules/croner/dist/croner.min.js
@@ -1,52 +1,53 @@
1
1
  import {
2
2
  createDialogAction,
3
3
  isLocalOwnerDialogAgents
4
- } from "./chunk-HJGEVL7C.js";
5
- import "./chunk-ZQ2UM4KG.js";
6
- import "./chunk-XENYHRUE.js";
7
- import "./chunk-PIVFPOW6.js";
4
+ } from "./chunk-E4HNJSHC.js";
5
+ import "./chunk-VC6OZXO5.js";
6
+ import "./chunk-5MOUAAMK.js";
8
7
  import "./chunk-4ZDM73SD.js";
9
8
  import "./chunk-MRC4Q34M.js";
10
9
  import "./chunk-MTU75CZ2.js";
11
10
  import "./chunk-CWMSB67P.js";
12
- import "./chunk-I5URP43I.js";
13
- import "./chunk-7KNKFIRO.js";
11
+ import "./chunk-Q3UKJVU4.js";
12
+ import "./chunk-GBDSZATH.js";
14
13
  import "./chunk-Z4NR32XR.js";
15
14
  import "./chunk-M76ECQRD.js";
15
+ import "./chunk-3NSIQZZ6.js";
16
+ import "./chunk-Y5GCAMGP.js";
16
17
  import "./chunk-SOTZ6RDN.js";
17
- import "./chunk-5JGGZCZL.js";
18
+ import "./chunk-7D3JY6C2.js";
18
19
  import "./chunk-UAD2WT54.js";
20
+ import "./chunk-O26GI2JP.js";
21
+ import "./chunk-AZPCASRE.js";
19
22
  import "./chunk-DCOA4QSN.js";
23
+ import "./chunk-XENYHRUE.js";
24
+ import "./chunk-IPYUUY4E.js";
25
+ import "./chunk-WZSRQNQG.js";
20
26
  import "./chunk-5MMAK75Q.js";
21
27
  import "./chunk-BBYVOSU2.js";
22
28
  import "./chunk-5CS33IBL.js";
23
29
  import "./chunk-JZPBVBIY.js";
24
- import "./chunk-IWX4UW2E.js";
25
- import "./chunk-DFFIZ25G.js";
26
- import "./chunk-3ASDTTEI.js";
27
- import "./chunk-DWLEOOGR.js";
28
- import "./chunk-HNMXYYJR.js";
29
- import "./chunk-4SIMLBEU.js";
30
- import "./chunk-Y5GCAMGP.js";
31
- import "./chunk-BE2OOJ5P.js";
32
- import "./chunk-AZPCASRE.js";
33
- import "./chunk-7U44LYTR.js";
34
30
  import "./chunk-KX6YBIHG.js";
31
+ import "./chunk-IWX4UW2E.js";
35
32
  import "./chunk-O4BU24WZ.js";
36
33
  import "./chunk-I42VC5KR.js";
37
34
  import "./chunk-WWC7I6TA.js";
35
+ import "./chunk-DFFIZ25G.js";
36
+ import "./chunk-3ASDTTEI.js";
38
37
  import "./chunk-QSJ3HFEF.js";
39
- import "./chunk-DSZUWUYB.js";
40
- import "./chunk-UTLZINAP.js";
38
+ import "./chunk-DWLEOOGR.js";
39
+ import "./chunk-HNMXYYJR.js";
40
+ import "./chunk-XFOLQLDN.js";
41
+ import "./chunk-OOM6SJNR.js";
41
42
  import "./chunk-OOSFSFMA.js";
42
43
  import "./chunk-GBRG75BQ.js";
43
- import "./chunk-4SN6J65J.js";
44
- import "./chunk-LCBAMY2M.js";
45
44
  import "./chunk-3EUW3WEO.js";
46
45
  import "./chunk-U6VC4MU4.js";
46
+ import "./chunk-KUG52IAP.js";
47
+ import "./chunk-4SN6J65J.js";
48
+ import "./chunk-LCBAMY2M.js";
47
49
  import "./chunk-CF7PE763.js";
48
50
  import "./chunk-G3SUCT4W.js";
49
- import "./chunk-KUG52IAP.js";
50
51
  import "./chunk-4VNS5WPM.js";
51
52
  export {
52
53
  createDialogAction,