nolo-cli 0.191.0-alpha.3 → 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.
- package/{_executeModel-WQ2D4ZRH.js → _executeModel-4HQQXPN4.js} +44 -46
- package/{action-BHWB4MOK.js → action-HNG2JKWK.js} +3 -3
- package/{addContentAction-BY375D35.js → addContentAction-FEN3H2EE.js} +6 -6
- package/{addDialogAgentAction-HOZYOCWC.js → addDialogAgentAction-DDA6S3WS.js} +5 -5
- package/{agentDeleteCommand-TTCVC74A.js → agentDeleteCommand-HZFWSKED.js} +57 -59
- package/{agentEmailCommands-PTG35KER.js → agentEmailCommands-HRYMVHC7.js} +59 -61
- package/{agentListCommands-MAG736RU.js → agentListCommands-HE2CCZEW.js} +33 -31
- package/{agentMachineCommands-ATOZK3R5.js → agentMachineCommands-ISSULCRR.js} +23 -23
- package/{agentProviderCommands-XSZUCNIR.js → agentProviderCommands-4EAYN3ZY.js} +3 -3
- package/{agentRecordCommands-KGRPIJN5.js → agentRecordCommands-WGAMWQLA.js} +57 -59
- package/{agentRunCommand-75VVJTNU.js → agentRunCommand-7EQ64FIB.js} +59 -61
- package/{agentRunControl-6HHESKDB.js → agentRunControl-EJPBPVLU.js} +5 -5
- package/{agentRuntimeLocal-NAAYNHCW.js → agentRuntimeLocal-ONSIOOQB.js} +20 -20
- package/{agentSlice-UJPIKKKP.js → agentSlice-CHWNVAS5.js} +6 -6
- package/{appDeleteCommands-VDHCDVBF.js → appDeleteCommands-RNAF4V5C.js} +25 -25
- package/{appDeployCommands-V6UTKVXR.js → appDeployCommands-LTIZ4QH7.js} +25 -25
- package/{appDeployStatusCommands-4UIFSEPC.js → appDeployStatusCommands-OJJR4LDK.js} +25 -25
- package/{appGetCommands-XKDXLC3C.js → appGetCommands-UJZF6U4V.js} +25 -25
- package/{appListCommands-BELRVX2Y.js → appListCommands-M5C5BIDY.js} +25 -25
- package/{authCommand-RV5MQDWN.js → authCommand-RMUBRAXF.js} +11 -11
- package/{builtinSkillRegistry-7MBUY5EY.js → builtinSkillRegistry-XDBPVNY6.js} +3 -5
- package/{chromeOpsCommands-C46BXHEE.js → chromeOpsCommands-P4PFQDT7.js} +19 -4
- package/{chunk-7UODCAWW.js → chunk-32GANJHJ.js} +1 -1
- package/{chunk-G6OOUQWJ.js → chunk-4KB6WQUL.js} +2 -0
- package/{chunk-LHOR5MC2.js → chunk-4KYV2TAI.js} +164 -323
- package/{chunk-5EFNSNAV.js → chunk-6CFXWUYE.js} +7 -7
- package/{chunk-6XIE5ZGI.js → chunk-6HIGYUBQ.js} +1 -1
- package/{chunk-LBXUNNDS.js → chunk-6K2AKJAD.js} +1 -1
- package/{chunk-U5ZHUOLT.js → chunk-6OBTQSJ2.js} +2 -2
- package/{chunk-XPL63OIC.js → chunk-7SUYSFPG.js} +140 -66
- package/{chunk-53RSTB7T.js → chunk-7TMVGMM3.js} +26 -31
- package/{chunk-ZBCBFOWC.js → chunk-A2ZMIRLN.js} +2 -2
- package/{chunk-MJWUBTK7.js → chunk-AOYR4XOA.js} +1 -1
- package/{chunk-IIX6VWLW.js → chunk-AV6IE6NM.js} +224 -38
- package/{chunk-WFUIXNKC.js → chunk-BMXR7CFX.js} +3 -3
- package/{chunk-JIFYXQRD.js → chunk-BTYQAODF.js} +26 -8
- package/{chunk-VHGD6FHV.js → chunk-BZKBX5BO.js} +28 -5
- package/{chunk-Q6RMLYSA.js → chunk-CMLBKYEI.js} +4 -2
- package/chunk-CMTTXP5Y.js +291 -0
- package/{chunk-OHRDHS4N.js → chunk-CVCRAO6Q.js} +9 -4
- package/{chunk-SM56M7N7.js → chunk-DBRXPVWY.js} +39 -5
- package/{chunk-2KBNF477.js → chunk-DSVR6ZAV.js} +30 -21
- package/{chunk-ADTJJVDJ.js → chunk-DXDG4XLD.js} +2838 -2255
- package/{chunk-R5LJWMZE.js → chunk-EMXVOJDB.js} +3 -3
- package/{chunk-KHCLMKZZ.js → chunk-EY7V7REW.js} +280 -6
- package/{chunk-KGP7UTNN.js → chunk-FNXSQ7A3.js} +15 -15
- package/{chunk-BTBT2566.js → chunk-FSEGCTZQ.js} +1 -1
- package/{chunk-CNMQATUF.js → chunk-GL7W7TTR.js} +2 -2
- package/{chunk-5KTQVMCX.js → chunk-GOO6G4PY.js} +85 -0
- package/{chunk-HTLIKE5U.js → chunk-GVMF62PR.js} +2 -2
- package/{chunk-UZHYRBUB.js → chunk-H4CFODT7.js} +137 -61
- package/{chunk-R4BMKAR5.js → chunk-HAB2UDLT.js} +1 -1
- package/{chunk-3NPXGNSK.js → chunk-HVXL4VOO.js} +348 -87
- package/{chunk-32ZKZET7.js → chunk-HWZT5DKX.js} +1 -1
- package/{chunk-GYVLAHA4.js → chunk-IY7DGZSY.js} +10 -4
- package/{chunk-FEDJHD5X.js → chunk-J5Z2SSIY.js} +6 -6
- package/{chunk-UVWBGWBO.js → chunk-JA6WCCDO.js} +3 -3
- package/{chunk-YE6A72XL.js → chunk-JI5MQU5B.js} +35 -31
- package/{chunk-TFSMPRAY.js → chunk-JLOCKFSI.js} +4 -4
- package/{chunk-UBLITLAZ.js → chunk-K2GL335R.js} +13 -3
- package/{chunk-DS5DAOIY.js → chunk-KYQXW7DL.js} +3 -3
- package/{chunk-5HAPEKNH.js → chunk-LFJRTOUV.js} +158 -43
- package/{chunk-N7E3LQ4A.js → chunk-LGW6A7GK.js} +1 -1
- package/{chunk-UNOILAZP.js → chunk-M6AGLVV4.js} +74 -2
- package/{chunk-BA2FHPS4.js → chunk-MOCY5LJI.js} +1 -1
- package/{chunk-INFHX73M.js → chunk-MR6L6U46.js} +55 -3
- package/{chunk-CTPFBJAF.js → chunk-N7IBYQEC.js} +182 -91
- package/{chunk-QU3TLYBR.js → chunk-NHI3JZP4.js} +32 -8
- package/{chunk-B2N5GZBU.js → chunk-OHYCQKPW.js} +6 -6
- package/{chunk-WAZ6BTSC.js → chunk-OOERQPG5.js} +1 -1
- package/{chunk-EHB4CKUI.js → chunk-OTKNEZE3.js} +9 -9
- package/chunk-OVBUUU7L.js +2648 -0
- package/{chunk-PVD7CRYV.js → chunk-P7SUBTGZ.js} +3 -3
- package/{chunk-RJ3EYB5G.js → chunk-PRIROPK4.js} +1 -1
- package/chunk-PRJ473FK.js +63 -0
- package/{chunk-K6TZSON4.js → chunk-PXERKNSJ.js} +1 -1
- package/{chunk-B6EZB6DW.js → chunk-QAYCF4CH.js} +2 -2
- package/{chunk-5DPVRMSY.js → chunk-RBJASUX4.js} +1 -1
- package/{chunk-NVOYW6H4.js → chunk-RDKNGJ5M.js} +12 -8
- package/{chunk-GTP6VNWH.js → chunk-RQ22OZD7.js} +3 -3
- package/{chunk-2E5M3JVS.js → chunk-RWGIVUH3.js} +11 -5
- package/{chunk-DFF6B7P7.js → chunk-RXUKDHS5.js} +1 -1
- package/{chunk-JLR5NWP2.js → chunk-RXX262QX.js} +17 -3
- package/{chunk-GC64WGMD.js → chunk-SM3NSZJV.js} +16 -5
- package/{chunk-A5BLRE3G.js → chunk-T3U2KQF4.js} +2 -2
- package/{chunk-HLAL63BZ.js → chunk-T43B7LB2.js} +1 -1
- package/{chunk-LCSAJ5TJ.js → chunk-UDKNC3CV.js} +3 -3
- package/{chunk-VE3FEZIT.js → chunk-WKGOIXFV.js} +5 -5
- package/{chunk-4YMD7B4Y.js → chunk-WPOKOKZA.js} +2 -2
- package/{chunk-YIRADHSY.js → chunk-WYKMOZTW.js} +1 -1
- package/{chunk-WRCZXJ4N.js → chunk-X4F26D5K.js} +2 -0
- package/{chunk-4MYCKDSI.js → chunk-XUOF4MA7.js} +2 -2
- package/{chunk-PD2YRFAI.js → chunk-Y5ZEHS3F.js} +1 -1
- package/{chunk-4CEAZRZ4.js → chunk-YU2DGFKG.js} +1 -1
- package/{chunk-TVGX5QIN.js → chunk-YUA6OAH5.js} +2 -2
- package/{chunk-53PBXLID.js → chunk-Z3MQYKRN.js} +17 -17
- package/{chunk-I3HWJODB.js → chunk-ZHOKF4MY.js} +31 -26
- package/{chunk-2XUOREKD.js → chunk-ZI5MFQ42.js} +5 -4
- package/{chunk-DYQXB46J.js → chunk-ZSCIGIJS.js} +1 -1
- package/{commandRegistry-4JHVRMW7.js → commandRegistry-O2657YC7.js} +86 -66
- package/{contentThunks-HQBAAXNW.js → contentThunks-THWDEBJU.js} +17 -17
- package/{cooldownCommands-4XKJFEBW.js → cooldownCommands-V4EEBD55.js} +3 -3
- package/{createAgentAutomationAction-KELPOVMP.js → createAgentAutomationAction-2ZZTFGWG.js} +17 -17
- package/{createDialogAction-Z3SASMTM.js → createDialogAction-FCRKPKIT.js} +20 -22
- package/{createPageAction-PNHOIG44.js → createPageAction-EC25JTKW.js} +18 -19
- package/{dbSlice-QAUXABCC.js → dbSlice-JK7LWBDO.js} +5 -5
- package/{deleteFile-R5OBP7OM.js → deleteFile-CE24BROO.js} +3 -3
- package/{dialogCommands-4BGV6DPD.js → dialogCommands-QH7BJ3DJ.js} +26 -26
- package/{dialogSlice-QHV6I3OQ.js → dialogSlice-Z5E7POEN.js} +16 -16
- package/{docCreateCommands-3CW75UF2.js → docCreateCommands-KP42NGIF.js} +26 -27
- package/{docDeleteCommands-NL4ZYMN5.js → docDeleteCommands-7YOCX5GC.js} +27 -28
- package/{docReadCommands-HXCNVDPQ.js → docReadCommands-EJEIAOKQ.js} +26 -27
- package/{docStore-LVMUSECS.js → docStore-6MHLMMWO.js} +6 -6
- package/{docUpdateCommands-RMVBAMDE.js → docUpdateCommands-ACJLISGA.js} +26 -27
- package/{getPricing-E2PLNWCR.js → getPricing-3PQY3TGI.js} +3 -3
- package/{handleSendMessageAction-7TONIXHY.js → handleSendMessageAction-MTOPN4D3.js} +86 -42
- package/index.js +7 -7
- package/{lib-4YTWAGY7.js → lib-5KKIBFIT.js} +439 -272
- package/{localRuntimeAdapter-HRAB7P5E.js → localRuntimeAdapter-4USQ3EP7.js} +55 -57
- package/{machineCommands-OTXFRTDA.js → machineCommands-CJMSDSOO.js} +56 -58
- package/{machineWsRunDispatch-KWVWOHHG.js → machineWsRunDispatch-YIPO76QH.js} +56 -58
- package/{memberThunks-ZAE52VIP.js → memberThunks-WT2KVRP4.js} +158 -55
- package/{models-UUNO6DOL.js → models-PJBE6JDV.js} +2 -2
- package/package.json +1 -1
- package/{providerPresetApply-JGNMO2KX.js → providerPresetApply-ISA35424.js} +5 -5
- package/{providerRegistry-33J3ZYFJ.js → providerRegistry-QIQCHVNP.js} +5 -5
- package/{read-D6NEWSGG.js → read-ILTT75DW.js} +3 -3
- package/{readDocTool-NTAXO7SX.js → readDocTool-374CFJYO.js} +1 -1
- package/{readlineWorkspace-CEX5TXGM.js → readlineWorkspace-RORGDWZN.js} +291 -99
- package/{removeDialogAgentAction-YEPO5AYI.js → removeDialogAgentAction-BDLO7UC2.js} +7 -7
- package/{runAgentClientLoop-DCV4BD2W.js → runAgentClientLoop-CDCBSUWW.js} +41 -43
- package/{runtimeDoctorCommands-NYBOTA6D.js → runtimeDoctorCommands-AM2V5YVH.js} +5 -5
- package/{secretCommands-N6CMCJDZ.js → secretCommands-G5XYCXZB.js} +308 -1
- package/{setDialogExtraReferencesAction-EH5GWDAJ.js → setDialogExtraReferencesAction-GBIT7WAG.js} +6 -6
- package/{setPrimaryDialogAgentAction-PNWRK6IY.js → setPrimaryDialogAgentAction-PGBTR247.js} +7 -7
- package/{settingThunks-7VCWB6P7.js → settingThunks-XQJZVA4D.js} +38 -7
- package/{skillDiscovery-F3TMVQOJ.js → skillDiscovery-DO5372J5.js} +2 -3
- package/{spaceCommands-ZUI4CTSO.js → spaceCommands-BTSANKDH.js} +23 -23
- package/{streamAgentChatTurn-NKFKMFQ2.js → streamAgentChatTurn-VUF3EUMS.js} +66 -59
- package/{switchDialogAgentAction-23BFWJMV.js → switchDialogAgentAction-O7WTPLKG.js} +5 -5
- package/{tools-626VXEY7.js → tools-GAAYAIEW.js} +35 -37
- package/{tuiSummaryLlmCaller-FSOADMXK.js → tuiSummaryLlmCaller-MKOLOSH3.js} +11 -11
- package/{updateCommands-KE6LP3QX.js → updateCommands-W7TXEV7N.js} +3 -3
- package/{updateDialogTitleAction-RNNQAMXG.js → updateDialogTitleAction-LE2DBQDS.js} +17 -17
- package/{windowsSelfUpdate-26TSFXEZ.js → windowsSelfUpdate-575VQ6QO.js} +2 -2
- package/chunk-7KWPNGVJ.js +0 -150
- package/chunk-AETZ7AD6.js +0 -274
- package/chunk-EUGTFFO6.js +0 -42
- package/chunk-VYNMQ6HW.js +0 -138
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveBuiltinCapability,
|
|
3
|
+
resolveBuiltinSkillEntry
|
|
4
|
+
} from "./chunk-LFJRTOUV.js";
|
|
5
|
+
import {
|
|
6
|
+
noloAgentId
|
|
7
|
+
} from "./chunk-Y6ORVLSS.js";
|
|
8
|
+
import {
|
|
9
|
+
normalizeServerOrigin
|
|
10
|
+
} from "./chunk-CF7PE763.js";
|
|
11
|
+
import {
|
|
12
|
+
asTrimmedNonEmptyStringArray
|
|
13
|
+
} from "./chunk-I42VC5KR.js";
|
|
14
|
+
|
|
15
|
+
// packages/ai/policy/types.ts
|
|
16
|
+
var DEFAULT_AGENT_BASE_POLICY = {
|
|
17
|
+
version: 1,
|
|
18
|
+
tone: {
|
|
19
|
+
preset: "default",
|
|
20
|
+
resolutionMode: "blend"
|
|
21
|
+
},
|
|
22
|
+
knowledgeCaptureMaxLevel: 4,
|
|
23
|
+
spaceContextMaxLevel: 4,
|
|
24
|
+
selfEvolutionMode: "knowledge_only"
|
|
25
|
+
};
|
|
26
|
+
var DEFAULT_USER_PREFERENCE_PROFILE = {
|
|
27
|
+
version: 1,
|
|
28
|
+
tone: {
|
|
29
|
+
preset: "default"
|
|
30
|
+
},
|
|
31
|
+
knowledgeCaptureLevel: 2,
|
|
32
|
+
spaceContextLevel: 3
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// packages/app/settings/settingTypes.ts
|
|
36
|
+
var SYSTEM_DEFAULT_AGENT_ID = "system-default";
|
|
37
|
+
|
|
38
|
+
// packages/app/settings/settingNormalizers.ts
|
|
39
|
+
var hasOwn = (target, key) => Object.prototype.hasOwnProperty.call(target, key);
|
|
40
|
+
var normalizeDefaultAgentIdSetting = (value) => {
|
|
41
|
+
if (typeof value !== "string" || value.trim() === "") {
|
|
42
|
+
return void 0;
|
|
43
|
+
}
|
|
44
|
+
return value === noloAgentId || value === SYSTEM_DEFAULT_AGENT_ID ? SYSTEM_DEFAULT_AGENT_ID : value;
|
|
45
|
+
};
|
|
46
|
+
var normalizeAuthorityHomeServerSetting = (value) => {
|
|
47
|
+
const normalized = normalizeServerOrigin(value);
|
|
48
|
+
return /^https?:\/\//i.test(normalized) ? normalized : null;
|
|
49
|
+
};
|
|
50
|
+
var normalizeTonePresetSetting = (value) => {
|
|
51
|
+
switch (value) {
|
|
52
|
+
case "professional":
|
|
53
|
+
case "friendly":
|
|
54
|
+
case "direct":
|
|
55
|
+
case "pragmatic":
|
|
56
|
+
case "default":
|
|
57
|
+
return value;
|
|
58
|
+
default:
|
|
59
|
+
return DEFAULT_USER_PREFERENCE_PROFILE.tone?.preset ?? "default";
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
var normalizePolicyLevelSetting = (value, fallback) => {
|
|
63
|
+
const n = Number(value);
|
|
64
|
+
if (n === 1 || n === 2 || n === 3 || n === 4) {
|
|
65
|
+
return n;
|
|
66
|
+
}
|
|
67
|
+
return fallback;
|
|
68
|
+
};
|
|
69
|
+
var resolveDefaultAgentIdSetting = (value) => normalizeDefaultAgentIdSetting(value) ?? SYSTEM_DEFAULT_AGENT_ID;
|
|
70
|
+
var omitKeys = (record, keys) => {
|
|
71
|
+
const next = { ...record };
|
|
72
|
+
keys.forEach((key) => {
|
|
73
|
+
delete next[key];
|
|
74
|
+
});
|
|
75
|
+
return next;
|
|
76
|
+
};
|
|
77
|
+
var isRecordLike = (v) => typeof v === "object" && v !== null && !Array.isArray(v);
|
|
78
|
+
var normalizeSystemBuiltinSkills = (value, defaults) => {
|
|
79
|
+
const base = isRecordLike(value) ? value : {};
|
|
80
|
+
const result = { ...defaults };
|
|
81
|
+
for (const key of Object.keys(base)) {
|
|
82
|
+
result[key] = Boolean(base[key]);
|
|
83
|
+
}
|
|
84
|
+
return result;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// packages/ai/tools/agentSkillConfig.ts
|
|
88
|
+
var MODES = [
|
|
89
|
+
"required",
|
|
90
|
+
"recommended",
|
|
91
|
+
"disabled"
|
|
92
|
+
];
|
|
93
|
+
var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
|
|
94
|
+
"worktree-isolation",
|
|
95
|
+
"systematic-investigation",
|
|
96
|
+
"show-me",
|
|
97
|
+
// 凭据管理:仓库已有 nolo secret(set/list/run/bind),但技能发现只扫
|
|
98
|
+
// `.agents/skills`,内置的 secrets-manager 不会出现在"可用技能"里。放进默认
|
|
99
|
+
// 提示名单让它至少以一行提示出现(不授工具、不放宽权限)。
|
|
100
|
+
"secrets-manager"
|
|
101
|
+
];
|
|
102
|
+
var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
|
|
103
|
+
var resolveAgentSkillConfig = (source) => {
|
|
104
|
+
const out = {};
|
|
105
|
+
const skills = source?.skills;
|
|
106
|
+
if (skills && typeof skills === "object" && !Array.isArray(skills)) {
|
|
107
|
+
for (const [rawSlug, rawMode] of Object.entries(skills)) {
|
|
108
|
+
const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
|
|
109
|
+
const mode = asMode(rawMode);
|
|
110
|
+
if (slug && mode) out[slug] = mode;
|
|
111
|
+
}
|
|
112
|
+
return out;
|
|
113
|
+
}
|
|
114
|
+
for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
|
|
115
|
+
out[slug] = "required";
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
};
|
|
119
|
+
var resolveAgentRequiredPackIds = (source) => {
|
|
120
|
+
const config = resolveAgentSkillConfig(source);
|
|
121
|
+
return Object.keys(config).filter((slug) => config[slug] === "required");
|
|
122
|
+
};
|
|
123
|
+
var resolveAgentRecommendedSkillNames = (source, lookup) => {
|
|
124
|
+
const config = resolveAgentSkillConfig(source);
|
|
125
|
+
const resolve = lookup ?? defaultSkillTitleLookup;
|
|
126
|
+
const seen = /* @__PURE__ */ new Set();
|
|
127
|
+
const out = [];
|
|
128
|
+
const push = (slug) => {
|
|
129
|
+
const title = resolve(slug)?.title || slug;
|
|
130
|
+
if (seen.has(title)) return;
|
|
131
|
+
seen.add(title);
|
|
132
|
+
out.push(title);
|
|
133
|
+
};
|
|
134
|
+
for (const slug of Object.keys(config)) {
|
|
135
|
+
if (config[slug] !== "recommended") continue;
|
|
136
|
+
push(slug);
|
|
137
|
+
}
|
|
138
|
+
for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
|
|
139
|
+
if (Object.hasOwn(config, slug)) continue;
|
|
140
|
+
push(slug);
|
|
141
|
+
}
|
|
142
|
+
return out;
|
|
143
|
+
};
|
|
144
|
+
var defaultSkillTitleLookup = (slug) => {
|
|
145
|
+
const cap = resolveBuiltinCapability(slug);
|
|
146
|
+
if (cap) return { title: cap.title };
|
|
147
|
+
const skill = resolveBuiltinSkillEntry(slug);
|
|
148
|
+
return skill ? { title: skill.title } : null;
|
|
149
|
+
};
|
|
150
|
+
var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
|
|
151
|
+
|
|
152
|
+
// packages/ai/skills/userPromptSkills.ts
|
|
153
|
+
var RECOMMENDED_PROMPT_SKILL_SLUGS = ["ub-mode"];
|
|
154
|
+
var ALLOWED_PROMPT_SKILL_SLUGS = new Set(
|
|
155
|
+
RECOMMENDED_PROMPT_SKILL_SLUGS
|
|
156
|
+
);
|
|
157
|
+
function normalizeEnabledPromptSkills(value) {
|
|
158
|
+
if (!Array.isArray(value)) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
const result = [];
|
|
162
|
+
const seen = /* @__PURE__ */ new Set();
|
|
163
|
+
for (const item of value) {
|
|
164
|
+
if (typeof item !== "string") {
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const trimmed = item.trim();
|
|
168
|
+
if (ALLOWED_PROMPT_SKILL_SLUGS.has(trimmed) && !seen.has(trimmed)) {
|
|
169
|
+
seen.add(trimmed);
|
|
170
|
+
result.push(trimmed);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// packages/ai/skills/userSkills.ts
|
|
177
|
+
var SUPPORTED_USER_SKILL_SLUGS = [
|
|
178
|
+
"ub-mode",
|
|
179
|
+
"auto-review",
|
|
180
|
+
"code-style",
|
|
181
|
+
"worktree-isolation",
|
|
182
|
+
"systematic-investigation",
|
|
183
|
+
"show-me",
|
|
184
|
+
"caveman",
|
|
185
|
+
"secrets-manager",
|
|
186
|
+
"skill-creator",
|
|
187
|
+
"code-planning",
|
|
188
|
+
"coding",
|
|
189
|
+
"coding-review"
|
|
190
|
+
];
|
|
191
|
+
var SUPPORTED_USER_SKILL_SLUG_SET = new Set(
|
|
192
|
+
SUPPORTED_USER_SKILL_SLUGS
|
|
193
|
+
);
|
|
194
|
+
function normalizeEnabledSkills(value) {
|
|
195
|
+
if (!Array.isArray(value)) {
|
|
196
|
+
return [];
|
|
197
|
+
}
|
|
198
|
+
const result = [];
|
|
199
|
+
const seen = /* @__PURE__ */ new Set();
|
|
200
|
+
for (const item of value) {
|
|
201
|
+
if (typeof item !== "string") {
|
|
202
|
+
continue;
|
|
203
|
+
}
|
|
204
|
+
const trimmed = item.trim();
|
|
205
|
+
if (SUPPORTED_USER_SKILL_SLUG_SET.has(trimmed) && !seen.has(trimmed)) {
|
|
206
|
+
seen.add(trimmed);
|
|
207
|
+
result.push(trimmed);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return result;
|
|
211
|
+
}
|
|
212
|
+
function resolveUserEnabledSkills(preferences) {
|
|
213
|
+
if (!preferences || typeof preferences !== "object") {
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
if (Object.prototype.hasOwnProperty.call(preferences, "enabledSkills")) {
|
|
217
|
+
return normalizeEnabledSkills(preferences.enabledSkills);
|
|
218
|
+
}
|
|
219
|
+
if (Object.prototype.hasOwnProperty.call(preferences, "enabledPromptSkills")) {
|
|
220
|
+
const legacy = normalizeEnabledPromptSkills(preferences.enabledPromptSkills);
|
|
221
|
+
return legacy.filter((slug) => SUPPORTED_USER_SKILL_SLUG_SET.has(slug));
|
|
222
|
+
}
|
|
223
|
+
return [];
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// packages/ai/policy/selfUpdateFields.ts
|
|
227
|
+
var AGENT_UPDATE_FIELD_NAMES = [
|
|
228
|
+
"name",
|
|
229
|
+
"handle",
|
|
230
|
+
"model",
|
|
231
|
+
"provider",
|
|
232
|
+
"prompt",
|
|
233
|
+
"introduction",
|
|
234
|
+
"greeting",
|
|
235
|
+
"isPublic",
|
|
236
|
+
"tags",
|
|
237
|
+
"tools",
|
|
238
|
+
"references",
|
|
239
|
+
"temperature",
|
|
240
|
+
"top_p",
|
|
241
|
+
"frequency_penalty",
|
|
242
|
+
"presence_penalty",
|
|
243
|
+
"max_tokens",
|
|
244
|
+
"reasoning_effort"
|
|
245
|
+
];
|
|
246
|
+
var PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS = [
|
|
247
|
+
"greeting",
|
|
248
|
+
"introduction",
|
|
249
|
+
"tags"
|
|
250
|
+
];
|
|
251
|
+
var DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS = [
|
|
252
|
+
...PRIMARY_AUTO_APPROVE_SELF_UPDATE_FIELDS
|
|
253
|
+
];
|
|
254
|
+
var VALID_AGENT_UPDATE_FIELDS = new Set(AGENT_UPDATE_FIELD_NAMES);
|
|
255
|
+
var normalizeAgentUpdateFieldList = (value, fallback = DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS) => {
|
|
256
|
+
if (!Array.isArray(value)) {
|
|
257
|
+
return [...fallback];
|
|
258
|
+
}
|
|
259
|
+
const normalized = Array.from(
|
|
260
|
+
new Set(
|
|
261
|
+
value.filter(
|
|
262
|
+
(item) => typeof item === "string" && VALID_AGENT_UPDATE_FIELDS.has(item)
|
|
263
|
+
)
|
|
264
|
+
)
|
|
265
|
+
);
|
|
266
|
+
return normalized;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
export {
|
|
270
|
+
resolveAgentSkillConfig,
|
|
271
|
+
resolveAgentRequiredPackIds,
|
|
272
|
+
resolveAgentRecommendedSkillNames,
|
|
273
|
+
isAgentSkillDisabled,
|
|
274
|
+
DEFAULT_AGENT_BASE_POLICY,
|
|
275
|
+
DEFAULT_USER_PREFERENCE_PROFILE,
|
|
276
|
+
AGENT_UPDATE_FIELD_NAMES,
|
|
277
|
+
DEFAULT_AUTO_APPROVED_SELF_UPDATE_FIELDS,
|
|
278
|
+
normalizeAgentUpdateFieldList,
|
|
279
|
+
SYSTEM_DEFAULT_AGENT_ID,
|
|
280
|
+
hasOwn,
|
|
281
|
+
normalizeDefaultAgentIdSetting,
|
|
282
|
+
normalizeAuthorityHomeServerSetting,
|
|
283
|
+
normalizeTonePresetSetting,
|
|
284
|
+
normalizePolicyLevelSetting,
|
|
285
|
+
resolveDefaultAgentIdSetting,
|
|
286
|
+
omitKeys,
|
|
287
|
+
normalizeSystemBuiltinSkills,
|
|
288
|
+
normalizeEnabledPromptSkills,
|
|
289
|
+
normalizeEnabledSkills,
|
|
290
|
+
resolveUserEnabledSkills
|
|
291
|
+
};
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./chunk-E2BESSAW.js";
|
|
11
11
|
import {
|
|
12
12
|
getModelContextWindow
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-BTYQAODF.js";
|
|
14
14
|
import {
|
|
15
15
|
isRecord
|
|
16
16
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
PLATFORM_HOSTED_KIMI_K3_MODEL,
|
|
22
22
|
isFireworksKimiModel,
|
|
23
23
|
isNoloHostedProvider
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-GOO6G4PY.js";
|
|
25
25
|
import {
|
|
26
26
|
asTrimmedLowercaseString
|
|
27
27
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -914,7 +914,8 @@ var STREAM_USAGE_PROVIDERS = /* @__PURE__ */ new Set([
|
|
|
914
914
|
// prompt_tokens_details.cached_tokens.
|
|
915
915
|
"opendesign",
|
|
916
916
|
"opencode",
|
|
917
|
-
"opencode-go"
|
|
917
|
+
"opencode-go",
|
|
918
|
+
"longcat"
|
|
918
919
|
]);
|
|
919
920
|
var KIMI_CODE_ENDPOINT_MARKER = "api.kimi.com";
|
|
920
921
|
function extractHostname(endpoint) {
|
|
@@ -929,10 +930,14 @@ var isMiniMaxEndpoint = (endpoint) => {
|
|
|
929
930
|
const host = extractHostname(endpoint);
|
|
930
931
|
return host === "api.minimaxi.com" || host === "api.minimax.chat";
|
|
931
932
|
};
|
|
933
|
+
var isLongCatEndpoint = (endpoint) => {
|
|
934
|
+
const host = extractHostname(endpoint);
|
|
935
|
+
return host === "api.longcat.chat" || host === "api.longcat.ai";
|
|
936
|
+
};
|
|
932
937
|
var isSupportedCustomEndpoint = (endpoint) => {
|
|
933
938
|
if (typeof endpoint !== "string") return false;
|
|
934
939
|
const ep = endpoint.toLowerCase();
|
|
935
|
-
return isMiniMaxEndpoint(endpoint) || ep.includes(KIMI_CODE_ENDPOINT_MARKER) || ep.includes("open-design.ai") || ep.includes("opencode.ai") || isOllamaEndpoint(endpoint);
|
|
940
|
+
return isMiniMaxEndpoint(endpoint) || isLongCatEndpoint(endpoint) || ep.includes(KIMI_CODE_ENDPOINT_MARKER) || ep.includes("open-design.ai") || ep.includes("opencode.ai") || isOllamaEndpoint(endpoint);
|
|
936
941
|
};
|
|
937
942
|
var EXTRA_USAGE_FIELD_PROVIDERS = /* @__PURE__ */ new Set(["openrouter"]);
|
|
938
943
|
var normalizeProviderName = (providerName) => asTrimmedLowercaseString(providerName);
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SYSTEM_AGENT_CAPABILITIES,
|
|
3
|
-
SYSTEM_AGENT_CAPABILITY_IDS
|
|
4
|
-
} from "./chunk-EUGTFFO6.js";
|
|
5
1
|
import {
|
|
6
2
|
buildSkillDocMarkdown
|
|
7
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-EY7V7REW.js";
|
|
8
4
|
import {
|
|
9
5
|
CHROME_CONNECTOR_ACCEPTED_TOOL_NAMES
|
|
10
6
|
} from "./chunk-ZC3CMUKU.js";
|
|
@@ -12,6 +8,43 @@ import {
|
|
|
12
8
|
createKey
|
|
13
9
|
} from "./chunk-ECX3NKRD.js";
|
|
14
10
|
|
|
11
|
+
// packages/ai/tools/agentCapabilities.ts
|
|
12
|
+
var SYSTEM_AGENT_CAPABILITIES = [
|
|
13
|
+
{
|
|
14
|
+
id: "web-search",
|
|
15
|
+
label: "\u8054\u7F51\u641C\u7D22",
|
|
16
|
+
description: "\u8BA9 agent \u80FD\u641C\u7D22\u4E92\u8054\u7F51\u3001\u6293\u53D6\u7F51\u9875\u5185\u5BB9\uFF0C\u83B7\u53D6\u6700\u65B0\u4FE1\u606F\u3002",
|
|
17
|
+
tools: ["exa_search", "fetchWebpage"],
|
|
18
|
+
defaultEnabled: true,
|
|
19
|
+
icon: "\u{1F310}"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "web-scrape",
|
|
23
|
+
label: "\u6DF1\u5EA6\u7F51\u9875\u6293\u53D6",
|
|
24
|
+
description: "\u5728\u666E\u901A\u8054\u7F51\u641C\u7D22\u4E4B\u5916\uFF0C\u7528 Firecrawl \u505A\u7ED3\u6784\u5316\u641C\u7D22\u4E0E\u6574\u9875\u6293\u53D6\uFF0C\u9002\u5408\u9700\u8981\u5B8C\u6574\u6B63\u6587\u3001\u6587\u6863\u7AD9\u70B9\u6216\u7AD9\u5185\u68C0\u7D22\u7684\u573A\u666F\u3002",
|
|
25
|
+
tools: ["firecrawl_search", "firecrawl_scrape"],
|
|
26
|
+
defaultEnabled: false,
|
|
27
|
+
icon: "\u{1F578}\uFE0F"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "agent-orchestration",
|
|
31
|
+
label: "\u591A agent \u7F16\u6392",
|
|
32
|
+
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",
|
|
33
|
+
tools: ["startAgentRun", "controlAgentRun", "listAgents", "listRuntimes"],
|
|
34
|
+
defaultEnabled: true,
|
|
35
|
+
icon: "\u{1F9E9}"
|
|
36
|
+
}
|
|
37
|
+
];
|
|
38
|
+
var SYSTEM_AGENT_CAPABILITY_IDS = SYSTEM_AGENT_CAPABILITIES.map(
|
|
39
|
+
({ id }) => id
|
|
40
|
+
);
|
|
41
|
+
var DEFAULT_SYSTEM_AGENT_CAPABILITIES = Object.fromEntries(
|
|
42
|
+
SYSTEM_AGENT_CAPABILITIES.map(({ id, defaultEnabled }) => [
|
|
43
|
+
id,
|
|
44
|
+
defaultEnabled
|
|
45
|
+
])
|
|
46
|
+
);
|
|
47
|
+
|
|
15
48
|
// packages/ai/tools/codeWorkDiscipline.ts
|
|
16
49
|
var CODE_WORK_DISCIPLINE_BODY = `## \u6548\u7387\u4F18\u5148\uFF08\u7701 token\uFF09
|
|
17
50
|
- \u4E0D\u590D\u8FF0\u9700\u6C42\u3001\u4E0D\u89E3\u91CA\u300C\u6253\u7B97\u600E\u4E48\u505A\u300D\uFF0C\u76F4\u63A5\u52A8\u624B\uFF1B\u6539\u5B8C\u4E00\u4E24\u53E5\u8BDD\u8BF4\u6E05\u300C\u6539\u4E86\u4EC0\u4E48\u3001\u53BB\u54EA\u770B\u300D\u3002\u601D\u8003\u7B80\u77ED\u3002
|
|
@@ -578,6 +611,7 @@ ${def.description}`,
|
|
|
578
611
|
}
|
|
579
612
|
|
|
580
613
|
export {
|
|
614
|
+
DEFAULT_SYSTEM_AGENT_CAPABILITIES,
|
|
581
615
|
buildCodeWorkDiscipline,
|
|
582
616
|
TOOL_PACKS,
|
|
583
617
|
CAPABILITY_PACKS,
|
|
@@ -1,29 +1,31 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildStaticUserPolicyContext,
|
|
3
3
|
resolveSpaceContextPreloadPlan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-MR6L6U46.js";
|
|
5
5
|
import {
|
|
6
6
|
fetchReferenceContents,
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-J5Z2SSIY.js";
|
|
11
11
|
import {
|
|
12
12
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
13
|
getAllToolRuns,
|
|
14
14
|
parseUiCard,
|
|
15
|
-
resolveAgentRecommendedSkillNames,
|
|
16
|
-
resolveAgentRequiredPackIds,
|
|
17
15
|
selectAiRecentContentLimit,
|
|
18
16
|
selectGlobalPrompt,
|
|
19
17
|
selectKnowledgeCaptureLevel,
|
|
20
18
|
selectSpaceContextLevel,
|
|
21
19
|
selectUserTonePreset,
|
|
22
20
|
uiCardFallback
|
|
23
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-HVXL4VOO.js";
|
|
22
|
+
import {
|
|
23
|
+
resolveAgentRecommendedSkillNames,
|
|
24
|
+
resolveAgentRequiredPackIds
|
|
25
|
+
} from "./chunk-CMTTXP5Y.js";
|
|
24
26
|
import {
|
|
25
27
|
getDocState
|
|
26
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-KYQXW7DL.js";
|
|
27
29
|
import {
|
|
28
30
|
resolveToolBaseUrl
|
|
29
31
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -32,10 +34,10 @@ import {
|
|
|
32
34
|
getModelPricing,
|
|
33
35
|
getPrices,
|
|
34
36
|
hasExplicitAgentPricing
|
|
35
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-A2ZMIRLN.js";
|
|
36
38
|
import {
|
|
37
39
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-6CFXWUYE.js";
|
|
39
41
|
import {
|
|
40
42
|
getCurrentSpaceIdRaw,
|
|
41
43
|
getViewMode
|
|
@@ -44,14 +46,14 @@ import {
|
|
|
44
46
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
45
47
|
buildPersonalizationDialogPolicyContext,
|
|
46
48
|
selectAllMsgs
|
|
47
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JI5MQU5B.js";
|
|
48
50
|
import {
|
|
49
51
|
selectPendingFiles
|
|
50
52
|
} from "./chunk-OWYYDMGJ.js";
|
|
51
53
|
import {
|
|
52
54
|
read,
|
|
53
55
|
selectById
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-OHYCQKPW.js";
|
|
55
57
|
import {
|
|
56
58
|
getSessionSnapshotForState,
|
|
57
59
|
selectIdentityUserBalance,
|
|
@@ -66,7 +68,7 @@ import {
|
|
|
66
68
|
expandEnabledPackPromptPatches,
|
|
67
69
|
expandEnabledPacks,
|
|
68
70
|
resolveEffectiveEnabledPacks
|
|
69
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-DBRXPVWY.js";
|
|
70
72
|
import {
|
|
71
73
|
projectToolMessageContent
|
|
72
74
|
} from "./chunk-2WZXXAQD.js";
|
|
@@ -76,11 +78,11 @@ import {
|
|
|
76
78
|
} from "./chunk-WJZOQR2J.js";
|
|
77
79
|
import {
|
|
78
80
|
extractReferenceKeysFromMessage
|
|
79
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-PXERKNSJ.js";
|
|
80
82
|
import {
|
|
81
83
|
getModelContextWindow,
|
|
82
84
|
planContextUsage
|
|
83
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-BTYQAODF.js";
|
|
84
86
|
import {
|
|
85
87
|
asRecordOrEmpty
|
|
86
88
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -90,7 +92,7 @@ import {
|
|
|
90
92
|
import {
|
|
91
93
|
buildLinkedSpacesSection,
|
|
92
94
|
buildSpaceContextLayer
|
|
93
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-CMLBKYEI.js";
|
|
94
96
|
import {
|
|
95
97
|
canonicalizeToolNames,
|
|
96
98
|
prioritizeToolNames
|
|
@@ -104,7 +106,7 @@ import {
|
|
|
104
106
|
import {
|
|
105
107
|
getModelConfig,
|
|
106
108
|
getProviderByModelName
|
|
107
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-SM3NSZJV.js";
|
|
108
110
|
import {
|
|
109
111
|
isRecord
|
|
110
112
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -1255,7 +1257,7 @@ ${content}
|
|
|
1255
1257
|
var validateAccessAndBalance = (agentConfig, state) => {
|
|
1256
1258
|
const userBalance = selectIdentityUserBalance(state);
|
|
1257
1259
|
const currentUserId = selectIdentityUserId(state);
|
|
1258
|
-
const isCustomApi = agentConfig.apiSource === "custom";
|
|
1260
|
+
const isCustomApi = agentConfig.apiSource === "custom" || Boolean(agentConfig.customProviderUrl);
|
|
1259
1261
|
const isCliApi = agentConfig.apiSource === "cli";
|
|
1260
1262
|
const isDeviceLocalOwner = agentConfig.userId === "local" && !currentUserId;
|
|
1261
1263
|
const isOwner = isDeviceLocalOwner || Boolean(currentUserId) && agentConfig.userId === currentUserId;
|
|
@@ -1477,7 +1479,9 @@ var mergeContexts = (staticCtx, dynamicCtx) => ({
|
|
|
1477
1479
|
dialogSummary: dynamicCtx.dialogSummary,
|
|
1478
1480
|
referenceKeys: dynamicCtx.referenceKeys
|
|
1479
1481
|
});
|
|
1480
|
-
var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools, runtimeOptions, state) => {
|
|
1482
|
+
var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools, runtimeOptions, state, accountSkillRuntime) => {
|
|
1483
|
+
const userSkills = agentConfig.runtimePromptAlreadyInMessages ? null : accountSkillRuntime;
|
|
1484
|
+
const userSkillPromptPatches = userSkills?.skillPromptPatches ?? [];
|
|
1481
1485
|
const rawBaseTools = Array.isArray(agentConfig.tools) ? agentConfig.tools : [];
|
|
1482
1486
|
const agentEnabledPacks = resolveAgentRequiredPackIds(agentConfig);
|
|
1483
1487
|
const isInlineArtifact = isInlineVisualArtifactAgent(agentConfig);
|
|
@@ -1491,20 +1495,22 @@ var mergeAgentToolsWithRuntime = (agentConfig, referencedTools, mentionedTools,
|
|
|
1491
1495
|
);
|
|
1492
1496
|
const baseTools = canonicalizeToolNames(expandedPackTools);
|
|
1493
1497
|
const requiredSkillTools = canonicalizeToolNames(
|
|
1494
|
-
agentConfig.referencedTools ?? []
|
|
1498
|
+
[...agentConfig.referencedTools ?? [], ...userSkills?.requiredTools ?? []]
|
|
1495
1499
|
);
|
|
1496
1500
|
const recommendedSkillTools = canonicalizeToolNames(
|
|
1497
|
-
agentConfig.recommendedSkillTools ?? []
|
|
1501
|
+
[...agentConfig.recommendedSkillTools ?? [], ...userSkills?.recommendedTools ?? []]
|
|
1498
1502
|
);
|
|
1499
1503
|
const recommendedSkillHints = [
|
|
1500
1504
|
.../* @__PURE__ */ new Set([
|
|
1501
1505
|
...asNonEmptyStringArray(agentConfig.recommendedSkillHints),
|
|
1502
|
-
...resolveAgentRecommendedSkillNames(agentConfig)
|
|
1506
|
+
...resolveAgentRecommendedSkillNames(agentConfig),
|
|
1507
|
+
...userSkills?.recommendedSkillHints ?? []
|
|
1503
1508
|
])
|
|
1504
1509
|
];
|
|
1505
1510
|
const skillPromptPatches = [
|
|
1506
1511
|
.../* @__PURE__ */ new Set([
|
|
1507
1512
|
...asNonEmptyStringArray(agentConfig.skillPromptPatches),
|
|
1513
|
+
...userSkillPromptPatches,
|
|
1508
1514
|
// 能力包的 promptPatch(方法论文档)与 skill reference 的 patch 走同一条
|
|
1509
1515
|
// 注入链(buildSkillGuidanceBlock → buildSkillGuidancePromptBlock),
|
|
1510
1516
|
// 让「工具 + 配套纪律」作为一个能力包整体注入 system prompt。
|
|
@@ -1716,7 +1722,10 @@ async function resolveTurnToolContext(input) {
|
|
|
1716
1722
|
const mentionedToolNames = canonicalizeToolNames(mentionResult.toolNames);
|
|
1717
1723
|
const agentRefs = Array.isArray(input.agentConfig?.references) ? input.agentConfig.references : [];
|
|
1718
1724
|
const dialogExtraRefs = Array.isArray(input.dialogConfig?.extraReferences) ? input.dialogConfig.extraReferences : [];
|
|
1719
|
-
const mergedReferences = mergeReferences(
|
|
1725
|
+
const mergedReferences = mergeReferences(
|
|
1726
|
+
mergeReferences(agentRefs, dialogExtraRefs),
|
|
1727
|
+
input.ephemeralReferences
|
|
1728
|
+
);
|
|
1720
1729
|
let refAssets = {
|
|
1721
1730
|
references: [],
|
|
1722
1731
|
referencedTools: [],
|