You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Much of your best context lives in local files that Agents can't easily search — papers, contracts, scanned documents, recordings. 📂 Open a folder in StashBase and its supported contents become searchable:
11
+
Much of your best context already lives in local files: notes, papers,
12
+
contracts, project data, scanned documents, and recordings. Open a folder in
13
+
StashBase and work with that material in place:
12
14
13
-
-📄**Prepare:**extract searchable text from PDFs, DOCX files, images, audio, and video.
14
-
- 🔎 **Search:**find relevant context by meaning, not just keywords.
15
-
- 🤖 **Connect:**share searchable context across Claude, Codex, and other MCP clients.
15
+
-📂**Work in place:**browse, read, and edit supported files without moving them into a proprietary workspace.
16
+
- 🔎 **Prepare and search:**extract difficult formats, search exact text immediately, and optionally add meaning-based retrieval with AI Index.
17
+
- 🤖 **Use with Agents:**run Claude Code or Codex in the built-in Chat, or share the same authorized library with other MCP clients.
16
18
17
19
Your folders remain the source of truth; StashBase adds a search index that can be rebuilt from them.
18
20
19
21
The core idea:
20
22
21
23
```text
22
-
Local files -> prepared text -> search index -> MCP -> Agents
24
+
Local files -> prepared evidence -> retrieval -> Agents
23
25
```
24
26
25
27
---
@@ -73,21 +75,30 @@ For a portable build, download `StashBase-*-linux-*.AppImage`, make it executabl
73
75
74
76
### First Launch
75
77
76
-
When you open StashBase for the first time:
77
-
78
-
1.**Open a folder**: Click the folder icon to choose a local folder containing files you want to search
79
-
2.**(Optional) Set up AI Index**: To search by meaning and give Agents better retrieval, sign in through Supabase with Google for the included monthly allowance, or add an OpenAI/OpenRouter key in **Settings → AI Index**. An OpenAI restricted key needs access only to embeddings with `text-embedding-3-small`; model-list access is not required.
80
-
3.**(Optional) Set up transcription**: To transcribe audio or video, download a speech model from **Settings → Transcription**. Small (465 MiB) is the default; Tiny (74 MiB) and Base (141 MiB) are lighter options. Transcription runs entirely on your machine, with no API cost, and you can cancel or rerun it while viewing the file
81
-
4.**(Optional) Connect to Claude/Codex**: From **Settings → MCP**, connect external AI tools to access your searchable library
82
-
5.**Start in Chat**: Chat is already open with one reusable blank session.
83
-
Opening the app or a folder does not install an Agent; the first explicit
84
-
**New Chat** prepares the selected runtime. Codex is the initial default,
85
-
and StashBase remembers later Claude or Codex choices. Selecting a source
86
-
file brings the document alongside the same conversation.
87
-
88
-
Your library is **opt-in**: only folders you open in StashBase are indexed. You can remove a folder at any time; StashBase clears its index but never deletes your files from disk.
89
-
90
-
> Haven't set up AI Index, or used the hosted allowance? In-app exact text search still works.
78
+
The first window opens with no folder selected and one reusable blank Chat.
79
+
80
+
1.**Enable AI Index**: Sign in to StashBase for free monthly AI Index usage,
81
+
or use your own OpenAI/OpenRouter key. To continue without it, choose **Skip
82
+
AI Index for now**; exact text search and local file work remain available.
83
+
2.**Ask how StashBase works**: In the Chat that is already open, ask **“How do
84
+
I use StashBase?”** It starts against the whole Library, including Start
85
+
Here. StashBase uses a supported system Claude Code or Codex runtime when
86
+
available; if it is missing, installation waits for **Install and
87
+
continue**. Agent provider login is separate from StashBase sign-in and AI
88
+
Index configuration.
89
+
3.**Open source files when you need them**: On a brand-new empty default
90
+
folder home, StashBase adds **👋 Start Here** to the Library without opening
91
+
it automatically. Open it from the titlebar's **Library** menu, or use **Add
92
+
Folder…** to work with one of your own local folders. Selecting a source
93
+
brings it alongside the same conversation.
94
+
95
+
StashBase processes only folders in its Library. Apart from the bundled Start
96
+
Here introduction, folders join only when you explicitly add or open them. You
97
+
can remove a folder at any time; StashBase clears its app-owned state but never
98
+
deletes your files from disk.
99
+
100
+
Transcription and external MCP access can be configured later when you need
101
+
them. Neither is required to begin browsing local files.
91
102
92
103
### Updating and Uninstalling
93
104
@@ -121,7 +132,11 @@ Your library is **opt-in**: only folders you open in StashBase are indexed. You
121
132
122
133
---
123
134
124
-
## Usage Tips
135
+
## Document Workbench
136
+
137
+
StashBase works directly with ordinary local folders. The Files sidebar,
138
+
persistent tabs, Quick Open, and format-specific viewers keep source work in
139
+
the same workspace as Chat.
125
140
126
141
Use **File → New Window** or Cmd/Ctrl+Shift+N to keep different folders and
127
142
tools side by side. Window close follows VS Code's platform shortcuts;
@@ -133,9 +148,9 @@ safe application actions with their existing safeguards.
133
148
134
149
---
135
150
136
-
## What It Does
151
+
## Search and Preparation
137
152
138
-
StashBase has two core jobs: prepare files and index their contents.
153
+
The local RAG layer has two core jobs: prepare files and index their contents.
139
154
140
155
### Prepare
141
156
@@ -153,8 +168,18 @@ Some formats need preparation before their contents can be searched. StashBase k
153
168
154
169
For PDF, DOCX, audio, and video, Agents read the derived text while the original remains the visible source file. Audio and video play directly when supported; otherwise, StashBase creates a compatible local audio preview. Large files dragged into the app stream to disk instead of being held entirely in memory. See [Architecture](design-docs/architecture.md) and [Preparation](design-docs/design/preparation.md) for the product and system contracts.
155
170
171
+
Audio and video transcription is optional. Download a local speech model from
172
+
**Settings → Transcription** when you need it. Small (465 MiB) is the default;
173
+
Tiny (74 MiB) and Base (141 MiB) are lighter choices. Transcription runs on
174
+
your machine with no transcription API cost.
175
+
156
176
### AI Index
157
177
178
+
Sign in to StashBase for free monthly AI Index usage, or configure your own
179
+
OpenAI/OpenRouter key in **Settings → AI Index**. An OpenAI restricted key
180
+
needs access only to embeddings with `text-embedding-3-small`; model-list
181
+
access is not required. Exact search needs neither option.
182
+
158
183
StashBase builds its AI Index and exact text search over:
159
184
160
185
- Markdown, HTML, and raw JSON text
@@ -179,11 +204,12 @@ MCP is the main interface between StashBase and Agents.
179
204
180
205
While the StashBase app is running, a local MCP server makes the same library available to external clients and the built-in Agent panel.
181
206
182
-
Core tools:
207
+
Common tools:
183
208
184
209
-`library_info` - return the default folder home, opened folders, optional folder descriptions, and embedder status.
185
210
-`search_library` - search the library in semantic (default) or keyword mode, optionally filtered by source type. Semantic mode may search the whole library; exact keyword mode works before AI Index is set up and requires a folder or path-prefix scope.
186
211
-`reindex` - reconcile disk changes and make updated files searchable.
212
+
-`create_project` - create and register a new project folder beneath an authorized location.
187
213
188
214
StashBase also exposes bounded file helpers for opened folders:
189
215
@@ -198,9 +224,9 @@ These helpers exist for Agent clients that run in a sandbox and cannot directly
198
224
199
225
### Connect a Client
200
226
201
-
The normal path is **Settings -> MCP**. StashBase can write the MCP config for supported clients or copy the stdio snippet for clients that manage config themselves.
227
+
The built-in chat agents (Claude Code, Codex) connect automatically. For any other MCP-compatible client, copy the standard configuration or the server connection details from **Settings → MCP** and register them in that client.
202
228
203
-
For manual stdio setup, URL-based clients, Docker access, ports, CORS boundaries, and token rotation, see [Advanced MCP configuration](docs/mcp-configuration.md).
229
+
For setup examples, URL-based clients, Docker access, ports, CORS boundaries, and token rotation, see [MCP configuration](docs/mcp-configuration.md).
204
230
205
231
---
206
232
@@ -225,6 +251,10 @@ knowledge base. It adds:
225
251
-`@` mentions find files and folders with forgiving workspace-path search;
226
252
selecting one inserts only its workspace-relative path.
227
253
254
+
Claude Code and Codex keep their normal provider login and native history.
255
+
Those credentials are independent from StashBase account sign-in and the
256
+
embedding source selected for AI Index.
257
+
228
258
---
229
259
230
260
## Storage Model
@@ -266,7 +296,7 @@ areas without duplicating the source tree:
266
296
267
297
## Build From Source
268
298
269
-
For contributors and developers building locally, and for platforms without a prebuilt installer.
299
+
For contributors and developers running StashBase locally from source.
270
300
271
301
### Linux prerequisites (Ubuntu / Debian)
272
302
@@ -289,11 +319,6 @@ pnpm electron
289
319
# Development mode
290
320
pnpm dev
291
321
292
-
# Build a distributable app for your platform
293
-
pnpm dist # macOS
294
-
pnpm dist:win # Windows
295
-
pnpm dist:linux # Linux (.deb and .AppImage)
296
-
297
322
# Optional: include the local PDF/OCR extractor sidecar
298
323
pnpm build:python-extract-sidecar
299
324
```
@@ -304,6 +329,10 @@ Before opening a PR:
304
329
pnpm check
305
330
```
306
331
332
+
Packaging is release-only and runs from a validated release tag. Maintainers
333
+
should follow the [release pipeline](code-review/release-pipeline.md) instead
334
+
of creating ad hoc distributable builds.
335
+
307
336
---
308
337
309
338
## Status
@@ -325,7 +354,7 @@ Reasonably stable:
325
354
- Markdown, HTML, JSON, PDF, and image preview
326
355
- PDF extraction, image OCR, and local audio and video transcription, with persisted failures and retry
327
356
- AI Index and exact text search
328
-
- MCP server and client connectors
357
+
- MCP access for built-in and externally configured clients
Copy file name to clipboardExpand all lines: code-review/agent-panel.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,14 @@
16
16
the scope visible to the user; content and resumed history remain pinned.
17
17
- A scope-specific History selection records one pending handoff. The active
18
18
suitable blank tab consumes it exactly once before reconnecting.
19
+
- Runtime readiness gates Chat before transport connection. Failed gates use
20
+
the structured preparation failure stage and advertised manual recovery:
21
+
installation can copy an install command, MCP can open manual setup, and
22
+
simulated failures can remain retry-only. Error prose never selects an
23
+
action.
24
+
- Tab activation and history resume only select renderer state. A missing
25
+
runtime remains on the setup gate until **Install and continue**; activation
26
+
code must not call the preparation endpoint speculatively.
19
27
20
28
## Layout and Visibility
21
29
@@ -94,8 +102,8 @@
94
102
|---|---|
95
103
| Panel boundary |`web-src/src/components/ChatPane.tsx` and `AgentView.tsx`|
96
104
| Transcript/composer Modules |`web-src/src/components/agent/AgentMessages.tsx`, `AgentComposer.tsx`, `MentionComposer.tsx`, and `SessionHistoryMenu.tsx`|
97
-
| State Interfaces | Chat tab state/actions in `web-src/src/store/state.ts` and `stateReducer.ts`; focused pure state Modules under `components/agent/`|
98
-
| Runtime transport Adapter | connection URL/lifecycle Modules under `components/agent/` over the normalized [Agent Runtime](agent-runtime.md) protocol |
105
+
| State Interfaces | Chat tab state/actions in `web-src/src/store/state.ts` and `stateReducer.ts`; activation consent in `components/agent/chatActivation.ts`; focused pure state Modules under `components/agent/`|
106
+
| Runtime transport Adapter | connection URL/lifecycle Modules and `runtimeFailurePresentation.ts`under `components/agent/` over the normalized [Agent Runtime](agent-runtime.md) protocol |
repeats that idempotent write immediately before process start.
23
-
- A discovery, installation, or config failure is visible and retryable but
24
-
never blocks the workspace or silently substitutes another Agent.
28
+
- Readiness configures the matching CLI's StashBase MCP entry through
29
+
`ensureAgentMcp`, the only writer of the built-in agents' own config files.
30
+
Native attach repeats that idempotent write immediately before process
31
+
start. There is no user-facing connect/disconnect for built-in agents; MCP
32
+
is part of readiness, and Settings surfaces a repair action only on
33
+
failure.
34
+
- Preparation is one staged Interface: discover, install only when missing,
35
+
then configure MCP. Its failure contract names `stage`, `code`, a bounded
36
+
message, retryability, and an optional manual recovery. Renderer code must
37
+
not classify failures by parsing messages. Installation failure may expose
38
+
the provider install command; MCP failure may expose the read-only manual MCP
39
+
setup, never an install command.
40
+
- Retry calls the same preparation Interface. Fresh discovery skips a completed
41
+
installation, so an MCP retry rewrites only the idempotent MCP configuration;
42
+
no parallel repair state machine exists.
43
+
- Development failure injection is one mutually exclusive, in-memory
44
+
`nextFailure` value. It is consumed only when explicit readiness reaches that
45
+
stage and immediately resets to normal; background startup repair never
46
+
consumes it, and an installation injection stays pending when an existing
47
+
runtime skips installation. Settings presents these controls inside a
48
+
visually distinct development-only surface; production omits the surface.
49
+
- A discovery, installation, or MCP failure is visible and retryable but never
50
+
blocks the workspace or silently substitutes another Agent.
25
51
26
52
## Session Scope and Lifetime
27
53
@@ -82,11 +108,12 @@ assumed CLI versions.
82
108
|---|---|
83
109
| Agent Interface |`AgentAdapter`, normalized client/server events, scope resolution, attach, and stop in `server/agent-contract.ts`|
84
110
| Adapter registry |`server/agent-adapters.ts`|
85
-
| Preparation Interface |`AgentBootstrapCoordinator` in `server/agent-runtime-installer.ts` plus discovery paths in `server/agent-cli.ts`|
111
+
| Preparation Interface |`AgentBootstrapCoordinator` and its structured failure contract in `server/agent-runtime-installer.ts`; discovery and one-shot debug controls in `server/agent-cli.ts` and `server/agent-runtime-paths.ts`|
112
+
| MCP wiring |`ensureAgentMcp` and the launcher writer in `server/agent-mcp.ts`|
86
113
| Claude Adapter |`server/agent.ts` and its SDK/native-process helpers |
87
114
| Codex Adapter |`server/codex-session-runtime.ts`, `codex-rpc-transport.ts`, `codex-protocol.ts`, and `codex-history.ts`|
88
115
| Scope/history owners |`server/agent-session-registry.ts`, `agent-session-folders.ts`, `agent-projects.ts`, and session routes |
89
-
| Renderer Adapter |`web-src/src/agentBootstrap.ts`, `agentCatalog.tsx`, and [Agent Panel](agent-panel.md)|
116
+
| Renderer Adapter |`web-src/src/agentCatalog.tsx`, `components/agent/chatActivation.ts`, `components/agent/runtimeFailurePresentation.ts`, and [Agent Panel](agent-panel.md)|
90
117
| Focused evidence |`server/__tests__/agent-contract.test.ts`, `agent-runtime-installer.test.ts`, `agent-projects.test.ts`, `codex-agent.test.ts`, `agent.test.ts`, and `e2e/fixtures/fake-codex-app-server.test.mjs`|
0 commit comments