@oneciel-ai/claude-any 0.1.73 → 0.1.75
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/README.md +1 -1
- package/claude_any.py +40 -8
- package/docs/manual.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/claude_any.py
CHANGED
|
@@ -102,7 +102,7 @@ OFFICIAL_CHANNEL_PLUGINS = {
|
|
|
102
102
|
"fakechat": "plugin:fakechat@claude-plugins-official",
|
|
103
103
|
}
|
|
104
104
|
APP_NAME = "Claude Any"
|
|
105
|
-
VERSION = "0.1.
|
|
105
|
+
VERSION = "0.1.75"
|
|
106
106
|
CREDITS = "Credits: One Ciel LLC"
|
|
107
107
|
|
|
108
108
|
LOG_LEVELS = {"SILENT": 0, "ERROR": 1, "WARN": 2, "INFO": 3, "DEBUG": 4, "TRACE": 5}
|
|
@@ -12906,13 +12906,42 @@ def has_passthrough_option(passthrough: list[str], *names: str) -> bool:
|
|
|
12906
12906
|
return any(arg in names or any(arg.startswith(name + "=") for name in names) for arg in passthrough)
|
|
12907
12907
|
|
|
12908
12908
|
|
|
12909
|
+
def normalize_channel_passthrough(passthrough: list[str]) -> list[str]:
|
|
12910
|
+
normalized: list[str] = []
|
|
12911
|
+
i = 0
|
|
12912
|
+
while i < len(passthrough):
|
|
12913
|
+
arg = passthrough[i]
|
|
12914
|
+
if arg == "--channels":
|
|
12915
|
+
normalized.append("--dangerously-load-development-channels")
|
|
12916
|
+
i += 1
|
|
12917
|
+
while i < len(passthrough) and is_channel_spec_tagged(passthrough[i]):
|
|
12918
|
+
normalized.append(passthrough[i])
|
|
12919
|
+
i += 1
|
|
12920
|
+
continue
|
|
12921
|
+
if arg.startswith("--channels="):
|
|
12922
|
+
value = arg.split("=", 1)[1].strip()
|
|
12923
|
+
if value:
|
|
12924
|
+
normalized.extend(["--dangerously-load-development-channels", value])
|
|
12925
|
+
else:
|
|
12926
|
+
normalized.append("--dangerously-load-development-channels")
|
|
12927
|
+
i += 1
|
|
12928
|
+
continue
|
|
12929
|
+
normalized.append(arg)
|
|
12930
|
+
i += 1
|
|
12931
|
+
return normalized
|
|
12932
|
+
|
|
12933
|
+
|
|
12909
12934
|
def claude_channel_args(cfg: dict[str, Any], passthrough: list[str]) -> list[str]:
|
|
12910
12935
|
channels = [spec for spec in channel_specs(cfg) if is_channel_spec_tagged(spec)]
|
|
12911
12936
|
if not channels or has_passthrough_option(passthrough, "--channels", "--dangerously-load-development-channels"):
|
|
12912
12937
|
return []
|
|
12913
|
-
|
|
12914
|
-
|
|
12915
|
-
|
|
12938
|
+
return ["--dangerously-load-development-channels", *channels]
|
|
12939
|
+
|
|
12940
|
+
|
|
12941
|
+
def claude_channels_requested(cfg: dict[str, Any], passthrough: list[str]) -> bool:
|
|
12942
|
+
if has_passthrough_option(passthrough, "--channels", "--dangerously-load-development-channels"):
|
|
12943
|
+
return True
|
|
12944
|
+
return any(is_channel_spec_tagged(spec) for spec in channel_specs(cfg))
|
|
12916
12945
|
|
|
12917
12946
|
|
|
12918
12947
|
def write_web_tools_mcp_config(cfg: dict[str, Any]) -> Path:
|
|
@@ -13094,7 +13123,7 @@ def run_claude_any_update_check(enabled: bool = True) -> bool:
|
|
|
13094
13123
|
return False
|
|
13095
13124
|
try:
|
|
13096
13125
|
update = subprocess.run(
|
|
13097
|
-
[npm, "
|
|
13126
|
+
[npm, "install", "-g", "@oneciel-ai/claude-any@latest"],
|
|
13098
13127
|
text=True,
|
|
13099
13128
|
stdout=subprocess.PIPE,
|
|
13100
13129
|
stderr=subprocess.STDOUT,
|
|
@@ -13221,6 +13250,9 @@ def launch_claude(
|
|
|
13221
13250
|
env = os.environ.copy()
|
|
13222
13251
|
env["PATH"] = str(HOME / ".local" / "bin") + os.pathsep + env.get("PATH", "")
|
|
13223
13252
|
launch_env = env_vars(cfg)
|
|
13253
|
+
launch_passthrough = normalize_channel_passthrough(passthrough)
|
|
13254
|
+
if claude_channels_requested(cfg, launch_passthrough):
|
|
13255
|
+
launch_env.pop("CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS", None)
|
|
13224
13256
|
if use_native_anthropic:
|
|
13225
13257
|
for key in (
|
|
13226
13258
|
"ANTHROPIC_BASE_URL",
|
|
@@ -13252,9 +13284,9 @@ def launch_claude(
|
|
|
13252
13284
|
extra_args: list[str] = []
|
|
13253
13285
|
if should_attach_web_search(provider, cfg, web_search_override):
|
|
13254
13286
|
extra_args.extend(["--mcp-config", str(write_duckduckgo_mcp_config(cfg))])
|
|
13255
|
-
if should_append_compat_prompt(provider, cfg) and not has_passthrough_option(
|
|
13287
|
+
if should_append_compat_prompt(provider, cfg) and not has_passthrough_option(launch_passthrough, "--system-prompt"):
|
|
13256
13288
|
extra_args.extend(["--append-system-prompt", NON_ANTHROPIC_COMPAT_PROMPT])
|
|
13257
|
-
extra_args.extend(claude_channel_args(cfg,
|
|
13289
|
+
extra_args.extend(claude_channel_args(cfg, launch_passthrough))
|
|
13258
13290
|
cmd = [
|
|
13259
13291
|
claude,
|
|
13260
13292
|
"--dangerously-skip-permissions",
|
|
@@ -13263,7 +13295,7 @@ def launch_claude(
|
|
|
13263
13295
|
if model:
|
|
13264
13296
|
cmd.extend(["--model", model])
|
|
13265
13297
|
cmd.extend(extra_args)
|
|
13266
|
-
cmd.extend(
|
|
13298
|
+
cmd.extend(launch_passthrough)
|
|
13267
13299
|
return subprocess.call(cmd, env=env)
|
|
13268
13300
|
|
|
13269
13301
|
|
package/docs/manual.md
CHANGED
package/package.json
CHANGED