pinokiod 3.85.0 → 3.87.0

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 (88) hide show
  1. package/Dockerfile +61 -0
  2. package/docker-entrypoint.sh +75 -0
  3. package/kernel/api/hf/index.js +1 -1
  4. package/kernel/api/index.js +8 -1
  5. package/kernel/api/shell/index.js +6 -0
  6. package/kernel/api/terminal/index.js +166 -0
  7. package/kernel/bin/caddy.js +10 -4
  8. package/kernel/bin/conda.js +3 -2
  9. package/kernel/bin/index.js +53 -2
  10. package/kernel/bin/setup.js +32 -0
  11. package/kernel/bin/vs.js +11 -2
  12. package/kernel/index.js +42 -2
  13. package/kernel/info.js +36 -0
  14. package/kernel/peer.js +42 -18
  15. package/kernel/prototype.js +1 -0
  16. package/kernel/router/index.js +23 -15
  17. package/kernel/router/localhost_static_router.js +0 -3
  18. package/kernel/router/pinokio_domain_router.js +333 -0
  19. package/kernel/shell.js +43 -2
  20. package/kernel/shells.js +21 -1
  21. package/kernel/util.js +4 -2
  22. package/package.json +2 -1
  23. package/pipe/views/login.ejs +1 -1
  24. package/script/install-mode.js +33 -0
  25. package/script/pinokio.json +7 -0
  26. package/server/index.js +636 -246
  27. package/server/public/Socket.js +48 -0
  28. package/server/public/common.js +1956 -257
  29. package/server/public/fseditor.js +71 -12
  30. package/server/public/install.js +1 -1
  31. package/server/public/layout.js +740 -0
  32. package/server/public/modalinput.js +0 -1
  33. package/server/public/opener.js +12 -11
  34. package/server/public/serve/style.css +1 -1
  35. package/server/public/style.css +122 -129
  36. package/server/public/tab-idle-notifier.js +629 -0
  37. package/server/public/terminal_input_tracker.js +63 -0
  38. package/server/public/urldropdown.css +780 -45
  39. package/server/public/urldropdown.js +806 -156
  40. package/server/public/window_storage.js +97 -28
  41. package/server/socket.js +40 -9
  42. package/server/views/404.ejs +1 -1
  43. package/server/views/500.ejs +3 -3
  44. package/server/views/app.ejs +3146 -1381
  45. package/server/views/bookmarklet.ejs +197 -0
  46. package/server/views/bootstrap.ejs +1 -1
  47. package/server/views/columns.ejs +2 -13
  48. package/server/views/connect/x.ejs +4 -4
  49. package/server/views/connect.ejs +13 -14
  50. package/server/views/container.ejs +3 -4
  51. package/server/views/d.ejs +225 -55
  52. package/server/views/download.ejs +1 -1
  53. package/server/views/editor.ejs +2 -2
  54. package/server/views/env_editor.ejs +3 -3
  55. package/server/views/explore.ejs +2 -2
  56. package/server/views/file_explorer.ejs +3 -3
  57. package/server/views/git.ejs +7 -7
  58. package/server/views/github.ejs +3 -3
  59. package/server/views/help.ejs +2 -2
  60. package/server/views/index.ejs +17 -16
  61. package/server/views/index2.ejs +7 -7
  62. package/server/views/init/index.ejs +15 -79
  63. package/server/views/install.ejs +4 -4
  64. package/server/views/keys.ejs +2 -2
  65. package/server/views/layout.ejs +105 -0
  66. package/server/views/mini.ejs +2 -2
  67. package/server/views/net.ejs +45 -13
  68. package/server/views/network.ejs +41 -27
  69. package/server/views/network2.ejs +11 -11
  70. package/server/views/old_network.ejs +10 -10
  71. package/server/views/partials/dynamic.ejs +3 -5
  72. package/server/views/partials/menu.ejs +3 -5
  73. package/server/views/partials/running.ejs +1 -1
  74. package/server/views/pro.ejs +369 -0
  75. package/server/views/prototype/index.ejs +3 -3
  76. package/server/views/required_env_editor.ejs +2 -2
  77. package/server/views/review.ejs +15 -27
  78. package/server/views/rows.ejs +2 -13
  79. package/server/views/screenshots.ejs +298 -142
  80. package/server/views/settings.ejs +6 -7
  81. package/server/views/setup.ejs +3 -4
  82. package/server/views/setup_home.ejs +2 -2
  83. package/server/views/share_editor.ejs +4 -4
  84. package/server/views/shell.ejs +280 -29
  85. package/server/views/start.ejs +2 -2
  86. package/server/views/task.ejs +2 -2
  87. package/server/views/terminal.ejs +326 -52
  88. package/server/views/tools.ejs +461 -17
