py-opencode-wrapper 0.2.1__py3-none-any.whl → 0.2.2__py3-none-any.whl

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.
@@ -73,7 +73,7 @@ def build_argv(
73
73
  cmd.extend(["--port", str(run_cfg.port)])
74
74
  if run_cfg.variant:
75
75
  cmd.extend(["--variant", run_cfg.variant])
76
- if run_cfg.thinking is True:
76
+ if run_cfg.record_thinking is True or run_cfg.thinking is True:
77
77
  cmd.append("--thinking")
78
78
 
79
79
  if prompt:
@@ -147,6 +147,10 @@ class RunConfig:
147
147
  remote_dir: str | None = None
148
148
  port: int | None = None
149
149
  variant: str | None = None
150
+ # Include OpenCode reasoning/thinking parts in the JSON event stream.
151
+ # This maps to `opencode run --thinking`; it does not set model reasoning effort.
152
+ record_thinking: bool | None = None
153
+ # Backward-compatible alias for record_thinking.
150
154
  thinking: bool | None = None
151
155
  print_logs: bool | None = None
152
156
  log_level: str | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: py-opencode-wrapper
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Async Python wrapper for OpenCode CLI (opencode run --format json)
5
5
  Project-URL: Homepage, https://github.com/idailylife/oc_py_wrapper
6
6
  Project-URL: Repository, https://github.com/idailylife/oc_py_wrapper
@@ -61,6 +61,12 @@ async def main():
61
61
  asyncio.run(main())
62
62
  ```
63
63
 
64
+ Set `RunConfig(record_thinking=True)` when you want OpenCode reasoning/thinking
65
+ parts included in `result.events` and `log_file` JSON lines. This only maps to
66
+ OpenCode's display/output flag `--thinking`; it does not change model reasoning
67
+ effort. Use `variant` separately if you intentionally want a provider-specific
68
+ reasoning effort.
69
+
64
70
  ### Stream structured JSON events
65
71
 
66
72
  ```python
@@ -0,0 +1,9 @@
1
+ opencode_wrapper/__init__.py,sha256=iCkMcrh7P35jHFq8gH-GKjaKqwnvmOkGCLRfgnb0moE,1013
2
+ opencode_wrapper/client.py,sha256=bo9u0b_e01wFY5__foeYq6ZisXO-w9yvIjrmLSsOnnk,19581
3
+ opencode_wrapper/config.py,sha256=TGQ85vd06qQPbP02G6YG9re-rESpYHfhAJ8PaAUqHRg,8076
4
+ opencode_wrapper/errors.py,sha256=zaXzzFb6ObdrNlm-PJE_7tbgvMEhoZcbeQVWNHNTkUQ,1168
5
+ opencode_wrapper/events.py,sha256=PHz04DcB0K0JfIRxgV8GQ3psl7VjQXZ25gIrDCOgAHQ,6478
6
+ py_opencode_wrapper-0.2.2.dist-info/METADATA,sha256=S46WlmZi64ZfiAjcrjRC_LJs3_dQfBPSokXEWQT7AL8,7221
7
+ py_opencode_wrapper-0.2.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
8
+ py_opencode_wrapper-0.2.2.dist-info/top_level.txt,sha256=8LETj5bPgl1YnB83iOiueuQvGryj3RzaeEQecPVS9Q8,17
9
+ py_opencode_wrapper-0.2.2.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- opencode_wrapper/__init__.py,sha256=iCkMcrh7P35jHFq8gH-GKjaKqwnvmOkGCLRfgnb0moE,1013
2
- opencode_wrapper/client.py,sha256=Ny4pDBV6cToIOn2W7BgCFL1w12KdlVQVCInhddf_Df4,19546
3
- opencode_wrapper/config.py,sha256=JraBPkX95GXFoOvn181BRv_8YPvsUDXiZMN1hZWhSf0,7823
4
- opencode_wrapper/errors.py,sha256=zaXzzFb6ObdrNlm-PJE_7tbgvMEhoZcbeQVWNHNTkUQ,1168
5
- opencode_wrapper/events.py,sha256=PHz04DcB0K0JfIRxgV8GQ3psl7VjQXZ25gIrDCOgAHQ,6478
6
- py_opencode_wrapper-0.2.1.dist-info/METADATA,sha256=W56IyS4yoBlsSFIIrtsPx0-Ck6AoCCuhmdHiZslRgnE,6884
7
- py_opencode_wrapper-0.2.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
8
- py_opencode_wrapper-0.2.1.dist-info/top_level.txt,sha256=8LETj5bPgl1YnB83iOiueuQvGryj3RzaeEQecPVS9Q8,17
9
- py_opencode_wrapper-0.2.1.dist-info/RECORD,,