desky-agent 0.3.7 → 0.3.8
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/electron/main.js +15 -1
- package/firmware/firmware.bin +0 -0
- package/firmware/manifest.json +2 -2
- package/package.json +2 -1
- package/src/install.js +8 -0
package/electron/main.js
CHANGED
|
@@ -16,6 +16,12 @@ const paths = require('../src/paths');
|
|
|
16
16
|
const { Daemon, log } = require('../src/daemon');
|
|
17
17
|
const autostart = require('../src/autostart');
|
|
18
18
|
const { trayPngs, trayKind } = require('./icons');
|
|
19
|
+
const ICO = path.join(__dirname, '..', 'assets', 'clawd.ico');
|
|
20
|
+
/** The app's own icon for the window and the taskbar (the head, all sizes); the tray keeps its live state icons. */
|
|
21
|
+
function appIcon() {
|
|
22
|
+
const img = nativeImage.createFromPath(process.platform === 'win32' ? ICO : path.join(__dirname, '..', 'assets', 'clawd.png'));
|
|
23
|
+
return img.isEmpty() ? image('on') : img;
|
|
24
|
+
}
|
|
19
25
|
|
|
20
26
|
const NAMES = { wake: 'прокинувся', listen: 'слухає', work: 'працює', read: 'читає', ask: 'чекає на тебе',
|
|
21
27
|
wait: 'чекає на фонову задачу', limit: 'скінчилися ліміти', error: 'помилка', done: 'закінчив',
|
|
@@ -189,9 +195,17 @@ function openWindow() {
|
|
|
189
195
|
}
|
|
190
196
|
win = new BrowserWindow({
|
|
191
197
|
...bounds(), minWidth: 900, minHeight: 600, title: 'Desky Agent', show: false, backgroundColor: '#161514',
|
|
192
|
-
autoHideMenuBar: true, icon:
|
|
198
|
+
autoHideMenuBar: true, icon: appIcon(),
|
|
193
199
|
webPreferences: { contextIsolation: true, sandbox: true, nodeIntegration: false },
|
|
194
200
|
});
|
|
201
|
+
// Windows takes the taskbar button from the exe, which is electron.exe renamed: give the window our icon and name
|
|
202
|
+
// for the taskbar, the jump list and a pinned button
|
|
203
|
+
if (process.platform === 'win32') {
|
|
204
|
+
try {
|
|
205
|
+
win.setAppDetails({ appId: 'desk.clawd.app', appIconPath: ICO, appIconIndex: 0,
|
|
206
|
+
relaunchCommand: JSON.stringify(process.execPath), relaunchDisplayName: 'Desky Agent' });
|
|
207
|
+
} catch (e) { /* the window icon still shows */ }
|
|
208
|
+
}
|
|
195
209
|
win.loadURL(`http://127.0.0.1:${daemon.httpPort}/`);
|
|
196
210
|
win.once('ready-to-show', () => win.show());
|
|
197
211
|
win.webContents.setWindowOpenHandler(({ url }) => {
|
package/firmware/firmware.bin
CHANGED
|
Binary file
|
package/firmware/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawd-desk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"chip": "esp32s3",
|
|
5
5
|
"board": "waveshare-esp32-s3-zero",
|
|
6
6
|
"flash_size": "4MB",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"file": "firmware.bin",
|
|
28
28
|
"address": "0x10000",
|
|
29
29
|
"size": 339200,
|
|
30
|
-
"sha256": "
|
|
30
|
+
"sha256": "701c15822469beaf086990921f97fbd6f3255575404f7c43147701a0625395a8"
|
|
31
31
|
}
|
|
32
32
|
]
|
|
33
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desky-agent",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Desky Agent: Desky, a desk robot that acts out what Claude Code or Codex is doing. Tray app, hooks and installer in one npx command",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"electron": "44.9.3",
|
|
38
38
|
"esptool-js": "0.7.0",
|
|
39
|
+
"rcedit": "5.0.2",
|
|
39
40
|
"serialport": "13.0.0"
|
|
40
41
|
}
|
|
41
42
|
}
|
package/src/install.js
CHANGED
|
@@ -218,6 +218,14 @@ function makeApp() {
|
|
|
218
218
|
fs.renameSync(path.join(BUNDLE, 'electron.exe'), path.join(BUNDLE, 'Desky Agent.exe'));
|
|
219
219
|
fs.copyFileSync(path.join(INSTALLED, 'assets', 'clawd.ico'), path.join(paths.HOME, 'clawd.ico'));
|
|
220
220
|
launch = { command: path.join(BUNDLE, 'Desky Agent.exe'), args: [] };
|
|
221
|
+
// the taskbar takes its icon from the exe, not from the window: put the head into Electron's exe
|
|
222
|
+
try {
|
|
223
|
+
const rc = path.join(path.dirname(require.resolve('rcedit')), '..', 'bin', 'rcedit-x64.exe');
|
|
224
|
+
const r = spawnSync(rc, [launch.command, '--set-icon', path.join(INSTALLED, 'assets', 'clawd.ico'),
|
|
225
|
+
'--set-version-string', 'ProductName', 'Desky Agent', '--set-version-string', 'FileDescription', 'Desky Agent'],
|
|
226
|
+
{ stdio: 'ignore', windowsHide: true });
|
|
227
|
+
if (r.status !== 0) say('іконку в exe не поставив, у панелі задач буде значок Electron');
|
|
228
|
+
} catch (e) { say('іконку в exe не поставив, у панелі задач буде значок Electron'); }
|
|
221
229
|
} else if (MAC) {
|
|
222
230
|
const info = path.join(BUNDLE, 'Contents', 'Info.plist');
|
|
223
231
|
for (const [k, v] of [['CFBundleName', 'Desky Agent'], ['CFBundleDisplayName', 'Desky Agent'],
|