15 Commits

Author SHA1 Message Date
Prakash
a0aca55c0a fix(release): bump to 0.4.16 and restore desktop + publish hotfixes
Two stale reverts on dev had rolled back critical hotfixes landed
directly on main:

* ``client/src-tauri/tauri.conf.json`` was pinned back to ``0.1.3``,
  which would silently downgrade the desktop client on merge (main is
  at ``0.1.4``).
* ``.github/workflows/publish.yml`` lost its ``client-v*`` tag skip
  guard, so the next desktop release would trigger a PyPI publish of
  the Python package.

Restoring both so merging this release into main is a no-op for those
files, and bumping the package version from ``0.4.15`` to ``0.4.16`` so
the tagged release has a unique PyPI artifact. The lockfile update is
only the self-version reference.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-09 21:53:35 +05:30
Prakash Dalai
cb971aab38 chore(client): bump desktop version to 0.1.3 (#652)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 00:15:46 +05:30
Rohit Kushwaha
b1bf0897f0 fix(client): reliable first-install pipeline and production CSP (#583)
* fix(client): reliable first-install pipeline and production CSP

Rewrites the Tauri installer to handle fresh devices with no Python/uv.
Uses a cascading bootstrap: find Python 3.11+ -> install uv -> uv python
install -> fallback to system package manager -> prompt user. Only passes
--uv-available when uv is actually detected. Reads both stdout and stderr
from the installer subprocess so errors are visible in the UI.

Fixes production-only "Failed to load sessions" by adding localhost to CSP
connect-src (production uses tauri.localhost origin, not 127.0.0.1).

Adds Tauri logging plugin (file + stdout + webview) and a TypeScript logger
wrapper with console fallback for non-Tauri environments.

Embeds Claude Code CLI installation in the bootstrap pipeline. Updates
"CLI not found" messages across all agent backends with platform-specific
install commands and alternative backend suggestions.

* fix(lint): reformat test files flagged by ruff

Reformat tests/test_headless_permissions.py and
tests/test_integration_headless.py to satisfy ruff format.
Fix UP038 lint error: use `dict | str` instead of `(dict, str)`.

Closes #584

* fix(client): add missing Command import in context.rs

The macOS active-context detection uses std::process::Command
but the import was missing, causing a build failure on macOS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Prakash <prakashd88@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 22:19:44 +05:30
Prakash Dalai
cbfc76bd41 hotfix(client): v0.1.2 — traffic lights, installer, cross-compile (#565)
* fix(client): use numeric version 0.1.1 for MSI bundler compatibility (#561)

MSI bundler requires numeric-only pre-release identifiers.
0.1.0-alpha.2 broke Tauri builds on all platforms.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): compile-time cfg for Windows process flags (#563)

* fix(client): use compile-time cfg for Windows-only process flags

cfg!(windows) is a runtime check — the compiler still tries to resolve
std::os::windows::process::CommandExt on macOS/Linux, causing 6 errors.
Split into #[cfg(windows)] / #[cfg(not(windows))] helper functions,
matching the pattern already used by _spawn_backend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): macOS traffic lights + non-interactive Unix installer

- Use titleBarStyle: Overlay with decorations: true to show native
  macOS close/minimize/maximize buttons
- Unix installer now downloads installer.py and runs with
  --non-interactive flag, matching the Windows approach. The shell
  wrapper (install.sh) needs a TTY which isn't available from Tauri.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): bump to 0.1.2, disable launcher on Python releases

- Bump desktop client version to 0.1.2
- Remove automatic release trigger from build-launcher.yml — desktop
  builds now ship via publish-client.yml (Tauri). Launcher kept as
  manual-dispatch-only legacy fallback.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 00:55:42 +05:30
Prakash Dalai
ecb124a321 fix(client): use numeric version 0.1.1 for MSI bundler compatibility (#561) (#562)
MSI bundler requires numeric-only pre-release identifiers.
0.1.0-alpha.2 broke Tauri builds on all platforms.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:43:07 +05:30
Prakash Dalai
da4ae097c5 chore: bump versions for release (python 0.4.8, client 0.1.0-alpha.2) (#560)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 23:25:04 +05:30
Rohit Kushwaha
874266977a fix(security): address PR #550 security review blockers and warnings
Tauri client: enable CSP, scope asset protocol to app directories,
set 0600 permissions on OAuth token file (Unix), use proper URL
parsing in proxy validation, add accept timeout to OAuth server thread.

Backend: scan Discord conversation history through injection scanner
before including in LLM context, use XML tags for identity
reinforcement, bound conversation history with deque(maxlen=30) and
TTL eviction, return completed projects from cancel() instead of
raising, add OpenRouter key redaction pattern.

Tests: update identity reinforcement and deep work cancel assertions,
add PII phone/IP overlap tests, add OpenRouter key redaction test.
2026-03-10 23:07:13 +05:30
Rohit Kushwaha
469d654d2f chore(client): remove internal-docs directory 2026-03-10 18:20:12 +05:30
Rohit Kushwaha
4fe3c499b6 feat: client finishing - merge onboarding, install pipeline, and v1 API (#538)
* feat: redesign onboarding wizard with multi-step flow and backend install fixes

Redesign the onboarding experience from a 2-step flow (AI choice + done) into
a 6-step wizard: Welcome (name), Avatar, Theme, Preferences, AI Setup, Ready.
User preferences are persisted to settings and the display name is synced to
USER.md so the agent remembers the user's name across sessions.

Also fixes the backend package install pipeline:
- installBackend() now returns the response body so API errors are surfaced
- Proper loading state ("Installing...") and immediate backend list refresh
- SetupBackend install profiles (minimal/recommended/full) with direct
  installer.py download instead of wrapper scripts
- Port 8888 verification to ensure it's actually PocketPaw responding
- TitleBar moved to layout level so it persists across all app states
- tauri-plugin-dialog added for native folder picker in preferences

* fix: ruff format claude_sdk.py

* fix: backend install pipeline not surfacing errors or updating UI

- installBackend() now returns the response body instead of void, so
  API errors (returned as HTTP 200 with {"error": "..."}) are properly
  caught and shown in toast notifications
- Replace misleading "Installing..." success toast with "installed
  successfully" on actual success
- Replace fragile setTimeout(loadBackends, 3000) with immediate
  await loadBackends() so the backend list refreshes right away
- Install button shows "Installing..." text with spinner during install
- All install buttons disabled while any install is in progress

* refactor: remove install pipeline fixes (moved to separate PR #522)

* fix: ruff format claude_sdk.py

* fix(client): fix PATH detection for macOS GUI apps + redesign install UI

- Augment PATH with common bin dirs (~/.local/bin, /opt/homebrew/bin,
  ~/.cargo/bin, etc.) since Tauri apps don't inherit shell PATH
- 4-tier install detection: direct PATH → known binary paths → uv run → pip show
- Frontend treats has_config_dir as "installed" (not just has_cli)
- Redesigned SetupBackend UI: stepped progress messages, elapsed timer,
  sliding progress bar, latest log line preview, toggle-able full log
- Skip empty lines after ANSI stripping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): missing WorkspaceTabs import + auth error handling + devtools

- Import WorkspaceTabs in TitleBar.svelte (was crashing the entire render
  tree with ReferenceError, causing white screen after successful auth)
- Wrap initializeStores in try/catch so auth failures show error state
  instead of hanging on "Connecting..." forever
- Auto-open devtools in debug builds for easier debugging

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: client v1 API layer, metrics, recent files, and usage tracking

- Add REST client with Bearer auth, 401 refresh, and SSE streaming
- Add WebSocket client with auto-reconnect and heartbeat
- Add metrics page with usage charts and system metrics
- Add recent files API and usage tracker backend modules
- Update agent backends with token usage tracking
- Add chart, popover, and resizable UI components

* feat(client): mode-based left sidebar with files explorer and enhanced chat

- Add route-based sidebar switching: Files sidebar on /, Chat sidebar elsewhere
- New SidebarExplorer with Quick Access, Locations, and Cloud Storage sections
- New SidebarSection reusable collapsible component
- Add pinned/starred sessions with localStorage persistence
- Add filter chips (Today, Starred, With files) to session list
- Add star/pin button on session items
- Active state highlighting on sidebar items matching current path
- Hide New Chat button in files mode (explorer has its own chat panel)

* feat(client): update app icon to PocketPaw puppy logo

Replace abstract circle icon with the PocketPaw puppy-in-pocket logo
from the README. Regenerated all platform variants via tauri icon CLI
(Windows .ico, macOS .icns, iOS, Android, Windows Store logos).

* fix(client): make new chat navigation tab-aware

New chat (sidebar button, Ctrl+N, session click) now only navigates
to /chat when the user is on the files tab (/). On all other pages
it stays on the current page instead of redirecting.

* chore: revert uv.lock changes

* fix: CI lint and test failures

- Restore top-level `import re` in claude_sdk.py for ruff format compat
- Update v1 router count assertion from 22 to 23 (metrics router added)

* fix: use correct setting name codex_cli_model in codex backend

* fix: add get_final_message to _FakeStreamCM test mock

* ci: show ruff format diff before check to debug Linux formatting

* fix: streamline conditional checks and API key validation in ClaudeSDKBackend

* chore: revert CI debug diff step

* chore: remove client docs/plans from branch

* feat(client): auto-update support (#539)

* feat(client): add auto-update support via Tauri updater plugin

Integrates tauri-plugin-updater and tauri-plugin-process to enable
in-app update checking, downloading with progress, and restart.
The About tab now shows a full update flow UI.

* fix(client): only treat pocketpaw as installed when CLI binary is found

Leftover ~/.pocketpaw config directory alone no longer counts as installed.

* fix(client): prevent false positive install detection from uv cache

Add --no-project --isolated flags to the uv run check so it won't
resolve pocketpaw from a local pyproject.toml or cached environments.

* fix(client): fix install detection on Windows

- Use platform-correct PATH separator (semicolon on Windows, colon on Unix)
- Add Windows-specific Python Scripts directories to augmented PATH
- Set CWD to home directory so uv won't resolve from local pyproject.toml

* fix(client): move backend version check to Rust IPC to avoid CORS issues

The built Tauri app runs on https://tauri.localhost which causes
CORS/mixed-content failures when fetching http://localhost:8888 directly.
Added check_pocketpaw_version IPC command using ureq for HTTP from Rust.
Also fixed ANSI regex parse error and hidden installer/backend console windows.

* fix(client): fix OAuth flow in built Tauri app

- Add proxy_post/proxy_get Rust IPC commands to bypass CORS/mixed-content
  issues when the built app (https://tauri.localhost) fetches http://localhost
- Route OAuth token exchange through Rust IPC proxy
- Fix race condition: register oauth-redirect listener before opening browser
- Fix CORS regex to match subdomains like tauri.localhost

* feat(client): add updater public key for auto-update verification

* fix: security and reliability fixes from PR #538 review

- Prevent command injection in install_pocketpaw via profile allowlist
- Restrict proxy_post/proxy_get to localhost only (SSRF prevention)
- Add auth scopes to all metrics endpoints, admin-only for DELETE
- Fix cached token counting (or -> +) in claude_sdk fast path
- Fix pricing lookup to match both alias and dated model names
- Sanitize user_display_name before writing to system prompt file
- Fix Typewriter interval leak on unmount
- Replace $effect with onMount for one-time API calls (SidebarExplorer, TabAbout)
- Use dynamic imports for Tauri plugins to avoid crashes in browser
- Fix SetupBackend timer/poll cleanup on unmount
- Fix Tailwind CSS 4 string interpolation in onboarding components
- Add thread safety to UsageTracker.clear(), prevent negative costs
- Use Path.home() for disk_usage on Windows, remove dead outerClass

---------

Co-authored-by: Prakash <prakashd88@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 18:12:48 +05:30
Rohit Kushwaha
3815047b98 feat: full tool access for non-Claude backends + OpenRouter provider support (#543)
* fix: include shell/fs tools in tool bridge for non-Claude backends

The tool bridge excluded ShellTool, ReadFileTool, WriteFileTool, and
ListDirTool from all backends. This was only correct for claude_agent_sdk
(which provides them natively via the CLI subprocess). Other backends
(openai_agents, google_adk, codex_cli, copilot_sdk, opencode) need these
tools from the bridge to provide full autonomous shell/filesystem access
without requiring Claude Code CLI.

Add a backend parameter to _instantiate_all_tools() and all public bridge
functions. Only claude_agent_sdk excludes shell/fs tools. BrowserTool and
DesktopTool remain excluded for all backends (need special session state).

* chore: remove plan doc from commit

* feat: add first-class OpenRouter provider support

Add "OpenRouter" as a dedicated provider option across the stack:

Backend (llm/client.py):
- resolve_llm_client maps "openrouter" to openai_compatible with
  pre-filled https://openrouter.ai/api/v1 base URL
- to_sdk_env detects OpenRouter URLs and sets ANTHROPIC_AUTH_TOKEN +
  blank ANTHROPIC_API_KEY (required by OpenRouter's Anthropic skin)
- URL normalization strips trailing /v1 for the Anthropic-compat endpoint

Agent backends:
- claude_agent_sdk and openai_agents list "openrouter" in supported_providers
- openai_agents._build_model handles "openrouter" provider directly

Dashboard + Client UI:
- OpenRouter appears as a named option in provider dropdowns
- Dedicated config fields (API key + model) with links to openrouter.ai
- Client settings store maps openrouter API keys correctly

Tests:
- 4 new tests for OpenRouter resolution, env var generation, and URL
  normalization

* fix: address PR #543 review - wire backend params, isolate OpenRouter settings

- Pass explicit backend= at all call sites: openai_agents.py,
  google_adk.py, opencode.py, copilot_sdk.py (C1)
- Add openrouter_api_key and openrouter_model as dedicated Settings
  fields, isolating OpenRouter from openai_compatible fields (C2)
- Add openrouter_api_key to SECRET_FIELDS and _API_KEY_PATTERNS
  with sk-or-v1- prefix validation (W1)
- Use urlparse().hostname for is_openrouter check instead of
  substring matching (W2)
- Add caching comments on _build_custom_tools methods (W3)
- Add comment explaining empty ANTHROPIC_API_KEY for OpenRouter (W4)
- Update client Settings type and API key routing for OpenRouter

* test(credentials): add openrouter_api_key to expected SECRET_FIELDS
2026-03-10 18:08:47 +05:30
Rohit Kushwaha
12a39d0c3d feat(discord): conversation mode, presence control, and admin commands (#545)
* feat(discord): add conversation mode, presence control, admin commands, and channel restrictions

Add conversation mode for Discord channels where the bot participates
naturally in group chat without requiring mentions or slash commands.
The bot uses rolling message history and heuristics (name mentions,
recent activity, question detection) to decide when to respond, and
can opt out with a [NO_RESPONSE] marker to avoid wasting LLM tokens.

New slash commands:
- /ping, /info: utility commands for latency and bot info
- /setstatus: set bot presence (status + activity) with choices UI
- /allowchannel, /blockchannel: manage channel allowlist
- /allowuser, /blockuser: manage user allowlist
- /restrictions: view all current access restrictions
- /converse: toggle conversation mode per channel
- /setname: change the bot's display name

All admin commands require Administrator permission and persist
settings to config.json automatically.

New config fields: discord_allowed_channel_ids,
discord_conversation_channel_ids, discord_bot_name,
discord_status_type, discord_activity_type, discord_activity_text.

Dashboard integration: the Channels modal now exposes Discord settings
(bot name, presence, access control, conversation channels) with a
dedicated save flow, and the channels API returns the new fields.

Streaming in conversation mode buffers silently without a placeholder
message and sends the full response only on stream end, providing a
more natural chat experience.

Also updates Cargo.lock (regex dep) and uv.lock (revision bump).

* fix(claude): simplify API key check for Anthropic provider

* fix(discord): address PR #545 review - admin gate, tests, sanitization

- Add _is_admin check to /info command (C1)
- Add 28 tests for _should_respond, conversation history, context
  formatting, _is_no_response, _is_admin, stream buffering,
  setname sanitization, and presence helpers (C2)
- Use total char budget (12K) for conversation context instead of
  per-message truncation to preserve message quality (W1)
- Sanitize /setname input: strip brackets, cap at 64 chars (W2)
- Add explanatory comment on conversation channel auth bypass (W3)
- Use __bot__ sentinel key for bot messages in history
- Reject activity_text without activity_type in /setstatus
2026-03-10 18:08:01 +05:30
Prakash
3ffd3f8aed fix(client): improve install detection and strip ANSI from installer output
- check_pocketpaw_installed now also tries `uv run pocketpaw --version`
  as fallback when CLI is not directly in PATH (dev installs via uv)
- Strip ANSI escape sequences from installer stdout before emitting
  install-progress events to the frontend (was rendering raw escape codes)
- Add `regex` crate dependency for ANSI stripping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 14:08:34 +05:30
Prakash
62f0369ec8 fix(client): fix Linux build — temporary value lifetime and unused var
- Bind `format!()` result to `xterm_cmd` variable before borrowing as
  `&str` in terminal launcher array (fs_commands.rs:444)
- Prefix unused `profile` parameter with underscore in
  `install_pocketpaw` (commands.rs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 12:34:46 +05:30
Prakash
ed66465bea fix(client): use #[cfg(windows)] for Windows-only process creation flags
The `cfg!(windows)` runtime check doesn't prevent compilation of
Windows-specific imports (`std::os::windows::process::CommandExt`)
and methods (`creation_flags`) on non-Windows targets.

Split into two `#[cfg]` functions so the Windows-only code is
conditionally compiled, fixing macOS and Linux Tauri builds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 11:56:52 +05:30
Prakash Dalai
fdf128120d feat(deep-work): v2 engine — retry, timeout, cancel, output chaining, PawKit schema (#375)
* feat: merge desktop client into monorepo under client/

Move the Tauri 2.0 + SvelteKit desktop client from the separate
pocketpaw-client repo into client/ to create a monorepo. Update
.gitignore with client build artifact ignores and add Desktop Client
section to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): unignore client/src/lib and broaden node/sveltekit ignores

The root .gitignore `lib/` pattern was blocking client/src/lib/ from
being tracked. Anchor it to `/lib/` so only the root Python lib dir is
ignored. Also generalize node_modules/ and .svelte-kit/ patterns to
work at any depth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): fix white OAuth screen on Windows

Load a local loading page first in the OAuth popup window, then
navigate to the external OAuth URL via eval(). WebView2 on Windows
may not be fully initialized when WebviewUrl::External is used
directly, resulting in a permanently white window.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): replace WebView OAuth popup with system browser + localhost server

WebView2 secondary windows fail to render on Windows (white/transparent screen).
Replace the OAuth popup with a temporary localhost HTTP server that captures the
callback, and open the authorize URL in the system browser instead.

Also pre-create sidepanel and quickask windows in tauri.conf.json (with
visible: false) so they initialize alongside the main window, avoiding the
same WebView2 rendering issue with dynamically-created transparent windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add multi-mode workspace client design

Design for transforming the desktop client into a full workspace IDE
with tabbed workspaces, tiling layout engine, pluggable widgets,
real-time agent collaboration, unified file management (local + remote
+ cloud), and responsive mobile support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add multi-mode workspace implementation plan

Detailed 6-phase implementation plan with ~49 new files across Rust
backend (fs commands, PTY, git, widget windows), SvelteKit frontend
(tiling layout, Monaco editor, file previews, widget system, terminal),
filesystem providers (local, remote, cloud), and co-work features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: rewrite design as AI file explorer (Poly.app-inspired)

Complete redesign from VS Code-like IDE to file-explorer-first UI.
Primary interface is a visual file grid with rich thumbnails and
5 view modes (Icon, Grid, List, Column, Gallery). AI chat lives
in a collapsible right sidebar with folder/file context awareness.
Agent actions (create, edit, delete files) reflect in the grid
in real-time. Terminal output is inline in chat, not a separate panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): add file explorer with list view, search/filter, and context menu

Implements a full file explorer with Rust-backed filesystem operations
(read, write, delete, rename, watch, thumbnails), multiple view modes
(icon grid + list table), inline search/filter, and an enhanced context
menu with rename, new folder, and keyboard shortcuts (Ctrl+F, F2, Del).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(deep-work): add v2 engine — retry, timeout, cancel, output chaining, PawKit schema

Deep Work v2 hardens the execution engine and lays the foundation for
PawKit-based Command Centers. This is the first WIP PR toward the
blueprints-strategy vision.

Engine improvements:
- Task retry: auto-retry failed tasks up to configurable max_retries
- Task timeout: per-task asyncio.wait_for with timeout_minutes
- Output storage: task.output field for cross-task chaining
- Error tracking: task.error_message for diagnostics
- Project cancellation: CANCELLED status, stop_all_project_tasks,
  skip pending tasks with error_message
- Manual retry API: POST /projects/{id}/tasks/{tid}/retry

New PawKit config schema v0.1:
- Pydantic v2 models for Command Center templates
- Layout (panels, sections), workflows, user_config, integrations
- YAML load/save utilities with PyYAML

Files changed:
- src/pocketpaw/mission_control/models.py — 5 new Task fields
- src/pocketpaw/deep_work/models.py — TaskSpec v2 + CANCELLED status
- src/pocketpaw/mission_control/executor.py — retry, timeout, output, stop_all
- src/pocketpaw/deep_work/session.py — cancel(), materialize v2 fields
- src/pocketpaw/deep_work/api.py — cancel + retry endpoints
- src/pocketpaw/deep_work/__init__.py — cancel_project export
- src/pocketpaw/deep_work/pawkit.py — NEW: PawKit config schema
- tests/test_deep_work_v2.py — 71 new tests
- tests/test_mission_control_executor.py — adapted for retry defaults

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test(deep-work): add 21 E2E tests for v2 engine features

API-level E2E tests using httpx.AsyncClient with ASGI transport.
Real file-based store, session, scheduler, and executor — only the
agent backend (LLM calls) is mocked.

Coverage: full lifecycle, output chaining, auto-retry, timeout,
cancellation, manual retry API, get plan API, skip task API,
and PawKit YAML round-trip.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs(deep-work): add v2 feature docs — retry, timeout, cancel, output chaining, PawKit

Updated the Deep Work guide with new sections covering auto-retry,
task timeout, output chaining, project cancellation, and PawKit
template format. Added API endpoint pages for Cancel Project and
Retry Task. Updated sidebar navigation in docs-config.json.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add Command Centers concept page and PawKit technical reference

New standalone pages for the two biggest ideas in the v2 engine:

- docs/concepts/command-centers.mdx — the "why": agent-operated
  dashboards, PawKits as templates, conversational building,
  Kit Store marketplace, how it all connects
- docs/advanced/pawkit.mdx — the "how": full YAML schema reference
  with panel types, workflow triggers, user config fields,
  integrations, and Python API examples

Trimmed the PawKit section in deep-work.mdx to a cross-reference
since the content now lives in dedicated pages. Updated sidebar
navigation with both new entries.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): enhance file explorer with viewers, clipboard, and editor save

Add file preview support (audio, video, PDF, markdown with syntax highlighting),
copy/cut/paste with keyboard shortcuts, file properties dialog, open-in-terminal,
editable code editor with Ctrl+S save and dirty tracking, and improved AI model
settings panel with Ollama model fetching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): migrate stores to REST-first architecture, WS push-only

Move all request-response flows (sessions, chat, settings) to REST HTTP.
WebSocket is now exclusively for server-initiated push events.

- Add createSession() REST method to client
- Remove WS convenience methods (chat, newSession, switchSession, etc.)
- Remove bindEvents/disposeEvents from all stores
- Rewrite sessionStore to use POST /sessions and REST history
- Rewrite settingsStore.saveApiKey to use PUT /settings
- Simplify connectionStore (remove sessionId, connection_info listener)
- Simplify initializeStores (no more bindEvents calls)
- Clean up WS types (remove chat/session event types)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(api): REST-first architecture, fix WS dual-delivery and persistent client bugs (#384)

Move all request-response flows to REST HTTP. WebSocket is now push-only.
Fixes dual-delivery bug where SSE chat responses were broadcast to all WS
clients, and persistent Claude SDK client issues with stale data across sessions.

Backend changes:
- Add POST /sessions endpoint with SessionCreateResponse schema
- Fix WS adapter send() — drop messages for unknown chat_ids instead of broadcasting
- Fix WS adapter on_system_event() — route by session_key, not broadcast
- Enhance PUT /settings with runtime side-effects (reset_router + memory reload)
- Add cancel_task() to AgentLoop — lightweight cancellation without stopping router
- Fix _on_done callback race — don't remove newer task's entry from _active_tasks
- Add session lock contention logging for diagnostics

Chat streaming fixes:
- Cancel in-flight SSE streams when new request arrives for same session
- Only cancel agent tasks when there IS a competing stream (not on every request)
- Add diagnostic logging to SSE bridge event delivery

Claude SDK persistent client fixes:
- Include session_key in persistent client key — different sessions get fresh subprocesses
- Drain trailing ResultMessage from subprocess pipe after each query to prevent
  stale data on subsequent queries (root cause of "second message shows first response")
- Add dispatch/event logging for persistent vs stateless path diagnostics

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat(api): add PawKits system + MC/DW route mounting for serve command

- Add kits module (models, store, catalog, builtin YAML kits)
- Add kits API router with CRUD, catalog, and data resolution endpoints
- Add api:agents and api:standup source resolvers in kits data resolution
- Mount MC and DW routers in serve.py (was only in dashboard.py)
- Fix standup resolver to use manager.generate_standup()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: merge desktop client into monorepo (#290)

* feat: merge desktop client into monorepo under client/

Move the Tauri 2.0 + SvelteKit desktop client from the separate
pocketpaw-client repo into client/ to create a monorepo. Update
.gitignore with client build artifact ignores and add Desktop Client
section to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): unignore client/src/lib and broaden node/sveltekit ignores

The root .gitignore `lib/` pattern was blocking client/src/lib/ from
being tracked. Anchor it to `/lib/` so only the root Python lib dir is
ignored. Also generalize node_modules/ and .svelte-kit/ patterns to
work at any depth.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): fix white OAuth screen on Windows

Load a local loading page first in the OAuth popup window, then
navigate to the external OAuth URL via eval(). WebView2 on Windows
may not be fully initialized when WebviewUrl::External is used
directly, resulting in a permanently white window.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix(client): replace WebView OAuth popup with system browser + localhost server

WebView2 secondary windows fail to render on Windows (white/transparent screen).
Replace the OAuth popup with a temporary localhost HTTP server that captures the
callback, and open the authorize URL in the system browser instead.

Also pre-create sidepanel and quickask windows in tauri.conf.json (with
visible: false) so they initialize alongside the main window, avoiding the
same WebView2 rendering issue with dynamically-created transparent windows.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add multi-mode workspace client design

Design for transforming the desktop client into a full workspace IDE
with tabbed workspaces, tiling layout engine, pluggable widgets,
real-time agent collaboration, unified file management (local + remote
+ cloud), and responsive mobile support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add multi-mode workspace implementation plan

Detailed 6-phase implementation plan with ~49 new files across Rust
backend (fs commands, PTY, git, widget windows), SvelteKit frontend
(tiling layout, Monaco editor, file previews, widget system, terminal),
filesystem providers (local, remote, cloud), and co-work features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: rewrite design as AI file explorer (Poly.app-inspired)

Complete redesign from VS Code-like IDE to file-explorer-first UI.
Primary interface is a visual file grid with rich thumbnails and
5 view modes (Icon, Grid, List, Column, Gallery). AI chat lives
in a collapsible right sidebar with folder/file context awareness.
Agent actions (create, edit, delete files) reflect in the grid
in real-time. Terminal output is inline in chat, not a separate panel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): add file explorer with list view, search/filter, and context menu

Implements a full file explorer with Rust-backed filesystem operations
(read, write, delete, rename, watch, thumbnails), multiple view modes
(icon grid + list table), inline search/filter, and an enhanced context
menu with rename, new folder, and keyboard shortcuts (Ctrl+F, F2, Del).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): enhance file explorer with viewers, clipboard, and editor save

Add file preview support (audio, video, PDF, markdown with syntax highlighting),
copy/cut/paste with keyboard shortcuts, file properties dialog, open-in-terminal,
editable code editor with Ctrl+S save and dirty tracking, and improved AI model
settings panel with Ollama model fetching.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): migrate stores to REST-first architecture, WS push-only

Move all request-response flows (sessions, chat, settings) to REST HTTP.
WebSocket is now exclusively for server-initiated push events.

- Add createSession() REST method to client
- Remove WS convenience methods (chat, newSession, switchSession, etc.)
- Remove bindEvents/disposeEvents from all stores
- Rewrite sessionStore to use POST /sessions and REST history
- Rewrite settingsStore.saveApiKey to use PUT /settings
- Simplify connectionStore (remove sessionId, connection_info listener)
- Simplify initializeStores (no more bindEvents calls)
- Clean up WS types (remove chat/session event types)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): full Mission Control integration — agents, execution, projects, notifications

- Add MC/DW types (AgentProfile, MCTask, MCMessage, MCProject, etc.)
- Add 25+ API methods (mcRequest + dwRequest helpers) for agents, tasks, execution, notifications, projects
- Add mcStore (agents, running tasks, execution streaming, notifications) and projectStore (project lifecycle, planning)
- Add AgentRoster panel with CRUD, KanbanBoard enhancements (assignment, run/stop, messages, running indicator)
- Add TaskExecutionPanel slide-over for live agent streaming
- Add NotificationBell in titlebar with unread badge
- Add StandupPanel and document viewer/editor in DataTable
- Add /projects route with creation wizard, plan review, lifecycle controls
- Remove internal-docs from git tracking
- Rename tabs: Deep Work → PawKits, Projects → Deep Work

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): add PawKits catalog, layout renderer, and remaining panel components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(api): add PawKits system + MC/DW route mounting for serve command

- Add kits module (models, store, catalog, builtin YAML kits)
- Add kits API router with CRUD, catalog, and data resolution endpoints
- Add api:agents and api:standup source resolvers in kits data resolution
- Mount MC and DW routers in serve.py (was only in dashboard.py)
- Fix standup resolver to use manager.generate_standup()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: add plans and update lockfile

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove plans and revert uv.lock

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve merge breakages in chat, context builder, and MC routes

- Add missing FileContext model and field to ChatRequest schema
- Add file_context parameter to build_system_prompt()
- Move /tasks/running route before /tasks/{task_id} to fix 404
- Remove unused TaskStatus import in kits.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: resilient SDK streaming, in-app file viewer, and explorer tool

- Replace _safe_iter with _resilient_receive to handle MessageParseError
  by re-creating the iterator instead of losing the stream
- Add file-open command interception (start, xdg-open, etc.) to redirect
  to the in-app explorer viewer via PreToolUse hook
- Add /api/files/content endpoint for serving file contents with MIME types
- Add explorer built-in tool and open_in_explorer CLI command
- Update dashboard frontend with file viewer modal and transparency fixes
- Set SDK stream close timeout to 24h for long-running tool use
- Suppress API-key errors in ResultMessage to avoid noisy logs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat(client): tabbed explorer, file viewers, command palette, and onboarding refresh

- Add multi-tab explorer with history, file type filtering, and address bar
- Implement PDF, spreadsheet, notebook, document, and text preview viewers
- Add command palette (Ctrl+K) with fuzzy search
- Overhaul onboarding wizard with model search and backend setup
- Add Tauri fs commands for file content and metadata
- Improve chat input, file preview, and session dropdown
- Update dialog components and workspace tabs
- Add content preview caching and binary utils for file handling

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Rohit Kushwaha <technicalrohit06@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Rohit Kushwaha <rohitk290106@gmail.com>
2026-03-07 21:02:27 +05:30