nolo-cli 0.16.0-alpha.2 → 0.16.0-alpha.21
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-QAUS6B7J.js → _executeModel-GRCQXT5R.js} +51 -45
- package/{action-GUOZYYGN.js → action-LT7BRFLK.js} +10 -9
- package/{addContentAction-QDGHGUBH.js → addContentAction-PL3KKBDH.js} +9 -8
- package/{addDialogAgentAction-Z4YCYZIV.js → addDialogAgentAction-FCMSKYAF.js} +8 -7
- package/{agentDeleteCommand-365DMKHW.js → agentDeleteCommand-WNL3CNQX.js} +32 -29
- package/{agentEmailCommands-TQMXL36I.js → agentEmailCommands-MPEUMRAS.js} +63 -57
- package/{agentListCommands-6B5X4RC6.js → agentListCommands-YO4AOQMS.js} +31 -28
- package/{agentMachineCommands-LOEARB6V.js → agentMachineCommands-WYM6YRYJ.js} +30 -27
- package/{agentPullCommand-6HWUT3SW.js → agentPullCommand-ZZGU5KOY.js} +4 -4
- package/agentRecordCommands-BVWSHMIY.js +105 -0
- package/{agentRunCommand-SGMH67WT.js → agentRunCommand-E3ZI6RSF.js} +64 -55
- package/{agentRunControl-6ADXVYMR.js → agentRunControl-Y5AFH5PQ.js} +24 -1
- package/{agentRuntimeLocal-YSYZ33ER.js → agentRuntimeLocal-P4VGX6H6.js} +26 -25
- package/{agentSlice-IVE735EV.js → agentSlice-D33GU3JL.js} +9 -8
- package/{appDeleteCommands-6QYOO3JB.js → appDeleteCommands-VA4R2SWX.js} +29 -26
- package/{appDeployCommands-WTCT6XO6.js → appDeployCommands-JWMWQNG6.js} +29 -26
- package/{appDeployStatusCommands-CGWGZJKB.js → appDeployStatusCommands-KYXGLZSQ.js} +29 -26
- package/{appGetCommands-O4OCAMRW.js → appGetCommands-ELOO3JG6.js} +29 -26
- package/{appListCommands-UENFP4XY.js → appListCommands-SJUW4RLW.js} +29 -26
- package/{authCommand-YFTR3347.js → authCommand-WJZPOLSS.js} +16 -9
- package/{authCommands-YXGOXNBZ.js → authCommands-XTBV7OFZ.js} +6 -5
- package/{chunk-RKM3K52F.js → chunk-34WPV75U.js} +23 -2
- package/{chunk-VPTJB4HM.js → chunk-3ND52WIL.js} +2 -5
- package/{chunk-SOTZ6RDN.js → chunk-3Q7WHGCB.js} +1 -1
- package/{chunk-KKY4B2Q2.js → chunk-4PWB7JRR.js} +4 -1
- package/{chunk-U7LEGLEB.js → chunk-4T5F7YZQ.js} +1 -1
- package/{chunk-OQMPU2ML.js → chunk-5PGGCJGV.js} +6 -6
- package/chunk-7BUYEZ6U.js +671 -0
- package/{chunk-AS3ZQ3O2.js → chunk-7OBMZCRD.js} +1 -1
- package/{chunk-WA6KZL5V.js → chunk-AAODAAUQ.js} +23 -20
- package/{chunk-GRTFNYLR.js → chunk-AKVLLMOU.js} +3 -3
- package/{chunk-QLUFR47U.js → chunk-AL2V7U3E.js} +1 -1
- package/{chunk-MTU75CZ2.js → chunk-B5TOXZAK.js} +1 -1
- package/{chunk-QZVGMD5F.js → chunk-BE2GNT5E.js} +2 -8
- package/{chunk-JKWWVF2I.js → chunk-D3HVJJIA.js} +1 -1
- package/{chunk-B4KT7RN2.js → chunk-DKZFOK24.js} +18 -89
- package/chunk-DL6EPNIK.js +50 -0
- package/{chunk-YYIRR6QC.js → chunk-E5KQTMMJ.js} +212 -250
- package/{chunk-4QQFLN5C.js → chunk-EGPCU42M.js} +58 -8
- package/{chunk-XVP3C2KY.js → chunk-ELT65PZW.js} +2 -2
- package/{chunk-EMXI3N3Z.js → chunk-ENP2ELIL.js} +5 -5
- package/{chunk-6565R2TI.js → chunk-EXAEHRLI.js} +112 -191
- package/chunk-FQZZLA3C.js +223 -0
- package/{chunk-WPN6RMDF.js → chunk-GMZZ5EKJ.js} +3 -3
- package/{chunk-RSYUDGGZ.js → chunk-HQNPCMWL.js} +3 -3
- package/{chunk-OGGHETUE.js → chunk-HQPG2PIV.js} +62 -19
- package/{chunk-4NLUNENX.js → chunk-IQZ6TGVW.js} +10 -3
- package/{chunk-VE6XMVKG.js → chunk-J67FKTTY.js} +330 -213
- package/{chunk-G2MKOQCB.js → chunk-JFE7XW4D.js} +1 -1
- package/{setDialogExtraReferencesAction-2VLGWQKG.js → chunk-JLA4FXYC.js} +2 -17
- package/{chunk-OOIN7HSO.js → chunk-JP7REMYP.js} +19 -1
- package/chunk-KFEVY3ST.js +255 -0
- package/{chunk-I66RU7P7.js → chunk-KKWJ5VPZ.js} +1 -1
- package/{chunk-WRN5EQT7.js → chunk-L2RRMXNJ.js} +13 -4
- package/{chunk-ISYE6GZB.js → chunk-L6NVTGI7.js} +1 -1
- package/{chunk-HRQCKQA5.js → chunk-MUCU6ATG.js} +8 -257
- package/{chunk-BFRVXJJJ.js → chunk-MUIT5AAM.js} +112 -27
- package/{chunk-WNLPAOIT.js → chunk-MVQ4TBSD.js} +1 -1
- package/{chunk-O53CP2QR.js → chunk-N2HYIBLH.js} +6 -6
- package/{chunk-524BDL33.js → chunk-O6W2O2DA.js} +1 -15
- package/{chunk-YC3DJILJ.js → chunk-PUSK7HXJ.js} +64 -22
- package/{chunk-OOSFSFMA.js → chunk-R5V5G73M.js} +2 -0
- package/{chunk-4IJYA27C.js → chunk-RG2U2MTJ.js} +1 -1
- package/{chunk-Z24FGIU2.js → chunk-RIDWN7AP.js} +34 -15
- package/{chunk-IKXL2HZ3.js → chunk-RK5NYQEL.js} +1 -1
- package/{chunk-QLFCNUVQ.js → chunk-RUTSBLDM.js} +1629 -261
- package/{chunk-TTGAVETO.js → chunk-RVOUXDFU.js} +5 -5
- package/{chunk-JTINRTBT.js → chunk-SKDNBYZK.js} +2 -2
- package/{chunk-KMQPSTMJ.js → chunk-TRT4I4UD.js} +2 -2
- package/{chunk-EHLHSX7R.js → chunk-UB4RYYNQ.js} +9 -2
- package/{chunk-N5424GSW.js → chunk-UGUW3FHG.js} +4 -4
- package/{chunk-YNHQIXX5.js → chunk-UIOYWBU7.js} +395 -326
- package/chunk-V5R4NZP2.js +78 -0
- package/{chunk-MYMMNKYL.js → chunk-VNAEBGDK.js} +156 -6
- package/{chunk-J55UHASN.js → chunk-VST53WEL.js} +1 -1
- package/{chunk-6MHDWKOT.js → chunk-VVKQFITN.js} +25 -12
- package/{chunk-W4NVOSFF.js → chunk-WFHXMLHZ.js} +1 -1
- package/{chunk-H33743XH.js → chunk-WJRJDX2W.js} +1 -1
- package/chunk-X4Q4UZEY.js +26 -0
- package/{chunk-E237VE6U.js → chunk-XFYDGBXL.js} +4 -4
- package/{chunk-JS33TCQ3.js → chunk-XHG22OEX.js} +4 -4
- package/{chunk-DVRHHFEA.js → chunk-XMLRJUU5.js} +1 -1
- package/{chunk-V2J635L5.js → chunk-XOIF2TNF.js} +2 -2
- package/{chunk-SFXYKGK2.js → chunk-XRZJGPFI.js} +7 -7
- package/chunk-ZHXJ6M7T.js +27 -0
- package/chunk-ZZ2MH7LE.js +84 -0
- package/{cliExecutor-K3F7DMRO.js → cliExecutor-DNE7TCC4.js} +2 -2
- package/codingSkills-36KN5NQT.js +48 -0
- package/{createAgentAutomationAction-TS6NNZ4X.js → createAgentAutomationAction-ONKZ46XE.js} +22 -21
- package/{createDialogAction-5HVQ33EX.js → createDialogAction-7QWJEBKU.js} +24 -23
- package/{createPageAction-4F3ZGQJD.js → createPageAction-PB3KXZIA.js} +28 -27
- package/{dbSlice-OP6UPXKA.js → dbSlice-CGSRFJN3.js} +8 -7
- package/{deleteFile-WPWVZE4B.js → deleteFile-WDZ3VM7B.js} +3 -3
- package/{dialogCommands-ZL6L24BS.js → dialogCommands-YZFU4Q26.js} +30 -27
- package/{dialogSlice-FAWUQDJW.js → dialogSlice-53B5ISGQ.js} +22 -21
- package/{docCreateCommands-LYROQTFH.js → docCreateCommands-LOUC5PFB.js} +28 -25
- package/{docDeleteCommands-6TWGTZNR.js → docDeleteCommands-HHPGT4BR.js} +29 -26
- package/{docReadCommands-PRULNF26.js → docReadCommands-YPSN4HEF.js} +28 -25
- package/{docStore-2UHVWLTV.js → docStore-LJXXRB5W.js} +23 -22
- package/{docUpdateCommands-NNYYWJBI.js → docUpdateCommands-CJCZO54M.js} +28 -25
- package/{fetchMessages-KTNM7QAR.js → fetchMessages-BMGVZVSE.js} +4 -3
- package/{getPricing-UGDJHI7M.js → getPricing-RYY6OBA4.js} +4 -4
- package/handleSendMessageAction-ICGX4QCM.js +402 -0
- package/index.js +68 -68
- package/{localDialogRead-2VRI24F4.js → localDialogRead-HQZPVIE3.js} +1 -1
- package/{localRuntimeDb-LGDF6FQP.js → localRuntimeDb-THJZGAOJ.js} +1 -1
- package/{machineCommands-JQPEQFSE.js → machineCommands-YLDZXK4D.js} +64 -58
- package/{machineWsRunDispatch-FFFNWVEW.js → machineWsRunDispatch-LTQL3DRE.js} +56 -50
- package/{models-LSCRJJ6P.js → models-5K5G2CZI.js} +2 -2
- package/package.json +1 -1
- package/queryRunOverlay-O4LOMMPO.js +161 -0
- package/{read-HXHAZBKH.js → read-3FMPZPER.js} +3 -3
- package/{readDocTool-VPBDTO4G.js → readDocTool-VSYHKK3V.js} +1 -1
- package/{readlineWorkspace-QSXHSBHA.js → readlineWorkspace-OSPVWNAT.js} +699 -168
- package/{removeDialogAgentAction-HUFVN35S.js → removeDialogAgentAction-OAGA2G3U.js} +11 -10
- package/{runAgentClientLoop-A75BUU6D.js → runAgentClientLoop-76SUKKPX.js} +46 -40
- package/runOverlayPresentation-ZO4VCWEU.js +11 -0
- package/{runtimeDoctorCommands-THIHX2SY.js → runtimeDoctorCommands-E2OUORHK.js} +6 -6
- package/setDialogExtraReferencesAction-JZEXA5SL.js +27 -0
- package/{setPrimaryDialogAgentAction-VB4UV2CC.js → setPrimaryDialogAgentAction-4ZUQQKDG.js} +27 -18
- package/{settingSlice-7JYPQNAC.js → settingSlice-7MNKHZ6R.js} +9 -8
- package/{skillDiscovery-6M2BZUFN.js → skillDiscovery-KJWT7JBU.js} +3 -3
- package/{spaceCommands-4LE45GB7.js → spaceCommands-GIF7MKVD.js} +31 -28
- package/{spaceSlice-444MFUP6.js → spaceSlice-M4PVN5PO.js} +22 -21
- package/{streamAgentChatTurn-DJAE7USZ.js → streamAgentChatTurn-GCKTFSHQ.js} +96 -55
- package/{tableCommands-3P7MJ3PF.js → tableCommands-BEQAGE4I.js} +1 -1
- package/{tools-YB6LXSVN.js → tools-RJVFXOLR.js} +35 -30
- package/{tuiSummaryLlmCaller-QQL3JA5I.js → tuiSummaryLlmCaller-VUNVBRX3.js} +7 -6
- package/types-ZSTJ7MPR.js +7 -0
- package/{updateDialogTitleAction-6HGFBM64.js → updateDialogTitleAction-PSR67DLV.js} +25 -24
- package/agentRecordCommands-DCH2WBL2.js +0 -99
- package/chunk-BYXBJQAS.js +0 -0
- package/handleSendMessageAction-LJPUYNOH.js +0 -215
- package/{chunk-O4BU24WZ.js → chunk-6Y7A3OQQ.js} +3 -3
- package/{chunk-CMKUBIGW.js → chunk-X7W4TNB4.js} +3 -3
- package/{localRuntimeAuthority-TEGCOWX4.js → localRuntimeAuthority-4IXJCHZ7.js} +3 -3
|
@@ -7,21 +7,23 @@ import {
|
|
|
7
7
|
processThinkChunk
|
|
8
8
|
} from "./chunk-LSFAWXKC.js";
|
|
9
9
|
import {
|
|
10
|
-
buildProviderExecutionPlan,
|
|
11
|
-
canUsePlatformChatProvider,
|
|
12
10
|
convertMessagesToResponsesInput,
|
|
13
11
|
extractTextFromResponseOutput,
|
|
14
12
|
extractToolCallsFromResponseOutput,
|
|
15
|
-
hasDirectOpenAiCompatibleProvider,
|
|
16
13
|
hasImageParts,
|
|
14
|
+
shouldStripReasoningContentForOutbound,
|
|
15
|
+
toOpenAiCompatibleMessages,
|
|
16
|
+
toResponsesTools
|
|
17
|
+
} from "./chunk-KFEVY3ST.js";
|
|
18
|
+
import {
|
|
19
|
+
buildProviderExecutionPlan,
|
|
20
|
+
canUsePlatformChatProvider,
|
|
21
|
+
hasDirectOpenAiCompatibleProvider,
|
|
17
22
|
resolveAgentRuntimeLocation,
|
|
18
23
|
resolvePlatformAuthToken,
|
|
19
|
-
resolvePlatformChatCompletionsEndpoint,
|
|
20
24
|
resolvePlatformServerUrl,
|
|
21
|
-
resolveProviderTransportDecision
|
|
22
|
-
|
|
23
|
-
toResponsesTools
|
|
24
|
-
} from "./chunk-HRQCKQA5.js";
|
|
25
|
+
resolveProviderTransportDecision
|
|
26
|
+
} from "./chunk-MUCU6ATG.js";
|
|
25
27
|
import {
|
|
26
28
|
clipCompactText
|
|
27
29
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -257,9 +259,21 @@ async function resolvePlatformChatProviderConfig(args) {
|
|
|
257
259
|
function buildPlatformChatCompletionRequest(args) {
|
|
258
260
|
const usesResponsesApi = isResponsesEndpoint(args.providerConfig.endpoint);
|
|
259
261
|
const requestOptions = usesResponsesApi ? toResponsesRequestOptions(args.providerConfig.requestOptions) : args.providerConfig.requestOptions;
|
|
262
|
+
const shouldStripReasoning = shouldStripReasoningContentForOutbound(
|
|
263
|
+
args.providerConfig.provider,
|
|
264
|
+
args.providerConfig.model
|
|
265
|
+
);
|
|
260
266
|
const body = {
|
|
261
267
|
model: args.providerConfig.model,
|
|
262
|
-
...usesResponsesApi ? {
|
|
268
|
+
...usesResponsesApi ? {
|
|
269
|
+
input: convertMessagesToResponsesInput(args.messages, {
|
|
270
|
+
stripReasoningContent: shouldStripReasoning
|
|
271
|
+
})
|
|
272
|
+
} : {
|
|
273
|
+
messages: toOpenAiCompatibleMessages(args.messages, {
|
|
274
|
+
stripReasoningContent: shouldStripReasoning
|
|
275
|
+
})
|
|
276
|
+
},
|
|
263
277
|
stream: args.stream ?? false,
|
|
264
278
|
...args.stream ? { stream_options: { include_usage: true } } : {},
|
|
265
279
|
...requestOptions,
|
|
@@ -287,16 +301,6 @@ function buildPlatformChatCompletionRequest(args) {
|
|
|
287
301
|
}
|
|
288
302
|
};
|
|
289
303
|
}
|
|
290
|
-
function resolveLegacyDeepSeekProxyChatFallback(args) {
|
|
291
|
-
if (args.status !== 400 || args.providerConfig.provider.toLowerCase() !== "deepseek" || !isResponsesEndpoint(args.providerConfig.endpoint) || !/UPSTREAM_400/.test(args.raw) || !/missing field [`\"]?(?:function|messages)/i.test(args.raw)) {
|
|
292
|
-
return void 0;
|
|
293
|
-
}
|
|
294
|
-
const endpoint = resolvePlatformChatCompletionsEndpoint("deepseek");
|
|
295
|
-
return endpoint ? {
|
|
296
|
-
...args.providerConfig,
|
|
297
|
-
endpoint
|
|
298
|
-
} : void 0;
|
|
299
|
-
}
|
|
300
304
|
function tryParseJson(raw) {
|
|
301
305
|
try {
|
|
302
306
|
return JSON.parse(raw);
|
|
@@ -409,7 +413,6 @@ export {
|
|
|
409
413
|
readSseDataValues,
|
|
410
414
|
resolvePlatformChatProviderConfig,
|
|
411
415
|
buildPlatformChatCompletionRequest,
|
|
412
|
-
resolveLegacyDeepSeekProxyChatFallback,
|
|
413
416
|
parsePlatformChatCompletionData,
|
|
414
417
|
parsePlatformChatCompletionResponse,
|
|
415
418
|
canUsePlatformChatProvider2 as canUsePlatformChatProvider,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VST53WEL.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-IQZ6TGVW.js";
|
|
8
8
|
import {
|
|
9
9
|
toSafeAgentSummary
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-JP7REMYP.js";
|
|
11
11
|
|
|
12
12
|
// packages/cli/agentListHelpers.ts
|
|
13
13
|
function parseAgentRecordId(privateKey, explicitId) {
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildAgentRuntimeAgentLookupKeys,
|
|
3
3
|
shouldFetchAgentRuntimeRecordRemotely
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PUSK7HXJ.js";
|
|
5
5
|
|
|
6
6
|
// packages/cli/client/localAgentRecords.ts
|
|
7
7
|
var buildLocalAgentLookupKeys = buildAgentRuntimeAgentLookupKeys;
|
|
8
8
|
var shouldReadAgentKeyRemotely = shouldFetchAgentRuntimeRecordRemotely;
|
|
9
9
|
|
|
10
|
-
// packages/core/agentHandle.ts
|
|
11
|
-
function normalizeAgentHandle(value) {
|
|
12
|
-
return typeof value === "string" && value.trim() ? value.trim().toLowerCase().replace(/\s+/g, " ") : void 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
10
|
export {
|
|
16
11
|
buildLocalAgentLookupKeys,
|
|
17
|
-
shouldReadAgentKeyRemotely
|
|
18
|
-
normalizeAgentHandle
|
|
12
|
+
shouldReadAgentKeyRemotely
|
|
19
13
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
asRecordOrEmpty
|
|
3
3
|
} from "./chunk-KX6YBIHG.js";
|
|
4
|
+
import {
|
|
5
|
+
asOptionalFiniteNumber
|
|
6
|
+
} from "./chunk-WWC7I6TA.js";
|
|
4
7
|
import {
|
|
5
8
|
asNonEmptyStringArray,
|
|
6
9
|
asTrimmedNonEmptyStringArray
|
|
7
10
|
} from "./chunk-I42VC5KR.js";
|
|
8
|
-
import {
|
|
9
|
-
asOptionalFiniteNumber
|
|
10
|
-
} from "./chunk-WWC7I6TA.js";
|
|
11
11
|
import {
|
|
12
12
|
isRecord
|
|
13
13
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -15,85 +15,6 @@ import {
|
|
|
15
15
|
asOptionalTrimmedString
|
|
16
16
|
} from "./chunk-G3SUCT4W.js";
|
|
17
17
|
|
|
18
|
-
// packages/agent-runtime/toolNameAliases.ts
|
|
19
|
-
var LEGACY_TOOL_NAME_ALIASES = {
|
|
20
|
-
createPage: "createDoc",
|
|
21
|
-
updatePage: "updateDoc",
|
|
22
|
-
update_page: "updateDoc",
|
|
23
|
-
create_page: "createDoc",
|
|
24
|
-
fetchwebpage: "fetchWebpage",
|
|
25
|
-
fetch_webpage: "fetchWebpage",
|
|
26
|
-
"fetch-page": "fetchWebpage",
|
|
27
|
-
exasearch: "exa_search",
|
|
28
|
-
"exa-search": "exa_search",
|
|
29
|
-
exa_search: "exa_search",
|
|
30
|
-
firecrawlscrape: "firecrawl_scrape",
|
|
31
|
-
"firecrawl-scrape": "firecrawl_scrape",
|
|
32
|
-
firecrawl_scrape: "firecrawl_scrape",
|
|
33
|
-
firecrawlsearch: "firecrawl_search",
|
|
34
|
-
"firecrawl-search": "firecrawl_search",
|
|
35
|
-
firecrawl_search: "firecrawl_search",
|
|
36
|
-
readDoc: "readDoc",
|
|
37
|
-
readpage: "readDoc",
|
|
38
|
-
read_page: "readDoc",
|
|
39
|
-
read_doc: "readDoc",
|
|
40
|
-
createdoc: "createDoc",
|
|
41
|
-
updateDocTool: "updateDoc",
|
|
42
|
-
terminalCommand: "execShell",
|
|
43
|
-
terminal_command: "execShell",
|
|
44
|
-
runCommand: "execShell",
|
|
45
|
-
run_command: "execShell",
|
|
46
|
-
runInBash: "execShell",
|
|
47
|
-
run_in_bash: "execShell",
|
|
48
|
-
executeCommand: "execShell",
|
|
49
|
-
execute_command: "execShell",
|
|
50
|
-
// Codex CLI 风格工具名 → nolo 原生工具名
|
|
51
|
-
bash: "execShell",
|
|
52
|
-
shell: "execShell",
|
|
53
|
-
read: "readFile",
|
|
54
|
-
edit: "editFile",
|
|
55
|
-
write: "writeFile",
|
|
56
|
-
glob: "globFiles",
|
|
57
|
-
grep: "searchFiles",
|
|
58
|
-
// 联网搜索别名
|
|
59
|
-
web_search: "exa_search",
|
|
60
|
-
websearch: "exa_search",
|
|
61
|
-
search_web: "exa_search",
|
|
62
|
-
searchweb: "exa_search",
|
|
63
|
-
webfetch: "fetchWebpage",
|
|
64
|
-
web_fetch: "fetchWebpage",
|
|
65
|
-
fetchweb: "fetchWebpage",
|
|
66
|
-
fetch_web: "fetchWebpage",
|
|
67
|
-
// 模型偶尔会把 loadSkill 幻觉成 readSkill(参数风格 name= 一致),
|
|
68
|
-
// 规范化到 loadSkill,避免 localToolPolicy 把这种调用直接拦死。
|
|
69
|
-
readSkill: "loadSkill"
|
|
70
|
-
};
|
|
71
|
-
var normalizeToolName = (name) => name.replace(/[-_]/g, "").toLowerCase();
|
|
72
|
-
var canonicalizeToolName = (rawName) => {
|
|
73
|
-
const trimmedName = rawName.trim();
|
|
74
|
-
if (!trimmedName) return rawName;
|
|
75
|
-
if (LEGACY_TOOL_NAME_ALIASES[trimmedName]) {
|
|
76
|
-
return LEGACY_TOOL_NAME_ALIASES[trimmedName];
|
|
77
|
-
}
|
|
78
|
-
const normalizedRawName = normalizeToolName(trimmedName);
|
|
79
|
-
const matchedAlias = Object.entries(LEGACY_TOOL_NAME_ALIASES).find(
|
|
80
|
-
([alias]) => normalizeToolName(alias) === normalizedRawName
|
|
81
|
-
);
|
|
82
|
-
return matchedAlias?.[1] ?? trimmedName;
|
|
83
|
-
};
|
|
84
|
-
var canonicalizeToolNames = (toolNames) => Array.from(
|
|
85
|
-
new Set(
|
|
86
|
-
toolNames.filter((toolName) => typeof toolName === "string").map(canonicalizeToolName)
|
|
87
|
-
)
|
|
88
|
-
);
|
|
89
|
-
var prioritizeToolNames = (toolNames, preferredToolNames) => {
|
|
90
|
-
const canonicalTools = canonicalizeToolNames(toolNames);
|
|
91
|
-
const preferred = new Set(canonicalizeToolNames(preferredToolNames));
|
|
92
|
-
const prioritized = canonicalTools.filter((toolName) => preferred.has(toolName));
|
|
93
|
-
const remaining = canonicalTools.filter((toolName) => !preferred.has(toolName));
|
|
94
|
-
return [...prioritized, ...remaining];
|
|
95
|
-
};
|
|
96
|
-
|
|
97
18
|
// packages/agent-runtime/runtimeToolSurface.ts
|
|
98
19
|
var DEFAULT_PRIVATE_NOLO_WORKSPACE_TOOLS = [
|
|
99
20
|
"listDialogs",
|
|
@@ -462,8 +383,8 @@ function buildNoloWorkspaceOpenAiTools(args) {
|
|
|
462
383
|
// listAgentsFunc 另有 limit(默认 100,最大 500)。如后续对齐需在
|
|
463
384
|
// parseAgentListArgs / agentListCommands 增加 --limit 透传。
|
|
464
385
|
});
|
|
465
|
-
add("readAgent", "Read one agent config
|
|
466
|
-
agent: stringToolParam("Agent
|
|
386
|
+
add("readAgent", "Read one agent's full config from the Nolo workspace. Accepts an agent dbKey (agent-xxx), plain id, alias, or agent URL; resolves it (including public agents via agent-pub-<id>; the server runtime also falls back to handle lookup) and returns the runnable agentKey plus a redacted record with fields such as model, provider, apiSource, tools, prompt, inputPrice, outputPrice, and isPublic. Use it before delegation to confirm an agent's identity and capabilities, or to resolve the agentKey that startAgentRun requires.", {
|
|
387
|
+
agent: stringToolParam("Agent dbKey (e.g. agent-xxx), agent id, alias, or agent URL.")
|
|
467
388
|
}, ["agent"]);
|
|
468
389
|
add("listSpaces", "List joined spaces in the Nolo workspace.", {});
|
|
469
390
|
add("readSpace", "Read one space in the Nolo workspace.", {
|
|
@@ -892,9 +813,20 @@ function buildLoadSkillExecutor(args) {
|
|
|
892
813
|
metadata: { loadSkill: true, resolved: false }
|
|
893
814
|
};
|
|
894
815
|
}
|
|
895
|
-
const { resolveSkillByName } = await import("./skillDiscovery-
|
|
816
|
+
const { resolveSkillByName } = await import("./skillDiscovery-KJWT7JBU.js");
|
|
896
817
|
const resolved = resolveSkillByName(args.cwd, name);
|
|
897
818
|
if (!resolved) {
|
|
819
|
+
const { resolveCodingBuiltinSlug, buildCodingSkillContentBySlug } = await import("./codingSkills-36KN5NQT.js");
|
|
820
|
+
const builtinSlug = resolveCodingBuiltinSlug(name);
|
|
821
|
+
if (builtinSlug) {
|
|
822
|
+
const body = buildCodingSkillContentBySlug(builtinSlug);
|
|
823
|
+
return {
|
|
824
|
+
content: `Skill "${name}" loaded inline. Follow its instructions.
|
|
825
|
+
|
|
826
|
+
${body}`,
|
|
827
|
+
metadata: { loadSkill: true, resolved: true, name, requestedName: name, builtin: true }
|
|
828
|
+
};
|
|
829
|
+
}
|
|
898
830
|
return {
|
|
899
831
|
content: await formatUnknownSkillMessage(args.cwd, name),
|
|
900
832
|
metadata: { loadSkill: true, resolved: false, name, requestedName: name }
|
|
@@ -919,7 +851,7 @@ ${body}`,
|
|
|
919
851
|
};
|
|
920
852
|
}
|
|
921
853
|
async function formatUnknownSkillMessage(cwd, requestedName) {
|
|
922
|
-
const { discoverSkills } = await import("./skillDiscovery-
|
|
854
|
+
const { discoverSkills } = await import("./skillDiscovery-KJWT7JBU.js");
|
|
923
855
|
let available = [];
|
|
924
856
|
try {
|
|
925
857
|
available = discoverSkills(cwd).map((s) => s.name);
|
|
@@ -938,9 +870,6 @@ var nodeSpawnFallback = (options) => {
|
|
|
938
870
|
};
|
|
939
871
|
|
|
940
872
|
export {
|
|
941
|
-
canonicalizeToolName,
|
|
942
|
-
canonicalizeToolNames,
|
|
943
|
-
prioritizeToolNames,
|
|
944
873
|
resolveRuntimeToolSurfaceForAgent,
|
|
945
874
|
redactAgentRecordForWorkspaceTool,
|
|
946
875
|
resolveExecutableOnPath,
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// packages/core/chat/runOverlayMachine.ts
|
|
2
|
+
var initialRunOverlayState = {
|
|
3
|
+
runs: /* @__PURE__ */ new Map()
|
|
4
|
+
};
|
|
5
|
+
function reduceRunOverlay(state, event) {
|
|
6
|
+
switch (event.type) {
|
|
7
|
+
case "run-state-chg": {
|
|
8
|
+
const prev = state.runs.get(event.runId);
|
|
9
|
+
const now = Date.now();
|
|
10
|
+
const merged = prev ? { ...prev, ...event.info, runId: event.runId, updatedAt: now } : {
|
|
11
|
+
runId: event.runId,
|
|
12
|
+
name: event.info.name ?? "",
|
|
13
|
+
status: event.info.status ?? "running",
|
|
14
|
+
summary: event.info.summary,
|
|
15
|
+
batchId: event.info.batchId,
|
|
16
|
+
parentDialogId: event.info.parentDialogId,
|
|
17
|
+
errorMessage: event.info.errorMessage,
|
|
18
|
+
updatedAt: now
|
|
19
|
+
};
|
|
20
|
+
if (prev && shallowEqualRun(prev, merged)) {
|
|
21
|
+
return state;
|
|
22
|
+
}
|
|
23
|
+
const runs = new Map(state.runs);
|
|
24
|
+
runs.set(event.runId, merged);
|
|
25
|
+
return { runs };
|
|
26
|
+
}
|
|
27
|
+
case "run-removed": {
|
|
28
|
+
if (!state.runs.has(event.runId)) return state;
|
|
29
|
+
const runs = new Map(state.runs);
|
|
30
|
+
runs.delete(event.runId);
|
|
31
|
+
return { runs };
|
|
32
|
+
}
|
|
33
|
+
case "clear-all": {
|
|
34
|
+
if (state.runs.size === 0) return state;
|
|
35
|
+
return { runs: /* @__PURE__ */ new Map() };
|
|
36
|
+
}
|
|
37
|
+
default: {
|
|
38
|
+
const _exhaustive = event;
|
|
39
|
+
return state;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
function shallowEqualRun(a, b) {
|
|
44
|
+
return a.runId === b.runId && a.name === b.name && a.status === b.status && a.summary === b.summary && a.batchId === b.batchId && a.parentDialogId === b.parentDialogId && a.errorMessage === b.errorMessage;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export {
|
|
48
|
+
initialRunOverlayState,
|
|
49
|
+
reduceRunOverlay
|
|
50
|
+
};
|