nolo-cli 0.191.0-alpha.2 → 0.191.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 (149) hide show
  1. package/{_executeModel-WQ2D4ZRH.js → _executeModel-4HQQXPN4.js} +44 -46
  2. package/{action-BHWB4MOK.js → action-HNG2JKWK.js} +3 -3
  3. package/{addContentAction-BY375D35.js → addContentAction-FEN3H2EE.js} +6 -6
  4. package/{addDialogAgentAction-HOZYOCWC.js → addDialogAgentAction-DDA6S3WS.js} +5 -5
  5. package/{agentDeleteCommand-TTCVC74A.js → agentDeleteCommand-HZFWSKED.js} +57 -59
  6. package/{agentEmailCommands-PTG35KER.js → agentEmailCommands-HRYMVHC7.js} +59 -61
  7. package/{agentListCommands-MAG736RU.js → agentListCommands-HE2CCZEW.js} +33 -31
  8. package/{agentMachineCommands-ATOZK3R5.js → agentMachineCommands-ISSULCRR.js} +23 -23
  9. package/{agentProviderCommands-XSZUCNIR.js → agentProviderCommands-4EAYN3ZY.js} +3 -3
  10. package/{agentRecordCommands-KGRPIJN5.js → agentRecordCommands-WGAMWQLA.js} +57 -59
  11. package/{agentRunCommand-75VVJTNU.js → agentRunCommand-7EQ64FIB.js} +59 -61
  12. package/{agentRunControl-6HHESKDB.js → agentRunControl-EJPBPVLU.js} +5 -5
  13. package/{agentRuntimeLocal-NAAYNHCW.js → agentRuntimeLocal-ONSIOOQB.js} +20 -20
  14. package/{agentSlice-UJPIKKKP.js → agentSlice-CHWNVAS5.js} +6 -6
  15. package/{appDeleteCommands-VDHCDVBF.js → appDeleteCommands-RNAF4V5C.js} +25 -25
  16. package/{appDeployCommands-V6UTKVXR.js → appDeployCommands-LTIZ4QH7.js} +25 -25
  17. package/{appDeployStatusCommands-4UIFSEPC.js → appDeployStatusCommands-OJJR4LDK.js} +25 -25
  18. package/{appGetCommands-XKDXLC3C.js → appGetCommands-UJZF6U4V.js} +25 -25
  19. package/{appListCommands-BELRVX2Y.js → appListCommands-M5C5BIDY.js} +25 -25
  20. package/{authCommand-RV5MQDWN.js → authCommand-RMUBRAXF.js} +11 -11
  21. package/{builtinSkillRegistry-7MBUY5EY.js → builtinSkillRegistry-XDBPVNY6.js} +3 -5
  22. package/{chromeOpsCommands-C46BXHEE.js → chromeOpsCommands-P4PFQDT7.js} +19 -4
  23. package/{chunk-7UODCAWW.js → chunk-32GANJHJ.js} +1 -1
  24. package/{chunk-G6OOUQWJ.js → chunk-4KB6WQUL.js} +2 -0
  25. package/{chunk-LHOR5MC2.js → chunk-4KYV2TAI.js} +164 -323
  26. package/{chunk-5EFNSNAV.js → chunk-6CFXWUYE.js} +7 -7
  27. package/{chunk-6XIE5ZGI.js → chunk-6HIGYUBQ.js} +1 -1
  28. package/{chunk-LBXUNNDS.js → chunk-6K2AKJAD.js} +1 -1
  29. package/{chunk-U5ZHUOLT.js → chunk-6OBTQSJ2.js} +2 -2
  30. package/{chunk-XPL63OIC.js → chunk-7SUYSFPG.js} +140 -66
  31. package/{chunk-53RSTB7T.js → chunk-7TMVGMM3.js} +26 -31
  32. package/{chunk-ZBCBFOWC.js → chunk-A2ZMIRLN.js} +2 -2
  33. package/{chunk-MJWUBTK7.js → chunk-AOYR4XOA.js} +1 -1
  34. package/{chunk-IIX6VWLW.js → chunk-AV6IE6NM.js} +224 -38
  35. package/{chunk-WFUIXNKC.js → chunk-BMXR7CFX.js} +3 -3
  36. package/{chunk-JIFYXQRD.js → chunk-BTYQAODF.js} +26 -8
  37. package/{chunk-VHGD6FHV.js → chunk-BZKBX5BO.js} +28 -5
  38. package/{chunk-Q6RMLYSA.js → chunk-CMLBKYEI.js} +4 -2
  39. package/chunk-CMTTXP5Y.js +291 -0
  40. package/{chunk-OHRDHS4N.js → chunk-CVCRAO6Q.js} +9 -4
  41. package/{chunk-SM56M7N7.js → chunk-DBRXPVWY.js} +39 -5
  42. package/{chunk-2KBNF477.js → chunk-DSVR6ZAV.js} +30 -21
  43. package/{chunk-ADTJJVDJ.js → chunk-DXDG4XLD.js} +2838 -2255
  44. package/{chunk-R5LJWMZE.js → chunk-EMXVOJDB.js} +3 -3
  45. package/{chunk-KHCLMKZZ.js → chunk-EY7V7REW.js} +280 -6
  46. package/{chunk-KGP7UTNN.js → chunk-FNXSQ7A3.js} +15 -15
  47. package/{chunk-BTBT2566.js → chunk-FSEGCTZQ.js} +1 -1
  48. package/{chunk-CNMQATUF.js → chunk-GL7W7TTR.js} +2 -2
  49. package/{chunk-5KTQVMCX.js → chunk-GOO6G4PY.js} +85 -0
  50. package/{chunk-HTLIKE5U.js → chunk-GVMF62PR.js} +2 -2
  51. package/{chunk-UZHYRBUB.js → chunk-H4CFODT7.js} +137 -61
  52. package/{chunk-R4BMKAR5.js → chunk-HAB2UDLT.js} +1 -1
  53. package/{chunk-3NPXGNSK.js → chunk-HVXL4VOO.js} +348 -87
  54. package/{chunk-32ZKZET7.js → chunk-HWZT5DKX.js} +1 -1
  55. package/{chunk-GYVLAHA4.js → chunk-IY7DGZSY.js} +10 -4
  56. package/{chunk-FEDJHD5X.js → chunk-J5Z2SSIY.js} +6 -6
  57. package/{chunk-UVWBGWBO.js → chunk-JA6WCCDO.js} +3 -3
  58. package/{chunk-YE6A72XL.js → chunk-JI5MQU5B.js} +35 -31
  59. package/{chunk-TFSMPRAY.js → chunk-JLOCKFSI.js} +4 -4
  60. package/{chunk-UBLITLAZ.js → chunk-K2GL335R.js} +13 -3
  61. package/{chunk-DS5DAOIY.js → chunk-KYQXW7DL.js} +3 -3
  62. package/{chunk-5HAPEKNH.js → chunk-LFJRTOUV.js} +158 -43
  63. package/{chunk-N7E3LQ4A.js → chunk-LGW6A7GK.js} +1 -1
  64. package/{chunk-UNOILAZP.js → chunk-M6AGLVV4.js} +74 -2
  65. package/{chunk-BA2FHPS4.js → chunk-MOCY5LJI.js} +1 -1
  66. package/{chunk-INFHX73M.js → chunk-MR6L6U46.js} +55 -3
  67. package/{chunk-CTPFBJAF.js → chunk-N7IBYQEC.js} +182 -91
  68. package/{chunk-QU3TLYBR.js → chunk-NHI3JZP4.js} +32 -8
  69. package/{chunk-B2N5GZBU.js → chunk-OHYCQKPW.js} +6 -6
  70. package/{chunk-WAZ6BTSC.js → chunk-OOERQPG5.js} +1 -1
  71. package/{chunk-EHB4CKUI.js → chunk-OTKNEZE3.js} +9 -9
  72. package/chunk-OVBUUU7L.js +2648 -0
  73. package/{chunk-PVD7CRYV.js → chunk-P7SUBTGZ.js} +3 -3
  74. package/{chunk-RJ3EYB5G.js → chunk-PRIROPK4.js} +1 -1
  75. package/chunk-PRJ473FK.js +63 -0
  76. package/{chunk-K6TZSON4.js → chunk-PXERKNSJ.js} +1 -1
  77. package/{chunk-B6EZB6DW.js → chunk-QAYCF4CH.js} +2 -2
  78. package/{chunk-5DPVRMSY.js → chunk-RBJASUX4.js} +1 -1
  79. package/{chunk-NVOYW6H4.js → chunk-RDKNGJ5M.js} +12 -8
  80. package/{chunk-GTP6VNWH.js → chunk-RQ22OZD7.js} +3 -3
  81. package/{chunk-2E5M3JVS.js → chunk-RWGIVUH3.js} +11 -5
  82. package/{chunk-DFF6B7P7.js → chunk-RXUKDHS5.js} +1 -1
  83. package/{chunk-JLR5NWP2.js → chunk-RXX262QX.js} +17 -3
  84. package/{chunk-GC64WGMD.js → chunk-SM3NSZJV.js} +16 -5
  85. package/{chunk-A5BLRE3G.js → chunk-T3U2KQF4.js} +2 -2
  86. package/{chunk-HLAL63BZ.js → chunk-T43B7LB2.js} +1 -1
  87. package/{chunk-LCSAJ5TJ.js → chunk-UDKNC3CV.js} +3 -3
  88. package/{chunk-VE3FEZIT.js → chunk-WKGOIXFV.js} +5 -5
  89. package/{chunk-4YMD7B4Y.js → chunk-WPOKOKZA.js} +2 -2
  90. package/{chunk-YIRADHSY.js → chunk-WYKMOZTW.js} +1 -1
  91. package/{chunk-WRCZXJ4N.js → chunk-X4F26D5K.js} +2 -0
  92. package/{chunk-4MYCKDSI.js → chunk-XUOF4MA7.js} +2 -2
  93. package/{chunk-PD2YRFAI.js → chunk-Y5ZEHS3F.js} +1 -1
  94. package/{chunk-4CEAZRZ4.js → chunk-YU2DGFKG.js} +1 -1
  95. package/{chunk-TVGX5QIN.js → chunk-YUA6OAH5.js} +2 -2
  96. package/{chunk-53PBXLID.js → chunk-Z3MQYKRN.js} +17 -17
  97. package/{chunk-I3HWJODB.js → chunk-ZHOKF4MY.js} +31 -26
  98. package/{chunk-2XUOREKD.js → chunk-ZI5MFQ42.js} +5 -4
  99. package/{chunk-DYQXB46J.js → chunk-ZSCIGIJS.js} +1 -1
  100. package/{commandRegistry-4JHVRMW7.js → commandRegistry-O2657YC7.js} +86 -66
  101. package/{contentThunks-HQBAAXNW.js → contentThunks-THWDEBJU.js} +17 -17
  102. package/{cooldownCommands-4XKJFEBW.js → cooldownCommands-V4EEBD55.js} +3 -3
  103. package/{createAgentAutomationAction-KELPOVMP.js → createAgentAutomationAction-2ZZTFGWG.js} +17 -17
  104. package/{createDialogAction-Z3SASMTM.js → createDialogAction-FCRKPKIT.js} +20 -22
  105. package/{createPageAction-PNHOIG44.js → createPageAction-EC25JTKW.js} +18 -19
  106. package/{dbSlice-QAUXABCC.js → dbSlice-JK7LWBDO.js} +5 -5
  107. package/{deleteFile-R5OBP7OM.js → deleteFile-CE24BROO.js} +3 -3
  108. package/{dialogCommands-4BGV6DPD.js → dialogCommands-QH7BJ3DJ.js} +26 -26
  109. package/{dialogSlice-QHV6I3OQ.js → dialogSlice-Z5E7POEN.js} +16 -16
  110. package/{docCreateCommands-3CW75UF2.js → docCreateCommands-KP42NGIF.js} +26 -27
  111. package/{docDeleteCommands-NL4ZYMN5.js → docDeleteCommands-7YOCX5GC.js} +27 -28
  112. package/{docReadCommands-HXCNVDPQ.js → docReadCommands-EJEIAOKQ.js} +26 -27
  113. package/{docStore-LVMUSECS.js → docStore-6MHLMMWO.js} +6 -6
  114. package/{docUpdateCommands-RMVBAMDE.js → docUpdateCommands-ACJLISGA.js} +26 -27
  115. package/{getPricing-E2PLNWCR.js → getPricing-3PQY3TGI.js} +3 -3
  116. package/{handleSendMessageAction-7TONIXHY.js → handleSendMessageAction-MTOPN4D3.js} +86 -42
  117. package/index.js +7 -7
  118. package/{lib-4YTWAGY7.js → lib-5KKIBFIT.js} +439 -272
  119. package/{localRuntimeAdapter-HRAB7P5E.js → localRuntimeAdapter-4USQ3EP7.js} +55 -57
  120. package/{machineCommands-OTXFRTDA.js → machineCommands-CJMSDSOO.js} +56 -58
  121. package/{machineWsRunDispatch-KWVWOHHG.js → machineWsRunDispatch-YIPO76QH.js} +56 -58
  122. package/{memberThunks-ZAE52VIP.js → memberThunks-WT2KVRP4.js} +158 -55
  123. package/{models-UUNO6DOL.js → models-PJBE6JDV.js} +2 -2
  124. package/package.json +1 -1
  125. package/{providerPresetApply-JGNMO2KX.js → providerPresetApply-ISA35424.js} +5 -5
  126. package/{providerRegistry-33J3ZYFJ.js → providerRegistry-QIQCHVNP.js} +5 -5
  127. package/{read-D6NEWSGG.js → read-ILTT75DW.js} +3 -3
  128. package/{readDocTool-NTAXO7SX.js → readDocTool-374CFJYO.js} +1 -1
  129. package/{readlineWorkspace-CEX5TXGM.js → readlineWorkspace-RORGDWZN.js} +291 -99
  130. package/{removeDialogAgentAction-YEPO5AYI.js → removeDialogAgentAction-BDLO7UC2.js} +7 -7
  131. package/{runAgentClientLoop-DCV4BD2W.js → runAgentClientLoop-CDCBSUWW.js} +41 -43
  132. package/{runtimeDoctorCommands-NYBOTA6D.js → runtimeDoctorCommands-AM2V5YVH.js} +5 -5
  133. package/{secretCommands-N6CMCJDZ.js → secretCommands-G5XYCXZB.js} +308 -1
  134. package/{setDialogExtraReferencesAction-EH5GWDAJ.js → setDialogExtraReferencesAction-GBIT7WAG.js} +6 -6
  135. package/{setPrimaryDialogAgentAction-PNWRK6IY.js → setPrimaryDialogAgentAction-PGBTR247.js} +7 -7
  136. package/{settingThunks-7VCWB6P7.js → settingThunks-XQJZVA4D.js} +38 -7
  137. package/{skillDiscovery-F3TMVQOJ.js → skillDiscovery-DO5372J5.js} +2 -3
  138. package/{spaceCommands-ZUI4CTSO.js → spaceCommands-BTSANKDH.js} +23 -23
  139. package/{streamAgentChatTurn-NKFKMFQ2.js → streamAgentChatTurn-VUF3EUMS.js} +66 -59
  140. package/{switchDialogAgentAction-23BFWJMV.js → switchDialogAgentAction-O7WTPLKG.js} +5 -5
  141. package/{tools-626VXEY7.js → tools-GAAYAIEW.js} +35 -37
  142. package/{tuiSummaryLlmCaller-FSOADMXK.js → tuiSummaryLlmCaller-MKOLOSH3.js} +11 -11
  143. package/{updateCommands-KE6LP3QX.js → updateCommands-W7TXEV7N.js} +3 -3
  144. package/{updateDialogTitleAction-RNNQAMXG.js → updateDialogTitleAction-LE2DBQDS.js} +17 -17
  145. package/{windowsSelfUpdate-26TSFXEZ.js → windowsSelfUpdate-575VQ6QO.js} +2 -2
  146. package/chunk-7KWPNGVJ.js +0 -150
  147. package/chunk-AETZ7AD6.js +0 -274
  148. package/chunk-EUGTFFO6.js +0 -42
  149. package/chunk-VYNMQ6HW.js +0 -138
