@oneciel-ai/claude-any 0.1.93 → 0.1.95

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 (2) hide show
  1. package/claude_any.py +30 -9
  2. package/package.json +1 -1
package/claude_any.py CHANGED
@@ -105,7 +105,7 @@ OFFICIAL_CHANNEL_PLUGINS = {
105
105
  "fakechat": "plugin:fakechat@claude-plugins-official",
106
106
  }
107
107
  APP_NAME = "Claude Any"
108
- VERSION = "0.1.93"
108
+ VERSION = "0.1.95"
109
109
  CREDITS = "Credits: One Ciel LLC"
110
110
 
111
111
  LOG_LEVELS = {"SILENT": 0, "ERROR": 1, "WARN": 2, "INFO": 3, "DEBUG": 4, "TRACE": 5}
@@ -1272,7 +1272,7 @@ DEFAULT_CONFIG: dict[str, Any] = {
1272
1272
  "compat_prompt_for_non_anthropic": True,
1273
1273
  "channels": [],
1274
1274
  "development_channels": False,
1275
- "channel_delivery": "stdin",
1275
+ "channel_delivery": "native",
1276
1276
  },
1277
1277
  "cleanup": {
1278
1278
  "managed_services_on_launch": True,
@@ -1464,6 +1464,16 @@ def apply_config_migrations(cfg: dict[str, Any]) -> None:
1464
1464
  pcfg["stream_enabled"] = True
1465
1465
  migrations[marker] = True
1466
1466
 
1467
+ marker = "default_channel_delivery_native_20260520"
1468
+ if not migrations.get(marker):
1469
+ ccfg = cfg.setdefault("claude_code", {})
1470
+ if not isinstance(ccfg, dict):
1471
+ ccfg = {}
1472
+ cfg["claude_code"] = ccfg
1473
+ if normalize_channel_delivery(ccfg.get("channel_delivery")) == "stdin":
1474
+ ccfg["channel_delivery"] = "native"
1475
+ migrations[marker] = True
1476
+
1467
1477
 
1468
1478
  _config_cache: dict[str, Any] | None = None
1469
1479
  _config_cache_mtime: float = 0.0
@@ -9687,9 +9697,11 @@ def normalize_channel_delivery(value: Any) -> str:
9687
9697
  text = str(value or "").strip().lower().replace("_", "-")
9688
9698
  if text in {"native", "native-channel", "native-channel-bridge", "claude-channel", "claude/native"}:
9689
9699
  return "native"
9690
- if text in {"stdin", "pty", "terminal", "wake", "wake-proxy", "legacy", "auto", ""}:
9700
+ if text in {"stdin", "pty", "terminal", "wake", "wake-proxy", "legacy"}:
9691
9701
  return "stdin"
9692
- return "stdin"
9702
+ if text in {"auto", ""}:
9703
+ return "native"
9704
+ return "native"
9693
9705
 
9694
9706
 
9695
9707
  def channel_delivery_mode(cfg: dict[str, Any] | None = None) -> str:
@@ -9697,7 +9709,7 @@ def channel_delivery_mode(cfg: dict[str, Any] | None = None) -> str:
9697
9709
  if env_value is not None:
9698
9710
  return normalize_channel_delivery(env_value)
9699
9711
  cfg = cfg or load_config()
9700
- return normalize_channel_delivery(cfg.setdefault("claude_code", {}).get("channel_delivery", "stdin"))
9712
+ return normalize_channel_delivery(cfg.setdefault("claude_code", {}).get("channel_delivery", "native"))
9701
9713
 
9702
9714
 
9703
9715
  def set_channel_delivery_config(value: Any) -> list[str]:
@@ -13120,11 +13132,11 @@ def channel_panel_rows(cfg: dict[str, Any]) -> tuple[list[str], list[str]]:
13120
13132
  def channel_delivery_panel_rows(cfg: dict[str, Any]) -> tuple[list[str], list[str]]:
13121
13133
  current = channel_delivery_mode(cfg)
13122
13134
  rows = [
13123
- f"{'*' if current == 'stdin' else ' '} stdin PTY wake proxy; works broadly, uses terminal input",
13124
13135
  f"{'*' if current == 'native' else ' '} native Claude Code claude/channel queue bridge",
13136
+ f"{'*' if current == 'stdin' else ' '} stdin PTY wake proxy; works broadly, uses terminal input",
13125
13137
  "Back",
13126
13138
  ]
13127
- return rows, ["stdin", "native", "back"]
13139
+ return rows, ["native", "stdin", "back"]
13128
13140
 
13129
13141
 
13130
13142
  def api_key_panel_rows(provider: str) -> tuple[list[str], list[str]]:
@@ -14178,6 +14190,15 @@ def _channel_enter_bytes_from_user_input(data: bytes) -> bytes | None:
14178
14190
  return b"\r\n" if last_cr + 1 < len(data) and data[last_cr + 1 : last_cr + 2] == b"\n" else b"\r"
14179
14191
 
14180
14192
 
14193
+ def _channel_synthetic_enter_bytes_from_user_input(data: bytes) -> bytes | None:
14194
+ observed = _channel_enter_bytes_from_user_input(data)
14195
+ if observed == b"\r":
14196
+ # Bare CR is common from raw POSIX terminals, but synthetic CR-only
14197
+ # writes can sit in Claude Code's line editor on some PTY stacks.
14198
+ return b"\r\n"
14199
+ return observed
14200
+
14201
+
14181
14202
  def _channel_enter_label(enter_bytes: bytes) -> str:
14182
14203
  if enter_bytes == b"\r":
14183
14204
  return "cr"
@@ -14258,8 +14279,8 @@ def subprocess_call_with_channel_wake_proxy(cmd: list[str], env: dict[str, str])
14258
14279
  if stdin_fd in readable:
14259
14280
  data = os.read(stdin_fd, 4096)
14260
14281
  if data:
14261
- observed_enter = _channel_enter_bytes_from_user_input(data)
14262
- if observed_enter:
14282
+ observed_enter = _channel_synthetic_enter_bytes_from_user_input(data)
14283
+ if observed_enter and not os.environ.get("CLAUDE_ANY_CHANNEL_WAKE_ENTER"):
14263
14284
  channel_enter_bytes = observed_enter
14264
14285
  _write_fd_all(master_fd, data)
14265
14286
  if master_fd in readable:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oneciel-ai/claude-any",
3
- "version": "0.1.93",
3
+ "version": "0.1.95",
4
4
  "description": "Claude Code provider selector for Anthropic, Ollama, Ollama Cloud, vLLM, NVIDIA hosted, and self-hosted NIM.",
5
5
  "license": "MIT",
6
6
  "author": "One Ciel LLC",