langgraph-stream-parser 0.1.7__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.
Files changed (65) hide show
  1. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/.gitignore +208 -208
  2. langgraph_stream_parser-0.2.0/CHANGELOG.md +142 -0
  3. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/LICENSE +21 -21
  4. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/PKG-INFO +93 -10
  5. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/README.md +531 -450
  6. langgraph_stream_parser-0.2.0/REVAMP_PLAN.md +565 -0
  7. langgraph_stream_parser-0.2.0/assets/header.svg +87 -0
  8. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/examples/agent.py +96 -96
  9. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/examples/fastapi_websocket.py +234 -234
  10. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/examples/jupyter_example.ipynb +836 -836
  11. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/pyproject.toml +81 -78
  12. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/spec.md +435 -435
  13. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/__init__.py +102 -93
  14. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/__init__.py +18 -15
  15. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/base.py +522 -512
  16. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/cli.py +467 -467
  17. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/fastapi.py +311 -311
  18. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/jupyter.py +253 -253
  19. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/adapters/print.py +172 -172
  20. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/adapters/session.py +256 -0
  21. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/compat.py +314 -282
  22. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/demo/__init__.py +15 -0
  23. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/demo/agent.py +102 -0
  24. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/events.py +691 -516
  25. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/extractors/__init__.py +27 -15
  26. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/extractors/base.py +74 -74
  27. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/extractors/builtins.py +340 -0
  28. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/extractors/interrupts.py +168 -168
  29. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/extractors/messages.py +220 -153
  30. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/handlers/__init__.py +12 -12
  31. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/handlers/messages.py +109 -93
  32. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/handlers/updates.py +357 -295
  33. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/host/__init__.py +16 -0
  34. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/host/__main__.py +17 -0
  35. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/host/config.py +291 -0
  36. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/host/loader.py +83 -0
  37. langgraph_stream_parser-0.2.0/src/langgraph_stream_parser/host/workspace.py +42 -0
  38. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/parser.py +626 -633
  39. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/src/langgraph_stream_parser/resume.py +133 -133
  40. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/__init__.py +1 -1
  41. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/fixtures/__init__.py +1 -1
  42. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/fixtures/mocks.py +537 -435
  43. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_cli_adapter.py +349 -349
  44. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_compat.py +229 -203
  45. langgraph_stream_parser-0.2.0/tests/test_demo.py +36 -0
  46. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_dual_mode.py +808 -808
  47. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_events.py +376 -315
  48. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_extractors.py +535 -370
  49. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_fastapi_adapter.py +398 -398
  50. langgraph_stream_parser-0.2.0/tests/test_host.py +149 -0
  51. langgraph_stream_parser-0.2.0/tests/test_host_config.py +120 -0
  52. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_jupyter.py +366 -366
  53. langgraph_stream_parser-0.2.0/tests/test_lc14_compat.py +99 -0
  54. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_parser.py +419 -418
  55. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_print_adapter.py +349 -349
  56. langgraph_stream_parser-0.2.0/tests/test_reasoning_display.py +205 -0
  57. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_resume.py +93 -93
  58. langgraph_stream_parser-0.2.0/tests/test_session_adapter.py +287 -0
  59. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_subagent.py +373 -373
  60. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/tests/test_v2_stream.py +633 -633
  61. langgraph_stream_parser-0.2.0/tests/test_wire_contract.py +140 -0
  62. {langgraph_stream_parser-0.1.7 → langgraph_stream_parser-0.2.0}/uv.lock +77 -18
  63. langgraph_stream_parser-0.1.7/.claude/settings.local.json +0 -20
  64. langgraph_stream_parser-0.1.7/CHANGELOG.md +0 -86
  65. langgraph_stream_parser-0.1.7/src/langgraph_stream_parser/extractors/builtins.py +0 -166
