Skip to content

chore: release v0.5.3 - #186

Merged
yhc509 merged 12 commits into
mainfrom
release/0.5.3
Aug 15, 2026
Merged

yhc509 merged 12 commits into
mainfrom
release/0.5.3

Conversation

@yhc509

@yhc509 yhc509 commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Release PR for v0.5.3.

⚠️ Do not merge until the GitHub Release is published

This release bumps the wire protocol (7 → 8). main is what the UPM git URL serves, so merging before the CLI binary is published would hand #main users a package speaking protocol 8 with no installed CLI that can answer it — PROTOCOL_MISMATCH with nothing to dispatch to. Publish first, merge second.

Contents

Added

  • Long-running commands (test, package, profile, record, qa run-sequence) keep the Editor ticking at full rate while in flight — measured ~1.5× faster end to end.
  • Component values accept JSON arrays: "m_Center": [1, 2, 3] alongside the member-object form.
  • Structured values that arrive quoted ("[1,2,3]") are parsed instead of rejected.
  • The bridge can be kept from starting entirely via UNITY_CLI_BRIDGE_DISABLE=1 or -noUnityCliBridge, for build machines.

Changed

  • screenshot defaults to a JPEG capped at 1024px wide instead of a full-resolution PNG.
  • Unity Recorder is no longer installed alongside the package; com.unity.test-framework is now declared outright.

Fixed

  • The package no longer compiles editor-side plumbing into player builds (~150 KB → ~7 KB).
  • An Editor whose IPC listener died is no longer advertised as reachable.
  • The IPC auth token is compared in fixed time.

Compatibility items for the release notes

  1. Unity Recorder — projects that record must now add com.unity.recorder themselves.
  2. screenshot defaults — scripts that assumed a full-resolution PNG need --format png --max-width 0.

Verification

dotnet test 1087 passed · DocGen --check clean · check-unity-meta.sh passes · CI green on macOS/Ubuntu/Windows.

🤖 Generated with Claude Code

yhc509 and others added 12 commits August 13, 2026 23:02
…alues

Agents routinely send a structured value as a JSON-encoded string —
"[1,2,3]" for a Vector3, "{\"m_Mass\":0.17}" for a nested object. Strict
token typing rejected those with an error that reads as though the value
itself were wrong, so the agent has no way to tell quoting from a bad
field.

ApplyToken — the single funnel for top-level, nested and array-element
values — now re-parses a string token when the target cannot hold a raw
string and the trimmed text opens a JSON object or array. The guard stays
narrow on purpose: asset paths, object-reference handles, enum names and
char values never start with '{' or '[', and a parse failure falls back to
the original token so the existing validation error survives.

The vector-family readers additionally accept a flat numeric array next to
the canonical member object, which is what makes "[1,2,3]" reach a Vector3
at all. Bounds/BoundsInt stay object-only — their nested center/size take
the array form instead of inventing a flat six-element convention.

Closes #176
Every deferred command — test runs, package operations, profiler sampling,
recording, qa run-sequence — advances one step per EditorApplication.update
tick, and an idle editor runs that loop at roughly 6 ticks/second. Forcing
the internal EditorApplication.SignalTick schedules the next tick
immediately.

Activation is automatic and scoped: deferred flows now subscribe their poll
through EditorTickPump.Add/Remove instead of EditorApplication.update, and
the pump runs only while at least one is subscribed. Because the subscriber
set holds the very delegates that are on EditorApplication.update, a pump
leak would be a poll leak — an invariant those flows already depend on —
and Remove is idempotent to match their defensive double-unsubscribes.
SignalTick is bound reflectively once; if it is gone the pump degrades to a
no-op with a single warning rather than taking commands down with it.

Measured on Unity 6000.3.10f1 / macOS with 60 update ticks: 9.4-10.4s
without the pump, 6.0-6.1s with it (~1.55x), the same focused or unfocused
— on that version focus barely changes the edit-mode update rate, so this
is a general speed-up rather than an unfocused-only fix. Interval 0 and 16
measure identically there, so the default keeps the 16ms (~60Hz) throttle
to cap the forced rate on setups whose loop can run faster.

Implements the auto-activation half of #173; the explicit wire command and
its protocol bump are not included.
… time

The accept loops had no retry of their own: the Unix loop ends permanently
on any unexpected AcceptAsync failure, and both loops give up if the very
first listener acquire fails. The registry heartbeat kept publishing the
instance regardless, so the CLI would resolve a live target and then fail
to connect to it, over and over.

