tsugite-claude-code 0.25.2__tar.gz → 0.25.3__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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tsugite-claude-code
3
- Version: 0.25.2
3
+ Version: 0.25.3
4
4
  Summary: Tsugite plugin: Claude Code provider (routes LLM calls through the claude CLI)
5
5
  Author: Justyn Shull
6
6
  Requires-Python: >=3.11
7
- Requires-Dist: tsugite-cli==0.25.2
7
+ Requires-Dist: tsugite-cli==0.25.3
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "tsugite-claude-code"
3
- version = "0.25.2"
3
+ version = "0.25.3"
4
4
  description = "Tsugite plugin: Claude Code provider (routes LLM calls through the claude CLI)"
5
5
  authors = [{ name = "Justyn Shull" }]
6
6
  requires-python = ">=3.11"
7
7
  dependencies = [
8
- "tsugite-cli==0.25.2",
8
+ "tsugite-cli==0.25.3",
9
9
  ]
10
10
 
11
11
  [project.entry-points."tsugite.providers"]
@@ -11,7 +11,6 @@ import json
11
11
  import logging
12
12
  import os
13
13
  import re
14
- import shutil
15
14
  import tempfile
16
15
  import time
17
16
  import uuid
@@ -19,6 +18,7 @@ from collections.abc import AsyncIterator
19
18
  from pathlib import Path
20
19
 
21
20
  from tsugite.cli.helpers import get_workspace_dir
21
+ from tsugite.providers.base import configured_binary, resolve_binary
22
22
  from tsugite_claude_code.usage import record_rate_limit
23
23
 
24
24
  logger = logging.getLogger(__name__)
@@ -170,8 +170,13 @@ class ClaudeCodeProcess:
170
170
  Raises:
171
171
  RuntimeError: If claude CLI is not found or fails to start
172
172
  """
173
- if not shutil.which("claude"):
174
- raise RuntimeError("Claude Code CLI not found. Install it with: npm install -g @anthropic-ai/claude-code")
173
+ binary = resolve_binary("claude_code", "claude")
174
+ if not binary:
175
+ looked = configured_binary("claude_code") or f"claude on PATH: {os.environ.get('PATH', '')}"
176
+ raise RuntimeError(
177
+ f"Claude Code CLI not found ({looked}). Install it with `npm install -g @anthropic-ai/claude-code` "
178
+ "or set plugins.claude_code.binary in config.json (Settings > Providers in the web UI)."
179
+ )
175
180
 
176
181
  # Write system prompt to temp file
177
182
  fd, self._system_prompt_file = tempfile.mkstemp(suffix=".txt", prefix="tsugite_sysprompt_")
@@ -179,7 +184,7 @@ class ClaudeCodeProcess:
179
184
  f.write(system_prompt)
180
185
 
181
186
  cmd = [
182
- "claude",
187
+ binary,
183
188
  "--print",
184
189
  "--input-format",
185
190
  "stream-json",
@@ -97,6 +97,7 @@ class ClaudeCodeProvider:
97
97
 
98
98
  cacheable = False
99
99
  models_are_definitive = True # CLI exposes a fixed model set; unlisted ids are typos
100
+ binary = "claude"
100
101
 
101
102
  def __init__(self, name: str = "claude_code"):
102
103
  self.name = name