@zerwiz/sessrumnir 0.1.10 → 0.1.12
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/bin/sessrumnir.js
CHANGED
|
@@ -1,167 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const { spawn } = require('child_process')
|
|
14
|
-
const { existsSync } = require('fs')
|
|
15
|
-
const { join, resolve } = require('path')
|
|
16
|
-
|
|
17
|
-
const VERSION = require('../package.json').version
|
|
18
|
-
|
|
19
|
-
// ─── Parse args ──────────────────────────────────────────────────────────────
|
|
20
|
-
|
|
21
|
-
const args = process.argv.slice(2)
|
|
22
|
-
|
|
23
|
-
if (args.includes('--help') || args.includes('-h')) {
|
|
24
|
-
console.log(`
|
|
25
|
-
pi-desktop v${VERSION} — Desktop GUI for the Pi coding agent
|
|
26
|
-
|
|
27
|
-
Usage:
|
|
28
|
-
pi-desktop Launch the app
|
|
29
|
-
pi-desktop <path> Launch with workspace directory
|
|
30
|
-
pi-desktop --help Show this help
|
|
31
|
-
pi-desktop --version Show version
|
|
32
|
-
|
|
33
|
-
Examples:
|
|
34
|
-
pi-desktop # Launch with default workspace
|
|
35
|
-
pi-desktop ~/my-project # Launch with specific project
|
|
36
|
-
pi-desktop . # Launch with current directory
|
|
37
|
-
|
|
38
|
-
Install:
|
|
39
|
-
See https://github.com/FaqFirebase/pi-desktop for releases
|
|
40
|
-
and build-from-source instructions.
|
|
41
|
-
|
|
42
|
-
The app requires Pi to be installed:
|
|
43
|
-
curl -fsSL https://pi.dev/install.sh | sh
|
|
44
|
-
# or
|
|
45
|
-
npm install -g @earendil-works/pi-coding-agent
|
|
46
|
-
`)
|
|
47
|
-
process.exit(0)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
if (args.includes('--version') || args.includes('-v')) {
|
|
51
|
-
console.log(VERSION)
|
|
52
|
-
process.exit(0)
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
// ─── Find Electron binary ────────────────────────────────────────────────────
|
|
56
|
-
|
|
57
|
-
function findElectron() {
|
|
58
|
-
// Try to find electron from the package's own node_modules
|
|
59
|
-
const candidates = [
|
|
60
|
-
join(__dirname, '..', 'node_modules', 'electron', 'dist', 'electron'),
|
|
61
|
-
join(__dirname, '..', 'node_modules', '.bin', 'electron'),
|
|
62
|
-
]
|
|
63
|
-
|
|
64
|
-
for (const candidate of candidates) {
|
|
65
|
-
if (existsSync(candidate)) {
|
|
66
|
-
return candidate
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// Try to find globally installed electron
|
|
71
|
-
try {
|
|
72
|
-
const { execSync } = require('child_process')
|
|
73
|
-
const electronPath = execSync('which electron', { encoding: 'utf8', timeout: 5000 }).trim()
|
|
74
|
-
if (existsSync(electronPath)) {
|
|
75
|
-
return electronPath
|
|
76
|
-
}
|
|
77
|
-
} catch {
|
|
78
|
-
// Not found
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
console.error('Error: Electron not found. Please install dependencies:')
|
|
82
|
-
console.error(' cd ' + join(__dirname, '..') + ' && npm install')
|
|
83
|
-
process.exit(1)
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// ─── Find app resources ─────────────────────────────────────────────────────
|
|
87
|
-
|
|
88
|
-
function findAppResources() {
|
|
89
|
-
// Packaged app: resources are in app.asar or app directory
|
|
90
|
-
const packagedPaths = [
|
|
91
|
-
join(__dirname, '..', 'app.asar'),
|
|
92
|
-
join(__dirname, '..', 'app'),
|
|
93
|
-
join(__dirname, '..', 'resources', 'app.asar'),
|
|
94
|
-
join(__dirname, '..', 'resources', 'app'),
|
|
95
|
-
]
|
|
96
|
-
|
|
97
|
-
for (const p of packagedPaths) {
|
|
98
|
-
if (existsSync(p)) {
|
|
99
|
-
return p
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
// Development: use the project root (electron-vite builds to out/)
|
|
104
|
-
const devPath = join(__dirname, '..')
|
|
105
|
-
if (existsSync(join(devPath, 'out', 'main', 'index.js'))) {
|
|
106
|
-
return devPath
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// Build first
|
|
110
|
-
console.error('Error: App not built. Run "npm run build" first.')
|
|
111
|
-
process.exit(1)
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
// ─── Launch ──────────────────────────────────────────────────────────────────
|
|
115
|
-
|
|
116
|
-
function launch() {
|
|
117
|
-
const electronPath = findElectron()
|
|
118
|
-
const appPath = findAppResources()
|
|
119
|
-
|
|
120
|
-
// Resolve workspace path if provided
|
|
121
|
-
let workspacePath = null
|
|
122
|
-
if (args.length > 0 && !args[0].startsWith('-')) {
|
|
123
|
-
workspacePath = resolve(args[0])
|
|
124
|
-
if (!existsSync(workspacePath)) {
|
|
125
|
-
console.error(`Error: Path does not exist: ${workspacePath}`)
|
|
126
|
-
process.exit(1)
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// Build electron args.
|
|
131
|
-
// --no-sandbox is required so Pi subprocesses can spawn.
|
|
132
|
-
// --disable-gpu is intentionally NOT passed by default — it breaks window
|
|
133
|
-
// creation on some Wayland + AMD setups. If the GPU process crashes on your
|
|
134
|
-
// system, re-add it locally as an escape hatch.
|
|
135
|
-
const electronArgs = [
|
|
136
|
-
appPath,
|
|
137
|
-
'--no-sandbox',
|
|
138
|
-
]
|
|
139
|
-
|
|
140
|
-
// Pass workspace path via environment variable
|
|
141
|
-
const env = { ...process.env }
|
|
142
|
-
if (workspacePath) {
|
|
143
|
-
env.PI_DESKTOP_WORKSPACE = workspacePath
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
// Launch Electron
|
|
147
|
-
const child = spawn(electronPath, electronArgs, {
|
|
148
|
-
stdio: 'inherit',
|
|
149
|
-
env,
|
|
150
|
-
detached: false,
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
child.on('error', (err) => {
|
|
154
|
-
console.error('Failed to start Pi Desktop:', err.message)
|
|
155
|
-
process.exit(1)
|
|
156
|
-
})
|
|
157
|
-
|
|
158
|
-
child.on('exit', (code) => {
|
|
159
|
-
process.exit(code ?? 0)
|
|
160
|
-
})
|
|
161
|
-
|
|
162
|
-
// Forward signals
|
|
163
|
-
process.on('SIGINT', () => child.kill('SIGINT'))
|
|
164
|
-
process.on('SIGTERM', () => child.kill('SIGTERM'))
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
launch()
|
|
2
|
+
// sessrumnir — the seat-hall window. Launches the built Electron shell.
|
|
3
|
+
const { spawn } = require("node:child_process");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
let electron;
|
|
6
|
+
try { electron = require("electron"); } catch { // not installed as a dep (dev mode) — resolve the local dev binary
|
|
7
|
+
electron = path.join(__dirname, "..", "node_modules", ".bin", "electron");
|
|
8
|
+
}
|
|
9
|
+
const main = path.join(__dirname, "..", "out", "main", "index.js");
|
|
10
|
+
const child = spawn(electron, [main, ...process.argv.slice(2)], { stdio: "inherit", env: process.env });
|
|
11
|
+
child.on("exit", (code, signal) => process.exit(signal ? (signal === "SIGINT" ? 130 : 1) : (code ?? 0)));
|
|
@@ -21230,7 +21230,7 @@ function StatusPopover() {
|
|
|
21230
21230
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "px-4 py-2 border-t border-border flex items-center justify-between text-[10px] text-faint", children: [
|
|
21231
21231
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
|
|
21232
21232
|
"v",
|
|
21233
|
-
"0.1.
|
|
21233
|
+
"0.1.10"
|
|
21234
21234
|
] }),
|
|
21235
21235
|
/* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
21236
21236
|
"button",
|
package/out/renderer/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
<link rel="icon" type="image/svg+xml" href="./assets/pi-logo-B48rElrT.svg" />
|
|
11
11
|
<title>Sessrúmnir</title>
|
|
12
12
|
<script src="./theme-boot.js"></script>
|
|
13
|
-
<script type="module" crossorigin src="./assets/index-
|
|
13
|
+
<script type="module" crossorigin src="./assets/index-BS9g6EfW.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-DaKov4Fl.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body class="bg-app text-primary antialiased">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerwiz/sessrumnir",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Desktop GUI frontend for the Pi coding agent",
|
|
5
5
|
"main": "out/main/index.js",
|
|
6
6
|
"desktopName": "pi-desktop.desktop",
|
|
@@ -79,7 +79,8 @@
|
|
|
79
79
|
"remark-gfm": "^4.0.1",
|
|
80
80
|
"style-mod": "^4.1.3",
|
|
81
81
|
"yaml": "^2.9.0",
|
|
82
|
-
"zustand": "^5.0.5"
|
|
82
|
+
"zustand": "^5.0.5",
|
|
83
|
+
"electron": "^43.0.0"
|
|
83
84
|
},
|
|
84
85
|
"devDependencies": {
|
|
85
86
|
"@eslint/js": "^10.0.1",
|
|
@@ -87,7 +88,6 @@
|
|
|
87
88
|
"@types/react": "^19.1.4",
|
|
88
89
|
"@types/react-dom": "^19.1.5",
|
|
89
90
|
"@vitejs/plugin-react": "^4.5.2",
|
|
90
|
-
"electron": "^43.0.0",
|
|
91
91
|
"electron-builder": "^26.0.12",
|
|
92
92
|
"electron-vite": "^3.1.0",
|
|
93
93
|
"eslint": "^10.6.0",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
},
|
|
103
103
|
"build": {
|
|
104
104
|
"appId": "org.zerwiz.sessrumnir",
|
|
105
|
-
"productName": "
|
|
105
|
+
"productName": "Sessr\u00famnir",
|
|
106
106
|
"copyright": "Copyright 2026 Zerwiz. Licensed under the Apache License, Version 2.0.",
|
|
107
107
|
"files": [
|
|
108
108
|
"out/**/*",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"icon": "resources/icons",
|
|
131
131
|
"synopsis": "Desktop GUI for the Pi coding agent",
|
|
132
132
|
"description": "An Electron desktop application that provides a GUI frontend for the Pi coding agent.",
|
|
133
|
-
"maintainer": "
|
|
133
|
+
"maintainer": "Sessr\u00famnir GUI Contributors",
|
|
134
134
|
"artifactName": "Pi-Desktop-${version}-${os}-${arch}.${ext}"
|
|
135
135
|
},
|
|
136
136
|
"mac": {
|
|
@@ -158,11 +158,11 @@
|
|
|
158
158
|
"allowToChangeInstallationDirectory": true,
|
|
159
159
|
"createDesktopShortcut": true,
|
|
160
160
|
"createStartMenuShortcut": true,
|
|
161
|
-
"shortcutName": "
|
|
161
|
+
"shortcutName": "Sessr\u00famnir",
|
|
162
162
|
"installerIcon": "resources/icons/icon.ico",
|
|
163
163
|
"uninstallerIcon": "resources/icons/icon.ico",
|
|
164
164
|
"artifactName": "Pi-Desktop-${version}-${os}-${arch}-setup.${ext}"
|
|
165
165
|
}
|
|
166
166
|
},
|
|
167
|
-
"productName": "
|
|
168
|
-
}
|
|
167
|
+
"productName": "Sessr\u00famnir"
|
|
168
|
+
}
|