tsugite-claude-code 0.26.0__tar.gz → 0.27.0__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.
@@ -183,7 +183,6 @@ benchmarks/
183
183
  docker-compose.test.yml
184
184
  #### TODO ^^^
185
185
 
186
- plugins/tsugite-daemon/frontend/node_modules/
187
186
  # Vite dep-optimizer cache. Normally under node_modules/.vite, but lands at the
188
187
  # cwd's `.vite/` when vite/vitest is run from the repo root, so ignore it anywhere.
189
188
  .vite/
@@ -197,3 +196,6 @@ plugins/tsugite-daemon/tsugite_daemon/web/
197
196
  # Per-job git worktrees provisioned by the daemon.
198
197
  .tsugite-jobs/
199
198
  /packaging/runtime/.cache/
199
+ # Corporate CA certs dropped in for docker build.
200
+ /docker/ca-certificates/*
201
+ !/docker/ca-certificates/.gitkeep
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: tsugite-claude-code
3
- Version: 0.26.0
3
+ Version: 0.27.0
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.26.0
7
+ Requires-Dist: tsugite-cli==0.27.0
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "tsugite-claude-code"
3
- version = "0.26.0"
3
+ version = "0.27.0"
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.26.0",
8
+ "tsugite-cli==0.27.0",
9
9
  ]
10
10
 
11
11
  [project.entry-points."tsugite.providers"]
@@ -3,6 +3,7 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import logging
6
+ import re
6
7
  from typing import Any, AsyncIterator
7
8
 
8
9
  from tsugite.exceptions import AgentExecutionError
@@ -12,6 +13,10 @@ from tsugite.providers.model_registry import register_aliases, register_models
12
13
 
13
14
  logger = logging.getLogger(__name__)
14
15
 
16
+ # Template blocks rendered into every task message. The CLI stores each task message in its
17
+ # transcript but never stores the system prompt.
18
+ _STABLE_BLOCKS = re.compile(r"<(environment|available_skills|guidelines)>.*?</\1>\s*", re.DOTALL)
19
+
15
20
  _CLAUDE_CODE_EFFORT_LEVELS = ["low", "medium", "high", "xhigh", "max"]
16
21
 
17
22
  # --- BEGIN GENERATED MODELS (claude_code) --- #
@@ -162,6 +167,11 @@ class ClaudeCodeProvider:
162
167
  if messages and messages[0].get("role") == "system":
163
168
  system_prompt = messages[0]["content"]
164
169
  messages = messages[1:]
170
+ task = messages[-1] if messages else None
171
+ if task and task.get("role") == "user" and isinstance(task["content"], str):
172
+ blocks = [m.group(0).strip() for m in _STABLE_BLOCKS.finditer(task["content"])]
173
+ system_prompt = "\n\n".join([system_prompt, *blocks])
174
+ messages = [*messages[:-1], {**task, "content": _STABLE_BLOCKS.sub("", task["content"])}]
165
175
 
166
176
  # Kept so the poisoned-resume fallback can restart fresh and
167
177
  # rebuild the first message with serialized history included.