API reference
Supported state paths
| Path | Type | Description |
|---|---|---|
draft_input | string | Current composer text |
selected_skill_ids | string[] | Skills active in the current chat |
default_skill_ids | string[] | Skills auto-selected for new chats |
agent_mode_enabled | boolean | Whether Agent Mode is on |
selected_model_key | string | Key of the active model |
screen | string | Current screen ("chat" or "settings") |
state.get
Read the full public state object, or pass a path string to read a specific field:state.get() with no argument returns the entire public state snapshot as an object. Passing a path string returns only the value at that path.
state.patch
Write a single state path.patch is a convenience shorthand for a single-operation transaction:
state.transaction
Apply multiple state changes atomically. Operations are applied in array order:op: "set" when op is omitted. Pass op: "remove" to clear a path:
Transactions apply operations in order. They provide a common mutation API, not database-level rollback across unrelated Android repositories. If an individual operation fails, earlier operations in the same transaction are not reversed.