nolo-cli 0.228.0 → 0.228.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-GIFVXKDT.js → _executeModel-AKCTHGMP.js} +62 -61
- package/{action-WZTKEF5H.js → action-C6IQAKN4.js} +6 -6
- package/{addContentAction-MLI6GOBV.js → addContentAction-53364YDW.js} +10 -10
- package/{addDialogAgentAction-ARGQM22H.js → addDialogAgentAction-U5DD5EN5.js} +9 -9
- package/{agentDeleteCommand-UF7XVELS.js → agentDeleteCommand-2E5FAGUO.js} +99 -93
- package/{agentEmailCommands-SFHRPQYC.js → agentEmailCommands-UGZZAH7E.js} +99 -93
- package/{agentListCommands-IXKBP3W5.js → agentListCommands-JCTW3J2K.js} +240 -52
- package/{agentMachineCommands-7NX6PWQ6.js → agentMachineCommands-QPG5ZXF4.js} +45 -41
- package/{agentProviderCommands-C5T7C5KZ.js → agentProviderCommands-QLTABYR7.js} +2 -2
- package/{agentPullCommand-4EQZYHU4.js → agentPullCommand-2EYJ5ENC.js} +1 -1
- package/{agentRecordCommands-IUNX6XD6.js → agentRecordCommands-4NTVR6MZ.js} +98 -92
- package/{agentRunCommand-LCR4XADM.js → agentRunCommand-VHF34PYC.js} +103 -94
- package/{agentRunControl-RN2P6AOD.js → agentRunControl-QYTXUQGY.js} +10 -7
- package/{agentRuntimeLocal-LVXPQ7QA.js → agentRuntimeLocal-U54AKHXH.js} +38 -36
- package/{agentSlice-ZGMOH6TE.js → agentSlice-4JGDEXWK.js} +10 -10
- package/{appDeleteCommands-BESCJOQM.js → appDeleteCommands-XBE5QJ6P.js} +46 -42
- package/{appDeployCommands-LPTR6IOX.js → appDeployCommands-QIYLXXGA.js} +46 -42
- package/{appDeployStatusCommands-BZ7KZ5RD.js → appDeployStatusCommands-JXS6ZQZZ.js} +46 -42
- package/{appGetCommands-EDWGJV4S.js → appGetCommands-SZS7SJPK.js} +46 -42
- package/{appListCommands-OPRWYPM6.js → appListCommands-B3GBJSNV.js} +46 -42
- package/{authCommand-3C3RN4OU.js → authCommand-V6EOMZX6.js} +15 -15
- package/{authCommands-ZMVEDCQD.js → authCommands-T5FODCEG.js} +2 -2
- package/{builtinSkillRegistry-VRCMQ77Q.js → builtinSkillRegistry-ZQC3IIO2.js} +4 -3
- package/{chromeOpsCommands-NZITLHWO.js → chromeOpsCommands-OFX7ZGKP.js} +2 -2
- package/{chunk-MZVCFV3T.js → chunk-223KZUJ6.js} +4 -4
- package/{chunk-UF6J7NXV.js → chunk-2C5VN7NH.js} +1 -1
- package/{chunk-MAA42MMV.js → chunk-2FZVXOFX.js} +4 -4
- package/{chunk-ESN4WNWU.js → chunk-2JHGUL5K.js} +2 -2
- package/chunk-3A5NNQCN.js +64 -0
- package/chunk-3F2FRLIO.js +372 -0
- package/{chunk-V4IYI3SB.js → chunk-46FETNLF.js} +2 -2
- package/{chunk-RR3MB26M.js → chunk-4GYVS4PM.js} +8 -6
- package/{chunk-ZQ6K57FJ.js → chunk-4YPH5KRA.js} +1 -1
- package/{chunk-Y4NPF2UN.js → chunk-5AYP5QBB.js} +5 -5
- package/{chunk-4OXPN3WC.js → chunk-5ISNPTQH.js} +4 -4
- package/{chunk-CO6E7YK6.js → chunk-5P3PPQVP.js} +1 -1
- package/{chunk-6TVYUQRM.js → chunk-6BMTKYAO.js} +2 -2
- package/{chunk-KLAMJNKQ.js → chunk-6PAHSSD2.js} +15 -8
- package/{chunk-CTWCZKNS.js → chunk-6SOWMEAY.js} +4 -4
- package/{chunk-ARFCL53U.js → chunk-6VEO7Z3Y.js} +5 -5
- package/{chunk-ZM5AZTQG.js → chunk-7BIJFGKS.js} +20 -8
- package/{chunk-BAH3BAUZ.js → chunk-7OVOZRZF.js} +5 -5
- package/{chunk-N74XL3NI.js → chunk-7PON4LBY.js} +42 -24
- package/{chunk-LTVEOOZL.js → chunk-7WHCIA5V.js} +16 -3
- package/{chunk-HZDK56EK.js → chunk-ADYWV732.js} +34 -12
- package/{chunk-2FK2KZSL.js → chunk-AIFQKNPP.js} +1 -1
- package/{chunk-VTHWBTRE.js → chunk-BPB3T5EU.js} +5 -8
- package/{chunk-SX6AWTNK.js → chunk-BZLGPM5B.js} +3 -3
- package/{chunk-MTM4LRVG.js → chunk-BZMDWGQQ.js} +2 -2
- package/{chunk-JP2BH4NC.js → chunk-CEKRIR22.js} +1 -1
- package/{chunk-5HUO7SEX.js → chunk-D634SL2Y.js} +1 -1
- package/{chunk-SCMYAGQE.js → chunk-DHRPLRIR.js} +294 -159
- package/{chunk-VUHKG4KS.js → chunk-DNNPARJK.js} +9 -5
- package/{chunk-X22AUZKL.js → chunk-E3LSO6EI.js} +189 -88
- package/{chunk-LHCGKAFO.js → chunk-EHFBP6IK.js} +100 -48
- package/{chunk-6ASGEP5D.js → chunk-EJQE5HB7.js} +1 -1
- package/{chunk-2BKNICGK.js → chunk-EL5NRJHI.js} +1 -1
- package/chunk-EUGTFFO6.js +42 -0
- package/{chunk-YFW4H6DL.js → chunk-EVHTYVD2.js} +821 -131
- package/{chunk-6XRPBZRS.js → chunk-EYLGAEB4.js} +0 -134
- package/{chunk-E5RYFR7E.js → chunk-FEIVARWR.js} +49 -15
- package/{chunk-3DJJ4CFG.js → chunk-FLBJ7IJI.js} +9 -9
- package/{chunk-W3HSD32M.js → chunk-FXEPZKNJ.js} +2 -2
- package/{chunk-VKCPKCSS.js → chunk-FYAMUU55.js} +625 -62
- package/{chunk-JEWMQR6J.js → chunk-FZANZZ63.js} +1 -1
- package/{chunk-WWTSEBDF.js → chunk-GIXWVN2W.js} +1 -1
- package/{chunk-YHNUDTU4.js → chunk-HDKMVYNJ.js} +4 -4
- package/chunk-HEVRQGGH.js +106 -0
- package/{chunk-PBPXXMWZ.js → chunk-HFHJPHFK.js} +1 -1
- package/{chunk-WQDTSK5U.js → chunk-HPDLPEUG.js} +11 -5
- package/{chunk-SPU3L3OR.js → chunk-HQUGB2HM.js} +3 -3
- package/chunk-IVK2KT3H.js +209 -0
- package/{chunk-73PZD7JZ.js → chunk-IYLUK67R.js} +2 -2
- package/{chunk-BFKJ2RS3.js → chunk-J55F3IEZ.js} +1 -1
- package/{chunk-ADOOL3PG.js → chunk-J7JRCOIW.js} +1 -1
- package/{chunk-AEZBAFC6.js → chunk-JAKRY74O.js} +138 -8
- package/{chunk-NEG5LYK5.js → chunk-JCQ3WCQ3.js} +3 -1
- package/{chunk-W6T4FNZP.js → chunk-JLZJL3WC.js} +219 -351
- package/{chunk-PQ63BDV3.js → chunk-JPXACKSW.js} +9 -1
- package/{chunk-IIOSZAJX.js → chunk-KDBDOXOM.js} +137 -53
- package/{chunk-CIGCTSBF.js → chunk-KDDHQMSH.js} +1 -1
- package/{chunk-OAZP4TSA.js → chunk-KG27JIG4.js} +2 -2
- package/{chunk-RHBD22LV.js → chunk-KHYSFS3W.js} +80 -4
- package/{chunk-7UVVLYKC.js → chunk-KKIQAVDR.js} +5 -5
- package/{chunk-HS7MLR74.js → chunk-KZ4A7EIV.js} +3 -5
- package/{chunk-OLGFIQN2.js → chunk-LLUBUHNT.js} +1 -1
- package/{chunk-QJTZ76CP.js → chunk-LS5KAVFQ.js} +1 -0
- package/{chunk-K26XPZRB.js → chunk-LVZVSLKO.js} +29 -9
- package/{chunk-XJSEST7D.js → chunk-MNFUKRRU.js} +3 -3
- package/{chunk-R5NRFXGD.js → chunk-O3A2CHAL.js} +5 -5
- package/{chunk-4IQN6FWY.js → chunk-OB4FBZXJ.js} +4 -4
- package/{chunk-J2VIGDJN.js → chunk-OJSJJKHF.js} +3 -3
- package/{chunk-OHUYN3YU.js → chunk-OKAXQFON.js} +1 -1
- package/{chunk-CD2DK5JA.js → chunk-OKH74FML.js} +2 -1
- package/{chunk-MYYNZG2M.js → chunk-OOV5JN25.js} +4 -4
- package/{chunk-TMRJGSK2.js → chunk-OOVOAG4Q.js} +1 -1
- package/chunk-OQFOE4SJ.js +405 -0
- package/{chunk-AS6L5KSD.js → chunk-P4R5KXU7.js} +2 -2
- package/{chunk-VIYVRPMJ.js → chunk-PHREU2KZ.js} +5 -3
- package/{chunk-EDT65EUE.js → chunk-PIVTQRX6.js} +45 -15
- package/{chunk-QMNVV3YM.js → chunk-PJL7OJRC.js} +12 -11
- package/{chunk-XCA4WHX5.js → chunk-PNLDLUMO.js} +315 -360
- package/{chunk-UPOW5HTG.js → chunk-QGFLVQ6E.js} +3 -3
- package/{chunk-JU7VN4LF.js → chunk-QONAOHVW.js} +6 -6
- package/{chunk-UOUMPHS5.js → chunk-R3FZHW4Q.js} +13 -13
- package/{chunk-K7VIXYTZ.js → chunk-R3MV2GII.js} +1 -45
- package/{chunk-FE7G6DSP.js → chunk-R72QWIFO.js} +14 -4
- package/{chunk-KZAT2M2V.js → chunk-RIWKZT7E.js} +22 -0
- package/{chunk-RMWDKLBE.js → chunk-S7H4KTMB.js} +1099 -71
- package/{chunk-IJZC2KIJ.js → chunk-SA356NGW.js} +1 -1
- package/{chunk-BVEDT6DM.js → chunk-SCAC3NM5.js} +3 -3
- package/{chunk-EQZQUQ33.js → chunk-SLUN7W6S.js} +5 -5
- package/{chunk-KK3FCYZM.js → chunk-SQL7YNED.js} +7 -4
- package/{chunk-LMGFVH65.js → chunk-SSOR2EDT.js} +10 -10
- package/chunk-TRRXYFTR.js +46 -0
- package/{chunk-XNTZD4AE.js → chunk-TUOHSUK5.js} +19367 -17503
- package/chunk-TYJCIA2O.js +835 -0
- package/{chunk-FTWAOKFU.js → chunk-U3BUWDUP.js} +415 -1962
- package/{chunk-CD64YXRB.js → chunk-U6QNVOR5.js} +1 -1
- package/chunk-UAF5VQCE.js +77 -0
- package/{chunk-CIUZXD5D.js → chunk-UFGUJ2IH.js} +5 -5
- package/{chunk-CTIEJRTP.js → chunk-UP7KBWLE.js} +81 -29
- package/{chunk-GX6DITLQ.js → chunk-UUCYUN6Y.js} +1 -1
- package/{chunk-UHW6SCVK.js → chunk-UZKBVQUX.js} +1 -1
- package/{chunk-XSRSAU3O.js → chunk-V5TI7HJH.js} +3 -3
- package/{chunk-WFGNWWJI.js → chunk-VH7UO6E5.js} +252 -114
- package/{chunk-ITBX27W6.js → chunk-VJFDG3ZG.js} +30 -122
- package/{chunk-6MTVACLN.js → chunk-WC3J5SL2.js} +277 -293
- package/{chunk-HCCQEMTK.js → chunk-WD5547ZF.js} +15 -12
- package/{chunk-X3OZ655T.js → chunk-WS36XPJD.js} +2 -2
- package/{chunk-JFRJEPFI.js → chunk-WSLL7VV4.js} +2 -2
- package/chunk-XRGBJHZX.js +136 -0
- package/{chunk-KZ5OD2MO.js → chunk-Y2KWJTOZ.js} +3 -3
- package/{dialogUsageCommand-6RW2FY6K.js → chunk-Y2TCTNUD.js} +24 -17
- package/{chunk-FFFKAOJN.js → chunk-YN23INFZ.js} +1 -1
- package/{chunk-ODBYGVO2.js → chunk-YXK3GJF5.js} +5 -5
- package/{chunk-6CXQ3YNJ.js → chunk-Z2OWAYMI.js} +53 -31
- package/{chunk-6XVPMGXK.js → chunk-ZTHAJU3O.js} +10 -4
- package/{chunk-D25ONVOH.js → chunk-ZYPXOQS2.js} +1 -1
- package/{cliAgentConfigHelpers-37ZNEY5Y.js → cliAgentConfigHelpers-BXHQ3PXP.js} +8 -8
- package/{cliAuthorityBrokerClient-SFPC3WVK.js → cliAuthorityBrokerClient-TFNXJLXL.js} +1 -1
- package/cliAuthorityBrokerProcess-5ZFBTHLB.js +22 -0
- package/{cliLocalAgentRecordReader-MCQVRWBR.js → cliLocalAgentRecordReader-47PXMHPH.js} +43 -41
- package/{commandRegistry-NTH5IAN5.js → commandRegistry-CTMPAQH2.js} +93 -156
- package/{contentThunks-SPXTX5U2.js → contentThunks-CAHIIZO5.js} +25 -25
- package/{cooldownCommands-TIFCHCUN.js → cooldownCommands-WDOI5VD7.js} +3 -3
- package/{createAgentAutomationAction-KUQKCOXB.js → createAgentAutomationAction-M25XZSPD.js} +25 -25
- package/{createDialogAction-HJN5U3XS.js → createDialogAction-4SN7FKI7.js} +26 -26
- package/{createPageAction-ZAHRDOAU.js → createPageAction-N7QPDN3M.js} +28 -28
- package/{db-CMUTP3W5.js → db-VR74ADGC.js} +7 -2
- package/{dbSlice-656PMWR2.js → dbSlice-RWPSVHBC.js} +9 -9
- package/{deleteFile-ZCQESEEQ.js → deleteFile-ECU6FU5C.js} +12 -7
- package/{dialogCommands-KZTZLWPZ.js → dialogCommands-BBHWCKDP.js} +57 -47
- package/{dialogNotifyCommand-PST75COP.js → dialogNotifyCommand-IASQGEMW.js} +9 -9
- package/{dialogSlice-BXIERQHO.js → dialogSlice-JI3J22RV.js} +23 -23
- package/dialogTraceCommand-EW2KK6A4.js +961 -0
- package/dialogUsageCommand-WJ3U6KZU.js +27 -0
- package/{docCreateCommands-26HJ5NAY.js → docCreateCommands-QSX3X5U4.js} +45 -41
- package/{docDeleteCommands-UAOHH5XK.js → docDeleteCommands-63JBG2HQ.js} +46 -42
- package/{docReadCommands-4ADG7YE6.js → docReadCommands-CQFKRQUI.js} +45 -41
- package/{docStore-FZ75HWP2.js → docStore-XLBKGGNM.js} +10 -10
- package/{docUpdateCommands-OGFJZENF.js → docUpdateCommands-534LUK25.js} +45 -41
- package/ebookDownloaderAgentCommand-DYSKF5ZY.js +677 -0
- package/{getPricing-FCHYVRJU.js → getPricing-5BLZRPTM.js} +3 -3
- package/{handleSendMessageAction-KP6GGBFY.js → handleSendMessageAction-Q2VMEVOR.js} +90 -48
- package/{hostCredentialCreate-23TX56G7.js → hostCredentialCreate-C57T7YPE.js} +99 -93
- package/index.js +23 -11
- package/{localDialogRead-CIOTQM5T.js → localDialogRead-BJJT3TF5.js} +1 -1
- package/{localRuntimeAdapter-MTUWOYPN.js → localRuntimeAdapter-OALZPFZU.js} +96 -90
- package/{localRuntimeAuthority-TYHQCTZN.js → localRuntimeAuthority-UF2DAQ3F.js} +13 -3
- package/{localRuntimeDb-BO7IVWAZ.js → localRuntimeDb-ZJFGNHML.js} +1 -1
- package/{machineCommands-4WJUJQHW.js → machineCommands-N6IVWRZT.js} +109 -92
- package/{machineWsRunDispatch-V3U4JM67.js → machineWsRunDispatch-PDWYB33B.js} +97 -91
- package/{markdownToSlate-KIYM7B3P.js → markdownToSlate-PXYAIBVL.js} +1 -1
- package/{mcpLocalAuthorizeCommand-TI656UWC.js → mcpLocalAuthorizeCommand-KYI4EGF5.js} +17 -13
- package/{memberThunks-JFYC4Z5L.js → memberThunks-43B7UYC5.js} +11 -11
- package/{models-EP7VG6N2.js → models-ZX2BYIMB.js} +2 -2
- package/package.json +2 -1
- package/{projectArchive-NU2Z5HOR.js → projectArchive-TJNW5DLM.js} +28 -28
- package/{providerPresetApply-4H7YP5D7.js → providerPresetApply-NTJUINI6.js} +35 -16
- package/{providerRegistry-F3UPOTIY.js → providerRegistry-W45SLUV6.js} +5 -5
- package/{read-BRZHXUJ6.js → read-KG6INYUT.js} +12 -7
- package/{readDocTool-N7RVFQEE.js → readDocTool-N3GA52JR.js} +1 -1
- package/{readlineWorkspace-T56MRMS5.js → readlineWorkspace-PJZJVGA5.js} +1296 -1056
- package/{removeDialogAgentAction-J7XU7OUX.js → removeDialogAgentAction-EEVSOQOJ.js} +11 -11
- package/{runAgentClientLoop-O2GRCGRZ.js → runAgentClientLoop-3VC5TCDW.js} +69 -58
- package/{runtimeDoctorCommands-RDRJXMXC.js → runtimeDoctorCommands-V3M3JTUV.js} +14 -11
- package/{secretCommands-2FEMRUFM.js → secretCommands-KVVZS7A6.js} +2 -2
- package/{setDialogExtraReferencesAction-Q4V2ZZW2.js → setDialogExtraReferencesAction-DNO5POHA.js} +10 -10
- package/{setPrimaryDialogAgentAction-742H5S6T.js → setPrimaryDialogAgentAction-QABBEO4C.js} +11 -11
- package/{settingThunks-T4FXSV6M.js → settingThunks-DVKG4X4S.js} +13 -17
- package/{skillDiscovery-MDDKPTW3.js → skillDiscovery-ZMJH36AK.js} +3 -3
- package/{spaceCommands-W5TAVFDT.js → spaceCommands-AGGZXPY3.js} +218 -77
- package/{streamAgentChatTurn-OWDJMU5E.js → streamAgentChatTurn-4GTLL2OF.js} +111 -95
- package/{switchDialogAgentAction-HLDLHRRA.js → switchDialogAgentAction-KYWJSGOO.js} +9 -9
- package/{tableCommands-44GC4N6J.js → tableCommands-EFA754RE.js} +3 -3
- package/{tools-O7SGGVA3.js → tools-5AGPOPLW.js} +48 -47
- package/{tuiRestart-EOGC2BYY.js → tuiRestart-77E7PL4R.js} +9 -8
- package/{tuiSummaryLlmCaller-TM5BU73J.js → tuiSummaryLlmCaller-HROLGN4F.js} +12 -12
- package/{updateCommands-FBYA5WVG.js → updateCommands-GJGRS6JK.js} +3 -3
- package/{updateDialogTitleAction-EXSZGTLL.js → updateDialogTitleAction-5OSEDGRK.js} +25 -25
- package/{usageCommand-L4OFWXEU.js → usageCommand-WI6SQOPB.js} +2 -2
- package/{usageRebuildCommand-7JR33UHS.js → usageRebuildCommand-WQRLLZAT.js} +3 -3
- package/{windowsSelfUpdate-M4V77OUB.js → windowsSelfUpdate-C7LGVWYX.js} +2 -2
- package/{workloadLifecycle-ZCSQCHG3.js → workloadLifecycle-P2SJVV3S.js} +2 -2
- package/chunk-FGHEF6WI.js +0 -34
- package/chunk-U5LOKQ2R.js +0 -176
- package/chunk-YDRRGVT5.js +0 -142
- package/chunk-YGDYYFRX.js +0 -86
- package/chunk-Z7KE4K3H.js +0 -758
- package/lib-62SWPXNF.js +0 -21042
- /package/{chunk-ANUP75N2.js → chunk-2E4BYAUE.js} +0 -0
|
@@ -21,25 +21,43 @@ function safeCredentialRef(ref) {
|
|
|
21
21
|
function brokerFailure(op) {
|
|
22
22
|
throw new Error(`credential_broker_${op}_failed`);
|
|
23
23
|
}
|
|
24
|
-
function createDefaultSecretToolRunner(secretToolBin = DEFAULT_SECRET_TOOL_BIN) {
|
|
24
|
+
function createDefaultSecretToolRunner(secretToolBin = DEFAULT_SECRET_TOOL_BIN, timeoutMs = 15e3) {
|
|
25
25
|
return (input) => new Promise((resolve) => {
|
|
26
26
|
let stdout = "";
|
|
27
27
|
let stderr = "";
|
|
28
28
|
let settled = false;
|
|
29
|
+
let timer;
|
|
29
30
|
const finish = (result) => {
|
|
30
31
|
if (settled) return;
|
|
31
32
|
settled = true;
|
|
33
|
+
clearTimeout(timer);
|
|
32
34
|
resolve(result);
|
|
33
35
|
};
|
|
34
36
|
let child;
|
|
35
37
|
try {
|
|
36
38
|
child = spawn(secretToolBin, input.args, {
|
|
37
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
39
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
40
|
+
detached: process.platform !== "win32"
|
|
38
41
|
});
|
|
39
42
|
} catch {
|
|
40
43
|
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
46
|
+
timer = setTimeout(() => {
|
|
47
|
+
try {
|
|
48
|
+
if (process.platform !== "win32" && child.pid !== void 0) {
|
|
49
|
+
try {
|
|
50
|
+
process.kill(-child.pid, "SIGKILL");
|
|
51
|
+
return;
|
|
52
|
+
} catch {
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
child.kill("SIGKILL");
|
|
56
|
+
} catch {
|
|
57
|
+
} finally {
|
|
58
|
+
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
59
|
+
}
|
|
60
|
+
}, timeoutMs);
|
|
43
61
|
child.stdout?.on("data", (chunk) => {
|
|
44
62
|
stdout += chunk;
|
|
45
63
|
});
|
|
@@ -56,10 +74,9 @@ function createDefaultSecretToolRunner(secretToolBin = DEFAULT_SECRET_TOOL_BIN)
|
|
|
56
74
|
stderr
|
|
57
75
|
});
|
|
58
76
|
});
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
child.stdin?.end();
|
|
77
|
+
child.stdin?.on("error", () => {
|
|
78
|
+
});
|
|
79
|
+
child.stdin?.end(input.stdin);
|
|
63
80
|
});
|
|
64
81
|
}
|
|
65
82
|
function createLinuxSecretServiceCredentialBroker(options = {}) {
|
|
@@ -131,6 +148,7 @@ function createLinuxSecretServiceCredentialBroker(options = {}) {
|
|
|
131
148
|
import { spawn as spawn2 } from "node:child_process";
|
|
132
149
|
var MACOS_KEYCHAIN_SERVICE_PREFIX = "nolo.credentials.keys";
|
|
133
150
|
var MACOS_KEYCHAIN_ACCOUNT = "api-key";
|
|
151
|
+
var MACOS_KEYCHAIN_B64_PREFIX = "nolo-b64v1:";
|
|
134
152
|
var SECURITY_ITEM_NOT_FOUND_EXIT = 44;
|
|
135
153
|
var DEFAULT_SECURITY_BIN = "/usr/bin/security";
|
|
136
154
|
function safeCredentialRef2(ref) {
|
|
@@ -151,24 +169,44 @@ function credentialRefToMacOsKeychainService(ref, servicePrefix = MACOS_KEYCHAIN
|
|
|
151
169
|
function rethrowBrokerError(op, _error) {
|
|
152
170
|
throw new Error(`credential_broker_${op}_failed`);
|
|
153
171
|
}
|
|
154
|
-
function createDefaultSecurityRunner(securityBin = DEFAULT_SECURITY_BIN) {
|
|
172
|
+
function createDefaultSecurityRunner(securityBin = DEFAULT_SECURITY_BIN, timeoutMs = 15e3) {
|
|
155
173
|
return function defaultSecurityRunner(input) {
|
|
156
174
|
return new Promise((resolve) => {
|
|
157
175
|
let settled = false;
|
|
176
|
+
let timer;
|
|
158
177
|
const finish = (result) => {
|
|
159
178
|
if (settled) return;
|
|
160
179
|
settled = true;
|
|
180
|
+
clearTimeout(timer);
|
|
161
181
|
resolve(result);
|
|
162
182
|
};
|
|
163
183
|
let child;
|
|
164
184
|
try {
|
|
165
185
|
child = spawn2(securityBin, input.args, {
|
|
166
|
-
stdio: ["pipe", "pipe", "pipe"]
|
|
186
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
187
|
+
detached: process.platform !== "win32"
|
|
167
188
|
});
|
|
168
189
|
} catch {
|
|
169
190
|
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
170
191
|
return;
|
|
171
192
|
}
|
|
193
|
+
timer = setTimeout(() => {
|
|
194
|
+
try {
|
|
195
|
+
if (process.platform !== "win32" && child.pid !== void 0) {
|
|
196
|
+
try {
|
|
197
|
+
process.kill(-child.pid, "SIGKILL");
|
|
198
|
+
return;
|
|
199
|
+
} catch {
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
try {
|
|
203
|
+
child.kill("SIGKILL");
|
|
204
|
+
} catch {
|
|
205
|
+
}
|
|
206
|
+
} finally {
|
|
207
|
+
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
208
|
+
}
|
|
209
|
+
}, timeoutMs);
|
|
172
210
|
let stdout = "";
|
|
173
211
|
let stderr = "";
|
|
174
212
|
child.stdout?.setEncoding("utf8");
|
|
@@ -182,17 +220,18 @@ function createDefaultSecurityRunner(securityBin = DEFAULT_SECURITY_BIN) {
|
|
|
182
220
|
child.on("error", () => {
|
|
183
221
|
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
184
222
|
});
|
|
223
|
+
let stdinFailed = false;
|
|
224
|
+
child.stdin?.on("error", () => {
|
|
225
|
+
stdinFailed = true;
|
|
226
|
+
});
|
|
185
227
|
child.on("close", (code) => {
|
|
186
228
|
finish({
|
|
187
|
-
exitCode: typeof code === "number" ? code : -1,
|
|
229
|
+
exitCode: !stdinFailed && typeof code === "number" ? code : -1,
|
|
188
230
|
stdout,
|
|
189
231
|
stderr
|
|
190
232
|
});
|
|
191
233
|
});
|
|
192
|
-
|
|
193
|
-
child.stdin?.write(input.stdin);
|
|
194
|
-
}
|
|
195
|
-
child.stdin?.end();
|
|
234
|
+
child.stdin?.end(input.stdin);
|
|
196
235
|
});
|
|
197
236
|
};
|
|
198
237
|
}
|
|
@@ -226,8 +265,17 @@ function createMacOsKeychainCredentialBroker(options = {}) {
|
|
|
226
265
|
if (result.exitCode !== 0) {
|
|
227
266
|
rethrowBrokerError("get");
|
|
228
267
|
}
|
|
229
|
-
const secret = result.stdout.replace(/\n$/, "");
|
|
230
|
-
|
|
268
|
+
const secret = result.stdout.replace(/\r?\n$/, "");
|
|
269
|
+
if (!secret.startsWith(MACOS_KEYCHAIN_B64_PREFIX)) {
|
|
270
|
+
return secret.length > 0 ? secret : null;
|
|
271
|
+
}
|
|
272
|
+
const encoded = secret.slice(MACOS_KEYCHAIN_B64_PREFIX.length);
|
|
273
|
+
const bytes = Buffer.from(encoded, "base64");
|
|
274
|
+
const decoded = bytes.toString("utf8");
|
|
275
|
+
if (bytes.toString("base64") !== encoded || !Buffer.from(decoded, "utf8").equals(bytes)) {
|
|
276
|
+
rethrowBrokerError("get");
|
|
277
|
+
}
|
|
278
|
+
return decoded;
|
|
231
279
|
},
|
|
232
280
|
async put(ref, secret) {
|
|
233
281
|
const safeRef = safeCredentialRef2(ref);
|
|
@@ -236,27 +284,20 @@ function createMacOsKeychainCredentialBroker(options = {}) {
|
|
|
236
284
|
throw new Error("Cannot store an empty credential secret.");
|
|
237
285
|
}
|
|
238
286
|
const service = serviceFor(safeRef);
|
|
239
|
-
const
|
|
240
|
-
|
|
287
|
+
const unsafeToken = /[^A-Za-z0-9._:@/-]/;
|
|
288
|
+
if (!account || account.startsWith("-") || service.startsWith("-") || unsafeToken.test(account) || unsafeToken.test(service)) {
|
|
289
|
+
rethrowBrokerError("put");
|
|
290
|
+
}
|
|
291
|
+
const encoded = `${MACOS_KEYCHAIN_B64_PREFIX}${Buffer.from(value, "utf8").toString("base64")}`;
|
|
292
|
+
const stdin = `add-generic-password -U -a ${account} -s ${service} -w ${encoded}
|
|
241
293
|
`;
|
|
242
294
|
let result;
|
|
243
295
|
try {
|
|
244
|
-
result = await runner({
|
|
245
|
-
args: [
|
|
246
|
-
"add-generic-password",
|
|
247
|
-
"-a",
|
|
248
|
-
account,
|
|
249
|
-
"-s",
|
|
250
|
-
service,
|
|
251
|
-
"-U",
|
|
252
|
-
"-w"
|
|
253
|
-
],
|
|
254
|
-
stdin
|
|
255
|
-
});
|
|
296
|
+
result = await runner({ args: ["-i"], stdin });
|
|
256
297
|
} catch (error) {
|
|
257
298
|
rethrowBrokerError("put", error);
|
|
258
299
|
}
|
|
259
|
-
if (result.exitCode !== 0) {
|
|
300
|
+
if (result.exitCode !== 0 || /(?:^|\r?\n)security:/i.test(result.stderr)) {
|
|
260
301
|
rethrowBrokerError("put");
|
|
261
302
|
}
|
|
262
303
|
},
|
|
@@ -484,12 +525,15 @@ function parseGetSecretFromStdout(stdout) {
|
|
|
484
525
|
}
|
|
485
526
|
return parsed.secret;
|
|
486
527
|
}
|
|
487
|
-
|
|
528
|
+
var SHELL_TIMEOUT = Symbol("shell timeout");
|
|
529
|
+
function spawnShell(bin, args, stdin, timeoutMs) {
|
|
488
530
|
return new Promise((resolve) => {
|
|
489
531
|
let settled = false;
|
|
532
|
+
let timer;
|
|
490
533
|
const finish = (result) => {
|
|
491
534
|
if (settled) return;
|
|
492
535
|
settled = true;
|
|
536
|
+
clearTimeout(timer);
|
|
493
537
|
resolve(result);
|
|
494
538
|
};
|
|
495
539
|
let child;
|
|
@@ -502,6 +546,14 @@ function spawnShell(bin, args, stdin) {
|
|
|
502
546
|
finish({ exitCode: -1, stdout: "", stderr: "" });
|
|
503
547
|
return;
|
|
504
548
|
}
|
|
549
|
+
timer = setTimeout(() => {
|
|
550
|
+
try {
|
|
551
|
+
child.kill("SIGKILL");
|
|
552
|
+
} catch {
|
|
553
|
+
} finally {
|
|
554
|
+
finish(SHELL_TIMEOUT);
|
|
555
|
+
}
|
|
556
|
+
}, timeoutMs);
|
|
505
557
|
let stdout = "";
|
|
506
558
|
let stderr = "";
|
|
507
559
|
child.stdout?.setEncoding("utf8");
|
|
@@ -522,28 +574,28 @@ function spawnShell(bin, args, stdin) {
|
|
|
522
574
|
stderr
|
|
523
575
|
});
|
|
524
576
|
});
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
child.stdin?.end();
|
|
577
|
+
child.stdin?.on("error", () => {
|
|
578
|
+
});
|
|
579
|
+
child.stdin?.end(stdin);
|
|
529
580
|
});
|
|
530
581
|
}
|
|
531
|
-
function createDefaultWindowsCredentialRunner(shellBin) {
|
|
582
|
+
function createDefaultWindowsCredentialRunner(shellBin, timeoutMs = 15e3) {
|
|
532
583
|
let resolvedBin = shellBin ?? null;
|
|
533
584
|
return async function defaultWindowsCredentialRunner(input) {
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
585
|
+
const bins = resolvedBin ? [resolvedBin] : ["powershell.exe", "pwsh"];
|
|
586
|
+
let result = { exitCode: -1, stdout: "", stderr: "" };
|
|
587
|
+
for (const bin of bins) {
|
|
588
|
+
const attempt = await spawnShell(bin, input.args, input.stdin, timeoutMs);
|
|
589
|
+
if (attempt === SHELL_TIMEOUT) {
|
|
590
|
+
return { exitCode: -1, stdout: "", stderr: "" };
|
|
591
|
+
}
|
|
592
|
+
result = attempt;
|
|
593
|
+
if (result.exitCode !== -1) {
|
|
594
|
+
resolvedBin = bin;
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
545
597
|
}
|
|
546
|
-
return
|
|
598
|
+
return result;
|
|
547
599
|
};
|
|
548
600
|
}
|
|
549
601
|
function createWindowsCredentialManagerBroker(options = {}) {
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// packages/ai/tools/agentCapabilities.ts
|
|
2
|
+
var SYSTEM_AGENT_CAPABILITIES = [
|
|
3
|
+
{
|
|
4
|
+
id: "web-search",
|
|
5
|
+
label: "\u8054\u7F51\u641C\u7D22",
|
|
6
|
+
description: "\u8BA9 agent \u80FD\u641C\u7D22\u4E92\u8054\u7F51\u3001\u6293\u53D6\u7F51\u9875\u5185\u5BB9\uFF0C\u83B7\u53D6\u6700\u65B0\u4FE1\u606F\u3002",
|
|
7
|
+
tools: ["exa_search", "fetchWebpage"],
|
|
8
|
+
defaultEnabled: true,
|
|
9
|
+
icon: "\u{1F310}"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
id: "web-scrape",
|
|
13
|
+
label: "\u6DF1\u5EA6\u7F51\u9875\u6293\u53D6",
|
|
14
|
+
description: "\u5728\u666E\u901A\u8054\u7F51\u641C\u7D22\u4E4B\u5916\uFF0C\u7528 Firecrawl \u505A\u7ED3\u6784\u5316\u641C\u7D22\u4E0E\u6574\u9875\u6293\u53D6\uFF0C\u9002\u5408\u9700\u8981\u5B8C\u6574\u6B63\u6587\u3001\u6587\u6863\u7AD9\u70B9\u6216\u7AD9\u5185\u68C0\u7D22\u7684\u573A\u666F\u3002",
|
|
15
|
+
tools: ["firecrawl_search", "firecrawl_scrape"],
|
|
16
|
+
defaultEnabled: false,
|
|
17
|
+
icon: "\u{1F578}\uFE0F"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: "agent-orchestration",
|
|
21
|
+
label: "\u591A agent \u7F16\u6392",
|
|
22
|
+
description: "\u5148\u6309\u6536\u85CF\u3001\u7B80\u4ECB\u3001\u80FD\u529B\u548C\u6210\u672C\u5217\u51FA\u5B89\u5168 agent \u6458\u8981\uFF0C\u6309\u9700\u8BFB\u53D6\u5019\u9009\u914D\u7F6E\u89E3\u6790\u53EF\u8FD0\u884C key\uFF0C\u518D\u540E\u53F0\u542F\u52A8\u5176\u4ED6 agent \u6267\u884C\u5B50\u4EFB\u52A1\uFF0C\u5E76\u89C2\u5BDF\u3001\u67E5\u8BE2\u3001\u505C\u6B62\u8FD0\u884C\u4E2D\u7684 agent run\u2014\u2014\u9002\u5408\u5E76\u884C\u6D3E\u53D1\u3001\u957F\u4EFB\u52A1\u8DDF\u8E2A\u3001\u4E2D\u9014\u53EB\u505C\u7B49\u7F16\u6392\u573A\u666F\u3002",
|
|
23
|
+
tools: ["startAgentRun", "controlAgentRun", "listAgents", "listRuntimes"],
|
|
24
|
+
defaultEnabled: true,
|
|
25
|
+
icon: "\u{1F9E9}"
|
|
26
|
+
}
|
|
27
|
+
];
|
|
28
|
+
var SYSTEM_AGENT_CAPABILITY_IDS = SYSTEM_AGENT_CAPABILITIES.map(
|
|
29
|
+
({ id }) => id
|
|
30
|
+
);
|
|
31
|
+
var DEFAULT_SYSTEM_AGENT_CAPABILITIES = Object.fromEntries(
|
|
32
|
+
SYSTEM_AGENT_CAPABILITIES.map(({ id, defaultEnabled }) => [
|
|
33
|
+
id,
|
|
34
|
+
defaultEnabled
|
|
35
|
+
])
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export {
|
|
39
|
+
SYSTEM_AGENT_CAPABILITIES,
|
|
40
|
+
SYSTEM_AGENT_CAPABILITY_IDS,
|
|
41
|
+
DEFAULT_SYSTEM_AGENT_CAPABILITIES
|
|
42
|
+
};
|