pinokiod 7.3.5 → 7.3.8
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/kernel/api/index.js +3 -2
- package/kernel/api/script/index.js +1 -0
- package/kernel/resource_usage/gpu.js +1078 -270
- package/kernel/resource_usage/index.js +9 -4
- package/package.json +2 -1
- package/server/index.js +14 -2
- package/server/public/nav.js +1 -1
- package/server/public/style.css +298 -191
- package/server/public/task-launcher.css +16 -20
- package/server/public/universal-launcher.css +0 -113
- package/server/public/universal-launcher.js +1 -1
- package/server/views/app.ejs +592 -298
- package/server/views/autolaunch.ejs +1 -1
- package/server/views/checkpoints.ejs +2 -6
- package/server/views/connect.ejs +1 -1
- package/server/views/explore.ejs +2 -1
- package/server/views/index.ejs +89 -60
- package/server/views/install.ejs +5 -7
- package/server/views/invalid_content.ejs +1 -1
- package/server/views/layout.ejs +8 -2
- package/server/views/logs.ejs +5 -27
- package/server/views/net.ejs +1 -1
- package/server/views/network.ejs +1 -1
- package/server/views/partials/fs_status.ejs +0 -8
- package/server/views/partials/main_sidebar.ejs +108 -44
- package/server/views/plugin_detail.ejs +1 -1
- package/server/views/plugins.ejs +1 -28
- package/server/views/screenshots.ejs +1 -1
- package/server/views/settings.ejs +2 -1
- package/server/views/setup.ejs +15 -1
- package/server/views/skills.ejs +1 -1
- package/server/views/task_builder.ejs +1 -1
- package/server/views/task_install.ejs +1 -1
- package/server/views/task_launch.ejs +1 -1
- package/server/views/task_list.ejs +1 -1
- package/server/views/tools.ejs +1 -1
- package/test/resource-usage-gpu.test.js +320 -70
- package/test/script-api.test.js +90 -0
|
@@ -55,8 +55,7 @@ class ResourceUsageService {
|
|
|
55
55
|
})
|
|
56
56
|
this.gpuSampler = new GpuSampler({
|
|
57
57
|
kernel: this.kernel,
|
|
58
|
-
ttlMs:
|
|
59
|
-
timeoutMs: 2500
|
|
58
|
+
ttlMs: 5000
|
|
60
59
|
})
|
|
61
60
|
this.cpuAverages = new Map()
|
|
62
61
|
this.workspaceCache = new Map()
|
|
@@ -76,6 +75,12 @@ class ResourceUsageService {
|
|
|
76
75
|
return preferences
|
|
77
76
|
}
|
|
78
77
|
|
|
78
|
+
stop() {
|
|
79
|
+
if (this.gpuSampler && typeof this.gpuSampler.stop === "function") {
|
|
80
|
+
this.gpuSampler.stop()
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
79
84
|
getShellRootGroups() {
|
|
80
85
|
if (!this.kernel || !this.kernel.shell || typeof this.kernel.path !== "function") {
|
|
81
86
|
return new Map()
|
|
@@ -243,8 +248,8 @@ class ResourceUsageService {
|
|
|
243
248
|
? await this.macFootprintSampler.getFootprintByPid(this.selectFootprintPids(allPids))
|
|
244
249
|
: null
|
|
245
250
|
|
|
246
|
-
const gpuSnapshot = preferences.show_vram && allPids.size > 0
|
|
247
|
-
? await this.gpuSampler.getSnapshot()
|
|
251
|
+
const gpuSnapshot = preferences.show_vram && this.platform !== "darwin" && allPids.size > 0
|
|
252
|
+
? await this.gpuSampler.getSnapshot(allPids)
|
|
248
253
|
: null
|
|
249
254
|
|
|
250
255
|
const nextCache = new Map()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "7.3.
|
|
3
|
+
"version": "7.3.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"key-store": "^1.2.0",
|
|
57
57
|
"kill-sync": "^1.0.3",
|
|
58
58
|
"kleur": "^4.1.5",
|
|
59
|
+
"koffi": "^3.0.2",
|
|
59
60
|
"lodash": "^4.17.21",
|
|
60
61
|
"marked": "^5.0.1",
|
|
61
62
|
"mime-types": "^2.1.35",
|
package/server/index.js
CHANGED
|
@@ -396,6 +396,9 @@ class Server {
|
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
398
|
stop() {
|
|
399
|
+
if (this.resourceUsage && typeof this.resourceUsage.stop === 'function') {
|
|
400
|
+
this.resourceUsage.stop()
|
|
401
|
+
}
|
|
399
402
|
this.server.close()
|
|
400
403
|
}
|
|
401
404
|
killProcessTree(pid, label) {
|
|
@@ -2924,7 +2927,12 @@ class Server {
|
|
|
2924
2927
|
}
|
|
2925
2928
|
}
|
|
2926
2929
|
if (pathComponents.length === 0 && req.query.mode === "explore") {
|
|
2930
|
+
const peerAccess = await this.composePeerAccessPayload()
|
|
2931
|
+
let list = this.getPeers()
|
|
2927
2932
|
res.render("explore", {
|
|
2933
|
+
current_host: this.kernel.peer.host,
|
|
2934
|
+
...peerAccess,
|
|
2935
|
+
list,
|
|
2928
2936
|
discover_dark: this.discover_dark,
|
|
2929
2937
|
discover_light: this.discover_light,
|
|
2930
2938
|
portal: this.portal,
|
|
@@ -5051,7 +5059,7 @@ class Server {
|
|
|
5051
5059
|
|
|
5052
5060
|
if (this.theme === "dark") {
|
|
5053
5061
|
this.colors = {
|
|
5054
|
-
color: "#
|
|
5062
|
+
color: "#1b1c1d",
|
|
5055
5063
|
// symbolColor: "white"
|
|
5056
5064
|
symbolColor: "#F4F4F4"
|
|
5057
5065
|
// color: "rgb(31, 29, 39)",
|
|
@@ -5060,7 +5068,7 @@ class Server {
|
|
|
5060
5068
|
} else {
|
|
5061
5069
|
this.colors = {
|
|
5062
5070
|
//color: "white",
|
|
5063
|
-
color: "#
|
|
5071
|
+
color: "#ffffff",
|
|
5064
5072
|
// color: "#F5F4FA",
|
|
5065
5073
|
symbolColor: "#000000",
|
|
5066
5074
|
}
|
|
@@ -13537,6 +13545,7 @@ class Server {
|
|
|
13537
13545
|
}
|
|
13538
13546
|
|
|
13539
13547
|
let current = req.query.callback || req.originalUrl
|
|
13548
|
+
const peerAccess = await this.composePeerAccessPayload()
|
|
13540
13549
|
|
|
13541
13550
|
// console.log("2", { requirements_pending, install_required })
|
|
13542
13551
|
// if (!requirements_pending && !install_required) {
|
|
@@ -13546,6 +13555,9 @@ class Server {
|
|
|
13546
13555
|
// }
|
|
13547
13556
|
//
|
|
13548
13557
|
res.render("setup", {
|
|
13558
|
+
current_host: this.kernel.peer.host,
|
|
13559
|
+
...peerAccess,
|
|
13560
|
+
list: this.getPeers(),
|
|
13549
13561
|
mode: req.params.mode,
|
|
13550
13562
|
wait,
|
|
13551
13563
|
error,
|
package/server/public/nav.js
CHANGED
|
@@ -25,7 +25,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
const headerMinimizeEnabled = !!minimizeButton;
|
|
28
|
+
const headerMinimizeEnabled = !!minimizeButton && minimizeButton.dataset.mainSidebarHeaderToggle !== "true";
|
|
29
29
|
if (!headerMinimizeEnabled) {
|
|
30
30
|
header.classList.remove("minimized", "transitioning");
|
|
31
31
|
}
|