thoughtflow 0.1.2__tar.gz → 0.2.0__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.
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/CHANGELOG.md +88 -1
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/PKG-INFO +292 -185
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/README.md +290 -171
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/pyproject.toml +2 -12
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/__init__.py +7 -5
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/_util.py +34 -1
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/action.py +3 -3
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/agent.py +57 -9
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/agents/react.py +2 -9
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/chat.py +3 -3
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/embed.py +161 -6
- thoughtflow-0.2.0/src/thoughtflow/eval/__init__.py +38 -0
- thoughtflow-0.2.0/src/thoughtflow/eval/harness.py +223 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/llm.py +350 -31
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/memory.py +184 -10
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/this.py +4 -4
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/thought.py +54 -16
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/workflow.py +1 -1
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/conftest.py +0 -92
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/integration/test_llm_providers.py +54 -26
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_agent.py +100 -1
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_embed.py +118 -0
- thoughtflow-0.2.0/tests/unit/test_eval.py +162 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_llm.py +194 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_memory.py +187 -4
- thoughtflow-0.2.0/tests/unit/test_replay.py +247 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_this.py +4 -4
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_thought.py +104 -0
- thoughtflow-0.1.2/src/thoughtflow/eval/__init__.py +0 -34
- thoughtflow-0.1.2/src/thoughtflow/eval/harness.py +0 -200
- thoughtflow-0.1.2/src/thoughtflow/eval/replay.py +0 -137
- thoughtflow-0.1.2/src/thoughtflow/trace/__init__.py +0 -34
- thoughtflow-0.1.2/src/thoughtflow/trace/events.py +0 -183
- thoughtflow-0.1.2/src/thoughtflow/trace/schema.py +0 -111
- thoughtflow-0.1.2/src/thoughtflow/trace/session.py +0 -141
- thoughtflow-0.1.2/tests/integration/test_anthropic_adapter.py +0 -73
- thoughtflow-0.1.2/tests/integration/test_openai_adapter.py +0 -71
- thoughtflow-0.1.2/tests/unit/test_trace.py +0 -174
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/.gitignore +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/LICENSE +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/_cron_expr.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/_http.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/_substitution.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/ask.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/call.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/fetch.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/noop.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/notify.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/post.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/read_file.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/run.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/say.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/scrape.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/search.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/sleep.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/wait.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/actions/write_file.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/agents/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/agents/planact.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/agents/reflect.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/chron.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/delegate.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/mcp.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/message.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/py.typed +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/thoughts/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/thoughts/decide.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/thoughts/plan.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/src/thoughtflow/tool.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/integration/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/integration/test_chron.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/integration/test_scrape.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/integration/test_search_providers.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/__init__.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_action.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_actions.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_chat.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_chron.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_delegate.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_mcp.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_message.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_tool.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_util.py +0 -0
- {thoughtflow-0.1.2 → thoughtflow-0.2.0}/tests/unit/test_workflow.py +0 -0
|
@@ -18,6 +18,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
## [0.2.0] - 2026-06-10
|
|
22
|
+
|
|
23
|
+
The release where ThoughtFlow's deterministic-replay story becomes real —
|
|
24
|
+
grown from MEMORY itself, with zero new concepts.
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- **Record/replay system.** `llm.record(memory)` captures every LLM exchange
|
|
28
|
+
(request + response, keyed by content hash) as MEMORY events. `LLM.replay(memory)`
|
|
29
|
+
returns a `ReplayLLM` — a drop-in LLM that serves recorded responses
|
|
30
|
+
deterministically: offline, instant, no API keys. Misses fail loudly
|
|
31
|
+
(`ReplayMissError`) or fall back to a live LLM via `on_miss=`.
|
|
32
|
+
- `EMBED.record()` / `EMBED.replay()` / `ReplayEMBED` — the identical seam for
|
|
33
|
+
the embedding boundary
|
|
34
|
+
- `MEMORY.add_exchange()` / `MEMORY.get_exchanges()` — the event-sourced storage
|
|
35
|
+
powering record/replay; recordings survive `to_json`/`from_json` round-trips
|
|
36
|
+
- **Working eval harness.** `thoughtflow.eval.Harness` now actually runs:
|
|
37
|
+
a `TestCase` is a name + setup + check predicate over MEMORY; `Harness.run(flow)`
|
|
38
|
+
executes any `memory -> memory` callable per case in isolated MEMORYs,
|
|
39
|
+
containing exceptions as failures. The whole package is ~230 lines.
|
|
40
|
+
- **Streaming through THOUGHT.** New `on_token=` config hook: when set, the LLM
|
|
41
|
+
response streams through the hook chunk-by-chunk, then the complete text flows
|
|
42
|
+
through the normal parse/validate/store pipeline. LLMs without streaming
|
|
43
|
+
support fall back to a normal call automatically.
|
|
44
|
+
- `OpenAICompatibleLLM` exported from the package root (local servers: vLLM,
|
|
45
|
+
LM Studio, llama.cpp, MLX)
|
|
46
|
+
- Python 3.13 classifier
|
|
47
|
+
- Unit tests for record/replay (round-trips, hash stability, miss behavior,
|
|
48
|
+
end-to-end THOUGHT replay), the eval harness, on_token streaming, and
|
|
49
|
+
validation-spelling equivalence
|
|
50
|
+
- `MEMORY.add_augment()` — store context tagged for optional LLM-view merging
|
|
51
|
+
(e.g. RAG chunks) without mutating user messages in the event log
|
|
52
|
+
- `MEMORY.get_llm_msgs(merge_augments=False)` — build LLM-ready message dicts;
|
|
53
|
+
when `merge_augments=True`, fold `metadata['augments'] == 'last_user'`
|
|
54
|
+
events into the preceding user turn for the model payload only
|
|
55
|
+
- `AGENT(merge_augments=False)` — opt-in flag to use the merged LLM view in
|
|
56
|
+
`_build_messages()`; default behavior unchanged
|
|
57
|
+
- Addresses [#15](https://github.com/jrolf/thoughtflow/issues/15) — optional
|
|
58
|
+
support for prompt-injection-style RAG while preserving event-sourced storage
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
- `THOUGHT` validation: `validation=` is the canonical spelling and now accepts
|
|
62
|
+
both callables and built-in strings (`'any'`, `'has_keys:...'`,
|
|
63
|
+
`'list_min_len:N'`, `'summary_v1'`); the `validator=` config key remains fully
|
|
64
|
+
supported and behaves identically
|
|
65
|
+
- Standardized brand casing to "ThoughtFlow" across source docstrings, ZEN.md,
|
|
66
|
+
and project docs
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
- `MEMORY.copy()` — no longer stores a module reference on the instance
|
|
70
|
+
(`bisect` is now a module-level import), so deep copy works; the previously
|
|
71
|
+
skipped test is restored and expanded
|
|
72
|
+
- Anthropic: system prompts now use the top-level `system` field (not `messages`)
|
|
73
|
+
- Gemini: map `max_tokens` / `temperature` / `top_p` to `generationConfig`
|
|
74
|
+
- `THOUGHT`: `parse='json'` now aliases `parser='json'`; fenced JSON parsing improved
|
|
75
|
+
|
|
76
|
+
### Removed
|
|
77
|
+
- `thoughtflow.trace` (Session/Event/TraceSchema) — superseded by MEMORY-native
|
|
78
|
+
record/replay. The subsystem duplicated MEMORY's event log in a foreign idiom,
|
|
79
|
+
and its `load()`/`run()` methods were unimplemented stubs with no user surface.
|
|
80
|
+
MEMORY's JSON serialization already carries a schema version field.
|
|
81
|
+
- `thoughtflow.eval.Replay` stub — replaced by the working `ReplayLLM`
|
|
82
|
+
- Vestigial pyproject extras (`openai`, `anthropic`, `local`, `all-providers`) —
|
|
83
|
+
these installed SDKs the zero-dependency core never imports (leftovers from a
|
|
84
|
+
removed adapter-era design)
|
|
85
|
+
- Adapter-era integration test files (`test_openai_adapter.py`,
|
|
86
|
+
`test_anthropic_adapter.py`) and the legacy `MockAdapter` test fixture —
|
|
87
|
+
all referenced a `thoughtflow.adapters` module that no longer exists
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## [0.1.3] - 2026-06-10
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
- `MEMORY.last_result_msg()` — convenience accessor for the most recent `result` role message (mirrors `last_user_msg`, `last_log_msg`, etc.)
|
|
95
|
+
- `MEMORY.add_msg(..., metadata=...)` — optional per-message metadata dict for UI and RAG tagging (e.g. `{'internal': True}`)
|
|
96
|
+
- `MEMORY.get_msgs(..., metadata_filter=..., exclude_metadata=...)` — filter messages by metadata for UI-visible history
|
|
97
|
+
- `AGENT._strip_markdown_fences()` — strips wrapping markdown code fences before JSON tool-call parsing
|
|
98
|
+
- Unit tests for all of the above
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
- Pre-commit `block-ai-trailer` hook now passes the commit message filename (required by `block-ai-contributors.sh`)
|
|
102
|
+
- Closes [#14](https://github.com/jrolf/thoughtflow/issues/14) — message metadata for UI filtering
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
21
106
|
## [0.1.2] - 2026-04-01
|
|
22
107
|
|
|
23
108
|
### Added
|
|
@@ -86,7 +171,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
86
171
|
---
|
|
87
172
|
|
|
88
173
|
<!-- Release links -->
|
|
89
|
-
[Unreleased]: https://github.com/jrolf/thoughtflow/compare/v0.
|
|
174
|
+
[Unreleased]: https://github.com/jrolf/thoughtflow/compare/v0.2.0...HEAD
|
|
175
|
+
[0.2.0]: https://github.com/jrolf/thoughtflow/compare/v0.1.3...v0.2.0
|
|
176
|
+
[0.1.3]: https://github.com/jrolf/thoughtflow/compare/v0.1.2...v0.1.3
|
|
90
177
|
[0.1.2]: https://github.com/jrolf/thoughtflow/compare/v0.1.1...v0.1.2
|
|
91
178
|
[0.1.1]: https://github.com/jrolf/thoughtflow/compare/v0.1.0...v0.1.1
|
|
92
179
|
[0.1.0]: https://github.com/jrolf/thoughtflow/compare/v0.0.9...v0.1.0
|