Skip to content

feat: add clipboard and screenshot watchers to passive learning daemon#55

Merged
keeganthomp merged 5 commits intomainfrom
claude/review-roadmap-YOwew
Apr 10, 2026
Merged

feat: add clipboard and screenshot watchers to passive learning daemon#55
keeganthomp merged 5 commits intomainfrom
claude/review-roadmap-YOwew

Conversation

@keeganthomp
Copy link
Copy Markdown
Owner

Add two new daemon sources that can be enabled via config.toml or CLI flags:

  • Clipboard watcher: polls system clipboard for new text content, auto-ingests
    when it meets a minimum length threshold. Supports macOS (pbpaste), Linux
    (wl-paste, xclip, xsel), and Windows (powershell). Deduplicates via SHA-256
    hash so the same content isn't ingested twice.

  • Screenshot watcher: monitors the OS screenshots folder for new image files,
    auto-ingests through the existing image/vision pipeline. Auto-detects the
    default screenshot directory per platform (macOS Desktop/Screenshots, Linux
    ~/Pictures/Screenshots, Windows Pictures/Screenshots).

Config options (config.toml):
[watch.clipboard]
enabled = false
min_length = 100
poll_interval_ms = 2000

[watch.screenshots]
enabled = false
path = "~/Pictures/Screenshots" # optional, auto-detected
glob = "*.{png,jpg,jpeg,webp,gif,bmp,tiff}"

CLI overrides:
kib watch --clipboard # enable clipboard watching
kib watch --no-clipboard # disable clipboard watching
kib watch --screenshots # enable screenshot watching
kib watch --no-screenshots # disable screenshot watching

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR

claude added 4 commits April 10, 2026 03:03
Add two new daemon sources that can be enabled via config.toml or CLI flags:

- Clipboard watcher: polls system clipboard for new text content, auto-ingests
  when it meets a minimum length threshold. Supports macOS (pbpaste), Linux
  (wl-paste, xclip, xsel), and Windows (powershell). Deduplicates via SHA-256
  hash so the same content isn't ingested twice.

- Screenshot watcher: monitors the OS screenshots folder for new image files,
  auto-ingests through the existing image/vision pipeline. Auto-detects the
  default screenshot directory per platform (macOS Desktop/Screenshots, Linux
  ~/Pictures/Screenshots, Windows Pictures/Screenshots).

Config options (config.toml):
  [watch.clipboard]
  enabled = false
  min_length = 100
  poll_interval_ms = 2000

  [watch.screenshots]
  enabled = false
  path = "~/Pictures/Screenshots"  # optional, auto-detected
  glob = "*.{png,jpg,jpeg,webp,gif,bmp,tiff}"

CLI overrides:
  kib watch --clipboard       # enable clipboard watching
  kib watch --no-clipboard    # disable clipboard watching
  kib watch --screenshots     # enable screenshot watching
  kib watch --no-screenshots  # disable screenshot watching

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR
When enabled, the extension automatically saves page content to kib after
the user spends a configurable amount of time on a page (default: 30s).

Background service worker tracks:
- Active tab focus/unfocus (pauses timer when browser loses focus)
- Tab switches and URL changes (resets timer)
- Deduplicates by normalized URL (won't capture the same page twice)
- Health-checks kib before attempting capture
- Shows a brief green checkmark badge on successful auto-capture

Popup UI additions:
- Toggle switch for auto-capture (on/off) at the bottom of the popup
- Slider to configure dwell time threshold (10s–120s, 5s increments)
- Settings persist in chrome.storage.local
- Clear "Auto-capture: Save pages after Xs" / "Off" description

Manifest changes:
- Added `tabs` permission (required for tab event listeners)
- Added `storage` permission (required for chrome.storage.local)

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR
Periodically scans browser history for recently visited pages and sends
them to kib for automatic ingestion via the web extractor.

Background service worker:
- Scans chrome.history API on a configurable interval (default: 15 min)
- Configurable lookback window (default: last 60 min of history)
- Deduplicates URLs against both session captures and a persisted set
  (capped at 5000 URLs in chrome.storage.local)
- Skips non-content URLs: search engines, login pages, localhost, etc.
- Checks kib health before each scan; stops early on connection errors
- Restarts scanner when settings change or service worker restarts

Popup settings UI:
- Toggle for "History sync" with on/off state
- "Scan every" slider: 5–60 min in 5 min steps
- "Look back" slider: 15–480 min in 15 min steps
- Live description: "Every 15 min, last 60 min" / "Off"

Daemon HTTP server:
- /ingest endpoint now accepts URL-only POST requests (no content field)
- When URL is provided without content, enqueues URL directly for the
  web extractor to fetch and parse
- Supports optional `source` field ("history") for tracking

Manifest: added `history` permission.

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR
…e learning features

- README: expanded watch daemon section with all 5 ingestion channels
  (inbox, HTTP, folders, clipboard, screenshots) plus Chrome extension
  auto-capture and history sync. Added config.toml examples for new options.
- ROADMAP: checked off passive learning daemon items (auto-capture, clipboard,
  screenshots, browser history, background daemon)
- CLI: updated watch command description and help text
- Core README: added clipboard/screenshot watchers to daemon module description
- CLI README: added clipboard, screenshot, and Chrome extension descriptions
- Marketing site: removed "coming soon" from Chrome extension, added passive
  learning feature, updated MCP tools count to 11
- CLAUDE.md: added passive learning daemon section with all watch sources,
  Chrome extension capabilities, and CLI flags

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kib Ready Ready Preview, Comment Apr 10, 2026 3:18am

Request Review

The `"soon" in f` check referenced a property that no longer exists on
any feature item after removing the Chrome extension's coming-soon flag,
causing a Next.js type error during build.

https://claude.ai/code/session_01AE8fsbfqBBkP3GcJWLLxmR
@keeganthomp keeganthomp merged commit 7c99b05 into main Apr 10, 2026
3 checks passed
@keeganthomp keeganthomp deleted the claude/review-roadmap-YOwew branch April 10, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants