Documentation
¶
Index ¶
- Variables
- func Execute(ctx context.Context) error
- type GlobalConfig
- type ResponsePrinter
- type SendBatchFunc
- type SendFunc
- type WaitConfig
- func (config WaitConfig) WaitForAlive(ctx context.Context, resolve instanceResolver) (*client.Instance, error)
- func (config WaitConfig) WaitForReady(ctx context.Context, resolve instanceResolver) (ready, hasErrors bool, waitErr error)
- func (config WaitConfig) WaitForState(ctx context.Context, resolve instanceResolver, targets ...string) error
Constants ¶
This section is empty.
Variables ¶
var ErrCommandFailed = errors.New("command failed")
ErrCommandFailed signals that a tool command returned success=false. The compact JSON error envelope has already been printed to stderr, so main() exits non-zero on this sentinel without printing a duplicate error line.
var Version = "dev"
Functions ¶
Types ¶
type GlobalConfig ¶ added in v0.1.0
type GlobalConfig struct {
Project string
Port int
Timeout time.Duration
Verbose bool
Quiet bool
Debug bool
CompactJSON bool
Narrate bool
AutoApprove bool
}
func (GlobalConfig) TimeoutMillis ¶ added in v0.1.0
func (config GlobalConfig) TimeoutMillis() int
func (GlobalConfig) Wait ¶ added in v0.1.0
func (config GlobalConfig) Wait(category string) WaitConfig
type ResponsePrinter ¶ added in v0.0.18
ResponsePrinter holds output-configuration state so that print logic can be tested without mutating package-level flag variables.
func (*ResponsePrinter) Print ¶ added in v0.0.18
func (rp *ResponsePrinter) Print(resp *client.CommandResponse, category string)
type SendBatchFunc ¶ added in v0.0.15
type SendBatchFunc func(ctx context.Context, inst *client.Instance, req client.BatchCommandRequest, timeoutMs int) (*client.BatchCommandResponse, error)
type SendFunc ¶ added in v0.0.15
type SendFunc func(command string, params interface{}) (*client.CommandResponse, error)
type WaitConfig ¶ added in v0.1.0
func (WaitConfig) WaitForAlive ¶ added in v0.1.0
func (config WaitConfig) WaitForAlive( ctx context.Context, resolve instanceResolver, ) (*client.Instance, error)
waitForAlive resolves the current target instance, then polls until a newer heartbeat appears. This keeps following the same project even if Unity rebinds to a new port during reload.
func (WaitConfig) WaitForReady ¶ added in v0.1.0
func (config WaitConfig) WaitForReady( ctx context.Context, resolve instanceResolver, ) (ready, hasErrors bool, waitErr error)
waitForReady polls indefinitely until the heartbeat state becomes "ready". Returns true if compilation had errors. waitForReady polls until the editor returns to Ready or timeoutMs elapses. It is bounded by the caller's --timeout (default 60s) rather than a hidden multi-minute cap, so a slow or stuck domain reload can't block the CLI long enough for a wrapping agent (e.g. Claude Code's 120s bash timeout) to background the process. ready=false means it timed out still compiling — distinct from a clean compile that produced errors (ready=true, hasErrors=true).
func (WaitConfig) WaitForState ¶ added in v0.1.0
func (config WaitConfig) WaitForState( ctx context.Context, resolve instanceResolver, targets ...string, ) error
waitForState polls the heartbeat until inst.State matches one of targets, or the deadline elapses. Used to confirm play/stop completion without holding the HTTP connection through the domain reload that play-mode entry triggers — the listener is stopped mid-response, so the only reliable confirmation channel is the filesystem heartbeat.
Source Files
¶
- asset_config.go
- batch.go
- build.go
- call.go
- call_approval.go
- call_input.go
- call_tty.go
- config.go
- deferred_delete_unix.go
- discovery.go
- dispatch.go
- doctor.go
- doctor_agent_rules.go
- editor.go
- editor_bootstrap.go
- editor_install.go
- editor_process.go
- editor_process_unix.go
- help.go
- install.go
- legacy_approval.go
- legacy_tool.go
- manage_packages.go
- mcp.go
- path_check.go
- paths.go
- root.go
- send.go
- status.go
- stdin.go
- task.go
- test.go
- uninstall.go
- uninstall_unix.go
- unity_docs.go
- update.go
- version_check.go