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
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
providerHttpFailure,
|
|
5
5
|
readSseFrames,
|
|
6
6
|
throwIfChatCompletionStreamFailed
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-AAODAAUQ.js";
|
|
8
8
|
import {
|
|
9
9
|
parseToolArgumentsJson
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VVKQFITN.js";
|
|
11
11
|
import {
|
|
12
12
|
createThinkParserState,
|
|
13
13
|
createToolCallAccumulator,
|
|
@@ -18,32 +18,37 @@ import {
|
|
|
18
18
|
import {
|
|
19
19
|
requiresBareImageUrl,
|
|
20
20
|
toBareImageUrlMessages
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-34WPV75U.js";
|
|
22
22
|
import {
|
|
23
|
-
|
|
24
|
-
buildProviderExecutionPlan,
|
|
23
|
+
shouldStripReasoningContentForOutbound,
|
|
25
24
|
toOpenAiCompatibleMessages
|
|
26
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KFEVY3ST.js";
|
|
26
|
+
import {
|
|
27
|
+
buildProviderAuthHeaders,
|
|
28
|
+
buildProviderExecutionPlan
|
|
29
|
+
} from "./chunk-MUCU6ATG.js";
|
|
27
30
|
import {
|
|
28
|
-
canonicalizeToolName,
|
|
29
31
|
createGlob,
|
|
30
32
|
resolveExecutableOnPath
|
|
31
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-DKZFOK24.js";
|
|
32
34
|
import {
|
|
33
35
|
toErrorMessage
|
|
34
36
|
} from "./chunk-HNMXYYJR.js";
|
|
37
|
+
import {
|
|
38
|
+
canonicalizeToolName
|
|
39
|
+
} from "./chunk-ZZ2MH7LE.js";
|
|
35
40
|
import {
|
|
36
41
|
asRecordOrEmpty
|
|
37
42
|
} from "./chunk-KX6YBIHG.js";
|
|
38
43
|
import {
|
|
39
44
|
dialogMessageKey
|
|
40
|
-
} from "./chunk-
|
|
41
|
-
import {
|
|
42
|
-
asTrimmedNonEmptyStringArray
|
|
43
|
-
} from "./chunk-I42VC5KR.js";
|
|
45
|
+
} from "./chunk-6Y7A3OQQ.js";
|
|
44
46
|
import {
|
|
45
47
|
asOptionalFiniteNumber
|
|
46
48
|
} from "./chunk-WWC7I6TA.js";
|
|
49
|
+
import {
|
|
50
|
+
asTrimmedNonEmptyStringArray
|
|
51
|
+
} from "./chunk-I42VC5KR.js";
|
|
47
52
|
import {
|
|
48
53
|
asTrimmedLowercaseString
|
|
49
54
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -85,10 +90,20 @@ function parseSseDataLineJson(line) {
|
|
|
85
90
|
return null;
|
|
86
91
|
}
|
|
87
92
|
}
|
|
93
|
+
function parseSseDataLineObject(line) {
|
|
94
|
+
const parsed = parseSseDataLineJson(line);
|
|
95
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
96
|
+
}
|
|
88
97
|
|
|
89
98
|
// packages/agent-runtime/openAiCompatibleProvider.ts
|
|
90
99
|
function buildOpenAiCompatibleChatCompletionRequest(args) {
|
|
91
|
-
const
|
|
100
|
+
const shouldStripReasoning = shouldStripReasoningContentForOutbound(
|
|
101
|
+
args.providerConfig.provider,
|
|
102
|
+
args.providerConfig.model
|
|
103
|
+
);
|
|
104
|
+
const messages = toOpenAiCompatibleMessages(args.messages, {
|
|
105
|
+
stripReasoningContent: shouldStripReasoning
|
|
106
|
+
});
|
|
92
107
|
const body = {
|
|
93
108
|
model: args.providerConfig.model,
|
|
94
109
|
messages: requiresBareImageUrl({
|
|
@@ -524,14 +539,24 @@ function buildAgentRuntimeDialogWritePlan(args) {
|
|
|
524
539
|
const nowIso = new Date(args.now).toISOString();
|
|
525
540
|
const dialogKey = `dialog-${args.userId}-${dialogId}`;
|
|
526
541
|
const subjectRefs = buildRuntimeSubjectRefs(args.input.runtimeContext);
|
|
542
|
+
const requestedAgentMode = args.input.runtimeContext?.dialogAgentMode === "auto" || args.input.runtimeContext?.dialogAgentMode === "fixed" ? args.input.runtimeContext.dialogAgentMode : void 0;
|
|
543
|
+
const agentMode = requestedAgentMode ?? (args.existingDialog?.agentMode === "auto" ? "auto" : "fixed");
|
|
544
|
+
const dialogAgentFields = agentMode === "auto" ? {
|
|
545
|
+
agentMode: "auto",
|
|
546
|
+
cybots: [],
|
|
547
|
+
primaryAgentKey: void 0
|
|
548
|
+
} : {
|
|
549
|
+
agentMode: "fixed",
|
|
550
|
+
cybots: [args.input.agentKey],
|
|
551
|
+
primaryAgentKey: args.input.agentKey
|
|
552
|
+
};
|
|
527
553
|
const dialogRecord = {
|
|
528
554
|
...asRecordOrEmpty(args.existingDialog),
|
|
529
555
|
id: dialogId,
|
|
530
556
|
dbKey: dialogKey,
|
|
531
557
|
type: "dialog",
|
|
532
558
|
userId: args.userId,
|
|
533
|
-
|
|
534
|
-
primaryAgentKey: args.input.agentKey,
|
|
559
|
+
...dialogAgentFields,
|
|
535
560
|
title: pickDialogTitle({
|
|
536
561
|
existingDialog: args.existingDialog,
|
|
537
562
|
titleOverride: args.titleOverride,
|
|
@@ -1114,7 +1139,8 @@ var ProcessRegistry = class {
|
|
|
1114
1139
|
command: proc.command,
|
|
1115
1140
|
label: proc.label,
|
|
1116
1141
|
startedAt: Date.now(),
|
|
1117
|
-
status: "running"
|
|
1142
|
+
status: "running",
|
|
1143
|
+
persist: proc.persist ?? false
|
|
1118
1144
|
});
|
|
1119
1145
|
}
|
|
1120
1146
|
list() {
|
|
@@ -1137,9 +1163,9 @@ var ProcessRegistry = class {
|
|
|
1137
1163
|
}
|
|
1138
1164
|
return false;
|
|
1139
1165
|
}
|
|
1140
|
-
stopAll(signal = "SIGTERM") {
|
|
1166
|
+
stopAll(signal = "SIGTERM", opts) {
|
|
1141
1167
|
for (const item of this.processes.values()) {
|
|
1142
|
-
if (item.status === "running") {
|
|
1168
|
+
if (item.status === "running" && (opts?.includePersist || !item.persist)) {
|
|
1143
1169
|
try {
|
|
1144
1170
|
process.kill(-item.pgid, signal);
|
|
1145
1171
|
} catch {
|
|
@@ -1604,6 +1630,10 @@ function buildLaunchProcessTool() {
|
|
|
1604
1630
|
label: {
|
|
1605
1631
|
type: "string",
|
|
1606
1632
|
description: "Optional friendly label for the process."
|
|
1633
|
+
},
|
|
1634
|
+
persist: {
|
|
1635
|
+
type: "boolean",
|
|
1636
|
+
description: "Mark the process as persistent so it survives the current TUI/session exit (kept running in the background when the conversation closes). Defaults to false. Use for long-lived services (e.g. a desktop dev server) you want to keep alive after the session ends."
|
|
1607
1637
|
}
|
|
1608
1638
|
},
|
|
1609
1639
|
required: ["command"]
|
|
@@ -1616,7 +1646,7 @@ function buildListProcessesTool() {
|
|
|
1616
1646
|
type: "function",
|
|
1617
1647
|
function: {
|
|
1618
1648
|
name: "listProcesses",
|
|
1619
|
-
description: "List currently registered background processes launched via launchProcess. Returns array of {pid, label, command, status, startedAt}.",
|
|
1649
|
+
description: "List currently registered background processes launched via launchProcess. Returns array of {pid, label, command, status, startedAt, persist}.",
|
|
1620
1650
|
parameters: {
|
|
1621
1651
|
type: "object",
|
|
1622
1652
|
properties: {}
|
|
@@ -1760,6 +1790,16 @@ var SEARCH_OUTPUT_CHAR_LIMIT = 2e4;
|
|
|
1760
1790
|
function readTrimmedString(value) {
|
|
1761
1791
|
return asOptionalTrimmedString(value);
|
|
1762
1792
|
}
|
|
1793
|
+
function readBoolean(parsed, key) {
|
|
1794
|
+
const val = parsed[key];
|
|
1795
|
+
if (typeof val === "boolean") return val;
|
|
1796
|
+
if (typeof val === "string") {
|
|
1797
|
+
const lower = val.trim().toLowerCase();
|
|
1798
|
+
if (lower === "true") return true;
|
|
1799
|
+
if (lower === "false") return false;
|
|
1800
|
+
}
|
|
1801
|
+
return void 0;
|
|
1802
|
+
}
|
|
1763
1803
|
function resolveExecShellTimeoutMs(override) {
|
|
1764
1804
|
const fromOverride = asOptionalPositiveFiniteNumber(override);
|
|
1765
1805
|
if (fromOverride !== void 0) return fromOverride;
|
|
@@ -2965,7 +3005,7 @@ async function searchFilesTool(args) {
|
|
|
2965
3005
|
const literal = parsed.literal === true;
|
|
2966
3006
|
const caseSensitive = parsed.caseSensitive === false ? false : true;
|
|
2967
3007
|
const requestedPath = pickFirstAlias(parsed, PATH_FIELD_ALIASES) ?? ".";
|
|
2968
|
-
const includeIgnored = parsed.includeIgnored === true;
|
|
3008
|
+
const includeIgnored = parsed.includeIgnored === true || args.workspaceRoot.includes(".worktrees");
|
|
2969
3009
|
const searchPath = await resolveLocalWorkspaceToolPath({
|
|
2970
3010
|
workspaceRoot: args.workspaceRoot,
|
|
2971
3011
|
requestedPath,
|
|
@@ -3241,7 +3281,7 @@ async function globFilesTool(args) {
|
|
|
3241
3281
|
const exclude = readWorkspaceExcludeGlobs(parsed);
|
|
3242
3282
|
const maxResults = readWorkspaceMaxResults(parsed, warnings);
|
|
3243
3283
|
const requestedPath = pickFirstAlias(parsed, PATH_FIELD_ALIASES) ?? ".";
|
|
3244
|
-
const includeIgnored = parsed.includeIgnored === true;
|
|
3284
|
+
const includeIgnored = parsed.includeIgnored === true || args.workspaceRoot.includes(".worktrees");
|
|
3245
3285
|
const searchPath = await resolveLocalWorkspaceToolPath({
|
|
3246
3286
|
workspaceRoot: args.workspaceRoot,
|
|
3247
3287
|
requestedPath,
|
|
@@ -3477,6 +3517,7 @@ async function launchProcessTool(args) {
|
|
|
3477
3517
|
}
|
|
3478
3518
|
const labelArg = readTrimmedString(parsed.label);
|
|
3479
3519
|
const label = labelArg || deriveLabel(command);
|
|
3520
|
+
const persist = readBoolean(parsed, "persist");
|
|
3480
3521
|
const fullCommand = buildWorkspaceShellCommand({
|
|
3481
3522
|
toolName: args.call.name,
|
|
3482
3523
|
command,
|
|
@@ -3501,7 +3542,7 @@ async function launchProcessTool(args) {
|
|
|
3501
3542
|
}
|
|
3502
3543
|
const pgid = detached ? pid : pid;
|
|
3503
3544
|
const registry2 = getProcessRegistry();
|
|
3504
|
-
registry2.add({ pid, pgid, command, label });
|
|
3545
|
+
registry2.add({ pid, pgid, command, label, persist });
|
|
3505
3546
|
const cleanupChildOnHostSignal = (signal) => {
|
|
3506
3547
|
try {
|
|
3507
3548
|
if (detached) {
|
|
@@ -3617,6 +3658,7 @@ function createLocalWorkspaceToolExecutors(args) {
|
|
|
3617
3658
|
|
|
3618
3659
|
export {
|
|
3619
3660
|
parseSseDataLineJson,
|
|
3661
|
+
parseSseDataLineObject,
|
|
3620
3662
|
buildOpenAiCompatibleChatCompletionRequest,
|
|
3621
3663
|
parseOpenAiCompatibleChatCompletionResponse,
|
|
3622
3664
|
readOpenAiCompatibleSseCompletion,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
var processEnv = typeof process !== "undefined" ? process.env : void 0;
|
|
14
14
|
var reactNativeDev = typeof globalThis !== "undefined" && "__DEV__" in globalThis ? globalThis.__DEV__ : void 0;
|
|
15
15
|
var isProduction = processEnv?.NOLO_FORCE_PRODUCTION === "1" || processEnv?.NODE_ENV === "production" || reactNativeDev === false;
|
|
16
|
+
var isDevelopment = !isProduction;
|
|
16
17
|
var getIsDesktopApp = () => (typeof process !== "undefined" ? process.env?.NOLO_DESKTOP : processEnv?.NOLO_DESKTOP) === "1" || typeof window !== "undefined" && window.__NOLO_DESKTOP__ === true;
|
|
17
18
|
var isDesktopApp = getIsDesktopApp();
|
|
18
19
|
|
|
@@ -258,6 +259,7 @@ var normalizeTimeFields = (data) => ({
|
|
|
258
259
|
|
|
259
260
|
export {
|
|
260
261
|
isProduction,
|
|
262
|
+
isDevelopment,
|
|
261
263
|
getIsDesktopApp,
|
|
262
264
|
createClientLogger,
|
|
263
265
|
isAbortError,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
prepareAndPersistMessage,
|
|
4
4
|
uiAskChoiceFunc,
|
|
5
5
|
uiAskChoiceFunctionSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UIOYWBU7.js";
|
|
7
7
|
import {
|
|
8
8
|
require_date_fns
|
|
9
9
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
PLATFORM_HOSTED_GLM_52_MODEL,
|
|
15
15
|
PLATFORM_HOSTED_GLM_PRICE,
|
|
16
16
|
PLATFORM_HOSTED_KIMI_PROVIDER
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-O6W2O2DA.js";
|
|
18
18
|
import {
|
|
19
19
|
read,
|
|
20
20
|
readAndWait,
|
|
21
21
|
removeCachedEntity,
|
|
22
22
|
upsertSSREntity,
|
|
23
23
|
write
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-XRZJGPFI.js";
|
|
25
25
|
import {
|
|
26
26
|
createAgentKey,
|
|
27
27
|
createDialogKey,
|
|
@@ -30,10 +30,13 @@ import {
|
|
|
30
30
|
dialogMessageRange,
|
|
31
31
|
memoryOwnerRange,
|
|
32
32
|
memorySubjectKindRange
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-6Y7A3OQQ.js";
|
|
34
34
|
import {
|
|
35
35
|
selectIdentityUserId
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-XMLRJUU5.js";
|
|
37
|
+
import {
|
|
38
|
+
isDevelopment
|
|
39
|
+
} from "./chunk-R5V5G73M.js";
|
|
37
40
|
import {
|
|
38
41
|
asTrimmedString
|
|
39
42
|
} from "./chunk-3EUW3WEO.js";
|
|
@@ -333,11 +336,18 @@ function resolveAgentMemoryPolicy(input) {
|
|
|
333
336
|
}
|
|
334
337
|
function buildMemorySubjectsForAgent(input) {
|
|
335
338
|
const policy = input.policy ?? resolveAgentMemoryPolicy({ agentKey: input.agentKey });
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
339
|
+
const result = [];
|
|
340
|
+
const agentSubject = input.memorySubjectId?.trim();
|
|
341
|
+
if (agentSubject) {
|
|
342
|
+
result.push({ subjectType: "agent", subjectId: agentSubject });
|
|
343
|
+
}
|
|
344
|
+
if (policy.includeUserSubject && input.userId) {
|
|
345
|
+
result.push({ subjectType: "user", subjectId: input.userId });
|
|
346
|
+
}
|
|
347
|
+
if (input.spaceId) {
|
|
348
|
+
result.push({ subjectType: "space", subjectId: input.spaceId });
|
|
349
|
+
}
|
|
350
|
+
return result;
|
|
341
351
|
}
|
|
342
352
|
|
|
343
353
|
// packages/ai/memory/recentRelationshipRecap.ts
|
|
@@ -832,7 +842,9 @@ var notifyUserDataUpdated = () => {
|
|
|
832
842
|
};
|
|
833
843
|
var createDialogAction = async (args, thunkApi) => {
|
|
834
844
|
const {
|
|
835
|
-
cybots,
|
|
845
|
+
cybots: requestedCybots = [],
|
|
846
|
+
agentMode: requestedAgentMode,
|
|
847
|
+
autoRoute,
|
|
836
848
|
category,
|
|
837
849
|
spaceId: explicitSpaceId,
|
|
838
850
|
inheritFromDialogKey,
|
|
@@ -846,6 +858,8 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
846
858
|
} = args;
|
|
847
859
|
const { dispatch: dispatchRaw, getState, extra } = thunkApi;
|
|
848
860
|
const dispatch = dispatchRaw;
|
|
861
|
+
const agentMode = requestedAgentMode ?? (requestedCybots.length > 0 ? "fixed" : "auto");
|
|
862
|
+
const cybots = agentMode === "auto" ? [] : requestedCybots;
|
|
849
863
|
const agentKey = cybots[0];
|
|
850
864
|
const currentUserId = selectIdentityUserId(getState()) ?? null;
|
|
851
865
|
const isDeviceLocalDialog = isLocalOwnerDialogAgents(cybots);
|
|
@@ -861,6 +875,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
861
875
|
} catch {
|
|
862
876
|
}
|
|
863
877
|
const readAgentConfig = async () => {
|
|
878
|
+
if (!agentKey) return null;
|
|
864
879
|
const existing = await dispatch(
|
|
865
880
|
readAndWait({
|
|
866
881
|
dbKey: agentKey,
|
|
@@ -884,9 +899,9 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
884
899
|
).unwrap();
|
|
885
900
|
return recoveredBuiltinAgent;
|
|
886
901
|
};
|
|
887
|
-
const canSkipAgentConfigRead = !!skipAgentConfigRead && !!args.skipGreeting && !!titleOverride;
|
|
902
|
+
const canSkipAgentConfigRead = agentMode === "auto" || !!skipAgentConfigRead && !!args.skipGreeting && !!titleOverride;
|
|
888
903
|
const agentConfig = canSkipAgentConfigRead ? null : await readAgentConfig();
|
|
889
|
-
if (!agentConfig && !canSkipAgentConfigRead) {
|
|
904
|
+
if (agentMode === "fixed" && !agentConfig && !canSkipAgentConfigRead) {
|
|
890
905
|
throw new Error(`Agent with key ${agentKey} not found.`);
|
|
891
906
|
}
|
|
892
907
|
const shouldUseRelationshipGreeting = shouldUseRecentRelationshipRecap({
|
|
@@ -909,7 +924,8 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
909
924
|
agentKey,
|
|
910
925
|
currentSpaceId: explicitSpaceId
|
|
911
926
|
}).catch(() => ({ recap: null, reason: "no-db", sourceDialogKey: void 0 })) : null;
|
|
912
|
-
if (typeof window !== "undefined" && recentRelationshipRecapResolution && process
|
|
927
|
+
if (typeof window !== "undefined" && recentRelationshipRecapResolution && // 浏览器端没有 process:走 app/utils/env 的安全读法。
|
|
928
|
+
isDevelopment) {
|
|
913
929
|
console.debug("[dialog] recent relationship recap", {
|
|
914
930
|
agentKey,
|
|
915
931
|
userId,
|
|
@@ -919,7 +935,7 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
919
935
|
});
|
|
920
936
|
}
|
|
921
937
|
const time = (0, import_date_fns.format)(/* @__PURE__ */ new Date(), "MM-dd HH:mm");
|
|
922
|
-
const title = titleOverride || (agentConfig?.name || "Agent") + " " + time;
|
|
938
|
+
const title = titleOverride || (agentMode === "auto" ? "\u65B0\u5BF9\u8BDD" : agentConfig?.name || "Agent") + " " + time;
|
|
923
939
|
const spaceId = explicitSpaceId;
|
|
924
940
|
const dialogPath = createDialogKey(userId);
|
|
925
941
|
const dialogId = extractCustomId(dialogPath);
|
|
@@ -954,7 +970,10 @@ var createDialogAction = async (args, thunkApi) => {
|
|
|
954
970
|
id: dialogId,
|
|
955
971
|
dbKey: dialogPath,
|
|
956
972
|
userId,
|
|
973
|
+
agentMode,
|
|
957
974
|
cybots,
|
|
975
|
+
...agentMode === "fixed" && agentKey ? { primaryAgentKey: agentKey } : {},
|
|
976
|
+
...agentMode === "auto" && autoRoute ? { autoRoute } : {},
|
|
958
977
|
title,
|
|
959
978
|
type: "dialog" /* DIALOG */,
|
|
960
979
|
createdAt: (0, import_date_fns.formatISO)(/* @__PURE__ */ new Date()),
|