@@ -1,37 +1,69 @@
1
1
  import {
2
2
  DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
3
3
  DEFAULT_USER_PREFERENCE_PROFILE,
4
+ isAgentSkillDisabled,
4
5
  normalizeAgentUpdateFieldList,
5
6
  normalizePolicyLevelSetting,
6
7
  normalizeSystemBuiltinSkills,
7
- normalizeTonePresetSetting
8
- } from "./chunk-VYNMQ6HW.js";
8
+ normalizeTonePresetSetting,
9
+ resolveUserEnabledSkills
10
+ } from "./chunk-CMTTXP5Y.js";
11
+ import {
12
+ isSkillSummaryMarker
13
+ } from "./chunk-VF4K2QE6.js";
14
+ import {
15
+ setDialogExtraReferencesAction
16
+ } from "./chunk-RXUKDHS5.js";
9
17
  import {
10
18
  fetchAndCacheTableRows
11
- } from "./chunk-5EFNSNAV.js";
19
+ } from "./chunk-6CFXWUYE.js";
20
+ import {
21
+ createSpaceKey
22
+ } from "./chunk-UAD2WT54.js";
23
+ import {
24
+ getActiveDialogKey
25
+ } from "./chunk-OWYYDMGJ.js";
12
26
  import {
13
27
  require_react
14
28
  } from "./chunk-YDH3FDFQ.js";
