Repository navigation
Releases: niqibiao/unity-cli-skill
Release list
v2.4.0
Added
-
cs compile-set <zip|URL>andcs compile-set --skipanswer the editor's
one question about a running player: should code submitted to it be compiled
against the build it is actually running? By default, player builds export
CSharpConsoleCompileSet.zipbeside their output; Project Settings > C# Console
can disable export or override the path. Hand that file — a path or an
http(s) URL — tocs compile-set, or decide with--skipthat this build is
compiled for without alignment. Likecs exec --mode runtime,--ip/--port
name the player and the 15500-15509 range is probed when no--portis given;
the registration itself goes to the editor, which is what keeps the decision.The decision is stored per build GUID under the editor project's
Library/CSharpConsole/, so it is made once per build and shared by every
agent and client. It survives an editor restart and can be overwritten at any
time by registering or skipping again.A missing zip fails as a validation error (exit 1); a download failure, a zip
that cannot be read, and no player found to name fail as system errors (exit
3); a zip the editor itself rejects — wrong build, no build GUID inside, the
player unreachable from the editor — as a validation error (exit 1). An
editor whose package predates the endpoint answers 404, and the CLI says to
update the package.
Changed
-
Hierarchy responses now preserve deep trees and report
nodeCount,truncated,
andtruncationReasons(requested_depth,node_limit, ordepth_limit).
Responses are bounded to 5000 nodes and depth 128 for JSON client safety. Component type names
are namespace-qualified so inspection output can be reused astypeName.
The pinned contract fixture is updated to match package 2.4.0. -
Runtime debugging guidance permits supporting file evidence when execution is
unavailable or build contents need verification. File inspection does not
authorize registering a compile set or bypassing the alignment gate. -
Text
cs healthoutput now identifies the answering process and its build.
Failed runtime submissions include guidance for possible stripping, and an
exact command lookup in the wrong view names the view to query. -
Developer tests, routing evaluations, and fixtures now live under
dev/so
skill installation copies only the files needed at runtime. -
cs exec --mode runtimeagainst a player that reports its build is refused
until that build has a decision, with exit code 1 and a summary beginning
[REPL ALIGNMENT REQUIRED]. The CLI appends thecs compile-setcommand to
run — with this call's own--ip/--port— to both the text summary and the
--jsonenvelope. Ask the user for the zip or for an explicit decision to
skip; skipping is not the agent's call to make. Players must report a valid
build GUID; older players must be rebuilt with the matching package version. -
cs health --mode runtimereportsbuildGuid, the build the player came
from — the same valuecs compile-setregisters against. The editor never has
one, so the compact--jsonform omits the field when it is empty rather than
showing a blank. -
A package on another
major.minorline is now refused, not warned about.
The CLI and the package are released together, so a mismatched pair can
disagree about the wire without either side saying so — and the warning that
said as much only ever appeared incs setup, never on the path that actually
drives Unity. Every command that reaches Unity now fails with
Error: unity-cli X.Y.Z does not match package A.B.C(exit 1).cs setupand
cs statusstay usable, because they are how the mismatch is fixed and seen,
and commands that never reach Unity —cs doctor,cs wait-ready, offline
listings — are unaffected. The patch digit is not part of the line, and a
version that cannot be read is never treated as a mismatch. -
A result that merely mentions an exception is no longer a runtime error.
The service used to classify any response text containingexceptionas
runtime_error(exit 2), so an evaluation that returned such a word failed a
command that had in fact succeeded. Classification now matches only the
failure text the service writes itself, and those results exit 0. This is
included in package 2.4.0.
v2.3.2
Changed
exec-code.mdnow documents two Roslyn REPL statement-form pitfalls that
make otherwise-correct C# fail to compile in a rawcs execfallback.
Expression auto-return applies only to the final expression and only when it
has no trailing;— a trailing semicolon (or the same expression placed
mid-script) makes it a statement, and a member access, comparison, or ternary
in statement position isCS0201; drop the;or writereturn <expr>;.
Separately, top-level code is not inside a class instance, so members inherited
fromobjectare out of unqualified scope — callobject.Equals(a, b), not a
bareEquals(a, b)(a bare call isCS0103). Both were verified against the
live REPL.
v2.3.1
Added
-
cs logs [PATH]follows a log file on whichever process is being
addressed, printing new bytes as they are written. Without a path it follows
the target's ownconsoleLogPath; on Android and iOS, which write no log file
of their own, it says so and asks for the path the project logs to. Rotation
is detected — when the file becomes shorter than the read position, it
restarts from the beginning of the new file rather than silently skipping it.
--since-startreads from the beginning,--intervalsets the poll period,
and--waitbounds a foreground run so it cannot hang an agent that has no
Ctrl+C.It is built on the same download route as
cs pull, so it needs no editor:
watching a player on another machine is the case it exists for. -
cs logs --backgroundcollects into a file and prints its path, leaving
the terminal free. Other commands run against the same target meanwhile —
measured at the same failure rate as with no collection running. The detached
follower keeps going until the target it is watching goes away, so a player
that runs for hours is covered for all of them; a single dropped connection
is not mistaken for that, since the service drops one occasionally under
load.--stopends it early, and starting it twice for the same target hands
back the collection already running rather than starting a rival reader.
Fixed
-
healthwas resetting one call in five. Requires package 2.3.1. The
service wrote the health response without ever reading the request body the
client had sent, and Windows tears down a response closed over an unread body
with RST rather than FIN — so the answer was written and the caller saw a
dropped connection instead. Measured at 8 failures in 40 calls against a
player and 2 in 40 against an editor; 0 in 40 after the package drains the
body first.cs doctorandcs wait-readyprobe throughhealth, so both
carried the same odds of failing at random. Every other route reads its body
and was never affected. -
The runtime port probe caused the failures it was blamed for. It opened a
TCP connection to each candidate and closed it without sending a request,
which left the service cleaning up a half-started connection and reset the
request that followed — 4 failures in 30 calls, against none when the range
was not probed. Each candidate is now asked a real health question, which
also confirms that what answers is this service rather than an unrelated
process holding the port. The usual port is tried alone before fanning out,
because the service accepts and dispatches one request at a time and a
ten-way fan-out costs it more than it costs the client. Probing now measures
the same as not probing. Finding no player takes about a second longer.
v2.3.0
Fixed
--mode runtimenow addresses the player. It only ever affectedcs exec;
healthand every canonical command went to the editor regardless. So
cs health --mode runtimecalled a dead player healthy, and
cs command session/list --mode runtimelisted the editor's REPL sessions
rather than the onescs exec --mode runtimehad created in the player.
Commands whose contract does not require the editor now reach the player.
command/listandcommand/registry.snapshotdeliberately stay with the
editor, which owns registry authority; answering them from a player would
overwrite the project's cached contracts with its shorter list.- When no player answers on 15500-15509, commands that need one exit 3 and say
so instead of falling back to the editor. cs batch --mode runtimesent the whole batch to the editor whilecs command
reached the player, so the same command id answered from a different process
depending on how it was invoked — and a batch of mutations applied to the
editor. A batch is one roundtrip, socommand/listand
command/registry.snapshotcannot be split out of it and are refused there
instead; request them separately without--mode runtime.
Added
cs pullretrieves a file from whichever process is being addressed. A
relative path resolves against the target'spersistentDataPath— the form to
use against another machine, since Android and iOS give a user no absolute
path to hold. An absolute path names a file on the target and is used as
given. Every pull reports which rule applied. Large files are fetched as
successive ranges.references/player.mdcovers debugging a running player: what it answers,
why a device reports noconsoleLogPath, and how to record a profiler capture
on a device and open it at home.runtime/inforouting: the device, build, and well-known paths of whichever
process replies.
Changed
- The runtime port probe runs its ten candidates concurrently at 1s each rather
than one after another at 0.3s. Hosts that drop packets to closed ports made
the sequential form cost the full timeout per port, and the longer per-port
budget suits a player on another machine. - The package-owned registry grows to 62 (56 authoring + 6 control).
v2.2.0
Added
cs test— run Unity Test Framework tests (EditMode or PlayMode) through
the neweditor/test.run/editor/test.statuspackage commands, poll until
completion across play-mode transitions and domain reloads, and report
structured pass/fail results (exit 0 pass, 3 failures, 4 outcome unknown).
Requirescom.unity.test-frameworkin the consuming project; without it the
commands stay discoverable and return an explanatory error.- ScriptableObject authoring —
scriptableobject/create,scriptableobject/get,
andscriptableobject/modifypackage commands in theassetsdomain for
creating SO assets by type and reading/writing their serialized fields.
Changed
- The authoring surface grows to 56 commands (61 package-owned built-ins with
the 5 control-plane contracts); documented counts now match the registry. - READMEs state the trusted-LAN service model explicitly: the Unity-side
service binds all interfaces without authentication by design and must not
be exposed to untrusted networks.
v2.1.0
Added
cs doctor— read-only reliability diagnosis with structured findings
(project/package/version offline checks plus live service health), working
before the Unity package is installed.cs wait-ready— poll until the editor service is genuinely ready
(phase, compile/update flags, and the 2.1 main-thread heartbeat), with
--expect-operation/--min-generationto bind the wait to one refresh
operation and reject stale state from earlier generations.- Play-mode compile deferral detection — when a waited refresh is deferred
by the editor's Script Changes While Playing preference
(recompile_after_finished),cs refresh --waitandcs wait-readyfail
fast witheditor.play_mode_deferring_compileinstead of burning the
timeout, and instruct the agent to ask the user before exiting play mode.
Changed
cs refresh --waitreadiness now binds to the triggered operation — the
wait tracks the returned operation id and generation rather than the first
readyphase mirror, so a service-restart blip can no longer report ready
while the requested compile is still pending.references/refresh.mdno longer recommends--exit-playmodeby
default — plaincs refresh --waitis the first choice; exiting play mode
requires the user's approval because it discards runtime state.- CLI version moves to 2.1.0 to stay on the same compatibility line as the
Unity package's 2.1.0 health-field additions.
v2.0.8
Removed
cs completeand the/completionbridge — unity-cli no longer exposes the
interactive completion endpoint. Agent automation submits complete C# and had no
internal consumer for completion candidates; the Unity package may continue to
provide/completionfor its own interactive clients.
Changed
- Cross-agent repository guidance now has one source of truth —
AGENTS.md
contains the shared CLI, architecture, test, setup-safety, and release rules;
CLAUDE.mdimports it with@AGENTS.mdinstead of maintaining a drifting copy. - REPL behavior documentation synced with the Unity package —
references/exec-code.mdnow explains that only successfully compiledusing
directives persist, that ambiguous internal compatibility types can make one
submission fall back to standard C# accessibility, and how to respond to
[REPL NOTICE]/[REPL ACTION REQUIRED]. Those upstream behavior changes did
not alter endpoint paths or request/response contracts.
v2.0.7
Fixed
- Cross-call REPL context is now available on demand —
--session <id>is
forwarded throughcs.pyandcore_bridge.pyto the C# Console request UUID, so
dependentcs execcalls can intentionally share variables,usings, types, and
helpers. Omitting the option keeps the previous fresh-session default; unrelated
agents/tasks use different ids, and domain reload still clears all session state.
The skill now tells agents to opt in only for genuinely dependent calls instead of
claiming state is either always shared or never shareable. cs statustext mode now exits like the JSON branch — 0 only when the live
service is healthy; no project / package missing / service unreachable all exit 1
(previously the text branch returned 0 for everything but a missing project),
matching the new "text mode: exit code carries success" convention. When the
service is down, text mode now also prints the installed package version read
from disk (version: X.Y.Z (package on disk)) instead of omitting the version
line entirely.
Changed
--jsonis no longer blanket-required (docs only, CLI unchanged) — the skill now
asks for--jsononly on the four commands whose payload is emitted solely as
structured JSON (command,list-commands,batch,complete). All other
subcommands print an equivalent, cheaper text form and run without it;execadds
--jsononly when the structured envelope is needed. (cs setupnever had a JSON
branch — its documented--jsonwas silently ignored.)- C# code goes through
--file, never JSON-wrapped —SKILL.mdand
references/exec-code.mdnow make a raw.csfile the only documented way to pass
code tocs exec; the--input '{"code": …}'form (every quote/backslash/newline
JSON-escaped) is demoted to a stdin-piping edge case. Scratch.cs/req.json
files now have a mandatory location: the absolute path
<project-root>/Temp/CSharpConsole/AgentScratch/— inside Unity's ownTemp/
(never imported, auto-cleaned on editor close, write-sandbox-friendly for
workspace-bound agents, and colocated with the service's existing
Temp/CSharpConsole/state). Semantic file names, overwritten per task; one-shot
suffix only under known same-project concurrency. Never underAssets/(a typical
REPL snippet fails project compilation there — blocking refresh workflows and,
after an editor restart, potentially preventing the service from starting), and
never deleteTemp/CSharpConsole/itself. Decided in an adversarial CC↔Codex
review (local audit transcript:
cc-codex-discussion-history/20260722-213810-scratch-file-conventions.md, kept
untracked by repo policy), which replaced the earlier
<user-temp>/csharpconsole/<session>/draft: a user-temp root is not guaranteed
writable under workspace-bound agent sandboxes, and the session token was pure
bookkeeping. - First-time setup asks which source shape (
references/setup.md) — before writing
the manifest the agent now offers an explicit choice: pinned git URL (default,
team-friendly) vs. cloning the package to a user-chosen local path and installing via
--source file:<dir>(agent performs the clone; caveat documented that absolute
file:paths in the committed manifest are machine-specific).
v2.0.3
Fixed
core_bridgeretry survives the urllib core — the domain-reload retry wrapper
(_make_post_with_retry) caught onlyOSError, which the oldrequests-based core
satisfied (its exceptions subclassOSError) but the new stdlib-urllibcore does
not: it converts every transport failure — connection refused, timeout, non-2xx —
intoTransportError(Exception). The wrapper now also catches the core's
TransportError, falling back toOSError-only against a pre-TransportErrorcore,
restoring the retry-once behavior when the service briefly refuses connections during
a Unity domain reload. The CLI itself has norequestsusage or HTTP layer to change.
v2.0.2
Added
cs setuppins the git source to amajor.minor-matched tag — a plain git URL
(no#fragment) is written toPackages/manifest.jsonas…git#vX.Y.Z, resolved to
the newest upstream tag on the CLI'smajor.minorline, so the manifest records the
intended version instead of leaving only a commit hash inpackages-lock.json.file:
paths and URLs already carrying a#fragmentare written as-is; on a failed tag query
(offline) setup falls back to the unpinned URL with a warning.
Changed
- Consent before writing the manifest (
SKILL.md,references/setup.md) —cs setup
and--updatewrite the shared, version-controlledPackages/manifest.json; the docs
now require stating what will be written and getting the user's go-ahead first. The
read-only commands (cs status,cs health) never need consent.