synap-git 2.3.0__tar.gz → 2.3.1__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 (56) hide show
  1. {synap_git-2.3.0 → synap_git-2.3.1}/.gitignore +1 -0
  2. {synap_git-2.3.0 → synap_git-2.3.1}/CHANGELOG.md +15 -0
  3. {synap_git-2.3.0 → synap_git-2.3.1}/PKG-INFO +133 -107
  4. {synap_git-2.3.0 → synap_git-2.3.1}/README.md +132 -106
  5. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/__init__.py +1 -1
  6. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/main.py +37 -5
  7. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/git/state.py +64 -40
  8. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/indexer/engine.py +27 -3
  9. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/indexer/scanner.py +2 -0
  10. {synap_git-2.3.0 → synap_git-2.3.1}/.synap.example/README.md +0 -0
  11. {synap_git-2.3.0 → synap_git-2.3.1}/LICENSE.md +0 -0
  12. {synap_git-2.3.0 → synap_git-2.3.1}/pyproject.toml +0 -0
  13. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/api/__init__.py +0 -0
  14. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/api/app.py +0 -0
  15. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/api/static/index.html +0 -0
  16. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/__init__.py +0 -0
  17. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/__main__.py +0 -0
  18. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/checkpoint.py +0 -0
  19. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/lessons.py +0 -0
  20. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/memory.py +0 -0
  21. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/usage.py +0 -0
  22. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/cli/wiki.py +0 -0
  23. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/config.py +0 -0
  24. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/diagnostics/__init__.py +0 -0
  25. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/diagnostics/logger.py +0 -0
  26. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/diagnostics/tracing.py +0 -0
  27. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/embeddings/__init__.py +0 -0
  28. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/git/__init__.py +0 -0
  29. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/indexer/__init__.py +0 -0
  30. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/indexer/daemon.py +0 -0
  31. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/indexer/wiki.py +0 -0
  32. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/mcp/__init__.py +0 -0
  33. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/mcp/server.py +0 -0
  34. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/parser/__init__.py +0 -0
  35. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/parser/registry.py +0 -0
  36. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/__init__.py +0 -0
  37. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/anthropic.py +0 -0
  38. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/base.py +0 -0
  39. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/factory.py +0 -0
  40. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/gemini.py +0 -0
  41. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/ollama.py +0 -0
  42. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/openai.py +0 -0
  43. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/provider/openrouter.py +0 -0
  44. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/py.typed +0 -0
  45. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/retrieval/__init__.py +0 -0
  46. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/retrieval/engine.py +0 -0
  47. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/retrieval/memory.py +0 -0
  48. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/security/__init__.py +0 -0
  49. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/security/redactor.py +0 -0
  50. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/security/sanitizer.py +0 -0
  51. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/security/validator.py +0 -0
  52. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/storage/__init__.py +0 -0
  53. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/storage/sqlite.py +0 -0
  54. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/utils/__init__.py +0 -0
  55. {synap_git-2.3.0 → synap_git-2.3.1}/src/synap_git/utils/serialization.py +0 -0
  56. {synap_git-2.3.0 → synap_git-2.3.1}/website/README.md +0 -0
@@ -1,6 +1,7 @@
1
1
  .DS_Store
2
2
  Thumbs.db
3
3
  .venv/
4
+ .venv312/
4
5
  __pycache__/
5
6
  *.py[cod]
6
7
  .pytest_cache/
@@ -7,19 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [2.2.0] - 2026-08-03
9
9
 
10
+ ## [2.3.1] - 2026-08-03
11
+
12
+ ### Fixed
13
+
14
+ - **Git state detection**: normalized branch resolution and improved dirty-state detection during runtime bootstrap.
15
+ - **Incremental indexing**: skipped reindex when HEAD commit is already indexed to restore zero-change performance.
16
+
17
+ ### Chore
18
+
19
+ - **Bumped package version** to `2.3.1`.
20
+
10
21
  ## [2.3.0] - 2026-08-03
11
22
 
12
23
  ### Added
24
+
13
25
  - **CLI Cost & Usage Command**: Expose `synap cost` (alias `synap usage`) to show aggregated LLM calls, token counts, and estimated USD cost in the terminal.
14
26
  - **Web UI: CLI Cost Integration**: The website CLI playground now surfaces an estimated cost line for sample commands so visitors can see token/cost economics.
15
27
 
16
28
  ### Changed
29
+
17
30
  - **Frontend Defensive Rendering**: Guarded several UI paths against undefined symbol objects to prevent runtime errors in production (fixed `.type` property reads).
18
31
 
19
32
  ### Chore
33
+
20
34
  - **Bumped package version** to `2.3.0`.
21
35
  - **Release automation**: prepared changelog and release tag for GitHub release `v2.3.0`.
22
36
 
37
+ ## [2.2.0] - 2026-08-03
23
38
 
24
39
  ### Added
25
40
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: synap-git
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Persistent structural context infrastructure for AI coding agents.
5
5
  Project-URL: Homepage, https://github.com/saahilpal/synapse
6
6
  Project-URL: Repository, https://github.com/saahilpal/synapse
@@ -108,31 +108,32 @@ Synap coordinates local repository scanning, graph storage, wiki rendering, and
108
108
  └──────────────────────────┘
109
109
  ```
110
110
 
111
- * **synap_git.cli** — Mounts Typer subcommands for configuration, database repair, logs tailing, and service management.
112
- * **synap_git.indexer.daemon** — Runs the background loop tracking commit shifts and processes asynchronous documentation tasks.
113
- * **synap_git.api.app** — Serves REST endpoints for system metrics, LLM call logging, and diagnostic event streams.
114
- * **synap_git.git.state** — Extracts Git commit OIDs, untracked changes status, and branch indicators.
115
- * **synap_git.indexer.engine** — Orchestrates parallel file parsing, AST traversal, and database serialization.
116
- * **synap_git.parser.registry** — Parses language-specific grammar using Tree-sitter.
117
- * **synap_git.storage.sqlite** — Controls SQLite databases, Write-Ahead Logging (WAL), and FTS5 search indexing.
118
- * **synap_git.indexer.wiki** — Generates file, module, and project markdown documentation summaries.
119
- * **synap_git.retrieval.engine** — Controls lexical, structural, and semantic search queries with token budgeting.
120
- * **synap_git.mcp.server** — Serves Model Context Protocol commands via stdio.
111
+ - **synap_git.cli** — Mounts Typer subcommands for configuration, database repair, logs tailing, and service management.
112
+ - **synap_git.indexer.daemon** — Runs the background loop tracking commit shifts and processes asynchronous documentation tasks.
113
+ - **synap_git.api.app** — Serves REST endpoints for system metrics, LLM call logging, and diagnostic event streams.
114
+ - **synap_git.git.state** — Extracts Git commit OIDs, untracked changes status, and branch indicators.
115
+ - **synap_git.indexer.engine** — Orchestrates parallel file parsing, AST traversal, and database serialization.
116
+ - **synap_git.parser.registry** — Parses language-specific grammar using Tree-sitter.
117
+ - **synap_git.storage.sqlite** — Controls SQLite databases, Write-Ahead Logging (WAL), and FTS5 search indexing.
118
+ - **synap_git.indexer.wiki** — Generates file, module, and project markdown documentation summaries.
119
+ - **synap_git.retrieval.engine** — Controls lexical, structural, and semantic search queries with token budgeting.
120
+ - **synap_git.mcp.server** — Serves Model Context Protocol commands via stdio.
121
121
 
122
122
  ### The Layer Model
123
123
 
124
124
  Synap isolates structural truth from non-deterministic summaries through three defined layers:
125
125
 
126
- * **L1 (Structural Graph):** Tree-sitter parsers convert code files to AST symbols and import dependencies. Imports map caller-callee relations in a database graph, fully regeneratable from HEAD.
127
- * **L2 (Semantic Wiki):** Asynchronous background prompts construct markdown summaries of files and modules. Missing pages are resolved on-demand through lazy loading.
128
- * **L3 (Behavioral Memory):** Stored checkpoints, technical decisions, and lessons persist through branch swaps and index rollbacks.
126
+ - **L1 (Structural Graph):** Tree-sitter parsers convert code files to AST symbols and import dependencies. Imports map caller-callee relations in a database graph, fully regeneratable from HEAD.
127
+ - **L2 (Semantic Wiki):** Asynchronous background prompts construct markdown summaries of files and modules. Missing pages are resolved on-demand through lazy loading.
128
+ - **L3 (Behavioral Memory):** Stored checkpoints, technical decisions, and lessons persist through branch swaps and index rollbacks.
129
129
 
130
130
  ### Runtime Topology
131
131
 
132
132
  On daemon execution, Synap hosts all services in a single process using the asyncio event loop:
133
- * **Git Watcher Loop:** Polls repository state every 2 seconds. Identifies branch switches, commit additions, merges, and reverts.
134
- * **Uvicorn Server:** Hosts the REST API and HTML dashboard on port 9876.
135
- * **Wiki Worker Task:** Listens to `wiki_queue` changes, generating summaries using LLM calls.
133
+
134
+ - **Git Watcher Loop:** Polls repository state every 2 seconds. Identifies branch switches, commit additions, merges, and reverts.
135
+ - **Uvicorn Server:** Hosts the REST API and HTML dashboard on port 9876.
136
+ - **Wiki Worker Task:** Listens to `wiki_queue` changes, generating summaries using LLM calls.
136
137
 
137
138
  ### Data Flow
138
139
 
@@ -243,11 +244,13 @@ llm_calls
243
244
  file_path TEXT associated file path if applicable
244
245
  created_at INTEGER unix epoch timestamp
245
246
  ```
