@bitefoundry/retrieviewer 0.0.2 → 0.0.4
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/ASSET-PROVENANCE.md +6 -0
- package/ASSETS-LICENSE.md +2 -1
- package/ATTRIBUTION.md +6 -1
- package/COMFORT-ART.md +65 -0
- package/DESKTOP-PLATFORMS.md +75 -0
- package/INSTALLING.md +8 -5
- package/PLUGIN.md +13 -10
- package/PREREQUISITES.md +95 -0
- package/PUPPY-MEMORY.md +102 -1
- package/README.ko.md +110 -0
- package/README.md +119 -58
- package/RELEASING.md +27 -14
- package/THIRD-PARTY-NOTICES.md +5 -3
- package/braille.mjs +35 -9
- package/examples/live.mjs +2 -2
- package/integrations/desktop/platform.mjs +27 -0
- package/integrations/linux-overlay/README.md +83 -0
- package/integrations/linux-overlay/overlay.py +1094 -0
- package/integrations/macos-overlay/README.md +83 -0
- package/integrations/macos-overlay/overlay.jxa +639 -0
- package/integrations/opencode/runtime.mjs +4 -4
- package/integrations/opencode/tui.tsx +1 -1
- package/integrations/windows-overlay/Overlay.cs +4 -4
- package/integrations/windows-overlay/desktop.mjs +40 -8
- package/integrations/windows-overlay/protocol.mjs +11 -7
- package/integrations/windows-overlay/worker.mjs +13 -7
- package/package.json +41 -14
- package/puppy-comfort-sprites.mjs +25 -0
- package/puppy-companion-comfort-q5.bin.gz +0 -0
- package/puppy-companion-comfort.json +77 -0
- package/puppy-companion-life.mjs +49 -16
- package/puppy-companion-objects.mjs +12 -0
- package/puppy-frame-predictive.mjs +15 -9
- package/puppy-frame-store.mjs +2 -2
- package/puppy-paper-world.mjs +14 -0
- package/puppy-paper.mjs +65 -14
- package/retrieviewer-cli.mjs +10 -3
- package/retrieviewer-plugin.d.mts +1 -1
- package/retrieviewer-plugin.mjs +1 -1
- package/retrieviewer.d.mts +10 -4
- package/retrieviewer.mjs +20 -14
- package/locomotion-core.mjs +0 -21
- package/locomotion-puppy.animal +0 -0
- package/vendor/procedural-animals/package.json +0 -40
- package/vendor/procedural-animals/src/animal.js +0 -146
- package/vendor/procedural-animals/src/bake.js +0 -51
- package/vendor/procedural-animals/src/build.js +0 -81
- package/vendor/procedural-animals/src/core/build/coatKit.js +0 -121
- package/vendor/procedural-animals/src/core/build/featherCards.js +0 -189
- package/vendor/procedural-animals/src/core/build/finEdges.js +0 -85
- package/vendor/procedural-animals/src/core/build/furSlope.js +0 -115
- package/vendor/procedural-animals/src/core/build/mesh.js +0 -67
- package/vendor/procedural-animals/src/core/build/pipeline.js +0 -272
- package/vendor/procedural-animals/src/core/build/seams.js +0 -183
- package/vendor/procedural-animals/src/core/build/warp.js +0 -112
- package/vendor/procedural-animals/src/core/build/weights.js +0 -393
- package/vendor/procedural-animals/src/core/math/vec.js +0 -81
- package/vendor/procedural-animals/src/core/motion/actions.js +0 -800
- package/vendor/procedural-animals/src/core/motion/bird.js +0 -3063
- package/vendor/procedural-animals/src/core/motion/birdActions.js +0 -1059
- package/vendor/procedural-animals/src/core/motion/common.js +0 -158
- package/vendor/procedural-animals/src/core/motion/index.js +0 -22
- package/vendor/procedural-animals/src/core/motion/quadruped.js +0 -2875
- package/vendor/procedural-animals/src/core/motion/snake.js +0 -1594
- package/vendor/procedural-animals/src/core/motion/spider.js +0 -1810
- package/vendor/procedural-animals/src/core/motion/swimmer.js +0 -1047
- package/vendor/procedural-animals/src/core/motion/swimmerActions.js +0 -613
- package/vendor/procedural-animals/src/core/render/animalObject.js +0 -262
- package/vendor/procedural-animals/src/core/render/coatMaterial.js +0 -1301
- package/vendor/procedural-animals/src/core/render/dqs.js +0 -159
- package/vendor/procedural-animals/src/core/render/eyes.js +0 -676
- package/vendor/procedural-animals/src/core/render/membranes.js +0 -77
- package/vendor/procedural-animals/src/core/render/skeleton.js +0 -41
- package/vendor/procedural-animals/src/core/rig/bird.js +0 -327
- package/vendor/procedural-animals/src/core/rig/quadruped.js +0 -76
- package/vendor/procedural-animals/src/core/rig/rig.js +0 -79
- package/vendor/procedural-animals/src/core/rig/snake.js +0 -76
- package/vendor/procedural-animals/src/core/rig/spider.js +0 -110
- package/vendor/procedural-animals/src/core/rig/swimmer.js +0 -181
- package/vendor/procedural-animals/src/core/sdf/eyeSocket.js +0 -53
- package/vendor/procedural-animals/src/core/sdf/mesher.js +0 -238
- package/vendor/procedural-animals/src/core/sdf/sdf.js +0 -263
- package/vendor/procedural-animals/src/index.d.ts +0 -98
- package/vendor/procedural-animals/src/index.js +0 -29
- package/vendor/procedural-animals/src/registry.js +0 -48
- package/vendor/procedural-animals/src/species/bear/behaviour.js +0 -463
- package/vendor/procedural-animals/src/species/bear/claws.js +0 -147
- package/vendor/procedural-animals/src/species/bear/coat.js +0 -726
- package/vendor/procedural-animals/src/species/bear/index.js +0 -139
- package/vendor/procedural-animals/src/species/bear/motion.js +0 -112
- package/vendor/procedural-animals/src/species/bear/regions.js +0 -78
- package/vendor/procedural-animals/src/species/bear/rig.js +0 -112
- package/vendor/procedural-animals/src/species/bear/sculpt.js +0 -272
- package/vendor/procedural-animals/src/species/boar/behaviour.js +0 -335
- package/vendor/procedural-animals/src/species/boar/coat.js +0 -372
- package/vendor/procedural-animals/src/species/boar/index.js +0 -110
- package/vendor/procedural-animals/src/species/boar/motion.js +0 -85
- package/vendor/procedural-animals/src/species/boar/regions.js +0 -88
- package/vendor/procedural-animals/src/species/boar/rig.js +0 -111
- package/vendor/procedural-animals/src/species/boar/sculpt.js +0 -285
- package/vendor/procedural-animals/src/species/cat/behaviour.js +0 -559
- package/vendor/procedural-animals/src/species/cat/coat.js +0 -841
- package/vendor/procedural-animals/src/species/cat/index.js +0 -211
- package/vendor/procedural-animals/src/species/cat/motion.js +0 -101
- package/vendor/procedural-animals/src/species/cat/regions.js +0 -82
- package/vendor/procedural-animals/src/species/cat/rig.js +0 -100
- package/vendor/procedural-animals/src/species/cat/sculpt.js +0 -266
- package/vendor/procedural-animals/src/species/cat/whiskers.js +0 -110
- package/vendor/procedural-animals/src/species/cheetah/coat.js +0 -427
- package/vendor/procedural-animals/src/species/cheetah/index.js +0 -51
- package/vendor/procedural-animals/src/species/cheetah/joints.js +0 -3
- package/vendor/procedural-animals/src/species/cheetah/motion.js +0 -77
- package/vendor/procedural-animals/src/species/cheetah/regions.js +0 -95
- package/vendor/procedural-animals/src/species/cheetah/rig.js +0 -66
- package/vendor/procedural-animals/src/species/cheetah/sculpt.js +0 -158
- package/vendor/procedural-animals/src/species/chicken/coat.js +0 -313
- package/vendor/procedural-animals/src/species/chicken/coverts.js +0 -320
- package/vendor/procedural-animals/src/species/chicken/index.js +0 -110
- package/vendor/procedural-animals/src/species/chicken/motion.js +0 -177
- package/vendor/procedural-animals/src/species/chicken/regions.js +0 -66
- package/vendor/procedural-animals/src/species/chicken/rig.js +0 -144
- package/vendor/procedural-animals/src/species/chicken/sculpt.js +0 -389
- package/vendor/procedural-animals/src/species/chicken/wingLook.js +0 -66
- package/vendor/procedural-animals/src/species/chicken/wingStack.js +0 -124
- package/vendor/procedural-animals/src/species/cow/behaviour.js +0 -521
- package/vendor/procedural-animals/src/species/cow/coat.js +0 -465
- package/vendor/procedural-animals/src/species/cow/index.js +0 -118
- package/vendor/procedural-animals/src/species/cow/motion.js +0 -81
- package/vendor/procedural-animals/src/species/cow/regions.js +0 -98
- package/vendor/procedural-animals/src/species/cow/rig.js +0 -116
- package/vendor/procedural-animals/src/species/cow/sculpt.js +0 -339
- package/vendor/procedural-animals/src/species/crow/coat.js +0 -145
- package/vendor/procedural-animals/src/species/crow/index.js +0 -70
- package/vendor/procedural-animals/src/species/crow/joints.js +0 -3
- package/vendor/procedural-animals/src/species/crow/motion.js +0 -101
- package/vendor/procedural-animals/src/species/crow/regions.js +0 -50
- package/vendor/procedural-animals/src/species/crow/rig.js +0 -83
- package/vendor/procedural-animals/src/species/crow/sculpt.js +0 -118
- package/vendor/procedural-animals/src/species/deer/behaviour.js +0 -513
- package/vendor/procedural-animals/src/species/deer/coat.js +0 -391
- package/vendor/procedural-animals/src/species/deer/index.js +0 -106
- package/vendor/procedural-animals/src/species/deer/motion.js +0 -97
- package/vendor/procedural-animals/src/species/deer/regions.js +0 -60
- package/vendor/procedural-animals/src/species/deer/rig.js +0 -124
- package/vendor/procedural-animals/src/species/deer/sculpt.js +0 -297
- package/vendor/procedural-animals/src/species/dog/behaviour.js +0 -521
- package/vendor/procedural-animals/src/species/dog/coat.js +0 -495
- package/vendor/procedural-animals/src/species/dog/index.js +0 -144
- package/vendor/procedural-animals/src/species/dog/motion.js +0 -118
- package/vendor/procedural-animals/src/species/dog/regions.js +0 -61
- package/vendor/procedural-animals/src/species/dog/rig.js +0 -129
- package/vendor/procedural-animals/src/species/dog/sculpt.js +0 -246
- package/vendor/procedural-animals/src/species/eagle/coat.js +0 -250
- package/vendor/procedural-animals/src/species/eagle/index.js +0 -76
- package/vendor/procedural-animals/src/species/eagle/joints.js +0 -3
- package/vendor/procedural-animals/src/species/eagle/motion.js +0 -137
- package/vendor/procedural-animals/src/species/eagle/regions.js +0 -57
- package/vendor/procedural-animals/src/species/eagle/rig.js +0 -107
- package/vendor/procedural-animals/src/species/eagle/sculpt.js +0 -137
- package/vendor/procedural-animals/src/species/fish/coat.js +0 -271
- package/vendor/procedural-animals/src/species/fish/index.js +0 -88
- package/vendor/procedural-animals/src/species/fish/motion.js +0 -92
- package/vendor/procedural-animals/src/species/fish/regions.js +0 -27
- package/vendor/procedural-animals/src/species/fish/rig.js +0 -143
- package/vendor/procedural-animals/src/species/fish/sculpt.js +0 -214
- package/vendor/procedural-animals/src/species/fish/variants.js +0 -126
- package/vendor/procedural-animals/src/species/fox/behaviour.js +0 -314
- package/vendor/procedural-animals/src/species/fox/coat.js +0 -444
- package/vendor/procedural-animals/src/species/fox/index.js +0 -120
- package/vendor/procedural-animals/src/species/fox/motion.js +0 -81
- package/vendor/procedural-animals/src/species/fox/regions.js +0 -59
- package/vendor/procedural-animals/src/species/fox/rig.js +0 -91
- package/vendor/procedural-animals/src/species/fox/sculpt.js +0 -202
- package/vendor/procedural-animals/src/species/frog/behaviour.js +0 -590
- package/vendor/procedural-animals/src/species/frog/coat.js +0 -305
- package/vendor/procedural-animals/src/species/frog/index.js +0 -97
- package/vendor/procedural-animals/src/species/frog/motion.js +0 -69
- package/vendor/procedural-animals/src/species/frog/regions.js +0 -46
- package/vendor/procedural-animals/src/species/frog/rig.js +0 -156
- package/vendor/procedural-animals/src/species/frog/sculpt.js +0 -240
- package/vendor/procedural-animals/src/species/goat/behaviour.js +0 -509
- package/vendor/procedural-animals/src/species/goat/coat.js +0 -590
- package/vendor/procedural-animals/src/species/goat/index.js +0 -149
- package/vendor/procedural-animals/src/species/goat/motion.js +0 -95
- package/vendor/procedural-animals/src/species/goat/regions.js +0 -98
- package/vendor/procedural-animals/src/species/goat/rig.js +0 -181
- package/vendor/procedural-animals/src/species/goat/sculpt.js +0 -547
- package/vendor/procedural-animals/src/species/horse/coat.js +0 -361
- package/vendor/procedural-animals/src/species/horse/coatSeam.js +0 -122
- package/vendor/procedural-animals/src/species/horse/index.js +0 -80
- package/vendor/procedural-animals/src/species/horse/motion.js +0 -245
- package/vendor/procedural-animals/src/species/horse/regions.js +0 -60
- package/vendor/procedural-animals/src/species/horse/rig.js +0 -117
- package/vendor/procedural-animals/src/species/horse/sculpt.js +0 -316
- package/vendor/procedural-animals/src/species/horse/seamWeights.js +0 -272
- package/vendor/procedural-animals/src/species/lion/behaviour.js +0 -509
- package/vendor/procedural-animals/src/species/lion/coat.js +0 -1016
- package/vendor/procedural-animals/src/species/lion/index.js +0 -111
- package/vendor/procedural-animals/src/species/lion/motion.js +0 -87
- package/vendor/procedural-animals/src/species/lion/regions.js +0 -106
- package/vendor/procedural-animals/src/species/lion/rig.js +0 -110
- package/vendor/procedural-animals/src/species/lion/sculpt.js +0 -384
- package/vendor/procedural-animals/src/species/lion/whiskers.js +0 -132
- package/vendor/procedural-animals/src/species/pig/behaviour.js +0 -575
- package/vendor/procedural-animals/src/species/pig/coat.js +0 -730
- package/vendor/procedural-animals/src/species/pig/ears.js +0 -242
- package/vendor/procedural-animals/src/species/pig/index.js +0 -161
- package/vendor/procedural-animals/src/species/pig/motion.js +0 -105
- package/vendor/procedural-animals/src/species/pig/regions.js +0 -100
- package/vendor/procedural-animals/src/species/pig/rig.js +0 -152
- package/vendor/procedural-animals/src/species/pig/sculpt.js +0 -382
- package/vendor/procedural-animals/src/species/rabbit/behaviour.js +0 -605
- package/vendor/procedural-animals/src/species/rabbit/coat.js +0 -285
- package/vendor/procedural-animals/src/species/rabbit/index.js +0 -85
- package/vendor/procedural-animals/src/species/rabbit/motion.js +0 -85
- package/vendor/procedural-animals/src/species/rabbit/regions.js +0 -48
- package/vendor/procedural-animals/src/species/rabbit/rig.js +0 -99
- package/vendor/procedural-animals/src/species/rabbit/sculpt.js +0 -148
- package/vendor/procedural-animals/src/species/rat/behaviour.js +0 -539
- package/vendor/procedural-animals/src/species/rat/coat.js +0 -341
- package/vendor/procedural-animals/src/species/rat/index.js +0 -111
- package/vendor/procedural-animals/src/species/rat/motion.js +0 -90
- package/vendor/procedural-animals/src/species/rat/regions.js +0 -92
- package/vendor/procedural-animals/src/species/rat/rig.js +0 -112
- package/vendor/procedural-animals/src/species/rat/sculpt.js +0 -163
- package/vendor/procedural-animals/src/species/rat/whiskers.js +0 -119
- package/vendor/procedural-animals/src/species/shark/coat.js +0 -383
- package/vendor/procedural-animals/src/species/shark/index.js +0 -104
- package/vendor/procedural-animals/src/species/shark/motion.js +0 -69
- package/vendor/procedural-animals/src/species/shark/regions.js +0 -34
- package/vendor/procedural-animals/src/species/shark/rig.js +0 -194
- package/vendor/procedural-animals/src/species/shark/sculpt.js +0 -343
- package/vendor/procedural-animals/src/species/shark/variants.js +0 -105
- package/vendor/procedural-animals/src/species/sheep/behaviour.js +0 -522
- package/vendor/procedural-animals/src/species/sheep/coat.js +0 -529
- package/vendor/procedural-animals/src/species/sheep/index.js +0 -152
- package/vendor/procedural-animals/src/species/sheep/motion.js +0 -86
- package/vendor/procedural-animals/src/species/sheep/neck.js +0 -41
- package/vendor/procedural-animals/src/species/sheep/regions.js +0 -62
- package/vendor/procedural-animals/src/species/sheep/rig.js +0 -163
- package/vendor/procedural-animals/src/species/sheep/sculpt.js +0 -542
- package/vendor/procedural-animals/src/species/snake/coat.js +0 -315
- package/vendor/procedural-animals/src/species/snake/index.js +0 -73
- package/vendor/procedural-animals/src/species/snake/motion.js +0 -51
- package/vendor/procedural-animals/src/species/snake/regions.js +0 -51
- package/vendor/procedural-animals/src/species/snake/rig.js +0 -108
- package/vendor/procedural-animals/src/species/snake/sculpt.js +0 -122
- package/vendor/procedural-animals/src/species/spider/coat.js +0 -279
- package/vendor/procedural-animals/src/species/spider/index.js +0 -78
- package/vendor/procedural-animals/src/species/spider/motion.js +0 -72
- package/vendor/procedural-animals/src/species/spider/regions.js +0 -87
- package/vendor/procedural-animals/src/species/spider/rig.js +0 -118
- package/vendor/procedural-animals/src/species/spider/sculpt.js +0 -182
- package/vendor/procedural-animals/src/species/wolf/behaviour.js +0 -160
- package/vendor/procedural-animals/src/species/wolf/coat.js +0 -749
- package/vendor/procedural-animals/src/species/wolf/index.js +0 -107
- package/vendor/procedural-animals/src/species/wolf/motion.js +0 -80
- package/vendor/procedural-animals/src/species/wolf/regions.js +0 -57
- package/vendor/procedural-animals/src/species/wolf/rig.js +0 -87
- package/vendor/procedural-animals/src/species/wolf/sculpt.js +0 -339
- package/vendor/procedural-animals/src/worker.js +0 -29
package/README.md
CHANGED
|
@@ -1,87 +1,148 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://bitefoundry.github.io/retrieviewer/"><img src="https://raw.githubusercontent.com/BiteFoundry/retrieviewer/main/docs/assets/preview.png" alt="Retrieviewer — a fluffy retriever drawn with tiny monochrome Braille dots" width="960"></a>
|
|
3
|
+
</p>
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
<h1 align="center">Retrieviewer</h1>
|
|
6
|
+
<p align="center">A little company for your screen.</p>
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://bitefoundry.github.io/retrieviewer/">Meet your retriever</a> ·
|
|
9
|
+
<a href="./README.ko.md">한국어</a> ·
|
|
10
|
+
<a href="https://www.npmjs.com/package/@bitefoundry/retrieviewer">npm</a> ·
|
|
11
|
+
<a href="https://github.com/BiteFoundry/retrieviewer/issues">Feedback</a>
|
|
12
|
+
</p>
|
|
5
13
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
[credits](./ATTRIBUTION.md) and [brand notice](./TRADEMARKS.md).
|
|
10
|
-
The complete package is not MIT-only.
|
|
14
|
+
A fluffy, autonomous Braille-art retriever that hangs out above an app window.
|
|
15
|
+
It wanders, runs, flops belly-up and naps. Toss a ball, offer a treat or play tug.
|
|
16
|
+
Get back to your thing.
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
Made by [BiteFoundry](https://github.com/BiteFoundry). No model API, account or
|
|
19
|
+
telemetry is needed by the runtime.
|
|
13
20
|
|
|
14
|
-
|
|
15
|
-
for the desktop companion. The helper builds automatically on first launch.
|
|
21
|
+
## Bring one home
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
Install **on the computer displaying the app**, in a terminal. Node.js is required;
|
|
24
|
+
[install Node/npm first](./PREREQUISITES.md) if you do not have them.
|
|
18
25
|
|
|
19
|
-
|
|
20
|
-
|
|
26
|
+
1. Install (or update):
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm install -g @bitefoundry/retrieviewer@latest
|
|
21
30
|
```
|
|
22
31
|
|
|
23
|
-
2. Run
|
|
32
|
+
2. Run, then choose an app in the window picker:
|
|
24
33
|
|
|
25
|
-
```
|
|
34
|
+
```sh
|
|
26
35
|
retrieviewer desktop
|
|
27
36
|
```
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
38
|
+
Next time, just run `retrieviewer desktop`. This is a separate transparent,
|
|
39
|
+
click-through native overlay—not a patched app, shell wrapper or injected MCP
|
|
40
|
+
widget. It follows a whole app window, not a tab, and hides when that window is
|
|
41
|
+
inactive or minimized. No automatic startup entry is installed.
|
|
42
|
+
|
|
43
|
+
> **Cursor / VS Code Remote SSH:** run those commands in your **local** computer's
|
|
44
|
+
> terminal, not the remote server's terminal. The puppy belongs where the window
|
|
45
|
+
> is displayed. A server's `DISPLAY=:1` refers to that server's X11 display, which
|
|
46
|
+
> you may be viewing through VNC; it is not automatically your local Cursor window.
|
|
35
47
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
`npm uninstall -g @bitefoundry/retrieviewer` removes the package. See
|
|
39
|
-
[desktop support and removal](./WINDOWS-COMPANION.md).
|
|
48
|
+
<details>
|
|
49
|
+
<summary>Try once with npx / command not found / Node is missing</summary>
|
|
40
50
|
|
|
41
|
-
|
|
51
|
+
With Node/npm installed, try without a global installation:
|
|
42
52
|
|
|
43
53
|
```sh
|
|
44
|
-
|
|
45
|
-
opencode
|
|
54
|
+
npx --yes --package @bitefoundry/retrieviewer@latest retrieviewer desktop
|
|
46
55
|
```
|
|
47
56
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
alone does not create a pet inside their screens.
|
|
57
|
+
`npx` does **not** permanently add `retrieviewer` to PATH. Use the global install
|
|
58
|
+
above for future short commands. If that still says command not found, see
|
|
59
|
+
[PATH fixes for bash, csh/tcsh and Windows](./PREREQUISITES.md#command-not-found).
|
|
60
|
+
Do not use `sudo npm install -g` as a blanket workaround.
|
|
53
61
|
|
|
54
|
-
|
|
55
|
-
`/retrieviewer disable`. See [installation and removal](./INSTALLING.md).
|
|
62
|
+
</details>
|
|
56
63
|
|
|
57
|
-
##
|
|
64
|
+
## Where it can live
|
|
58
65
|
|
|
59
|
-
|
|
66
|
+
| Desktop | Status / requirements |
|
|
67
|
+
| --- | --- |
|
|
68
|
+
| Windows 10/11 x64 | Live tested. Node + Windows .NET Framework 4 compiler; helper builds on first launch. |
|
|
69
|
+
| Linux X11 | AlmaLinux 8 / GLIBC 2.28 / Python 3.6.8 / Node 22.23.4 tested in an isolated composited X11 desktop. Requires system Python 3.6+, X11/Xrender/Xext and a compositor. |
|
|
70
|
+
| macOS | **Experimental; no Mac runtime verification yet.** Uses built-in osascript/AppKit. |
|
|
71
|
+
| Native Wayland / headless SSH | Not supported by the desktop overlay. No session/privacy workaround is installed. |
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
73
|
+
Linux currently favors lower load: 16px cells / 15fps versus the Windows default
|
|
74
|
+
8px cells / 30fps, so its dots look coarser. The Q5 artwork is identical.
|
|
75
|
+
This is not a zero-resource widget: the npm tarball is about 19 MB. An earlier
|
|
76
|
+
0.0.3 AlmaLinux test used roughly 180 MiB of Node RSS, plus the Python helper;
|
|
77
|
+
that is not a memory budget or a new Linux GUI check for 0.0.4.
|
|
78
|
+
See [platform details and verification boundaries](./DESKTOP-PLATFORMS.md).
|
|
79
|
+
|
|
80
|
+
## Easy to leave, too
|
|
81
|
+
|
|
82
|
+
Quit through the controls, or run `retrieviewer desktop-stop`.
|
|
83
|
+
To remove the companion's own cache and the package:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
retrieviewer desktop-remove --yes
|
|
87
|
+
npm uninstall -g @bitefoundry/retrieviewer
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The desktop companion does not edit agent credentials, app binaries or shell
|
|
91
|
+
profiles. [Optional OpenCode registration](./INSTALLING.md) is separate; disconnect
|
|
92
|
+
that registration before uninstalling if you explicitly enabled it.
|
|
93
|
+
|
|
94
|
+
## Put it inside your own TUI
|
|
63
95
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
}
|
|
96
|
+
The core is host-driven. Your app owns the pane, input and clock; the puppy does
|
|
97
|
+
not take over stdin/stdout.
|
|
98
|
+
|
|
99
|
+
```js
|
|
100
|
+
import { createPetPlugin } from '@bitefoundry/retrieviewer/plugin';
|
|
101
|
+
|
|
102
|
+
const puppy = await createPetPlugin({
|
|
103
|
+
host: {
|
|
104
|
+
getSize: () => ({ columns: pane.width, rows: pane.height }),
|
|
105
|
+
render: ({ text }) => pane.setContent(text),
|
|
106
|
+
onError: error => logToYourApp(error),
|
|
107
|
+
},
|
|
108
|
+
});
|
|
69
109
|
puppy.start();
|
|
70
|
-
//
|
|
110
|
+
// puppy.interact('ball') / puppy.interact('treat') / puppy.interact('tug')
|
|
71
111
|
// On unmount: puppy.dispose()
|
|
72
112
|
```
|
|
73
113
|
|
|
74
|
-
`pane` and `logToYourApp`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
114
|
+
`pane` and `logToYourApp` come from your app.
|
|
115
|
+
[Plugin lifecycle](./PLUGIN.md) · [Core / JSONL bridge](./EMBEDDING.md) ·
|
|
116
|
+
[Optional OpenCode adapter](./INSTALLING.md).
|
|
117
|
+
The native OpenCode pane has Windows/OpenCode 2.1.2 host evidence; Codex, Claude,
|
|
118
|
+
Cursor, Grok and Antigravity **in-terminal** renderers are not implemented.
|
|
119
|
+
An MCP connection alone cannot insert a persistent picture into those clients.
|
|
120
|
+
|
|
121
|
+
## Build, contribute, be kind
|
|
122
|
+
|
|
123
|
+
```sh
|
|
124
|
+
npm ci
|
|
125
|
+
npm test
|
|
126
|
+
npm run build:site
|
|
127
|
+
npm start
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The public tree contains the shipped runtime, Q5 art, focused runtime/adapter
|
|
131
|
+
tests and reproducible site build. Historical art experiments, original reference
|
|
132
|
+
photos and private worker/QA logs are intentionally absent.
|
|
133
|
+
See [contributing](./CONTRIBUTING.md) and [source scope](./SOURCE-SCOPE.md).
|
|
134
|
+
Compatibility reports are welcome—especially real Mac testing and X11 desktops.
|
|
135
|
+
|
|
136
|
+
## Code and coat have different licenses
|
|
137
|
+
|
|
138
|
+
**Code: MIT. Artwork: CC BY-SA 4.0.** Commercial reuse is permitted under the
|
|
139
|
+
respective terms. Keep artwork credits and ShareAlike conditions when applicable;
|
|
140
|
+
the complete package is **not MIT-only**.
|
|
79
141
|
|
|
80
|
-
- [
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
- [Third-party notices](./THIRD-PARTY-NOTICES.md).
|
|
142
|
+
[Code license](./LICENSE-CODE) · [Artwork terms](./ASSETS-LICENSE.md) ·
|
|
143
|
+
[Required credits](./ATTRIBUTION.md) · [Third-party notices](./THIRD-PARTY-NOTICES.md) ·
|
|
144
|
+
[Brand notice](./TRADEMARKS.md).
|
|
84
145
|
|
|
85
|
-
The
|
|
86
|
-
|
|
87
|
-
|
|
146
|
+
The puppy artwork was developed with AI-generated imagery and programmatic pose,
|
|
147
|
+
grounding and frame processing. It is authored animation, not motion capture or
|
|
148
|
+
a claim of sentience.
|
package/RELEASING.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Retrieviewer 0.0.
|
|
1
|
+
# Retrieviewer 0.0.4 release process
|
|
2
2
|
|
|
3
|
-
Target: `@bitefoundry/retrieviewer@0.0.
|
|
3
|
+
Target: `@bitefoundry/retrieviewer@0.0.4`, public npm registry, `latest` tag.
|
|
4
4
|
The npm organization `bitefoundry` uses the free public-packages plan; account
|
|
5
5
|
`shinick` owns the organization.
|
|
6
6
|
|
|
@@ -12,9 +12,15 @@ artwork draft is superseded. ATTRIBUTION.md retains the photographic references
|
|
|
12
12
|
and original license links. ASSET-PROVENANCE.md records the bounded review and
|
|
13
13
|
remaining limits; this is not comprehensive legal clearance.
|
|
14
14
|
|
|
15
|
-
The owner
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
The owner explicitly authorized GitHub push and npm publication of the reviewed
|
|
16
|
+
comfort extension and runtime optimizations on2026-10-23. Version0.0.4 removes
|
|
17
|
+
unused Three.js runtime work, retains only reachable interaction samples, and
|
|
18
|
+
adds belly-up/sleep behavior plus a tiny tug sprite family. Code/art licenses stay
|
|
19
|
+
MIT/CC BY-SA4.0, including the new covered archive. No Codex modification is made.
|
|
20
|
+
Windows live, installed-consumer and browser checks cover this release. Linux
|
|
21
|
+
retains the earlier AlmaLinux8/GLIBC2.28 X11 adapter baseline; new controls have
|
|
22
|
+
grammar/protocol checks, not a new Linux GUI test. macOS remains experimental.
|
|
23
|
+
Native Wayland is unsupported. Preserve all earlier registry artifacts.
|
|
18
24
|
|
|
19
25
|
`release-policy.json` has four independent approval gates and the CC artwork
|
|
20
26
|
license identifier. The guard still refuses false/missing approvals, private
|
|
@@ -36,10 +42,16 @@ interactions, lifecycle, examples, JSONL and isolated installer settings.
|
|
|
36
42
|
Its report is in a fresh `dist/package-check-*/package-check.json`; it does not publish or edit live
|
|
37
43
|
agent configuration. Keep the final tarball hash and file inventory.
|
|
38
44
|
|
|
39
|
-
The
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
image sheets, workers, QA receipts, credentials and local
|
|
45
|
+
The original art playground was not a Git repository. The owner separately
|
|
46
|
+
authorized a curated public source tree at BiteFoundry/retrieviewer and its
|
|
47
|
+
GitHub Pages workflow. This is not an upload of the experimental workspace:
|
|
48
|
+
original photos, source image sheets, workers, QA receipts, credentials and local
|
|
49
|
+
settings remain local. See SOURCE-SCOPE.md. There is no npm trusted publisher or
|
|
50
|
+
automatic npm release workflow; the site workflow deploys the site only.
|
|
51
|
+
|
|
52
|
+
Immutable npm0.0.3 was already published and verified. Do not republish different
|
|
53
|
+
bytes as0.0.3. This release uses0.0.4 with fresh authorization, version/lock/test/
|
|
54
|
+
policy updates, exact-tarball checks and registry-install verification.
|
|
43
55
|
|
|
44
56
|
## Publish the tested tarball
|
|
45
57
|
|
|
@@ -56,15 +68,16 @@ https://docs.npmjs.com/trusted-publishers/
|
|
|
56
68
|
|
|
57
69
|
## Support boundaries
|
|
58
70
|
|
|
59
|
-
The
|
|
71
|
+
The approved existing Q5 frames are unchanged; the new tiny tug family uses the
|
|
72
|
+
same32-level pipeline. Belly/sleep reuse existing source frames. The OpenCode
|
|
60
73
|
2.1.2 Windows directory-based adapter has local host proof; npm `./tui`
|
|
61
74
|
discovery alone is not live-host certification. Other agent-native renderers
|
|
62
75
|
remain unimplemented. MCP alone cannot inject a pet into arbitrary agent UIs.
|
|
63
76
|
See INSTALLING.md for support and removal.
|
|
64
77
|
|
|
65
|
-
The separate
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
The separate transparent companion uses platform-native windows plus the same pet
|
|
79
|
+
engine. Test real installed copies with isolated state and owned diagnostic windows;
|
|
80
|
+
do not stop the user's live companion merely to run QA. See DESKTOP-PLATFORMS.md
|
|
81
|
+
for verified checks, experimental macOS status and unsupported environments.
|
|
69
82
|
|
|
70
83
|
Historical research notes remain local and are not current support promises.
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
3
|
- **procedural-animals 0.1.0** — MIT, Copyright (c) 2026 Majid Manzarpour and
|
|
4
|
-
procedural-animals contributors.
|
|
5
|
-
`vendor/procedural-animals/src
|
|
4
|
+
procedural-animals contributors. The original development source is retained
|
|
5
|
+
under `vendor/procedural-animals/src` for motion parity tests; it is no longer
|
|
6
|
+
executed or shipped in the dot-art runtime. The full notice is retained at
|
|
6
7
|
`vendor/procedural-animals/LICENSE`.
|
|
7
8
|
Upstream: https://github.com/majidmanzarpour/threejs-procedural-animals
|
|
8
|
-
- **three 0.186.1** — MIT;
|
|
9
|
+
- **three 0.186.1** — MIT; development-only dependency for original 3D parity
|
|
10
|
+
tests. Not installed by the production package. Its development distribution
|
|
9
11
|
includes its own `LICENSE`. https://github.com/mrdoob/three.js
|
|
10
12
|
- **jsonc-parser 3.3.1** — MIT; installed as a pinned npm dependency. Its
|
|
11
13
|
distribution includes `LICENSE.md`. https://github.com/microsoft/node-jsonc-parser
|
package/braille.mjs
CHANGED
|
@@ -2,23 +2,49 @@
|
|
|
2
2
|
export const BRAILLE_BITS=[[1,8],[2,16],[4,32],[64,128]];
|
|
3
3
|
const BAYER=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];
|
|
4
4
|
const clamp=v=>Math.max(0,Math.min(1,v));
|
|
5
|
+
const GLYPHS=Array.from({length:256},(_,i)=>String.fromCharCode(0x2800+i));
|
|
6
|
+
let grayTable=null,grayBrightness=0,grayContrast=0;
|
|
7
|
+
function stableBraille(rgba,width,height,brightness,contrast){
|
|
8
|
+
if(grayBrightness!==brightness||grayContrast!==contrast){
|
|
9
|
+
grayTable=Float32Array.from({length:256},(_,v)=>{
|
|
10
|
+
const luma=(.2126*v+.7152*v+.0722*v)/255;
|
|
11
|
+
return luma===0?0:clamp((Math.pow(luma,.9)*brightness-.5)*contrast+.5);
|
|
12
|
+
});
|
|
13
|
+
grayBrightness=brightness;grayContrast=contrast;
|
|
14
|
+
}
|
|
15
|
+
const table=grayTable,bytePixels=rgba instanceof Uint8Array||rgba instanceof Uint8ClampedArray,columns=Math.ceil(width/2),rows=Math.ceil(height/4),masks=new Uint8Array(columns*rows);
|
|
16
|
+
let dots=0;
|
|
17
|
+
// Stable dithering has no error diffusion: background pixels cannot affect a
|
|
18
|
+
// neighbor. Skip them before luma/hash work, and write straight to cell masks.
|
|
19
|
+
// Float32 rounding matches the original intermediate values array exactly.
|
|
20
|
+
for(let y=0;y<height;y++)for(let x=0,p=y*width*4;x<width;x++,p+=4){
|
|
21
|
+
const r=rgba[p],g=rgba[p+1],b=rgba[p+2],a=rgba[p+3];
|
|
22
|
+
if(a===0||(r===0&&g===0&&b===0))continue;
|
|
23
|
+
let value;
|
|
24
|
+
if(bytePixels&&a===255&&r===g&&g===b)value=table[r];
|
|
25
|
+
else{
|
|
26
|
+
const luma=(.2126*r+.7152*g+.0722*b)/255*(a/255);
|
|
27
|
+
value=Math.fround(luma===0?0:clamp((Math.pow(luma,.9)*brightness-.5)*contrast+.5));
|
|
28
|
+
}
|
|
29
|
+
if(value<=0)continue;
|
|
30
|
+
let n=Math.imul(x+1,0x1f123bb5)^Math.imul(y+1,0x5f356495);
|
|
31
|
+
n=Math.imul(n^(n>>>16),0x45d9f3b);n=Math.imul(n^(n>>>16),0x45d9f3b);n=(n^(n>>>16))>>>0;
|
|
32
|
+
if(value>(n+.5)/4294967296){masks[(y>>2)*columns+(x>>1)]|=BRAILLE_BITS[y&3][x&1];dots++;}
|
|
33
|
+
}
|
|
34
|
+
const lines=[];
|
|
35
|
+
for(let y=0;y<rows;y++){let line='';for(let x=0;x<columns;x++)line+=GLYPHS[masks[y*columns+x]];lines.push(line);}
|
|
36
|
+
return{text:lines.join('\n'),columns,rows,dots};
|
|
37
|
+
}
|
|
5
38
|
export function rgbaToBraille(rgba,width,height,{brightness=1,contrast=1,method='floyd'}={}){
|
|
6
39
|
if(!Number.isInteger(width)||!Number.isInteger(height)||width<1||height<1||width*height>1_000_000||rgba.length!==width*height*4)throw Error('Invalid RGBA image');
|
|
7
40
|
if(!Number.isFinite(brightness)||brightness<=0||brightness>4||!Number.isFinite(contrast)||contrast<=0||contrast>4||!['floyd','bayer','stable'].includes(method))throw Error('Invalid dithering options');
|
|
41
|
+
if(method==='stable')return stableBraille(rgba,width,height,brightness,contrast);
|
|
8
42
|
const values=new Float32Array(width*height),bits=new Uint8Array(width*height);
|
|
9
43
|
for(let i=0;i<values.length;i++){
|
|
10
44
|
const p=i*4,luma=(.2126*rgba[p]+.7152*rgba[p+1]+.0722*rgba[p+2])/255*(rgba[p+3]/255);
|
|
11
45
|
values[i]=luma===0?0:clamp((Math.pow(luma,.9)*brightness-.5)*contrast+.5);
|
|
12
46
|
}
|
|
13
|
-
if(method==='
|
|
14
|
-
// Fixed per-pixel threshold, not fresh random noise on every animation tick.
|
|
15
|
-
// Unlike the 4x4 Bayer matrix this avoids a repeating cross-hatch on fur.
|
|
16
|
-
for(let y=0;y<height;y++)for(let x=0;x<width;x++){
|
|
17
|
-
let n=Math.imul(x+1,0x1f123bb5)^Math.imul(y+1,0x5f356495);
|
|
18
|
-
n=Math.imul(n^(n>>>16),0x45d9f3b);n=Math.imul(n^(n>>>16),0x45d9f3b);n=(n^(n>>>16))>>>0;
|
|
19
|
-
bits[y*width+x]=values[y*width+x]>(n+.5)/4294967296?1:0;
|
|
20
|
-
}
|
|
21
|
-
}else if(method==='bayer'){
|
|
47
|
+
if(method==='bayer'){
|
|
22
48
|
for(let y=0;y<height;y++)for(let x=0;x<width;x++)bits[y*width+x]=values[y*width+x]>(BAYER[y%4][x%4]+.5)/16?1:0;
|
|
23
49
|
}else{
|
|
24
50
|
const add=(x,y,error,weight)=>{if(x>=0&&x<width&&y<height)values[y*width+x]+=error*weight/16;};
|
package/examples/live.mjs
CHANGED
|
@@ -13,7 +13,7 @@ if(!out.isTTY||!input.isTTY){
|
|
|
13
13
|
const data=bytes=>{for(const c of bytes.toString()){
|
|
14
14
|
if(c==='q'||c==='\x03')stop();
|
|
15
15
|
if(c===' ')paused=!paused;
|
|
16
|
-
if(c==='b'||c==='t'){if(pet.interact(c==='b'?'ball':'treat'))paused=false;}
|
|
16
|
+
if(c==='b'||c==='t'||c==='g'){if(pet.interact(c==='b'?'ball':c==='t'?'treat':'tug'))paused=false;}
|
|
17
17
|
}};
|
|
18
18
|
process.on('SIGINT',stop);process.on('SIGTERM',stop);
|
|
19
19
|
input.setRawMode(true);input.resume();input.on('data',data);
|
|
@@ -28,7 +28,7 @@ if(!out.isTTY||!input.isTTY){
|
|
|
28
28
|
const frame=pet.frame({columns,rows}),lines=frame.text.split('\n');let batch='';
|
|
29
29
|
for(let y=0;y<rows;y++)if(lines[y]!==previous[y])batch+=`\x1b[${y+1};1H${lines[y]}`;
|
|
30
30
|
previous=lines;
|
|
31
|
-
const status=`${paused?'Paused':frame.report.intent} | B ball T treat Space pause Q quit`.slice(0,columns);
|
|
31
|
+
const status=`${paused?'Paused':frame.report.intent} | B ball T treat G tug Space pause Q quit`.slice(0,columns);
|
|
32
32
|
batch+=`\x1b[${rows+1};1H\x1b[2K${status}`;
|
|
33
33
|
if(!out.write(batch))await once(out,'drain');
|
|
34
34
|
await new Promise(resolve=>setTimeout(resolve,Math.max(1,1000/30-(performance.now()-start))));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Dependency-free platform selection. Importing performs no probing or I/O.
|
|
2
|
+
import {posix} from 'node:path';
|
|
3
|
+
export function desktopPlatform({platform=process.platform,env=process.env,glibc}={}){
|
|
4
|
+
if(platform==='win32')return {id:'windows-overlay',fps:30,helper:'windows',experimental:false};
|
|
5
|
+
if(platform==='darwin')return {id:'macos-overlay',fps:15,helper:'macos',experimental:true};
|
|
6
|
+
if(platform==='linux'){
|
|
7
|
+
if(env.XDG_SESSION_TYPE?.trim().toLowerCase()==='wayland'||env.WAYLAND_DISPLAY)throw Error('Native Wayland cannot safely track arbitrary app windows. Log in to an Xorg/X11 session; no compositor or privacy settings will be changed.');
|
|
8
|
+
if(!env.DISPLAY)throw Error('Linux desktop requires an X11 DISPLAY and a compositing window manager. Headless/SSH sessions are not a desktop.');
|
|
9
|
+
if(glibc!==undefined){const parts=String(glibc).split('.').map(Number);if(!/^\d+\.\d+(?:\.\d+)?$/.test(String(glibc))||parts[0]<2||(parts[0]===2&&parts[1]<28))throw Error('Linux desktop requires GLIBC2.28 or later (AlmaLinux8 baseline).');}
|
|
10
|
+
return {id:'linux-x11-overlay',fps:15,helper:'linux',experimental:true};
|
|
11
|
+
}
|
|
12
|
+
throw Error('Desktop companion supports Windows, macOS and Linux X11 only');
|
|
13
|
+
}
|
|
14
|
+
export function controlAddress({platform=process.platform,uuid,uid=process.getuid?.()??0}={}){
|
|
15
|
+
if(!/^[a-f0-9-]{36}$/.test(uuid))throw Error('Invalid desktop control UUID');
|
|
16
|
+
if(platform==='win32')return '\\\\.\\pipe\\retrieviewer-overlay-'+uuid;
|
|
17
|
+
if(!Number.isSafeInteger(uid)||uid<0)throw Error('Invalid desktop user ID');
|
|
18
|
+
// Short enough for macOS's104-byte sockaddr_un, regardless of HOME/TMPDIR length.
|
|
19
|
+
return posix.join('/tmp',`retrieviewer-overlay-${uid}-${uuid}.sock`);
|
|
20
|
+
}
|
|
21
|
+
export function validControlAddress(value){return typeof value==='string'&&(/^\\\\\.\\pipe\\retrieviewer-overlay-[a-f0-9-]{36}$/.test(value)||/^\/tmp\/retrieviewer-overlay-\d+-[a-f0-9-]{36}\.sock$/.test(value));}
|
|
22
|
+
export function parseHelperSpec(argv){
|
|
23
|
+
if(argv[0]!=='--helper-spec')return {command:argv[0],args:argv[1]==='--ipc-test'?['--ipc-test']:[],mode:'windows-overlay',fps:30};
|
|
24
|
+
const value=JSON.parse(argv[1]);
|
|
25
|
+
if(!value||typeof value.command!=='string'||!value.command||value.command.includes('\0')||!Array.isArray(value.args)||value.args.some(a=>typeof a!=='string'||a.includes('\0'))||!['windows-overlay','macos-overlay','linux-x11-overlay'].includes(value.mode)||!Number.isInteger(value.fps)||value.fps<5||value.fps>30)throw Error('Invalid desktop helper descriptor');
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Linux X11 companion painter (implementation-ready, not release-certified)
|
|
2
|
+
|
|
3
|
+
`overlay.py` is the Linux counterpart of `../windows-overlay/Overlay.cs`: a
|
|
4
|
+
native transparent painter driven over the same NDJSON stdin/stdout bridge by the
|
|
5
|
+
Node pet engine. It draws only the Braille frames it receives; it adds no art.
|
|
6
|
+
|
|
7
|
+
## Why Python + ctypes
|
|
8
|
+
|
|
9
|
+
- Python 3.6+ **standard library only**. `ctypes` binds the X client libraries
|
|
10
|
+
the desktop already ships: `libX11.so.6`, `libXrender.so.1`, `libXext.so.6`.
|
|
11
|
+
- No compiler, PyPI package, GTK/Qt/gi/Tk, Electron or npm native addon, so there
|
|
12
|
+
is no GLIBC/Node ABI coupling. Target baseline: AlmaLinux 8 (GLIBC 2.28,
|
|
13
|
+
platform Python 3.6) on old hardware.
|
|
14
|
+
- Struct layouts and constants were checked against the official X.org headers
|
|
15
|
+
(libX11 1.8.13, libXrender 0.9.12, libXext 1.3.4, xorgproto 2025.1) with a
|
|
16
|
+
compiled `offsetof`/`sizeof` probe on x86_64. 32-bit layouts were not
|
|
17
|
+
compiled; every field uses `c_long`/`c_ulong`/pointers so they follow the C ABI.
|
|
18
|
+
|
|
19
|
+
## Requirements and refusals (fail closed, one JSON `error` line, exit 2)
|
|
20
|
+
|
|
21
|
+
| Condition | Result |
|
|
22
|
+
|---|---|
|
|
23
|
+
| `WAYLAND_DISPLAY` set or `XDG_SESSION_TYPE=wayland` (even with `DISPLAY`/XWayland) | Refused: log in to an Xorg session. Wayland cannot safely follow/stack over another app. |
|
|
24
|
+
| `DISPLAY` unset / display cannot be opened | Refused with the display name. |
|
|
25
|
+
| No SHAPE ≥ 1.1 (input shapes), no RENDER, no XRender ARGB32 32-bit visual | Refused. |
|
|
26
|
+
| No compositing manager (`_NET_WM_CM_Sn` unowned) | Refused instead of painting an opaque black box. |
|
|
27
|
+
| WM without EWMH `_NET_CLIENT_LIST` / `_NET_ACTIVE_WINDOW` | Refused. |
|
|
28
|
+
| Missing X client library | Refused; it never installs packages. |
|
|
29
|
+
|
|
30
|
+
## Bridge (same as Windows)
|
|
31
|
+
|
|
32
|
+
stdin: `frame{revision,x,y,columns,rows,text}`, `loaded`, `interaction`, `error`, `quit`.
|
|
33
|
+
stdout: `ready{pickerVisible}`, `picker{visible}`,
|
|
34
|
+
`viewport{revision,visible,selected,columns,rows,cellWidth,cellHeight=2*cellWidth}`,
|
|
35
|
+
`ack{painted}`, `interact{kind:ball|treat}`, `pause{paused}`, `quit`.
|
|
36
|
+
|
|
37
|
+
- One outstanding frame; discarded, hidden and stale-revision frames are still ACKed.
|
|
38
|
+
- Only U+2800..U+28FF cells; ≤ 125000 cells per frame. Default cell is 16 px and the
|
|
39
|
+
viewport grid is capped at 20000 cells (`--cell 6|8|10|12|16` to change the cell).
|
|
40
|
+
- Only the cropped bounding box is rasterized; the pet window is resized to it and
|
|
41
|
+
fully overwritten, and is unmapped on every viewport change, so no stale trails.
|
|
42
|
+
- stdin EOF quits; every owned window, GC and colormap is released and the display
|
|
43
|
+
connection closed. The single-instance lock is an abstract Unix socket (no file).
|
|
44
|
+
|
|
45
|
+
## Window behavior
|
|
46
|
+
|
|
47
|
+
- Explicit picker lists EWMH client windows (title and `/proc/PID/comm` only,
|
|
48
|
+
terminals first). Titles are drawn ASCII-only (`?` for other characters).
|
|
49
|
+
The picker sets `WM_HINTS.input=False` so the WM should not move keyboard focus.
|
|
50
|
+
- Tracking is read-only polling (~30 Hz) of the target's attributes, root-relative
|
|
51
|
+
position, `_NET_WM_STATE_HIDDEN`, `_NET_WM_PID` and `_NET_ACTIVE_WINDOW`. The pet
|
|
52
|
+
shows only while the target is the active window, viewable, not minimized and at
|
|
53
|
+
least 160×120. A vanished target (BadWindow is trapped) or reused PID hides it.
|
|
54
|
+
- Pet: override-redirect ARGB32 window with an **empty ShapeInput region**, so all
|
|
55
|
+
pointer input passes through; no keyboard selection, grabs or hotkeys.
|
|
56
|
+
- Controls: a separate override-redirect strip (Ball, Treat, Window, Pause, Quit)
|
|
57
|
+
consumes only its own clicks and is never focused.
|
|
58
|
+
- Target windows and global focus are never modified. No capture, injection,
|
|
59
|
+
network, root access or Wayland compositor changes.
|
|
60
|
+
|
|
61
|
+
## Commands
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
python3 overlay.py # bridge mode (spawned by the Node worker)
|
|
65
|
+
python3 overlay.py --ipc-test # bridge mode with an owned off-screen stand-in target
|
|
66
|
+
python3 overlay.py --check-json # environment diagnostics, creates no windows
|
|
67
|
+
python3 overlay.py --self-test :99 # owned windows on an explicitly named isolated display (e.g. Xvfb)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
`--self-test` refuses an implicit display; it does not require a compositor and
|
|
71
|
+
checks painting, input-shape emptiness, geometry following, stale-frame discard,
|
|
72
|
+
hide on unmap, target loss, focus preservation and teardown on owned windows only.
|
|
73
|
+
|
|
74
|
+
## Known limits
|
|
75
|
+
|
|
76
|
+
- Parent verification after the worker report: AlmaLinux8/GLIBC2.28, Python3.6.8,
|
|
77
|
+
Node22.23.4, owned Xvfb + Openbox + xcompmgr passed native painting, empty input
|
|
78
|
+
shape, focus/geometry/hide/stale-frame checks and real Node worker ball/exit
|
|
79
|
+
lifecycle. This is not certification of every physical desktop/compositor.
|
|
80
|
+
- Compositors may draw a shadow around override-redirect windows; the pet window
|
|
81
|
+
declares `_NET_WM_WINDOW_TYPE_DND`, which most compositors leave unshadowed.
|
|
82
|
+
- The overlay is raised every 250 ms while visible because a WM restacks the active
|
|
83
|
+
target above override-redirect windows when it is clicked.
|