@@ -1,208 +1,208 @@
1
- # Byte-compiled / optimized / DLL files
2
- __pycache__/
3
- *.py[codz]
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
- # PyInstaller
30
- # Usually these files are written by a python script from a template
31
- # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
- *.manifest
33
- *.spec
34
-
35
- # Installer logs
36
- pip-log.txt
37
- pip-delete-this-directory.txt
38
-
39
- # Unit test / coverage reports
40
- htmlcov/
41
- .tox/
42
- .nox/
43
- .coverage
44
- .coverage.*
45
- .cache
46
- nosetests.xml
47
- coverage.xml
48
- *.cover
49
- *.py.cover
50
- .hypothesis/
51
- .pytest_cache/
52
- cover/
53
-
54
- # Translations
55
- *.mo
56
- *.pot
57
-
58
- # Django stuff:
59
- *.log
60
- local_settings.py
61
- db.sqlite3
62
- db.sqlite3-journal
63
-
64
- # Flask stuff:
65
- instance/
66
- .webassets-cache
67
-
68
- # Scrapy stuff:
69
- .scrapy
70
-
71
- # Sphinx documentation
72
- docs/_build/
73
-
74
- # PyBuilder
75
- .pybuilder/
76
- target/
77
-
78
- # Jupyter Notebook
79
- .ipynb_checkpoints
80
-
81
- # IPython
82
- profile_default/
83
- ipython_config.py
84
-
85
- # pyenv
86
- # For a library or package, you might want to ignore these files since the code is
87
- # intended to run in multiple environments; otherwise, check them in:
88
- # .python-version
89
-
90
- # pipenv
91
- # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
- # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
- # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
- # install all needed dependencies.
95
- #Pipfile.lock
96
-
97
- # UV
98
- # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
- # This is especially recommended for binary packages to ensure reproducibility, and is more
100
- # commonly ignored for libraries.
101
- #uv.lock
102
-
103
- # poetry
104
- # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
- # This is especially recommended for binary packages to ensure reproducibility, and is more
106
- # commonly ignored for libraries.
107
- # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
- #poetry.lock
109
- #poetry.toml
110
-
111
- # pdm
112
- # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
- # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
- # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
- #pdm.lock
116
- #pdm.toml
117
- .pdm-python
118
- .pdm-build/
119
-
120
- # pixi
121
- # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
- #pixi.lock
123
- # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
- # in the .venv directory. It is recommended not to include this directory in version control.
125
- .pixi
126
-
127
- # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
- __pypackages__/
129
-
130
- # Celery stuff
131
- celerybeat-schedule
132
- celerybeat.pid
133
-
134
- # SageMath parsed files
135
- *.sage.py
136
-
137
- # Environments
138
- .env
139
- .envrc
140
- .venv
141
- env/
142
- venv/
143
- ENV/
144
- env.bak/
145
- venv.bak/
146
-
147
- # Spyder project settings
148
- .spyderproject
149
- .spyproject
150
-
151
- # Rope project settings
152
- .ropeproject
153
-
154
- # mkdocs documentation
155
- /site
156
-
157
- # mypy
158
- .mypy_cache/
159
- .dmypy.json
160
- dmypy.json
161
-
162
- # Pyre type checker
163
- .pyre/
164
-
165
- # pytype static type analyzer
166
- .pytype/
167
-
168
- # Cython debug symbols
169
- cython_debug/
170
-
171
- # PyCharm
172
- # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
- # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
- # and can be added to the global gitignore or merged into this file. For a more nuclear
175
- # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
- #.idea/
177
-
178
- # Abstra
179
- # Abstra is an AI-powered process automation framework.
180
- # Ignore directories containing user credentials, local state, and settings.
181
- # Learn more at https://abstra.io/docs
182
- .abstra/
183
-
184
- # Visual Studio Code
185
- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
- # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
- # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
- # you could uncomment the following to ignore the entire vscode folder
189
- # .vscode/
190
-
191
- # Ruff stuff:
192
- .ruff_cache/
193
-
194
- # PyPI configuration file
195
- .pypirc
196
-
197
- # Cursor
198
- # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
- # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
- # refer to https://docs.cursor.com/context/ignore-files
201
- .cursorignore
202
- .cursorindexingignore
203
-
204
- # Marimo
205
- marimo/_static/
206
- marimo/_lsp/
207
- __marimo__/
208
- .jupyter_ystore.db
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ #uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ #poetry.lock
109
+ #poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ #pdm.lock
116
+ #pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ #pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # SageMath parsed files
135
+ *.sage.py
136
+
137
+ # Environments
138
+ .env
139
+ .envrc
140
+ .venv
141
+ env/
142
+ venv/
143
+ ENV/
144
+ env.bak/
145
+ venv.bak/
146
+
147
+ # Spyder project settings
148
+ .spyderproject
149
+ .spyproject
150
+
151
+ # Rope project settings
152
+ .ropeproject
153
+
154
+ # mkdocs documentation
155
+ /site
156
+
157
+ # mypy
158
+ .mypy_cache/
159
+ .dmypy.json
160
+ dmypy.json
161
+
162
+ # Pyre type checker
163
+ .pyre/
164
+
165
+ # pytype static type analyzer
166
+ .pytype/
167
+
168
+ # Cython debug symbols
169
+ cython_debug/
170
+
171
+ # PyCharm
172
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
173
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
174
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
175
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
176
+ #.idea/
177
+
178
+ # Abstra
179
+ # Abstra is an AI-powered process automation framework.
180
+ # Ignore directories containing user credentials, local state, and settings.
181
+ # Learn more at https://abstra.io/docs
182
+ .abstra/
183
+
184
+ # Visual Studio Code
185
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
186
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
187
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
188
+ # you could uncomment the following to ignore the entire vscode folder
189
+ # .vscode/
190
+
191
+ # Ruff stuff:
192
+ .ruff_cache/
193
+
194
+ # PyPI configuration file
195
+ .pypirc
196
+
197
+ # Cursor
198
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
199
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
200
+ # refer to https://docs.cursor.com/context/ignore-files
201
+ .cursorignore
202
+ .cursorindexingignore
203
+
204
+ # Marimo
205
+ marimo/_static/
206
+ marimo/_lsp/
207
+ __marimo__/
208
+ .jupyter_ystore.db
@@ -0,0 +1,142 @@
1
+ # Changelog
2
+
3
+ ## [0.2.0] - 2026-06-02
4
+
5
+ Repositions langgraph-stream-parser as the **shared runtime substrate** for the deep-agent host family (`cowork-dash`, `deepagent-lab`, `deepagent-code`, `deepagent-vscode`).
6
+
7
+ ### Added
8
+ - **`host/` submodule** — shared host conventions:
9
+ - `load_agent_spec("path.py:var" | "module:var")` — strict agent-spec loader (the `:object` suffix is required).
10
+ - `HostConfig` — layered config resolver: `defaults < deepagents.toml < DEEPAGENT_* env < overrides`, with per-field source tracking. Subclass and extend the `_ENV` / `_TOML` maps (merged across the MRO) to add host-specific keys. `DEEPAGENT_AGENT_SPEC` is the canonical agent-spec env var.
11
+ - `load_toml_config()` — loads + deep-merges global `~/.deepagents/config.toml` (override dir via `DEEPAGENTS_CONFIG_HOME`) and the nearest project `deepagents.toml`.
12
+ - `Workspace` — workspace-root wrapper with traversal-safe `subpath()`.
13
+ - `python -m langgraph_stream_parser.host` (and `HostConfig.describe()`) — prints each resolved value, its source, and the env var / TOML key that sets it.
14
+ - **`adapters.SessionAdapter`** — session-scoped streaming for web hosts: per-session event queue, cancellation, side-channel `push_event()`, and persistent SSE that survives client reconnects.
15
+ - **`demo.create_default_agent()`** — shared filesystem-backed default agent factory (behind the `[demo]` extra; lazy-imports `deepagents`).
16
+ - **Four built-in extractors** for the agentskills.io / Hermes pattern, wired into the default set so every host gets them through `compat`: `SkillManageExtractor` (`skill_manage`), `SkillViewExtractor` (`skill_view`), `CompressionExtractor` (`__compression__`), `MemoryExtractor` (`memory`).
17
+ - `event_to_dict(event, *, max_result_len=...)` — lets hosts drop bespoke serializer shims.
18
+
19
+ ### Fixed
20
+ - `skip_tools` previously suppressed a tool's **extractor** as well as its lifecycle events, silently dropping `todo_list` / `reflection`. Extractors now run for skipped tools; only the lifecycle (start/end) events are suppressed.
21
+
22
+ ## [0.1.9] - 2026-05-19
23
+
24
+ Compatibility refresh for **langgraph 1.2**, **langchain-core 1.4**, and **deepagents 0.6**.
25
+
26
+ ### Added
27
+ - `UsageEvent.cache_read_tokens` and `UsageEvent.cache_creation_tokens` — populated from `usage_metadata.input_token_details` (`cache_read`, `cache_creation`). Default 0; omitted from `to_dict()` when zero.
28
+ - `ContentEvent.is_subagent` and `ReasoningEvent.is_subagent` — set to `True` when stream metadata carries `ls_agent_type == "subagent"` (deepagents >= 0.6). Lets consumers distinguish subagent output even when `lc_agent_name` is absent.
29
+ - `"respond"` decision support in `InterruptEvent.build_decisions()` / `create_resume()`: pass `response="..."` to send a text reply in place of the tool call. Matches the deepagents 0.6 decision verb set.
30
+ - `InterruptEvent.build_decisions(..., use_edited_action=False)` escape hatch for runtimes that still expect the legacy `{"type": "edit", "args": ...}` resume shape.
31
+
32
+ ### Changed
33
+ - `extract_message_content()` now skips the full set of non-text content blocks defined by langchain-core 1.4 standard content blocks: `tool_call`, `tool_use`, `tool_call_chunk`, `server_tool_call`, `server_tool_call_chunk`, `server_tool_result`, `invalid_tool_call`, `image`, `audio`, `video`, `file` (plus the existing `reasoning` / `thinking`). Previously these could leak as stringified dicts into `ContentEvent.content`. Tool lifecycle and reasoning events are unchanged.
34
+ - `InterruptEvent.build_decisions("edit", ...)` now emits the modern `{"type": "edit", "edited_action": {"name", "args"}}` shape by default, matching LangGraph 1.1+ / deepagents 0.5+. Set `use_edited_action=False` for the legacy shape.
35
+ - `InterruptEvent.allowed_decisions` defaults to `{"approve", "reject", "edit", "respond"}` when no review configs are present (was `{"approve", "reject"}`).
36
+ - Dev dependency bumped: `langgraph>=1.1.0`, `langchain-core>=1.4.0`.
37
+
38
+ ### Notes
39
+ - **No breaking change for default tool extractors**: deepagents 0.6 ships new built-in tools (`glob_search`, `grep_search`, `execute`, `start_async_task` / `check_async_task` / `update_async_task` / `cancel_async_task` / `list_async_tasks`, plus QuickJS `CodeInterpreterMiddleware`). These flow through the regular `ToolCallStartEvent` / `ToolCallEndEvent` lifecycle — no parser change required.
40
+ - **v3 `stream_events` typed projections** (LangGraph 1.2 beta) are not yet supported. v2 `StreamPart` parsing remains the recommended path for `stream()` / `astream()`.
41
+
42
+ ## [0.1.8] - 2026-04-18
43
+
44
+ ### Added
45
+ - `ReasoningEvent` dataclass for reasoning / thinking content; emitted from langchain-core `reasoning` and `thinking` content blocks, and from `think_tool` reflections. Carries a `source` field (`"content_block"` or `"think_tool"`) so UIs can distinguish provenance.
46
+ - `DisplayEvent` dataclass for rich inline content (dataframes, images, plotly, html, json) from `display_inline`-style tools. Carries `display_type`, `data`, `title`, `status`, `error`, `tool_name`, `tool_call_id`, `node`, `namespace`.
47
+ - `extract_reasoning_content()` helper in `extractors.messages` for parsing reasoning blocks from `AIMessageChunk.content`.
48
+ - `UpdatesHandler._event_from_extraction()` routes extractor output to typed events; unknown `extracted_type` values still flow through `ToolExtractedEvent` for custom extractors.
49
+ - README sections: "Reasoning & Thinking" and "Rich Inline Display" with typed matching examples.
50
+
51
+ ### Changed
52
+ - `think_tool` output is now a `ReasoningEvent(source="think_tool")` instead of `ToolExtractedEvent(extracted_type="reflection")`. Legacy dict API (`stream_graph_updates`) still produces `{"chunk": text}` for backward compatibility.
53
+ - `display_inline` tool output is now a `DisplayEvent` instead of `ToolExtractedEvent(extracted_type="display_inline")`.
54
+ - `extract_message_content()` now skips reasoning blocks so they can be surfaced as `ReasoningEvent` separately.
55
+
56
+ ### Fixed
57
+ - Removed dead `has_messages` variable in `_parse_v2`.
58
+
59
+ ## [0.1.7] - 2026-04-18
60
+
61
+ ### Added
62
+ - `FastAPIAdapter` for streaming LangGraph events over WebSocket and Server-Sent Events; stateless by design — conversation state is keyed by `session_id` used as LangGraph `thread_id`
63
+ - Per-session asyncio lock with refcounted cleanup to serialize concurrent turns on the same thread
64
+ - `BaseAdapter._text_prompt_interrupt()` helper, shared by `PrintAdapter` and `JupyterDisplay`
65
+ - `BaseAdapter._truncate()` helper for preview-length capping
66
+ - `fastapi` optional dependency group (`pip install langgraph-stream-parser[fastapi]`)
67
+
68
+ ### Changed
69
+ - Hoisted `_last_rendered_count` incremental-render cursor from Print/CLI into `BaseAdapter`
70
+ - Slimmed `examples/fastapi_websocket.py` from ~455 to ~234 lines by using the new adapter
71
+
72
+ ### Fixed
73
+ - `UsageEvent` now has an explicit case in `BaseAdapter._process_event` instead of silently falling through
74
+
75
+ ## [0.1.6] - 2026-03-28
76
+
77
+ ### Added
78
+ - v2 StreamPart parsing (`stream_mode="v2"`) with auto-detection of `{"type", "ns", "data"}` dict format
79
+ - `ValuesEvent` for full state snapshots from `stream_mode="values"` (v2)
80
+ - `DebugEvent` for debug, checkpoint, and task trace data from v2 streaming
81
+ - Routing for v2 stream types: updates, messages, custom, values, debug, checkpoints, tasks
82
+
83
+ ## [0.1.5] - 2026-02-06
84
+
85
+ ### Added
86
+ - Subgraph namespace preservation on events (`namespace` field on `ContentEvent`, `ToolCallStartEvent`, `ToolCallEndEvent`, `ToolExtractedEvent`, `InterruptEvent`, `StateUpdateEvent`, `UsageEvent`)
87
+ - `agent_name` field on `ContentEvent`, extracted from `lc_agent_name` metadata in messages mode (for deep agent subagents)
88
+ - `CustomEvent` for data emitted via `get_stream_writer()` (`stream_mode="custom"`)
89
+ - `stream_mode="custom"` support in single and multi-mode parsing
90
+
91
+ ## [0.1.4] - 2026-02-06
92
+
93
+ ### Added
94
+ - `context_parts` parameter on `prepare_agent_input()` for prepending context lines (e.g., timestamp, working directory) to user messages
95
+
96
+ ## [0.1.3] - 2026-02-09
97
+
98
+ ### Fixed
99
+ - Handle multi-element interrupt tuples from LangGraph subgraphs
100
+ - Aggregate `action_requests` and `review_configs` across all Interrupt objects in a tuple
101
+
102
+ ## [0.1.2] - 2026-02-08
103
+
104
+ ### Added
105
+ - Subgraph namespace stripping for `subgraphs=True` streams
106
+ - Automatic handling of single-mode `(namespace, data)` and multi-mode `(namespace, mode, data)` chunk formats
107
+ - All parent and subgraph chunks processed uniformly with namespace stripped
108
+
109
+ ## [0.1.1] - 2026-02-07
110
+
111
+ ### Added
112
+ - Dual stream mode support (`stream_mode=["updates", "messages"]`) with automatic deduplication
113
+ - Auto-detection mode (`stream_mode="auto"`) that inspects the first chunk
114
+ - `MessagesHandler` for token-level content streaming from `stream_mode="messages"`
115
+ - `UsageEvent` for token usage metadata from AIMessage `usage_metadata`
116
+ - `DisplayInlineExtractor` for extracting inline display artifacts
117
+ - Event serialization helpers (`InterruptEvent.build_decisions()`, `InterruptEvent.create_resume()`)
118
+
119
+ ### Changed
120
+ - `stream_mode` is now a constructor parameter on `StreamParser` (moved from `parse()`/`aparse()`)
121
+ - `UpdatesHandler` accepts `suppress_content` flag for dual-mode deduplication
122
+
123
+ ## [0.1.0] - 2026-02-01
124
+
125
+ ### Initial Release
126
+
127
+ - Add `StreamParser` for parsing LangGraph stream outputs into typed events
128
+ - Add typed event classes: `ContentEvent`, `ToolCallStartEvent`, `ToolCallEndEvent`, `ToolExtractedEvent`, `InterruptEvent`, `StateUpdateEvent`, `CompleteEvent`, `ErrorEvent`
129
+ - Add tool lifecycle tracking (start → end)
130
+ - Add extensible extractor system with built-in `ThinkToolExtractor` and `TodoExtractor`
131
+ - Add interrupt handling with `create_resume_input()` and `prepare_agent_input()`
132
+ - Add async support via `aparse()`
133
+ - Add legacy dict-based API for backward compatibility (`stream_graph_updates`, `resume_graph_from_interrupt`)
134
+
135
+ ### Display Adapters
136
+
137
+ - Add `BaseAdapter` abstract class for building custom display adapters
138
+ - Add `PrintAdapter` for plain text output in any Python environment
139
+ - Add `CLIAdapter` for styled terminal output with ANSI colors and spinner animation
140
+ - Add `JupyterDisplay` for rich notebook display with live updates
141
+ - Add configurable `reflection_types` and `todo_types` for custom tool rendering
142
+ - Add `**stream_kwargs` pass-through to `graph.stream()`
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Kedar Dabhadkar
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.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kedar Dabhadkar
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.