codetalker-mcp 0.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.
- codetalker_mcp-0.3.1/.github/workflows/publish.yml +70 -0
- codetalker_mcp-0.3.1/.github/workflows/stranger-smoke.yml +45 -0
- codetalker_mcp-0.3.1/.gitignore +70 -0
- codetalker_mcp-0.3.1/.python-version +1 -0
- codetalker_mcp-0.3.1/LICENSE +21 -0
- codetalker_mcp-0.3.1/PKG-INFO +310 -0
- codetalker_mcp-0.3.1/README.md +280 -0
- codetalker_mcp-0.3.1/pyproject.toml +55 -0
- codetalker_mcp-0.3.1/scripts/extract_agent_thinking.py +188 -0
- codetalker_mcp-0.3.1/scripts/install-harnesses.ps1 +271 -0
- codetalker_mcp-0.3.1/scripts/measure_recover_baseline.py +356 -0
- codetalker_mcp-0.3.1/scripts/stranger_smoke.py +153 -0
- codetalker_mcp-0.3.1/src/codetalker/__init__.py +5 -0
- codetalker_mcp-0.3.1/src/codetalker/adapter_base.py +432 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/__init__.py +76 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/aider.py +228 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/antigravity.py +491 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/chatgpt.py +934 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/claude.py +320 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/copilot.py +338 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/cursor.py +464 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/freebuff.py +275 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/opencode.py +520 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/opencode_sidecar.py +362 -0
- codetalker_mcp-0.3.1/src/codetalker/adapters/windsurf.py +528 -0
- codetalker_mcp-0.3.1/src/codetalker/agent_guidance.py +213 -0
- codetalker_mcp-0.3.1/src/codetalker/audit.py +181 -0
- codetalker_mcp-0.3.1/src/codetalker/continuity.py +269 -0
- codetalker_mcp-0.3.1/src/codetalker/install_harnesses.py +251 -0
- codetalker_mcp-0.3.1/src/codetalker/registry.py +69 -0
- codetalker_mcp-0.3.1/src/codetalker/schema.py +269 -0
- codetalker_mcp-0.3.1/src/codetalker/search.py +391 -0
- codetalker_mcp-0.3.1/src/codetalker/server.py +1334 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/__init__.py +3 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/display.py +15 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/paths.py +48 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/sanitize.py +13 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/timestamps.py +101 -0
- codetalker_mcp-0.3.1/src/codetalker/utils/tool_errors.py +45 -0
- codetalker_mcp-0.3.1/tests/adapters/test_aider.py +50 -0
- codetalker_mcp-0.3.1/tests/adapters/test_antigravity.py +31 -0
- codetalker_mcp-0.3.1/tests/adapters/test_chatgpt.py +135 -0
- codetalker_mcp-0.3.1/tests/adapters/test_claude.py +43 -0
- codetalker_mcp-0.3.1/tests/adapters/test_copilot.py +37 -0
- codetalker_mcp-0.3.1/tests/adapters/test_cursor.py +21 -0
- codetalker_mcp-0.3.1/tests/adapters/test_freebuff.py +21 -0
- codetalker_mcp-0.3.1/tests/adapters/test_opencode.py +21 -0
- codetalker_mcp-0.3.1/tests/adapters/test_windsurf.py +36 -0
- codetalker_mcp-0.3.1/tests/fixtures/chatgpt_dag_export.json +97 -0
- codetalker_mcp-0.3.1/tests/fixtures/codex_sample_rollout.jsonl +8 -0
- codetalker_mcp-0.3.1/tests/test_branches.py +106 -0
- codetalker_mcp-0.3.1/tests/test_context_recovery.py +165 -0
- codetalker_mcp-0.3.1/tests/test_continuity.py +347 -0
- codetalker_mcp-0.3.1/tests/test_hardening_v2.py +138 -0
- codetalker_mcp-0.3.1/tests/test_improvements.py +154 -0
- codetalker_mcp-0.3.1/tests/test_install_harnesses.py +311 -0
- codetalker_mcp-0.3.1/tests/test_opencode_sidecar.py +254 -0
- codetalker_mcp-0.3.1/tests/test_opencode_window.py +78 -0
- codetalker_mcp-0.3.1/tests/test_pagination.py +90 -0
- codetalker_mcp-0.3.1/tests/test_paths.py +28 -0
- codetalker_mcp-0.3.1/tests/test_schema.py +82 -0
- codetalker_mcp-0.3.1/tests/test_search_audit.py +254 -0
- codetalker_mcp-0.3.1/tests/test_server.py +78 -0
- codetalker_mcp-0.3.1/tests/test_timestamps.py +52 -0
- codetalker_mcp-0.3.1/uv.lock +816 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
# Publishes codetalker-mcp to PyPI when a vX.Y.Z tag is pushed.
|
|
4
|
+
#
|
|
5
|
+
# Gate: the wheel must pass the stranger-install smoke (fresh venv,
|
|
6
|
+
# non-editable install, handshake, empty-home probe) before anything uploads.
|
|
7
|
+
#
|
|
8
|
+
# Auth: PyPI Trusted Publishing (OIDC) — no API tokens stored in the repo.
|
|
9
|
+
# One-time prerequisite (repo owner): on pypi.org, under
|
|
10
|
+
# project/codetalker-mcp/manage/publishing, register a pending publisher:
|
|
11
|
+
# owner=Ickleslimer repo=codetalker workflow=publish.yml
|
|
12
|
+
# environment=pypi
|
|
13
|
+
|
|
14
|
+
on:
|
|
15
|
+
push:
|
|
16
|
+
tags: ["v*"]
|
|
17
|
+
workflow_dispatch:
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
|
|
30
|
+
- name: Tag/version consistency guard
|
|
31
|
+
run: |
|
|
32
|
+
VERSION=$(grep -oP '(?<=__version__ = ")[^"]+' src/codetalker/__init__.py)
|
|
33
|
+
echo "__version__=$VERSION ref=$GITHUB_REF"
|
|
34
|
+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
|
|
35
|
+
TAG=${GITHUB_REF_NAME#v}
|
|
36
|
+
if [ "$TAG" != "$VERSION" ]; then
|
|
37
|
+
echo "::error::tag v$TAG does not match __version__ $VERSION"
|
|
38
|
+
exit 1
|
|
39
|
+
fi
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
- name: Build sdist + wheel
|
|
43
|
+
run: uv build --out-dir dist
|
|
44
|
+
|
|
45
|
+
- name: Wheel smoke gate (fresh venv, non-editable install)
|
|
46
|
+
run: |
|
|
47
|
+
uv venv .smoke-venv --python 3.12
|
|
48
|
+
WHEEL=$(ls dist/*.whl)
|
|
49
|
+
uv pip install --python .smoke-venv/bin/python "$WHEEL"
|
|
50
|
+
.smoke-venv/bin/python scripts/stranger_smoke.py
|
|
51
|
+
|
|
52
|
+
- uses: actions/upload-artifact@v4
|
|
53
|
+
with:
|
|
54
|
+
name: dist
|
|
55
|
+
path: dist/
|
|
56
|
+
|
|
57
|
+
publish:
|
|
58
|
+
needs: build
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
environment: pypi
|
|
61
|
+
permissions:
|
|
62
|
+
id-token: write # trusted publishing (OIDC)
|
|
63
|
+
steps:
|
|
64
|
+
- uses: actions/download-artifact@v4
|
|
65
|
+
with:
|
|
66
|
+
name: dist
|
|
67
|
+
path: dist/
|
|
68
|
+
|
|
69
|
+
- name: Publish to PyPI
|
|
70
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: stranger-smoke
|
|
2
|
+
|
|
3
|
+
# Keeps the onboarding path honest: a fresh venv, a NON-EDITABLE install of
|
|
4
|
+
# the checked-out tree (exactly what `pip install git+https://...` gives a
|
|
5
|
+
# stranger, minus the network hop that would test the previous commit), a
|
|
6
|
+
# full MCP handshake, and the empty-home probe.
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [main]
|
|
11
|
+
pull_request:
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
smoke:
|
|
15
|
+
name: stranger smoke (${{ matrix.os }})
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
20
|
+
runs-on: ${{ matrix.os }}
|
|
21
|
+
timeout-minutes: 15
|
|
22
|
+
steps:
|
|
23
|
+
- uses: actions/checkout@v4
|
|
24
|
+
|
|
25
|
+
- name: Install uv
|
|
26
|
+
uses: astral-sh/setup-uv@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
|
|
30
|
+
- name: Fresh venv + non-editable install (the stranger path)
|
|
31
|
+
shell: bash
|
|
32
|
+
run: |
|
|
33
|
+
uv venv .smoke-venv --python 3.12
|
|
34
|
+
# windows runners use Scripts/, posix use bin/ — test the file
|
|
35
|
+
PY=.smoke-venv/bin/python
|
|
36
|
+
if [ -f ".smoke-venv/Scripts/python.exe" ]; then
|
|
37
|
+
PY=.smoke-venv/Scripts/python.exe
|
|
38
|
+
fi
|
|
39
|
+
uv pip install --python "$PY" .
|
|
40
|
+
echo "SMOKE_PY=$PY" >> "$GITHUB_ENV"
|
|
41
|
+
|
|
42
|
+
- name: Run stranger smoke
|
|
43
|
+
shell: bash
|
|
44
|
+
run: |
|
|
45
|
+
"$SMOKE_PY" scripts/stranger_smoke.py
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# Virtual environments
|
|
30
|
+
.venv/
|
|
31
|
+
venv/
|
|
32
|
+
ENV/
|
|
33
|
+
env/
|
|
34
|
+
.smoke-venv/
|
|
35
|
+
|
|
36
|
+
# Pytest / coverage
|
|
37
|
+
.pytest_cache/
|
|
38
|
+
.coverage
|
|
39
|
+
.coverage.*
|
|
40
|
+
htmlcov/
|
|
41
|
+
|
|
42
|
+
# IDE & OS files
|
|
43
|
+
.vscode/
|
|
44
|
+
.idea/
|
|
45
|
+
*.swp
|
|
46
|
+
*.swo
|
|
47
|
+
*~
|
|
48
|
+
.DS_Store
|
|
49
|
+
Thumbs.db
|
|
50
|
+
|
|
51
|
+
# CodeGraph local index (regenerable)
|
|
52
|
+
.codegraph/
|
|
53
|
+
|
|
54
|
+
# Local audit reports (may contain transcript excerpts)
|
|
55
|
+
.audit/
|
|
56
|
+
|
|
57
|
+
# Local audit helper scripts (not part of shipped tooling)
|
|
58
|
+
scripts/analyze_audit_hits.py
|
|
59
|
+
|
|
60
|
+
# Throwaway live-proof probe scripts (kept in .audit/, never shipped)
|
|
61
|
+
live_probe*.py
|
|
62
|
+
|
|
63
|
+
# Probe output dumps
|
|
64
|
+
probe*.txt
|
|
65
|
+
|
|
66
|
+
# Agent local instructions
|
|
67
|
+
agents.md
|
|
68
|
+
AGENTS.md
|
|
69
|
+
*.local.md
|
|
70
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ickleslimer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: codetalker-mcp
|
|
3
|
+
Version: 0.3.1
|
|
4
|
+
Summary: Cross-harness agent conversation transcript normalizer and MCP server
|
|
5
|
+
Project-URL: Homepage, https://github.com/Ickleslimer/codetalker
|
|
6
|
+
Project-URL: Repository, https://github.com/Ickleslimer/codetalker
|
|
7
|
+
Project-URL: Issues, https://github.com/Ickleslimer/codetalker/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Ickleslimer/codetalker/releases
|
|
9
|
+
Author: Ickleslimer
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent,claude,codex,context-recovery,cursor,llm,mcp,transcripts
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Communications :: Chat
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: click>=8.4.2
|
|
24
|
+
Requires-Dist: mcp>=2.0.0
|
|
25
|
+
Requires-Dist: pydantic>=2.13.4
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: pytest-asyncio>=1.4.0; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest>=9.1.1; extra == 'dev'
|
|
29
|
+
Description-Content-Type: text/markdown
|
|
30
|
+
|
|
31
|
+
# CodeTalker
|
|
32
|
+
|
|
33
|
+
> Cross-harness agent conversation transcript normalizer and MCP server.
|
|
34
|
+
|
|
35
|
+
CodeTalker is an agent-callable tool and MCP server that normalizes conversation transcripts from different AI coding harnesses into a unified schema. This allows any agent to pick up context, search past decisions, or read thread history without requiring manual handoff documents.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
> [!IMPORTANT]
|
|
40
|
+
> **Privacy: read-only, local-only, no telemetry.**
|
|
41
|
+
> CodeTalker **reads** your agent harnesses' local conversation history and nothing else.
|
|
42
|
+
> - **Read-only by construction.** Every harness database it touches (Cursor, Freebuff, OpenCode, Windsurf/Devin) is opened in SQLite read-only mode (`?mode=ro`) — the driver itself refuses writes, so a bug in CodeTalker cannot modify your sessions. It writes no config files, keeps no cache, stores no state of its own.
|
|
43
|
+
> - **What it touches.** Only the harnesses' own storage directories listed in the [support table below](#supported-harnesses--verification-status) (e.g. `~/.codex/sessions`, `~/.config/freebuff-desktop`, `%APPDATA%/Cursor`), plus local OpenCode desktop logs to discover that app's local server port. Nothing on your machine is modified.
|
|
44
|
+
> - **Nothing is sent anywhere.** The server speaks stdio only — it talks exclusively to the agent harness that launched it, on your machine. There is no telemetry, no analytics, no update checks. The one network-shaped exception is disclosed: the OpenCode sidecar adapter may issue a **local** HTTP GET to your own running OpenCode desktop app (port discovered from that app's local logs) to read session messages. No transcript data ever leaves your machine via CodeTalker — it leaves only if the agent harness you use sends tool results to its own model backend, which is outside CodeTalker's control.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Capabilities & Schema
|
|
49
|
+
|
|
50
|
+
- **Normalized Intermediate Format**: Standardized `TextBlock`, `ThinkingBlock`, `ToolCallBlock`, `ToolResultBlock`, `CodeDiffBlock`, `AttachmentBlock`, `ApprovalBlock`, `SystemEventBlock`.
|
|
51
|
+
- **DAG / Branch Aware**: Multi-branch threads (e.g. in ChatGPT/Codex or Claude Code) are exposed as distinct threads sharing a conversation ID.
|
|
52
|
+
- **Fast Metadata Discovery**: Fast header peeking and recency sorting for collections with 500+ session files.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Supported Harnesses & Verification Status
|
|
57
|
+
|
|
58
|
+
| Harness | Aliases | Storage Locations | Test Status | Notes |
|
|
59
|
+
|---|---|---|---|---|
|
|
60
|
+
| **OpenAI Codex CLI** | `codex`, `chatgpt` | `~/.codex/sessions/**/rollout-*.jsonl`, `session_index.jsonl` | **Live Verified** | Tested across 480+ local CLI sessions with trailing timestamps and DAG resolution. |
|
|
61
|
+
| **OpenAI ChatGPT Desktop** | `chatgpt` | `%LOCALAPPDATA%/Packages/OpenAI.ChatGPT-Desktop_*/.../IndexedDB` | **Live Verified** | Tested via `ccl-chromium-reader` LevelDB parser. *(See fragility disclaimer below)*. |
|
|
62
|
+
| **ChatGPT Export DAG** | `chatgpt` | `conversations.json` (Export Archive) | **Live Verified** | Linearizes branching conversation DAG trees into distinct threads. |
|
|
63
|
+
| **Devin (formerly Windsurf)** | `devin`, `windsurf` | `~/.codeium/chat_state/*.pb`, `state.vscdb` | **Live Verified** | Pure-Python wire-level Protobuf stream parser and workspace SQLite reader. |
|
|
64
|
+
| **Freebuff** | `freebuff`, `codebuff` | `~/.config/freebuff-desktop/projects/*/desktop-v2.db` | **Live Verified** | Full multi-turn conversation logs, reasoning traces, image attachments, and tool calls. |
|
|
65
|
+
| **OpenCode Desktop** | `opencode`, `open_code` | `%APPDATA%/ai.opencode.desktop/drafts.sqlite` | **Live Verified** | Decodes workspace paths, models, prompt histories, and active session drafts. *(See notes below)*. |
|
|
66
|
+
| **Google Antigravity** | `antigravity`, `agy` | `~/.gemini/antigravity/brain/*/transcript.jsonl` | **Live Verified** | Real-time transcript logs, XML cleanup, subagent trees, thinking blocks, and checkpoints. |
|
|
67
|
+
| **Cursor IDE** | `cursor` | `%APPDATA%/Cursor/User/globalStorage/state.vscdb` | **Live Verified** | Scans `composerHeaders` across 50+ workspaces, bubbles, diffs, and reasoning traces. |
|
|
68
|
+
| **Claude Code CLI** | `claude`, `claudecode` | `~/.claude/projects/*/sessions/*.jsonl` | **Fixture Tested (YMMV)** | Implemented against Anthropic Messages API specs; not verified against an active local installation. |
|
|
69
|
+
| **Aider Pair Programmer** | `aider` | `.aider.chat.history.md`, `~/.aider.chat.history.md` | **Fixture Tested (YMMV)** | Implemented for markdown chat logs and `<<<< SEARCH ... === ... >>>>` diffs; not installed locally. |
|
|
70
|
+
| **GitHub Copilot Chat** | `copilot`, `github_copilot` | `%APPDATA%/Code/User/workspaceStorage/*/chatSessions/*.jsonl` | **Fixture Tested (YMMV)** | Implemented for VSCode chat session JSONL logs; not verified against an active local installation. |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Stability, Fragility & Compatibility Disclaimers
|
|
75
|
+
|
|
76
|
+
> [!WARNING]
|
|
77
|
+
> **ChatGPT Desktop App (LevelDB Cache) Fragility**
|
|
78
|
+
> The ChatGPT Desktop application uses Chromium IndexedDB / LevelDB to cache conversation state locally. This storage engine is unversioned, undocumented, and frequently modified by OpenAI between app updates.
|
|
79
|
+
> - **Recommendation**: For reliable long-term retrieval, prefer **Codex CLI rollouts** (`~/.codex/sessions`) or the official data export (`conversations.json`).
|
|
80
|
+
|
|
81
|
+
> [!NOTE]
|
|
82
|
+
> **OpenCode Desktop Cloud Streaming vs Local Drafts**
|
|
83
|
+
> OpenCode Desktop persists active drafts, models (`grok`, `gpt-5.6`, `x-preview`), and user prompt history in `%APPDATA%/ai.opencode.desktop/drafts.sqlite`. Because multi-turn assistant completions are rendered via live server-side WebSockets, local desktop records represent client-side prompts and active workspace drafts. Full multi-turn assistant outputs and tool executions are available if using **OpenCode CLI** JSONL logs (`~/.opencode/sessions/*.jsonl`).
|
|
84
|
+
|
|
85
|
+
> [!IMPORTANT]
|
|
86
|
+
> **Cursor SQLite Schema Evolution**
|
|
87
|
+
> Cursor's internal storage schema in `state.vscdb` (`composerHeaders`, `cursorDiskKV`, `composerData`, `bubbleId`) evolves across Cursor releases. CodeTalker connects in read-only mode (`?mode=ro`) with schema fallbacks, but major upstream Cursor redesigns may require updating field mappings.
|
|
88
|
+
|
|
89
|
+
> [!TIP]
|
|
90
|
+
> **Fixture-Tested Adapters (YMMV)**
|
|
91
|
+
> The adapters for **Claude Code CLI**, **Aider**, and **GitHub Copilot Chat** have complete normalization logic verified by unit test fixtures, but have not been live-tested against active local installations on this machine. If you use these tools and encounter non-standard directory structures or version variations, use the `root_path` parameter to point CodeTalker directly to your transcript folder.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## MCP Tools
|
|
96
|
+
|
|
97
|
+
| Tool | Parameters | Description |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `codetalk_capabilities` | _(none)_ | List harnesses, aliases, ID guidance, context-recovery playbook, and recommended read defaults. Call once per agent session. |
|
|
100
|
+
| `codetalk_list` | `harness`, `conversation_id`, `working_directory`, `since`, `limit`, `root_path`, `include_capabilities`, `include_harness_status` | List sessions (slim by default). Filter by `working_directory` for project-scoped recovery. |
|
|
101
|
+
| `codetalk_resolve_session` | `working_directory`, `harness`, `display_name`, `root_path`, `limit` | Resolve the most recent session for a project path when `session_id` is unknown (common Freebuff context-loss recovery). Optional `display_name` narrows by thread title. |
|
|
102
|
+
| `codetalk_read` | `session_id`, `harness`, `working_directory`, `since`, `until`, `since_last_user_input`, `conversation_only`, `exclude_actor_roles`, `include_thinking`, `include_raw_data`, `max_step_chars`, `offset`, `from_end`, `limit`, `root_path` | Read normalized steps. Provide `session_id` **or** `working_directory`. Defaults: tail slice (`from_end=true`), conversation-only (`conversation_only=true`), no raw payloads (`include_raw_data=false`). |
|
|
103
|
+
| `codetalk_branches` | `conversation_id`, `harness`, `root_path` | DAG branch tree, fork points, and subagent hierarchy (`branch_id` usually equals `session_id`). |
|
|
104
|
+
| `codetalk_diff_branches` | `conversation_id`, `branch_a`, `branch_b`, `harness`, `summary_only`, `include_raw_data`, `limit_per_branch`, `from_end`, `root_path` | Compare branches. Defaults to `summary_only=true` (counts/metadata only). |
|
|
105
|
+
| `codetalk_filter` | `session_id`, `harness`, `working_directory`, `keywords`, `step_types`, `actor_roles`, `conversation_only`, `exclude_actor_roles`, `since_last_user_input`, `include_thinking`, `include_raw_data`, `max_step_chars`, `offset`, `from_end`, `limit`, `root_path` | Filter steps by keywords, types, or roles. Accepts `session_id` or `working_directory`. |
|
|
106
|
+
| `codetalk_search` | `query`, `harness`, `working_directory`, `since`, `limit`, `max_sessions_to_search`, `search_scope`, `root_path` | Search titles and transcript content. Pass `working_directory` or `harness` when scoped to one project. Title hits use `match_type=title`. |
|
|
107
|
+
| `codetalk_info` | `session_id`, `harness`, `working_directory`, `root_path` | Fast metadata without step bodies (refreshes step counts when possible). Accepts `session_id` or `working_directory`. |
|
|
108
|
+
|
|
109
|
+
### Agent quickstart
|
|
110
|
+
|
|
111
|
+
1. `codetalk_capabilities` — learn harness names, aliases, tool catalog, and unsupported hallucinated names (`read_transcript`, etc.).
|
|
112
|
+
2. **Decision tree:**
|
|
113
|
+
- Lost context + know project path → `codetalk_resolve_session` → `codetalk_read(since_last_user_input=true)`
|
|
114
|
+
- Know `session_id` → `codetalk_read`
|
|
115
|
+
- Grep / find by title → `codetalk_search(query=..., working_directory=... or harness=...)`
|
|
116
|
+
- Branch history → `codetalk_branches` / `codetalk_diff_branches`
|
|
117
|
+
3. `codetalk_list` — browse metadata; filter with `working_directory` and/or `harness` on busy machines.
|
|
118
|
+
4. `codetalk_read` with defaults — tail slice without system injections or `raw_data`.
|
|
119
|
+
|
|
120
|
+
Note: Codex CLI rollouts appear under harness `chatgpt`; use `session_id` for reads and `conversation_id` for branch tools.
|
|
121
|
+
|
|
122
|
+
### Per-harness MCP onboarding
|
|
123
|
+
|
|
124
|
+
| Harness | Setup notes |
|
|
125
|
+
|---|---|
|
|
126
|
+
| **Cursor / Antigravity / Claude Desktop** | Add MCP block with `uv run --project /path/to/codetalker codetalker`. Restart after config changes. |
|
|
127
|
+
| **Freebuff** | Config in `~/.config/freebuff-desktop`. Approve the MCP consent sidecar when prompted, then restart. Verify with `codetalk_capabilities`. |
|
|
128
|
+
| **Codex desktop** | MCP config differs from CLI; mirror a working Cursor/Antigravity definition if supported. Desktop may not expose MCP. |
|
|
129
|
+
| **OpenCode** | Desktop drafts are prompt-only; use CLI JSONL or `codetalk_search(query='<thread title>')` for cross-harness title lookup. |
|
|
130
|
+
|
|
131
|
+
`codetalk_capabilities` and `codetalk_info` return `server.project_root` — update MCP config if it points at a stale scratch copy.
|
|
132
|
+
|
|
133
|
+
### Context recovery (Freebuff-first)
|
|
134
|
+
|
|
135
|
+
Some harnesses lose **in-flight prompt context** while the **full transcript remains on disk**. Freebuff is the most common case: the agent may reply with *"I can't see the session context…"* even though `desktop-v2.db` still has every turn.
|
|
136
|
+
|
|
137
|
+
**Symptom → fix**
|
|
138
|
+
|
|
139
|
+
1. User says *continue* but the Freebuff agent is blind.
|
|
140
|
+
2. Call `codetalk_resolve_session(working_directory="<project path>", harness="freebuff")` to get the latest `session_id` for that repo.
|
|
141
|
+
3. Call `codetalk_read(working_directory="<project path>", harness="freebuff", since_last_user_input=true)` — or pass the resolved `session_id` — to recover what the user last asked and what the agent already did.
|
|
142
|
+
4. Optionally `codetalk_search(query="can't see the session context", harness="freebuff")` to find other threads that hit the same failure.
|
|
143
|
+
|
|
144
|
+
`working_directory` accepts plain paths (`C:/path/to/myproject`) or `file://` URIs. Matching is normalized and case-insensitive on Windows. You do **not** need `session_id` when you know the project path — `codetalk_read` and `codetalk_info` accept `working_directory` directly.
|
|
145
|
+
|
|
146
|
+
Cross-harness recovery works too: open any harness with CodeTalker MCP configured (e.g. Cursor), point it at the Freebuff `working_directory`, and read the persisted transcript from there.
|
|
147
|
+
|
|
148
|
+
`codetalk_capabilities` returns the full recovery playbook in `context_recovery`.
|
|
149
|
+
|
|
150
|
+
#### v0.3: trigger-gated recovery + continue tokens
|
|
151
|
+
|
|
152
|
+
Since v0.3 the recovery mandate is **trigger-gated and per-client**:
|
|
153
|
+
|
|
154
|
+
- **Per-client instructions.** The handshake tailors `instructions` to the connecting client (via `clientInfo.name`): harnesses with known mid-thread context loss (Freebuff) receive the full marker-gated mandate; every other harness receives a short fallback. Healthy turns on any harness do **zero** recovery work.
|
|
155
|
+
- **Mechanical wipe markers.** Restart/failed-turn notices (`<since_your_last_turn>`, `<failed_turn>`, session-ended system notices) are detected in the transcript tail — no model judgment required for the loud class of wipes.
|
|
156
|
+
- **Continue tokens.** `codetalk_recover` now returns a `continue_token` line (`codetalker-v3-continue {…}`): an integrity-signed anchor (session, working directory, last user turn, transcript length). Agents end substantive turns with it; a later wiped turn passes it back as `claimed_token`, and the server verifies the agent's memory against the transcript on disk — anchors that were silently dropped or edited fail verification. `codetalk_recover_token` is the verification-only form. Silent mid-session wipes leave no transcript artifact, so their detection stays with the antecedent check — the token makes the recovery **verifiable** instead of guessed.
|
|
157
|
+
- **Freebuff consent sidecar.** `codetalk_recover_token` is new, so Freebuff requires a one-time tool re-approval in the Freebuff UI (remove and re-add the codetalker server) before the tool is callable there.
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Installation & Setup
|
|
162
|
+
|
|
163
|
+
### Install from PyPI
|
|
164
|
+
|
|
165
|
+
Published as **`codetalker-mcp`** (the name `codetalker` on PyPI belongs to an
|
|
166
|
+
unrelated 2014 package):
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
pip install codetalker-mcp
|
|
170
|
+
# or
|
|
171
|
+
uv tool install codetalker-mcp
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
MCP config entries then need no repo path:
|
|
175
|
+
|
|
176
|
+
```json
|
|
177
|
+
{
|
|
178
|
+
"mcpServers": {
|
|
179
|
+
"codetalker": {
|
|
180
|
+
"command": "uvx",
|
|
181
|
+
"args": ["--from", "codetalker-mcp", "codetalker"]
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
> [!NOTE]
|
|
188
|
+
> **ChatGPT Desktop adapter dependency.** The ChatGPT Desktop (IndexedDB/LevelDB)
|
|
189
|
+
> adapter relies on `ccl-chromium-reader`, which is **only available from GitHub**
|
|
190
|
+
> (it has no PyPI package, so it cannot be a pip dependency). Every other adapter
|
|
191
|
+
> works out of the box. To enable ChatGPT Desktop support:
|
|
192
|
+
>
|
|
193
|
+
> ```bash
|
|
194
|
+
> pip install "git+https://github.com/cclgroupltd/ccl_chromium_reader.git"
|
|
195
|
+
> ```
|
|
196
|
+
>
|
|
197
|
+
> Without it, that one adapter reports `registered: false` / fails gracefully;
|
|
198
|
+
> Codex CLI rollouts (harness `codex`/`chatgpt`) are unaffected.
|
|
199
|
+
|
|
200
|
+
### Running locally (development)
|
|
201
|
+
```bash
|
|
202
|
+
uv sync
|
|
203
|
+
uv run pytest -v
|
|
204
|
+
uv run codetalker --log-level INFO
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### Propagating MCP config after a move or clone
|
|
208
|
+
|
|
209
|
+
When the repo moves (e.g. to `D:/codetalker`), every harness MCP entry must point at the new path. Run the installer from the repo root:
|
|
210
|
+
|
|
211
|
+
```powershell
|
|
212
|
+
.\scripts\install-harnesses.ps1 -ProjectRoot D:\codetalker
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
What it updates (when those config files exist on your machine):
|
|
216
|
+
|
|
217
|
+
| Harness | Config file |
|
|
218
|
+
|---|---|
|
|
219
|
+
| **Cursor** | `%USERPROFILE%\.cursor\mcp.json` |
|
|
220
|
+
| **Codex** | `%USERPROFILE%\.codex\config.toml` (`[mcp_servers.codetalker]`) |
|
|
221
|
+
| **Antigravity** | `%USERPROFILE%\.gemini\antigravity\mcp_config.json` |
|
|
222
|
+
| **Claude Desktop** | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
223
|
+
|
|
224
|
+
Each file is backed up to `*.bak` before overwrite. **Freebuff** is not patched automatically — remove and re-add codetalker in the Freebuff client UI so a fresh MCP approval is minted (see script output for suggested command/args).
|
|
225
|
+
|
|
226
|
+
Optional path-independent mode (installs a global `codetalker` shim via uv):
|
|
227
|
+
|
|
228
|
+
```powershell
|
|
229
|
+
.\scripts\install-harnesses.ps1 -UseUvTool
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
Limit to specific harnesses: `-Harness Cursor,Codex`. Preview changes: `-WhatIf`.
|
|
233
|
+
|
|
234
|
+
After running, restart each harness and call `codetalk_capabilities` — confirm `server.project_root` matches your install.
|
|
235
|
+
|
|
236
|
+
### Cross-platform installer (macOS / Linux / any OS)
|
|
237
|
+
|
|
238
|
+
The same wiring logic ships as a stdlib-only Python entry point — usable immediately
|
|
239
|
+
after `pip install git+https://github.com/Ickleslimer/codetalker.git`, no PowerShell
|
|
240
|
+
required:
|
|
241
|
+
|
|
242
|
+
```bash
|
|
243
|
+
# preview what would change (default; modifies nothing)
|
|
244
|
+
codetalker-install --project-root /path/to/codetalker
|
|
245
|
+
|
|
246
|
+
# apply
|
|
247
|
+
codetalker-install --project-root /path/to/codetalker --write
|
|
248
|
+
|
|
249
|
+
# uv tool users (after: uv tool install /path/to/codetalker)
|
|
250
|
+
codetalker-install --uv-tool --write
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
Targets are the same as the PowerShell script (Cursor, Antigravity, Claude Desktop,
|
|
254
|
+
Codex TOML); existing `codetalker` entries are replaced in place, other MCP servers
|
|
255
|
+
are preserved, every modified file gets a one-shot `.bak` backup, and CRLF line
|
|
256
|
+
endings survive on Windows-written configs. The Claude Desktop config resolves to
|
|
257
|
+
`%APPDATA%\Claude\claude_desktop_config.json` on Windows and
|
|
258
|
+
`~/.claude/claude_desktop_config.json` elsewhere. Freebuff stays manual on every
|
|
259
|
+
platform (client-managed consent sidecar). On Windows, either installer works; the
|
|
260
|
+
PowerShell variant additionally offers `uv tool install` integration.
|
|
261
|
+
|
|
262
|
+
### Adding to MCP Configuration (manual)
|
|
263
|
+
|
|
264
|
+
In your agent harness MCP config (e.g., Antigravity, Claude Desktop, Cursor):
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"mcpServers": {
|
|
269
|
+
"codetalker": {
|
|
270
|
+
"command": "uv",
|
|
271
|
+
"args": [
|
|
272
|
+
"run",
|
|
273
|
+
"--project",
|
|
274
|
+
"/path/to/codetalker",
|
|
275
|
+
"codetalker"
|
|
276
|
+
]
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Development: the stranger-install smoke
|
|
283
|
+
|
|
284
|
+
CI (`.github/workflows/stranger-smoke.yml`) keeps the onboarding path honest on
|
|
285
|
+
every push/PR: on ubuntu, macos, and windows runners it creates a **fresh venv**,
|
|
286
|
+
installs the checked-out tree **non-editable** (exactly what
|
|
287
|
+
`pip install git+https://github.com/Ickleslimer/codetalker.git` gives a stranger —
|
|
288
|
+
CI deliberately installs from the tree rather than the GitHub URL, which would test
|
|
289
|
+
the *previous* commit on push events), then runs `scripts/stranger_smoke.py`:
|
|
290
|
+
|
|
291
|
+
- stdio handshake + full tool catalog (core 8 tools present)
|
|
292
|
+
- v0.3 per-client instruction tailoring (freebuff mandate vs. short fallback)
|
|
293
|
+
- `codetalk_capabilities` answers, and its version matches the installed dist
|
|
294
|
+
- **empty-home probe**: with `HOME`/`USERPROFILE`/`APPDATA`/`XDG_*` redirected to
|
|
295
|
+
an empty temp dir, capabilities and list answer gracefully (`count: 0`)
|
|
296
|
+
|
|
297
|
+
Run the same check locally against your editable install (skips the fresh-venv
|
|
298
|
+
step but exercises the identical assertions):
|
|
299
|
+
|
|
300
|
+
```bash
|
|
301
|
+
uv pip install . && python scripts/stranger_smoke.py
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Or replicate CI exactly:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
uv venv .smoke-venv --python 3.12
|
|
308
|
+
uv pip install --python .smoke-venv/Scripts/python.exe . # bin/python on posix
|
|
309
|
+
.smoke-venv/Scripts/python.exe scripts/stranger_smoke.py
|
|
310
|
+
```
|