@@ -0,0 +1,197 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Pinokio Create Bookmarklet</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: light dark;
10
+ font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
+ line-height: 1.55;
12
+ }
13
+ body {
14
+ margin: 0;
15
+ padding: 24px 18px 48px;
16
+ background: rgba(248, 250, 255, 0.92);
17
+ color: #0f172a;
18
+ }
19
+ body.dark {
20
+ background: #0f172a;
21
+ color: rgba(226, 232, 240, 0.96);
22
+ }
23
+ .page {
24
+ max-width: 720px;
25
+ margin: 0 auto;
26
+ display: flex;
27
+ flex-direction: column;
28
+ gap: 20px;
29
+ background: rgba(255, 255, 255, 0.88);
30
+ border-radius: 20px;
31
+ padding: 32px 36px;
32
+ box-shadow: 0 40px 100px rgba(15, 23, 42, 0.25);
33
+ }
34
+ body.dark .page {
35
+ background: rgba(17, 24, 39, 0.85);
36
+ box-shadow: 0 50px 120px rgba(2, 6, 20, 0.65);
37
+ }
38
+ h1 {
39
+ margin: 0;
40
+ font-size: 28px;
41
+ letter-spacing: -0.01em;
42
+ }
43
+ p {
44
+ margin: 0;
45
+ }
46
+ .bookmarklet-button {
47
+ display: inline-flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ padding: 12px 18px;
51
+ border-radius: 999px;
52
+ font-weight: 600;
53
+ font-size: 15px;
54
+ text-decoration: none;
55
+ color: #fff;
56
+ background: linear-gradient(135deg, rgba(127, 91, 243, 0.95), rgba(84, 63, 196, 0.95));
57
+ box-shadow: 0 18px 40px rgba(111, 76, 242, 0.32);
58
+ cursor: grab;
59
+ }
60
+ .bookmarklet-button:active {
61
+ cursor: grabbing;
62
+ }
63
+ .steps {
64
+ list-style: decimal;
65
+ margin: 0 0 0 20px;
66
+ padding: 0;
67
+ display: flex;
68
+ flex-direction: column;
69
+ gap: 10px;
70
+ font-size: 15px;
71
+ }
72
+ .code-block {
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: 8px;
76
+ }
77
+ textarea {
78
+ width: 100%;
79
+ min-height: 120px;
80
+ border-radius: 14px;
81
+ border: 1px solid rgba(148, 163, 184, 0.3);
82
+ background: rgba(248, 250, 255, 0.7);
83
+ padding: 14px 16px;
84
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
85
+ font-size: 14px;
86
+ color: inherit;
87
+ resize: vertical;
88
+ }
89
+ body.dark textarea {
90
+ background: rgba(30, 41, 59, 0.6);
91
+ border-color: rgba(148, 163, 184, 0.35);
92
+ }
93
+ button.copy-btn {
94
+ align-self: flex-start;
95
+ padding: 10px 16px;
96
+ border-radius: 999px;
97
+ border: none;
98
+ font-weight: 600;
99
+ font-size: 14px;
100
+ cursor: pointer;
101
+ color: #fff;
102
+ background: rgba(15, 23, 42, 0.85);
103
+ box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
104
+ }
105
+ body.dark button.copy-btn {
106
+ background: rgba(148, 163, 184, 0.85);
107
+ color: #0f172a;
108
+ box-shadow: 0 12px 28px rgba(15, 23, 42, 0.45);
109
+ }
110
+ small {
111
+ opacity: 0.75;
112
+ font-size: 13px;
113
+ }
114
+ @media (max-width: 640px) {
115
+ body {
116
+ padding: 18px 12px 36px;
117
+ }
118
+ .page {
119
+ padding: 24px;
120
+ border-radius: 16px;
121
+ }
122
+ h1 {
123
+ font-size: 24px;
124
+ }
125
+ }
126
+ </style>
127
+ </head>
128
+ <body class="<%= theme %>">
129
+ <main class="page">
130
+ <header>
131
+ <h1>Pinokio “Create” Bookmarklet</h1>
132
+ <p>Drop this bookmarklet onto your bookmarks bar. Clicking it on any site opens Pinokio’s Create modal with that page’s URL pre-filled in the prompt.</p>
133
+ </header>
134
+
135
+ <section>
136
+ <a class="bookmarklet-button" href="<%- bookmarkletHref %>">Pinokio Create</a>
137
+ <small>Tip: Drag the button to your bookmarks bar, or right-click → “Add to Favorites/Bookmarks”.</small>
138
+ </section>
139
+
140
+ <section>
141
+ <ol class="steps">
142
+ <li>Make sure your bookmarks bar is visible (View → Toolbars → Bookmarks Toolbar, or press <kbd>Ctrl</kbd>/<kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd>).</li>
143
+ <li>Drag the “Pinokio Create” button above to the bar.</li>
144
+ <li>When you are on a page you want to automate, click the bookmark. Pinokio will open at <code><%= baseUrl %>/home?create=1</code> with the current page URL in the prompt field.</li>
145
+ </ol>
146
+ </section>
147
+
148
+ <section class="code-block">
149
+ <strong>Manual option</strong>
150
+ <p>If dragging doesn’t work, create a new bookmark manually and paste the code below as the URL.</p>
151
+ <textarea id="bookmarklet-code" readonly><%- bookmarkletHref %></textarea>
152
+ <button type="button" class="copy-btn" data-copy>Copy bookmarklet code</button>
153
+ <small class="copy-status" hidden>Copied!</small>
154
+ </section>
155
+ </main>
156
+
157
+ <script>
158
+ (function() {
159
+ const copyBtn = document.querySelector('[data-copy]');
160
+ const textarea = document.getElementById('bookmarklet-code');
161
+ const status = document.querySelector('.copy-status');
162
+
163
+ if (!copyBtn || !textarea) {
164
+ return;
165
+ }
166
+
167
+ copyBtn.addEventListener('click', async () => {
168
+ const text = textarea.value;
169
+ try {
170
+ if (navigator.clipboard && navigator.clipboard.writeText) {
171
+ await navigator.clipboard.writeText(text);
172
+ } else {
173
+ textarea.select();
174
+ document.execCommand('copy');
175
+ }
176
+ if (status) {
177
+ status.hidden = false;
178
+ status.textContent = 'Copied!';
179
+ setTimeout(() => {
180
+ status.hidden = true;
181
+ }, 1800);
182
+ }
183
+ } catch (error) {
184
+ if (status) {
185
+ status.hidden = false;
186
+ status.textContent = 'Copy failed. Please copy manually.';
187
+ setTimeout(() => {
188
+ status.hidden = true;
189
+ status.textContent = 'Copied!';
190
+ }, 2600);
191
+ }
192
+ }
193
+ });
194
+ })();
195
+ </script>
196
+ </body>
197
+ </html>
@@ -136,7 +136,7 @@ document.addEventListener("DOMContentLoaded", () => {
136
136
  })
