@homie-rocks/studio 0.48.1 → 0.48.3

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/CHANGELOG.md CHANGED
@@ -17,6 +17,28 @@ To bring a studio up to date, tell Claude: "Upgrade my studio to the newest Homi
17
17
  `npx -y @homie-rocks/studio@latest upgrade`, which shows what's new since the version your studio pins (from this
18
18
  file) and what the upgrade would change, and changes nothing until you agree.
19
19
 
20
+ ## [0.48.3] - 2026-10-13
21
+
22
+ **Plugin 0.48.3** · Restore rewind-based hits with input history.
23
+
24
+ Rules input history fits the wire without starving current aim and trigger controls.
25
+
26
+ ### Fixed
27
+
28
+ - **0.48.1 misjudged rewind-based hits.** Repeated input history and sub-tick
29
+ metadata could exceed the relay's 2 KB input limit, even with no latency or
30
+ loss. The server then kept stale aim and trigger state while the player's
31
+ predictor showed hits against the current aim. Input frames now fit that
32
+ existing byte limit, prioritizing current controls and missing receipts.
33
+ - Optional sub-tick metadata uses only the space left after complete input
34
+ values and their sequence numbers. Integrated held durations, reliable
35
+ pulses, measured round trips and the rewind cap keep their existing meaning.
36
+ Bounded history recovery, application receipts and correction blending remain.
37
+
38
+ ### Upgrade notes
39
+
40
+ - Existing games need no code changes.
41
+
20
42
  ## [0.48.1] - 2026-10-13
21
43
 
22
44
  **Plugin 0.48.1** · Input history under loss.
@@ -3027,6 +3027,48 @@
3027
3027
  }
3028
3028
  }
3029
3029
  }
3030
+ },
3031
+ "0.48.3": {
3032
+ "files": {
3033
+ "CLAUDE.md": "ddf2b2a0376202f6",
3034
+ "README.md": "684b3cca8001673c",
3035
+ "HANDOFF.md": "29337e2ace95b2e7",
3036
+ "games/README.md": "5ad32fe80c61f117",
3037
+ "music/README.md": "a3dc042dadd39df8",
3038
+ "videos/README.md": "16babc3437d5545b",
3039
+ "posts/README.md": "37841aae476bd540",
3040
+ "site/README.md": "732894273a32dc3f",
3041
+ "site/src/worker.mjs": "6cc5c6131eaf6fd0"
3042
+ },
3043
+ "sections": {
3044
+ "AGENTS.md": {
3045
+ "(intro)": "394cbbe934e80722",
3046
+ "## Version-matched authoring guides": "f6261a0e5801b96b",
3047
+ "## Layout": "f3a280b8c96cd068",
3048
+ "## Apps: one screen, roles and parts": "8596f2b25edda3e2",
3049
+ "## Commands (all through the pinned CLI in node_modules)": "5222e08ca55e326e",
3050
+ "## The site": "0cb8dd9a6f8a0096",
3051
+ "## Making games": "bb715272fd1a615b",
3052
+ "## The Game Codex and progress": "0738ef719cef3a4c",
3053
+ "## Art direction and models": "a48fff7bf0a5f2fc",
3054
+ "## Running live games (the back office)": "51ebf2ab756f6e4d",
3055
+ "## Servers and AI seats": "1ccfd549d2369a60",
3056
+ "## Selling things (the shop)": "9e020d69dd6a954e",
3057
+ "## Continuing a build from the Claude app": "0d68081e924ca419",
3058
+ "## Rules": "27881d11d3ff3803",
3059
+ "## Telling Homie": "80b46fdd9e578db8",
3060
+ "## Beta": "9d02638207a26e73"
3061
+ }
3062
+ },
3063
+ "named": {
3064
+ "Homie Arcade": {
3065
+ "sections": {
3066
+ "AGENTS.md": {
3067
+ "## Commands (all through the pinned CLI in node_modules)": "611b437f5b3303f0"
3068
+ }
3069
+ }
3070
+ }
3071
+ }
3030
3072
  }
3031
3073
  }
3032
3074
  }
@@ -2336,7 +2336,12 @@ A rules step keeps its `[tickOffset, ...fields, ...ownerClaim]` prefix. Current
2336
2336
  views append `[-471, sequence, changeCount, ...changes]`, where each change is
2337
2337
  `[fieldIndex, changeSequence, fractionOfTick, value]`. All components are numbers.
2338
2338
  Input frames repeat recent entries, sorted by tick; the retained window is
2339
- 4–64 ticks based on measured authority RTT and jitter. The host deduplicates
2339
+ 4–64 ticks based on measured authority RTT and jitter. Each frame also fits the
2340
+ existing 2 KB input cap: current controls first, then missing receipts, then
2341
+ acknowledged history. Optional sub-tick metadata uses the remaining bytes; the
2342
+ complete row retains its integrated held values and sequence even when the
2343
+ metadata is omitted. Retained entries not selected for this frame remain
2344
+ available for subsequent recovery frames. The host deduplicates
2340
2345
  entry sequences, including history received after a missing frame. Duplicate
2341
2346
  history is not a fresh lead observation. Frames without the trailer keep the
2342
2347
  legacy input semantics.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@homie-rocks/studio",
3
- "version": "0.48.1",
3
+ "version": "0.48.3",
4
4
  "description": "A studio for games, music and video on its own Cloudflare: scaffold, multiplayer starters on the netplay contract, a port toolkit that makes existing single-player web games multiplayer, the site Worker with public rooms (Table/Lobby Durable Objects and D1, all on the free Workers plan, no payment method), a site with the hub's sections (Home, Games, Music, Videos, Rooms, Posts with feeds) in the studio's own look, an epic landing page for every game, big songs and videos in the studio's own R2 once it has storage (uploaded, checked by SHA-256, served at the same addresses), deploy, and the homie.rocks directory.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
package/rules/view.ts CHANGED
@@ -6,7 +6,7 @@ import type { RayQueries, RayOptions } from './types.ts';
6
6
  import { snapshotDecoder } from './interest.mjs';
7
7
  import { collisionMap, collisionTargets, revisionAt, type CollisionRevision } from './live.ts';
8
8
  import { rulesOutput } from '../netplay/rules-output.mjs';
9
- import { rulesCaps, rulesRates } from '../worker/limits.mjs';
9
+ import { LIMITS, rulesCaps, rulesRates } from '../worker/limits.mjs';
10
10
  /*
11
11
  * view.ts — what a rules game's view imports: the room, as a browser sees it.
12
12
  * =============================================================================
@@ -608,7 +608,33 @@ export function openRoom<R = unknown>(opts: OpenRoomOptions = {}): Room<R> {
608
608
  const windowTicks = Math.min(64, Math.max(4, recoveryTicks, Math.ceil((2 * authorityRtt() + 250) / period + targetLead())));
609
609
  sentHistory = sentHistory.filter(e => e.t >= t - windowTicks).slice(-64);
610
610
  const first = Math.min(k, sentHistory[0]?.t ?? k);
611
- const rows: StepEntry[] = sentHistory.map((e) => [e.t - first, ...e.row]);
611
+ // Repeated history must fit the relay's existing byte cap, including its
612
+ // envelope and snapshot acknowledgement. Always carry the newest controls;
613
+ // spend the remaining space on missing receipts before acknowledged history.
614
+ // Sub-tick samples are optional metadata: the row already contains the held
615
+ // duration integrated by heldMean. Never truncate its values or sequence.
616
+ const budget = LIMITS.in - 128;
617
+ const selected = new Map<number, StepEntry>();
618
+ let bytes = 2;
619
+ const newest = sentHistory.at(-1);
620
+ const candidates = [...(newest ? [newest] : []),
621
+ ...sentHistory.filter(e => e !== newest && !applications.has(e.row[marker + 1])),
622
+ ...sentHistory.filter(e => e !== newest && applications.has(e.row[marker + 1])).reverse()];
623
+ for (const e of candidates) {
624
+ const row = [e.t - first, ...e.row.slice(0, marker + 2), 0];
625
+ const size = JSON.stringify(row).length + (selected.size ? 1 : 0);
626
+ if (bytes + size > budget) continue;
627
+ selected.set(e.t, row); bytes += size;
628
+ }
629
+ // Use spare bytes for sample metadata only after reserving control history.
630
+ for (const e of candidates) {
631
+ const compact = selected.get(e.t);
632
+ if (!compact) continue;
633
+ const row = [e.t - first, ...e.row];
634
+ const extra = JSON.stringify(row).length - JSON.stringify(compact).length;
635
+ if (bytes + extra <= budget) { selected.set(e.t, row); bytes += extra; }
636
+ }
637
+ const rows = [...selected].sort((a, b) => a[0] - b[0]).map(([, row]) => row);
612
638
  entries = [];
613
639
  if (net.steps(epoch, first, rows, mine.r)) lastSendAt = now;
614
640
  }
@@ -1,2 +1,2 @@
1
1
  // Generated by lib/build-identity.mjs; identifies the bundled runtime sources.
2
- export const STUDIO_BUILD = Object.freeze({"version":"0.48.1","sha256":"01670eff45e75c7fca0bee9df359442e097aa916cc837e2d8b772a452a105dea"});
2
+ export const STUDIO_BUILD = Object.freeze({"version":"0.48.3","sha256":"52a096d783a92de61024123ffd3ce7e3e73c2c805d2a7238d342d2fc77d3830d"});
@@ -1,2 +1,2 @@
1
1
  /** The @homie-rocks/studio version this Worker code is (package.json's; a test keeps them equal). Cache-busts /_homie/site.js. */
2
- export const STUDIO_VERSION_TAG = '0.48.1';
2
+ export const STUDIO_VERSION_TAG = '0.48.3';