Commit Graph
100 Commits
Author SHA1 Message Date
pastilhasandClaude Opus 4.8 420aa08783 chat: run Claude un-isolated for the Super Admin (real HOME, ~/.claude parity)
Single-user platform: the Super Admin's Claude process now uses the real home
(HOME_DIR) instead of DATA_PATH/<email>/home, so its transcript store IS the same
~/.claude the terminal `claude` uses — platform and terminal sessions are
interchangeable (native `/resume` sees them). The session reader resolves the
same home. The generated container CLAUDE.md is no longer written for the Super
Admin (it would pollute the personal global ~/.claude/CLAUDE.md and is stale);
MCP tools still load via --mcp-config, and email/project panels inject their own
prompts. Sandboxed users keep their isolated home.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:19:31 +00:00
pastilhasandClaude Opus 4.8 b3b8a59863 chat: rename sessions in Claude's store + delete confirm
Rename appends a {"type":"summary",...} entry to the session's JSONL transcript
(Claude's own format, so the title lives in .claude); the reader takes the last
summary as the title, without a timestamp so it doesn't reorder the list.
PATCH /chat/sessions/:id/title backs it. The list gets inline rename (pencil ->
edit in place) and a two-step delete confirm so a stray click can't nuke a
transcript. Rename verified against a synthetic store.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 12:01:16 +00:00
pastilhasandClaude Opus 4.8 4215c8df0a chat: delete sessions + auto-refresh the /chat list after each turn
DELETE /chat/sessions/:id removes Claude's transcript file; the list gets a
per-row delete button. The list also invalidates on turn-complete so new and
continued sessions surface without a manual refresh.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:14:27 +00:00
pastilhasandClaude Opus 4.8 9565cd9462 chat: click-to-resume /chat sessions via Claude --resume
Clicking a session in the list loads its transcript (GET /chat/sessions/:id,
parsed from Claude's JSONL into display messages) and continues the actual Claude
session: a resumeSessionId is threaded chat handler -> send-claude-code -> sidecar
-> claude-manager, which passes --resume <uuid> (in-memory session mapping still
takes precedence for live turns). Parser verified against real transcripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:11:58 +00:00
pastilhasandClaude Opus 4.8 bea3d0a487 chat: honor the per-session cwd for Super Admin (was hardcoded to home)
claude-manager pinned the spawn cwd to HOST_HOME for Super Admin, ignoring the
cwd passed from the chat handler — so /chat sessions ran in /home/pastilhas
regardless. Now it uses params.cwd when provided (falling back to HOST_HOME),
so /chat actually runs from the dedicated claude_sessions directory.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 10:04:17 +00:00
pastilhasandClaude Opus 4.8 add5351dc7 chat: list /chat sessions from Claude's store; fix the dedicated-cwd routing
The /chat detail (ChatDetailPanel) now passes context 'chat' to usePiChat, so the
backend actually runs the session from claude_sessions (the earlier tag was on the
wrong component). The left panel (SessionList) now reads GET /chat/sessions —
Claude's own transcripts — instead of the old saved-sessions model. List-only:
rows display title/time/count; click-to-resume comes next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:50:38 +00:00
pastilhasandClaude Opus 4.8 eb4ce4301b chat: run /chat sessions from the dedicated claude_sessions cwd
The standalone /chat route now tags its context as 'chat'; the backend runs those
sessions with cwd = DATA_PATH/<email>/claude_sessions (created on demand), so their
transcripts form an isolated Claude project group instead of polluting the home-dir
history. Other chat contexts (email/project panels) keep their own cwd.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:43:01 +00:00
pastilhasandClaude Opus 4.8 319cf39e84 chat: read the /chat session list from Claude's own transcript store
First slice of making Claude's session store the source of truth. Adds a reader
(api/chat/claude-sessions.ts) that lists sessions straight from Claude's JSONL
transcripts under $HOME/.claude/projects/<cwd-slug>/, plus GET /chat/sessions
over a dedicated per-user claude_sessions working directory. No bookkeeping
layer — Claude's files are authoritative. Verified against real transcripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:40:58 +00:00
pastilhasandClaude Opus 4.8 63819fc25e chat: remove Pi runner — route all chat/pipeline/channels through Claude
Stage 1 of removing Pi (Claude-only). Cuts the non-Claude branches in the chat
WS handler, pipeline executor, and channel send-and-await; deletes the Pi
sidecar, its ecosystem entry, pi-bridge, and the Pi model-listing spawn (now a
static Claude tier list). Adds a guard coercing any legacy non-claude-code model
preference to the Claude default so old settings don't break chat or jobs.
Removes the dead no-op session-save REST route and stale Pi docs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:03:44 +00:00
pastilhasandClaude Opus 4.8 fcdf5f0117 todo: email screen multi-view vision (sender/domain management + chat tabs)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:48:14 +00:00
pastilhasandClaude Opus 4.8 23862d3ae0 todo: record shipped email work and deferred follow-ups
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:39:05 +00:00
pastilhasandClaude Opus 4.8 54965d7095 email: set busy_timeout on the email db to ride out concurrent writers
The API and email sidecar both open emails.db; without a busy timeout a write
overlap (resync, or the thread_id backfill) throws "database is locked" and
500s a request. Wait up to 5s for the other writer instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:32:11 +00:00
pastilhasandClaude Opus 4.8 58373c9d59 email: group messages into conversations (Gmail-style threading)
Hybrid grouping via a new thread_id column: new mail threads exactly on
References/In-Reply-To (id is sha1(Message-Id), so a referenced id hashes to
the ancestor's own id); already-synced mail is backfilled with a
normalized-subject + counterpart key. Folder views collapse to one row per
thread with a count badge; the reader shows the thread as a collapsible stack.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:21:40 +00:00
pastilhasandClaude Opus 4.8 18d69616d2 compose: rich contenteditable body — inline images land at the caret/drop point
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 08:05:40 +00:00
pastilhasandClaude Opus 4.8 c590d6253c compose: bcc field, inline pasted/dropped images, attach button stays regular
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:52:11 +00:00
pastilhasandClaude Opus 4.8 ced1796a56 compose: single close button + attachment support (paste, drag-drop, file picker)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:39:27 +00:00
pastilhasandClaude Opus 4.8 ead8f53951 email: compose + reply via Gmail SMTP (app password), with recipient autocomplete
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 07:12:34 +00:00
pastilhasandClaude Opus 4.8 3b13b98532 task modal: scroll the config area so the Run/Queue buttons stay reachable with long track lists
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 06:54:48 +00:00
pastilhasandClaude Opus 4.8 8faa4abcaf todo: mark OR support done; note grouping/in:/relative-dates remaining
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 23:19:38 +00:00
pastilhasandClaude Opus 4.8 03f7bb81cf email: OR support in search (OR-separated branches; mixed FTS/SQL via id-IN subquery)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 23:19:25 +00:00
pastilhasandClaude Opus 4.8 08f5e4561d todo: mark Gmail-style operators done; note OR/grouping as remaining
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:24:13 +00:00
pastilhasandClaude Opus 4.8 1791e2e6a1 email: Gmail-style search operators (from:/to:/subject:/body:/has:/is:/label:/before:/after:)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 18:23:53 +00:00
pastilhasandClaude Opus 4.8 066531555b todo: extend email search with Gmail-style operators (from:, subject:, has:attachment, …)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:43:37 +00:00
pastilhasandClaude Opus 4.8 1ac2bb59f6 email: keepPreviousData so searching doesn't remount the panel and drop input focus
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:40:26 +00:00
pastilhasandClaude Opus 4.8 3f00999a2a email: full-text search (FTS5) — backend index + /email/search + search box in the list
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:38:03 +00:00
pastilhasandClaude Opus 4.8 4b08d0b99c email: push new-mail to /email via SSE (IMAP IDLE -> sidecar -> server -> EventSource)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:29:20 +00:00
pastilhasandClaude Opus 4.8 5a0b9ce70f email: real-time IMAP IDLE watchers (push on new mail); cron kept as backstop
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:22:46 +00:00
pastilhasandClaude Opus 4.8 2bef99866f email: hide the Google OAuth connect card (email uses IMAP app password now)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 17:15:19 +00:00
pastilhasandClaude Opus 4.8 edb68d396d email: route gmail app-password accounts over IMAP (Gmail API only for oauth)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:57:32 +00:00
pastilhasandClaude Opus 4.8 32caa67cab jobs: show target path in list rows; delete queued/finished jobs + clear-all history
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:31:52 +00:00
pastilhasandClaude Opus 4.8 5da29e4004 jobs: split left column into Active + History resizable panels (email-style)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:25:45 +00:00
pastilhasandClaude Opus 4.8 c5d79085cb jobs: Stop now cancels queued jobs; add remove/stop button on list rows
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:14:49 +00:00
pastilhasandClaude Opus 4.8 a4b56a3b6e jobs: make header indicators readable when idle (solid pills, full-opacity text)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 16:01:46 +00:00
pastilhasandClaude Opus 4.8 99293b0b49 jobs: after creating a job, show a View/Close confirmation instead of navigating away
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:57:42 +00:00
pastilhasandClaude Opus 4.8 39a235197c jobs: default config to {} — config-less script tasks failed the NOT NULL insert
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:54:23 +00:00
pastilhasandClaude Opus 4.8 f77ce3fb96 jobs: header running/queued badges + GET /jobs/counts (phase 3d)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:48:52 +00:00
pastilhasandClaude Opus 4.8 c277ceead7 jobs: split list into Running & Queued (top) and History (bottom, 70/30)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:42:15 +00:00
pastilhasandClaude Opus 4.8 ba2c2e57ca jobs: modal creates jobs for non-inline tasks (Run/Queue -> POST /jobs -> /jobs/:id)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:35:24 +00:00
pastilhasandClaude Opus 4.8 1f57d8c8d2 jobs: master-detail JobsPage (list + detail, resizable) for /jobs and /jobs/:id
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 15:24:54 +00:00
pastilhasandClaude Opus 4.8 56531aedb7 doc: header running + queued job indicators (3d)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:42:30 +00:00
pastilhasandClaude Opus 4.8 ae361d2a2f tasks: inline flag (quick tasks stay in the modal) plumbed through parser + endpoints
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:33:08 +00:00
pastilhasandClaude Opus 4.8 46dc6ce507 jobs: script-job terminal view at /jobs/:id (phase 3a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 14:04:08 +00:00
pastilhasandClaude Opus 4.8 6d7d928806 jobs: queue scheduler + REST job API (phase 1c + 2)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:58:42 +00:00
pastilhasandClaude Opus 4.8 234a24ddaf jobs: run script tasks as background jobs via executeScript (phase 1b)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:42:57 +00:00
pastilhasandClaude Opus 4.8 843580afff jobs: add mode and exit_code columns (phase 1a)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:38:05 +00:00
pastilhasandClaude Opus 4.8 4a5fa89185 add jobs-unification design doc
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:35:45 +00:00
pastilhasandClaude Opus 4.8 71dfd394c3 subtitles default to all-unchecked; connect the keep-checkbox label
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 13:35:45 +00:00
pastilhasandClaude Opus 4.8 372fbf11ab per-group folder config: general audio/subtitle/rename pickers via group_config
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 12:46:53 +00:00
pastilhasandClaude Opus 4.8 a0cfb1c526 per-group track config: probe bitrate, per-file track map, folder multi-picker
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 12:11:23 +00:00
pastilhasandClaude Opus 4.8 17b7ca8b72 gate the folder keep-all escape hatch behind config.folderKeepAll
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 11:40:05 +00:00
pastilhasandClaude Opus 4.8 fd2c82da84 log token revoke as a security event
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:59:19 +00:00
pastilhasandClaude Opus 4.8 c345bd40ae skip pi install when the binary is already present
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:48:44 +00:00
pastilhasandClaude Opus 4.8 fcee091b53 add token revoke and panic lockdown endpoints with security logging
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:48:44 +00:00
pastilhasandClaude Opus 4.8 b96b23d92b auth: add POST /auth/lockdown to trigger the distress lockdown
exposes the duress lockdown as an endpoint (needs the distress password in the
body, rate-limited) so it can be tripped from a shortcut/webhook, not only by
typing the distress password at the login form.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:22:48 +00:00
pastilhasandClaude Opus 4.8 cf2962fd67 auth: distress-password lockdown + explicit token-revoke endpoint
Add a duress password (DISTRESS_PASSWORD env): entering it at login trips an
in-memory full lockdown — all new logins (password + passkey) and every existing
session are refused until the server is restarted, and the login itself returns a
normal "invalid credentials" so it gives nothing away. Also add
POST /api/auth/blacklist-token as a clearly-named alias for revoking the current
JWT (same effect as signout).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 00:06:42 +00:00
pastilhasandClaude Opus 4.8 f03bf733c8 origin validation: allowlist the Expo app origin via env
APP_ORIGINS now includes EXPO_PUBLIC_CLIENT_ORIGIN when set, so the mobile app's
officer:// custom-scheme origin passes origin validation without weakening it for
anyone else. The origin (with its embedded token) lives in .env, not the repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 23:54:00 +00:00
pastilhasandClaude Opus 4.8 b3d0de3dcb file browser: download videos via ReClip as a background job
/download-video now delegates to the ReClip service (its own yt-dlp) and runs as
a background job: POST returns a jobId immediately and the client polls
GET /download-video/:jobId, so a large download no longer holds one long request
open (which was 504-ing behind the reverse proxy). the finished file is streamed
into the user's folder with a title-based name.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 22:09:43 +00:00
pastilhasandClaude Opus 4.8 6ce75db150 task runner: keepalive ping so long silent tasks don't get killed
a script task that goes silent for a while (e.g. ffmpeg's faststart pass rewrites
a huge file for minutes with no output) would hit Bun's default 120s websocket
idle timeout → close(ws) → killTree killed the task mid-run, corrupting the
output. now the executor pings the socket every 30s while a task runs, resetting
the idle timer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 22:09:43 +00:00
pastilhasandClaude Opus 4.8 a82ce9ecb0 drop inherited architecture docs that no longer match the code
AUTOMATION_CONTEXT.md and SIDECAR.md described the multi-tenant scope
model, the seed/ tree, the marketplace, and a single sidecar owning the
queue — all superseded. Fix the stale doc pointers in opencode.json and
CLAUDE.md, and point at TODO.md as the source of truth on direction.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 20:25:44 +01:00
pastilhasandClaude Opus 4.8 23b7df5fa9 task runner: kill the whole process tree on Stop
proc.kill() only signalled the direct child (bash), leaving a running ffmpeg
grandchild orphaned and still encoding. now killTree() walks /proc, SIGTERMs the
whole subtree (bash + ffmpeg), then SIGKILLs any straggler after 2s.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 15:05:23 +00:00
pastilhasandClaude Opus 4.8 e68c8edc23 task runner: "convert all, keep every track" option for mixed-layout folders
when a folder has mixed audio/subtitle layouts, the mismatch banner now offers a
toggle: convert the matching group (pick tracks, skip the rest) OR convert every
video keeping all audio + all subtitles (no picking, nothing skipped). the second
mode hides the pickers and clears the track-selection inputs so run.sh keeps
everything. only shown for tasks with track pickers (Convert Video).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 13:16:11 +00:00
pastilhasandClaude Opus 4.8 068cbfe32b file browser: run a task on a multi-selection
selecting several files/folders and running a task now runs it on the whole
selection instead of just the right-clicked item. reuses the folder + include
mechanism: the run targets the current folder scoped to the selected files
(and everything under selected folders). track-picker tasks scope their probe
to the selection too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 08:38:39 +00:00
pastilhasandClaude Opus 4.8 821e7ab6c4 video player: fill the frame in fullscreen
the video used max-w/max-h so a low-res source stayed at native size surrounded
by black. switch to w-full h-full object-contain so it scales up to fill the
player (windowed and fullscreen) while preserving aspect ratio.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 07:13:11 +00:00
pastilhasandClaude Opus 4.8 a2ca5b0fcd task runner: subtitle_edit input type for the subtitle editor
renders each subtitle as a keep checkbox + editable label field, seeded from the
file's current tracks. reuses the existing probe / folder-grouping / include
plumbing, so it works on a single file or a whole season.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 06:04:20 +00:00
pastilhasandClaude Opus 4.8 ae1ccdec33 task runner: batch track selection for folders
converting a folder now recursively probes every video and groups episodes by
track layout (audio language+channels, subtitle language). the pickers are
driven off the largest matching group; episodes with a different layout are
listed as skipped and converted separately. adds a /probe-folder endpoint and
passes the majority file list to run.sh as INPUT_INCLUDE.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 05:21:01 +00:00
pastilhasandClaude Opus 4.8 0f2b71562a task runner: probe video files and let you pick which audio/subtitle tracks to keep
convert video's task modal now probes a single file on open, lists its audio
and subtitle tracks as inline checkboxes, and passes the selection to the
script. audio defaults to all kept, subtitles to none; a "none" sentinel keeps
empty (folder mode) meaning keep-all.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 04:47:09 +00:00
pastilhasandClaude Opus 4.8 8c9bb9a68e video player: server-side audio track selector
Add /file-browser/audio-tracks (list) and raw?audio=N (serve the video with
a chosen audio track via a cached -c copy remux, byte-range seekable). The
player shows an always-visible selector outside the controls; switching
reloads the source and restores the playhead. Works in Chromium, which
doesn't expose the audioTracks API.

Temp remux file keeps the real extension (a .tmp suffix breaks ffmpeg's
muxer selection); concurrent requests for a track share one remux.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 04:04:47 +00:00
pastilhasandClaude Opus 4.8 921413ca4d lower the task-completion chime volume to a quarter
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 02:48:01 +00:00
pastilhasandClaude Opus 4.8 06bd8a5821 video player: subtitle track support with a selector
Add /file-browser/subtitles (list text subtitle tracks) and /subtitle-vtt
(extract one as WebVTT on demand); the VideoRenderer fetches the list,
renders <track> elements, and shows a CC selector to switch/turn off subs.
Track labels prefer title, then handler_name (mp4), then a real language,
falling back to Track N — so untagged tracks aren't shown as "und".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 02:38:52 +00:00
pastilhasandClaude Opus 4.8 b9eb78c919 add header rescan button to apply officer-items changes without restart
New POST /api/rescan re-runs the boot item setup (ensureItemDirs +
ensureToolLoader) and returns live item counts; the header button calls it
and invalidates the item query caches so the UI refetches from disk.

Also fix ensure-tool-loader to write into OFFICER_ITEMS_DIR/extensions (the
runtime read path) instead of the now-unread DATA_PATH/extensions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 01:31:51 +00:00
pastilhasandClaude Opus 4.8 86a547b216 comment out the web inspector and bug report header buttons
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 01:23:23 +00:00
pastilhasandClaude Opus 4.8 f3492512ba unify agent items into a flat file-based store, drop the marketplace
Replace the marketplace service dependency and the native/global/user
scope tiers with a single external directory ($OFFICER_ITEMS_DIR) holding
skills, tools, tasks, processes and extensions as plain files.

- tasks move from Postgres to TASK.md files (new file-backed task layer);
  task editing now works, which the DB path never supported
- skills/tools/processes collapse into one shared file router (single dir)
- remove the marketplace client (sync-marketplace/sync-version) and the
  boot-time sync; pi-bridge/pi-manager/sandbox point at the flat store
- drop the dead tasks + vestigial skills/tools/processes/extensions +
  item_chats tables (migration 0004)
- one-time migration script exports DB tasks and consolidates disk items

Migration verified: all 6 tasks round-trip through the runtime parser
identically to their DB rows (pipeline steps, triggers, script impls and
agentic bodies all intact).

NOTE: not yet functionally tested end-to-end — every item (each task mode,
tool, skill, extension) still needs to be run/exercised in the app before
this is trusted. To be done manually.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 00:39:17 +00:00
pastilhasandClaude Opus 4.8 5fd3d4faac file browser opens at home instead of restoring the last path
Navigation is now session-local state that always starts at home. The
unscoped browser still mirrors its folder into files/currentPath so the
Create Dashboard flow keeps defaulting a new dashboard's cwd to it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 23:46:15 +00:00
pastilhasandClaude Opus 4.8 82d0e9afd6 remove ffmpeg video transcode, back to native-only playback
Drop the /transcode (and dead /transcode-audio) routes and the frontend
mkv/avi transcode wiring. Only browser-native formats (mp4, webm, mov,
m4v, ogv) are classified as video now; other containers fall through to
the generic file view.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 23:37:14 +00:00
pastilhasandClaude Opus 4.8 510254cbd4 note the x11vnc orphan/duplicate risk in TODO
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 19:17:00 +00:00
pastilhasandClaude Opus 4.8 1ed12cd3ba resolve a relative task cwd against the user's home before spawning
the file browser sends msg.cwd relative to the user's home and it went straight to
Bun.spawn, which resolves it against the server's cwd. when that directory does not
exist posix_spawn reports ENOENT naming the binary rather than the directory, so
"Convert Audio" failed with the misleading "posix_spawn 'bash'".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 00:38:12 +00:00
pastilhasandClaude Opus 4.8 7d8341d3ba note the leftover officer-vnc.service unit in TODO
the hand-installed systemd unit kept a parallel xfce session on :1 alive and
respawned it on every kill, independently of the platform. obsolete now that the
desktop panel mirrors :0; disabled, but the unit file is still on disk.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 22:23:33 +00:00
pastilhasandClaude Opus 4.8 106e5bd17d mirror the physical display over vnc instead of spawning a virtual desktop per user
- vnc-manager now runs x11vnc against :0 rather than vncserver on a fresh display,
  so the browser shows the same session as the tv instead of a parallel one
- x11vnc reads :0's cookie from the logged-in user's own .Xauthority, so no root is
  needed; mirroring only works while someone is logged in (the greeter's cookie
  belongs to lightdm)
- -scale 0.5 halves the 4k framebuffer to 1080p for the stream, -shared -forever
  keeps it up across browser disconnects, -localhost keeps it behind the ws bridge
- readiness is now the listening port, not exit code: x11vnc stays in the
  foreground where vncserver daemonized and exited
- drops findFreeDisplay and per-email session tracking; there is exactly one :0
- the parallel desktops this replaces caused real breakage: a ghost logind session
  that broke lightdm login, and a brave profile lock held on :2

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 22:10:15 +00:00
pastilhasandClaude Opus 4.8 3fc7bcb32f always run pi as the service user, drop the sudo -u branch
- the sandbox already drops privileges to the OS user (id -un), so pi-bridge was
  the only code path that switched to a per-user unix account
- the four accounts it targeted (andrepadez, john-wick, fedra, miguelbenoliel)
  are vestigial: created by scripts/provision-existing-users.sh, with no home
  dirs, no files, no processes. the only live account is pastilhas@officer.dev,
  which maps to the service user, so isServiceUser was always true and the
  sudo -u branch could never fire
- add TODO.md tracking the leftover username plumbing, the useradd script, known
  bugs (task-executor relative cwd, bootstrap pi EEXIST), and the ufw 9010 rule

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 21:57:49 +00:00
pastilhasandClaude Opus 4.8 d723fcb23e extract shared whisper transcribe helper, use in file-browser and pi stt routes
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 13:17:15 +00:00
pastilhasandClaude Opus 4.7 e0bfc3d961 serve static assets from local public/ instead of static.officer.dev, simplify gmail history 404/410 handling
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 17:07:55 +00:00
pastilhasandClaude Opus 4.7 3540d53a00 gmail proxy tool with token refresh, claude pro bearer auth, pi --list-models stderr fallback, tool object input type
- add getValidGoogleAccessToken helper and use it in email-cron, email account auth resolver, and the new gmail proxy
- POST /api/integrations/google/gmail-proxy forwards arbitrary gmail rest calls server-side, with auto-refreshed oauth
- pi-manager and claude user-instance inject OFFICER_API_URL + per-session JWT so tools can call back as the user
- claude anthropic proxy uses Authorization: Bearer + preserves any anthropic-beta headers (pro oauth tokens are rejected via x-api-key, and overwriting the beta header broke context_management)
- pi --list-models: fall back to stderr when stdout is empty (pi v0.73.1 writes the table to stderr)
- mcp tool server + pi tool loader: accept type: object inputs so json bodies stay structured

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-30 17:07:51 +00:00
pastilhas 8a583da19b email crons 2026-05-16 07:59:37 +00:00
pastilhasandClaude Opus 4.6 039ea7ae71 remove stale native tasks on marketplace sync
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:55:14 +00:00
pastilhasandClaude Opus 4.6 b3f1d10bc1 inline email resync instead of job queue, refresh list on completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 17:07:06 +00:00
pastilhasandClaude Opus 4.6 ea8113e61d pipeline: add activity timeout and waiting indicator for local models
Agentic steps now have a 5-minute inactivity timeout (non-Claude-Code
models only) so stalled local LLM requests fail with a clear error
instead of hanging forever. A "Waiting for model" indicator is emitted
every 10s and shown in the pipeline UI stats bar, clearing as soon as
the model starts responding.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:56:39 +00:00
pastilhasandClaude Opus 4.6 92da03fcff pipeline executor improvements, proxy refresh, task runner step list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:25:11 +00:00
pastilhasandClaude Opus 4.6 0f1e1f35f1 redesign automation page with simple list + detail panels
Replace 8-category layout with flat task list and detail view using
WorkspaceView. Searchable list with mode badges, run/delete actions,
create dialog. Remove 13 unused component files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:24:57 +00:00
pastilhasandClaude Opus 4.6 24ac7ac796 replace gmail resync with Gmail REST API, remove mbsync dependency
First sync still uses IMAP with app password. Subsequent syncs use
Gmail API history.list + messages.get with OAuth for faster, more
reliable incremental sync. Dispatch gmail-sync handler for gmail
accounts instead of generic email-sync. Show sync button for synced
accounts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:24:44 +00:00
pastilhasandClaude Opus 4.6 ee1b816d66 move tasks to marketplace, sync native tasks on bootstrap
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 13:57:40 +00:00
pastilhasandClaude Opus 4.6 ef6402a827 fix pipeline stop, jobs link navigation, and seed quote stripping
- Fix stop: abort poll now rejects the promise after killing the agent process
- Fix jobs link: close modal before navigating, use react-router navigate
- Fix seed parser: strip quotes from step input values (delete_source: "true")

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 05:32:35 +00:00
pastilhasandClaude Opus 4.6 53c78c76cb add tag-album and clean-playlist-files tasks, script step support, stop fix, rename fix
- New tag-album task: renames tracks to NNN format, sets ID3 tags via mutagen
- New clean-playlist-files task: deletes .cue, .m3u, .nfo and similar junk files
- Pipeline executor now supports script-mode steps (runs directly, no agent)
- Build discography pipeline: convert-audio → clean-playlist-files → prepare → fetch → tag
- Fix stop button: abort signal now kills running agent processes
- Fix job manager: broadcast stopped/error events to WebSocket viewers
- Fix file browser rename: delay focus to avoid context menu close race, left-align input

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 04:10:14 +00:00
pastilhasandClaude Opus 4.6 5e38343f44 add pipeline job management with /jobs pages and per-step output viewer
- Pipeline jobs now persist to DB with progress tracking and cost accumulation
- Jobs survive WebSocket disconnects with in-memory event buffer replay
- New /jobs list page with search, status badges, and cost display
- New /jobs/:id detail page with live WebSocket attachment and REST fallback
- Two-column layout using WorkspaceLayout for resizable steps/output panels
- Streaming messages tagged with stepIndex/iterationLabel for per-step output grouping
- TaskRunnerModal links to job detail page once job is created
- Dock entry added for Jobs page

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 08:48:50 +00:00
pastilhasandClaude Opus 4.6 22c60d4a57 add pipeline task system, agentic music tasks, copy buttons, and pi-bridge cleanup
- Pipeline mode: new task mode that chains agentic tasks sequentially with
  foreach/subdirectory iteration and skip_if conditions
- Pipeline executor backend (WebSocket at /api/tasks/pipeline/ws) with
  support for both Pi and Claude Code models
- Frontend PipelineRunner component with step progress, streaming output,
  and aggregate cost tracking
- New agentic tasks: prepare-discography, fetch-album-info, build-discography
  (pipeline combining both)
- Seed parser extended to handle pipeline steps in frontmatter config
- CopyButton component added to assistant bubbles, error bubbles, and
  tool input/output sections
- Removed obsolete SearXNG/Apify/browser relay code from pi-bridge

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 20:20:20 +00:00
pastilhasandClaude Opus 4.6 3993c7d1c7 document options input type and UI rendering in SCRIPTS.md
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:45:00 +00:00
pastilhasandClaude Opus 4.6 2caccc183c generalize convert-to-mp3 into convert-audio with selectable target format
- rename task to convert-audio, support mp3/flac/wav/ogg/aac/opus targets
- add options input type with selectable pill buttons in UI
- extend seed script parser to handle YAML list properties (options)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:42:44 +00:00
pastilhasandClaude Opus 4.6 729ffb930b add task input form and improve script runner output
- fetch task input definitions from API and render configurable inputs
- boolean inputs render as No/Yes toggle (e.g. delete_source)
- auto-filled inputs (file_path) are hidden from the form
- wrap script output in dark pre/code block with copy button
- fix ffmpeg -nostdin for batch directory processing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:35:48 +00:00
pastilhasandClaude Opus 4.6 d4530a9667 add script task templates and refactor convert-to-mp3 to use template pattern
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:14:11 +00:00
pastilhasandClaude Opus 4.6 f32f427972 script-mode task execution — database-backed tasks with direct script runner
Tasks now live in the database (mode: script or agentic). Script-mode tasks
bypass the agent entirely — the implementation is materialized to a temp file
and executed directly, with stdout/stderr streamed to the UI via WebSocket.

Includes convert-to-mp3 as the first native script task.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 16:07:59 +00:00
pastilhasandClaude Opus 4.6 1159978187 add targets field to filter tools per agent harness (pi/claude/all)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 09:39:38 +00:00