Commit Graph
386 Commits
Author SHA1 Message Date
Jon Saad-FalconandClaude Opus 4.6 7fd247be7e feat: wire Slack Socket Mode listener to channel bind/unbind
When user connects Slack in the Messaging tab, the backend now creates
a SlackChannel with Socket Mode, registers a handler that routes incoming
DMs to DeepResearchAgent, and starts listening. Unbinding disconnects
the Socket Mode client.

Requires slack-sdk installed and both bot_token (xoxb-) + app_token (xapp-).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 20:44:55 -07:00
Jon Saad-FalconandClaude Opus 4.6 e5477e89fe fix: preserve telemetry metadata when polling refreshes messages
The 2-second polling interval was replacing local messages (with _usage,
_telemetry) with server messages (without those fields). Now stores
metadata in a ref and merges it back when polling refreshes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 20:06:14 -07:00
Jon Saad-FalconandClaude Opus 4.6 e9fe9be035 feat: add full telemetry footer to agent Interact responses
Shows engine, model, tokens, speed, latency, tool calls — matching
the Chat tab's XRayFooter UX. Click to expand detailed view.
Backend streams usage + telemetry in final SSE chunk.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:54:22 -07:00
Jon Saad-Falcon df129790f9 Merge branch 'feat/deep-research-setup' 2026-03-27 19:46:55 -07:00
Jon Saad-FalconandClaude Opus 4.6 f69c400896 fix: resolve stuck thinking bubble and add response metadata footer in InteractTab
The progress indicator now only shows when waitingForResponse or sending
is true, preventing it from persisting after the response arrives due to
stale isAgentWorking/hasPending checks. Agent response bubbles now display
elapsed time, tool call count, and a copy button in an XRay-style footer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:35:16 -07:00
Jon Saad-FalconandClaude Opus 4.6 a3f355034f fix: learning log entries now write correctly, clean up debug logging
Learning log entries (query_start, tool_call, tool_result, query_complete)
now persist to SQLite and appear in the Logs tab. Fixed result.output->content
attribute name and removed debug print statements.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 19:27:42 -07:00
Jon Saad-Falcon 7a6be1d45e debug: add logging for learning log writes 2026-03-27 19:22:16 -07:00
Jon Saad-Falcon 4c8b4e17e6 fix: correct store_agent_response args, fix result.output->content, add log warnings 2026-03-27 19:20:50 -07:00
Jon Saad-FalconandClaude Opus 4.6 d2df7d083e feat: real-time tool progress + live logs for DeepResearch agent
- InteractTab shows streaming content word-by-word with tool progress
- LogsTab polls every 5s, shows learning log entries with color-coded badges
- Backend emits tool_progress SSE events during agent execution
- Learning log entries written for query_start, tool_call, tool_result, query_complete
- "Run Now" replaced with "Chat ready" indicator on Interact tab

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:31:23 -07:00
Jon Saad-FalconandClaude Opus 4.6 c079197c4e fix: improve Interact tab UX and add real-time activity logging
- Replace "Run Now" button with "Chat ready" hint when on the Interact
  tab so users know they can just type a message without pressing Run.
- Add learning log entries in generate_deep_research() for query start,
  tool calls, tool results, query completion, and errors so interactive
  queries are visible in the Logs tab.
- Rewrite LogsTab to poll every 5 seconds, merge execution traces with
  learning log entries into a unified timeline sorted by timestamp.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:26:57 -07:00
