nolo-cli 0.201.0-alpha.1 → 0.202.0-alpha.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 (124) hide show
  1. package/{_executeModel-JGMNIGV2.js → _executeModel-IPRTPSW7.js} +34 -33
  2. package/{agentDeleteCommand-YUUEASG5.js → agentDeleteCommand-WHT2MMAP.js} +49 -47
  3. package/{agentEmailCommands-EO2WKZMM.js → agentEmailCommands-4LW2BFLY.js} +51 -49
  4. package/{agentListCommands-RQB27IJH.js → agentListCommands-2KF47HY6.js} +81 -45
  5. package/{agentMachineCommands-G3PU5ZEO.js → agentMachineCommands-QQCFQQ4T.js} +28 -26
  6. package/{agentProviderCommands-T6E3JCR6.js → agentProviderCommands-5ALOQLE5.js} +2 -2
  7. package/{agentRecordCommands-LY2HNY4R.js → agentRecordCommands-ARVXF2C2.js} +47 -45
  8. package/{agentRunCommand-6GS6JYDS.js → agentRunCommand-3IL5PW2S.js} +49 -47
  9. package/{agentRunControl-6HHESKDB.js → agentRunControl-ABDUPJLX.js} +10 -5
  10. package/{agentRuntimeLocal-75E4BYTF.js → agentRuntimeLocal-YXHJV65L.js} +24 -22
  11. package/{agentSlice-BCY3LBE4.js → agentSlice-BFDKYW6H.js} +4 -3
  12. package/{appDeleteCommands-PB6HW4NN.js → appDeleteCommands-OWJO3WFB.js} +29 -27
  13. package/{appDeployCommands-EF4OELAA.js → appDeployCommands-X7HLT27G.js} +29 -27
  14. package/{appDeployStatusCommands-CALVQWWC.js → appDeployStatusCommands-CHCZ7ZUD.js} +29 -27
  15. package/{appGetCommands-KFWCTFRM.js → appGetCommands-AZW2EE4R.js} +29 -27
  16. package/{appListCommands-Z5PW6DK7.js → appListCommands-YFN6DP6K.js} +29 -27
  17. package/{authCommand-RV5MQDWN.js → authCommand-W34UWJGR.js} +14 -13
  18. package/{builtinSkillRegistry-7RAJP7FD.js → builtinSkillRegistry-NJVHQIKY.js} +1 -1
  19. package/{chromeOpsCommands-BA6CS4DI.js → chromeOpsCommands-USKE4B4K.js} +15 -4
  20. package/{chunk-RE3B2OCC.js → chunk-266E37EL.js} +69 -14
  21. package/chunk-2BMURXSB.js +1863 -0
  22. package/{chunk-7MDGTSNI.js → chunk-2PI4QFAL.js} +174 -100
  23. package/{chunk-NABJEYPJ.js → chunk-2Q3LOAFE.js} +38 -3
  24. package/{chunk-OIVKFSFN.js → chunk-326HCB6L.js} +28 -24
  25. package/{chunk-4CEAZRZ4.js → chunk-33W4IFUU.js} +1 -1
  26. package/{chunk-V3MGT3RF.js → chunk-3CWF2EUZ.js} +8 -8
  27. package/{chunk-G6OOUQWJ.js → chunk-4KB6WQUL.js} +2 -0
  28. package/{chunk-DYQXB46J.js → chunk-4KPB3KWX.js} +2 -2
  29. package/{chunk-DGFSVNYE.js → chunk-4SH22ZG7.js} +5 -5
  30. package/{chunk-WAZ6BTSC.js → chunk-5E4FSR4J.js} +1 -1
  31. package/{chunk-PVD7CRYV.js → chunk-6I7ZP7KJ.js} +3 -3
  32. package/chunk-6UBGXX2W.js +12 -0
  33. package/{chunk-ZBCBFOWC.js → chunk-A2ZMIRLN.js} +2 -2
  34. package/{chunk-BQZNJCW3.js → chunk-ASG7VWPK.js} +3 -3
  35. package/{chunk-T2LB32MS.js → chunk-BLFZULEQ.js} +3 -3
  36. package/{chunk-JIFYXQRD.js → chunk-BTYQAODF.js} +26 -8
  37. package/{chunk-TDTTBXCO.js → chunk-C7PKPHK6.js} +334 -12
  38. package/{chunk-6WZQGT5X.js → chunk-CJ37ZMCQ.js} +6 -2
  39. package/{chunk-VHGD6FHV.js → chunk-CKAHAVMK.js} +40 -10
  40. package/{chunk-UNOILAZP.js → chunk-CLTGWJVT.js} +76 -4
  41. package/{chunk-Q6RMLYSA.js → chunk-CMLBKYEI.js} +4 -2
  42. package/{chunk-NVOYW6H4.js → chunk-CQHMBWZH.js} +12 -8
  43. package/{chunk-7KWPNGVJ.js → chunk-CTZ4O3XD.js} +1 -1
  44. package/{chunk-OHRDHS4N.js → chunk-CVCRAO6Q.js} +9 -4
  45. package/{chunk-7XSZNV4Q.js → chunk-D57YYGMD.js} +2 -2
  46. package/{chunk-TEC5UHQK.js → chunk-DHJXDGC3.js} +2 -2
  47. package/{chunk-QYOB7RVA.js → chunk-DKZJJ2NQ.js} +3 -2
  48. package/{chunk-A2LR6ORU.js → chunk-E2FC5RMU.js} +17 -14
  49. package/{chunk-R5HEP4LL.js → chunk-ETTDZBK5.js} +4 -4
  50. package/{chunk-LOVRT3E4.js → chunk-FWMOJTGR.js} +3722 -4851
  51. package/{chunk-ZWQUWF6W.js → chunk-G7Y4GXTY.js} +8 -14
  52. package/{chunk-5KTQVMCX.js → chunk-GOO6G4PY.js} +85 -0
  53. package/{chunk-FMOZ57LN.js → chunk-H7HWWNJB.js} +1 -1
  54. package/{chunk-QXM2ETU2.js → chunk-HJS5EIKS.js} +4 -4
  55. package/{chunk-EX7OZOYM.js → chunk-HKWGI3TM.js} +178 -311
  56. package/{chunk-BBGYSMUE.js → chunk-JH7KMNGT.js} +143 -19
  57. package/{chunk-BGYMAW6B.js → chunk-KDUYNEJ5.js} +43 -26
  58. package/{chunk-O5V7QQAF.js → chunk-LEX6DEH4.js} +114 -2
  59. package/{chunk-BTBT2566.js → chunk-MNUOMXJH.js} +412 -9
  60. package/{chunk-N7E3LQ4A.js → chunk-MZXWSY4E.js} +1 -1
  61. package/{chunk-ZQ3EAOY3.js → chunk-NTLJGRAT.js} +1 -1
  62. package/{chunk-WFUIXNKC.js → chunk-P4YLK2OD.js} +3 -3
  63. package/chunk-PRJ473FK.js +63 -0
  64. package/{chunk-2SHLT6JB.js → chunk-Q7GNBUT4.js} +2 -2
  65. package/{chunk-4AUOEYDB.js → chunk-RIKSN62L.js} +3 -3
  66. package/{chunk-GTP6VNWH.js → chunk-RQ22OZD7.js} +3 -3
  67. package/{chunk-XKX3NF6X.js → chunk-RS66RJLA.js} +2 -2
  68. package/{chunk-GC64WGMD.js → chunk-SM3NSZJV.js} +16 -5
  69. package/{chunk-DKLWAY3C.js → chunk-SSK4WNJA.js} +1 -1
  70. package/{chunk-LJODCHJO.js → chunk-SUBNV2JH.js} +3 -3
  71. package/{chunk-HLAL63BZ.js → chunk-T43B7LB2.js} +1 -1
  72. package/{chunk-HTLIKE5U.js → chunk-TWVVTUNG.js} +2 -2
  73. package/{chunk-X3RWBJDQ.js → chunk-U7HTU2S7.js} +1 -1
  74. package/{chunk-76YUTLOT.js → chunk-UIOEHFF6.js} +1 -1
  75. package/{chunk-IIX6VWLW.js → chunk-VCFU3BO5.js} +224 -38
  76. package/{chunk-QU3TLYBR.js → chunk-VEUSD6OF.js} +35 -11
  77. package/{chunk-4YMD7B4Y.js → chunk-WPOKOKZA.js} +2 -2
  78. package/{chunk-K6TZSON4.js → chunk-WTKYP6QO.js} +19 -5
  79. package/{chunk-2IVB6BQL.js → chunk-XW6B2RJW.js} +193 -56
  80. package/{chunk-ZSO5B6SW.js → chunk-Y2WUYX4I.js} +9 -0
  81. package/{chunk-7L7BVUKH.js → chunk-YAGFPXOX.js} +14 -14
  82. package/{chunk-TVGX5QIN.js → chunk-YUA6OAH5.js} +2 -2
  83. package/{chunk-IJBWBWP3.js → chunk-YV2RSLM4.js} +13 -13
  84. package/{chunk-MJWUBTK7.js → chunk-YZGNKHUM.js} +2 -2
  85. package/{commandRegistry-4DGK2ONJ.js → commandRegistry-HEBIO2A4.js} +87 -67
  86. package/{contentThunks-YYLEYO25.js → contentThunks-I4IHSDTM.js} +14 -13
  87. package/{cooldownCommands-KRILPXOZ.js → cooldownCommands-5SJ74DNP.js} +1 -1
  88. package/{createAgentAutomationAction-XKZ6TRRO.js → createAgentAutomationAction-WQCH5HR2.js} +14 -13
  89. package/{createDialogAction-6K5WSBCB.js → createDialogAction-CKMZK5JQ.js} +15 -14
  90. package/{createPageAction-FFFGCOUV.js → createPageAction-QAZHQGY7.js} +14 -13
  91. package/{dialogCommands-BFGCWWVT.js → dialogCommands-YMAHICPJ.js} +30 -28
  92. package/{dialogSlice-AA7672TX.js → dialogSlice-GEGACCH2.js} +13 -12
  93. package/{docCreateCommands-R3D5LUEG.js → docCreateCommands-SNMAKBXN.js} +28 -26
  94. package/{docDeleteCommands-7AGLMCJJ.js → docDeleteCommands-K52UESRC.js} +29 -27
  95. package/{docReadCommands-UVTD4FKH.js → docReadCommands-AG6LLHJ7.js} +28 -26
  96. package/{docStore-QDK5VGEH.js → docStore-B4EFT53J.js} +1 -1
  97. package/{docUpdateCommands-R2JHDAG4.js → docUpdateCommands-B5EZ7DYN.js} +28 -26
  98. package/{fetchMessages-HWBVATSE.js → fetchMessages-YY4SATNR.js} +1 -1
  99. package/{getPricing-E2PLNWCR.js → getPricing-3PQY3TGI.js} +3 -3
  100. package/{handleSendMessageAction-24WPHMZR.js → handleSendMessageAction-4BACQWOG.js} +70 -29
  101. package/index.js +7 -7
  102. package/{lib-4YTWAGY7.js → lib-5KKIBFIT.js} +439 -272
  103. package/{localDialogRead-CT5HGDMC.js → localDialogRead-FUXGZ57B.js} +1 -1
  104. package/{localRuntimeAdapter-4CC5KOMZ.js → localRuntimeAdapter-5CVSCXHI.js} +45 -43
  105. package/{machineCommands-FWTGWKAN.js → machineCommands-R7L4IBQL.js} +48 -46
  106. package/{machineWsRunDispatch-MJ5VOB7P.js → machineWsRunDispatch-KZHTW7DW.js} +46 -44
  107. package/{models-UUNO6DOL.js → models-PJBE6JDV.js} +2 -2
  108. package/{oauthTokenStore-PADKLNOC.js → oauthTokenStore-OEERZFUC.js} +2 -1
  109. package/package.json +1 -1
  110. package/{providerPresetApply-JGNMO2KX.js → providerPresetApply-HBBUUVJD.js} +6 -6
  111. package/{providerRegistry-33J3ZYFJ.js → providerRegistry-5LK2NXYE.js} +6 -6
  112. package/{readlineWorkspace-EQV6DNSG.js → readlineWorkspace-PDPEWRSG.js} +295 -137
  113. package/{runAgentClientLoop-W423XICK.js → runAgentClientLoop-QKV66PX5.js} +31 -30
  114. package/{runtimeDoctorCommands-NYBOTA6D.js → runtimeDoctorCommands-3VFVTGPI.js} +8 -7
  115. package/{secretCommands-N6CMCJDZ.js → secretCommands-MKU25CDP.js} +311 -3
  116. package/{settingThunks-YRYNPWJM.js → settingThunks-4WU7YE62.js} +2 -2
  117. package/{skillDiscovery-F3TMVQOJ.js → skillDiscovery-BKLWW2EZ.js} +2 -2
  118. package/{spaceCommands-J4OSJIYA.js → spaceCommands-VD3CZWXM.js} +27 -25
  119. package/{streamAgentChatTurn-BE3YIENW.js → streamAgentChatTurn-GM3UNSLS.js} +46 -43
  120. package/{tools-CXSCIKA4.js → tools-UJLEQBKI.js} +25 -24
  121. package/{tuiSummaryLlmCaller-FSOADMXK.js → tuiSummaryLlmCaller-73QO3HAD.js} +12 -12
  122. package/{updateCommands-KE6LP3QX.js → updateCommands-RVDAFHBT.js} +3 -3
  123. package/{updateDialogTitleAction-RCTYD5WV.js → updateDialogTitleAction-24QO27NT.js} +14 -13
  124. package/{windowsSelfUpdate-26TSFXEZ.js → windowsSelfUpdate-N2VH2OBW.js} +2 -2
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  resolveAuthGuidanceState
3
- } from "./chunk-MJWUBTK7.js";
3
+ } from "./chunk-YZGNKHUM.js";
4
4
  import {
5
5
  fetchCiStatus,
6
6
  summarizeLatest
7
- } from "./chunk-VHGD6FHV.js";
7
+ } from "./chunk-CKAHAVMK.js";
8
8
  import "./chunk-M3JEW6N6.js";
