Commit graph

130 commits

Author SHA1 Message Date
Bryan Helmkamp
d47c8e9048 Redact secrets from pipeline event output (NDJSON, live.json, SSE)
Apply redact::redact_jsonl_line at all three serialization sites so
secrets (AWS keys, GitHub PATs, private keys, etc.) are scrubbed
before reaching disk or the network.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e23c92750cd9
2026-02-25 16:02:06 -05:00
Bryan Helmkamp
5067a59f7b Add per-node visit counter to prevent infinite loops in dry-run mode
Cyclic graphs (e.g. consensus_task.dot, semport.dot) loop infinitely
under --dry-run because the mock backend always returns outcome=success,
which never matches conditional edges. Add a configurable max_node_visits
limit (graph attr, default 0=disabled) that defaults to 10 in dry-run
mode, terminating execution when any node is visited more than the limit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 633b59435252
2026-02-25 15:58:01 -05:00
Bryan Helmkamp
90e7bf229a Add redact crate for secret detection and redaction in NDJSON logs
Two-layer detection: Shannon entropy on high-entropy alphanumeric tokens
(threshold 4.5) and gitleaks v8.22.1 pattern matching (202 rules) with
Aho-Corasick keyword pre-filtering. JSONL-aware redaction skips exempt
fields (IDs, paths) and image objects. 43 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9e8476d16412
2026-02-25 15:25:52 -05:00
Bryan Helmkamp
1388f6539a Replace 10 duplicate PipelineEvent variants with Agent wrapper
AgentEvent variants were duplicated in PipelineEvent with `stage: String`
added, requiring a 130-line mechanical bridge to translate between them.
Collapse into a single `PipelineEvent::Agent { stage, event }` variant.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9e9f00828e4b
2026-02-25 15:23:01 -05:00
Bryan Helmkamp
20c972ef96 Resolve model catalog aliases in pipeline runner
The run and serve commands now resolve model aliases (e.g. "claude-haiku"
→ "claude-haiku-4-5-20251001") through the catalog before passing to the
backend, matching the behavior of the ullm CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 2b1f7b77b1ab
2026-02-25 15:22:17 -05:00
Bryan Helmkamp
655e207b8e Add 4 missing pipeline events for observability parity
- LlmRetry: wrap agent session stream() with llm::retry, emit
  AgentEvent::LlmRetry and forward to PipelineEvent::LlmRetry
- failure_class on StageFailed/StageCompleted: "transient" for
  retry-eligible failures, "terminal" for final failures, None for success
- ParallelEarlyTermination: emit on fail_fast break with reason,
  completed_count, and pending_count
- SubgraphStarted/SubgraphCompleted: boundary events with timing and
  step count for sub-pipeline execution

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 82c1bbcbe2f2
2026-02-25 15:06:25 -05:00
Bryan Helmkamp
163a26eb2e gitignore
Entire-Checkpoint: d16f3e756e79
2026-02-25 14:26:17 -05:00
Bryan Helmkamp
4239e3892d Support empty attribute blocks [] in DOT parser
The parser used separated_list1 for attr_block which required at least
one attribute inside brackets. DOT files from kilroy use empty brackets
(e.g., `consolidate_dod []`) which caused parse failures. Changed to
separated_list0 to accept empty attribute blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: bccbc8222bde
2026-02-25 14:23:59 -05:00
Bryan Helmkamp
52842e21a7 Add Claude Haiku 4.5 to model catalog
Makes Haiku discoverable via list_models and get_model_info with
aliases "haiku" and "claude-haiku".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: ed7df801c2a4
2026-02-25 14:21:58 -05:00
Bryan Helmkamp
66a918be2b Switch skills to directory-per-skill format (skills/<name>/SKILL.md)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: e662e3a9f2b5
2026-02-25 13:42:53 -05:00
Bryan Helmkamp
e415e18801 Add attempt tracking, EdgeSelected, and LoopRestart to pipeline events
Emit missing progress NDJSON data identified in gap analysis:
- Add attempt/max_attempts fields to StageStarted, StageCompleted, StageRetrying
- Add EdgeSelected event emitted after edge selection with label/condition
- Add LoopRestart event emitted before recursive loop-restart execution
- Simplify backend.rs usage aggregation to use Usage::Add impl

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: f47850c1422d
2026-02-25 13:12:14 -05:00
Bryan Helmkamp
778bf45a0b Add cache tokens, reasoning tokens, and file change tracking to pipeline logs
Embed the full Usage struct (with cache_read_tokens, cache_write_tokens,
reasoning_tokens) in AssistantMessage events instead of bare input/output
token fields. Add skip_serializing_if annotations to keep NDJSON clean.
Extend StageUsage with cache/reasoning aggregation. Track files touched
via write_file/edit_file tool call correlation in the backend bridge.
Update format functions, cost accumulator, and TypeScript types.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2c15cd247556
2026-02-25 13:01:45 -05:00
Bryan Helmkamp
0b37b8f681 Emit AgentEvent::SkillExpanded when a skill is activated
Adds observability for skill expansion so CLI users and pipeline event
consumers know when a skill reference was matched and expanded.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d94221388541
2026-02-25 11:42:40 -05:00
Bryan Helmkamp
a00f7fd60e Add missing data fields to PipelineEvent variants
Thread existing data through to pipeline events to match kilroy's
progress.ndjson schema: handler_type on StageStarted, failure_reason on
StageFailed/StageCompleted, notes on StageCompleted, join_policy and
error_policy on ParallelStarted, status (replacing success bool) on
ParallelBranchCompleted, and question_type on InterviewStarted. Adds
Display impls for QuestionType, JoinPolicy, and ErrorPolicy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2d4a98c3b5f0
2026-02-25 11:40:19 -05:00
Bryan Helmkamp
3d39e06c29 Add skills system for reusable prompt templates
Skills are markdown files with YAML frontmatter that define reusable
prompt templates (e.g., /commit, /review-pr). When a user references
/skill-name in their input, the skill template expands in place with
{{user_input}} receiving the remaining text.

- Add skills.rs with parse, expand, discover, and formatting functions
- Discover skills from ~/.attractor/skills/, <git-root>/.attractor/skills/,
  and <git-root>/skills/ (overridable with --skills-dir CLI flag)
- Inject available skills into system prompt between project docs and
  user instructions
- Expand skill references in session input before recording user turn

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2a8ed77f26c5
2026-02-25 11:32:07 -05:00
Bryan Helmkamp
1ec822781c Rewrite compaction summarization prompt for better continuity
Use structured handoff-style prompt with explicit sections (Task & Goal,
Completed Work, Current State, Failed Approaches, Open Issues, Next Steps)
instead of generic summarizer prompt, improving context preservation across
compaction boundaries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 2a12087def60
2026-02-25 10:26:21 -05:00
Bryan Helmkamp
139f653d33 Add read-before-write guardrail for ExecutionEnvironment
Decorator that tracks which files the agent has read (via read_file or
grep) and returns an error when writing to an existing file that hasn't
been read first. Prevents the model from hallucinating file contents and
blindly overwriting working code. New files are always allowed.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: a565c5a5e2f9
2026-02-25 10:24:58 -05:00
Bryan Helmkamp
8e4b8a6e05 Add git-storage crate for storing data in git object database
Layered library for blob/tree/commit/ref operations without touching
the working directory. Four modules: gitobj (primitives), branchstore
(key-value on a branch), snapshot (working dir captures), trailerlink
(commit message trailers). 56 tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 1e40b3267885
2026-02-24 23:17:44 -05:00
Bryan Helmkamp
5420c21042 Add auto-compaction to prevent context window overflow in long agent sessions
When context usage exceeds the configurable threshold (default 80%), older
turns are summarized via a non-streaming LLM call and replaced with a single
System turn. Compaction is non-fatal — errors are emitted as AgentEvent::Error
and the session continues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 18435f31db91
2026-02-24 23:09:38 -05:00
Bryan Helmkamp
b74d837b95 Add ullm models sync command to download OpenRouter model metadata
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 6908e4dfbe5e
2026-02-24 14:18:43 -05:00
Bryan Helmkamp
52d3536a1d Add LLM conversation events to PipelineEvent for progress.ndjson observability
Restructures agent events from misaligned EventKind+EventData pair into flat
AgentEvent enum, enriches AssistantMessage with model/token/tool_call data,
adds 8 new PipelineEvent variants (Prompt, AssistantMessage, ToolCallStarted,
ToolCallCompleted, SessionError, ContextWindowWarning, LoopDetected,
TurnLimitReached), and forwards agent session events to the pipeline emitter
in AgentBackend so they appear in progress.ndjson.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: d59f9e69008a
2026-02-24 14:08:22 -05:00
Bryan Helmkamp
0431fdb242 Revert "Replace text-scanning with report_outcome tool for routing"
This reverts commit f166bb4959.
2026-02-24 12:10:39 -05:00
Bryan Helmkamp
c9b7bee2da Change default logs directory to ~/.attractor/logs
Logs from `attractor run` were cluttering project directories. Now defaults
to ~/.attractor/logs/attractor-run-TIMESTAMP instead of ./attractor-run-TIMESTAMP.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:58:20 -05:00
Bryan Helmkamp
3d8e17aedf Write progress.ndjson and live.json to logs dir during pipeline runs
Every PipelineEvent is now logged as a JSON envelope with timestamp,
run_id, and event fields — matching the Kilroy reference implementation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:50:19 -05:00
Bryan Helmkamp
fa828dd8b1 Increase connect timeout to 30s, disable request/stream_read timeouts
LLM API calls should not have HTTP-level request or stream-read timeouts.
These are better controlled at the application level via TimeoutConfig
(total/per_step). The connect timeout is increased from 10s to 30s since
network conditions vary.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:46:50 -05:00
Bryan Helmkamp
9665fad133 Revert clippy config to defaults, remove all pedantic/nursery/cargo lint suppressions
Removed the workspace-level clippy lint config that enabled all, pedantic, nursery,
and cargo lint groups. Removed all #[allow(clippy::...)] annotations that were only
needed to suppress those extra lints, and fixed the few default clippy warnings that
were uncovered.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:42:28 -05:00
Bryan Helmkamp
f166bb4959 Replace text-scanning with report_outcome tool for routing
The previous approach scanned LLM response text for JSON containing
routing fields (extract_status_fields), which was fragile and violated
the spec's abstraction boundary. Replace with two clean mechanisms:

- Backend registers a report_outcome tool that the LLM calls to declare
  routing decisions (status, preferred_next_label, context_updates, etc.)
- Handler auto-generates a routing preamble listing available edge labels,
  appended to the prompt only when 2+ labeled unconditional edges exist

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:29:25 -05:00
Bryan Helmkamp
7222da1230 Store response.<node_id> in context after each LLM node
Downstream nodes in multi-model pipelines reference response.<node_id>
context keys in their prompts. The codergen handler was only storing
last_response (truncated) and last_stage, so these references resolved
to nothing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:12:29 -05:00
Bryan Helmkamp
28cdefec67 Add token usage and cost tracking to pipeline runs
Surface LLM token consumption and dollar cost at every verbosity level:
default mode appends per-stage tokens/cost, verbose modes include it in
event summary/detail, and the Pipeline Result section shows a total.
Cost is computed from the catalog pricing for Anthropic models; providers
without pricing (OpenAI, Gemini) show token counts only. Dry runs with
zero tokens omit the cost line entirely.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 22:01:17 -05:00
Bryan Helmkamp
46d4659633 Fix OpenAI error field, add Anthropic provider options pass-through, and improve parity tests
- Use `status: "incomplete"` instead of `is_error` for OpenAI tool results (fixes rejection)
- Add merge_provider_options to forward unknown anthropic provider options to API body
- Derive Clone on Client to enable subagent session factory
- Enable error_recovery scenario for all providers now that OpenAI is fixed
- Improve subagent_spawn test to actually exercise spawn/wait/read workflow
- Adjust multi-turn cache test temperature to 0.5

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 21:21:45 -05:00
Bryan Helmkamp
b4068b6364 Add missing integration tests for multi-turn caching, cross-provider parity, and attractor E2E
Test 1 (llm crate): Multi-turn cache verification runs 6 conversation turns
with a large system prompt (~5460 tokens) and verifies cache_read_tokens on
the final turn. Anthropic threshold 0.5, OpenAI/Gemini 0.0 (automatic
caching not guaranteed).

