querysub 0.450.0 → 0.452.0
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/.claude/settings.local.json +6 -1
- package/bin/join-public.js +1 -0
- package/package.json +1 -1
- package/src/-a-archives/archiveCache.ts +53 -597
- package/src/-g-core-values/NodeCapabilities.ts +29 -28
- package/src/0-path-value-core/archiveLocks/ArchiveLocks2.ts +24 -0
- package/src/0-path-value-core/pathValueArchives.ts +28 -7
- package/src/0-path-value-core/pathValueCore.ts +1 -1
- package/src/2-proxy/PathValueProxyWatcher.ts +6 -6
- package/src/archiveapps/archiveGCEntry.tsx +1 -0
- package/src/archiveapps/archiveJoinEntry.ts +8 -2
- package/src/deployManager/LaunchTrackingHeader.tsx +69 -0
- package/src/deployManager/machineApplyMainCode.ts +46 -15
- package/src/deployManager/machineSchema.ts +82 -1
- package/src/diagnostics/NodeConnectionsPage.tsx +1 -1
- package/src/diagnostics/NodeViewer.tsx +15 -25
- package/src/diagnostics/debugger/mcp-server.ts +3 -3
- package/src/diagnostics/logs/IndexedLogs/IndexedLogs.ts +2 -2
- package/src/diagnostics/logs/IndexedLogs/MCPIndexedLogs.ts +64 -22
- package/src/diagnostics/logs/IndexedLogs/MCPIndexedLogsEntry.ts +32 -1
- package/src/diagnostics/managementPages.tsx +16 -0
- package/src/diagnostics/misc-pages/AuthoritySpecPage.tsx +112 -0
- package/src/diagnostics/pathAuditer.ts +0 -6
- package/test.ts +2 -1
- package/src/misc/getParentProcessId.cs +0 -53
- package/src/misc/getParentProcessId.ts +0 -53
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import fs from "fs";
|
|
2
|
-
|
|
3
|
-
import { lazy } from "socket-function/src/caching";
|
|
4
|
-
import { runInSerial } from "socket-function/src/batching";
|
|
5
|
-
import child_process from "child_process";
|
|
6
|
-
import os from "os";
|
|
7
|
-
import readline from "readline";
|
|
8
|
-
import net from "net";
|
|
9
|
-
|
|
10
|
-
const windowsGetPPID = lazy(async () => {
|
|
11
|
-
const powershellProcess = child_process.spawn("powershell.exe", [
|
|
12
|
-
"-NoProfile",
|
|
13
|
-
"-NonInteractive",
|
|
14
|
-
"-Command",
|
|
15
|
-
"-",
|
|
16
|
-
], { stdio: ["pipe", "pipe", "pipe"] });
|
|
17
|
-
powershellProcess.stderr.pipe(process.stderr);
|
|
18
|
-
// powershellProcess.stdout.pipe(process.stdout);
|
|
19
|
-
|
|
20
|
-
powershellProcess.on("error", (error) => {
|
|
21
|
-
console.error("Failed to spawn powershell process", error);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
powershellProcess.stdin.write(`$inject = Get-Content -Raw -Path ${JSON.stringify(__dirname + "/getParentProcessId.cs")};\n`);
|
|
25
|
-
powershellProcess.stdin.write(`Add-Type -TypeDefinition $inject\n`);
|
|
26
|
-
|
|
27
|
-
return runInSerial((pid: number): Promise<number> => {
|
|
28
|
-
return new Promise((resolve) => {
|
|
29
|
-
powershellProcess.stdin.write(`[PPIDService]::GetParentProcessId(${pid})\n`);
|
|
30
|
-
powershellProcess.stdout.once("data", (data) => {
|
|
31
|
-
resolve(parseInt(data.toString()) || 0);
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export async function getPPID(pid: number): Promise<number> {
|
|
38
|
-
const platform = os.platform();
|
|
39
|
-
if (platform === "win32") {
|
|
40
|
-
let getPPID = await windowsGetPPID();
|
|
41
|
-
return getPPID(pid);
|
|
42
|
-
} else if (platform === "darwin" || platform === "linux") {
|
|
43
|
-
try {
|
|
44
|
-
const statContent = await fs.promises.readFile(`/proc/${pid}/stat`, "utf8");
|
|
45
|
-
const ppid = parseInt(statContent.split(" ")[3], 10);
|
|
46
|
-
return isNaN(ppid) ? 0 : ppid;
|
|
47
|
-
} catch (error) {
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
51
|
-
throw new Error("Unsupported operating system");
|
|
52
|
-
}
|
|
53
|
-
}
|