agent-harness 0.19.0 → 0.20.0
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.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +7 -0
- data/lib/agent_harness/providers/anthropic.rb +20 -8
- data/lib/agent_harness/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f7d3dd9864119fc75abc2a4c7eebf2f2d6bf9239b6d02313fd63d15712074d5c
|
|
4
|
+
data.tar.gz: 9c8ac795a33027da1981fe170334a7456685c8f1f494d42680cc1e8c29f5cce9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 446d1544846e9047c1cdd06f1d08ce50d4567fed6436efbdd4b3fcbfd6404c8203acdf508db2f3e2be3f04feb2cc6f54ff55c90f51f10edb27f413812c8a5c04
|
|
7
|
+
data.tar.gz: 0a0aed2a47548fce2007cca6aa351c2f675581d7340bb25853b3b306d622575a722be294c9e51be2c15e22b3d545d4106d179c562d98a61ad94a8d840fc4b9f5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.20.0](https://github.com/viamin/agent-harness/compare/agent-harness/v0.19.0...agent-harness/v0.20.0) (2026-05-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* suppress Claude CLI .mcp.json auto-discovery when no MCP servers configured ([e07a25e](https://github.com/viamin/agent-harness/commit/e07a25e463becfd77da97058cb0a760eaec0920b))
|
|
9
|
+
|
|
3
10
|
## [0.19.0](https://github.com/viamin/agent-harness/compare/agent-harness/v0.18.2...agent-harness/v0.19.0) (2026-05-29)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -183,7 +183,12 @@ module AgentHarness
|
|
|
183
183
|
def parse_cli_json_envelope(json_string)
|
|
184
184
|
return nil if json_string.nil? || json_string.empty?
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
cleaned = json_string.lines.reject { |line|
|
|
187
|
+
line.include?('"type":"session.') || line.include?('"type": "session.')
|
|
188
|
+
}.join.strip
|
|
189
|
+
return nil if cleaned.empty?
|
|
190
|
+
|
|
191
|
+
parsed = JSON.parse(cleaned)
|
|
187
192
|
return nil unless parsed.is_a?(Hash) && parsed.key?("result")
|
|
188
193
|
|
|
189
194
|
output = parsed["result"]
|
|
@@ -415,8 +420,6 @@ module AgentHarness
|
|
|
415
420
|
end
|
|
416
421
|
|
|
417
422
|
def build_mcp_flags(mcp_servers, working_dir: nil)
|
|
418
|
-
return [] if mcp_servers.empty?
|
|
419
|
-
|
|
420
423
|
config_path = write_mcp_config_file(mcp_servers, working_dir: working_dir)
|
|
421
424
|
["--mcp-config", config_path]
|
|
422
425
|
end
|
|
@@ -601,10 +604,10 @@ module AgentHarness
|
|
|
601
604
|
cmd += dangerous_mode_flags
|
|
602
605
|
end
|
|
603
606
|
|
|
604
|
-
# Add MCP server flags (validated/normalized by Base#send_message)
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
607
|
+
# Add MCP server flags (validated/normalized by Base#send_message).
|
|
608
|
+
# Always pass --mcp-config, even with an empty server list, to suppress
|
|
609
|
+
# the Claude CLI's auto-discovery of .mcp.json in the working directory.
|
|
610
|
+
cmd += build_mcp_flags(options[:mcp_servers] || [])
|
|
608
611
|
|
|
609
612
|
# Add custom flags from config
|
|
610
613
|
cmd += @config.default_flags if @config.default_flags&.any?
|
|
@@ -720,11 +723,20 @@ module AgentHarness
|
|
|
720
723
|
def parse_json_output(output)
|
|
721
724
|
return nil if output.nil? || output.empty?
|
|
722
725
|
|
|
723
|
-
|
|
726
|
+
cleaned = strip_claude_streaming_events(output)
|
|
727
|
+
return nil if cleaned.empty?
|
|
728
|
+
|
|
729
|
+
JSON.parse(cleaned)
|
|
724
730
|
rescue JSON::ParserError
|
|
725
731
|
nil
|
|
726
732
|
end
|
|
727
733
|
|
|
734
|
+
def strip_claude_streaming_events(output)
|
|
735
|
+
output.lines.reject { |line|
|
|
736
|
+
line.include?('"type":"session.') || line.include?('"type": "session.')
|
|
737
|
+
}.join.strip
|
|
738
|
+
end
|
|
739
|
+
|
|
728
740
|
# Delegate to class-level implementations so both instance and class
|
|
729
741
|
# methods share a single definition.
|
|
730
742
|
def extract_envelope_metadata(parsed)
|