137
137
  let config = {
138
138
  scrollback: 9999999,
139
- fontSize: 14,
139
+ fontSize: 12,
140
140
  theme,
141
141
  }
142
142
  let res = await fetch("/xterm_config").then((res) => {
@@ -82,9 +82,9 @@ body[data-agent='electron'] {
82
82
  </head>
83
83
  <body class='<%=theme%>' data-agent="<%=agent%>">
84
84
  <div id='dragger'></div>
85
- <iframe id='col0' data-src="<%=src%>"></iframe>
85
+ <iframe id='col0' data-src="<%= originSrc || '/' %>"></iframe>
86
86
  <div id="gutter" class="gutter" tabindex="0" role="separator" aria-orientation="vertical" aria-label="Resize panels" aria-valuemin="120" aria-valuemax="0" aria-valuenow="0"></div>
87
- <iframe id='col1' data-src="<%=src%>"></iframe>
87
+ <iframe id='col1' data-src="<%= targetSrc || originSrc || '/' %>"></iframe>
88
88
 
89
89
  <script>
90
90
  if (window !== window.top) {
@@ -366,17 +366,6 @@ body[data-agent='electron'] {
366
366
  }
367
367
  })
368
368
  })();
369
- if (document.querySelector("#collapse") && window.windowStorage) {
370
- document.querySelector("#collapse").addEventListener("click", (e) => {
371
- document.body.classList.toggle("minimized")
372
- let frame_key = window.frameElement?.name || "";
373
- if (document.body.classList.contains("minimized")) {
374
- windowStorage.setItem(frame_key + ":window_mode", "minimized")
375
- } else {
376
- windowStorage.setItem(frame_key + ":window_mode", "full")
377
- }
378
- })
379
- }
380
369
  </script>
381
370
  </body>
382
371
  </html>
@@ -81,7 +81,7 @@ body {
81
81
  }
