synurex 2026.3.3-13 → 2026.3.3-14
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/dist/{Synurex-root-DjwR-G3Y.js → Synurex-root-CbEdPwLE.js} +2 -2
- package/dist/{accounts-6awQ9byW.js → accounts-BqN2SY0Z.js} +7 -7
- package/dist/{acp-cli-DgztFMxz.js → acp-cli-CjrH_nFX.js} +4 -4
- package/dist/{acp-cli-Bl8rzKKs.js → acp-cli-kx1_sJop.js} +7 -7
- package/dist/{agent-DLxJ9xh1.js → agent-Bs1xk5O8.js} +11 -11
- package/dist/{agent-Dmx3qZPI.js → agent-J7xrqrFB.js} +6 -6
- package/dist/{agent-scope-CwB__efW.js → agent-scope-CRRhJ7Hf.js} +11 -11
- package/dist/{archive-Dnf35y96.js → archive-Dy3Ezb-5.js} +9 -9
- package/dist/{audit-c1sE7t2p.js → audit-Be4AUVBS.js} +19 -19
- package/dist/{audit-yn_25WaA.js → audit-DRjooWM3.js} +6 -6
- package/dist/{auth-CVGpCRur.js → auth-Caf_Vq95.js} +1 -1
- package/dist/{auth-CUgjFkvI.js → auth-CxWkrW6l.js} +1 -1
- package/dist/{auth-health-CPOkuIh2.js → auth-health-BrChJQW-.js} +1 -1
- package/dist/{call-CTxvJ5pZ.js → call-C_AEd6L4.js} +2 -2
- package/dist/{call-DGsQUmUm.js → call-cfakn1Hz.js} +10 -10
- package/dist/{channel-options-pzckp5wh.js → channel-options-B18zhn1K.js} +5 -5
- package/dist/{channel-options-k4Undn6s.js → channel-options-CW6NxdJ5.js} +1 -1
- package/dist/{channel-selection-D2iDbzGy.js → channel-selection-C7Bf8w-V.js} +1 -1
- package/dist/{channel-selection-DB6qeXHP.js → channel-selection-Dk0AsDdt.js} +2 -2
- package/dist/{channel-summary-ad0DV0Do.js → channel-summary-Bjbf8z3O.js} +5 -5
- package/dist/{channel-summary-2b6qt5Cm.js → channel-summary-DSXnFjJr.js} +2 -2
- package/dist/{channels-cli-B-CYfHWP.js → channels-cli-BD6zXaM9.js} +14 -14
- package/dist/{channels-cli-CK57ws--.js → channels-cli-LZDqQJur.js} +37 -37
- package/dist/{channels-status-issues-DIDtmTU6.js → channels-status-issues-CT6Q1t1h.js} +1 -1
- package/dist/{chrome-C_2g2Ng9.js → chrome-D0V3Ybil.js} +2 -2
- package/dist/{cli-NlCYkSIm.js → cli-CViH00uG.js} +27 -27
- package/dist/{cli-DjJX0rq3.js → cli-DhC5olOQ.js} +11 -11
- package/dist/{client-B9j7V2ke.js → client-BPI-BtH9.js} +1 -1
- package/dist/{command-options-BviqkK5N.js → command-options-DOj81UE2.js} +1 -1
- package/dist/{commands-D24fBHIc.js → commands-Bx76sqkJ.js} +2 -2
- package/dist/{completion-cli-CULYBXOA.js → completion-cli-BNAUSrOW.js} +39 -39
- package/dist/{completion-cli-BALgQ2y1.js → completion-cli-UpUB4QwF.js} +1 -1
- package/dist/{config-z1TIUtLo.js → config-AFzxllYx.js} +2 -2
- package/dist/{config-guard-CMzxWE0A.js → config-guard-CRdz_r-B.js} +17 -17
- package/dist/{configure-CkkcUQpq.js → configure-B6zvGWyK.js} +4 -4
- package/dist/{configure-l92pGfS-.js → configure-C-f2G3-9.js} +10 -10
- package/dist/{control-service-B2g-LdqQ.js → control-service-DpyCNhOa.js} +4 -4
- package/dist/{cron-cli-BPdH_4-b.js → cron-cli-DcW2_EwZ.js} +4 -4
- package/dist/{cron-cli-CEU9qNeo.js → cron-cli-NGed9cUY.js} +9 -9
- package/dist/{daemon-cli-_1Alcq4u.js → daemon-cli-CBJip-nd.js} +13 -13
- package/dist/{daemon-cli-CPgyDKEv.js → daemon-cli-okkQQBPi.js} +6 -6
- package/dist/{daemon-runtime-Bj0c6iGO.js → daemon-runtime-CRdmLdkD.js} +10 -10
- package/dist/{deliver-D9X76Ajz.js → deliver-C6rKe0jw.js} +8 -8
- package/dist/{deliver-BUV-sfaF.js → deliver-Cjq6lNnt.js} +1 -1
- package/dist/{deliver-C4xT__Jw.js → deliver-DT5GEOg1.js} +3 -3
- package/dist/{deps-B_SLULm-.js → deps-B0rItZ4i.js} +2 -2
- package/dist/{deps-DePusoG1.js → deps-sVUuFeWJ.js} +2 -2
- package/dist/{devices-cli-Ea0Smn_b.js → devices-cli-CVN_1bwZ.js} +3 -3
- package/dist/{devices-cli-haiv3KUB.js → devices-cli-CzYstNxc.js} +6 -6
- package/dist/{directory-cli-CYrAx1h6.js → directory-cli-5fXjkdC9.js} +7 -7
- package/dist/{directory-cli-74fIX6Ci.js → directory-cli-DC38fKqG.js} +2 -2
- package/dist/{dispatcher-hKfZ1phk.js → dispatcher-BLeixzBZ.js} +3 -3
- package/dist/{dns-cli-DjitptaM.js → dns-cli-rkR0HJpi.js} +3 -3
- package/dist/{docs-cli-DgFtHJ1-.js → docs-cli-CqtgkhfC.js} +1 -1
- package/dist/{doctor-CGxS0rC7.js → doctor-CqHDpspk.js} +35 -35
- package/dist/{doctor-BRULcSTR.js → doctor-DGkFVCq0.js} +7 -7
- package/dist/entry.js +1 -1
- package/dist/{exec-approvals-cli-Vuax4fsE.js → exec-approvals-cli-Apodxdz3.js} +13 -13
- package/dist/{exec-approvals-cli-DJZVftuS.js → exec-approvals-cli-Bc4DvO9s.js} +5 -5
- package/dist/extensionAPI.js +5 -5
- package/dist/{gateway-cli-DkQO2Xol.js → gateway-cli-Bv7VIXZo.js} +205 -124
- package/dist/{gateway-cli-f0ab5QnF.js → gateway-cli-DivOM-cC.js} +115 -34
- package/dist/{gateway-rpc-uFNlfdvz.js → gateway-rpc-BlMm9s2y.js} +2 -2
- package/dist/{gateway-rpc-CadFzUjf.js → gateway-rpc-gPT5wkIr.js} +2 -2
- package/dist/{github-copilot-auth-BCMIKL_Q.js → github-copilot-auth-C9EB1cRg.js} +5 -5
- package/dist/{github-copilot-auth-ByLv7D6a.js → github-copilot-auth-kD-HxRJk.js} +1 -1
- package/dist/{gmail-setup-utils-CZjYb-kZ.js → gmail-setup-utils-n354D0jO.js} +1 -1
- package/dist/{health-format-BqYntyuZ.js → health-format-CX2h4BHh.js} +4 -4
- package/dist/{health-format-B-RHKR8Z.js → health-format-wDggPFFA.js} +11 -11
- package/dist/{hooks-cli-DYhRV2P5.js → hooks-cli-DK-hUf4g.js} +51 -51
- package/dist/{hooks-cli-D_Jt25yP.js → hooks-cli-TCR8dUpQ.js} +12 -12
- package/dist/{hooks-status-gbnenW4L.js → hooks-status-CpkHFMVY.js} +1 -1
- package/dist/{image-Bne74Jlh.js → image-CwL-MN8N.js} +8 -8
- package/dist/{image-C6SHcuJM.js → image-UwhETmTx.js} +1 -1
- package/dist/{image-BzqeYd9i.js → image-drR51Hof.js} +1 -1
- package/dist/index.js +67 -67
- package/dist/{installs-BA4wsoeX.js → installs-BvY-yqDY.js} +18 -18
- package/dist/{loader-DfImT-V3.js → loader-BWJSUVnv.js} +12 -12
- package/dist/{login-qr-CQP70Oyc.js → login-qr-D823w1Qv.js} +2 -2
- package/dist/{logs-cli-CZU1HhVP.js → logs-cli-9mWqazPR.js} +7 -7
- package/dist/{logs-cli-nC3f5CLF.js → logs-cli-K5lBhMVs.js} +4 -4
- package/dist/{manager-C_l1U3wv.js → manager-MLoKmXjg.js} +15 -15
- package/dist/{message-channel-DcxF0eJh.js → message-channel-BD_F76We.js} +1 -0
- package/dist/{message-channel-DJEeCAZD.js → message-channel-D4crV6LE.js} +1 -0
- package/dist/{model-selection-BlUER9-N.js → model-selection-CjYymzT8.js} +1 -1
- package/dist/{models-cli-kn0LJ9A6.js → models-cli-BV9Fw5z6.js} +32 -32
- package/dist/{models-cli-DkLpQUDt.js → models-cli-BkTQVlLL.js} +12 -12
- package/dist/{net-BFQE3qvW.js → net-LVvxvWQU.js} +1 -1
- package/dist/{node-cli-LY3X1Vga.js → node-cli-BaSVj4Vn.js} +34 -4
- package/dist/{node-cli-D_Kz-pdd.js → node-cli-CxFrGta2.js} +70 -40
- package/dist/{node-service-NXg-VkrK.js → node-service-DB0Rp9Fr.js} +1 -1
- package/dist/{nodes-cli--KUg3Fft.js → nodes-cli-B2m27YPk.js} +4 -4
- package/dist/{nodes-cli-CEMU7JWM.js → nodes-cli-CqbDLFpz.js} +10 -10
- package/dist/{nodes-screen-BzBojMn3.js → nodes-screen-B240wNB8.js} +2 -2
- package/dist/{onboard-channels-B8e17y6y.js → onboard-channels-CLMWQlXs.js} +1 -1
- package/dist/{onboard-channels-BCYALfWN.js → onboard-channels-Dq71YUSz.js} +5 -5
- package/dist/{onboard-skills-BZIkbD4M.js → onboard-skills-CttBE8di.js} +4 -4
- package/dist/{onboard-skills-BzaJ9L8d.js → onboard-skills-CwuGLX-J.js} +9 -9
- package/dist/{onboarding-DWNNQHkv.js → onboarding-BJ67eif6.js} +31 -31
- package/dist/{pairing-cli-Cuk0yq5P.js → pairing-cli-CN183i69.js} +7 -7
- package/dist/{pairing-labels-EEbQo5Mm.js → pairing-labels-DXioxZ5X.js} +1 -1
- package/dist/{pairing-store-CaS_DoHh.js → pairing-store-pdzxfI5n.js} +1 -1
- package/dist/{pi-embedded-helpers-dkrwwXev.js → pi-embedded-helpers-C7gP5UAR.js} +1 -0
- package/dist/{pi-embedded-helpers-DlUfCcNO.js → pi-embedded-helpers-CVjeT4c-.js} +6 -6
- package/dist/{pi-embedded-helpers-DyfPH1I_.js → pi-embedded-helpers-DzMuonov.js} +1 -1
- package/dist/{pi-tools.policy-BVc5W85u.js → pi-tools.policy-D7KP8aVx.js} +4 -4
- package/dist/{plugin-auto-enable-CvFVmzmf.js → plugin-auto-enable-Ca3Ou67i.js} +2 -2
- package/dist/plugin-sdk/index.js +1 -0
- package/dist/{plugins-D8cfSm2U.js → plugins-Bng3p5bC.js} +1 -1
- package/dist/{plugins-cli-EAWTwTwX.js → plugins-cli-CruMD7qG.js} +12 -12
- package/dist/{plugins-cli-DZrWrHeU.js → plugins-cli-D1PhdOuo.js} +32 -32
- package/dist/{program-Co8R9piJ.js → program-DCYhQtPO.js} +30 -30
- package/dist/{pw-ai-mITm4FQX.js → pw-ai-bugVLPkL.js} +4 -4
- package/dist/{qmd-manager-Curj6nE6.js → qmd-manager-C1JB3Owf.js} +15 -15
- package/dist/{register.subclis-DRuH7f2k.js → register.subclis-DOBlc1CE.js} +22 -22
- package/dist/{reply-BlwTro3l.js → reply-kGzYqlyh.js} +117 -117
- package/dist/{routes-DTXfCcT7.js → routes-Dw3vw8Re.js} +17 -17
- package/dist/{rpc-7V1ztwDl.js → rpc-Bl2aA8x_.js} +2 -2
- package/dist/{rpc-BfAQ9OvQ.js → rpc-Blk2h9HB.js} +2 -2
- package/dist/{run-main-CLhaeSUz.js → run-main-DujoirC1.js} +32 -32
- package/dist/{sandbox-XzAInH4w.js → sandbox-BkvixD-a.js} +22 -22
- package/dist/{sandbox-DBpsZtIS.js → sandbox-C5Zst3aW.js} +1 -1
- package/dist/{sandbox-cli-sT1dyR69.js → sandbox-cli-BSyM-cMf.js} +2 -2
- package/dist/{sandbox-cli-DVXhMXvh.js → sandbox-cli-OM5bNXFV.js} +11 -11
- package/dist/{security-cli-CdZHQp6q.js → security-cli-Bqx1LRDW.js} +7 -7
- package/dist/{security-cli-Bdls-UxY.js → security-cli-DpBd59Zq.js} +24 -24
- package/dist/{server-context-DP6TW7v7.js → server-context-BuV65eg5.js} +4 -4
- package/dist/{server-node-events-T_wRPg-h.js → server-node-events-B7T6NvhY.js} +29 -29
- package/dist/{server-node-events-DyQCWI9_.js → server-node-events-CyQQFBWO.js} +13 -13
- package/dist/{service-gmrPboJV.js → service-CZFM7dlu.js} +15 -15
- package/dist/{service-audit-BSX90VAq.js → service-audit-DptlZVXP.js} +13 -13
- package/dist/{shared-CD4_mb7F.js → shared-B8t5YMMY.js} +2 -2
- package/dist/{shared-Dh9sqISa.js → shared-C79dnas0.js} +1 -1
- package/dist/{shared-Dn5D714-.js → shared-CmDxu18X.js} +1 -1
- package/dist/{skill-scanner-BzdfBlmF.js → skill-scanner-BoGjHXUZ.js} +5 -5
- package/dist/{skills-CnUaNWM6.js → skills-CrYcs9jK.js} +1 -1
- package/dist/{skills-cli-ChSahY2k.js → skills-cli-C2rWGqKQ.js} +5 -5
- package/dist/{skills-status-CaIxlXqp.js → skills-status-Bhe2beiQ.js} +1 -1
- package/dist/{sqlite-DaOG9nDc.js → sqlite-CbZh0dx1.js} +8 -8
- package/dist/{status-BDG9ZKR1.js → status-BMIFltQA.js} +11 -11
- package/dist/{status-uUN1g1ak.js → status-C3olgffv.js} +3 -3
- package/dist/{status-BtRZByU9.js → status-D2kCUSvP.js} +1 -1
- package/dist/{system-cli-hFQv3fRj.js → system-cli-Chmn4La_.js} +4 -4
- package/dist/{system-cli-CKYa0Hlg.js → system-cli-DX1zNhx2.js} +7 -7
- package/dist/{systemd-BEUSBkIz.js → systemd-DerMq_3Y.js} +5 -5
- package/dist/{systemd-linger-DT_KI_CN.js → systemd-linger-CRL7Xf4C.js} +1 -1
- package/dist/{tui-BYO6JShs.js → tui-C8s9OaKw.js} +5 -5
- package/dist/{tui-bijYxDqS.js → tui-CxlbEgzo.js} +7 -7
- package/dist/{tui-cli-DWciEfZf.js → tui-cli-CypFFilz.js} +7 -7
- package/dist/{tui-cli-U0Mxw_E8.js → tui-cli-XiSbpsrK.js} +16 -16
- package/dist/{update-bkg5F6r8.js → update-BKGU5x_o.js} +3 -3
- package/dist/{update-cli-BnWnpqMq.js → update-cli-9V6-44BU.js} +20 -20
- package/dist/{update-cli-BrHkeubo.js → update-cli-C-t6P9fu.js} +55 -55
- package/dist/{update-runner-eavzgfjq.js → update-runner-DVg8cvdJ.js} +25 -25
- package/dist/{update-runner-D2oGDU6X.js → update-runner-DmrKMFMR.js} +3 -3
- package/dist/{webhooks-cli-zXFYj7-i.js → webhooks-cli-BXxSGFuL.js} +5 -5
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs from "node:fs";
|
|
4
|
-
import
|
|
4
|
+
import fs$1 from "node:fs/promises";
|
|
5
5
|
|
|
6
6
|
//#region src/infra/Synurex-root.ts
|
|
7
7
|
const CORE_PACKAGE_NAMES = new Set(["synurex"]);
|
|
8
8
|
async function readPackageName(dir) {
|
|
9
9
|
try {
|
|
10
|
-
const raw = await
|
|
10
|
+
const raw = await fs$1.readFile(path.join(dir, "package.json"), "utf-8");
|
|
11
11
|
const parsed = JSON.parse(raw);
|
|
12
12
|
return typeof parsed.name === "string" ? parsed.name : null;
|
|
13
13
|
} catch {
|
|
@@ -4,7 +4,7 @@ import { D as info, P as success, c as defaultRuntime, z as getChildLogger } fro
|
|
|
4
4
|
import { h as resolveUserPath, u as jidToE164 } from "./utils-C7NsUvD1.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import fs from "node:fs";
|
|
7
|
-
import
|
|
7
|
+
import fs$1 from "node:fs/promises";
|
|
8
8
|
|
|
9
9
|
//#region src/web/auth-store.ts
|
|
10
10
|
function resolveDefaultWebAuthDir() {
|
|
@@ -57,14 +57,14 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
57
57
|
maybeRestoreCredsFromBackup(resolvedAuthDir);
|
|
58
58
|
const credsPath = resolveWebCredsPath(resolvedAuthDir);
|
|
59
59
|
try {
|
|
60
|
-
await
|
|
60
|
+
await fs$1.access(resolvedAuthDir);
|
|
61
61
|
} catch {
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
64
|
try {
|
|
65
|
-
const stats = await
|
|
65
|
+
const stats = await fs$1.stat(credsPath);
|
|
66
66
|
if (!stats.isFile() || stats.size <= 1) return false;
|
|
67
|
-
const raw = await
|
|
67
|
+
const raw = await fs$1.readFile(credsPath, "utf-8");
|
|
68
68
|
JSON.parse(raw);
|
|
69
69
|
return true;
|
|
70
70
|
} catch {
|
|
@@ -72,7 +72,7 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
async function clearLegacyBaileysAuthState(authDir) {
|
|
75
|
-
const entries = await
|
|
75
|
+
const entries = await fs$1.readdir(authDir, { withFileTypes: true });
|
|
76
76
|
const shouldDelete = (name) => {
|
|
77
77
|
if (name === "oauth.json") return false;
|
|
78
78
|
if (name === "creds.json" || name === "creds.json.bak") return true;
|
|
@@ -82,7 +82,7 @@ async function clearLegacyBaileysAuthState(authDir) {
|
|
|
82
82
|
await Promise.all(entries.map(async (entry) => {
|
|
83
83
|
if (!entry.isFile()) return;
|
|
84
84
|
if (!shouldDelete(entry.name)) return;
|
|
85
|
-
await
|
|
85
|
+
await fs$1.rm(path.join(authDir, entry.name), { force: true });
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
88
|
async function logoutWeb(params) {
|
|
@@ -93,7 +93,7 @@ async function logoutWeb(params) {
|
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
if (params.isLegacyAuthDir) await clearLegacyBaileysAuthState(resolvedAuthDir);
|
|
96
|
-
else await
|
|
96
|
+
else await fs$1.rm(resolvedAuthDir, {
|
|
97
97
|
recursive: true,
|
|
98
98
|
force: true
|
|
99
99
|
});
|
|
@@ -8,10 +8,10 @@ import { i as loadConfig, j as VERSION } from "./config-nvHm49RH.js";
|
|
|
8
8
|
import "./manifest-registry-DjRSe72U.js";
|
|
9
9
|
import { t as ensureSynurexCliOnPath } from "./path-env-DwZUJC_M.js";
|
|
10
10
|
import "./tailscale-9MusRvOi.js";
|
|
11
|
-
import { t as GatewayClient } from "./client-
|
|
12
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
13
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
14
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
11
|
+
import { t as GatewayClient } from "./client-BPI-BtH9.js";
|
|
12
|
+
import { i as resolveGatewayAuth } from "./auth-CxWkrW6l.js";
|
|
13
|
+
import { t as buildGatewayConnectionDetails } from "./call-C_AEd6L4.js";
|
|
14
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-BD_F76We.js";
|
|
15
15
|
import { t as isMainModule } from "./is-main-PYGa3tDA.js";
|
|
16
16
|
import { t as formatDocsLink } from "./links-B79LZSNJ.js";
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
@@ -2,21 +2,21 @@ import "./paths-Drx5WZ13.js";
|
|
|
2
2
|
import { R as theme, c as defaultRuntime } from "./subsystem-DPYBJG7C.js";
|
|
3
3
|
import "./utils-C7NsUvD1.js";
|
|
4
4
|
import "./exec-Dloa-d0d.js";
|
|
5
|
-
import "./agent-scope-
|
|
6
|
-
import "./model-selection-
|
|
5
|
+
import "./agent-scope-CRRhJ7Hf.js";
|
|
6
|
+
import "./model-selection-CjYymzT8.js";
|
|
7
7
|
import "./github-copilot-token-_jdpoYjM.js";
|
|
8
8
|
import "./boolean-BgXe2hyu.js";
|
|
9
9
|
import "./env-DgIs6BZg.js";
|
|
10
|
-
import { i as loadConfig, j as VERSION } from "./config-
|
|
10
|
+
import { i as loadConfig, j as VERSION } from "./config-AFzxllYx.js";
|
|
11
11
|
import "./manifest-registry-D8FEq9qs.js";
|
|
12
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
13
|
-
import { l as GatewayClient } from "./net-
|
|
14
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
12
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-D4crV6LE.js";
|
|
13
|
+
import { l as GatewayClient } from "./net-LVvxvWQU.js";
|
|
14
|
+
import { t as buildGatewayConnectionDetails } from "./call-cfakn1Hz.js";
|
|
15
15
|
import { t as formatDocsLink } from "./links-iCD68SwJ.js";
|
|
16
16
|
import "./tailscale-CGhNcgVS.js";
|
|
17
17
|
import { t as isMainModule } from "./is-main-B6kCyqsv.js";
|
|
18
18
|
import { t as ensureSynurexCliOnPath } from "./path-env-Bc8ZqjfY.js";
|
|
19
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
19
|
+
import { i as resolveGatewayAuth } from "./auth-Caf_Vq95.js";
|
|
20
20
|
import { fileURLToPath } from "node:url";
|
|
21
21
|
import { spawn } from "node:child_process";
|
|
22
22
|
import { randomUUID } from "node:crypto";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-
|
|
2
|
-
import { An as emitAgentEvent, Er as loadModelCatalog, I as runWithModelFallback, M as resolveSessionDeliveryTarget, Nn as registerAgentRunContext, On as AGENT_LANE_NESTED, Rt as getRemoteSkillEligibility, Vr as resolveAgentTimeoutMs, Zt as getSkillsSnapshotVersion, br as applyModelOverrideToSessionEntry, c as runEmbeddedPiAgent, i as runCliAgent, j as resolveOutboundTarget, kn as clearAgentRunContext, n as getCliSessionId, o as resolveSendPolicy, r as setCliSessionId, vr as lookupContextTokens, xr as applyVerboseOverride, yr as clearSessionAuthProfileOverride } from "./reply-
|
|
1
|
+
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-CVjeT4c-.js";
|
|
2
|
+
import { An as emitAgentEvent, Er as loadModelCatalog, I as runWithModelFallback, M as resolveSessionDeliveryTarget, Nn as registerAgentRunContext, On as AGENT_LANE_NESTED, Rt as getRemoteSkillEligibility, Vr as resolveAgentTimeoutMs, Zt as getSkillsSnapshotVersion, br as applyModelOverrideToSessionEntry, c as runEmbeddedPiAgent, i as runCliAgent, j as resolveOutboundTarget, kn as clearAgentRunContext, n as getCliSessionId, o as resolveSendPolicy, r as setCliSessionId, vr as lookupContextTokens, xr as applyVerboseOverride, yr as clearSessionAuthProfileOverride } from "./reply-kGzYqlyh.js";
|
|
3
3
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "./session-key-DrNCyvP1.js";
|
|
4
4
|
import { c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL } from "./subsystem-DPYBJG7C.js";
|
|
5
|
-
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-
|
|
6
|
-
import { Ct as DEFAULT_PROVIDER, St as DEFAULT_MODEL, a as isCliProvider, d as resolveConfiguredModelRef, ft as ensureAuthProfileStore, h as resolveThinkingDefault, o as modelKey, t as buildAllowedModelSet, xt as DEFAULT_CONTEXT_TOKENS } from "./model-selection-
|
|
5
|
+
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-CRRhJ7Hf.js";
|
|
6
|
+
import { Ct as DEFAULT_PROVIDER, St as DEFAULT_MODEL, a as isCliProvider, d as resolveConfiguredModelRef, ft as ensureAuthProfileStore, h as resolveThinkingDefault, o as modelKey, t as buildAllowedModelSet, xt as DEFAULT_CONTEXT_TOKENS } from "./model-selection-CjYymzT8.js";
|
|
7
7
|
import { t as formatCliCommand } from "./command-format-CEnDvS9q.js";
|
|
8
|
-
import { i as loadConfig } from "./config-
|
|
9
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
10
|
-
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-
|
|
11
|
-
import { r as buildWorkspaceSkillSnapshot } from "./skills-
|
|
12
|
-
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
8
|
+
import { i as loadConfig } from "./config-AFzxllYx.js";
|
|
9
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-Bng3p5bC.js";
|
|
10
|
+
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-BkvixD-a.js";
|
|
11
|
+
import { r as buildWorkspaceSkillSnapshot } from "./skills-CrYcs9jK.js";
|
|
12
|
+
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-D4crV6LE.js";
|
|
13
13
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-mzsdSoO2.js";
|
|
14
|
-
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-
|
|
14
|
+
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-C6rKe0jw.js";
|
|
15
15
|
import { l as hasNonzeroUsage } from "./session-cost-usage-CPvtWzot.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-B0rItZ4i.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -4,16 +4,16 @@ import { t as formatCliCommand } from "./command-format-DUskR3Ej.js";
|
|
|
4
4
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "./session-key-n2HVbrj0.js";
|
|
5
5
|
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-DNmzkYn4.js";
|
|
6
6
|
import { i as loadConfig } from "./config-nvHm49RH.js";
|
|
7
|
-
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
7
|
+
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-BD_F76We.js";
|
|
8
8
|
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-C1mc_xWv.js";
|
|
9
|
-
import { Bt as clearAgentRunContext, Dt as runEmbeddedPiAgent, H as getCliSessionId, Jt as applyModelOverrideToSessionEntry, K as resolveSendPolicy, Kt as AGENT_LANE_NESTED, Tn as runWithModelFallback, U as setCliSessionId, Vt as emitAgentEvent, W as runCliAgent, Wt as registerAgentRunContext, bn as resolveOutboundTarget, ct as clearSessionAuthProfileOverride, dn as lookupContextTokens, lt as applyVerboseOverride, ot as getSkillsSnapshotVersion, q as getRemoteSkillEligibility, qt as loadModelCatalog, xn as resolveSessionDeliveryTarget, zt as resolveAgentTimeoutMs } from "./loader-
|
|
9
|
+
import { Bt as clearAgentRunContext, Dt as runEmbeddedPiAgent, H as getCliSessionId, Jt as applyModelOverrideToSessionEntry, K as resolveSendPolicy, Kt as AGENT_LANE_NESTED, Tn as runWithModelFallback, U as setCliSessionId, Vt as emitAgentEvent, W as runCliAgent, Wt as registerAgentRunContext, bn as resolveOutboundTarget, ct as clearSessionAuthProfileOverride, dn as lookupContextTokens, lt as applyVerboseOverride, ot as getSkillsSnapshotVersion, q as getRemoteSkillEligibility, qt as loadModelCatalog, xn as resolveSessionDeliveryTarget, zt as resolveAgentTimeoutMs } from "./loader-BWJSUVnv.js";
|
|
10
10
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-Cn5vXlEi.js";
|
|
11
|
-
import { B as normalizeThinkLevel, F as formatXHighModelHint, H as normalizeVerboseLevel, P as formatThinkingLevels, W as supportsXHighThinking } from "./pi-embedded-helpers-
|
|
12
|
-
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-
|
|
13
|
-
import { A as resolveSessionResetType, D as evaluateSessionFreshness, E as resolveSessionKey, F as resolveExplicitAgentSessionKey, O as resolveChannelResetConfig, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, k as resolveSessionResetPolicy } from "./sandbox-
|
|
11
|
+
import { B as normalizeThinkLevel, F as formatXHighModelHint, H as normalizeVerboseLevel, P as formatThinkingLevels, W as supportsXHighThinking } from "./pi-embedded-helpers-DzMuonov.js";
|
|
12
|
+
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-DT5GEOg1.js";
|
|
13
|
+
import { A as resolveSessionResetType, D as evaluateSessionFreshness, E as resolveSessionKey, F as resolveExplicitAgentSessionKey, O as resolveChannelResetConfig, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, k as resolveSessionResetPolicy } from "./sandbox-C5Zst3aW.js";
|
|
14
14
|
import { r as buildWorkspaceSkillSnapshot } from "./skills-B60zX2bC.js";
|
|
15
15
|
import { l as hasNonzeroUsage } from "./session-cost-usage-lYVH5MAy.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-sVUuFeWJ.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -2,11 +2,11 @@ import { g as resolveStateDir } from "./paths-Drx5WZ13.js";
|
|
|
2
2
|
import { _ as isSubagentSessionKey, l as normalizeAgentId, n as DEFAULT_AGENT_ID, v as parseAgentSessionKey } from "./session-key-DrNCyvP1.js";
|
|
3
3
|
import { h as resolveUserPath } from "./utils-C7NsUvD1.js";
|
|
4
4
|
import { t as runCommandWithTimeout } from "./exec-Dloa-d0d.js";
|
|
5
|
-
import { t as resolveSynurexPackageRoot } from "./Synurex-root-
|
|
5
|
+
import { t as resolveSynurexPackageRoot } from "./Synurex-root-CbEdPwLE.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
10
|
|
|
11
11
|
//#region src/agents/workspace-templates.ts
|
|
12
12
|
const FALLBACK_TEMPLATE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../docs/reference/templates");
|
|
@@ -14,7 +14,7 @@ let cachedTemplateDir;
|
|
|
14
14
|
let resolvingTemplateDir;
|
|
15
15
|
async function pathExists(candidate) {
|
|
16
16
|
try {
|
|
17
|
-
await
|
|
17
|
+
await fs.access(candidate);
|
|
18
18
|
return true;
|
|
19
19
|
} catch {
|
|
20
20
|
return false;
|
|
@@ -81,14 +81,14 @@ async function loadTemplate(name) {
|
|
|
81
81
|
const templateDir = await resolveWorkspaceTemplateDir();
|
|
82
82
|
const templatePath = path.join(templateDir, name);
|
|
83
83
|
try {
|
|
84
|
-
return stripFrontMatter(await
|
|
84
|
+
return stripFrontMatter(await fs.readFile(templatePath, "utf-8"));
|
|
85
85
|
} catch {
|
|
86
86
|
throw new Error(`Missing workspace template: ${name} (${templatePath}). Ensure docs/reference/templates are packaged.`);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
async function writeFileIfMissing(filePath, content) {
|
|
90
90
|
try {
|
|
91
|
-
await
|
|
91
|
+
await fs.writeFile(filePath, content, {
|
|
92
92
|
encoding: "utf-8",
|
|
93
93
|
flag: "wx"
|
|
94
94
|
});
|
|
@@ -98,7 +98,7 @@ async function writeFileIfMissing(filePath, content) {
|
|
|
98
98
|
}
|
|
99
99
|
async function hasGitRepo(dir) {
|
|
100
100
|
try {
|
|
101
|
-
await
|
|
101
|
+
await fs.stat(path.join(dir, ".git"));
|
|
102
102
|
return true;
|
|
103
103
|
} catch {
|
|
104
104
|
return false;
|
|
@@ -124,7 +124,7 @@ async function ensureGitRepo(dir, isBrandNewWorkspace) {
|
|
|
124
124
|
}
|
|
125
125
|
async function ensureAgentWorkspace(params) {
|
|
126
126
|
const dir = resolveUserPath(params?.dir?.trim() ? params.dir.trim() : DEFAULT_AGENT_WORKSPACE_DIR);
|
|
127
|
-
await
|
|
127
|
+
await fs.mkdir(dir, { recursive: true });
|
|
128
128
|
if (!params?.ensureBootstrapFiles) return { dir };
|
|
129
129
|
const agentsPath = path.join(dir, DEFAULT_AGENTS_FILENAME);
|
|
130
130
|
const soulPath = path.join(dir, DEFAULT_SOUL_FILENAME);
|
|
@@ -144,7 +144,7 @@ async function ensureAgentWorkspace(params) {
|
|
|
144
144
|
];
|
|
145
145
|
return (await Promise.all(paths.map(async (p) => {
|
|
146
146
|
try {
|
|
147
|
-
await
|
|
147
|
+
await fs.access(p);
|
|
148
148
|
return true;
|
|
149
149
|
} catch {
|
|
150
150
|
return false;
|
|
@@ -183,7 +183,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
183
183
|
for (const name of candidates) {
|
|
184
184
|
const filePath = path.join(resolvedDir, name);
|
|
185
185
|
try {
|
|
186
|
-
await
|
|
186
|
+
await fs.access(filePath);
|
|
187
187
|
entries.push({
|
|
188
188
|
name,
|
|
189
189
|
filePath
|
|
@@ -196,7 +196,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
196
196
|
for (const entry of entries) {
|
|
197
197
|
let key = entry.filePath;
|
|
198
198
|
try {
|
|
199
|
-
key = await
|
|
199
|
+
key = await fs.realpath(entry.filePath);
|
|
200
200
|
} catch {}
|
|
201
201
|
if (seen.has(key)) continue;
|
|
202
202
|
seen.add(key);
|
|
@@ -239,7 +239,7 @@ async function loadWorkspaceBootstrapFiles(dir) {
|
|
|
239
239
|
entries.push(...await resolveMemoryBootstrapEntries(resolvedDir));
|
|
240
240
|
const result = [];
|
|
241
241
|
for (const entry of entries) try {
|
|
242
|
-
const content = await
|
|
242
|
+
const content = await fs.readFile(entry.filePath, "utf-8");
|
|
243
243
|
result.push({
|
|
244
244
|
name: entry.name,
|
|
245
245
|
path: entry.filePath,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
3
|
import JSZip from "jszip";
|
|
4
4
|
import * as tar from "tar";
|
|
5
5
|
|
|
@@ -18,9 +18,9 @@ function resolveArchiveKind(filePath) {
|
|
|
18
18
|
async function resolvePackedRootDir(extractDir) {
|
|
19
19
|
const direct = path.join(extractDir, "package");
|
|
20
20
|
try {
|
|
21
|
-
if ((await
|
|
21
|
+
if ((await fs.stat(direct)).isDirectory()) return direct;
|
|
22
22
|
} catch {}
|
|
23
|
-
const dirs = (await
|
|
23
|
+
const dirs = (await fs.readdir(extractDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
24
24
|
if (dirs.length !== 1) throw new Error(`unexpected archive layout (dirs: ${dirs.join(", ")})`);
|
|
25
25
|
const onlyDir = dirs[0];
|
|
26
26
|
if (!onlyDir) throw new Error("unexpected archive layout (no package dir found)");
|
|
@@ -37,7 +37,7 @@ async function withTimeout(promise, timeoutMs, label) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async function extractZip(params) {
|
|
40
|
-
const buffer = await
|
|
40
|
+
const buffer = await fs.readFile(params.archivePath);
|
|
41
41
|
const zip = await JSZip.loadAsync(buffer);
|
|
42
42
|
const entries = Object.values(zip.files);
|
|
43
43
|
for (const entry of entries) {
|
|
@@ -45,14 +45,14 @@ async function extractZip(params) {
|
|
|
45
45
|
if (!entryPath || entryPath.endsWith("/")) {
|
|
46
46
|
const dirPath = path.resolve(params.destDir, entryPath);
|
|
47
47
|
if (!dirPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
48
|
-
await
|
|
48
|
+
await fs.mkdir(dirPath, { recursive: true });
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
51
|
const outPath = path.resolve(params.destDir, entryPath);
|
|
52
52
|
if (!outPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
53
|
-
await
|
|
53
|
+
await fs.mkdir(path.dirname(outPath), { recursive: true });
|
|
54
54
|
const data = await entry.async("nodebuffer");
|
|
55
|
-
await
|
|
55
|
+
await fs.writeFile(outPath, data);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async function extractArchive(params) {
|
|
@@ -70,14 +70,14 @@ async function extractArchive(params) {
|
|
|
70
70
|
}
|
|
71
71
|
async function fileExists(filePath) {
|
|
72
72
|
try {
|
|
73
|
-
await
|
|
73
|
+
await fs.stat(filePath);
|
|
74
74
|
return true;
|
|
75
75
|
} catch {
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
async function readJsonFile(filePath) {
|
|
80
|
-
const raw = await
|
|
80
|
+
const raw = await fs.readFile(filePath, "utf-8");
|
|
81
81
|
return JSON.parse(raw);
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { g as resolveStateDir, m as resolveOAuthDir, o as resolveConfigPath } from "./paths-Drx5WZ13.js";
|
|
2
2
|
import { l as normalizeAgentId } from "./session-key-DrNCyvP1.js";
|
|
3
3
|
import { n as runExec } from "./exec-Dloa-d0d.js";
|
|
4
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
4
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CRRhJ7Hf.js";
|
|
5
5
|
import { t as formatCliCommand } from "./command-format-CEnDvS9q.js";
|
|
6
|
-
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-
|
|
6
|
+
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-AFzxllYx.js";
|
|
7
7
|
import { a as MANIFEST_KEY } from "./manifest-registry-D8FEq9qs.js";
|
|
8
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
9
|
-
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-
|
|
10
|
-
import { i as loadWorkspaceSkillEntries } from "./skills-
|
|
11
|
-
import { a as resolveProfile, i as resolveBrowserConfig } from "./server-context-
|
|
12
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
13
|
-
import { l as GatewayClient } from "./net-
|
|
14
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
15
|
-
import { i as readChannelAllowFromStore } from "./pairing-store-
|
|
16
|
-
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-
|
|
8
|
+
import { n as listChannelPlugins } from "./plugins-Bng3p5bC.js";
|
|
9
|
+
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-BkvixD-a.js";
|
|
10
|
+
import { i as loadWorkspaceSkillEntries } from "./skills-CrYcs9jK.js";
|
|
11
|
+
import { a as resolveProfile, i as resolveBrowserConfig } from "./server-context-BuV65eg5.js";
|
|
12
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-D4crV6LE.js";
|
|
13
|
+
import { l as GatewayClient } from "./net-LVvxvWQU.js";
|
|
14
|
+
import { t as buildGatewayConnectionDetails } from "./call-cfakn1Hz.js";
|
|
15
|
+
import { i as readChannelAllowFromStore } from "./pairing-store-pdzxfI5n.js";
|
|
16
|
+
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-D7KP8aVx.js";
|
|
17
17
|
import { t as resolveChannelDefaultAccountId } from "./helpers-yjIEMzi8.js";
|
|
18
|
-
import { t as scanDirectoryWithSummary } from "./skill-scanner-
|
|
19
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
18
|
+
import { t as scanDirectoryWithSummary } from "./skill-scanner-BoGjHXUZ.js";
|
|
19
|
+
import { i as resolveGatewayAuth } from "./auth-Caf_Vq95.js";
|
|
20
20
|
import os from "node:os";
|
|
21
21
|
import path from "node:path";
|
|
22
22
|
import JSON5 from "json5";
|
|
23
|
-
import
|
|
23
|
+
import fs from "node:fs/promises";
|
|
24
24
|
import { randomUUID } from "node:crypto";
|
|
25
25
|
|
|
26
26
|
//#region src/gateway/probe.ts
|
|
@@ -275,7 +275,7 @@ function createIcaclsResetCommand(targetPath, opts) {
|
|
|
275
275
|
//#region src/security/audit-fs.ts
|
|
276
276
|
async function safeStat(targetPath) {
|
|
277
277
|
try {
|
|
278
|
-
const lst = await
|
|
278
|
+
const lst = await fs.lstat(targetPath);
|
|
279
279
|
return {
|
|
280
280
|
ok: true,
|
|
281
281
|
isSymlink: lst.isSymbolicLink(),
|
|
@@ -750,7 +750,7 @@ async function collectPluginsTrustFindings(params) {
|
|
|
750
750
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
751
751
|
const st = await safeStat(extensionsDir);
|
|
752
752
|
if (!st.ok || !st.isDir) return findings;
|
|
753
|
-
const pluginDirs = (await
|
|
753
|
+
const pluginDirs = (await fs.readdir(extensionsDir, { withFileTypes: true }).catch(() => [])).filter((e) => e.isDirectory()).map((e) => e.name).filter(Boolean);
|
|
754
754
|
if (pluginDirs.length === 0) return findings;
|
|
755
755
|
const allow = params.cfg.plugins?.allow;
|
|
756
756
|
if (!(Array.isArray(allow) && allow.length > 0)) {
|
|
@@ -815,7 +815,7 @@ async function collectIncludePathsRecursive(params) {
|
|
|
815
815
|
if (visited.has(resolved)) continue;
|
|
816
816
|
visited.add(resolved);
|
|
817
817
|
result.push(resolved);
|
|
818
|
-
const rawText = await
|
|
818
|
+
const rawText = await fs.readFile(resolved, "utf-8").catch(() => null);
|
|
819
819
|
if (!rawText) continue;
|
|
820
820
|
const nestedParsed = (() => {
|
|
821
821
|
try {
|
|
@@ -1060,7 +1060,7 @@ function extensionUsesSkippedScannerPath(entry) {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
async function readPluginManifestExtensions(pluginPath) {
|
|
1062
1062
|
const manifestPath = path.join(pluginPath, "package.json");
|
|
1063
|
-
const raw = await
|
|
1063
|
+
const raw = await fs.readFile(manifestPath, "utf-8").catch(() => "");
|
|
1064
1064
|
if (!raw.trim()) return [];
|
|
1065
1065
|
const extensions = JSON.parse(raw)?.[MANIFEST_KEY]?.extensions;
|
|
1066
1066
|
if (!Array.isArray(extensions)) return [];
|
|
@@ -1087,7 +1087,7 @@ async function collectPluginsCodeSafetyFindings(params) {
|
|
|
1087
1087
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
1088
1088
|
const st = await safeStat(extensionsDir);
|
|
1089
1089
|
if (!st.ok || !st.isDir) return findings;
|
|
1090
|
-
const pluginDirs = (await
|
|
1090
|
+
const pluginDirs = (await fs.readdir(extensionsDir, { withFileTypes: true }).catch((err) => {
|
|
1091
1091
|
findings.push({
|
|
1092
1092
|
checkId: "plugins.code_safety.scan_failed",
|
|
1093
1093
|
severity: "warn",
|
|
@@ -6,16 +6,16 @@ import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./age
|
|
|
6
6
|
import { D as MAX_INCLUDE_DEPTH, E as INCLUDE_KEY, r as createConfigIO } from "./config-nvHm49RH.js";
|
|
7
7
|
import { a as MANIFEST_KEY } from "./manifest-registry-DjRSe72U.js";
|
|
8
8
|
import { a as resolveBrowserConfig, o as resolveProfile } from "./server-context-CFielb4y.js";
|
|
9
|
-
import { t as GatewayClient } from "./client-
|
|
10
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
11
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
12
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
9
|
+
import { t as GatewayClient } from "./client-BPI-BtH9.js";
|
|
10
|
+
import { i as resolveGatewayAuth } from "./auth-CxWkrW6l.js";
|
|
11
|
+
import { t as buildGatewayConnectionDetails } from "./call-C_AEd6L4.js";
|
|
12
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-BD_F76We.js";
|
|
13
13
|
import { n as listChannelPlugins } from "./plugins-C1mc_xWv.js";
|
|
14
14
|
import { t as resolveChannelDefaultAccountId } from "./helpers-DMlRCrD6.js";
|
|
15
15
|
import { t as scanDirectoryWithSummary } from "./skill-scanner-COatt01v.js";
|
|
16
|
-
import { G as resolveSandboxToolPolicyForAgent, Q as resolveToolProfilePolicy, U as resolveSandboxConfigForAgent } from "./sandbox-
|
|
16
|
+
import { G as resolveSandboxToolPolicyForAgent, Q as resolveToolProfilePolicy, U as resolveSandboxConfigForAgent } from "./sandbox-C5Zst3aW.js";
|
|
17
17
|
import { i as loadWorkspaceSkillEntries } from "./skills-B60zX2bC.js";
|
|
18
|
-
import { a as isToolAllowedByPolicies, n as resolveNativeCommandsEnabled, r as resolveNativeSkillsEnabled } from "./commands-
|
|
18
|
+
import { a as isToolAllowedByPolicies, n as resolveNativeCommandsEnabled, r as resolveNativeSkillsEnabled } from "./commands-Bx76sqkJ.js";
|
|
19
19
|
import { i as readChannelAllowFromStore } from "./pairing-store-D_NP0mJs.js";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import os from "node:os";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as parseForwardedForClientIp, r as isTrustedProxyAddress, s as resolveGatewayClientIp } from "./net-
|
|
1
|
+
import { i as parseForwardedForClientIp, r as isTrustedProxyAddress, s as resolveGatewayClientIp } from "./net-LVvxvWQU.js";
|
|
2
2
|
import { c as readTailscaleWhoisIdentity } from "./tailscale-CGhNcgVS.js";
|
|
3
3
|
import { timingSafeEqual } from "node:crypto";
|
|
4
4
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c as readTailscaleWhoisIdentity } from "./tailscale-9MusRvOi.js";
|
|
2
|
-
import { Bt as parseForwardedForClientIp, Ut as resolveGatewayClientIp, zt as isTrustedProxyAddress } from "./client-
|
|
2
|
+
import { Bt as parseForwardedForClientIp, Ut as resolveGatewayClientIp, zt as isTrustedProxyAddress } from "./client-BPI-BtH9.js";
|
|
3
3
|
import { timingSafeEqual } from "node:crypto";
|
|
4
4
|
|
|
5
5
|
//#region src/gateway/auth.ts
|
|
@@ -2,8 +2,8 @@ import { B as resolveConfigPath, W as resolveGatewayPort, X as resolveStateDir }
|
|
|
2
2
|
import { h as shortenHomeInString, m as resolveUserPath, o as ensureDir, t as CONFIG_DIR } from "./utils-DBu98aoz.js";
|
|
3
3
|
import { i as loadConfig } from "./config-nvHm49RH.js";
|
|
4
4
|
import { t as pickPrimaryTailnetIPv4 } from "./tailnet-Byp3obcc.js";
|
|
5
|
-
import { Et as PROTOCOL_VERSION, Mt as normalizeFingerprint, Pt as loadOrCreateDeviceIdentity, Vt as pickPrimaryLanIPv4, t as GatewayClient } from "./client-
|
|
6
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
5
|
+
import { Et as PROTOCOL_VERSION, Mt as normalizeFingerprint, Pt as loadOrCreateDeviceIdentity, Vt as pickPrimaryLanIPv4, t as GatewayClient } from "./client-BPI-BtH9.js";
|
|
6
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-BD_F76We.js";
|
|
7
7
|
import { execFile } from "node:child_process";
|
|
8
8
|
import path from "node:path";
|
|
9
9
|
import { promisify } from "node:util";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { g as resolveStateDir, o as resolveConfigPath, u as resolveGatewayPort } from "./paths-Drx5WZ13.js";
|
|
2
2
|
import { g as shortenHomeInString, h as resolveUserPath, s as ensureDir, t as CONFIG_DIR } from "./utils-C7NsUvD1.js";
|
|
3
|
-
import { i as loadConfig } from "./config-
|
|
4
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
5
|
-
import { Bt as normalizeFingerprint, Ht as loadOrCreateDeviceIdentity, Pt as PROTOCOL_VERSION, a as pickPrimaryLanIPv4, l as GatewayClient } from "./net-
|
|
3
|
+
import { i as loadConfig } from "./config-AFzxllYx.js";
|
|
4
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-D4crV6LE.js";
|
|
5
|
+
import { Bt as normalizeFingerprint, Ht as loadOrCreateDeviceIdentity, Pt as PROTOCOL_VERSION, a as pickPrimaryLanIPv4, l as GatewayClient } from "./net-LVvxvWQU.js";
|
|
6
6
|
import { t as pickPrimaryTailnetIPv4 } from "./tailnet-DLDGNuH2.js";
|
|
7
7
|
import path from "node:path";
|
|
8
|
-
import
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
9
|
import { execFile } from "node:child_process";
|
|
10
10
|
import { promisify } from "node:util";
|
|
11
11
|
import { X509Certificate, randomUUID } from "node:crypto";
|
|
@@ -14,7 +14,7 @@ import { X509Certificate, randomUUID } from "node:crypto";
|
|
|
14
14
|
const execFileAsync = promisify(execFile);
|
|
15
15
|
async function fileExists(filePath) {
|
|
16
16
|
try {
|
|
17
|
-
await
|
|
17
|
+
await fs.access(filePath);
|
|
18
18
|
return true;
|
|
19
19
|
} catch {
|
|
20
20
|
return false;
|
|
@@ -41,8 +41,8 @@ async function generateSelfSignedCert(params) {
|
|
|
41
41
|
"-subj",
|
|
42
42
|
"/CN=Synurex-gateway"
|
|
43
43
|
]);
|
|
44
|
-
await
|
|
45
|
-
await
|
|
44
|
+
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
45
|
+
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
46
46
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
47
47
|
}
|
|
48
48
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -80,9 +80,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
80
80
|
error: "gateway tls: cert/key missing"
|
|
81
81
|
};
|
|
82
82
|
try {
|
|
83
|
-
const cert = await
|
|
84
|
-
const key = await
|
|
85
|
-
const ca = caPath ? await
|
|
83
|
+
const cert = await fs.readFile(certPath, "utf8");
|
|
84
|
+
const key = await fs.readFile(keyPath, "utf8");
|
|
85
|
+
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
86
86
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
87
87
|
if (!fingerprintSha256) return {
|
|
88
88
|
enabled: false,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { lt as loadSynurexPlugins } from "./reply-
|
|
1
|
+
import { lt as loadSynurexPlugins } from "./reply-kGzYqlyh.js";
|
|
2
2
|
import { m as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-DPYBJG7C.js";
|
|
3
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
3
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CRRhJ7Hf.js";
|
|
4
4
|
import { t as isTruthyEnvValue } from "./env-DgIs6BZg.js";
|
|
5
|
-
import { i as loadConfig } from "./config-
|
|
6
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
7
|
-
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-
|
|
5
|
+
import { i as loadConfig } from "./config-AFzxllYx.js";
|
|
6
|
+
import { n as listChannelPlugins } from "./plugins-Bng3p5bC.js";
|
|
7
|
+
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-Ca3Ou67i.js";
|
|
8
8
|
|
|
9
9
|
//#region src/cli/command-options.ts
|
|
10
10
|
function hasExplicitOptions(command, names) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Q as CHAT_CHANNEL_ORDER, n as isTruthyEnvValue } from "./entry.js";
|
|
2
2
|
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-Bu3hK0U6.js";
|
|
3
3
|
import { n as listChannelPlugins } from "./plugins-C1mc_xWv.js";
|
|
4
|
-
import { n as ensurePluginRegistryLoaded } from "./command-options-
|
|
4
|
+
import { n as ensurePluginRegistryLoaded } from "./command-options-DOj81UE2.js";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/channel-options.ts
|
|
7
7
|
function dedupe(values) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-
|
|
1
|
+
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-BD_F76We.js";
|
|
2
2
|
import { n as listChannelPlugins } from "./plugins-C1mc_xWv.js";
|
|
3
3
|
|
|
4
4
|
//#region src/infra/outbound/channel-selection.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
2
|
-
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-
|
|
1
|
+
import { n as listChannelPlugins } from "./plugins-Bng3p5bC.js";
|
|
2
|
+
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-D4crV6LE.js";
|
|
3
3
|
|
|
4
4
|
//#region src/infra/outbound/channel-selection.ts
|
|
5
5
|
const getMessageChannels = () => listDeliverableMessageChannels();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { g as formatRawAssistantErrorForUi, z as listThinkingLevels } from "./pi-embedded-helpers-
|
|
1
|
+
import { g as formatRawAssistantErrorForUi, z as listThinkingLevels } from "./pi-embedded-helpers-CVjeT4c-.js";
|
|
2
2
|
import { t as DEFAULT_ACCOUNT_ID } from "./session-key-DrNCyvP1.js";
|
|
3
3
|
import { C as getActivePluginRegistry, R as theme } from "./subsystem-DPYBJG7C.js";
|
|
4
|
-
import { Ct as DEFAULT_PROVIDER, St as DEFAULT_MODEL, d as resolveConfiguredModelRef } from "./model-selection-
|
|
5
|
-
import { i as loadConfig } from "./config-
|
|
6
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
7
|
-
import { H as listChannelDocks } from "./sandbox-
|
|
4
|
+
import { Ct as DEFAULT_PROVIDER, St as DEFAULT_MODEL, d as resolveConfiguredModelRef } from "./model-selection-CjYymzT8.js";
|
|
5
|
+
import { i as loadConfig } from "./config-AFzxllYx.js";
|
|
6
|
+
import { n as listChannelPlugins } from "./plugins-Bng3p5bC.js";
|
|
7
|
+
import { H as listChannelDocks } from "./sandbox-BkvixD-a.js";
|
|
8
8
|
import { n as formatTokenCount } from "./usage-format-DvowRSs-.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import path from "node:path";
|
|
@@ -3,8 +3,8 @@ import { N as resolveConfiguredModelRef, bt as DEFAULT_PROVIDER, yt as DEFAULT_M
|
|
|
3
3
|
import { t as DEFAULT_ACCOUNT_ID } from "./session-key-n2HVbrj0.js";
|
|
4
4
|
import { i as loadConfig } from "./config-nvHm49RH.js";
|
|
5
5
|
import { n as listChannelPlugins } from "./plugins-C1mc_xWv.js";
|
|
6
|
-
import { L as listThinkingLevels, m as formatRawAssistantErrorForUi } from "./pi-embedded-helpers-
|
|
7
|
-
import { it as listChannelDocks } from "./sandbox-
|
|
6
|
+
import { L as listThinkingLevels, m as formatRawAssistantErrorForUi } from "./pi-embedded-helpers-DzMuonov.js";
|
|
7
|
+
import { it as listChannelDocks } from "./sandbox-C5Zst3aW.js";
|
|
8
8
|
import { n as formatTokenCount } from "./usage-format-BcU1flOY.js";
|
|
9
9
|
import { createRequire } from "node:module";
|
|
10
10
|
import path from "node:path";
|