9
9
  import {
10
10
  isHiddenFromDialogList,
@@ -12,7 +12,7 @@ import {
12
12
  normalizeDialogRecord,
13
13
  readDialogSnapshot,
14
14
  sortDialogs
15
- } from "./chunk-V3MGT3RF.js";
15
+ } from "./chunk-3CWF2EUZ.js";
16
16
  import {
17
17
  formatQuotaSummary,
18
18
  listFavoriteAgentIdsAcrossServers,
@@ -20,12 +20,12 @@ import {
20
20
  listRemoteAgents,
21
21
  listRemoteAgentsAcrossServers,
22
22
  normalizeListedAgent
23
- } from "./chunk-RE3B2OCC.js";
23
+ } from "./chunk-266E37EL.js";
24
24
  import "./chunk-ID4G2MAR.js";
25
25
  import {
26
26
  listUserRecordsFromServers,
27
27
  readLiveDbRecordAfterTombstoneMerge
28
- } from "./chunk-FMOZ57LN.js";
28
+ } from "./chunk-H7HWWNJB.js";
29
29
  import {
30
30
  refreshSubscriptionQuotas
31
31
  } from "./chunk-YGILMZ7N.js";
@@ -102,9 +102,9 @@ import {
102
102
  wrapTextToLines,
103
103
  wrapTranscriptLine,
104
104
  wrapTranscriptLineWithLayout
105
- } from "./chunk-2IVB6BQL.js";
105
+ } from "./chunk-XW6B2RJW.js";
106
106
  import "./chunk-6QDYSCPW.js";
107
- import "./chunk-XKX3NF6X.js";
107
+ import "./chunk-RS66RJLA.js";
108
108
  import "./chunk-Y5GCAMGP.js";
109
109
  import {
110
110
  getReadableCliDb
@@ -113,7 +113,7 @@ import {
113
113
  deleteDbRecord,
114
114
  queryUserRecords,
115
115
  readDbRecord
116
- } from "./chunk-6WZQGT5X.js";
116
+ } from "./chunk-CJ37ZMCQ.js";
117
117
  import {
118
118
  RUN_WAKE_CHANNEL_ENV,
119
119
  clearCliLocalRuntimePreparedAgentCache,
@@ -123,12 +123,12 @@ import {
123
123
  formatApprovalRemaining,
124
124
  readTimestamp,
125
125
  registerHostApprovalRenderer
126
- } from "./chunk-7MDGTSNI.js";
127
- import "./chunk-DYQXB46J.js";
126
+ } from "./chunk-2PI4QFAL.js";
127
+ import "./chunk-4KPB3KWX.js";
128
128
  import "./chunk-VP3BINY7.js";
129
129
  import "./chunk-HAB2UDLT.js";
130
130
  import "./chunk-LKZPX6YH.js";
131
- import "./chunk-X3RWBJDQ.js";
131
+ import "./chunk-U7HTU2S7.js";
132
132
  import {
133
133
  NOLO_DEFAULT_AGENT_KEY,
134
134
  resolveCliAgentKeyInput
@@ -142,47 +142,52 @@ import {
142
142
  } from "./chunk-UGCQKKXW.js";
143
143
  import "./chunk-TY3TIUJK.js";
144
144
  import "./chunk-S73EPYNC.js";
145
- import "./chunk-GTP6VNWH.js";
145
+ import "./chunk-RQ22OZD7.js";
146
146
  import "./chunk-VL5KOY2C.js";
147
147
  import "./chunk-ZEZC7IIM.js";
148
148
  import "./chunk-ATNTHIZI.js";
149
+ import {
150
+ formatSkillSlashReference,
151
+ parseSkillSlashReference,
152
+ resolveSkillSlashUserPrompt
153
+ } from "./chunk-PRJ473FK.js";
149
154
  import "./chunk-BMQ2MJUK.js";
150
- import "./chunk-2SHLT6JB.js";
155
+ import "./chunk-Q7GNBUT4.js";
151
156
  import "./chunk-JEXVIMYZ.js";
152
157
  import {
153
158
  prepareTools
154
- } from "./chunk-T2LB32MS.js";
159
+ } from "./chunk-BLFZULEQ.js";
155
160
  import "./chunk-HS7MLR74.js";
156
- import "./chunk-EX7OZOYM.js";
161
+ import "./chunk-HKWGI3TM.js";
157
162
  import "./chunk-KFHREHUQ.js";
158
- import "./chunk-BBGYSMUE.js";
163
+ import "./chunk-JH7KMNGT.js";
159
164
  import "./chunk-OXME3PEE.js";
160
165
  import "./chunk-KSTEXKL6.js";
161
- import "./chunk-VF4K2QE6.js";
162
166
  import "./chunk-Z3MQYKRN.js";
163
- import "./chunk-TDTTBXCO.js";
167
+ import "./chunk-C7PKPHK6.js";
164
168
  import "./chunk-NF64D32W.js";
165
169
  import "./chunk-3L2WKC3W.js";
166
- import "./chunk-QYOB7RVA.js";
167
- import "./chunk-7XSZNV4Q.js";
170
+ import "./chunk-DKZJJ2NQ.js";
171
+ import "./chunk-VF4K2QE6.js";
172
+ import "./chunk-D57YYGMD.js";
168
173
  import "./chunk-MYOH447Z.js";
169
174
  import "./chunk-RXUKDHS5.js";
170
175
  import "./chunk-WYKMOZTW.js";
171
176
  import "./chunk-AGIM7IMJ.js";
172
- import "./chunk-ZBCBFOWC.js";
177
+ import "./chunk-A2ZMIRLN.js";
173
178
  import "./chunk-VIDPVFP3.js";
174
179
  import "./chunk-63W5N6P3.js";
175
- import "./chunk-BQZNJCW3.js";
176
- import "./chunk-DKLWAY3C.js";
180
+ import "./chunk-ASG7VWPK.js";
181
+ import "./chunk-SSK4WNJA.js";
177
182
  import "./chunk-5XBUWM6I.js";
178
183
  import {
179
184
  estimateMessagesTokens,
180
185
  historyTokensBeforeLatestAssistant
181
- } from "./chunk-OIVKFSFN.js";
186
+ } from "./chunk-326HCB6L.js";
182
187
  import "./chunk-TZXPT53C.js";
