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,9 @@
1
1
  import {
2
+ CORE_DRAIN_REASON,
2
3
  isGatewayHttpStatus,
3
4
  normalizeNonNegativeMs,
4
5
  parseRetryAfterHeaderMs
5
- } from "./chunk-GAKEBQD6.js";
6
+ } from "./chunk-D6OQHXVG.js";
6
7
  import {
7
8
  getUserDataItemTimestamp,
8
9
  mergeAndDedupUserData
@@ -13,7 +14,7 @@ import {
13
14
  readPageFunc,
14
15
  readPageFunctionSchema,
15
16
  slateToSimplifiedMarkdown
16
- } from "./chunk-AS4PVWA4.js";
17
+ } from "./chunk-QNMFBBZK.js";
17
18
  import {
18
19
  markdownToSlate
19
20
  } from "./chunk-3LY4F7SV.js";
@@ -23,12 +24,15 @@ import {
23
24
  import {
24
25
  slateToRenderMarkdown
25
26
  } from "./chunk-63W5N6P3.js";
27
+ import {
28
+ isSkillSummaryMarker
29
+ } from "./chunk-VF4K2QE6.js";
26
30
  import {
27
31
  createDocState
28
- } from "./chunk-YIHFXH5Q.js";
32
+ } from "./chunk-XYZA7S7V.js";
29
33
  import {
30
34
  createDialogAction
31
- } from "./chunk-HJGEVL7C.js";
35
+ } from "./chunk-E4HNJSHC.js";
32
36
  import {
33
37
  buildSkillDocMarkdown,
34
38
  normalizeSkillBudgetTier,
@@ -37,7 +41,7 @@ import {
37
41
  parseExternalSkillMarkdown,
38
42
  parseSkillDocProtocol,
39
43
  resolvePageSkillMetadata
40
- } from "./chunk-ZQ2UM4KG.js";
44
+ } from "./chunk-VC6OZXO5.js";
41
45
  import {
42
46
  addCategory,
43
47
  addContentToSpace,
@@ -68,20 +72,38 @@ import {
68
72
  updateContentCategory,
69
73
  updateContentTitle,
70
74
  updateStep
71
- } from "./chunk-PIVFPOW6.js";
75
+ } from "./chunk-5MOUAAMK.js";
72
76
  import {
73
77
  createAgent,
74
78
  runLlm,
75
79
  streamAgentChatTurn,
76
80
  updateAgent
77
- } from "./chunk-I5URP43I.js";
81
+ } from "./chunk-Q3UKJVU4.js";
82
+ import {
83
+ shareResourceAction
84
+ } from "./chunk-MQI77IRB.js";
85
+ import {
86
+ AGENT_UPDATE_FIELD_NAMES,
87
+ normalizeAgentUpdateFieldList,
88
+ selectAutoApproveSelfUpdateFields,
89
+ selectCurrentServer,
90
+ selectSyncServers
91
+ } from "./chunk-3NSIQZZ6.js";
78
92
  import {
79
93
  addContentAction
80
- } from "./chunk-5JGGZCZL.js";
94
+ } from "./chunk-7D3JY6C2.js";
81
95
  import {
82
96
  createSpaceKey,
83
97
  normalizeSpaceId
84
98
  } from "./chunk-UAD2WT54.js";
99
+ import {
100
+ patch,
101
+ read,
102
+ readAndWait,
103
+ readAndWaitAction,
104
+ toTimestampMs,
105
+ write
106
+ } from "./chunk-O26GI2JP.js";
85
107
  import {
86
108
  NOLO_WORKSPACE_TOOL_NAMES,
87
109
  buildNoloSubjectRefQueryTarget,
@@ -97,51 +119,10 @@ import {
97
119
  redactAgentRecordForWorkspaceTool,
98
120
  resolveNoloDialogInput,
99
121
  verifyNoloDialogSubjectRefQuery
100
- } from "./chunk-AUQ747NZ.js";
122
+ } from "./chunk-4SOKXIW4.js";
101
123
  import {
102
124
  DEFAULT_MODEL
103
125
  } from "./chunk-BBYVOSU2.js";
104
- import {
105
- ToolApiError,
106
- buildToolRequestHeaders,
107
- callToolApi,
108
- getRequestConfig,
109
- getToolBaseUrl,
110
- getToolRequestContext
111
- } from "./chunk-5MIDPSSK.js";
112
- import {
113
- extractCustomId
114
- } from "./chunk-DFFIZ25G.js";
115
- import {
116
- getActiveDialogKey,
117
- require_react,
118
- selectCurrentDialogKey,
119
- selectPendingRawDataByPageKey
120
- } from "./chunk-3ASDTTEI.js";
121
- import {
122
- compactWhitespace
123
- } from "./chunk-DWLEOOGR.js";
124
- import {
125
- toErrorMessage
126
- } from "./chunk-HNMXYYJR.js";
127
- import {
128
- shareResourceAction
129
- } from "./chunk-KBKYAONQ.js";
130
- import {
131
- AGENT_UPDATE_FIELD_NAMES,
132
- normalizeAgentUpdateFieldList,
133
- selectAutoApproveSelfUpdateFields,
134
- selectCurrentServer,
135
- selectSyncServers
136
- } from "./chunk-4SIMLBEU.js";
137
- import {
138
- patch,
139
- read,
140
- readAndWait,
141
- readAndWaitAction,
142
- toTimestampMs,
143
- write
144
- } from "./chunk-BE2OOJ5P.js";
145
126
  import {
146
127
  asRecordOrEmpty
147
128
  } from "./chunk-KX6YBIHG.js";