82
82
  .item .title {
83
83
  text-decoration: none;
84
- color: royalblue;
84
+ color: rgba(127, 91, 243, 0.9);
85
85
  }
86
86
  .item .col {
87
87
  padding: 10px;
@@ -111,7 +111,7 @@ main {
111
111
  width: 100%;
112
112
  }
113
113
  a {
114
- color: royalblue;
114
+ color: rgba(127, 91, 243, 0.9);
115
115
  }
116
116
  body.dark hr {
117
117
  background: rgba(255,255,255,0.05);
@@ -135,7 +135,7 @@ td {
135
135
  }
136
136
  td.key {
137
137
  width: 150px;
138
- color: royalblue;
138
+ color: rgba(127, 91, 243, 0.9);
139
139
  }
140
140
  .head {
141
141
  padding: 30px;
@@ -167,7 +167,7 @@ pre {
167
167
  margin: 20px;
168
168
  }
169
169
  .card:hover {
170
- color: royalblue !important;
170
+ color: rgba(127, 91, 243, 0.9) !important;
171
171
  }
172
172
  .card .desc {
173
173
  opacity: 0.7;
@@ -74,7 +74,7 @@ body {
74
74
  }
75
75
  .item .title {
76
76
  text-decoration: none;
77
- color: royalblue;
77
+ color: rgba(127, 91, 243, 0.9);
78
78
  }
79
79
  .item .col {
80
80
  padding: 10px;
@@ -129,7 +129,7 @@ body.dark .card {
129
129
  color: rgba(0,0,0,0.9);
130
130
  }
131
131
  .card:hover {
132
- color: royalblue !important;
132
+ color: rgba(127, 91, 243, 0.9) !important;
133
133
  }
134
134
  .card .desc {
135
135
  }
@@ -164,7 +164,7 @@ body.dark .config {
164
164
  font-size: 16px;
165
165
  font-weight: bold;
166
166
  width: 100px;
167
- background: royalblue;
167
+ background: rgba(127, 91, 243, 0.9);
168
168
  flex-shrink: 0;
169
169
  }
170
170
  .config-row {
@@ -300,12 +300,12 @@ header .runner {
300
300
  margin-top: 5px;
301
301
  }
302
302
  a.badge {
303
- color: royalblue;
303
+ color: rgba(127, 91, 243, 0.9);
304
304
  text-decoration: none;
305
305
  cursor: pointer;
306
306
  }
307
307
  .badge a {
308
- color: royalblue;
308
+ color: rgba(127, 91, 243, 0.9);
309
309
  text-decoration: none;
310
310
  }
311
311
  body.dark .btn {
@@ -425,7 +425,7 @@ body.dark .open-menu, body.dark .browse {
425
425
  color: white !important;
426
426
  }
427
427
  .open-menu:hover, .browse:hover, body.dark .open-menu:hover, body.dark .browse:hover {
428
- color: royalblue !important;
428
+ color: rgba(127, 91, 243, 0.9) !important;
429
429
  }
430
430
  .open-menu, .browse {
431
431
  width: 80px;
@@ -511,7 +511,7 @@ body.dark aside .tab {
511
511
  color: white;
512
512
  }
513
513
  body.dark aside .tab:hover, aside .tab:hover {
514
- color: royalblue !important;
514
+ color: rgba(127, 91, 243, 0.9) !important;
515
515
  opacity: 1;
516
516
  }
517
517
  aside .tab {
@@ -550,7 +550,7 @@ aside .selected {
550
550
  gap: 15px;
551
551
  }
552
552
  .tab:hover {
553
- color: royalblue;
553
+ color: rgba(127, 91, 243, 0.9);
554
554
  }
555
555
  .tab-content .tab {
556
556
  text-decoration: none;
@@ -622,7 +622,7 @@ body.dark .tab {
622
622
  padding: 0;
623
623
  }
624
624
  body.dark .net:hover, .net:hover {
625
- color: royalblue;
625
+ color: rgba(127, 91, 243, 0.9);
626
626
  }
627
627
  body.dark .net {
628
628
  /*
@@ -814,7 +814,6 @@ document.addEventListener('DOMContentLoaded', function() {
814
814
  <header class='navheader grabbable'>
815
815
  <h1>
816
816
  <a class='home' href="/"><img class='icon' src="/pinokio-black.png"></a>
817
- <button id='collapse' class='btn2' data-tippy-content="toggle fullscreen view"><i class="fa-solid fa-bars"></i></button>
818
817
  <button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
819
818
  <button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
820
819
  <button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
@@ -822,7 +821,7 @@ document.addEventListener('DOMContentLoaded', function() {
822
821
  <button class='btn2 mobile-link-button' id='mobile-link-button' data-tippy-content="enter url"><i class="fa-solid fa-link"></i></button>
823
822
  <form class='urlbar'>
824
823
  <div class='url-input-container'>
825
- <input type='url' placeholder='enter a local url'>
824
+ <input type='url' placeholder='enter any local url to open in pinokio'>
826
825
  <div class='url-dropdown' id='url-dropdown'></div>
827
826
  </div>
828
827
  </form>
@@ -935,8 +934,8 @@ document.addEventListener('DOMContentLoaded', function() {
935
934
  </div>
936
935
  <aside>
937
936
  <div class='btn-tab'>
938
- <a href="/init" class='btn'><i class="fa-solid fa-plus"></i><div class='caption'>Create</div></a>
939
- <a class='btn' id='explore' href="/?mode=explore"><i class="fa-solid fa-globe"></i><div class='caption'>Discover</div></a>
937
+ <button type='button' class='btn' id='create-launcher-button'><i class="fa-solid fa-plus"></i><div class='caption'>Create</div></button>
938
+ <a class='btn' id='explore' href="/home?mode=explore"><i class="fa-solid fa-globe"></i><div class='caption'>Discover</div></a>
940
939
  </div>
941
940
  <a href="/" class='tab'><i class='fas fa-laptop-code'></i><div class='caption'>This machine</div></a>
942
941
  <a href="/network" class='tab'><i class="fa-solid fa-wifi"></i><div class='caption'>Local network</div></a>
@@ -952,7 +951,7 @@ document.addEventListener('DOMContentLoaded', function() {
952
951
  <a id='downloadlogs' download class='hidden btn2' href="/pinokio/logs.zip"><i class="fa-solid fa-download"></i><div class='caption'>Download logs</div></a>
953
952
  <a class='tab' href="/screenshots"><i class="fa-solid fa-camera"></i><div class='caption'>Screenshots</div></a>
954
953
  <a class='tab' href="/tools"><i class="fa-solid fa-toolbox"></i><div class='caption'>Installed Tools</div></a>
955
- <a class='tab' href="/?mode=settings"><i class="fa-solid fa-gear"></i><div class='caption'>Settings</div></a>
954
+ <a class='tab' href="/home?mode=settings"><i class="fa-solid fa-gear"></i><div class='caption'>Settings</div></a>
956
955
  </aside>
957
956
  </main>
958
957
  </body>
@@ -152,7 +152,7 @@ body.dark .item select {
152
152
  }
153
153
  .item .title {
154
154
  text-decoration: none;
155
- color: royalblue;
155
+ color: rgba(127, 91, 243, 0.9);
156
156
  }
157
157
  .item .col {
158
158
  padding: 10px;
@@ -265,7 +265,7 @@ body.dark aside .tab {
265
265
  color: white;
266
266
  }
267
267
  body.dark aside .tab:hover, aside .tab:hover {
268
- color: royalblue !important;
268
+ color: rgba(127, 91, 243, 0.9) !important;
269
269
  opacity: 1;
270
270
  }
271
271
  aside .tab {
@@ -328,7 +328,6 @@ iframe {
328
328
  <header class='navheader grabbable'>
329
329
  <h1>
330
330
  <a class='home' href="/"><img class='icon' src="/pinokio-black.png"></a>
331
- <button id='collapse' class='btn2' data-tippy-content="toggle fullscreen view"><i class="fa-solid fa-bars"></i></button>
332
331
  <button class='btn2' id='back' data-tippy-content="back"><div><i class="fa-solid fa-chevron-left"></i></div></button>
333
332
  <button class='btn2' id='forward' data-tippy-content="forward"><div><i class="fa-solid fa-chevron-right"></i></div></button>
334
333
  <button class='btn2' id='refresh-page' data-tippy-content="refresh"><div><i class="fa-solid fa-rotate-right"></i></div></button>
@@ -336,7 +335,7 @@ iframe {
336
335
  <button class='btn2 mobile-link-button' id='mobile-link-button' data-tippy-content="enter url"><i class="fa-solid fa-link"></i></button>
337
336
  <form class='urlbar'>
338
337
  <div class='url-input-container'>
339
- <input type='url' placeholder='enter a local url' value="<%=src%>">
338
+ <input type='url' placeholder='enter any local url to open in pinokio' value="<%=src%>">
340
339
  <div class='url-dropdown' id='url-dropdown'></div>
341
340
  </div>
342
341
  </form>