agentpeeps 0.0.0-stage → 0.1.0

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.
Files changed (231) hide show
  1. package/.agents/plugins/marketplace.json +11 -0
  2. package/.claude-plugin/marketplace.json +12 -0
  3. package/.claude-plugin/plugin.json +9 -0
  4. package/.codex-plugin/plugin.json +39 -0
  5. package/LICENSE +21 -0
  6. package/README.md +251 -2
  7. package/avatars/free/capybaras/capybara-bee-animated.webp +0 -0
  8. package/avatars/free/capybaras/capybara-bee.webp +0 -0
  9. package/avatars/free/capybaras/capybara-duck-animated.webp +0 -0
  10. package/avatars/free/capybaras/capybara-duck.webp +0 -0
  11. package/avatars/free/capybaras/capybara-friends-animated.webp +0 -0
  12. package/avatars/free/capybaras/capybara-friends.webp +0 -0
  13. package/avatars/free/capybaras/capybara-glasses-animated.webp +0 -0
  14. package/avatars/free/capybaras/capybara-glasses.webp +0 -0
  15. package/avatars/free/capybaras/capybara-hair-rollers-animated.webp +0 -0
  16. package/avatars/free/capybaras/capybara-hair-rollers.webp +0 -0
  17. package/avatars/free/capybaras/capybara-harness-animated.webp +0 -0
  18. package/avatars/free/capybaras/capybara-harness.webp +0 -0
  19. package/avatars/free/capybaras/capybara-in-a-dress-animated.webp +0 -0
  20. package/avatars/free/capybaras/capybara-in-a-dress.webp +0 -0
  21. package/avatars/free/capybaras/capybara-rose-animated.webp +0 -0
  22. package/avatars/free/capybaras/capybara-rose.webp +0 -0
  23. package/avatars/free/cats/cat-big-eyes-animated.webp +0 -0
  24. package/avatars/free/cats/cat-big-eyes.webp +0 -0
  25. package/avatars/free/cats/cat-big-yawn-animated.webp +0 -0
  26. package/avatars/free/cats/cat-big-yawn.webp +0 -0
  27. package/avatars/free/cats/cat-curious-kitten-animated.webp +0 -0
  28. package/avatars/free/cats/cat-curious-kitten.webp +0 -0
  29. package/avatars/free/cats/cat-fluffy-round-animated.webp +0 -0
  30. package/avatars/free/cats/cat-fluffy-round.webp +0 -0
  31. package/avatars/free/cats/cat-french-fries-animated.webp +0 -0
  32. package/avatars/free/cats/cat-french-fries.webp +0 -0
  33. package/avatars/free/cats/cat-grumpy-animated.webp +0 -0
  34. package/avatars/free/cats/cat-grumpy.webp +0 -0
  35. package/avatars/free/cats/cat-in-a-banana-animated.webp +0 -0
  36. package/avatars/free/cats/cat-in-a-banana.webp +0 -0
  37. package/avatars/free/cats/cat-long-neck-animated.webp +0 -0
  38. package/avatars/free/cats/cat-long-neck.webp +0 -0
  39. package/avatars/free/cats/cat-lying-down-animated.webp +0 -0
  40. package/avatars/free/cats/cat-lying-down.webp +0 -0
  41. package/avatars/free/cats/cat-on-its-back-animated.webp +0 -0
  42. package/avatars/free/cats/cat-on-its-back.webp +0 -0
  43. package/avatars/free/cats/cat-open-mouth-animated.webp +0 -0
  44. package/avatars/free/cats/cat-open-mouth.webp +0 -0
  45. package/avatars/free/cats/cat-orange-costume-animated.webp +0 -0
  46. package/avatars/free/cats/cat-orange-costume.webp +0 -0
  47. package/avatars/free/cats/cat-orange-kitten-animated.webp +0 -0
  48. package/avatars/free/cats/cat-orange-kitten.webp +0 -0
  49. package/avatars/free/cats/cat-pizza-animated.webp +0 -0
  50. package/avatars/free/cats/cat-pizza.webp +0 -0
  51. package/avatars/free/cats/cat-pointy-ears-animated.webp +0 -0
  52. package/avatars/free/cats/cat-pointy-ears.webp +0 -0
  53. package/avatars/free/cats/cat-round-face-animated.webp +0 -0
  54. package/avatars/free/cats/cat-round-face.webp +0 -0
  55. package/avatars/free/cats/cat-round-profile-animated.webp +0 -0
  56. package/avatars/free/cats/cat-round-profile.webp +0 -0
  57. package/avatars/free/cats/cat-smirk-animated.webp +0 -0
  58. package/avatars/free/cats/cat-smirk.webp +0 -0
  59. package/avatars/free/cats/cat-squinting-animated.webp +0 -0
  60. package/avatars/free/cats/cat-squinting.webp +0 -0
  61. package/avatars/free/cats/cat-standing-kitten-animated.webp +0 -0
  62. package/avatars/free/cats/cat-standing-kitten.webp +0 -0
  63. package/avatars/free/cats/cat-standing-up-animated.webp +0 -0
  64. package/avatars/free/cats/cat-standing-up.webp +0 -0
  65. package/avatars/free/cats/cat-sunglasses-animated.webp +0 -0
  66. package/avatars/free/cats/cat-sunglasses.webp +0 -0
  67. package/avatars/free/cats/cat-tabby-animated.webp +0 -0
  68. package/avatars/free/cats/cat-tabby-pile-animated.webp +0 -0
  69. package/avatars/free/cats/cat-tabby-pile.webp +0 -0
  70. package/avatars/free/cats/cat-tabby-stare-animated.webp +0 -0
  71. package/avatars/free/cats/cat-tabby-stare.webp +0 -0
  72. package/avatars/free/cats/cat-tabby.webp +0 -0
  73. package/avatars/free/cats/cat-white-side-eye-animated.webp +0 -0
  74. package/avatars/free/cats/cat-white-side-eye.webp +0 -0
  75. package/avatars/free/color-blobs/blob-black-orb.webp +0 -0
  76. package/avatars/free/color-blobs/blob-blue-triangle.webp +0 -0
  77. package/avatars/free/color-blobs/blob-brown-clover.webp +0 -0
  78. package/avatars/free/color-blobs/blob-gray-pebble.webp +0 -0
  79. package/avatars/free/color-blobs/blob-green-capsule.webp +0 -0
  80. package/avatars/free/color-blobs/blob-orange-cloud.webp +0 -0
  81. package/avatars/free/costume-cats/banana-cat.webp +0 -0
  82. package/avatars/free/costume-cats/blanket-cat.webp +0 -0
  83. package/avatars/free/costume-cats/blueberry-cat.webp +0 -0
  84. package/avatars/free/costume-cats/fish-snack-cat.webp +0 -0
  85. package/avatars/free/costume-cats/frog-hood-cat.webp +0 -0
  86. package/avatars/free/costume-cats/headphone-cat.webp +0 -0
  87. package/avatars/free/costume-cats/shark-hood-cat.webp +0 -0
  88. package/avatars/free/critters/hamster-paws-animated.webp +0 -0
  89. package/avatars/free/critters/hamster-paws.webp +0 -0
  90. package/avatars/free/critters/pigeon-hop-animated.webp +0 -0
  91. package/avatars/free/critters/t-rex-guitar-animated.webp +0 -0
  92. package/avatars/free/critters/t-rex-guitar.webp +0 -0
  93. package/avatars/free/critters/teary-pink-blob.webp +0 -0
  94. package/avatars/free/flame-expressions/flame-angry.webp +0 -0
  95. package/avatars/free/flame-expressions/flame-confusion.webp +0 -0
  96. package/avatars/free/flame-expressions/flame-friendly.webp +0 -0
  97. package/avatars/free/flame-expressions/flame-gusto.webp +0 -0
  98. package/avatars/free/flame-expressions/flame-joy.webp +0 -0
  99. package/avatars/free/flame-expressions/flame-sly.webp +0 -0
  100. package/avatars/free/flame-expressions/flame-upset.webp +0 -0
  101. package/avatars/free/flame-expressions/flame-walk.webp +0 -0
  102. package/avatars/free/flame-expressions/flame-watching.webp +0 -0
  103. package/avatars/free/fruit-cats/cherry-cat.webp +0 -0
  104. package/avatars/free/fruit-cats/kiwi-cat.webp +0 -0
  105. package/avatars/free/fruit-cats/orange-cat.webp +0 -0
  106. package/avatars/free/fruit-cats/pineapple-cat.webp +0 -0
  107. package/avatars/free/fruit-cats/strawberry-cat.webp +0 -0
  108. package/avatars/free/fruit-cats/watermelon-cat.webp +0 -0
  109. package/avatars/free/gradient-icons/gradient-cat-skull.webp +0 -0
  110. package/avatars/free/gradient-icons/gradient-chef.webp +0 -0
  111. package/avatars/free/gradient-icons/gradient-eyed-shadow.webp +0 -0
  112. package/avatars/free/gradient-icons/gradient-flame.webp +0 -0
  113. package/avatars/free/gradient-icons/gradient-rabbit-shadow.webp +0 -0
  114. package/avatars/free/gradient-icons/gradient-sleepy-ghost.webp +0 -0
  115. package/avatars/free/manga-faces/manga-bangs-smile.webp +0 -0
  116. package/avatars/free/manga-faces/manga-bob-side-eye.webp +0 -0
  117. package/avatars/free/manga-faces/manga-closed-eyes-frown.webp +0 -0
  118. package/avatars/free/manga-faces/manga-glasses-headset.webp +0 -0
  119. package/avatars/free/manga-faces/manga-glasses-wink.webp +0 -0
  120. package/avatars/free/manga-faces/manga-short-hair-smile.webp +0 -0
  121. package/avatars/free/manga-faces/manga-side-part-wink.webp +0 -0
  122. package/avatars/free/manga-faces/manga-side-swept-smile.webp +0 -0
  123. package/avatars/free/manga-faces/manga-tousled-grin.webp +0 -0
  124. package/avatars/free/monster-icons/monster-amber-chick.webp +0 -0
  125. package/avatars/free/monster-icons/monster-aqua-frog.webp +0 -0
  126. package/avatars/free/monster-icons/monster-coral-alien.webp +0 -0
  127. package/avatars/free/monster-icons/monster-indigo-boar.webp +0 -0
  128. package/avatars/free/monster-icons/monster-lavender-bunny.webp +0 -0
  129. package/avatars/free/monster-icons/monster-navy-cyclops.webp +0 -0
  130. package/avatars/free/monster-icons/monster-orange-fish.webp +0 -0
  131. package/avatars/free/monster-icons/monster-pink-sleepy-cat.webp +0 -0
  132. package/avatars/free/monster-icons/monster-purple-octopus.webp +0 -0
  133. package/avatars/free/monster-icons/monster-red-stalk-eyes.webp +0 -0
  134. package/avatars/free/monster-icons/monster-rose-bat.webp +0 -0
  135. package/avatars/free/monster-icons/monster-teal-crocodile.webp +0 -0
  136. package/avatars/free/pixel-food/pixel-astronaut.webp +0 -0
  137. package/avatars/free/pixel-food/pixel-block-sprout.webp +0 -0
  138. package/avatars/free/pixel-food/pixel-blue-hair.webp +0 -0
  139. package/avatars/free/pixel-food/pixel-blue-horned.webp +0 -0
  140. package/avatars/free/pixel-food/pixel-cat-glasses.webp +0 -0
  141. package/avatars/free/pixel-food/pixel-cone-hat.webp +0 -0
  142. package/avatars/free/pixel-food/pixel-maroon-creature.webp +0 -0
  143. package/avatars/free/pixel-food/pixel-orange-creature.webp +0 -0
  144. package/avatars/free/pixel-food/pixel-orange-sprout.webp +0 -0
  145. package/avatars/free/pixel-food/pixel-red-hood.webp +0 -0
  146. package/avatars/free/pixel-food/pixel-watermelon.webp +0 -0
  147. package/avatars/free/pixel-food/pixel-white-bunny.webp +0 -0
  148. package/avatars/free/plush-blobs/plush-blue-alarmed.webp +0 -0
  149. package/avatars/free/plush-blobs/plush-green-surprised.webp +0 -0
  150. package/avatars/free/plush-blobs/plush-pink-smile.webp +0 -0
  151. package/avatars/free/plush-blobs/plush-red-angry.webp +0 -0
  152. package/avatars/free/plush-blobs/plush-yellow-frustrated.webp +0 -0
  153. package/avatars/free/retro-windows/retro-arrow-cursor.webp +0 -0
  154. package/avatars/free/retro-windows/retro-blank-window.webp +0 -0
  155. package/avatars/free/retro-windows/retro-cyan-notepad.webp +0 -0
  156. package/avatars/free/retro-windows/retro-desktop-computer.webp +0 -0
  157. package/avatars/free/retro-windows/retro-dialog-stack.webp +0 -0
  158. package/avatars/free/retro-windows/retro-eye-warning.webp +0 -0
  159. package/avatars/free/retro-windows/retro-gear-document.webp +0 -0
  160. package/avatars/free/retro-windows/retro-hand-cursor.webp +0 -0
  161. package/avatars/free/retro-windows/retro-heart-pet.webp +0 -0
  162. package/avatars/free/retro-windows/retro-music-cd.webp +0 -0
  163. package/avatars/free/retro-windows/retro-paint-palette.webp +0 -0
  164. package/avatars/free/retro-windows/retro-pen-notepad.webp +0 -0
  165. package/avatars/free/retro-windows/retro-pixel-tree.webp +0 -0
  166. package/avatars/free/retro-windows/retro-recycle-bin.webp +0 -0
  167. package/avatars/free/retro-windows/retro-warning-triangle.webp +0 -0
  168. package/avatars/free/retro-windows/retro-yellow-folder.webp +0 -0
  169. package/avatars/free/seals-and-sea-lions/otter-tongue-out-animated.webp +0 -0
  170. package/avatars/free/seals-and-sea-lions/otter-tongue-out.webp +0 -0
  171. package/avatars/free/seals-and-sea-lions/sea-lion-curious-face-animated.webp +0 -0
  172. package/avatars/free/seals-and-sea-lions/sea-lion-curious-face.webp +0 -0
  173. package/avatars/free/seals-and-sea-lions/sea-lion-gliding-animated.webp +0 -0
  174. package/avatars/free/seals-and-sea-lions/sea-lion-gliding.webp +0 -0
  175. package/avatars/free/seals-and-sea-lions/sea-lion-green-hood-animated.webp +0 -0
  176. package/avatars/free/seals-and-sea-lions/sea-lion-green-hood.webp +0 -0
  177. package/avatars/free/seals-and-sea-lions/sea-lion-mid-flip-animated.webp +0 -0
  178. package/avatars/free/seals-and-sea-lions/sea-lion-mid-flip.webp +0 -0
  179. package/avatars/free/seals-and-sea-lions/sea-lion-nose-boop-animated.webp +0 -0
  180. package/avatars/free/seals-and-sea-lions/sea-lion-nose-boop.webp +0 -0
  181. package/avatars/free/seals-and-sea-lions/sea-lion-on-a-rock-animated.webp +0 -0
  182. package/avatars/free/seals-and-sea-lions/sea-lion-on-a-rock.webp +0 -0
  183. package/avatars/free/seals-and-sea-lions/sea-lion-raised-flipper-animated.webp +0 -0
  184. package/avatars/free/seals-and-sea-lions/sea-lion-raised-flipper.webp +0 -0
  185. package/avatars/free/seals-and-sea-lions/sea-lion-sitting-profile-animated.webp +0 -0
  186. package/avatars/free/seals-and-sea-lions/sea-lion-sitting-profile.webp +0 -0
  187. package/avatars/free/seals-and-sea-lions/seal-big-whiskers-animated.webp +0 -0
  188. package/avatars/free/seals-and-sea-lions/seal-big-whiskers.webp +0 -0
  189. package/avatars/free/seals-and-sea-lions/seal-blinking-pup-animated.webp +0 -0
  190. package/avatars/free/seals-and-sea-lions/seal-blinking-pup.webp +0 -0
  191. package/avatars/free/seals-and-sea-lions/seal-blue-flipper-animated.webp +0 -0
  192. package/avatars/free/seals-and-sea-lions/seal-blue-flipper.webp +0 -0
  193. package/avatars/free/seals-and-sea-lions/seal-bunny-ears-animated.webp +0 -0
  194. package/avatars/free/seals-and-sea-lions/seal-bunny-ears.webp +0 -0
  195. package/avatars/free/seals-and-sea-lions/seal-heart-sunglasses-animated.webp +0 -0
  196. package/avatars/free/seals-and-sea-lions/seal-heart-sunglasses.webp +0 -0
  197. package/avatars/free/seals-and-sea-lions/seal-looking-back-animated.webp +0 -0
  198. package/avatars/free/seals-and-sea-lions/seal-looking-back.webp +0 -0
  199. package/avatars/free/seals-and-sea-lions/seal-side-eye-animated.webp +0 -0
  200. package/avatars/free/seals-and-sea-lions/seal-side-eye.webp +0 -0
  201. package/avatars/free/seals-and-sea-lions/seal-smiling-pup-animated.webp +0 -0
  202. package/avatars/free/seals-and-sea-lions/seal-smiling-pup.webp +0 -0
  203. package/avatars/free/seals-and-sea-lions/seal-upside-down-animated.webp +0 -0
  204. package/avatars/free/seals-and-sea-lions/seal-upside-down.webp +0 -0
  205. package/avatars/free/veggie-doodles/veggie-bok-choy.webp +0 -0
  206. package/avatars/free/veggie-doodles/veggie-broccoli.webp +0 -0
  207. package/avatars/free/veggie-doodles/veggie-cabbage.webp +0 -0
  208. package/avatars/free/veggie-doodles/veggie-eggplant.webp +0 -0
  209. package/avatars/free/veggie-doodles/veggie-garlic.webp +0 -0
  210. package/avatars/free/veggie-doodles/veggie-ginger.webp +0 -0
  211. package/avatars/free/veggie-doodles/veggie-leek.webp +0 -0
  212. package/avatars/free/veggie-doodles/veggie-potato.webp +0 -0
  213. package/avatars/free/veggie-doodles/veggie-purple-tomato.webp +0 -0
  214. package/avatars/free/veggie-doodles/veggie-scallion.webp +0 -0
  215. package/avatars/free/veggie-doodles/veggie-squash.webp +0 -0
  216. package/avatars/free/veggie-doodles/veggie-tomato.webp +0 -0
  217. package/avatars/terminal.json +1 -0
  218. package/cli.js +529 -0
  219. package/hooks/claude.json +14 -0
  220. package/logo.png +0 -0
  221. package/logo.svg +8 -0
  222. package/overlay/agents/antigravity.svg +1 -0
  223. package/overlay/agents/claude.svg +1 -0
  224. package/overlay/agents/codex.svg +1 -0
  225. package/overlay/agents/copilot.svg +1 -0
  226. package/overlay/control.html +528 -0
  227. package/overlay/index.html +365 -0
  228. package/overlay/main.js +361 -0
  229. package/overlay/preload.js +21 -0
  230. package/package.json +50 -4
  231. package/skills/agent-presence/SKILL.md +33 -0