246
- *Note: Schema versioning is managed via `user_version` pragmas (currently version 3).*
247
+
248
+ _Note: Schema versioning is managed via `user_version` pragmas (currently version 3)._
247
249
 
248
250
  ### Indexing Pipeline
249
251
 
250
252
  Indexing translates source trees to SQLite relations:
253
+
251
254
  1. **Bootstrap Check:** Compares HEAD commit hash with database records. Passes execution to first-run indexing if blank, or incremental indexing if commit history matches.
252
255
  2. **First-run Indexing:** Parses all files. Files are split into chunks of 500. `ProcessPoolExecutor` uses all available CPU cores to execute AST parsing in parallel.
253
256
  3. **AST Symbol Extraction:** Tree-sitter parsers process code bytes. Traversal scripts register functions and classes.
@@ -258,6 +261,7 @@ Indexing translates source trees to SQLite relations:
258
261
  ### Retrieval Design
259
262
 
260
263
  Retrieval uses a four-stage hybrid query execution loop:
264
+
261
265
  1. **Temporal Selection:** Filters data based on active branch state.
262
266
  2. **Lexical Searching:** Queries terms using `symbols_fts` MATCH indexing, starting candidate scores at `1.0`.
263
267
  3. **Structural Expansion:** Traverses neighbors up to 2 hops away using SQLite recursive CTEs. Neighbors receive a starting score of `0.8^distance`.
@@ -267,34 +271,41 @@ Retrieval uses a four-stage hybrid query execution loop:
267
271
 
268
272
  MCP server communicates via stdio, packaging database actions under a JSON envelope.
269
273
 