183
188
  import "./chunk-LEC5ALIN.js";
184
189
  import "./chunk-523DITKR.js";
185
- import "./chunk-R5HEP4LL.js";
190
+ import "./chunk-ETTDZBK5.js";
186
191
  import "./chunk-BYXBJQAS.js";
187
192
  import "./chunk-QYPE3TS3.js";
188
193
  import "./chunk-T3U2KQF4.js";
@@ -213,37 +218,41 @@ import "./chunk-6Q7UTJKR.js";
213
218
  import "./chunk-QQ56R7KS.js";
214
219
  import "./chunk-OW765XBU.js";
215
220
  import "./chunk-PXYBUFDB.js";
216
- import "./chunk-ZSO5B6SW.js";
221
+ import "./chunk-Y2WUYX4I.js";
217
222
  import "./chunk-D2MDMY2M.js";
218
223
  import {
219
224
  buildSkillDiscoveryContextBlock,
220
- buildSkillDiscoveryContextLayer
221
- } from "./chunk-7KWPNGVJ.js";
222
- import "./chunk-O5V7QQAF.js";
225
+ buildSkillDiscoveryContextLayer,
226
+ discoverSkills
227
+ } from "./chunk-CTZ4O3XD.js";
228
+ import {
229
+ listBuiltinSkills
230
+ } from "./chunk-LEX6DEH4.js";
223
231
  import {
224
232
  expandEnabledPacks
225
233
  } from "./chunk-6OEPWZV7.js";
226
- import "./chunk-AETZ7AD6.js";
234
+ import {
235
+ parseExternalSkillMarkdown
236
+ } from "./chunk-AETZ7AD6.js";
227
237
  import "./chunk-Y6ORVLSS.js";
228
238
  import "./chunk-KHCLMKZZ.js";
229
239
  import {
240
+ buildLoadSkillExecutor,
230
241
  buildLocalWorkspaceOpenAiTools,
231
242
  buildLocalWorkspaceToolset,
232
- formatToolOverflowMarker,
233
- getProcessRegistry,
234
243
  readCommandActionGatePayload
235
- } from "./chunk-LOVRT3E4.js";
244
+ } from "./chunk-FWMOJTGR.js";
236
245
  import "./chunk-ZNFJWEN4.js";
237
- import "./chunk-IIX6VWLW.js";
238
- import "./chunk-NVOYW6H4.js";
246
+ import "./chunk-VCFU3BO5.js";
247
+ import "./chunk-CQHMBWZH.js";
239
248
  import "./chunk-HNUWUO75.js";
240
249
  import "./chunk-CHOZJMJS.js";
241
250
  import "./chunk-PWTNI4N7.js";
242
251
  import "./chunk-HIVDQPQR.js";
243
- import "./chunk-N7E3LQ4A.js";
252
+ import "./chunk-MZXWSY4E.js";
244
253
  import "./chunk-2WZXXAQD.js";
245
- import "./chunk-PVD7CRYV.js";
246
- import "./chunk-G6OOUQWJ.js";
254
+ import "./chunk-6I7ZP7KJ.js";
255
+ import "./chunk-4KB6WQUL.js";
247
256
  import "./chunk-56GBUMO5.js";
248
257
  import {
249
258
  CREDENTIAL_HYGIENE_RULE,
@@ -256,20 +265,20 @@ import {
256
265
  buildRuntimeGuidanceBlocks,
257
266
  resolveResponseGuidelines,
258
267
  resolveToolGuidedSections
259
- } from "./chunk-BGYMAW6B.js";
260
- import "./chunk-OHRDHS4N.js";
268
+ } from "./chunk-KDUYNEJ5.js";
269
+ import "./chunk-CVCRAO6Q.js";
261
270
  import "./chunk-E2BESSAW.js";
262
- import "./chunk-NABJEYPJ.js";
271
+ import "./chunk-2Q3LOAFE.js";
263
272
  import {
264
273
  isQuotaExhaustedError
265
274
  } from "./chunk-RXX262QX.js";
266
275
  import "./chunk-WJZOQR2J.js";
267
- import "./chunk-WFUIXNKC.js";
276
+ import "./chunk-P4YLK2OD.js";
268
277
  import "./chunk-2MBTWINN.js";
269
278
  import {
270
279
  extractReferenceKeysFromMessage,
271
280
  normalizeUsage
272
- } from "./chunk-K6TZSON4.js";
281
+ } from "./chunk-WTKYP6QO.js";
273
282
  import "./chunk-5ZUL4CUO.js";
274
283
  import {
275
284
  DEFAULT_CONTEXT_WINDOW,
@@ -282,26 +291,26 @@ import {
282
291
  getModelContextWindow,
283
292
  planCompression,
284
293
  serializeMessageContent
285
- } from "./chunk-JIFYXQRD.js";
294
+ } from "./chunk-BTYQAODF.js";
286
295
  import "./chunk-H57T64RA.js";
287
296
  import "./chunk-UKZX3NHN.js";
288
297
  import {
289
298
  clipCompactText
290
299
  } from "./chunk-5MMAK75Q.js";
291
300
  import "./chunk-TRZP7JZ7.js";
292
- import "./chunk-76YUTLOT.js";
301
+ import "./chunk-UIOEHFF6.js";
293
302
  import "./chunk-KX6YBIHG.js";
294
303
  import {
295
304
  compactWhitespace
296
305
  } from "./chunk-DWLEOOGR.js";
297
306
  import "./chunk-7DPNBQSV.js";
298
- import "./chunk-ZWQUWF6W.js";
307
+ import "./chunk-G7Y4GXTY.js";
299
308
  import {
300
309
  buildMemoryOverlayLayer,
301
310
  buildMemoryUseGuidanceLayer,
302
311
  partitionScopedBlocks,
303
312
  renderTurnContextBlocksWithScope
304
- } from "./chunk-Q6RMLYSA.js";
313
+ } from "./chunk-CMLBKYEI.js";
305
314
  import {
306
315
  buildUserResponseLanguageContext
307
316
  } from "./chunk-4VJAC32I.js";
@@ -320,17 +329,15 @@ import {
320
329
  extractCustomId,
321
330
  parsePublicAgentId
322
331
  } from "./chunk-M2EJHDJP.js";
