pinokiod 7.3.1 → 7.3.4

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.
Files changed (122) hide show
  1. package/kernel/api/github/index.js +444 -0
  2. package/kernel/api/index.js +199 -11
  3. package/kernel/api/process/index.js +124 -44
  4. package/kernel/api/shell_run_template.js +273 -0
  5. package/kernel/api/uri/index.js +51 -0
  6. package/kernel/bin/git.js +9 -10
  7. package/kernel/bin/huggingface.js +1 -1
  8. package/kernel/bin/zip.js +9 -1
  9. package/kernel/connect/providers/github/README.md +5 -4
  10. package/kernel/environment.js +195 -92
  11. package/kernel/git.js +126 -19
  12. package/kernel/gitconfig_template +7 -0
  13. package/kernel/gpu/amd.js +72 -0
  14. package/kernel/gpu/apple.js +8 -0
  15. package/kernel/gpu/common.js +12 -0
  16. package/kernel/gpu/intel.js +47 -0
  17. package/kernel/gpu/nvidia.js +8 -0
  18. package/kernel/index.js +11 -1
  19. package/kernel/managed_skills.js +871 -0
  20. package/kernel/plugin.js +6 -58
  21. package/kernel/plugin_sources.js +316 -0
  22. package/kernel/resource_usage/gpu.js +349 -0
  23. package/kernel/resource_usage/index.js +322 -0
  24. package/kernel/resource_usage/macos_footprint.js +197 -0
  25. package/kernel/resource_usage/preferences.js +92 -0
  26. package/kernel/resource_usage/process_tree.js +303 -0
  27. package/kernel/scripts/git/create +4 -4
  28. package/kernel/scripts/git/fork +7 -8
  29. package/kernel/shell.js +23 -2
  30. package/kernel/shells.js +41 -0
  31. package/kernel/sysinfo.js +62 -9
  32. package/kernel/util.js +60 -0
  33. package/package.json +1 -1
  34. package/server/index.js +984 -156
  35. package/server/lib/app_log_report.js +543 -0
  36. package/server/lib/content_validation.js +55 -33
  37. package/server/lib/launcher_instruction_bootstrap.js +4 -96
  38. package/server/lib/terminal_session_helpers.js +0 -3
  39. package/server/public/common.js +77 -31
  40. package/server/public/create-launcher.js +4 -32
  41. package/server/public/logs.js +1428 -0
  42. package/server/public/nav.js +7 -0
  43. package/server/public/plugin-detail.js +93 -10
  44. package/server/public/privacy_filter_worker.js +391 -0
  45. package/server/public/style.css +1104 -154
  46. package/server/public/task-launcher.js +8 -29
  47. package/server/public/universal-launcher.css +8 -6
  48. package/server/public/universal-launcher.js +3 -27
  49. package/server/routes/apps.js +195 -1
  50. package/server/views/app.ejs +3041 -717
  51. package/server/views/autolaunch.ejs +917 -0
  52. package/server/views/bootstrap.ejs +7 -1
  53. package/server/views/d.ejs +408 -65
  54. package/server/views/editor.ejs +85 -19
  55. package/server/views/index.ejs +661 -111
  56. package/server/views/init/index.ejs +1 -1
  57. package/server/views/install.ejs +1 -1
  58. package/server/views/logs.ejs +164 -86
  59. package/server/views/net.ejs +7 -1
  60. package/server/views/partials/d_terminal_column.ejs +2 -2
  61. package/server/views/partials/d_terminal_options.ejs +0 -8
  62. package/server/views/partials/fs_status.ejs +47 -0
  63. package/server/views/partials/home_action_modal.ejs +86 -0
  64. package/server/views/partials/home_run_menu.ejs +87 -0
  65. package/server/views/partials/main_sidebar.ejs +2 -0
  66. package/server/views/partials/menu.ejs +1 -1
  67. package/server/views/plugin_detail.ejs +19 -4
  68. package/server/views/plugins.ejs +201 -3
  69. package/server/views/pre.ejs +1 -1
  70. package/server/views/pro.ejs +1 -1
  71. package/server/views/shell.ejs +40 -18
  72. package/server/views/skills.ejs +506 -0
  73. package/server/views/terminal.ejs +45 -19
  74. package/spec/INSTRUCTION_SYNC.md +20 -10
  75. package/system/plugin/antigravity-cli/antigravity.png +0 -0
  76. package/system/plugin/antigravity-cli/common.js +155 -0
  77. package/system/plugin/antigravity-cli/install.js +272 -0
  78. package/system/plugin/antigravity-cli/pinokio.js +13 -0
  79. package/system/plugin/antigravity-cli-auto/antigravity.png +0 -0
  80. package/system/plugin/antigravity-cli-auto/pinokio.js +13 -0
  81. package/system/plugin/claude/claude.png +0 -0
  82. package/system/plugin/claude/pinokio.js +47 -0
  83. package/system/plugin/claude-auto/claude.png +0 -0
  84. package/system/plugin/claude-auto/pinokio.js +58 -0
  85. package/system/plugin/claude-desktop/icon.jpeg +0 -0
  86. package/system/plugin/claude-desktop/pinokio.js +23 -0
  87. package/system/plugin/codex/openai.webp +0 -0
  88. package/system/plugin/codex/pinokio.js +42 -0
  89. package/system/plugin/codex-auto/openai.webp +0 -0
  90. package/system/plugin/codex-auto/pinokio.js +49 -0
  91. package/system/plugin/codex-desktop/icon.png +0 -0
  92. package/system/plugin/codex-desktop/pinokio.js +23 -0
  93. package/system/plugin/crush/crush.png +0 -0
  94. package/system/plugin/crush/pinokio.js +15 -0
  95. package/system/plugin/cursor/cursor.jpeg +0 -0
  96. package/system/plugin/cursor/pinokio.js +23 -0
  97. package/system/plugin/qwen/pinokio.js +34 -0
  98. package/system/plugin/qwen/qwen.png +0 -0
  99. package/system/plugin/vscode/pinokio.js +20 -0
  100. package/system/plugin/vscode/vscode.png +0 -0
  101. package/system/plugin/windsurf/pinokio.js +23 -0
  102. package/system/plugin/windsurf/windsurf.png +0 -0
  103. package/test/antigravity-cli-plugin.test.js +185 -0
  104. package/test/app-api.test.js +239 -0
  105. package/test/app-log-report.test.js +67 -0
  106. package/test/environment-cache-preflight.test.js +98 -0
  107. package/test/git-bin.test.js +59 -0
  108. package/test/git-defaults.test.js +150 -0
  109. package/test/github-api.test.js +158 -0
  110. package/test/github-connection.test.js +117 -0
  111. package/test/huggingface-bin.test.js +25 -0
  112. package/test/managed-skills.test.js +351 -0
  113. package/test/plugin-action-functions.test.js +337 -0
  114. package/test/plugin-dev-iframe.test.js +17 -0
  115. package/test/plugin-sources.test.js +203 -0
  116. package/test/privacy-filter-worker-heuristics.test.js +69 -0
  117. package/test/process-wait.test.js +169 -0
  118. package/test/script-api.test.js +97 -0
  119. package/test/shell-api.test.js +134 -0
  120. package/test/shell-run-template.test.js +209 -0
  121. package/test/storage-api.test.js +137 -0
  122. package/test/uri-api.test.js +100 -0
@@ -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
- document.querySelector("#error-screen").classList.remove("hidden")
607
- document.querySelector("#error-screen pre").textContent = packet.data
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>