Mind-as-observer probe — ship Claude Code (and other external) conversations into your thinqOS Mind.
Project description
thinqos-harvest
Mind-as-observer probe for thinqOS. Ships every Claude Code session you have into your thinqOS Mind as a captured Episode, so the Mind learns from where you actually do your work — without sitting in the request path.
Pattern: observer, not proxy. The probe runs as a Claude Code Stop hook (fires after every model reply), reads the session JSONL from disk, normalizes it to the public external ingest v1 contract, and POSTs it to /api/ingest/external/v1 on your thinqOS instance. Your Claude Code UX is unchanged.
Install
The hook command (uvx thinqos-harvest hook capture) needs uv on PATH; uvx fetches and runs thinqos-harvest on demand, no separate install step.
curl -LsSf https://astral.sh/uv/install.sh | sh
(If you'd rather install the package globally: pipx install thinqos-harvest and reference it as thinqos-harvest hook capture instead of uvx thinqos-harvest hook capture.)
Wire up
-
Mint an ingest key. Go to https://thinqos.com/api-keys, click Create, copy the
tq_...value. (Same key kind as the MCP keys — one key per machine is fine.) -
Set env vars in your shell rc (
~/.zshrc,~/.bashrc, or equivalent):export THINQOS_BASE_URL=https://thinqos.com export INGEST_API_KEY=tq_xxxx...
Reload your shell (
source ~/.zshrc). -
Print the hook JSON snippet:
thinqos-harvest install-hookCopy the JSON it prints.
-
Paste the snippet into
~/.claude/settings.jsonunder the top-level"hooks"object. Example after pasting:{ "hooks": { "Stop": [ { "matcher": "", "hooks": [ { "type": "command", "command": "uvx thinqos-harvest hook capture", "timeout": 30 } ] } ] } }
If you already have a
Stophook configured, append our entry to the existinghooksarray rather than replacing.install-hookwill warn you when this is the case. -
Smoke test:
- Start a Claude Code session, type one prompt, exit normally.
- Run
thinqos-harvest list— your session should appear within a second.
CLI
| Command | What it does |
|---|---|
thinqos-harvest list [--limit N] |
List your captured sessions newest-first. |
thinqos-harvest forget <session_id> |
Delete one captured session by id (irreversible). |
thinqos-harvest install-hook |
Print the JSON snippet for ~/.claude/settings.json. |
thinqos-harvest run |
Manual sweep — discover any sessions not yet shipped and POST them. Use for backfill or after a long offline period. |
thinqos-harvest hook capture |
Hook entry point — reads transcript_path from stdin JSON. You should not run this directly; Claude Code does. |
Denylists
Two opt-out layers, both edited at ~/.config/thinqos-harvest/:
denylist.txt— newline-delimited substrings; any session whosecwdcontains a substring is skipped entirely. Example: addpersonal-taxesto skip captures from~/Documents/personal-taxes/.- Content denylist is hard-coded: turns containing
.env,api_key=…,sk-…, or matching(api_key|secret|password|token)=<16+ chars>are dropped before POST. Oversizedtool_resultcontent (>32KB) is also dropped.
Reliability
- Probe always exits 0; never blocks a Claude Code session even on bug or network failure.
- Failed POSTs spool to
~/.config/thinqos-harvest/pending/<uuid>.jsonand drain on the nextrunor hook invocation. - Server-side dedup keyed by
(source, source_external_id); re-shipping the same session is idempotent.
Forgetting a capture
thinqos-harvest forget <session_id>
Where <session_id> is the value thinqos-harvest list shows in the last column (Claude Code session UUID). This deletes the Episode on the server side and cascades to any extracted knowledge.
For a per-turn / per-content scrub (rather than whole-session delete), open an issue on github.com/AI4Outcomes/thinqos — it's a deliberate Phase-A non-goal but ship-able if asked for.
Privacy posture
Opt-out, not opt-in. Adapter ships everything that isn't denied. If you'd rather have explicit opt-in per session, this probe is the wrong tool for you — the design decision is explicit in the spec.
Versioning
Tagged tools/thinqos-harvest-vX.Y.Z in the thinqos monorepo. A push to a matching tag triggers the publish workflow.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file thinqos_harvest-0.2.0.tar.gz.
File metadata
- Download URL: thinqos_harvest-0.2.0.tar.gz
- Upload date:
- Size: 14.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f13f369f3219104b071f6a492da5a0a7877b4b6a8fcaf5abf703a406c7aacdd6
|
|
| MD5 |
d000c7a6b74b6624ef63dece2c4d13c8
|
|
| BLAKE2b-256 |
e6cba874ab406a3e97bf741322a594f1d4128714f17f1a7d32b4c3525ebfc33d
|
Provenance
The following attestation bundles were made for thinqos_harvest-0.2.0.tar.gz:
Publisher:
publish-harvest.yml on AI4Outcomes/thinqos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thinqos_harvest-0.2.0.tar.gz -
Subject digest:
f13f369f3219104b071f6a492da5a0a7877b4b6a8fcaf5abf703a406c7aacdd6 - Sigstore transparency entry: 1644245795
- Sigstore integration time:
-
Permalink:
AI4Outcomes/thinqos@d21e95e063117a6dc60d25112d1f8c53ac08a739 -
Branch / Tag:
refs/tags/tools/thinqos-harvest-v0.2.0 - Owner: https://github.com/AI4Outcomes
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-harvest.yml@d21e95e063117a6dc60d25112d1f8c53ac08a739 -
Trigger Event:
push
-
Statement type:
File details
Details for the file thinqos_harvest-0.2.0-py3-none-any.whl.
File metadata
- Download URL: thinqos_harvest-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb2a960be8dff20bc08e1ed1535ea2d13eed0e8c594218303372042020fa9016
|
|
| MD5 |
60b334b3e7d24f10a86038c605336be1
|
|
| BLAKE2b-256 |
0b667e422a3897447e035df220cd7e63622e9bae6122732e2556fa0a570ee3ee
|
Provenance
The following attestation bundles were made for thinqos_harvest-0.2.0-py3-none-any.whl:
Publisher:
publish-harvest.yml on AI4Outcomes/thinqos
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
thinqos_harvest-0.2.0-py3-none-any.whl -
Subject digest:
bb2a960be8dff20bc08e1ed1535ea2d13eed0e8c594218303372042020fa9016 - Sigstore transparency entry: 1644245955
- Sigstore integration time:
-
Permalink:
AI4Outcomes/thinqos@d21e95e063117a6dc60d25112d1f8c53ac08a739 -
Branch / Tag:
refs/tags/tools/thinqos-harvest-v0.2.0 - Owner: https://github.com/AI4Outcomes
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-harvest.yml@d21e95e063117a6dc60d25112d1f8c53ac08a739 -
Trigger Event:
push
-
Statement type: