optio-opencode 0.6.2__py3-none-any.whl → 0.6.4__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.
optio_opencode/session.py CHANGED
@@ -68,7 +68,9 @@ READY_TIMEOUT_S = 30.0
68
68
 
69
69
  # Fresh-launch kickoff prompt POSTed to the pre-created opencode session so the
70
70
  # agent starts the task unattended. Suppressed on resume.
71
- AUTO_START_PROMPT = "Read AGENTS.md and execute the task it describes"
71
+ # A harness message (System: prefix), like the resume notice: the agent is
72
+ # not handed a turn that reads as the human typing.
73
+ AUTO_START_PROMPT = f"{SYSTEM_MESSAGE_PREFIX}Read AGENTS.md and execute the task it describes"
72
74
 
73
75
 
74
76
  def _build_host(config: OpencodeTaskConfig, process_id: str) -> Host:
@@ -174,6 +176,11 @@ def conversation_widget_data(config: "OpencodeTaskConfig", *, session_id: str, d
174
176
  "toolVerbosity": config.tool_verbosity,
175
177
  "thinkingVerbosity": config.thinking_verbosity,
176
178
  "showSessionControls": config.show_session_controls,
179
+ # The session_controls allowlist (None: every control). opencode's
180
+ # control snapshots are built client-side (OpencodeView, from the live
181
+ # provider catalog) and its model/effort changes are UI-local (no
182
+ # /control endpoint), so the view narrows its snapshots with this.
183
+ "sessionControls": config.session_controls,
177
184
  "nativeSpinner": config.native_spinner,
178
185
  "defaultModel": config.model,
179
186
  # Initial effort ("thought level") the widget seeds its effort slider
optio_opencode/types.py CHANGED
@@ -18,7 +18,11 @@ from optio_agents import (
18
18
  TOOL_VERBOSITIES,
19
19
  ToolVerbosity,
20
20
  )
21
- from optio_agents.config_types import BlobCryptoConfigMixin, ClaustrumConfigMixin
21
+ from optio_agents.config_types import (
22
+ BlobCryptoConfigMixin,
23
+ ClaustrumConfigMixin,
24
+ SessionControlsConfigMixin,
25
+ )
22
26
  from optio_agents.protocol.session import (
23
27
  CallerMessageCallback,
24
28
  DeliverableCallback,
@@ -73,7 +77,7 @@ def _identity_resume_refresh(config: "OpencodeTaskConfig") -> "OpencodeTaskConfi
73
77
 
74
78
 
75
79
  @dataclass(frozen=True, kw_only=True)
76
- class OpencodeTaskConfig(ClaustrumConfigMixin, BlobCryptoConfigMixin):
80
+ class OpencodeTaskConfig(ClaustrumConfigMixin, BlobCryptoConfigMixin, SessionControlsConfigMixin):
77
81
  """Configuration for one optio-opencode task instance.
78
82
 
79
83
  Inherits the claustrum filesystem-isolation triad (``fs_isolation`` /
@@ -186,9 +190,10 @@ class OpencodeTaskConfig(ClaustrumConfigMixin, BlobCryptoConfigMixin):
186
190
  # effort control only appears for a variant-capable model (re-derived on
187
191
  # model change). None leaves opencode's per-model default in place.
188
192
  reasoning_effort: "OpencodeReasoningEffort | None" = None
189
- # Show the model picker in the conversation widget. Requires
190
- # conversation_ui=True.
191
- show_session_controls: bool = False
193
+ # show_session_controls / session_controls come from
194
+ # SessionControlsConfigMixin. opencode's controls: "model" (default
195
+ # config.model) and "reasoning_effort" (variant-capable models only).
196
+ # The bar requires conversation_ui=True.
192
197
  # Replace the generic working-spinner with opencode's on-brand native
193
198
  # spinner in the conversation widget. Requires mode='conversation' and
194
199
  # conversation_ui=True.
@@ -237,6 +242,7 @@ class OpencodeTaskConfig(ClaustrumConfigMixin, BlobCryptoConfigMixin):
237
242
  # fails fast before the opencode-specific checks below.
238
243
  self._validate_claustrum()
239
244
  self._validate_blob_crypto()
245
+ self._validate_session_controls()
240
246
  if self.mode not in ("iframe", "conversation"):
241
247
  raise ValueError(
242
248
  f"OpencodeTaskConfig.mode={self.mode!r} is not one of "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: optio-opencode
3
- Version: 0.6.2
3
+ Version: 0.6.4
4
4
  Summary: Run opencode web as an optio task; local subprocess or remote via SSH.
5
5
  Author-email: Kristof Csillag <kristof.csillag@deai-labs.com>
6
6
  License-Expression: Apache-2.0
@@ -20,7 +20,7 @@ Classifier: Topic :: Software Development :: Code Generators
20
20
  Classifier: Framework :: AsyncIO
21
21
  Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
- Requires-Dist: optio-core<0.5,>=0.4
23
+ Requires-Dist: optio-core<0.6,>=0.5
24
24
  Requires-Dist: optio-host<0.4,>=0.3
25
25
  Requires-Dist: optio-agents<0.7,>=0.6
26
26
  Requires-Dist: optio-claudecode<0.7,>=0.6
@@ -8,17 +8,17 @@ optio_opencode/info.py,sha256=hleGY-lczZaqVW5-jyG8kOwtwMQ-GM_zpZFldP0wLR8,135
8
8
  optio_opencode/model_probe.py,sha256=W5E8zDGkjqBKGd6u0FCD66RFLDYzNjQhWMU2fjF-ATk,5919
9
9
  optio_opencode/prompt.py,sha256=g6dmsurmvY8KlZRJdPBX9FkGddSFfDF2X76QFWEFWj0,1776
10
10
  optio_opencode/seed_manifest.py,sha256=Md9-Vgidt4HTe1IGnKJnszBXcVIMwCN201L29qlljB0,2682
11
- optio_opencode/session.py,sha256=1ay2h7p0Ij6gQGfKqMg_374tFQFMHWGwd9nxG7MIOnI,69466
11
+ optio_opencode/session.py,sha256=WQS7wsY5Notwrdmc8LDRzSaRhzglKKKSfx99ON3qws4,69972
12
12
  optio_opencode/snapshots.py,sha256=wKX4OpCMYe-M9-LNZYVBxlaDtw9s15eZhR3c2mxreXw,3285
13
13
  optio_opencode/todos.py,sha256=gT3AVvQAQ657TGwExvNGovVkvnp9cZR_jetRzNzoaTk,925
14
- optio_opencode/types.py,sha256=OZoPvlnRwg4Rm6TiRj_WHgpvsSL2N69jTBM-H-zXlaU,14995
14
+ optio_opencode/types.py,sha256=9qRzdwYmNeLuCnxh0xCq1aUrk73s9rzeuLnOzzjvk3U,15225
15
15
  optio_opencode/verify.py,sha256=3Vuu8QikjD-rn28--qbDyv2z_bzPZgQwDKas8K3QXto,8407
16
16
  optio_opencode/providers/__init__.py,sha256=NmwUavBusGqdHBaGCMdto8vfwFnqIGwIMUPYj7-yk-4,628
17
17
  optio_opencode/providers/anthropic.py,sha256=ApOiplXX0SPre-H69_sIBcKjmHqjUooztOxHlqcLJ_s,1224
18
18
  optio_opencode/providers/deepseek.py,sha256=1ym770j9wOdErExfuxAapGv1IWNNwU5I1bu1diz4-0k,3248
19
19
  optio_opencode/providers/openai.py,sha256=RBKlK_U71TcjbsO16GAMhPjLBVfGsvZip5Ty2488zzs,1230
20
20
  optio_opencode/providers/xai.py,sha256=r0Bb7q9tAKdKn4l55KacB6GKDbbZIa74beGJlYHkVxQ,3957
21
- optio_opencode-0.6.2.dist-info/METADATA,sha256=xhcp6AcPcMlFKXvnqLiUugm63pfYlYx5covDtWasxBc,4318
22
- optio_opencode-0.6.2.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
23
- optio_opencode-0.6.2.dist-info/top_level.txt,sha256=1jAPllx4JDiN8gzJtbS206_8fTFSwitP9dv1WkxyiYM,15
24
- optio_opencode-0.6.2.dist-info/RECORD,,
21
+ optio_opencode-0.6.4.dist-info/METADATA,sha256=PnCapW-nFLupebcIczbgaTuKEP2UA09x6B0C4LXiQmE,4318
22
+ optio_opencode-0.6.4.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
23
+ optio_opencode-0.6.4.dist-info/top_level.txt,sha256=1jAPllx4JDiN8gzJtbS206_8fTFSwitP9dv1WkxyiYM,15
24
+ optio_opencode-0.6.4.dist-info/RECORD,,