pinokiod 5.1.10 → 5.1.11

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 (56) hide show
  1. package/kernel/api/fs/download_worker.js +158 -0
  2. package/kernel/api/fs/index.js +95 -91
  3. package/kernel/api/index.js +3 -0
  4. package/kernel/bin/index.js +5 -2
  5. package/kernel/environment.js +19 -2
  6. package/kernel/git.js +972 -1
  7. package/kernel/index.js +65 -30
  8. package/kernel/peer.js +1 -2
  9. package/kernel/plugin.js +0 -8
  10. package/kernel/procs.js +92 -36
  11. package/kernel/prototype.js +45 -22
  12. package/kernel/shells.js +30 -6
  13. package/kernel/sysinfo.js +33 -13
  14. package/kernel/util.js +61 -24
  15. package/kernel/workspace_status.js +131 -7
  16. package/package.json +1 -1
  17. package/pipe/index.js +1 -1
  18. package/server/index.js +1169 -350
  19. package/server/public/create-launcher.js +157 -2
  20. package/server/public/install.js +135 -41
  21. package/server/public/style.css +32 -1
  22. package/server/public/tab-link-popover.js +45 -14
  23. package/server/public/terminal-settings.js +51 -35
  24. package/server/public/urldropdown.css +89 -3
  25. package/server/socket.js +12 -7
  26. package/server/views/agents.ejs +4 -3
  27. package/server/views/app.ejs +798 -30
  28. package/server/views/bootstrap.ejs +2 -1
  29. package/server/views/checkpoints.ejs +1014 -0
  30. package/server/views/checkpoints_registry_beta.ejs +260 -0
  31. package/server/views/columns.ejs +4 -4
  32. package/server/views/connect.ejs +1 -0
  33. package/server/views/d.ejs +74 -4
  34. package/server/views/download.ejs +28 -28
  35. package/server/views/editor.ejs +4 -5
  36. package/server/views/env_editor.ejs +1 -1
  37. package/server/views/file_explorer.ejs +1 -1
  38. package/server/views/index.ejs +3 -1
  39. package/server/views/init/index.ejs +2 -1
  40. package/server/views/install.ejs +2 -1
  41. package/server/views/net.ejs +9 -7
  42. package/server/views/network.ejs +15 -14
  43. package/server/views/pro.ejs +5 -2
  44. package/server/views/prototype/index.ejs +2 -1
  45. package/server/views/registry_link.ejs +76 -0
  46. package/server/views/rows.ejs +4 -4
  47. package/server/views/screenshots.ejs +1 -0
  48. package/server/views/settings.ejs +1 -0
  49. package/server/views/shell.ejs +4 -6
  50. package/server/views/terminal.ejs +528 -38
  51. package/server/views/tools.ejs +1 -0
  52. package/undefined/logs/dev/plugin/cursor-agent.git/pinokio.js/1764297248545 +0 -45
  53. package/undefined/logs/dev/plugin/cursor-agent.git/pinokio.js/1764335557118 +0 -45
  54. package/undefined/logs/dev/plugin/cursor-agent.git/pinokio.js/1764335834126 +0 -45
  55. package/undefined/logs/dev/plugin/cursor-agent.git/pinokio.js/events +0 -12
  56. package/undefined/logs/dev/plugin/cursor-agent.git/pinokio.js/latest +0 -45
@@ -3,30 +3,43 @@
3
3
 
4
4
  const STORAGE_KEY = 'pinokio.xterm.preferences';
5
5
  const CUSTOM_FONT_VALUE = '__custom__';
