Skip to content

Open source CapCut alternative.

TypeScript

Update user query docs

David Leeca60033124a
diff --git a/docs/architecture.md b/docs/architecture.md
index df3f4ddc..f3dfab3c 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -11,7 +11,7 @@ source of truth for behavior and boundaries remains
| Donkey.app |
| |
| +----------------------+ +----------------------+ +---------------+ |
-| | Pointer Prompt UI | | Runtime Setup UI | | Debug CLI | |
+| | User Query UI | | Runtime Setup UI | | Debug CLI | |
| | text/voice/assets | | install runtimes | | smoke tools | |
| +----------+-----------+ +----------+-----------+ +-------+-------+ |
| | | | |
@@ -53,7 +53,7 @@ memory, and per-task runtime coordination. Capture, observation, hosted model
adapters, task adaptation, and input execution stay behind narrow runtime
boundaries.
-## Pointer Prompt Task Threads
+## User Query Task Threads
```text
+--------------------------------------------------------------------------------+
diff --git a/docs/guides/agent-harness.md b/docs/guides/agent-harness.md
index 11a88b0d..b3f01f1e 100644
--- a/docs/guides/agent-harness.md
+++ b/docs/guides/agent-harness.md
@@ -2,7 +2,7 @@
```text
+-----------+ +----------------+ +---------------------------+
-| User turn | ----> | Pointer prompt | ----> | Generic harness lifecycle |
+| User turn | ----> | User query | ----> | Generic harness lifecycle |
+-----------+ +----------------+ +-------------+-------------+
|
v
@@ -65,16 +65,16 @@ memory. The core runtime does not ship app-specific Weather, Music, Notes, or
Numbers task branches.
The app catalog is part of the model boundary, not a hidden executor shortcut.
-Pointer-prompt turns send the current supported app catalog to planning. If the
+User-query turns send the current supported app catalog to planning. If the
catalog is still refreshing or does not contain a supported entry, the harness
must surface conversation, clarification, waiting, or failed-safe state instead
of silently dropping the request or executing an unsupported candidate.
-Pointer prompt uses the generic harness as the entrypoint for conversation,
+User query uses the generic harness as the entrypoint for conversation,
clarification, planning, and tool selection. Local desktop actions are
registered harness tools rather than a separate default path.
-Pointer-prompt turns enter the generic lifecycle before any local-app executor
+User-query turns enter the generic lifecycle before any local-app executor
is selected. The hosted planning boundary emits the
`generic_harness_planning` packet: structured intent, ambiguity/risk, context
needs, plan steps, verification criteria, fallbacks, and clarification policy.
@@ -153,7 +153,7 @@ ad hoc thread snippets. Slow planner calls consume a compacted run context,
including bounded world-state, failure, hint, memory, and semantic memory
summaries.
-The pointer-prompt notch mirrors generic task stop states. Permission gates
+The user-query notch mirrors generic task stop states. Permission gates
show the pending tool and missing permissions, and the approval control grants
those exact permissions through the generic lifecycle. Follow-up course changes
surface as typed interrupted/changed-course task state instead of generic
@@ -429,6 +429,6 @@ Start in:
- `apps/Donkey/Sources/DonkeyRuntime/` for guarded runtime execution,
Accessibility, app/window observation, and input backends.
- `apps/Donkey/Sources/DonkeyAI/` for hosted model routing and adapters.
-- `apps/Donkey/Sources/Donkey/` for pointer-prompt integration.
+- `apps/Donkey/Sources/Donkey/` for user-query integration.
Tests live in `apps/Donkey/Tests/DonkeyRuntimeTests/`.
diff --git a/docs/guides/decision-system.md b/docs/guides/decision-system.md
index 4099d072..cfecdd44 100644
--- a/docs/guides/decision-system.md
+++ b/docs/guides/decision-system.md
@@ -17,7 +17,7 @@ local-task requests stay conversational or ask for a specific missing detail.
## Model Boundary
-Pointer prompt turns are routed through bounded harness context. Semantic
+User-query turns are routed through bounded harness context. Semantic
decisions go through typed model boundaries; the supported hosted path uses the
authenticated Donkey backend Responses proxy with `store=false`, and the
backend chooses the concrete model.
@@ -50,14 +50,6 @@ When an app-finder catalog is supplied, executable app choices must resolve to a
`supported` catalog entry with a declared capability and control profile.
Candidate, unsupported, or denied entries are not executable targets.
-Supported generic plan tools are:
-
-```text
-app.openOrFocus, app.observe, ui.newDocument, ui.focusSearch,
-ui.focusAddressBar, ui.focusTextEntry, ui.setText, ui.pressReturn,
-app.verifyCommand, app.verifyVisibleText
-```
-
Plans that type text must provide the text as structured entity data, usually
`query`. Document-writing requests must contain meaningful final text; short
unquoted labels and copied prompt placeholders are not enough to open a writing
@@ -68,7 +60,8 @@ concrete playable song, album, or playlist before execution.
Before execution, Donkey validates model confidence, required entities,
app-finder metadata, target availability, allowed tools, permissions, and whether
-the plan can be represented as guarded workflow steps.
+the plan can be represented as guarded workflow steps. Verification can combine
+input evidence and observed result evidence when a capability requires it.
The live runner owns launch/focus, observation, evidence-backed planning,
guarded input, verification, and recovery. Accessibility and keyboard input run
@@ -93,7 +86,7 @@ control profiles before they can influence executable planning.
## Source Entry Points
-- Prompt handling: `apps/Donkey/Sources/Donkey/PointerPromptCommandHandler.swift`
+- Prompt handling: `apps/Donkey/Sources/Donkey/UserQueryCommandHandler.swift`
- Hosted decision adapter: `apps/Donkey/Sources/DonkeyAI/HostedTaskIntentParsingAdapter.swift`
- Catalog validation: `apps/Donkey/Sources/DonkeyRuntime/LocalAppTaskCatalog.swift`
- Generic lifecycle bridge: `apps/Donkey/Sources/DonkeyRuntime/AppHarnessGenericLifecycle.swift`
diff --git a/docs/guides/pointer-prompt-overlay.md b/docs/guides/user-query-overlay.md
similarity index 93%
rename from docs/guides/pointer-prompt-overlay.md
rename to docs/guides/user-query-overlay.md
index 6f9aac56..9ef370f8 100644
--- a/docs/guides/pointer-prompt-overlay.md
+++ b/docs/guides/user-query-overlay.md
@@ -1,4 +1,4 @@
-# Pointer Prompt Overlay
+# User Query Overlay
## Supported Behavior
@@ -51,7 +51,7 @@ quick local-app actions:
## Technical Guidelines
-- `PointerPromptOverlayController` owns AppKit surfaces, placement, hover tracking, focus, keyboard shortcut recognition, dismissal, file-drop routing, and microphone level capture.
+- `UserQueryOverlayController` owns AppKit surfaces, placement, hover tracking, focus, keyboard shortcut recognition, dismissal, file-drop routing, and microphone level capture.
- `DonkeyAuthCoordinator` and `DonkeyLoginWindowController` own the Mac sign-in
gate. `MacPermissionSetupWindowController` owns the post-auth core permission
gate. App startup should create the overlay controller only after a stored
@@ -59,10 +59,10 @@ quick local-app actions:
and stores a Better Auth cookie in the app cookie jar, and the permission
setup has completed.
- SwiftUI rendering lives in `DonkeyUI` and consumes state/contracts from `DonkeyContracts`. It should not perform command parsing, model calls, input execution, screen capture, or microphone capture.
-- `PointerPromptOverlayModel` owns product state. Durable task data is persisted through Core Data in Application Support.
+- `UserQueryOverlayModel` owns product state. Durable task data is persisted through Core Data in Application Support.
- Spawn display state is typed state. The model emits progress, target hints, and current selection; the overlay controller resolves hints against safe visible windows and keeps voice capture on the centered prompt; SwiftUI renders the notch cue, cursors, labels, label-to-editor transition, and selection state.
- Notch geometry comes from the active `NSScreen`, preferring safe-area and auxiliary-top metrics over hardcoded notch sizes. Content must stay out of the physical notch void; displays without a physical notch should use the same top-center composition without reserving unavailable space.
-- `PointerPromptNotchLayout` is the shared source for notch surface frames, content frames, corner radii, and notch-safe offsets. `canRenderTextInTopRow` describes whether text can draw in the top row, not whether that row exists.
+- `UserQueryNotchLayout` is the shared source for notch surface frames, content frames, corner radii, and notch-safe offsets. `canRenderTextInTopRow` describes whether text can draw in the top row, not whether that row exists.
- The prompt is a compact black composer: single-line text is pill-shaped, multiline text becomes a bounded rounded rectangle, Return submits, Shift-Return inserts a newline, Escape and outside clicks dismiss, and non-input capsule areas can drag the modal.
- The centered composer keeps text and voice modes on the same input surface. Double-Command release opens focused text input, double-Command hold opens the same input with voice active, and typed text promotes the send button while the microphone affordance becomes secondary.
- Voice capture and transcription remain separate. The controller records bounded local audio and publishes levels; transcription is model-backed through the hosted agent-harness boundary before transcript text enters the turn path.
@@ -78,7 +78,7 @@ quick local-app actions:
executed. Hover-only detections are visualization/read-only evidence and must
not become live input authority.
- Task actions in the notch, including follow-up submission and pause/resume, must cross the model/controller command boundary with the selected task ID.
-- Pointer prompt command handling should emit actionable `com.donkey.app` route/result logs for submitted commands, routing decisions, intent resolution, local action traces, unsupported requests, unavailable apps, and final task status. Action trace logs should state the backend, input mode, whether an element click happened, the control or bounds target, and that the overlay pointer is visual-only.
+- User-query command handling should emit actionable `com.donkey.app` route/result logs for submitted commands, routing decisions, intent resolution, local action traces, unsupported requests, unavailable apps, and final task status. Action trace logs should state the backend, input mode, whether an element click happened, the control or bounds target, and that the overlay pointer is visual-only.
## Verification
@@ -105,5 +105,5 @@ Manually verify:
## Source Entry Points
- App orchestration starts in `apps/Donkey/Sources/Donkey/`.
-- Typed prompt command handling lives in `apps/Donkey/Sources/Donkey/PointerPromptCommandHandler.swift`.
+- Typed prompt command handling lives in `apps/Donkey/Sources/Donkey/UserQueryCommandHandler.swift`.
- Reusable SwiftUI rendering lives in `apps/Donkey/Sources/DonkeyUI/`.
diff --git a/plans/done/19-ai-harness.md b/plans/done/19-ai-harness.md
index fcf596d3..277fc262 100644
--- a/plans/done/19-ai-harness.md
+++ b/plans/done/19-ai-harness.md
@@ -4,7 +4,7 @@
## 1. Wire Real Semantic Memory Retrieval
-Original gap: `SemanticRunMemoryRetriever` existed, but the live pointer-prompt path called it with no records. Retrieval needed to search actual run/target memory and feed the selected results into planner or command context.
+Original gap: `SemanticRunMemoryRetriever` existed, but the live user-query path called it with no records. Retrieval needed to search actual run/target memory and feed the selected results into planner or command context.
Implemented:
@@ -42,7 +42,7 @@ Done:
## 3. Harden Live Voice Transcription Audio
-Original gap: pointer-prompt voice capture fed `LocalVoiceTranscriptionAdapter` and `ProcessBackedParakeetTranscriptionRuntime`, but the captured audio format could differ from the Parakeet runtime expectation.
+Original gap: user-query voice capture fed `LocalVoiceTranscriptionAdapter` and `ProcessBackedParakeetTranscriptionRuntime`, but the captured audio format could differ from the Parakeet runtime expectation.
Original risk:
@@ -53,7 +53,7 @@ Original risk:
Implemented:
-- convert pointer-prompt audio to a supported Parakeet input format before transcription
+- convert user-query audio to a supported Parakeet input format before transcription
- normalize to mono 16 kHz where required
- prefer a small local conversion utility with explicit metadata over implicit sidecar assumptions
- surface clear failure metadata when conversion or transcription is unavailable
@@ -61,7 +61,7 @@ Implemented:
Done:
-- live pointer-prompt voice input sends Parakeet-compatible audio
+- live user-query voice input sends Parakeet-compatible audio
- tests cover PCM input conversion metadata, empty audio fallback, runtime unavailable fallback, and successful transcript-to-command flow
## 4. Verification
diff --git a/plans/done/21-swiftui-pointer-ui.md b/plans/done/21-swiftui-pointer-ui.md
index 692fe897..0797d2a5 100644
--- a/plans/done/21-swiftui-pointer-ui.md
+++ b/plans/done/21-swiftui-pointer-ui.md
@@ -4,12 +4,12 @@
## Goal
-Add the production macOS SwiftUI pointer prompt UI while keeping the future real-time run loop and AI harness decoupled behind explicit integration boundaries.
+Add the production macOS SwiftUI user query UI while keeping the future real-time run loop and AI harness decoupled behind explicit integration boundaries.
## Completed Shape
- SwiftPM macOS app lives under `apps/Donkey/`.
-- UI renders the supported pointer prompt as a floating SwiftUI/AppKit overlay.
+- UI renders the supported user query as a floating SwiftUI/AppKit overlay.
- Command-click anywhere activates the agent pointer and focuses the prompt input.
- The prompt follows the mouse at bottom right by default, flips to the opposite side near screen edges, and stays clamped inside the visible screen.
- The active pointer renders with a shadow and supports theme-color customization.
@@ -25,4 +25,4 @@ Add the production macOS SwiftUI pointer prompt UI while keeping the future real
## Guide
-- Product support guide: `docs/guides/pointer-prompt-overlay.md`
+- Product support guide: `docs/guides/user-query-overlay.md`