@xmoon76/dsh-pi-tui 0.5.4 → 0.5.6
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/README.en.md +46 -42
- package/README.md +46 -27
- package/cordis.patch.yml +77 -7
- package/dist/bootstrap-DQ4YPL-7.mjs +113583 -0
- package/dist/builtins.mjs +3 -9
- package/dist/{runtime-vc4mdr-R.mjs → client-bootstrap-Cr1JCaF5.mjs} +3670 -2277
- package/dist/disposal-BYBbEpVY.mjs +54 -0
- package/dist/dist-CIsR7cz4.mjs +15717 -0
- package/dist/{entry-control-DvSrndWd.mjs → entry-control-DnduyDiw.mjs} +12 -31
- package/dist/{extensions-CcuMY4n2.mjs → extensions-Bp0L37lP.mjs} +1239 -271
- package/dist/extensions.mjs +1 -1
- package/dist/host-bootstrap-DilsvA6f.mjs +281 -0
- package/dist/host-foundation-probe--5jtvHVe.mjs +413 -0
- package/dist/host-runtime.d.mts +30 -0
- package/dist/host-runtime.mjs +1317 -0
- package/dist/index.d.mts +19 -18
- package/dist/index.mjs +18410 -8836
- package/dist/local-client.mjs +2027 -187
- package/dist/local-discovery-C9VMjc0K.mjs +759 -0
- package/dist/local-discovery-CDaQHA_R.mjs +2 -0
- package/dist/local-host.mjs +1088 -87
- package/dist/local-transport-BVwFYq_Y.mjs +513 -0
- package/dist/{context-summary-DAisTA_7.mjs → pasted-path-range-CMnxuGPx.mjs} +7613 -216
- package/dist/pasted-path-range-r6qzV_tC.mjs +17510 -0
- package/dist/performance-host.d.mts +2 -2
- package/dist/performance-host.mjs +258 -1
- package/dist/pi-tui-remote-contribution-B0EQsP0N.mjs +85 -0
- package/dist/pi-tui-terminal-progress-contract-CdBH9j78.mjs +70 -0
- package/dist/pi-tui-terminal-progress-contract-MLXZ-i3t.mjs +905 -0
- package/dist/pi-tui-web-access-contract-BN8Cc_Ho.mjs +118 -0
- package/dist/{runtime-status-0lp9CM0V.mjs → runtime-status-Cj1nFOdS.mjs} +72 -214
- package/dist/session-BKGXyh80.mjs +15794 -0
- package/dist/{session-tdJHLnJR.mjs → session-CPt_U8_f.mjs} +10707 -3657
- package/dist/{startup-JaVZoTIl.mjs → startup-7BYWuvBU.mjs} +124 -8
- package/dist/startup.d.mts +1 -1
- package/dist/startup.mjs +1 -1
- package/dist/{client-bootstrap-F5DHFI9t.mjs → terminal-progress-source-DrqQhtT8.mjs} +3653 -2969
- package/dist/visual-tools.d.mts +2 -2
- package/dist/visual-tools.mjs +26 -31
- package/dist/web-preferences.d.mts +29 -0
- package/dist/web-preferences.mjs +15 -0
- package/dist/web-roster-CjqnUXNk.mjs +285 -0
- package/generated/dsh-presets/cordis.patch.yml +5 -3
- package/generated/dsh-presets/ptc.patch.yml +7 -7
- package/generated/dsh-presets/standard.patch.yml +6 -4
- package/package.json +195 -172
- package/dist/host-bootstrap-DAgKknbY.mjs +0 -119
- package/dist/performance-host-CcDJjjVA.mjs +0 -266
- package/dist/rolldown-runtime-8H4AJuhK.mjs +0 -14
- package/dist/terminal-progress-source-xor3vakJ.mjs +0 -2256
|
@@ -1,35 +1,16 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
2
1
|
//#region src/app/remote-process/entry-control.ts
|
|
3
|
-
/**
|
|
4
|
-
|
|
5
|
-
*
|
|
6
|
-
* The two process entries are internal qualification surfaces, not public
|
|
7
|
-
* commands: a launcher starts one OS process per role and drives it with
|
|
8
|
-
* newline-delimited JSON on stdin, while the process reports structured JSON
|
|
9
|
-
* lines on stdout. This module owns only that protocol and the Linux process
|
|
10
|
-
* start identity; it carries no application state.
|
|
11
|
-
*
|
|
12
|
-
* @module app/remote-process/entry-control
|
|
13
|
-
*/
|
|
14
|
-
/** One structured line emitted by a process entry. */
|
|
15
|
-
function writeEntryRecord(record) {
|
|
2
|
+
/** The default JSONL sink: the qualification control channel on stdout. */
|
|
3
|
+
const stdoutRecordSink = (record) => {
|
|
16
4
|
process.stdout.write(`${JSON.stringify(record)}\n`);
|
|
5
|
+
};
|
|
6
|
+
/** One structured line emitted by a process entry. */
|
|
7
|
+
function writeEntryRecord(record, sink = stdoutRecordSink) {
|
|
8
|
+
sink(record);
|
|
17
9
|
}
|
|
18
|
-
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
function readProcessStartIdentity(pid = process.pid) {
|
|
24
|
-
try {
|
|
25
|
-
const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
26
|
-
return stat.slice(stat.lastIndexOf(")") + 2).trim().split(/\s+/)[19];
|
|
27
|
-
} catch {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/** A role-labelled structured diagnostics sink for the entry's detached work. */
|
|
32
|
-
function createEntryDiag(processRole) {
|
|
10
|
+
/** A role-labelled structured diagnostics sink for the entry's detached work.
|
|
11
|
+
* The surface entry supplies its private JSONL file sink; the qualification
|
|
12
|
+
* entries keep the default stdout control channel. */
|
|
13
|
+
function createEntryDiag(processRole, sink) {
|
|
33
14
|
const emit = (level) => (message, fields) => {
|
|
34
15
|
writeEntryRecord({
|
|
35
16
|
m4a0: "diag",
|
|
@@ -37,7 +18,7 @@ function createEntryDiag(processRole) {
|
|
|
37
18
|
level,
|
|
38
19
|
message,
|
|
39
20
|
...fields
|
|
40
|
-
});
|
|
21
|
+
}, sink);
|
|
41
22
|
};
|
|
42
23
|
return {
|
|
43
24
|
debug: emit("debug"),
|
|
@@ -108,4 +89,4 @@ function attachEntryControl(handler) {
|
|
|
108
89
|
});
|
|
109
90
|
}
|
|
110
91
|
//#endregion
|
|
111
|
-
export {
|
|
92
|
+
export { createEntryDiag as n, writeEntryRecord as r, attachEntryControl as t };
|