6
- const FONT_OPTIONS = [
7
- { label: 'Default (Theme)', value: '' },
8
- { label: 'Monospace (generic)', value: 'monospace' },
9
- { label: 'UI Monospace', value: 'ui-monospace' },
10
- { label: 'Courier New', value: '"Courier New", Courier, monospace' },
11
- { label: 'Lucida Console', value: '"Lucida Console", "Lucida Sans Typewriter", monospace' },
12
- { label: 'Consolas', value: 'Consolas, "Liberation Mono", "Courier New", monospace' },
13
- { label: 'Menlo', value: 'Menlo, Monaco, "Courier New", monospace' },
14
- { label: 'Monaco', value: 'Monaco, "Courier New", monospace' },
15
- { label: 'IBM Plex Mono', value: '"IBM Plex Mono", "Courier New", monospace' },
16
- { label: 'Source Code Pro', value: '"Source Code Pro", "Courier New", monospace' },
17
- { label: 'Fira Code', value: '"Fira Code", "Courier New", monospace' },
18
- { label: 'JetBrains Mono', value: '"JetBrains Mono", "Courier New", monospace' },
19
- { label: 'Cascadia Mono', value: '"Cascadia Mono", "Courier New", monospace' },
20
- { label: 'Iosevka', value: 'Iosevka, "Courier New", monospace' },
21
- { label: 'Anonymous Pro', value: '"Anonymous Pro", "Courier New", monospace' },
22
- { label: 'Roboto Mono', value: '"Roboto Mono", "Courier New", monospace' },
23
- { label: 'Inconsolata', value: 'Inconsolata, "Courier New", monospace' },
24
- { label: 'Hack', value: 'Hack, "Courier New", monospace' },
25
- { label: 'Noto Sans Mono', value: '"Noto Sans Mono", "Courier New", monospace' },
26
- { label: 'PT Mono', value: '"PT Mono", "Courier New", monospace' },
27
- { label: 'Space Mono', value: '"Space Mono", "Courier New", monospace' },
28
- { label: 'Custom...', value: CUSTOM_FONT_VALUE }
29
- ];
6
+
7
+ function detectOsPlatform() {
8
+ try {
9
+ if (typeof navigator !== 'undefined') {
10
+ const ua = ((navigator.userAgent || '') + ' ' + (navigator.platform || '')).toLowerCase();
11
+ if (ua.includes('windows')) return 'windows';
12
+ if (ua.includes('mac') || ua.includes('darwin')) return 'mac';
13
+ if (ua.includes('linux')) return 'linux';
14
+ }
15
+ } catch (_) {}
16
+ return 'unknown';
17
+ }
18
+
19
+ const FONT_OPTIONS = (() => {
20
+ const options = [
21
+ { label: 'Default (Theme)', value: '' },
22
+ { label: 'Monospace (generic)', value: 'monospace' },
23
+ { label: 'UI Monospace', value: 'ui-monospace' }
24
+ ];
25
+
26
+ const platform = detectOsPlatform();
27
+ if (platform === 'windows') {
28
+ options.push(
29
+ { label: 'Consolas', value: 'Consolas, "Courier New", monospace' },
30
+ { label: 'Courier New', value: '"Courier New", Courier, monospace' },
31
+ { label: 'Lucida Console', value: '"Lucida Console", "Lucida Sans Typewriter", monospace' }
32
+ );
33
+ } else if (platform === 'mac') {
34
+ options.push(
35
+ { label: 'Menlo', value: 'Menlo, Monaco, "Courier New", monospace' },
36
+ { label: 'Monaco', value: 'Monaco, "Courier New", monospace' }
37
+ );
38
+ }
39
+
40
+ options.push({ label: 'Custom...', value: CUSTOM_FONT_VALUE });
41
+ return options;
42
+ })();
30
43
 
