spooling 0.2.18__tar.gz → 0.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {spooling-0.2.18/spooling.egg-info → spooling-0.4.0}/PKG-INFO +48 -93
  2. {spooling-0.2.18 → spooling-0.4.0}/README.md +41 -89
  3. {spooling-0.2.18 → spooling-0.4.0}/pyproject.toml +9 -4
  4. {spooling-0.2.18 → spooling-0.4.0}/spooling/__init__.py +1 -1
  5. {spooling-0.2.18 → spooling-0.4.0}/spooling/cli.py +3 -51
  6. {spooling-0.2.18 → spooling-0.4.0}/spooling/cloud.py +25 -1
  7. {spooling-0.2.18 → spooling-0.4.0}/spooling/db.py +7 -0
  8. spooling-0.4.0/spooling/evals.py +537 -0
  9. spooling-0.4.0/spooling/experiments.py +307 -0
  10. {spooling-0.2.18 → spooling-0.4.0}/spooling/ingest.py +1 -1
  11. {spooling-0.2.18 → spooling-0.4.0}/spooling/mcp_server.py +2 -2
  12. {spooling-0.2.18 → spooling-0.4.0}/spooling/remote_otel.py +25 -16
  13. {spooling-0.2.18 → spooling-0.4.0}/spooling/schema.py +7 -0
  14. {spooling-0.2.18 → spooling-0.4.0}/spooling/server.py +2 -11
  15. {spooling-0.2.18 → spooling-0.4.0}/spooling/summarize.py +1 -1
  16. {spooling-0.2.18 → spooling-0.4.0/spooling.egg-info}/PKG-INFO +48 -93
  17. {spooling-0.2.18 → spooling-0.4.0}/spooling.egg-info/SOURCES.txt +1 -0
  18. {spooling-0.2.18 → spooling-0.4.0}/spooling.egg-info/requires.txt +8 -3
  19. {spooling-0.2.18 → spooling-0.4.0}/tests/test_cloud_errors.py +23 -1
  20. spooling-0.4.0/tests/test_evals.py +145 -0
  21. spooling-0.2.18/spooling/evals.py +0 -611
  22. spooling-0.2.18/spooling/experiments.py +0 -407
  23. {spooling-0.2.18 → spooling-0.4.0}/LICENSE +0 -0
  24. {spooling-0.2.18 → spooling-0.4.0}/setup.cfg +0 -0
  25. {spooling-0.2.18 → spooling-0.4.0}/spooling/agent.py +0 -0
  26. {spooling-0.2.18 → spooling-0.4.0}/spooling/classifiers.py +0 -0
  27. {spooling-0.2.18 → spooling-0.4.0}/spooling/config.py +0 -0
  28. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/__init__.py +0 -0
  29. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/base.py +0 -0
  30. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/bigquery.py +0 -0
  31. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/clickhouse.py +0 -0
  32. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/factory.py +0 -0
  33. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/mongodb.py +0 -0
  34. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/mysql.py +0 -0
  35. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/postgresql.py +0 -0
  36. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/rest/__init__.py +0 -0
  37. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/rest/base.py +0 -0
  38. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/rest/shopify_connectors.py +0 -0
  39. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/snowflake.py +0 -0
  40. {spooling-0.2.18 → spooling-0.4.0}/spooling/connectors/types.py +0 -0
  41. {spooling-0.2.18 → spooling-0.4.0}/spooling/device_login.py +0 -0
  42. {spooling-0.2.18 → spooling-0.4.0}/spooling/embeddings.py +0 -0
  43. {spooling-0.2.18 → spooling-0.4.0}/spooling/insights.py +0 -0
  44. {spooling-0.2.18 → spooling-0.4.0}/spooling/optimize.py +0 -0
  45. {spooling-0.2.18 → spooling-0.4.0}/spooling/parser.py +0 -0
  46. {spooling-0.2.18 → spooling-0.4.0}/spooling/pricing.py +0 -0
  47. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/__init__.py +0 -0
  48. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/antigravity.py +0 -0
  49. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/base.py +0 -0
  50. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/claude_code.py +0 -0
  51. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/codex.py +0 -0
  52. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/copilot.py +0 -0
  53. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/cortex_code.py +0 -0
  54. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/cursor.py +0 -0
  55. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/gemini.py +0 -0
  56. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/github.py +0 -0
  57. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/gitlab.py +0 -0
  58. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/kiro.py +0 -0
  59. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/opencode.py +0 -0
  60. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/session_file.py +0 -0
  61. {spooling-0.2.18 → spooling-0.4.0}/spooling/providers/windsurf.py +0 -0
  62. {spooling-0.2.18 → spooling-0.4.0}/spooling/redact.py +0 -0
  63. {spooling-0.2.18 → spooling-0.4.0}/spooling/sdk.py +0 -0
  64. {spooling-0.2.18 → spooling-0.4.0}/spooling/search.py +0 -0
  65. {spooling-0.2.18 → spooling-0.4.0}/spooling/sessions.py +0 -0
  66. {spooling-0.2.18 → spooling-0.4.0}/spooling/stats.py +0 -0
  67. {spooling-0.2.18 → spooling-0.4.0}/spooling/subscription_pricing.py +0 -0
  68. {spooling-0.2.18 → spooling-0.4.0}/spooling/tracing.py +0 -0
  69. {spooling-0.2.18 → spooling-0.4.0}/spooling/tunnel.py +0 -0
  70. {spooling-0.2.18 → spooling-0.4.0}/spooling/tunnel_auth.py +0 -0
  71. {spooling-0.2.18 → spooling-0.4.0}/spooling/watcher.py +0 -0
  72. {spooling-0.2.18 → spooling-0.4.0}/spooling.egg-info/dependency_links.txt +0 -0
  73. {spooling-0.2.18 → spooling-0.4.0}/spooling.egg-info/entry_points.txt +0 -0
  74. {spooling-0.2.18 → spooling-0.4.0}/spooling.egg-info/top_level.txt +0 -0
  75. {spooling-0.2.18 → spooling-0.4.0}/tests/test_agent_spans.py +0 -0
  76. {spooling-0.2.18 → spooling-0.4.0}/tests/test_claude_code_provider.py +0 -0
  77. {spooling-0.2.18 → spooling-0.4.0}/tests/test_cloud_teams.py +0 -0
  78. {spooling-0.2.18 → spooling-0.4.0}/tests/test_device_login.py +0 -0
  79. {spooling-0.2.18 → spooling-0.4.0}/tests/test_docs.py +0 -0
  80. {spooling-0.2.18 → spooling-0.4.0}/tests/test_insights.py +0 -0
  81. {spooling-0.2.18 → spooling-0.4.0}/tests/test_mcp_auth_middleware.py +0 -0
  82. {spooling-0.2.18 → spooling-0.4.0}/tests/test_session_ids.py +0 -0
  83. {spooling-0.2.18 → spooling-0.4.0}/tests/test_storage_optimizations.py +0 -0
  84. {spooling-0.2.18 → spooling-0.4.0}/tests/test_summarize.py +0 -0
  85. {spooling-0.2.18 → spooling-0.4.0}/tests/test_tunnel_auth.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: spooling
3
- Version: 0.2.18
3
+ Version: 0.4.0
4
4
  Summary: Local session tracker and semantic search for AI coding assistants
5
5
  Author: Parsed Analytics, Inc.
6
6
  License: MIT
@@ -15,13 +15,12 @@ Requires-Dist: sentence-transformers>=3.0
15
15
  Requires-Dist: numpy>=1.24
16
16
  Requires-Dist: fastapi>=0.111
17
17
  Requires-Dist: uvicorn[standard]>=0.30
18
- Requires-Dist: jinja2>=3.1
19
18
  Requires-Dist: watchdog>=4.0
20
19
  Requires-Dist: rich>=13.0
21
20
  Requires-Dist: httpx>=0.27
22
21
  Requires-Dist: anthropic>=0.40
23
- Requires-Dist: strands-agents[ollama]>=1.35
24
- Requires-Dist: strands-agents-evals>=0.1
22
+ Requires-Dist: pydantic-ai-slim[anthropic,openai]>=2.78
23
+ Requires-Dist: pydantic-evals>=2.78
25
24
  Requires-Dist: mcp<2,>=1.27
26
25
  Provides-Extra: dev
27
26
  Requires-Dist: pytest>=8.0; extra == "dev"
@@ -32,13 +31,17 @@ Requires-Dist: google-cloud-bigquery>=3.0; extra == "connectors"
32
31
  Requires-Dist: mysql-connector-python>=8.0; extra == "connectors"
33
32
  Requires-Dist: clickhouse-connect>=0.5; extra == "connectors"
34
33
  Requires-Dist: motor>=3.0; extra == "connectors"
34
+ Provides-Extra: otel-mappers
35
+ Requires-Dist: strands-agents-evals>=0.1; extra == "otel-mappers"
36
+ Provides-Extra: bedrock
37
+ Requires-Dist: boto3>=1.34; extra == "bedrock"
35
38
  Dynamic: license-file
36
39
 
37
40
  # Spooling
38
41
 
39
42
  Local session tracker and semantic search for AI coding assistants.
40
43
 
41
- Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, and a built-in AI chat agent to explore your history.
44
+ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, to explore your history.
42
45
 
43
46
  **Website:** [spooling.ai](https://spooling.ai)
44
47
 
@@ -48,7 +51,7 @@ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **Gi
48
51
 
49
52
  - **Python 3.11+**
50
53
  - **pipx** or **uv** (optional, alternative install methods)
51
- - **Ollama** (optional, for free local AI chat) or an **Anthropic API key**
54
+ - **Ollama** (optional, for free local LLM features) or an **Anthropic API key**
52
55
 
53
56
  No Docker, no PostgreSQL, no Node.js required.
54
57
 
@@ -119,7 +122,7 @@ curl -s http://127.0.0.1:3004/mcp \
119
122
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
120
123
  ```
121
124
 
122
- Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` (or `spooling ui`) is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
125
+ Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
123
126
 
124
127
  ---
125
128
 
@@ -271,6 +274,22 @@ spooling summarize --backend opencode --model amazon-bedrock/us.anthropic.claude
271
274
  - `--force` - regenerate even if a summary exists
272
275
  - `-y, --yes` - don't ask before sending text to a non-local endpoint
273
276
 
277
+ #### Summarize one session
278
+
279
+ Name the session by its id (or any unique prefix) and pick the backend:
280
+
281
+ ```bash
282
+ spooling session list --title login # find the id first
283
+ spooling summarize ses_e6310bd1 --backend claude-code
284
+ spooling summarize ses_e6310bd1 --backend claude-code --ssh my-other-mac
285
+ spooling session show ses_e6310bd1 # read it back
286
+ ```
287
+
288
+ - If the session already has a summary, nothing runs. Add `--force` to replace it, including a summary the provider wrote.
289
+ - Naming a session skips the `--min-messages` filter, so short sessions work too. You can name several: `spooling summarize ID1 ID2 --backend claude-code`.
290
+ - `--dry-run` shows what would run without calling a model, and `-y` skips the confirmation prompt.
291
+ - To avoid typing the backend each time, `export SPOOLING_SUMMARY_BACKEND=claude-code`. There is no environment variable for `--ssh`.
292
+
274
293
  #### Using Claude Code or opencode
275
294
 
276
295
  The `claude-code` and `opencode` backends run the agent's headless mode and send the prompt on stdin, so there is no API key to set up: they use whatever login the agent already has. Both send the redacted transcript to that agent's provider, so Spooling asks for confirmation first.
@@ -308,20 +327,11 @@ spooling serve --port 8080 # Custom port
308
327
  spooling serve --host 0.0.0.0 # Bind to all interfaces
309
328
  ```
310
329
 
311
- ### `spooling ui`
312
-
313
- Start the API server, the MCP HTTP server, and the Next.js UI together. Requires the `ui/` directory from the [source repo](https://github.com/sashimiboi/spooling) to be present. Set `SPOOLING_UI_DIR` to point at it if running from a non-standard location.
314
-
315
- ```bash
316
- spooling ui # API :3002 · MCP :3004 · GUI :3003
317
- ```
318
-
319
330
  ### `spooling mcp`
320
331
 
321
332
  Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
322
333
  `http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
323
- by URL. `spooling ui` already launches this alongside the API, so you only
324
- need to run it directly when you want the MCP server without the GUI.
334
+ by URL.
325
335
 
326
336
  ```bash
327
337
  spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
@@ -403,7 +413,7 @@ spooling eval run --rubric <id> --days 7 # Batch-score traces from the la
403
413
 
404
414
  ### `spooling experiment`
405
415
 
406
- Create and run Strands-style experiments — a set of test cases evaluated by one or more rubrics.
416
+ Create and run experiments — a set of test cases evaluated by one or more LLM judges (Pydantic Evals).
407
417
 
408
418
  ```bash
409
419
  spooling experiment list # List all experiments
@@ -414,7 +424,7 @@ spooling experiment show --run <run-id> # Show the results of a past run
414
424
 
415
425
  ### `spooling otel`
416
426
 
417
- Ingest OpenTelemetry / Strands span exports from external sources into Spooling.
427
+ Ingest OpenTelemetry span exports from external sources into Spooling. OTLP/JSON import needs the optional mapper extra: `pip install "spooling[otel-mappers]"`.
418
428
 
419
429
  ```bash
420
430
  spooling otel ingest --file spans.json # Ingest an OTLP JSON export
@@ -471,6 +481,21 @@ spooling push --dry-run # show what would be pushed
471
481
 
472
482
  `push` ingests new provider sessions into the local database before uploading, so you don't need to run `spooling sync` first. The server upserts by session id, so re-running is safe.
473
483
 
484
+ #### When a Free workspace is full
485
+
486
+ The Free plan caps each workspace (200 sessions, 25,000 messages, 5,000 traces). When a push would go past a cap the server answers
487
+ `402`, and `spooling push` stops with a clear message and a non-zero exit code:
488
+
489
+ ```
490
+ Free plan limit reached: this workspace can't take more on the Free plan.
491
+ The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing
492
+ Nothing already pushed was removed; the rest of this push was not sent.
493
+ ```
494
+
495
+ Nothing you have already pushed is removed, and sessions already in the workspace can still be updated by a batch that adds no new
496
+ ones. Free space with `spooling cloud delete`, or upgrade from the link. `spooling cloud watch` shows the message once and then a
497
+ short "still at the Free plan limit" line each cycle, and carries on automatically once there is room.
498
+
474
499
  ### Push only some sessions, or to a specific team
475
500
 
476
501
  **Which team gets the sessions** is decided by the API key you are logged in with. Each key belongs to one workspace (personal or a team), and `spooling push` sends to that workspace. Mint a key for the team in the app, then log in with it:
@@ -553,7 +578,7 @@ curl -s "https://api.spooling.ai/v1/search?q=migration&limit=10" \
553
578
  -H "Authorization: Bearer $SPOOLING_KEY"
554
579
  ```
555
580
 
556
- **Important**: `app.spooling.ai` is the Next.js frontend. For API access, use `api.spooling.ai` directly or set `API_URL=https://api.spooling.ai` when deploying the frontend so its `/api/*` rewrites reach the backend.
581
+ **Important**: `app.spooling.ai` is the hosted web app. For API access, use `api.spooling.ai` directly.
557
582
 
558
583
  ### Status / logout
559
584
 
@@ -597,8 +622,7 @@ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
597
622
 
598
623
  Spooling exposes an MCP server so any AI agent can query your session history
599
624
  as a context source. The server runs over **streamable-HTTP** at
600
- `http://127.0.0.1:3004/mcp` and is started automatically alongside `spooling
601
- ui`.
625
+ `http://127.0.0.1:3004/mcp` and is started with `spooling mcp`.
602
626
 
603
627
  Drop this into your MCP client config (`~/.mcp.json`, Cursor,
604
628
  Codex, or any other streamable-HTTP capable agent):
@@ -615,9 +639,6 @@ Codex, or any other streamable-HTTP capable agent):
615
639
 
616
640
  Or register it with an MCP client's config file.
617
641
 
618
- The **Settings** page in the GUI shows the endpoint URL, a copy button, and
619
- the full config snippet so you don't have to remember it.
620
-
621
642
  ### Tools exposed
622
643
 
623
644
  | Tool | Purpose |
@@ -629,7 +650,7 @@ the full config snippet so you don't have to remember it.
629
650
  | `get_stats` | Top-line stats: traces, tokens, cost, errors |
630
651
  | `get_top_vendors` | Most-used external vendors by tool-call count |
631
652
  | `list_evals` | Recent eval runs, optionally filtered by rubric |
632
- | `list_rubrics` | All configured Strands eval rubrics |
653
+ | `list_rubrics` | All configured eval rubrics (LLM judges + function rubrics) |
633
654
  | `run_eval` | Run a rubric against a trace and persist the result |
634
655
 
635
656
  ### Stdio (legacy clients)
@@ -650,63 +671,6 @@ it with the command-based form:
650
671
 
651
672
  ---
652
673
 
653
- ## GUI
654
-
655
- The Spooling GUI runs on **http://localhost:3003** and includes:
656
-
657
- | Page | Description |
658
- |------|-------------|
659
- | **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
660
- | **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
661
- | **Search** | Semantic search across all session history with similarity scores |
662
- | **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
663
- | **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
664
- | **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
665
- | **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
666
-
667
- ### Running the GUI
668
-
669
- ```bash
670
- # Terminal 1: API server
671
- source .venv/bin/activate
672
- spooling serve
673
-
674
- # Terminal 2: Next.js dev server
675
- cd ui
676
- npm run dev
677
- ```
678
-
679
- Or use `spooling ui` to start both at once.
680
-
681
- ---
682
-
683
- ## Chat Agent Setup
684
-
685
- The chat page lets you ask questions about your coding sessions in natural language. It uses RAG — retrieves relevant context from the local database before answering.
686
-
687
- ### Option A: Ollama (free, local)
688
-
689
- ```bash
690
- # Install Ollama
691
- brew install ollama
692
-
693
- # Start the server
694
- ollama serve
695
-
696
- # Pull a model
697
- ollama pull gemma3:4b
698
- ```
699
-
700
- Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
701
-
702
- ### Option B: Anthropic API (bring your own key)
703
-
704
- Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
705
-
706
- Available models: Sonnet, Haiku, Opus.
707
-
708
- ---
709
-
710
674
  ## Architecture
711
675
 
712
676
  ```
@@ -729,12 +693,6 @@ spooling/
729
693
  │ ├── agent.py # Chat agent (Ollama + Anthropic)
730
694
  │ ├── tunnel.py # Cloudflare quick tunnel support
731
695
  │ └── server.py # FastAPI API server
732
- └── ui/ # Next.js frontend (source repo only)
733
- ├── next.config.js # API proxy to :3002
734
- └── src/
735
- ├── components/ # shadcn/ui components
736
- ├── lib/ # API helpers
737
- └── app/(app)/ # Pages (dashboard, sessions, search, etc.)
738
696
  ```
739
697
 
740
698
  ### Stack
@@ -745,7 +703,6 @@ spooling/
745
703
  | Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
746
704
  | Search | numpy cosine similarity |
747
705
  | Backend | Python, FastAPI, Click |
748
- | Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
749
706
  | Chat AI | Ollama (local) or Anthropic API |
750
707
 
751
708
  ### Ports
@@ -753,7 +710,6 @@ spooling/
753
710
  | Service | Port |
754
711
  |---------|------|
755
712
  | API Server | 3002 |
756
- | GUI | 3003 |
757
713
  | MCP Server (streamable-HTTP) | 3004 |
758
714
 
759
715
  ---
@@ -767,8 +723,7 @@ All optional — defaults work out of the box.
767
723
  | `SPOOLING_DB` | `~/.local/share/spooling/spooling.db` | Path to the SQLite database file (`%APPDATA%\spooling\spooling.db` on Windows) |
768
724
  | `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
769
725
  | `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
770
- | `SPOOLING_UI_DIR` | *(auto-detected)* | Path to the Next.js `ui/` directory (required for `spooling ui`) |
771
- | `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in the GUI) |
726
+ | `ANTHROPIC_API_KEY` | - | Anthropic API key (required for Anthropic-backed features) |
772
727
 
773
728
  ---
774
729
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Local session tracker and semantic search for AI coding assistants.
4
4
 
5
- Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, and a built-in AI chat agent to explore your history.
5
+ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **GitHub Copilot**, **Cursor**, **Windsurf**, **Kiro**, **Google Antigravity**, and **opencode**, all in one place. Get usage stats, cost estimates, per-provider breakdowns, semantic search, to explore your history.
6
6
 
7
7
  **Website:** [spooling.ai](https://spooling.ai)
8
8
 
@@ -12,7 +12,7 @@ Track your AI coding sessions across **Claude Code**, **OpenAI Codex CLI**, **Gi
12
12
 
13
13
  - **Python 3.11+**
14
14
  - **pipx** or **uv** (optional, alternative install methods)
15
- - **Ollama** (optional, for free local AI chat) or an **Anthropic API key**
15
+ - **Ollama** (optional, for free local LLM features) or an **Anthropic API key**
16
16
 
17
17
  No Docker, no PostgreSQL, no Node.js required.
18
18
 
@@ -83,7 +83,7 @@ curl -s http://127.0.0.1:3004/mcp \
83
83
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | jq
84
84
  ```
85
85
 
86
- Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` (or `spooling ui`) is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
86
+ Should return the tools listed under [Tools exposed](#tools-exposed). If you get "connection refused", `spooling mcp` is not running, or something else is using port 3004. Find it with `lsof -i :3004`.
87
87
 
88
88
  ---
89
89
 
@@ -235,6 +235,22 @@ spooling summarize --backend opencode --model amazon-bedrock/us.anthropic.claude
235
235
  - `--force` - regenerate even if a summary exists
236
236
  - `-y, --yes` - don't ask before sending text to a non-local endpoint
237
237
 
238
+ #### Summarize one session
239
+
240
+ Name the session by its id (or any unique prefix) and pick the backend:
241
+
242
+ ```bash
243
+ spooling session list --title login # find the id first
244
+ spooling summarize ses_e6310bd1 --backend claude-code
245
+ spooling summarize ses_e6310bd1 --backend claude-code --ssh my-other-mac
246
+ spooling session show ses_e6310bd1 # read it back
247
+ ```
248
+
249
+ - If the session already has a summary, nothing runs. Add `--force` to replace it, including a summary the provider wrote.
250
+ - Naming a session skips the `--min-messages` filter, so short sessions work too. You can name several: `spooling summarize ID1 ID2 --backend claude-code`.
251
+ - `--dry-run` shows what would run without calling a model, and `-y` skips the confirmation prompt.
252
+ - To avoid typing the backend each time, `export SPOOLING_SUMMARY_BACKEND=claude-code`. There is no environment variable for `--ssh`.
253
+
238
254
  #### Using Claude Code or opencode
239
255
 
240
256
  The `claude-code` and `opencode` backends run the agent's headless mode and send the prompt on stdin, so there is no API key to set up: they use whatever login the agent already has. Both send the redacted transcript to that agent's provider, so Spooling asks for confirmation first.
@@ -272,20 +288,11 @@ spooling serve --port 8080 # Custom port
272
288
  spooling serve --host 0.0.0.0 # Bind to all interfaces
273
289
  ```
274
290
 
275
- ### `spooling ui`
276
-
277
- Start the API server, the MCP HTTP server, and the Next.js UI together. Requires the `ui/` directory from the [source repo](https://github.com/sashimiboi/spooling) to be present. Set `SPOOLING_UI_DIR` to point at it if running from a non-standard location.
278
-
279
- ```bash
280
- spooling ui # API :3002 · MCP :3004 · GUI :3003
281
- ```
282
-
283
291
  ### `spooling mcp`
284
292
 
285
293
  Start the Spooling MCP server on its own. Defaults to streamable-HTTP at
286
294
  `http://127.0.0.1:3004/mcp`, which any MCP-compatible agent can connect to
287
- by URL. `spooling ui` already launches this alongside the API, so you only
288
- need to run it directly when you want the MCP server without the GUI.
295
+ by URL.
289
296
 
290
297
  ```bash
291
298
  spooling mcp # streamable-HTTP at http://127.0.0.1:3004/mcp (default)
@@ -367,7 +374,7 @@ spooling eval run --rubric <id> --days 7 # Batch-score traces from the la
367
374
 
368
375
  ### `spooling experiment`
369
376
 
370
- Create and run Strands-style experiments — a set of test cases evaluated by one or more rubrics.
377
+ Create and run experiments — a set of test cases evaluated by one or more LLM judges (Pydantic Evals).
371
378
 
372
379
  ```bash
373
380
  spooling experiment list # List all experiments
@@ -378,7 +385,7 @@ spooling experiment show --run <run-id> # Show the results of a past run
378
385
 
379
386
  ### `spooling otel`
380
387
 
381
- Ingest OpenTelemetry / Strands span exports from external sources into Spooling.
388
+ Ingest OpenTelemetry span exports from external sources into Spooling. OTLP/JSON import needs the optional mapper extra: `pip install "spooling[otel-mappers]"`.
382
389
 
383
390
  ```bash
384
391
  spooling otel ingest --file spans.json # Ingest an OTLP JSON export
@@ -435,6 +442,21 @@ spooling push --dry-run # show what would be pushed
435
442
 
436
443
  `push` ingests new provider sessions into the local database before uploading, so you don't need to run `spooling sync` first. The server upserts by session id, so re-running is safe.
437
444
 
445
+ #### When a Free workspace is full
446
+
447
+ The Free plan caps each workspace (200 sessions, 25,000 messages, 5,000 traces). When a push would go past a cap the server answers
448
+ `402`, and `spooling push` stops with a clear message and a non-zero exit code:
449
+
450
+ ```
451
+ Free plan limit reached: this workspace can't take more on the Free plan.
452
+ The Free plan allows 200 sessions per workspace. Delete old ones with `spooling cloud delete`, or upgrade at https://app.spooling.ai/settings?tab=billing
453
+ Nothing already pushed was removed; the rest of this push was not sent.
454
+ ```
455
+
456
+ Nothing you have already pushed is removed, and sessions already in the workspace can still be updated by a batch that adds no new
457
+ ones. Free space with `spooling cloud delete`, or upgrade from the link. `spooling cloud watch` shows the message once and then a
458
+ short "still at the Free plan limit" line each cycle, and carries on automatically once there is room.
459
+
438
460
  ### Push only some sessions, or to a specific team
439
461
 
440
462
  **Which team gets the sessions** is decided by the API key you are logged in with. Each key belongs to one workspace (personal or a team), and `spooling push` sends to that workspace. Mint a key for the team in the app, then log in with it:
@@ -517,7 +539,7 @@ curl -s "https://api.spooling.ai/v1/search?q=migration&limit=10" \
517
539
  -H "Authorization: Bearer $SPOOLING_KEY"
518
540
  ```
519
541
 
520
- **Important**: `app.spooling.ai` is the Next.js frontend. For API access, use `api.spooling.ai` directly or set `API_URL=https://api.spooling.ai` when deploying the frontend so its `/api/*` rewrites reach the backend.
542
+ **Important**: `app.spooling.ai` is the hosted web app. For API access, use `api.spooling.ai` directly.
521
543
 
522
544
  ### Status / logout
523
545
 
@@ -561,8 +583,7 @@ launchctl load ~/Library/LaunchAgents/ai.spooling.cloud-watch.plist
561
583
 
562
584
  Spooling exposes an MCP server so any AI agent can query your session history
563
585
  as a context source. The server runs over **streamable-HTTP** at
564
- `http://127.0.0.1:3004/mcp` and is started automatically alongside `spooling
565
- ui`.
586
+ `http://127.0.0.1:3004/mcp` and is started with `spooling mcp`.
566
587
 
567
588
  Drop this into your MCP client config (`~/.mcp.json`, Cursor,
568
589
  Codex, or any other streamable-HTTP capable agent):
@@ -579,9 +600,6 @@ Codex, or any other streamable-HTTP capable agent):
579
600
 
580
601
  Or register it with an MCP client's config file.
581
602
 
582
- The **Settings** page in the GUI shows the endpoint URL, a copy button, and
583
- the full config snippet so you don't have to remember it.
584
-
585
603
  ### Tools exposed
586
604
 
587
605
  | Tool | Purpose |
@@ -593,7 +611,7 @@ the full config snippet so you don't have to remember it.
593
611
  | `get_stats` | Top-line stats: traces, tokens, cost, errors |
594
612
  | `get_top_vendors` | Most-used external vendors by tool-call count |
595
613
  | `list_evals` | Recent eval runs, optionally filtered by rubric |
596
- | `list_rubrics` | All configured Strands eval rubrics |
614
+ | `list_rubrics` | All configured eval rubrics (LLM judges + function rubrics) |
597
615
  | `run_eval` | Run a rubric against a trace and persist the result |
598
616
 
599
617
  ### Stdio (legacy clients)
@@ -614,63 +632,6 @@ it with the command-based form:
614
632
 
615
633
  ---
616
634
 
617
- ## GUI
618
-
619
- The Spooling GUI runs on **http://localhost:3003** and includes:
620
-
621
- | Page | Description |
622
- |------|-------------|
623
- | **Dashboard** | Overview stats, per-provider breakdown, daily activity chart, projects, top tools, recent sessions |
624
- | **Sessions** | Browse all sessions with provider labels, filtering, click into any session for full conversation view |
625
- | **Search** | Semantic search across all session history with similarity scores |
626
- | **Analytics** | Charts for daily usage, cost trends, token usage, tool distribution, filterable by provider (AG Charts) |
627
- | **Chat** | AI assistant that can answer questions about your session data (RAG-powered) |
628
- | **Connections** | Connect/disconnect AI coding tools (Codex, Copilot, Cursor, Windsurf) |
629
- | **Settings** | Configure the AI chat provider (Ollama or Anthropic) |
630
-
631
- ### Running the GUI
632
-
633
- ```bash
634
- # Terminal 1: API server
635
- source .venv/bin/activate
636
- spooling serve
637
-
638
- # Terminal 2: Next.js dev server
639
- cd ui
640
- npm run dev
641
- ```
642
-
643
- Or use `spooling ui` to start both at once.
644
-
645
- ---
646
-
647
- ## Chat Agent Setup
648
-
649
- The chat page lets you ask questions about your coding sessions in natural language. It uses RAG — retrieves relevant context from the local database before answering.
650
-
651
- ### Option A: Ollama (free, local)
652
-
653
- ```bash
654
- # Install Ollama
655
- brew install ollama
656
-
657
- # Start the server
658
- ollama serve
659
-
660
- # Pull a model
661
- ollama pull gemma3:4b
662
- ```
663
-
664
- Go to **Settings** in the GUI and select Ollama. The model will auto-detect.
665
-
666
- ### Option B: Anthropic API (bring your own key)
667
-
668
- Go to **Settings** in the GUI, select Anthropic, and paste your API key from [console.anthropic.com](https://console.anthropic.com).
669
-
670
- Available models: Sonnet, Haiku, Opus.
671
-
672
- ---
673
-
674
635
  ## Architecture
675
636
 
676
637
  ```
@@ -693,12 +654,6 @@ spooling/
693
654
  │ ├── agent.py # Chat agent (Ollama + Anthropic)
694
655
  │ ├── tunnel.py # Cloudflare quick tunnel support
695
656
  │ └── server.py # FastAPI API server
696
- └── ui/ # Next.js frontend (source repo only)
697
- ├── next.config.js # API proxy to :3002
698
- └── src/
699
- ├── components/ # shadcn/ui components
700
- ├── lib/ # API helpers
701
- └── app/(app)/ # Pages (dashboard, sessions, search, etc.)
702
657
  ```
703
658
 
704
659
  ### Stack
@@ -709,7 +664,6 @@ spooling/
709
664
  | Embeddings | sentence-transformers / all-MiniLM-L6-v2 (local) |
710
665
  | Search | numpy cosine similarity |
711
666
  | Backend | Python, FastAPI, Click |
712
- | Frontend | Next.js 14, shadcn/ui, Tailwind CSS, AG Charts |
713
667
  | Chat AI | Ollama (local) or Anthropic API |
714
668
 
715
669
  ### Ports
@@ -717,7 +671,6 @@ spooling/
717
671
  | Service | Port |
718
672
  |---------|------|
719
673
  | API Server | 3002 |
720
- | GUI | 3003 |
721
674
  | MCP Server (streamable-HTTP) | 3004 |
722
675
 
723
676
  ---
@@ -731,8 +684,7 @@ All optional — defaults work out of the box.
731
684
  | `SPOOLING_DB` | `~/.local/share/spooling/spooling.db` | Path to the SQLite database file (`%APPDATA%\spooling\spooling.db` on Windows) |
732
685
  | `SPOOLING_EMBEDDING_MODEL` | `all-MiniLM-L6-v2` | Sentence transformer model |
733
686
  | `SPOOLING_UI_HOST` | `127.0.0.1` | API server host |
734
- | `SPOOLING_UI_DIR` | *(auto-detected)* | Path to the Next.js `ui/` directory (required for `spooling ui`) |
735
- | `ANTHROPIC_API_KEY` | - | Anthropic API key (alternative to setting in the GUI) |
687
+ | `ANTHROPIC_API_KEY` | - | Anthropic API key (required for Anthropic-backed features) |
736
688
 
737
689
  ---
738
690
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "spooling"
3
- version = "0.2.18"
3
+ version = "0.4.0"
4
4
  description = "Local session tracker and semantic search for AI coding assistants"
5
5
  readme = "README.md"
6
6
  authors = [{ name = "Parsed Analytics, Inc." }]
@@ -17,13 +17,12 @@ dependencies = [
17
17
  "numpy>=1.24",
18
18
  "fastapi>=0.111",
19
19
  "uvicorn[standard]>=0.30",
20
- "jinja2>=3.1",
21
20
  "watchdog>=4.0",
22
21
  "rich>=13.0",
23
22
  "httpx>=0.27",
24
23
  "anthropic>=0.40",
25
- "strands-agents[ollama]>=1.35",
26
- "strands-agents-evals>=0.1",
24
+ "pydantic-ai-slim[openai,anthropic]>=2.78",
25
+ "pydantic-evals>=2.78",
27
26
  "mcp>=1.27,<2",
28
27
  ]
29
28
 
@@ -39,6 +38,12 @@ connectors = [
39
38
  "clickhouse-connect>=0.5",
40
39
  "motor>=3.0",
41
40
  ]
41
+ otel-mappers = [
42
+ "strands-agents-evals>=0.1",
43
+ ]
44
+ bedrock = [
45
+ "boto3>=1.34",
46
+ ]
42
47
 
43
48
  [project.scripts]
44
49
  spooling = "spooling.cli:cli"
@@ -1,2 +1,2 @@
1
1
  """Spooling - local session tracker for AI coding assistants."""
2
- __version__ = "0.1.0"
2
+ __version__ = "0.4.0"
@@ -50,7 +50,7 @@ def init():
50
50
  available = provider.is_available()
51
51
  status = "[green]available[/green]" if available else "[dim]not found[/dim]"
52
52
  if provider.is_remote:
53
- path_str = "[dim](remote API — connect via GUI)[/dim]"
53
+ path_str = "[dim](remote API)[/dim]"
54
54
  else:
55
55
  if available:
56
56
  files = provider.discover_session_files()
@@ -336,13 +336,12 @@ def serve(host, port):
336
336
  h = host or UI_HOST
337
337
  p = port or 3002
338
338
  console.print(f"[bold]Spooling API[/bold] at http://{h}:{p}")
339
- console.print("Start the UI with: [bold]cd ui && npm run dev[/bold]")
340
339
  uvicorn.run(app, host=h, port=p, log_level="warning")
341
340
 
342
341
 
343
342
  @cli.group()
344
343
  def otel():
345
- """Ingest OTel/Strands spans from external sources into Spooling."""
344
+ """Ingest OTel spans from external sources into Spooling."""
346
345
  pass
347
346
 
348
347
 
@@ -396,7 +395,7 @@ def otel_preview(path, provider_id, project):
396
395
 
397
396
  @cli.group()
398
397
  def experiment():
399
- """Create and run Strands experiments (cases + evaluators)."""
398
+ """Create and run experiments (cases + judges)."""
400
399
  pass
401
400
 
402
401
 
@@ -1028,53 +1027,6 @@ def _check_ollama_preflight() -> None:
1028
1027
  )
