optio-opencode 0.1.0__tar.gz → 0.1.1__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.
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/PKG-INFO +1 -1
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/pyproject.toml +3 -1
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/session.py +13 -2
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/PKG-INFO +1 -1
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/README.md +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/setup.cfg +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/__init__.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/host_actions.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/prompt.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/snapshots.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode/types.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/SOURCES.txt +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/dependency_links.txt +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/requires.txt +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/top_level.txt +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_host_local.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_host_primitives_local.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_host_primitives_remote.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_host_remote_resume.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_host_resume.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_prompt.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_sanity.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_session_blob_hooks.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_session_hooks.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_session_local.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_session_remote.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_session_resume.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_smart_install.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_snapshots.py +0 -0
- {optio_opencode-0.1.0 → optio_opencode-0.1.1}/tests/test_types.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "optio-opencode"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
description = "Run opencode web as an optio task; local subprocess or remote via SSH."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -27,6 +27,8 @@ classifiers = [
|
|
|
27
27
|
]
|
|
28
28
|
dependencies = [
|
|
29
29
|
"optio-core>=0.1,<0.2",
|
|
30
|
+
# 0.1.1 introduces the bind_addr kwarg on Host.establish_tunnel —
|
|
31
|
+
# required for OPTIO_WIDGET_TUNNEL_BIND to work.
|
|
30
32
|
"optio-host>=0.1,<0.2",
|
|
31
33
|
"asyncssh>=2.14",
|
|
32
34
|
]
|
|
@@ -219,7 +219,18 @@ async def run_opencode_session(ctx: ProcessContext, config: OpencodeTaskConfig)
|
|
|
219
219
|
launched_handle = handle
|
|
220
220
|
|
|
221
221
|
# --- tunnel + widget registration --------------------------------
|
|
222
|
-
|
|
222
|
+
# By default the SSH tunnel listens on 127.0.0.1 — only the worker
|
|
223
|
+
# process (this engine) can reach it. For multi-container deploys
|
|
224
|
+
# where the API proxy lives in a different container than the
|
|
225
|
+
# engine but on the same Docker network, set
|
|
226
|
+
# OPTIO_WIDGET_TUNNEL_BIND=0.0.0.0 so sibling containers can
|
|
227
|
+
# connect to the engine's port, and OPTIO_WIDGET_TUNNEL_HOST to
|
|
228
|
+
# the Docker DNS name other containers resolve to reach this
|
|
229
|
+
# engine (e.g. the compose service name). Both default to
|
|
230
|
+
# 127.0.0.1 so single-host deploys are unchanged.
|
|
231
|
+
bind_addr = os.environ.get("OPTIO_WIDGET_TUNNEL_BIND", "127.0.0.1")
|
|
232
|
+
upstream_host = os.environ.get("OPTIO_WIDGET_TUNNEL_HOST", "127.0.0.1")
|
|
233
|
+
worker_port = await host.establish_tunnel(opencode_port, bind_addr=bind_addr)
|
|
223
234
|
|
|
224
235
|
if preserved_session_id is not None:
|
|
225
236
|
session_id = preserved_session_id
|
|
@@ -235,7 +246,7 @@ async def run_opencode_session(ctx: ProcessContext, config: OpencodeTaskConfig)
|
|
|
235
246
|
)
|
|
236
247
|
|
|
237
248
|
await ctx.set_widget_upstream(
|
|
238
|
-
f"http://
|
|
249
|
+
f"http://{upstream_host}:{worker_port}",
|
|
239
250
|
inner_auth=BasicAuth(username="opencode", password=password),
|
|
240
251
|
)
|
|
241
252
|
# Point the iframe directly at the pre-created session so viewers
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{optio_opencode-0.1.0 → optio_opencode-0.1.1}/src/optio_opencode.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|