nolo-cli 0.163.0-alpha.1 → 0.164.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{_executeModel-3FMHTHSS.js → _executeModel-LFPW52TC.js} +12 -12
- package/{agentDeleteCommand-VRHLJZKX.js → agentDeleteCommand-IMM5JJOZ.js} +10 -10
- package/{agentEmailCommands-YGBQXOL3.js → agentEmailCommands-7ILQ4X4X.js} +12 -12
- package/{agentMachineCommands-FBAWZYHI.js → agentMachineCommands-2EOGVRMN.js} +1 -1
- package/{agentRecordCommands-KAK2G56H.js → agentRecordCommands-5ECAWMGW.js} +11 -11
- package/{agentRunCommand-62P3AGJA.js → agentRunCommand-DE4WN2TT.js} +12 -12
- package/{agentRunControl-XBSNHHZE.js → agentRunControl-NQR3GB6H.js} +1 -1
- package/{agentSlice-IZFU3WWH.js → agentSlice-YDRAYF3Z.js} +1 -1
- package/{chunk-2QQ7D3P5.js → chunk-3WTD7IIQ.js} +8 -8
- package/{chunk-7YQQXP42.js → chunk-4BLKVQBS.js} +2 -2
- package/{chunk-HRZW3SQN.js → chunk-6WNJ2XSC.js} +1 -1
- package/{chunk-EDJND3FK.js → chunk-AOVELMYY.js} +3 -3
- package/{chunk-Q5LVXPGT.js → chunk-CAWIORRR.js} +2 -2
- package/{chunk-CI6YDDL2.js → chunk-DRZCUIYC.js} +2 -2
- package/{chunk-K3N2DWLT.js → chunk-FKBWA3NN.js} +2 -2
- package/{chunk-6QIBWOPT.js → chunk-HXFIFEBA.js} +2 -2
- package/{chunk-V67W64OY.js → chunk-JGFVMK3S.js} +7 -7
- package/{chunk-FTHF2P2I.js → chunk-KVDB4IIT.js} +1 -1
- package/{chunk-UUPXTEZA.js → chunk-NOFLIR3Z.js} +1 -1
- package/{chunk-PNACBSRF.js → chunk-ONA4OKNI.js} +194 -31
- package/{chunk-7PDNSQZC.js → chunk-QKBEFLMA.js} +2 -2
- package/{chunk-GXZZOTDM.js → chunk-RYM5SWKD.js} +4546 -3344
- package/{chunk-U5U4WAFS.js → chunk-S53PIA3G.js} +36 -3
- package/{chunk-36IWXF25.js → chunk-VNPUBOKQ.js} +5 -5
- package/{chunk-JIAZK434.js → chunk-VVRYD7UL.js} +2 -2
- package/{chunk-4FDDVVCE.js → chunk-WBRBIRDG.js} +2 -2
- package/{chunk-SNAWGDXT.js → chunk-WJJL7RMW.js} +518 -67
- package/{chunk-QFL42TMV.js → chunk-ZEOGFBR3.js} +90 -15
- package/{commandRegistry-2DDDET7G.js → commandRegistry-TNRRYS6G.js} +26 -26
- package/{contentThunks-5DNEHJ2Z.js → contentThunks-FXRH3TBV.js} +3 -3
- package/{createAgentAutomationAction-4SUS2EFX.js → createAgentAutomationAction-6M64V55C.js} +3 -3
- package/{createDialogAction-JSFXX6JE.js → createDialogAction-LTK2YJ7I.js} +4 -4
- package/{createPageAction-37HHOXZ2.js → createPageAction-IKFGJRKB.js} +3 -3
- package/{dialogCommands-ZJRMCP4S.js → dialogCommands-7FZEZ5DV.js} +2 -2
- package/{dialogSlice-2Z66AWEW.js → dialogSlice-TTJ74TZ2.js} +2 -2
- package/{docStore-XMTUF3GX.js → docStore-GZW6PV6J.js} +1 -1
- package/{handleSendMessageAction-4VFVXTF2.js → handleSendMessageAction-YICSRGEU.js} +7 -7
- package/index.js +3 -3
- package/{localRuntimeAdapter-KKIVRYVN.js → localRuntimeAdapter-MTZVCQW6.js} +10 -10
- package/{machineCommands-UHQVCOD3.js → machineCommands-4P6O4WJD.js} +11 -11
- package/{machineWsRunDispatch-TX4X7TOJ.js → machineWsRunDispatch-2OQB3YA3.js} +11 -11
- package/package.json +1 -1
- package/{readlineWorkspace-BFVB2ON5.js → readlineWorkspace-EB5D4MF6.js} +13 -13
- package/{runAgentClientLoop-HHLHNMBE.js → runAgentClientLoop-DROGF2SZ.js} +10 -10
- package/{streamAgentChatTurn-KNPOLET7.js → streamAgentChatTurn-PJ2L3P25.js} +12 -12
- package/{tools-ULA7XJQT.js → tools-2MFN4Z5Y.js} +7 -7
- package/{updateDialogTitleAction-VUIVBDAS.js → updateDialogTitleAction-VQFUSGRH.js} +3 -3
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-NBTY7YJF.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveCliLocalRuntimeKeyCapability
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZEOGFBR3.js";
|
|
9
9
|
import {
|
|
10
10
|
HIGH_RISK_MUTATION_TOOL_NAMES
|
|
11
11
|
} from "./chunk-3M52COK5.js";
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
|
|
22
22
|
// packages/cli/agentRunArgs.ts
|
|
23
23
|
import { readFileSync } from "node:fs";
|
|
24
|
+
import { isAbsolute } from "node:path";
|
|
24
25
|
function readFlagValue(args, flag) {
|
|
25
26
|
const index = args.indexOf(flag);
|
|
26
27
|
if (index < 0) return void 0;
|
|
@@ -78,7 +79,8 @@ var VALUELESS_FLAGS = {
|
|
|
78
79
|
"--ephemeral": true,
|
|
79
80
|
"--memory-only": true,
|
|
80
81
|
"--read-only": true,
|
|
81
|
-
"--machine-shell": true
|
|
82
|
+
"--machine-shell": true,
|
|
83
|
+
"--instabox-allow-remote-release": true
|
|
82
84
|
};
|
|
83
85
|
function isValuelessFlag(arg) {
|
|
84
86
|
return Object.prototype.hasOwnProperty.call(VALUELESS_FLAGS, arg);
|
|
@@ -150,7 +152,7 @@ function writeUsage(output, commandPath) {
|
|
|
150
152
|
return;
|
|
151
153
|
}
|
|
152
154
|
output.write(
|
|
153
|
-
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
155
|
+
"Usage: nolo agent run <agent> <message> [--local|--server|--auto] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--instabox-workspace empty|snapshot] [--instabox-manifest <path>] [--instabox-artifact-dir <path>] [--instabox-allow-remote-release] [--instabox-allow-paid] [--ephemeral|--memory-only] [--continue <dialogId>] [--cwd <path>]\n nolo agent run --agent <agent> (--msg <message>|--msg-file <path>) [--image <url-or-path>] [--space <spaceId>] [--category <name>] [--inherit-from-dialog <dialog>] [--parent-dialog <dialog>] [--subject-dialog <dialog>] [--subject-ref <kind:id[:role]>] [--task-row-dbkey <key>] [--fallback-agent <agent>] (suggestions for agent to decide on quota) [--allowed-tool <tool>] [--blocked-tool <tool>] [--read-only] [--runtime-key <key>] [--docker-workspace-mode git|empty] [--instabox-workspace empty|snapshot] [--instabox-manifest <path>] [--instabox-artifact-dir <path>] [--instabox-allow-remote-release] [--instabox-allow-paid] [--machine-shell] [--dod <cmd>] [--bg] [--timeout-ms <n>] [--events jsonl] [--no-stream] [--skill <dbKey-or-md-path>]\n"
|
|
154
156
|
);
|
|
155
157
|
}
|
|
156
158
|
function parseAgentRunArgs(args, options = {}) {
|
|
@@ -205,6 +207,32 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
205
207
|
"\u4E0D\u80FD\u540C\u65F6\u6307\u5B9A --machine-shell \u4E0E --runtime-key\uFF1A--machine-shell \u5DF2\u628A\u6D3E\u53D1\u9501\u5230\u7ED1\u5B9A\u673A\u5668\u7684 server \u901A\u9053\uFF0CruntimeKey \u4F1A\u5931\u6548\uFF0C\u8BF7\u53EA\u4FDD\u7559\u5176\u4E2D\u4E00\u4E2A"
|
|
206
208
|
);
|
|
207
209
|
}
|
|
210
|
+
const rawInstaboxWorkspace = readFlagValue(args, "--instabox-workspace")?.trim();
|
|
211
|
+
const rawInstaboxManifest = readFlagValue(args, "--instabox-manifest")?.trim();
|
|
212
|
+
const rawInstaboxArtifactDir = readFlagValue(args, "--instabox-artifact-dir")?.trim();
|
|
213
|
+
const instaboxAllowRemoteRelease = args.includes("--instabox-allow-remote-release");
|
|
214
|
+
const instaboxAllowPaid = args.includes("--instabox-allow-paid");
|
|
215
|
+
const hasInstaboxFlags = args.includes("--instabox-workspace") || args.includes("--instabox-manifest") || args.includes("--instabox-artifact-dir") || instaboxAllowRemoteRelease || instaboxAllowPaid;
|
|
216
|
+
if (hasInstaboxFlags && runtimeKey !== "instabox") {
|
|
217
|
+
throw new Error("--instabox-* \u53C2\u6570\u4EC5\u9002\u7528\u4E8E --runtime-key instabox");
|
|
218
|
+
}
|
|
219
|
+
if (runtimeKey === "instabox") {
|
|
220
|
+
if (!rawInstaboxWorkspace || rawInstaboxWorkspace !== "empty" && rawInstaboxWorkspace !== "snapshot") {
|
|
221
|
+
throw new Error("--runtime-key instabox \u5FC5\u987B\u6307\u5B9A --instabox-workspace empty|snapshot");
|
|
222
|
+
}
|
|
223
|
+
if (!rawInstaboxArtifactDir) {
|
|
224
|
+
throw new Error("--runtime-key instabox \u5FC5\u987B\u6307\u5B9A --instabox-artifact-dir <\u7EDD\u5BF9\u8DEF\u5F84>");
|
|
225
|
+
}
|
|
226
|
+
if (!isAbsolute(rawInstaboxArtifactDir) || rawInstaboxArtifactDir.includes("\0") || rawInstaboxArtifactDir.split("/").includes("..")) {
|
|
227
|
+
throw new Error(`--instabox-artifact-dir \u5FC5\u987B\u4E3A\u5408\u6CD5\u7EDD\u5BF9\u8DEF\u5F84\uFF0C\u4E14\u4E0D\u80FD\u5305\u542B .. \u6216\u7A7A\u5B57\u7B26: "${rawInstaboxArtifactDir}"`);
|
|
228
|
+
}
|
|
229
|
+
if (rawInstaboxWorkspace === "snapshot" && !rawInstaboxManifest) {
|
|
230
|
+
throw new Error("--instabox-workspace snapshot \u5FC5\u987B\u6307\u5B9A --instabox-manifest <\u6587\u4EF6\u8DEF\u5F84>");
|
|
231
|
+
}
|
|
232
|
+
if (rawInstaboxWorkspace === "empty" && args.includes("--instabox-manifest")) {
|
|
233
|
+
throw new Error("--instabox-workspace empty \u4E0D\u5F97\u6307\u5B9A --instabox-manifest");
|
|
234
|
+
}
|
|
235
|
+
}
|
|
208
236
|
const runtimeMode = runtimeModeFromArgs(args);
|
|
209
237
|
const continueDialogId = readFlagValue(args, "--continue") ?? readFlagValue(args, "--dialog");
|
|
210
238
|
const spaceId = readFlagValue(args, "--space");
|
|
@@ -260,6 +288,11 @@ function parseAgentRunArgs(args, options = {}) {
|
|
|
260
288
|
...runtimeMode ? { runtimeMode } : !runtimeKey && (fullstackLocalWorkspaceDefault || explicitLocalCliAgentDefault || args.includes("--dangerously-allow-shell")) ? { runtimeMode: "local" } : {},
|
|
261
289
|
...runtimeKey ? { runtimeKey } : {},
|
|
262
290
|
...dockerWorkspaceMode ? { dockerWorkspaceMode } : {},
|
|
291
|
+
...rawInstaboxWorkspace ? { instaboxWorkspace: rawInstaboxWorkspace } : {},
|
|
292
|
+
...rawInstaboxManifest ? { instaboxManifestPath: rawInstaboxManifest } : {},
|
|
293
|
+
...rawInstaboxArtifactDir ? { instaboxArtifactDir: rawInstaboxArtifactDir } : {},
|
|
294
|
+
...instaboxAllowRemoteRelease ? { instaboxAllowRemoteRelease: true } : {},
|
|
295
|
+
...instaboxAllowPaid ? { instaboxAllowPaid: true } : {},
|
|
263
296
|
background: args.includes("--bg"),
|
|
264
297
|
noStream: args.includes("--no-stream"),
|
|
265
298
|
machineShell: args.includes("--machine-shell"),
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
mergeReferences,
|
|
8
8
|
resolveReferenceAssets,
|
|
9
9
|
resolveToolsFromKeys
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VVRYD7UL.js";
|
|
11
11
|
import {
|
|
12
12
|
UI_CARD_ENVELOPE_MAX_BYTES,
|
|
13
13
|
getAllToolRuns,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
selectSpaceContextLevel,
|
|
21
21
|
selectUserTonePreset,
|
|
22
22
|
uiCardFallback
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-HXFIFEBA.js";
|
|
24
24
|
import {
|
|
25
25
|
resolveToolBaseUrl
|
|
26
26
|
} from "./chunk-MYOH447Z.js";
|
|
@@ -32,15 +32,15 @@ import {
|
|
|
32
32
|
} from "./chunk-ZPKUJROL.js";
|
|
33
33
|
import {
|
|
34
34
|
getDocState
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-FKBWA3NN.js";
|
|
36
36
|
import {
|
|
37
37
|
getTableState
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-KVDB4IIT.js";
|
|
39
39
|
import {
|
|
40
40
|
PERSONALIZATION_DIALOG_CATEGORY,
|
|
41
41
|
buildPersonalizationDialogPolicyContext,
|
|
42
42
|
selectAllMsgs
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-3WTD7IIQ.js";
|
|
44
44
|
import {
|
|
45
45
|
getCurrentSpaceIdRaw,
|
|
46
46
|
getViewMode
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
clipMultilineText,
|
|
3
3
|
fetchAndSerializeTable,
|
|
4
4
|
waitForAbortableDelay
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HXFIFEBA.js";
|
|
6
6
|
import {
|
|
7
7
|
isGatewayHttpStatus
|
|
8
8
|
} from "./chunk-NF64D32W.js";
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
} from "./chunk-AGIM7IMJ.js";
|
|
22
22
|
import {
|
|
23
23
|
fetchAndCacheMessages
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-3WTD7IIQ.js";
|
|
25
25
|
import {
|
|
26
26
|
createSpaceKey
|
|
27
27
|
} from "./chunk-UAD2WT54.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
addContentToSpace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KVDB4IIT.js";
|
|
4
4
|
import {
|
|
5
5
|
format,
|
|
6
6
|
prepareAndPersistMessage,
|
|
7
7
|
uiAskChoiceFunc,
|
|
8
8
|
uiAskChoiceFunctionSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3WTD7IIQ.js";
|
|
10
10
|
import {
|
|
11
11
|
formatISO
|
|
12
12
|
} from "./chunk-ZRAU6T47.js";
|