Skip to content

Commit 95832be

Browse files
authored
Merge pull request #41 from AlleyBo55/kiro/windows-linux-transparency
Kiro/windows linux transparency
2 parents 80725c2 + 92c9831 commit 95832be

7 files changed

Lines changed: 162 additions & 70 deletions

File tree

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,19 @@ We built this with tears in our eyes, remembering every episode, every gadget, e
5757
5858
---
5959

60-
## 🆕 One more thing — Doraemon now lives in your IDE. In **792 kilobytes.**
60+
## 🆕 One more thing — your Kiro agent has a heartbeat.
61+
62+
### Doraemon Coding Companion: a Shimeji-style Kiro desktop pet in **792 kilobytes**
63+
64+
A spinner tells you to wait. Doraemon tells you what is happening.
6165

6266
Install one Kiro extension. Doraemon walks out of the editor and onto your
63-
desktop — transparent, always on top, draggable, throwable.
67+
desktop — always on top, draggable, throwable, and reacting to code, tests,
68+
errors, Git, terminals, debugging and Kiro's AI agent status.
69+
70+
Nothing else to download. No API key. No account. No telemetry. Fully offline.
6471

65-
Nothing else to download. No API key. No account. No network call, ever.
72+
[**Install Doraemon Coding Companion from Open VSX →**](https://open-vsx.org/extension/AlleyBo55/doraemon-coding-companion)
6673

6774
### The part nobody else did
6875

@@ -79,8 +86,8 @@ Ours is **792 KB**.
7986

8087
Same 247 sprites. Same physics engine. Same everything.
8188

82-
Because 288 lines of Rust borrow the webview your operating system already
83-
shipped. macOS has WebKit. Windows has WebView2. Linux has WebKitGTK.
89+
Because a small native Rust companion borrows the webview your operating system
90+
already shipped. macOS has WebKit. Windows has WebView2. Linux has WebKitGTK.
8491

8592
**Nobody needs a second copy of Chromium to animate a cartoon cat.**
8693

@@ -109,8 +116,9 @@ so it can ask the OS. *That is the whole reason this works.*
109116

110117
### Honest small print
111118

112-
- Built and verified on **macOS arm64**. CI builds Windows, Linux and Intel Mac; those are unverified by hand.
113-
- A downloaded build needs Apple notarization to clear Gatekeeper. Measured: a quarantined binary starts and prints nothing.
119+
- CI builds Apple Silicon Mac, Intel Mac, Windows x64 and Linux x64. macOS arm64 is verified end to end; Windows and Linux render, while the 0.1.2 transparency fix still needs field validation.
120+
- macOS is ad-hoc signed, not notarized. The extension detects quarantine and asks before clearing it from the bundled companion only.
121+
- Wayland prevents applications from positioning their own windows, so Doraemon animates in place there. X11 restores desktop walking.
114122
- "Waiting on approval" is **inferred** from the agent going quiet, because Kiro has no such hook trigger. A slow tool looks the same from outside.
115123
- Approving from the bubble is deliberately not built. It would stall the agent while you're away.
116124

kiro-extension/.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ tsconfig.json
1111
# Rust sources and build artifacts. The compiled binary is staged into bin/
1212
# by scripts/build-companion.mjs and shipped from there.
1313
companion/**
14+
15+
# Scratch files scripts leave in dist/. Only the two bundles belong in a VSIX,
16+
# and a stale one from a verification run was shipping before this rule existed.
17+
dist/.*

kiro-extension/README.md

Lines changed: 90 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,29 @@
1-
# Doraemon Coding Companion
1+
# Doraemon Coding Companion: Kiro Desktop Pet
22

3-
**A real desktop pet. Inside your IDE. In one install.**
3+
<p align="center">
4+
<a href="https://open-vsx.org/extension/AlleyBo55/doraemon-coding-companion"><img src="https://img.shields.io/open-vsx/v/AlleyBo55/doraemon-coding-companion?label=Open%20VSX&color=1677ff" alt="Open VSX version"></a>
5+
<a href="https://open-vsx.org/extension/AlleyBo55/doraemon-coding-companion"><img src="https://img.shields.io/open-vsx/dt/AlleyBo55/doraemon-coding-companion?label=downloads&color=1f9d55" alt="Open VSX downloads"></a>
6+
<a href="#platform-support"><img src="https://img.shields.io/badge/macOS%20%C2%B7%20Windows%20%C2%B7%20Linux-supported-20232a" alt="macOS, Windows and Linux"></a>
7+
<a href="#privacy"><img src="https://img.shields.io/badge/privacy-fully%20offline-f2b84b" alt="Fully offline"></a>
8+
</p>
49

5-
Doraemon walks across your desktop, climbs your windows, naps when you go quiet,
6-
and tells you when Kiro needs you. Transparent. Always on top. Draggable.
7-
Throwable.
10+
## Your AI agent got smarter. Its status indicator didn't.
811

9-
Install the extension. That's the whole setup.
12+
A spinner tells you to wait. Doraemon tells you what is happening.
13+
14+
**Doraemon Coding Companion is a Shimeji-style Kiro desktop pet, AI coding
15+
companion and floating desktop mascot for macOS, Windows and Linux.** He walks
16+
across your screen and reacts to code, saves, tests, errors, Git, terminals,
17+
debugging and Kiro's agent status.
18+
19+
Most coding extensions ask you to open another panel. Doraemon walks out of Kiro
20+
and meets you on the desktop: borderless, always on top, draggable and throwable.
21+
22+
**One Kiro extension. No separate app. No account. No telemetry. Fully offline.**
23+
24+
[**Install from Kiro's Open VSX marketplace →**](https://open-vsx.org/extension/AlleyBo55/doraemon-coding-companion)
25+
26+
[Download the latest universal VSIX](https://github.com/AlleyBo55/doraemon/releases/latest)
1027

1128
---
1229

@@ -23,31 +40,29 @@ window, the same 247 sprites, the same physics engine.
2340
| Electron runtime | 274 MB |
2441
| **Doraemon companion** | **792 KB** |
2542

26-
Not a trick, and not a compromise. The companion is 288 lines of Rust wrapping
27-
the webview your operating system already has. macOS has WebKit. Windows has
43+
Not a trick, and not a compromise. A small native Rust companion wraps the
44+
webview your operating system already has. macOS has WebKit. Windows has
2845
WebView2. Linux has WebKitGTK. Nobody needs a second copy of Chromium to animate
2946
a cartoon cat.
3047

3148
The whole extension is **4.5 MB to download**, and 92% of that is the artwork.
3249

3350
---
3451

35-
## Install
52+
## Install in Kiro
3653

37-
```bash
38-
cd kiro-extension
39-
npm install
40-
npm run package
41-
```
54+
1. Open **Extensions** in Kiro (`Ctrl+Shift+X` on Windows/Linux,
55+
`Cmd+Shift+X` on macOS).
56+
2. Search for **Doraemon Coding Companion** or
57+
`AlleyBo55.doraemon-coding-companion`.
58+
3. Select the extension published by **AlleyBo55** and choose **Install**.
59+
4. Reload Kiro if it asks. Doraemon launches on your desktop automatically.
4260

43-
```bash
44-
/Applications/Kiro.app/Contents/Resources/app/bin/code \
45-
--install-extension doraemon-coding-companion-0.1.0.vsix
46-
```
47-
48-
Reload the window. Doraemon appears on your desktop.
61+
Prefer a file? Download the
62+
[latest universal VSIX](https://github.com/AlleyBo55/doraemon/releases/latest),
63+
then run **Extensions: Install from VSIX...** from Kiro's command palette.
4964

50-
No desktop app. No API key. No account. No network call, ever.
65+
No separate desktop app. No API key. No account. No network call, ever.
5166

5267
---
5368

@@ -201,6 +216,34 @@ the IDE cannot wedge anything. Reliability beat the demo.
201216

202217
---
203218

219+
## Frequently asked questions
220+
221+
### Is this a Kiro extension or a separate desktop app?
222+
223+
It is one Kiro extension. The tiny native companion that creates the transparent,
224+
always-on-top window is bundled inside the extension and exits with Kiro. There
225+
is no second installer or background service.
226+
227+
### Is this a Shimeji desktop pet?
228+
229+
Yes. Doraemon uses Shimeji-style physics: walking, climbing, falling, bouncing,
230+
dragging and throwing. Unlike a decorative mascot, he also reacts to real editor,
231+
terminal, Git, debugger, diagnostics and Kiro agent events.
232+
233+
### Does it work on macOS, Windows and Linux?
234+
235+
Platform-specific builds are published for Apple Silicon Mac, Intel Mac, Windows
236+
x64 and Linux x64. Linux transparency needs a compositing window manager; Wayland
237+
also prevents applications from positioning their own windows, so Doraemon
238+
animates in place there. See [Platform support](#platform-support).
239+
240+
### Does Doraemon send my code to an AI service?
241+
242+
No. The extension is fully offline and has no telemetry. It reads local editor
243+
events only long enough to choose a reaction; nothing leaves your machine.
244+
245+
---
246+
204247
## Settings
205248

206249
| Setting | Default | Meaning |
@@ -267,49 +310,44 @@ to the IDE's process ID, so a hard kill never leaves an orphaned cat on screen.
267310
| Sidebar mode | verified | yes | yes | yes |
268311
| Window mode | verified | yes | yes | yes |
269312
| All 33 signals | verified | yes | yes | yes |
270-
| Desktop mode | **verified** | not built | not built | not built |
313+
| Desktop binary | **verified** | CI-built | CI-built | CI-built |
314+
| Desktop rendering | **verified** | needs field validation | renders; 0.1.2 transparency fix needs field validation | renders; 0.1.2 transparency fix needs field validation |
271315

272-
Sidebar and window mode are pure editor APIs and behave identically everywhere.
273-
Activity detection too.
316+
Sidebar and window mode use editor APIs and behave identically everywhere.
317+
Activity detection does too.
274318

275-
Desktop mode needs the companion compiled for each platform. `darwin-arm64`,
276-
`darwin-x64`, `win32-x64` and `linux-x64` are built and published. The resolver
277-
looks for `bin/<platform>-<arch>/`, so adding a platform is a build step rather
278-
than a code change — but until that build exists, those users fall back to window
279-
or sidebar mode. `linux-arm64`, `linux-armhf` and `win32-arm64` are not built
280-
yet.
319+
Desktop binaries are built and published for `darwin-arm64`, `darwin-x64`,
320+
`win32-x64` and `linux-x64`. The resolver looks for
321+
`bin/<platform>-<arch>/`; users on an architecture without a binary fall back to
322+
window mode. `linux-arm64`, `linux-armhf` and `win32-arm64` are not built yet.
281323

282-
Linux additionally needs a compositing window manager for transparency, and
283-
WebKitGTK at runtime. On Wayland the mascot appears and animates but cannot walk,
284-
because the protocol does not let an application position its own window. X11
285-
sessions have the full range of movement.
324+
Linux needs WebKitGTK and a compositing window manager for transparency. On
325+
Wayland the mascot appears and animates but cannot walk, because the protocol
326+
does not let applications position their own windows. X11 sessions have the full
327+
range of movement.
286328

287329
---
288330

289331
## Known limits
290332

291-
Read this part before shipping it to anyone.
292-
293-
**macOS Gatekeeper will block a downloaded build.** The companion is ad-hoc
294-
signed, not notarized. Measured, same binary, same command:
333+
**macOS is ad-hoc signed, not notarized.** Downloads can arrive with Apple's
334+
quarantine flag, which stops the companion before it starts. The extension
335+
detects this and asks for explicit consent to clear the flag from its bundled
336+
binary only. Declining keeps the security control intact and falls back to window
337+
mode. Full notarization still requires an Apple Developer ID.
295338

296-
| | Output | Started |
297-
|---|---|---|
298-
| Local build | `mascot window ready` | yes |
299-
| With `com.apple.quarantine` | *nothing* | **no** |
300-
301-
A VSIX from a marketplace carries that quarantine flag. It works locally only
302-
because a locally compiled binary has no flag. Fixing this needs an Apple
303-
Developer ID with notarization, or stripping the attribute on first run — which
304-
is deliberately defeating a security control and should be your call.
339+
**Windows and Linux transparency in 0.1.2 needs field validation.** Both native
340+
branches compile and package in CI. Windows and Linux users confirmed that the
341+
mascot renders; 0.1.2 changes how each platform composites the transparent
342+
surface, and still needs confirmation on real machines before it is called
343+
verified.
305344

306-
**Only one platform is built.** See the table above.
345+
**Wayland cannot provide full movement.** It deliberately prevents applications
346+
from positioning their own windows, so Doraemon animates in place. Use an X11
347+
session for desktop walking.
307348

308349
**Approve-in-bubble is not implemented.** By choice, explained above.
309350

310-
**Linux desktop mode has never been compiled or run.** The reasoning is sound
311-
and the crates support it; that is not the same as working.
312-
313351
---
314352

315353
## Development
@@ -318,7 +356,7 @@ and the crates support it; that is not the same as working.
318356
npm run watch # rebuild JS on change
319357
npm run typecheck # tsc --noEmit
320358
npm run build-companion # cargo release build, stages into bin/
321-
npm test # typecheck + build + 29 host checks
359+
npm test # typecheck + build + 34 host checks
322360
npm run release # platform-specific VSIX into release/
323361
```
324362

kiro-extension/companion/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

kiro-extension/companion/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "doraemon-companion"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55
description = "Floating Doraemon mascot window driven by the Kiro extension"
66
license = "MIT"

kiro-extension/companion/src/main.rs

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,23 @@ enum UserEvent {
4949
Command(String),
5050
/// User clicked the bubble; bring the IDE forward.
5151
RaiseIde,
52+
/// Time to force the webview to recomposite. Windows only; the other two
53+
/// platforms composite the transparent surface correctly on first paint.
54+
#[cfg(target_os = "windows")]
55+
Repaint,
5256
/// The IDE that spawned us is gone.
5357
ParentGone,
5458
}
5559

60+
/// WebView2 leaves an opaque surface over a transparent window until something
61+
/// forces it to recomposite, so the mascot arrives inside a white box that only
62+
/// clears if the user resizes the window. A one-pixel resize round-trip is the
63+
/// cheapest way to trigger that ourselves. Scheduled a beat after the renderer
64+
/// reports its first frame, because nudging before anything has painted has
65+
/// nothing to recomposite.
66+
#[cfg(target_os = "windows")]
67+
const REPAINT_DELAY: Duration = Duration::from_millis(120);
68+
5669
/// Brings the IDE window back to the front. An extension cannot un-minimise its
5770
/// own window, but we are a separate process, so we can ask the OS.
5871
/// Release builds are linked as a GUI subsystem app, so they own no console.
@@ -268,6 +281,17 @@ fn main() -> wry::Result<()> {
268281
Some("openIde") => {
269282
let _ = ipc_proxy.send_event(UserEvent::RaiseIde);
270283
}
284+
// Delayed off the event loop deliberately: sleeping inside the
285+
// handler would stall the message pump and prevent the very
286+
// paint we are waiting to recomposite.
287+
#[cfg(target_os = "windows")]
288+
Some("ready") => {
289+
let nudge = ipc_proxy.clone();
290+
thread::spawn(move || {
291+
thread::sleep(REPAINT_DELAY);
292+
let _ = nudge.send_event(UserEvent::Repaint);
293+
});
294+
}
271295
_ => {}
272296
}
273297
})
@@ -283,7 +307,19 @@ fn main() -> wry::Result<()> {
283307
let webview = {
284308
use tao::platform::unix::WindowExtUnix;
285309
use wry::WebViewBuilderExtUnix;
286-
webview_builder.build_gtk(window.gtk_window())?
310+
311+
/*
312+
* Hand wry the GtkBox rather than the window. tao fills the window's
313+
* single child slot with a vertical box by default, and wry dispatches on
314+
* container type: a GtkBox is packed, while anything else falls through to
315+
* `add`, which GTK refuses on an already-occupied GtkBin. wry's own
316+
* example passes the window, which only holds for windows built without
317+
* that default box.
318+
*/
319+
match window.default_vbox() {
320+
Some(vbox) => webview_builder.build_gtk(vbox)?,
321+
None => webview_builder.build_gtk(window.gtk_window())?,
322+
}
287323
};
288324
#[cfg(not(target_os = "linux"))]
289325
let webview = webview_builder.build(&window)?;
@@ -317,6 +353,12 @@ fn main() -> wry::Result<()> {
317353

318354
Event::UserEvent(UserEvent::RaiseIde) => raise_ide(),
319355

356+
#[cfg(target_os = "windows")]
357+
Event::UserEvent(UserEvent::Repaint) => {
358+
window.set_inner_size(LogicalSize::new(WINDOW_W + 1.0, WINDOW_H + 1.0));
359+
window.set_inner_size(LogicalSize::new(WINDOW_W, WINDOW_H));
360+
}
361+
320362
Event::UserEvent(UserEvent::ParentGone) => {
321363
println!("[companion] parent exited, shutting down");
322364
*control_flow = ControlFlow::Exit;

kiro-extension/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "doraemon-coding-companion",
3-
"displayName": "Doraemon Coding Companion",
4-
"description": "A real desktop pet, not a sidebar widget. Doraemon walks across your screen and reacts to saves, failing tests, red diagnostics and Kiro's agent. One install, 792 KB, fully offline.",
5-
"version": "0.1.1",
3+
"displayName": "Doraemon Coding Companion: Kiro Desktop Pet",
4+
"description": "A Shimeji-style Kiro desktop pet and AI coding companion for macOS, Windows and Linux. Doraemon reacts to code, tests, errors, Git, terminals, debugging and agent status—offline in one install.",
5+
"version": "0.1.2",
66
"publisher": "AlleyBo55",
77
"license": "MIT",
88
"author": "AlleyBo55",
@@ -11,15 +11,15 @@
1111
"url": "git+https://github.com/AlleyBo55/doraemon.git",
1212
"directory": "kiro-extension"
1313
},
14-
"homepage": "https://github.com/AlleyBo55/doraemon#readme",
14+
"homepage": "https://github.com/AlleyBo55/doraemon/tree/master/kiro-extension#readme",
1515
"bugs": {
1616
"url": "https://github.com/AlleyBo55/doraemon/issues"
1717
},
1818
"engines": {
1919
"vscode": "^1.84.0"
2020
},
2121
"categories": ["Other"],
22-
"keywords": ["doraemon", "shimeji", "desktop-pet", "mascot", "companion", "kiro", "agent-status", "floating"],
22+
"keywords": ["doraemon", "kiro", "kiro-extension", "desktop-pet", "desktop-mascot", "coding-companion", "ai-coding-companion", "ai-agent", "ai-agent-monitor", "agent-status", "agent-monitor", "shimeji", "virtual-pet", "coding-pet", "code-mascot", "developer-companion", "developer-tools", "productivity", "coding", "tests", "git", "terminal", "debugging", "diagnostics", "offline", "floating", "always-on-top", "macos", "windows", "linux"],
2323
"icon": "media/icon.png",
2424
"main": "./dist/extension.js",
2525
"activationEvents": ["onStartupFinished"],
@@ -99,8 +99,8 @@
9999
"enum": ["auto", "desktop", "window", "sidebar"],
100100
"default": "auto",
101101
"enumDescriptions": [
102-
"Use the desktop app if installed, otherwise open a detached window.",
103-
"Transparent mascot floating freely over the desktop. Requires the Doraemon desktop app.",
102+
"Launch the bundled desktop mascot, with a detached-window fallback when unavailable.",
103+
"Transparent, borderless, always-on-top desktop mascot. The native companion is bundled; no separate app is required.",
104104
"A separate OS window outside the IDE frame, movable to any monitor. No extra install needed.",
105105
"Docked in the sidebar panel."
106106
],
@@ -109,7 +109,7 @@
109109
"doraemon.desktopAppPath": {
110110
"type": "string",
111111
"default": "",
112-
"description": "Full path to the Doraemon desktop app executable. Leave empty to auto-detect."
112+
"description": "Optional path to an external Doraemon executable. Leave empty to use the bundled desktop companion."
113113
},
114114
"doraemon.showThoughts": {
115115
"type": "boolean",

0 commit comments

Comments
 (0)