pinokiod 7.3.1 → 7.3.3
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/github/index.js +444 -0
- package/kernel/api/index.js +199 -11
- package/kernel/api/process/index.js +124 -44
- package/kernel/api/shell_run_template.js +273 -0
- package/kernel/api/uri/index.js +51 -0
- package/kernel/bin/git.js +9 -10
- package/kernel/bin/huggingface.js +1 -1
- package/kernel/bin/zip.js +9 -1
- package/kernel/connect/providers/github/README.md +5 -4
- package/kernel/environment.js +195 -92
- package/kernel/git.js +98 -19
- package/kernel/gitconfig_template +7 -0
- package/kernel/gpu/amd.js +72 -0
- package/kernel/gpu/apple.js +8 -0
- package/kernel/gpu/common.js +12 -0
- package/kernel/gpu/intel.js +47 -0
- package/kernel/gpu/nvidia.js +8 -0
- package/kernel/index.js +11 -1
- package/kernel/managed_skills.js +871 -0
- package/kernel/plugin.js +6 -58
- package/kernel/plugin_sources.js +316 -0
- package/kernel/resource_usage/gpu.js +349 -0
- package/kernel/resource_usage/index.js +322 -0
- package/kernel/resource_usage/macos_footprint.js +197 -0
- package/kernel/resource_usage/preferences.js +92 -0
- package/kernel/resource_usage/process_tree.js +303 -0
- package/kernel/scripts/git/create +4 -4
- package/kernel/scripts/git/fork +7 -8
- package/kernel/shell.js +23 -2
- package/kernel/shells.js +41 -0
- package/kernel/sysinfo.js +62 -9
- package/kernel/util.js +60 -0
- package/package.json +1 -1
- package/server/index.js +984 -156
- package/server/lib/app_log_report.js +543 -0
- package/server/lib/content_validation.js +55 -33
- package/server/lib/launcher_instruction_bootstrap.js +4 -96
- package/server/lib/terminal_session_helpers.js +0 -3
- package/server/public/common.js +77 -31
- package/server/public/create-launcher.js +4 -32
- package/server/public/logs.js +1428 -0
- package/server/public/nav.js +7 -0
- package/server/public/plugin-detail.js +93 -10
- package/server/public/privacy_filter_worker.js +391 -0
- package/server/public/style.css +1104 -154
- package/server/public/task-launcher.js +8 -29
- package/server/public/universal-launcher.css +8 -6
- package/server/public/universal-launcher.js +3 -27
- package/server/routes/apps.js +195 -1
- package/server/views/app.ejs +3041 -717
- package/server/views/autolaunch.ejs +917 -0
- package/server/views/bootstrap.ejs +7 -1
- package/server/views/d.ejs +408 -65
- package/server/views/editor.ejs +85 -19
- package/server/views/index.ejs +661 -111
- package/server/views/init/index.ejs +1 -1
- package/server/views/install.ejs +1 -1
- package/server/views/logs.ejs +164 -86
- package/server/views/net.ejs +7 -1
- package/server/views/partials/d_terminal_column.ejs +2 -2
- package/server/views/partials/d_terminal_options.ejs +0 -8
- package/server/views/partials/fs_status.ejs +47 -0
- package/server/views/partials/home_action_modal.ejs +86 -0
- package/server/views/partials/home_run_menu.ejs +87 -0
- package/server/views/partials/main_sidebar.ejs +2 -0
- package/server/views/partials/menu.ejs +1 -1
- package/server/views/plugin_detail.ejs +19 -4
- package/server/views/plugins.ejs +201 -3
- package/server/views/pre.ejs +1 -1
- package/server/views/pro.ejs +1 -1
- package/server/views/shell.ejs +40 -18
- package/server/views/skills.ejs +506 -0
- package/server/views/terminal.ejs +45 -19
- package/spec/INSTRUCTION_SYNC.md +20 -10
- package/system/plugin/antigravity-cli/antigravity.png +0 -0
- package/system/plugin/antigravity-cli/common.js +155 -0
- package/system/plugin/antigravity-cli/install.js +272 -0
- package/system/plugin/antigravity-cli/pinokio.js +13 -0
- package/system/plugin/antigravity-cli-auto/antigravity.png +0 -0
- package/system/plugin/antigravity-cli-auto/pinokio.js +13 -0
- package/system/plugin/claude/claude.png +0 -0
- package/system/plugin/claude/pinokio.js +47 -0
- package/system/plugin/claude-auto/claude.png +0 -0
- package/system/plugin/claude-auto/pinokio.js +58 -0
- package/system/plugin/claude-desktop/icon.jpeg +0 -0
- package/system/plugin/claude-desktop/pinokio.js +23 -0
- package/system/plugin/codex/openai.webp +0 -0
- package/system/plugin/codex/pinokio.js +42 -0
- package/system/plugin/codex-auto/openai.webp +0 -0
- package/system/plugin/codex-auto/pinokio.js +49 -0
- package/system/plugin/codex-desktop/icon.png +0 -0
- package/system/plugin/codex-desktop/pinokio.js +23 -0
- package/system/plugin/crush/crush.png +0 -0
- package/system/plugin/crush/pinokio.js +15 -0
- package/system/plugin/cursor/cursor.jpeg +0 -0
- package/system/plugin/cursor/pinokio.js +23 -0
- package/system/plugin/qwen/pinokio.js +34 -0
- package/system/plugin/qwen/qwen.png +0 -0
- package/system/plugin/vscode/pinokio.js +20 -0
- package/system/plugin/vscode/vscode.png +0 -0
- package/system/plugin/windsurf/pinokio.js +23 -0
- package/system/plugin/windsurf/windsurf.png +0 -0
- package/test/antigravity-cli-plugin.test.js +185 -0
- package/test/app-api.test.js +239 -0
- package/test/app-log-report.test.js +67 -0
- package/test/environment-cache-preflight.test.js +98 -0
- package/test/git-bin.test.js +59 -0
- package/test/git-defaults.test.js +97 -0
- package/test/github-api.test.js +158 -0
- package/test/github-connection.test.js +117 -0
- package/test/huggingface-bin.test.js +25 -0
- package/test/managed-skills.test.js +351 -0
- package/test/plugin-action-functions.test.js +337 -0
- package/test/plugin-dev-iframe.test.js +17 -0
- package/test/plugin-sources.test.js +203 -0
- package/test/privacy-filter-worker-heuristics.test.js +69 -0
- package/test/process-wait.test.js +169 -0
- package/test/script-api.test.js +97 -0
- package/test/shell-api.test.js +134 -0
- package/test/shell-run-template.test.js +209 -0
- package/test/storage-api.test.js +137 -0
- package/test/uri-api.test.js +100 -0
package/server/views/editor.ejs
CHANGED
|
@@ -143,6 +143,7 @@ body.frozen {
|
|
|
143
143
|
<script>
|
|
144
144
|
let shell_id
|
|
145
145
|
document.addEventListener("DOMContentLoaded", async () => {
|
|
146
|
+
const readOnly = <%= readonly ? "true" : "false" %>;
|
|
146
147
|
<% if (error) { %>
|
|
147
148
|
document.querySelector(".requirements .content").innerHTML = '<div class="loading"><i class="fa-solid fa-circle-exclamation"></i> <%=error%></div>'
|
|
148
149
|
<% } %>
|
|
@@ -195,6 +196,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
195
196
|
// maxLines: Infinity, // set to a large number
|
|
196
197
|
minLines: 1 // set to a small number
|
|
197
198
|
});
|
|
199
|
+
editor.setReadOnly(readOnly);
|
|
198
200
|
console.log("location.pathname", location.pathname)
|
|
199
201
|
<% if (mod) { %>
|
|
200
202
|
<% if (js) { %>
|
|
@@ -231,6 +233,9 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
231
233
|
let str;
|
|
232
234
|
let original = editor.getValue()
|
|
233
235
|
editor.getSession().on("change", () => {
|
|
236
|
+
if (readOnly) {
|
|
237
|
+
return
|
|
238
|
+
}
|
|
234
239
|
let v = editor.getValue()
|
|
235
240
|
if (original === v) {
|
|
236
241
|
dirty = false
|
|
@@ -243,6 +248,70 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
243
248
|
});
|
|
244
249
|
<% } %>
|
|
245
250
|
const n = new N()
|
|
251
|
+
const postMessageToAncestors = (payload) => {
|
|
252
|
+
if (!payload || typeof payload !== "object") {
|
|
253
|
+
return false
|
|
254
|
+
}
|
|
255
|
+
if (typeof window !== "undefined" && typeof window.PinokioBroadcastMessage === "function") {
|
|
256
|
+
try {
|
|
257
|
+
if (window.PinokioBroadcastMessage(payload, "*", window)) {
|
|
258
|
+
return true
|
|
259
|
+
}
|
|
260
|
+
} catch (_) {}
|
|
261
|
+
}
|
|
262
|
+
const targets = new Set()
|
|
263
|
+
try {
|
|
264
|
+
if (window.parent && window.parent !== window && typeof window.parent.postMessage === "function") {
|
|
265
|
+
targets.add(window.parent)
|
|
266
|
+
}
|
|
267
|
+
} catch (_) {}
|
|
268
|
+
try {
|
|
269
|
+
if (window.top && window.top !== window && typeof window.top.postMessage === "function") {
|
|
270
|
+
targets.add(window.top)
|
|
271
|
+
}
|
|
272
|
+
} catch (_) {}
|
|
273
|
+
let dispatched = false
|
|
274
|
+
targets.forEach((target) => {
|
|
275
|
+
try {
|
|
276
|
+
target.postMessage(payload, "*")
|
|
277
|
+
dispatched = true
|
|
278
|
+
} catch (_) {}
|
|
279
|
+
})
|
|
280
|
+
return dispatched
|
|
281
|
+
}
|
|
282
|
+
const openAppLogsForError = (packet) => {
|
|
283
|
+
return postMessageToAncestors({
|
|
284
|
+
e: "pinokio:logs-new",
|
|
285
|
+
type: "pinokio:logs-new",
|
|
286
|
+
reason: "error",
|
|
287
|
+
frame: window.name || null,
|
|
288
|
+
source: "editor"
|
|
289
|
+
})
|
|
290
|
+
}
|
|
291
|
+
const showErrorScreen = (packet) => {
|
|
292
|
+
const errorScreen = document.querySelector("#error-screen")
|
|
293
|
+
const errorOutput = errorScreen ? errorScreen.querySelector("pre") : null
|
|
294
|
+
if (!errorScreen || !errorOutput) {
|
|
295
|
+
return
|
|
296
|
+
}
|
|
297
|
+
errorScreen.classList.remove("hidden")
|
|
298
|
+
errorOutput.textContent = packet && packet.data ? packet.data : ""
|
|
299
|
+
let instance = new Mark(errorOutput, {
|
|
300
|
+
separateWordSearch: false,
|
|
301
|
+
accuracy: "exactly"
|
|
302
|
+
})
|
|
303
|
+
if (packet && packet.event) {
|
|
304
|
+
instance.mark(packet.event)
|
|
305
|
+
let element = errorScreen.querySelector("mark")
|
|
306
|
+
if (element) {
|
|
307
|
+
element.scrollIntoView({ behavior: "smooth", block: "center" })
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const activeProcessWait = <% if (typeof active_process_wait !== 'undefined' && active_process_wait) { %><%- JSON.stringify(active_process_wait) %><% } else { %>null<% } %>
|
|
312
|
+
if (activeProcessWait && (activeProcessWait.title || activeProcessWait.description || activeProcessWait.message) && window.PinokioWaitFooterStatus) {
|
|
313
|
+
window.PinokioWaitFooterStatus.show(activeProcessWait)
|
|
314
|
+
}
|
|
246
315
|
class RPC {
|
|
247
316
|
constructor() {
|
|
248
317
|
this.socket = new Socket()
|
|
@@ -275,6 +344,10 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
275
344
|
}
|
|
276
345
|
save() {
|
|
277
346
|
return new Promise((resolve, reject) => {
|
|
347
|
+
if (readOnly) {
|
|
348
|
+
resolve()
|
|
349
|
+
return
|
|
350
|
+
}
|
|
278
351
|
let cwd = "<%-JSON.stringify(execUrl).slice(1, -1)%>"
|
|
279
352
|
//let cwd = "<%=execUrl%>"
|
|
280
353
|
//let cwd = "~" + location.pathname
|
|
@@ -432,6 +505,14 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
432
505
|
response: {},
|
|
433
506
|
uri: packet.id
|
|
434
507
|
})
|
|
508
|
+
} else if (packet.type === "process.wait.start") {
|
|
509
|
+
if (window.PinokioWaitFooterStatus) {
|
|
510
|
+
window.PinokioWaitFooterStatus.show(packet.data)
|
|
511
|
+
}
|
|
512
|
+
} else if (packet.type === "process.wait.end") {
|
|
513
|
+
if (window.PinokioWaitFooterStatus) {
|
|
514
|
+
window.PinokioWaitFooterStatus.hide()
|
|
515
|
+
}
|
|
435
516
|
} else if (packet.type === 'wait') {
|
|
436
517
|
await WaitModal(packet.data)
|
|
437
518
|
} else if (packet.type === "htmlmodal") {
|
|
@@ -603,23 +684,8 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
603
684
|
document.querySelector(".run .starting").classList.add("hidden")
|
|
604
685
|
document.querySelector(".run .stop").classList.add("hidden")
|
|
605
686
|
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
let instance = new Mark(document.querySelector("#error-screen pre"), {
|
|
609
|
-
separateWordSearch: false,
|
|
610
|
-
accuracy: "exactly"
|
|
611
|
-
})
|
|
612
|
-
/*
|
|
613
|
-
document.querySelector("#error-screen").addEventListener("click", (e) => {
|
|
614
|
-
document.querySelector("#error-screen").classList.add("hidden")
|
|
615
|
-
})
|
|
616
|
-
*/
|
|
617
|
-
if (packet.event) {
|
|
618
|
-
instance.mark(packet.event)
|
|
619
|
-
let element = document.querySelector("#error-screen mark")
|
|
620
|
-
if (element) {
|
|
621
|
-
element.scrollIntoView({ behavior: "smooth", block: "center" })
|
|
622
|
-
}
|
|
687
|
+
if (!openAppLogsForError(packet)) {
|
|
688
|
+
showErrorScreen(packet)
|
|
623
689
|
}
|
|
624
690
|
|
|
625
691
|
} else if (packet.type === "event") {
|
|
@@ -734,7 +800,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
734
800
|
term.loadAddon(fitAddon);
|
|
735
801
|
<% if (agent === "electron") { %>
|
|
736
802
|
term.loadAddon(new WebLinksAddon.WebLinksAddon((event, uri) => {
|
|
737
|
-
window.open(uri, "_blank")
|
|
803
|
+
window.open(uri, "_blank", "browser")
|
|
738
804
|
}))
|
|
739
805
|
<% } else { %>
|
|
740
806
|
term.loadAddon(new WebLinksAddon.WebLinksAddon());
|
|
@@ -959,7 +1025,7 @@ const reloadMemory = async () => {
|
|
|
959
1025
|
<!--
|
|
960
1026
|
<button class='btn' id='source' data-editor-url="<%=editorUrl%>">Navigate</button>
|
|
961
1027
|
-->
|
|
962
|
-
<div id='save' class='btn disabled'>
|
|
1028
|
+
<div id='save' class='btn disabled <%= readonly ? "hidden" : "" %>'>
|
|
963
1029
|
<span class='save'><i class="fa-solid fa-check"></i> Save</span>
|
|
964
1030
|
</div>
|
|
965
1031
|
</div>
|