270
- * **`get_status`** — Returns indexing counts, branch details, and HEAD commit hashes.
271
- * **`search`** (inputs: `query` string, `max_tokens` integer) — Returns ranked context blocks and latency timelines.
272
- * **`create_checkpoint`** (inputs: `doing` string, `changed_files` list, `next_step` string, `blockers` string) — Registers new thought snapshot.
273
- * **`restore_checkpoint`** — Returns the latest checkpoint detail for the active branch.
274
- * **`log_decision`** (inputs: `content` string, `context_info` string) — Logs architectural decisions.
275
- * **`verify_system`** — Performs SQLite quick checks.
276
- * **`submit_lesson_analysis`** (inputs: `lesson_id` string, `why_failed` string) — Saves lesson details under pending status.
277
- * **`get_approved_memory`** — Returns active approved memory lessons.
278
- * **`get_pending_memory`** — Returns pending lessons awaiting approval.
279
- * **`signal_low_context`** (inputs: `token_count` integer, `capacity` integer) — Asserts window usage thresholds, recommending checkpoints if needed.
274
+ - **`get_status`** — Returns indexing counts, branch details, and HEAD commit hashes.
275
+ - **`search`** (inputs: `query` string, `max_tokens` integer) — Returns ranked context blocks and latency timelines.
276
+ - **`create_checkpoint`** (inputs: `doing` string, `changed_files` list, `next_step` string, `blockers` string) — Registers new thought snapshot.
277
+ - **`restore_checkpoint`** — Returns the latest checkpoint detail for the active branch.
278
+ - **`log_decision`** (inputs: `content` string, `context_info` string) — Logs architectural decisions.
279
+ - **`verify_system`** — Performs SQLite quick checks.
280
+ - **`submit_lesson_analysis`** (inputs: `lesson_id` string, `why_failed` string) — Saves lesson details under pending status.
281
+ - **`get_approved_memory`** — Returns active approved memory lessons.
282
+ - **`get_pending_memory`** — Returns pending lessons awaiting approval.
283
+ - **`signal_low_context`** (inputs: `token_count` integer, `capacity` integer) — Asserts window usage thresholds, recommending checkpoints if needed.
280
284
 
281
285
  ### Key Algorithms
282
286
 
283
287
  #### Revert Detection
288
+
284
289
  When the daemon watcher registers a checkout transition, it runs:
290
+
285
291
  ```bash
286
292
  git log -n 1 --pretty=format:%s
287
293
  ```
294
+
288
295
  If the commit message starts with `"Revert "`, Synap parses the commit message to extract the reverted commit hash. It runs `git show --name-only` to identify affected paths and inserts a pending lesson row.
289
296
 
290
297
  #### Context Packing
298
+
291
299
  Context is packed using `tiktoken`'s `cl100k_base` tokenizer.
292
- * Enforces limit of `max_tokens - 600` (reserves 600 tokens for instructions).
293
- * Appends active approved memory lessons under `# APPROVED SYSTEM MEMORY`.
294
- * Formats code blocks sequentially. Candidate elements exceeding the remaining budget are truncated.
300
+
301
+ - Enforces limit of `max_tokens - 600` (reserves 600 tokens for instructions).
302
+ - Appends active approved memory lessons under `# APPROVED SYSTEM MEMORY`.
303
+ - Formats code blocks sequentially. Candidate elements exceeding the remaining budget are truncated.
295
304
 
296
305
  #### Graph CTE Traversal
306
+
297
307
  Recursively traverses dependencies using SQLite SQL CTEs:
308
+
298
309
  ```sql
299
310
  WITH RECURSIVE neighborhood(id, d) AS (
300
311
  SELECT ? as id, 0 as d
@@ -315,39 +326,49 @@ ORDER BY n.d ASC
315
326
  ## Install
316
327
 
317
328
  Install the python package:
329
+
318
330
  ```bash
319
331
  pip install synap-git
320
332
  ```
321
333
 
322
334
  ### System Requirements
323
- * Python >= 3.11
324
- * Git Command Line Tool
325
- * SQLite (compiled with FTS5 virtual table support)
335
+
336
+ - Python >= 3.11
337
+ - Git Command Line Tool
338
+ - SQLite (compiled with FTS5 virtual table support)
326
339
 
327
340
  ---
328
341
 
329
342
  ## Quick Start
330
343
 
331
344
  ### 1. Setup LLM Credentials
345
+
332
346
  Run interactive configuration to configure your model:
347
+
333
348
  ```bash
334
349
  synap setup .
335
350
  ```
336
351
 
337
352
  ### 2. Run Ingestion
353
+
338
354
  Initialize the local SQLite database index:
355
+
339
356
  ```bash
340
357
  synap init .
341
358
  ```
342
359
 
343
360
  ### 3. Connect IDE / Start MCP
361
+
344
362
  Launch the unified background daemon and MCP stdio server:
363
+
345
364
  ```bash
346
365
  synap start .
347
366
  ```
348
367
 
349
368
  ### 4. Connect IDE
369
+
350
370
  Generate configuration settings:
371
+
351
372
  ```bash
352
373
  synap mcp config .
353
374
  ```
@@ -358,36 +379,37 @@ synap mcp config .
358
379
 
359
380
  All commands support target path arguments:
360
381
 
361
- * `synap setup [PATH]` — Runs provider configuration wizard.
362
- * `synap init [PATH]` — Performs initial structural indexing. Supports `--skip-llm`, `--skip-wiki`.
363
- * `synap wipe [PATH]` — Purges SQLite index.
364
- * `synap start [PATH]` — Launches background daemon.
365
- * `synap stop [PATH]` — Terminate background daemon.
366
- * `synap restart [PATH]` — Restarts background daemon.
367
- * `synap status [PATH]` — Prints active indexing parameters. Supports `--json`.
368
- * `synap logs` — Views system logs. Supports `-t`, `-n`, `-d`.
369
- * `synap update` — Upgrades Synap installation.
370
- * `synap version` — Prints version.
371
- * `synap rollback [PATH]` — Restores index state to previous commit. Supports `-c`, `-y`.
372
- * `synap repair [PATH]` — Wipes index and rebuilds from HEAD. Supports `-y`.
373
- * `synap doctor [PATH]` — Verifies database integrity and parsers.
374
- * `synap run [PATH]` — Runs daemon in foreground.
375
- * `synap ui [PATH]` — Launches HTML dashboard.
376
- * `synap mcp config [PATH]` — Outputs Cursor connection blocks.
377
- * `synap mcp verify [PATH]` — Asserts MCP server stability.
378
- * `synap memory status [PATH]` — Lists lesson counts.
379
- * `synap memory prune [PATH]` — Evaluates and deletes expired lessons.
380
- * `synap memory verify [PATH]` — Checks lessons for missing files. Supports `--json`.
381
- * `synap lessons approve <ID> [PATH]` — Approves a pending lesson.
382
- * `synap lessons reject <ID> [PATH]` — Rejects a lesson.
383
- * `synap lessons review [PATH]` — Launches interactive lesson review console.
384
- * `synap checkpoint create [PATH]` — Logs progress snapshot. Supports `--doing`, `--files`, `--next-step`, `--blockers`.
385
- * `synap checkpoint list [PATH]` — Renders checkpoint tables.
386
- * `synap checkpoint restore <ID> [PATH]` — Displays checkpoint records.
387
- * `synap usage show [PATH]` — Renders token metrics.
388
- * `synap usage clear [PATH]` — Clears LLM call logs.
389
- * `synap wiki list [PATH]` — Lists generated docs.
390
- * `synap wiki show <FILE> [PATH]` — Renders wiki files.
382
+ - `synap setup [PATH]` — Runs provider configuration wizard.
383
+ - `synap init [PATH]` — Performs initial structural indexing. Supports `--skip-llm`, `--skip-wiki`.
384
+ - `synap wipe [PATH]` — Purges SQLite index.
385
+ - `synap start [PATH]` — Launches background daemon.
386
+ - `synap stop [PATH]` — Terminate background daemon.
387
+ - `synap restart [PATH]` — Restarts background daemon.
388
+ - `synap status [PATH]` — Prints active indexing parameters. Supports `--json`.
389
+ - `synap logs` — Views system logs. Supports `-t`, `-n`, `-d`.
390
+ - `synap update` — Upgrades Synap installation.
391
+ - `synap version` — Prints version.
392
+ - `synap rollback [PATH]` — Restores index state to previous commit. Supports `-c`, `-y`.
393
+ - `synap repair [PATH]` — Wipes index and rebuilds from HEAD. Supports `-y`.
394
+ - `synap doctor [PATH]` — Verifies database integrity and parsers.
395
+ - `synap run [PATH]` — Runs daemon in foreground.
396
+ - `synap ui [PATH]` — Launches HTML dashboard.
397
+ - `synap mcp config [PATH]` — Outputs Cursor connection blocks.
398
+ - `synap mcp verify [PATH]` — Asserts MCP server stability.
399
+ - `synap memory status [PATH]` — Lists lesson counts.
400
+ - `synap memory prune [PATH]` — Evaluates and deletes expired lessons.
401
+ - `synap memory verify [PATH]` — Checks lessons for missing files. Supports `--json`.
402
+ - `synap lessons approve <ID> [PATH]` — Approves a pending lesson.
403
+ - `synap lessons reject <ID> [PATH]` — Rejects a lesson.
404
+ - `synap lessons review [PATH]` — Launches interactive lesson review console.
405
+ - `synap checkpoint create [PATH]` — Logs progress snapshot. Supports `--doing`, `--files`, `--next-step`, `--blockers`.
406
+ - `synap checkpoint list [PATH]` — Renders checkpoint tables.
407
+ - `synap checkpoint restore <ID> [PATH]` — Displays checkpoint records.
408
+ - `synap usage show [PATH]` — Renders token metrics.
409
+ - `synap usage clear [PATH]` — Clears LLM call logs.
410
+ - `synap cost [PATH]` — Shows aggregated LLM calls, token counts, and estimated USD cost (alias for `synap usage show`).
411
+ - `synap wiki list [PATH]` — Lists generated docs.
412
+ - `synap wiki show <FILE> [PATH]` — Renders wiki files.
391
413
 
392
414
  ---
393
415
 
@@ -395,46 +417,48 @@ All commands support target path arguments:
395
417
 
396
418
  Configuration values are parsed from `~/.config/synap/config.toml`.
397
419
 
398
- | Field Name | Type | Default | Description |
399
- | :--- | :--- | :--- | :--- |
400
- | `profile` | `string` | `"dev"` | Active environment configuration profile. |
401
- | `mode` | `string` | `"active"` | Watcher polling mode selector. |
402
- | `repository_path` | `string` | `"."` | Repository root directory. |
403
- | `state_path` | `string` | `".synap"` | Root storage path. |
404
- | `sqlite_path` | `string` | `".synap/synap.db"` | Database file location. |
405
- | `object_path` | `string` | `".synap/objects"` | Directory for serialized artifacts. |
406
- | `log_path` | `string` | `".synap/logs"` | Directory for logs. |
407
- | `logging_mode` | `string` | `"human"` | Log output format type. |
408
- | `log_level` | `string` | `"INFO"` | Minimum logging level threshold. |
409
- | `max_file_bytes` | `integer` | `1000000` | Size threshold for parsed files. |
410
- | `checkpoint_threshold` | `float` | `0.60` | Threshold ratio for memory warnings. |
411
- | `lesson_expiry_days` | `integer` | `7` | Days before memory lessons expire. |
412
- | `llm_provider` | `string` | `null` | Generative provider: `openai`, `gemini`, `anthropic`, `ollama`, `openrouter`. |
413
- | `llm_model` | `string` | `null` | Named model used for prompts. |
414
- | `ollama_url` | `string` | `"http://127.0.0.1:11434"` | Endpoint URL for Ollama connectivity. |
415
- | `mcp_host` | `string` | `"127.0.0.1"` | Bind host for local networking. |
416
- | `mcp_port` | `integer` | `9876` | Server listener port. |
417
- | `daemon_poll_interval_seconds` | `float` | `2.0` | Git state polling frequency. |
418
- | `shutdown_timeout_seconds` | `float` | `5.0` | Timeout threshold for shutting down. |
420
+ | Field Name | Type | Default | Description |
421
+ | :----------------------------- | :-------- | :------------------------- | :---------------------------------------------------------------------------- |
422
+ | `profile` | `string` | `"dev"` | Active environment configuration profile. |
423
+ | `mode` | `string` | `"active"` | Watcher polling mode selector. |
424
+ | `repository_path` | `string` | `"."` | Repository root directory. |
425
+ | `state_path` | `string` | `".synap"` | Root storage path. |
426
+ | `sqlite_path` | `string` | `".synap/synap.db"` | Database file location. |
427
+ | `object_path` | `string` | `".synap/objects"` | Directory for serialized artifacts. |
428
+ | `log_path` | `string` | `".synap/logs"` | Directory for logs. |
429
+ | `logging_mode` | `string` | `"human"` | Log output format type. |
430
+ | `log_level` | `string` | `"INFO"` | Minimum logging level threshold. |
431
+ | `max_file_bytes` | `integer` | `1000000` | Size threshold for parsed files. |
432
+ | `checkpoint_threshold` | `float` | `0.60` | Threshold ratio for memory warnings. |
433
+ | `lesson_expiry_days` | `integer` | `7` | Days before memory lessons expire. |
434
+ | `llm_provider` | `string` | `null` | Generative provider: `openai`, `gemini`, `anthropic`, `ollama`, `openrouter`. |
435
+ | `llm_model` | `string` | `null` | Named model used for prompts. |
436
+ | `ollama_url` | `string` | `"http://127.0.0.1:11434"` | Endpoint URL for Ollama connectivity. |
437
+ | `mcp_host` | `string` | `"127.0.0.1"` | Bind host for local networking. |
438
+ | `mcp_port` | `integer` | `9876` | Server listener port. |
439
+ | `daemon_poll_interval_seconds` | `float` | `2.0` | Git state polling frequency. |
440
+ | `shutdown_timeout_seconds` | `float` | `5.0` | Timeout threshold for shutting down. |
419
441
 
420
442
  ---
421
443
 
422
444
  ## MCP Integration
423
445
 
424
446
  Verify configurations using:
447
+
425
448
  ```bash
426
449
  synap mcp config .
427
450
  ```
428
451
 
429
452
  ### Server Configuration Block
453
+
430
454
  ```json
431
455
  {
432
- "mcpServers": {
433
- "synap": {
434
- "command": "/usr/local/bin/python",
435
- "args": ["-m", "synap_git.cli", "start", "/Users/username/repo"]
456
+ "mcpServers": {
457
+ "synap": {
458
+ "command": "/usr/local/bin/python",
459
+ "args": ["-m", "synap_git.cli", "start", "/Users/username/repo"]
460
+ }
436
461
  }
437
- }
438
462
  }
439
463
  ```
440
464
 
@@ -444,15 +468,15 @@ synap mcp config .
444
468
 
445
469
  Synap now processes syntax dynamically for **over 50 programming languages** via `tree-sitter-languages`, including:
446
470
 
447
- * **Python** (`.py`)
448
- * **JavaScript / TypeScript** (`.js`, `.jsx`, `.ts`, `.tsx`)
449
- * **C / C++ / C#** (`.c`, `.cpp`, `.h`, `.hpp`, `.cs`)
450
- * **Java / Kotlin / Scala** (`.java`, `.kt`, `.kts`, `.scala`)
451
- * **Go / Rust / Swift** (`.go`, `.rs`, `.swift`)
452
- * **Ruby / PHP / Perl** (`.rb`, `.php`, `.pl`)
453
- * **Shell Scripts** (`.sh`, `.bash`, or via `#!` shebang detection)
454
- * **Data / Config** (`.sql`, `.json`, `.yaml`, `.toml`, `.xml`)
455
- * **Web** (`.html`, `.css`, `.scss`)
471
+ - **Python** (`.py`)
472
+ - **JavaScript / TypeScript** (`.js`, `.jsx`, `.ts`, `.tsx`)
473
+ - **C / C++ / C#** (`.c`, `.cpp`, `.h`, `.hpp`, `.cs`)
474
+ - **Java / Kotlin / Scala** (`.java`, `.kt`, `.kts`, `.scala`)
475
+ - **Go / Rust / Swift** (`.go`, `.rs`, `.swift`)
476
+ - **Ruby / PHP / Perl** (`.rb`, `.php`, `.pl`)
477
+ - **Shell Scripts** (`.sh`, `.bash`, or via `#!` shebang detection)
478
+ - **Data / Config** (`.sql`, `.json`, `.yaml`, `.toml`, `.xml`)
479
+ - **Web** (`.html`, `.css`, `.scss`)
456
480
 
457
481
  Even extensionless scripts are gracefully detected via shebang parsing. Missing grammars automatically degrade gracefully to plaintext indexing.
458
482
 
@@ -460,30 +484,32 @@ Even extensionless scripts are gracefully detected via shebang parsing. Missing
460
484
 
461
485
  ## Supported Providers
462
486
 
463
- * **Ollama** — Local model integration.
464
- * **OpenAI** — Cloud GPT models. (Environment Variable: `SYNAP_OPENAI_API_KEY`)
465
- * **Anthropic** — Cloud Claude models. (Environment Variable: `SYNAP_ANTHROPIC_API_KEY`)
466
- * **Gemini** — Cloud Gemini models. (Environment Variable: `SYNAP_GEMINI_API_KEY`)
467
- * **OpenRouter** — Unified cloud model routing. (Environment Variable: `SYNAP_OPENROUTER_API_KEY`)
487
+ - **Ollama** — Local model integration.
488
+ - **OpenAI** — Cloud GPT models. (Environment Variable: `SYNAP_OPENAI_API_KEY`)
489
+ - **Anthropic** — Cloud Claude models. (Environment Variable: `SYNAP_ANTHROPIC_API_KEY`)
490
+ - **Gemini** — Cloud Gemini models. (Environment Variable: `SYNAP_GEMINI_API_KEY`)
491
+ - **OpenRouter** — Unified cloud model routing. (Environment Variable: `SYNAP_OPENROUTER_API_KEY`)
468
492
 
469
493
  ---
470
494
 
471
495
  ## Limitations
472
496
 
473
- * **Git workspace dependency:** Indexes and tracks metadata solely inside valid Git repositories.
474
- * **Structural-only mode:** Runs without wiki generation or contextual LLM generation if `llm_provider` is unset.
475
- * **Size exclusions:** Skips binary files and files larger than `max_file_bytes` (default 1MB).
497
+ - **Git workspace dependency:** Indexes and tracks metadata solely inside valid Git repositories.
498
+ - **Structural-only mode:** Runs without wiki generation or contextual LLM generation if `llm_provider` is unset.
499
+ - **Size exclusions:** Skips binary files and files larger than `max_file_bytes` (default 1MB).
476
500
 
477
501
  ---
478
502
 
479
503
  ## Contributing
480
504
 
481
505
  Execute unit tests:
506
+
482
507
  ```bash
483
508
  SYNAP_SKIP_STRESS=1 uv run pytest tests/ -x --tb=short
484
509
  ```
485
510
 
486
511
  Format code and check types:
512
+
487
513
  ```bash
488
514
  uv run ruff format src/
489
515
  uv run ruff check src/