nolo-cli 0.8.0-alpha.21 → 0.8.0-alpha.24
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-42U3VOVZ.js → _executeModel-2ZAPHFOX.js} +46 -43
- package/{action-TLI3V62L.js → action-QM2ONPYZ.js} +9 -9
- package/{addContentAction-57RSIIMR.js → addContentAction-UXY3GM53.js} +8 -8
- package/{addDialogAgentAction-G3VWEA6E.js → addDialogAgentAction-MUBYOG65.js} +10 -10
- package/{agentDeleteCommand-5DD2IM3J.js → agentDeleteCommand-5TFSII4Z.js} +28 -27
- package/{agentEmailCommands-6FACJBU4.js → agentEmailCommands-XMXWGUMZ.js} +62 -58
- package/{agentListCommands-I6KZYCIG.js → agentListCommands-OWEFQEY4.js} +119 -33
- package/{agentMachineCommands-VKLIGMZA.js → agentMachineCommands-DGHYBBFC.js} +27 -26
- package/{agentPullCommand-O2MTUAFR.js → agentPullCommand-N6UWRTVL.js} +3 -3
- package/{agentRecordCommands-7TZICYDT.js → agentRecordCommands-I433EE5F.js} +53 -49
- package/{agentRunCommand-L4OM23KV.js → agentRunCommand-UQSX3IGW.js} +57 -52
- package/{agentRunControl-K4VKNEHF.js → agentRunControl-S3G62M6C.js} +3 -3
- package/{agentRuntimeLocal-ZYEIPTY4.js → agentRuntimeLocal-73SVOC5U.js} +14 -12
- package/{agentSlice-BX7GXSNO.js → agentSlice-JQCS4LR3.js} +9 -9
- package/{authCommand-EB5JSOX5.js → authCommand-B6P2XYLN.js} +11 -11
- package/{authCommands-XPEHTKSM.js → authCommands-4YKA4GTU.js} +7 -7
- package/{chunk-AS4PVWA4.js → chunk-2CVZSC5L.js} +1 -1
- package/{chunk-JRKKFRAV.js → chunk-3HPUUWOR.js} +58 -8
- package/{chunk-5KLGBAAR.js → chunk-3KGTFX3T.js} +2 -13
- package/{chunk-IWX4UW2E.js → chunk-524BDL33.js} +89 -8
- package/chunk-6QFNUK2G.js +144 -0
- package/{chunk-4QEWT7KD.js → chunk-AISLHYDB.js} +367 -85
- package/{chunk-2FTTDCD4.js → chunk-AMJ7LA5D.js} +1 -1
- package/{chunk-I6XMPTMR.js → chunk-BFDWXLFF.js} +2 -2
- package/{chunk-RL776AGR.js → chunk-BKGNXJAM.js} +1 -1
- package/{chunk-RCSJFQPB.js → chunk-BQECZ3Q4.js} +361 -90
- package/{chunk-VVX233PH.js → chunk-BT37DVDA.js} +9 -9
- package/{chunk-ENOG22KJ.js → chunk-BT57QC5K.js} +18 -20
- package/chunk-BYXBJQAS.js +0 -0
- package/{chunk-O2ZNTTET.js → chunk-C4DZRHFJ.js} +24 -15
- package/{chunk-4XENYTF5.js → chunk-DS3VC4EA.js} +3 -3
- package/{chunk-N54XAP77.js → chunk-FVVST32H.js} +1 -1
- package/{chunk-P3PKED2I.js → chunk-FZ2G3I4B.js} +11 -13
- package/{chunk-AGFH73SK.js → chunk-G7KM6BBZ.js} +1 -1
- package/{chunk-2ECQG4YX.js → chunk-GROGNZOA.js} +264 -161
- package/chunk-IOQIOZNI.js +42 -0
- package/{chunk-AL2KDGR2.js → chunk-IPA2WQGY.js} +201 -98
- package/{chunk-7DAJ4AI4.js → chunk-IYMGQ3TN.js} +9 -2
- package/{chunk-CKOJQDKR.js → chunk-JEMATI63.js} +1 -1
- package/{chunk-7U44LYTR.js → chunk-JTINRTBT.js} +1 -1
- package/{chunk-4O3CARJ4.js → chunk-KTHLAJEY.js} +1 -1
- package/{chunk-URUUZLPA.js → chunk-L3KWEH3V.js} +8 -8
- package/{chunk-XBUBEFNX.js → chunk-L76QNLGU.js} +1 -1
- package/{chunk-UB6SN4NJ.js → chunk-LE6JAIXE.js} +6 -6
- package/{chunk-2JCXITPK.js → chunk-LRKEOCWY.js} +15 -15
- package/{chunk-5EFXE3O7.js → chunk-LTH6AVG7.js} +3 -3
- package/{chunk-YPRZSPF3.js → chunk-OCDEWRE2.js} +1 -1
- package/{chunk-6KHNO3SK.js → chunk-P2SPC3FT.js} +27 -23
- package/{chunk-4IJYA27C.js → chunk-PXZAAB4L.js} +4 -4
- package/{chunk-VUW5FBDB.js → chunk-Q7S2ORXX.js} +9 -9
- package/{chunk-C3RUNRHT.js → chunk-QWM7YWVT.js} +1 -1
- package/{chunk-25LCXTML.js → chunk-RQPZX6KP.js} +2 -2
- package/chunk-S3UTETIC.js +4885 -0
- package/{chunk-SDJDLO5W.js → chunk-SBVUZC2E.js} +5 -5
- package/{chunk-VX3SXJ3N.js → chunk-UBSKX3LP.js} +6 -6
- package/{chunk-4ZDM73SD.js → chunk-V2J635L5.js} +1 -1
- package/{chunk-DSZUWUYB.js → chunk-VBKJTOAW.js} +1 -1
- package/{chunk-FVYY6MCS.js → chunk-VUEXKW6U.js} +17 -17
- package/{chunk-7KCUSYT2.js → chunk-WKQGZJVI.js} +7 -7
- package/{chunk-GU3PEVGZ.js → chunk-WM7P5OWZ.js} +2639 -1579
- package/{chunk-7GNGZRLZ.js → chunk-WTBWWBSF.js} +150 -78
- package/{chunk-FSO5B7GH.js → chunk-WVS3GX3B.js} +2 -2
- package/chunk-Z3NEXVYE.js +33 -0
- package/{createAgentAutomationAction-RJF3N2QY.js → createAgentAutomationAction-GXZNLJZK.js} +26 -24
- package/{createDialogAction-DRSPS6CE.js → createDialogAction-KLW42ZGF.js} +26 -24
- package/{createPageAction-6B2WMNO3.js → createPageAction-IBJHE6MH.js} +26 -24
- package/{dbSlice-Q3TM2FJV.js → dbSlice-R5EJKZBW.js} +7 -7
- package/{deleteFile-OW53A6BX.js → deleteFile-WPWVZE4B.js} +5 -5
- package/{dialogCommands-4IX4XIZE.js → dialogCommands-7O5PUZRU.js} +23 -22
- package/{dialogSlice-3M7KX2TX.js → dialogSlice-GGV7PF53.js} +25 -23
- package/{docCreateCommands-SIL3NPGT.js → docCreateCommands-7ZO2NQQF.js} +22 -21
- package/{docDeleteCommands-7IOMLUS4.js → docDeleteCommands-YKIXZYBR.js} +23 -22
- package/{docReadCommands-FNFXUA5L.js → docReadCommands-5UDONBUL.js} +22 -21
- package/{docStore-SV7E34D4.js → docStore-VDWTATFH.js} +25 -23
- package/{docUpdateCommands-X2HNDVUC.js → docUpdateCommands-EPZIIQMY.js} +22 -21
- package/fetchMessages-KTNM7QAR.js +1 -1
- package/{getPricing-3E6UNPKL.js → getPricing-6TOZXPAU.js} +7 -3
- package/{handleSendMessageAction-JYETO5RZ.js → handleSendMessageAction-MMATC5V5.js} +30 -28
- package/index.js +74 -74
- package/{localDialogRead-2VRI24F4.js → localDialogRead-YSKFFRTT.js} +1 -1
- package/{machineCommands-RIO3RP5Q.js → machineCommands-PTHPKSIZ.js} +59 -55
- package/{machineWsRunDispatch-W7UYLGB5.js → machineWsRunDispatch-M5L2NVWJ.js} +51 -47
- package/{memoryCommands-O4MIPIWQ.js → memoryCommands-HG4WKTU7.js} +2 -2
- package/{models-4OPOOLFS.js → models-H524GH3U.js} +3 -2
- package/package.json +1 -1
- package/{read-GW7ZEI23.js → read-5ZMY7FKP.js} +5 -5
- package/{readDocTool-HUFU6OCT.js → readDocTool-2NXDK32S.js} +1 -1
- package/{readlineWorkspace-27JR7WPW.js → readlineWorkspace-4NXMEOHP.js} +835 -622
- package/{removeDialogAgentAction-CXKR4NJI.js → removeDialogAgentAction-KOLQ2R5W.js} +13 -12
- package/{runAgentClientLoop-HZFAPJHS.js → runAgentClientLoop-FGUYNGSA.js} +45 -42
- package/{runtimeDoctorCommands-LRHLPDRC.js → runtimeDoctorCommands-UWR5UDSM.js} +5 -5
- package/{setDialogExtraReferencesAction-6RKUSXHX.js → setDialogExtraReferencesAction-OMTEO7X6.js} +10 -10
- package/{setPrimaryDialogAgentAction-T3UTBEFG.js → setPrimaryDialogAgentAction-DOCIS6V4.js} +13 -12
- package/{settingSlice-IVKXJXMG.js → settingSlice-UWZJYDOA.js} +8 -8
- package/{spaceCommands-E7VOF4LO.js → spaceCommands-S3EB6TOS.js} +29 -28
- package/{spaceSlice-TSVROA5U.js → spaceSlice-RG2GSV7K.js} +24 -22
- package/{streamAgentChatTurn-3C5RQZJF.js → streamAgentChatTurn-X576C23M.js} +209 -86
- package/{tableCommands-O7O2LBEG.js → tableCommands-M3DJUETS.js} +10 -10
- package/{toolApiClient-QI3YBNWB.js → toolApiClient-C7P7YSE4.js} +2 -2
- package/{tools-EQDEKR6N.js → tools-HURZ2N4O.js} +33 -30
- package/{tuiSummaryLlmCaller-RV3THLZF.js → tuiSummaryLlmCaller-DG2LBTBX.js} +8 -6
- package/{updateCommands-VOSPKXFF.js → updateCommands-TC5SX42Y.js} +3 -3
- package/{updateDialogTitleAction-3XV7VWSZ.js → updateDialogTitleAction-62LVIAUZ.js} +28 -26
- package/chunk-BBYVOSU2.js +0 -792
- package/chunk-DCOA4QSN.js +0 -105
- package/{chunk-DZ3XJVET.js → chunk-3QAF2LTL.js} +3 -3
- package/{chunk-EHLHSX7R.js → chunk-5MMZUWSG.js} +3 -3
- package/{chunk-ISNCLGUZ.js → chunk-AVMJVOQY.js} +3 -3
- package/{chunk-UTLZINAP.js → chunk-DVRHHFEA.js} +10 -10
- package/{chunk-4CQLVGRV.js → chunk-ID4G2MAR.js} +3 -3
- package/{chunk-5MIDPSSK.js → chunk-JK7VW2FN.js} +3 -3
- package/{chunk-TILFE6LV.js → chunk-YOCHZD7D.js} +3 -3
- package/{db-HCJ5PRB5.js → db-6QED3ZVO.js} +3 -3
- package/{understanding-3CUQQ6SV.js → understanding-ZOESBLF3.js} +3 -3
|
@@ -9,15 +9,6 @@ import {
|
|
|
9
9
|
loadProfileConfig,
|
|
10
10
|
saveDefaultProfile
|
|
11
11
|
} from "./chunk-ROWQEJRP.js";
|
|
12
|
-
import {
|
|
13
|
-
resolveAuthTokenFromEnv
|
|
14
|
-
} from "./chunk-ISNCLGUZ.js";
|
|
15
|
-
import {
|
|
16
|
-
DEFAULT_NOLO_SERVER_URL
|
|
17
|
-
} from "./chunk-OLZBQWZU.js";
|
|
18
|
-
import {
|
|
19
|
-
getDefaultCliLocalRuntimeDb
|
|
20
|
-
} from "./chunk-H33743XH.js";
|
|
21
12
|
import {
|
|
22
13
|
createMemoryKey,
|
|
23
14
|
createMemoryOwnerIndexKey,
|
|
@@ -27,6 +18,15 @@ import {
|
|
|
27
18
|
import {
|
|
28
19
|
asTrimmedNonEmptyStringArray
|
|
29
20
|
} from "./chunk-I42VC5KR.js";
|
|
21
|
+
import {
|
|
22
|
+
resolveAuthTokenFromEnv
|
|
23
|
+
} from "./chunk-AVMJVOQY.js";
|
|
24
|
+
import {
|
|
25
|
+
DEFAULT_NOLO_SERVER_URL
|
|
26
|
+
} from "./chunk-OLZBQWZU.js";
|
|
27
|
+
import {
|
|
28
|
+
getDefaultCliLocalRuntimeDb
|
|
29
|
+
} from "./chunk-H33743XH.js";
|
|
30
30
|
import {
|
|
31
31
|
asTrimmedString
|
|
32
32
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -1,54 +1,52 @@
|
|
|
1
|
-
import {
|
|
2
|
-
chooseMemoryOwners,
|
|
3
|
-
loadMemoryCandidatesFromDb
|
|
4
|
-
} from "./chunk-XENYHRUE.js";
|
|
5
1
|
import {
|
|
6
2
|
addContentToSpace,
|
|
7
3
|
prepareAndPersistMessage,
|
|
8
4
|
uiAskChoiceFunc,
|
|
9
5
|
uiAskChoiceFunctionSchema
|
|
10
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GROGNZOA.js";
|
|
11
7
|
import {
|
|
12
8
|
require_date_fns
|
|
13
9
|
} from "./chunk-M76ECQRD.js";
|
|
14
|
-
import {
|
|
15
|
-
PLATFORM_HOSTED_GLM_52_MODEL,
|
|
16
|
-
PLATFORM_HOSTED_GLM_PRICE
|
|
17
|
-
} from "./chunk-BBYVOSU2.js";
|
|
18
|
-
import {
|
|
19
|
-
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
20
|
-
} from "./chunk-IWX4UW2E.js";
|
|
21
|
-
import {
|
|
22
|
-
extractCustomId
|
|
23
|
-
} from "./chunk-DFFIZ25G.js";
|
|
24
10
|
import {
|
|
25
11
|
read,
|
|
26
12
|
readAndWait,
|
|
27
13
|
removeCachedEntity,
|
|
28
14
|
upsertSSREntity,
|
|
29
15
|
write
|
|
30
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-L3KWEH3V.js";
|
|
17
|
+
import {
|
|
18
|
+
chooseMemoryOwners,
|
|
19
|
+
loadMemoryCandidatesFromDb
|
|
20
|
+
} from "./chunk-XENYHRUE.js";
|
|
21
|
+
import {
|
|
22
|
+
PLATFORM_HOSTED_GLM_52_MODEL,
|
|
23
|
+
PLATFORM_HOSTED_GLM_PRICE,
|
|
24
|
+
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
25
|
+
} from "./chunk-524BDL33.js";
|
|
31
26
|
import {
|
|
32
27
|
createAgentKey,
|
|
33
28
|
createDialogKey,
|
|
34
29
|
createKey,
|
|
35
30
|
dialogMessageRange
|
|
36
31
|
} from "./chunk-O4BU24WZ.js";
|
|
32
|
+
import {
|
|
33
|
+
extractCustomId
|
|
34
|
+
} from "./chunk-DFFIZ25G.js";
|
|
37
35
|
import {
|
|
38
36
|
selectIdentityUserId
|
|
39
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-DVRHHFEA.js";
|
|
40
38
|
import {
|
|
41
39
|
asTrimmedString
|
|
42
40
|
} from "./chunk-3EUW3WEO.js";
|
|
43
41
|
import {
|
|
44
42
|
asOptionalPositiveFiniteNumber
|
|
45
43
|
} from "./chunk-U6VC4MU4.js";
|
|
46
|
-
import {
|
|
47
|
-
asOptionalTrimmedString
|
|
48
|
-
} from "./chunk-G3SUCT4W.js";
|
|
49
44
|
import {
|
|
50
45
|
isRecord
|
|
51
46
|
} from "./chunk-KUG52IAP.js";
|
|
47
|
+
import {
|
|
48
|
+
asOptionalTrimmedString
|
|
49
|
+
} from "./chunk-G3SUCT4W.js";
|
|
52
50
|
import {
|
|
53
51
|
__toESM
|
|
54
52
|
} from "./chunk-4VNS5WPM.js";
|
|
File without changes
|
|
@@ -3,28 +3,25 @@ import {
|
|
|
3
3
|
finalizeAccumulatedToolCalls,
|
|
4
4
|
flushChatCompletionStream,
|
|
5
5
|
readSseFrames,
|
|
6
|
-
throwIfChatCompletionStreamFailed
|
|
7
|
-
|
|
8
|
-
} from "./chunk-5KLGBAAR.js";
|
|
6
|
+
throwIfChatCompletionStreamFailed
|
|
7
|
+
} from "./chunk-3KGTFX3T.js";
|
|
9
8
|
import {
|
|
10
9
|
parseToolArgumentsJson
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-AISLHYDB.js";
|
|
12
11
|
import {
|
|
13
12
|
createThinkParserState,
|
|
14
13
|
extractThinkContent
|
|
15
14
|
} from "./chunk-OPZYGHUC.js";
|
|
16
15
|
import {
|
|
17
16
|
buildProviderAuthHeaders,
|
|
18
|
-
buildProviderExecutionPlan
|
|
19
|
-
|
|
17
|
+
buildProviderExecutionPlan,
|
|
18
|
+
toOpenAiCompatibleMessages
|
|
19
|
+
} from "./chunk-3HPUUWOR.js";
|
|
20
20
|
import {
|
|
21
21
|
canonicalizeToolName,
|
|
22
22
|
createGlob,
|
|
23
23
|
resolveExecutableOnPath
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import {
|
|
26
|
-
toErrorMessage
|
|
27
|
-
} from "./chunk-HNMXYYJR.js";
|
|
24
|
+
} from "./chunk-FZ2G3I4B.js";
|
|
28
25
|
import {
|
|
29
26
|
asRecordOrEmpty
|
|
30
27
|
} from "./chunk-KX6YBIHG.js";
|
|
@@ -40,21 +37,24 @@ import {
|
|
|
40
37
|
import {
|
|
41
38
|
asTrimmedLowercaseString
|
|
42
39
|
} from "./chunk-QSJ3HFEF.js";
|
|
40
|
+
import {
|
|
41
|
+
toErrorMessage
|
|
42
|
+
} from "./chunk-HNMXYYJR.js";
|
|
43
43
|
import {
|
|
44
44
|
asTrimmedString
|
|
45
45
|
} from "./chunk-3EUW3WEO.js";
|
|
46
46
|
import {
|
|
47
47
|
asOptionalPositiveFiniteNumber
|
|
48
48
|
} from "./chunk-U6VC4MU4.js";
|
|
49
|
+
import {
|
|
50
|
+
isRecord
|
|
51
|
+
} from "./chunk-KUG52IAP.js";
|
|
49
52
|
import {
|
|
50
53
|
normalizeServerOrigin
|
|
51
54
|
} from "./chunk-CF7PE763.js";
|
|
52
55
|
import {
|
|
53
56
|
asOptionalTrimmedString
|
|
54
57
|
} from "./chunk-G3SUCT4W.js";
|
|
55
|
-
import {
|
|
56
|
-
isRecord
|
|
57
|
-
} from "./chunk-KUG52IAP.js";
|
|
58
58
|
|
|
59
59
|
// packages/agent-runtime/kimiUserAgent.ts
|
|
60
60
|
var KIMI_CODE_CLI_VERSION = "0.29.2";
|
|
@@ -389,6 +389,7 @@ function dialogMessageRecordToAgentRuntimeMessage(record) {
|
|
|
389
389
|
return {
|
|
390
390
|
role: record.role,
|
|
391
391
|
content: record.content ?? "",
|
|
392
|
+
...record.contextReference !== void 0 ? { context_reference: record.contextReference } : {},
|
|
392
393
|
...typeof record.reasoning_content === "string" ? { reasoning_content: record.reasoning_content } : {},
|
|
393
394
|
...typeof record.toolCallId === "string" ? { tool_call_id: record.toolCallId } : {},
|
|
394
395
|
...Array.isArray(record.tool_calls) ? { tool_calls: record.tool_calls } : {},
|
|
@@ -469,6 +470,7 @@ function buildDialogMessageWriteOps(args) {
|
|
|
469
470
|
dialogId: args.dialogId,
|
|
470
471
|
role: message.role,
|
|
471
472
|
content: message.content ?? "",
|
|
473
|
+
...message.context_reference !== void 0 ? { contextReference: message.context_reference } : {},
|
|
472
474
|
// 持久化思维链(reasoning):空轮/异常排查的关键证据,
|
|
473
475
|
// 回读由 dialogMessageRecordToAgentRuntimeMessage 还原。
|
|
474
476
|
...typeof message.reasoning_content === "string" ? { reasoning_content: message.reasoning_content } : {},
|
|
@@ -878,7 +880,14 @@ var DEFAULT_LOCAL_TOOLS = /* @__PURE__ */ new Set([
|
|
|
878
880
|
"searchFiles",
|
|
879
881
|
"execShell",
|
|
880
882
|
"launchProcess",
|
|
881
|
-
"listProcesses"
|
|
883
|
+
"listProcesses",
|
|
884
|
+
// Scheduling tools: forking/observing sub-agents is a declared capability
|
|
885
|
+
// of capable agents, and the blast radius is strictly narrower than
|
|
886
|
+
// execShell (already default-enabled). Requiring an env allowlist for these
|
|
887
|
+
// while execShell is open by default inverted the risk model and forced every
|
|
888
|
+
// new local user to hand-edit .env files before sub-agent tasks worked.
|
|
889
|
+
"startAgentRun",
|
|
890
|
+
"controlAgentRun"
|
|
882
891
|
]);
|
|
883
892
|
function parseToolAllowlist(value) {
|
|
884
893
|
return (value ?? "").split(",").flatMap((item) => {
|
|
@@ -951,7 +960,7 @@ function resolveLocalToolPolicy(args) {
|
|
|
951
960
|
return {
|
|
952
961
|
allowed: false,
|
|
953
962
|
toolName,
|
|
954
|
-
reason: `${toolName} is not enabled for local runtime runs.
|
|
963
|
+
reason: `${toolName} is not enabled for local runtime runs. The agent must declare the tool in its manifest; in restricted mode (NOLO_LOCAL_TOOL_MODE=restricted) non-default tools also require adding to NOLO_LOCAL_ALLOWED_TOOLS (e.g. NOLO_LOCAL_ALLOWED_TOOLS=someCustomTool) and restarting the session so the env var loads.`
|
|
955
964
|
};
|
|
956
965
|
}
|
|
957
966
|
async function executeLocalToolWithPolicy(args) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BQECZ3Q4.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-W4NVOSFF.js";
|
|
@@ -12,14 +12,14 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-SBVUZC2E.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-VHBWHNVT.js";
|
|
19
19
|
import {
|
|
20
20
|
parseUserIdFromAuthToken,
|
|
21
21
|
resolveAuthToken
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-AVMJVOQY.js";
|
|
23
23
|
import {
|
|
24
24
|
toErrorMessage
|
|
25
25
|
} from "./chunk-HNMXYYJR.js";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
asOptionalFiniteNumber
|
|
10
10
|
} from "./chunk-WWC7I6TA.js";
|
|
11
|
-
import {
|
|
12
|
-
asOptionalTrimmedString
|
|
13
|
-
} from "./chunk-G3SUCT4W.js";
|
|
14
11
|
import {
|
|
15
12
|
isRecord
|
|
16
13
|
} from "./chunk-KUG52IAP.js";
|
|
14
|
+
import {
|
|
15
|
+
asOptionalTrimmedString
|
|
16
|
+
} from "./chunk-G3SUCT4W.js";
|
|
17
17
|
|
|
18
18
|
// packages/agent-runtime/toolNameAliases.ts
|
|
19
19
|
var LEGACY_TOOL_NAME_ALIASES = {
|
|
@@ -401,12 +401,6 @@ var DIALOG_PATH_RE = /^\/(?:space\/([^/]+)\/)?dialog-(.+)-([0-9A-HJKMNP-TV-Z]{26
|
|
|
401
401
|
function stringToolParam(description) {
|
|
402
402
|
return { type: "string", description };
|
|
403
403
|
}
|
|
404
|
-
function isNoloWorkspaceToolName(toolName) {
|
|
405
|
-
return typeof toolName === "string" && NOLO_WORKSPACE_TOOL_NAME_SET.has(toolName);
|
|
406
|
-
}
|
|
407
|
-
function filterNoloWorkspaceToolNames(toolNames) {
|
|
408
|
-
return (toolNames ?? []).filter(isNoloWorkspaceToolName);
|
|
409
|
-
}
|
|
410
404
|
function buildNoloWorkspaceOpenAiTools(args) {
|
|
411
405
|
const toolNames = new Set(args.toolNames ?? []);
|
|
412
406
|
const tools = [];
|
|
@@ -457,9 +451,13 @@ function buildNoloWorkspaceOpenAiTools(args) {
|
|
|
457
451
|
description: "Confirmed dialog ids or dbKeys to delete."
|
|
458
452
|
}
|
|
459
453
|
}, ["query"]);
|
|
460
|
-
add("listAgents", "List the current user's agents
|
|
454
|
+
add("listAgents", "List the current user's agents as safe summaries; use readAgent to resolve the runnable agentKey before delegation.", {
|
|
461
455
|
space: stringToolParam("Optional space id or URL."),
|
|
462
456
|
publicOnly: { type: "boolean", description: "Only show public agents." }
|
|
457
|
+
// 端间差异(LOW-R2-3):CLI 命令 `nolo agent list` 无 --limit(parseAgentListArgs
|
|
458
|
+
// 仅支持 --json/--public-only/--ids-only),本地缓存全量列出;web 端
|
|
459
|
+
// listAgentsFunc 另有 limit(默认 100,最大 500)。如后续对齐需在
|
|
460
|
+
// parseAgentListArgs / agentListCommands 增加 --limit 透传。
|
|
463
461
|
});
|
|
464
462
|
add("readAgent", "Read one agent config in the Nolo workspace.", {
|
|
465
463
|
agent: stringToolParam("Agent key, id, alias, or URL.")
|
|
@@ -775,6 +773,7 @@ function buildNoloWorkspaceCommandArgs(call) {
|
|
|
775
773
|
const space = noloStringArg(args.space);
|
|
776
774
|
if (space) cliArgs.push("--space", space);
|
|
777
775
|
if (args.publicOnly === true) cliArgs.push("--public-only");
|
|
776
|
+
cliArgs.push("--json", "--safe");
|
|
778
777
|
return cliArgs;
|
|
779
778
|
}
|
|
780
779
|
case "readAgent": {
|
|
@@ -796,12 +795,12 @@ function buildNoloWorkspaceCommandArgs(call) {
|
|
|
796
795
|
case "readDoc": {
|
|
797
796
|
const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
|
|
798
797
|
if (!doc) throw new Error("readDoc requires doc.");
|
|
799
|
-
return ["doc", "read", doc];
|
|
798
|
+
return doc.startsWith("page-") ? ["doc", "read", "--key", doc] : ["doc", "read", "--id", doc];
|
|
800
799
|
}
|
|
801
800
|
case "readSkillDoc": {
|
|
802
801
|
const doc = noloStringArg(args.doc ?? args.docKey ?? args.pageKey ?? args.key);
|
|
803
802
|
if (!doc) throw new Error("readSkillDoc requires doc.");
|
|
804
|
-
return ["skill-doc", "read", doc];
|
|
803
|
+
return doc.startsWith("page-") ? ["skill-doc", "read", "--key", doc] : ["skill-doc", "read", "--id", doc];
|
|
805
804
|
}
|
|
806
805
|
case "loadSkill":
|
|
807
806
|
throw new Error("loadSkill is a local-fs tool and has no CLI mapping; wire buildLoadSkillExecutor instead.");
|
|
@@ -944,7 +943,6 @@ export {
|
|
|
944
943
|
resolveExecutableOnPath,
|
|
945
944
|
createGlob,
|
|
946
945
|
NOLO_WORKSPACE_TOOL_NAMES,
|
|
947
|
-
filterNoloWorkspaceToolNames,
|
|
948
946
|
buildNoloWorkspaceOpenAiTools,
|
|
949
947
|
parseNoloWorkspaceToolArguments,
|
|
950
948
|
clampNoloPositiveInteger,
|