@oneciel-ai/ciel-runtime 0.2.39 → 0.2.40

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.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ capability, followed by the complete commit ledger merged into each release.
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 0.2.40 — 2026-09-07
9
+
10
+ - Authenticate internal router health checks when the web backend uses a
11
+ specific LAN address. Preserve the external listener and authentication
12
+ requirements instead of reporting an authenticated running server as down.
13
+
8
14
  ## 0.2.39 — 2026-09-07
9
15
 
10
16
  - Fix native Codex startup failing with `invalid transport` when DuckDuckGo or
package/ciel_runtime.py CHANGED
@@ -3024,6 +3024,7 @@ def router_health() -> dict[str, Any] | None:
3024
3024
  try:
3025
3025
  data = http_json(
3026
3026
  f"{ROUTER_BASE}/health",
3027
+ headers=_ROUTER_ACCESS_POLICY.health_headers(ROUTER_BASE, load_config(), router_external_access_token),
3027
3028
  timeout=router_health_timeout_seconds(),
3028
3029
  )
3029
3030
  return data if isinstance(data, dict) else None
@@ -7,6 +7,7 @@ import json
7
7
  import os
8
8
  import secrets
9
9
  import time
10
+ import urllib.parse
10
11
  from collections.abc import Callable, Mapping, MutableMapping
11
12
  from dataclasses import dataclass
12
13
  from pathlib import Path
@@ -63,6 +64,18 @@ class RouterAccessPolicy:
63
64
  parse_env_bool: Callable[[str | None, bool | None], bool | None]
64
65
  load_config: Callable[[], dict[str, Any]]
65
66
 
67
+ def health_headers(
68
+ self, base: str, config: dict[str, Any], token_provider: Callable[[], str],
69
+ ) -> dict[str, str]:
70
+ # Specific LAN binds are also used as the internal client address;
71
+ # those requests must satisfy external authentication just like peers.
72
+ if is_loopback_address(urllib.parse.urlparse(base).hostname):
73
+ return {}
74
+ if not self.administrative_external_access_enabled(config):
75
+ return {}
76
+ token = token_provider()
77
+ return {"Authorization": f"Bearer {token}"} if token else {}
78
+
66
79
  def remote_bridge_enabled(self, config: Mapping[str, Any]) -> bool:
67
80
  override = str(
68
81
  self.environ.get("CIEL_RUNTIME_REMOTE_BRIDGE") or ""
@@ -97,7 +97,7 @@ OPENCODE_ENDPOINT_ALIASES = {
97
97
  }
98
98
 
99
99
  APP_NAME = "Ciel Runtime"
100
- VERSION = "0.2.39"
100
+ VERSION = "0.2.40"
101
101
  CREDITS = "Credits: One Ciel LLC"
102
102
  PRELAUNCH_CANCEL = 10
103
103
  PRELAUNCH_LAUNCH_CODEX = 11
@@ -0,0 +1,18 @@
1
+ title: Remote Windows clipboard paste exposes delimiter-like text
2
+ date: 2026-09-07
3
+ status: investigated; remote cause not established
4
+ observation: User screenshot shows [20~ before a pasted URL and [201~ after it.
5
+ interpretation: Consistent with exposed bracketed-paste delimiters; not evidence of mouse reporting.
6
+ reference: https://github.com/microsoft/terminal/issues/12385
7
+ protocol: Bracketed paste wraps text in ESC[200~ and ESC[201~.
8
+ source_checks:
9
+ parent_input: windows_conpty._read_input_bytes uses ReadConsoleW then UTF-8 encoding.
10
+ pump: _pump_input observes draft state then writes input bytes without textual marker replacement.
11
+ transport: write loops until all bytes have been written to ConPTY.
12
+ verification:
13
+ command: python -m unittest discover -s tests -p test_windows_conpty.py -v
14
+ result: 33 tests passed in 0.361s on local Windows.
15
+ coverage: Includes real ConPTY bracketed-paste/large Korean payload byte integrity and submission tests.
16
+ limitation: Does not reproduce the remote user's clipboard, outer terminal, or Codex TUI input path.
17
+ next_evidence: Remote machine access or exact terminal/runtime versions and relevant transport startup logs.
18
+ changes: No runtime code changes or deployment; do not strip literal marker-like text from user messages.
@@ -0,0 +1,12 @@
1
+ title: Router startup timeout after remote Windows web backend configuration
2
+ date: 2026-09-07
3
+ status: conditional configuration bug reproduced; remote root cause unconfirmed
4
+ evidence:
5
+ traceback: router_process_lifecycle.start_router_if_needed exhausted 30-second router_up polling.
6
+ remote_initial: http://10.0.0.238:9683/health returned 401 external authentication required.
7
+ remote_later: Connection timed out after 3015 milliseconds.
8
+ source: WebBackendSettings.client_host preserves specific LAN addresses; router_health sends no authentication; RouterAccessPolicy permits unauthenticated loopback only.
9
+ local_policy_reproduction: client_host=10.0.0.238; LAN health without token allowed=False; loopback health allowed=True.
10
+ limitations: No remote router.log or configured bind host available; startup process crash and bind errors remain possible.
11
+ changes: No runtime configuration or code modified.
12
+ required_evidence: Remote router.log or authenticated backend access after service recovery.
@@ -0,0 +1,19 @@
1
+ title: Authenticate LAN-bound managed router health checks
2
+ date: 2026-09-07
3
+ version: 0.2.40
4
+ authorization: User explicitly requested fix and new-version main deployment.
5
+ evidence:
6
+ remote_log: Listener and client base both use 10.0.0.238:9683.
7
+ observed_http: Earlier external health request returned 401.
8
+ source: router_health omitted authentication; non-loopback requests require authentication.
9
+ change:
10
+ health: Read existing administrative token for non-loopback health checks when administrative external access is enabled.
11
+ preserved: Bind address, port, global/workspace configuration, external authentication rules, active sessions.
12
+ secrets: No token generation or token logging in the health probe.
13
+ verification:
14
+ real_http: Isolated HTTP server with production access policy: missing token fails, correct token makes router_up true, wrong token fails.
15
+ limitations: Test socket is loopback with simulated LAN peer policy; remote user's final restart not yet verified.
16
+ targeted: 2 tests passed in 0.513s.
17
+ runtime: 280 tests passed with 16 skips.
18
+ static: ruff and py_compile passed.
19
+ deployment: main push triggers full-test npm latest publishing; registry and downloaded artifact checked after publishing.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneciel-ai/ciel-runtime",
3
- "version": "0.2.39",
3
+ "version": "0.2.40",
4
4
  "description": "Universal AI coding-agent runtime and model-routing layer for Claude, Codex, AGY, ZCode, and compatible runtimes.",
5
5
  "license": "MIT",
6
6
  "author": "One Ciel LLC",