323
- import "./chunk-QU3TLYBR.js";
324
- import {
325
- toErrorMessage
326
- } from "./chunk-HNMXYYJR.js";
332
+ import "./chunk-VEUSD6OF.js";
327
333
  import {
334
+ TAIL_LINES_MAX,
328
335
  backfillRunRecordParentDialog,
329
336
  checkStaleRun,
330
337
  isRunRecordClaimed,
331
338
  listRunRecords,
332
339
  readRunRecord
333
- } from "./chunk-BTBT2566.js";
340
+ } from "./chunk-MNUOMXJH.js";
334
341
  import {
335
342
  clipText,
336
343
  formatDuration,
@@ -341,15 +348,23 @@ import {
341
348
  resolveRunLabel,
342
349
  shortRunId
343
350
  } from "./chunk-PJNFNEJE.js";
351
+ import {
352
+ formatToolOverflowMarker,
353
+ getProcessRegistry
354
+ } from "./chunk-2BMURXSB.js";
344
355
  import {
345
356
  estimateTokenCount
346
357
  } from "./chunk-PSCNXBYA.js";
358
+ import "./chunk-6UBGXX2W.js";
347
359
  import {
348
360
  resolvePlatformAuthToken
349
- } from "./chunk-4YMD7B4Y.js";
350
- import "./chunk-TVGX5QIN.js";
351
- import "./chunk-GC64WGMD.js";
361
+ } from "./chunk-WPOKOKZA.js";
362
+ import "./chunk-YUA6OAH5.js";
363
+ import "./chunk-SM3NSZJV.js";
352
364
  import "./chunk-5BHQICF2.js";
365
+ import {
366
+ toErrorMessage
367
+ } from "./chunk-HNMXYYJR.js";
353
368
  import {
354
369
  isRecord
355
370
  } from "./chunk-KUG52IAP.js";
@@ -361,7 +376,7 @@ import {
361
376
  import {
362
377
  checkForCliUpdate,
363
378
  runSelfUpdateDetailed
364
- } from "./chunk-HTLIKE5U.js";
379
+ } from "./chunk-TWVVTUNG.js";
365
380
  import {
366
381
  parseUserIdFromAuthToken,
367
382
  resolveAuthToken,
@@ -394,14 +409,14 @@ import {
394
409
  resolveDefaultSpawn,
395
410
  spawnProcess
396
411
  } from "./chunk-Y6ROFCZO.js";
397
- import "./chunk-WAZ6BTSC.js";
412
+ import "./chunk-5E4FSR4J.js";
398
413
  import {
399
414
  dailyWelcomeTip,
400
415
  initCliLocale,
401
416
  parseCliLocale,
402
417
  setCliLocale,
403
418
  t
404
- } from "./chunk-UNOILAZP.js";
419
+ } from "./chunk-CLTGWJVT.js";
405
420
  import "./chunk-ECX3NKRD.js";
406
421
  import "./chunk-XJWWBO34.js";
407
422
  import "./chunk-I42VC5KR.js";
@@ -411,8 +426,8 @@ import "./chunk-3EUW3WEO.js";
411
426
  import {
412
427
  asOptionalTrimmedString
413
428
  } from "./chunk-G3SUCT4W.js";
414
- import "./chunk-HLAL63BZ.js";
415
- import "./chunk-5KTQVMCX.js";
429
+ import "./chunk-T43B7LB2.js";
430
+ import "./chunk-GOO6G4PY.js";
416
431
  import {
417
432
  asTrimmedLowercaseString
418
433
  } from "./chunk-QSJ3HFEF.js";