Jon Saad-FalconandClaude Opus 4.6 de91fe6ecf feat: add real-time streaming and tool progress to InteractTab
Refactor sendAgentMessage to accept onProgress/onContentDelta/onDone
callbacks so the InteractTab can show content as it arrives word by
word, display tool-call progress labels (e.g. "Querying data with
SQL"), and render an elapsed-time footer. The backend now streams
tool_progress SSE events from DeepResearchAgent before the final
content, matching the Chat tab's polished streaming UX.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:17:10 -07:00
Jon Saad-FalconandClaude Opus 4.6 bd22eeae1e fix: show 'Researching your data...' indicator while agent processes query
Added waitingForResponse state that stays true during the entire stream
consumption. Shows a pulsing indicator with descriptive text so the user
knows the agent is working (searching, analyzing, writing report).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:06:22 -07:00
Jon Saad-FalconandClaude Opus 4.6 7f7cf5ccd9 fix: show agent response in chat bubble + auto-ingest after connector connect
1. InteractTab now displays the streamed agent response as a bubble
   immediately after it finishes (was being discarded)
2. Connecting a source auto-triggers background ingest into KnowledgeStore
   so Google Drive data appears with chunk counts immediately

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 18:00:14 -07:00
Jon Saad-FalconandClaude Opus 4.6 9f204e8368 fix: poll connector status after OAuth connect, auto-refresh every 10s
The Google OAuth flow runs in a background thread. The frontend now polls
every 3s after connecting to detect when the token arrives, and auto-refreshes
every 10s to catch background completions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:51:54 -07:00
Jon Saad-FalconandClaude Opus 4.6 28d4cc7454 fix: run DeepResearchAgent with tools for managed agent streaming
The streaming endpoint was calling engine.stream_full() directly without
tools, so the agent responded as a generic chatbot. Now detects
deep_research agent type and runs the full DeepResearchAgent.run() loop
with knowledge_search, knowledge_sql, scan_chunks, and think tools,
then streams the result as SSE.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:45:32 -07:00
Jon Saad-Falcon 490870a25c fix: show user message bubble immediately before waiting for agent response 2026-03-27 17:42:37 -07:00
Jon Saad-Falcon 8549324d28 fix: check port availability before starting OAuth callback server 2026-03-27 17:39:59 -07:00
Jon Saad-FalconandClaude Opus 4.6 53a20fde30 fix: run Google OAuth flow in background thread to prevent server freeze
The OAuth callback server blocks with handle_request(). Running it in a
daemon thread prevents it from freezing the FastAPI event loop.
Also accept system_prompt kwarg in DeepResearchAgent.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:24:46 -07:00
Jon Saad-FalconandClaude Opus 4.6 b38d5565b0 fix: send stream:true for agent messages so backend actually runs the LLM
The Interact tab was sending messages without stream:true, so the backend
just stored them as pending without running the agent. Now consumes the
SSE stream and displays the full response.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:12:38 -07:00
Jon Saad-FalconandClaude Opus 4.6 bec38ebc1d docs: add Channels & Connectors troubleshooting guide
Covers setup instructions and troubleshooting for all 12 connectors:
Gmail, Google Drive, Calendar, Contacts, Slack, Notion, Granola,
Apple Notes, iMessage, Outlook, Obsidian, Dropbox.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 17:01:17 -07:00
Jon Saad-Falcon fcc146b050 fix: split Google OAuth into separate Client ID and Client Secret fields 2026-03-27 16:51:53 -07:00
Jon Saad-FalconandClaude Opus 4.6 62b98d903b feat: add proper Google OAuth flow with localhost callback server
Add exchange_google_token() and run_oauth_flow() to oauth.py for the
full authorization code exchange. Update gdrive, gcalendar, and
gcontacts connectors to trigger the browser-based OAuth flow when a
client_id:client_secret pair is provided, prefer access_token over raw
token, and require an actual access_token for is_connected(). auth_url()
now returns the Cloud Console credentials page when no client_id is
stored.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:45:03 -07:00
Jon Saad-FalconandClaude Opus 4.6 8d9eed6533 feat: add Reconnect button to connected sources, show warning for 0-data sources
Connected sources now show a "Reconnect" button that expands the inline setup
flow to re-enter credentials. Sources with 0 chunks show "Connected — no data
synced yet" in amber instead of "0 items" in green.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:30:01 -07:00
Jon Saad-FalconandClaude Opus 4.6 6c9ede1756 fix: merge Gmail IMAP into single "Gmail" channel entry
Remove duplicate gmail OAuth entry, rename gmail_imap to gmail in frontend
so it matches the backend connector ID that has the actual data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:21:36 -07:00
Jon Saad-FalconandClaude Opus 4.6 175a13492f fix: improve Channels tab UX — larger fonts, per-source labels, detailed setup instructions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:00:05 -07:00
Jon Saad-Falcon 31eb2e4317 fix: use /v1/connectors prefix so frontend API calls work 2026-03-27 15:50:24 -07:00
Jon Saad-FalconandClaude Opus 4.6 ae73eca91a feat: replace Channels tab with data sources + add Messaging tab
Rewrite ChannelsTab to show connector data sources (Gmail, Slack, Notion,
etc.) with chunk counts, connected/not-connected states, and inline setup
with step-by-step instructions. Add new MessagingTab for phone/platform
messaging (iMessage, Slack, WhatsApp, SMS). Update DETAIL_TABS to include
both tabs with Database and Wifi icons respectively.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:40:50 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 7cdbf53143 feat: include chunk counts in connector list API response
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:38:04 -07:00
Jon Saad-FalconandClaude Opus 4.6 6cc33cb294 docs: add implementation plan for Channels + Messaging tabs v2
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:36:14 -07:00
Jon Saad-FalconandClaude Opus 4.6 e6317c88d1 docs: add design spec for Channels + Messaging tabs (replacing old Channels tab)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:32:51 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 af53d51e58 feat: add StepByStepPanel with per-connector setup instructions
Adds StepByStepPanel component to SourceConnectFlow that renders numbered
setup steps with optional links and input fields for each connector. Wires
it as the primary panel for any connector with steps defined, with existing
OAuth/Local/Filesystem panels as fallbacks. Also updates connectors.ts to
use ConnectorMeta (with SetupStep/inputFields) as the canonical type and
exports SourceCard as a backward-compatible alias.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:07:03 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 639c641618 feat: add per-connector setup instructions and input fields to SOURCE_CATALOG
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:05:55 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 5aa5cd8c9e feat: add Channels tab to agent detail view with connect/disconnect UI
Adds iMessage, Slack, WhatsApp, and SMS (Twilio) channel binding UI to
the agent detail view, with expandable connect forms and active/disconnect states.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:04:12 -07:00
Jon Saad-FalconandClaude Sonnet 4.6 1e6b7f181a feat: start/stop iMessage daemon on channel bind/unbind
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 15:03:14 -07:00
Jon Saad-FalconandClaude Opus 4.6 1e37235d0d docs: add implementation plan for Channels tab + connector setup UX
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:01:05 -07:00
Jon Saad-FalconandClaude Opus 4.6 f6e20632df docs: add design spec for Channels tab + seamless connector setup
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:54:44 -07:00
Jon Saad-FalconandClaude Opus 4.6 c36695a399 fix: parallel section titles — Agent Statistics, Local Utilization, Dollars Saved vs.
Remove "Cloud Savings for Agent" card title. Add "Agent Statistics"
as section title over the usage metrics, aligned with "Local
Utilization" and "Dollars Saved vs." — all three sections now have
matching uppercase labels at the same vertical position.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:46:37 -07:00
Jon Saad-FalconandClaude Opus 4.6 4cbe29c027 fix: section titles "Local Utilization" and "Dollars Saved vs."
Three grouped sections inside the savings card, separated by
vertical dividers: usage metrics | Local Utilization (compute,
energy) | Dollars Saved vs. (GPT-5.3, Claude, Gemini). Section
titles are small uppercase labels above each group.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:39:58 -07:00
Jon Saad-FalconandClaude Opus 4.6 c013bc82f0 fix: add "SAVED vs." label before cloud provider cost comparisons
Vertical "SAVED vs." label between the divider and provider costs
makes it clear the dollar amounts represent money avoided by
running locally instead of using cloud APIs.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:32:12 -07:00
Jon Saad-FalconandClaude Opus 4.6 22fa74bc36 fix: unified savings card with dividers, large values, clean layout
Single card with "Cloud Savings for Agent" header. All metrics
(queries, tokens, compute, energy, dollar savings) in one flex row
with vertical dividers separating usage | compute+energy | costs.
Large bold values above small labels. Consistent typography.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:24:43 -07:00
Jon Saad-FalconandClaude Opus 4.6 54d5a4a4c0 fix: single row for stats + savings, value above label, consistent style
All bubbles (Total Queries, Input Tokens, Output Tokens, Compute,
Energy, and per-provider dollar savings) now sit in one flex row
under "Cloud Savings for Agent". Each bubble has the value (bold)
above the label, with consistent styling. Green for savings values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:20:05 -07:00
Jon Saad-FalconandGitHub 15e98498f6 feat: Personal Deep Research — connectors, retrieval, agent, channels, desktop (#78)
feat: Personal Deep Research — connectors, retrieval, agent, channels, desktop
2026-03-27 14:13:26 -07:00
Jon Saad-FalconandClaude Opus 4.6 ce1d41bec5 fix: compact left-aligned stats and savings in flex rows
Usage stats (Total Queries, Input Tokens, Output Tokens) and Cloud
Savings (Compute, Energy, Dollar Savings) now use flex rows with
compact padding, left-aligned, wrapping naturally without filling
the full width.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:12:49 -07:00
Jon Saad-FalconandClaude Opus 4.6 421560e75b fix: reorder overview — config then stats then compact savings
Overview tab order: Instruction → Configuration → Usage Stats
(queries/tokens in centered boxes) → Cloud Savings (compact flex
row, left-aligned, smaller padding).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:06:46 -07:00
Jon Saad-FalconandClaude Opus 4.6 258feff64e fix: skip torch-dependent tests when torch not installed in CI
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:01:30 -07:00
Jon Saad-FalconandClaude Opus 4.6 30bb67b125 fix: green savings in 3 boxes, inject current date into agent ticks
1. Cloud Savings for Agent: Compute, Energy, Dollar Savings in
   separate boxes in a row, all values green
2. Agents now receive current date in their input text so they
   know what day it is for time-sensitive research queries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 14:01:25 -07:00
Jon Saad-FalconandClaude Opus 4.6 c9534967fc fix: interval hrs/min picker, per-agent savings with FLOPs/energy
1. Interval schedule now uses hours + minutes picker (max 24h)
   instead of raw seconds input
2. Cloud Savings section is now per-agent (computed from agent's
   own token counts), not session-wide
3. Shows FLOPs, Energy (kJ), and per-provider savings comparison
   (GPT-5.3, Claude Opus 4.6, Gemini 3.1 Pro)
4. Removed kWh per-provider (inaccurate), replaced with compact
   FLOPs + Energy row above provider savings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:54:12 -07:00
Jon Saad-Falcon 0bc43eec39 fix: add system_prompt to template for CI test compatibility 2026-03-27 13:48:31 -07:00
Jon Saad-FalconandClaude Opus 4.6 4534abbea5 feat: model Change button, agent telemetry, savings display, Total Queries
1. Intelligence row has explicit "Change" button with loading state
2. Agent ticks now wrapped with InstrumentedEngine so FLOPs, energy,
   and cost savings are recorded in telemetry
3. Overview shows Cloud Savings section (per-provider: cost saved, kWh)
4. Stat cards show Total Queries, Input Tokens, Output Tokens
5. "Total Runs" renamed to "Total Queries" everywhere

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:45:50 -07:00
Jon Saad-FalconandClaude Opus 4.6 db64abec23 fix: add schedule_value to template, skip server tests when fastapi missing
- personal_deep_research.toml: add schedule_value="" for template test compat
- test_deep_research_tools_wiring: skip when fastapi not installed in CI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 13:42:43 -07:00