Skip to main content

Verified Input

Keyboard event delivery is not the same as application acceptance. Verified input waits for observable application state before the next step proceeds.

The transaction

An action is posted at most once. Verification never retries the mutation. TIMEOUT, REFUSED, and ERROR return non-zero; MCP returns isError:true. Results expose focused identity plus value length and SHA-256, not typed text, focused values, selections, or clipboard contents.

Verify one action

--expect-app is a precondition that prevents a write into the wrong frontmost application. --verify, --expect-value, --wait-focus-change, --expect-role, and --expect-focus are postconditions.
Timing controls require a postcondition. The deadline begins after the writer returns, so slow per-character posting does not consume the app-acceptance window. Use timing to control observation load and deadline, not as a substitute for correctness.

Execute a multi-step plan

kernel-cli input reads a kernel.input.plan.v1 JSON document:
Supported actions are type, key, and paste. Type/key mode is synthetic or real; paste uses shortcut or menu. Focus can be constrained by app, role, subrole, identifier, developer id, or title. Weak or missing identity is inconclusive, never silently counted as a focus change. An empty string is a real value only when the platform exposes an available text/value channel. Every plan step is strict by default. allow_unverified:true is an explicit compatibility escape hatch for a step without a postcondition; its result is posted, never verified.

Replace sleeps with observable barriers

If a file chooser cannot expose the required focus or value, stop with an observer limitation. A screenshot match or a longer sleep is not equivalent to verified application state.

Clipboard and focus leases

Paste restores the original text clipboard only while the clipboard still contains Kernel CLI’s staged text. Cleanup runs after success, timeout, refusal, or post error. Rich non-text pasteboard formats are outside this first lease contract. Focus restoration follows the same ownership rule. It restores only while the transaction’s activated app still owns frontmost; newer user or application focus is preserved.

PID, profiles, and handoff

On macOS, type --pid and key --pid can prove event posting to a background process, but not bind the frontmost accessibility observer to that target. Strict postconditions with PID targeting are refused before posting. Linux and Windows refuse --pid rather than silently sending global input. Profiles can embed the same strict input step and required waits. Before an agent takes frontmost keyboard control, use --yield or the profile yield policy for human coordination. The handoff prompt coordinates ownership; the accessibility postcondition remains the correctness proof.

MCP and computer-use

  • MCP input accepts the complete plan under plan.
  • MCP type, type_text, paste, and key expose the same verification flags.
  • computer_use routes type, paste, and key through the same transaction and preserves the outcome under result.
  • Capability version 2 advertises verification.readback; paste and input also advertise clipboard read/write.

What VERIFIED does not mean

Sending, uploading, saving, and other domain actions require a separate observer owned by that domain. Never label an Enter key as “delivered” merely because the keyboard transaction verified.

Chat Exports

Analyze the artifact after an app-pack export completes.

Commands

See the complete 111-command surface.