fss-link 1.6.1 → 1.6.12

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 (43) hide show
  1. package/LICENSE +1 -0
  2. package/README.md +63 -316
  3. package/bundle/fss-link.js +4038 -134262
  4. package/docs/CONFIGURATION.md +200 -0
  5. package/docs/README.md +192 -0
  6. package/docs/TOOLS.md +268 -0
  7. package/docs/assets/batch_0001_fss-link-terminal-interface.png +0 -0
  8. package/docs/assets/batch_0002_multiprovider-connection-hub-a.png +0 -0
  9. package/docs/assets/batch_0003_database-persistence-system-a.png +0 -0
  10. package/docs/assets/batch_0004_context-window-compression-a.png +0 -0
  11. package/docs/assets/batch_0005_file-operations-with-safety.png +0 -0
  12. package/docs/assets/batch_0006_semantic-search-rag-system.png +0 -0
  13. package/docs/assets/batch_0008_document-parsing-suite-a.png +0 -0
  14. package/docs/assets/batch_0009_web-research-tools-a.png +0 -0
  15. package/docs/assets/batch_0010_texttospeech-voice-output-a.png +0 -0
  16. package/docs/assets/batch_0011_shell-command-execution-a.png +0 -0
  17. package/docs/assets/batch_0012_mcp-extension-system-a.png +0 -0
  18. package/docs/assets/batch_0014_approval-mode-switches-a.png +0 -0
  19. package/docs/assets/batch_0015_folder-trust-system-a.png +0 -0
  20. package/package.json +53 -38
  21. package/scripts/check-publish.js +2 -1
  22. package/scripts/install-linux.sh +1 -2
  23. package/scripts/install-macos.sh +1 -2
  24. package/scripts/install-windows.ps1 +1 -2
  25. package/scripts/prebundle-sync-dist.js +51 -0
  26. package/README.pdf +0 -0
  27. package/scripts/analyze-session-logs.sh +0 -279
  28. package/scripts/emergency-kill-all-tests.sh +0 -95
  29. package/scripts/emergency-kill-vitest.sh +0 -95
  30. package/scripts/extract-session-logs.sh +0 -202
  31. package/scripts/get-previous-tag.js +0 -213
  32. package/scripts/get-release-version.js +0 -119
  33. package/scripts/index-session-logs.sh +0 -173
  34. package/scripts/local_telemetry.js +0 -219
  35. package/scripts/memory-monitor.sh +0 -165
  36. package/scripts/process-session-log.py +0 -302
  37. package/scripts/quick-install.sh +0 -195
  38. package/scripts/telemetry_gcp.js +0 -188
  39. package/scripts/telemetry_utils.js +0 -421
  40. package/scripts/test-windows-paths.js +0 -51
  41. package/scripts/tests/get-release-version.test.js +0 -110
  42. package/scripts/tests/test-setup.ts +0 -12
  43. package/scripts/tests/vitest.config.ts +0 -20
@@ -0,0 +1,200 @@
1
+ # Configuration Guide
2
+
3
+ ## Provider Setup
4
+
5
+ FSS Link supports multiple LLM providers. Configure via CLI flags, environment variables, or the persistent database.
6
+
7
+ ### Priority Order
8
+
9
+ 1. **CLI flags** (`--provider`, `--model`) — highest priority, per-session
10
+ 2. **Database config** — persistent, survives restarts
11
+ 3. **Environment variables** — traditional fallback
12
+
13
+ ### Ollama
14
+
15
+ Local models via Ollama. Default port 11434.
16
+
17
+ ```bash
18
+ # CLI
19
+ fss-link --provider ollama --model qwen3:4b
20
+
21
+ # Or set the context window for large conversations
22
+ fss-link --provider ollama --model qwen3:4b
23
+ # Then use /context 32768 inside the session
24
+ ```
25
+
26
+ **Context window**: Defaults to 32,768 tokens. Use the `/context` command to set a custom value that persists to the database.
27
+
28
+ ### LM Studio
29
+
30
+ Local models via LM Studio. Default port 1234.
31
+
32
+ ```bash
33
+ fss-link --provider lm-studio --model your-model-name
34
+ ```
35
+
36
+ **Context window**: Auto-detected by querying the LM Studio API. Falls back to 32,768 if unavailable.
37
+
38
+ ### vLLM / OpenAI-Compatible Endpoints
39
+
40
+ Any server that implements the OpenAI API format (`/v1/chat/completions`, `/v1/models`).
41
+
42
+ ```bash
43
+ export BOB_AI_BASE_URL="http://your-server:8000/v1"
44
+ export BOB_AI_API_KEY="your-key" # optional, use "none" if not required
45
+ fss-link --provider bob-ai --model your-model-name
46
+ ```
47
+
48
+ **Context window**: Auto-detected by querying `/v1/models` for `max_model_len` (vLLM) or `max_context_length`. Falls back to 131,072 if the endpoint doesn't report it.
49
+
50
+ ### OpenAI API
51
+
52
+ ```bash
53
+ export OPENAI_API_KEY="sk-..."
54
+ fss-link --provider openai-api-key --model gpt-4o
55
+ ```
56
+
57
+ ### Gemini API
58
+
59
+ ```bash
60
+ export GEMINI_API_KEY="your-key"
61
+ fss-link --provider gemini-api-key --model gemini-2.0-flash
62
+ ```
63
+
64
+ ---
65
+
66
+ ## Database Configuration
67
+
68
+ FSS Link stores model configuration in a SQLite database at `~/.fss-link/config.db`. This is the persistent source of truth for model settings.
69
+
70
+ <!-- bobai:image-card width="6" -->
71
+ ![Database Persistence System](./assets/batch_0003_database-persistence-system-a.png)
72
+ ### Persistent Model Settings
73
+ Your model choice survives restarts. CLI flags override, environment fallback.
74
+ <!-- /bobai:image-card -->
75
+
76
+ ### Switching Models via Database
77
+
78
+ ```bash
79
+ # View current config
80
+ sqlite3 ~/.fss-link/config.db "SELECT auth_type, model_name, endpoint_url, is_active FROM model_configs"
81
+
82
+ # Switch active model
83
+ sqlite3 ~/.fss-link/config.db "UPDATE model_configs SET is_active = 0"
84
+ sqlite3 ~/.fss-link/config.db "UPDATE model_configs SET is_active = 1 WHERE auth_type = 'ollama' AND model_name = 'qwen3:4b'"
85
+
86
+ # Change endpoint
87
+ sqlite3 ~/.fss-link/config.db "UPDATE model_configs SET endpoint_url = 'http://your-server:1234/v1' WHERE auth_type = 'lm-studio'"
88
+ ```
89
+
90
+ ### Database Location
91
+
92
+ - Linux/macOS: `~/.fss-link/config.db`
93
+ - Data directory: `~/.fss-link/`
94
+ - Todos: `~/.fss-link/todos/`
95
+
96
+ ---
97
+
98
+ ## Context Window Management
99
+
100
+ The context window is the maximum number of tokens the model can process in a single conversation. FSS Link manages this automatically.
101
+
102
+ ### How Context is Resolved
103
+
104
+ 1. **Manual override** in `settings.json` (`chatCompression.contextWindow`)
105
+ 2. **LM Studio API query** (auto-detected from server)
106
+ 3. **Ollama `num_ctx`** from `/context` command or sampling params
107
+ 4. **OpenAI-compatible `/models` endpoint** (vLLM `max_model_len`)
108
+ 5. **Static lookup** for known models (Gemini variants)
109
+ 6. **Provider defaults**: Ollama 32k, LM Studio 32k, OpenAI-compat 128k
110
+
111
+ ### Compression
112
+
113
+ When a conversation reaches 85% of the context window, FSS Link automatically compresses the older history into a summary. The most recent 30% is preserved in full.
114
+
115
+ <!-- bobai:callout variant="info" -->
116
+ > **How it works**: Older messages are summarized into condensed notes while recent context stays in full detail. Images are replaced with `[Image: type]` placeholders. Tool outputs over 25k chars get truncated.
117
+ <!-- /bobai:callout -->
118
+
119
+ <!-- bobai:image-card width="6" -->
120
+ ![Context Window Compression](./assets/batch_0004_context-window-compression-a.png)
121
+ ### Smart History Management
122
+ Full detail on recent context, compressed summaries for older messages.
123
+ <!-- /bobai:image-card -->
124
+
125
+ - **Threshold**: 85% (configurable via `chatCompression.contextPercentageThreshold`)
126
+ - **Images**: Stripped before compression (replaced with `[Image: type]` placeholders)
127
+ - **Tool results**: Large results (>25k chars) are truncated before entering history
128
+
129
+ ### The `/context` Command
130
+
131
+ Set the context window for Ollama models:
132
+
133
+ ```
134
+ /context 32768 # Set to 32k
135
+ /context 98304 # Set to 98k (if model supports it)
136
+ /context 98k # Shorthand
137
+ ```
138
+
139
+ This persists to the database and affects both the display and compression behaviour.
140
+
141
+ ---
142
+
143
+ ## Settings File
144
+
145
+ Optional `settings.json` in your project root or `~/.fss-link/settings.json`:
146
+
147
+ ```json
148
+ {
149
+ "chatCompression": {
150
+ "contextWindow": 98304,
151
+ "contextPercentageThreshold": 0.7
152
+ }
153
+ }
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Approval Modes
159
+
160
+ <!-- bobai:image-card width="6" -->
161
+ ![Approval Mode Switches](./assets/batch_0014_approval-mode-switches-a.png)
162
+ ### Control the Balance
163
+ Choose how much automation vs oversight you want.
164
+ <!-- /bobai:image-card -->
165
+
166
+ | Mode | Flag | Behaviour |
167
+ |------|------|-----------|
168
+ | Default | (none) | Prompts for approval on all file edits and shell commands |
169
+ | Auto-edit | `--approval-mode auto_edit` | Auto-approves file operations, prompts for shell commands |
170
+ | YOLO | `--approval-mode yolo` or `-y` | Auto-approves everything |
171
+
172
+ ---
173
+
174
+ ## Folder Trust
175
+
176
+ FSS Link tracks whether a folder is trusted for file operations. On first use in a new directory, it will ask if you trust the folder.
177
+
178
+ <!-- bobai:image-card width="6" -->
179
+ ![Folder Trust System](./assets/batch_0015_folder-trust-system-a.png)
180
+ ### Security by Location
181
+ Each folder gets a trust decision. Non-interactive mode requires trust or YOLO/auto-edit.
182
+ <!-- /bobai:image-card -->
183
+
184
+ ```bash
185
+ # Trust the current folder
186
+ fss-link --trust-folder
187
+
188
+ # Non-interactive mode requires trusted folder or auto_edit/yolo mode
189
+ fss-link --approval-mode auto_edit -p "your prompt"
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Debug Mode
195
+
196
+ ```bash
197
+ fss-link --debug
198
+ ```
199
+
200
+ Enables verbose logging including API calls, token counts, context resolution, and tool execution details. Set `FSS_DEBUG=1` in environment for additional debug output from subsystems.
package/docs/README.md ADDED
@@ -0,0 +1,192 @@
1
+ # FSS Link
2
+
3
+ An AI-powered coding assistant for the terminal. FSS Link connects to local and cloud language models to help you write, edit, debug, and understand code through natural conversation.
4
+
5
+ <!-- bobai:image-card width="8" -->
6
+ ![FSS Link Terminal Interface](./assets/batch_0001_fss-link-terminal-interface.png)
7
+ ### Your AI Pair Programmer
8
+ Type what you want in plain language. The agent reads your code, makes edits, runs commands, searches your codebase, and explains what's happening.
9
+ <!-- /bobai:image-card -->
10
+
11
+ ## What It Does
12
+
13
+ ```
14
+ $ fss-link
15
+ > Read the main config file and explain what each section does
16
+ > Fix the bug in the authentication middleware
17
+ > Add unit tests for the user registration endpoint
18
+ > Search the codebase for all API endpoint definitions
19
+ ```
20
+
21
+ ## Key Features
22
+
23
+ <!-- bobai:badges -->
24
+ Ollama, LM Studio, OpenAI, Gemini, vLLM
25
+ <!-- /bobai:badges -->
26
+
27
+ - **Multi-provider support** — Connect to any LLM (local or cloud)
28
+ - **Local-first** — Works offline, no cloud dependency required
29
+ - **File operations** — Read, write, edit with safety checks
30
+ - **Shell execution** — Run commands with approval modes
31
+ - **Semantic search** — RAG-powered codebase discovery
32
+ - **Vision support** — Analyze images and screenshots
33
+ - **Document parsing** — PDF, Excel, Word, email, CSV/JSON
34
+ - **Web tools** — Fetch, search, scrape
35
+ - **TTS integration** — Hands-free voice output
36
+ - **Context compression** — Automatic history management
37
+ - **Session resume** — Pick up where you left off
38
+ - **MCP support** — Extend with custom tools
39
+
40
+ <!-- bobai:image-card width="6" -->
41
+ ![Multi-Provider Connection Hub](./assets/batch_0002_multiprovider-connection-hub-a.png)
42
+ ### Connect Anywhere
43
+ Local models via Ollama. Cloud providers (OpenAI, Gemini). Custom endpoints (vLLM, LM Studio).
44
+ <!-- /bobai:image-card -->
45
+
46
+ ## Installation
47
+
48
+ ### From npm
49
+
50
+ ```bash
51
+ npm install -g fss-link
52
+ ```
53
+
54
+ ### From Source
55
+
56
+ ```bash
57
+ git clone https://github.com/FSScoding/fss-link.git
58
+ cd fss-link
59
+ npm install
60
+ npm run bundle
61
+ npm install -g .
62
+ ```
63
+
64
+ **Note:** `npm run bundle` uses esbuild to bundle directly from TypeScript source. Do not run bare `tsc` — the root tsconfig has no `outDir` and will scatter compiled files next to source, causing stale code to be bundled. See issue #64.
65
+
66
+ ## Quick Start
67
+
68
+ ### With Ollama (Local)
69
+
70
+ ```bash
71
+ # Start Ollama with a model
72
+ ollama run qwen3:4b
73
+
74
+ # Launch FSS Link
75
+ fss-link --provider ollama --model qwen3:4b
76
+ ```
77
+
78
+ ### With LM Studio (Local)
79
+
80
+ ```bash
81
+ # Start LM Studio server on port 1234
82
+ fss-link --provider lm-studio --model your-model-name
83
+ ```
84
+
85
+ ### With vLLM or OpenAI-Compatible Endpoint
86
+
87
+ ```bash
88
+ export BOB_AI_BASE_URL="http://your-server:8000/v1"
89
+ fss-link --provider bob-ai --model your-model-name
90
+ ```
91
+
92
+ ### With OpenAI API
93
+
94
+ ```bash
95
+ export OPENAI_API_KEY="sk-..."
96
+ fss-link --provider openai-api-key --model gpt-4o
97
+ ```
98
+
99
+ ## Usage Modes
100
+
101
+ ### Interactive (default)
102
+
103
+ ```bash
104
+ fss-link
105
+ ```
106
+
107
+ Opens an interactive chat session. Type messages, use `@file.txt` to reference files, press Enter to send.
108
+
109
+ ### Non-Interactive
110
+
111
+ ```bash
112
+ fss-link -p "explain what this project does"
113
+ ```
114
+
115
+ Runs a single prompt and exits. Useful for scripts and automation.
116
+
117
+ ### YOLO Mode
118
+
119
+ ```bash
120
+ fss-link --approval-mode yolo
121
+ ```
122
+
123
+ Auto-approves all tool operations. Use with caution — the agent can modify files and run commands without asking.
124
+
125
+ ### Auto-Edit Mode
126
+
127
+ ```bash
128
+ fss-link --approval-mode auto_edit
129
+ ```
130
+
131
+ Auto-approves file edits but still prompts for shell commands.
132
+
133
+ ## Keyboard Shortcuts
134
+
135
+ | Key | Action |
136
+ |-----|--------|
137
+ | Enter | Send message |
138
+ | Shift+Enter | New line |
139
+ | Up/Down | Navigate history (single-line) or move cursor (multiline) |
140
+ | Ctrl+P / Ctrl+N | Navigate message history |
141
+ | Ctrl+A / Ctrl+E | Home / End of line |
142
+ | Ctrl+C | Clear current input |
143
+ | Ctrl+L | Clear screen |
144
+ | Ctrl+V | Paste clipboard image |
145
+ | Escape (x2) | Clear input |
146
+ | `!` | Toggle shell mode |
147
+
148
+ ## File References
149
+
150
+ Reference files directly in your message with `@`:
151
+
152
+ ```
153
+ > @src/config.ts explain this configuration
154
+ > @package.json what dependencies do we have?
155
+ > @screenshot.png what's shown in this image?
156
+ ```
157
+
158
+ ## Environment Variables
159
+
160
+ | Variable | Description | Default |
161
+ |----------|-------------|---------|
162
+ | `BOB_AI_BASE_URL` | OpenAI-compatible endpoint URL | — |
163
+ | `BOB_AI_API_KEY` | API key for the endpoint | — |
164
+ | `BOB_AI_MODEL` | Default model name | — |
165
+ | `OPENAI_API_KEY` | OpenAI API key | — |
166
+ | `OPENAI_BASE_URL` | OpenAI base URL override | — |
167
+ | `GEMINI_API_KEY` | Google Gemini API key | — |
168
+ | `FSS_TTS_URL` | TTS server endpoint | `http://localhost:11450` |
169
+ | `FSS_RAG_URL` | RAG search server endpoint | `http://localhost:11440` |
170
+ | `FSS_DEBUG` | Enable debug logging | — |
171
+
172
+ ## Testing
173
+
174
+ **Do not run `npm test` from the project root.** It launches vitest across all workspaces in parallel (256+ test files) and will consume all available system memory. See [VITEST-SAFETY.md](../VITEST-SAFETY.md) for safe testing methods and emergency kill procedures.
175
+
176
+ ```bash
177
+ # Safe: run individual test files
178
+ npx vitest run packages/cli/src/config/database.test.ts
179
+
180
+ # Safe: run one workspace
181
+ npm run test --workspace=packages/cli
182
+ ```
183
+
184
+ ## Documentation
185
+
186
+ - [Configuration Guide](CONFIGURATION.md) — providers, models, database, context settings
187
+ - [Tools Reference](TOOLS.md) — all available tools and their parameters
188
+ - [Tool Flow Diagrams](../fss-docs/tool-flow-diagrams/) — visual documentation with Mermaid diagrams
189
+
190
+ ## License
191
+
192
+ Apache-2.0
package/docs/TOOLS.md ADDED
@@ -0,0 +1,268 @@
1
+ # Tools Reference
2
+
3
+ FSS Link provides the agent with a set of tools it can use to interact with your system. Each tool has parameters the agent controls and safety checks that protect your files.
4
+
5
+ ---
6
+
7
+ ## File Operations
8
+
9
+ <!-- bobai:image-card width="6" -->
10
+ ![File Operations with Safety](./assets/batch_0005_file-operations-with-safety.png)
11
+ ### Safe by Default
12
+ Diff previews before changes. Workspace boundaries. Confirmation prompts.
13
+ <!-- /bobai:image-card -->
14
+
15
+ ### read_file
16
+
17
+ Reads a file and returns its contents. Handles text files, images (with vision normalization), PDFs, and binary detection.
18
+
19
+ | Parameter | Type | Description |
20
+ |-----------|------|-------------|
21
+ | `absolute_path` | string | Full path to the file |
22
+ | `offset` | integer | Start reading from this line (optional) |
23
+ | `limit` | integer | Maximum lines to read (optional) |
24
+
25
+ - Images are automatically resized and converted for the model's vision pipeline
26
+ - Large files can be read in sections using `offset` and `limit`
27
+ - File paths are shown as clickable terminal hyperlinks (OSC 8)
28
+
29
+ ### write_file
30
+
31
+ Creates a new file or overwrites an existing one. Requires confirmation in default mode.
32
+
33
+ | Parameter | Type | Description |
34
+ |-----------|------|-------------|
35
+ | `file_path` | string | Full path to write |
36
+ | `content` | string | File content |
37
+
38
+ - Shows a diff preview before writing to existing files
39
+ - Creates parent directories automatically
40
+ - Workspace boundary checks prevent writing outside project
41
+
42
+ ### edit
43
+
44
+ Makes targeted edits to existing files by replacing specific text. The most commonly used file tool.
45
+
46
+ | Parameter | Type | Description |
47
+ |-----------|------|-------------|
48
+ | `file_path` | string | Full path to the file |
49
+ | `old_string` | string | Exact text to find and replace |
50
+ | `new_string` | string | Replacement text |
51
+ | `expected_replacements` | integer | Expected number of matches (optional, for safety) |
52
+
53
+ - Shows a diff preview before applying
54
+ - Fails safely if the target string isn't found or matches multiple times unexpectedly
55
+ - Can create new files when `old_string` is empty
56
+
57
+ ---
58
+
59
+ ## Search & Discovery
60
+
61
+ ### glob
62
+
63
+ Finds files matching a glob pattern. Respects `.gitignore`.
64
+
65
+ | Parameter | Type | Description |
66
+ |-----------|------|-------------|
67
+ | `pattern` | string | Glob pattern (e.g., `**/*.ts`, `src/**/*.test.*`) |
68
+ | `path` | string | Directory to search in (optional, defaults to workspace) |
69
+
70
+ ### grep
71
+
72
+ Searches file contents using regular expressions. Returns matching lines with context.
73
+
74
+ | Parameter | Type | Description |
75
+ |-----------|------|-------------|
76
+ | `pattern` | string | Regex pattern to search for |
77
+ | `path` | string | File or directory to search (optional) |
78
+ | `include` | string | File glob filter (e.g., `*.ts`) (optional) |
79
+
80
+ ### ls
81
+
82
+ Lists directory contents with file metadata (size, type, permissions).
83
+
84
+ | Parameter | Type | Description |
85
+ |-----------|------|-------------|
86
+ | `path` | string | Directory to list |
87
+
88
+ ### rag_search
89
+
90
+ Semantic search over indexed codebases using the FSS-RAG system. Finds code by meaning, not just text matching.
91
+
92
+ <!-- bobai:image-card width="6" -->
93
+ ![Semantic Search RAG System](./assets/batch_0006_semantic-search-rag-system.png)
94
+ ### Search by Meaning
95
+ Find code by what it does, not just what it says. Requires FSS-RAG server.
96
+ <!-- /bobai:image-card -->
97
+
98
+ | Parameter | Type | Description |
99
+ |-----------|------|-------------|
100
+ | `query` | string | Natural language search query |
101
+ | `collection` | string | Collection name (auto-detected from project directory) |
102
+ | `topk` | integer | Number of results (default: 5, max: 20). Each result ~400 chars. |
103
+ | `mode` | string | `semantic` (default), `keyword`, or `ast` |
104
+ | `contextSize` | integer | Surrounding chunks per result (0-10). Higher = more context but larger response. |
105
+ | `fileTypes` | array | File extension filters (e.g., `[".ts", ".py"]`) |
106
+ | `pathPattern` | string | Glob pattern to restrict search paths |
107
+
108
+ Requires the FSS-RAG server running at `FSS_RAG_URL` (default `localhost:11440`).
109
+
110
+ ---
111
+
112
+ ## Shell & System
113
+
114
+ <!-- bobai:image-card width="6" -->
115
+ ![Shell Command Execution](./assets/batch_0011_shell-command-execution-a.png)
116
+ ### Controlled Execution
117
+ Run commands with safety checks. Approval required by default.
118
+ <!-- /bobai:image-card -->
119
+
120
+ ### run_shell_command
121
+
122
+ Executes shell commands. Always requires confirmation unless in YOLO mode.
123
+
124
+ | Parameter | Type | Description |
125
+ |-----------|------|-------------|
126
+ | `command` | string | The shell command to execute |
127
+ | `description` | string | What this command does (shown to user) |
128
+ | `is_background` | boolean | Run in background (optional) |
129
+
130
+ - Background commands are useful for dev servers, watchers, etc.
131
+ - Output is captured and returned to the agent
132
+ - Long-running commands have configurable timeouts
133
+
134
+ ---
135
+
136
+ ## Web Tools
137
+
138
+ <!-- bobai:image-card width="6" -->
139
+ ![Web Research Tools](./assets/batch_0009_web-research-tools-a.png)
140
+ ### Browse and Search
141
+ Fetch pages, search the web, scrape content into your conversation.
142
+ <!-- /bobai:image-card -->
143
+
144
+ ### web_fetch
145
+
146
+ Fetches a URL and returns its content. Handles HTML (extracted as readable text), JSON, and plain text.
147
+
148
+ | Parameter | Type | Description |
149
+ |-----------|------|-------------|
150
+ | `url` | string | URL to fetch |
151
+
152
+ ### web_search
153
+
154
+ Searches the web using a search engine API.
155
+
156
+ | Parameter | Type | Description |
157
+ |-----------|------|-------------|
158
+ | `query` | string | Search query |
159
+ | `limit` | integer | Maximum results (optional) |
160
+
161
+ Requires a search API key (Tavily or similar) configured via `--tavily-api-key` or environment variable.
162
+
163
+ ### fetch_image
164
+
165
+ Downloads an image from a URL and saves it locally.
166
+
167
+ | Parameter | Type | Description |
168
+ |-----------|------|-------------|
169
+ | `url` | string | Image URL |
170
+ | `save_path` | string | Where to save the file (optional) |
171
+
172
+ ---
173
+
174
+ ## Document Parsing
175
+
176
+ <!-- bobai:image-card width="6" -->
177
+ ![Document Parsing Suite](./assets/batch_0008_document-parsing-suite-a.png)
178
+ ### Multi-Format Support
179
+ PDF, Excel, Word, email, CSV, JSON — one tool per format.
180
+ <!-- /bobai:image-card -->
181
+
182
+ ### read_pdf, read_excel, read_word, read_email, read_data
183
+
184
+ Specialized parsers for structured documents. These extract text, tables, metadata, and structure from common file formats.
185
+
186
+ | Tool | Formats | What It Extracts |
187
+ |------|---------|-----------------|
188
+ | `read_pdf` | PDF | Text, page structure, metadata |
189
+ | `read_excel` | XLSX, XLS, CSV | Sheets, cells, formulas, structure |
190
+ | `read_word` | DOCX | Text, headings, tables, styles |
191
+ | `read_email` | EML, MSG | Headers, body, attachments metadata |
192
+ | `read_data` | CSV, JSON, YAML, XML, TOML | Parsed data with schema inference |
193
+
194
+ ---
195
+
196
+ ## Agent Utilities
197
+
198
+ ### workplan_update (formerly `todo_write`)
199
+
200
+ Manages a structured work plan for the current session. Helps the agent track multi-step work.
201
+
202
+ | Parameter | Type | Description |
203
+ |-----------|------|-------------|
204
+ | `todos` | array | Array of `{id, content, status}` objects |
205
+
206
+ Status values: `pending`, `in_progress`, `completed`.
207
+
208
+ Usage guidelines:
209
+ - Create the plan once, then proceed with other tools.
210
+ - Update only after real progress (status changes) or when adding/removing tasks.
211
+ - Avoid calling repeatedly without progress.
212
+
213
+ ### memory
214
+
215
+ Reads and writes to the agent's persistent memory system. Stores user preferences, project context, and learned patterns across sessions.
216
+
217
+ ---
218
+
219
+ ## TTS (Text-to-Speech)
220
+
221
+ <!-- bobai:image-card width="6" -->
222
+ ![Text-to-Speech Voice Output](./assets/batch_0010_texttospeech-voice-output-a.png)
223
+ ### Hands-Free Interaction
224
+ Listen to responses with natural voices (Bella, Emma, George, Lewis, and more).
225
+ <!-- /bobai:image-card -->
226
+
227
+ ### tts_speak
228
+
229
+ Synthesizes speech from text using the FSS-TTS server.
230
+
231
+ | Parameter | Type | Description |
232
+ |-----------|------|-------------|
233
+ | `text` | string | Text to speak |
234
+ | `voice` | string | Voice name (Bella, Emma, George, Lewis, Sarah, Michael, Adam, Isabella, Nicole) |
235
+
236
+ Requires the FSS-TTS server running at `FSS_TTS_URL` (default `localhost:11450`).
237
+
238
+ ---
239
+
240
+ ## MCP (Model Context Protocol)
241
+
242
+ <!-- bobai:image-card width="6" -->
243
+ ![MCP Extension System](./assets/batch_0012_mcp-extension-system-a.png)
244
+ ### Extensible Architecture
245
+ Plug in MCP servers to add custom tools and capabilities.
246
+ <!-- /bobai:image-card -->
247
+
248
+ FSS Link supports MCP servers for extending its capabilities. Configure MCP servers in your project's settings or via the CLI:
249
+
250
+ ```bash
251
+ fss-link mcp add <server-name> <command>
252
+ fss-link mcp list
253
+ fss-link mcp remove <server-name>
254
+ ```
255
+
256
+ MCP tools appear alongside native tools and are used by the agent automatically when relevant.
257
+
258
+ ---
259
+
260
+ ## Tool Safety
261
+
262
+ All file-modifying tools (edit, write_file) enforce:
263
+
264
+ - **Workspace boundary checks** — can't write outside your project directory
265
+ - **Diff previews** — see exactly what will change before approving
266
+ - **Confirmation prompts** — unless in auto_edit or YOLO mode
267
+ - **Tool result size limits** — outputs exceeding 25k characters are truncated to prevent context overflow
268
+ - **Error messages include the failed path** — so the agent knows exactly what went wrong and doesn't retry blindly