Skip to content

A personal assistant that lives on your desktop, remembers what matters, and can use your Mac for you.

TypeScript

docs(odd): specify sending files to the assistant (S31, T30)

Alan Buscagliaf4b4e8cf3c9d
diff --git a/odd/tasks/gentle-dot.md b/odd/tasks/gentle-dot.md
index ff11f7c..b73feaf 100644
--- a/odd/tasks/gentle-dot.md
+++ b/odd/tasks/gentle-dot.md
@@ -119,6 +119,12 @@ Branch: `feat/gentle-dot` · Delivery strategy: `single-pr` (user choice, L7; fo
- **S30.5 Optional local model (L89).** User: "no seria mejor sino tener un modelo de ia local chiquito? Parakeet es muy muy bueno", then "pero que sea opcional para descargarlo si solo quiere". Voice settings offer a "Download local voice model" action for NVIDIA Parakeet TDT 0.6B v3 (25 European languages incl. Spanish, huggingface.co/nvidia/parakeet-tdt-0.6b-v3), run through the `sherpa-onnx` Rust crate (offline transducer, int8 model; works on macOS and Linux). Nothing downloads unless the user asks; the download shows size and progress, can be cancelled, verifies the files, and can be removed. When present, it is the preferred speech-to-text engine on that machine (fully offline); otherwise S30.1/S30.2 apply. On Linux it is the only desktop voice engine besides an API key.
- **S30.4 Mic button.** A mic button in the composer: tap to start, tap to stop; while recording it shows the level and elapsed time, Esc or ✕ cancels, and the final transcript is sent as the user's message (assumption: sent automatically, since the user asked for a voice conversation; the transcript stays visible as the message). When voice is unavailable the button explains why (missing permission, unsupported, web without a key).
+- **S31 — Send files to the assistant (L91).** User: "y una cosa mas :) la posibilidad de pasar archviso por chat, eso estaria genial". Choice: "Solo yo al agente".
+ - **S31.1 Attach.** In the panel and the web UI the user attaches files to a message with an attach button, drag and drop onto the chat, or paste (images); attachments show as removable chips before sending and as chips in the sent message.
+ - **S31.2 Delivery.** Files upload to the daemon over HTTP (same access key and Origin rules as the WebSocket; not through the 1 MiB WebSocket), are stored under the assistant's workspace (`<data>/workspace/uploads/<message>/<sanitized name>`, private modes), and the message tells the agent each file's name and path. Images (PNG, JPEG, GIF, WebP) also go to the model as images when it accepts them (the engine's prompt takes `images`); otherwise they are only saved, with a note.
+ - **S31.3 Limits and safety.** A per-file size limit (assumption: 25 MB) and a per-message limit (assumption: 10 files, 50 MB); names are sanitized (no path traversal, no hidden or reserved names); nothing is executed or opened on upload; refused files explain why.
+ - Out of scope (L91): the agent sending files back to the user.
+
## Tasks
| ID | Specs | Route | Status | Commit / evidence | Scope |
@@ -162,6 +168,7 @@ Branch: `feat/gentle-dot` · Delivery strategy: `single-pr` (user choice, L7; fo
| T29a | S30.1 | delegated writer, parallel with T29b (surface `apps/desktop/src-tauri/**`) | in progress | — | Native macOS speech recognition commands and events |
| T29b | S30.2–S30.4 | delegated writer, parallel with T29a (surface `packages/**`) | in progress | — | Daemon OpenAI-key transcription/TTS, mic button, spoken replies |
| T29c | S30.5 | after T29a (same surface) | pending | — | Optional Parakeet local model via sherpa-onnx: download, verify, remove, prefer |
+| T30 | S31 | queued after T29b (same surface: Composer, protocol, bridge) | pending | — | Attach files to messages: upload, workspace storage, images to the model |
| T22 | S18 (hardening, L47 B1/B2) | delegated writer | done (accepted with documented gaps, L52) | `8651bba`; parent re-ran 328 tests + typecheck | Option A: authoritative in-memory connector state with revert, credential reads blocked, path-independent bash checks, full approval preview, redirect manual, private Engram stop, onboarding overlap fix |
| T23 | S25 | explore → spec → implement (stage 2) | pending | — | Daemon-side MCP proxy with Keychain tokens |
| T9 | S1–S6, S9–S12 | delegated verifier (high risk: process supervision, auth) | done | L24 + L31 | Full verification: unit, integration, Playwright, `@real-agent`, `tauri build` + launch, manual macOS checklist with observed results |
@@ -260,4 +267,5 @@ Environment notes: Node v24.14.1 and pnpm are present. `cargo` is on PATH but `r
- **L88 (2026-10-09):** T29 map: one connected account, OpenAI "Sign in with ChatGPT" OAuth (`auth.json` provider ids only, no secrets read); pi-ai 1.0.4 has no audio input or transcription; Info.plist lacks NSMicrophoneUsageDescription; WS messages cap at 1 MiB. Verified on the web: Sign in with ChatGPT does not support the transcription API or audio input (OpenAI SIWC preview limitations); Codex CLI removed its voice transcription (openai/codex PR #16114). User choice: "Voz de macOS, y API key si la conectas (recomendado)". S30 refined into S30.1–S30.4; contract: Tauri commands `voice_status` → `{available, reason?}`, `voice_start`, `voice_stop` → `{text}`, `voice_cancel`; events `voice://partial {text}`, `voice://level {level 0..1}`, `voice://error {message}`; WS `voice_transcribe {mime, data(base64)}` → `voice_transcript {text}` or error `voice_unavailable`; `voice_speak {text}` → `voice_speech {mime, data}`; capabilities `voice: {transcribe, speak}` in the ready/accounts payload. T29a and T29b launched in parallel.
- **L89 (2026-10-09, user):** "lo del certificado es algo inseguro para mi? porque sino la cuenta apple te pido ser develor por 99 al año, tambien, no seria mejor sino tener un modelo de ia local chiquito? Parakeet es muy muy bueno"; then "pero que sea opcional para descargarlo si solo quiere". Verified: Parakeet TDT 0.6B v3 covers 25 European languages incl. Spanish (Hugging Face, NVIDIA NIM matrix); sherpa-onnx has an official Rust Parakeet example; FluidAudio offers a CoreML build (~110× real time on Apple Silicon). Recorded as S30.5/T29c after T29a; T29a told to keep a pluggable backend over native PCM capture.
- **L90 (2026-10-09):** incident: commit `70c3f69` wrote back a 50 KB-truncated read of this document (log L12–L87 lost from HEAD, reported by both T29 writers). Restored from `70e5498` and the S30/L88/L89 changes reapplied with a full-file edit; lesson: never rewrite this document from a paged read.
-- **Next step:** T29a/T29b, then T29c; grant both permissions, take a screenshot (the Dot must be absent), click and type in a harmless app, a risky "Send" confirmation, ⌥⇧Esc panic, a blocked app (System Settings), and `screencapture -x /tmp/t.png` from the agent's bash must fail (R1); the community tester runs docs/linux-testing.md when the user shares it; T23/S25 before any public release.
+- **L91 (2026-10-09, user):** "y una cosa mas :) la posibilidad de pasar archviso por chat, eso estaria genial"; choice "Solo yo al agente". Checked: the engine's RPC prompt accepts `images?: ImageContent[]` (pi-coding-agent rpc-types.d.ts:18-29) and the WebSocket caps messages at 1 MiB (daemon.ts:197), so uploads go over HTTP. Recorded as S31/T30, queued after T29b.
+- **Next step:** T29a/T29b, then T29c and T30; grant both permissions, take a screenshot (the Dot must be absent), click and type in a harmless app, a risky "Send" confirmation, ⌥⇧Esc panic, a blocked app (System Settings), and `screencapture -x /tmp/t.png` from the agent's bash must fail (R1); the community tester runs docs/linux-testing.md when the user shares it; T23/S25 before any public release.