nolo-cli 0.245.0-alpha.1 → 0.247.0-alpha.1
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-OO6SN7M7.js → _executeModel-GIFVXKDT.js} +35 -35
- package/{accountResolver-QETKNC7T.js → accountResolver-NGICIMEE.js} +1 -1
- package/{action-R2EIXR7I.js → action-WZTKEF5H.js} +5 -5
- package/{addContentAction-W6JVLQ6H.js → addContentAction-MLI6GOBV.js} +8 -8
- package/{addDialogAgentAction-LVNKMXKZ.js → addDialogAgentAction-ARGQM22H.js} +7 -7
- package/{agentDeleteCommand-NEKF5OEM.js → agentDeleteCommand-MEJNOUQB.js} +53 -53
- package/{agentEmailCommands-4KEJPLEE.js → agentEmailCommands-RBQXQLVY.js} +53 -53
- package/{agentListCommands-GDHBLDRV.js → agentListCommands-U436UABA.js} +15 -15
- package/{agentMachineCommands-NE34FAX6.js → agentMachineCommands-R6WKJ622.js} +11 -11
- package/{agentPullCommand-QQQZSC6S.js → agentPullCommand-4EQZYHU4.js} +1 -1
- package/{agentRecordCommands-CKPX4I7D.js → agentRecordCommands-5MAINXNS.js} +52 -52
- package/{agentRunCommand-H7ZFCCGQ.js → agentRunCommand-DNBAO4PN.js} +52 -52
- package/{agentRunControl-CSMSJFFB.js → agentRunControl-RN2P6AOD.js} +2 -2
- package/{agentRuntimeLocal-J64NEF4X.js → agentRuntimeLocal-4Y47ZSIP.js} +7 -7
- package/{agentSlice-PRSWXIK3.js → agentSlice-ZGMOH6TE.js} +8 -8
- package/{appDeleteCommands-32M4NTHK.js → appDeleteCommands-KTYELLHJ.js} +12 -12
- package/{appDeployCommands-7DSA4N6M.js → appDeployCommands-HH4ZVRIS.js} +12 -12
- package/{appDeployStatusCommands-IPLQKNYA.js → appDeployStatusCommands-KSIDBUL2.js} +12 -12
- package/{appGetCommands-B26E4N3X.js → appGetCommands-N5E5L24Z.js} +12 -12
- package/{appListCommands-MLZPVLGF.js → appListCommands-7QC63Y6R.js} +12 -12
- package/{authCommand-PVZ45QRO.js → authCommand-3C3RN4OU.js} +7 -7
- package/{authCommands-6AUYO65N.js → authCommands-ZMVEDCQD.js} +3 -3
- package/{builtinSkillRegistry-LRVAQCPW.js → builtinSkillRegistry-VRCMQ77Q.js} +1 -1
- package/{chromeCommands-S7AW3AOD.js → chromeCommands-O4IIKTBD.js} +1 -1
- package/{chromeOpsCommands-TBPM6MR4.js → chromeOpsCommands-NZITLHWO.js} +3 -3
- package/{chunk-CUKLAFB3.js → chunk-2BKNICGK.js} +1 -1
- package/{chunk-6R4RGCPD.js → chunk-3DJJ4CFG.js} +4 -4
- package/{chunk-NUUVI2YB.js → chunk-3UPWX4NA.js} +3 -3
- package/{chunk-JVBLTZDJ.js → chunk-45L3GRIE.js} +171 -55
- package/{chunk-QIVE5WJE.js → chunk-4IQN6FWY.js} +1 -1
- package/{chunk-EH52A3UU.js → chunk-6CXQ3YNJ.js} +10 -10
- package/{chunk-TKE4OJ4B.js → chunk-6MTVACLN.js} +90 -12
- package/{chunk-XGWRH3OF.js → chunk-6TVYUQRM.js} +22 -6
- package/{chunk-QOURTDZL.js → chunk-6XVPMGXK.js} +1 -1
- package/{chunk-MEDPR36J.js → chunk-73PZD7JZ.js} +2 -2
- package/{chunk-NRDGAMC3.js → chunk-7IEJYF7U.js} +4 -4
- package/{chunk-JUW5ECKD.js → chunk-ABG4QNBR.js} +371 -49
- package/{chunk-VEVLLBFK.js → chunk-ADOOL3PG.js} +1 -1
- package/{chunk-XKV53E4E.js → chunk-AEZBAFC6.js} +21 -6
- package/{chunk-AVSZ6PBM.js → chunk-ARFCL53U.js} +3 -3
- package/{chunk-MECW2HJG.js → chunk-BAH3BAUZ.js} +4 -4
- package/{chunk-LELADM5Q.js → chunk-BFKJ2RS3.js} +1 -1
- package/{chunk-56O2J2Y4.js → chunk-BVEDT6DM.js} +2 -2
- package/{chunk-IFWXH7LH.js → chunk-CD64YXRB.js} +1 -1
- package/{chunk-EQZZASCD.js → chunk-CIGCTSBF.js} +1 -1
- package/{chunk-6MZMUZVR.js → chunk-CIUZXD5D.js} +2 -2
- package/{chunk-TB5KTLNB.js → chunk-CTIEJRTP.js} +25 -1
- package/{chunk-DLT2DN4M.js → chunk-D25ONVOH.js} +1 -1
- package/{chunk-OGZE6BZG.js → chunk-E5RYFR7E.js} +29 -16
- package/{chunk-2YGBI2XB.js → chunk-FE7G6DSP.js} +11 -1
- package/{chunk-RXTZB2DH.js → chunk-FFFKAOJN.js} +1 -1
- package/{chunk-ZJ3253MU.js → chunk-FTWAOKFU.js} +29 -29
- package/{chunk-YYRCIDK3.js → chunk-HCCQEMTK.js} +9 -9
- package/{chunk-PDAXMBLW.js → chunk-HZDK56EK.js} +7 -7
- package/{chunk-FZIZTODU.js → chunk-IIOSZAJX.js} +2 -2
- package/{chunk-UJUDZCJ7.js → chunk-IJZC2KIJ.js} +1 -1
- package/{chunk-2DWSICJH.js → chunk-ITBX27W6.js} +1 -1
- package/{chunk-R73TPODO.js → chunk-J2VIGDJN.js} +3 -3
- package/{chunk-WHEVIYHU.js → chunk-JEWMQR6J.js} +1 -1
- package/{chunk-KMDHRVS7.js → chunk-JFRJEPFI.js} +2 -2
- package/{chunk-VVCLWOAG.js → chunk-JU7VN4LF.js} +6 -6
- package/{chunk-7E3ZWTRX.js → chunk-K4CHT35N.js} +102 -61
- package/{chunk-ZYKJBRZ3.js → chunk-K7VIXYTZ.js} +1 -3
- package/{chunk-5QX6DBZP.js → chunk-KLAMJNKQ.js} +2 -2
- package/{chunk-JRRDP7EB.js → chunk-KXOPLLFP.js} +16 -0
- package/{chunk-6HNHHRB4.js → chunk-KZ5OD2MO.js} +2 -2
- package/{chunk-JN5FHTGU.js → chunk-LMGFVH65.js} +10 -10
- package/{chunk-76HAJUOJ.js → chunk-MTM4LRVG.js} +2 -2
- package/{chunk-T53F52YF.js → chunk-N74XL3NI.js} +6 -6
- package/{chunk-SF4GMDZO.js → chunk-OAZP4TSA.js} +1 -1
- package/{chunk-DEEYTDV6.js → chunk-ODBYGVO2.js} +4 -4
- package/{chunk-SESKIWB4.js → chunk-OLGFIQN2.js} +1 -1
- package/{chunk-F26GAEH3.js → chunk-OYUMJMC5.js} +5 -0
- package/{chunk-4TVOZGOS.js → chunk-PBPXXMWZ.js} +1 -1
- package/{chunk-2M6XS5HX.js → chunk-QMNVV3YM.js} +8 -8
- package/{chunk-T23G6PXQ.js → chunk-RHBD22LV.js} +1 -1
- package/{chunk-ZTTKOZQV.js → chunk-RR3MB26M.js} +2 -2
- package/{chunk-WBKUBX3E.js → chunk-S4UP27EG.js} +2 -2
- package/{chunk-KC2QVCI7.js → chunk-SPU3L3OR.js} +5 -4
- package/{chunk-QLUYDJST.js → chunk-TMRJGSK2.js} +1 -1
- package/{chunk-UAIHKQIA.js → chunk-U6RD332P.js} +18 -2
- package/{chunk-KB5RQRSJ.js → chunk-UF6J7NXV.js} +1 -1
- package/{chunk-6PXFEPHL.js → chunk-UOUMPHS5.js} +5 -5
- package/{chunk-CJQBWHNM.js → chunk-V4IYI3SB.js} +2 -2
- package/{chunk-H67WJ6JL.js → chunk-VKCPKCSS.js} +4 -4
- package/{chunk-2BSLGODA.js → chunk-W6T4FNZP.js} +1 -1
- package/{chunk-FMYNIAI6.js → chunk-WQDTSK5U.js} +2 -2
- package/{chunk-JIT5NMXZ.js → chunk-X22AUZKL.js} +9 -9
- package/{chunk-2IPR4PBB.js → chunk-X3OZ655T.js} +2 -2
- package/{chunk-VX5ABJWX.js → chunk-XCA4WHX5.js} +1 -1
- package/{chunk-LC5CVWP2.js → chunk-XJSEST7D.js} +3 -3
- package/{chunk-NJJK3PDA.js → chunk-XSRSAU3O.js} +3 -3
- package/{chunk-3IAIGS6N.js → chunk-Y4NPF2UN.js} +3 -3
- package/{chunk-JV5FHHF7.js → chunk-YDRRGVT5.js} +1 -1
- package/{chunk-VBKHKUB5.js → chunk-YFW4H6DL.js} +20 -20
- package/{chunk-5PASH2MB.js → chunk-YHNUDTU4.js} +4 -3
- package/{chunk-WBSJAIZP.js → chunk-YJPK35HB.js} +5 -0
- package/{chunk-RGANFHQO.js → chunk-Z7KE4K3H.js} +2 -2
- package/{chunk-5VVP7DW3.js → chunk-ZM5AZTQG.js} +2 -2
- package/{cliLocalAgentRecordReader-VSD6XTZS.js → cliLocalAgentRecordReader-LWMGOH3X.js} +9 -9
- package/{commandRegistry-7QPM63UU.js → commandRegistry-ZZUPMMTU.js} +86 -86
- package/{contentThunks-IOAU2PUW.js → contentThunks-SPXTX5U2.js} +14 -14
- package/{cooldownCommands-QL6DWGVU.js → cooldownCommands-TIFCHCUN.js} +1 -1
- package/{createAgentAutomationAction-BBKHUTSM.js → createAgentAutomationAction-KUQKCOXB.js} +14 -14
- package/{createDialogAction-RBSCOSW3.js → createDialogAction-HJN5U3XS.js} +15 -15
- package/{createPageAction-WYC37RBB.js → createPageAction-ZAHRDOAU.js} +15 -15
- package/{db-6NRZLEW2.js → db-CMUTP3W5.js} +2 -2
- package/{dbSlice-5MQ3ELID.js → dbSlice-656PMWR2.js} +7 -7
- package/{deleteFile-VCCHS72Y.js → deleteFile-ZCQESEEQ.js} +5 -5
- package/{dialogCommands-2BN4RK6W.js → dialogCommands-2JL3C5A3.js} +16 -16
- package/{dialogSlice-G77LC4NX.js → dialogSlice-BXIERQHO.js} +12 -12
- package/{dialogUsageCommand-BZPKR3DW.js → dialogUsageCommand-6RW2FY6K.js} +1 -1
- package/{docCreateCommands-L27KPSIL.js → docCreateCommands-CZOVKJM5.js} +11 -11
- package/{docDeleteCommands-ZD5C5I2W.js → docDeleteCommands-WOVJXKOC.js} +12 -12
- package/{docReadCommands-DKLSJSPU.js → docReadCommands-ZHBKTJLT.js} +11 -11
- package/{docStore-QQMKHKAF.js → docStore-FZ75HWP2.js} +8 -8
- package/{docUpdateCommands-D7DDA2DB.js → docUpdateCommands-UYXQNOU7.js} +11 -11
- package/{handleSendMessageAction-JGXBAJZH.js → handleSendMessageAction-KP6GGBFY.js} +26 -26
- package/{hostCredentialCreate-LNYCVHL7.js → hostCredentialCreate-6UGOSRDR.js} +52 -52
- package/index.js +8 -8
- package/{localDialogRead-3T2KMCRC.js → localDialogRead-CIOTQM5T.js} +1 -1
- package/{localRuntimeAdapter-KQRN4NYX.js → localRuntimeAdapter-R25LKDEH.js} +50 -50
- package/{localRuntimeAuthority-7DKIT7UH.js → localRuntimeAuthority-TYHQCTZN.js} +2 -2
- package/{localRuntimeDb-5WZ4RJJO.js → localRuntimeDb-BO7IVWAZ.js} +1 -1
- package/{machineCommands-DCWRWBG2.js → machineCommands-CNIN7M4X.js} +51 -51
- package/{machineWsRunDispatch-AI5BNSLG.js → machineWsRunDispatch-GLJGQSXX.js} +51 -51
- package/{mcpLocalAuthorizeCommand-DA6DT6B6.js → mcpLocalAuthorizeCommand-TI656UWC.js} +4 -4
- package/{memberThunks-KC3WJGL3.js → memberThunks-JFYC4Z5L.js} +9 -9
- package/package.json +1 -1
- package/{projectArchive-YXYBSSLF.js → projectArchive-NU2Z5HOR.js} +15 -15
- package/{read-T7VU2IMO.js → read-BRZHXUJ6.js} +5 -5
- package/{readDocTool-BPQ3QJSD.js → readDocTool-N7RVFQEE.js} +1 -1
- package/{readlineWorkspace-REGKKDAE.js → readlineWorkspace-RZCJAWF7.js} +586 -216
- package/{removeDialogAgentAction-FEUUVMYC.js → removeDialogAgentAction-J7XU7OUX.js} +9 -9
- package/{runAgentClientLoop-22324RL4.js → runAgentClientLoop-O2GRCGRZ.js} +33 -33
- package/{runtimeDoctorCommands-XQD4MN4I.js → runtimeDoctorCommands-RDRJXMXC.js} +2 -2
- package/{secretCommands-LH7QTJO2.js → secretCommands-2FEMRUFM.js} +2 -2
- package/{setDialogExtraReferencesAction-JSTQJPXL.js → setDialogExtraReferencesAction-Q4V2ZZW2.js} +8 -8
- package/{setPrimaryDialogAgentAction-Z2BQE3IY.js → setPrimaryDialogAgentAction-742H5S6T.js} +9 -9
- package/{settingThunks-C2YWCNYI.js → settingThunks-T4FXSV6M.js} +11 -11
- package/{spaceCommands-BRY25UNP.js → spaceCommands-C4UE2TNV.js} +11 -11
- package/{streamAgentChatTurn-AN66RJDM.js → streamAgentChatTurn-OWDJMU5E.js} +36 -36
- package/{switchDialogAgentAction-G7XVAOGH.js → switchDialogAgentAction-HLDLHRRA.js} +7 -7
- package/{tableCommands-UHEA5QNL.js → tableCommands-44GC4N6J.js} +2 -2
- package/{tools-YNGRZIHJ.js → tools-O7SGGVA3.js} +29 -29
- package/{tuiRestart-3J7LRMPR.js → tuiRestart-EOGC2BYY.js} +3 -3
- package/{tuiSummaryLlmCaller-2J6NG53N.js → tuiSummaryLlmCaller-TM5BU73J.js} +2 -2
- package/{updateCommands-5OYND6EF.js → updateCommands-FBYA5WVG.js} +3 -3
- package/{updateDialogTitleAction-N53JXNKY.js → updateDialogTitleAction-EXSZGTLL.js} +14 -14
- package/{usageCommand-SK7JTEPC.js → usageCommand-L4OFWXEU.js} +2 -2
- package/{usageRebuildCommand-DF3HUP6F.js → usageRebuildCommand-7JR33UHS.js} +2 -2
- package/{windowsSelfUpdate-HIYNL3VR.js → windowsSelfUpdate-M4V77OUB.js} +2 -2
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
hashStablePrefixContent,
|
|
63
63
|
resolveResponseGuidelines,
|
|
64
64
|
resolveToolGuidedSections
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-Z7KE4K3H.js";
|
|
66
66
|
import {
|
|
67
67
|
BRIDGE_STREAM_MAX_CHARS,
|
|
68
68
|
CLI_NOLO_WORKSPACE_TOOL_NAMES,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
parseNoloWorkspaceToolArguments,
|
|
78
78
|
readTextStreamUpToChars,
|
|
79
79
|
resolveNoloDialogInput
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-ITBX27W6.js";
|
|
81
81
|
import {
|
|
82
82
|
classifyUnparsableToolArgs,
|
|
83
83
|
collectStablePromptPrefix,
|
|
@@ -142,7 +142,7 @@ import {
|
|
|
142
142
|
} from "./chunk-WFGNWWJI.js";
|
|
143
143
|
import {
|
|
144
144
|
isAgentSkillDisabled
|
|
145
|
-
} from "./chunk-
|
|
145
|
+
} from "./chunk-YDRRGVT5.js";
|
|
146
146
|
import {
|
|
147
147
|
buildDialogFallbackTitleFromUserInput
|
|
148
148
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -222,8 +222,9 @@ import {
|
|
|
222
222
|
spillLargeToolOutput,
|
|
223
223
|
spillToolOutput,
|
|
224
224
|
toProcessTaskView,
|
|
225
|
-
truncateToolOutput
|
|
226
|
-
|
|
225
|
+
truncateToolOutput,
|
|
226
|
+
workspaceChildEnv
|
|
227
|
+
} from "./chunk-CTIEJRTP.js";
|
|
227
228
|
import {
|
|
228
229
|
estimateTokenCount
|
|
229
230
|
} from "./chunk-PSCNXBYA.js";
|
|
@@ -14840,13 +14841,13 @@ async function invokeCapability(capabilityOrName, input, ctx = {}) {
|
|
|
14840
14841
|
}
|
|
14841
14842
|
|
|
14842
14843
|
// packages/agent-runtime/localWorkspaceTools.ts
|
|
14843
|
-
import { existsSync as
|
|
14844
|
+
import { existsSync as existsSync2 } from "node:fs";
|
|
14844
14845
|
import { createHash as createHash3 } from "node:crypto";
|
|
14845
14846
|
|
|
14846
14847
|
// packages/agent-runtime/agentsMd.ts
|
|
14847
|
-
import {
|
|
14848
|
-
import { resolve } from "node:path";
|
|
14849
|
-
var AGENTS_MD_MAX_BYTES =
|
|
14848
|
+
import { readFileSync, realpathSync, statSync } from "node:fs";
|
|
14849
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
14850
|
+
var AGENTS_MD_MAX_BYTES = 16 * 1024;
|
|
14850
14851
|
var AGENTS_MD_MARKER_RESERVE_BYTES = 512;
|
|
14851
14852
|
var AGENTS_MD_CANDIDATES = ["AGENTS.md", "CLAUDE.md"];
|
|
14852
14853
|
function truncateAgentsMdContent(content, maxBytes = AGENTS_MD_MAX_BYTES) {
|
|
@@ -14888,7 +14889,7 @@ var AGENTS_MD_SUMMARY_PRIORITY_KEYWORDS = [
|
|
|
14888
14889
|
"\u5220\u9664",
|
|
14889
14890
|
"\u6D3E\u53D1"
|
|
14890
14891
|
];
|
|
14891
|
-
var AGENTS_MD_SUMMARY_POINTER_INSTRUCTION = "\u7528 readFile \u8BFB\u5168\u6587\uFF1A%REL%\uFF08cwd\uFF09/ %PATH%\n\u4EC5\u7D22\u5F15\uFF1A\u63D0\u4EA4/\u8BC4\u5BA1\u95E8\u7981\u3001worktree \u9694\u79BB\u3001\u6D4B\u8BD5/typecheck\u3001\u6587\u6863\u843D\u4F4D\u3001\u5220\u9664\u3001push/\u53D1\u5E03\u524D\uFF0C**\u5FC5\u987B\u5148 readFile \u8BFB\u5168\u6587\u518D\u6267\u884C**\u3002\n\u8DEF\u5F84\uFF1A%REL% \u76F8\u5BF9 cwd\uFF1Bmachine:<id>/\u6C99\u76D2\u6267\u884C\u9762 cwd \u7531\u5176\u51B3\u5B9A\uFF0C\u8BFB\u4E0D\u5230\u8BA9\u5BBF\u4E3B\u6CE8\u5165\u6216\u7528\u7EDD\u5BF9\u8DEF\u5F84\u3002";
|
|
14892
|
+
var AGENTS_MD_SUMMARY_POINTER_INSTRUCTION = "\u7528 readFile \u8BFB\u5168\u6587\uFF1A%REL%\uFF08cwd\uFF09/ %PATH%\n\u4EC5\u7D22\u5F15\uFF08\u672A\u6CE8\u5165\u5168\u6587\uFF09\uFF1A\u63D0\u4EA4/\u8BC4\u5BA1\u95E8\u7981\u3001worktree \u9694\u79BB\u3001\u6D4B\u8BD5/typecheck\u3001\u6587\u6863\u843D\u4F4D\u3001\u5220\u9664\u3001push/\u53D1\u5E03\u524D\uFF0C**\u5FC5\u987B\u5148 readFile \u8BFB\u5168\u6587\u518D\u6267\u884C**\u3002\n\u8DEF\u5F84\uFF1A%REL% \u76F8\u5BF9 cwd\uFF1Bmachine:<id>/\u6C99\u76D2\u6267\u884C\u9762 cwd \u7531\u5176\u51B3\u5B9A\uFF0C\u8BFB\u4E0D\u5230\u8BA9\u5BBF\u4E3B\u6CE8\u5165\u6216\u7528\u7EDD\u5BF9\u8DEF\u5F84\u3002";
|
|
14892
14893
|
var AGENTS_MD_SUMMARY_DELETE_REFERENCE = "- \u5220\u9664/\u4E0D\u53EF\u9006\u64CD\u4F5C\uFF1A\u9075\u5B88\u7CFB\u7EDF\u63D0\u793A\u7684\u5220\u9664\u7EA2\u7EBF\uFF08\u5148\u5448\u73B0\u5B8C\u6574\u5F85\u5220\u6E05\u5355\u5E76\u83B7\u7528\u6237\u660E\u786E\u786E\u8BA4\uFF0C\u7981\u6B62\u5148\u5220\u540E\u62A5\u3001\u7981\u6B62\u6A21\u7CCA\u5B9A\u4F4D\uFF09\uFF0C\u4ED3\u5E93\u82E5\u6709\u9644\u52A0\u5220\u9664\u89C4\u5219\u89C1\u5B8C\u6574\u6587\u4EF6\u3002";
|
|
14893
14894
|
var clipToChars = (text2, maxChars) => text2.length <= maxChars ? text2 : `${text2.slice(0, maxChars).trimEnd()}\u2026`;
|
|
14894
14895
|
var parseAgentsMdItem = (body) => {
|
|
@@ -15045,11 +15046,21 @@ ${entry.line}`;
|
|
|
15045
15046
|
return rendered;
|
|
15046
15047
|
};
|
|
15047
15048
|
function readAgentsMdLayerFromDisk(cwd) {
|
|
15049
|
+
if (!cwd) return null;
|
|
15050
|
+
let root;
|
|
15051
|
+
try {
|
|
15052
|
+
root = realpathSync(cwd);
|
|
15053
|
+
} catch {
|
|
15054
|
+
return null;
|
|
15055
|
+
}
|
|
15048
15056
|
for (const name of AGENTS_MD_CANDIDATES) {
|
|
15049
15057
|
const filePath = resolve(cwd, name);
|
|
15050
|
-
if (!existsSync(filePath)) continue;
|
|
15051
15058
|
try {
|
|
15052
|
-
const
|
|
15059
|
+
const target = realpathSync(resolve(root, name));
|
|
15060
|
+
const targetRelative = relative(root, target);
|
|
15061
|
+
if (targetRelative === ".." || targetRelative.startsWith(`..${sep}`) || isAbsolute(targetRelative)) continue;
|
|
15062
|
+
if (!statSync(target).isFile()) continue;
|
|
15063
|
+
const raw = readFileSync(target, "utf8");
|
|
15053
15064
|
const content = raw.trim();
|
|
15054
15065
|
if (!content) continue;
|
|
15055
15066
|
const totalBytes = Buffer.byteLength(raw, "utf8");
|
|
@@ -15088,20 +15099,20 @@ ${marker}`, name);
|
|
|
15088
15099
|
|
|
15089
15100
|
// packages/agent-runtime/visualRenderer.node.ts
|
|
15090
15101
|
import { createRequire } from "node:module";
|
|
15091
|
-
import { existsSync
|
|
15102
|
+
import { existsSync } from "node:fs";
|
|
15092
15103
|
import { realpath, stat, readFile } from "node:fs/promises";
|
|
15093
|
-
import { isAbsolute, relative, win32 } from "node:path";
|
|
15104
|
+
import { isAbsolute as isAbsolute2, relative as relative2, win32 } from "node:path";
|
|
15094
15105
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15095
15106
|
import { lookup as lookup2 } from "node:dns/promises";
|
|
15096
15107
|
import { isIP } from "node:net";
|
|
15097
15108
|
function isVisualPathOutside(rel) {
|
|
15098
|
-
return rel === ".." || /^\.\.[\\/]/.test(rel) ||
|
|
15109
|
+
return rel === ".." || /^\.\.[\\/]/.test(rel) || isAbsolute2(rel) || win32.isAbsolute(rel);
|
|
15099
15110
|
}
|
|
15100
15111
|
async function validateVisualUrl(input, workspaceRoot) {
|
|
15101
15112
|
const url = new URL(input);
|
|
15102
15113
|
if (url.protocol === "file:") {
|
|
15103
15114
|
const [root, path] = await Promise.all([realpath(workspaceRoot), realpath(fileURLToPath(url))]);
|
|
15104
|
-
const rel =
|
|
15115
|
+
const rel = relative2(root, path);
|
|
15105
15116
|
if (isVisualPathOutside(rel)) throw new Error("Renderer file URL is outside workspaceRoot.");
|
|
15106
15117
|
if (!(await stat(path)).isFile()) throw new Error("Renderer file URL must point to a file, not a directory.");
|
|
15107
15118
|
return pathToFileURL(path);
|
|
@@ -15159,7 +15170,7 @@ function visualRendererCapability() {
|
|
|
15159
15170
|
if (process.env.NOLO_VISUAL_RENDERER_DISABLED === "1") return { available: false, reasonCode: "disabled", reason: "Platform renderer disabled by NOLO_VISUAL_RENDERER_DISABLED=1 on this runtime host." };
|
|
15160
15171
|
try {
|
|
15161
15172
|
const { chromium } = require2("playwright");
|
|
15162
|
-
const executablePath = [chromium.executablePath(), resolveExecutableOnPath("google-chrome"), resolveExecutableOnPath("chromium"), resolveExecutableOnPath("chromium-browser")].find((path) => !!path &&
|
|
15173
|
+
const executablePath = [chromium.executablePath(), resolveExecutableOnPath("google-chrome"), resolveExecutableOnPath("chromium"), resolveExecutableOnPath("chromium-browser")].find((path) => !!path && existsSync(path));
|
|
15163
15174
|
if (!executablePath) return { available: false, reasonCode: "missing-browser", reason: "No Chromium renderer installed. Install Playwright Chromium (playwright install chromium) or system Chromium/Google Chrome on the runtime host." };
|
|
15164
15175
|
return { available: true, chromium, executablePath };
|
|
15165
15176
|
} catch {
|
|
@@ -15175,10 +15186,10 @@ async function renderVisualPage(args2) {
|
|
|
15175
15186
|
if (typeof args2.persistScreenshot !== "function") {
|
|
15176
15187
|
throw new Error("renderVisualPage: persistScreenshot is required (expected a function that stores the PNG bytes)");
|
|
15177
15188
|
}
|
|
15178
|
-
if (!
|
|
15189
|
+
if (!isAbsolute2(args2.workspaceRoot)) {
|
|
15179
15190
|
throw new Error("renderVisualPage: workspaceRoot must be an absolute path");
|
|
15180
15191
|
}
|
|
15181
|
-
if (!
|
|
15192
|
+
if (!isAbsolute2(args2.screenshotPath) || !relative2(args2.workspaceRoot, args2.screenshotPath) || isVisualPathOutside(relative2(args2.workspaceRoot, args2.screenshotPath))) {
|
|
15182
15193
|
throw new Error("renderVisualPage: screenshotPath must be a file path inside workspaceRoot");
|
|
15183
15194
|
}
|
|
15184
15195
|
if (args2.timeoutMs !== void 0 && (typeof args2.timeoutMs !== "number" || !Number.isFinite(args2.timeoutMs) || args2.timeoutMs <= 0)) {
|
|
@@ -15406,7 +15417,17 @@ function createHostWindowCapture(options = {}) {
|
|
|
15406
15417
|
return {
|
|
15407
15418
|
...image,
|
|
15408
15419
|
content: `${formatImageSummary({ kind: "screenshot", ...image.imageSummary })}
|
|
15409
|
-
\u6765\u6E90\uFF1A\u5BBF\u4E3B portal \u5168\u5C4F/\u4EA4\u4E92\u9009\u62E9\u7ED3\u679C\uFF1Bportal \u672A\u63D0\u4F9B\u5E94\u7528/\u7A97\u53E3\u8EAB\u4EFD\uFF0C\u65E0\u6CD5\u786E\u8BA4\u7A97\u53E3\u540D\u3002
|
|
15420
|
+
\u6765\u6E90\uFF1A\u5BBF\u4E3B portal \u5168\u5C4F/\u4EA4\u4E92\u9009\u62E9\u7ED3\u679C\uFF1Bportal \u672A\u63D0\u4F9B\u5E94\u7528/\u7A97\u53E3\u8EAB\u4EFD\uFF0C\u65E0\u6CD5\u786E\u8BA4\u7A97\u53E3\u540D\u3002`,
|
|
15421
|
+
metadata: {
|
|
15422
|
+
path: image.imageSummary.path,
|
|
15423
|
+
imageArtifacts: [{
|
|
15424
|
+
path: image.imageSummary.path,
|
|
15425
|
+
kind: "screenshot",
|
|
15426
|
+
width: image.imageSummary.width,
|
|
15427
|
+
height: image.imageSummary.height,
|
|
15428
|
+
bytes: image.imageSummary.bytes
|
|
15429
|
+
}]
|
|
15430
|
+
}
|
|
15410
15431
|
};
|
|
15411
15432
|
} finally {
|
|
15412
15433
|
active--;
|
|
@@ -15435,7 +15456,7 @@ var captureHostWindow = createHostWindowCapture();
|
|
|
15435
15456
|
// packages/agent-runtime/localWorkspaceTools.ts
|
|
15436
15457
|
import { lstat as lstat2, readdir as readdir2, readFile as readFile4, realpath as realpath3, stat as stat4 } from "node:fs/promises";
|
|
15437
15458
|
import { homedir } from "node:os";
|
|
15438
|
-
import { dirname as dirname2, relative as
|
|
15459
|
+
import { dirname as dirname2, relative as relative5, resolve as resolve5, sep as sep3 } from "node:path";
|
|
15439
15460
|
import { spawn as spawnChildProcess2 } from "node:child_process";
|
|
15440
15461
|
|
|
15441
15462
|
// packages/agent-runtime/runResultReadProjection.ts
|
|
@@ -15518,7 +15539,7 @@ function isLineRangeCovered(request3, covered) {
|
|
|
15518
15539
|
|
|
15519
15540
|
// packages/agent-runtime/fileTextSearch.ts
|
|
15520
15541
|
import { readdir, readFile as readFile3, stat as stat3 } from "node:fs/promises";
|
|
15521
|
-
import { basename as basename2, relative as
|
|
15542
|
+
import { basename as basename2, relative as relative3, resolve as resolve3 } from "node:path";
|
|
15522
15543
|
import { spawn as spawnChildProcess } from "node:child_process";
|
|
15523
15544
|
|
|
15524
15545
|
// packages/agent-runtime/gitignore.ts
|
|
@@ -15558,7 +15579,7 @@ async function hasRootGitignore(workspaceRoot) {
|
|
|
15558
15579
|
|
|
15559
15580
|
// packages/agent-runtime/fileTextSearch.ts
|
|
15560
15581
|
var normalizePath = (value) => value.replaceAll("\\", "/");
|
|
15561
|
-
var pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(
|
|
15582
|
+
var pathFor = (root, file, absolute = false) => absolute ? normalizePath(file) : normalizePath(relative3(root, file) || basename2(file));
|
|
15562
15583
|
var COMMAND_LIMIT_HEADROOM = 1;
|
|
15563
15584
|
var MAX_SEARCH_FILE_BYTES = 8 * 1024 * 1024;
|
|
15564
15585
|
var MAX_SEARCH_LINE_CHARS = 2e3;
|
|
@@ -16470,10 +16491,10 @@ function filterDeclaredWorkspaceToolNames(args2) {
|
|
|
16470
16491
|
// packages/agent-runtime/workspacePathGuard.ts
|
|
16471
16492
|
import { constants as fsConstants } from "node:fs";
|
|
16472
16493
|
import { lstat, mkdir, open, readlink, realpath as realpath2 } from "node:fs/promises";
|
|
16473
|
-
import { basename as basename3, dirname, isAbsolute as
|
|
16494
|
+
import { basename as basename3, dirname, isAbsolute as isAbsolute3, join as join2, relative as relative4, resolve as resolve4, sep as sep2 } from "node:path";
|
|
16474
16495
|
function isPathInsideRoot(root, targetPath) {
|
|
16475
|
-
const rel =
|
|
16476
|
-
return rel === "" || rel !== ".." && !rel.startsWith(`..${
|
|
16496
|
+
const rel = relative4(resolve4(root), resolve4(targetPath));
|
|
16497
|
+
return rel === "" || rel !== ".." && !rel.startsWith(`..${sep2}`) && !isAbsolute3(rel);
|
|
16477
16498
|
}
|
|
16478
16499
|
function isNotFoundError(error) {
|
|
16479
16500
|
const code = error?.code;
|
|
@@ -16560,7 +16581,7 @@ async function resolveOpenedFilePath(handle) {
|
|
|
16560
16581
|
for (const root of FD_LINK_ROOTS) {
|
|
16561
16582
|
try {
|
|
16562
16583
|
const linked = await readlink(`${root}/${handle.fd}`);
|
|
16563
|
-
if (
|
|
16584
|
+
if (isAbsolute3(linked)) return linked.replace(/ \(deleted\)$/, "");
|
|
16564
16585
|
} catch {
|
|
16565
16586
|
}
|
|
16566
16587
|
}
|
|
@@ -16850,12 +16871,12 @@ function parseWorkspaceToolArguments(raw) {
|
|
|
16850
16871
|
}
|
|
16851
16872
|
}
|
|
16852
16873
|
function normalizeWorkspaceRelativePath(args2) {
|
|
16853
|
-
const relativePath =
|
|
16874
|
+
const relativePath = relative5(args2.workspaceRoot, args2.targetPath);
|
|
16854
16875
|
return relativePath || ".";
|
|
16855
16876
|
}
|
|
16856
16877
|
function isPathInsideWorkspace(args2) {
|
|
16857
|
-
const relativePath =
|
|
16858
|
-
return relativePath === "" || !relativePath.startsWith("..") && !relativePath.includes(`..${
|
|
16878
|
+
const relativePath = relative5(args2.workspaceRoot, args2.targetPath);
|
|
16879
|
+
return relativePath === "" || !relativePath.startsWith("..") && !relativePath.includes(`..${sep3}`);
|
|
16859
16880
|
}
|
|
16860
16881
|
var PATH_FIELD_ALIASES = ["path", "file_path", "filePath", "filename", "file", "target_file", "targetFile", "file_to_read", "fileToRead", "target_path", "read_path", "path_to_read", "pathToRead"];
|
|
16861
16882
|
var OLD_TEXT_FIELD_ALIASES = ["oldText", "old_string", "oldString", "search", "search_string", "find", "match"];
|
|
@@ -17116,7 +17137,7 @@ function resolveRipgrepBinary(env = process.env) {
|
|
|
17116
17137
|
const fromEnv = asOptionalTrimmedString(env.NOLO_BUNDLED_RG);
|
|
17117
17138
|
if (fromEnv) {
|
|
17118
17139
|
try {
|
|
17119
|
-
if (
|
|
17140
|
+
if (existsSync2(fromEnv)) return fromEnv;
|
|
17120
17141
|
} catch {
|
|
17121
17142
|
}
|
|
17122
17143
|
}
|
|
@@ -17620,7 +17641,7 @@ async function listWorkspaceEntries(args2) {
|
|
|
17620
17641
|
if (truncated) break;
|
|
17621
17642
|
const absolutePath = resolve5(dirPath, name);
|
|
17622
17643
|
const info = await stat4(absolutePath);
|
|
17623
|
-
const relativePath =
|
|
17644
|
+
const relativePath = relative5(args2.dirPath, absolutePath) || ".";
|
|
17624
17645
|
const isDirectory = info.isDirectory();
|
|
17625
17646
|
entries.push(isDirectory ? `${relativePath}/` : relativePath);
|
|
17626
17647
|
if (args2.maxResults && entries.length >= args2.maxResults) {
|
|
@@ -17925,7 +17946,14 @@ async function captureVisualStateTool(args2) {
|
|
|
17925
17946
|
script: null,
|
|
17926
17947
|
args: [],
|
|
17927
17948
|
compatibilityVersion: 2,
|
|
17928
|
-
compatibilityNote: "Platform rendering replaces workspace scripts; script/args/stdoutTail no longer describe a subprocess. Existing page metrics and path fields are retained."
|
|
17949
|
+
compatibilityNote: "Platform rendering replaces workspace scripts; script/args/stdoutTail no longer describe a subprocess. Existing page metrics and path fields are retained.",
|
|
17950
|
+
imageArtifacts: [{
|
|
17951
|
+
path: screenshotPath,
|
|
17952
|
+
kind: "screenshot",
|
|
17953
|
+
width: image.imageSummary.width,
|
|
17954
|
+
height: image.imageSummary.height,
|
|
17955
|
+
bytes: image.imageSummary.bytes
|
|
17956
|
+
}]
|
|
17929
17957
|
}
|
|
17930
17958
|
};
|
|
17931
17959
|
} catch (error) {
|
|
@@ -18028,6 +18056,7 @@ async function launchProcessTool(args2) {
|
|
|
18028
18056
|
const detached = process.platform !== "win32";
|
|
18029
18057
|
const proc = spawnChildProcess2(cmdArgs[0] ?? "", cmdArgs.slice(1), {
|
|
18030
18058
|
cwd: resolve5(args2.workspaceRoot),
|
|
18059
|
+
env: workspaceChildEnv(),
|
|
18031
18060
|
stdio: ["ignore", "pipe", "pipe"],
|
|
18032
18061
|
detached,
|
|
18033
18062
|
windowsHide: true
|
|
@@ -18373,12 +18402,25 @@ function createLocalWorkspaceToolExecutors(args2) {
|
|
|
18373
18402
|
});
|
|
18374
18403
|
return await readLocalImage(absolutePath);
|
|
18375
18404
|
} catch (error) {
|
|
18376
|
-
|
|
18405
|
+
const inner = (error instanceof Error ? error.message : String(error)).replace(/^read_image:\s*/i, "");
|
|
18406
|
+
throw new Error(`read_image: failed to read ${JSON.stringify(path)}: ${inner}`);
|
|
18377
18407
|
}
|
|
18378
18408
|
}));
|
|
18379
18409
|
return {
|
|
18380
18410
|
content: results2.map((result4) => result4.content).join("\n"),
|
|
18381
|
-
images: results2.flatMap((result4) => result4.images ?? [])
|
|
18411
|
+
images: results2.flatMap((result4) => result4.images ?? []),
|
|
18412
|
+
metadata: {
|
|
18413
|
+
paths: imagePaths,
|
|
18414
|
+
count: imagePaths.length,
|
|
18415
|
+
...imagePaths.length === 1 ? { path: imagePaths[0] } : {},
|
|
18416
|
+
imageArtifacts: results2.map((result4) => ({
|
|
18417
|
+
path: result4.imageSummary.path,
|
|
18418
|
+
kind: "image",
|
|
18419
|
+
width: result4.imageSummary.width,
|
|
18420
|
+
height: result4.imageSummary.height,
|
|
18421
|
+
bytes: result4.imageSummary.bytes
|
|
18422
|
+
}))
|
|
18423
|
+
}
|
|
18382
18424
|
};
|
|
18383
18425
|
},
|
|
18384
18426
|
readFile: Object.assign((call) => readFileTool({
|
|
@@ -18890,6 +18932,78 @@ function emitLoopEvent(boundary, event, bridge) {
|
|
|
18890
18932
|
function clip(value, max4 = 240) {
|
|
18891
18933
|
return clipCompactText(value, max4);
|
|
18892
18934
|
}
|
|
18935
|
+
var IMAGE_ARTIFACT_TOOL_NAMES = /* @__PURE__ */ new Set([
|
|
18936
|
+
"read_image",
|
|
18937
|
+
"captureVisualState",
|
|
18938
|
+
"browser_screenshot",
|
|
18939
|
+
"captureHostWindow"
|
|
18940
|
+
]);
|
|
18941
|
+
function sanitizeArtifactPath(raw) {
|
|
18942
|
+
if (typeof raw !== "string") return void 0;
|
|
18943
|
+
const trimmed = raw.trim();
|
|
18944
|
+
if (!trimmed || /[\u0000-\u001f\u007f]/.test(trimmed)) return void 0;
|
|
18945
|
+
if (/^(?:https?|data|javascript):/i.test(trimmed)) return void 0;
|
|
18946
|
+
return trimmed;
|
|
18947
|
+
}
|
|
18948
|
+
function normalizeStructuredImageArtifact(raw, defaultKind) {
|
|
18949
|
+
if (!raw || typeof raw !== "object") return void 0;
|
|
18950
|
+
const item = raw;
|
|
18951
|
+
const path = sanitizeArtifactPath(item.path);
|
|
18952
|
+
if (!path) return void 0;
|
|
18953
|
+
const kind = item.kind === "image" || item.kind === "screenshot" ? item.kind : defaultKind;
|
|
18954
|
+
return {
|
|
18955
|
+
path,
|
|
18956
|
+
kind,
|
|
18957
|
+
...typeof item.width === "number" && Number.isFinite(item.width) && item.width > 0 ? { width: item.width } : {},
|
|
18958
|
+
...typeof item.height === "number" && Number.isFinite(item.height) && item.height > 0 ? { height: item.height } : {},
|
|
18959
|
+
...typeof item.bytes === "number" && Number.isFinite(item.bytes) && item.bytes > 0 ? { bytes: item.bytes } : {}
|
|
18960
|
+
};
|
|
18961
|
+
}
|
|
18962
|
+
function extractToolImageArtifacts(toolName, toolResult) {
|
|
18963
|
+
if (!IMAGE_ARTIFACT_TOOL_NAMES.has(toolName)) return void 0;
|
|
18964
|
+
const metadata = toolResult.metadata;
|
|
18965
|
+
if (!metadata || typeof metadata !== "object") return void 0;
|
|
18966
|
+
if (metadata.ok === false || metadata.imageDelivered === false || metadata.cancelled === true || metadata.failed === true) {
|
|
18967
|
+
return void 0;
|
|
18968
|
+
}
|
|
18969
|
+
const defaultKind = toolName === "read_image" ? "image" : "screenshot";
|
|
18970
|
+
const byPath = /* @__PURE__ */ new Map();
|
|
18971
|
+
const add2 = (candidate) => {
|
|
18972
|
+
const path = sanitizeArtifactPath(candidate.path);
|
|
18973
|
+
if (!path) return;
|
|
18974
|
+
const kind = candidate.kind ?? defaultKind;
|
|
18975
|
+
const existing = byPath.get(path);
|
|
18976
|
+
if (!existing) {
|
|
18977
|
+
byPath.set(path, {
|
|
18978
|
+
path,
|
|
18979
|
+
kind,
|
|
18980
|
+
...candidate.width !== void 0 ? { width: candidate.width } : {},
|
|
18981
|
+
...candidate.height !== void 0 ? { height: candidate.height } : {},
|
|
18982
|
+
...candidate.bytes !== void 0 ? { bytes: candidate.bytes } : {}
|
|
18983
|
+
});
|
|
18984
|
+
return;
|
|
18985
|
+
}
|
|
18986
|
+
if (existing.width === void 0 && candidate.width !== void 0) existing.width = candidate.width;
|
|
18987
|
+
if (existing.height === void 0 && candidate.height !== void 0) existing.height = candidate.height;
|
|
18988
|
+
if (existing.bytes === void 0 && candidate.bytes !== void 0) existing.bytes = candidate.bytes;
|
|
18989
|
+
};
|
|
18990
|
+
if (Array.isArray(metadata.imageArtifacts)) {
|
|
18991
|
+
for (const entry of metadata.imageArtifacts) {
|
|
18992
|
+
const normalized = normalizeStructuredImageArtifact(entry, defaultKind);
|
|
18993
|
+
if (normalized) add2(normalized);
|
|
18994
|
+
}
|
|
18995
|
+
return byPath.size > 0 ? Array.from(byPath.values()) : void 0;
|
|
18996
|
+
}
|
|
18997
|
+
if (Array.isArray(metadata.paths)) {
|
|
18998
|
+
for (const item of metadata.paths) {
|
|
18999
|
+
if (typeof item === "string") add2({ path: item });
|
|
19000
|
+
}
|
|
19001
|
+
}
|
|
19002
|
+
if (typeof metadata.screenshotPath === "string") add2({ path: metadata.screenshotPath });
|
|
19003
|
+
if (typeof metadata.savedTo === "string") add2({ path: metadata.savedTo });
|
|
19004
|
+
if (typeof metadata.path === "string") add2({ path: metadata.path });
|
|
19005
|
+
return byPath.size > 0 ? Array.from(byPath.values()) : void 0;
|
|
19006
|
+
}
|
|
18893
19007
|
function projectSafeToolObservationMetadata(metadata) {
|
|
18894
19008
|
if (!metadata || typeof metadata !== "object") return void 0;
|
|
18895
19009
|
const safe = {};
|
|
@@ -19188,6 +19302,7 @@ ${toolResult.content}` : toolResult.content,
|
|
|
19188
19302
|
const finishedAt = Date.now();
|
|
19189
19303
|
const summary = summarizeToolResult(toolResult.content, toolResult.metadata);
|
|
19190
19304
|
const safeMetadata = projectSafeToolObservationMetadata(toolResult.metadata);
|
|
19305
|
+
const imageArtifacts = extractToolImageArtifacts(toolName, toolResult);
|
|
19191
19306
|
loopTiming.mark("toolExecute", round);
|
|
19192
19307
|
emitLoopEvent(
|
|
19193
19308
|
boundary,
|
|
@@ -19210,7 +19325,8 @@ ${toolResult.content}` : toolResult.content,
|
|
|
19210
19325
|
elapsedMs: Math.max(0, finishedAt - startedAt),
|
|
19211
19326
|
...summary ? { summary } : {},
|
|
19212
19327
|
...typeof toolResult.content === "string" ? { content: toolResult.content } : {},
|
|
19213
|
-
metadata: toolResult.metadata
|
|
19328
|
+
metadata: toolResult.metadata,
|
|
19329
|
+
...imageArtifacts ? { imageArtifacts } : {}
|
|
19214
19330
|
}
|
|
19215
19331
|
);
|
|
19216
19332
|
} catch (error) {
|
|
@@ -23718,7 +23834,7 @@ async function saveCliPendingUserMessages(args2) {
|
|
|
23718
23834
|
if (ops.length) await args2.store.batch(ops);
|
|
23719
23835
|
}
|
|
23720
23836
|
async function readCliPendingUserMessages(store, dialogId) {
|
|
23721
|
-
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-
|
|
23837
|
+
const { readDialogMessageRecords } = await import("./cliLocalAgentRecordReader-LWMGOH3X.js");
|
|
23722
23838
|
const rows = await readDialogMessageRecords({ store, dialogId });
|
|
23723
23839
|
const uncertain = rows.filter(({ record: record2 }) => record2.metadata?.cliBatchPhase === "requested" && !record2.metadata?.cliBatchResolution);
|
|
23724
23840
|
const recovery = uncertain.length ? {
|
|
@@ -23825,7 +23941,7 @@ async function runNoloWorkspaceCliTool(call, args2) {
|
|
|
23825
23941
|
cmd,
|
|
23826
23942
|
stdout: "pipe",
|
|
23827
23943
|
stderr: "pipe",
|
|
23828
|
-
env: call.name === "listAgents" ? { ...process.env, ...args2.env, NOLO_PLANNING_CALLER: JSON.stringify(args2.planningCaller ?? {}) } : args2.env
|
|
23944
|
+
env: workspaceChildEnv(call.name === "listAgents" ? { ...process.env, ...args2.env, NOLO_PLANNING_CALLER: JSON.stringify(args2.planningCaller ?? {}) } : args2.env)
|
|
23829
23945
|
});
|
|
23830
23946
|
const [stdout, stderr, exitCode] = await Promise.all([
|
|
23831
23947
|
readNoloProcessStream(proc.stdout),
|
|
@@ -24020,7 +24136,7 @@ function buildLoadSkillExecutor(args2) {
|
|
|
24020
24136
|
const { resolveSkillByName } = await import("./skillDiscovery-MDDKPTW3.js");
|
|
24021
24137
|
const resolved = resolveSkillByName(args2.cwd, name);
|
|
24022
24138
|
if (!resolved) {
|
|
24023
|
-
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-
|
|
24139
|
+
const { resolveBuiltinSkillByName } = await import("./builtinSkillRegistry-VRCMQ77Q.js");
|
|
24024
24140
|
const builtin = resolveBuiltinSkillByName(name);
|
|
24025
24141
|
if (builtin) {
|
|
24026
24142
|
const denied = await rejectDisabledBuiltin(args2.agentSkillSource, builtin.slug, name, args2.resolveAgentSkillSource);
|
|
@@ -24099,7 +24215,7 @@ async function loadPreciseSkill(cwd, parsed, agentSkillSource, resolveAgentSkill
|
|
|
24099
24215
|
if (!nonEmpty(parsed.slug) || has2("projectBinding") || has2("relativePath")) {
|
|
24100
24216
|
return reject("builtin requires only an exact slug.");
|
|
24101
24217
|
}
|
|
24102
|
-
const { listBuiltinSkills } = await import("./builtinSkillRegistry-
|
|
24218
|
+
const { listBuiltinSkills } = await import("./builtinSkillRegistry-VRCMQ77Q.js");
|
|
24103
24219
|
const builtin = listBuiltinSkills().find((entry) => entry.slug === parsed.slug);
|
|
24104
24220
|
if (!builtin) return reject("builtin slug not found.");
|
|
24105
24221
|
const denied = await rejectDisabledBuiltin(agentSkillSource, builtin.slug, builtin.slug, resolveAgentSkillSource);
|
|
@@ -24124,28 +24240,28 @@ ${builtin.content}`,
|
|
|
24124
24240
|
return reject("project requires projectBinding and relativePath only.");
|
|
24125
24241
|
}
|
|
24126
24242
|
try {
|
|
24127
|
-
const { realpathSync, statSync, readFileSync: readFileSync2 } = await import("node:fs");
|
|
24128
|
-
const { resolve: resolve7, relative:
|
|
24243
|
+
const { realpathSync: realpathSync2, statSync: statSync2, readFileSync: readFileSync2 } = await import("node:fs");
|
|
24244
|
+
const { resolve: resolve7, relative: relative7, isAbsolute: isAbsolute6, basename: basename4, sep: sep4 } = await import("node:path");
|
|
24129
24245
|
const inside = (root, target) => {
|
|
24130
|
-
const rel =
|
|
24131
|
-
return rel !== "" && rel !== ".." && !rel.startsWith(`..${
|
|
24246
|
+
const rel = relative7(root, target);
|
|
24247
|
+
return rel !== "" && rel !== ".." && !rel.startsWith(`..${sep4}`) && !isAbsolute6(rel);
|
|
24132
24248
|
};
|
|
24133
|
-
const realCwd =
|
|
24134
|
-
if (!
|
|
24249
|
+
const realCwd = realpathSync2(cwd);
|
|
24250
|
+
if (!isAbsolute6(parsed.projectBinding) || realpathSync2(parsed.projectBinding) !== realCwd) {
|
|
24135
24251
|
return reject("projectBinding does not match the authorized cwd.");
|
|
24136
24252
|
}
|
|
24137
|
-
if (
|
|
24253
|
+
if (isAbsolute6(parsed.relativePath) || basename4(parsed.relativePath) !== "SKILL.md") {
|
|
24138
24254
|
return reject("relativePath must reference a project SKILL.md.");
|
|
24139
24255
|
}
|
|
24140
24256
|
const skillsRoot = resolve7(realCwd, ".agents", "skills");
|
|
24141
24257
|
const candidate = resolve7(realCwd, parsed.relativePath);
|
|
24142
24258
|
if (!inside(skillsRoot, candidate)) return reject("path is outside cwd/.agents/skills/.");
|
|
24143
|
-
const realRoot =
|
|
24144
|
-
const realPath =
|
|
24259
|
+
const realRoot = realpathSync2(skillsRoot);
|
|
24260
|
+
const realPath = realpathSync2(candidate);
|
|
24145
24261
|
if (realRoot !== skillsRoot || !inside(realRoot, realPath) || basename4(realPath) !== "SKILL.md") {
|
|
24146
24262
|
return reject("skill path escapes cwd/.agents/skills/ or is not SKILL.md.");
|
|
24147
24263
|
}
|
|
24148
|
-
if (!
|
|
24264
|
+
if (!statSync2(realPath).isFile()) return reject("SKILL.md is not a file.");
|
|
24149
24265
|
const body = readFileSync2(realPath, "utf8");
|
|
24150
24266
|
return {
|
|
24151
24267
|
content: `Skill "${parsed.relativePath}" loaded inline. Follow its instructions.
|
|
@@ -24737,17 +24853,17 @@ function createDevinProvider(options) {
|
|
|
24737
24853
|
}
|
|
24738
24854
|
|
|
24739
24855
|
// packages/agent-runtime/executionLeaseValidation.ts
|
|
24740
|
-
import { isAbsolute as
|
|
24856
|
+
import { isAbsolute as isAbsolute5, relative as relative6, resolve as resolve6 } from "node:path";
|
|
24741
24857
|
function withinRoot(root, child) {
|
|
24742
|
-
if (!
|
|
24858
|
+
if (!isAbsolute5(root) || !isAbsolute5(child)) return false;
|
|
24743
24859
|
const canonicalRoot = resolve6(root);
|
|
24744
24860
|
const canonicalChild = resolve6(child);
|
|
24745
|
-
const suffix =
|
|
24746
|
-
return suffix === "" || suffix !== ".." && !suffix.startsWith("../") && !suffix.startsWith("..\\") && !
|
|
24861
|
+
const suffix = relative6(canonicalRoot, canonicalChild);
|
|
24862
|
+
return suffix === "" || suffix !== ".." && !suffix.startsWith("../") && !suffix.startsWith("..\\") && !isAbsolute5(suffix);
|
|
24747
24863
|
}
|
|
24748
24864
|
function subsetOf(allowed, actual) {
|
|
24749
24865
|
return actual.every(
|
|
24750
|
-
(root) =>
|
|
24866
|
+
(root) => isAbsolute5(root) && allowed.some((parent) => withinRoot(parent, root))
|
|
24751
24867
|
);
|
|
24752
24868
|
}
|
|
24753
24869
|
function validateConfiguredRootExecutionLease(ticket, lease) {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-IIOSZAJX.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-VKCPKCSS.js";
|
|
18
18
|
import {
|
|
19
19
|
findToolExecutor,
|
|
20
20
|
toolDefinitionsByName
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-FTWAOKFU.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-LMGFVH65.js";
|
|
31
31
|
import {
|
|
32
32
|
addToolMessage,
|
|
33
33
|
messageStreamEnd,
|
|
@@ -35,16 +35,16 @@ import {
|
|
|
35
35
|
toast,
|
|
36
36
|
toolResultNeedsUserConfirmation,
|
|
37
37
|
updateToolMessage
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-YFW4H6DL.js";
|
|
39
39
|
import {
|
|
40
40
|
streamAgentChatTurn
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-N74XL3NI.js";
|
|
42
42
|
import {
|
|
43
43
|
getCurrentSpaceId
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-FFFKAOJN.js";
|
|
45
45
|
import {
|
|
46
46
|
write
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-HZDK56EK.js";
|
|
48
48
|
import {
|
|
49
49
|
addActiveController,
|
|
50
50
|
getActiveDialogKey,
|
|
@@ -56,10 +56,10 @@ import {
|
|
|
56
56
|
} from "./chunk-RD3QLZQV.js";
|
|
57
57
|
import {
|
|
58
58
|
selectCurrentServer
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-MTM4LRVG.js";
|
|
60
60
|
import {
|
|
61
61
|
createAsyncThunk
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-6XVPMGXK.js";
|
|
63
63
|
import {
|
|
64
64
|
selectIdentityToken
|
|
65
65
|
} from "./chunk-PXYBUFDB.js";
|