Commit Graph
406 Commits
Author SHA1 Message Date
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
pastilhasandClaude Opus 4.6 f2019a26b6 fix starship env_var syntax for USER prompt
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:09:01 +00:00
pastilhasandClaude Opus 4.6 69f6ba94c5 use USER env var in starship prompt instead of system user
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:07:11 +00:00
pastilhasandClaude Opus 4.6 3eb4bd820f show member username in terminal prompt instead of email
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 08:05:49 +00:00
pastilhasandClaude Opus 4.6 84d5cf5048 fix sandbox HOME resolution — capture at module load before user-instance overrides it
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 07:50:33 +00:00
pastilhasandClaude Opus 4.6 11d95a25ab mount all of ~/.local in sandbox for claude binary resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 07:43:27 +00:00
pastilhasandClaude Opus 4.6 8377da8a77 fix sandbox tool/extension/skill discovery for members
Sandbox now mounts global content at short /officer/* paths to avoid
bwrap intermediate directory traversal issues. Pi uses NODE_PATH for
extension dependency resolution.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 07:13:19 +00:00
pastilhasandClaude Opus 4.6 8264e7b995 fix super admin claude: host cwd, host mcp config paths
Capture HOST_HOME before user-instance overrides process.env.HOME so
Super Admin spawns claude in /home/pastilhas. Generate separate MCP
configs for sandbox (sandbox paths) and host (real filesystem paths),
pick based on role at spawn time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:29:14 +00:00
pastilhasandClaude Opus 4.6 29229c8cb7 fix super admin pi cwd double-prefixing absolute paths
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:12:34 +00:00
pastilhasandClaude Opus 4.6 ea31014d72 user-local installs for claude and pi, fix sandbox mounts
Move claude and pi from sudo global installs to ~/.local. Claude
binary is copied to /usr/local/bin for sandbox visibility, pi runs
via node from ~/.local/lib (ro-mounted). Fix bwrap intermediate dir
traversal by setting 0755 perms on auto-created HOME dirs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 01:08:45 +00:00
pastilhasandClaude Opus 4.6 2f15214cdb match selected provider button style to locked state for better visibility
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:12:14 +00:00
pastilhasandClaude Opus 4.6 56f8da8907 remove seed directory, clean up provisioning and sync modules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:07:50 +00:00
pastilhasandClaude Opus 4.6 9578110e8b shared bwrap sandbox, skip for super admin, extend to pi and terminals
- extract buildSandboxPrefix/buildRunuserSuffix into shared sandbox.ts
- super admin bypasses bwrap for full host access (claude, pi, terminal)
- member pi processes now use bwrap instead of sudo -u
- member terminals now use bwrap instead of sudo -u
- mount /run for systemd-resolved DNS inside sandbox
- pass role through claude spawn params and channel types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 00:06:44 +00:00
pastilhasandClaude Opus 4.6 c38d5b0ea1 extract stream parser module with tests, add mcp tool call logging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:49:26 +00:00
pastilhasandClaude Opus 4.6 86ddcbfead mcp tool server for claude code — native tool execution via stdio protocol
Replaces prompt injection workaround with a proper MCP server that dynamically
discovers marketplace tools and exposes them as callable tools to Claude Code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 13:21:50 +00:00
pastilhasandClaude Opus 4.6 ecd83dc1ec dynamic claude.md regeneration and email db env for claude code
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 12:45:41 +00:00
pastilhasandClaude Opus 4.6 49cd559c8a tool registry, claude tool awareness, and model selector fix
- Add agent-agnostic tool registry (tool-registry.ts) that discovers tools from disk
- Embed tool-loader extension as platform infrastructure (ensure-tool-loader.ts)
- Inject tool context into Claude prompts on first message
- Add marketplace tool sync (sync-marketplace.ts)
- Fix model selector defaulting to claude-code when no model explicitly selected
- Exclude tool-loader-source.ts from tsconfig (Pi-specific deps)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 11:55:38 +00:00
pastilhas e97b4b2459 deleted old plans 2026-03-07 08:31:48 +00:00
pastilhasandClaude Opus 4.6 b896515b2c fix message duplication on auto-save after resume
The PUT endpoint was re-merging old DB messages (which already included
previous merges) with disk messages on every turn, causing duplication.
Now the client passes resumedMessageCount so the server always slices
only the original pre-resume messages before concatenating.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 08:23:31 +00:00
pastilhas 70442ae277 dockerization plan 2026-03-07 08:22:46 +00:00
pastilhas 6c4595279a fine tuning 2026-03-07 00:52:20 +00:00
pastilhasandClaude Opus 4.6 60230ccfec fix save indicator timing and auto-save history loss on resume
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 21:27:31 +00:00
pastilhasandClaude Opus 4.6 0e0be3327e dashboard chats: auto-load latest saved session for context on mount
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:46:09 +00:00
pastilhasandClaude Opus 4.6 8f46f9170a fix terminal state key leaking phantom dashboards; fix infinite loop in chat panel resume
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:39:44 +00:00
pastilhasandClaude Opus 4.6 406d8f9e54 saved sessions: make routable via /chat/saved/:id URLs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 20:15:36 +00:00
pastilhasandClaude Opus 4.6 2a8df0def1 saved sessions: replace transient history with persistent DB storage and auto-save
- Add saved_sessions table and CRUD endpoints (save, list, resume, update, delete)
- Save is instant (no LLM summarization), stores exact conversation with tool calls
- Resume loads full message history into chat UI, sends transcript to agent on first message
- Auto-save updates DB after every agent response once a session is saved
- Delete old filesystem-based session/group management (sessions router, useChatSessions, useChatGroups)
- Clean up ChatHeader, SessionList, ChatDetailPanel for saved sessions flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 13:36:25 +00:00
pastilhasandClaude Opus 4.6 d88fe3cac7 task logs: migrate from filesystem to postgresql; refactor sidecars into submodules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:49:39 +00:00
pastilhasandClaude Opus 4.6 5129f7827f dashboards: migrate from filesystem to postgresql
Replace JSON file storage with DB tables for dashboard layouts,
screens, projects, and terminal defaults. Fresh drizzle migration
with dashboardDefaults table and new columns on screens/projects.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 11:35:11 +00:00
pastilhasandClaude Opus 4.6 daf5580c39 vnc sidecar: per-user desktop sessions via sidecar architecture
replaces the single hardcoded systemd VNC service with a dynamic
sidecar that manages per-user VNC sessions on demand. any authenticated
user can now access their own desktop, not just Super Admin.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 10:49:53 +00:00
pastilhasandClaude Opus 4.6 a0d9ea63f9 sidecar self-registration: sidecars connect to API server instead of vice versa
Flips the connection model so sidecars register themselves with the API
server via WebSocket at /api/sidecar/register, enabling dynamic discovery,
location independence, and automatic reconnection from either side.

- Add registration protocol types and PTY command/event types
- Create sidecar-registry.ts (replaces sidecar-client.ts) as passive registry
- Create sidecar connector (connect.ts) with exponential backoff reconnect
- Convert process sidecar from WS server to WS client
- Convert PTY sidecar from WS server to multiplexed WS client
- Simplify terminal bridge to thin adapter using registry
- Add PTY sidecar as PM2-managed process
- Update all consumer imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 08:48:19 +00:00
pastilhas 6cfa40bad1 Merge remote-tracking branch 'origin/email-imap' 2026-03-06 07:27:45 +00:00
pastilhasandClaude Opus 4.6 7bbcccabf1 wip: remove opencode, searxng, resources; fix user settings read
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 07:27:19 +00:00
pastilhasandClaude Opus 4.6 bd7ece80cf email list sync button uses new email-sync handler, job duration logging
Rewired EmailList sync button to call /email/accounts/:id/sync instead
of the old gmail-sync job. Shows sync button for connected and synced
accounts. Allow manual incremental sync for synced accounts.

Added duration logging to queue runner: start/complete/fail markers
with elapsed time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 07:25:26 +00:00
pastilhasandClaude Opus 4.6 4ececbe748 email sync: API passes full config at enqueue, auto-reconnect on IMAP drops
Sidecar/queue runner no longer needs job-specific context. API server
resolves account details, IMAP auth, and user email at enqueue time —
all persisted in the job file. Handler reads directly from job meta.

Removed "Load account" step. Sync step auto-reconnects up to 10 times
when Gmail drops the connection, resuming from saved UIDs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 07:02:51 +00:00
pastilhasandClaude Opus 4.6 170bd6d41b wip: email sync via imap with status tracking and auto cron
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 04:57:30 +00:00
pastilhasandClaude Opus 4.6 5925ac49a1 fix sidecar websocket: routes handler was intercepting upgrade requests
The Bun routes option matched "/" before fetch could handle the
WebSocket upgrade, so the API server could never connect. Moved
route handling into fetch after the upgrade check.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:53:31 +00:00
pastilhasandClaude Opus 4.6 28f5cefb5b gmail sync: locale-agnostic folder mapping and import all mail
[Google Mail] locale variant was not matched by hardcoded [Gmail] paths,
so Sent/Starred/Important/Drafts were never labeled. All Mail was skipped
entirely, losing ~9k archived emails. Now normalizes the prefix, imports
everything with proper labels, and processes All Mail last so specific
folder labels take priority.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 09:29:22 +00:00
pastilhasandClaude Opus 4.6 5e86fcff88 add future possibilities section to sidecar docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:44:36 +00:00
pastilhasandClaude Opus 4.6 86c2d6333a process sidecar: independent process manager for long-running work
Introduces a separate Bun process (port 5100) that owns all spawned
processes and long-running work, so the API server can restart freely
without disrupting active sessions.

The sidecar owns:
- Anthropic proxy (port 5051) with persisted secret across restarts
- Claude Code process spawning and session tracking (--resume support)
- Pi agent spawning and RPC lifecycle (prompt/abort/thinking)
- Job queue engine (lane processing, retries, notifications)

The API server becomes a thin client that forwards commands over a
single WebSocket connection with auto-reconnect. send-claude-code.ts
goes from 550 lines of spawn logic to 73 lines of sidecar delegation.

State persisted to data/sidecar/state.json every 30s and on shutdown.
Lockfile prevents duplicate instances. See SIDECAR.md for full docs
and manual testing procedures.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 07:36:47 +00:00
pastilhasandClaude Opus 4.6 726c77e346 show live email count during gmail sync instead of mbsync log lines
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 05:00:18 +00:00
pastilhasandClaude Opus 4.6 ed67cfa8e9 terminal auto-reconnect and connection indicator in panel header
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 04:58:14 +00:00