@bitefoundry/retrieviewer 0.0.0-stage → 0.0.1

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 (292) hide show
  1. package/ASSET-PROVENANCE.md +43 -0
  2. package/ASSETS-LICENSE.md +58 -0
  3. package/ATTRIBUTION.md +54 -0
  4. package/EMBEDDING.md +96 -0
  5. package/INSTALLING.md +107 -0
  6. package/LICENSE +16 -0
  7. package/LICENSE-CODE +21 -0
  8. package/PLUGIN.md +110 -0
  9. package/PUPPY-MEMORY.md +57 -0
  10. package/PUPPY-Q5-COMPARISON.md +73 -0
  11. package/README.md +61 -2
  12. package/RELEASING.md +61 -0
  13. package/THIRD-PARTY-NOTICES.md +17 -0
  14. package/TRADEMARKS.md +21 -0
  15. package/braille.mjs +45 -0
  16. package/examples/bridge.py +62 -0
  17. package/examples/embed.mjs +15 -0
  18. package/examples/live.mjs +40 -0
  19. package/examples/plugin.mjs +21 -0
  20. package/integrations/opencode/runtime.mjs +195 -0
  21. package/integrations/opencode/tui.tsx +59 -0
  22. package/locomotion-core.mjs +21 -0
  23. package/locomotion-puppy.animal +0 -0
  24. package/package.json +125 -4
  25. package/pet-q5-manifest.json +118 -0
  26. package/puppy-clean.mjs +51 -0
  27. package/puppy-companion-interactions-v3-q5.bin.gz +0 -0
  28. package/puppy-companion-interactions-v3.json +1 -0
  29. package/puppy-companion-life.mjs +182 -0
  30. package/puppy-companion-objects.mjs +30 -0
  31. package/puppy-companion-sprites.mjs +14 -0
  32. package/puppy-continuous.mjs +57 -0
  33. package/puppy-face.mjs +46 -0
  34. package/puppy-frame-predictive.mjs +147 -0
  35. package/puppy-frame-store.mjs +108 -0
  36. package/puppy-mouth-anchor.json +1 -0
  37. package/puppy-mouth-anchor.mjs +33 -0
  38. package/puppy-paper-actions-v9-q5.bin.gz +0 -0
  39. package/puppy-paper-actions-v9.json +1 -0
  40. package/puppy-paper-actions.mjs +48 -0
  41. package/puppy-paper-approach-q5.bin.gz +0 -0
  42. package/puppy-paper-approach.json +1 -0
  43. package/puppy-paper-area.mjs +15 -0
  44. package/puppy-paper-arrival-seat-q5.bin.gz +0 -0
  45. package/puppy-paper-arrival-seat.json +1 -0
  46. package/puppy-paper-behaviors-q5.bin.gz +0 -0
  47. package/puppy-paper-behaviors.json +1 -0
  48. package/puppy-paper-behaviors.mjs +8 -0
  49. package/puppy-paper-contact.mjs +103 -0
  50. package/puppy-paper-director.mjs +21 -0
  51. package/puppy-paper-paw-transport.mjs +76 -0
  52. package/puppy-paper-rear-gallop-q5.bin.gz +0 -0
  53. package/puppy-paper-rear-gallop.json +1 -0
  54. package/puppy-paper-seat-q5.bin.gz +0 -0
  55. package/puppy-paper-seat.json +14 -0
  56. package/puppy-paper-seat.mjs +13 -0
  57. package/puppy-paper-trick-timing.mjs +58 -0
  58. package/puppy-paper-world.mjs +108 -0
  59. package/puppy-paper.mjs +271 -0
  60. package/puppy-stable-meta.json +1606 -0
  61. package/puppy-stable.mjs +72 -0
  62. package/puppy-stride-meta.json +343 -0
  63. package/puppy-stride-tweens-q5.bin.gz +0 -0
  64. package/puppy-zoomies.mjs +27 -0
  65. package/puppy-zoomies30.mjs +12 -0
  66. package/retrieviewer-cli.mjs +81 -0
  67. package/retrieviewer-config.mjs +49 -0
  68. package/retrieviewer-install.mjs +157 -0
  69. package/retrieviewer-plugin.d.mts +44 -0
  70. package/retrieviewer-plugin.mjs +97 -0
  71. package/retrieviewer-stdio.mjs +38 -0
  72. package/retrieviewer.d.mts +85 -0
  73. package/retrieviewer.mjs +142 -0
  74. package/vendor/procedural-animals/LICENSE +21 -0
  75. package/vendor/procedural-animals/package.json +40 -0
  76. package/vendor/procedural-animals/src/animal.js +146 -0
  77. package/vendor/procedural-animals/src/bake.js +51 -0
  78. package/vendor/procedural-animals/src/build.js +81 -0
  79. package/vendor/procedural-animals/src/core/build/coatKit.js +121 -0
  80. package/vendor/procedural-animals/src/core/build/featherCards.js +189 -0
  81. package/vendor/procedural-animals/src/core/build/finEdges.js +85 -0
  82. package/vendor/procedural-animals/src/core/build/furSlope.js +115 -0
  83. package/vendor/procedural-animals/src/core/build/mesh.js +67 -0
  84. package/vendor/procedural-animals/src/core/build/pipeline.js +272 -0
  85. package/vendor/procedural-animals/src/core/build/seams.js +183 -0
  86. package/vendor/procedural-animals/src/core/build/warp.js +112 -0
  87. package/vendor/procedural-animals/src/core/build/weights.js +393 -0
  88. package/vendor/procedural-animals/src/core/math/vec.js +81 -0
  89. package/vendor/procedural-animals/src/core/motion/actions.js +800 -0
  90. package/vendor/procedural-animals/src/core/motion/bird.js +3063 -0
  91. package/vendor/procedural-animals/src/core/motion/birdActions.js +1059 -0
  92. package/vendor/procedural-animals/src/core/motion/common.js +158 -0
  93. package/vendor/procedural-animals/src/core/motion/index.js +22 -0
  94. package/vendor/procedural-animals/src/core/motion/quadruped.js +2875 -0
  95. package/vendor/procedural-animals/src/core/motion/snake.js +1594 -0
  96. package/vendor/procedural-animals/src/core/motion/spider.js +1810 -0
  97. package/vendor/procedural-animals/src/core/motion/swimmer.js +1047 -0
  98. package/vendor/procedural-animals/src/core/motion/swimmerActions.js +613 -0
  99. package/vendor/procedural-animals/src/core/render/animalObject.js +262 -0
  100. package/vendor/procedural-animals/src/core/render/coatMaterial.js +1301 -0
  101. package/vendor/procedural-animals/src/core/render/dqs.js +159 -0
  102. package/vendor/procedural-animals/src/core/render/eyes.js +676 -0
  103. package/vendor/procedural-animals/src/core/render/membranes.js +77 -0
  104. package/vendor/procedural-animals/src/core/render/skeleton.js +41 -0
  105. package/vendor/procedural-animals/src/core/rig/bird.js +327 -0
  106. package/vendor/procedural-animals/src/core/rig/quadruped.js +76 -0
  107. package/vendor/procedural-animals/src/core/rig/rig.js +79 -0
  108. package/vendor/procedural-animals/src/core/rig/snake.js +76 -0
  109. package/vendor/procedural-animals/src/core/rig/spider.js +110 -0
  110. package/vendor/procedural-animals/src/core/rig/swimmer.js +181 -0
  111. package/vendor/procedural-animals/src/core/sdf/eyeSocket.js +53 -0
  112. package/vendor/procedural-animals/src/core/sdf/mesher.js +238 -0
  113. package/vendor/procedural-animals/src/core/sdf/sdf.js +263 -0
  114. package/vendor/procedural-animals/src/index.d.ts +98 -0
  115. package/vendor/procedural-animals/src/index.js +29 -0
  116. package/vendor/procedural-animals/src/registry.js +48 -0
  117. package/vendor/procedural-animals/src/species/bear/behaviour.js +463 -0
  118. package/vendor/procedural-animals/src/species/bear/claws.js +147 -0
  119. package/vendor/procedural-animals/src/species/bear/coat.js +726 -0
  120. package/vendor/procedural-animals/src/species/bear/index.js +139 -0
  121. package/vendor/procedural-animals/src/species/bear/motion.js +112 -0
  122. package/vendor/procedural-animals/src/species/bear/regions.js +78 -0
  123. package/vendor/procedural-animals/src/species/bear/rig.js +112 -0
  124. package/vendor/procedural-animals/src/species/bear/sculpt.js +272 -0
  125. package/vendor/procedural-animals/src/species/boar/behaviour.js +335 -0
  126. package/vendor/procedural-animals/src/species/boar/coat.js +372 -0
  127. package/vendor/procedural-animals/src/species/boar/index.js +110 -0
  128. package/vendor/procedural-animals/src/species/boar/motion.js +85 -0
  129. package/vendor/procedural-animals/src/species/boar/regions.js +88 -0
  130. package/vendor/procedural-animals/src/species/boar/rig.js +111 -0
  131. package/vendor/procedural-animals/src/species/boar/sculpt.js +285 -0
  132. package/vendor/procedural-animals/src/species/cat/behaviour.js +559 -0
  133. package/vendor/procedural-animals/src/species/cat/coat.js +841 -0
  134. package/vendor/procedural-animals/src/species/cat/index.js +211 -0
  135. package/vendor/procedural-animals/src/species/cat/motion.js +101 -0
  136. package/vendor/procedural-animals/src/species/cat/regions.js +82 -0
  137. package/vendor/procedural-animals/src/species/cat/rig.js +100 -0
  138. package/vendor/procedural-animals/src/species/cat/sculpt.js +266 -0
  139. package/vendor/procedural-animals/src/species/cat/whiskers.js +110 -0
  140. package/vendor/procedural-animals/src/species/cheetah/coat.js +427 -0
  141. package/vendor/procedural-animals/src/species/cheetah/index.js +51 -0
  142. package/vendor/procedural-animals/src/species/cheetah/joints.js +3 -0
  143. package/vendor/procedural-animals/src/species/cheetah/motion.js +77 -0
  144. package/vendor/procedural-animals/src/species/cheetah/regions.js +95 -0
  145. package/vendor/procedural-animals/src/species/cheetah/rig.js +66 -0
  146. package/vendor/procedural-animals/src/species/cheetah/sculpt.js +158 -0
  147. package/vendor/procedural-animals/src/species/chicken/coat.js +313 -0
  148. package/vendor/procedural-animals/src/species/chicken/coverts.js +320 -0
  149. package/vendor/procedural-animals/src/species/chicken/index.js +110 -0
  150. package/vendor/procedural-animals/src/species/chicken/motion.js +177 -0
  151. package/vendor/procedural-animals/src/species/chicken/regions.js +66 -0
  152. package/vendor/procedural-animals/src/species/chicken/rig.js +144 -0
  153. package/vendor/procedural-animals/src/species/chicken/sculpt.js +389 -0
  154. package/vendor/procedural-animals/src/species/chicken/wingLook.js +66 -0
  155. package/vendor/procedural-animals/src/species/chicken/wingStack.js +124 -0
  156. package/vendor/procedural-animals/src/species/cow/behaviour.js +521 -0
  157. package/vendor/procedural-animals/src/species/cow/coat.js +465 -0
  158. package/vendor/procedural-animals/src/species/cow/index.js +118 -0
  159. package/vendor/procedural-animals/src/species/cow/motion.js +81 -0
  160. package/vendor/procedural-animals/src/species/cow/regions.js +98 -0
  161. package/vendor/procedural-animals/src/species/cow/rig.js +116 -0
  162. package/vendor/procedural-animals/src/species/cow/sculpt.js +339 -0
  163. package/vendor/procedural-animals/src/species/crow/coat.js +145 -0
  164. package/vendor/procedural-animals/src/species/crow/index.js +70 -0
  165. package/vendor/procedural-animals/src/species/crow/joints.js +3 -0
  166. package/vendor/procedural-animals/src/species/crow/motion.js +101 -0
  167. package/vendor/procedural-animals/src/species/crow/regions.js +50 -0
  168. package/vendor/procedural-animals/src/species/crow/rig.js +83 -0
  169. package/vendor/procedural-animals/src/species/crow/sculpt.js +118 -0
  170. package/vendor/procedural-animals/src/species/deer/behaviour.js +513 -0
  171. package/vendor/procedural-animals/src/species/deer/coat.js +391 -0
  172. package/vendor/procedural-animals/src/species/deer/index.js +106 -0
  173. package/vendor/procedural-animals/src/species/deer/motion.js +97 -0
  174. package/vendor/procedural-animals/src/species/deer/regions.js +60 -0
  175. package/vendor/procedural-animals/src/species/deer/rig.js +124 -0
  176. package/vendor/procedural-animals/src/species/deer/sculpt.js +297 -0
  177. package/vendor/procedural-animals/src/species/dog/behaviour.js +521 -0
  178. package/vendor/procedural-animals/src/species/dog/coat.js +495 -0
  179. package/vendor/procedural-animals/src/species/dog/index.js +144 -0
  180. package/vendor/procedural-animals/src/species/dog/motion.js +118 -0
  181. package/vendor/procedural-animals/src/species/dog/regions.js +61 -0
  182. package/vendor/procedural-animals/src/species/dog/rig.js +129 -0
  183. package/vendor/procedural-animals/src/species/dog/sculpt.js +246 -0
  184. package/vendor/procedural-animals/src/species/eagle/coat.js +250 -0
  185. package/vendor/procedural-animals/src/species/eagle/index.js +76 -0
  186. package/vendor/procedural-animals/src/species/eagle/joints.js +3 -0
  187. package/vendor/procedural-animals/src/species/eagle/motion.js +137 -0
  188. package/vendor/procedural-animals/src/species/eagle/regions.js +57 -0
  189. package/vendor/procedural-animals/src/species/eagle/rig.js +107 -0
  190. package/vendor/procedural-animals/src/species/eagle/sculpt.js +137 -0
  191. package/vendor/procedural-animals/src/species/fish/coat.js +271 -0
  192. package/vendor/procedural-animals/src/species/fish/index.js +88 -0
  193. package/vendor/procedural-animals/src/species/fish/motion.js +92 -0
  194. package/vendor/procedural-animals/src/species/fish/regions.js +27 -0
  195. package/vendor/procedural-animals/src/species/fish/rig.js +143 -0
  196. package/vendor/procedural-animals/src/species/fish/sculpt.js +214 -0
  197. package/vendor/procedural-animals/src/species/fish/variants.js +126 -0
  198. package/vendor/procedural-animals/src/species/fox/behaviour.js +314 -0
  199. package/vendor/procedural-animals/src/species/fox/coat.js +444 -0
  200. package/vendor/procedural-animals/src/species/fox/index.js +120 -0
  201. package/vendor/procedural-animals/src/species/fox/motion.js +81 -0
  202. package/vendor/procedural-animals/src/species/fox/regions.js +59 -0
  203. package/vendor/procedural-animals/src/species/fox/rig.js +91 -0
  204. package/vendor/procedural-animals/src/species/fox/sculpt.js +202 -0
  205. package/vendor/procedural-animals/src/species/frog/behaviour.js +590 -0
  206. package/vendor/procedural-animals/src/species/frog/coat.js +305 -0
  207. package/vendor/procedural-animals/src/species/frog/index.js +97 -0
  208. package/vendor/procedural-animals/src/species/frog/motion.js +69 -0
  209. package/vendor/procedural-animals/src/species/frog/regions.js +46 -0
  210. package/vendor/procedural-animals/src/species/frog/rig.js +156 -0
  211. package/vendor/procedural-animals/src/species/frog/sculpt.js +240 -0
  212. package/vendor/procedural-animals/src/species/goat/behaviour.js +509 -0
  213. package/vendor/procedural-animals/src/species/goat/coat.js +590 -0
  214. package/vendor/procedural-animals/src/species/goat/index.js +149 -0
  215. package/vendor/procedural-animals/src/species/goat/motion.js +95 -0
  216. package/vendor/procedural-animals/src/species/goat/regions.js +98 -0
  217. package/vendor/procedural-animals/src/species/goat/rig.js +181 -0
  218. package/vendor/procedural-animals/src/species/goat/sculpt.js +547 -0
  219. package/vendor/procedural-animals/src/species/horse/coat.js +361 -0
  220. package/vendor/procedural-animals/src/species/horse/coatSeam.js +122 -0
  221. package/vendor/procedural-animals/src/species/horse/index.js +80 -0
  222. package/vendor/procedural-animals/src/species/horse/motion.js +245 -0
  223. package/vendor/procedural-animals/src/species/horse/regions.js +60 -0
  224. package/vendor/procedural-animals/src/species/horse/rig.js +117 -0
  225. package/vendor/procedural-animals/src/species/horse/sculpt.js +316 -0
  226. package/vendor/procedural-animals/src/species/horse/seamWeights.js +272 -0
  227. package/vendor/procedural-animals/src/species/lion/behaviour.js +509 -0
  228. package/vendor/procedural-animals/src/species/lion/coat.js +1016 -0
  229. package/vendor/procedural-animals/src/species/lion/index.js +111 -0
  230. package/vendor/procedural-animals/src/species/lion/motion.js +87 -0
  231. package/vendor/procedural-animals/src/species/lion/regions.js +106 -0
  232. package/vendor/procedural-animals/src/species/lion/rig.js +110 -0
  233. package/vendor/procedural-animals/src/species/lion/sculpt.js +384 -0
  234. package/vendor/procedural-animals/src/species/lion/whiskers.js +132 -0
  235. package/vendor/procedural-animals/src/species/pig/behaviour.js +575 -0
  236. package/vendor/procedural-animals/src/species/pig/coat.js +730 -0
  237. package/vendor/procedural-animals/src/species/pig/ears.js +242 -0
  238. package/vendor/procedural-animals/src/species/pig/index.js +161 -0
  239. package/vendor/procedural-animals/src/species/pig/motion.js +105 -0
  240. package/vendor/procedural-animals/src/species/pig/regions.js +100 -0
  241. package/vendor/procedural-animals/src/species/pig/rig.js +152 -0
  242. package/vendor/procedural-animals/src/species/pig/sculpt.js +382 -0
  243. package/vendor/procedural-animals/src/species/rabbit/behaviour.js +605 -0
  244. package/vendor/procedural-animals/src/species/rabbit/coat.js +285 -0
  245. package/vendor/procedural-animals/src/species/rabbit/index.js +85 -0
  246. package/vendor/procedural-animals/src/species/rabbit/motion.js +85 -0
  247. package/vendor/procedural-animals/src/species/rabbit/regions.js +48 -0
  248. package/vendor/procedural-animals/src/species/rabbit/rig.js +99 -0
  249. package/vendor/procedural-animals/src/species/rabbit/sculpt.js +148 -0
  250. package/vendor/procedural-animals/src/species/rat/behaviour.js +539 -0
  251. package/vendor/procedural-animals/src/species/rat/coat.js +341 -0
  252. package/vendor/procedural-animals/src/species/rat/index.js +111 -0
  253. package/vendor/procedural-animals/src/species/rat/motion.js +90 -0
  254. package/vendor/procedural-animals/src/species/rat/regions.js +92 -0
  255. package/vendor/procedural-animals/src/species/rat/rig.js +112 -0
  256. package/vendor/procedural-animals/src/species/rat/sculpt.js +163 -0
  257. package/vendor/procedural-animals/src/species/rat/whiskers.js +119 -0
  258. package/vendor/procedural-animals/src/species/shark/coat.js +383 -0
  259. package/vendor/procedural-animals/src/species/shark/index.js +104 -0
  260. package/vendor/procedural-animals/src/species/shark/motion.js +69 -0
  261. package/vendor/procedural-animals/src/species/shark/regions.js +34 -0
  262. package/vendor/procedural-animals/src/species/shark/rig.js +194 -0
  263. package/vendor/procedural-animals/src/species/shark/sculpt.js +343 -0
  264. package/vendor/procedural-animals/src/species/shark/variants.js +105 -0
  265. package/vendor/procedural-animals/src/species/sheep/behaviour.js +522 -0
  266. package/vendor/procedural-animals/src/species/sheep/coat.js +529 -0
  267. package/vendor/procedural-animals/src/species/sheep/index.js +152 -0
  268. package/vendor/procedural-animals/src/species/sheep/motion.js +86 -0
  269. package/vendor/procedural-animals/src/species/sheep/neck.js +41 -0
  270. package/vendor/procedural-animals/src/species/sheep/regions.js +62 -0
  271. package/vendor/procedural-animals/src/species/sheep/rig.js +163 -0
  272. package/vendor/procedural-animals/src/species/sheep/sculpt.js +542 -0
  273. package/vendor/procedural-animals/src/species/snake/coat.js +315 -0
  274. package/vendor/procedural-animals/src/species/snake/index.js +73 -0
  275. package/vendor/procedural-animals/src/species/snake/motion.js +51 -0
  276. package/vendor/procedural-animals/src/species/snake/regions.js +51 -0
  277. package/vendor/procedural-animals/src/species/snake/rig.js +108 -0
  278. package/vendor/procedural-animals/src/species/snake/sculpt.js +122 -0
  279. package/vendor/procedural-animals/src/species/spider/coat.js +279 -0
  280. package/vendor/procedural-animals/src/species/spider/index.js +78 -0
  281. package/vendor/procedural-animals/src/species/spider/motion.js +72 -0
  282. package/vendor/procedural-animals/src/species/spider/regions.js +87 -0
  283. package/vendor/procedural-animals/src/species/spider/rig.js +118 -0
  284. package/vendor/procedural-animals/src/species/spider/sculpt.js +182 -0
  285. package/vendor/procedural-animals/src/species/wolf/behaviour.js +160 -0
  286. package/vendor/procedural-animals/src/species/wolf/coat.js +749 -0
  287. package/vendor/procedural-animals/src/species/wolf/index.js +107 -0
  288. package/vendor/procedural-animals/src/species/wolf/motion.js +80 -0
  289. package/vendor/procedural-animals/src/species/wolf/regions.js +57 -0
  290. package/vendor/procedural-animals/src/species/wolf/rig.js +87 -0
  291. package/vendor/procedural-animals/src/species/wolf/sculpt.js +339 -0
  292. package/vendor/procedural-animals/src/worker.js +29 -0