29
+ import {
30
+ selectById
31
+ } from "./chunk-OHYCQKPW.js";
32
+ import {
33
+ selectRuntimeSnapshot
34
+ } from "./chunk-32GANJHJ.js";
15
35
  import {
16
36
  createAsyncThunk,
17
37
  createSelector
18
- } from "./chunk-WRCZXJ4N.js";
38
+ } from "./chunk-X4F26D5K.js";
19
39
  import {
20
40
  selectIdentityUserId
21
41
  } from "./chunk-PXYBUFDB.js";
22
42
  import {
23
- resolveBuiltinCapability,
24
- resolveBuiltinSkillEntry
25
- } from "./chunk-5HAPEKNH.js";
43
+ listBuiltinSkills,
44
+ resolveBuiltinSkillByName
45
+ } from "./chunk-LFJRTOUV.js";
26
46
  import {
27
47
  DEFAULT_SYSTEM_AGENT_CAPABILITIES
28
- } from "./chunk-EUGTFFO6.js";
48
+ } from "./chunk-DBRXPVWY.js";
49
+ import {
50
+ parseSkillDocProtocol
51
+ } from "./chunk-EY7V7REW.js";
29
52
  import {
30
53
  toErrorMessage
31
54
  } from "./chunk-HNMXYYJR.js";
55
+ import {
56
+ isRecord
57
+ } from "./chunk-KUG52IAP.js";
58
+ import {
59
+ normalizeServerOrigin
60
+ } from "./chunk-CF7PE763.js";
32
61
  import {
33
62
  asTrimmedNonEmptyStringArray
34
63
  } from "./chunk-I42VC5KR.js";
64
+ import {
65
+ asTrimmedString
66
+ } from "./chunk-3EUW3WEO.js";
35
67
  import {
36
68
  asOptionalTrimmedString
37
69
  } from "./chunk-G3SUCT4W.js";
