@runweave/server-linux-x64 0.1.21 → 0.1.24
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/manifest.json +190 -200
- package/native.tar.gz +0 -0
- package/package.json +1 -1
- package/payload/app-server/build-info.json +4 -4
- package/payload/app-server/index.cjs +46 -25
- package/payload/app-server/index.cjs.map +1 -1
- package/payload/backend/activity-sqlite-worker.cjs +33 -21
- package/payload/backend/build-info.json +4 -4
- package/payload/backend/dev-resources/control.cjs +158 -59
- package/payload/backend/index.cjs +2088 -1755
- package/payload/backend/scheduled-tasks-sqlite-worker.cjs +12 -0
- package/payload/frontend/dist/assets/{_baseUniq-1Km-k-ta.js → _baseUniq-Ba3pSqKA.js} +1 -1
- package/payload/frontend/dist/assets/{access-DUvHn-7g.js → access-C1Ww0gdD.js} +1 -1
- package/payload/frontend/dist/assets/{advanced-2iC4XP-k.js → advanced-BZJuI68m.js} +1 -1
- package/payload/frontend/dist/assets/{appearance-F3ep216f.js → appearance-Btma-0NG.js} +1 -1
- package/payload/frontend/dist/assets/{arc-B_Rv2EgC.js → arc-B44-ZMF9.js} +1 -1
- package/payload/frontend/dist/assets/{architectureDiagram-Q4EWVU46-CAfCOCHn.js → architectureDiagram-Q4EWVU46-CJ7zCB_3.js} +1 -1
- package/payload/frontend/dist/assets/{blockDiagram-DXYQGD6D-Dt_EPk2t.js → blockDiagram-DXYQGD6D-l7dgY79m.js} +1 -1
- package/payload/frontend/dist/assets/{c4Diagram-AHTNJAMY-pJxLy6Ib.js → c4Diagram-AHTNJAMY-aNNQInyV.js} +1 -1
- package/payload/frontend/dist/assets/channel-DVHsGC9c.js +1 -0
- package/payload/frontend/dist/assets/{chunk-4BX2VUAB-XIuvwA5G.js → chunk-4BX2VUAB-2W54u8LL.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-4TB4RGXK-BaJHFe6f.js → chunk-4TB4RGXK-CJuTStu-.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-55IACEB6-CBN94dv8.js → chunk-55IACEB6-DcOWjj1X.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-EDXVE4YY-BTpbJ8AJ.js → chunk-EDXVE4YY-Depu37hh.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-FMBD7UC4-D8EB4vd_.js → chunk-FMBD7UC4-CTzWCktW.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-OYMX7WX6-CVlwUrKx.js → chunk-OYMX7WX6-DryiNt82.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-QZHKN3VN-CaRy6kUM.js → chunk-QZHKN3VN-DVwx49kx.js} +1 -1
- package/payload/frontend/dist/assets/{chunk-YZCP3GAM-D76OSgAi.js → chunk-YZCP3GAM-X1PkQV8g.js} +1 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-CmciHFmk.js +1 -0
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-CmciHFmk.js +1 -0
- package/payload/frontend/dist/assets/clone-DxGSjF8z.js +1 -0
- package/payload/frontend/dist/assets/{connection-DbcKyIr4.js → connection-zVFEL2VH.js} +1 -1
- package/payload/frontend/dist/assets/{connections-C-JFI1d6.js → connections-BYoc3Px5.js} +1 -1
- package/payload/frontend/dist/assets/{cose-bilkent-S5V4N54A-C8Ve8zWa.js → cose-bilkent-S5V4N54A-D5JSjBwS.js} +1 -1
- package/payload/frontend/dist/assets/{dagre-KV5264BT-DlutyhBV.js → dagre-KV5264BT-C7wEsUEu.js} +1 -1
- package/payload/frontend/dist/assets/{desktop-hY0qLy1k.js → desktop-DlSOatR2.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-5BDNPKRD-BOWSLJh5.js → diagram-5BDNPKRD-BJVOoWUV.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-G4DWMVQ6-DEJYwBtT.js → diagram-G4DWMVQ6-B-dyOrNQ.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-MMDJMWI5-DCHKtsej.js → diagram-MMDJMWI5-DoTfUnHA.js} +1 -1
- package/payload/frontend/dist/assets/{diagram-TYMM5635-DcWqaORk.js → diagram-TYMM5635-yVeltO6V.js} +1 -1
- package/payload/frontend/dist/assets/{erDiagram-SMLLAGMA-BAnv2QR4.js → erDiagram-SMLLAGMA-BHIOahrf.js} +1 -1
- package/payload/frontend/dist/assets/{flowDiagram-DWJPFMVM-CLJLX_pg.js → flowDiagram-DWJPFMVM-Bnkh3X2r.js} +1 -1
- package/payload/frontend/dist/assets/{ganttDiagram-T4ZO3ILL-CEwNMCO_.js → ganttDiagram-T4ZO3ILL-BRFZUfp9.js} +1 -1
- package/payload/frontend/dist/assets/{gitGraphDiagram-UUTBAWPF-7qYUaW4T.js → gitGraphDiagram-UUTBAWPF-wXS21tDN.js} +1 -1
- package/payload/frontend/dist/assets/{graph-C3pGWAsG.js → graph-Cwj2x7na.js} +1 -1
- package/payload/frontend/dist/assets/{image-DzByFbwW.js → image-CXpMpz27.js} +1 -1
- package/payload/frontend/dist/assets/index-B2PyTNyh.js +1258 -0
- package/payload/frontend/dist/assets/{infoDiagram-42DDH7IO-uykCNcsm.js → infoDiagram-42DDH7IO-BzTeaphH.js} +1 -1
- package/payload/frontend/dist/assets/{ishikawaDiagram-UXIWVN3A-DFjUz1ZP.js → ishikawaDiagram-UXIWVN3A-C_i1EUdW.js} +1 -1
- package/payload/frontend/dist/assets/{journeyDiagram-VCZTEJTY-KlFjvI1y.js → journeyDiagram-VCZTEJTY-B1fcPcA4.js} +1 -1
- package/payload/frontend/dist/assets/{kanban-definition-6JOO6SKY-CWNvauW5.js → kanban-definition-6JOO6SKY-BC5fXbSI.js} +1 -1
- package/payload/frontend/dist/assets/{layout-DEYchOZT.js → layout-dRQexo61.js} +1 -1
- package/payload/frontend/dist/assets/{linear-CxNxQzFY.js → linear-DpsIhjfr.js} +1 -1
- package/payload/frontend/dist/assets/{main-B5vSE7PX.js → main-BFEoEwax.js} +142 -142
- package/payload/frontend/dist/assets/main-BO-hQK7n.css +33 -0
- package/payload/frontend/dist/assets/{min-D_bax_Q3.js → min-Rr06WGlZ.js} +1 -1
- package/payload/frontend/dist/assets/{mindmap-definition-QFDTVHPH-9CPQZB_P.js → mindmap-definition-QFDTVHPH-CAecNSWV.js} +1 -1
- package/payload/frontend/dist/assets/{monitoring-BHrlQuyI.js → monitoring-D9LcExp-.js} +1 -1
- package/payload/frontend/dist/assets/{notifications-C5O4JnTW.js → notifications-BgW6p0Rk.js} +1 -1
- package/payload/frontend/dist/assets/{pieDiagram-DEJITSTG-wRY5e0M8.js → pieDiagram-DEJITSTG-CJgyNjut.js} +1 -1
- package/payload/frontend/dist/assets/{quadrantDiagram-34T5L4WZ-t11sO3Dt.js → quadrantDiagram-34T5L4WZ-C_60Mu33.js} +1 -1
- package/payload/frontend/dist/assets/{record-content-BQpFEpbH.js → record-content-BEOv45kJ.js} +1 -1
- package/payload/frontend/dist/assets/{requirementDiagram-MS252O5E-C0CwyWRr.js → requirementDiagram-MS252O5E-C3HwQcbl.js} +1 -1
- package/payload/frontend/dist/assets/{sankeyDiagram-XADWPNL6-BV_woefX.js → sankeyDiagram-XADWPNL6-RJ6EzD70.js} +1 -1
- package/payload/frontend/dist/assets/{sequenceDiagram-FGHM5R23-Df4He8NT.js → sequenceDiagram-FGHM5R23-QiYuqsIk.js} +1 -1
- package/payload/frontend/dist/assets/{stateDiagram-FHFEXIEX-BEgdIPpz.js → stateDiagram-FHFEXIEX-DscVhCkw.js} +1 -1
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-CBosnJqY.js +1 -0
- package/payload/frontend/dist/assets/{status-Ce0iPeyb.js → status-TMGwGaid.js} +1 -1
- package/payload/frontend/dist/assets/suiji-BFib0tK9.js +1 -0
- package/payload/frontend/dist/assets/{svg-Bw5hEl7G.js → svg-BR3UkgEE.js} +1 -1
- package/payload/frontend/dist/assets/{tabs-DbtEnTWL.js → tabs-FQPVRwwQ.js} +1 -1
- package/payload/frontend/dist/assets/{timeline-definition-GMOUNBTQ-DwbNhEn4.js → timeline-definition-GMOUNBTQ-CrYFg2HY.js} +1 -1
- package/payload/frontend/dist/assets/{vennDiagram-DHZGUBPP-pAfUF9dm.js → vennDiagram-DHZGUBPP-Do4I-ilO.js} +1 -1
- package/payload/frontend/dist/assets/{wardley-RL74JXVD-DcKkKo7k.js → wardley-RL74JXVD-CA9NRCtl.js} +1 -1
- package/payload/frontend/dist/assets/{wardleyDiagram-NUSXRM2D-B1APfa8B.js → wardleyDiagram-NUSXRM2D-gpCyIXuK.js} +1 -1
- package/payload/frontend/dist/assets/{xychartDiagram-5P7HB3ND-BaKuAJV-.js → xychartDiagram-5P7HB3ND-BN662VL0.js} +1 -1
- package/payload/frontend/dist/build-info.json +4 -4
- package/payload/frontend/dist/companion.html +1 -1
- package/payload/frontend/dist/index.html +3 -3
- package/payload/plugins/toolkit/.codex-plugin/plugin.json +1 -1
- package/payload/plugins/toolkit/skills/architecture-flow-prototyping/SKILL.md +2 -2
- package/payload/plugins/toolkit/skills/visual-plan-review/SKILL.md +45 -0
- package/payload/plugins/toolkit/skills/visual-plan-review/agents/openai.yaml +3 -0
- package/payload/plugins/toolkit/skills/visual-plan-review/references/review-checklist.md +13 -0
- package/payload/plugins/toolkit/skills/visual-plan-review/references/visual-plan-template.html +8 -0
- package/payload/plugins/toolkit-release.json +1 -1
- package/payload/pty-host/index.cjs +147 -33
- package/payload/server/index.cjs +40 -20
- package/payload/frontend/dist/assets/channel-DycidetN.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-6PBFFD2Q-5pjklcgn.js +0 -1
- package/payload/frontend/dist/assets/classDiagram-v2-HSJHXN6E-5pjklcgn.js +0 -1
- package/payload/frontend/dist/assets/clone-CUh1yxwY.js +0 -1
- package/payload/frontend/dist/assets/index-X6z9DRtr.js +0 -448
- package/payload/frontend/dist/assets/main-D4_uoZQa.css +0 -33
- package/payload/frontend/dist/assets/stateDiagram-v2-QKLJ7IA2-DyKoLPVf.js +0 -1
- package/payload/frontend/dist/assets/suiji-CKYE-bFZ.js +0 -1
- package/payload/plugins/toolkit/skills/prototype-first-development/SKILL.md +0 -134
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/README.md +0 -88
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/app.js +0 -145
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/index.html +0 -229
- package/payload/plugins/toolkit/skills/prototype-first-development/references/html-prototype-template/mock-state.json +0 -60
- package/payload/plugins/toolkit/skills/prototype-first-development/references/implementation-plan-handoff-template.md +0 -61
- package/payload/plugins/toolkit/skills/prototype-first-development/references/prototype-workflow-checklist.md +0 -64
|
@@ -14607,9 +14607,9 @@ var import_node_fs = require("node:fs");
|
|
|
14607
14607
|
|
|
14608
14608
|
// packages/config-node/src/windows-permissions.ts
|
|
14609
14609
|
var import_node_child_process = require("node:child_process");
|
|
14610
|
-
|
|
14611
|
-
|
|
14612
|
-
|
|
14610
|
+
var import_node_util = require("node:util");
|
|
14611
|
+
var executeFile = (0, import_node_util.promisify)(import_node_child_process.execFile);
|
|
14612
|
+
var script = `
|
|
14613
14613
|
$ErrorActionPreference = 'Stop'
|
|
14614
14614
|
try {
|
|
14615
14615
|
# Use .NET directly: a parent pwsh may export a PSModulePath incompatible with Windows PowerShell.
|
|
@@ -14627,6 +14627,27 @@ foreach ($rule in $acl.GetAccessRules($true, $true, [Security.Principal.Security
|
|
|
14627
14627
|
[Console]::Write('check-failed:' + $_.Exception.GetType().FullName + ':' + $_.Exception.HResult)
|
|
14628
14628
|
}
|
|
14629
14629
|
`;
|
|
14630
|
+
function checkFailure(file, startedAt, cause) {
|
|
14631
|
+
const error = cause;
|
|
14632
|
+
const timedOut = error.code === "ETIMEDOUT" || error.killed === true && error.signal === "SIGTERM" && error.code == null;
|
|
14633
|
+
return new ConfigurationError(
|
|
14634
|
+
timedOut ? "CONFIG_WINDOWS_ACL_CHECK_TIMEOUT" : "CONFIG_WINDOWS_ACL_CHECK_FAILED",
|
|
14635
|
+
[
|
|
14636
|
+
file,
|
|
14637
|
+
`exit=${error.status ?? "none"}`,
|
|
14638
|
+
`signal=${error.signal ?? "none"}`,
|
|
14639
|
+
`code=${error.code ?? "none"}`,
|
|
14640
|
+
`elapsedMs=${Math.round(performance.now() - startedAt)}`
|
|
14641
|
+
]
|
|
14642
|
+
);
|
|
14643
|
+
}
|
|
14644
|
+
function assertResult(file, result) {
|
|
14645
|
+
if (result === "owner" || result === "access") throw new ConfigurationError("CONFIG_WINDOWS_ACL_NOT_PRIVATE", [file, result]);
|
|
14646
|
+
if (/^check-failed:[A-Za-z0-9_.]+:-?\d+$/.test(result)) throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, result]);
|
|
14647
|
+
if (result !== "private") throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, "invalid-result"]);
|
|
14648
|
+
}
|
|
14649
|
+
function assertWindowsPrivatePath(file) {
|
|
14650
|
+
if (process.platform !== "win32") return;
|
|
14630
14651
|
const startedAt = performance.now();
|
|
14631
14652
|
let result;
|
|
14632
14653
|
try {
|
|
@@ -14639,34 +14660,31 @@ foreach ($rule in $acl.GetAccessRules($true, $true, [Security.Principal.Security
|
|
|
14639
14660
|
windowsHide: true
|
|
14640
14661
|
}).trim();
|
|
14641
14662
|
} catch (cause) {
|
|
14642
|
-
|
|
14643
|
-
throw new ConfigurationError(
|
|
14644
|
-
error.code === "ETIMEDOUT" ? "CONFIG_WINDOWS_ACL_CHECK_TIMEOUT" : "CONFIG_WINDOWS_ACL_CHECK_FAILED",
|
|
14645
|
-
[
|
|
14646
|
-
file,
|
|
14647
|
-
`exit=${error.status ?? "none"}`,
|
|
14648
|
-
`signal=${error.signal ?? "none"}`,
|
|
14649
|
-
`code=${error.code ?? "none"}`,
|
|
14650
|
-
`elapsedMs=${Math.round(performance.now() - startedAt)}`
|
|
14651
|
-
]
|
|
14652
|
-
);
|
|
14663
|
+
throw checkFailure(file, startedAt, cause);
|
|
14653
14664
|
}
|
|
14654
|
-
|
|
14655
|
-
if (/^check-failed:[A-Za-z0-9_.]+:-?\d+$/.test(result)) throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, result]);
|
|
14656
|
-
if (result !== "private") throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, "invalid-result"]);
|
|
14665
|
+
assertResult(file, result);
|
|
14657
14666
|
}
|
|
14658
14667
|
|
|
14659
14668
|
// packages/config-node/src/private-file.ts
|
|
14660
|
-
function
|
|
14669
|
+
function privateDirectoryStat(directory) {
|
|
14661
14670
|
const stat = (0, import_node_fs.lstatSync)(directory);
|
|
14662
14671
|
if (!stat.isDirectory() || stat.isSymbolicLink() || process.platform !== "win32" && stat.mode & 63 || typeof process.getuid === "function" && stat.uid !== process.getuid()) throw new ConfigurationError("CONFIG_ROOT_PERMISSIONS_INVALID");
|
|
14663
|
-
|
|
14672
|
+
return stat;
|
|
14664
14673
|
}
|
|
14665
|
-
function
|
|
14674
|
+
function privateDescriptorStat(fd, maxBytes) {
|
|
14666
14675
|
const stat = (0, import_node_fs.fstatSync)(fd);
|
|
14667
14676
|
if (!stat.isFile() || stat.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
|
|
14668
14677
|
if (typeof process.getuid === "function" && stat.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
|
|
14669
14678
|
if (process.platform !== "win32" && stat.mode & 63) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
|
|
14679
|
+
if (stat.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
|
|
14680
|
+
return stat;
|
|
14681
|
+
}
|
|
14682
|
+
function assertPrivateDirectory(directory) {
|
|
14683
|
+
privateDirectoryStat(directory);
|
|
14684
|
+
assertWindowsPrivatePath(directory);
|
|
14685
|
+
}
|
|
14686
|
+
function assertPrivateDescriptor(fd, maxBytes = 1024 * 1024, file) {
|
|
14687
|
+
const stat = privateDescriptorStat(fd, Infinity);
|
|
14670
14688
|
if (process.platform === "win32") {
|
|
14671
14689
|
if (!file) throw new ConfigurationError("CONFIG_PRIVATE_PATH_REQUIRED");
|
|
14672
14690
|
assertWindowsPrivatePath(file);
|
|
@@ -14699,6 +14717,8 @@ function canonicalPath(value) {
|
|
|
14699
14717
|
// packages/config-node/src/platform.ts
|
|
14700
14718
|
var import_node_child_process2 = require("node:child_process");
|
|
14701
14719
|
var import_node_fs3 = require("node:fs");
|
|
14720
|
+
var import_node_util2 = require("node:util");
|
|
14721
|
+
var executeFile2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
|
|
14702
14722
|
function processStartIdentity(pid) {
|
|
14703
14723
|
if (!Number.isSafeInteger(pid) || pid < 1) return null;
|
|
14704
14724
|
try {
|
|
@@ -19298,6 +19318,33 @@ function isInteractiveShellLaunch(launch2) {
|
|
|
19298
19318
|
|
|
19299
19319
|
// packages/pty-host/src/input-operations.ts
|
|
19300
19320
|
var import_node_crypto4 = require("node:crypto");
|
|
19321
|
+
|
|
19322
|
+
// packages/shared/src/terminal/runtime/responses.ts
|
|
19323
|
+
var ESCAPE = "\\u001b";
|
|
19324
|
+
var BELL = "\\u0007";
|
|
19325
|
+
var OSC_COLOR_RESPONSE_PATTERN = new RegExp(
|
|
19326
|
+
`${ESCAPE}\\]1[01];rgb:[0-9a-f/]+(?:${BELL}|${ESCAPE}\\\\)`,
|
|
19327
|
+
"i"
|
|
19328
|
+
);
|
|
19329
|
+
var DECRPM_RESPONSE_PATTERN = new RegExp(`${ESCAPE}\\[\\?[0-9;]+\\$y`);
|
|
19330
|
+
var DCS_RESPONSE_PATTERN = new RegExp(`${ESCAPE}P[01]\\$r.*${ESCAPE}\\\\`);
|
|
19331
|
+
var CURSOR_POSITION_RESPONSE_PATTERN = new RegExp(`${ESCAPE}\\[[0-9;]+R`);
|
|
19332
|
+
var DEVICE_ATTRIBUTES_RESPONSE_PATTERN = new RegExp(
|
|
19333
|
+
`${ESCAPE}\\[(?:\\?|>)[0-9;]+c`
|
|
19334
|
+
);
|
|
19335
|
+
var FOCUS_REPORTING_RESPONSE_PATTERN = new RegExp(`${ESCAPE}\\[(?:I|O)$`);
|
|
19336
|
+
var QUERY_RESPONSE_PATTERN = new RegExp(
|
|
19337
|
+
`^(?:${OSC_COLOR_RESPONSE_PATTERN.source}|${DECRPM_RESPONSE_PATTERN.source}|${DCS_RESPONSE_PATTERN.source}|${CURSOR_POSITION_RESPONSE_PATTERN.source}|${DEVICE_ATTRIBUTES_RESPONSE_PATTERN.source})+$`,
|
|
19338
|
+
"i"
|
|
19339
|
+
);
|
|
19340
|
+
function isTerminalQueryResponse(data) {
|
|
19341
|
+
return data.startsWith("\x1B") && QUERY_RESPONSE_PATTERN.test(data);
|
|
19342
|
+
}
|
|
19343
|
+
|
|
19344
|
+
// packages/shared/src/terminal/runtime/input.ts
|
|
19345
|
+
var TERMINAL_CLIPBOARD_FILE_MAX_BYTES = 100 * 1024 * 1024;
|
|
19346
|
+
|
|
19347
|
+
// packages/pty-host/src/input-operations.ts
|
|
19301
19348
|
var InputOperations = class {
|
|
19302
19349
|
constructor(write, isRunning, generation = () => 0) {
|
|
19303
19350
|
this.write = write;
|
|
@@ -19363,8 +19410,9 @@ var InputOperations = class {
|
|
|
19363
19410
|
for (const step of input.steps) {
|
|
19364
19411
|
if (acceptedGeneration !== this.generation()) throw new Error("HOST_PROCESS_CHANGED");
|
|
19365
19412
|
if (!this.isRunning()) throw new Error("HOST_SESSION_GONE");
|
|
19366
|
-
if (step.type === "text")
|
|
19367
|
-
|
|
19413
|
+
if (step.type === "text") {
|
|
19414
|
+
if (rawSequence === Infinity || !isTerminalQueryResponse(step.data)) this.write(step.data);
|
|
19415
|
+
} else await new Promise((resolve) => setTimeout(resolve, step.ms));
|
|
19368
19416
|
}
|
|
19369
19417
|
if (acceptedGeneration !== this.generation()) throw new Error("HOST_PROCESS_CHANGED");
|
|
19370
19418
|
operation.result.state = "written";
|
|
@@ -19662,7 +19710,7 @@ function serializeOutputScreen(terminal, addon, scrollback = 0) {
|
|
|
19662
19710
|
|
|
19663
19711
|
// packages/pty-host/src/output-screen.ts
|
|
19664
19712
|
var TerminalOutputScreen = class _TerminalOutputScreen {
|
|
19665
|
-
constructor(cursor, onFailure, scrollback = 0) {
|
|
19713
|
+
constructor(cursor, onFailure, scrollback = 0, onResponse) {
|
|
19666
19714
|
this.onFailure = onFailure;
|
|
19667
19715
|
this.cursor = cursor;
|
|
19668
19716
|
this.terminal = new import_headless.default.Terminal({
|
|
@@ -19674,6 +19722,7 @@ var TerminalOutputScreen = class _TerminalOutputScreen {
|
|
|
19674
19722
|
this.terminal.loadAddon(this.serializer);
|
|
19675
19723
|
this.terminal.loadAddon(new import_addon_unicode11.default.Unicode11Addon());
|
|
19676
19724
|
this.terminal.unicode.activeVersion = "11";
|
|
19725
|
+
if (onResponse) this.terminal.onData(onResponse);
|
|
19677
19726
|
}
|
|
19678
19727
|
static pendingSnapshots = 0;
|
|
19679
19728
|
terminal;
|
|
@@ -19892,7 +19941,9 @@ var HostSession = class {
|
|
|
19892
19941
|
terminalSessionId: options.terminalSessionId,
|
|
19893
19942
|
...failure
|
|
19894
19943
|
});
|
|
19895
|
-
}, TERMINAL_CLIENT_SCROLLBACK_LINES)
|
|
19944
|
+
}, TERMINAL_CLIENT_SCROLLBACK_LINES, (data) => {
|
|
19945
|
+
if (!this.nativeClosing && this.info.status === "running") this.terminal?.write(data);
|
|
19946
|
+
});
|
|
19896
19947
|
this.screen.resize(options.cols, options.rows);
|
|
19897
19948
|
this.inputs = new InputOperations((data) => this.terminal.write(data), () => this.info.status === "running", () => this.processGeneration);
|
|
19898
19949
|
try {
|
|
@@ -19919,6 +19970,7 @@ var HostSession = class {
|
|
|
19919
19970
|
terminal;
|
|
19920
19971
|
fallbackActivated = false;
|
|
19921
19972
|
closing = false;
|
|
19973
|
+
nativeClosing = false;
|
|
19922
19974
|
processGeneration = 0;
|
|
19923
19975
|
startupDeadline = 0;
|
|
19924
19976
|
emitOutput(data) {
|
|
@@ -19942,6 +19994,7 @@ var HostSession = class {
|
|
|
19942
19994
|
cols: this.info.cols,
|
|
19943
19995
|
rows: this.info.rows,
|
|
19944
19996
|
cwd: this.options.cwd,
|
|
19997
|
+
useConptyDll: process.platform === "win32",
|
|
19945
19998
|
env: { ...launch2.env, ...this.prepareEnv(this.info.gatewayToken, this.info.terminalSessionId) }
|
|
19946
19999
|
});
|
|
19947
20000
|
this.startupDeadline = this.options.fallback && isInteractiveShellLaunch(this.options) ? Date.now() + 1e3 : 0;
|
|
@@ -20001,11 +20054,15 @@ var HostSession = class {
|
|
|
20001
20054
|
if (process.platform === "win32") {
|
|
20002
20055
|
if (signal === "SIGINT") this.terminal.write("");
|
|
20003
20056
|
else this.close();
|
|
20004
|
-
} else
|
|
20057
|
+
} else {
|
|
20058
|
+
this.nativeClosing = signal !== "SIGINT";
|
|
20059
|
+
this.terminal.kill(signal);
|
|
20060
|
+
}
|
|
20005
20061
|
}
|
|
20006
20062
|
close() {
|
|
20007
20063
|
if (this.info.status !== "running") return;
|
|
20008
20064
|
this.closing = true;
|
|
20065
|
+
this.nativeClosing = true;
|
|
20009
20066
|
this.terminal.kill();
|
|
20010
20067
|
}
|
|
20011
20068
|
snapshot() {
|
|
@@ -20057,6 +20114,42 @@ function sendJson(socket, message) {
|
|
|
20057
20114
|
return true;
|
|
20058
20115
|
}
|
|
20059
20116
|
|
|
20117
|
+
// packages/pty-host/src/output-batcher.ts
|
|
20118
|
+
function createHostOutputBatcher(send) {
|
|
20119
|
+
let pending;
|
|
20120
|
+
let timer;
|
|
20121
|
+
let disposed = false;
|
|
20122
|
+
const flush = () => {
|
|
20123
|
+
if (timer) clearTimeout(timer);
|
|
20124
|
+
timer = void 0;
|
|
20125
|
+
const frame = pending;
|
|
20126
|
+
pending = void 0;
|
|
20127
|
+
if (frame && !disposed) send(frame);
|
|
20128
|
+
};
|
|
20129
|
+
return {
|
|
20130
|
+
push(frame) {
|
|
20131
|
+
if (disposed) return;
|
|
20132
|
+
if (pending && (pending.range.streamId !== frame.range.streamId || pending.range.toOffset !== frame.range.fromOffset || frame.range.toOffset - pending.range.fromOffset > OUTPUT_FRAME_MAX_BYTES)) flush();
|
|
20133
|
+
pending = pending ? {
|
|
20134
|
+
data: pending.data + frame.data,
|
|
20135
|
+
range: { ...pending.range, toOffset: frame.range.toOffset }
|
|
20136
|
+
} : frame;
|
|
20137
|
+
if (pending.range.toOffset - pending.range.fromOffset >= OUTPUT_FRAME_MAX_BYTES) flush();
|
|
20138
|
+
else if (!timer) {
|
|
20139
|
+
timer = setTimeout(flush, 16);
|
|
20140
|
+
timer.unref();
|
|
20141
|
+
}
|
|
20142
|
+
},
|
|
20143
|
+
flush,
|
|
20144
|
+
dispose() {
|
|
20145
|
+
disposed = true;
|
|
20146
|
+
pending = void 0;
|
|
20147
|
+
if (timer) clearTimeout(timer);
|
|
20148
|
+
timer = void 0;
|
|
20149
|
+
}
|
|
20150
|
+
};
|
|
20151
|
+
}
|
|
20152
|
+
|
|
20060
20153
|
// packages/pty-host/src/server.ts
|
|
20061
20154
|
var scopeSchema = external_exports.object({ kind: external_exports.enum(["stable", "dev"]), instanceId: external_exports.string().min(1), configRoot: external_exports.string().min(1) });
|
|
20062
20155
|
var targetSchema = external_exports.object({ hostInstanceId: external_exports.string().uuid(), sessionInstanceId: external_exports.string().uuid(), terminalSessionId: external_exports.string().min(1), generation: external_exports.number().int().positive() });
|
|
@@ -20131,7 +20224,7 @@ async function startHost(scope, release) {
|
|
|
20131
20224
|
...socketError instanceof HostTransportError ? { bufferedBytes: socketError.bufferedBytes, limitBytes: socketError.limitBytes } : {}
|
|
20132
20225
|
});
|
|
20133
20226
|
sockets.delete(socket);
|
|
20134
|
-
for (const
|
|
20227
|
+
for (const subscription of subscriptions.values()) subscription.dispose();
|
|
20135
20228
|
});
|
|
20136
20229
|
receiveJsonLines(socket, (message) => {
|
|
20137
20230
|
const parsed = wireSchema.safeParse(message);
|
|
@@ -20141,7 +20234,10 @@ async function startHost(scope, release) {
|
|
|
20141
20234
|
}
|
|
20142
20235
|
const request = parsed.data;
|
|
20143
20236
|
const startedAt = performance.now();
|
|
20144
|
-
const reply = (result) =>
|
|
20237
|
+
const reply = (result) => {
|
|
20238
|
+
for (const subscription of subscriptions.values()) subscription.flush();
|
|
20239
|
+
return sendJson(socket, { requestId: request.requestId, result });
|
|
20240
|
+
};
|
|
20145
20241
|
const fail = (error) => {
|
|
20146
20242
|
reportHostDiagnostic(writeHostDiagnostic, {
|
|
20147
20243
|
event: "pty-host.request.failed",
|
|
@@ -20254,30 +20350,48 @@ async function startHost(scope, release) {
|
|
|
20254
20350
|
return reply({ ok: true });
|
|
20255
20351
|
}
|
|
20256
20352
|
if (request.action === "attachSession") {
|
|
20257
|
-
subscriptions.get(session.info.terminalSessionId)?.();
|
|
20353
|
+
subscriptions.get(session.info.terminalSessionId)?.flush();
|
|
20354
|
+
subscriptions.get(session.info.terminalSessionId)?.dispose();
|
|
20258
20355
|
let ready = false;
|
|
20356
|
+
const batcher = createHostOutputBatcher((frame) => {
|
|
20357
|
+
sendJson(socket, {
|
|
20358
|
+
type: "output",
|
|
20359
|
+
terminalSessionId: session.info.terminalSessionId,
|
|
20360
|
+
data: frame.data,
|
|
20361
|
+
cursor: { streamId: frame.range.streamId, offset: frame.range.toOffset },
|
|
20362
|
+
range: frame.range
|
|
20363
|
+
});
|
|
20364
|
+
});
|
|
20259
20365
|
const output = (frame) => {
|
|
20260
|
-
if (ready)
|
|
20366
|
+
if (ready) batcher.push(frame);
|
|
20261
20367
|
};
|
|
20262
20368
|
const exited = (exitCode) => {
|
|
20369
|
+
batcher.flush();
|
|
20263
20370
|
sendJson(socket, { type: "exit", terminalSessionId: session.info.terminalSessionId, exitCode });
|
|
20264
20371
|
};
|
|
20265
20372
|
const resized = (cols, rows) => {
|
|
20266
|
-
if (ready)
|
|
20373
|
+
if (ready) {
|
|
20374
|
+
batcher.flush();
|
|
20375
|
+
sendJson(socket, { type: "resize", terminalSessionId: session.info.terminalSessionId, cols, rows, cursor: session.buffer.cursor });
|
|
20376
|
+
}
|
|
20267
20377
|
};
|
|
20268
20378
|
const launched = (launch2) => {
|
|
20269
|
-
if (ready)
|
|
20379
|
+
if (ready) {
|
|
20380
|
+
batcher.flush();
|
|
20381
|
+
sendJson(socket, { type: "launch", terminalSessionId: session.info.terminalSessionId, launch: launch2 });
|
|
20382
|
+
}
|
|
20270
20383
|
};
|
|
20271
20384
|
session.launchListeners.add(launched);
|
|
20272
20385
|
session.outputListeners.add(output);
|
|
20273
20386
|
session.exitListeners.add(exited);
|
|
20274
20387
|
session.resizeListeners.add(resized);
|
|
20275
|
-
subscriptions.set(session.info.terminalSessionId, ()
|
|
20388
|
+
subscriptions.set(session.info.terminalSessionId, { flush: batcher.flush, dispose() {
|
|
20389
|
+
batcher.dispose();
|
|
20276
20390
|
session.launchListeners.delete(launched);
|
|
20277
20391
|
session.outputListeners.delete(output);
|
|
20278
20392
|
session.exitListeners.delete(exited);
|
|
20279
20393
|
session.resizeListeners.delete(resized);
|
|
20280
|
-
});
|
|
20394
|
+
} });
|
|
20281
20395
|
const snapshot = await session.snapshot();
|
|
20282
20396
|
const tail = session.buffer.read(snapshot.cursor);
|
|
20283
20397
|
if (!tail.ok) throw new Error("HOST_OUTPUT_GAP");
|
package/payload/server/index.cjs
CHANGED
|
@@ -7350,9 +7350,9 @@ var import_node_fs = require("node:fs");
|
|
|
7350
7350
|
|
|
7351
7351
|
// packages/config-node/src/windows-permissions.ts
|
|
7352
7352
|
var import_node_child_process = require("node:child_process");
|
|
7353
|
-
|
|
7354
|
-
|
|
7355
|
-
|
|
7353
|
+
var import_node_util = require("node:util");
|
|
7354
|
+
var executeFile = (0, import_node_util.promisify)(import_node_child_process.execFile);
|
|
7355
|
+
var script = `
|
|
7356
7356
|
$ErrorActionPreference = 'Stop'
|
|
7357
7357
|
try {
|
|
7358
7358
|
# Use .NET directly: a parent pwsh may export a PSModulePath incompatible with Windows PowerShell.
|
|
@@ -7370,6 +7370,27 @@ foreach ($rule in $acl.GetAccessRules($true, $true, [Security.Principal.Security
|
|
|
7370
7370
|
[Console]::Write('check-failed:' + $_.Exception.GetType().FullName + ':' + $_.Exception.HResult)
|
|
7371
7371
|
}
|
|
7372
7372
|
`;
|
|
7373
|
+
function checkFailure(file, startedAt, cause) {
|
|
7374
|
+
const error = cause;
|
|
7375
|
+
const timedOut = error.code === "ETIMEDOUT" || error.killed === true && error.signal === "SIGTERM" && error.code == null;
|
|
7376
|
+
return new ConfigurationError(
|
|
7377
|
+
timedOut ? "CONFIG_WINDOWS_ACL_CHECK_TIMEOUT" : "CONFIG_WINDOWS_ACL_CHECK_FAILED",
|
|
7378
|
+
[
|
|
7379
|
+
file,
|
|
7380
|
+
`exit=${error.status ?? "none"}`,
|
|
7381
|
+
`signal=${error.signal ?? "none"}`,
|
|
7382
|
+
`code=${error.code ?? "none"}`,
|
|
7383
|
+
`elapsedMs=${Math.round(performance.now() - startedAt)}`
|
|
7384
|
+
]
|
|
7385
|
+
);
|
|
7386
|
+
}
|
|
7387
|
+
function assertResult(file, result) {
|
|
7388
|
+
if (result === "owner" || result === "access") throw new ConfigurationError("CONFIG_WINDOWS_ACL_NOT_PRIVATE", [file, result]);
|
|
7389
|
+
if (/^check-failed:[A-Za-z0-9_.]+:-?\d+$/.test(result)) throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, result]);
|
|
7390
|
+
if (result !== "private") throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, "invalid-result"]);
|
|
7391
|
+
}
|
|
7392
|
+
function assertWindowsPrivatePath(file) {
|
|
7393
|
+
if (process.platform !== "win32") return;
|
|
7373
7394
|
const startedAt = performance.now();
|
|
7374
7395
|
let result;
|
|
7375
7396
|
try {
|
|
@@ -7382,34 +7403,31 @@ foreach ($rule in $acl.GetAccessRules($true, $true, [Security.Principal.Security
|
|
|
7382
7403
|
windowsHide: true
|
|
7383
7404
|
}).trim();
|
|
7384
7405
|
} catch (cause) {
|
|
7385
|
-
|
|
7386
|
-
throw new ConfigurationError(
|
|
7387
|
-
error.code === "ETIMEDOUT" ? "CONFIG_WINDOWS_ACL_CHECK_TIMEOUT" : "CONFIG_WINDOWS_ACL_CHECK_FAILED",
|
|
7388
|
-
[
|
|
7389
|
-
file,
|
|
7390
|
-
`exit=${error.status ?? "none"}`,
|
|
7391
|
-
`signal=${error.signal ?? "none"}`,
|
|
7392
|
-
`code=${error.code ?? "none"}`,
|
|
7393
|
-
`elapsedMs=${Math.round(performance.now() - startedAt)}`
|
|
7394
|
-
]
|
|
7395
|
-
);
|
|
7406
|
+
throw checkFailure(file, startedAt, cause);
|
|
7396
7407
|
}
|
|
7397
|
-
|
|
7398
|
-
if (/^check-failed:[A-Za-z0-9_.]+:-?\d+$/.test(result)) throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, result]);
|
|
7399
|
-
if (result !== "private") throw new ConfigurationError("CONFIG_WINDOWS_ACL_CHECK_FAILED", [file, "invalid-result"]);
|
|
7408
|
+
assertResult(file, result);
|
|
7400
7409
|
}
|
|
7401
7410
|
|
|
7402
7411
|
// packages/config-node/src/private-file.ts
|
|
7403
|
-
function
|
|
7412
|
+
function privateDirectoryStat(directory) {
|
|
7404
7413
|
const stat = (0, import_node_fs.lstatSync)(directory);
|
|
7405
7414
|
if (!stat.isDirectory() || stat.isSymbolicLink() || process.platform !== "win32" && stat.mode & 63 || typeof process.getuid === "function" && stat.uid !== process.getuid()) throw new ConfigurationError("CONFIG_ROOT_PERMISSIONS_INVALID");
|
|
7406
|
-
|
|
7415
|
+
return stat;
|
|
7407
7416
|
}
|
|
7408
|
-
function
|
|
7417
|
+
function privateDescriptorStat(fd, maxBytes) {
|
|
7409
7418
|
const stat = (0, import_node_fs.fstatSync)(fd);
|
|
7410
7419
|
if (!stat.isFile() || stat.nlink !== 1) throw new ConfigurationError("CONFIG_FILE_NOT_PRIVATE_REGULAR");
|
|
7411
7420
|
if (typeof process.getuid === "function" && stat.uid !== process.getuid()) throw new ConfigurationError("CONFIG_FILE_OWNER_MISMATCH");
|
|
7412
7421
|
if (process.platform !== "win32" && stat.mode & 63) throw new ConfigurationError("CONFIG_FILE_PERMISSIONS_INVALID");
|
|
7422
|
+
if (stat.size > maxBytes) throw new ConfigurationError("CONFIG_FILE_TOO_LARGE");
|
|
7423
|
+
return stat;
|
|
7424
|
+
}
|
|
7425
|
+
function assertPrivateDirectory(directory) {
|
|
7426
|
+
privateDirectoryStat(directory);
|
|
7427
|
+
assertWindowsPrivatePath(directory);
|
|
7428
|
+
}
|
|
7429
|
+
function assertPrivateDescriptor(fd, maxBytes = 1024 * 1024, file) {
|
|
7430
|
+
const stat = privateDescriptorStat(fd, Infinity);
|
|
7413
7431
|
if (process.platform === "win32") {
|
|
7414
7432
|
if (!file) throw new ConfigurationError("CONFIG_PRIVATE_PATH_REQUIRED");
|
|
7415
7433
|
assertWindowsPrivatePath(file);
|
|
@@ -7500,6 +7518,8 @@ function assertOwnedPath(context, value) {
|
|
|
7500
7518
|
// packages/config-node/src/platform.ts
|
|
7501
7519
|
var import_node_child_process2 = require("node:child_process");
|
|
7502
7520
|
var import_node_fs3 = require("node:fs");
|
|
7521
|
+
var import_node_util2 = require("node:util");
|
|
7522
|
+
var executeFile2 = (0, import_node_util2.promisify)(import_node_child_process2.execFile);
|
|
7503
7523
|
function processStartIdentity(pid) {
|
|
7504
7524
|
if (!Number.isSafeInteger(pid) || pid < 1) return null;
|
|
7505
7525
|
try {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{U as a,M as n}from"./index-X6z9DRtr.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-BaJHFe6f.js";import{_ as i}from"./index-X6z9DRtr.js";import"./chunk-FMBD7UC4-D8EB4vd_.js";import"./chunk-YZCP3GAM-D76OSgAi.js";import"./chunk-55IACEB6-CBN94dv8.js";import"./chunk-EDXVE4YY-BTpbJ8AJ.js";import"./main-B5vSE7PX.js";import"./index-D9-cSGu-.js";import"./record-content-BQpFEpbH.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as a,c as s,a as e,C as t}from"./chunk-4TB4RGXK-BaJHFe6f.js";import{_ as i}from"./index-X6z9DRtr.js";import"./chunk-FMBD7UC4-D8EB4vd_.js";import"./chunk-YZCP3GAM-D76OSgAi.js";import"./chunk-55IACEB6-CBN94dv8.js";import"./chunk-EDXVE4YY-BTpbJ8AJ.js";import"./main-B5vSE7PX.js";import"./index-D9-cSGu-.js";import"./record-content-BQpFEpbH.js";var b={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{b as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as r}from"./graph-C3pGWAsG.js";var e=4;function a(o){return r(o,e)}export{a as c};
|