@@ -0,0 +1,43 @@
1
+ # 0.0.1 asset provenance review
2
+
3
+ Reviewed locally on 2026-10-23 for the first public npm release. This is a bounded
4
+ engineering/provenance review, not a lawyer's clearance opinion or a guarantee
5
+ of exclusive ownership of AI output.
6
+
7
+ ## Evidence checked
8
+
9
+ - PUPPY-STUDY.md identifies the initial built-in image-generation output and
10
+ the two photographic inputs. The generated source and both local reference
11
+ images were visually inspected. Their stored Commons metadata was checked
12
+ against the creators, titles and licenses recorded in ATTRIBUTION.md.
13
+ - ZOOMIES30.md, SITTING.md, PUPPY-PAPER.md, PUPPY-ACTIONS-V4.md,
14
+ PUPPY-ACTIONS-V9.md and the interaction-art records document generated pose
15
+ extensions and subsequent registration/interpolation. Q5 source and artifact
16
+ hashes are recorded in pet-q5-manifest.json and checked by the test suite.
17
+ - The project owner explicitly selected code MIT + artwork CC BY-SA 4.0 and
18
+ authorized public npm publication on 2026-10-23. The public account identifiers
19
+ identify the project maintainer; BiteFoundry is not asserted to be a separate
20
+ incorporated rightsholder. No third-party ownership transfer is invented.
21
+ - The earlier unpublished restrictive artwork draft is replaced rather than
22
+ combined with the CC grant. Reference attribution is retained, including the
23
+ CC BY-SA 2.5 reference and its later-version mechanism.
24
+ - Vendored procedural-animals retains its MIT notice. three and jsonc-parser
25
+ remain separate pinned npm dependencies with their notices. The analytic
26
+ locomotion route does not bundle AI4Animation code or noncommercial datasets.
27
+
28
+ ## Release boundary
29
+
30
+ Only the eight Q5 artwork archives, runtime metadata, allowlisted code/docs and
31
+ retained notices are packaged. Original photos, generated source PNG sheets,
32
+ Meshy GLBs, video references, preparation/model weights, local settings and QA or
33
+ worker histories stay outside the public package. Tests and the packed file list
34
+ must be checked again for the final release bytes.
35
+
36
+ ## Remaining limits
37
+
38
+ Copyrightability of AI-generated expression, the precise derivative-work analysis,
39
+ and worldwide name clearance are not conclusively determined here. Existing
40
+ domestic trademark research records possible similar marks; owning an npm scope
41
+ does not resolve them. No trademark filing or legal service is part of this
42
+ release. The review records provenance, compatible release terms and exclusions;
43
+ it must not be advertised as comprehensive IP clearance.
@@ -0,0 +1,58 @@
1
+ # Retrieviewer artwork — CC BY-SA 4.0
2
+
3
+ The bundled puppy artwork and derived frame data are offered under Creative
4
+ Commons Attribution-ShareAlike 4.0 International (SPDX: `CC-BY-SA-4.0`).
5
+
6
+ - License: https://creativecommons.org/licenses/by-sa/4.0/
7
+ - Controlling legal text: https://creativecommons.org/licenses/by-sa/4.0/legalcode.en
8
+ - Attribution and reference-source notices: [ATTRIBUTION.md](./ATTRIBUTION.md).
9
+
10
+ The project maintainer, GitHub `shinick-han` / npm `shinick`, operating under the
11
+ BiteFoundry project brand, selected this release policy on 2026-10-23. The grant
12
+ covers only rights the maintainer can license; it does not assert that all
13
+ AI-generated pixels are copyrightable or exclusively owned. The cited reference
14
+ photographers retain their rights under their original licenses.
15
+
16
+ ## Covered assets
17
+
18
+ These eight artwork archives and their associated pose/registration metadata,
19
+ decoded images and alternative encodings are covered:
20
+
21
+ - `puppy-stride-tweens-q5.bin.gz`
22
+ - `puppy-paper-rear-gallop-q5.bin.gz`
23
+ - `puppy-paper-approach-q5.bin.gz`
24
+ - `puppy-paper-seat-q5.bin.gz`
25
+ - `puppy-paper-arrival-seat-q5.bin.gz`
26
+ - `puppy-paper-behaviors-q5.bin.gz`
27
+ - `puppy-paper-actions-v9-q5.bin.gz`
28
+ - `puppy-companion-interactions-v3-q5.bin.gz`
29
+
30
+ ## Practical summary
31
+
32
+ You may use, copy, redistribute and adapt the artwork, including commercially.
33
+ Retain the supplied creator/source credits, link to the applicable licenses and
34
+ identify changes. Shared adaptations of the artwork must use CC BY-SA 4.0 or an
35
+ applicable BY-SA-compatible license. Do not impose additional legal restrictions
36
+ or effective technological measures that restrict the licensed freedoms.
37
+
38
+ The previous, unpublished custom limited-use artwork draft is superseded for
39
+ this release. There is no separate permission requirement here for asset packs,
40
+ character reuse, commercial products or merchandise otherwise permitted by the
41
+ CC license. Separate rights, if applicable, are not licensed by this notice.
42
+
43
+ The software code is separately MIT under LICENSE-CODE. Merely bundling these
44
+ assets with independent software does not relicense that software under CC.
45
+ Third-party code and the procedural animal rig retain their own notices.
46
+ Names are addressed in TRADEMARKS.md; that file adds no restrictions to the CC
47
+ artwork permissions. No endorsement by the reference photographers is implied.
48
+
49
+ This summary is not a replacement for the linked legal text. Applicable
50
+ exceptions, public-domain material and uses that require no permission remain
51
+ unrestricted. No warranty or legal-clearance certification is supplied.
52
+
53
+ ## 한국어 요약
54
+
55
+ 그림은 출처 표시와 동일조건변경허락(CC BY-SA 4.0)으로 공개합니다. 상업적
56
+ 사용·수정·재배포도 가능하며, 변경한 그림을 배포할 때는 동일조건을 지켜야
57
+ 합니다. 코드에는 별도의 MIT 라이선스가 적용됩니다. 사진 참고 출처와 가공
58
+ 경위는 ATTRIBUTION.md에 포함되며, 원본 사진은 패키지에 포함하지 않습니다.
package/ATTRIBUTION.md ADDED
@@ -0,0 +1,54 @@
1
+ # Retrieviewer artwork credits
2
+
3
+ Retrieviewer artwork and animation assembly: BiteFoundry project maintainer
4
+ (`shinick-han` on GitHub, `shinick` on npm), 2026, with AI image generation and
5
+ programmatic pose registration, interpolation, grounding and quantization.
6
+ Project contact: https://github.com/BiteFoundry
7
+
8
+ Release artwork: [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).
9
+ See [ASSETS-LICENSE.md](./ASSETS-LICENSE.md) for covered files and the legal text.
10
+
11
+ ## Photographic references and retained notices
12
+
13
+ The original puppy-generation record identifies these two photographic inputs.
14
+ The release retains their attribution and treats the resulting artwork
15
+ conservatively as an adaptation for licensing, without claiming a court has
16
+ determined derivative-work status. The original photographs are NOT bundled.
17
+
18
+ ### Golden Retriever puppy standing.jpg
19
+
20
+ - Creator: Scott — https://www.flickr.com/photos/29949904@N00
21
+ - Original source: https://www.flickr.com/photos/29949904@N00/481813401
22
+ - File/license record:
23
+ https://commons.wikimedia.org/wiki/File:Golden_Retriever_puppy_standing.jpg
24
+ - Original license: [CC BY 2.0](https://creativecommons.org/licenses/by/2.0/).
25
+ - Use/changes: a reference input for puppy anatomy and proportions; AI-generated
26
+ grayscale puppy artwork with a different face, fur, bandana and background,
27
+ subsequently extended into poses and processed into animation frame data.
28
+
29
+ ### Golden Retriever 10weeks.jpg
30
+
31
+ - Creator: Stefan Bauer — http://www.ferras.at
32
+ - Original file/license record:
33
+ https://commons.wikimedia.org/wiki/File:Golden_Retriever_10weeks.jpg
34
+ - Original license: [CC BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
35
+ - Use/changes: a reference input for puppy face/fur; synthetic standing artwork
36
+ and subsequent pose extensions, not a bundled copy of the photograph.
37
+ - CC BY-SA 2.5 section 4(b) permits distributing an adaptation under a later
38
+ version with the same license elements. This release uses CC BY-SA 4.0 for
39
+ the artwork, retaining this original credit and license information.
40
+
41
+ Neither photographer endorses Retrieviewer or BiteFoundry. Original rights and
42
+ license warranty disclaimers remain applicable. Keep these supplied credits,
43
+ license links and change descriptions with redistributed artwork; add your own
44
+ change description if you modify it, in a manner reasonable to the medium.
45
+
46
+ ## Processing and exclusions
47
+
48
+ AI-generated pose sheets were extracted, aligned, interpolated, contact-corrected
49
+ and encoded as 32-level Q5 frame stores. These are modifications, not unaltered
50
+ photographs or motion capture. The package contains eight generated-art archives.
51
+ Reference photo collections, YouTube footage, experimental Meshy models,
52
+ noncommercial motion research/datasets, interpolation tools/model weights and
53
+ worker logs are not distributed in this package. No exclusive copyright in
54
+ otherwise unprotected AI output is claimed. Code has its own MIT license.
package/EMBEDDING.md ADDED
@@ -0,0 +1,96 @@
1
+ # Embedding Retrieviewer
2
+
3
+ See [PLUGIN.md](./PLUGIN.md) for the convenience plugin. The headless core has no
4
+ timers, DOM, keyboard, output or process listeners. The host owns time/rendering.
5
+ createPet reads bundled art; import alone does not. Node >=20, or browser ES modules
6
+ with Three resolution and DecompressionStream. No native Python/Rust binding.
7
+
8
+ ```js
9
+ import {createPet} from '@bitefoundry/retrieviewer';
10
+ const pet = await createPet(); // Q5, 32 levels, all 2,341 source poses retained
11
+ // Keep this instance for the whole pane lifetime, not one per frame.
12
+ pet.step(elapsedSeconds);
13
+ const {text} = pet.frame({columns, rows});
14
+ pane.setContent(text);
15
+ pet.interact('ball'); // or 'treat'; false when busy/cooling down
16
+ // on unmount:
17
+ pet.dispose();
18
+ ```
19
+
20
+ ## Core contract
21
+
22
+ - createPet({loadAsset?,seed?,energy?,pawTransport?,artProfile?}): default q5.
23
+ Seed uint32, energy 0..1; keep pawTransport enabled.
24
+ - step(dt): finite nonnegative seconds, fixed 1/60s simulation. Each call admits
25
+ at most 0.1s to avoid unbounded stalled-host catch-up. Returns step count.
26
+ - frame({columns,rows,cellAspect=.5,camera?,poseFps=24,contactEnabled=true}):
27
+ exactly rows lines of columns Unicode Braille characters, no ANSI or trailing
28
+ newline. Positive integer dimensions, at most125,000 cells. Pose cadence12/24/30.
29
+ cellAspect = character width / line height, positive finite.
30
+ - Frame contains text,columns,rows,artProfile,pixels,state,report,placement,
31
+ projection,mouth,contacts. pixels is a **borrowed** RGBA buffer: valid only until
32
+ next frame/dispose; copy if retaining. The wrapper also retains no frame.
33
+ - camera:{viewportWidth,viewportHeight,rect:{left,top,width,height}} places a pane
34
+ within a larger viewport. Keep it consistent across time for metric perspective.
35
+ - interact('ball'|'treat'): false while busy/cooling down; unknown kind throws.
36
+ - dispose(): idempotent. Every other core method afterwards throws.
37
+
38
+ Default-loader pets share immutable art, not behavior/clocks/output buffers; last
39
+ dispose releases shared assets. Custom loaders are isolated. Initialization is async
40
+ I/O with synchronous CPU decode between loads; avoid repeated creation on render.
41
+ node examples/embed.mjs [columns] [rows] prints one frame.
42
+ npm run pet:companion (installed retrieviewer preview) is the opt-in fullscreen host:
43
+ B ball, T treat, Space pause, Q quit. Only that executable owns input/screen.
44
+ Redirected stdout prints one plain frame and exits.
45
+
46
+ ## Assets / original option
47
+
48
+ Default files resolve against the module URL, never cwd (lazy Node fs or browser
49
+ HTTP fetch). getPetAssetFiles(profile?) returns exactly18 filenames:8 compressed
50
+ bundles plus metadata and animal. Copy these without transforming bytes for
51
+ bundlers. Loader returns ArrayBuffer/typed bytes; .gz must remain compressed,
52
+ not transparently decompressed by HTTP Content-Encoding.
53
+
54
+ ```js
55
+ import {createPet,getPetAssetFiles} from '@bitefoundry/retrieviewer';
56
+ const files = getPetAssetFiles(); // deploy these files unchanged
57
+ const base = new URL('/pets/retrieviewer/', location.origin);
58
+ const pet = await createPet({loadAsset: async name => {
59
+ const r = await fetch(new URL(name, base));
60
+ if (!r.ok) throw Error(name + ': HTTP ' + r.status);
61
+ return r.arrayBuffer();
62
+ }});
63
+ ```
64
+
65
+ Original256-level caches remain in the source workspace. Use
66
+ createPet({artProfile:'original'}) there, or ?palette=original in the preview.
67
+ They are **not bundled** in the small distribution. For external original art,
68
+ copy getPetAssetFiles('original') from the workspace and supply loadAsset. Missing
69
+ originals fail clearly, never silently fall back.
70
+
71
+ Q5 is lossy quantization (max source-pixel error4/255), not lossless compression.
72
+ Art gzip18.7MB versus54.2MB original; resident packed pixels66.5MB.
73
+ One Windows Node sample:172MB RSS after rendering, startup737ms, mean frame2.61ms
74
+ at160×50. Samples, not guarantees. Node/Three remain runtime costs.
75
+ See [PUPPY-Q5-COMPARISON.md](./PUPPY-Q5-COMPARISON.md).
76
+
77
+ ## JSONL bridge (Python/Rust/other process hosts)
78
+
79
+ Spawn installed retrieviewer-stdio or node /path/to/retrieviewer-stdio.mjs.
80
+ Wait for {"event":"ready","protocol":1}. Send JSON objects one per line; replies echo
81
+ optional string/number/null id. Stdout contains only JSONL, never ANSI.
82
+ No autonomous clock: your app sends tick at its own cadence.
83
+
84
+ ```json
85
+ {"id":1,"op":"tick","dt":0.03333333333333333,"columns":80,"rows":24}
86
+ {"id":2,"op":"interact","kind":"ball"}
87
+ {"id":3,"op":"dispose"}
88
+ ```
89
+
90
+ tick combines step+frame in one round trip; separate step/frame remain supported.
91
+ Frame/tick replies: {id,ok:true,text,columns,rows,report,artProfile}; step replies have
92
+ steps, interaction replies accepted. Errors: {id,ok:false,error}. A failed tick may
93
+ advance time before frame validation; requests are not transactions.
94
+ Dispose acknowledges and exits; stdin EOF also disposes. Node remains required.
95
+ examples/bridge.py uses only Python's standard library. Each process loads its own
96
+ art; reuse one per host, not per frame.
package/INSTALLING.md ADDED
@@ -0,0 +1,107 @@
1
+ # Enable Retrieviewer in an agent TUI
2
+
3
+ 0.0.1 includes an installer CLI and a native OpenCode TUI adapter. It does **not** claim
4
+ that every MCP client can display animated UI. Native OpenCode rendering uses its
5
+ official TUI plugin slot, not another terminal, a wrapper, or a modified binary.
6
+ Other agent IDs are discoverable but refused until an adapter is implemented.
7
+
8
+ ## Install
9
+
10
+ Node >=20, a Unicode Braille terminal font, and an independently installed supported
11
+ agent are required. Source code is MIT; bundled puppy artwork is CC BY-SA 4.0.
12
+ Keep the included ATTRIBUTION.md and asset license when redistributing artwork.
13
+
14
+ ```sh
15
+ npm install -g @bitefoundry/retrieviewer@0.0.1
16
+ retrieviewer enable
17
+ ```
18
+
19
+ On a terminal, enable offers a numbered agent selection, checks compatibility,
20
+ shows exact paths and asks before making changes. Cancel/Enter changes nothing.
21
+ For a non-interactive installation use an explicit agent and confirmation:
22
+
23
+ ```sh
24
+ retrieviewer enable --agent opencode --dry-run
25
+ retrieviewer enable --agent opencode --yes
26
+ opencode
27
+ ```
28
+
29
+ The native renderer is initially version-gated to OpenCode2.1.2. A different
30
+ version is **not automatically certified**. Existing project configuration can
31
+ override global settings; doctor checks registration, not arbitrary host precedence.
32
+ Do not put API keys in Retrieviewer settings. No credentials are needed by the pet.
33
+
34
+ After a future public release, the install command will instead be
35
+ `npm install -g @bitefoundry/retrieviewer@0.0.1`. Do not run that registry command
36
+ before publication. The package also exports `./tui` for npm-aware OpenCode plugin
37
+ loaders; package-name discovery has not yet been live-tested against npm.
38
+ The verified installer continues using its local directory URL, not that new path.
39
+
40
+ ## What changes
41
+
42
+ - Add the local TUI plugin **directory** URL to OpenCode's global `cli.json` plugins list.
43
+ OpenCode2.1.2 skips file targets; the directory resolves its `tui.tsx` entry.
44
+ Respect XDG_CONFIG_HOME; otherwise use ~/.config/opencode, including Windows.
45
+ - Preserve JSONC comments, unrelated settings and other plugins; back up before edits.
46
+ - Store enabled/ownership information in Retrieviewer's own settings directory.
47
+ - Do not edit shell profiles, replace agents, change permissions, or launch another
48
+ terminal. This native path needs no MCP entry: registering MCP alone cannot insert
49
+ a persistent widget into an arbitrary TUI.
50
+
51
+ Keep the installed package path available: the agent loads that exact plugin URL.
52
+ After changing the installed location, disconnect the old registration and enable
53
+ the new package. No automatic global install is done by the package itself.
54
+
55
+ ## Commands
56
+
57
+ ```sh
58
+ retrieviewer agents --json
59
+ retrieviewer status --agent opencode
60
+ retrieviewer doctor --agent opencode --json
61
+ retrieviewer disable --agent opencode
62
+ retrieviewer enable --agent opencode --yes
63
+ retrieviewer disconnect --agent opencode --dry-run
64
+ retrieviewer disconnect --agent opencode --yes
65
+ retrieviewer preview
66
+ ```
67
+
68
+ Disable keeps the adapter installed; disconnect removes only the registration this
69
+ installer owns. It never restores a whole old config over later user changes.
70
+ Backups remain recoverable. An entry predating this installer remains user-owned.
71
+
72
+ Inside OpenCode, `/retrieviewer enable`, `/retrieviewer disable`,
73
+ `/retrieviewer ball`, `/retrieviewer treat`, `/retrieviewer status` control the native
74
+ pet. The adapter owns no raw keyboard or stdout; the host owns drawing and layout.
75
+
76
+ ## Evidence, not a misleading green check
77
+
78
+ Registration means the config contains our plugin URL. A runtime receipt means
79
+ the adapter initialized and produced a frame; it is **not proof of human visual
80
+ approval**. A stale receipt from a closed process is not a live renderer.
81
+ There is no automatic approval of all MCPs or bypass of an agent's trust policy.
82
+
83
+ For tests/portable setups, `RETRIEVIEWER_HOME` selects the pet state directory.
84
+ Changing it does not move agent configuration; use XDG_CONFIG_HOME for that.
85
+ Never point tests at a real user's settings. The package smoke check uses an
86
+ isolated consumer home/config and an injected executable probe.
87
+
88
+ ## Implementation sources
89
+
90
+ The native integration reuses [OpenCode's official CLI plugin API](https://dev.opencode.ai/v2/docs/build/plugins/cli)
91
+ and the existing host-driven Retrieviewer core. JSONC edits use Microsoft's
92
+ jsonc-parser3.3.1 instead of rewriting configuration as plain JSON. MCP Apps host
93
+ support is independent of basic MCP support; see the
94
+ [official extension overview](https://modelcontextprotocol.io/extensions/apps/overview).
95
+ Support of Codex, Claude Code, Cursor Agent, Grok and Antigravity **inside their
96
+ terminal UI remains unimplemented**, not inferred from their MCP commands.
97
+
98
+ ## Local validation
99
+
100
+ The adapter was compiled and run by the real OpenCode2.1.2 Windows host with an
101
+ isolated XDG configuration/data/cache/state and pet directory. Animated Braille
102
+ appeared in its home-screen footer alongside its ordinary prompt. The native
103
+ `/retrieviewer` slash menu and status toast were observed. External disable/re-enable
104
+ and increasing frame receipts were checked without sending a model prompt.
105
+ The test terminal was80×24 cells, yielding a64×5 pet pane; larger physical terminal
106
+ visual quality and other OpenCode versions are not certified by this check.
107
+ Source QA evidence is in qa-opencode/native-ui-proof.json (not shipped in the pet).
package/LICENSE ADDED
@@ -0,0 +1,16 @@
1
+ Retrieviewer licensing
2
+
3
+ Software source code: MIT License, see LICENSE-CODE.
4
+ Bundled puppy artwork/frame data: Creative Commons Attribution-ShareAlike 4.0
5
+ International (CC-BY-SA-4.0), see ASSETS-LICENSE.md and ATTRIBUTION.md.
6
+ https://creativecommons.org/licenses/by-sa/4.0/legalcode.en
7
+
8
+ The complete package is not MIT-only. Commercial use is allowed under the
9
+ applicable terms. Artwork adaptations retain ShareAlike obligations; the
10
+ separately licensed software does not become CC-licensed merely by bundling it.
11
+
12
+ Third-party components retain their original notices, including the MIT license
13
+ under vendor/procedural-animals. See THIRD-PARTY-NOTICES.md.
14
+
15
+ No exclusive copyright in AI-generated output, registered trademark status,
16
+ third-party endorsement or comprehensive legal clearance is claimed.
package/LICENSE-CODE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Retrieviewer contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/PLUGIN.md ADDED
@@ -0,0 +1,110 @@
1
+ # Retrieviewer plugin · 0.0.1
2
+
3
+ An autonomous Braille dog, embedded in **your pane**. Only ball and treat need user
4
+ input. The rest is its own seeded behavior. No screen, stdin or layout takeover.
5
+ No telemetry, keys, account signup or paid APIs in the runtime.
6
+
7
+ ## Install
8
+
9
+ Install from npm:
10
+
11
+ ```sh
12
+ npm install @bitefoundry/retrieviewer@0.0.1
13
+ ```
14
+
15
+ Portable distribution (independent of the source directory):
16
+
17
+ ```sh
18
+ npm install /path/to/bitefoundry-retrieviewer-0.0.1.tgz
19
+ ```
20
+
21
+ The generated tarball is in `dist/`. Node >=20, ESM and a monospaced Unicode
22
+ Braille font are required. The npm package name is `@bitefoundry/retrieviewer`;
23
+ imports from the old playground name must be updated.
24
+ The tarball carries Q5 art, runtime code, types and examples. npm installs the pinned
25
+ `three` dependency separately (network/cache or host provisioning required).
26
+ No install/build scripts. Offline install requires that dependency already cached.
27
+
28
+ For supported agent-native installation use `retrieviewer enable`; see
29
+ [INSTALLING.md](./INSTALLING.md). The library contract below remains unchanged.
30
+ Source code is MIT; artwork is CC BY-SA 4.0, allowing commercial reuse and
31
+ adaptations under its attribution/ShareAlike conditions. Vendored MIT notices
32
+ remain intact. See LICENSE, ASSETS-LICENSE.md, ATTRIBUTION.md and TRADEMARKS.md.
33
+
34
+ ## Attach to any JavaScript text widget
35
+
36
+ ```js
37
+ import {createPetPlugin} from '@bitefoundry/retrieviewer/plugin';
38
+
39
+ const puppy = await createPetPlugin({
40
+ host: {
41
+ // Return null while hidden. Use CONTENT size, excluding widget border/padding.
42
+ getSize: () => visible ? {columns: contentWidth, rows: contentHeight} : null,
43
+ render: ({text}) => { widget.setContent(text); screen.render(); },
44
+ clear: () => widget.setContent(''), // optional
45
+ onError: error => logToYourApp(error), // optional, don't log over terminal art
46
+ },
47
+ fps: 30,
48
+ });
49
+ puppy.start();
50
+ ballButton.on('click', () => puppy.interact('ball'));
51
+ treatButton.on('click', () => puppy.interact('treat'));
52
+ // pane unmount / host shutdown:
53
+ puppy.dispose();
54
+ ```
55
+
56
+ Identifiers like widget/screen/button are your host objects, not bundled adapters.
57
+ Treat text as literal text, not markup/terminal escapes. Disable wrapping, trim,
58
+ proportional fonts and line-height tricks. Use white-on-black for the approved look.
59
+ Small panes lose fur detail; prefer >=80×24, around160×50 for detailed art.
60
+ Multiple plugins have independent state and share default immutable assets.
61
+
62
+ ## Own loop instead of plugin clock
63
+
64
+ ```js
65
+ const puppy = await createPetPlugin({host}); // creation does not render/start timers
66
+ // existing host frame loop (do NOT also call start):
67
+ puppy.tick(elapsedSeconds);
68
+ // existing host interaction input:
69
+ puppy.interact('ball');
70
+ // teardown:
71
+ puppy.dispose();
72
+ ```
73
+
74
+ `start()` is opt-in scheduling, `pause()` stops scheduling without unloading,
75
+ `render()` redraws without advancing, `tick(dt)` advances+draws. `start()` is
76
+ idempotent; resume ignores paused wall time. `running`/`disposed` are readable.
77
+ Host size is checked each frame; no resize listeners are installed. Hidden/null
78
+ or zero-sized panes neither advance nor draw. Disposal cancels scheduling, releases
79
+ pet and invokes optional clear once. Direct host errors throw; scheduled errors
80
+ pause and invoke onError if supplied (otherwise stay paused). Host callbacks are
81
+ synchronous; avoid retaining borrowed frame pixels. See types for custom scheduler.
82
+
83
+ ## Host boundaries
84
+
85
+ | Host | Connection | Status |
86
+ | --- | --- | --- |
87
+ | JS/TS terminal widget | `/plugin` host callbacks, or core `step/frame` | Generic contract + installed consumer tested |
88
+ | Ink/React, Blessed | Lifecycle calls plugin, render text in widget | Contract fits; framework-specific mounts not tested |
89
+ | Python/Rust/Go TUI | JSONL subprocess, one `tick` request per frame | Bridge + Python sample; Node required |
90
+ | Browser | Core/plugin + deployed assets + `three` mapping | Existing browser core preview checked; arbitrary bundlers untested |
91
+
92
+ Not a native binary, editor extension, MCP plugin, or automatic injection into
93
+ closed-source TUI apps. Such hosts need an extension hook to display a pane.
94
+ Never embed fullscreen `retrieviewer preview` inside another app; import the library or use
95
+ the JSONL bridge. [EMBEDDING.md](./EMBEDDING.md) has full core/asset/protocol details.
96
+
97
+ ## Verification / rebuild
98
+
99
+ ```sh
100
+ npm test
101
+ npm run test:package
102
+ ```
103
+
104
+ The package check creates a tarball, installs it into a fresh temp consumer offline
105
+ with lifecycle scripts disabled, exercises exports, default art, interactions,
106
+ start/pause/dispose, all JS examples and JSONL. Evidence is retained in
107
+ `dist/package-check.json`. It does not publish. Art originals/references/workers
108
+ are excluded. Source art is18.7 MB gzip; full tarball is approximately20.6 MB,
109
+ excluding npm's separate Three dependency. This is still a substantial pet, not
110
+ a kilobyte icon; see memory/startup tradeoffs in the comparison document.
@@ -0,0 +1,57 @@
1
+ # Lossless runtime cache reduction
2
+
3
+ The weight came from 2,341 full-size grayscale frames stored as concatenated
4
+ 320² or 480² rasters, including exact duplicates and black padding. These are
5
+ already one-byte grayscale, not RGBA files; converting to grayscale again would
6
+ not help. Actions alone occupied 136,857,600 decoded bytes. Loading all eight
7
+ gzip files concurrently through Blob/Response streams added transient copies.
8
+
9
+ ## What changed
10
+
11
+ - RVF1 stores exact unique frames once and removes only zero-valued borders.
12
+ Coordinates and the original canvas size are retained. A bounded two-frame
13
+ LRU reconstructs full rasters only as the existing sampler needs them.
14
+ - No downsampling, palette reduction, pose removal, timing changes, or new art.
15
+ Existing sampler APIs accept both the old flat arrays and the new stores.
16
+ - `createPet()` loads compact families sequentially, using native gzip in Node.
17
+ Default-loader pets in one process share art but have independent actors,
18
+ behavior, renderers and buffers. The last `dispose()` releases the shared lease.
19
+ Custom loaders remain isolated (no cross-tenant or unexpected global sharing).
20
+ - Package contents use compact caches only. Original files remain in the source
21
+ project for comparisons and rollback; this does not shrink that working folder.
22
+
23
+ ## Measurements
24
+
25
+ Fresh Node process on this Windows host, `node --expose-gc measure-pet-memory.mjs`;
26
+ same seed and sixty 160×50 frames. MB below means 1,000,000 bytes.
27
+
28
+ | Metric | Before | After |
29
+ | --- | ---: | ---: |
30
+ | Art storage resident before selected-frame reconstruction | 315.8 MB | 106.5 MB |
31
+ | Compressed runtime art files | 69.9 MB | 54.2 MB |
32
+ | Process RSS after rendering | 498.4 MB | 211.8 MB |
33
+ | Peak process RSS during load + rendering | 1,014.3 MB | 233.1 MB |
34
+
35
+ These are local samples, not hard memory budgets. RSS includes Node, geometry,
36
+ temporary buffers and allocator retention. After last disposal, an event-loop
37
+ turn and explicit GC, the new run returned to about 94.9 MB RSS and 0.15 MB
38
+ ArrayBuffers. Actual reclamation in a host application is GC-dependent.
39
+ Browser loading uses DecompressionStream, so Node's RSS results are not browser
40
+ measurements. See `pet-memory-baseline.json` and `pet-memory-compact.json`.
41
+
42
+ ## Reproduce / verify
43
+
44
+ `node audit-pet-frames.mjs` counts full, unique and cropped pixel bytes.
45
+ `node prepare-pet-frame-store.mjs` rebuilds the eight compact files from preserved
46
+ original caches, validating source hashes and every reconstructed frame before
47
+ writing the final manifest. `node --test puppy-frame-store.test.mjs
48
+ retrieviewer-lossless.test.mjs retrieviewer.test.mjs` verifies all 2,341 logical
49
+ frames, raw/packed sampler equality, 80 end-to-end renders at different views,
50
+ depths and mirrors, and shared-asset lifecycle. The import API is unchanged.
51
+
52
+ ## Remaining weight
53
+
54
+ 106.5 MB of decoded cropped pixels is still substantial. Delta-coded frames,
55
+ on-demand compressed blocks or optional art sets could reduce it further, but
56
+ need separate CPU/latency and portability validation. This pass deliberately
57
+ keeps the pixel output and synchronous `frame()` contract exact.
@@ -0,0 +1,73 @@
1
+ # 32-level predictive art (default since v0.1)
2
+
3
+ Q5 is now the default after user visual comparison and approval. No original
4
+ artwork/cache was overwritten, no poses removed, and movement timing is unchanged.
5
+ Q5 is a **lossy** palette reduction, not a lossless replacement.
6
+
7
+ ## Try it
8
+
9
+ - Synchronized comparison: `http://127.0.0.1:60668/puppy-q5-compare.html`
10
+ - Normal companion screen: `http://127.0.0.1:60668/puppy-paper.html?palette=q5`
11
+ - Terminal candidate: `npm run pet:companion -- --q5`
12
+ - JS host: `await createPet()`. Original: `artProfile:'original'` with original files.
13
+ - Local original screen: `http://127.0.0.1:60668/puppy-paper.html?palette=original`
14
+
15
+ The comparison gives both pets the same seed, elapsed time, steps, interactions,
16
+ camera and grid. It checks both state and life-report equality. Ball/treat affect
17
+ both; pause freezes both. Reduced motion starts paused; hidden tabs stop stepping.
18
+ Changed-dot percentage is a diagnostic, not a perceptual quality score. Examine
19
+ eyes, mouth, fur tips and temporal sparkle. The comparison loads **both** art sets;
20
+ its memory is not the standalone candidate's memory.
21
+
22
+ ## Codec
23
+
24
+ Source pixel v becomes q=round(v*31/255), displayed as round(q*255/31). Maximum
25
+ source-pixel error is4. The original unique-frame map, crop rectangles and logical
26
+ indices stay unchanged. Crops use adaptive PNG-style row prediction (None/Sub/Up/
27
+ Average/Paeth), then deterministic gzip. RVQ5 validation rejects malformed shapes,
28
+ maps, offsets, row filters and decoded indices outside0..31.
29
+
30
+ At load, prediction is reversed once and indices are repacked to **5 bits/pixel**.
31
+ The expanded filtered input is not retained. A two-frame LRU expands selected
32
+ frames to the existing 8-bit sampler interface. Original and Q5 caches have separate
33
+ sharing/refcount entries; pets' actors, needs, clocks and buffers remain independent.
34
+
35
+ ## Local measurements
36
+
37
+ Fresh Node v24.19.0 processes on this Windows host, explicit GC, seed731,
38
+ sixty frames at160×50 cells. These are samples, not platform-wide limits.
39
+
40
+ | Metric | Original | Q5 candidate |
41
+ | --- | ---: | ---: |
42
+ | Compressed art | 54.2 MB | 18.7 MB |
43
+ | Resident cropped pixel payload | 106.4 MB | 66.5 MB |
44
+ | RSS after rendering | 211.8 MB | 172.0 MB |
45
+ | Load time | 270 ms | 737 ms |
46
+ | Mean sampled frame time | 2.66 ms | 2.61 ms |
47
+
48
+ Startup is slower due to prediction reversal/packing. Q5 peak RSS varied from200
49
+ to228 MB in two samples. After disposal + an event-loop turn + explicit GC,
50
+ ArrayBuffers returned to about0.15 MB. Browser decoding is synchronous CPU work
51
+ between loads. Desktop Aside was exercised; physical mobile and every terminal
52
+ font were not tested. See `pet-q5-comparison-report.json`.
53
+
54
+ ## Verification / status
55
+
56
+ - All2,341 logical frames match the specified quantized source; artifact and
57
+ original-source hashes are separate in `pet-q5-manifest.json`.
58
+ - Prediction, bit packing, partial bytes, malformed input, LRU bounds and input
59
+ detachment are tested. Generator checks original-file hashes remain unchanged.
60
+ - A160-frame fetch/treat simulation keeps state, reports, mouth and projection
61
+ equal. Changed dots / union of lit dots was0.3431% at160×50; not visual approval.
62
+ - Aside: fetch/pickup/carry/drop/offer, treat and frozen pause stay synchronized.
63
+ Desktop side and frontal-chewing screenshots inspected. User reported no visible
64
+ difference, possibly preferring32 levels; default switch was then authorized.
65
+ - Initial codec handoff:230 tests passed. Current product checks: npm test and
66
+ npm run test:package (see dist/package-check.json after packaging).
67
+
68
+ Build: `node prepare-pet-q5.mjs`. Memory: `node --expose-gc measure-pet-memory.mjs --q5`.
69
+
70
+ The package now includes Q5 binaries/manifest only; comparison UI and original
71
+ caches remain in the source workspace. Original hosts must separately copy the
72
+ files from getPetAssetFiles('original') and supply loadAsset. This prevents
73
+ shipping both art sets. See PLUGIN.md for portable tarball installation.