BridgeHost now clears listener readiness when an accept loop ends and runs
ListenerWatchdogPolicy on every editor tick. The policy is Unity-free and
unit-tested: it skips while a bind is in flight or the editor is
compiling/updating (domain-reload teardown is not a fault), rebinds in
place up to 5 times at 5s intervals, and on exhaustion tells the host to
unregister so the instance stops advertising as reachable. Recovery
re-publishes the registry entry and token sidecar, deleting the previous
sidecar if the rebind settled on a different hash.

The auth check — the bridge's only authentication gate — moves off
string.Equals, whose length test and early exit are observable to other
local processes, onto a fixed-time compare. Hand-rolled rather than
CryptographicOperations.FixedTimeEquals so the shared protocol source keeps
compiling on both Unity's runtime profile and .NET 9. Accept/reject
behavior is unchanged.

Closes #174
Closes #175
CHANGELOG (both copies), CLAUDE.md architecture/conventions, README
conventions, and the operator skill in both its maintainer and shipped
copies.
fix(bridge): listener watchdog, fixed-time auth, agent value coercion, auto-tick
The package shipped one runtime assembly holding both the four QA marker
types a game references on purpose and the whole Runtime/Protocol tree —
registry file I/O, Process.Start for chmod, the full command catalog and
its help text. All of it compiled into player builds as unreachable code.

Protocol now carries its own Editor-only asmdef. It stays under Runtime/
because the CLI links the same sources, but CompilationPipeline confirms
the player set is down to the marker assembly alone (158 KB -> 7 KB).

Also:

- UNITY_CLI_BRIDGE_DISABLE / -noUnityCliBridge keeps BridgeBootstrap from
  constructing the host at all, for CI jobs that open the Editor only to
  produce a build. Verified live: no registry entry, no token sidecar, no
  socket. Parsing lives in Runtime/Protocol so it is unit-tested, and a
  source-ordering test pins the check ahead of `new BridgeHost()`.

- Unity Recorder becomes optional, gated on UNITY_CLI_BRIDGE_RECORDER via
  versionDefines. Unity drops a missing asmdef reference silently rather
  than erroring, so the reference stays and every Recorder API touch is
  guarded; `record start` degrades to an install hint while stop/status
  keep serving existing sidecars.

- Declare com.unity.test-framework. The test handlers use TestRunnerApi
  types unguarded and were relying on it arriving transitively through
  Recorder — dropping Recorder surfaced that as CS0246 in a project
  without it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
feat(bridge): keep editor plumbing out of player builds
The checklist pointed only at the maintainer skill, so drift in the copy
users actually install was invisible to the process — nothing in CI
compares the two. Name both, and state which parts must stay identical
(the references) versus which are a deliberate fork (SKILL.md).

Also restores the Test Runner Workflow pointer to the shipped SKILL.md:
it ships the reference file that section points at, so an installed agent
had the document but no signpost to it.

Closes #162

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A screenshot is the heaviest single response an agent can request: a
1920x1080 PNG bills at roughly 2,040 image tokens, against about 576 for
the same frame capped at 1024px. The lightweight options existed but were
opt-in, so the common caller paid full price for fidelity no vision model
can use.

`screenshot` now defaults to JPEG quality 75 capped at 1024px wide.
Three rules keep that from surprising anyone:

- an explicit `--format` always wins;
- with no `--format`, a `--path` ending in `.png` selects PNG — writing
  JPEG bytes into a file the caller named `.png` is a worse outcome than
  the tokens the default saves;
- an explicit `--width`/`--height` suppresses the cap. That gate predates
  this change, which is why sized captures do not silently shrink.

`--max-width 0` is the opt-out for the cap alone and travels as a -1 wire
sentinel, because `maxWidth == 0` already means "unspecified" and the wire
model cannot carry a nullable int.

ScreenshotDefaults lives in Runtime/Protocol so the CLI and the bridge
resolve the defaults from one place and the resolution is unit-tested;
resolving the cap once in Handle also collapses the ShouldApplyMaxWidth
gate that was repeated at each capture site.

Protocol 7 -> 8: the default output of an existing command changed and
maxWidth gained a sentinel, so a mismatched CLI should be routed to a
matching install rather than silently return different images.

Verified live against the sample project (Unity 6000.3.13f1, headless):
with the Game View at 3600x2110, an option-free capture returned
1024x600 jpg / 10 KB against 3600x2110 png / 104 KB before. Format
selection, the .png path rule, the explicit-size bypass and the negative
--max-width rejection all confirmed against a running editor.

Closes #127

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
docs: name the shipped skill copy in the doc-sync checklist
feat(screenshot)!: default to a 1024px JPEG for agent-facing captures
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@yhc509
yhc509 merged commit fd7675a into main Aug 15, 2026
6 checks passed
@yhc509
yhc509 deleted the release/0.5.3 branch August 15, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant