pinokiod 6.0.18 → 6.0.20
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/kernel/environment.js +55 -1
- package/kernel/shell.js +3 -1
- package/package.json +2 -2
- package/server/index.js +975 -109
- package/server/public/common.js +7 -0
- package/server/public/install.js +1 -1
- package/server/public/style.css +4 -5
- package/server/public/terminal-settings.js +1 -1
- package/server/scripts/fork_gemini_session.js +67 -0
- package/server/views/app.ejs +131 -16
- package/server/views/bootstrap.ejs +1 -1
- package/server/views/editor.ejs +1 -1
- package/server/views/explore.ejs +165 -7
- package/server/views/index.ejs +3 -3
- package/server/views/init/index.ejs +1 -1
- package/server/views/install.ejs +1 -1
- package/server/views/net.ejs +1 -1
- package/server/views/pro.ejs +1 -1
- package/server/views/prototype/index.ejs +1 -1
- package/server/views/shell.ejs +2 -2
- package/server/views/terminal.ejs +1 -1
- package/server/views/terminals.ejs +1579 -278
package/kernel/environment.js
CHANGED
|
@@ -525,6 +525,53 @@ const init = async (options, kernel) => {
|
|
|
525
525
|
} else {
|
|
526
526
|
root = kernel.homedir
|
|
527
527
|
}
|
|
528
|
+
const syncHomeSkillFromAgents = async () => {
|
|
529
|
+
const homeRoot = path.resolve(kernel.homedir)
|
|
530
|
+
if (path.resolve(root) !== homeRoot) {
|
|
531
|
+
return
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
const agentsPath = path.resolve(homeRoot, "AGENTS.md")
|
|
535
|
+
const agentsExists = await kernel.exists(agentsPath)
|
|
536
|
+
if (!agentsExists) {
|
|
537
|
+
return
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
const skillDir = path.resolve(os.homedir(), ".agents", "skills", "pinokio")
|
|
541
|
+
const skillPath = path.resolve(skillDir, "SKILL.md")
|
|
542
|
+
await fs.promises.mkdir(skillDir, { recursive: true })
|
|
543
|
+
|
|
544
|
+
let agentsContent = ""
|
|
545
|
+
let shouldWrite = true
|
|
546
|
+
try {
|
|
547
|
+
agentsContent = await fs.promises.readFile(agentsPath, "utf8")
|
|
548
|
+
} catch (error) {
|
|
549
|
+
if (error && error.code === "ENOENT") {
|
|
550
|
+
return
|
|
551
|
+
}
|
|
552
|
+
throw error
|
|
553
|
+
}
|
|
554
|
+
const skillFrontmatter = [
|
|
555
|
+
"---",
|
|
556
|
+
"name: Pinokio",
|
|
557
|
+
"description: Guide for building 1-click launchers, building apps with 1-click launchers built-in, and controlling any localhost application via Pinokio",
|
|
558
|
+
"---"
|
|
559
|
+
].join("\n")
|
|
560
|
+
const desiredSkillContent = `${skillFrontmatter}\n\n${agentsContent}`
|
|
561
|
+
|
|
562
|
+
try {
|
|
563
|
+
const existingSkillContent = await fs.promises.readFile(skillPath, "utf8")
|
|
564
|
+
shouldWrite = existingSkillContent !== desiredSkillContent
|
|
565
|
+
} catch (error) {
|
|
566
|
+
if (!(error && error.code === "ENOENT")) {
|
|
567
|
+
throw error
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
if (shouldWrite) {
|
|
572
|
+
await fs.promises.writeFile(skillPath, desiredSkillContent, "utf8")
|
|
573
|
+
}
|
|
574
|
+
}
|
|
528
575
|
let current = path.resolve(root, "ENVIRONMENT")
|
|
529
576
|
let exists = await kernel.exists(current)
|
|
530
577
|
if (exists) {
|
|
@@ -572,13 +619,17 @@ const init = async (options, kernel) => {
|
|
|
572
619
|
]
|
|
573
620
|
const structure_path = kernel.path("prototype/system/structure/clone")
|
|
574
621
|
const structure_content = await fs.promises.readFile(structure_path, "utf-8")
|
|
622
|
+
const proto_path = kernel.path("prototype")
|
|
623
|
+
const home_path = kernel.homedir
|
|
575
624
|
const rendered_recipe = await kernel.renderFile(agentTemplatePath, {
|
|
576
625
|
structure: structure_content,
|
|
577
626
|
examples: kernel.path("prototype/system/examples"),
|
|
578
627
|
browser_logs: kernel.path("logs/browser.log"),
|
|
579
628
|
PINOKIO_DOCUMENTATION: kernel.path("prototype/PINOKIO.md"),
|
|
580
629
|
PTERM_DOCUMENTATION: kernel.path("prototype/PTERM.md"),
|
|
581
|
-
app_root: root
|
|
630
|
+
app_root: root,
|
|
631
|
+
proto_path,
|
|
632
|
+
home_path,
|
|
582
633
|
})
|
|
583
634
|
for (const filename of agentFiles) {
|
|
584
635
|
const destination = path.resolve(root, filename)
|
|
@@ -612,6 +663,9 @@ const init = async (options, kernel) => {
|
|
|
612
663
|
}
|
|
613
664
|
}
|
|
614
665
|
|
|
666
|
+
// Keep ~/.agents/skills/pinokio/SKILL.md in sync with ~/pinokio/AGENTS.md
|
|
667
|
+
await syncHomeSkillFromAgents()
|
|
668
|
+
|
|
615
669
|
const gitDir = path.resolve(root, ".git")
|
|
616
670
|
const gitDirExists = await kernel.exists(gitDir)
|
|
617
671
|
if (gitDirExists) {
|
package/kernel/shell.js
CHANGED
|
@@ -304,6 +304,7 @@ class Shell {
|
|
|
304
304
|
allowProposedApi: true,
|
|
305
305
|
cols: this.cols,
|
|
306
306
|
rows: this.rows,
|
|
307
|
+
fontSize: 12,
|
|
307
308
|
})
|
|
308
309
|
this.vts = new SerializeAddon()
|
|
309
310
|
this.vt.loadAddon(this.vts)
|
|
@@ -615,7 +616,8 @@ class Shell {
|
|
|
615
616
|
let re = /(.+)(\1)/gs
|
|
616
617
|
let term = pty.spawn(this.shell, this.args, config)
|
|
617
618
|
let vt = new Terminal({
|
|
618
|
-
allowProposedApi: true
|
|
619
|
+
allowProposedApi: true,
|
|
620
|
+
fontSize: 12
|
|
619
621
|
})
|
|
620
622
|
let vts = new SerializeAddon()
|
|
621
623
|
vt.loadAddon(vts)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pinokiod",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.20",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"shell-path": "^2.0.0",
|
|
76
76
|
"sudo-prompt-programfiles-x86": "^9.2.10",
|
|
77
77
|
"symlink-dir": "^5.2.1",
|
|
78
|
-
"systeminformation": "^5.
|
|
78
|
+
"systeminformation": "^5.31.1",
|
|
79
79
|
"toasted-notifier": "^10.1.0",
|
|
80
80
|
"twitter-api-v2": "^1.23.2",
|
|
81
81
|
"uuid": "^9.0.0",
|