nolo-cli 0.53.0-alpha.1 → 0.54.0-alpha.2
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.
- package/{_executeModel-36GKPAEZ.js → _executeModel-ANY4SIAS.js} +34 -35
- package/{action-IU6ON7ZB.js → action-Q4W5JPI5.js} +7 -7
- package/{addContentAction-5V5CCI3I.js → addContentAction-O25HFR37.js} +6 -6
- package/{addDialogAgentAction-KF3KZZNZ.js → addDialogAgentAction-GH7AUPPB.js} +5 -5
- package/{agentDeleteCommand-SBODEUPE.js → agentDeleteCommand-JWIKNWWI.js} +17 -17
- package/{agentEmailCommands-ME7BCY5S.js → agentEmailCommands-PL22BEU5.js} +39 -40
- package/{agentListCommands-QBWPKN5D.js → agentListCommands-6NR7AQEK.js} +19 -19
- package/{agentMachineCommands-KFFUPELZ.js → agentMachineCommands-TASPU6OA.js} +18 -18
- package/{agentRecordCommands-4BF6JIHS.js → agentRecordCommands-Z64TA63M.js} +38 -39
- package/{agentRunCommand-4MA7D6SV.js → agentRunCommand-4QJQLPRW.js} +39 -40
- package/{agentRuntimeLocal-RD52NPCG.js → agentRuntimeLocal-PCJJ56J2.js} +17 -17
- package/{agentSlice-AJABGQHU.js → agentSlice-KYLDUSNN.js} +6 -6
- package/{appDeleteCommands-I42NL3LP.js → appDeleteCommands-WLHMJAVT.js} +19 -19
- package/{appDeployCommands-CZWHXVPU.js → appDeployCommands-CKON7N2E.js} +19 -19
- package/{appDeployStatusCommands-PIQYXACM.js → appDeployStatusCommands-PXRLDASH.js} +19 -19
- package/{appGetCommands-CI2OWLT7.js → appGetCommands-RAB5RM4M.js} +19 -19
- package/{appListCommands-LWLSHPCP.js → appListCommands-GU57FB62.js} +19 -19
- package/{authCommand-WLWOEVYI.js → authCommand-QOPOEYEK.js} +7 -7
- package/{chatQueueReduxAdapter-V37RK3A6.js → chatQueueReduxAdapter-5O2WLITN.js} +16 -16
- package/chunk-2BWU4ORW.js +2574 -0
- package/{chunk-SG65C33A.js → chunk-32I5RVMY.js} +4 -4
- package/{chunk-X7S7OFUX.js → chunk-3QJTD6DO.js} +4 -4
- package/{chunk-CY5KIIPU.js → chunk-3Z3DXZBD.js} +12 -12
- package/{chunk-RO2IUWZE.js → chunk-4NN3EK7H.js} +1 -1
- package/{chunk-Y7TGWSUN.js → chunk-56W233KG.js} +1 -1
- package/{chunk-C2WF2OY7.js → chunk-5WADL4O7.js} +1 -1
- package/{chunk-QTH72J3N.js → chunk-6BGAQ3KR.js} +116 -23
- package/{chunk-67Q6IHM5.js → chunk-6FQ2552G.js} +142 -62
- package/{chunk-6XIE5ZGI.js → chunk-6HIGYUBQ.js} +1 -1
- package/{chunk-XPW6JLOB.js → chunk-6SZ52ORL.js} +8 -8
- package/{chunk-4ZL2KBI7.js → chunk-757BGY6Y.js} +1 -1
- package/{chunk-SQTVMYMU.js → chunk-7APQB6R6.js} +3 -3
- package/{chunk-QF27IZB3.js → chunk-7K5VMB4Q.js} +3 -3
- package/{chunk-V2IPBG5U.js → chunk-AA564GBL.js} +2 -2
- package/{chunk-76UA7376.js → chunk-AV6KQCM5.js} +6 -6
- package/{chunk-PGKZ2KGE.js → chunk-BJLYCOZK.js} +24 -24
- package/{chunk-VKSBVRGP.js → chunk-CVT7L2WZ.js} +1 -1
- package/{chunk-JVKFKKYN.js → chunk-D3JQPONH.js} +1 -1
- package/{chunk-KHCLMKZZ.js → chunk-EY7V7REW.js} +280 -6
- package/{chunk-4RXXP6WD.js → chunk-FGEYVPPR.js} +2 -2
- package/{chunk-AZ6DT2UD.js → chunk-GBADO3SM.js} +1 -1
- package/chunk-GLGD2JGY.js +1766 -0
- package/{chunk-POLE2QLO.js → chunk-GV35EHNA.js} +126 -59
- package/{chunk-HR5XDXYM.js → chunk-H4RYESI6.js} +3 -3
- package/{chunk-W3RZLXMA.js → chunk-IKTHA3JH.js} +2 -2
- package/{chunk-XB7ACJFH.js → chunk-INXBNYCG.js} +3 -3
- package/{chunk-F22JQTSX.js → chunk-KUUTWU4I.js} +3 -3
- package/{chunk-DFY6O64O.js → chunk-LA4IDAK7.js} +12 -12
- package/{chunk-IVKEJD7I.js → chunk-LN3OQJGG.js} +1 -1
- package/{chunk-YZ2WE6CW.js → chunk-MFI4FGHX.js} +2 -2
- package/{chunk-LGUQHYAL.js → chunk-O5FLGN2L.js} +3 -2
- package/{chunk-HCBQVVFZ.js → chunk-PAHILFNT.js} +1 -1
- package/{chunk-HHBXCRJS.js → chunk-PYKV6FSC.js} +1 -1
- package/{chunk-BO3YFOZR.js → chunk-QDHZCAH3.js} +1 -1
- package/{chunk-L3JWI7WX.js → chunk-QOKAKDPE.js} +15 -11
- package/{chunk-B54WOZ77.js → chunk-RTLJUGQH.js} +1 -1
- package/{chunk-Z7A54NFZ.js → chunk-RU5D3B22.js} +1 -1
- package/{chunk-JBL24PK6.js → chunk-SP3DPVBH.js} +2 -2
- package/{chunk-TZRB2I2M.js → chunk-TI5BCZCH.js} +18 -18
- package/{chunk-KOZ2G3ZG.js → chunk-U2A47SVI.js} +5 -5
- package/{chunk-3YVCM5PE.js → chunk-U5Z7LFZF.js} +1 -1
- package/{chunk-DIQCV4FR.js → chunk-UITMHBVK.js} +1 -1
- package/{chunk-H5QLIP6S.js → chunk-UW4INMD2.js} +2 -2
- package/{chunk-5SLTA66C.js → chunk-V4KZGLOI.js} +30 -30
- package/{chunk-AV4Z57LV.js → chunk-VRJUIUIY.js} +2 -2
- package/{chunk-5XCW6RQG.js → chunk-VRZIH5JO.js} +1 -1
- package/{chunk-2JYSSXLY.js → chunk-VULELK4T.js} +2 -2
- package/{chunk-VFN256RI.js → chunk-WL3UOGYO.js} +25 -0
- package/{chunk-PJASTA2U.js → chunk-Y7LNKP32.js} +3 -3
- package/{chunk-OZKJBDG4.js → chunk-YBV6QJKM.js} +14 -8
- package/{codingSkills-BYQI6EPT.js → codingSkills-BCQXRZOI.js} +3 -4
- package/{createAgentAutomationAction-5OZIWOK4.js → createAgentAutomationAction-UJLNFFFC.js} +17 -17
- package/{createDialogAction-334CHPJF.js → createDialogAction-TJCX6GUE.js} +20 -21
- package/{createPageAction-LXY22WTA.js → createPageAction-N3IYABHV.js} +18 -19
- package/{dbSlice-FWF5F4L7.js → dbSlice-D5CNGWPD.js} +5 -5
- package/{deleteFile-NPZ64DFN.js → deleteFile-44TUM34Y.js} +3 -3
- package/{dialogCommands-4MGUHAJI.js → dialogCommands-35M6RBAC.js} +18 -18
- package/{dialogSlice-76W7S3C4.js → dialogSlice-KO7ADD7H.js} +16 -16
- package/{docCreateCommands-346W5443.js → docCreateCommands-VXHZWQ3P.js} +20 -21
- package/{docDeleteCommands-FKEEPUUS.js → docDeleteCommands-4WFAJR6A.js} +20 -21
- package/{docReadCommands-AACI4DVO.js → docReadCommands-OYREEFAR.js} +20 -21
- package/{docStore-N7QTPHAX.js → docStore-5BU76DFK.js} +18 -18
- package/{docUpdateCommands-WHWVZ2XE.js → docUpdateCommands-A7QERSME.js} +20 -21
- package/{getPricing-JNOCWYDH.js → getPricing-HAU62AFM.js} +3 -3
- package/{handleSendMessageAction-EAXEX5AX.js → handleSendMessageAction-OSGQJQ45.js} +16 -16
- package/index.js +58 -58
- package/{machineCommands-XNWLQVTN.js → machineCommands-J43U3TX5.js} +38 -39
- package/{machineWsRunDispatch-56HWQ67L.js → machineWsRunDispatch-Z2Z6STXZ.js} +38 -39
- package/{models-N4NXQ44D.js → models-4QF4BJVY.js} +2 -2
- package/package.json +2 -3
- package/{read-J7RVVCHH.js → read-RGNPI5H2.js} +3 -3
- package/{readDocTool-G2WBM4IH.js → readDocTool-6ESWKTXD.js} +1 -1
- package/{readlineWorkspace-AXTB7DJC.js → readlineWorkspace-YRPV6JPN.js} +485 -222
- package/{removeDialogAgentAction-RMPISD42.js → removeDialogAgentAction-JYT73FU2.js} +7 -7
- package/{runAgentClientLoop-PU3R3UXA.js → runAgentClientLoop-5YM5WMAY.js} +32 -33
- package/{setDialogExtraReferencesAction-7BUTHDAL.js → setDialogExtraReferencesAction-D564LMYQ.js} +6 -6
- package/{setPrimaryDialogAgentAction-WCYIBGZ4.js → setPrimaryDialogAgentAction-ACY3BLYA.js} +7 -7
- package/{settingSlice-7NN2MI6Y.js → settingSlice-MKI3MNZJ.js} +6 -6
- package/{skillDiscovery-COX56OBO.js → skillDiscovery-GPUDHDTZ.js} +1 -2
- package/{spaceCommands-JYI3X4N2.js → spaceCommands-MY26V52L.js} +17 -17
- package/{spaceSlice-ERZ3RGWC.js → spaceSlice-JUIXC365.js} +17 -17
- package/{streamAgentChatTurn-2IH4MTQC.js → streamAgentChatTurn-XV5X5TNQ.js} +36 -37
- package/{switchDialogAgentAction-WGMMQHDI.js → switchDialogAgentAction-CJ5H6SAR.js} +5 -5
- package/{tableCommands-P2TXJ3CF.js → tableCommands-R6WFRDYF.js} +1 -1
- package/{tools-DJUTQEMP.js → tools-MIMELA2Y.js} +27 -28
- package/{tuiSummaryLlmCaller-U4EGD2SX.js → tuiSummaryLlmCaller-XJ5BKNNS.js} +12 -12
- package/{updateDialogTitleAction-OVOPGTC3.js → updateDialogTitleAction-EIZUSWHR.js} +17 -17
- package/chunk-AETZ7AD6.js +0 -274
- package/chunk-EUG45QJR.js +0 -6104
- package/chunk-OFZPJ3NT.js +0 -114
|
@@ -10,13 +10,13 @@ import {
|
|
|
10
10
|
} from "./chunk-YYLHWIW6.js";
|
|
11
11
|
import {
|
|
12
12
|
runLlm
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U2A47SVI.js";
|
|
14
14
|
import {
|
|
15
15
|
getApproxPricePerImage
|
|
16
16
|
} from "./chunk-AGGIDPCZ.js";
|
|
17
17
|
import {
|
|
18
18
|
cleanupCliSessionForDialog
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-32I5RVMY.js";
|
|
20
20
|
import {
|
|
21
21
|
getActiveDialogAgentId,
|
|
22
22
|
getDialogAgentIds,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
getModelContextWindow,
|
|
52
52
|
getModelInfo,
|
|
53
53
|
resolveAutoExecutionProfile
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-KUUTWU4I.js";
|
|
55
55
|
import {
|
|
56
56
|
COMPACTION_SUMMARY_SYSTEM_PROMPT,
|
|
57
57
|
buildCompactionMetricsFromPlan,
|
|
@@ -63,11 +63,11 @@ import {
|
|
|
63
63
|
normalizeAssistantContentBuffer,
|
|
64
64
|
planCompression,
|
|
65
65
|
serializeMessageContent
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-H4RYESI6.js";
|
|
67
67
|
import {
|
|
68
68
|
findModelConfig,
|
|
69
69
|
getModelConfig
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-QDHZCAH3.js";
|
|
71
71
|
import {
|
|
72
72
|
toErrorMessage
|
|
73
73
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -79,10 +79,10 @@ import {
|
|
|
79
79
|
isPlatformHostedDeepSeekV4Model,
|
|
80
80
|
isPlatformHostedImageModel,
|
|
81
81
|
isPlatformHostedOpenAIImageModel
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-WL3UOGYO.js";
|
|
83
83
|
import {
|
|
84
84
|
nolotusId
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-3QJTD6DO.js";
|
|
86
86
|
import {
|
|
87
87
|
asRecordOrEmpty
|
|
88
88
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
remove,
|
|
93
93
|
selectById,
|
|
94
94
|
write
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-AV6KQCM5.js";
|
|
96
96
|
import {
|
|
97
97
|
buildDialogAgentListIndexDeleteOps,
|
|
98
98
|
createDialogMessageKeyAndId,
|
|
@@ -117,7 +117,7 @@ import {
|
|
|
117
117
|
builtinAgentCatalogEntryById,
|
|
118
118
|
builtinRuntimeFallbackEntries,
|
|
119
119
|
isBuiltinPlatformAgentKey
|
|
120
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-VULELK4T.js";
|
|
121
121
|
import {
|
|
122
122
|
extractCustomId,
|
|
123
123
|
extractUserId,
|
|
@@ -134,11 +134,11 @@ import {
|
|
|
134
134
|
parseOwnerUserIdFromDbKey,
|
|
135
135
|
scheduleDeleteReplication,
|
|
136
136
|
selectIdentityUserId
|
|
137
|
-
} from "./chunk-
|
|
137
|
+
} from "./chunk-PYKV6FSC.js";
|
|
138
138
|
import {
|
|
139
139
|
createClientLogger,
|
|
140
140
|
isAbortError
|
|
141
|
-
} from "./chunk-
|
|
141
|
+
} from "./chunk-QOKAKDPE.js";
|
|
142
142
|
import {
|
|
143
143
|
isTombstoneRecord,
|
|
144
144
|
shouldReplaceWithNextRecord
|
|
@@ -3584,7 +3584,7 @@ var messageSlice = createSliceWithThunks({
|
|
|
3584
3584
|
runtimeOptions: args.runtimeOptions
|
|
3585
3585
|
});
|
|
3586
3586
|
if (agentKeyToUse) {
|
|
3587
|
-
const { streamAgentChatTurn } = await import("./agentSlice-
|
|
3587
|
+
const { streamAgentChatTurn } = await import("./agentSlice-KYLDUSNN.js");
|
|
3588
3588
|
await dispatch(
|
|
3589
3589
|
streamAgentChatTurn({
|
|
3590
3590
|
agentKey: agentKeyToUse,
|
|
@@ -4786,7 +4786,7 @@ var deleteOwnedDialogAttachments = async (args) => {
|
|
|
4786
4786
|
metadataReadFailures
|
|
4787
4787
|
});
|
|
4788
4788
|
if (!plan.deleteCandidates.length) return plan;
|
|
4789
|
-
const { deleteFileAction } = await import("./deleteFile-
|
|
4789
|
+
const { deleteFileAction } = await import("./deleteFile-44TUM34Y.js");
|
|
4790
4790
|
for (const candidate of plan.deleteCandidates) {
|
|
4791
4791
|
if (candidate.fileDbKey) {
|
|
4792
4792
|
await deleteFileAction(candidate.fileDbKey, args.thunkApi);
|
|
@@ -4848,7 +4848,7 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4848
4848
|
}
|
|
4849
4849
|
if (isCurrentDialog) {
|
|
4850
4850
|
await thunkApi.dispatch(resetMsgs());
|
|
4851
|
-
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-
|
|
4851
|
+
const { clearPendingAttachments: clearPendingAttachments2 } = await import("./dialogSlice-KO7ADD7H.js");
|
|
4852
4852
|
dispatch(clearPendingAttachments2());
|
|
4853
4853
|
}
|
|
4854
4854
|
return { dialogKey, isCurrentDialog, attachmentPlan };
|
|
@@ -4856,39 +4856,39 @@ var deleteDialogThunk = async (payload, thunkApi) => {
|
|
|
4856
4856
|
|
|
4857
4857
|
// packages/chat/dialog/dialogSlice.ts
|
|
4858
4858
|
var runCreateDialogAction = async (args, thunkApi) => {
|
|
4859
|
-
const { createDialogAction } = await import("./createDialogAction-
|
|
4859
|
+
const { createDialogAction } = await import("./createDialogAction-TJCX6GUE.js");
|
|
4860
4860
|
return createDialogAction(args, thunkApi);
|
|
4861
4861
|
};
|
|
4862
4862
|
var runCreateAgentAutomationAction = async (args, thunkApi) => {
|
|
4863
|
-
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-
|
|
4863
|
+
const { createAgentAutomationAction } = await import("./createAgentAutomationAction-UJLNFFFC.js");
|
|
4864
4864
|
return createAgentAutomationAction(args, thunkApi);
|
|
4865
4865
|
};
|
|
4866
4866
|
var runUpdateDialogTitleAction = async (args, thunkApi) => {
|
|
4867
|
-
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-
|
|
4867
|
+
const { updateDialogTitleAction } = await import("./updateDialogTitleAction-EIZUSWHR.js");
|
|
4868
4868
|
return updateDialogTitleAction(args, thunkApi);
|
|
4869
4869
|
};
|
|
4870
4870
|
var runAddDialogAgentAction = async (args, thunkApi) => {
|
|
4871
|
-
const { addDialogAgentAction } = await import("./addDialogAgentAction-
|
|
4871
|
+
const { addDialogAgentAction } = await import("./addDialogAgentAction-GH7AUPPB.js");
|
|
4872
4872
|
return addDialogAgentAction(args, thunkApi);
|
|
4873
4873
|
};
|
|
4874
4874
|
var runRemoveDialogAgentAction = async (args, thunkApi) => {
|
|
4875
|
-
const { removeDialogAgentAction } = await import("./removeDialogAgentAction-
|
|
4875
|
+
const { removeDialogAgentAction } = await import("./removeDialogAgentAction-JYT73FU2.js");
|
|
4876
4876
|
return removeDialogAgentAction(args, thunkApi);
|
|
4877
4877
|
};
|
|
4878
4878
|
var runSetPrimaryDialogAgentAction = async (args, thunkApi) => {
|
|
4879
|
-
const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-
|
|
4879
|
+
const { setPrimaryDialogAgentAction } = await import("./setPrimaryDialogAgentAction-ACY3BLYA.js");
|
|
4880
4880
|
return setPrimaryDialogAgentAction(args, thunkApi);
|
|
4881
4881
|
};
|
|
4882
4882
|
var runSwitchDialogAgentAction = async (args, thunkApi) => {
|
|
4883
|
-
const { switchDialogAgentAction } = await import("./switchDialogAgentAction-
|
|
4883
|
+
const { switchDialogAgentAction } = await import("./switchDialogAgentAction-CJ5H6SAR.js");
|
|
4884
4884
|
return switchDialogAgentAction(args, thunkApi);
|
|
4885
4885
|
};
|
|
4886
4886
|
var runSetDialogExtraReferencesAction = async (args, thunkApi) => {
|
|
4887
|
-
const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-
|
|
4887
|
+
const { setDialogExtraReferencesAction } = await import("./setDialogExtraReferencesAction-D564LMYQ.js");
|
|
4888
4888
|
return setDialogExtraReferencesAction(args, thunkApi);
|
|
4889
4889
|
};
|
|
4890
4890
|
var runHandleSendMessageAction = async (args, thunkApi) => {
|
|
4891
|
-
const { handleSendMessageAction } = await import("./handleSendMessageAction-
|
|
4891
|
+
const { handleSendMessageAction } = await import("./handleSendMessageAction-OSGQJQ45.js");
|
|
4892
4892
|
return handleSendMessageAction(args, thunkApi);
|
|
4893
4893
|
};
|
|
4894
4894
|
function clearDialogState() {
|
|
@@ -4901,7 +4901,7 @@ var createPageAndAddReference = createAsyncThunk(
|
|
|
4901
4901
|
async (payload, { dispatch, getState, rejectWithValue }) => {
|
|
4902
4902
|
const { slateData, jsonData, title, type, fileId, groupId, dialogKey } = payload;
|
|
4903
4903
|
try {
|
|
4904
|
-
const { createDocState } = await import("./docStore-
|
|
4904
|
+
const { createDocState } = await import("./docStore-5BU76DFK.js");
|
|
4905
4905
|
const pageKey = await createDocState(
|
|
4906
4906
|
{ slateData, title },
|
|
4907
4907
|
{ dispatch, getState }
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
asTrimmedNonEmptyStringArray
|
|
3
|
+
} from "./chunk-I42VC5KR.js";
|
|
4
|
+
import {
|
|
5
|
+
asOptionalTrimmedString
|
|
6
|
+
} from "./chunk-G3SUCT4W.js";
|
|
7
|
+
|
|
8
|
+
// packages/ai/node_modules/js-yaml/dist/js-yaml.mjs
|
|
2
9
|
function getDefaultExportFromCjs(x) {
|
|
3
10
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
11
|
}
|
|
@@ -1276,16 +1283,21 @@ function requireLoader() {
|
|
|
1276
1283
|
state.result += _result;
|
|
1277
1284
|
}
|
|
1278
1285
|
}
|
|
1286
|
+
function chargeMergeWork(state) {
|
|
1287
|
+
state.totalMergeKeys++;
|
|
1288
|
+
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
1289
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1279
1292
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
1280
1293
|
if (!common2.isObject(source)) {
|
|
1281
1294
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
1282
1295
|
}
|
|
1296
|
+
chargeMergeWork(state);
|
|
1283
1297
|
const sourceKeys = Object.keys(source);
|
|
1284
1298
|
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
1285
1299
|
const key = sourceKeys[index];
|
|
1286
|
-
|
|
1287
|
-
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
1288
|
-
}
|
|
1300
|
+
chargeMergeWork(state);
|
|
1289
1301
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
1290
1302
|
setProperty(destination, key, source[key]);
|
|
1291
1303
|
overridableKeys[key] = true;
|
|
@@ -1313,6 +1325,9 @@ function requireLoader() {
|
|
|
1313
1325
|
}
|
|
1314
1326
|
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
1315
1327
|
if (Array.isArray(valueNode)) {
|
|
1328
|
+
if (valueNode.length > 100) {
|
|
1329
|
+
throwError(state, "abnormal merge sequence size");
|
|
1330
|
+
}
|
|
1316
1331
|
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
1317
1332
|
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
1318
1333
|
}
|
|
@@ -3056,7 +3071,266 @@ var {
|
|
|
3056
3071
|
safeDump
|
|
3057
3072
|
} = yaml;
|
|
3058
3073
|
|
|
3074
|
+
// packages/ai/skills/skillDocProtocol.ts
|
|
3075
|
+
var SKILL_DOC_ENUMS = {
|
|
3076
|
+
triggerMode: ["explicit", "required", "recommended"],
|
|
3077
|
+
// budgetTier 只服务 WorkflowReferenceConfig;skill 侧已移除(零读点)。
|
|
3078
|
+
budgetTier: ["low", "medium", "high"],
|
|
3079
|
+
modality: ["text", "image", "video", "audio", "3d"],
|
|
3080
|
+
docKind: ["knowledge", "instruction", "skill"]
|
|
3081
|
+
};
|
|
3082
|
+
var SKILL_CONFIG_BLOCK = "skill-config";
|
|
3083
|
+
var EVAL_CONFIG_BLOCK = "eval-config";
|
|
3084
|
+
var WORKFLOW_CONFIG_BLOCK = "workflow-config";
|
|
3085
|
+
var normalizeStringArray = (value) => {
|
|
3086
|
+
if (!Array.isArray(value)) return void 0;
|
|
3087
|
+
const items = [...new Set(asTrimmedNonEmptyStringArray(value))];
|
|
3088
|
+
return items.length > 0 ? items : void 0;
|
|
3089
|
+
};
|
|
3090
|
+
var normalizeSkillEnumValue = (key, value) => typeof value === "string" && SKILL_DOC_ENUMS[key].includes(value) ? value : void 0;
|
|
3091
|
+
var normalizeSkillModalities = (value) => {
|
|
3092
|
+
const raw = normalizeStringArray(value);
|
|
3093
|
+
if (!raw) return void 0;
|
|
3094
|
+
const filtered = raw.flatMap((item) => {
|
|
3095
|
+
const modality = normalizeSkillEnumValue("modality", item);
|
|
3096
|
+
return modality ? [modality] : [];
|
|
3097
|
+
});
|
|
3098
|
+
return filtered.length > 0 ? Array.from(new Set(filtered)) : void 0;
|
|
3099
|
+
};
|
|
3100
|
+
var normalizeSkillConfig = (value, fallbackTools) => {
|
|
3101
|
+
if (!value || typeof value !== "object") return void 0;
|
|
3102
|
+
const record = value;
|
|
3103
|
+
const name = asOptionalTrimmedString(record.name) ?? "";
|
|
3104
|
+
const description = asOptionalTrimmedString(record.description) ?? "";
|
|
3105
|
+
if (!name || !description) return void 0;
|
|
3106
|
+
const triggerMode = normalizeSkillEnumValue("triggerMode", record.triggerMode);
|
|
3107
|
+
const modalities = normalizeSkillModalities(record.modalities);
|
|
3108
|
+
const toolNames = normalizeStringArray(record.toolNames) ?? normalizeStringArray(fallbackTools) ?? void 0;
|
|
3109
|
+
return {
|
|
3110
|
+
version: "0.1",
|
|
3111
|
+
kind: "skill",
|
|
3112
|
+
id: asOptionalTrimmedString(record.id),
|
|
3113
|
+
name,
|
|
3114
|
+
description,
|
|
3115
|
+
triggerMode,
|
|
3116
|
+
toolNames,
|
|
3117
|
+
modalities,
|
|
3118
|
+
requiredSkills: normalizeStringArray(record.requiredSkills),
|
|
3119
|
+
recommendedSkills: normalizeStringArray(record.recommendedSkills),
|
|
3120
|
+
promptPatch: asOptionalTrimmedString(record.promptPatch)
|
|
3121
|
+
};
|
|
3122
|
+
};
|
|
3123
|
+
var normalizeEvalConfig = (value) => {
|
|
3124
|
+
if (!value || typeof value !== "object") return void 0;
|
|
3125
|
+
const record = value;
|
|
3126
|
+
if (!Array.isArray(record.cases)) return void 0;
|
|
3127
|
+
const cases = [];
|
|
3128
|
+
for (const item of record.cases) {
|
|
3129
|
+
if (!item || typeof item !== "object") continue;
|
|
3130
|
+
const testCase = item;
|
|
3131
|
+
const input = asOptionalTrimmedString(testCase.input) ?? "";
|
|
3132
|
+
if (!input) continue;
|
|
3133
|
+
cases.push({
|
|
3134
|
+
input,
|
|
3135
|
+
expectedTools: normalizeStringArray(testCase.expectedTools),
|
|
3136
|
+
expectedSignals: normalizeStringArray(testCase.expectedSignals),
|
|
3137
|
+
forbiddenSignals: normalizeStringArray(testCase.forbiddenSignals)
|
|
3138
|
+
});
|
|
3139
|
+
}
|
|
3140
|
+
return cases.length > 0 ? {
|
|
3141
|
+
version: "0.1",
|
|
3142
|
+
cases
|
|
3143
|
+
} : void 0;
|
|
3144
|
+
};
|
|
3145
|
+
var normalizeWorkflowConfig = (value) => {
|
|
3146
|
+
if (!value || typeof value !== "object") return void 0;
|
|
3147
|
+
const record = value;
|
|
3148
|
+
const name = asOptionalTrimmedString(record.name) ?? "";
|
|
3149
|
+
const description = asOptionalTrimmedString(record.description) ?? "";
|
|
3150
|
+
if (!name || !description) return void 0;
|
|
3151
|
+
const budgetTier = normalizeSkillEnumValue("budgetTier", record.budgetTier);
|
|
3152
|
+
return {
|
|
3153
|
+
version: "0.1",
|
|
3154
|
+
kind: "workflow",
|
|
3155
|
+
id: asOptionalTrimmedString(record.id),
|
|
3156
|
+
name,
|
|
3157
|
+
description,
|
|
3158
|
+
defaultAgent: asOptionalTrimmedString(record.defaultAgent),
|
|
3159
|
+
inputs: normalizeStringArray(record.inputs),
|
|
3160
|
+
recommendedTools: normalizeStringArray(record.recommendedTools),
|
|
3161
|
+
requiredTools: normalizeStringArray(record.requiredTools),
|
|
3162
|
+
requiredOutputs: normalizeStringArray(record.requiredOutputs),
|
|
3163
|
+
gates: normalizeStringArray(record.gates),
|
|
3164
|
+
budgetTier,
|
|
3165
|
+
contextStrategy: asOptionalTrimmedString(record.contextStrategy),
|
|
3166
|
+
failureProtocol: asOptionalTrimmedString(record.failureProtocol)
|
|
3167
|
+
};
|
|
3168
|
+
};
|
|
3169
|
+
var normalizePageSkillMetadata = (value, fallbackTools) => {
|
|
3170
|
+
if (!value || typeof value !== "object") return void 0;
|
|
3171
|
+
const record = value;
|
|
3172
|
+
const kind = normalizeSkillEnumValue("docKind", record.kind);
|
|
3173
|
+
const meta = {
|
|
3174
|
+
kind,
|
|
3175
|
+
requiredSkills: normalizeStringArray(record.requiredSkills),
|
|
3176
|
+
recommendedSkills: normalizeStringArray(record.recommendedSkills),
|
|
3177
|
+
skillConfig: normalizeSkillConfig(record.skillConfig, fallbackTools),
|
|
3178
|
+
evalConfig: normalizeEvalConfig(record.evalConfig),
|
|
3179
|
+
workflowConfig: normalizeWorkflowConfig(record.workflowConfig)
|
|
3180
|
+
};
|
|
3181
|
+
if (meta.skillConfig && !meta.kind) {
|
|
3182
|
+
meta.kind = "skill";
|
|
3183
|
+
}
|
|
3184
|
+
if (meta.workflowConfig && !meta.kind) {
|
|
3185
|
+
meta.kind = "instruction";
|
|
3186
|
+
}
|
|
3187
|
+
return meta.kind || meta.requiredSkills || meta.recommendedSkills || meta.skillConfig || meta.evalConfig || meta.workflowConfig ? meta : void 0;
|
|
3188
|
+
};
|
|
3189
|
+
var extractCommentBlock = (markdown, blockName) => {
|
|
3190
|
+
if (!markdown) return void 0;
|
|
3191
|
+
const matcher = new RegExp(
|
|
3192
|
+
`<!--\\s*${blockName}\\s*\\n([\\s\\S]*?)-->`,
|
|
3193
|
+
"i"
|
|
3194
|
+
);
|
|
3195
|
+
const match = markdown.match(matcher);
|
|
3196
|
+
return asOptionalTrimmedString(match?.[1]);
|
|
3197
|
+
};
|
|
3198
|
+
var removeCommentBlock = (markdown, blockName) => markdown.replace(
|
|
3199
|
+
new RegExp(`\\n?<!--\\s*${blockName}\\s*\\n[\\s\\S]*?-->\\s*`, "gi"),
|
|
3200
|
+
"\n\n"
|
|
3201
|
+
);
|
|
3202
|
+
var parseYamlObject = (raw) => {
|
|
3203
|
+
if (!raw) return void 0;
|
|
3204
|
+
try {
|
|
3205
|
+
const parsed = load(raw);
|
|
3206
|
+
return parsed && typeof parsed === "object" ? parsed : void 0;
|
|
3207
|
+
} catch {
|
|
3208
|
+
return void 0;
|
|
3209
|
+
}
|
|
3210
|
+
};
|
|
3211
|
+
var parseSkillDocProtocol = (markdown, existingMeta, fallbackTools) => {
|
|
3212
|
+
const source = typeof markdown === "string" ? markdown : "";
|
|
3213
|
+
const skillBlock = parseYamlObject(extractCommentBlock(source, SKILL_CONFIG_BLOCK));
|
|
3214
|
+
const evalBlock = parseYamlObject(extractCommentBlock(source, EVAL_CONFIG_BLOCK));
|
|
3215
|
+
const workflowBlock = parseYamlObject(extractCommentBlock(source, WORKFLOW_CONFIG_BLOCK));
|
|
3216
|
+
const cleanedContent = removeCommentBlock(
|
|
3217
|
+
removeCommentBlock(
|
|
3218
|
+
removeCommentBlock(source, SKILL_CONFIG_BLOCK),
|
|
3219
|
+
EVAL_CONFIG_BLOCK
|
|
3220
|
+
),
|
|
3221
|
+
WORKFLOW_CONFIG_BLOCK
|
|
3222
|
+
).replace(/\n{3,}/g, "\n\n").trim();
|
|
3223
|
+
const parsedMeta = normalizePageSkillMetadata(
|
|
3224
|
+
{
|
|
3225
|
+
...existingMeta ?? {},
|
|
3226
|
+
...skillBlock ? {
|
|
3227
|
+
kind: existingMeta?.kind === "skill" || skillBlock.kind === "skill" ? "skill" : existingMeta?.kind,
|
|
3228
|
+
requiredSkills: skillBlock.requiredSkills ?? existingMeta?.requiredSkills,
|
|
3229
|
+
recommendedSkills: skillBlock.recommendedSkills ?? existingMeta?.recommendedSkills,
|
|
3230
|
+
skillConfig: skillBlock
|
|
3231
|
+
} : {},
|
|
3232
|
+
...evalBlock ? { evalConfig: evalBlock } : {},
|
|
3233
|
+
...workflowBlock ? { workflowConfig: workflowBlock } : {}
|
|
3234
|
+
},
|
|
3235
|
+
fallbackTools
|
|
3236
|
+
);
|
|
3237
|
+
return {
|
|
3238
|
+
content: cleanedContent,
|
|
3239
|
+
meta: parsedMeta
|
|
3240
|
+
};
|
|
3241
|
+
};
|
|
3242
|
+
var resolvePageSkillMetadata = (page) => {
|
|
3243
|
+
if (!page) return void 0;
|
|
3244
|
+
const existingMeta = normalizePageSkillMetadata(page.meta, page.tools);
|
|
3245
|
+
return parseSkillDocProtocol(page.content ?? "", existingMeta, page.tools).meta;
|
|
3246
|
+
};
|
|
3247
|
+
var yamlBlock = (value) => dump(value, { lineWidth: 120, noRefs: true }).trim();
|
|
3248
|
+
var buildSkillConfigComment = (config) => {
|
|
3249
|
+
const payload = {
|
|
3250
|
+
version: config.version,
|
|
3251
|
+
kind: config.kind,
|
|
3252
|
+
...config.id ? { id: config.id } : {},
|
|
3253
|
+
name: config.name,
|
|
3254
|
+
description: config.description,
|
|
3255
|
+
...config.triggerMode ? { triggerMode: config.triggerMode } : {},
|
|
3256
|
+
...config.requiredSkills?.length ? { requiredSkills: config.requiredSkills } : {},
|
|
3257
|
+
...config.recommendedSkills?.length ? { recommendedSkills: config.recommendedSkills } : {},
|
|
3258
|
+
...config.toolNames?.length ? { toolNames: config.toolNames } : {},
|
|
3259
|
+
...config.modalities?.length ? { modalities: config.modalities } : {},
|
|
3260
|
+
...config.promptPatch ? { promptPatch: config.promptPatch } : {}
|
|
3261
|
+
};
|
|
3262
|
+
return `<!-- ${SKILL_CONFIG_BLOCK}
|
|
3263
|
+
${yamlBlock(payload)}
|
|
3264
|
+
-->`;
|
|
3265
|
+
};
|
|
3266
|
+
var buildEvalConfigComment = (config) => `<!-- ${EVAL_CONFIG_BLOCK}
|
|
3267
|
+
${yamlBlock({
|
|
3268
|
+
version: config.version,
|
|
3269
|
+
cases: config.cases
|
|
3270
|
+
})}
|
|
3271
|
+
-->`;
|
|
3272
|
+
var buildWorkflowConfigComment = (config) => `<!-- ${WORKFLOW_CONFIG_BLOCK}
|
|
3273
|
+
${yamlBlock({
|
|
3274
|
+
version: config.version,
|
|
3275
|
+
kind: config.kind,
|
|
3276
|
+
...config.id ? { id: config.id } : {},
|
|
3277
|
+
name: config.name,
|
|
3278
|
+
description: config.description,
|
|
3279
|
+
...config.defaultAgent ? { defaultAgent: config.defaultAgent } : {},
|
|
3280
|
+
...config.inputs?.length ? { inputs: config.inputs } : {},
|
|
3281
|
+
...config.recommendedTools?.length ? { recommendedTools: config.recommendedTools } : {},
|
|
3282
|
+
...config.requiredTools?.length ? { requiredTools: config.requiredTools } : {},
|
|
3283
|
+
...config.requiredOutputs?.length ? { requiredOutputs: config.requiredOutputs } : {},
|
|
3284
|
+
...config.gates?.length ? { gates: config.gates } : {},
|
|
3285
|
+
...config.budgetTier ? { budgetTier: config.budgetTier } : {},
|
|
3286
|
+
...config.contextStrategy ? { contextStrategy: config.contextStrategy } : {},
|
|
3287
|
+
...config.failureProtocol ? { failureProtocol: config.failureProtocol } : {}
|
|
3288
|
+
})}
|
|
3289
|
+
-->`;
|
|
3290
|
+
var buildSkillDocMarkdown = (options) => {
|
|
3291
|
+
const sections = [
|
|
3292
|
+
asOptionalTrimmedString(options.body) ?? "",
|
|
3293
|
+
buildSkillConfigComment(options.skillConfig),
|
|
3294
|
+
options.evalConfig ? buildEvalConfigComment(options.evalConfig) : "",
|
|
3295
|
+
options.workflowConfig ? buildWorkflowConfigComment(options.workflowConfig) : ""
|
|
3296
|
+
].filter(Boolean);
|
|
3297
|
+
return sections.join("\n\n").trim();
|
|
3298
|
+
};
|
|
3299
|
+
var extractFrontmatter = (markdown) => {
|
|
3300
|
+
const match = markdown.match(/^\s*---\s*\n([\s\S]*?)\n\s*---\s*\n?/);
|
|
3301
|
+
if (!match) return { body: markdown.trim() };
|
|
3302
|
+
const frontmatter = parseYamlObject(match[1]);
|
|
3303
|
+
const body = markdown.slice(match[0].length).trim();
|
|
3304
|
+
return { frontmatter, body };
|
|
3305
|
+
};
|
|
3306
|
+
var normalizeAllowedTools = (value) => {
|
|
3307
|
+
if (Array.isArray(value)) {
|
|
3308
|
+
return normalizeStringArray(value) ?? [];
|
|
3309
|
+
}
|
|
3310
|
+
if (typeof value === "string") {
|
|
3311
|
+
return value.split(/\s+/).map((item) => item.trim()).filter(Boolean);
|
|
3312
|
+
}
|
|
3313
|
+
return [];
|
|
3314
|
+
};
|
|
3315
|
+
var parseExternalSkillMarkdown = (markdown) => {
|
|
3316
|
+
const { frontmatter, body } = extractFrontmatter(markdown);
|
|
3317
|
+
return {
|
|
3318
|
+
name: asOptionalTrimmedString(frontmatter?.name),
|
|
3319
|
+
description: asOptionalTrimmedString(frontmatter?.description),
|
|
3320
|
+
compatibility: asOptionalTrimmedString(frontmatter?.compatibility),
|
|
3321
|
+
allowedTools: normalizeAllowedTools(frontmatter?.["allowed-tools"]),
|
|
3322
|
+
metadata: frontmatter?.metadata && typeof frontmatter.metadata === "object" ? Object.fromEntries(
|
|
3323
|
+
Object.entries(frontmatter.metadata).filter(([, value]) => typeof value === "string").map(([key, value]) => [key, String(value)])
|
|
3324
|
+
) : void 0,
|
|
3325
|
+
body
|
|
3326
|
+
};
|
|
3327
|
+
};
|
|
3328
|
+
|
|
3059
3329
|
export {
|
|
3060
|
-
|
|
3061
|
-
|
|
3330
|
+
normalizeStringArray,
|
|
3331
|
+
normalizeSkillModalities,
|
|
3332
|
+
parseSkillDocProtocol,
|
|
3333
|
+
resolvePageSkillMetadata,
|
|
3334
|
+
buildSkillDocMarkdown,
|
|
3335
|
+
parseExternalSkillMarkdown
|
|
3062
3336
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
patch,
|
|
3
3
|
read
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-AV6KQCM5.js";
|
|
5
5
|
import {
|
|
6
6
|
DEVICE_LOCAL_OWNER_ID,
|
|
7
7
|
isDeviceLocalSpaceBody,
|
|
8
8
|
selectIdentityUserId
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PYKV6FSC.js";
|
|
10
10
|
|
|
11
11
|
// packages/create/space/spaceKeys.ts
|
|
12
12
|
var SEPARATOR = "-";
|