@bitefoundry/retrieviewer 0.0.9 → 0.0.11
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 +37 -0
- package/EMBEDDING.md +6 -0
- package/PUPPY-MEMORY.md +87 -0
- package/README.ko.md +7 -0
- package/README.md +7 -0
- package/RELEASING.md +48 -10
- package/WATCH-REDRAW.md +186 -0
- package/braille.mjs +4 -2
- package/integrations/windows-overlay/desktop.mjs +3 -2
- package/integrations/windows-overlay/protocol.mjs +4 -1
- package/integrations/windows-overlay/worker.mjs +4 -3
- package/package.json +3 -1
- package/pet-q5-manifest.json +60 -24
- package/puppy-comfort-sprites.mjs +26 -3
- package/puppy-companion-ball.mjs +36 -0
- package/puppy-companion-comfort-q5.bin.gz +0 -0
- package/puppy-companion-comfort.json +333 -7
- package/puppy-companion-life.mjs +106 -35
- package/puppy-companion-objects.mjs +3 -1
- package/puppy-paper-area.mjs +6 -3
- package/puppy-paper-behaviors-q5.bin.gz +0 -0
- package/puppy-paper-world.mjs +47 -1
- package/puppy-paper.mjs +113 -26
- package/retrieviewer-cli.mjs +6 -4
- package/retrieviewer.d.mts +15 -1
- package/retrieviewer.mjs +31 -8
package/ASSET-PROVENANCE.md
CHANGED
|
@@ -6,6 +6,17 @@ of exclusive ownership of AI output.
|
|
|
6
6
|
|
|
7
7
|
## Evidence checked
|
|
8
8
|
|
|
9
|
+
- Unreleased comfort v6 adds a front-facing carry-trot study generated using
|
|
10
|
+
built-in imagegen with only the existing approach and arrival-seat puppy as
|
|
11
|
+
references. No new photograph/video input. Eight whole-pose keys (four unique
|
|
12
|
+
trot phases, four gathering steps) are appended; accepted v5's37 frames remain
|
|
13
|
+
pixel-exact. One common scale, whole-image floor translation, per-key measured
|
|
14
|
+
mouth/support anchors, no anatomical compositing. Last gathering key is exact
|
|
15
|
+
arrival-seat source0. Full prompt/source hash and size evidence live in
|
|
16
|
+
dist/carry-trot-v1/NOTES.md and puppy-companion-comfort.json. Existing artwork
|
|
17
|
+
attribution and CC BY-SA4.0 remain. The owner subsequently requested publishing
|
|
18
|
+
the reviewed candidate with the original braking return preserved as an option.
|
|
19
|
+
|
|
9
20
|
- PUPPY-STUDY.md identifies the initial built-in image-generation output and
|
|
10
21
|
the two photographic inputs. The generated source and both local reference
|
|
11
22
|
images were visually inspected. Their stored Commons metadata was checked
|
|
@@ -35,6 +46,25 @@ must be checked again for the final release bytes.
|
|
|
35
46
|
|
|
36
47
|
## Remaining limits
|
|
37
48
|
|
|
49
|
+
Unreleased0.0.10 replaces the36 watch samples with an owner-approved whole-body
|
|
50
|
+
redraw (head, neck, shoulders and foreleg weight transfer together). Built-in
|
|
51
|
+
imagegen referenced only the existing approved puppy and its generated study,
|
|
52
|
+
not new photographs. One common uniform scale and whole-frame floor translation
|
|
53
|
+
replace the earlier row-dependent warps; no anatomical masks or body compositing.
|
|
54
|
+
WATCH-REDRAW.md and the manifest retain preparation/source digests. Other behavior
|
|
55
|
+
frames remain byte-identical. Existing CC BY-SA4.0 attribution remains in place.
|
|
56
|
+
The owner then approved the new momentum-pose studies on2026-10-23 and requested
|
|
57
|
+
implementation. The working tree now includes a v5 comfort family: the original13
|
|
58
|
+
tug/sleep frames remain byte-exact,12 standing pickup keys are retained, and12
|
|
59
|
+
rear stumble samples replace the rejected lateral choreography. Four samples
|
|
60
|
+
are registered directly from the approved rear-quarter study; the others use a
|
|
61
|
+
built-in imagegen breakdown sheet referenced only from that approved art and the
|
|
62
|
+
existing puppy. Exact existing run/rear pickup endpoints remain shared. Uniform
|
|
63
|
+
batch scales and whole-frame translations only, no anatomical compositing or live
|
|
64
|
+
image deformation. Source digests, timings and transforms are in the comfort
|
|
65
|
+
metadata; prompts/raw originals remain local, outside npm. Visual acceptance of
|
|
66
|
+
the completed animation was followed by the owner's explicit publication request.
|
|
67
|
+
|
|
38
68
|
0.0.9 adds offline torso-envelope constraints to the same single-source watch
|
|
39
69
|
coordinate field, using only the existing seated key as a volume reference.
|
|
40
70
|
Face pixels remain exact; the connected neck/body is spatially registered, not
|
|
@@ -65,6 +95,13 @@ puppy sheet, not new photographs. COMFORT-ART.md records the prompt, source hash
|
|
|
65
95
|
and fixed-scale preparation. The ninth archive is covered explicitly by
|
|
66
96
|
ASSETS-LICENSE.md and ATTRIBUTION.md. Original sheet PNGs remain outside npm.
|
|
67
97
|
|
|
98
|
+
Local candidate2026-10-24 changes only offline watch-frame selection: the same
|
|
99
|
+
15 approved whole-body drawings are held, not crossfaded into double contours.
|
|
100
|
+
Source sheet SHA256 and registration stay unchanged; `watchRegistration` now
|
|
101
|
+
records the exact36 source-key indices and `pixelBlending:false`. No new generated
|
|
102
|
+
or photographic input, asset family or attribution is added. Existing CC BY-SA4.0
|
|
103
|
+
terms and all non-watch pixels remain unchanged. See WATCH-REDRAW.md for the A/B.
|
|
104
|
+
|
|
68
105
|
Copyrightability of AI-generated expression, the precise derivative-work analysis,
|
|
69
106
|
and worldwide name clearance are not conclusively determined here. Existing
|
|
70
107
|
domestic trademark research records possible similar marks; owning an npm scope
|
package/EMBEDDING.md
CHANGED
|
@@ -30,6 +30,12 @@ pet.dispose();
|
|
|
30
30
|
- Frame contains text,columns,rows,artProfile,pixels,state,report,placement,
|
|
31
31
|
projection,mouth,contacts. pixels is a **borrowed** RGBA buffer: valid only until
|
|
32
32
|
next frame/dispose; copy if retaining. The wrapper also retains no frame.
|
|
33
|
+
- needsFrame(frameOptions): optional pre-render check for a host that only needs
|
|
34
|
+
changed pictures. False means a known held pose and all visible objects match
|
|
35
|
+
the last frame. Always keep calling step(dt); needs/cooldowns/autonomy continue.
|
|
36
|
+
Moving poses, gestures, visitors and sleep cues conservatively return true.
|
|
37
|
+
frame() itself never skips or returns stale metadata. Force a frame when the
|
|
38
|
+
host loses its display contents (for example after hiding or reconnecting).
|
|
33
39
|
- camera:{viewportWidth,viewportHeight,rect:{left,top,width,height}} places a pane
|
|
34
40
|
within a larger viewport. Keep it consistent across time for metric perspective.
|
|
35
41
|
- interact('ball'|'treat'): false while busy/cooling down; unknown kind throws.
|
package/PUPPY-MEMORY.md
CHANGED
|
@@ -1,5 +1,92 @@
|
|
|
1
1
|
# Runtime weight and performance
|
|
2
2
|
|
|
3
|
+
## Held-pose invalidation (local candidate, 2026-10-24)
|
|
4
|
+
|
|
5
|
+
The desktop pump now asks `pet.needsFrame(viewport)` before rasterization. Only
|
|
6
|
+
known held seated/down poses qualify; the key includes their source selection,
|
|
7
|
+
world position, camera/grid and visible objects. Moving/turning poses, gestures,
|
|
8
|
+
butterflies and sleep cues take the normal rendering path. Simulation, needs,
|
|
9
|
+
cooldowns and autonomous decisions still advance. Accepted input, viewport
|
|
10
|
+
revision and pause/resume invalidate immediately. `frame()` itself still paints
|
|
11
|
+
and returns current metadata and the same borrowed-buffer contract. One small
|
|
12
|
+
key is retained, not another raster; no dependency, timer or process is added.
|
|
13
|
+
|
|
14
|
+
Same seed731, 480x135 cells, 450 ticks at30Hz, first throw at tick24, brake return:
|
|
15
|
+
without the hint450 renderer calls, with it300; both publish259 identical native
|
|
16
|
+
frames (transport SHA256 `4069444df1bc5c1a43375ff8f3f9a4cee9bc9965c047ae5f6bfecdcc01721985`).
|
|
17
|
+
During one settled1s offer, full renderer calls fall from30 to0. One local pair
|
|
18
|
+
measured CPU2469ms ->1499ms; timing is a sample, not a universal CPU saving.
|
|
19
|
+
Reproduce with `node tools/benchmark-held-render.mjs`.
|
|
20
|
+
|
|
21
|
+
Offscreen fresh-process diagnostic-GC RSS is effectively unchanged: loaded
|
|
22
|
+
102,940,672 ->102,952,960 bytes; rendered179,982,336 ->180,019,200 bytes.
|
|
23
|
+
The retained ArrayBuffer difference is -19,124 bytes, mainly fewer unique watch
|
|
24
|
+
samples. This is a CPU/allocation-work improvement, NOT a large desktop RAM cut.
|
|
25
|
+
No live native-helper RSS or Linux/macOS performance was measured in this pass.
|
|
26
|
+
|
|
27
|
+
Long-run treat/tug attention now replans a local brake from the current speed:
|
|
28
|
+
`d = v*v/(2*a)`, retaining heading, distance-driven gait phase and existing
|
|
29
|
+
run/walk deceleration. It cancels obsolete waypoints rather than waiting for a
|
|
30
|
+
15m trip to finish. A hand-fed treat appears immediately; recovery at the tested
|
|
31
|
+
rear-running speeds finishes in1.08-1.94s, including turning and sitting.
|
|
32
|
+
Existing roll/tug/walk-entry recovery still reaches connected source endpoints.
|
|
33
|
+
This does not change ball-return variants or multiply physical simulation time.
|
|
34
|
+
|
|
35
|
+
## Spatial autonomy and allocation pass (0.0.10)
|
|
36
|
+
|
|
37
|
+
Autonomous strolls, dashes and butterfly visits no longer end with an unconditional
|
|
38
|
+
trip to the front-center home. Only an occasional check-in or ball return comes
|
|
39
|
+
back there. Check-ins have a 90-second spacing; lingering front and center for
|
|
40
|
+
40 active seconds prompts a later outing, after the current episode finishes.
|
|
41
|
+
Outings alternate sides and near/middle/far depths, up to 15m behind the world
|
|
42
|
+
origin. Sideways room is calculated from the existing camera frustum, not a fixed
|
|
43
|
+
narrow x corridor. Naps/rests find side nooks 0.7–2.6m behind the origin and often
|
|
44
|
+
stay in a suitable nook already found. All travel still uses the same integrated
|
|
45
|
+
gait and projection; there is no scale animation, teleport or extra dog artwork.
|
|
46
|
+
|
|
47
|
+
Ten seeded 20-minute simulations spent 7–27% of time in the front-center zone,
|
|
48
|
+
used both sides and multiple sleeping spots, and preserved stationary nap roots.
|
|
49
|
+
Tests also cover uninterrupted gait travel, fetching home from a distant nap,
|
|
50
|
+
and hand-fed treats without a detour. These are design parameters, not claims
|
|
51
|
+
about measured canine behavior. The rare butterfly's lateral bounds now follow
|
|
52
|
+
its current depth too, so a side-positioned puppy faces the visitor correctly.
|
|
53
|
+
|
|
54
|
+
Memory changes reuse existing code and built-in Node compression:
|
|
55
|
+
|
|
56
|
+
- Stable Braille output joins one reusable row of glyph references instead of
|
|
57
|
+
creating one string rope node per cell. Exact text and dot thresholds unchanged.
|
|
58
|
+
- Minification integral tables allocate on first use, with uint32 sums for byte
|
|
59
|
+
art. Even the largest 640² source sum fits exactly; fractional custom images
|
|
60
|
+
retain Float64 tables. Fractional footprint arithmetic stays unchanged.
|
|
61
|
+
- Node's retained crop compression uses DEFLATE level3 instead of level1.
|
|
62
|
+
Levels6/9 were rejected for 3.3s/21.5s crop-processing startup in the local probe.
|
|
63
|
+
Level3 cuts retained crop payload from22,222,718 to20,517,500 bytes, at about
|
|
64
|
+
half a second extra startup. Browser art storage and files stay unchanged.
|
|
65
|
+
|
|
66
|
+
Three fresh Windows processes per side, same 450-frame 480×135 ball sequence;
|
|
67
|
+
medians measured **before changing autonomy**, to isolate the memory work:
|
|
68
|
+
|
|
69
|
+
| Metric | Before | After |
|
|
70
|
+
| --- | ---: | ---: |
|
|
71
|
+
| Initial load | 916ms | 1,419ms |
|
|
72
|
+
| Loaded process RSS | 99.7MiB | 97.4MiB |
|
|
73
|
+
| Rendered ArrayBuffers after diagnostic GC | 29.0MiB | 26.1MiB |
|
|
74
|
+
| Rendered process RSS after diagnostic GC | 237.6MiB | 167.8MiB |
|
|
75
|
+
| Peak benchmark-process RSS | 250.5MiB | 191.0MiB |
|
|
76
|
+
| Mean frame time | 3.53ms | 3.59ms |
|
|
77
|
+
| Frame time p95 | 6.35ms | 6.72ms |
|
|
78
|
+
|
|
79
|
+
All six frame hashes equal
|
|
80
|
+
`3a296d0a737eaa1d9a5923e3496e8c62b2d5e99fbe871806b907429515597a3d`.
|
|
81
|
+
This synchronous off-screen workload is **not the resident desktop RAM figure**:
|
|
82
|
+
GC, deferred native-close callbacks and allocator retention affect RSS. A short
|
|
83
|
+
owned-window native run of the combined changes measured105MiB Node RSS; helper
|
|
84
|
+
memory is separate. It verified painting, ball IPC and clean worker/helper exit,
|
|
85
|
+
without restarting the user's pet. No real Mac/Linux RAM measurement this pass.
|
|
86
|
+
Proof files are local `dist/roam-memory-{before,after}*.json` and
|
|
87
|
+
`dist/windows-overlay-qa/lifecycle-receipt.json`. No new dependency, process,
|
|
88
|
+
timer, art frame, reduction in resolution, palette change or package art bytes.
|
|
89
|
+
|
|
3
90
|
## Fixed-volume watch torso (0.0.9)
|
|
4
91
|
|
|
5
92
|
Paw registration alone in0.0.8 left the upper torso unconstrained. In the36
|
package/README.ko.md
CHANGED
|
@@ -38,6 +38,13 @@ Node.js/npm이 없다면 [먼저 설치](PREREQUISITES.md)해 주세요.
|
|
|
38
38
|
`retrieviewer desktop --ink dark`를 쓰세요. 실행 중이라면 먼저 종료하고 다시
|
|
39
39
|
실행하세요. 배경을 캡처하지 않고, 같은 도트에 색만 바꿉니다.
|
|
40
40
|
|
|
41
|
+
0.0.10부터 `--return-style auto|brake|trot|run-trot`로 귀환도
|
|
42
|
+
고를 수 있어요. 기본 `auto`는 기존 제동·총총·달리다 총총을 섞고 같은 동작이
|
|
43
|
+
연달아 나오지 않게 합니다. 기존 제동만 쓰려면
|
|
44
|
+
`retrieviewer desktop --return-style brake`. 실행 중인 강아지는 직접 종료한 뒤
|
|
45
|
+
다시 실행하세요. import해서 쓸 때는 `createPet({returnStyle:'auto'})` 또는
|
|
46
|
+
`pet.setReturnStyle('brake')`로 고릅니다. 바꾸면 다음 공놀이부터 적용돼요.
|
|
47
|
+
|
|
41
48
|
> **Cursor / VS Code Remote SSH 사용자:** 원격 서버의 터미널이 아닌,
|
|
42
49
|
> Cursor 화면이 떠 있는 **로컬 PC의 PowerShell/터미널**에 설치하세요.
|
|
43
50
|
> 서버의 `DISPLAY=:1`은 서버 쪽 X11 화면을 뜻합니다. VNC로 그 화면을 보고
|
package/README.md
CHANGED
|
@@ -45,6 +45,13 @@ Choose the dot color at launch: `retrieviewer desktop --ink gold`, or
|
|
|
45
45
|
`retrieviewer desktop --ink dark` for light backgrounds. Default: `cream`.
|
|
46
46
|
Quit a running companion first. Colors reuse the same artwork; no screen capture.
|
|
47
47
|
|
|
48
|
+
Version 0.0.10 offers `--return-style auto|brake|trot|run-trot`.
|
|
49
|
+
`auto` mixes the original braking return, a trot and run-then-trot, without
|
|
50
|
+
adjacent repeats. For example, `retrieviewer desktop --return-style brake` keeps
|
|
51
|
+
the original return. Quit and relaunch to change the desktop choice; an existing
|
|
52
|
+
companion is not restarted for you. Embedders can use `createPet({returnStyle:'auto'})`
|
|
53
|
+
and `pet.setReturnStyle('brake')`; changes apply to the next throw, not mid-fetch.
|
|
54
|
+
|
|
48
55
|
> **Cursor / VS Code Remote SSH:** run those commands in your **local** computer's
|
|
49
56
|
> terminal, not the remote server's terminal. The puppy belongs where the window
|
|
50
57
|
> is displayed. A server's `DISPLAY=:1` refers to that server's X11 display, which
|
package/RELEASING.md
CHANGED
|
@@ -1,13 +1,51 @@
|
|
|
1
|
-
# Retrieviewer 0.0.
|
|
2
|
-
|
|
3
|
-
Current target: `@bitefoundry/retrieviewer@0.0.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
# Retrieviewer 0.0.11 release process
|
|
2
|
+
|
|
3
|
+
Current target: `@bitefoundry/retrieviewer@0.0.11`, public `latest`.
|
|
4
|
+
On2026-10-24 the owner accepted the reviewed candidate and authorized immediate
|
|
5
|
+
release. This scope removes blended watch contours while retaining all15 approved
|
|
6
|
+
whole-body keys, interrupts treat/tug journeys with velocity-continuous braking,
|
|
7
|
+
and checks held-pose dirtiness before rasterization. Existing fetch patterns and
|
|
8
|
+
all three return choices remain. No new runtime dependency, timer or process.
|
|
9
|
+
RAM is effectively unchanged; this pass reduces repeated CPU/allocation work.
|
|
10
|
+
|
|
11
|
+
Build a fresh exact tarball, install outside the source tree, compare every
|
|
12
|
+
installed byte, check its owned Windows native lifecycle and bilingual browser
|
|
13
|
+
runtime, then publish that exact tarball. Verify registry integrity and GitHub
|
|
14
|
+
Pages runtime bytes afterwards. Do not restart the user's existing companion.
|
|
15
|
+
Earlier npm artifacts remain immutable. MIT code / CC BY-SA4.0 artwork and
|
|
16
|
+
experimental macOS / X11-only Linux boundaries remain unchanged.
|
|
17
|
+
|
|
18
|
+
## Previous 0.0.10 scope (historical)
|
|
19
|
+
|
|
20
|
+
The owner explicitly requested publication and website deployment after reviewing
|
|
21
|
+
the repaired watch/fetch motion and restoring the original braking return as an
|
|
22
|
+
option. The publication gate is approved for this0.0.10 scope. The earlier hold
|
|
23
|
+
and old local candidate tarballs are superseded; build and verify a fresh exact
|
|
24
|
+
artifact before upload. This authorization does not cover rejected art/motion.
|
|
25
|
+
|
|
26
|
+
Current target: `@bitefoundry/retrieviewer@0.0.10`, public `latest`. The owner
|
|
27
|
+
explicitly requested npm publication and website deployment on2026-10-23.
|
|
28
|
+
Spatial autonomy no longer returns home after every outing; napping uses side
|
|
29
|
+
nooks, with occasional check-ins and ball returns kept. Existing calibrated
|
|
30
|
+
travel, English desktop UI and MIT/CC BY-SA4.0 licenses remain. Allocation
|
|
31
|
+
work uses flat Braille row joins, exact lazy integer minification tables and
|
|
32
|
+
Node DEFLATE level3. See PUPPY-MEMORY.md for measured memory/startup tradeoffs.
|
|
33
|
+
Watch art replaces36 frames. The stationary six-key stumble and v4 lateral
|
|
34
|
+
overshoot/reChase choreography were rejected. The37-key v5 comfort family is now
|
|
35
|
+
integrated (original13 +12 standing pickup +12 rear stumble); source/preparation
|
|
36
|
+
records are in dist/stumble-runtime-v3. Its entry-speed/stride/catch physics end
|
|
37
|
+
at the ball on one depth pursuit. No lateral detour or extra recovery hop. The
|
|
38
|
+
same default assets now include eight added carry-trot/gather keys (45-key comfort
|
|
39
|
+
family) with exact old37-frame preservation. Impact timing is .65s. Fetch returns
|
|
40
|
+
retain the original braking approach alongside trot and run-then-trot. The new
|
|
41
|
+
`returnStyle` option selects auto or one fixed style; auto mixes all three without
|
|
42
|
+
adjacent repeats. `setReturnStyle()` applies to the next throw. Desktop accepts
|
|
43
|
+
`--return-style`, reports its choice, and never restarts a running companion to
|
|
44
|
+
change it. No new artwork or extra raster buffer for restoring the old option.
|
|
45
|
+
Four style-specific seeded replays and fresh native checks pass; see
|
|
46
|
+
WATCH-REDRAW.md for current verification and additional pixel payloads.
|
|
47
|
+
No new runtime dependencies, processes or timers. Preserve0.0.9 and
|
|
48
|
+
earlier registry bytes; publish only the exact tested0.0.10 tarball.
|
|
11
49
|
Historical scope below is not current verification.
|
|
12
50
|
|
|
13
51
|
Target: `@bitefoundry/retrieviewer@0.0.4`, public npm registry, `latest` tag.
|
package/WATCH-REDRAW.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Watch/fetch artwork review for0.0.10
|
|
2
|
+
|
|
3
|
+
The owner accepted the second whole-body watch candidate and new momentum
|
|
4
|
+
drawings, then reviewed v6 and requested retaining the original braking return
|
|
5
|
+
alongside the new trot choices. The subsequent explicit request to publish and
|
|
6
|
+
update the website authorizes this0.0.10 candidate. Earlier holds and rejected
|
|
7
|
+
motion candidates below are historical, not the current publication policy.
|
|
8
|
+
|
|
9
|
+
## Watch candidates
|
|
10
|
+
|
|
11
|
+
The0.0.9 row-dependent torso-envelope warp can satisfy width/area/paw tests while
|
|
12
|
+
still looking lens-distorted. Numerical bounds are not a human visual approval.
|
|
13
|
+
A first redraw experiment used a fixed torso and an authored head/neck layer;
|
|
14
|
+
the owner rejected the disconnected upper/lower motion. Do not publish that rig.
|
|
15
|
+
|
|
16
|
+
The second candidate uses newly authored **whole-body** keys. Head yaw is coupled
|
|
17
|
+
to shoulder/chest/foreleg weight transfer in the drawing. Preparation applies one
|
|
18
|
+
common uniform scale and whole-frame floor translation. No collar matte,
|
|
19
|
+
anatomical masks, per-row scaling, optical flow or runtime body deformation.
|
|
20
|
+
The owner accepted this candidate after rejecting the disconnected first study.
|
|
21
|
+
Existing seated endpoints are exact; the same36 logical watch frames replace the
|
|
22
|
+
old ones. Whole adjacent pose keys are sampled at the existing cadence.
|
|
23
|
+
|
|
24
|
+
Built-in imagegen inputs were the existing approved seated puppy and the first
|
|
25
|
+
generated study, never a newly downloaded photo. The final prompt asked for a
|
|
26
|
+
5×3 grid of15 full-body yaw keys, a fixed camera and body mass, a connected neck
|
|
27
|
+
and shoulders, planted paws and subtle foreleg weight transfer. Source and full
|
|
28
|
+
preparation records remain locally in `dist/watch-redraw-v2/`; the source PNG's
|
|
29
|
+
SHA-256 is in its candidate.json. The first draft is retained separately for
|
|
30
|
+
comparison, not composited into the second candidate.
|
|
31
|
+
|
|
32
|
+
## Current fetch motion: brisk single pursuit and carry-trot
|
|
33
|
+
|
|
34
|
+
The owner found v5 more natural but asked for a more dynamic impact and a small
|
|
35
|
+
trotting return instead of repeated braking. V6 preserves every one of its37
|
|
36
|
+
art samples. Impact timing changes from .82s to .65s: fore-brace .19s, residual
|
|
37
|
+
catch .29s, recovery .17s. The physical entry solver uses the same new durations
|
|
38
|
+
and residual-speed ratio .24; the source extremes are not spatially warped.
|
|
39
|
+
|
|
40
|
+
Eight added keys provide four distinct diagonal trotting phases and four small
|
|
41
|
+
gathering poses. Repeated source-study poses are omitted. The final key is the
|
|
42
|
+
exact existing arrival-seat frame0, not a new approximation of the sit handoff.
|
|
43
|
+
Gait phase uses traveled distance / fitted trot stride; cadence never exceeds
|
|
44
|
+
the calibrated trot frequency. Visible forepaw support proxies use the existing
|
|
45
|
+
ground lock and separate swing/support strips. The head/body are not warped.
|
|
46
|
+
Mouth anchors are per-key in the same registered source coordinates.
|
|
47
|
+
|
|
48
|
+
The owner requested retaining the old braking return as a selectable alternative,
|
|
49
|
+
not replacing it. An independent return-choice stream now mixes brake, trot and
|
|
50
|
+
run-then-trot without adjacent repeats. `returnStyle` fixes one style or selects
|
|
51
|
+
auto; the public setter affects the next throw only. Desktop startup accepts
|
|
52
|
+
`--return-style`; an already-running companion is not silently restarted or
|
|
53
|
+
changed. It does not consume the fetch-pattern or ordinary autonomy RNG. The two
|
|
54
|
+
new return types use small gathering steps: the last gathering keys move through at
|
|
55
|
+
most8.8cm and finish at zero velocity before the shared sitting source. Existing
|
|
56
|
+
non-fetch approaches are unchanged. Source/prompt: `dist/carry-trot-v1/NOTES.md`;
|
|
57
|
+
preparation: `tools/prepare-carry-trot.*`, from the hash-checked v5 stage. Raw study
|
|
58
|
+
is not shipped. Additional gzip81,084bytes; portable retained pixel increment
|
|
59
|
+
259,057bytes versus v5; Node retained compressed pixels +90,697bytes in the same
|
|
60
|
+
default-loader comparison. These are pixel payloads, not a promise about RSS.
|
|
61
|
+
|
|
62
|
+
`puppy-carry-trot.test.mjs` covers distance/speed continuity, short and200m paths,
|
|
63
|
+
cyclic support/phase, controller return variety, exact sit handoff, mouth anchor,
|
|
64
|
+
old37-frame digest, bounded retention and disposal. Full suite:167 passed, two
|
|
65
|
+
live-macOS checks skipped on Windows, zero failures. Native Windows owned-window
|
|
66
|
+
overlay check passed and both owned worker/painter processes exited. Aside
|
|
67
|
+
screenshots checked impact and new carry poses. The owner subsequently requested
|
|
68
|
+
publication; numerical tests alone did not supply that authorization.
|
|
69
|
+
|
|
70
|
+
### Preserved v5 basis
|
|
71
|
+
|
|
72
|
+
The owner rejected v4's lateral routing even after timing improved: it still
|
|
73
|
+
made a shallow detour, ran sideways, overshot the ball, reversed, and chased again.
|
|
74
|
+
Do not reinstate that choreography or its rejected side-on stumble art.
|
|
75
|
+
|
|
76
|
+
The v5 comfort family now replaces only the new stumble portion. It preserves
|
|
77
|
+
the13 original tug/sleep frames and12 standing pickup frames exactly. Twelve
|
|
78
|
+
rear stumble samples include four direct registrations from the owner's approved
|
|
79
|
+
rear-quarter original study; intermediate poses were generated with built-in
|
|
80
|
+
imagegen using those originals and existing rear endpoints only. The first/last
|
|
81
|
+
keys are exact existing run/rear-stand sources. One common scale per authored
|
|
82
|
+
batch, whole-frame registration, no body compositing or nonlinear warp.
|
|
83
|
+
|
|
84
|
+
`planPaperStumble` solves entry arc length, speed and stride together. The dog
|
|
85
|
+
enters the authored contact phase with positive velocity, brakes to a residual
|
|
86
|
+
speed, then decelerates to rest through its catch step at the pickup root. No
|
|
87
|
+
stop/relaunch between bracing and catching. The single depth pursuit never uses
|
|
88
|
+
an x-axis showcase detour or second reChase. The dog picks up facing away before
|
|
89
|
+
its normal unarmed return. Camera/projection and other fetch patterns are retained.
|
|
90
|
+
|
|
91
|
+
Source and exact generation prompt: `dist/stumble-runtime-v3/NOTES.md`.
|
|
92
|
+
Runtime metadata carries source hashes and transforms. The generator pins the
|
|
93
|
+
unmodified comfort prefix to commit9fc9628 so --apply remains reproducible after
|
|
94
|
+
integration. `node tools/check-fetch.mjs --default` verifies actual default assets
|
|
95
|
+
and all four seeded patterns; `puppy-stumble-path.test.mjs` freezes original13-key
|
|
96
|
+
pixels, shared endpoints, byte budgets, velocity/phase/arrival and no detour.
|
|
97
|
+
|
|
98
|
+
Measured additions over the original13-key family: gzip246,820bytes, portable
|
|
99
|
+
retained pixels702,249bytes, Node compressed pixels277,204bytes. No additional
|
|
100
|
+
runtime dependency/process/timer or raster buffer; these are not desktop RSS.
|
|
101
|
+
This does not substitute numerical tests for the owner's animation review.
|
|
102
|
+
|
|
103
|
+
## Superseded fetch candidates (history, not current motion)
|
|
104
|
+
|
|
105
|
+
Clean fetch, rolling chase, a missed landing followed by re-chase, and a rare
|
|
106
|
+
shallow-side overrun use separate seeded choices with no immediate repetition.
|
|
107
|
+
The tumble is asset-gated and separated by at least four throws. Ball ground
|
|
108
|
+
travel reuses the existing analytic travel planner with constant deceleration;
|
|
109
|
+
stripe rotation follows traveled distance / radius. A dropped ball rolls a short
|
|
110
|
+
distance before settling. Accepted interactions retain the prompt chase response.
|
|
111
|
+
|
|
112
|
+
The owner rejected the first fetch timing replay as sluggish. Urgent preparation
|
|
113
|
+
now covers each fetch leg and pickup/drop facing/sitting, not just the initial
|
|
114
|
+
launch. A deferred belly/trick finishes its recovery at the urgent cadence. Root
|
|
115
|
+
travel, physical speed and distance-driven strides are unchanged; urgency resets
|
|
116
|
+
at idle so ordinary watching does not inherit fast timing. Pickup/drop source
|
|
117
|
+
clips take0.65s each. The updated four-pattern replay remains under visual review.
|
|
118
|
+
|
|
119
|
+
The stationary six-key stumble candidate in `dist/scramble-art-v1/` was rejected
|
|
120
|
+
as awkward and is excluded from the current preview. The owner also rejected
|
|
121
|
+
turning front/seated before picking up a ball that was reached facing away.
|
|
122
|
+
|
|
123
|
+
The new **staged v4** candidate is in `dist/fetch-art-v2/`. It has12 authored
|
|
124
|
+
whole-body stumble breakdowns and6 keys each for standing rear/side pickups,
|
|
125
|
+
plus the original13 tug/sleep frames preserved byte-exact. The first stumble
|
|
126
|
+
key is EXACTLY the old run pair5/blend0 forepaw-contact frame; the last is the
|
|
127
|
+
old standing frame. Runtime hands off at that actual stride phase while speed
|
|
128
|
+
is positive, carrying the same root velocity into analytic braking. The existing
|
|
129
|
+
camera never turns. A short recovery bound advances6cm and rises2.5cm in world
|
|
130
|
+
space; the same pinhole projection handles its height/depth/scale. There is no
|
|
131
|
+
stationary idle/settle between running and stumbling. The direction/flip remains
|
|
132
|
+
unchanged through the impact and recovery.
|
|
133
|
+
|
|
134
|
+
Rear and side pickups keep their approach heading and standing root, lower the
|
|
135
|
+
connected head/neck/shoulders, and only turn AFTER pickup. The root stops17cm
|
|
136
|
+
short of the ball rather than over it. The rear muzzle/ball is occluded behind
|
|
137
|
+
the body; the visible side pickup uses authored mouth locations, not screen-center
|
|
138
|
+
coordinates. Legacy clips remain a fallback when optional new art is absent.
|
|
139
|
+
|
|
140
|
+
Key poses and momentum/spacing/overlap were chosen before breakdowns, following
|
|
141
|
+
[Microsoft's character-animation principles](https://learn.microsoft.com/en-us/windows/win32/lwef/animation-principles)
|
|
142
|
+
and the [Blender keyframe/breakdown distinction](https://docs.blender.org/manual/en/2.90/animation/keyframes/introduction.html).
|
|
143
|
+
This is not a claim that extra pictures or mathematical checks guarantee appealing
|
|
144
|
+
motion. The complete replay still needs the owner's visual acceptance.
|
|
145
|
+
|
|
146
|
+
The built-in imagegen inputs were only existing approved run/standing/rear frames,
|
|
147
|
+
not new photos/video. Exact prompt text, source PNGs, registered keys and candidate
|
|
148
|
+
metadata remain in `dist/fetch-art-v2/`. No optical flow/model/runtime warp,
|
|
149
|
+
expanded tween film, extra raster scratch, archive family, dependency, timer or
|
|
150
|
+
process. Relative to the current13-frame family, measured additions are252,774
|
|
151
|
+
gzip bytes,766,040 portable retained pixel bytes and286,718 Node compressed crop
|
|
152
|
+
bytes. These are NOT measurements of whole-desktop RSS. See
|
|
153
|
+
`dist/fetch-qa/receipt.json` for the actual-engine four-pattern verification.
|
|
154
|
+
|
|
155
|
+
Terms for accepted
|
|
156
|
+
derivatives remain CC BY-SA4.0 with the existing attribution chain; generated
|
|
157
|
+
source sheets are not included in npm. Update provenance and integration tests
|
|
158
|
+
after accepting candidates; the pending package tarball is obsolete.
|
|
159
|
+
|
|
160
|
+
## Local review
|
|
161
|
+
|
|
162
|
+
Local follow-up (2026-10-24): source-key selection replaces the pixel crossfade
|
|
163
|
+
in `prepare-watch-redraw.py`. All15 registered whole-body keys, common scale,
|
|
164
|
+
ground registration,36 logical samples and canonical seat endpoints remain.
|
|
165
|
+
Each sample is now one exact authored key; outward/return paths reuse the same
|
|
166
|
+
bytes instead of drawing two semi-transparent muzzles/shoulders. No new image,
|
|
167
|
+
geometry warp or runtime blend is introduced. Non-watch decoded pixels remain
|
|
168
|
+
byte-exact. The behavior archive drops from1,286,465 to1,270,759 gzip bytes.
|
|
169
|
+
`dist/watch-no-ghost-v1/` preserves the candidate and source-key receipt;
|
|
170
|
+
`git show HEAD:puppy-paper-behaviors-q5.bin.gz` remains the immutable release A/B.
|
|
171
|
+
Automated checks do not replace final owner approval of the new held-key cadence.
|
|
172
|
+
|
|
173
|
+
- `node tools/prepare-watch-redraw.mjs` writes a candidate, not shipped assets.
|
|
174
|
+
- `node tools/check-watch-redraw.mjs` makes a same-state old/new text replay.
|
|
175
|
+
- `node tools/prepare-scramble-art.mjs` writes a candidate, not shipped assets.
|
|
176
|
+
- `node tools/prepare-fetch-art.mjs` prepares the current pose-first candidate.
|
|
177
|
+
- `node tools/prepare-stumble-v3.mjs --apply` builds/integrates the current v5
|
|
178
|
+
momentum family; old v4 tooling/material above is historical.
|
|
179
|
+
- `node tools/check-fetch.mjs` collects four real seeded fetches, without a
|
|
180
|
+
runtime pattern-forcing/debug API.
|
|
181
|
+
- `node tools/preview-site.mjs` serves the existing site-dist locally. Review
|
|
182
|
+
watch-redraw-preview.html and
|
|
183
|
+
fetch-preview.html?data=fetch-preview.json&pattern=tumble.
|
|
184
|
+
|
|
185
|
+
The local replay uses plain text frames; it does not run another pet core in the
|
|
186
|
+
browser. Native live user windows and the already installed pet remain untouched.
|
package/braille.mjs
CHANGED
|
@@ -31,8 +31,10 @@ function stableBraille(rgba,width,height,brightness,contrast){
|
|
|
31
31
|
n=Math.imul(n^(n>>>16),0x45d9f3b);n=Math.imul(n^(n>>>16),0x45d9f3b);n=(n^(n>>>16))>>>0;
|
|
32
32
|
if(value>(n+.5)/4294967296){masks[(y>>2)*columns+(x>>1)]|=BRAILLE_BITS[y&3][x&1];dots++;}
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// Reuse one row of glyph references. Per-cell string concatenation retained
|
|
35
|
+
// thousands of rope nodes until the final join on large desktop grids.
|
|
36
|
+
const lines=new Array(rows),cells=new Array(columns);
|
|
37
|
+
for(let y=0;y<rows;y++){for(let x=0;x<columns;x++)cells[x]=GLYPHS[masks[y*columns+x]];lines[y]=cells.join('');}
|
|
36
38
|
return{text:lines.join('\n'),columns,rows,dots};
|
|
37
39
|
}
|
|
38
40
|
export function rgbaToBraille(rgba,width,height,{brightness=1,contrast=1,method='floyd'}={}){
|
|
@@ -94,13 +94,14 @@ export async function desktopHelper(options={}){
|
|
|
94
94
|
}
|
|
95
95
|
export async function startDesktop(options={}){
|
|
96
96
|
const ink=options.ink??'cream';if(!['cream','gold','dark'].includes(ink))throw Error('Invalid desktop ink');
|
|
97
|
+
const returnStyle=options.returnStyle??'auto';if(!['auto','brake','trot','run-trot'].includes(returnStyle))throw Error('Invalid return style');
|
|
97
98
|
// Fail before creating any cache/session on unsupported desktops (e.g. Wayland).
|
|
98
99
|
desktopPlatform(options);
|
|
99
|
-
const status=await desktopStatus(options);if(status.running)return {...status,alreadyRunning:true};
|
|
100
|
+
const status=await desktopStatus(options);if(status.running)return {...status,alreadyRunning:true,...status.returnStyle!==returnStyle?{requestedReturnStyle:returnStyle,restartRequired:true}:{}};
|
|
100
101
|
if(status.stale)await stopDesktop(options);
|
|
101
102
|
const helper=await desktopHelper(options);
|
|
102
103
|
return new Promise((resolve,reject)=>{
|
|
103
|
-
const child=spawn(process.execPath,[fileURLToPath(new URL('./worker.mjs',import.meta.url)),'--helper-spec',JSON.stringify(helper)],{detached:true,windowsHide:true,stdio:['ignore','ignore','ignore','ipc'],env:{...process.env,RETRIEVIEWER_HOME:getConfigPaths(options).root,RETRIEVIEWER_INK:ink}});
|
|
104
|
+
const child=spawn(process.execPath,[fileURLToPath(new URL('./worker.mjs',import.meta.url)),'--helper-spec',JSON.stringify(helper)],{detached:true,windowsHide:true,stdio:['ignore','ignore','ignore','ipc'],env:{...process.env,RETRIEVIEWER_HOME:getConfigPaths(options).root,RETRIEVIEWER_INK:ink,RETRIEVIEWER_RETURN_STYLE:returnStyle}});
|
|
104
105
|
let settled=false;const finish=(error,message)=>{if(settled)return;settled=true;clearTimeout(timer);if(child.connected)child.disconnect();child.unref();error?reject(error):resolve(message);};
|
|
105
106
|
const timer=setTimeout(()=>{if(child.connected)child.send({command:'abort'});finish(Error('Desktop startup timed out; no agent settings changed'));},20000);
|
|
106
107
|
child.on('error',error=>finish(error));child.on('message',message=>message.error?finish(Error(message.error)):finish(null,message));child.on('exit',code=>finish(Error('Desktop exited during startup ('+code+')')));
|
|
@@ -30,13 +30,16 @@ export function createFramePump({pet,send,now=()=>performance.now()}){
|
|
|
30
30
|
alive();if(inFlight||!viewport||paused)return false;
|
|
31
31
|
const t=now(),dt=last===null?0:Math.max(0,(t-last)/1000);last=t;
|
|
32
32
|
pet.step(dt);if(t<nextPaint)return false;
|
|
33
|
+
// Do this BEFORE rasterization/Braille conversion. Older embedders without
|
|
34
|
+
// the optional hint retain the original byte-comparison fallback below.
|
|
35
|
+
if(lastFrame&&pet.needsFrame?.(viewport)===false)return false;
|
|
33
36
|
const source=pet.frame(viewport),frame=cropFrame(source,revision);
|
|
34
37
|
nextPaint=source.state?.state==='sleep'?t+200:0;
|
|
35
38
|
// A held seat/down pose can be byte-identical for seconds. Advance the life
|
|
36
39
|
// clock normally but avoid JSON, IPC, bitmap allocation and native repaint.
|
|
37
40
|
if(lastFrame&&frame.x===lastFrame.x&&frame.y===lastFrame.y&&frame.columns===lastFrame.columns&&frame.rows===lastFrame.rows&&frame.text===lastFrame.text)return false;
|
|
38
41
|
inFlight=true;
|
|
39
|
-
try{send(frame);lastFrame=frame;}catch(error){inFlight=false;throw error;}return true;
|
|
42
|
+
try{send(frame);lastFrame=frame;}catch(error){inFlight=false;lastFrame=null;nextPaint=0;throw error;}return true;
|
|
40
43
|
},
|
|
41
44
|
interact(kind){alive();if(!['ball','treat','tug'].includes(kind))throw Error('Invalid overlay interaction');const accepted=pet.interact(kind);if(accepted){lastFrame=null;nextPaint=0;}return accepted;},
|
|
42
45
|
get hidden(){return !viewport||paused;},
|
|
@@ -10,6 +10,7 @@ import {controlAddress,parseHelperSpec} from '../desktop/platform.mjs';
|
|
|
10
10
|
|
|
11
11
|
let helper,pump,timer,server,session,paths,owned=false,stopping=false,frames=0,paintedFrames=0,visible=false,selected=false,pickerVisible=false,pendingViewport=null,lastInteraction=null;
|
|
12
12
|
let nativeError=null;
|
|
13
|
+
const returnStyle=process.env.RETRIEVIEWER_RETURN_STYLE??'auto';
|
|
13
14
|
let nativeStderr='';
|
|
14
15
|
const sendParent=message=>{if(process.connected)process.send(message);};
|
|
15
16
|
async function stop(){
|
|
@@ -33,7 +34,7 @@ try{
|
|
|
33
34
|
body+=bytes.toString('utf8');if(body.length>2048)return socket.destroy();if(!body.includes('\n'))return;
|
|
34
35
|
let command;try{command=JSON.parse(body.split('\n')[0]);}catch{return socket.destroy();}
|
|
35
36
|
if(command.token!==session.token||!['status','stop'].includes(command.command))return socket.destroy();
|
|
36
|
-
socket.end(JSON.stringify(command.command==='stop'?{stopped:true}:{running:true,reachable:true,selected,visible,pickerVisible,frames,paintedFrames,lastInteraction,pid:process.pid,painterPid:helper?.pid,rssBytes:process.memoryUsage().rss})+'\n');
|
|
37
|
+
socket.end(JSON.stringify(command.command==='stop'?{stopped:true}:{running:true,reachable:true,selected,visible,pickerVisible,frames,paintedFrames,lastInteraction,returnStyle,pid:process.pid,painterPid:helper?.pid,rssBytes:process.memoryUsage().rss})+'\n');
|
|
37
38
|
if(command.command==='stop')stop();
|
|
38
39
|
});
|
|
39
40
|
});
|
|
@@ -48,7 +49,7 @@ try{
|
|
|
48
49
|
reader.on('line',line=>{
|
|
49
50
|
if(line.length>100000)return stop();let m;try{m=JSON.parse(line);}catch{return stop();}
|
|
50
51
|
try{
|
|
51
|
-
if(m.type==='ready'){pickerVisible=m.pickerVisible===true;sendParent({running:true,windowPicker:pickerVisible,mode:spec.mode,pid:process.pid});}
|
|
52
|
+
if(m.type==='ready'){pickerVisible=m.pickerVisible===true;sendParent({running:true,windowPicker:pickerVisible,mode:spec.mode,returnStyle,pid:process.pid});}
|
|
52
53
|
else if(m.type==='error'){nativeError=String(m.message??'Desktop painter failed');sendParent({error:nativeError});stop();}
|
|
53
54
|
else if(m.type==='picker')pickerVisible=m.visible===true;
|
|
54
55
|
else if(m.type==='viewport'){pendingViewport=m;visible=m.visible;selected=m.selected===true;pump?.viewport(m);}
|
|
@@ -58,7 +59,7 @@ try{
|
|
|
58
59
|
else if(m.type==='quit')stop();
|
|
59
60
|
}catch(error){write({type:'error',message:error.message});stop();}
|
|
60
61
|
});
|
|
61
|
-
const {createPet}=await import('../../retrieviewer.mjs');const pet=await createPet();
|
|
62
|
+
const {createPet}=await import('../../retrieviewer.mjs');const pet=await createPet({returnStyle});
|
|
62
63
|
if(stopping)pet.dispose();else{
|
|
63
64
|
pump=createFramePump({pet,send:write});if(pendingViewport)pump.viewport(pendingViewport);
|
|
64
65
|
write({type:'loaded',ink:process.env.RETRIEVIEWER_INK??'cream'});timer=setInterval(()=>{try{pump.tick();}catch(error){write({type:'error',message:error.message});stop();}},1000/spec.fps);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitefoundry/retrieviewer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "A fluffy Braille desktop pet for Windows and Linux X11, with experimental macOS support and an embeddable TUI engine.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://bitefoundry.github.io/retrieviewer/",
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"PUPPY-MEMORY.md",
|
|
90
90
|
"PUPPY-Q5-COMPARISON.md",
|
|
91
91
|
"COMFORT-ART.md",
|
|
92
|
+
"WATCH-REDRAW.md",
|
|
92
93
|
"BUTTERFLY.md",
|
|
93
94
|
"examples/embed.mjs",
|
|
94
95
|
"examples/live.mjs",
|
|
@@ -109,6 +110,7 @@
|
|
|
109
110
|
"puppy-paper-trick-timing.mjs",
|
|
110
111
|
"puppy-paper-paw-transport.mjs",
|
|
111
112
|
"puppy-companion-life.mjs",
|
|
113
|
+
"puppy-companion-ball.mjs",
|
|
112
114
|
"puppy-companion-objects.mjs",
|
|
113
115
|
"puppy-companion-sprites.mjs",
|
|
114
116
|
"puppy-comfort-sprites.mjs",
|