@@ -121,6 +153,19 @@ function waitForAbortableDelay(ms, signal) {
121
153
  // packages/app/settings/fieldSelectors.ts
122
154
  var selectMaxExecutionTime = (state) => state.settings.maxExecutionTime;
123
155
  var selectGlobalPrompt = (state) => state.settings.globalPrompt;
156
+ var selectEnabledSkills = createSelector(
157
+ [
158
+ (state) => Boolean(
159
+ state.settings && Object.prototype.hasOwnProperty.call(state.settings, "enabledSkills")
160
+ ),
161
+ (state) => state.settings?.enabledSkills,
162
+ (state) => state.settings?.enabledPromptSkills
163
+ ],
164
+ (hasOwnEnabledSkills, enabledSkills, enabledPromptSkills) => {
165
+ const preferences = hasOwnEnabledSkills ? { enabledSkills, enabledPromptSkills } : { enabledPromptSkills };
166
+ return resolveUserEnabledSkills(preferences);
167
+ }
168
+ );
124
169
  var selectUserTonePreset = (state) => normalizeTonePresetSetting(state.settings.userTonePreset);
125
170
  var selectKnowledgeCaptureLevel = (state) => normalizePolicyLevelSetting(
126
171
  state.settings.knowledgeCaptureLevel,
@@ -146,6 +191,288 @@ var selectSystemBuiltinSkills = createSelector(
146
191
  )
147
192
  );
148
193
 
194
+ // packages/ai/tools/loadSkillTool.ts
195
+ var loadSkillFunctionSchema = {
196
+ name: "loadSkill",
197
+ description: [
198
+ "\u6309\u540D\u79F0\u6216\u7CBE\u786E\u5F15\u7528\u52A0\u8F7D\u4E00\u4E2A skill \u6587\u6863\uFF0C\u8FD4\u56DE\u5176\u5B8C\u6574\u6307\u4EE4\u6B63\u6587\u3002",
199
+ "name \u4F7F\u7528 skill \u4FDD\u5B58\u65F6\u5199\u5165 skill-config \u7684 name\uFF08\u4E5F\u63A5\u53D7 skillId\uFF09\u3002",
200
+ "\u7CBE\u786E\u5F15\u7528\u4E0D\u4F20 name\uFF1Asource=space + dbKey\uFF0Csource=builtin + slug\uFF0C\u6216 source=project + projectBinding + relativePath\uFF1B\u5404\u7EC4\u5B57\u6BB5\u4E92\u65A5\uFF0C\u4E0D\u6DF7\u7528\u3002",
201
+ "\u6267\u884C\u5668\u652F\u6301\u8303\u56F4\uFF1A\u670D\u52A1\u7AEF\u652F\u6301 space/builtin\uFF0C\u672C\u5730 CLI/desktop \u652F\u6301 builtin/project\uFF1BWeb \u5BA2\u6237\u7AEF\u652F\u6301 name \u4E0E space/builtin \u7CBE\u786E\u5F15\u7528\uFF0C\u4E0D\u652F\u6301 project\u3002",
202
+ "\u627E\u4E0D\u5230\u5BF9\u5E94 skill \u65F6\u8FD4\u56DE\u5F53\u524D\u53EF\u7528\u7684 skill \u540D\u79F0\u5217\u8868\uFF08\u4E0D\u62A5\u9519\uFF09\uFF1B\u7CBE\u786E\u5F15\u7528\u4E0D\u56DE\u9000\u5230\u540C\u540D skill\u3002",
203
+ '\u7CFB\u7EDF\u5185\u7F6E\u5199\u4EE3\u7801\u6280\u80FD\uFF1A\u5BF9\u8BDD\u8F6C\u5411\u5199\u4EE3\u7801\u65F6\u7528 loadSkill("coding") \u8F7D\u5165\u5199\u4EE3\u7801\u80FD\u529B\u4E0E\u4EE3\u7801\u5BA1\u67E5\u7EAA\u5F8B\uFF08\u542B review \u89D2\u8272\u5207\u5272\uFF09\u3002',
204
+ "\u7CFB\u7EDF\u5185\u7F6E\u4E13\u804C\u6280\u80FD\uFF1Afeedback\uFF08\u53CD\u9988\u6536\u96C6\uFF09/ agent-creator\uFF08\u521B\u5EFA Agent\uFF09/ app-builder\uFF08\u5E94\u7528\u6784\u5EFA\uFF09\uFF0C\u540C\u6837\u53EF\u76F4\u63A5 loadSkill \u8F7D\u5165\u3002"
205
+ ].join("\n"),
206
+ parameters: {
207
+ type: "object",
208
+ properties: {
209
+ name: {
210
+ type: "string",
211
+ description: "\u65E7\u7248 skill \u540D\u79F0\uFF1B\u4E0D\u4E0E\u7CBE\u786E\u5F15\u7528\u5B57\u6BB5\u6DF7\u7528\u3002"
212
+ },
213
+ source: {
214
+ type: "string",
215
+ enum: ["space", "builtin", "project"],
216
+ description: "\u7CBE\u786E\u6765\u6E90\uFF1Aspace \u9700 dbKey\uFF0Cbuiltin \u9700 slug\uFF0Cproject \u9700 projectBinding \u4E0E relativePath\uFF1B\u4E0D\u4F20 name\u3002Web \u5BA2\u6237\u7AEF\u652F\u6301 space/builtin\uFF0C\u4E0D\u652F\u6301 project\u3002"
217
+ },
218
+ dbKey: {
219
+ type: "string",
220
+ description: "\u7CBE\u786E skill \u6587\u6863 dbKey\uFF0C\u4EC5\u7528\u4E8E source=space\uFF1B\u5FC5\u987B\u5728\u5F53\u524D\u7528\u6237 membership \u53EF\u89C1\u7684 Space Skill \u7D22\u5F15\u4E2D\uFF08\u670D\u52A1\u7AEF\u6216 Web \u5BA2\u6237\u7AEF\u6267\u884C\uFF09\u3002"
221
+ },
222
+ slug: {
223
+ type: "string",
224
+ description: "\u7CBE\u786E\u5185\u7F6E skill slug\uFF0C\u4EC5\u7528\u4E8E source=builtin\u3002"
225
+ },
226
+ projectBinding: {
227
+ type: "string",
228
+ description: "\u4E0E\u6267\u884C\u5668\u6388\u6743 cwd \u5339\u914D\u7684\u9879\u76EE\u6839\u76EE\u5F55\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4EC5\u7528\u4E8E source=project\uFF08\u672C\u5730\u6267\u884C\uFF09\u3002"
229
+ },
230
+ relativePath: {
231
+ type: "string",
232
+ description: "\u9879\u76EE .agents/skills/ \u5185 SKILL.md \u7684\u9879\u76EE\u76F8\u5BF9\u8DEF\u5F84\uFF0C\u4EC5\u7528\u4E8E source=project\uFF08\u672C\u5730\u6267\u884C\uFF09\u3002"
233
+ }
234
+ }
235
+ }
236
+ };
237
+ var getRuntime = (thunkApi) => {
238
+ const state = thunkApi?.getState?.();
239
+ return state ? selectRuntimeSnapshot(state) : null;
240
+ };
241
+ var authHeaders = (token) => token ? { Authorization: `Bearer ${token}` } : {};
242
+ async function readRemoteRecord(args) {
243
+ const serverBase = normalizeServerOrigin(args.serverBase);
244
+ if (!serverBase || !args.token) return null;
245
+ const response = await fetch(
246
+ `${serverBase}/api/v1/db/read/${encodeURIComponent(args.dbKey)}?includeDeleted=true`,
247
+ { headers: authHeaders(args.token) }
248
+ );
249
+ if (!response.ok) return null;
250
+ const payload = await response.json().catch(() => null);
251
+ return payload?.data ?? payload;
252
+ }
253
+ function resolveWebSkill(candidates, requestedName) {
254
+ const candidate = matchSkillCandidate(candidates, requestedName);
255
+ if (candidate) return { kind: "space", candidate };
256
+ const entry = resolveBuiltinSkillByName(requestedName);
257
+ return entry ? { kind: "builtin", entry } : null;
258
+ }
259
+ function listWebSkillNames(candidates) {
260
+ return Array.from(
261
+ /* @__PURE__ */ new Set([
262
+ ...candidates.map((candidate) => candidate.name),
263
+ ...listBuiltinSkills().flatMap((skill) => [skill.slug, skill.title])
264
+ ])
265
+ );
266
+ }
267
+ function matchSkillCandidate(candidates, requestedName) {
268
+ return candidates.find(
269
+ (candidate) => candidate.name === requestedName || candidate.skillId === requestedName
270
+ );
271
+ }
272
+ function collectSkillCandidatesFromSpace(space) {
273
+ if (!space?.contents || typeof space.contents !== "object") return [];
274
+ const candidates = [];
275
+ for (const [entryKey, value] of Object.entries(space.contents)) {
276
+ if (!isRecord(value)) continue;
277
+ const skillSummary = value.skillSummary;
278
+ if (!isSkillSummaryMarker(skillSummary)) continue;
279
+ const name = asTrimmedString(skillSummary.name);
280
+ if (!name) continue;
281
+ candidates.push({
282
+ dbKey: entryKey,
283
+ name,
284
+ skillId: asOptionalTrimmedString(skillSummary.skillId) ?? void 0
285
+ });
286
+ }
287
+ return candidates;
288
+ }
289
+ function extractSkillBody(page) {
290
+ return parseSkillDocProtocol(page?.content ?? "").content;
291
+ }
292
+ async function listSkillCandidates(thunkApi) {
293
+ const runtime = getRuntime(thunkApi);
294
+ const serverBase = runtime?.currentServer;
295
+ const token = runtime?.currentToken;
296
+ const userId = runtime?.currentUserId;
297
+ if (!serverBase || !token || !userId) return [];
298
+ const membershipsResponse = await fetch(
299
+ `${normalizeServerOrigin(serverBase)}/rpc/getUserSpaceMemberships`,
300
+ {
301
+ method: "POST",
302
+ headers: {
303
+ "Content-Type": "application/json",
304
+ ...authHeaders(token)
305
+ },
306
+ body: JSON.stringify({ userId })
307
+ }
308
+ ).catch(() => null);
309
+ if (!membershipsResponse?.ok) return [];
310
+ const memberships = await membershipsResponse.json().catch(() => []);
311
+ if (!Array.isArray(memberships)) return [];
312
+ const candidates = [];
313
+ for (const membership of memberships) {
314
+ const spaceId = asTrimmedString(membership?.spaceId);
315
+ if (!spaceId) continue;
316
+ const space = await readRemoteRecord({
317
+ serverBase,
318
+ token,
319
+ dbKey: createSpaceKey.space(spaceId)
320
+ });
321
+ if (!space) continue;
322
+ candidates.push(...collectSkillCandidatesFromSpace(space));
323
+ }
324
+ return candidates;
325
+ }
326
+ var resolveCurrentAgentKeyForSkillGate = (thunkApi) => {
327
+ try {
328
+ const state = thunkApi?.getState?.();
329
+ if (!state) return null;
330
+ const currentDialogKey = getActiveDialogKey();
331
+ if (!currentDialogKey) return null;
332
+ const dialogConfig = selectById(
333
+ state,
334
+ currentDialogKey
335
+ );
336
+ return asTrimmedNonEmptyStringArray(dialogConfig?.cybots)[0] ?? null;
337
+ } catch {
338
+ return null;
339
+ }
340
+ };
341
+ var readCurrentAgentSkillSource = async (thunkApi) => {
342
+ const agentKey = resolveCurrentAgentKeyForSkillGate(thunkApi);
343
+ if (!agentKey) return null;
344
+ const db = thunkApi?.extra?.db;
345
+ if (!db) return null;
346
+ try {
347
+ const agent = await db.get(agentKey);
348
+ if (!agent || typeof agent !== "object") return null;
349
+ return agent;
350
+ } catch {
351
+ return null;
352
+ }
353
+ };
354
+ async function loadSkillFunc(args, thunkApi, context) {
355
+ const hasArg = (key) => Object.prototype.hasOwnProperty.call(args ?? {}, key);
356
+ const exact = ["source", "dbKey", "slug", "projectBinding", "relativePath"].some(hasArg);
357
+ const source = args?.source;
358
+ if (exact) {
359
+ const validSpace = source === "space" && typeof args.dbKey === "string" && !!args.dbKey.trim() && !hasArg("slug") && !hasArg("projectBinding") && !hasArg("relativePath");
360
+ const validBuiltin = source === "builtin" && typeof args.slug === "string" && !!args.slug.trim() && !hasArg("dbKey") && !hasArg("projectBinding") && !hasArg("relativePath");
361
+ if (hasArg("name") || !validSpace && !validBuiltin) {
362
+ throw new Error(source === "project" ? "loadSkill: source=project is not supported by the Web client." : "loadSkill: use name, source=space + dbKey, or source=builtin + slug exclusively.");
363
+ }
364
+ }
365
+ let requestedName = asTrimmedString(exact ? source === "space" ? args.dbKey : args.slug : args?.name);
366
+ if (!requestedName) throw new Error("loadSkill \u9700\u8981\u63D0\u4F9B name\u3002");
367
+ const candidates = await listSkillCandidates(thunkApi);
368
+ let resolution;
369
+ if (!exact) {
370
+ resolution = resolveWebSkill(candidates, requestedName);
371
+ } else if (source === "space") {
372
+ const candidate = candidates.find((entry) => entry.dbKey === requestedName);
373
+ resolution = candidate ? { kind: "space", candidate } : null;
374
+ } else {
375
+ const entry = listBuiltinSkills().find((entry2) => entry2.slug === requestedName);
376
+ resolution = entry ? { kind: "builtin", entry } : null;
377
+ }
378
+ const matched = resolution?.kind === "space" ? resolution.candidate : void 0;
379
+ if (exact && matched) requestedName = matched.name;
380
+ const builtinEntry = resolution?.kind === "builtin" ? resolution.entry : null;
381
+ const resolvedSlug = builtinEntry?.slug ?? matched?.skillId ?? null;
382
+ if (resolvedSlug) {
383
+ const agentSkillSource = await readCurrentAgentSkillSource(thunkApi);
384
+ if (agentSkillSource && isAgentSkillDisabled(agentSkillSource, resolvedSlug)) {
385
+ return {
386
+ rawData: {
387
+ success: false,
388
+ name: requestedName,
389
+ slug: resolvedSlug,
390
+ disabled: true
391
+ },
392
+ displayData: `Skill "${requestedName}" \u5DF2\u88AB\u7981\u7528\uFF1A\u8BE5\u80FD\u529B\u5728\u6B64 agent \u4E0A\u4E0D\u53EF\u7528\uFF0C\u65E0\u6CD5\u52A0\u8F7D\u3002`
393
+ };
394
+ }
395
+ }
396
+ if (builtinEntry) {
397
+ const body2 = builtinEntry.content;
398
+ const dbKey = builtinEntry.slug;
399
+ if (context?.skipSkillReferencePersist !== true) {
400
+ await persistLoadedSkillReference(thunkApi, dbKey, requestedName);
401
+ }
402
+ return {
403
+ rawData: {
404
+ success: true,
405
+ name: requestedName,
406
+ dbKey,
407
+ body: body2
408
+ },
409
+ displayData: `Skill "${requestedName}" loaded inline. Follow its instructions.
410
+
411
+ ${body2}`
412
+ };
413
+ }
414
+ if (!matched) {
415
+ const availableNames = listWebSkillNames(candidates);
416
+ const availableText = availableNames.length ? availableNames.join(", ") : "(none)";
417
+ return {
418
+ rawData: {
419
+ success: false,
420
+ name: requestedName,
421
+ availableSkills: availableNames
422
+ },
423
+ displayData: `Skill "${requestedName}" not found. Available skills: ${availableText}`
424
+ };
425
+ }
426
+ const runtime = getRuntime(thunkApi);
427
+ const page = await readRemoteRecord({
428
+ serverBase: runtime?.currentServer,
429
+ token: runtime?.currentToken,
430
+ dbKey: matched.dbKey
431
+ });
432
+ if (exact && !page) {
433
+ return {
434
+ rawData: { success: false, name: requestedName, dbKey: matched.dbKey },
435
+ displayData: `Skill "${requestedName}" could not be read.`
436
+ };
437
+ }
438
+ const body = extractSkillBody(page);
439
+ if (context?.skipSkillReferencePersist !== true) {
440
+ await persistLoadedSkillReference(thunkApi, matched.dbKey, requestedName);
441
+ }
442
+ return {
443
+ rawData: {
444
+ success: true,
445
+ name: requestedName,
446
+ dbKey: matched.dbKey,
447
+ body
448
+ },
449
+ displayData: `Skill "${requestedName}" loaded inline. Follow its instructions.
450
+
451
+ ${body}`
452
+ };
453
+ }
454
+ async function persistLoadedSkillReference(thunkApi, dbKey, name) {
455
+ try {
456
+ const state = thunkApi?.getState?.();
457
+ const currentDialogKey = getActiveDialogKey();
458
+ if (!state || !currentDialogKey) return;
459
+ const dialogConfig = selectById(
460
+ state,
461
+ currentDialogKey
462
+ );
463
+ const existing = dialogConfig?.extraReferences ?? [];
464
+ const alreadyMounted = existing.some((ref) => ref.dbKey === dbKey);
465
+ if (alreadyMounted) return;
466
+ const newRef = {
467
+ dbKey,
468
+ title: name,
469
+ type: "instruction"
470
+ };
471
+ await setDialogExtraReferencesAction([...existing, newRef], thunkApi);
472
+ } catch {
473
+ }
474
+ }
475
+
149
476
  // packages/ai/tools/uiCardSchema.ts
150
477
  var UI_CARD_VERSION = 1;
151
478
  var MAX_BLOCKS = 32;
@@ -155,7 +482,7 @@ var UI_CARD_ENVELOPE_MAX_BYTES = UI_CARD_MAX_BYTES + 4096;
155
482
  var MAX_COLLECTION_ITEMS = 500;
156
483
  var MAX_JSON_DEPTH = 12;
157
484
  var MAX_JSON_NODES = 2e3;
158
- function isRecord(value) {
485
+ function isRecord2(value) {
159
486
  return value !== null && typeof value === "object" && !Array.isArray(value);
160
487
  }
161
488
  function hasOnlyKeys(value, allowed) {
@@ -174,7 +501,7 @@ function isJsonValue(value, depth, budget) {
174
501
  if (typeof value === "string") return isText(value);
175
502
  if (typeof value === "number") return Number.isFinite(value);
176
503
  if (Array.isArray(value)) return value.every((item) => isJsonValue(item, depth + 1, budget));
177
- if (!isRecord(value)) return false;
504
+ if (!isRecord2(value)) return false;
178
505
  for (const [key, item] of Object.entries(value)) {
179
506
  if (["$ref", "$expr", "expression", "script"].includes(key)) return false;
180
507
  if (!isText(key) || !isJsonValue(item, depth + 1, budget)) return false;
@@ -182,7 +509,7 @@ function isJsonValue(value, depth, budget) {
182
509
  return true;
183
510
  }
184
511
  function isChoiceQuestion(value) {
185
- if (!isRecord(value) || !hasOnlyKeys(value, ["id", "header", "question", "choices", "multiSelect", "allowOther", "required"])) return false;
512
+ if (!isRecord2(value) || !hasOnlyKeys(value, ["id", "header", "question", "choices", "multiSelect", "allowOther", "required"])) return false;
186
513
  if (!isText(value.id) || !value.id.trim() || !isText(value.question) || !value.question.trim()) return false;
187
514
  if (value.header !== void 0 && !isText(value.header)) return false;
188
515
  for (const flag of ["multiSelect", "allowOther", "required"]) {
@@ -191,7 +518,7 @@ function isChoiceQuestion(value) {
191
518
  if (!Array.isArray(value.choices) || value.choices.length === 0 || value.choices.length > MAX_COLLECTION_ITEMS) return false;
192
519
  const ids = /* @__PURE__ */ new Set();
193
520
  for (const option of value.choices) {
194
- if (!isRecord(option) || !hasOnlyKeys(option, ["id", "label", "detail", "recommended", "userMessage"])) return false;
521
+ if (!isRecord2(option) || !hasOnlyKeys(option, ["id", "label", "detail", "recommended", "userMessage"])) return false;
195
522
  if (!isText(option.label) || !option.label.trim()) return false;
196
523
  if (option.id !== void 0) {
197
524
  if (!isText(option.id) || !option.id.trim() || ids.has(option.id)) return false;
@@ -214,7 +541,7 @@ function isAppUrl(value) {
214
541
  }
215
542
  }
216
543
  function isBlock(value) {
217
- if (!isRecord(value) || typeof value.type !== "string") return false;
544
+ if (!isRecord2(value) || typeof value.type !== "string") return false;
218
545
  switch (value.type) {
219
546
  case "text":
220
547
  return hasOnlyKeys(value, ["type", "text"]) && isText(value.text);
@@ -230,11 +557,11 @@ function isBlock(value) {
230
557
  case "choice":
231
558
  return hasOnlyKeys(value, ["type", "question"]) && isChoiceQuestion(value.question);
232
559
  case "action": {
233
- if (!isRecord(value.action) || typeof value.action.type !== "string") return false;
560
+ if (!isRecord2(value.action) || typeof value.action.type !== "string") return false;
234
561
  if (value.action.type === "submit") {
235
562
  if (!hasOnlyKeys(value, ["type", "action"]) || !hasOnlyKeys(value.action, ["type", "payload"])) return false;
236
563
  if (value.action.payload === void 0) return true;
237
- return isRecord(value.action.payload) && isJsonValue(value.action.payload, 0, { nodes: 0 });
564
+ return isRecord2(value.action.payload) && isJsonValue(value.action.payload, 0, { nodes: 0 });
238
565
  }
239
566
  if (value.action.type === "openApp") {
240
567
  return hasOnlyKeys(value, ["type", "action"]) && hasOnlyKeys(value.action, ["type", "appId", "url"]) && isText(value.action.appId) && !!value.action.appId.trim() && (value.action.url === void 0 || isText(value.action.url) && isAppUrl(value.action.url));
@@ -246,7 +573,7 @@ function isBlock(value) {
246
573
  }
247
574
  }
248
575
  function parseUiCard(input) {
249
- if (!isRecord(input) || !hasOnlyKeys(input, ["id", "version", "source", "blocks"])) return { ok: false, error: "invalid card shape" };
576
+ if (!isRecord2(input) || !hasOnlyKeys(input, ["id", "version", "source", "blocks"])) return { ok: false, error: "invalid card shape" };
250
577
  if (typeof input.id !== "string" || !/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/.test(input.id)) return { ok: false, error: "invalid card id" };
251
578
  if (input.version !== UI_CARD_VERSION || input.source !== "tool") return { ok: false, error: "unsupported card version or source" };
252
579
  if (!Array.isArray(input.blocks) || input.blocks.length > MAX_BLOCKS || !input.blocks.every(isBlock)) return { ok: false, error: "invalid blocks" };
@@ -278,71 +605,6 @@ ${block.question.choices.map((item) => `- ${item.label}${item.detail ? ` \u2014
278
605
  }).join("\n\n");
279
606
  }
280
607
 
281
- // packages/ai/tools/agentSkillConfig.ts
282
- var MODES = [
283
- "required",
284
- "recommended",
285
- "disabled"
286
- ];
287
- var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
288
- "worktree-isolation",
289
- "systematic-investigation",
290
- "show-me",
291
- // 凭据管理:仓库已有 nolo secret(set/list/run/bind),但技能发现只扫
292
- // `.agents/skills`,内置的 secrets-manager 不会出现在"可用技能"里。放进默认
293
- // 提示名单让它至少以一行提示出现(不授工具、不放宽权限)。
294
- "secrets-manager"
295
- ];
296
- var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
297
- var resolveAgentSkillConfig = (source) => {
298
- const out = {};
299
- const skills = source?.skills;
300
- if (skills && typeof skills === "object" && !Array.isArray(skills)) {
301
- for (const [rawSlug, rawMode] of Object.entries(skills)) {
302
- const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
303
- const mode = asMode(rawMode);
304
- if (slug && mode) out[slug] = mode;
305
- }
306
- return out;
307
- }
308
- for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
309
- out[slug] = "required";
310
- }
311
- return out;
312
- };
313
- var resolveAgentRequiredPackIds = (source) => {
314
- const config = resolveAgentSkillConfig(source);
315
- return Object.keys(config).filter((slug) => config[slug] === "required");
316
- };
317
- var resolveAgentRecommendedSkillNames = (source, lookup) => {
318
- const config = resolveAgentSkillConfig(source);
319
- const resolve = lookup ?? defaultSkillTitleLookup;
320
- const seen = /* @__PURE__ */ new Set();
321
- const out = [];
322
- const push = (slug) => {
323
- const title = resolve(slug)?.title || slug;
324
- if (seen.has(title)) return;
325
- seen.add(title);
326
- out.push(title);
327
- };
328
- for (const slug of Object.keys(config)) {
329
- if (config[slug] !== "recommended") continue;
330
- push(slug);
331
- }
332
- for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
333
- if (Object.hasOwn(config, slug)) continue;
334
- push(slug);
335
- }
336
- return out;
337
- };
338
- var defaultSkillTitleLookup = (slug) => {
339
- const cap = resolveBuiltinCapability(slug);
340
- if (cap) return { title: cap.title };
341
- const skill = resolveBuiltinSkillEntry(slug);
342
- return skill ? { title: skill.title } : null;
343
- };
344
- var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
345
-
346
608
  // packages/core/clipMultilineText.ts
347
609
  function clipMultilineText(value, max) {
348
610
  const trimmed = value.trim();
@@ -521,7 +783,7 @@ var executeToolRun = createAsyncThunk(
521
783
  if (!executionInput) {
522
784
  throw new Error(`ToolRun ${id} has no input to execute with.`);
523
785
  }
524
- const { findToolExecutor } = await import("./tools-626VXEY7.js");
786
+ const { findToolExecutor } = await import("./tools-GAAYAIEW.js");
525
787
  const { executor } = findToolExecutor(run.toolName);
526
788
  toolRunStarted({
527
789
  id: run.id,
@@ -545,7 +807,7 @@ var executeToolRun = createAsyncThunk(
545
807
  const latestState = thunkApi.getState();
546
808
  const userId = selectIdentityUserId(latestState);
547
809
  if (userId) {
548
- const { fetchUserSpaceMemberships } = await import("./memberThunks-ZAE52VIP.js");
810
+ const { fetchUserSpaceMemberships } = await import("./memberThunks-WT2KVRP4.js");
549
811
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
550
812
  }
551
813
  }
@@ -573,9 +835,6 @@ export {
573
835
  uiCardFallback,
574
836
  createSSEParser,
575
837
  waitForAbortableDelay,
576
- resolveAgentRequiredPackIds,
577
- resolveAgentRecommendedSkillNames,
578
- isAgentSkillDisabled,
579
838
  clipMultilineText,
580
839
  fetchAndSerializeTable,
581
840
  selectMaxExecutionTime,
@@ -593,5 +852,7 @@ export {
593
852
  toolRunSucceeded,
594
853
  toolRunUpdated,
595
854
  toolRunFailed,
596
- getAllToolRuns
855
+ getAllToolRuns,
856
+ loadSkillFunctionSchema,
857
+ loadSkillFunc
597
858
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSelector
3
- } from "./chunk-WRCZXJ4N.js";
3
+ } from "./chunk-X4F26D5K.js";
4
4
  import {
5
5
  getAllServers,
6
6
  getIsDesktopApp
@@ -3,7 +3,7 @@ import {
3
3
  classifyAgentApiKeyRef,
4
4
  formatUnsupportedAgentApiKeyRefMessage,
5
5
  shouldReadAgentKeyRemotely
6
- } from "./chunk-RJ3EYB5G.js";
6
+ } from "./chunk-PRIROPK4.js";
7
7
  import {
8
8
  resolveCliAgentKeyInput
9
9
  } from "./chunk-NBTY7YJF.js";
@@ -41,6 +41,8 @@ var PROVIDER_COPY_FIELDS = [
41
41
  "model",
42
42
  "customProviderUrl",
43
43
  "apiKey",
44
+ "apiKeyRef",
45
+ "apiKeyHeader",
44
46
  "useServerProxy",
45
47
  "inputPrice",
46
48
  "outputPrice"
@@ -556,7 +558,7 @@ async function buildCreatedAgentRecord(args) {
556
558
  const resolvedAgentInput = resolveCliAgentKeyInput(args.parsed.agentInput);
557
559
  const agentKey = resolvedAgentInput.startsWith("agent-") ? resolvedAgentInput : createAgentKey.private(userId || "local", resolvedAgentInput);
558
560
  if (args.parsed.presetId) {
559
- const { resolveProviderPresetFields } = await import("./providerPresetApply-JGNMO2KX.js");
561
+ const { resolveProviderPresetFields } = await import("./providerPresetApply-ISA35424.js");
560
562
  const fields = resolveProviderPresetFields(args.parsed.presetId);
561
563
  if (fields.kind === "manual") {
562
564
  throw new Error(
@@ -593,7 +595,7 @@ async function buildCreatedAgentRecord(args) {
593
595
  throw new Error(`provider source agent not found: ${args.parsed.copyProviderFrom}`);
594
596
  }
595
597
  for (const field of PROVIDER_COPY_FIELDS) {
596
- if (field in providerSource.record) {
598
+ if (field in providerSource.record && !(field in args.parsed.updates)) {
597
599
  args.parsed.updates[field] = providerSource.record[field];
598
600
  }
599
601
  }
@@ -612,6 +614,9 @@ async function buildCreatedAgentRecord(args) {
612
614
  }
613
615
  args.parsed.updates.prompt = promptBody;
614
616
  }
617
+ if (args.parsed.updates.customProviderUrl && !args.parsed.updates.apiSource) {
618
+ args.parsed.updates.apiSource = "custom";
619
+ }
615
620
  const nextRecord = {
616
621
  ...args.parsed.updates,
617
622
  dbKey: agentKey,
@@ -662,7 +667,7 @@ async function buildUpdatedAgentRecord(args) {
662
667
  throw new Error(`provider source agent not found: ${args.parsed.copyProviderFrom}`);
663
668
  }
664
669
  for (const field of PROVIDER_COPY_FIELDS) {
665
- if (field in providerSource.record) {
670
+ if (field in providerSource.record && !(field in args.parsed.updates)) {
666
671
  args.parsed.updates[field] = providerSource.record[field];
667
672
  }
668
673
  }
@@ -684,6 +689,7 @@ async function buildUpdatedAgentRecord(args) {
684
689
  const nextRecord = {
685
690
  ...currentRecord,
686
691
  ...args.parsed.updates,
692
+ ...args.parsed.updates.customProviderUrl && !args.parsed.updates.apiSource ? { apiSource: "custom" } : {},
687
693
  updatedAt: Date.now()
688
694
  };
689
695
  return {
@@ -2,7 +2,7 @@ import {
2
2
  clipMultilineText,
3
3
  fetchAndSerializeTable,
4
4
  waitForAbortableDelay
5
- } from "./chunk-3NPXGNSK.js";
5
+ } from "./chunk-HVXL4VOO.js";
6
6
  import {
7
7
  isGatewayHttpStatus
8
8
  } from "./chunk-NF64D32W.js";
@@ -15,27 +15,27 @@ import {
15
15
  import {
16
16
  resolvePageReadMarkdown,
17
17
  slateToSimplifiedMarkdown
18
- } from "./chunk-YIRADHSY.js";
18
+ } from "./chunk-WYKMOZTW.js";
19
19
  import {
20
20
  extractCategorizedMentions
21
21
  } from "./chunk-AGIM7IMJ.js";
22
22
  import {
23
23
  fetchAndCacheMessages
24
- } from "./chunk-YE6A72XL.js";
24
+ } from "./chunk-JI5MQU5B.js";
25
25
  import {
26
26
  createSpaceKey
27
27
  } from "./chunk-UAD2WT54.js";
28
28
  import {
29
29
  read
30
- } from "./chunk-B2N5GZBU.js";
30
+ } from "./chunk-OHYCQKPW.js";
31
31
  import {
32
32
  getRuntimeServerContext
33
- } from "./chunk-7UODCAWW.js";
33
+ } from "./chunk-32GANJHJ.js";
34
34
  import {
35
35
  extractRuntimePageCapabilities,
36
36
  resolveBuiltinSkillPage,
37
37
  resolveSkillGraphFromRoots
38
- } from "./chunk-5HAPEKNH.js";
38
+ } from "./chunk-LFJRTOUV.js";
39
39
  import {
40
40
  isAbortError
41
41
  } from "./chunk-7DPNBQSV.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  listUserRecordsFromServers,
3
3
  readLiveDbRecordAfterTombstoneMerge
4
- } from "./chunk-5DPVRMSY.js";
4
+ } from "./chunk-RBJASUX4.js";
5
5
  import {
6
6
  agentRecordHasConfiguredCredential
7
- } from "./chunk-GYVLAHA4.js";
7
+ } from "./chunk-IY7DGZSY.js";
8
8
  import {
9
9
  deriveCredentialGroup
10
- } from "./chunk-53RSTB7T.js";
10
+ } from "./chunk-7TMVGMM3.js";
11
11
  import {
12
12
  isTombstoneRecord
13
13
  } from "./chunk-D2MDMY2M.js";