desky-agent 0.3.3 → 0.3.5

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/assets/clawd.ico CHANGED
Binary file
package/assets/clawd.png CHANGED
Binary file
package/electron/icons.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
- // Tray icons: the pixel Desky from the app's favicon, drawn here as PNGs so there are no image files to keep in
2
+ // Tray icons: Desky's head from the brand sheet, drawn here as PNGs so there are no image files to keep in
3
3
  // step. One pose per thing worth seeing at a glance in the tray.
4
4
 
5
5
  const zlib = require('zlib');
@@ -12,14 +12,16 @@ const BODY = { orange: ORANGE, white: [0xec, 0xe8, 0xe1, 255], mint: [0x7c, 0xc4
12
12
  const GREY = [0x8a, 0x85, 0x80, 255];
13
13
  const EYE = [0x22, 0x22, 0x22, 255];
14
14
 
15
- /** 16x16 grid of the pose: [x, y, w, h, colour] rectangles. */
15
+ /** 16x16 grid of the pose: [x, y, w, h, colour] rectangles. Desky's head from the brand sheet: the screen with
16
+ * rounded corners, a servo ear on each side, the face the state shows. */
16
17
  function pose(kind, body) {
17
- const r = [[2, 3, 12, 9, body], [3, 12, 2, 3, body], [11, 12, 2, 3, body]];
18
- if (kind === 'ask') r.push([0, 0, 2, 6, body], [14, 0, 2, 6, body]); // arms up: a call for you
19
- else r.push([0, 6, 2, 3, body], [14, 6, 2, 3, body]);
20
- if (kind === 'sleep') r.push([5, 7, 2, 1, EYE], [9, 7, 2, 1, EYE]); // eyes shut
21
- else if (kind === 'read') r.push([5, 7, 2, 3, EYE], [9, 7, 2, 3, EYE]); // looking down at the screen
22
- else r.push([5, 5, 2, 3, EYE], [9, 5, 2, 3, EYE]);
18
+ const r = [[3, 3, 10, 10, body], [2, 4, 12, 8, body], [0, 6, 2, 4, body], [14, 6, 2, 4, body]];
19
+ if (kind === 'sleep') r.push([4, 8, 3, 1, EYE], [9, 8, 3, 1, EYE]); // eyes shut
20
+ else if (kind === 'read') r.push([4, 8, 2, 2, EYE], [9, 8, 2, 2, EYE]); // looking down at the screen
21
+ else if (kind === 'ask') r.push([4, 5, 3, 4, EYE], [9, 5, 3, 4, EYE]); // wide eyes: a call for you
22
+ else if (kind === 'done') r.push([4, 7, 1, 1, EYE], [5, 6, 1, 1, EYE], [6, 7, 1, 1, EYE],
23
+ [9, 7, 1, 1, EYE], [10, 6, 1, 1, EYE], [11, 7, 1, 1, EYE]); // ^ ^, the logo's face
24
+ else r.push([5, 5, 2, 4, EYE], [9, 5, 2, 4, EYE]);
23
25
  return r;
24
26
  }
25
27
 
Binary file
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawd-desk",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
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": "598356e15112da0a3088f6bd1b2201c00cfa03ffdd89aab97e9b85de17697b0b"
30
+ "sha256": "fe2d9de15fc5bf2964fd01ed6930e315364c6ad63e3ba52ac0087aefa4d82d3b"
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",
3
+ "version": "0.3.5",
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",
package/ui/app.html CHANGED
@@ -7,7 +7,7 @@
7
7
  <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='2' y='3' width='12' height='9' fill='%23D9774B'/%3E%3Crect x='5' y='5' width='2' height='3' fill='%23222'/%3E%3Crect x='9' y='5' width='2' height='3' fill='%23222'/%3E%3Crect x='0' y='6' width='2' height='3' fill='%23D9774B'/%3E%3Crect x='14' y='6' width='2' height='3' fill='%23D9774B'/%3E%3Crect x='3' y='12' width='2' height='3' fill='%23D9774B'/%3E%3Crect x='11' y='12' width='2' height='3' fill='%23D9774B'/%3E%3C/svg%3E">
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
- <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Unbounded:wght@500;600&family=Onest:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap">
10
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Unbounded:wght@500;600&family=Onest:wght@400;500;600&family=JetBrains+Mono:wght@400;500;800&display=swap">
11
11
  <script type="importmap">{ "imports": { "three": "/vendor/three.module.min.js" } }</script>
12
12
  <script type="module" src="/clawd3d.js"></script>
13
13
  <style>
@@ -44,9 +44,14 @@ h1, h2, h3, p { margin: 0; }
44
44
  aside { background: var(--side); border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; gap: 18px;
45
45
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
46
46
  .brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; font: 600 17px var(--f-display); letter-spacing: -.01em; }
47
- .brand svg { width: 26px; height: 20px; border-radius: 3px; }
48
- .brand .brand2 { margin-left: -4px; color: var(--muted); font-weight: 500; }
49
- .brand .wm { font: 600 18px/1 var(--f-display); letter-spacing: -.03em; }
47
+ .brand { gap: 8px; }
48
+ .brand svg.head { width: 34px; height: auto; margin-right: 2px; }
49
+ .brand svg.chev { width: 10px; height: 16px; }
50
+ .brand svg.chev path { fill: none; stroke: var(--clawd); stroke-width: 3; stroke-linecap: square; }
51
+ .brand .wm { font: 800 19px/1 var(--f-mono, 'JetBrains Mono', monospace); letter-spacing: -.01em; margin-left: -3px; }
52
+ .brand .cur { width: 9px; height: 17px; background: var(--clawd); margin-left: -4px; animation: blink 1.1s steps(1) infinite; }
53
+ @keyframes blink { 50% { opacity: 0; } }
54
+ @media (prefers-reduced-motion: reduce) { .brand .cur { animation: none; } }
50
55
  .who { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px 16px; display: grid; justify-items: center;
51
56
  gap: 4px; text-align: center; box-shadow: var(--shadow); }
52
57
  .who svg { width: 136px; height: 102px; margin-bottom: 10px; border-radius: 12px; box-shadow: 0 8px 24px var(--clawd-glow); }
@@ -407,7 +412,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
407
412
  <body>
408
413
  <div class="app">
409
414
  <aside>
410
- <div class="brand"><svg viewBox="0 0 64 48" aria-hidden="true" id="logo"></svg><span class="wm">desky</span><span class="brand2">agent</span></div>
415
+ <div class="brand" aria-label="Desky Agent"><svg class="head" viewBox="-8 0 80 48" aria-hidden="true" id="logo" data-head="1"></svg><svg class="chev" viewBox="0 0 10 16" aria-hidden="true"><path d="M1.5 2 L8 8 L1.5 14"/></svg><span class="wm">desky</span><span class="cur"></span></div>
411
416
  <nav role="tablist">
412
417
  <button type="button" role="tab" data-tab="home" aria-selected="true"><svg viewBox="0 0 24 24"><path d="M4 11l8-7 8 7v8.5a.5.5 0 0 1-.5.5H15v-6H9v6H4.5a.5.5 0 0 1-.5-.5z"/></svg>Огляд</button>
413
418
  <button type="button" role="tab" data-tab="move"><svg viewBox="0 0 24 24"><path d="M4 7h9M19 7h1M4 17h3M13 17h7"/><circle cx="16" cy="7" r="2.5"/><circle cx="10" cy="17" r="2.5"/></svg>Рухи</button>
@@ -592,7 +597,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
592
597
  <div class="wiz" id="wiz" hidden role="dialog" aria-modal="true" aria-labelledby="wizTitle">
593
598
  <div class="panel">
594
599
  <div class="top">
595
- <div class="brand"><svg viewBox="0 0 64 48" aria-hidden="true" id="wizLogo"></svg><span class="wm">desky</span><span class="brand2">agent</span></div>
600
+ <div class="brand" aria-label="Desky Agent"><svg class="head" viewBox="-8 0 80 48" aria-hidden="true" id="wizLogo" data-head="1"></svg><svg class="chev" viewBox="0 0 10 16" aria-hidden="true"><path d="M1.5 2 L8 8 L1.5 14"/></svg><span class="wm">desky</span><span class="cur"></span></div>
596
601
  <div class="prog"><div class="bars" id="wizBars"></div><div class="lbl" id="wizLbl"></div></div>
597
602
  <button type="button" class="ghost x" id="wizClose" title="закрити майстер"><svg viewBox="0 0 16 16"><path d="M3.5 3.5l9 9M12.5 3.5l-9 9"/></svg></button>
598
603
  </div>
@@ -869,7 +874,11 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
869
874
  r.setAttribute('x', x); r.setAttribute('y', y); r.setAttribute('width', w); r.setAttribute('height', h); r.setAttribute('fill', c);
870
875
  if (cls) r.setAttribute('class', cls); s.appendChild(r); };
871
876
  const bg = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
872
- bg.setAttribute('width', 64); bg.setAttribute('height', 48); bg.setAttribute('rx', 4); bg.setAttribute('fill', PALETTE[COLOR].body); s.appendChild(bg);
877
+ bg.setAttribute('width', 64); bg.setAttribute('height', 48); bg.setAttribute('rx', s.dataset.head ? 8 : 4); bg.setAttribute('fill', PALETTE[COLOR].body); s.appendChild(bg);
878
+ // the logo: the head from the brand sheet, a servo ear on each side of the screen
879
+ if (s.dataset.head) for (const x of [-8, 64]) { const e = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
880
+ e.setAttribute('x', x); e.setAttribute('y', 15); e.setAttribute('width', 8); e.setAttribute('height', 18); e.setAttribute('rx', 2);
881
+ e.setAttribute('fill', PALETTE[COLOR].body); s.appendChild(e); }
873
882
  const eyes = { work: [9, 7, 0, 6], read: [7, 8, -4, 6], ask: [13, 13, 0, 0], sleep: [11, 2, 0, 4], idle: [8, 14, 0, 0],
874
883
  wait: [8, 11, 0, 3], limit: [11, 3, 0, 4],
875
884
  wake: [8, 14, 0, 0], listen: [8, 14, 0, 0] }[state];
@@ -927,7 +936,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
927
936
  st.setProperty('--clawd', a); st.setProperty('--clawd-hi', hi); st.setProperty('--clawd-ink', ink);
928
937
  st.setProperty('--clawd-soft', `color-mix(in srgb, ${a} ${dark ? 18 : 12}%, var(--card))`);
929
938
  st.setProperty('--clawd-glow', `color-mix(in srgb, ${a} 24%, transparent)`);
930
- ['logo', 'bigface', 'wizLogo'].forEach(id => $(id) && drawFace($(id), id === 'wizLogo' ? 'idle' : lastState || 'idle'));
939
+ ['logo', 'bigface', 'wizLogo'].forEach(id => $(id) && drawFace($(id), id === 'wizLogo' ? 'done' : lastState || 'idle'));
931
940
  if (C3) C3.colors(c.body, c.eye);
932
941
  document.querySelectorAll('.swatch').forEach(b => b.setAttribute('aria-checked', String(b.dataset.color === COLOR)));
933
942
  $('colorNow').textContent = c.name;
@@ -1043,14 +1052,17 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
1043
1052
  { n: 2, name: 'Нахил голови', short: 'Нахил', base: 0, plus: 10, ref: 0,
1044
1053
  plusText: 'Голова нахилилася <b>вперед</b>, до ноутбука.',
1045
1054
  refText: 'голова стоїть <b>рівно</b>: не нахилена ні вперед, ні назад', lo: 'назад', hi: 'вперед' },
1046
- { n: 3, name: 'Права рука', short: 'Права рука', base: 65, plus: 20, ref: 0,
1055
+ { n: 3, name: 'Права рука', short: 'Права рука', base: 65, plus: 20, ref: 65, pic: 0,
1047
1056
  plusText: 'Права рука Desky <b>піднялася вперед</b>. Це та, що в тебе <b>зліва</b>, коли дивишся йому в обличчя.',
1048
1057
  refText: 'права рука <b>висить рівно вниз</b>', lo: 'назад', hi: 'вперед' },
1049
- { n: 4, name: 'Ліва рука', short: 'Ліва рука', base: 65, plus: 20, ref: 0,
1058
+ { n: 4, name: 'Ліва рука', short: 'Ліва рука', base: 65, plus: 20, ref: 65, pic: 0,
1050
1059
  plusText: 'Ліва рука Desky <b>піднялася вперед</b>. Це та, що в тебе <b>справа</b>, коли дивишся йому в обличчя.',
1051
1060
  refText: 'ліва рука <b>висить рівно вниз</b>', lo: 'назад', hi: 'вперед' },
1052
1061
  ];
1053
1062
  const HOME = [0, 0, 65, 65];
1063
+ // ref: the angle the centre is set at (sent to the board). An arm hangs straight down at the servo centre, home's
1064
+ // 65 (the horn goes on hanging), so its centre is set there; pic: how the pictures draw that pose (0 = hanging).
1065
+ const refPic = j => poseWith(j, J[j].pic ?? J[j].ref);
1054
1066
  const FACTORY_DIR = [1, 1, 1, -1]; // play.cpp dirOf: the arms are mirror images
1055
1067
  const poseWith = (j, v) => { const p = HOME.slice(); p[j] = v; return p; };
1056
1068
  const trimToDeg = j => CAL[j].trim * CAL[j].dir / US_PER_DEG;
@@ -1129,7 +1141,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
1129
1141
  c.appendChild(dir);
1130
1142
  const [front, other] = c.querySelectorAll('svg');
1131
1143
  c.draw = () => {
1132
- const P = poseWith(j, jj.ref);
1144
+ const P = refPic(j);
1133
1145
  drawFront(front, P, j);
1134
1146
  if (j === 0) { other.setAttribute('viewBox', '0 0 160 170'); drawTop(other, 0); } else drawSide(other, P, j);
1135
1147
  dir.querySelector('b').textContent = CAL[j].dir === FACTORY_DIR[j] ? 'як із заводу' : 'розвернутий';
@@ -1254,7 +1266,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
1254
1266
 
1255
1267
  function wizOpen(from) {
1256
1268
  $('wiz').hidden = false; showMode();
1257
- drawFace($('wizLogo'), 'idle');
1269
+ drawFace($('wizLogo'), 'done');
1258
1270
  go(from || 'hello');
1259
1271
  setTimeout(() => { const b = $('wizBody').querySelector('button.pri'); b && b.focus(); }, 50);
1260
1272
  }
@@ -1498,7 +1510,7 @@ svg.alive .eye { transform-box: fill-box; transform-origin: center; animation: b
1498
1510
  const jj = J[j];
1499
1511
  const [f1, s1] = fig('0 0 160 120', 'в обличчя: має бути так');
1500
1512
  const [f2, s2] = j === 0 ? fig('0 0 160 170', 'згори') : fig('0 0 240 170', 'збоку');
1501
- const ref = poseWith(j, jj.ref);
1513
+ const ref = refPic(j);
1502
1514
  drawFront(s1, ref, j); j === 0 ? drawTop(s2, 0) : drawSide(s2, ref, j);
1503
1515
  W.orig = CAL[j].trim;
1504
1516
  const dial = makeDial(j);