@@ -164,12 +145,35 @@ import {
164
145
  import {
165
146
  asOptionalFiniteNumber
166
147
  } from "./chunk-WWC7I6TA.js";
148
+ import {
149
+ ToolApiError,
150
+ buildToolRequestHeaders,
151
+ callToolApi,
152
+ getRequestConfig,
153
+ getToolBaseUrl,
154
+ getToolRequestContext
155
+ } from "./chunk-JK7VW2FN.js";
156
+ import {
157
+ extractCustomId
158
+ } from "./chunk-DFFIZ25G.js";
159
+ import {
160
+ getActiveDialogKey,
161
+ require_react,
162
+ selectCurrentDialogKey,
163
+ selectPendingRawDataByPageKey
164
+ } from "./chunk-3ASDTTEI.js";
167
165
  import {
168
166
  asTrimmedLowercaseString
169
167
  } from "./chunk-QSJ3HFEF.js";
168
+ import {
169
+ compactWhitespace
170
+ } from "./chunk-DWLEOOGR.js";
171
+ import {
172
+ toErrorMessage
173
+ } from "./chunk-HNMXYYJR.js";
170
174
  import {
171
175
  readAction
172
- } from "./chunk-DSZUWUYB.js";
176
+ } from "./chunk-XFOLQLDN.js";
173
177
  import {
174
178
  createAsyncThunk,
175
179
  getRuntimeServerContext,
@@ -177,28 +181,28 @@ import {
177
181
  selectIdentityToken,
178
182
  selectIdentityUserId,
179
183
  selectRuntimeSnapshot
180
- } from "./chunk-UTLZINAP.js";
184
+ } from "./chunk-OOM6SJNR.js";
181
185
  import {
182
186
  isAbortError
183
187
  } from "./chunk-OOSFSFMA.js";
188
+ import {
189
+ asTrimmedString
190
+ } from "./chunk-3EUW3WEO.js";
191
+ import {
192
+ isRecord
193
+ } from "./chunk-KUG52IAP.js";
184
194
  import {
185
195
  DEFAULT_LOCAL_API_ORIGIN
186
196
  } from "./chunk-4SN6J65J.js";
187
197
  import {
188
198
  API_ENDPOINTS
189
199
  } from "./chunk-LCBAMY2M.js";
190
- import {
191
- asTrimmedString
192
- } from "./chunk-3EUW3WEO.js";
193
200
  import {
194
201
  normalizeServerOrigin
195
202
  } from "./chunk-CF7PE763.js";
196
203
  import {
197
204
  asOptionalTrimmedString
198
205
  } from "./chunk-G3SUCT4W.js";
199
- import {
200
- isRecord
201
- } from "./chunk-KUG52IAP.js";
202
206
  import {
203
207
  __toESM
204
208
  } from "./chunk-4VNS5WPM.js";
@@ -2228,6 +2232,7 @@ var chat_locale_default = {
2228
2232
  execShell: "Run command",
2229
2233
  listAgents: "List agents",
2230
2234
  readAgent: "Read agent",
2235
+ loadSkill: "Load skill",
2231
2236
  callAgent: "Call agent"
2232
2237
  },
