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
@@ -17,6 +17,7 @@
17
17
  <script src="/plugin-detail.js" defer></script>
18
18
  </head>
19
19
  <body class="<%= theme %> task-launcher-page task-page plugin-page plugin-detail-page" data-agent="<%= agent %>">
20
+ <% const currentPluginCwd = typeof pluginCwd === "string" ? pluginCwd : ""; %>
20
21
  <%- include('partials/app_navheader', { agent }) %>
21
22
  <main>
22
23
  <div class="task-container">
@@ -79,7 +80,18 @@
79
80
  </button>
80
81
  </div>
81
82
  <% } %>
82
- <% if (plugin.hasInstall && plugin.pluginPath) { %>
83
+ <div class="plugin-detail-action-card task-hidden" data-plugin-ai-permissions>
84
+ <div class="plugin-detail-action-copy">
85
+ <div class="plugin-detail-action-label">AI permissions</div>
86
+ <div class="plugin-detail-action-meta">Clear saved access for <code data-plugin-ai-permission-path><%= currentPluginCwd %></code>.</div>
87
+ <div class="task-inline-help" data-plugin-ai-permission-status></div>
88
+ </div>
89
+ <button class="task-button" type="button" data-plugin-ai-permission-clear>
90
+ <i class="fa-solid fa-shield-halved" aria-hidden="true"></i>
91
+ <span>Clear</span>
92
+ </button>
93
+ </div>
94
+ <% if (plugin.hasInstall && plugin.pluginPath && plugin.installed !== true) { %>
83
95
  <div class="plugin-detail-action-card" data-plugin-action-card="install">
84
96
  <div class="plugin-detail-action-copy">
85
97
  <div class="plugin-detail-action-label">Install</div>
@@ -91,7 +103,7 @@
91
103
  </button>
92
104
  </div>
93
105
  <% } %>
94
- <% if (plugin.hasUpdate && plugin.pluginPath) { %>
106
+ <% if (plugin.hasUpdate && plugin.pluginPath && plugin.installed !== false) { %>
95
107
  <div class="plugin-detail-action-card" data-plugin-action-card="update">
96
108
  <div class="plugin-detail-action-copy">
97
109
  <div class="plugin-detail-action-label">Update</div>
@@ -103,7 +115,7 @@
103
115
  </button>
104
116
  </div>
105
117
  <% } %>
106
- <% if (plugin.hasUninstall && plugin.pluginPath) { %>
118
+ <% if (plugin.hasUninstall && plugin.pluginPath && plugin.installed !== false) { %>
107
119
  <div class="plugin-detail-action-card" data-plugin-action-card="uninstall">
108
120
  <div class="plugin-detail-action-copy">
109
121
  <div class="plugin-detail-action-label">Uninstall</div>
@@ -274,17 +286,20 @@
274
286
  description: plugin.description || "",
275
287
  link: plugin.link || "",
276
288
  pluginPath: plugin.pluginPath || "",
289
+ cwd: currentPluginCwd,
277
290
  extraParams: Array.isArray(plugin.extraParams) ? plugin.extraParams : [],
278
291
  defaultCwd: plugin.defaultCwd || "",
279
292
  hasInstall: !!plugin.hasInstall,
280
293
  hasUninstall: !!plugin.hasUninstall,
281
294
  hasUpdate: !!plugin.hasUpdate,
295
+ hasInstalledCheck: !!plugin.hasInstalledCheck,
296
+ installed: typeof plugin.installed === "boolean" ? plugin.installed : null,
282
297
  category: plugin.category || "cli"
283
298
  },
284
299
  share: shareState,
285
300
  apps,
286
301
  stateUrl: plugin.pluginPath ? `/plugin/share/state?path=${encodeURIComponent(plugin.pluginPath)}` : ""
287
- }) %></script>
302
+ }).replace(/</g, '\\u003c') %></script>
288
303
  <%- include('partials/app_common_scripts') %>
289
304
  <script src="/opener.js"></script>
290
305
  </body>
@@ -551,6 +551,200 @@ body.dark .plugin-option:hover {
551
551
  justify-content: flex-end;
552
552
  margin: 0;
553
553
  }
