desky-agent 0.3.8 → 0.3.10

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.
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 GitHub Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,4 @@
1
+ rcedit-x64.exe — rcedit v2.0.0 from https://github.com/electron/rcedit/releases/tag/v2.0.0 (MIT, GitHub, Inc.).
2
+ sha256 3e7801db1a5edbec91b49a24a094aad776cb4515488ea5a4ca2289c400eade2a
3
+ The installer runs it on Windows to put the Desky head into the Electron exe, so the taskbar shows it.
4
+ The npm package rcedit carries the same binary but all its versions are deprecated on npm.
Binary file
package/electron/main.js CHANGED
@@ -17,6 +17,32 @@ const { Daemon, log } = require('../src/daemon');
17
17
  const autostart = require('../src/autostart');
18
18
  const { trayPngs, trayKind } = require('./icons');
19
19
  const ICO = path.join(__dirname, '..', 'assets', 'clawd.ico');
20
+ /** Windows draws a window's taskbar icon from the Start menu shortcut that carries the window's AppUserModelID.
21
+ * An old install left "Electron.lnk" with our ID and no icon, so the taskbar showed Electron: drop shortcuts with
22
+ * our ID that are not ours, and give ours the ID and the head. */
23
+ function winShortcuts() {
24
+ if (process.platform !== 'win32') return;
25
+ try {
26
+ const dir = path.join(process.env.APPDATA || '', 'Microsoft', 'Windows', 'Start Menu', 'Programs');
27
+ const ours = path.join(dir, 'Desky Agent.lnk');
28
+ for (const name of fs.readdirSync(dir)) {
29
+ const f = path.join(dir, name);
30
+ if (!name.toLowerCase().endsWith('.lnk') || f === ours) continue;
31
+ let l;
32
+ try { l = shell.readShortcutLink(f); } catch (e) { continue; }
33
+ if (l.appUserModelId === 'desk.clawd.app') { fs.rmSync(f, { force: true }); log('прибрав старий ярлик ' + name); }
34
+ }
35
+ const want = { target: process.execPath, cwd: path.dirname(process.execPath), icon: ICO, iconIndex: 0,
36
+ appUserModelId: 'desk.clawd.app', description: 'Desky Agent' };
37
+ let have = null;
38
+ try { have = shell.readShortcutLink(ours); } catch (e) {}
39
+ if (!have || have.appUserModelId !== want.appUserModelId || have.icon !== ICO
40
+ || path.resolve(have.target) !== path.resolve(want.target)) {
41
+ shell.writeShortcutLink(ours, have ? 'replace' : 'create', want);
42
+ }
43
+ } catch (e) { log('ярлик у меню «Пуск»: ' + e.message); }
44
+ }
45
+
20
46
  /** The app's own icon for the window and the taskbar (the head, all sizes); the tray keeps its live state icons. */
21
47
  function appIcon() {
22
48
  const img = nativeImage.createFromPath(process.platform === 'win32' ? ICO : path.join(__dirname, '..', 'assets', 'clawd.png'));
@@ -58,6 +84,7 @@ if (!app.requestSingleInstanceLock()) {
58
84
 
59
85
  async function boot() {
60
86
  if (MAC && app.dock) app.dock.hide();
87
+ winShortcuts();
61
88
  if (!quietLaunch(process.argv) || process.argv.includes('--login')) paths.markStopped(false);
62
89
  menu();
63
90
 
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawd-desk",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
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": "701c15822469beaf086990921f97fbd6f3255575404f7c43147701a0625395a8"
30
+ "sha256": "967dcce750a045b7619ce8d190ff559907b81a333a9df6a9f372547c04860d0a"
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.8",
3
+ "version": "0.3.10",
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,7 +36,6 @@
36
36
  "dependencies": {
37
37
  "electron": "44.9.3",
38
38
  "esptool-js": "0.7.0",
39
- "rcedit": "5.0.2",
40
39
  "serialport": "13.0.0"
41
40
  }
42
41
  }
package/src/install.js CHANGED
@@ -220,7 +220,7 @@ function makeApp() {
220
220
  launch = { command: path.join(BUNDLE, 'Desky Agent.exe'), args: [] };
221
221
  // the taskbar takes its icon from the exe, not from the window: put the head into Electron's exe
222
222
  try {
223
- const rc = path.join(path.dirname(require.resolve('rcedit')), '..', 'bin', 'rcedit-x64.exe');
223
+ const rc = path.join(INSTALLED, 'assets', 'win', 'rcedit-x64.exe');
224
224
  const r = spawnSync(rc, [launch.command, '--set-icon', path.join(INSTALLED, 'assets', 'clawd.ico'),
225
225
  '--set-version-string', 'ProductName', 'Desky Agent', '--set-version-string', 'FileDescription', 'Desky Agent'],
226
226
  { stdio: 'ignore', windowsHide: true });