@@ -0,0 +1,361 @@
1
+ // Transparent, click-through, always-on-top window that tails ~/.agent-presence/events.jsonl,
2
+ // plus a tray icon, a right-click menu and a "control room" window, so nothing needs a config edit (or an agent) to change.
3
+ const { app, BrowserWindow, ipcMain, screen, shell, Menu, Tray, nativeImage, dialog, globalShortcut } = require('electron');
4
+ const fs = require('fs');
5
+ const { spawn, execFile } = require('child_process');
6
+ const os = require('os');
7
+ const path = require('path');
8
+ const { pathToFileURL } = require('url');
9
+ const { HOME, EVENTS, CONFIG, packs, stickerFiles } = require('../cli');
10
+
11
+ const PID = path.join(HOME, 'overlay.pid');
12
+ const MY_STICKERS = path.join(HOME, 'stickers');
13
+ const AGENTS = [['claude', 'Claude'], ['codex', 'Codex'], ['copilot', 'Copilot'], ['antigravity', 'Antigravity']];
14
+ const COLOR = { claude: '#f6a983', codex: '#8fdcc6', copilot: '#8cc8f5', antigravity: '#f7a8c8' };
15
+ const LETTER = { claude: 'C', codex: 'X', copilot: 'P', antigravity: 'A' }; // same as the VS Code badges
16
+ const IMG = /\.(png|gif|svg|webp|jpe?g)$/i;
17
+ const item = f => ({ name: path.basename(f).replace(IMG, '').replace(/[-_]+/g, ' '), file: f, url: pathToFileURL(f).href });
18
+ const SETTINGS = { size: ['small', 'medium', 'large'], show: ['working', 'alerts', 'always'], details: ['hover', 'always'], helpers: ['line', 'pod', 'none'], motion: ['lively', 'calm', 'off'], scope: ['everywhere', 'apps'] };
19
+ const BUBBLE = { style: ['card', 'text'], theme: ['auto', 'dark', 'light'], size: ['small', 'medium', 'large'] };
20
+ const FLAGS = ['autostart', 'icon', 'shortcuts'];
21
+ // "Only over my apps": process names (Windows), app names (Mac) or commands (Linux) of the editors and terminals agents run in
22
+ const APPS = ['Code', 'Code - Insiders', 'Cursor', 'Windsurf', 'Antigravity', 'Zed', 'Claude', 'Codex', 'WindowsTerminal', 'Terminal', 'iTerm2', 'Warp', 'Ghostty',
23
+ 'Alacritty', 'WezTerm', 'wezterm-gui', 'kitty', 'gnome-terminal-server', 'konsole', 'powershell', 'pwsh', 'cmd', 'idea64', 'idea'];
24
+ const DEF = { scope: 'everywhere', apps: APPS, size: 'small', show: 'working', details: 'hover', helpers: 'line', motion: 'lively', icon: true, opacity: 100, shortcuts: true, autostart: true,
25
+ bubble: { on: true, style: 'card', border: true, theme: 'auto', text: 'auto', size: 'medium', auto: true, stats: true } };
26
+ // config.json + defaults: what the overlay and the control room see
27
+ const settingsOf = c => ({ ...DEF, ...Object.fromEntries(Object.keys(DEF).filter(k => c[k] != null).map(k => [k, c[k]])), bubble: { ...DEF.bubble, ...(c.bubble || {}) }, agents: c.agents || {} });
28
+
29
+ const readConfig = () => { try { return JSON.parse(fs.readFileSync(CONFIG, 'utf8')); } catch { return {}; } };
30
+ const expand = v => path.resolve(String(v).replace(/^~(?=$|[\\/])/, os.homedir()));
31
+ const list = v => (Array.isArray(v) ? v : v ? [v] : []);
32
+ const label = k => (AGENTS.find(a => a[0] === k) || [, k])[1];
33
+
34
+ // Default sticker: a colored disc with the agent's initial (same look as the VS Code badges). The overlay draws the same for helpers.
35
+ const disc = (letter, fill, ring = '#fff') => 'data:image/svg+xml,' + encodeURIComponent(
36
+ `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="28" fill="${fill}" stroke="${ring}" stroke-width="5"/>`
37
+ + `<text x="32" y="42.5" font-family="Segoe UI,system-ui,sans-serif" font-size="29" font-weight="800" text-anchor="middle" fill="#2b2020">${letter}</text></svg>`);
38
+
39
+ // config.avatars: key -> an image, "pack:<name>", or a list of both (each session / helper then gets its own).
40
+ // Keys: an agent (claude), "model:<text>" (sessions whose model contains it), "<agent>-subagent" (that agent's helpers),
41
+ // "subagent" (every helper), or a helper type (Explore).
42
+ function avatarSets(cfg) {
43
+ const sets = {}, all = packs();
44
+ for (const [k, v] of Object.entries(cfg.avatars || {})) {
45
+ const urls = stickerFiles(v, all).map(p => pathToFileURL(p).href);
46
+ if (urls.length) sets[k] = urls;
47
+ }
48
+ return sets;
49
+ }
50
+
51
+ // Sticker library: loose images in ~/.agent-presence/stickers, then every pack (yours first).
52
+ function library() {
53
+ let loose = [];
54
+ try { loose = fs.readdirSync(MY_STICKERS).filter(n => IMG.test(n)).map(n => item(path.join(MY_STICKERS, n))); } catch {}
55
+ const groups = loose.length ? [{ group: 'My stickers', items: loose }] : [];
56
+ for (const [id, p] of [...packs()].sort((a, b) => (b[1].mine - a[1].mine) || a[0].localeCompare(b[0])))
57
+ groups.push({ group: p.name.replace(/[-_]+/g, ' '), pack: id, mine: p.mine, items: p.files.map(item) });
58
+ return groups;
59
+ }
60
+
61
+ // Helper types and models seen recently, so they can get their own stickers.
62
+ function seen() {
63
+ const types = new Set(), models = new Set();
64
+ try {
65
+ const size = fs.statSync(EVENTS).size, len = Math.min(size, 512 * 1024), buf = Buffer.alloc(len), fd = fs.openSync(EVENTS, 'r');
66
+ fs.readSync(fd, buf, 0, len, size - len); fs.closeSync(fd);
67
+ const text = buf.toString('utf8');
68
+ for (const m of text.matchAll(/"subType":"([^"]{1,60})"/g)) types.add(m[1]);
69
+ for (const m of text.matchAll(/"model":"([^"]{1,80})"/g)) models.add(m[1]);
70
+ } catch {}
71
+ for (const k of Object.keys(readConfig().avatars || {})) {
72
+ if (k.startsWith('model:')) models.add(k.slice(6));
73
+ else if (!AGENTS.some(a => k === a[0] || k === a[0] + '-subagent') && k !== 'subagent') types.add(k);
74
+ }
75
+ return { types: [...types].sort(), models: [...models].sort() };
76
+ }
77
+
78
+ function tail(send) {
79
+ let offset = 0;
80
+ try { offset = Math.max(0, fs.statSync(EVENTS).size - 64 * 1024); } catch {} // replay recent so open sessions reappear
81
+ let partial = '';
82
+ const pump = () => {
83
+ let size; try { size = fs.statSync(EVENTS).size; } catch { return; }
84
+ if (size < offset) { offset = 0; partial = ''; } // log was rotated
85
+ if (size === offset) return;
86
+ const fd = fs.openSync(EVENTS, 'r'); const buf = Buffer.alloc(size - offset);
87
+ fs.readSync(fd, buf, 0, buf.length, offset); fs.closeSync(fd); offset = size;
88
+ const lines = (partial + buf.toString('utf8')).split('\n'); partial = lines.pop();
89
+ for (const l of lines) { try { send(JSON.parse(l)); } catch {} }
90
+ };
91
+ pump(); setInterval(pump, 250);
92
+ }
93
+
94
+ let wanted = true, watcher = null;
95
+ const front = { name: '', ok: true, failed: false, seen: [] };
96
+ let win, tray, room, hideTimer, quitting = false, peek = false, keyState = {}, keysOn;
97
+ const recent = []; // last events, replayed into the control room's live view
98
+
99
+ function setConfig(patch) {
100
+ const c = { ...readConfig(), ...patch };
101
+ fs.mkdirSync(HOME, { recursive: true });
102
+ fs.writeFileSync(CONFIG, JSON.stringify(c, null, 2) + '\n');
103
+ push();
104
+ }
105
+ function setAvatars(key, files) {
106
+ const avatars = { ...(readConfig().avatars || {}) };
107
+ if (files.length) avatars[key] = files.length === 1 ? files[0] : files; else delete avatars[key];
108
+ setConfig({ avatars });
109
+ }
110
+
111
+ function push() {
112
+ const c = readConfig();
113
+ const view = { ...settingsOf(c), avatars: avatarSets(c), names: c.names || {} };
114
+ if (view.shortcuts !== keysOn) registerKeys(view.shortcuts);
115
+ if (view.scope === 'apps') { startFront(); if (front.name) front.ok = isMine(front.name, view.apps); } else stopFront();
116
+ applyVisible();
117
+ if (win && !win.isDestroyed()) win.webContents.send('config', view);
118
+ if (room && !room.isDestroyed()) room.webContents.send('room', roomData());
119
+ if (tray) tray.setContextMenu(menu());
120
+ }
121
+
122
+ // On screen = you want them (tray, Ctrl+Alt+Shift+A) and, with "Only over my apps", one of your apps is in front.
123
+ function applyVisible() {
124
+ if (!win || win.isDestroyed()) return;
125
+ const show = wanted && (settingsOf(readConfig()).scope !== 'apps' || front.ok);
126
+ if (show !== win.isVisible()) show ? win.showInactive() : win.hide();
127
+ if (tray) tray.setContextMenu(menu());
128
+ }
129
+ const setVisible = on => { clearTimeout(hideTimer); wanted = on; applyVisible(); };
130
+
131
+ // Which app is in front. Windows: one hidden PowerShell loop that prints "pid name" when it changes. Mac: lsappinfo. Linux: xdotool (X11 only).
132
+ const isMine = (name, apps) => apps.some(a => a.toLowerCase() === name.toLowerCase());
133
+ const frontInfo = () => ({ name: front.name, ok: front.ok, failed: front.failed, seen: front.seen });
134
+ const PS = `Add-Type 'using System;using System.Runtime.InteropServices;public class FG{[DllImport("user32.dll")]public static extern IntPtr GetForegroundWindow();[DllImport("user32.dll")]public static extern uint GetWindowThreadProcessId(IntPtr h,out uint p);}'
135
+ $last = ''
136
+ while ($true) { if (-not (Get-Process -Id PARENT -ErrorAction SilentlyContinue)) { exit } # the overlay quit or crashed
137
+ $p = 0; [void][FG]::GetWindowThreadProcessId([FG]::GetForegroundWindow(), [ref]$p); $n = ''; try { $n = (Get-Process -Id $p -ErrorAction Stop).ProcessName } catch {}
138
+ $l = "$p $n"; if ($l -ne $last) { [Console]::Out.WriteLine($l); [Console]::Out.Flush(); $last = $l }; Start-Sleep -Milliseconds 400 }`;
139
+ function onFront(pid, name) {
140
+ if (!name || Number(pid) === process.pid) return; // our own control room: keep whatever was showing
141
+ front.name = name;
142
+ front.seen = [name, ...front.seen.filter(n => n !== name)].slice(0, 12);
143
+ front.ok = isMine(name, settingsOf(readConfig()).apps);
144
+ applyVisible();
145
+ if (room && !room.isDestroyed()) room.webContents.send('front', frontInfo());
146
+ }
147
+ function startFront() {
148
+ if (watcher || front.failed) return;
149
+ const fail = () => { stopFront(); front.failed = true; applyVisible(); };
150
+ if (process.platform === 'win32') {
151
+ const p = spawn('powershell.exe', ['-NoProfile', '-NonInteractive', '-EncodedCommand', Buffer.from(PS.replace('PARENT', process.pid), 'utf16le').toString('base64')], { windowsHide: true });
152
+ let buf = '';
153
+ p.stdout.on('data', d => { const lines = (buf + d).split(/\r?\n/); buf = lines.pop(); for (const l of lines) { const m = l.match(/^(\d+) (.+)$/); if (m) onFront(m[1], m[2]); } });
154
+ p.stderr.resume();
155
+ p.on('error', fail);
156
+ p.on('exit', () => { if (watcher === p) watcher = null; });
157
+ watcher = p;
158
+ } else {
159
+ const mac = process.platform === 'darwin';
160
+ const cmd = mac ? 'a=$(lsappinfo front); lsappinfo info -only pid $a; lsappinfo info -only name $a'
161
+ : 'p=$(xdotool getactivewindow getwindowpid) && echo "$p $(cat /proc/$p/comm)"';
162
+ const t = setInterval(() => execFile('/bin/sh', ['-c', cmd], { timeout: 2000 }, (err, out) => {
163
+ if (err) return fail();
164
+ const m = mac ? [, (out.match(/"pid"\s*=\s*(\d+)/) || [])[1], (out.match(/"(?:LSDisplayName|name)"\s*=\s*"([^"]*)"/) || [])[1]] : out.trim().match(/^(\d+) (.+)$/);
165
+ if (m && m[2]) onFront(m[1], m[2]);
166
+ }), 700);
167
+ watcher = { kill: () => clearInterval(t) };
168
+ }
169
+ }
170
+ function stopFront() { if (watcher) watcher.kill(); watcher = null; front.ok = true; }
171
+
172
+ // Global keyboard shortcuts: Ctrl+Alt+Shift (Cmd+Alt+Shift on a Mac) + a letter. A always works; the rest can be turned off.
173
+ const MOD = 'CommandOrControl+Alt+Shift+';
174
+ const cmd = m => win && !win.isDestroyed() && win.webContents.send('cmd', m);
175
+ const cycle = k => { const l = SETTINGS[k], v = l[(l.indexOf(settingsOf(readConfig())[k]) + 1) % l.length]; setConfig({ [k]: v }); return v; };
176
+ const bubble = patch => setConfig({ bubble: { ...(readConfig().bubble || {}), ...patch } });
177
+ const KEYS = [
178
+ ['A', 'Show or hide the stickers', () => { setVisible(!wanted); return wanted && 'Stickers on'; }],
179
+ ['F', 'Everywhere, or only over my apps', () => (cycle('scope') === 'apps' ? 'Only over my apps' : 'Everywhere')],
180
+ ['C', 'Open the control room', () => { openRoom('overview'); }],
181
+ ['B', 'Speech bubbles on or off', () => { const on = !settingsOf(readConfig()).bubble.on; bubble({ on }); return 'Bubbles ' + (on ? 'on' : 'off'); }],
182
+ ['P', 'Peek: open every bubble', () => { peek = !peek; cmd({ peek }); return 'Peek ' + (peek ? 'on' : 'off'); }],
183
+ ['T', 'Bubble theme: auto, dark, light', () => { const l = BUBBLE.theme, v = l[(l.indexOf(settingsOf(readConfig()).bubble.theme) + 1) % l.length]; bubble({ theme: v }); return 'Bubble theme: ' + v; }],
184
+ ['D', 'Details on hover or always', () => 'Details: ' + cycle('details')],
185
+ ['S', 'Next size', () => 'Size: ' + cycle('size')],
186
+ ['W', 'When to show: working, alerts, always', () => 'Show: ' + cycle('show')],
187
+ ['L', 'Helper layout: line, pod, none', () => 'Helpers: ' + cycle('helpers')],
188
+ ['M', 'Motion: lively, calm, off', () => 'Motion: ' + cycle('motion')],
189
+ ['H', 'Hide for 30 minutes', () => { setVisible(false); hideTimer = setTimeout(() => setVisible(true), 30 * 60e3); }],
190
+ ['R', 'Reset positions', () => { win.webContents.send('reset-positions'); return 'Positions reset'; }],
191
+ ];
192
+ function registerKeys(on) {
193
+ keysOn = on;
194
+ globalShortcut.unregisterAll();
195
+ keyState = {};
196
+ for (const [k, , fn] of KEYS) if (on || k === 'A') keyState[k] = globalShortcut.register(MOD + k, () => { const t = fn(); if (t) cmd({ toast: t }); });
197
+ }
198
+
199
+ // Short menu for the tray and for right-clicking a sticker; everything else lives in the control room.
200
+ function menu(target) {
201
+ const c = readConfig();
202
+ const items = [];
203
+ if (target) {
204
+ const key = target.subType != null ? (target.subType || target.agent + '-subagent') : target.agent;
205
+ const who = target.subType != null ? (target.subType || label(target.agent) + "'s helpers") : label(target.agent);
206
+ items.push({ label: `Change ${who} sticker…`, click: () => openRoom(key) });
207
+ if (target.subType == null) items.push({ label: `Hide ${who}`, click: () => setConfig({ agents: { ...(c.agents || {}), [target.agent]: false } }) });
208
+ items.push({ type: 'separator' });
209
+ }
210
+ items.push(
211
+ { label: 'Open control room…', accelerator: MOD + 'C', click: () => openRoom('overview') },
212
+ { label: wanted ? 'Hide stickers' : 'Show stickers', accelerator: 'CommandOrControl+Alt+Shift+A', click: () => setVisible(!wanted) },
213
+ { label: 'Only over my apps', type: 'checkbox', checked: c.scope === 'apps', click: () => setConfig({ scope: c.scope === 'apps' ? 'everywhere' : 'apps' }) },
214
+ { label: 'Peek at every bubble', accelerator: MOD + 'P', click: () => { peek = !peek; cmd({ peek }); } },
215
+ { label: 'Hide for 30 minutes', click: () => { setVisible(false); hideTimer = setTimeout(() => setVisible(true), 30 * 60e3); } },
216
+ { label: 'Size', submenu: SETTINGS.size.map(s => ({ label: s[0].toUpperCase() + s.slice(1), type: 'radio', checked: (c.size || 'small') === s, click: () => setConfig({ size: s }) })) },
217
+ { type: 'separator' },
218
+ { label: 'Quit Agent Peeps', click: () => app.quit() },
219
+ );
220
+ return Menu.buildFromTemplate(items);
221
+ }
222
+
223
+ function roomData(tab) {
224
+ const c = readConfig(), s = seen();
225
+ const targets = [
226
+ ...AGENTS.map(([k, n]) => ({ key: k, name: n, group: 'Agents', agent: k })),
227
+ { key: 'subagent', name: 'Every helper', group: 'Helpers' },
228
+ ...AGENTS.map(([k, n]) => ({ key: k + '-subagent', name: n + "'s helpers", group: 'Helpers', agent: k })),
229
+ ...s.types.map(t => ({ key: t, name: t, group: 'Helper types' })),
230
+ ...s.models.map(m => ({ key: 'model:' + m, name: m, group: 'Models' })),
231
+ ];
232
+ return {
233
+ tab,
234
+ settings: { ...settingsOf(c), visible: wanted }, front: frontInfo(),
235
+ mac: process.platform === 'darwin', colors: COLOR,
236
+ keys: KEYS.map(([k, text]) => ({ k, text, state: keyState[k] })), // true: works, false: another app has it, undefined: turned off
237
+ agents: AGENTS, targets,
238
+ chosen: Object.fromEntries(Object.entries(c.avatars || {}).map(([k, v]) => [k, list(v).map(x => (String(x).startsWith('pack:') ? x : expand(x)))])),
239
+ urls: avatarSets(c),
240
+ library: library(),
241
+ };
242
+ }
243
+ function makeRoom() {
244
+ room = new BrowserWindow({ width: 980, height: 680, minWidth: 760, minHeight: 520, show: false, title: 'Agent Peeps · control room', autoHideMenuBar: true,
245
+ backgroundColor: '#0a0b0d', titleBarStyle: 'hidden', titleBarOverlay: process.platform === 'darwin' ? true : { color: '#0a0b0d', symbolColor: '#c9ced6', height: 40 },
246
+ webPreferences: { preload: path.join(__dirname, 'preload.js') } });
247
+ room.loadFile(path.join(__dirname, 'control.html'));
248
+ room.webContents.on('did-finish-load', () => { room.webContents.send('room', roomData()); for (const e of recent) room.webContents.send('event', e); });
249
+ room.on('close', ev => { if (!quitting) { ev.preventDefault(); room.hide(); } });
250
+ }
251
+ function openRoom(tab) {
252
+ if (!room || room.isDestroyed()) makeRoom();
253
+ room.webContents.send('room', roomData(tab));
254
+ room.show(); room.focus();
255
+ }
256
+
257
+ function trayIcon() {
258
+ // Windows trays need a bitmap: draw the disc onto a canvas in the overlay page.
259
+ return win.webContents.executeJavaScript(`new Promise(r => { const i = new Image(); i.onload = () => { const c = document.createElement('canvas');
260
+ c.width = c.height = 64; c.getContext('2d').drawImage(i, 0, 0, 64, 64); r(c.toDataURL('image/png')); }; i.src = ${JSON.stringify(disc('A', COLOR.claude))}; })`)
261
+ .then(url => nativeImage.createFromDataURL(url).resize({ width: 32, height: 32 }));
262
+ }
263
+
264
+ function start() {
265
+ fs.mkdirSync(HOME, { recursive: true });
266
+ fs.writeFileSync(PID, String(process.pid));
267
+ app.on('will-quit', () => { try { fs.unlinkSync(PID); } catch {} });
268
+ app.on('before-quit', () => { quitting = true; stopFront(); });
269
+
270
+ const { workArea } = screen.getPrimaryDisplay();
271
+ win = new BrowserWindow({
272
+ ...workArea, transparent: true, frame: false, alwaysOnTop: true, skipTaskbar: true, focusable: false,
273
+ hasShadow: false, resizable: false, movable: false, show: false, backgroundColor: '#00000000',
274
+ webPreferences: { preload: path.join(__dirname, 'preload.js') },
275
+ });
276
+ win.setAlwaysOnTop(true, 'screen-saver');
277
+ win.setVisibleOnAllWorkspaces(true);
278
+ win.setIgnoreMouseEvents(true, { forward: true }); // clicks pass through except over stickers
279
+ win.loadFile(path.join(__dirname, 'index.html'));
280
+ win.once('ready-to-show', applyVisible);
281
+
282
+ ipcMain.on('mouse', (_, on) => win.setIgnoreMouseEvents(!on, { forward: true }));
283
+ // Reveal, never open: a path from the event log should not be able to launch anything.
284
+ ipcMain.on('reveal', (_, file, cwd) => {
285
+ if (typeof file !== 'string') return;
286
+ const p = path.resolve(typeof cwd === 'string' ? cwd : '', file);
287
+ if (fs.existsSync(p)) shell.showItemInFolder(p);
288
+ });
289
+ ipcMain.on('menu', (_, target) => menu(target && typeof target.agent === 'string' ? target : null).popup({ window: win }));
290
+
291
+ // control room: accept known settings, sane keys, and only files from the library (or picked in the file dialog)
292
+ const okKey = k => typeof k === 'string' && /^[\w .:@/-]{1,90}$/.test(k);
293
+ ipcMain.on('set-avatars', (_, key, files) => {
294
+ if (!okKey(key) || !Array.isArray(files)) return;
295
+ const lib = library();
296
+ const known = new Set([...lib.flatMap(g => g.items.map(i => i.file)), ...lib.filter(g => g.pack).map(g => 'pack:' + g.pack), ...list((readConfig().avatars || {})[key]).map(x => (String(x).startsWith('pack:') ? x : expand(x)))]);
297
+ setAvatars(key, files.filter(f => typeof f === 'string' && known.has(f)).slice(0, 50));
298
+ });
299
+ ipcMain.on('browse', async (_, key) => {
300
+ if (!okKey(key)) return;
301
+ const r = await dialog.showOpenDialog(room, { title: 'Add sticker images', properties: ['openFile', 'multiSelections'], filters: [{ name: 'Images', extensions: ['png', 'gif', 'svg', 'webp', 'jpg', 'jpeg'] }] });
302
+ if (!r.canceled) setAvatars(key, [...new Set([...list((readConfig().avatars || {})[key]).map(x => (String(x).startsWith('pack:') ? x : expand(x))), ...r.filePaths])]);
303
+ });
304
+ ipcMain.on('set-config', (_, patch) => {
305
+ const ok = {};
306
+ for (const [k, v] of Object.entries(patch || {})) {
307
+ if (SETTINGS[k] && SETTINGS[k].includes(v)) ok[k] = v;
308
+ else if (FLAGS.includes(k) && typeof v === 'boolean') ok[k] = v;
309
+ else if (k === 'apps' && Array.isArray(v)) ok[k] = v.filter(a => typeof a === 'string' && /^[\w .+()-]{1,60}$/.test(a)).slice(0, 60);
310
+ else if (k === 'opacity' && Number.isInteger(v) && v >= 30 && v <= 100) ok[k] = v;
311
+ else if (k === 'bubble' && v && typeof v === 'object') {
312
+ const b = { ...(readConfig().bubble || {}) };
313
+ for (const [bk, bv] of Object.entries(v)) {
314
+ if ((BUBBLE[bk] && BUBBLE[bk].includes(bv)) || (['on', 'border', 'auto', 'stats'].includes(bk) && typeof bv === 'boolean')
315
+ || (bk === 'text' && (bv === 'auto' || /^#[0-9a-f]{6}$/i.test(bv)))) b[bk] = bv;
316
+ }
317
+ ok[k] = b;
318
+ }
319
+ else if (k === 'agents' && v && typeof v === 'object') ok[k] = Object.fromEntries(Object.entries(v).filter(([a, on]) => okKey(a) && typeof on === 'boolean'));
320
+ }
321
+ setConfig(ok);
322
+ });
323
+ ipcMain.on('visible', (_, on) => setVisible(!!on));
324
+ ipcMain.on('reset-positions', () => win.webContents.send('reset-positions'));
325
+ ipcMain.on('open-folder', () => { fs.mkdirSync(MY_STICKERS, { recursive: true }); shell.openPath(MY_STICKERS); });
326
+
327
+ fs.watchFile(CONFIG, { interval: 1000 }, push); // edits from the CLI, an agent or VS Code apply live
328
+
329
+ win.webContents.on('did-finish-load', () => {
330
+ push();
331
+ tail(e => {
332
+ win.webContents.send('event', e);
333
+ recent.push(e); if (recent.length > 300) recent.shift();
334
+ if (room && !room.isDestroyed() && !room.webContents.isLoading()) room.webContents.send('event', e);
335
+ });
336
+ const ctl = process.argv.find(a => a.startsWith('--control'));
337
+ if (ctl) openRoom(ctl.split('=')[1] || 'overview'); else makeRoom();
338
+ trayIcon().then(img => { tray = new Tray(img); tray.setToolTip('Agent Peeps'); tray.setContextMenu(menu()); tray.on('click', () => openRoom('overview')); if (process.env.AGENT_PRESENCE_DEBUG) console.log('tray ready'); })
339
+ .catch(err => { if (process.env.AGENT_PRESENCE_DEBUG) console.error('tray failed', err); });
340
+ // Debug: AGENT_PRESENCE_SNAPSHOT=out.png saves what the overlay (or the control room, with --control) draws after N ms, then quits.
341
+ const snap = process.env.AGENT_PRESENCE_SNAPSHOT;
342
+ const wait = Number(process.env.AGENT_PRESENCE_SNAPSHOT_MS || 4000);
343
+ if (snap && ctl) setTimeout(async () => { fs.writeFileSync(snap, (await room.webContents.capturePage()).toPNG()); app.exit(0); }, wait);
344
+ else if (snap) setTimeout(async () => {
345
+ if (process.env.AGENT_PRESENCE_SNAPSHOT_HOVER) await win.webContents.executeJavaScript(`document.querySelector(${JSON.stringify(process.env.AGENT_PRESENCE_SNAPSHOT_HOVER)})?.classList.add('force-hover'); new Promise(r => setTimeout(r, 300))`);
346
+ const r = JSON.parse(await win.webContents.executeJavaScript(`JSON.stringify([...document.querySelectorAll('.group')].reduce((u, g) => {
347
+ const b = g.getBoundingClientRect(); return b.width ? { l: Math.min(u.l, b.left), t: Math.min(u.t, b.top), r: Math.max(u.r, b.right), b: Math.max(u.b, b.bottom) } : u; },
348
+ { l: innerWidth, t: innerHeight, r: 0, b: 0 }))`));
349
+ const rect = { x: Math.max(0, Math.floor(r.l - 220)), y: Math.max(0, Math.floor(r.t - 160)), width: Math.ceil(Math.max(1, r.r - r.l) + 240), height: Math.ceil(Math.max(1, r.b - r.t) + 170) };
350
+ fs.writeFileSync(snap, (await win.webContents.capturePage(rect)).toPNG()); app.exit(0);
351
+ }, wait);
352
+ });
353
+ }
354
+
355
+ // `agentpeeps control` starts us with --control; if we're already running, the running copy opens the control room.
356
+ if (!app.requestSingleInstanceLock()) app.quit();
357
+ else {
358
+ app.on('second-instance', (_, argv) => { const ctl = argv.find(a => a.startsWith('--control')); if (ctl) openRoom(ctl.split('=')[1] || 'overview'); });
359
+ app.whenReady().then(start);
360
+ }
361
+ app.on('window-all-closed', () => {}); // closing the control room must not quit the overlay
@@ -0,0 +1,21 @@
1
+ const { contextBridge, ipcRenderer } = require('electron');
2
+
3
+ contextBridge.exposeInMainWorld('ap', {
4
+ // overlay
5
+ onConfig: cb => ipcRenderer.on('config', (_, c) => cb(c)),
6
+ onEvent: cb => ipcRenderer.on('event', (_, e) => cb(e)),
7
+ onCmd: cb => ipcRenderer.on('cmd', (_, m) => cb(m)), // toasts and peek from the keyboard shortcuts
8
+ onResetPositions: cb => ipcRenderer.on('reset-positions', () => cb()),
9
+ mouse: over => ipcRenderer.send('mouse', over),
10
+ reveal: (file, cwd) => ipcRenderer.send('reveal', file, cwd),
11
+ menu: target => ipcRenderer.send('menu', target),
12
+ // control room
13
+ onRoom: cb => ipcRenderer.on('room', (_, d) => cb(d)),
14
+ onFront: cb => ipcRenderer.on('front', (_, f) => cb(f)), // the app in front, for "Only over my apps"
15
+ setAvatars: (key, files) => ipcRenderer.send('set-avatars', key, files),
16
+ browse: key => ipcRenderer.send('browse', key),
17
+ setConfig: patch => ipcRenderer.send('set-config', patch),
18
+ setVisible: on => ipcRenderer.send('visible', on),
19
+ resetPositions: () => ipcRenderer.send('reset-positions'),
20
+ openFolder: () => ipcRenderer.send('open-folder'),
21
+ });
package/package.json CHANGED
@@ -1,6 +1,52 @@
1
1
  {
2
2
  "name": "agentpeeps",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "Agent Peeps: small stickers that float over your screen and show what Claude Code, Codex, Copilot and Antigravity agents (and their subagents) are doing, live.",
5
+ "license": "MIT",
6
+ "bin": {
7
+ "agentpeeps": "cli.js",
8
+ "agent-presence": "cli.js"
9
+ },
10
+ "main": "overlay/main.js",
11
+ "scripts": {
12
+ "test": "node test.js",
13
+ "overlay": "electron overlay/main.js",
14
+ "demo": "node demo.js",
15
+ "terminal-stickers": "python scripts/terminal-stickers.py"
16
+ },
17
+ "files": [
18
+ "cli.js",
19
+ "logo.svg",
20
+ "overlay/",
21
+ "hooks/",
22
+ "skills/",
23
+ ".claude-plugin/",
24
+ ".codex-plugin/",
25
+ ".agents/",
26
+ "logo.png",
27
+ "avatars/free/",
28
+ "avatars/terminal.json"
29
+ ],
30
+ "keywords": [
31
+ "claude-code",
32
+ "codex",
33
+ "ai-agents",
34
+ "overlay",
35
+ "stickers",
36
+ "desktop-pet",
37
+ "copilot",
38
+ "antigravity",
39
+ "agentpeeps"
40
+ ],
41
+ "engines": {
42
+ "node": ">=18"
43
+ },
44
+ "dependencies": {
45
+ "electron": "^45.3.2"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "https://github.com/watermelon588/agentpeeps.git"
50
+ },
51
+ "homepage": "https://agentpeeps.space"
52
+ }
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: agent-presence
3
+ description: Customize or control the Agent Peeps sticker overlay — set sticker images for Claude, Codex, Copilot, Antigravity, their helpers or a subagent type, change size or when stickers show, or start, stop and check the floating overlay. Use when the user mentions their agent sticker, chibi, avatar, mascot or the presence overlay.
4
+ ---
5
+
6
+ # agentpeeps
7
+
8
+ Usually the fastest answer is: open the control room (tray icon, or `agentpeeps control`, or `agentpeeps control claude` for one agent's stickers). It changes everything with clicks and costs no tokens. Edit the config only when asked to.
9
+
10
+ The overlay reads `~/.agent-presence/config.json` (Windows: `%USERPROFILE%\.agent-presence\config.json`). Create it if missing; keep existing keys when editing.
11
+
12
+ ```json
13
+ {
14
+ "avatars": { "claude": ["<image>", "<image>"], "codex": "<image>", "claude-subagent": "<image>", "subagent": "<image>", "<subagent type>": "<image>" },
15
+ "names": { "claude": "Foxy" },
16
+ "size": "small", "show": "working", "details": "hover", "agents": { "copilot": false },
17
+ "autostart": true
18
+ }
19
+ ```
20
+
21
+ - Avatar values: an image path, `"pack:<name>"`, or a list. Keys: `claude`, `codex`, `copilot`, `antigravity`, `model:<text>` (sessions whose model contains it), `<agent>-subagent` (that agent's helpers), `subagent` (every helper), or a subagent type such as `Explore`. A list gives each session or helper one image from it.
22
+ - Images: PNG, GIF (animation plays), SVG, WebP or JPEG, square, about 256 px. The user's library is `~/.agent-presence/stickers/`. Use absolute paths; `~` is allowed. Check the file exists before writing it.
23
+ - Other keys: `size` (`small`|`medium`|`large`), `show` (`working`|`alerts`|`always`), `details` (`hover`|`always`), `agents` (e.g. `{ "copilot": false }`). The overlay applies edits live.
24
+ - `autostart: false` stops the overlay from opening on new sessions.
25
+
26
+ Commands (the npm package must be installed: `npm i -g agentpeeps`):
27
+
28
+ - `agentpeeps packs` lists packs (folders in `~/.agent-presence/stickers/`). `agentpeeps set <target> <pack|image|default>` assigns them, e.g. `set claude capybaras`, `set model:opus capybaras`, `set helpers fruit-cats`, `set claude-helpers critters`, `set Explore ~/x.png`. Prefer this over editing the config.
29
+
30
+ - `agentpeeps overlay` starts it, `agentpeeps overlay --quit` stops it. Config edits apply live, no restart.
31
+ - `agentpeeps watch` shows the same live view in the terminal.
32
+
33
+ Do not edit the agent's hook settings to customize stickers; only the config file above.