1029
1028
 
1030
1029
 
1031
- @cli.command()
1032
- def ui():
1033
- """Launch the API server, MCP HTTP server, and Next.js UI together."""
1034
- import subprocess
1035
- import os
1036
- import sys
1037
-
1038
- ui_dir = (
1039
- os.environ.get("SPOOLING_UI_DIR")
1040
- or os.path.join(os.path.dirname(os.path.dirname(__file__)), "ui")
1041
- )
1042
- if not os.path.isdir(ui_dir):
1043
- ui_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "ui")
1044
- if not os.path.isdir(ui_dir):
1045
- ui_dir = os.path.join(os.path.expanduser("~"), "spooling", "ui")
1046
- if not os.path.isdir(ui_dir):
1047
- ui_dir = os.path.join(os.getcwd(), "ui")
1048
- if not os.path.isdir(ui_dir):
1049
- console.print("[red]UI directory not found. Set SPOOLING_UI_DIR or run from the repo root.[/red]")
1050
- raise SystemExit(1)
1051
-
1052
- console.print("[bold]Starting Spooling...[/bold]")
1053
- console.print(" API: http://127.0.0.1:3002")
1054
- console.print(" MCP: http://127.0.0.1:3004/mcp")
1055
- console.print(" UI: http://localhost:3003")
1056
-
1057
- # Preflight: warn if Ollama is down — otherwise chat + judge will fail
1058
- # silently with "All connection attempts failed" from httpx.
1059
- _check_ollama_preflight()
1060
-
1061
- api_proc = subprocess.Popen(
1062
- [sys.executable, "-m", "uvicorn", "spooling.server:app", "--host", "127.0.0.1", "--port", "3002", "--log-level", "warning"],
1063
- )
1064
-
1065
- mcp_proc = subprocess.Popen(
1066
- [sys.executable, "-m", "spooling.mcp_server"],
1067
- )
1068
-
1069
- try:
1070
- subprocess.run(["npm", "run", "dev"], cwd=ui_dir)
1071
- except KeyboardInterrupt:
1072
- pass
1073
- finally:
1074
- api_proc.terminate()
1075
- mcp_proc.terminate()
1076
-
1077
-
1078
1030
  from spooling.cloud import cloud as _cloud_group, push as _push_cmd
1079
1031
  cli.add_command(_cloud_group)
1080
1032
  cli.add_command(_push_cmd)