nolo-cli 0.249.0-alpha.2 → 0.249.0-alpha.3
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-IJLWI2HH.js → _executeModel-SYM27HUD.js} +19 -19
- package/{agentDeleteCommand-ULJLNEHW.js → agentDeleteCommand-YYUUT3VD.js} +22 -22
- package/{agentEmailCommands-JATJHJJS.js → agentEmailCommands-XP7YQ7BU.js} +22 -22
- package/{agentListCommands-HQ6YW7ZE.js → agentListCommands-HH66IHCY.js} +10 -10
- package/{agentMachineCommands-U56PM7BR.js → agentMachineCommands-IRVQTGNI.js} +8 -8
- package/{agentRecordCommands-35VKRYFY.js → agentRecordCommands-R76M6MTR.js} +22 -22
- package/{agentRunCommand-MKM7DYNL.js → agentRunCommand-XPTHYPFG.js} +22 -22
- package/{agentRuntimeLocal-FIOWO47Y.js → agentRuntimeLocal-Y54MQRGC.js} +6 -6
- package/{agentSlice-5NJEWRIO.js → agentSlice-DJ2UBLBY.js} +1 -1
- package/{appDeleteCommands-NMU43D3Y.js → appDeleteCommands-TALGLXP7.js} +9 -9
- package/{appDeployCommands-ICYG4DB2.js → appDeployCommands-FB325NH3.js} +9 -9
- package/{appDeployStatusCommands-QBK3FXPB.js → appDeployStatusCommands-J22VJDEL.js} +9 -9
- package/{appGetCommands-C4ABVH3V.js → appGetCommands-FX3YL4PM.js} +9 -9
- package/{appListCommands-RQIKFAX6.js → appListCommands-IHEBCU4B.js} +9 -9
- package/{builtinSkillRegistry-VRCMQ77Q.js → builtinSkillRegistry-PFTTFPWW.js} +2 -1
- package/{chunk-2YV2QQND.js → chunk-27XDMKLC.js} +2 -2
- package/{chunk-YWPPXECC.js → chunk-3RKUVWJR.js} +5 -5
- package/{chunk-JEWMQR6J.js → chunk-3WHVE2XX.js} +1 -1
- package/{chunk-6MTVACLN.js → chunk-75TXQ4GY.js} +4 -38
- package/{chunk-PO7FTSGP.js → chunk-7WYOODTC.js} +8 -8
- package/{chunk-U4LYOYSA.js → chunk-ARBYAWUU.js} +16 -18
- package/{chunk-KQSX5NJX.js → chunk-BQODRNJZ.js} +7 -7
- package/{chunk-WFGNWWJI.js → chunk-CDIRKCPD.js} +141 -1
- package/{chunk-AK7V6IDG.js → chunk-CHF7CSRH.js} +4 -4
- package/{chunk-XCA4WHX5.js → chunk-CX5BGBCX.js} +1 -1
- package/{chunk-2XIREU2L.js → chunk-D3OMIZHK.js} +2 -2
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-P5Q24OJZ.js → chunk-FYOO6K4Q.js} +2 -2
- package/{chunk-PAWBC6HC.js → chunk-G3PPDR4Z.js} +7 -9
- package/{chunk-RR3MB26M.js → chunk-H772FXSL.js} +1 -1
- package/{chunk-CIUZXD5D.js → chunk-L4ES2RVY.js} +1 -1
- package/{chunk-7DOVWWXO.js → chunk-MDRSZMEN.js} +9 -9
- package/{chunk-Y4NPF2UN.js → chunk-MNXWT3GC.js} +3 -3
- package/{chunk-M7M5QM3I.js → chunk-ODSY5ZN5.js} +3 -3
- package/{chunk-5JZ7FFOO.js → chunk-OGPXS2MU.js} +8 -10
- package/{chunk-H7TICFO4.js → chunk-POXYLG52.js} +1 -1
- package/{chunk-34ZQTND7.js → chunk-PSX4M5MN.js} +3 -3
- package/{chunk-YK7OTNON.js → chunk-QQULDAF2.js} +2 -2
- package/{chunk-4P5ZLADR.js → chunk-S7WGN4OQ.js} +2 -2
- package/{chunk-4Q252GDP.js → chunk-TQNKPXBU.js} +2 -2
- package/{chunk-XSRSAU3O.js → chunk-UR4ZMRV3.js} +3 -3
- package/{chunk-EZ7Q2XPO.js → chunk-VKEWN2N3.js} +2 -2
- package/{chunk-7QZ2B7RL.js → chunk-VOWN2ZQI.js} +1 -1
- package/{chunk-OAZP4TSA.js → chunk-VZCBYCHV.js} +1 -1
- package/{chunk-4OXPN3WC.js → chunk-WMKA2DPK.js} +1 -1
- package/{chunk-UOUMPHS5.js → chunk-WMMKHEGQ.js} +1 -1
- package/{chunk-QMNVV3YM.js → chunk-YGDFZZ63.js} +1 -1
- package/{chunk-XFOZH7NP.js → chunk-YM6JCUPB.js} +16 -14
- package/{chunk-2BKNICGK.js → chunk-YM6L335H.js} +1 -1
- package/{chunk-OWLQL7CW.js → chunk-YZ335FWM.js} +3 -3
- package/{cliLocalAgentRecordReader-SA5LZVMI.js → cliLocalAgentRecordReader-QPSR26KD.js} +7 -7
- package/{commandRegistry-AFWOTN5H.js → commandRegistry-5IF4PD5L.js} +40 -40
- package/{contentThunks-3XFPEGLX.js → contentThunks-H24TZUZ6.js} +3 -3
- package/{createAgentAutomationAction-YLP5IJ26.js → createAgentAutomationAction-KIJOUKLE.js} +3 -3
- package/{createDialogAction-LV2RAA4A.js → createDialogAction-E732EJ6P.js} +4 -4
- package/{createPageAction-Q7WCMY4P.js → createPageAction-HG3EEYO3.js} +4 -4
- package/{dialogCommands-TFPF7PCC.js → dialogCommands-BH7HIYG2.js} +9 -9
- package/{dialogSlice-UPUUJMMH.js → dialogSlice-PLGRJCY6.js} +2 -2
- package/{docCreateCommands-7MWOJKEE.js → docCreateCommands-4I6MIRKZ.js} +8 -8
- package/{docDeleteCommands-UO3DFGTF.js → docDeleteCommands-4NTEIMGB.js} +9 -9
- package/{docReadCommands-RTZXLDMJ.js → docReadCommands-CTEYUSYM.js} +8 -8
- package/{docStore-KETXRY6J.js → docStore-PCVM6FBB.js} +1 -1
- package/{docUpdateCommands-BPHMJPJX.js → docUpdateCommands-PTEZXGWA.js} +8 -8
- package/{handleSendMessageAction-47XS4QHV.js → handleSendMessageAction-4SWUKGT7.js} +14 -14
- package/{hostCredentialCreate-ITXE4237.js → hostCredentialCreate-EQYEEYK5.js} +22 -22
- package/index.js +3 -3
- package/{localRuntimeAdapter-FCU7BQAX.js → localRuntimeAdapter-2DJAFTLV.js} +21 -21
- package/{machineCommands-B53U27WZ.js → machineCommands-SIJJKXV4.js} +22 -22
- package/{machineWsRunDispatch-ZBA55H5E.js → machineWsRunDispatch-7ZLO6TPK.js} +22 -22
- package/package.json +1 -1
- package/{projectArchive-GWJTAEK6.js → projectArchive-CKX6FZDS.js} +4 -4
- package/{readlineWorkspace-YFTXLYGM.js → readlineWorkspace-YTISMWZB.js} +28 -28
- package/{runAgentClientLoop-7GBH7I5H.js → runAgentClientLoop-ECLRPEOK.js} +17 -17
- package/{settingThunks-T4FXSV6M.js → settingThunks-IHXUF276.js} +3 -7
- package/{spaceCommands-DQZJ6GLU.js → spaceCommands-PJWMFCIP.js} +8 -8
- package/{streamAgentChatTurn-2QVGBCVC.js → streamAgentChatTurn-3MQZRUAN.js} +21 -21
- package/{tools-TL5UMV3N.js → tools-2WH7CKQP.js} +13 -13
- package/{updateDialogTitleAction-B3BLRMTZ.js → updateDialogTitleAction-WQOKXXUW.js} +3 -3
- package/chunk-YDRRGVT5.js +0 -142
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
import {
|
|
73
73
|
inlineImageUrlsForCustomProvider,
|
|
74
74
|
prepareTools
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-D3OMIZHK.js";
|
|
76
76
|
import {
|
|
77
77
|
getServerProviderSecret
|
|
78
78
|
} from "./chunk-HS7MLR74.js";
|
|
@@ -95,25 +95,25 @@ import {
|
|
|
95
95
|
resolveCliLocalSpawnDispatch,
|
|
96
96
|
resolveRunContextFacts,
|
|
97
97
|
resolveStartAgentRunCwd
|
|
98
|
-
} from "./chunk-
|
|
98
|
+
} from "./chunk-YM6JCUPB.js";
|
|
99
99
|
import {
|
|
100
100
|
deriveCredentialGroup,
|
|
101
101
|
deriveCustomProviderCredentialGroup
|
|
102
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-CX5BGBCX.js";
|
|
103
103
|
import {
|
|
104
104
|
resolveUserSkillRuntime
|
|
105
|
-
} from "./chunk-
|
|
105
|
+
} from "./chunk-UR4ZMRV3.js";
|
|
106
106
|
import {
|
|
107
107
|
normalizeEnabledPromptSkills,
|
|
108
108
|
resolveUserEnabledSkills
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-WMMKHEGQ.js";
|
|
110
110
|
import {
|
|
111
111
|
validateAskChoiceInput
|
|
112
|
-
} from "./chunk-
|
|
112
|
+
} from "./chunk-S7WGN4OQ.js";
|
|
113
113
|
import {
|
|
114
114
|
prepareTokenUsageData,
|
|
115
115
|
runKeyed
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-7WYOODTC.js";
|
|
117
117
|
import {
|
|
118
118
|
applyTokenUsageToDayStats,
|
|
119
119
|
require_format
|
|
@@ -124,7 +124,7 @@ import {
|
|
|
124
124
|
} from "./chunk-523DITKR.js";
|
|
125
125
|
import {
|
|
126
126
|
fetchServerSyncedCredential
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-YZ335FWM.js";
|
|
128
128
|
import {
|
|
129
129
|
defaultLoopbackRequest,
|
|
130
130
|
loadLocalRunChildDialogIds
|
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
CREDENTIAL_STORE_SESSION_FALLBACK_WARNING,
|
|
134
134
|
OAUTH_PROVIDER_REFS,
|
|
135
135
|
getSharedSessionCredentialBroker
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-L4ES2RVY.js";
|
|
137
137
|
import {
|
|
138
138
|
fetchWithTransientRetry,
|
|
139
139
|
isTransientFetchError
|
|
@@ -189,7 +189,7 @@ import {
|
|
|
189
189
|
readDialogMessageRecords,
|
|
190
190
|
readDialogMessages,
|
|
191
191
|
resolveBuiltinLocalCliAgentConfig
|
|
192
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-QQULDAF2.js";
|
|
193
193
|
import {
|
|
194
194
|
applyPublicAgentCatalogOverride
|
|
195
195
|
} from "./chunk-MZVCFV3T.js";
|
|
@@ -246,7 +246,7 @@ import {
|
|
|
246
246
|
runExecShellGates,
|
|
247
247
|
validateConfiguredRootExecutionLease,
|
|
248
248
|
verifyOwnerRouteAck
|
|
249
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-G3PPDR4Z.js";
|
|
250
250
|
import {
|
|
251
251
|
createHostCredentialBrokerChain,
|
|
252
252
|
createStrictHostCredentialBroker
|
|
@@ -285,7 +285,7 @@ import {
|
|
|
285
285
|
} from "./chunk-HNUWUO75.js";
|
|
286
286
|
import {
|
|
287
287
|
resolveAgentRuntimeConfigFromRecord
|
|
288
|
-
} from "./chunk-
|
|
288
|
+
} from "./chunk-WMKA2DPK.js";
|
|
289
289
|
import {
|
|
290
290
|
assertDispatchSelectionAdmission,
|
|
291
291
|
buildNoloWorkspaceOpenAiTools,
|
|
@@ -327,15 +327,13 @@ import {
|
|
|
327
327
|
withLiveImageSupport
|
|
328
328
|
} from "./chunk-SX6AWTNK.js";
|
|
329
329
|
import {
|
|
330
|
+
resolveAgentRequiredPackIds,
|
|
331
|
+
resolveAgentSkillConfig,
|
|
330
332
|
resolveHistoricalToolContentCap
|
|
331
|
-
} from "./chunk-
|
|
333
|
+
} from "./chunk-CDIRKCPD.js";
|
|
332
334
|
import {
|
|
333
335
|
resolveAgentCallPlan
|
|
334
336
|
} from "./chunk-VUHKG4KS.js";
|
|
335
|
-
import {
|
|
336
|
-
resolveAgentRequiredPackIds,
|
|
337
|
-
resolveAgentSkillConfig
|
|
338
|
-
} from "./chunk-YDRRGVT5.js";
|
|
339
337
|
import {
|
|
340
338
|
buildDialogFallbackTitleFromUserInput,
|
|
341
339
|
normalizeDialogTitle
|
|
@@ -413,7 +411,7 @@ import {
|
|
|
413
411
|
expandEnabledPacks,
|
|
414
412
|
resolveBuiltinSkillEntry,
|
|
415
413
|
resolveEffectiveEnabledPacks
|
|
416
|
-
} from "./chunk-
|
|
414
|
+
} from "./chunk-75TXQ4GY.js";
|
|
417
415
|
import {
|
|
418
416
|
DIALOG_AGENT_LIST_INDEX_PREFIX,
|
|
419
417
|
TOKEN_DIALOG_INDEX_PREFIX,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D3OMIZHK.js";
|
|
9
9
|
import {
|
|
10
10
|
CONFIRMATION_INPUT_KEYS,
|
|
11
11
|
INVALID_TOOL_ARGS_REPLACEMENT,
|
|
@@ -14,11 +14,11 @@ import {
|
|
|
14
14
|
performFetchRequest,
|
|
15
15
|
sanitizeOutboundMessages,
|
|
16
16
|
stripModelToolArgs
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CHF7CSRH.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YM6JCUPB.js";
|
|
22
22
|
import {
|
|
23
23
|
createSSEParser,
|
|
24
24
|
createToolRunId,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
toolRunSetPending,
|
|
28
28
|
toolRunStarted,
|
|
29
29
|
toolRunSucceeded
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-3RKUVWJR.js";
|
|
31
31
|
import {
|
|
32
32
|
addToolMessage,
|
|
33
33
|
messageStreamEnd,
|
|
@@ -35,10 +35,10 @@ import {
|
|
|
35
35
|
toast,
|
|
36
36
|
toolResultNeedsUserConfirmation,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-7WYOODTC.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-YZ335FWM.js";
|
|
42
42
|
import {
|
|
43
43
|
getCurrentSpaceId
|
|
44
44
|
} from "./chunk-FFFKAOJN.js";
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
isCompleteInstructionOutput,
|
|
94
94
|
sanitizeToolOutputText,
|
|
95
95
|
scrubSecrets
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-CDIRKCPD.js";
|
|
97
97
|
import {
|
|
98
98
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
99
99
|
} from "./chunk-LTVEOOZL.js";
|
|
@@ -1,3 +1,50 @@
|
|
|
1
|
+
import {
|
|
2
|
+
resolveBuiltinCapability,
|
|
3
|
+
resolveBuiltinSkillEntry
|
|
4
|
+
} from "./chunk-75TXQ4GY.js";
|
|
5
|
+
import {
|
|
6
|
+
asTrimmedNonEmptyStringArray
|
|
7
|
+
} from "./chunk-I42VC5KR.js";
|
|
8
|
+
|
|
9
|
+
// packages/core/agentSkillModes.ts
|
|
10
|
+
var AGENT_SKILL_MODES = [
|
|
11
|
+
"required",
|
|
12
|
+
"recommended",
|
|
13
|
+
"disabled"
|
|
14
|
+
];
|
|
15
|
+
var isAgentSkillMode = (value) => typeof value === "string" && AGENT_SKILL_MODES.includes(value);
|
|
16
|
+
var collectInvalidAgentSkillModes = (skills) => {
|
|
17
|
+
if (!skills || typeof skills !== "object" || Array.isArray(skills)) return [];
|
|
18
|
+
const out = [];
|
|
19
|
+
for (const [slug, value] of Object.entries(skills)) {
|
|
20
|
+
if (value === null) continue;
|
|
21
|
+
if (!isAgentSkillMode(value)) out.push({ slug, value });
|
|
22
|
+
}
|
|
23
|
+
return out;
|
|
24
|
+
};
|
|
25
|
+
var describeAgentSkillModeValue = (value) => {
|
|
26
|
+
let text;
|
|
27
|
+
if (typeof value === "string") {
|
|
28
|
+
text = JSON.stringify(value.length > 40 ? `${value.slice(0, 40)}\u2026` : value);
|
|
29
|
+
} else if (value === void 0) {
|
|
30
|
+
text = "undefined";
|
|
31
|
+
} else {
|
|
32
|
+
try {
|
|
33
|
+
const serialized = JSON.stringify(value);
|
|
34
|
+
text = typeof serialized === "string" ? serialized : String(value);
|
|
35
|
+
} catch {
|
|
36
|
+
text = typeof value;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return text.length > 60 ? `${text.slice(0, 60)}\u2026` : text;
|
|
40
|
+
};
|
|
41
|
+
var formatInvalidAgentSkillModeMessage = (invalid, allowed = AGENT_SKILL_MODES) => `Invalid agent skill mode for "${invalid.slug}": ${describeAgentSkillModeValue(invalid.value)}. Allowed values: ${allowed.join(", ")}.`;
|
|
42
|
+
var isAgentSkillModesFieldShapeValid = (skills) => {
|
|
43
|
+
if (skills === null || skills === void 0) return true;
|
|
44
|
+
return typeof skills === "object" && !Array.isArray(skills);
|
|
45
|
+
};
|
|
46
|
+
var formatInvalidAgentSkillModesFieldMessage = (allowed = AGENT_SKILL_MODES) => `Invalid agent skills field: expected an object mapping slug \u2192 mode (${allowed.join(" | ")}).`;
|
|
47
|
+
|
|
1
48
|
// packages/agent-runtime/toolOutputSanitizer.ts
|
|
2
49
|
var SANITIZE_REPLACEMENT_CHAR = "\uFFFD";
|
|
3
50
|
var MAX_CONTROL_SEQUENCE_CHARS = 256;
|
|
@@ -307,7 +354,95 @@ function clipToolText(content, maxChars, headRatio, marker = "\n\n[... tool outp
|
|
|
307
354
|
return `${normalized.slice(0, headChars)}${marker}${normalized.slice(-tailChars)}`;
|
|
308
355
|
}
|
|
309
356
|
|
|
357
|
+
// packages/ai/tools/agentSkillConfig.ts
|
|
358
|
+
var MODES = AGENT_SKILL_MODES;
|
|
359
|
+
var DEFAULT_RECOMMENDED_SKILL_SLUGS = [
|
|
360
|
+
// `worktree-isolation` 已上移为系统层固定前置(agent-runtime/worktreeIsolationPrelude),
|
|
361
|
+
// 不再依赖「相关技能」提示行被发现,也不再是用户可关项——见 skillExploreDirectory 的
|
|
362
|
+
// PLATFORM_CORE_SKILL_SLUGS。注册表解析与 legacy 读取保留。
|
|
363
|
+
"systematic-investigation",
|
|
364
|
+
"show-me",
|
|
365
|
+
// 凭据管理:仓库已有 nolo secret(set/list/run/bind),但技能发现只扫
|
|
366
|
+
// `.agents/skills`,内置的 secrets-manager 不会出现在"可用技能"里。放进默认
|
|
367
|
+
// 提示名单让它至少以一行提示出现(不授工具、不放宽权限)。
|
|
368
|
+
"secrets-manager"
|
|
369
|
+
];
|
|
370
|
+
var asMode = (value) => typeof value === "string" && MODES.includes(value) ? value : null;
|
|
371
|
+
var resolveAgentSkillConfig = (source) => {
|
|
372
|
+
const out = {};
|
|
373
|
+
const skills = source?.skills;
|
|
374
|
+
if (skills && typeof skills === "object" && !Array.isArray(skills)) {
|
|
375
|
+
for (const [rawSlug, rawMode] of Object.entries(skills)) {
|
|
376
|
+
const slug = typeof rawSlug === "string" ? rawSlug.trim() : "";
|
|
377
|
+
const mode = asMode(rawMode);
|
|
378
|
+
if (slug && mode) out[slug] = mode;
|
|
379
|
+
}
|
|
380
|
+
return out;
|
|
381
|
+
}
|
|
382
|
+
for (const slug of asTrimmedNonEmptyStringArray(source?.enabledPacks) ?? []) {
|
|
383
|
+
out[slug] = "required";
|
|
384
|
+
}
|
|
385
|
+
return out;
|
|
386
|
+
};
|
|
387
|
+
var collectAgentSkillConfigIssues = (source) => {
|
|
388
|
+
const issues = [];
|
|
389
|
+
const skills = source?.skills;
|
|
390
|
+
if (skills === void 0 || skills === null) return issues;
|
|
391
|
+
if (typeof skills !== "object" || Array.isArray(skills)) {
|
|
392
|
+
issues.push({ slug: "", value: skills, reason: "invalid-skills-field" });
|
|
393
|
+
return issues;
|
|
394
|
+
}
|
|
395
|
+
for (const [rawSlug, rawMode] of Object.entries(skills)) {
|
|
396
|
+
const slug = rawSlug.trim();
|
|
397
|
+
if (!slug) {
|
|
398
|
+
issues.push({ slug: rawSlug, value: rawMode, reason: "invalid-slug" });
|
|
399
|
+
continue;
|
|
400
|
+
}
|
|
401
|
+
if (!isAgentSkillMode(rawMode)) {
|
|
402
|
+
issues.push({ slug, value: rawMode, reason: "invalid-mode" });
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
return issues;
|
|
406
|
+
};
|
|
407
|
+
var resolveAgentRequiredPackIds = (source) => {
|
|
408
|
+
const config = resolveAgentSkillConfig(source);
|
|
409
|
+
return Object.keys(config).filter((slug) => config[slug] === "required");
|
|
410
|
+
};
|
|
411
|
+
var resolveAgentRecommendedSkillNames = (source, lookup) => {
|
|
412
|
+
const config = resolveAgentSkillConfig(source);
|
|
413
|
+
const resolve = lookup ?? defaultSkillTitleLookup;
|
|
414
|
+
const seen = /* @__PURE__ */ new Set();
|
|
415
|
+
const out = [];
|
|
416
|
+
const push = (slug) => {
|
|
417
|
+
const title = resolve(slug)?.title || slug;
|
|
418
|
+
if (seen.has(title)) return;
|
|
419
|
+
seen.add(title);
|
|
420
|
+
out.push(title);
|
|
421
|
+
};
|
|
422
|
+
for (const slug of Object.keys(config)) {
|
|
423
|
+
if (config[slug] !== "recommended") continue;
|
|
424
|
+
push(slug);
|
|
425
|
+
}
|
|
426
|
+
for (const slug of DEFAULT_RECOMMENDED_SKILL_SLUGS) {
|
|
427
|
+
if (Object.hasOwn(config, slug)) continue;
|
|
428
|
+
push(slug);
|
|
429
|
+
}
|
|
430
|
+
return out;
|
|
431
|
+
};
|
|
432
|
+
var defaultSkillTitleLookup = (slug) => {
|
|
433
|
+
const cap = resolveBuiltinCapability(slug);
|
|
434
|
+
if (cap) return { title: cap.title };
|
|
435
|
+
const skill = resolveBuiltinSkillEntry(slug);
|
|
436
|
+
return skill ? { title: skill.title } : null;
|
|
437
|
+
};
|
|
438
|
+
var isAgentSkillDisabled = (source, slug) => resolveAgentSkillConfig(source)[slug] === "disabled";
|
|
439
|
+
|
|
310
440
|
export {
|
|
441
|
+
collectInvalidAgentSkillModes,
|
|
442
|
+
describeAgentSkillModeValue,
|
|
443
|
+
formatInvalidAgentSkillModeMessage,
|
|
444
|
+
isAgentSkillModesFieldShapeValid,
|
|
445
|
+
formatInvalidAgentSkillModesFieldMessage,
|
|
311
446
|
sanitizeToolOutputText,
|
|
312
447
|
sanitizeToolOutputContent,
|
|
313
448
|
SECRET_PATTERNS,
|
|
@@ -322,5 +457,10 @@ export {
|
|
|
322
457
|
resolveToolOutputProfile,
|
|
323
458
|
resolveHistoricalToolContentCap,
|
|
324
459
|
projectToolMessageContent,
|
|
325
|
-
clipToolText
|
|
460
|
+
clipToolText,
|
|
461
|
+
resolveAgentSkillConfig,
|
|
462
|
+
collectAgentSkillConfigIssues,
|
|
463
|
+
resolveAgentRequiredPackIds,
|
|
464
|
+
resolveAgentRecommendedSkillNames,
|
|
465
|
+
isAgentSkillDisabled
|
|
326
466
|
};
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk-HS7MLR74.js";
|
|
4
4
|
import {
|
|
5
5
|
performServerProxyFetchWithRetry
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PSX4M5MN.js";
|
|
7
7
|
import {
|
|
8
8
|
fetchServerSyncedCredential
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-YZ335FWM.js";
|
|
10
10
|
import {
|
|
11
11
|
buildIdentityBlock,
|
|
12
12
|
buildPlatformStaticContextLayers,
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
compileContextLayers,
|
|
16
16
|
detectDispatchIntentFromMessages,
|
|
17
17
|
resolveToolGuidedSections
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VOWN2ZQI.js";
|
|
19
19
|
import {
|
|
20
20
|
convertMessagesToResponsesInput,
|
|
21
21
|
getUsageRequestOptions,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
} from "./chunk-2SXN7LAY.js";
|
|
42
42
|
import {
|
|
43
43
|
buildSkillGuidancePromptBlock
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-75TXQ4GY.js";
|
|
45
45
|
import {
|
|
46
46
|
canonicalizeToolNames
|
|
47
47
|
} from "./chunk-YLAHYLDQ.js";
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// packages/ai/tools/agentCapabilities.ts
|
|
2
|
+
var SYSTEM_AGENT_CAPABILITIES = [
|
|
3
|
+
{
|
|
4
|
+
id: "web-search",
|
|
5
|
+
label: "\u8054\u7F51\u641C\u7D22",
|
|
6
|
+
description: "\u8BA9 agent \u80FD\u641C\u7D22\u4E92\u8054\u7F51\u3001\u6293\u53D6\u7F51\u9875\u5185\u5BB9\uFF0C\u83B7\u53D6\u6700\u65B0\u4FE1\u606F\u3002",
|
|
7
|
+
tools: ["exa_search", "fetchWebpage"],
|
|
8
|
+
defaultEnabled: true,
|
|
9
|
+
icon: "\u{1F310}"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "web-scrape",
|
|
13
|
+
label: "\u6DF1\u5EA6\u7F51\u9875\u6293\u53D6",
|
|
14
|
+
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",
|
|
15
|
+
tools: ["firecrawl_search", "firecrawl_scrape"],
|
|
16
|
+
defaultEnabled: false,
|
|
17
|
+
icon: "\u{1F578}\uFE0F"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "agent-orchestration",
|
|
21
|
+
label: "\u591A agent \u7F16\u6392",
|
|
22
|
+
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",
|
|
23
|
+
tools: ["startAgentRun", "controlAgentRun", "listAgents", "listRuntimes"],
|
|
24
|
+
defaultEnabled: true,
|
|
25
|
+
icon: "\u{1F9E9}"
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
var SYSTEM_AGENT_CAPABILITY_IDS = SYSTEM_AGENT_CAPABILITIES.map(
|
|
29
|
+
({ id }) => id
|
|
30
|
+
);
|
|
31
|
+
var DEFAULT_SYSTEM_AGENT_CAPABILITIES = Object.fromEntries(
|
|
32
|
+
SYSTEM_AGENT_CAPABILITIES.map(({ id, defaultEnabled }) => [
|
|
33
|
+
id,
|
|
34
|
+
defaultEnabled
|
|
35
|
+
])
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
SYSTEM_AGENT_CAPABILITIES,
|
|
40
|
+
SYSTEM_AGENT_CAPABILITY_IDS,
|
|
41
|
+
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
42
|
+
};
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
addContentToSpace,
|
|
16
16
|
resolveCreationSpaceId
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-POXYLG52.js";
|
|
18
18
|
import {
|
|
19
19
|
runtime_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-7WYOODTC.js";
|
|
21
21
|
import {
|
|
22
22
|
getCurrentSpaceId
|
|
23
23
|
} from "./chunk-FFFKAOJN.js";
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
evaluateRequestBudget,
|
|
33
33
|
hasImageInRuntimeMessages,
|
|
34
34
|
stripImagePartsFromMessages
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-WMKA2DPK.js";
|
|
36
36
|
import {
|
|
37
37
|
applyShapingCounts,
|
|
38
38
|
attachProjectionFacts,
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
hashStablePrefixContent,
|
|
63
63
|
resolveResponseGuidelines,
|
|
64
64
|
resolveToolGuidedSections
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-VOWN2ZQI.js";
|
|
66
66
|
import {
|
|
67
67
|
BRIDGE_STREAM_MAX_CHARS,
|
|
68
68
|
CLI_NOLO_WORKSPACE_TOOL_NAMES,
|
|
@@ -132,6 +132,7 @@ import {
|
|
|
132
132
|
SECRET_PATTERNS,
|
|
133
133
|
clipToolText,
|
|
134
134
|
hasPotentialSecrets,
|
|
135
|
+
isAgentSkillDisabled,
|
|
135
136
|
isCompleteInstructionOutput,
|
|
136
137
|
resolveHistoricalToolContentCap,
|
|
137
138
|
resolveToolOutputProfile,
|
|
@@ -139,10 +140,7 @@ import {
|
|
|
139
140
|
sanitizeToolOutputText,
|
|
140
141
|
scrubObjectSecrets,
|
|
141
142
|
scrubSecrets
|
|
142
|
-
} from "./chunk-
|
|
143
|
-
import {
|
|
144
|
-
isAgentSkillDisabled
|
|
145
|
-
} from "./chunk-YDRRGVT5.js";
|
|
143
|
+
} from "./chunk-CDIRKCPD.js";
|
|
146
144
|
import {
|
|
147
145
|
buildDialogFallbackTitleFromUserInput
|
|
148
146
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -23860,7 +23858,7 @@ async function saveCliPendingUserMessages(args2) {
|
|
|
23860
23858
|
if (ops.length) await args2.store.batch(ops);
|
|
23861
23859
|
}
|
|
23862
23860
|
async function readCliPendingUserMessages(store, dialogId) {
|
|
23863
|
-
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-
|
|
23861
|
+
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-QPSR26KD.js");
|
|
23864
23862
|
const rows = await readDialogMessageRecords({ store, dialogId });
|
|
23865
23863
|
const uncertain = rows.filter(({ record: record2 }) => record2.metadata?.cliBatchPhase === "requested" && !record2.metadata?.cliBatchResolution);
|
|
23866
23864
|
const recovery = uncertain.length ? {
|
|
@@ -24162,7 +24160,7 @@ function buildLoadSkillExecutor(args2) {
|
|
|
24162
24160
|
const { resolveSkillByName } = await import("./skillDiscovery-MDDKPTW3.js");
|
|
24163
24161
|
const resolved = resolveSkillByName(args2.cwd, name);
|
|
24164
24162
|
if (!resolved) {
|
|
24165
|
-
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-
|
|
24163
|
+
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-PFTTFPWW.js");
|
|
24166
24164
|
const builtin = resolveBuiltinSkillByName(name);
|
|
24167
24165
|
if (builtin) {
|
|
24168
24166
|
const denied = await rejectDisabledBuiltin(args2.agentSkillSource, builtin.slug, name, args2.resolveAgentSkillSource);
|
|
@@ -24241,7 +24239,7 @@ async function loadPreciseSkill(cwd, parsed, agentSkillSource, resolveAgentSkill
|
|
|
24241
24239
|
if (!nonEmpty(parsed.slug) || has2("projectBinding") || has2("relativePath")) {
|
|
24242
24240
|
return reject("builtin requires only an exact slug.");
|
|
24243
24241
|
}
|
|
24244
|
-
const { listBuiltinSkills } = await import("./builtinSkillRegistry-
|
|
24242
|
+
const { listBuiltinSkills } = await import("./builtinSkillRegistry-PFTTFPWW.js");
|
|
24245
24243
|
const builtin = listBuiltinSkills().find((entry) => entry.slug === parsed.slug);
|
|
24246
24244
|
if (!builtin) return reject("builtin slug not found.");
|
|
24247
24245
|
const denied = await rejectDisabledBuiltin(agentSkillSource, builtin.slug, builtin.slug, resolveAgentSkillSource);
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
formatInvalidAgentSkillModeMessage,
|
|
15
15
|
formatInvalidAgentSkillModesFieldMessage,
|
|
16
16
|
isAgentSkillModesFieldShapeValid
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CDIRKCPD.js";
|
|
18
18
|
import {
|
|
19
19
|
buildAgentApiKeyCredentialRef,
|
|
20
20
|
migrateAgentSecrets
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
resolveServerUrl,
|
|
34
34
|
validateInstaboxWorkspaceSelection,
|
|
35
35
|
writeUsage
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-ARBYAWUU.js";
|
|
37
37
|
import {
|
|
38
38
|
boxGlyphs,
|
|
39
39
|
displayWidth,
|
|
@@ -86,14 +86,14 @@ import {
|
|
|
86
86
|
} from "./chunk-S73EPYNC.js";
|
|
87
87
|
import {
|
|
88
88
|
resolveCliLocalRuntimeKeyCapability
|
|
89
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-YM6JCUPB.js";
|
|
90
90
|
import {
|
|
91
91
|
extractGoogleValidationLink
|
|
92
92
|
} from "./chunk-BMQ2MJUK.js";
|
|
93
93
|
import {
|
|
94
94
|
parseUiCard,
|
|
95
95
|
uiCardFallback
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-3RKUVWJR.js";
|
|
97
97
|
import {
|
|
98
98
|
isGatewayHttpStatus
|
|
99
99
|
} from "./chunk-NF64D32W.js";
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
loadOwnerItemsFromDb,
|
|
105
105
|
parseUiAskChoiceContent,
|
|
106
106
|
resolveAgentMemoryPolicy
|
|
107
|
-
} from "./chunk-
|
|
107
|
+
} from "./chunk-S7WGN4OQ.js";
|
|
108
108
|
import {
|
|
109
109
|
API_REPORTED_COST_MULTIPLIER,
|
|
110
110
|
estimateMessagesTokens,
|
|
@@ -113,14 +113,14 @@ import {
|
|
|
113
113
|
resolveAgentContextWindow,
|
|
114
114
|
resolveOccupancy,
|
|
115
115
|
resolveOccupancyWindow
|
|
116
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-7WYOODTC.js";
|
|
117
117
|
import {
|
|
118
118
|
parsePositiveFiniteNumberOrFallback
|
|
119
119
|
} from "./chunk-Y5GCAMGP.js";
|
|
120
120
|
import {
|
|
121
121
|
readDbRecord,
|
|
122
122
|
resolveAgentRecordFromHybridStore
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-L4ES2RVY.js";
|
|
124
124
|
import {
|
|
125
125
|
isTransientFetchError
|
|
126
126
|
} from "./chunk-DXWGFL2Z.js";
|
|
@@ -178,10 +178,10 @@ import {
|
|
|
178
178
|
readActionGate,
|
|
179
179
|
readAgentsMdLayerFromDisk,
|
|
180
180
|
registerDialogOwner
|
|
181
|
-
} from "./chunk-
|
|
181
|
+
} from "./chunk-G3PPDR4Z.js";
|
|
182
182
|
import {
|
|
183
183
|
resolveAgentRuntimeConfigFromRecord
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-WMKA2DPK.js";
|
|
185
185
|
import {
|
|
186
186
|
createThinkParserState,
|
|
187
187
|
flushThinkParser,
|
|
@@ -13064,7 +13064,7 @@ function isBalanceExhaustedError(error) {
|
|
|
13064
13064
|
|
|
13065
13065
|
// packages/cli/client/agentRun.ts
|
|
13066
13066
|
async function loadRunLocalAgentTurn() {
|
|
13067
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
13067
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-Y54MQRGC.js");
|
|
13068
13068
|
return runLocalAgentTurn;
|
|
13069
13069
|
}
|
|
13070
13070
|
var stripDebugNoise = (s) => s.replace(/\s*raw="[\s\S]*"/g, "").replace(/\s*raw=\S+/g, "").replace(/\s*headers=\[[^\]]*\]/g, "").replace(/\s*headers=\S+/g, "").trim();
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
deriveCredentialGroup
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CX5BGBCX.js";
|
|
4
4
|
import {
|
|
5
5
|
listUserRecordsFromServers,
|
|
6
6
|
readLiveDbRecordAfterTombstoneMerge
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3WHVE2XX.js";
|
|
8
8
|
import {
|
|
9
9
|
agentRecordHasConfiguredCredential
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L4ES2RVY.js";
|
|
11
11
|
import {
|
|
12
12
|
isTombstoneRecord
|
|
13
13
|
} from "./chunk-BV3FLP2L.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ARBYAWUU.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3RKUVWJR.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-G3PPDR4Z.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
13
|
} from "./chunk-USGHJSGO.js";
|
|
@@ -3,22 +3,22 @@ import {
|
|
|
3
3
|
mergeReferences,
|
|
4
4
|
resolveReferenceAssets,
|
|
5
5
|
resolveToolsFromKeys
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PSX4M5MN.js";
|
|
7
7
|
import {
|
|
8
8
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
9
9
|
getAllToolRuns,
|
|
10
10
|
parseUiCard,
|
|
11
11
|
uiCardFallback
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3RKUVWJR.js";
|
|
13
13
|
import {
|
|
14
14
|
getDocState
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-27XDMKLC.js";
|
|
16
16
|
import {
|
|
17
17
|
getTableState
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-POXYLG52.js";
|
|
19
19
|
import {
|
|
20
20
|
selectAllMsgs
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7WYOODTC.js";
|
|
22
22
|
import {
|
|
23
23
|
getCurrentSpaceIdRaw,
|
|
24
24
|
getViewMode
|
|
@@ -38,12 +38,10 @@ import {
|
|
|
38
38
|
selectIdentityUserId
|
|
39
39
|
} from "./chunk-PXYBUFDB.js";
|
|
40
40
|
import {
|
|
41
|
-
projectToolMessageContent
|
|
42
|
-
} from "./chunk-WFGNWWJI.js";
|
|
43
|
-
import {
|
|
41
|
+
projectToolMessageContent,
|
|
44
42
|
resolveAgentRecommendedSkillNames,
|
|
45
43
|
resolveAgentRequiredPackIds
|
|
46
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CDIRKCPD.js";
|
|
47
45
|
import {
|
|
48
46
|
attachmentKind,
|
|
49
47
|
extractReferenceKeysFromMessage,
|
|
@@ -65,7 +63,7 @@ import {
|
|
|
65
63
|
expandEnabledPackPromptPatches,
|
|
66
64
|
expandEnabledPacks,
|
|
67
65
|
resolveEffectiveEnabledPacks
|
|
68
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-75TXQ4GY.js";
|
|
69
67
|
import {
|
|
70
68
|
metaKey
|
|
71
69
|
} from "./chunk-SYTHYBMI.js";
|