Test 2 (agent crate): Cross-provider parity matrix with 15 scenarios
(file CRUD, shell, grep/glob, editing, steering, reasoning effort, loop
detection, error recovery, etc.) across Anthropic, OpenAI, and Gemini.
41 total tests. Some scenarios excluded for OpenAI due to gpt-4o-mini
limitations (no reasoning.effort, is_error rejection, weak editing).

Test 3 (attractor crate): E2E pipeline with real LLM using AgentBackend,
AutoApproveInterviewer, and default_registry. Verifies pipeline success,
artifact files, goal gate outcomes, and checkpoint state.

All tests are #[ignore] and require API keys to run.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:24:34 -05:00
Bryan Helmkamp
aa9b05a552 Add timing output to default (non-verbose) pipeline runs
Show per-stage completion/failure timing and total pipeline duration
in the result block, even without -v flag. Uses a new
format_duration_human helper for human-readable durations (ms/s/m s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:16:12 -05:00
Bryan Helmkamp
2a2a610654 Replace abort_flag with CancellationToken for abort-aware process cancellation
Thread CancellationToken into tool executors and exec_command so that
running processes are killed (SIGTERM -> 2s -> SIGKILL) when abort fires,
rather than only checking the flag between LLM calls. Key changes:

- ToolExecutor type gains CancellationToken parameter
- ExecutionEnvironment::exec_command gains cancel_token param
- LocalExecutionEnvironment uses tokio::select! (completion vs timeout
  vs cancellation) with extracted sigterm_then_kill helper
- DockerExecutionEnvironment uses same select! pattern
- Session replaces Arc<AtomicBool> with CancellationToken, passes
  child_token() per tool call
- Shell tool forwards cancel token to exec_command
- CLI SIGINT handler calls cancel_token.cancel()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 18:10:10 -05:00
Bryan Helmkamp
028353c82e Replace manual CLI prompts with dialoguer for arrow-key navigation
Interactive TTY sessions now use dialoguer widgets (Select, MultiSelect,
Confirm, Input) instead of raw eprintln/read_line. Non-TTY input falls
back to the existing line-based reader. Suppresses redundant "Stage
started" inform message for wait.human nodes since the prompt itself
serves as notification.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:58:18 -05:00
Bryan Helmkamp
7e7e8a9088 Update spec-dod-multimodel.dot for Rust: fix paths, build commands, and language references
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:50:10 -05:00
Bryan Helmkamp
3dfa0f9044 Add shape selectors, LLM stream timeouts, MultiSelect questions, and test coverage
- Stylesheet: add bare-word Shape selector (specificity between Universal and Class)
- LLM: apply per_step timeout to connection and total timeout to stream (Section 4.7)
- Interviewer: add MultiSelect question type alongside MultipleChoice
- Session: move SessionStart/SessionEnd to initialize()/close(), deduplicate close logic
- Engine: return Ok(fail outcome) instead of error when goal gate unsatisfied with no retry_target
- Docker: mark Docker-dependent tests with #[ignore]
- Validation: add extensive unit test coverage for all rule types
- Integration: update tests to match engine/fidelity changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:43:05 -05:00
Bryan Helmkamp
a3a7f9fb5c Add --no-dotenv flag to ullm binary and use it in tests instead of env_clear()
Prevents tests from loading .env and making real API calls without
manipulating environment state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:24:03 -05:00
Bryan Helmkamp
a3605ec0d4 Speed up slow tests: drop SSE broadcast on completion, switch to rustls-tls, replace hardcoded sleeps with poll loops, and prevent real API calls in ullm tests
- Drop event_tx from ManagedPipeline when pipeline completes/cancels/fails so
  SSE streams end promptly instead of blocking until timeout (3.5s → 0.02s)
- Switch reqwest from native-tls to rustls-tls to avoid 500ms macOS cert store
  load per process (0.67s → 0.005s per OpenAI adapter test)
- Replace hardcoded sleep(500ms)/sleep(200ms)/sleep(100ms) in server and
  integration tests with 10ms poll loops (0.2-0.5s → 0.02-0.03s each)
- Add env_clear() to ullm prompt tests to prevent .env from triggering real
  Anthropic API calls (0.45s → 0.15s)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 17:19:09 -05:00
Bryan Helmkamp
61eb72f038 Update spec-dod fix prompt to run cargo test before and after changes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:34:41 -05:00
Bryan Helmkamp
36e37e5458 Print logs directory at pipeline start in verbose mode
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:33:28 -05:00
Bryan Helmkamp
480364c2b0 Add flow-control data to STAGE_COMPLETED event
Add status, preferred_label, and suggested_next_ids fields to the
StageCompleted event so pipeline flow decisions are visible in CLI
output and the web UI, making it easier to debug why a pipeline
took a particular path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:32:42 -05:00
Bryan Helmkamp
95a4ab24d5 Thread EngineServices through Handler::execute() to eliminate circular dependency
ParallelHandler and SubPipelineHandler needed Arc<HandlerRegistry> at
construction time but also lived inside the registry, creating a circular
dependency. The previous fix special-cased ParallelHandler as a separate
field on PipelineEngine with a resolve_handler() override.

Instead, add an EngineServices struct (registry + emitter) passed through
Handler::execute(). ParallelHandler and SubPipelineHandler become unit
structs that get what they need at execution time. No special-casing,
both register normally in default_registry() like every other handler.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:31:55 -05:00
Bryan Helmkamp
74a6b219cc Fix spec: FAIL does not trigger retries, only RETRY does
The test criteria incorrectly said FAIL outcomes should be retried.
The pseudocode (Section 3.5) and the C reference implementation both
return immediately on FAIL. Only RETRY status triggers the retry loop.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:19:10 -05:00
Bryan Helmkamp
9f9b461971 Restore exactly-one terminal node validation per spec
The spec says "exactly one" exit node in the shape table (line 184),
exit handler docs (line 648), and test criteria (line 1834). The lint
rule table (line 1437) says "at least one" but is the minority. The
previous commit incorrectly reverted this — the terminal node change
was not causing the test failures (all three were from retry-on-Fail).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:12:45 -05:00
Bryan Helmkamp
6406fccd19 Fix regressions from ceaa9bf: restore Fail as non-retryable and allow multiple terminal nodes
Revert two incorrect behavioral changes introduced in ceaa9bf:

1. StageStatus::Fail must return immediately, not retry. Fail is a
   deliberate routing outcome (e.g. to take a "fail" edge). Retrying it
   caused conditional_branching and manager_loop tests to hang.

2. Pipelines can legitimately have multiple terminal nodes. The
   "exactly one" constraint broke branching_loop_back_on_failure.
   Restore "at least one" validation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:09:36 -05:00
Bryan Helmkamp
06480db417 Register parallel handler to prevent dry-run hang on parallel pipelines
The parallel handler was never registered in default_registry() due to a
circular dependency (ParallelHandler::new needs Arc<HandlerRegistry>).
Break the cycle by storing ParallelHandler as a separate field on
PipelineEngine, created after Arc-wrapping the registry and emitter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 16:04:16 -05:00
Bryan Helmkamp
ceaa9bf560 Improve session abort handling, emit tool output deltas, and tighten validation
- Break out of streaming loop on abort and drop the stream before emitting
  SessionEnd to properly cancel the HTTP connection
- Emit ToolCallOutputDelta events for tool call results in both sequential
  and parallel execution paths
- Retry on StageStatus::Fail in addition to Retry in pipeline engine
- Set preferred_label on WaitHumanHandler choice outcomes
- Enforce exactly one terminal node in pipeline validation
- Downgrade unreachable node diagnostic from Error to Warning
- Update context window test to match 1M token limit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 15:39:04 -05:00
Bryan Helmkamp
834b7f6160 Display relative paths in CLI tool call output
Strip the CWD prefix from string arguments in format_tool_args so tool
call output shows relative paths instead of absolute ones.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:53:19 -05:00
Bryan Helmkamp
9ddb325390 Clarify spec-dod-multimodel prompts to respond with JSON inline instead of writing files
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:46:03 -05:00
Bryan Helmkamp
6071bb0aa7 Handle signature_delta streaming event for Anthropic thinking blocks
The Anthropic streaming API sends thinking block signatures via a
signature_delta event, not in content_block_start or content_block_stop.
The parser was ignoring this event type, falling back to the empty
placeholder signature from content_block_start, causing "Invalid
signature in thinking block" errors on multi-turn conversations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 14:39:42 -05:00