31
44
  const THEME_OPTIONS = [
32
45
  { key: 'foreground', label: 'Foreground' },
@@ -802,11 +815,15 @@
802
815
  const baseFamilyRaw = typeof base.fontFamily === 'string' && base.fontFamily.trim()
803
816
  ? base.fontFamily.trim()
804
817
  : this.safeGetOption(term, 'fontFamily');
805
- const baseFontFamily = baseFamilyRaw || 'monospace';
818
+ const defaultXtermFamily = 'courier-new, courier, monospace';
819
+ const baseFontFamily = baseFamilyRaw && typeof baseFamilyRaw === 'string'
820
+ && baseFamilyRaw.toLowerCase() === defaultXtermFamily
821
+ ? 'monospace'
822
+ : (baseFamilyRaw || 'monospace');
806
823
  const baseThemeRaw = base && base.theme ? base.theme : this.safeGetOption(term, 'theme');
807
824
  const baseTheme = this.sanitizeTheme(baseThemeRaw, true);
808
825
  term._pinokioBaseOptions = {
809
- fontSize: isFiniteNumber(baseFontSize) ? baseFontSize : 12,
826
+ fontSize: isFiniteNumber(baseFontSize) ? baseFontSize : 14,
810
827
  fontFamily: baseFontFamily,
811
828
  theme: baseTheme
812
829
  };
@@ -1758,15 +1775,14 @@
1758
1775
 
1759
1776
  const knownOption = FONT_OPTIONS.find((option) => option.value === prefFamily);
1760
1777
  if (prefFamily && !knownOption) {
1761
- fontSelect.value = CUSTOM_FONT_VALUE;
1762
- customInput.hidden = false;
1763
- customInput.value = prefFamily;
1764
- } else {
1765
- fontSelect.value = prefFamily && knownOption ? prefFamily : '';
1766
- customInput.hidden = fontSelect.value !== CUSTOM_FONT_VALUE;
1767
- if (customInput.hidden) {
1768
- customInput.value = '';
1769
- }
1778
+ this.updateFontFamily(null);
1779
+ return;
1780
+ }
1781
+
1782
+ fontSelect.value = prefFamily && knownOption ? prefFamily : '';
1783
+ customInput.hidden = fontSelect.value !== CUSTOM_FONT_VALUE;
1784
+ if (customInput.hidden) {
1785
+ customInput.value = '';
1770
1786
  }
1771
1787
 
1772
1788
  if (prefFamily || (fontSelect.value && fontSelect.value !== CUSTOM_FONT_VALUE)) {
@@ -719,6 +719,90 @@ body.dark .create-launcher-modal-bookmarklet:hover,
719
719
  body.dark .create-launcher-modal-bookmarklet:focus-visible {
720
720
  color: rgba(225, 213, 255, 0.98);
721
721
  }
722
+ .create-launcher-upload {
723
+ display: flex;
724
+ flex-direction: column;
725
+ gap: 8px;
726
+ margin-top: 4px;
727
+ }
728
+ .create-launcher-upload-label {
729
+ font-size: 13px;
730
+ font-weight: 600;
731
+ color: #111;
732
+ }
733
+ body.dark .create-launcher-upload-label {
734
+ color: rgba(255, 255, 255, 0.9);
735
+ }
736
+ .create-launcher-upload-dropzone {
737
+ border: 1px dashed rgba(0, 0, 0, 0.2);
738
+ border-radius: 10px;
739
+ padding: 12px;
740
+ text-align: center;
741
+ cursor: pointer;
742
+ background: #fafafa;
743
+ transition: border-color 0.2s ease, background 0.2s ease;
744
+ }
745
+ body.dark .create-launcher-upload-dropzone {
746
+ border-color: rgba(255, 255, 255, 0.2);
747
+ background: rgba(255, 255, 255, 0.06);
748
+ }
749
+ .create-launcher-upload-dropzone.dragover {
750
+ border-color: rgba(127, 91, 243, 0.7);
751
+ background: rgba(127, 91, 243, 0.06);
752
+ }
753
+ .create-launcher-upload-list {
754
+ list-style: none;
755
+ padding: 0;
756
+ margin: 0;
757
+ display: flex;
758
+ flex-direction: column;
759
+ gap: 6px;
760
+ }
761
+ .create-launcher-upload-item {
762
+ display: flex;
763
+ align-items: center;
764
+ justify-content: space-between;
765
+ gap: 8px;
766
+ background: rgba(0, 0, 0, 0.03);
767
+ border-radius: 8px;
768
+ padding: 6px 10px;
769
+ font-size: 13px;
770
+ }
771
+ body.dark .create-launcher-upload-item {
772
+ background: rgba(255, 255, 255, 0.06);
773
+ }
774
+ .create-launcher-upload-empty {
775
+ color: rgba(0, 0, 0, 0.6);
776
+ font-size: 12px;
777
+ }
778
+ body.dark .create-launcher-upload-empty {
779
+ color: rgba(255, 255, 255, 0.6);
780
+ }
781
+ .create-launcher-upload-name {
782
+ flex: 1 1 auto;
783
+ overflow: hidden;
784
+ text-overflow: ellipsis;
785
+ white-space: nowrap;
786
+ }
787
+ .create-launcher-upload-size {
788
+ color: rgba(0, 0, 0, 0.6);
789
+ font-size: 12px;
790
+ }
791
+ body.dark .create-launcher-upload-size {
792
+ color: rgba(255, 255, 255, 0.6);
793
+ }
794
+ .create-launcher-upload-remove {
795
+ background: transparent;
796
+ border: none;
797
+ color: rgba(127, 91, 243, 0.9);
798
+ cursor: pointer;
799
+ font-size: 12px;
800
+ padding: 2px 6px;
801
+ }
802
+ .create-launcher-upload-remove:hover,
803
+ .create-launcher-upload-remove:focus-visible {
804
+ text-decoration: underline;
805
+ }
722
806
  @media (max-width: 640px) {
723
807
  .modal-overlay {
724
808
  padding: 16px;
@@ -1006,7 +1090,7 @@ body.dark .urlbar input[type=url] {
1006
1090
  position: relative;
1007
1091
  width: min(520px, calc(100% - 40px));
1008
1092
  background: rgba(255, 255, 255, 0.92);
1009
- border-radius: 18px;
1093
+ border-radius: 6px;
1010
1094
  padding: 28px 28px 26px;
1011
1095
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
1012
1096
  border: 1px solid rgba(15, 23, 42, 0.08);
@@ -1026,8 +1110,8 @@ body.dark .url-modal-content {
1026
1110
  position: absolute;
1027
1111
  top: 14px;
1028
1112
  right: 16px;
1029
- font-size: 22px;
1030
- color: rgba(71, 85, 105, 0.7);
1113
+ font-size: 22px !important;
1114
+ color: rgba(71, 85, 105, 0.7) !important;
1031
1115
  cursor: pointer;
1032
1116
  user-select: none;
1033
1117
  background: none;
@@ -1139,7 +1223,9 @@ body.dark .url-modal-button.cancel {
1139
1223
  .url-modal-button.confirm {
1140
1224
  background: linear-gradient(135deg, rgba(127, 91, 243, 0.95), rgba(84, 63, 196, 0.95));
1141
1225
  color: white;
1226
+ /*
1142
1227
  box-shadow: 0 16px 36px rgba(111, 76, 242, 0.3);
1228
+ */
1143
1229
  }
1144
1230
  .url-modal-button.confirm:hover {
1145
1231
  box-shadow: 0 20px 42px rgba(111, 76, 242, 0.38);
package/server/socket.js CHANGED
@@ -170,7 +170,9 @@ class Socket {
170
170
  await this.parent.kernel.clearLog(id)
171
171
 
172
172
 
173
- this.parent.kernel.api.process(req)
173
+ this.parent.kernel.api.process(req).catch((err) => {
174
+ console.error('[socket] api.process failed (uri):', (err && err.stack) ? err.stack : err)
175
+ })
174
176
  }
175
177
  }
176
178
  }
@@ -189,11 +191,15 @@ class Socket {
189
191
  let shell = this.parent.kernel.shell.get(sh)
190
192
  if (!shell) {
191
193
  await this.parent.kernel.clearLog(req.id)
192
- this.parent.kernel.api.process(req)
194
+ this.parent.kernel.api.process(req).catch((err) => {
195
+ console.error('[socket] api.process failed (method/id):', (err && err.stack) ? err.stack : err)
196
+ })
193
197
  }
194
198
  // if it's not killed, don't do anything
195
199
  } else {
196
- this.parent.kernel.api.process(req)
200
+ this.parent.kernel.api.process(req).catch((err) => {
201
+ console.error('[socket] api.process failed (method):', (err && err.stack) ? err.stack : err)
202
+ })
197
203
  }
198
204
  } else {
199
205
  if (req.method === this.notificationChannel) {
@@ -217,7 +223,9 @@ class Socket {
217
223
  }
218
224
  this.subscribe(ws, req.method)
219
225
  if (req.mode !== "listen") {
220
- this.parent.kernel.api.process(req)
226
+ this.parent.kernel.api.process(req).catch((err) => {
227
+ console.error('[socket] api.process failed (notification):', (err && err.stack) ? err.stack : err)
228
+ })
221
229
  }
222
230
  }
223
231
  } else if (req.emit) {
@@ -372,9 +380,6 @@ class Socket {
372
380
  } else if (meta.source === 'api' && !isShellRun) {
373
381
  this.appendEventLog(id, meta, e.data.raw)
374
382
  }
375
- if (e.type === "memory") {
376
- console.log("[memory event id]", id, "caller", e.caller)
377
- }
378
383
  if (!isShell) {
379
384
  const tagged = this.tagLines(meta, e.data.raw)
380
385
  this.rawLog[id] = (this.rawLog[id] || "") + (this.rawLog[id] ? "\n" : "") + tagged
@@ -737,10 +737,11 @@ body.dark .plugin-option:hover {
737
737
  <a href="/connect" class='tab'><i class="fa-solid fa-plug"></i><div class='caption'>Login</div></a>
738
738
  <a class='tab' href="<%=portal%>" target="_blank"><i class="fa-solid fa-question"></i><div class='caption'>Help</div></a>
739
739
  <a class='tab' id='genlog' href="/logs"><i class="fa-solid fa-laptop-code"></i><div class='caption'>Logs</div></a>
740
+ <a class='tab' href="/checkpoints"><i class="fa-solid fa-clock-rotate-left"></i><div class='caption'>Checkpoints</div></a>
740
741
  <a class='tab' href="/screenshots"><i class="fa-solid fa-camera"></i><div class='caption'>Screenshots</div></a>
741
- <a class='tab' href="/tools"><i class="fa-solid fa-toolbox"></i><div class='caption'>Installed Tools</div></a>
742
- <a class='tab selected' href="/agents"><i class="fa-solid fa-robot"></i><div class='caption'>Agents</div></a>
743
- <a class='tab' href="/home?mode=settings"><i class="fa-solid fa-gear"></i><div class='caption'>Settings</div></a>
742
+ <a class='tab' href="/tools"><i class="fa-solid fa-toolbox"></i><div class='caption'>Installed Tools</div></a>
743
+ <a class='tab selected' href="/agents"><i class="fa-solid fa-robot"></i><div class='caption'>Agents</div></a>
744
+ <a class='tab' href="/home?mode=settings"><i class="fa-solid fa-gear"></i><div class='caption'>Settings</div></a>
744
745
  <%- include('partials/peer_access_points', { peer_access_points, peer_url, peer_qr }) %>
745
746
  </aside>
746
747
  </main>