pinokiod 7.2.17 → 7.3.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.
- package/Dockerfile +2 -0
- package/kernel/api/index.js +1 -42
- package/kernel/api/process/index.js +44 -99
- package/kernel/bin/conda-python.js +30 -0
- package/kernel/bin/conda.js +22 -3
- package/kernel/bin/index.js +11 -1
- package/kernel/environment.js +2 -182
- package/kernel/git.js +13 -0
- package/kernel/index.js +1 -64
- package/kernel/plugin.js +58 -6
- package/kernel/shell.js +2 -21
- package/kernel/util.js +0 -60
- package/package.json +1 -1
- package/server/index.js +149 -176
- package/server/lib/content_validation.js +25 -28
- package/server/public/common.js +29 -103
- package/server/public/create-launcher.js +31 -4
- package/server/public/electron.css +6 -0
- package/server/public/style.css +0 -337
- package/server/public/task-launcher.js +32 -5
- package/server/public/universal-launcher.js +26 -3
- package/server/socket.js +11 -22
- package/server/views/app.ejs +30 -167
- package/server/views/d.ejs +33 -0
- package/server/views/editor.ejs +4 -25
- package/server/views/partials/main_sidebar.ejs +0 -1
- package/server/views/shell.ejs +3 -11
- package/server/views/terminal.ejs +3 -23
- package/server/views/terminals.ejs +0 -1
- package/spec/INSTRUCTION_SYNC.md +5 -5
- package/kernel/api/shell_run_template.js +0 -273
- package/kernel/api/uri/index.js +0 -51
- package/kernel/plugin_sources.js +0 -236
- package/kernel/watch/context.js +0 -42
- package/kernel/watch/drivers/fs.js +0 -71
- package/kernel/watch/drivers/poll.js +0 -33
- package/kernel/watch/index.js +0 -158
- package/server/features/drafts/index.js +0 -41
- package/server/features/drafts/parser.js +0 -169
- package/server/features/drafts/public/drafts.js +0 -1504
- package/server/features/drafts/registry_import.js +0 -412
- package/server/features/drafts/routes.js +0 -68
- package/server/features/drafts/service.js +0 -261
- package/server/features/drafts/watcher.js +0 -76
- package/server/features/index.js +0 -13
- package/server/lib/workspace_catalog.js +0 -151
- package/server/lib/workspace_runtime.js +0 -390
- package/server/routes/workspaces.js +0 -44
- package/server/views/partials/workspace_row.ejs +0 -61
- package/server/views/workspaces.ejs +0 -812
- package/system/plugin/antigravity/antigravity.png +0 -0
- package/system/plugin/antigravity/pinokio.js +0 -37
- package/system/plugin/claude/claude.png +0 -0
- package/system/plugin/claude/pinokio.js +0 -63
- package/system/plugin/claude-auto/claude.png +0 -0
- package/system/plugin/claude-auto/pinokio.js +0 -74
- package/system/plugin/claude-desktop/icon.jpeg +0 -0
- package/system/plugin/claude-desktop/pinokio.js +0 -39
- package/system/plugin/codex/openai.webp +0 -0
- package/system/plugin/codex/pinokio.js +0 -58
- package/system/plugin/codex-auto/openai.webp +0 -0
- package/system/plugin/codex-auto/pinokio.js +0 -65
- package/system/plugin/codex-desktop/icon.png +0 -0
- package/system/plugin/codex-desktop/pinokio.js +0 -39
- package/system/plugin/crush/crush.png +0 -0
- package/system/plugin/crush/pinokio.js +0 -31
- package/system/plugin/cursor/cursor.jpeg +0 -0
- package/system/plugin/cursor/pinokio.js +0 -39
- package/system/plugin/gemini/gemini.jpeg +0 -0
- package/system/plugin/gemini/pinokio.js +0 -40
- package/system/plugin/gemini-auto/gemini.jpeg +0 -0
- package/system/plugin/gemini-auto/pinokio.js +0 -43
- package/system/plugin/qwen/pinokio.js +0 -50
- package/system/plugin/qwen/qwen.png +0 -0
- package/system/plugin/vscode/pinokio.js +0 -36
- package/system/plugin/vscode/vscode.png +0 -0
- package/system/plugin/windsurf/pinokio.js +0 -39
- package/system/plugin/windsurf/windsurf.png +0 -0
package/server/views/app.ejs
CHANGED
|
@@ -5288,7 +5288,6 @@ header.navheader .mode-selector .community-mode-toggle {
|
|
|
5288
5288
|
</a>
|
|
5289
5289
|
<%})%>
|
|
5290
5290
|
</div>
|
|
5291
|
-
<div class='active-nested-path hidden' id='active-nested-path'></div>
|
|
5292
5291
|
</div>
|
|
5293
5292
|
<div class='menu-actions'>
|
|
5294
5293
|
<% if (type === 'run') { %>
|
|
@@ -6315,7 +6314,7 @@ header.navheader .mode-selector .community-mode-toggle {
|
|
|
6315
6314
|
const href = typeof launch.href === "string" ? launch.href : ""
|
|
6316
6315
|
try {
|
|
6317
6316
|
const parsed = new URL(href, window.location.origin)
|
|
6318
|
-
if (parsed.pathname.startsWith("/run/plugin/") ||
|
|
6317
|
+
if (parsed.pathname.startsWith("/run/plugin/") || (parsed.pathname.startsWith("/run/api/") && /\/pinokio\.js$/i.test(parsed.pathname))) {
|
|
6319
6318
|
const parts = parsed.pathname.split("/").filter(Boolean)
|
|
6320
6319
|
const pluginSlug = parts.length >= 2 ? parts[parts.length - 2] : ""
|
|
6321
6320
|
const pluginLabel = titleCaseSlug(pluginSlug)
|
|
@@ -7185,7 +7184,6 @@ const rerenderMenuSection = (container, html) => {
|
|
|
7185
7184
|
}
|
|
7186
7185
|
|
|
7187
7186
|
if (!target) {
|
|
7188
|
-
activeNestedFocusMenu = null
|
|
7189
7187
|
syncActiveNestedPath()
|
|
7190
7188
|
browserPopoutSurface.hide()
|
|
7191
7189
|
document.querySelector(".container").classList.remove("active")
|
|
@@ -7219,7 +7217,6 @@ const rerenderMenuSection = (container, html) => {
|
|
|
7219
7217
|
el.classList.remove("selected")
|
|
7220
7218
|
})
|
|
7221
7219
|
target.classList.add("selected")
|
|
7222
|
-
activeNestedFocusMenu = null
|
|
7223
7220
|
syncActiveNestedPath({ selectedLink: target })
|
|
7224
7221
|
if (skipPersistedSelection && target.hasAttribute('data-default')) {
|
|
7225
7222
|
ignorePersistedSelection = false
|
|
@@ -8055,162 +8052,7 @@ const rerenderMenuSection = (container, html) => {
|
|
|
8055
8052
|
|
|
8056
8053
|
const getSubmenu = (menu) => getDirectChild(menu, ".submenu")
|
|
8057
8054
|
const getToggle = (menu) => getDirectChild(menu, ".reveal")
|
|
8058
|
-
const
|
|
8059
|
-
const activeNestedProxyMap = new WeakMap()
|
|
8060
|
-
let activeNestedFocusMenu = null
|
|
8061
|
-
|
|
8062
|
-
const getNestedMenuChain = (node) => {
|
|
8063
|
-
if (!node) {
|
|
8064
|
-
return []
|
|
8065
|
-
}
|
|
8066
|
-
let current = node
|
|
8067
|
-
if (!current.classList || !current.classList.contains("nested-menu")) {
|
|
8068
|
-
current = current.closest(".nested-menu")
|
|
8069
|
-
}
|
|
8070
|
-
const chain = []
|
|
8071
|
-
while (current) {
|
|
8072
|
-
chain.unshift(current)
|
|
8073
|
-
current = current.parentElement ? current.parentElement.closest(".nested-menu") : null
|
|
8074
|
-
}
|
|
8075
|
-
return chain
|
|
8076
|
-
}
|
|
8077
|
-
|
|
8078
|
-
const sanitizeActiveNestedProxy = (proxy) => {
|
|
8079
|
-
if (!proxy) {
|
|
8080
|
-
return null
|
|
8081
|
-
}
|
|
8082
|
-
proxy.removeAttribute("id")
|
|
8083
|
-
proxy.classList.remove("frame-link", "selected", "tab-link-popover-host")
|
|
8084
|
-
proxy.classList.add("active-nested-proxy")
|
|
8085
|
-
proxy.setAttribute("data-active-nested-proxy", "true")
|
|
8086
|
-
proxy.querySelectorAll(".tab-link-popover-trigger").forEach((node) => {
|
|
8087
|
-
node.remove()
|
|
8088
|
-
})
|
|
8089
|
-
return proxy
|
|
8090
|
-
}
|
|
8091
|
-
|
|
8092
|
-
const buildActiveNestedProxy = (child, isCurrent) => {
|
|
8093
|
-
if (!child) {
|
|
8094
|
-
return null
|
|
8095
|
-
}
|
|
8096
|
-
let proxy
|
|
8097
|
-
if (child.classList && child.classList.contains("nested-menu")) {
|
|
8098
|
-
const toggle = getToggle(child)
|
|
8099
|
-
if (!toggle) {
|
|
8100
|
-
return null
|
|
8101
|
-
}
|
|
8102
|
-
proxy = toggle.cloneNode(true)
|
|
8103
|
-
} else {
|
|
8104
|
-
proxy = child.cloneNode(true)
|
|
8105
|
-
}
|
|
8106
|
-
sanitizeActiveNestedProxy(proxy)
|
|
8107
|
-
if (child.classList && child.classList.contains("nested-menu")) {
|
|
8108
|
-
const loader = proxy.querySelector(".loader")
|
|
8109
|
-
if (loader) {
|
|
8110
|
-
loader.innerHTML = `<i class="fa-solid ${isCurrent ? "fa-angle-down" : "fa-angle-right"}"></i>`
|
|
8111
|
-
}
|
|
8112
|
-
}
|
|
8113
|
-
proxy.classList.toggle("is-current", Boolean(isCurrent))
|
|
8114
|
-
activeNestedProxyMap.set(proxy, child)
|
|
8115
|
-
return proxy
|
|
8116
|
-
}
|
|
8117
|
-
|
|
8118
|
-
const syncActiveNestedPath = ({ selectedLink = null } = {}) => {
|
|
8119
|
-
if (!activeNestedPathRoot) {
|
|
8120
|
-
return
|
|
8121
|
-
}
|
|
8122
|
-
if (activeNestedFocusMenu && !activeNestedFocusMenu.isConnected) {
|
|
8123
|
-
activeNestedFocusMenu = null
|
|
8124
|
-
}
|
|
8125
|
-
const currentSelectedLink = (selectedLink && selectedLink.isConnected)
|
|
8126
|
-
? selectedLink
|
|
8127
|
-
: document.querySelector("aside .frame-link.selected")
|
|
8128
|
-
const chain = activeNestedFocusMenu
|
|
8129
|
-
? getNestedMenuChain(activeNestedFocusMenu)
|
|
8130
|
-
: getNestedMenuChain(currentSelectedLink)
|
|
8131
|
-
|
|
8132
|
-
activeNestedPathRoot.replaceChildren()
|
|
8133
|
-
|
|
8134
|
-
if (!chain.length) {
|
|
8135
|
-
activeNestedPathRoot.classList.add("hidden")
|
|
8136
|
-
if (window.PinokioMenuScrollHints && typeof window.PinokioMenuScrollHints.update === "function") {
|
|
8137
|
-
window.PinokioMenuScrollHints.update()
|
|
8138
|
-
}
|
|
8139
|
-
return
|
|
8140
|
-
}
|
|
8141
|
-
|
|
8142
|
-
chain.forEach((menu, index) => {
|
|
8143
|
-
const submenu = getSubmenu(menu)
|
|
8144
|
-
if (!submenu) {
|
|
8145
|
-
return
|
|
8146
|
-
}
|
|
8147
|
-
const row = document.createElement("div")
|
|
8148
|
-
row.className = "m active-nested-row"
|
|
8149
|
-
row.dataset.activeNestedLevel = String(index)
|
|
8150
|
-
const nextMenu = chain[index + 1] || null
|
|
8151
|
-
|
|
8152
|
-
Array.from(submenu.children).forEach((child) => {
|
|
8153
|
-
let isCurrent = false
|
|
8154
|
-
if (child.classList && child.classList.contains("nested-menu")) {
|
|
8155
|
-
isCurrent = child === nextMenu || (!nextMenu && currentSelectedLink ? child.contains(currentSelectedLink) : false)
|
|
8156
|
-
} else {
|
|
8157
|
-
isCurrent = child === currentSelectedLink
|
|
8158
|
-
}
|
|
8159
|
-
const proxy = buildActiveNestedProxy(child, isCurrent)
|
|
8160
|
-
if (proxy) {
|
|
8161
|
-
row.appendChild(proxy)
|
|
8162
|
-
}
|
|
8163
|
-
})
|
|
8164
|
-
|
|
8165
|
-
if (row.childElementCount > 0) {
|
|
8166
|
-
activeNestedPathRoot.appendChild(row)
|
|
8167
|
-
}
|
|
8168
|
-
})
|
|
8169
|
-
|
|
8170
|
-
if (!activeNestedPathRoot.childElementCount) {
|
|
8171
|
-
activeNestedPathRoot.classList.add("hidden")
|
|
8172
|
-
if (window.PinokioMenuScrollHints && typeof window.PinokioMenuScrollHints.update === "function") {
|
|
8173
|
-
window.PinokioMenuScrollHints.update()
|
|
8174
|
-
}
|
|
8175
|
-
return
|
|
8176
|
-
}
|
|
8177
|
-
|
|
8178
|
-
activeNestedPathRoot.classList.remove("hidden")
|
|
8179
|
-
const currentProxy = activeNestedPathRoot.querySelector(".active-nested-proxy.is-current")
|
|
8180
|
-
if (currentProxy && typeof currentProxy.scrollIntoView === "function") {
|
|
8181
|
-
currentProxy.scrollIntoView({
|
|
8182
|
-
block: "nearest",
|
|
8183
|
-
inline: "nearest"
|
|
8184
|
-
})
|
|
8185
|
-
}
|
|
8186
|
-
if (window.PinokioMenuScrollHints && typeof window.PinokioMenuScrollHints.update === "function") {
|
|
8187
|
-
window.PinokioMenuScrollHints.update()
|
|
8188
|
-
}
|
|
8189
|
-
}
|
|
8190
|
-
|
|
8191
|
-
if (activeNestedPathRoot) {
|
|
8192
|
-
activeNestedPathRoot.addEventListener("click", (event) => {
|
|
8193
|
-
const proxy = event.target.closest("[data-active-nested-proxy='true']")
|
|
8194
|
-
if (!proxy || !activeNestedPathRoot.contains(proxy)) {
|
|
8195
|
-
return
|
|
8196
|
-
}
|
|
8197
|
-
const source = activeNestedProxyMap.get(proxy)
|
|
8198
|
-
if (!source || !source.isConnected) {
|
|
8199
|
-
return
|
|
8200
|
-
}
|
|
8201
|
-
event.preventDefault()
|
|
8202
|
-
event.stopPropagation()
|
|
8203
|
-
if (source.classList && source.classList.contains("nested-menu")) {
|
|
8204
|
-
activeNestedFocusMenu = source
|
|
8205
|
-
syncActiveNestedPath()
|
|
8206
|
-
return
|
|
8207
|
-
}
|
|
8208
|
-
activeNestedFocusMenu = null
|
|
8209
|
-
if (typeof source.click === "function") {
|
|
8210
|
-
source.click()
|
|
8211
|
-
}
|
|
8212
|
-
})
|
|
8213
|
-
}
|
|
8055
|
+
const syncActiveNestedPath = () => {}
|
|
8214
8056
|
|
|
8215
8057
|
renderSelection()
|
|
8216
8058
|
|
|
@@ -13091,6 +12933,32 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
13091
12933
|
const defaultWorkspaceCwd = drawer.dataset.workspaceCwd || ""
|
|
13092
12934
|
const widthKey = "pinokio.ask_ai.width"
|
|
13093
12935
|
const ASK_AI_MIN_WIDTH = 240
|
|
12936
|
+
const ASK_AI_FALLBACK_TOOLS = [
|
|
12937
|
+
{
|
|
12938
|
+
value: "claude",
|
|
12939
|
+
label: "Claude Code",
|
|
12940
|
+
iconSrc: "/asset/plugin/code/claude/claude.png",
|
|
12941
|
+
href: "/run/plugin/code/claude/pinokio.js",
|
|
12942
|
+
category: "CLI",
|
|
12943
|
+
isDefault: true
|
|
12944
|
+
},
|
|
12945
|
+
{
|
|
12946
|
+
value: "codex",
|
|
12947
|
+
label: "OpenAI Codex",
|
|
12948
|
+
iconSrc: "/asset/plugin/code/codex/openai.webp",
|
|
12949
|
+
href: "/run/plugin/code/codex/pinokio.js",
|
|
12950
|
+
category: "IDE",
|
|
12951
|
+
isDefault: false
|
|
12952
|
+
},
|
|
12953
|
+
{
|
|
12954
|
+
value: "gemini",
|
|
12955
|
+
label: "Google Gemini CLI",
|
|
12956
|
+
iconSrc: "/asset/plugin/code/gemini/gemini.jpeg",
|
|
12957
|
+
href: "/run/plugin/code/gemini/pinokio.js",
|
|
12958
|
+
category: "CLI",
|
|
12959
|
+
isDefault: false
|
|
12960
|
+
}
|
|
12961
|
+
]
|
|
13094
12962
|
|
|
13095
12963
|
let open = false
|
|
13096
12964
|
let currentUrl = ""
|
|
@@ -13218,7 +13086,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
13218
13086
|
}
|
|
13219
13087
|
if (
|
|
13220
13088
|
parsed.pathname.startsWith("/run/plugin/")
|
|
13221
|
-
|| parsed.pathname.startsWith("/pinokio/run/plugin/")
|
|
13222
13089
|
|| (parsed.pathname.startsWith("/run/api/") && /\/pinokio\.js$/i.test(parsed.pathname))
|
|
13223
13090
|
) {
|
|
13224
13091
|
if (workspaceCwd && !parsed.searchParams.has("cwd")) {
|
|
@@ -13283,7 +13150,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
13283
13150
|
return null
|
|
13284
13151
|
}
|
|
13285
13152
|
const isPluginLauncher = parsed.pathname.startsWith("/run/plugin/")
|
|
13286
|
-
|| parsed.pathname.startsWith("/pinokio/run/plugin/")
|
|
13287
13153
|
|| (parsed.pathname.startsWith("/run/api/") && /\/pinokio\.js$/i.test(parsed.pathname))
|
|
13288
13154
|
if (parsed.origin !== window.location.origin || !isPluginLauncher) {
|
|
13289
13155
|
return null
|
|
@@ -13334,12 +13200,9 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
13334
13200
|
})
|
|
13335
13201
|
.then((payload) => {
|
|
13336
13202
|
const mapped = mapPluginMenuToAskAiTools(payload && Array.isArray(payload.menu) ? payload.menu : [])
|
|
13337
|
-
return mapped
|
|
13338
|
-
})
|
|
13339
|
-
.catch((error) => {
|
|
13340
|
-
console.warn("Failed to load Ask AI plugins", error)
|
|
13341
|
-
return []
|
|
13203
|
+
return mapped.length > 0 ? mapped : ASK_AI_FALLBACK_TOOLS.slice()
|
|
13342
13204
|
})
|
|
13205
|
+
.catch(() => ASK_AI_FALLBACK_TOOLS.slice())
|
|
13343
13206
|
.finally(() => {
|
|
13344
13207
|
askAiToolsPromise = null
|
|
13345
13208
|
})
|
package/server/views/d.ejs
CHANGED
|
@@ -544,6 +544,19 @@ body.dark #update-spec {
|
|
|
544
544
|
<form class='search'>
|
|
545
545
|
<input type='search' class="flexible" placeholder='Filter tools'>
|
|
546
546
|
</form>
|
|
547
|
+
<!--
|
|
548
|
+
<header>
|
|
549
|
+
<h1>Build</h1>
|
|
550
|
+
<div class='flexible'></div>
|
|
551
|
+
<a class='btn' href="https://github.com/pinokiocomputer/code/issues" target="_blank"><i class="fa-solid fa-up-right-from-square"></i> Request a tool</a>
|
|
552
|
+
<a class='btn' id='git-pull'><i class="fa-solid fa-rotate"></i> Check for new tools</a>
|
|
553
|
+
<div class='pulling hidden'>
|
|
554
|
+
<div class='loading'>
|
|
555
|
+
<i class="fa-solid fa-circle-notch fa-spin"></i> refreshing...
|
|
556
|
+
</div>
|
|
557
|
+
</div>
|
|
558
|
+
</header>
|
|
559
|
+
-->
|
|
547
560
|
<div class='spec'>
|
|
548
561
|
<div class='explain'>
|
|
549
562
|
<h3><i class="fa-regular fa-circle-check"></i> TODO</h3>
|
|
@@ -745,6 +758,26 @@ setTimeout(() => {
|
|
|
745
758
|
}, 2000)
|
|
746
759
|
<% } %>
|
|
747
760
|
/*
|
|
761
|
+
document.querySelector("#git-pull").addEventListener("click", (e) => {
|
|
762
|
+
e.preventDefault()
|
|
763
|
+
e.stopPropagation()
|
|
764
|
+
document.querySelector(".pulling").classList.remove("hidden")
|
|
765
|
+
document.querySelector("#git-pull").classList.add("hidden")
|
|
766
|
+
fetch("/plugin/update", {
|
|
767
|
+
method: "POST"
|
|
768
|
+
}).then((res) => {
|
|
769
|
+
return res.json()
|
|
770
|
+
}).then((res) => {
|
|
771
|
+
if (res.success) {
|
|
772
|
+
location.href = location.href
|
|
773
|
+
} else if(res.error) {
|
|
774
|
+
document.querySelector("#git-pull").classList.remove("hidden")
|
|
775
|
+
alert(res.error)
|
|
776
|
+
}
|
|
777
|
+
})
|
|
778
|
+
})
|
|
779
|
+
*/
|
|
780
|
+
/*
|
|
748
781
|
const resize = (textarea) => {
|
|
749
782
|
textarea.style.height = "";
|
|
750
783
|
textarea.style.height = textarea.scrollHeight + "px";
|
package/server/views/editor.ejs
CHANGED
|
@@ -143,7 +143,6 @@ body.frozen {
|
|
|
143
143
|
<script>
|
|
144
144
|
let shell_id
|
|
145
145
|
document.addEventListener("DOMContentLoaded", async () => {
|
|
146
|
-
const readOnly = <%= readonly ? "true" : "false" %>;
|
|
147
146
|
<% if (error) { %>
|
|
148
147
|
document.querySelector(".requirements .content").innerHTML = '<div class="loading"><i class="fa-solid fa-circle-exclamation"></i> <%=error%></div>'
|
|
149
148
|
<% } %>
|
|
@@ -196,7 +195,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
196
195
|
// maxLines: Infinity, // set to a large number
|
|
197
196
|
minLines: 1 // set to a small number
|
|
198
197
|
});
|
|
199
|
-
editor.setReadOnly(readOnly);
|
|
200
198
|
console.log("location.pathname", location.pathname)
|
|
201
199
|
<% if (mod) { %>
|
|
202
200
|
<% if (js) { %>
|
|
@@ -233,9 +231,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
233
231
|
let str;
|
|
234
232
|
let original = editor.getValue()
|
|
235
233
|
editor.getSession().on("change", () => {
|
|
236
|
-
if (readOnly) {
|
|
237
|
-
return
|
|
238
|
-
}
|
|
239
234
|
let v = editor.getValue()
|
|
240
235
|
if (original === v) {
|
|
241
236
|
dirty = false
|
|
@@ -248,10 +243,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
248
243
|
});
|
|
249
244
|
<% } %>
|
|
250
245
|
const n = new N()
|
|
251
|
-
const activeProcessWait = <% if (typeof active_process_wait !== 'undefined' && active_process_wait) { %><%- JSON.stringify(active_process_wait) %><% } else { %>null<% } %>
|
|
252
|
-
if (activeProcessWait && (activeProcessWait.title || activeProcessWait.description) && window.PinokioWaitFooterStatus) {
|
|
253
|
-
window.PinokioWaitFooterStatus.show(activeProcessWait)
|
|
254
|
-
}
|
|
255
246
|
class RPC {
|
|
256
247
|
constructor() {
|
|
257
248
|
this.socket = new Socket()
|
|
@@ -284,10 +275,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
284
275
|
}
|
|
285
276
|
save() {
|
|
286
277
|
return new Promise((resolve, reject) => {
|
|
287
|
-
if (readOnly) {
|
|
288
|
-
resolve()
|
|
289
|
-
return
|
|
290
|
-
}
|
|
291
278
|
let cwd = "<%-JSON.stringify(execUrl).slice(1, -1)%>"
|
|
292
279
|
//let cwd = "<%=execUrl%>"
|
|
293
280
|
//let cwd = "~" + location.pathname
|
|
@@ -333,12 +320,12 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
333
320
|
if (packet.type === 'start') {
|
|
334
321
|
// refreshParent(packet)
|
|
335
322
|
reloadMemory()
|
|
336
|
-
if (packet.data &&
|
|
323
|
+
if (packet.data && packet.data.description) {
|
|
337
324
|
if ('current' in packet.data) {
|
|
338
325
|
document.querySelector("footer").innerHTML = `<b>
|
|
339
326
|
<i class="fa-solid fa-circle-notch fa-spin"></i>(${packet.data.current+1}/${packet.data.total}) ${packet.data.title ? packet.data.title : ''}
|
|
340
327
|
</b>
|
|
341
|
-
<div class='flexible content'>${packet.data.description
|
|
328
|
+
<div class='flexible content'>${packet.data.description}</div>`
|
|
342
329
|
// <div class='toggle-expand'>
|
|
343
330
|
// <i class="fa-solid fa-circle-chevron-up"></i>
|
|
344
331
|
// </div>`
|
|
@@ -346,7 +333,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
346
333
|
document.querySelector("footer").innerHTML = `<b>
|
|
347
334
|
<i class="fa-solid fa-circle-notch fa-spin"></i> ${packet.data.title ? packet.data.title : ''}
|
|
348
335
|
</b>
|
|
349
|
-
<div class='flexible content'
|
|
336
|
+
<div class='flexible content'></div>`
|
|
350
337
|
// <div class='toggle-expand'>
|
|
351
338
|
// <i class="fa-solid fa-circle-chevron-up"></i>
|
|
352
339
|
// </div>`
|
|
@@ -445,14 +432,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
445
432
|
response: {},
|
|
446
433
|
uri: packet.id
|
|
447
434
|
})
|
|
448
|
-
} else if (packet.type === "process.wait.start") {
|
|
449
|
-
if (window.PinokioWaitFooterStatus) {
|
|
450
|
-
window.PinokioWaitFooterStatus.show(packet.data)
|
|
451
|
-
}
|
|
452
|
-
} else if (packet.type === "process.wait.end") {
|
|
453
|
-
if (window.PinokioWaitFooterStatus) {
|
|
454
|
-
window.PinokioWaitFooterStatus.hide()
|
|
455
|
-
}
|
|
456
435
|
} else if (packet.type === 'wait') {
|
|
457
436
|
await WaitModal(packet.data)
|
|
458
437
|
} else if (packet.type === "htmlmodal") {
|
|
@@ -980,7 +959,7 @@ const reloadMemory = async () => {
|
|
|
980
959
|
<!--
|
|
981
960
|
<button class='btn' id='source' data-editor-url="<%=editorUrl%>">Navigate</button>
|
|
982
961
|
-->
|
|
983
|
-
<div id='save' class='btn disabled
|
|
962
|
+
<div id='save' class='btn disabled'>
|
|
984
963
|
<span class='save'><i class="fa-solid fa-check"></i> Save</span>
|
|
985
964
|
</div>
|
|
986
965
|
</div>
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
</button>
|
|
28
28
|
</div>
|
|
29
29
|
<a href="/home" class="tab <%= sidebarSelected === 'home' ? 'selected' : '' %>" data-tippy-content="This machine"><i class='fas fa-laptop-code'></i><div class='caption'>This machine</div></a>
|
|
30
|
-
<a href="/workspaces" class="tab <%= sidebarSelected === 'workspaces' ? 'selected' : '' %>" data-tippy-content="Workspaces"><i class="fa-solid fa-folder-tree"></i><div class='caption'>Workspaces</div></a>
|
|
31
30
|
<a href="/network" class="tab <%= sidebarSelected === 'network' ? 'selected' : '' %>" data-tippy-content="Local network"><i class="fa-solid fa-wifi"></i><div class='caption'>Local network</div></a>
|
|
32
31
|
<% if (sidebarList.length > 0) { %>
|
|
33
32
|
<% sidebarList.forEach(({ host, name, platform }) => { %>
|
package/server/views/shell.ejs
CHANGED
|
@@ -621,12 +621,12 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
621
621
|
document.querySelector(".play-btn").classList.add("hidden")
|
|
622
622
|
document.querySelector(".starting-btn").classList.add("hidden")
|
|
623
623
|
document.querySelector(".stop-btn").classList.remove("hidden")
|
|
624
|
-
if (packet.data &&
|
|
624
|
+
if (packet.data && packet.data.description) {
|
|
625
625
|
if ('current' in packet.data) {
|
|
626
626
|
document.querySelector("footer").innerHTML = `<b>
|
|
627
627
|
<i class="fa-solid fa-circle-notch fa-spin"></i>(${packet.data.current+1}/${packet.data.total}) ${packet.data.title ? packet.data.title : ''}
|
|
628
628
|
</b>
|
|
629
|
-
<div class='flexible content'>${packet.data.description
|
|
629
|
+
<div class='flexible content'>${packet.data.description}</div>`
|
|
630
630
|
// <div class='toggle-expand'>
|
|
631
631
|
// <i class="fa-solid fa-circle-chevron-up"></i>
|
|
632
632
|
// </div>`
|
|
@@ -634,7 +634,7 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
634
634
|
document.querySelector("footer").innerHTML = `<b>
|
|
635
635
|
<i class="fa-solid fa-circle-notch fa-spin"></i> ${packet.data.title ? packet.data.title : ''}
|
|
636
636
|
</b>
|
|
637
|
-
<div class='flexible content'
|
|
637
|
+
<div class='flexible content'></div>`
|
|
638
638
|
// <div class='toggle-expand'>
|
|
639
639
|
// <i class="fa-solid fa-circle-chevron-up"></i>
|
|
640
640
|
// </div>`
|
|
@@ -734,14 +734,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
734
734
|
// uri: "~" + location.pathname,
|
|
735
735
|
uri: packet.id
|
|
736
736
|
})
|
|
737
|
-
} else if (packet.type === "process.wait.start") {
|
|
738
|
-
if (window.PinokioWaitFooterStatus) {
|
|
739
|
-
window.PinokioWaitFooterStatus.show(packet.data)
|
|
740
|
-
}
|
|
741
|
-
} else if (packet.type === "process.wait.end") {
|
|
742
|
-
if (window.PinokioWaitFooterStatus) {
|
|
743
|
-
window.PinokioWaitFooterStatus.hide()
|
|
744
|
-
}
|
|
745
737
|
} else if (packet.type === 'wait') {
|
|
746
738
|
await WaitModal(packet.data)
|
|
747
739
|
} else if (packet.type === "htmlmodal") {
|
|
@@ -1232,10 +1232,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
1232
1232
|
const scriptAction = <% if (typeof action !== 'undefined') { %><%- JSON.stringify(action) %><% } else { %>null<% } %>
|
|
1233
1233
|
const protectionAppId = <% if (typeof protection_app_id !== 'undefined' && protection_app_id) { %><%- JSON.stringify(protection_app_id) %><% } else { %>""<% } %>
|
|
1234
1234
|
const initialProtectionEnabled = <% if (typeof protection_enabled !== 'undefined') { %><%- JSON.stringify(protection_enabled === true) %><% } else { %>false<% } %>
|
|
1235
|
-
const activeProcessWait = <% if (typeof active_process_wait !== 'undefined' && active_process_wait) { %><%- JSON.stringify(active_process_wait) %><% } else { %>null<% } %>
|
|
1236
|
-
if (activeProcessWait && (activeProcessWait.title || activeProcessWait.description) && window.PinokioWaitFooterStatus) {
|
|
1237
|
-
window.PinokioWaitFooterStatus.show(activeProcessWait)
|
|
1238
|
-
}
|
|
1239
1235
|
const shouldBypassAiConsent = () => {
|
|
1240
1236
|
const normalize = (value) => (typeof value === "string" ? value.replace(/\\/g, "/") : "")
|
|
1241
1237
|
const uri = normalize(scriptUri || "")
|
|
@@ -1494,17 +1490,17 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
1494
1490
|
refreshParent(packet)
|
|
1495
1491
|
reloadMemory()
|
|
1496
1492
|
runControls.set("running")
|
|
1497
|
-
if (packet.data &&
|
|
1493
|
+
if (packet.data && packet.data.description) {
|
|
1498
1494
|
if ('current' in packet.data) {
|
|
1499
1495
|
document.querySelector("#status-window").innerHTML = `<b>
|
|
1500
1496
|
<i class="fa-solid fa-circle-notch fa-spin"></i>(${packet.data.current+1}/${packet.data.total}) ${packet.data.title ? packet.data.title : ''}
|
|
1501
1497
|
</b>
|
|
1502
|
-
<div class='flexible content'>${packet.data.description
|
|
1498
|
+
<div class='flexible content'>${packet.data.description}</div>`
|
|
1503
1499
|
} else {
|
|
1504
1500
|
document.querySelector("#status-window").innerHTML = `<b>
|
|
1505
1501
|
<i class="fa-solid fa-circle-notch fa-spin"></i> ${packet.data.title ? packet.data.title : ''}
|
|
1506
1502
|
</b>
|
|
1507
|
-
<div class='flexible content'
|
|
1503
|
+
<div class='flexible content'></div>`
|
|
1508
1504
|
// <div class='toggle-expand'>
|
|
1509
1505
|
// <i class="fa-solid fa-circle-chevron-up"></i>
|
|
1510
1506
|
// </div>`
|
|
@@ -1682,14 +1678,6 @@ document.addEventListener("DOMContentLoaded", async () => {
|
|
|
1682
1678
|
// uri: "~" + location.pathname,
|
|
1683
1679
|
uri: packet.id
|
|
1684
1680
|
})
|
|
1685
|
-
} else if (packet.type === "process.wait.start") {
|
|
1686
|
-
if (window.PinokioWaitFooterStatus) {
|
|
1687
|
-
window.PinokioWaitFooterStatus.show(packet.data)
|
|
1688
|
-
}
|
|
1689
|
-
} else if (packet.type === "process.wait.end") {
|
|
1690
|
-
if (window.PinokioWaitFooterStatus) {
|
|
1691
|
-
window.PinokioWaitFooterStatus.hide()
|
|
1692
|
-
}
|
|
1693
1681
|
} else if (packet.type === 'wait') {
|
|
1694
1682
|
await WaitModal(packet.data)
|
|
1695
1683
|
} else if (packet.type === "htmlmodal") {
|
|
@@ -3098,13 +3086,5 @@ const reloadMemory = async () => {
|
|
|
3098
3086
|
</a>
|
|
3099
3087
|
</div>
|
|
3100
3088
|
</div>
|
|
3101
|
-
<% if (typeof draft_watch_enabled !== 'undefined' && draft_watch_enabled) { %>
|
|
3102
|
-
<script>
|
|
3103
|
-
window.PinokioDraftContext = {
|
|
3104
|
-
cwd: <%- JSON.stringify((typeof draft_watch_cwd !== 'undefined' && draft_watch_cwd) ? draft_watch_cwd : '').replace(/</g, '\\u003c') %>
|
|
3105
|
-
};
|
|
3106
|
-
</script>
|
|
3107
|
-
<script src="/drafts.js"></script>
|
|
3108
|
-
<% } %>
|
|
3109
3089
|
</body>
|
|
3110
3090
|
</html>
|
|
@@ -10030,6 +10030,5 @@ body.dark .swal2-popup.pinokio-diff-modal .pinokio-modal-footer--commit .pinokio
|
|
|
10030
10030
|
requestAnimationFrame(setViewport)
|
|
10031
10031
|
})()
|
|
10032
10032
|
</script>
|
|
10033
|
-
<script src="/drafts.js"></script>
|
|
10034
10033
|
</body>
|
|
10035
10034
|
</html>
|
package/spec/INSTRUCTION_SYNC.md
CHANGED
|
@@ -18,6 +18,7 @@ Fix three related problems with minimal behavioral change:
|
|
|
18
18
|
|
|
19
19
|
Paths:
|
|
20
20
|
|
|
21
|
+
- `PINOKIO_HOME/plugin/code`
|
|
21
22
|
- `PINOKIO_HOME/prototype/system`
|
|
22
23
|
- `PINOKIO_HOME/network/system`
|
|
23
24
|
|
|
@@ -31,8 +32,6 @@ Policy:
|
|
|
31
32
|
- On normal startup, bootstrap only if missing.
|
|
32
33
|
- At runtime, if a needed file inside one of these repos is missing, attempt a targeted Git restore for that path only.
|
|
33
34
|
|
|
34
|
-
Built-in plugins are packaged under `pinokiod/system/plugin` and are not cloned, refreshed, or repaired inside `PINOKIO_HOME`.
|
|
35
|
-
|
|
36
35
|
### 2. Managed downloaded instruction sources
|
|
37
36
|
|
|
38
37
|
Paths:
|
|
@@ -110,7 +109,7 @@ Policy:
|
|
|
110
109
|
|
|
111
110
|
Paths:
|
|
112
111
|
|
|
113
|
-
- everything under `PINOKIO_HOME/plugin/*`
|
|
112
|
+
- everything under `PINOKIO_HOME/plugin/*` except `plugin/code`
|
|
114
113
|
- everything under `PINOKIO_HOME/prototype/*` except `prototype/system`, `prototype/PINOKIO.md`, and `prototype/PTERM.md`
|
|
115
114
|
- everything under `PINOKIO_HOME/network/*` except `network/system`
|
|
116
115
|
|
|
@@ -130,6 +129,7 @@ Policy:
|
|
|
130
129
|
|
|
131
130
|
Required behavior:
|
|
132
131
|
|
|
132
|
+
- refresh `plugin/code`
|
|
133
133
|
- refresh `prototype/system`
|
|
134
134
|
- refresh `network/system`
|
|
135
135
|
- refresh `prototype/PINOKIO.md`
|
|
@@ -164,7 +164,7 @@ Ordering requirement:
|
|
|
164
164
|
|
|
165
165
|
- After a version-change cleanup, Pinokio must not rely on the current startup order where `Environment.init({}, kernel)` can run before the async reclone/redownload of managed repos/docs completes.
|
|
166
166
|
- Home output regeneration must either:
|
|
167
|
-
- run after `prototype/system`, `network/system`, `PINOKIO.md`, and `PTERM.md` have been restored
|
|
167
|
+
- run after `plugin/code`, `prototype/system`, `network/system`, `PINOKIO.md`, and `PTERM.md` have been restored
|
|
168
168
|
- or be rerun once those managed inputs are restored
|
|
169
169
|
|
|
170
170
|
### C. Runtime missing-file repair
|
|
@@ -298,7 +298,7 @@ File:
|
|
|
298
298
|
|
|
299
299
|
Changes:
|
|
300
300
|
|
|
301
|
-
-
|
|
301
|
+
- replace whole-folder refresh of `PINOKIO_HOME/plugin` with refresh of `PINOKIO_HOME/plugin/code` only
|
|
302
302
|
- replace whole-folder refresh of `PINOKIO_HOME/prototype` with refresh of:
|
|
303
303
|
- `PINOKIO_HOME/prototype/system`
|
|
304
304
|
- `PINOKIO_HOME/prototype/PINOKIO.md`
|