554
+
555
+ /* Cleaner plugin index: keep the global task shell, make plugin browsing row-based. */
556
+ body.plugin-page .plugin-shell-body {
557
+ padding-top: 18px;
558
+ }
559
+
560
+ body.plugin-page .plugin-category-layout {
561
+ display: flex;
562
+ flex-direction: column;
563
+ gap: 18px;
564
+ padding-top: 0;
565
+ }
566
+
567
+ body.plugin-page .plugin-category {
568
+ gap: 0;
569
+ }
570
+
571
+ body.plugin-page .plugin-category-header {
572
+ display: flex;
573
+ flex-direction: row;
574
+ align-items: flex-end;
575
+ justify-content: space-between;
576
+ gap: 16px;
577
+ margin: 0 0 8px;
578
+ }
579
+
580
+ body.plugin-page .plugin-category-heading {
581
+ display: flex;
582
+ align-items: center;
583
+ gap: 8px;
584
+ min-width: 0;
585
+ }
586
+
587
+ body.plugin-page .plugin-category-title {
588
+ margin: 0;
589
+ color: var(--task-muted);
590
+ font-size: 12px;
591
+ font-weight: 500;
592
+ letter-spacing: 0.04em;
593
+ line-height: 1.2;
594
+ text-transform: uppercase;
595
+ }
596
+
597
+ body.plugin-page .plugin-category-count {
598
+ display: inline-flex;
599
+ align-items: center;
600
+ justify-content: center;
601
+ min-width: 20px;
602
+ height: 20px;
603
+ box-sizing: border-box;
604
+ padding: 0 7px;
605
+ border: 1px solid var(--task-border);
606
+ border-radius: 999px;
607
+ color: var(--task-muted);
608
+ font-size: 11px;
609
+ line-height: 1;
610
+ }
611
+
612
+ body.plugin-page .plugin-category-subtitle {
613
+ color: var(--task-muted);
614
+ font-size: 12px;
615
+ letter-spacing: 0;
616
+ line-height: 1.2;
617
+ text-transform: none;
618
+ }
619
+
620
+ body.plugin-page .plugin-grid {
621
+ display: flex;
622
+ flex-direction: column;
623
+ gap: 0;
624
+ overflow: hidden;
625
+ border: 1px solid var(--task-border);
626
+ border-radius: 8px;
627
+ background: color-mix(in srgb, var(--task-panel) 96%, var(--task-soft));
628
+ }
629
+
630
+ body.plugin-page .plugin-card {
631
+ display: block;
632
+ min-height: 0;
633
+ padding: 7px 12px;
634
+ border: 0;
635
+ border-bottom: 1px solid var(--task-border);
636
+ border-radius: 0;
637
+ background: transparent;
638
+ color: var(--task-text);
639
+ text-decoration: none;
640
+ transform: none;
641
+ transition: background 140ms ease, color 140ms ease;
642
+ }
643
+
644
+ body.plugin-page .plugin-card:last-child {
645
+ border-bottom: 0;
646
+ }
647
+
648
+ body.plugin-page .plugin-card:hover,
649
+ body.plugin-page .plugin-card:focus-visible,
650
+ body.plugin-page .plugin-card:focus-within {
651
+ background: color-mix(in srgb, var(--task-soft) 60%, transparent);
652
+ border-color: var(--task-border);
653
+ transform: none;
654
+ outline: none;
655
+ }
656
+
657
+ body.plugin-page .plugin-card:focus-visible {
658
+ box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--task-accent) 55%, transparent);
659
+ }
660
+
661
+ body.plugin-page .plugin-card .plugin-top {
662
+ display: grid;
663
+ grid-template-columns: auto minmax(0, 1fr) auto;
664
+ align-items: center;
665
+ gap: 12px;
666
+ width: 100%;
667
+ min-width: 0;
668
+ }
669
+
670
+ body.plugin-page .plugin-card img,
671
+ body.plugin-page .plugin-card .plugin-icon {
672
+ width: 28px;
673
+ height: 28px;
674
+ border-radius: 6px;
675
+ }
676
+
677
+ body.plugin-page .plugin-card .plugin-icon {
678
+ font-size: 13px;
679
+ }
680
+
681
+ body.plugin-page .plugin-card .plugin-details {
682
+ gap: 1px;
683
+ min-width: 0;
684
+ }
685
+
686
+ body.plugin-page .plugin-card h2 {
687
+ overflow: hidden;
688
+ margin: 0;
689
+ font-size: 13px;
690
+ font-weight: 450;
691
+ letter-spacing: 0;
692
+ line-height: 1.2;
693
+ text-overflow: ellipsis;
694
+ white-space: nowrap;
695
+ }
696
+
697
+ body.plugin-page .plugin-card .subtitle {
698
+ overflow: hidden;
699
+ color: var(--task-muted);
700
+ font-size: 11px;
701
+ line-height: 1.2;
702
+ text-overflow: ellipsis;
703
+ white-space: nowrap;
704
+ }
705
+
706
+ body.plugin-page .plugin-row-action {
707
+ display: inline-flex;
708
+ align-items: center;
709
+ gap: 6px;
710
+ color: var(--task-muted);
711
+ font-size: 11px;
712
+ line-height: 1;
713
+ opacity: 0.7;
714
+ transition: color 140ms ease, opacity 140ms ease, transform 140ms ease;
715
+ }
716
+
717
+ body.plugin-page .plugin-card:hover .plugin-row-action,
718
+ body.plugin-page .plugin-card:focus-visible .plugin-row-action,
719
+ body.plugin-page .plugin-card:focus-within .plugin-row-action {
720
+ color: var(--task-text);
721
+ opacity: 1;
722
+ transform: translateX(1px);
723
+ }
724
+
725
+ body.plugin-page .plugin-row-action i {
726
+ font-size: 12px;
727
+ }
728
+
729
+ body.plugin-page .plugin-card .disclosure-indicator {
730
+ display: none;
731
+ }
732
+
733
+ @media (max-width: 700px) {
734
+ body.plugin-page .plugin-category-header {
735
+ align-items: flex-start;
736
+ flex-direction: column;
737
+ gap: 4px;
738
+ }
739
+
740
+ body.plugin-page .plugin-card {
741
+ padding-inline: 10px;
742
+ }
743
+
744
+ body.plugin-page .plugin-row-action span {
745
+ display: none;
746
+ }
747
+ }
554
748
  </style>