2233
2238
  gemini: {
@@ -2552,6 +2557,7 @@ var chat_locale_default = {
2552
2557
  execShell: "\u8FD0\u884C\u547D\u4EE4",
2553
2558
  listAgents: "\u5217\u51FA\u52A9\u624B",
2554
2559
  readAgent: "\u8BFB\u53D6\u52A9\u624B",
2560
+ loadSkill: "\u52A0\u8F7D\u6280\u80FD",
2555
2561
  callAgent: "\u8C03\u7528\u52A9\u624B"
2556
2562
  },
2557
2563
  gemini: {
@@ -2866,6 +2872,7 @@ var chat_locale_default = {
2866
2872
  execShell: "\u57F7\u884C\u547D\u4EE4",
2867
2873
  listAgents: "\u5217\u51FA\u52A9\u624B",
2868
2874
  readAgent: "\u8B80\u53D6\u52A9\u624B",
2875
+ loadSkill: "\u8F09\u5165\u6280\u80FD",
2869
2876
  callAgent: "\u547C\u53EB\u52A9\u624B"
2870
2877
  },
2871
2878
  gemini: {
@@ -3124,6 +3131,7 @@ var chat_locale_default = {
3124
3131
  execShell: "\u30B3\u30DE\u30F3\u30C9\u5B9F\u884C",
3125
3132
  listAgents: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u4E00\u89A7",
3126
3133
  readAgent: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u8AAD\u307F\u53D6\u308A",
3134
+ loadSkill: "\u30B9\u30AD\u30EB\u3092\u8AAD\u307F\u8FBC\u307F",
3127
3135
  callAgent: "\u30A8\u30FC\u30B8\u30A7\u30F3\u30C8\u547C\u3073\u51FA\u3057"
3128
3136
  },
3129
3137
  gemini: {
@@ -10969,10 +10977,90 @@ var CAPABILITY_PACKS = [
10969
10977
  {
10970
10978
  id: "agent-orchestration",
10971
10979
  label: "\u591A agent \u7F16\u6392",
10972
- description: "\u540E\u53F0\u542F\u52A8\u5176\u4ED6 agent \u6267\u884C\u5B50\u4EFB\u52A1\uFF0C\u5E76\u89C2\u5BDF\u3001\u67E5\u8BE2\u3001\u505C\u6B62\u8FD0\u884C\u4E2D\u7684 agent run\u2014\u2014\u9002\u5408\u5E76\u884C\u6D3E\u53D1\u3001\u957F\u4EFB\u52A1\u8DDF\u8E2A\u3001\u4E2D\u9014\u53EB\u505C\u7B49\u7F16\u6392\u573A\u666F\u3002",
10973
- tools: ["startAgentRun", "controlAgentRun"],
10974
- defaultEnabled: false,
10980
+ description: "\u5148\u6309\u6536\u85CF\u3001\u7B80\u4ECB\u3001\u80FD\u529B\u548C\u6210\u672C\u5217\u51FA\u5B89\u5168 agent \u6458\u8981\uFF0C\u6309\u9700\u8BFB\u53D6\u5019\u9009\u914D\u7F6E\u89E3\u6790\u53EF\u8FD0\u884C key\uFF0C\u518D\u540E\u53F0\u542F\u52A8\u5176\u4ED6 agent \u6267\u884C\u5B50\u4EFB\u52A1\uFF0C\u5E76\u89C2\u5BDF\u3001\u67E5\u8BE2\u3001\u505C\u6B62\u8FD0\u884C\u4E2D\u7684 agent run\u2014\u2014\u9002\u5408\u5E76\u884C\u6D3E\u53D1\u3001\u957F\u4EFB\u52A1\u8DDF\u8E2A\u3001\u4E2D\u9014\u53EB\u505C\u7B49\u7F16\u6392\u573A\u666F\u3002",
10981
+ tools: ["startAgentRun", "controlAgentRun", "listAgents"],
10982
+ defaultEnabled: true,
10975
10983
  icon: "\u{1F9E9}"
10984
+ },
10985
+ {
10986
+ id: "skills",
10987
+ label: "\u6280\u80FD\u52A0\u8F7D",
10988
+ description: "\u6309\u540D\u52A0\u8F7D\u5DE5\u4F5C\u533A\u6280\u80FD\uFF08SKILL.md\uFF09\u5E76\u8BFB\u53D6\u6280\u80FD\u6587\u6863\u2014\u2014\u8BA9 agent \u5728\u9700\u8981\u65F6\u628A\u5BF9\u5E94\u6280\u80FD\u7684\u65B9\u6CD5\u8BBA\u3001\u547D\u4EE4\u548C\u6D41\u7A0B\u62C9\u8FDB\u4E0A\u4E0B\u6587\u518D\u6267\u884C\u3002",
10989
+ tools: ["loadSkill", "readSkillDoc"],
10990
+ defaultEnabled: true,
10991
+ icon: "\u{1F4DA}"
10992
+ },
10993
+ {
10994
+ id: "app-builder",
10995
+ label: "\u5E94\u7528\u6784\u5EFA",
10996
+ description: "\u6784\u5EFA/\u4FEE\u6539/\u53D1\u5E03 Web \u5E94\u7528\uFF1A\u8BFB\u53D6\u5E94\u7528\u6E90\u7801\u3001\u5B9A\u70B9\u4FEE\u6539\u3001\u9884\u68C0\u3001\u90E8\u7F72\uFF0C\u65E0\u9700\u7F16\u7A0B\u7ECF\u9A8C\u3002",
10997
+ tools: [
10998
+ "appRead",
10999
+ "appFileList",
11000
+ "appFileSearch",
11001
+ "appFileRead",
11002
+ "appFileReplace",
11003
+ "appFileWrite",
11004
+ "appPreflight",
11005
+ "appDeploy",
11006
+ "appList",
11007
+ "appDelete",
11008
+ "createTable",
11009
+ "addTableRow",
11010
+ "addTableRows",
11011
+ "queryTableRows",
11012
+ "updateTableRow",
11013
+ "deleteTableRow",
11014
+ "openAIGptImage"
11015
+ ],
11016
+ defaultEnabled: false,
11017
+ icon: "\u{1F5A5}",
11018
+ promptPatch: `# \u5E94\u7528\u6784\u5EFA\u80FD\u529B\u5305 \u2014 \u64CD\u4F5C\u7EAA\u5F8B
11019
+
11020
+ ## \u6548\u7387\u4F18\u5148\uFF08\u7701 token\uFF09
11021
+ - \u4E0D\u590D\u8FF0\u7528\u6237\u9700\u6C42\uFF0C\u4E0D\u89E3\u91CA\u4F60\u300C\u6253\u7B97\u600E\u4E48\u505A\u300D\uFF0C\u76F4\u63A5\u52A8\u624B\u3002\u6539\u5B8C\u53EA\u7528\u4E00\u4E24\u53E5\u8BDD\u8BF4\u6E05\u300C\u6539\u4E86\u4EC0\u4E48\u3001\u53BB\u54EA\u770B\u300D\u3002
11022
+ - \u601D\u8003\u7B80\u77ED\uFF1A\u5B9A\u4F4D\u95EE\u9898\u5373\u53EF\uFF0C\u4E0D\u505A\u957F\u7BC7\u63A8\u6F14\u3002
11023
+ - \u5C0F\u6539\u52A8\uFF08\u6539\u6587\u5B57\u3001\u989C\u8272\u3001\u95F4\u8DDD\u3001\u5706\u89D2\u3001\u5355\u4E2A\u7EC4\u4EF6\uFF09\u8D70\u6700\u77ED\u8DEF\u5F84\uFF1A\`appFileSearch\` \u6216 \`appFileRead\` \u5B9A\u4F4D \u2192 \`appFileReplace\` \u7CBE\u786E\u66FF\u6362 \u2192 \`appPreflight\` \u2192 \`appDeploy\`\u3002\u80FD\u4E00\u6B21\u547D\u4E2D\u5C31\u4E0D\u8981\u53CD\u590D\u8BFB\u6587\u4EF6\u3002
11024
+ - \u5DF2\u7ECF\u77E5\u9053\u6587\u4EF6\u548C\u4F4D\u7F6E\u65F6\uFF0C\u8DF3\u8FC7\u591A\u4F59\u7684 search/read\uFF0C\u76F4\u63A5 replace\u3002
11025
+ - \u7981\u6B62\u4E3A\u4E00\u4E2A\u5C0F\u6539\u52A8\u6574\u9875\u91CD\u5199\u6216\u8FDE\u5E26\u6539\u52A8\u672A\u547D\u4E2D\u7684\u90E8\u5206\u3002
11026
+
11027
+ ## \u5B9A\u70B9\u4FEE\u6539
11028
+ - \u5982\u679C\u4E0A\u4E0B\u6587\u91CC\u5E26\u6709\u7528\u6237\u300C\u9009\u4E2D\u7684\u5143\u7D20\u300D\uFF08cssPath / HTML \u7247\u6BB5 / \u6E90\u7801\u4F4D\u7F6E\uFF09\uFF0C\u76F4\u63A5\u636E\u6B64\u5B9A\u4F4D\uFF0C\u4E0D\u8981\u518D\u5168\u5C40\u641C\u7D22\u3002
11029
+ - \u4FEE\u6539\u6536\u655B\u5728\u547D\u4E2D\u7684\u5143\u7D20\u53CA\u5176\u6837\u5F0F\u6765\u6E90\uFF08\u7EC4\u4EF6 / \u7C7B / design token\uFF09\u3002
11030
+
11031
+ ## \u6301\u7EED\u8FED\u4EE3\u6D41\u7A0B
11032
+ - \u7528\u6237\u8981\u6539\u529F\u80FD\u6216\u6837\u5F0F\u65F6\uFF0C\u5148\u7528 appList \u627E\u5230\u76EE\u6807\u5E94\u7528\uFF0C\u518D\u7528 appRead \u5224\u65AD\u5F53\u524D\u662F\u6E90\u7801\u5DE5\u4F5C\u533A\u8FD8\u662F\u90E8\u7F72\u4EA7\u7269\uFF1B\u4E00\u65E6\u62FF\u5230 appId\uFF0C\u540E\u7EED\u90FD\u5FC5\u987B\u590D\u7528\u540C\u4E00\u4E2A appId\u3002
11033
+ - \u6BCF\u6B21\u4FEE\u6539\u540E\uFF1AappPreflight \u2192 appDeploy\uFF1BappDeploy \u5FC5\u987B\u7EE7\u7EED\u4F20\u540C\u4E00\u4E2A appId\u3002
11034
+ - \u6536\u5230 repairPlan \u5C31\u76F4\u63A5\u4FEE\uFF1A\u6309\u8FD4\u56DE issues \u5B9A\u70B9\u4FEE\u590D\u5E76\u91CD\u65B0\u9884\u68C0\uFF0C\u4E0D\u8981\u6574\u7AD9\u91CD\u5199\uFF0C\u4E5F\u4E0D\u8981\u5148\u95EE\u7528\u6237\u8981\u4E0D\u8981\u4FEE\u3002
11035
+
11036
+ ## Nolo React SSR \u7EF4\u62A4\u7EAA\u5F8B\uFF08\u5F53\u524D\u9ED8\u8BA4\u8DEF\u5F84\uFF09
11037
+ - \u65B0\u5EFA\u548C\u7EF4\u62A4\u7684\u5E94\u7528\u4F18\u5148\u8D70 Nolo React SSR\uFF08framework: "nolo-react", renderMode: "ssr"\uFF09\u3002
11038
+ - \u5F53 appRead \u8FD4\u56DE workspaceRef / sourceFiles / sourceOmitted \u65F6\uFF0C\u4E0D\u8981\u6574\u7AD9\u91CD\u5199\uFF1B\u4F7F\u7528\u53D7\u9650 workspace \u6587\u4EF6\u5DE5\u5177\uFF1AappFileList / appFileSearch / appFileRead / appFileReplace / appFileWrite\u3002
11039
+ - \u5C0F\u6539\u52A8\u5FC5\u987B\u4F18\u5148 appFileReplace\uFF1B\u53EA\u6709\u65B0\u5EFA\u6587\u4EF6\u6216\u786E\u5B9E\u9700\u8981\u6574\u6587\u4EF6\u91CD\u5199\u65F6\u624D appFileWrite\u3002
11040
+ - \u4E0D\u8981\u9759\u9ED8\u628A nolo-react \u5E94\u7528\u9000\u56DE react-spa \u6216\u5355\u6587\u4EF6 Worker\u3002
11041
+ - \u89C6\u89C9\u5FAE\u8C03\u4F18\u5148\u6539 theme / tokens / design system\uFF1B\u65E7\u5199\u6CD5\u5E94\u7528\u53EF\u5148\u505A\u6700\u5C0F token \u8FC1\u79FB\uFF0C\u518D\u6539\u89C6\u89C9\u53C2\u6570\u3002
11042
+
11043
+ ## \u8868\u5355 / \u6570\u636E\u6536\u96C6
11044
+ - \u7559\u8A00\u3001\u8054\u7CFB\u8868\u5355\u3001\u9884\u7EA6\u3001\u8BA2\u9605\u3001\u53CD\u9988\u6536\u96C6\u4F18\u5148\u7528\u8868\u5DE5\u5177\uFF0C\u4E0D\u8981\u81EA\u5DF1\u53D1\u660E JSON \u6587\u4EF6\u5B58\u50A8\u3002
11045
+ - \u516C\u5F00\u7F51\u9875\u8868\u5355\u5148 createTable\uFF0C\u5E76\u914D\u7F6E publicIntake\uFF08enabled\u3001slug\u3001allowedFields\u3001requiredFields\u3001\u53EF\u9009 honeypotField\uFF09\u3002
11046
+ - \u516C\u5F00\u8BBF\u5BA2\u63D0\u4EA4\u53EA\u80FD\u8C03\u7528 /api/table/public-submit\uFF1B\u4E0D\u8981\u628A tenantId\u3001tableId\u3001token \u5199\u8FDB\u516C\u5F00\u5E94\u7528\u4EE3\u7801\u3002
11047
+
11048
+ ## \u9879\u76EE\u7D20\u6750
11049
+ - \u9996\u9875\u63D2\u753B\u3001\u5C01\u9762\u3001\u6A2A\u5E45\u3001\u6309\u94AE\u56FE\u6807\u7B49\u89C6\u89C9\u7D20\u6750\uFF0C\u4F18\u5148 openAIGptImage\uFF0C\u518D\u63A5\u5165\u5E94\u7528\u3002
11050
+
11051
+ ## \u901A\u9053\u5F02\u5E38\u6B62\u635F
11052
+ - \u5982\u679C\u5DE5\u5177\u8FD4\u56DE HTML / \u975E JSON / transport failure / retryable=false\uFF0C\u505C\u6B62\u81EA\u52A8\u91CD\u8BD5\uFF0C\u8BF4\u660E\u662F\u5E73\u53F0\u901A\u9053\u5F02\u5E38\u3002
11053
+
11054
+ ## \u7F3A\u5C11\u6E90\u7801\u8981\u8BF4\u660E\u98CE\u9669
11055
+ - \u5982\u679C appRead \u8BFB\u51FA\u6765\u7684\u662F HTML \u58F3\u3001importmap\u3001\u538B\u7F29 bundle\uFF0C\u5FC5\u987B\u5148\u544A\u77E5\u7528\u6237\u5F53\u524D\u66F4\u50CF\u90E8\u7F72\u4EA7\u7269\u800C\u4E0D\u662F\u53EF\u7EF4\u62A4\u6E90\u7801\uFF0C\u5F97\u5230\u786E\u8BA4\u540E\u518D\u7EE7\u7EED\u5927\u6539\u3002
11056
+
11057
+ ## \u90E8\u7F72\u5E94\u7B54\u6A21\u677F
11058
+ \u90E8\u7F72\u6210\u529F\u540E\uFF1A
11059
+ "\u2705 \u4F60\u7684\u5E94\u7528\u5DF2\u7ECF\u597D\u4E86\uFF01
11060
+
11061
+ \u{1F517} \u8BBF\u95EE\u94FE\u63A5\uFF1A[URL]
11062
+
11063
+ \u8FD9\u4E2A\u5E94\u7528\u53EF\u4EE5\u5E2E\u4F60 [\u4E00\u53E5\u8BDD\u529F\u80FD\u63CF\u8FF0]\u3002\u60F3\u8981\u4FEE\u6539\u6216\u6DFB\u52A0\u529F\u80FD\uFF0C\u76F4\u63A5\u544A\u8BC9\u6211\u5C31\u884C\uFF01"`
10976
11064
  }
10977
11065
  ];
10978
11066
  var CAPABILITY_PACK_BY_ID = CAPABILITY_PACKS.reduce(
@@ -12462,6 +12550,139 @@ Imported from: ${url}` : ""
12462
12550
  });
12463
12551
  }
12464
12552
 
12553
+ // packages/ai/tools/loadSkillTool.ts
12554
+ var loadSkillFunctionSchema = {
12555
+ name: "loadSkill",
12556
+ description: [
12557
+ "\u6309\u540D\u79F0\u52A0\u8F7D\u4E00\u4E2A\u5DF2\u4FDD\u5B58\u7684 skill \u6587\u6863\uFF0C\u8FD4\u56DE\u5176\u5B8C\u6574\u6307\u4EE4\u6B63\u6587\u3002",
12558
+ "name \u4F7F\u7528 skill \u4FDD\u5B58\u65F6\u5199\u5165 skill-config \u7684 name\uFF08\u4E5F\u63A5\u53D7 skillId\uFF09\u3002",
12559
+ "\u627E\u4E0D\u5230\u5BF9\u5E94 skill \u65F6\u8FD4\u56DE\u5F53\u524D\u53EF\u7528\u7684 skill \u540D\u79F0\u5217\u8868\uFF08\u4E0D\u62A5\u9519\uFF09\u3002"
12560
+ ].join("\n"),
12561
+ parameters: {
12562
+ type: "object",
12563
+ properties: {
12564
+ name: {
12565
+ type: "string",
12566
+ description: "\u8981\u52A0\u8F7D\u7684 skill \u540D\u79F0\u3002"
12567
+ }
12568
+ },
12569
+ required: ["name"]
12570
+ }
12571
+ };
12572
+ var getRuntime = (thunkApi) => {
12573
+ const state = thunkApi?.getState?.();
12574
+ return state ? selectRuntimeSnapshot(state) : null;
12575
+ };
12576
+ var authHeaders = (token) => token ? { Authorization: `Bearer ${token}` } : {};
12577
+ async function readRemoteRecord(args) {
12578
+ const serverBase = normalizeServerOrigin(args.serverBase);
12579
+ if (!serverBase || !args.token) return null;
12580
+ const response = await fetch(
12581
+ `${serverBase}/api/v1/db/read/${encodeURIComponent(args.dbKey)}?includeDeleted=true`,
12582
+ { headers: authHeaders(args.token) }
12583
+ );
12584
+ if (!response.ok) return null;
12585
+ const payload = await response.json().catch(() => null);
12586
+ return payload?.data ?? payload;
12587
+ }
12588
+ function matchSkillCandidate(candidates, requestedName) {
12589
+ return candidates.find(
12590
+ (candidate) => candidate.name === requestedName || candidate.skillId === requestedName
12591
+ );
12592
+ }
12593
+ function collectSkillCandidatesFromSpace(space) {
12594
+ if (!space?.contents || typeof space.contents !== "object") return [];
12595
+ const candidates = [];
12596
+ for (const [entryKey, value] of Object.entries(space.contents)) {
12597
+ if (!isRecord(value)) continue;
12598
+ const skillSummary = value.skillSummary;
12599
+ if (!isSkillSummaryMarker(skillSummary)) continue;
12600
+ const name = asTrimmedString(skillSummary.name);
12601
+ if (!name) continue;
12602
+ candidates.push({
12603
+ dbKey: entryKey,
12604
+ name,
12605
+ skillId: asOptionalTrimmedString(skillSummary.skillId) ?? void 0
12606
+ });
12607
+ }
12608
+ return candidates;
12609
+ }
12610
+ function extractSkillBody(page) {
12611
+ return parseSkillDocProtocol(page?.content ?? "").content;
12612
+ }
12613
+ async function listSkillCandidates(thunkApi) {
12614
+ const runtime = getRuntime(thunkApi);
12615
+ const serverBase = runtime?.currentServer;
12616
+ const token = runtime?.currentToken;
12617
+ const userId = runtime?.currentUserId;
12618
+ if (!serverBase || !token || !userId) return [];
12619
+ const membershipsResponse = await fetch(
12620
+ `${normalizeServerOrigin(serverBase)}/rpc/getUserSpaceMemberships`,
12621
+ {
12622
+ method: "POST",
12623
+ headers: {
12624
+ "Content-Type": "application/json",
12625
+ ...authHeaders(token)
12626
+ },
12627
+ body: JSON.stringify({ userId })
12628
+ }
12629
+ ).catch(() => null);
12630
+ if (!membershipsResponse?.ok) return [];
12631
+ const memberships = await membershipsResponse.json().catch(() => []);
12632
+ if (!Array.isArray(memberships)) return [];
12633
+ const candidates = [];
12634
+ for (const membership of memberships) {
12635
+ const spaceId = asTrimmedString(membership?.spaceId);
12636
+ if (!spaceId) continue;
12637
+ const space = await readRemoteRecord({
12638
+ serverBase,
12639
+ token,
12640
+ dbKey: createSpaceKey.space(spaceId)
12641
+ });
12642
+ if (!space) continue;
12643
+ candidates.push(...collectSkillCandidatesFromSpace(space));
12644
+ }
12645
+ return candidates;
12646
+ }
12647
+ async function loadSkillFunc(args, thunkApi) {
12648
+ const requestedName = asTrimmedString(args?.name);
12649
+ if (!requestedName) throw new Error("loadSkill \u9700\u8981\u63D0\u4F9B name\u3002");
12650
+ const candidates = await listSkillCandidates(thunkApi);
12651
+ const matched = matchSkillCandidate(candidates, requestedName);
12652
+ if (!matched) {
12653
+ const availableNames = Array.from(
12654
+ new Set(candidates.map((candidate) => candidate.name))
12655
+ );
12656
+ const availableText = availableNames.length ? availableNames.join(", ") : "(none)";
12657
+ return {
12658
+ rawData: {
12659
+ success: false,
12660
+ name: requestedName,
12661
+ availableSkills: availableNames
12662
+ },
12663
+ displayData: `Skill "${requestedName}" not found. Available skills: ${availableText}`
12664
+ };
12665
+ }
12666
+ const runtime = getRuntime(thunkApi);
12667
+ const page = await readRemoteRecord({
12668
+ serverBase: runtime?.currentServer,
12669
+ token: runtime?.currentToken,
12670
+ dbKey: matched.dbKey
12671
+ });
12672
+ const body = extractSkillBody(page);
12673
+ return {
12674
+ rawData: {
12675
+ success: true,
12676
+ name: requestedName,
12677
+ dbKey: matched.dbKey,
12678
+ body
12679
+ },
12680
+ displayData: `Skill "${requestedName}" loaded inline. Follow its instructions.
12681
+
12682
+ ${body}`
12683
+ };
12684
+ }
12685
+
12465
12686
  // packages/ai/tools/category/createCategoryTool.ts
12466
12687
  var createCategoryFunctionSchema = {
12467
12688
  // 已从 'create_category' 更新为 'createCategory'
@@ -13269,18 +13490,18 @@ var jsonPreview = (value, maxLength = 1800) => {
13269
13490
  return text.length <= maxLength ? text : `${text.slice(0, maxLength)}
13270
13491
  ...(truncated)`;
13271
13492
  };
13272
- var getRuntime = (thunkApi) => {
13493
+ var getRuntime2 = (thunkApi) => {
13273
13494
  const state = thunkApi?.getState?.();
13274
13495
  return state ? selectRuntimeSnapshot(state) : null;
13275
13496
  };
13276
- var authHeaders = (token) => token ? { Authorization: `Bearer ${token}` } : {};
13277
- async function readRemoteRecord(args) {
13497
+ var authHeaders2 = (token) => token ? { Authorization: `Bearer ${token}` } : {};
13498
+ async function readRemoteRecord2(args) {
13278
13499
  const serverBase = normalizeServerOrigin(args.serverBase);
13279
13500
  if (!serverBase || !args.token) return null;
13280
13501
  const query = args.includeDeleted ? "?includeDeleted=true" : "";
13281
13502
  const response = await fetch(
13282
13503
  `${serverBase}/api/v1/db/read/${encodeURIComponent(args.dbKey)}${query}`,
13283
- { headers: authHeaders(args.token) }
13504
+ { headers: authHeaders2(args.token) }
13284
13505
  );
13285
13506
  if (!response.ok) return null;
13286
13507
  const payload = await response.json().catch(() => null);
@@ -13295,7 +13516,7 @@ async function queryRemoteUserRecords(args) {
13295
13516
  method: "POST",
13296
13517
  headers: {
13297
13518
  "Content-Type": "application/json",
13298
- ...authHeaders(args.token)
13519
+ ...authHeaders2(args.token)
13299
13520
  },
13300
13521
  body: JSON.stringify({
13301
13522
  type: args.type,
@@ -13308,7 +13529,7 @@ async function queryRemoteUserRecords(args) {
13308
13529
  return Array.isArray(payload?.data?.data) ? payload.data.data : Array.isArray(payload?.data) ? payload.data : [];
13309
13530
  }
13310
13531
  async function queryBestRecords(thunkApi, type, limit) {
13311
- const runtime = getRuntime(thunkApi);
13532
+ const runtime = getRuntime2(thunkApi);
13312
13533
  const remoteRecords = await queryRemoteUserRecords({
13313
13534
  serverBase: runtime?.currentServer,
13314
13535
  token: runtime?.currentToken,
@@ -13319,8 +13540,8 @@ async function queryBestRecords(thunkApi, type, limit) {
13319
13540
  return remoteRecords;
13320
13541
  }
13321
13542
  async function readBestRecord(thunkApi, dbKey, includeDeleted = false) {
13322
- const runtime = getRuntime(thunkApi);
13323
- return readRemoteRecord({
13543
+ const runtime = getRuntime2(thunkApi);
13544
+ return readRemoteRecord2({
13324
13545
  serverBase: runtime?.currentServer,
13325
13546
  token: runtime?.currentToken,
13326
13547
  dbKey,
@@ -13421,7 +13642,7 @@ var deleteDialogsFunctionSchema = {
13421
13642
  }
13422
13643
  };
13423
13644
  async function queryDialogsBySubjectRefFunc(args, thunkApi) {
13424
- const runtime = getRuntime(thunkApi);
13645
+ const runtime = getRuntime2(thunkApi);
13425
13646
  const target = buildNoloSubjectRefQueryTarget(args ?? {});
13426
13647
  if (!target) throw new Error("queryDialogsBySubjectRef requires rowDbKey or subjectKind plus subjectId.");
13427
13648
  const queryLimit = clampNoloPositiveInteger(args?.queryLimit, 500, 500);
@@ -13467,7 +13688,7 @@ async function queryDialogsBySubjectRefFunc(args, thunkApi) {
13467
13688
  };
13468
13689
  }
13469
13690
  async function readDialogFunc(args, thunkApi) {
13470
- const runtime = getRuntime(thunkApi);
13691
+ const runtime = getRuntime2(thunkApi);
13471
13692
  const userId = runtime?.currentUserId;
13472
13693
  if (!userId) throw new Error("readDialog requires a signed-in user.");
13473
13694
  const rawDialog = asTrimmedString(args?.dialog) || asTrimmedString(args?.dialogId) || asTrimmedString(args?.id);
@@ -13482,7 +13703,7 @@ async function readDialogFunc(args, thunkApi) {
13482
13703
  method: "POST",
13483
13704
  headers: {
13484
13705
  "Content-Type": "application/json",
13485
- ...authHeaders(runtime.currentToken)
13706
+ ...authHeaders2(runtime.currentToken)
13486
13707
  },
13487
13708
  body: JSON.stringify({ dialogId: resolved.dialogId, limit })
13488
13709
  }).catch(() => null);
@@ -13532,7 +13753,7 @@ var formatDeleteDialogsPreview = (preview) => {
13532
13753
  return lines.join("\n");
13533
13754
  };
13534
13755
  var loadDeleteDialogsPreview = async (args, thunkApi) => {
13535
- const runtime = getRuntime(thunkApi);
13756
+ const runtime = getRuntime2(thunkApi);
13536
13757
  const userId = runtime?.currentUserId;
13537
13758
  if (!userId) throw new Error("deleteDialogs requires a signed-in user.");
13538
13759
  const query = asTrimmedString(args?.query);
@@ -13578,7 +13799,7 @@ async function deleteDialogsFunc(args, thunkApi) {
13578
13799
  const deletedDialogIds = [];
13579
13800
  const deletedDialogKeys = [];
13580
13801
  const failures = [];
13581
- const { deleteDialog } = await import("./dialogSlice-PT7YBWNE.js");
13802
+ const { deleteDialog } = await import("./dialogSlice-OWROKURJ.js");
13582
13803
  for (const target of targets) {
13583
13804
  try {
13584
13805
  await thunkApi.dispatch(deleteDialog(target.dbKey)).unwrap();
@@ -13619,7 +13840,9 @@ async function listAgentsFunc(args, thunkApi) {
13619
13840
  const records = await queryBestRecords(thunkApi, "agent" /* AGENT */, limit);
13620
13841
  const agents = records.sort((left, right) => getNoloComparableUpdatedAt(right) - getNoloComparableUpdatedAt(left)).map((record) => ({
13621
13842
  id: record?.id ?? null,
13622
- privateKey: record?.dbKey ?? null,
13843
+ // 不返回 privateKey/dbKey:这是私有 workspace 工具,dbKey 属于敏感标识,
13844
+ // 避免出现在公开/分享文本(与 readAgent 的 redactAgentRecordForWorkspaceTool
13845
+ // 脱敏策略对齐)。后续读取走 readAgent(id/publicKey 已足够)。
13623
13846
  publicKey: typeof record?.id === "string" ? `agent-pub-${record.id}` : null,
13624
13847
  name: record?.name ?? "(unnamed)",
13625
13848
  model: record?.model ?? null,
@@ -13645,7 +13868,7 @@ var readAgentFunctionSchema = {
13645
13868
  }
13646
13869
  };
13647
13870
  async function readAgentFunc(args, thunkApi) {
13648
- const runtime = getRuntime(thunkApi);
13871
+ const runtime = getRuntime2(thunkApi);
13649
13872
  const userId = runtime?.currentUserId;
13650
13873
  if (!userId) throw new Error("readAgent requires a signed-in user.");
13651
13874
  const rawAgent = asTrimmedString(args?.agent) || asTrimmedString(args?.agentKey) || asTrimmedString(args?.id);
@@ -13679,14 +13902,14 @@ var listSpacesFunctionSchema = {
13679
13902
  }
13680
13903
  };
13681
13904
  async function listSpacesFunc(_args, thunkApi) {
13682
- const runtime = getRuntime(thunkApi);
13905
+ const runtime = getRuntime2(thunkApi);
13683
13906
  const serverBase = normalizeServerOrigin(runtime?.currentServer);
13684
13907
  if (serverBase && runtime?.currentToken && runtime?.currentUserId) {
13685
13908
  const response = await fetch(`${serverBase}/rpc/getUserSpaceMemberships`, {
13686
13909
  method: "POST",
13687
13910
  headers: {
13688
13911
  "Content-Type": "application/json",
13689
- ...authHeaders(runtime.currentToken)
13912
+ ...authHeaders2(runtime.currentToken)
13690
13913
  },
13691
13914
  body: JSON.stringify({ userId: runtime.currentUserId })
13692
13915
  }).catch(() => null);
@@ -13772,7 +13995,7 @@ var readSkillDocFunctionSchema = {
13772
13995
  }
13773
13996
  };
13774
13997
  async function readSkillDocFunc(args, thunkApi) {
13775
- const { buildReadDocResult } = await import("./readDocTool-HUFU6OCT.js");
13998
+ const { buildReadDocResult } = await import("./readDocTool-H6X6KO6X.js");
13776
13999
  const id = args?.id ?? args?.doc ?? args?.docKey ?? args?.pageKey;
13777
14000
  if (typeof id !== "string" || !id.trim()) {
13778
14001
  throw new Error("readSkillDoc requires id or doc.");
@@ -13788,7 +14011,7 @@ var cliWhoamiFunctionSchema = {
13788
14011
  parameters: { type: "object", properties: {} }
13789
14012
  };
13790
14013
  async function cliWhoamiFunc(_args, thunkApi) {
13791
- const runtime = getRuntime(thunkApi);
14014
+ const runtime = getRuntime2(thunkApi);
13792
14015
  const result = {
13793
14016
  success: true,
13794
14017
  runtime: "browser",
@@ -13804,7 +14027,7 @@ var cliDoctorFunctionSchema = {
13804
14027
  parameters: { type: "object", properties: {} }
13805
14028
  };
13806
14029
  async function cliDoctorFunc(_args, thunkApi) {
13807
- const runtime = getRuntime(thunkApi);
14030
+ const runtime = getRuntime2(thunkApi);
13808
14031
  const result = {
13809
14032
  success: true,
13810
14033
  runtime: "browser",
@@ -18385,7 +18608,7 @@ var cloudflareCrawlStatusFunctionSchema = {
18385
18608
  async function cloudflareCrawlStatusFunc(args, thunkApi) {
18386
18609
  const { jobId, limit, status, cursor } = args;
18387
18610
  if (!jobId) throw new Error("\u5FC5\u987B\u63D0\u4F9B jobId");
18388
- const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-QI3YBNWB.js");
18611
+ const { getToolRequestContext: getToolRequestContext2 } = await import("./toolApiClient-C7P7YSE4.js");
18389
18612
  const { baseUrl, token } = getToolRequestContext2(thunkApi);
18390
18613
  const params = new URLSearchParams();
18391
18614
  if (limit !== void 0) params.set("limit", String(limit));
@@ -19160,7 +19383,7 @@ var selectUserIdFromState = (state) => typeof state?.auth?.currentUser?.userId =
19160
19383
  var selectCurrentServerFromState = (state) => typeof state?.settings?.currentServer === "string" ? state.settings.currentServer : null;
19161
19384
  async function addImageContentToSpace(input) {
19162
19385
  const injectedAddContentAction = input.thunkApi?.extra?.addContentAction;
19163
- const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-PLWJSCOZ.js")).addContentAction;
19386
+ const addContentAction2 = typeof injectedAddContentAction === "function" ? injectedAddContentAction : (await import("./addContentAction-QYVO4SYP.js")).addContentAction;
19164
19387
  await addContentAction2(
19165
19388
  {
19166
19389
  spaceId: input.spaceId,
@@ -20306,6 +20529,7 @@ var parseMultilineSSE = createSSEParser();
20306
20529
  var MAX_SSE_RETRIES = 3;
20307
20530
  var SSE_RETRY_DELAY_MS = 1500;
20308
20531
  var MAX_RUN_START_RETRIES = 1;
20532
+ var MAX_RUN_START_CORE_DRAINING_RETRIES = 30;
20309
20533
  function createRetryableError(message, retryAfterMs) {
20310
20534
  return Object.assign(new Error(message), {
20311
20535
  retryable: true,
@@ -20427,7 +20651,8 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
20427
20651
  const authHeader = token ? `Bearer ${token}` : "";
20428
20652
  const effectiveSignal = args.signal ?? thunkSignal;
20429
20653
  let runResponse = null;
20430
- for (let attempt = 0; attempt <= MAX_RUN_START_RETRIES; attempt++) {
20654
+ let maxRunStartRetries = MAX_RUN_START_RETRIES;
20655
+ for (let attempt = 0; attempt <= maxRunStartRetries; attempt++) {
20431
20656
  const runRes = await fetch(`${currentServer}/api/agent/run`, {
20432
20657
  method: "POST",
20433
20658
  headers: {
@@ -20460,8 +20685,12 @@ var runAgentBackground = createAsyncThunk("agent/runBackground", async (args, {
20460
20685
  SSE_RETRY_DELAY_MS,
20461
20686
  payload?.retryAfterMs
20462
20687
  );
20463
- const retryable = payload?.retryable === true || payload?.reason === "core_draining" || isGatewayHttpStatus(runRes.status);
20464
- if (retryable && attempt < MAX_RUN_START_RETRIES) {
20688
+ const isCoreDraining = payload?.reason === CORE_DRAIN_REASON;
20689
+ const retryable = payload?.retryable === true || isCoreDraining || isGatewayHttpStatus(runRes.status);
20690
+ if (isCoreDraining) {
20691
+ maxRunStartRetries = MAX_RUN_START_CORE_DRAINING_RETRIES;
20692
+ }
20693
+ if (retryable && attempt < maxRunStartRetries) {
20465
20694
  await waitForRetryDelay(retryAfterMs, effectiveSignal);
20466
20695
  continue;
20467
20696
  }
@@ -22524,7 +22753,7 @@ var executeToolRun = createAsyncThunk(
22524
22753
  if (!executionInput) {
22525
22754
  throw new Error(`ToolRun ${id} has no input to execute with.`);
22526
22755
  }
22527
- const { findToolExecutor: findToolExecutor2 } = await import("./tools-3JNDS3WH.js");
22756
+ const { findToolExecutor: findToolExecutor2 } = await import("./tools-XSD2BOEN.js");
22528
22757
  const { executor } = findToolExecutor2(run.toolName);
22529
22758
  toolRunStarted({
22530
22759
  id: run.id,
@@ -22548,7 +22777,7 @@ var executeToolRun = createAsyncThunk(
22548
22777
  const latestState = thunkApi.getState();
22549
22778
  const userId = latestState.auth?.currentUser?.userId;
22550
22779
  if (userId) {
22551
- const { fetchUserSpaceMemberships } = await import("./spaceSlice-TYNWE3OC.js");
22780
+ const { fetchUserSpaceMemberships } = await import("./spaceSlice-BS5TSW3W.js");
22552
22781
  await thunkApi.dispatch(fetchUserSpaceMemberships(userId));
22553
22782
  }
22554
22783
  }
@@ -24951,7 +25180,7 @@ async function updateDocFunc(args, thunkApi) {
24951
25180
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
24952
25181
  };
24953
25182
  await dispatch(write({ data: updatedPageData, customKey: id })).unwrap();
24954
- const { getDocState, applyExternalDocUpdate } = await import("./docStore-QUQZAFZF.js");
25183
+ const { getDocState, applyExternalDocUpdate } = await import("./docStore-3DXRYBMD.js");
24955
25184
  if (getDocState().pageKey === id) {
24956
25185
  applyExternalDocUpdate({
24957
25186
  slateData: finalSlateData,
@@ -24976,7 +25205,7 @@ async function updateDocFunc(args, thunkApi) {
24976
25205
  // packages/ai/tools/updateUserPreferenceProfileTool.ts
24977
25206
  async function dispatchSetSettings(thunkApi, changes) {
24978
25207
  const injectedSetSettings = thunkApi?.extra?.setSettings;
24979
- const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-UW4IUI5L.js")).setSettings;
25208
+ const setSettings = typeof injectedSetSettings === "function" ? injectedSetSettings : (await import("./settingSlice-2I5HMG47.js")).setSettings;
24980
25209
  await thunkApi.dispatch(setSettings(changes)).unwrap();
24981
25210
  }
24982
25211
  var updateUserPreferenceProfileFunctionSchema = {
@@ -25783,6 +26012,21 @@ var baseToolDefinitions = [
25783
26012
  costLevel: "medium",
25784
26013
  defaultConsent: "ask"
25785
26014
  },
26015
+ {
26016
+ id: "loadSkill",
26017
+ schema: loadSkillFunctionSchema,
26018
+ executor: loadSkillFunc,
26019
+ description: {
26020
+ name: "loadSkill",
26021
+ description: "\u6309\u540D\u79F0\u52A0\u8F7D\u5DF2\u4FDD\u5B58\u7684 skill \u6587\u6863\uFF0C\u8FD4\u56DE\u5B8C\u6574\u6307\u4EE4\u6B63\u6587\u3002",
26022
+ category: "\u5185\u5BB9\u7BA1\u7406"
26023
+ },
26024
+ behavior: "data",
26025
+ uiGroup: "content",
26026
+ capability: "space_context",
26027
+ riskLevel: "low",
26028
+ costLevel: "low"
26029
+ },
25786
26030
  {
25787
26031
  id: "wereadGateway",
25788
26032
  schema: wereadGatewayFunctionSchema,