Skip to content

feat: one delivery throne — intent, not focus - #76

Open
div0-space wants to merge 1 commit into
fix/engine-routingfrom
fix/delivery-route-throne
Open

feat: one delivery throne — intent, not focus#76
div0-space wants to merge 1 commit into
fix/engine-routingfrom
fix/delivery-route-throne

Conversation

@div0-space

Copy link
Copy Markdown
Member

Summary

Stacked on fix/engine-routing (the PR 74 tip). One axis only: where the transcript lands.

The stop path used to paste into whoever was frontmost. That is how tagged raw (<codescribe mode="raw">) landed in the Agent composer when Hold Fn fired with Codescribe focused. Destination is now a single function. Focus at stop is not an input.

User Impact

  • Assistive / overlay To Agent → Agent composer as a first-class message. Never Cmd+V.
  • Hold Fn / Globe + Agent (or any Codescribe chrome) focused → text stays on the Orient canvas (refuse_paste_into_self). No more tagged dump into chat.
  • Hold Fn + a foreign app latched at key-down → auto-paste still goes there, but only after restoring that latched target. If focus cannot be confirmed, clipboard copy only.

Runtime Impact

  • Recording, hotkeys, overlays, settings, or release packaging changed
  • Public docs, onboarding, install path, or metadata changed
  • No runtime behavior changed

Contract

docs/DELIVERY_ROUTE.md + resolve_delivery_route in app/controller/delivery_route.rs.

Telemetry (one INFO per stop / To Agent):

delivery_route: intent=orient_dictation route=orient_canvas reason=refuse_paste_into_self target=Codescribe

What this cut does not do

Mic lock, transcript adjudicator (Apple/Whisper/Final/Toggle), and agent-chain memory stay other thrones. Do not bundle them here.

Verification

  • rustc --edition 2024 --test app/controller/delivery_route.rs11 passed
  • cargo fmt --all / cargo clippy -- -D warnings / cargo test — not run on this host (no glib / not macOS). Operator box.
  • make verify — operator box

Live tell: Hold Fn with the Agent window focused. Overlay keeps the text. Chat does not grow a <codescribe mode="raw"> paste. Line in the log is reason=refuse_paste_into_self.

Release Notes

  • Yes, added
  • No, internal-only — stacks on the engine-routing line; do not ship without operator A/B on the refuse-self path.

Authored-By: grok agents@vetcoders.io

Copilot AI lite review requested due to automatic review settings August 15, 2026 07:51

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Code review skipped — your organization has reached its monthly code review spending cap.

An organization admin can view or raise the cap at claude.ai/admin-settings/claude-code. The cap resets at the start of the next billing period.

Once the cap resets or is raised, reopen this pull request to trigger a review.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR centralizes “where the transcript lands” into a single routing function so delivery is determined by session intent, not whichever app happens to be frontmost at stop time. It introduces a dedicated delivery-route module and updates stop-path delivery to restore and validate the latched target before any synthetic paste, preventing accidental raw-tag pastes into Codescribe UI surfaces.

Changes:

  • Add app/controller/delivery_route.rs defining DeliveryIntentDeliveryRoute resolution plus stable telemetry formatting.
  • Update the stop path in app/controller/mod.rs to consult resolve_delivery_route, log delivery_route: …, and only attempt paste after re-activating the latched target and passing overlay_paste_disposition preflight.
  • Document the destination contract in docs/DELIVERY_ROUTE.md and docs/HOTKEYS_CONTRACT.md, and broadcast the change on AGENT_BUS.md.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
docs/HOTKEYS_CONTRACT.md Documents the updated hotkey contract: intent selects destination; focus-at-stop is not an input.
docs/DELIVERY_ROUTE.md Introduces a destination-only “delivery route” contract and expected telemetry.
app/controller/mod.rs Wires stop-path delivery through resolve_delivery_route, restores latched target before paste, adds route telemetry.
app/controller/delivery_route.rs New single-source-of-truth routing module with intent/route enums and unit tests.
AGENT_BUS.md Records the “delivery route throne” signal to peers.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/controller/delivery_route.rs
Copilot AI review requested due to automatic review settings August 15, 2026 16:02
@div0-space
div0-space force-pushed the fix/delivery-route-throne branch from 9f91c3d to 68746cb Compare August 15, 2026 16:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Suppressed comments (2)

app/controller/mod.rs:4284

  • resolve_delivery_route will choose ClipboardPaste whenever auto_paste_enabled is true, even if there is no latched target (pre_overlay_frontmost_app is None). That contradicts the contract in docs/DELIVERY_ROUTE.md (“ClipboardPaste if auto‑paste + latched foreign app; else OrientCanvas”) and produces misleading telemetry like route=clipboard_paste … target=-, plus it unnecessarily enters the paste branch only to degrade to clipboard copy.
                auto_paste_enabled: config.auto_paste_enabled,

app/controller/mod.rs:4391

  • This log line starts with the delivery_route: prefix but does not follow the documented delivery_route: intent=… route=… reason=… target=… format, so grepping/parsing for delivery-route telemetry will pick up an extra, incompatible record. Consider removing the delivery_route: prefix (or emitting this as a different event name).
                    "delivery_route: synthetic paste refused; clipboard copy only"

Comment thread app/controller/mod.rs
Destination is a single function. The stop path no longer pastes into
whoever is frontmost, which is how tagged raw landed in the Agent composer.

- resolve_delivery_route is the only king on this axis
- Assistive / To Agent → AgentComposer (first-class message)
- Hold Fn + latched Codescribe → OrientCanvas (refuse_paste_into_self)
- Auto-paste activates the latched target and fail-closes to clipboard copy
- Telemetry: delivery_route: intent= route= reason= target=

Mic lock, transcript truth, and agent-chain memory stay other thrones.

Authored-By: grok <agents@vetcoders.io>
@div0-space
div0-space force-pushed the fix/delivery-route-throne branch from 68746cb to 90446f0 Compare August 19, 2026 10:01
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.

3 participants