555
749
  </head>
556
750
  <body class='<%=theme%> task-launcher-page task-page plugin-page' data-agent="<%=agent%>">
@@ -576,7 +770,10 @@ body.dark .plugin-option:hover {
576
770
  <% pluginCategories.forEach(({ title, subtitle, items }) => { %>
577
771
  <section class='plugin-category task-section' aria-label="<%=title%>">
578
772
  <div class='plugin-category-header'>
579
- <h2 class='plugin-category-title'><%=title%></h2>
773
+ <div class='plugin-category-heading'>
774
+ <h2 class='plugin-category-title'><%=title%></h2>
775
+ <span class='plugin-category-count'><%= items.length %></span>
776
+ </div>
580
777
  <div class='plugin-category-subtitle'><%=subtitle%></div>
581
778
  </div>
582
779
  <% if (items.length) { %>
@@ -597,8 +794,9 @@ body.dark .plugin-option:hover {
597
794
  <div class='subtitle'><%=pluginItem.description%></div>
598
795
  <% } %>
599
796
  </div>
600
- <div class="disclosure-indicator" aria-hidden="true">
601
- <i class="fa-solid fa-chevron-right"></i>
797
+ <div class="plugin-row-action" aria-hidden="true">
798
+ <i class="fa-solid fa-gear"></i>
799
+ <span>Manage</span>
602
800
  </div>
603
801
  </div>
604
802
  </a>
@@ -117,7 +117,7 @@ footer a.btn {
117
117
  </div>
118
118
  <div class='items'>
119
119
  <% items.forEach((item) => { %>
120
- <% if (item.href) { %>
120
+ <% if (typeof item.href === "string" && item.href) { %>
121
121
  <div class='item'>
122
122
  <% if (item.icon) { %>
123
123
  <img src="<%=item.icon%>">
@@ -263,7 +263,7 @@ const createTerm = async (_theme) => {
263
263
  term.loadAddon(fitAddon);
264
264
  <% if (agent === "electron") { %>
265
265
  term.loadAddon(new WebLinksAddon.WebLinksAddon((event, uri) => {
266
- window.open(uri, "_blank")
266
+ window.open(uri, "_blank", "browser")
267
267
  }))
268
268
  <% } else { %>
269
269
  term.loadAddon(new WebLinksAddon.WebLinksAddon());
@@ -284,6 +284,35 @@ const postMessageToAncestors = (payload) => {
284
284
  })
285
285
  return dispatched
286
286
  }
287
+ const openAppLogsForError = (packet) => {
288
+ return postMessageToAncestors({
289
+ e: "pinokio:logs-new",
290
+ type: "pinokio:logs-new",
291
+ reason: "error",
292
+ frame: window.name || null,
293
+ source: "shell"
294
+ })
295
+ }
296
+ const showErrorScreen = (packet) => {
297
+ const errorScreen = document.querySelector("#error-screen")
298
+ const errorOutput = errorScreen ? errorScreen.querySelector("pre") : null
299
+ if (!errorScreen || !errorOutput) {
300
+ return
301
+ }
302
+ errorScreen.classList.remove("hidden")
303
+ errorOutput.textContent = packet && packet.data ? packet.data : ""
304
+ let instance = new Mark(errorOutput, {
305
+ separateWordSearch: false,
306
+ accuracy: "exactly"
307
+ })
308
+ if (packet && packet.event) {
309
+ instance.mark(packet.event)
310
+ let element = errorScreen.querySelector("mark")
311
+ if (element) {
312
+ element.scrollIntoView({ behavior: "smooth", block: "center" })
313
+ }
314
+ }
315
+ }
287
316
  const notifyShellSession = (id) => {
288
317
  if (!id || id === lastNotifiedShellId) {
289
318
  return
@@ -734,6 +763,14 @@ document.addEventListener("DOMContentLoaded", async () => {
734
763
  // uri: "~" + location.pathname,
735
764
  uri: packet.id
736
765
  })
766
+ } else if (packet.type === "process.wait.start") {
767
+ if (window.PinokioWaitFooterStatus) {
768
+ window.PinokioWaitFooterStatus.show(packet.data)
769
+ }
770
+ } else if (packet.type === "process.wait.end") {
771
+ if (window.PinokioWaitFooterStatus) {
772
+ window.PinokioWaitFooterStatus.hide()
773
+ }
737
774
  } else if (packet.type === 'wait') {
738
775
  await WaitModal(packet.data)
739
776
  } else if (packet.type === "htmlmodal") {
@@ -893,23 +930,8 @@ document.addEventListener("DOMContentLoaded", async () => {
893
930
  document.querySelector(".starting-btn").classList.add("hidden")
894
931
  document.querySelector(".stop-btn").classList.add("hidden")
895
932
 
896
- document.querySelector("#error-screen").classList.remove("hidden")
897
- document.querySelector("#error-screen pre").textContent = packet.data
898
- let instance = new Mark(document.querySelector("#error-screen pre"), {
899
- separateWordSearch: false,
900
- accuracy: "exactly"
901
- })
902
- /*
903
- document.querySelector("#error-screen").addEventListener("click", (e) => {
904
- document.querySelector("#error-screen").classList.add("hidden")
905
- })
906
- */
907
- if (packet.event) {
908
- instance.mark(packet.event)
909
- let element = document.querySelector("#error-screen mark")
910
- if (element) {
911
- element.scrollIntoView({ behavior: "smooth", block: "center" })
912
- }
933
+ if (!openAppLogsForError(packet)) {
934
+ showErrorScreen(packet)
913
935
  }
914
936
 
915
937
  this.stop()
@@ -1748,7 +1770,7 @@ document.addEventListener("DOMContentLoaded", async () => {
1748
1770
  term.loadAddon(fitAddon);
1749
1771
  <% if (agent === "electron") { %>
1750
1772
  term.loadAddon(new WebLinksAddon.WebLinksAddon((event, uri) => {
1751
- window.open(uri, "_blank")
1773
+ window.open(uri, "_blank", "browser")
1752
1774
  }))
1753
1775
  <% } else { %>
1754
1776
  term.loadAddon(new WebLinksAddon.WebLinksAddon());