@@ -507,7 +522,7 @@ function createSnapshotGuardedApproval(kind, getGrants, approve) {
507
522
  import nacl from "tweetnacl";
508
523
 
509
524
  // node_modules/js-base64/base64.mjs
510
- var version = "3.9.5";
525
+ var version = "3.9.6";
511
526
  var VERSION = version;
512
527
  var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
513
528
  var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
@@ -600,6 +615,8 @@ var isValid = (src) => {
600
615
  if (typeof src !== "string")
601
616
  return false;
602
617
  const s = src.replace(/\s+/g, "").replace(/={0,2}$/, "");
618
+ if (s.length % 4 === 1)
619
+ return false;
603
620
  return !/[^\s0-9a-zA-Z\+/]/.test(s) || !/[^\s0-9a-zA-Z\-_]/.test(s);
604
621
  };
605
622
  var _noEnum = (v) => {
@@ -4570,52 +4587,6 @@ function createActivityIndicator(deps) {
4570
4587
  };
4571
4588
  }
4572
4589
 
4573
- // packages/core/redactLogLines.ts
4574
- var TAIL_LINES_MAX = 500;
4575
- var REDACTED_TOKEN = "[REDACTED_TOKEN]";
4576
- var REDACTED_CREDENTIAL = "[REDACTED_CREDENTIAL]";
4577
- var REDACTED_PATH = "[REDACTED_PATH]";
4578
- var SECRET_RULES = [
4579
- // Authorization: Bearer <token>
4580
- {
4581
- re: /\bBearer\s+[A-Za-z0-9_\-.\~+/=]{8,}/gi,
4582
- replacement: `Bearer ${REDACTED_TOKEN}`
4583
- },
4584
- // GitHub 家族前缀 token(ghp_/gho_/ghu_/ghs_/ghr_)
4585
- {
4586
- re: /\b(?:ghp|gho|ghu|ghs|ghr)_[A-Za-z0-9]{20,}\b/g,
4587
- replacement: REDACTED_TOKEN
4588
- },
4589
- // key=value / key: value。key 名自带凭据关键词才脱敏,避免把普通日志打花。
4590
- // key 字符类含 `-`/`_`,故 `NOLO_WORKER_TOKEN=`(env 前缀)、
4591
- // `x-nolo-machine-lease:`、`x-worker-token:` 都在命中面内。
4592
- // 同时支持带闭合双/单引号的 JSON 键,如 {"apiKey":"..."} 或 {"token": "..."}。
4593
- {
4594
- re: /(["']?)\b([A-Za-z0-9_-]*(?:token|secret|password|passwd|credential|api[_-]?key|machine[_-]lease|workspace[_-]lease)[A-Za-z0-9_-]*)\1(\s*[:=]\s*)(["']?)[^\s"',;}{]{4,}\4/gi,
4595
- replacement: `$1$2$1$3$4${REDACTED_CREDENTIAL}$4`
4596
- }
4597
- ];
4598
- var PATH_RULES = [
4599
- {
4600
- re: /(^|[\s"'`(=:])\/(?:home|Users|var|tmp|app|etc|root|usr|opt|mnt|srv|private|storage|workspace)\/[^\s"'`),;:]+/g,
4601
- replacement: `$1${REDACTED_PATH}`
4602
- },
4603
- {
4604
- re: /(^|[\s"'`(=:])[A-Za-z]:\\[^\s"'`),;:]+/g,
4605
- replacement: `$1${REDACTED_PATH}`
4606
- },
4607
- // `~/.nolo` / `/home/x/.nolo`(凭据与机器身份落点)
4608
- {
4609
- re: /~?\/\.nolo(\/[^\s"'`),;:]*)?/g,
4610
- replacement: REDACTED_PATH
4611
- },
4612
- // process.execPath / bunPath / BUN_PATH
4613
- {
4614
- re: /\b((?:process\.execPath|bunPath|execPath|BUN_PATH)\s*[:=]\s*)(["']?)[^\s"']+\2/gi,
4615
- replacement: `$1$2${REDACTED_PATH}$2`
4616
- }
4617
- ];
4618
-
4619
4590
  // packages/core/remoteTaskView.ts
4620
4591
  var PROCESS_STATUS_SET = /* @__PURE__ */ new Set([
4621
4592
  "running",
@@ -4872,6 +4843,7 @@ function snapshotFromRunRecord(record, now) {
4872
4843
  ...startedAt !== void 0 ? { startedAt } : {},
4873
4844
  ...endedAt !== void 0 ? { finishedAt: endedAt } : {},
4874
4845
  ...typeof counters?.toolCalls === "number" ? { toolCallCount: counters.toolCalls } : {},
4846
+ ...Array.isArray(activity?.lastToolNames) && activity.lastToolNames.length > 0 ? { lastToolNames: activity.lastToolNames } : {},
4875
4847
  // 纯推理 run(0 次工具调用)的心跳:模型调用次数 + 最后一次事件时刻。
4876
4848
  // 两者都来自记录里已有的字段,不新增任何采集。
4877
4849
  ...typeof counters?.llmCalls === "number" ? { llmCallCount: counters.llmCalls } : {},
@@ -4946,7 +4918,12 @@ function createRunRegistryPoller(deps) {
4946
4918
  const currentDialogId = deps.getCurrentDialogId?.() ?? null;
4947
4919
  const scopeActive = Boolean(deps.getCurrentDialogId) && currentDialogId !== null;
4948
4920
  if (!scopeActive) scopedOut.clear();
4949
- const belongsToCurrentDialog = (record) => !deps.getCurrentDialogId || currentDialogId !== null && record.parentDialogId === currentDialogId;
4921
+ const belongsToCurrentDialog = (record) => !deps.getCurrentDialogId || currentDialogId !== null && (record.parentDialogId === currentDialogId || // 另一个会话用 continueDialogId 往「本条对话」续写时,子 run 自己的
4922
+ // dialogId 就是当前对话,而 parentDialogId 指的是发起方的对话。
4923
+ // 这类 run 也必须进 dock——否则用户在 TUI 里完全看不到「另一边正在
4924
+ // 这条对话上干活」。fresh run 的 dialogId 是瞬时 id 或 undefined,
4925
+ // 不会误命中。
4926
+ record.dialogId === currentDialogId);
4950
4927
  const discoveredActive = discovered.filter(
4951
4928
  (record) => record.runId && !dockedIds.has(record.runId) && !retiredRunIds.has(record.runId) && !isAgentRunTerminalStatus(record.status) && belongsToCurrentDialog(record)
4952
4929
  );
@@ -6289,16 +6266,44 @@ function applyTuiInputKey(buffer, sequence, key = {}, cursorPos, options) {
6289
6266
  }
6290
6267
  return { buffer, cursorPos: curPos };
6291
6268
  }
6292
- if (seq === " " || key.name === "tab") {
6293
- if (options?.cwd) {
6294
- const pathCandidates = completeSlashCommand(buffer, options.cwd);
6295
- if (pathCandidates.length === 1) {
6296
- const [only] = pathCandidates;
6297
- return { buffer: only, cursorPos: only.length };
6269
+ const isBackTab = seq === "\x1B[Z" || key.name === "backtab" || Boolean(key.shift) && (seq === " " || key.name === "tab");
6270
+ const isTab = !isBackTab && (seq === " " || key.name === "tab");
6271
+ if (isTab || isBackTab) {
6272
+ const isReverse = isBackTab;
6273
+ let candidates = completeSlashCandidates(buffer, options?.cwd);
6274
+ if (options?.cwd && buffer.startsWith("/cd ") && buffer.endsWith("/")) {
6275
+ const prefix = buffer.slice("/cd ".length);
6276
+ const trimmedSlash = prefix.slice(0, -1);
6277
+ const lastSlash = trimmedSlash.lastIndexOf("/");
6278
+ const parentPrefix = lastSlash >= 0 ? trimmedSlash.slice(0, lastSlash + 1) : "";
6279
+ const parentCandidates = completeSlashCandidates(`/cd ${parentPrefix}`, options.cwd);
6280
+ const parentIdx = parentCandidates.findIndex(
6281
+ (c) => buffer === c.insertText || buffer === c.insertText.trimEnd()
6282
+ );
6283
+ if (parentIdx >= 0 && parentCandidates.length > 1) {
6284
+ candidates = parentCandidates;
6285
+ }
6286
+ }
6287
+ if (candidates.length === 1) {
6288
+ const [only] = candidates;
6289
+ return { buffer: only.insertText, cursorPos: only.insertText.length };
6290
+ }
6291
+ if (candidates.length > 1) {
6292
+ const currentIndex = candidates.findIndex(
6293
+ (c) => buffer === c.insertText || buffer === c.insertText.trimEnd()
6294
+ );
6295
+ if (currentIndex >= 0) {
6296
+ const step = isReverse ? -1 : 1;
6297
+ const nextIndex = (currentIndex + step + candidates.length) % candidates.length;
6298
+ const next = candidates[nextIndex];
6299
+ return { buffer: next.insertText, cursorPos: next.insertText.length };
6298
6300
  }
6299
- if (pathCandidates.length > 1) {
6300
- return { buffer, cursorPos: curPos };
6301
+ const common = findCommonPrefix(candidates.map((c) => c.insertText));
6302
+ if (common.length > buffer.length) {
6303
+ return { buffer: common, cursorPos: common.length };
6301
6304
  }
6305
+ const chosen = isReverse ? candidates[candidates.length - 1] : candidates[0];
6306
+ return { buffer: chosen.insertText, cursorPos: chosen.insertText.length };
6302
6307
  }
6303
6308
  const completed = completeSlashPrefix(buffer) ?? buffer;
6304
6309
  return { buffer: completed, cursorPos: completed.length };
@@ -6455,15 +6460,78 @@ function completeSlashPrefix(buffer) {
6455
6460
  }
6456
6461
  return prefix.length > buffer.length ? prefix : null;
6457
6462
  }
6458
- function completeSlashCommand(buffer, cwd) {
6463
+ function findCommonPrefix(strings) {
6464
+ if (strings.length === 0) return "";
6465
+ let prefix = strings[0] ?? "";
6466
+ for (let i = 1; i < strings.length; i++) {
6467
+ while (!strings[i].startsWith(prefix)) {
6468
+ prefix = prefix.slice(0, -1);
6469
+ if (prefix === "") return "";
6470
+ }
6471
+ }
6472
+ return prefix;
6473
+ }
6474
+ function completeSlashCandidates(buffer, cwd) {
6459
6475
  if (!buffer.startsWith("/")) return [];
6460
6476
  const trimmed = buffer.trim();
6461
6477
  if (cwd && buffer.startsWith("/cd ")) {
6462
6478
  const prefix = buffer.slice("/cd ".length);
6463
- return completeCdPathCandidates(prefix, cwd);
6479
+ const pathLines = completeCdPathCandidates(prefix, cwd);
6480
+ return pathLines.map((line) => ({
6481
+ label: line,
6482
+ insertText: line,
6483
+ source: "path"
6484
+ }));
6464
6485
  }
6465
6486
  if (trimmed.includes(" ")) return [];
6466
- return SLASH_COMMANDS.filter((cmd) => cmd.startsWith(trimmed) && cmd !== trimmed);
6487
+ const candidates = [];
6488
+ for (const cmd of SLASH_COMMANDS) {
6489
+ if (cmd.startsWith(trimmed) && cmd !== trimmed) {
6490
+ candidates.push({
6491
+ label: cmd,
6492
+ insertText: `${cmd} `,
6493
+ source: "builtin"
6494
+ });
6495
+ }
6496
+ }
6497
+ const slashQuery = trimmed.slice(1).toLowerCase();
6498
+ for (const skill of listBuiltinSkills()) {
6499
+ const slug = skill.slug;
6500
+ if (slashQuery !== "" && !slug.toLowerCase().startsWith(slashQuery)) continue;
6501
+ candidates.push({
6502
+ label: `/${slug} (builtin)`,
6503
+ insertText: `${formatSkillSlashReference({
6504
+ source: "builtin",
6505
+ id: slug
6506
+ })} `,
6507
+ source: "builtin",
6508
+ description: skill.title || "Builtin skill"
6509
+ });
6510
+ }
6511
+ if (cwd) {
6512
+ try {
6513
+ const skills = discoverSkills(cwd);
6514
+ const query = trimmed.slice(1).toLowerCase();
6515
+ for (const skill of skills) {
6516
+ const nameLower = skill.name.toLowerCase();
6517
+ if (query === "" || nameLower.startsWith(query)) {
6518
+ const insertText = `${formatSkillSlashReference({
6519
+ source: "project",
6520
+ projectBinding: cwd,
6521
+ relativePath: skill.relativePath
6522
+ })} `;
6523
+ candidates.push({
6524
+ label: `/${skill.name} (project)`,
6525
+ insertText,
6526
+ source: "project",
6527
+ description: skill.description || "Project skill"
6528
+ });
6529
+ }
6530
+ }
6531
+ } catch {
6532
+ }
6533
+ }
6534
+ return candidates;
6467
6535
  }
6468
6536
  function completeCdPathCandidates(prefix, cwd) {
6469
6537
  const lastSlash = prefix.lastIndexOf("/");
@@ -8021,8 +8089,6 @@ function renderRecentDiagnostics(env, events = getProcessRingBuffer()?.drain() ?
8021
8089
  }
8022
8090
 
8023
8091
  // packages/cli/client/estimateCliContext.ts
8024
- import { existsSync as existsSync3, readFileSync as readFileSync2 } from "node:fs";
8025
- import { join as join2 } from "node:path";
8026
8092
  var DEFAULT_CLI_PACKS = ["code", "agent-orchestration", "skills"];
8027
8093
  var DEFAULT_CLI_PLATFORM_TOOLS = [
8028
8094
  "exa_search",
@@ -8030,16 +8096,7 @@ var DEFAULT_CLI_PLATFORM_TOOLS = [
8030
8096
  ];
8031
8097
  var DEFAULT_PROMPT_ESTIMATE_BASELINE = "\u4F60\u662F\u5171\u4EAB\u7A7A\u95F4\u91CC\u7684\u9AD8\u6027\u4EF7\u6BD4\u901A\u7528 AI \u52A9\u624B\u3002\u4F18\u5148\u5FEB\u901F\u3001\u76F4\u63A5\u3001\u7A33\u5B9A\u5730\u5B8C\u6210\u4EFB\u52A1\uFF1B\u9700\u8981\u63A8\u7406\u65F6\u4FDD\u6301\u6B65\u9AA4\u6E05\u6670\u3002";
8032
8098
  function readAgentsMd(cwd) {
8033
- for (const name of ["AGENTS.md", "agents.md"]) {
8034
- const path3 = join2(cwd, name);
8035
- if (!existsSync3(path3)) continue;
8036
- try {
8037
- return readFileSync2(path3, "utf8");
8038
- } catch {
8039
- return "";
8040
- }
8041
- }
8042
- return "";
8099
+ return readAgentsMdLayerFromDisk(cwd)?.content ?? "";
8043
8100
  }
8044
8101
  function estimateToolSchemas(toolNames) {
8045
8102
  const toolset = buildLocalWorkspaceToolset({
@@ -9902,7 +9959,7 @@ function createProcessTerminalAutoResumer(deps) {
9902
9959
  // packages/cli/client/turnBillingAudit.ts
9903
9960
  import { appendFileSync, mkdirSync as mkdirSync3 } from "node:fs";
9904
9961
  import { homedir as homedir5 } from "node:os";
9905
- import { join as join3 } from "node:path";
9962
+ import { join as join2 } from "node:path";
9906
9963
  function projectUsageForAudit(usage) {
9907
9964
  if (!usage || typeof usage !== "object") return null;
9908
9965
  const normalized = normalizeUsage(usage);
@@ -9965,8 +10022,8 @@ function projectTelemetryForAudit(record) {
9965
10022
  return out;
9966
10023
  }
9967
10024
  function resolveTurnBillingAuditLogPath(env = process.env) {
9968
- const noloHome = env.NOLO_HOME?.trim() || join3(homedir5(), ".nolo");
9969
- return join3(noloHome, "logs", "turn-billing.jsonl");
10025
+ const noloHome = env.NOLO_HOME?.trim() || join2(homedir5(), ".nolo");
10026
+ return join2(noloHome, "logs", "turn-billing.jsonl");
9970
10027
  }
9971
10028
  function appendTurnBillingAudit(input) {
9972
10029
  try {
@@ -9994,7 +10051,7 @@ function appendTurnBillingAudit(input) {
9994
10051
  calls
9995
10052
  };
9996
10053
  const logPath = resolveTurnBillingAuditLogPath();
9997
- mkdirSync3(join3(logPath, ".."), { recursive: true });
10054
+ mkdirSync3(join2(logPath, ".."), { recursive: true });
9998
10055
  appendFileSync(logPath, `${JSON.stringify(row)}
9999
10056
  `);
10000
10057
  } catch {
@@ -11525,10 +11582,33 @@ function createFixedInput(output, config) {
11525
11582
  const renderInputArea = (buffer, cursorPos) => {
11526
11583
  const colorEnabled = resolveCliColorEnabled();
11527
11584
  const cols = Math.max(1, getColumns());
11528
- const completions = completeSlashCommand(buffer, config.getCwd?.());
11585
+ let completions = completeSlashCandidates(buffer, config.getCwd?.());
11586
+ const cwd = config.getCwd?.();
11587
+ if (cwd && buffer.startsWith("/cd ") && buffer.endsWith("/")) {
11588
+ const prefix = buffer.slice("/cd ".length);
11589
+ const trimmedSlash = prefix.slice(0, -1);
11590
+ const lastSlash = trimmedSlash.lastIndexOf("/");
11591
+ const parentPrefix = lastSlash >= 0 ? trimmedSlash.slice(0, lastSlash + 1) : "";
11592
+ const parentCompletions = completeSlashCandidates(`/cd ${parentPrefix}`, cwd);
11593
+ const parentIdx = parentCompletions.findIndex(
11594
+ (c) => buffer === c.insertText || buffer === c.insertText.trimEnd()
11595
+ );
11596
+ if (parentIdx >= 0 && parentCompletions.length > 1) {
11597
+ completions = parentCompletions;
11598
+ }
11599
+ }
11529
11600
  const sections = [];
11530
11601
  if (completions.length > 0) {
11531
- sections.push(fitAnsiLine(dimCliText(completions.join(" "), colorEnabled), cols));
11602
+ const selectedIndex = completions.findIndex(
11603
+ (c) => buffer === c.insertText || buffer === c.insertText.trimEnd()
11604
+ );
11605
+ const labels = completions.map((c, idx) => {
11606
+ if (idx === selectedIndex && colorEnabled) {
11607
+ return `\x1B[1;7m${c.label}\x1B[0m`;
11608
+ }
11609
+ return c.label;
11610
+ });
11611
+ sections.push(fitAnsiLine(dimCliText(labels.join(" "), colorEnabled), cols));
11532
11612
  }
11533
11613
  const rawActivity = config.getActivityLines ? config.getActivityLines({ columns: cols, rows: getRows() }) : config.getActivityLine ? config.getActivityLine() : null;
11534
11614
  const activityLines = Array.isArray(rawActivity) ? rawActivity.filter((line) => line !== null && line !== void 0) : typeof rawActivity === "string" && rawActivity.length > 0 ? [rawActivity] : [];
@@ -12017,6 +12097,63 @@ async function runAgentChat(scriptDir, state, message, env, output, agentRunner
12017
12097
  let effectiveMessage = message;
12018
12098
  let skillAllowedTools;
12019
12099
  let skillContextBlocks;
12100
+ const parsedSlashSkill = parseSkillSlashReference(message);
12101
+ let slashSkillPreloadResult;
12102
+ if (parsedSlashSkill) {
12103
+ const executor = buildLoadSkillExecutor({ cwd: state.cwd });
12104
+ let loadArgs;
12105
+ if (parsedSlashSkill.reference.source === "builtin") {
12106
+ loadArgs = { source: "builtin", slug: parsedSlashSkill.reference.id };
12107
+ } else if (parsedSlashSkill.reference.source === "project") {
12108
+ loadArgs = {
12109
+ source: "project",
12110
+ projectBinding: parsedSlashSkill.reference.projectBinding,
12111
+ relativePath: parsedSlashSkill.reference.relativePath
12112
+ };
12113
+ } else {
12114
+ loadArgs = {
12115
+ source: "space",
12116
+ dbKey: parsedSlashSkill.reference.dbKey
12117
+ };
12118
+ }
12119
+ const loadResult = await executor({
12120
+ name: "loadSkill",
12121
+ arguments: JSON.stringify(loadArgs)
12122
+ });
12123
+ if (!loadResult.metadata?.resolved) {
12124
+ output.write(`[nolo] skill preload failed: ${loadResult.content}
12125
+ `);
12126
+ throw new Error(`Skill preload failed: ${loadResult.content}`);
12127
+ }
12128
+ effectiveMessage = resolveSkillSlashUserPrompt(parsedSlashSkill.args);
12129
+ let preloadTools;
12130
+ if (Array.isArray(loadResult.metadata?.toolNames) && loadResult.metadata.toolNames.length > 0) {
12131
+ preloadTools = loadResult.metadata.toolNames.filter(
12132
+ (t2) => typeof t2 === "string" && t2.length > 0
12133
+ );
12134
+ }
12135
+ let skillMarkdown = loadResult.content;
12136
+ const inlinePrefix = /^Skill\s+"[^"]*"\s+loaded inline\.\s+Follow its instructions\.\s*\n+/i;
12137
+ if (inlinePrefix.test(skillMarkdown)) {
12138
+ skillMarkdown = skillMarkdown.replace(inlinePrefix, "");
12139
+ } else {
12140
+ const frontmatterIndex = skillMarkdown.search(/(?:^|\n)---\s*\n/);
12141
+ if (frontmatterIndex !== -1) {
12142
+ const dashIndex = skillMarkdown.indexOf("---", frontmatterIndex);
12143
+ if (dashIndex !== -1) {
12144
+ skillMarkdown = skillMarkdown.slice(dashIndex);
12145
+ }
12146
+ }
12147
+ }
12148
+ const external = parseExternalSkillMarkdown(skillMarkdown);
12149
+ if (external.allowedTools && external.allowedTools.length > 0) {
12150
+ preloadTools = preloadTools ? preloadTools.filter((t2) => external.allowedTools.includes(t2)) : external.allowedTools;
12151
+ }
12152
+ slashSkillPreloadResult = {
12153
+ content: loadResult.content,
12154
+ allowedTools: preloadTools
12155
+ };
12156
+ }
12020
12157
  const memoryPromptOutcomePromise = state.cachedMemoryOverlay === void 0 ? resolveCliMemory({
12021
12158
  serverUrl: state.serverUrl,
12022
12159
  authToken: resolvePlatformAuthToken(env),
@@ -12064,6 +12201,27 @@ async function runAgentChat(scriptDir, state, message, env, output, agentRunner
12064
12201
  }
12065
12202
  }
12066
12203
  }
12204
+ if (slashSkillPreloadResult) {
12205
+ skillContextBlocks = [
12206
+ ...skillContextBlocks ?? [],
12207
+ slashSkillPreloadResult.content
12208
+ ];
12209
+ if (slashSkillPreloadResult.allowedTools && slashSkillPreloadResult.allowedTools.length > 0) {
12210
+ if (skillAllowedTools !== void 0) {
12211
+ const intersected = skillAllowedTools.filter(
12212
+ (t2) => slashSkillPreloadResult.allowedTools.includes(t2)
12213
+ );
12214
+ if (intersected.length === 0) {
12215
+ throw new Error(
12216
+ "Cannot preserve skill tool authorization: incompatible tool restrictions"
12217
+ );
12218
+ }
12219
+ skillAllowedTools = intersected;
12220
+ } else {
12221
+ skillAllowedTools = slashSkillPreloadResult.allowedTools;
12222
+ }
12223
+ }
12224
+ }
12067
12225
  const layers = [
12068
12226
  readAgentsMdLayerFromDisk(state.cwd),
12069
12227
  // Skill discovery: scan conventional skill dirs for SKILL.md and inject an