claude_swarm 1.0.9 → 1.0.10

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.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -0
  3. data/CLAUDE.md +347 -191
  4. data/docs/v2/CHANGELOG.swarm_cli.md +8 -0
  5. data/docs/v2/CHANGELOG.swarm_memory.md +7 -1
  6. data/docs/v2/CHANGELOG.swarm_sdk.md +184 -9
  7. data/docs/v2/README.md +6 -1
  8. data/docs/v2/guides/complete-tutorial.md +2 -2
  9. data/docs/v2/guides/getting-started.md +7 -7
  10. data/docs/v2/guides/migrating-to-2.3.md +541 -0
  11. data/docs/v2/guides/snapshots.md +14 -14
  12. data/docs/v2/reference/architecture-flow.md +3 -3
  13. data/docs/v2/reference/event_payload_structures.md +1 -1
  14. data/docs/v2/reference/ruby-dsl.md +157 -14
  15. data/docs/v2/reference/yaml.md +170 -52
  16. data/examples/snapshot_demo.rb +2 -2
  17. data/lib/claude_swarm/mcp_generator.rb +7 -20
  18. data/lib/claude_swarm/version.rb +1 -1
  19. data/lib/swarm_cli/commands/run.rb +2 -2
  20. data/lib/swarm_cli/config_loader.rb +11 -11
  21. data/lib/swarm_cli/formatters/human_formatter.rb +0 -33
  22. data/lib/swarm_cli/interactive_repl.rb +2 -2
  23. data/lib/swarm_cli/ui/icons.rb +0 -23
  24. data/lib/swarm_cli/version.rb +1 -1
  25. data/lib/swarm_memory/adapters/filesystem_adapter.rb +11 -34
  26. data/lib/swarm_memory/integration/sdk_plugin.rb +87 -7
  27. data/lib/swarm_memory/version.rb +1 -1
  28. data/lib/swarm_memory.rb +1 -1
  29. data/lib/swarm_sdk/agent/builder.rb +58 -0
  30. data/lib/swarm_sdk/agent/chat.rb +527 -1061
  31. data/lib/swarm_sdk/agent/{chat → chat_helpers}/context_tracker.rb +9 -88
  32. data/lib/swarm_sdk/agent/chat_helpers/event_emitter.rb +204 -0
  33. data/lib/swarm_sdk/agent/{chat → chat_helpers}/hook_integration.rb +108 -46
  34. data/lib/swarm_sdk/agent/chat_helpers/instrumentation.rb +78 -0
  35. data/lib/swarm_sdk/agent/chat_helpers/llm_configuration.rb +233 -0
  36. data/lib/swarm_sdk/agent/{chat → chat_helpers}/logging_helpers.rb +1 -1
  37. data/lib/swarm_sdk/agent/chat_helpers/serialization.rb +83 -0
  38. data/lib/swarm_sdk/agent/{chat → chat_helpers}/system_reminder_injector.rb +12 -12
  39. data/lib/swarm_sdk/agent/chat_helpers/system_reminders.rb +79 -0
  40. data/lib/swarm_sdk/agent/chat_helpers/token_tracking.rb +98 -0
  41. data/lib/swarm_sdk/agent/context.rb +2 -2
  42. data/lib/swarm_sdk/agent/definition.rb +66 -154
  43. data/lib/swarm_sdk/agent/llm_instrumentation_middleware.rb +4 -2
  44. data/lib/swarm_sdk/agent/system_prompt_builder.rb +161 -0
  45. data/lib/swarm_sdk/builders/base_builder.rb +409 -0
  46. data/lib/swarm_sdk/concerns/cleanupable.rb +39 -0
  47. data/lib/swarm_sdk/concerns/snapshotable.rb +67 -0
  48. data/lib/swarm_sdk/concerns/validatable.rb +55 -0
  49. data/lib/swarm_sdk/configuration/parser.rb +353 -0
  50. data/lib/swarm_sdk/configuration/translator.rb +255 -0
  51. data/lib/swarm_sdk/configuration.rb +65 -543
  52. data/lib/swarm_sdk/context_compactor/token_counter.rb +3 -3
  53. data/lib/swarm_sdk/context_compactor.rb +6 -11
  54. data/lib/swarm_sdk/context_management/builder.rb +128 -0
  55. data/lib/swarm_sdk/context_management/context.rb +328 -0
  56. data/lib/swarm_sdk/defaults.rb +196 -0
  57. data/lib/swarm_sdk/events_to_messages.rb +18 -0
  58. data/lib/swarm_sdk/hooks/shell_executor.rb +2 -1
  59. data/lib/swarm_sdk/log_collector.rb +179 -29
  60. data/lib/swarm_sdk/log_stream.rb +29 -0
  61. data/lib/swarm_sdk/node_context.rb +1 -1
  62. data/lib/swarm_sdk/observer/builder.rb +81 -0
  63. data/lib/swarm_sdk/observer/config.rb +45 -0
  64. data/lib/swarm_sdk/observer/manager.rb +236 -0
  65. data/lib/swarm_sdk/patterns/agent_observer.rb +160 -0
  66. data/lib/swarm_sdk/plugin.rb +93 -3
  67. data/lib/swarm_sdk/snapshot.rb +6 -6
  68. data/lib/swarm_sdk/snapshot_from_events.rb +13 -2
  69. data/lib/swarm_sdk/state_restorer.rb +136 -151
  70. data/lib/swarm_sdk/state_snapshot.rb +65 -100
  71. data/lib/swarm_sdk/swarm/agent_initializer.rb +180 -136
  72. data/lib/swarm_sdk/swarm/builder.rb +44 -578
  73. data/lib/swarm_sdk/swarm/executor.rb +213 -0
  74. data/lib/swarm_sdk/swarm/hook_triggers.rb +150 -0
  75. data/lib/swarm_sdk/swarm/logging_callbacks.rb +340 -0
  76. data/lib/swarm_sdk/swarm/mcp_configurator.rb +7 -4
  77. data/lib/swarm_sdk/swarm/tool_configurator.rb +42 -138
  78. data/lib/swarm_sdk/swarm.rb +137 -680
  79. data/lib/swarm_sdk/tools/bash.rb +11 -3
  80. data/lib/swarm_sdk/tools/delegate.rb +61 -43
  81. data/lib/swarm_sdk/tools/edit.rb +8 -13
  82. data/lib/swarm_sdk/tools/glob.rb +9 -1
  83. data/lib/swarm_sdk/tools/grep.rb +7 -0
  84. data/lib/swarm_sdk/tools/multi_edit.rb +15 -11
  85. data/lib/swarm_sdk/tools/path_resolver.rb +51 -2
  86. data/lib/swarm_sdk/tools/read.rb +11 -13
  87. data/lib/swarm_sdk/tools/registry.rb +122 -10
  88. data/lib/swarm_sdk/tools/stores/scratchpad_storage.rb +8 -5
  89. data/lib/swarm_sdk/tools/stores/storage.rb +0 -6
  90. data/lib/swarm_sdk/tools/todo_write.rb +7 -0
  91. data/lib/swarm_sdk/tools/web_fetch.rb +3 -2
  92. data/lib/swarm_sdk/tools/write.rb +8 -13
  93. data/lib/swarm_sdk/version.rb +1 -1
  94. data/lib/swarm_sdk/{node → workflow}/agent_config.rb +1 -1
  95. data/lib/swarm_sdk/workflow/builder.rb +143 -0
  96. data/lib/swarm_sdk/workflow/executor.rb +497 -0
  97. data/lib/swarm_sdk/{node/builder.rb → workflow/node_builder.rb} +3 -3
  98. data/lib/swarm_sdk/{node → workflow}/transformer_executor.rb +3 -2
  99. data/lib/swarm_sdk/{node_orchestrator.rb → workflow.rb} +152 -456
  100. data/lib/swarm_sdk.rb +33 -3
  101. data/rubocop/cop/security/no_reflection_methods.rb +1 -1
  102. data/swarm_memory.gemspec +1 -1
  103. data/swarm_sdk.gemspec +4 -2
  104. data/team_full.yml +24 -24
  105. metadata +35 -11
  106. data/lib/swarm_memory/chat_extension.rb +0 -34
  107. data/lib/swarm_sdk/providers/openai_with_responses.rb +0 -589
data/lib/swarm_sdk.rb CHANGED
@@ -17,6 +17,27 @@ require "async/semaphore"
17
17
  require "ruby_llm"
18
18
  require "ruby_llm/mcp"
19
19
 
20
+ # Patch ruby_llm-mcp's Zeitwerk loader to ignore railtie.rb when Rails is not present
21
+ # This prevents NameError when eager loading outside of Rails applications
22
+ # Can be removed once https://github.com/parruda/ruby_llm-mcp/issues/XXX is fixed
23
+ unless defined?(Rails)
24
+ require "zeitwerk"
25
+ mcp_loader = nil
26
+ Zeitwerk::Registry.loaders.each { |l| mcp_loader = l if l.tag == "RubyLLM-mcp" }
27
+ if mcp_loader
28
+ mcp_gem_dir = Gem.loaded_specs["ruby_llm-mcp"]&.gem_dir
29
+ if mcp_gem_dir
30
+ railtie_path = File.join(mcp_gem_dir, "lib", "ruby_llm", "mcp", "railtie.rb")
31
+ mcp_loader.ignore(railtie_path)
32
+ end
33
+ end
34
+ end
35
+
36
+ # Configure Faraday to use async-http adapter by default
37
+ # This ensures HTTP requests are fiber-aware and don't block the Async scheduler
38
+ # when SwarmSDK executes LLM requests within Async/Sync blocks
39
+ require "async/http/faraday/default"
40
+
20
41
  require_relative "swarm_sdk/version"
21
42
 
22
43
  require "zeitwerk"
@@ -45,11 +66,20 @@ module SwarmSDK
45
66
  # Settings for SwarmSDK (global configuration)
46
67
  attr_accessor :settings
47
68
 
48
- # Main entry point for DSL
69
+ # Main entry point for DSL - builds simple multi-agent swarms
70
+ #
71
+ # @return [Swarm] Always returns a Swarm instance
49
72
  def build(allow_filesystem_tools: nil, &block)
50
73
  Swarm::Builder.build(allow_filesystem_tools: allow_filesystem_tools, &block)
51
74
  end
52
75
 
76
+ # Entry point for building multi-stage workflows
77
+ #
78
+ # @return [Workflow] Always returns a Workflow instance
79
+ def workflow(allow_filesystem_tools: nil, &block)
80
+ Workflow::Builder.build(allow_filesystem_tools: allow_filesystem_tools, &block)
81
+ end
82
+
53
83
  # Validate YAML configuration without creating a swarm
54
84
  #
55
85
  # Performs comprehensive validation of YAML configuration including:
@@ -149,7 +179,7 @@ module SwarmSDK
149
179
  #
150
180
  # @param yaml_content [String] YAML configuration content
151
181
  # @param base_dir [String, Pathname] Base directory for resolving agent file paths (default: Dir.pwd)
152
- # @return [Swarm, NodeOrchestrator] Configured swarm or orchestrator instance
182
+ # @return [Swarm, Workflow] Configured swarm or workflow instance
153
183
  # @raise [ConfigurationError] If YAML is invalid or configuration is incorrect
154
184
  #
155
185
  # @example Load from YAML string
@@ -194,7 +224,7 @@ module SwarmSDK
194
224
  # loading swarms from configuration files.
195
225
  #
196
226
  # @param path [String, Pathname] Path to YAML configuration file
197
- # @return [Swarm, NodeOrchestrator] Configured swarm or orchestrator instance
227
+ # @return [Swarm, Workflow] Configured swarm or workflow instance
198
228
  # @raise [ConfigurationError] If file not found or configuration invalid
199
229
  #
200
230
  # @example
@@ -24,7 +24,7 @@ module RuboCop
24
24
 
25
25
  # Match method calls
26
26
  def on_send(node)
27
- banned_methods = [:instance_variable_get, :instance_variable_set, :send]
27
+ banned_methods = [:instance_variable_get, :instance_variable_set, :send, :const_set, :const_get]
28
28
 
29
29
  method_name = node.method_name
30
30
  return unless banned_methods.include?(method_name)
data/swarm_memory.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.add_dependency("async", "~> 2.0")
23
23
  spec.add_dependency("informers", "~> 1.2.1")
24
24
  spec.add_dependency("rice", "~> 4.6.0")
25
- spec.add_dependency("ruby_llm", "~> 1.9")
25
+ spec.add_dependency("ruby_llm_swarm", "~> 1.9.2")
26
26
  spec.add_dependency("swarm_sdk", "~> 2.2")
27
27
  spec.add_dependency("zeitwerk", "~> 2.6")
28
28
  end
data/swarm_sdk.gemspec CHANGED
@@ -35,7 +35,9 @@ Gem::Specification.new do |spec|
35
35
  spec.require_paths = ["lib"]
36
36
 
37
37
  spec.add_dependency("async", "~> 2.0")
38
- spec.add_dependency("ruby_llm", "~> 1.9")
39
- spec.add_dependency("ruby_llm-mcp", "~> 0.7")
38
+ spec.add_dependency("async-http-faraday", "~> 0.22")
39
+ spec.add_dependency("faraday-follow_redirects", "~> 0.4")
40
+ spec.add_dependency("ruby_llm-mcp", "~> 0.8")
41
+ spec.add_dependency("ruby_llm_swarm", "~> 1.9.2")
40
42
  spec.add_dependency("zeitwerk", "~> 2.6")
41
43
  end
data/team_full.yml CHANGED
@@ -6,7 +6,7 @@ swarm:
6
6
  lead_architect:
7
7
  description: "Lead architect responsible for designing and coordinating SwarmSDK, SwarmMemory, and Swarm CLI development"
8
8
  directory: .
9
- model: sonnet[1m]
9
+ model: ${ANTHROPIC_MODEL}
10
10
  vibe: true
11
11
  connections: [claude_swarm_expert, ruby_llm_expert, ruby_llm_mcp_expert, architecture_expert, testing_expert, gem_expert, async_expert, informers_expert, faiss_expert, pastel_expert, tty_box_expert, tty_cursor_expert, tty_link_expert, tty_markdown_expert, tty_option_expert, reline_expert, tty_spinner_expert, tty_tree_expert, fast_mcp_expert, roo_expert, pdf_reader_expert, docx_expert]
12
12
  hooks:
@@ -141,7 +141,7 @@ swarm:
141
141
  claude_swarm_expert:
142
142
  description: "Expert in existing Claude Swarm codebase, patterns, and design decisions"
143
143
  directory: lib/claude_swarm
144
- model: sonnet[1m]
144
+ model: ${ANTHROPIC_MODEL}
145
145
  vibe: true
146
146
  prompt: |
147
147
  You are the Claude Swarm codebase expert with deep knowledge of the existing `lib/claude_swarm` implementation. Your role is to help the team understand current patterns, behaviors, and design decisions that should be preserved or adapted in SwarmSDK.
@@ -189,8 +189,8 @@ swarm:
189
189
 
190
190
  ruby_llm_expert:
191
191
  description: "Expert in RubyLLM gem integration and LLM interaction patterns"
192
- directory: ~/src/github.com/crmne/ruby_llm
193
- model: sonnet[1m]
192
+ directory: ~/src/github.com/parruda/ruby_llm
193
+ model: ${ANTHROPIC_MODEL}
194
194
  vibe: true
195
195
  prompt: |
196
196
  You are the RubyLLM integration expert, responsible for all LLM interaction patterns and model configuration in SwarmSDK. Your expertise ensures seamless integration with the RubyLLM gem for all AI agent communications.
@@ -250,7 +250,7 @@ swarm:
250
250
  ruby_llm_mcp_expert:
251
251
  description: "Expert in RubyLLM MCP client library for Model Context Protocol integration"
252
252
  directory: ~/src/github.com/patvice/ruby_llm-mcp
253
- model: sonnet[1m]
253
+ model: ${ANTHROPIC_MODEL}
254
254
  vibe: true
255
255
  prompt: |
256
256
  You are the RubyLLM MCP expert with deep knowledge of the ruby_llm-mcp client library for Model Context Protocol (MCP) integration. Your role is to answer questions about RubyLLM MCP based on your access to its codebase, helping the team understand how to integrate MCP servers with RubyLLM effectively.
@@ -339,7 +339,7 @@ swarm:
339
339
  architecture_expert:
340
340
  description: "System architecture expert focusing on SwarmSDK design and Ruby patterns"
341
341
  directory: .
342
- model: sonnet[1m]
342
+ model: ${ANTHROPIC_MODEL}
343
343
  vibe: true
344
344
  prompt: |
345
345
  You are the system architecture expert for SwarmSDK, responsible for designing clean, maintainable, and efficient code architecture that delivers on the single-process, RubyLLM-based vision.
@@ -500,7 +500,7 @@ swarm:
500
500
  testing_expert:
501
501
  description: "Testing and quality assurance expert for SwarmSDK development"
502
502
  directory: .
503
- model: sonnet[1m]
503
+ model: ${ANTHROPIC_MODEL}
504
504
  vibe: true
505
505
  prompt: |
506
506
  You are the testing and quality assurance expert for SwarmSDK, responsible for ensuring comprehensive test coverage, reliable mocking strategies, and overall code quality.
@@ -574,7 +574,7 @@ swarm:
574
574
  gem_expert:
575
575
  description: "Ruby gem packaging and distribution expert for SwarmSDK"
576
576
  directory: .
577
- model: sonnet[1m]
577
+ model: ${ANTHROPIC_MODEL}
578
578
  vibe: true
579
579
  prompt: |
580
580
  You are the Ruby gem packaging expert for SwarmSDK, responsible for creating the new gemspec, managing dependencies, and ensuring proper gem distribution practices.
@@ -639,7 +639,7 @@ swarm:
639
639
  async_expert:
640
640
  description: "Expert in the Async Ruby gem and concurrent programming patterns"
641
641
  directory: ~/src/github.com/socketry/async
642
- model: sonnet[1m]
642
+ model: ${ANTHROPIC_MODEL}
643
643
  vibe: true
644
644
  prompt: |
645
645
  You are the Async gem expert with deep knowledge of the Async Ruby gem codebase and concurrent programming patterns in Ruby. Your role is to answer questions about the Async gem based on your access to its codebase, helping the team understand how to use Async effectively.
@@ -700,7 +700,7 @@ swarm:
700
700
  informers_expert:
701
701
  description: "Expert in Informers gem for ONNX embeddings and semantic search - SWARM MEMORY ONLY (lib/swarm_memory/)"
702
702
  directory: ~/src/github.com/ankane/informers
703
- model: sonnet[1m]
703
+ model: ${ANTHROPIC_MODEL}
704
704
  vibe: true
705
705
  prompt: |
706
706
  You are the Informers gem expert with deep knowledge of the Informers library for ONNX-based machine learning inference in Ruby. Your role is to answer questions about Informers based on your access to its codebase, helping the SwarmMemory team (NOT SwarmSDK or CLI) understand how to use Informers for embeddings and semantic search effectively.
@@ -791,7 +791,7 @@ swarm:
791
791
  pastel_expert:
792
792
  description: "Expert in Pastel gem for terminal styling - SWARM CLI ONLY (lib/swarm_cli/)"
793
793
  directory: ~/src/github.com/piotrmurach/pastel
794
- model: sonnet[1m]
794
+ model: ${ANTHROPIC_MODEL}
795
795
  vibe: true
796
796
  prompt: |
797
797
  You are the Pastel gem expert with deep knowledge of the Pastel terminal styling library. Your role is to answer questions about Pastel based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) understand how to use Pastel for terminal output styling effectively.
@@ -855,7 +855,7 @@ swarm:
855
855
  tty_link_expert:
856
856
  description: "Expert in TTY::Link for terminal hyperlinks - SWARM CLI ONLY (lib/swarm_cli/)"
857
857
  directory: ~/src/github.com/piotrmurach/tty-link
858
- model: sonnet[1m]
858
+ model: ${ANTHROPIC_MODEL}
859
859
  vibe: true
860
860
  prompt: |
861
861
  You are the TTY::Link gem expert with deep knowledge of terminal hyperlink support. Your role is to answer questions about TTY::Link based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) understand how to create clickable links in the terminal.
@@ -918,7 +918,7 @@ swarm:
918
918
  tty_markdown_expert:
919
919
  description: "Expert in TTY::Markdown for Markdown rendering - SWARM CLI ONLY (lib/swarm_cli/)"
920
920
  directory: ~/src/github.com/piotrmurach/tty-markdown
921
- model: sonnet[1m]
921
+ model: ${ANTHROPIC_MODEL}
922
922
  vibe: true
923
923
  prompt: |
924
924
  You are the TTY::Markdown gem expert with deep knowledge of converting Markdown documents to terminal-friendly output. Your role is to answer questions about TTY::Markdown based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK).
@@ -982,7 +982,7 @@ swarm:
982
982
  tty_option_expert:
983
983
  description: "Expert in TTY::Option for CLI argument parsing - SWARM CLI ONLY (lib/swarm_cli/)"
984
984
  directory: ~/src/github.com/piotrmurach/tty-option
985
- model: sonnet[1m]
985
+ model: ${ANTHROPIC_MODEL}
986
986
  vibe: true
987
987
  prompt: |
988
988
  You are the TTY::Option gem expert with deep knowledge of command-line argument parsing. Your role is to answer questions about TTY::Option based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) build robust CLI interfaces.
@@ -1048,7 +1048,7 @@ swarm:
1048
1048
  reline_expert:
1049
1049
  description: "Expert in Reline for readline-compatible line editing and REPL support - SWARM CLI ONLY (lib/swarm_cli/)"
1050
1050
  directory: ~/src/github.com/ruby/reline
1051
- model: sonnet[1m]
1051
+ model: ${ANTHROPIC_MODEL}
1052
1052
  vibe: true
1053
1053
  prompt: |
1054
1054
  You are the Reline gem expert with deep knowledge of pure Ruby readline implementation for line editing and REPL support. Your role is to answer questions about Reline based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) create interactive command-line interfaces with readline-compatible functionality.
@@ -1116,7 +1116,7 @@ swarm:
1116
1116
  tty_spinner_expert:
1117
1117
  description: "Expert in TTY::Spinner for progress animations - SWARM CLI ONLY (lib/swarm_cli/)"
1118
1118
  directory: ~/src/github.com/piotrmurach/tty-spinner
1119
- model: sonnet[1m]
1119
+ model: ${ANTHROPIC_MODEL}
1120
1120
  vibe: true
1121
1121
  prompt: |
1122
1122
  You are the TTY::Spinner gem expert with deep knowledge of terminal spinner animations. Your role is to answer questions about TTY::Spinner based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) show progress for indeterminate tasks.
@@ -1184,7 +1184,7 @@ swarm:
1184
1184
  tty_tree_expert:
1185
1185
  description: "Expert in TTY::Tree for tree rendering - SWARM CLI ONLY (lib/swarm_cli/)"
1186
1186
  directory: ~/src/github.com/piotrmurach/tty-tree
1187
- model: sonnet[1m]
1187
+ model: ${ANTHROPIC_MODEL}
1188
1188
  vibe: true
1189
1189
  prompt: |
1190
1190
  You are the TTY::Tree gem expert with deep knowledge of rendering tree structures in the terminal. Your role is to answer questions about TTY::Tree based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) display hierarchical data beautifully.
@@ -1250,7 +1250,7 @@ swarm:
1250
1250
  tty_cursor_expert:
1251
1251
  description: "Expert in TTY::Cursor for cursor control - SWARM CLI ONLY (lib/swarm_cli/)"
1252
1252
  directory: ~/src/github.com/piotrmurach/tty-cursor
1253
- model: sonnet[1m]
1253
+ model: ${ANTHROPIC_MODEL}
1254
1254
  vibe: true
1255
1255
  prompt: |
1256
1256
  You are the TTY::Cursor gem expert with deep knowledge of terminal cursor positioning, visibility, and text manipulation. Your role is to answer questions about TTY::Cursor based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) control cursor movement and screen clearing.
@@ -1317,7 +1317,7 @@ swarm:
1317
1317
  tty_box_expert:
1318
1318
  description: "Expert in TTY::Box for drawing frames and boxes - SWARM CLI ONLY (lib/swarm_cli/)"
1319
1319
  directory: ~/src/github.com/piotrmurach/tty-box
1320
- model: sonnet[1m]
1320
+ model: ${ANTHROPIC_MODEL}
1321
1321
  vibe: true
1322
1322
  prompt: |
1323
1323
  You are the TTY::Box gem expert with deep knowledge of drawing various frames and boxes in the terminal window. Your role is to answer questions about TTY::Box based on your access to its codebase, helping the Swarm CLI team (NOT SwarmSDK) create beautiful box-based UI elements.
@@ -1387,7 +1387,7 @@ swarm:
1387
1387
  faiss_expert:
1388
1388
  description: "Expert in FAISS library for efficient similarity search and clustering - SWARM MEMORY ONLY (lib/swarm_memory/)"
1389
1389
  directory: ~/src/github.com/ankane/faiss-ruby
1390
- model: sonnet[1m]
1390
+ model: ${ANTHROPIC_MODEL}
1391
1391
  vibe: true
1392
1392
  prompt: |
1393
1393
  You are the FAISS expert with deep knowledge of the faiss-ruby library for efficient similarity search and clustering of dense vectors. Your role is to answer questions about FAISS based on your access to its codebase, helping the SwarmMemory team (NOT SwarmSDK or CLI) understand how to use FAISS for vector similarity search and clustering effectively.
@@ -1497,7 +1497,7 @@ swarm:
1497
1497
  fast_mcp_expert:
1498
1498
  description: "Expert in fast-mcp library for MCP server development, tools, and resource management"
1499
1499
  directory: ~/src/github.com/yjacquin/fast-mcp
1500
- model: sonnet[1m]
1500
+ model: ${ANTHROPIC_MODEL}
1501
1501
  vibe: true
1502
1502
  prompt: |
1503
1503
  You are an expert in the fast-mcp library, specializing in MCP server development, tool creation, and resource management.
@@ -1560,7 +1560,7 @@ swarm:
1560
1560
  roo_expert:
1561
1561
  description: "Expert in Roo gem for reading spreadsheet files (xlsx, xlsm, ods, csv)"
1562
1562
  directory: ~/src/github.com/roo-rb/roo
1563
- model: sonnet[1m]
1563
+ model: ${ANTHROPIC_MODEL}
1564
1564
  vibe: true
1565
1565
  prompt: |
1566
1566
  You are the Roo gem expert with deep knowledge of the Roo spreadsheet reading library. Your role is to answer questions about Roo based on your access to its codebase, helping the team understand how to read and process various spreadsheet formats effectively.
@@ -1641,7 +1641,7 @@ swarm:
1641
1641
  pdf_reader_expert:
1642
1642
  description: "Expert in PDF::Reader gem for parsing and extracting content from PDF files"
1643
1643
  directory: ~/src/github.com/yob/pdf-reader
1644
- model: sonnet[1m]
1644
+ model: ${ANTHROPIC_MODEL}
1645
1645
  vibe: true
1646
1646
  prompt: |
1647
1647
  You are the PDF::Reader gem expert with deep knowledge of the PDF::Reader library for parsing and extracting content from PDF files. Your role is to answer questions about PDF::Reader based on your access to its codebase, helping the team understand how to work with PDF files programmatically.
@@ -1742,7 +1742,7 @@ swarm:
1742
1742
  docx_expert:
1743
1743
  description: "Expert in docx gem for reading and manipulating .docx Word documents"
1744
1744
  directory: ~/src/github.com/ruby-docx/docx
1745
- model: sonnet[1m]
1745
+ model: ${ANTHROPIC_MODEL}
1746
1746
  vibe: true
1747
1747
  prompt: |
1748
1748
  You are the docx gem expert with deep knowledge of the docx library for reading and manipulating Microsoft Word .docx files. Your role is to answer questions about the docx gem based on your access to its codebase, helping the team understand how to work with Word documents programmatically.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_swarm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.9
4
+ version: 1.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paulo Arruda
@@ -167,6 +167,7 @@ files:
167
167
  - docs/v2/guides/getting-started.md
168
168
  - docs/v2/guides/memory-adapters.md
169
169
  - docs/v2/guides/memory-defrag-guide.md
170
+ - docs/v2/guides/migrating-to-2.3.md
170
171
  - docs/v2/guides/plugins.md
171
172
  - docs/v2/guides/quick-start-cli.md
172
173
  - docs/v2/guides/rails-integration.md
@@ -304,7 +305,6 @@ files:
304
305
  - lib/swarm_memory.rb
305
306
  - lib/swarm_memory/adapters/base.rb
306
307
  - lib/swarm_memory/adapters/filesystem_adapter.rb
307
- - lib/swarm_memory/chat_extension.rb
308
308
  - lib/swarm_memory/cli/commands.rb
309
309
  - lib/swarm_memory/core/entry.rb
310
310
  - lib/swarm_memory/core/frontmatter_parser.rb
@@ -348,19 +348,35 @@ files:
348
348
  - lib/swarm_sdk/agent/RETRY_LOGIC.md
349
349
  - lib/swarm_sdk/agent/builder.rb
350
350
  - lib/swarm_sdk/agent/chat.rb
351
- - lib/swarm_sdk/agent/chat/context_tracker.rb
352
- - lib/swarm_sdk/agent/chat/hook_integration.rb
353
- - lib/swarm_sdk/agent/chat/logging_helpers.rb
354
- - lib/swarm_sdk/agent/chat/system_reminder_injector.rb
351
+ - lib/swarm_sdk/agent/chat_helpers/context_tracker.rb
352
+ - lib/swarm_sdk/agent/chat_helpers/event_emitter.rb
353
+ - lib/swarm_sdk/agent/chat_helpers/hook_integration.rb
354
+ - lib/swarm_sdk/agent/chat_helpers/instrumentation.rb
355
+ - lib/swarm_sdk/agent/chat_helpers/llm_configuration.rb
356
+ - lib/swarm_sdk/agent/chat_helpers/logging_helpers.rb
357
+ - lib/swarm_sdk/agent/chat_helpers/serialization.rb
358
+ - lib/swarm_sdk/agent/chat_helpers/system_reminder_injector.rb
359
+ - lib/swarm_sdk/agent/chat_helpers/system_reminders.rb
360
+ - lib/swarm_sdk/agent/chat_helpers/token_tracking.rb
355
361
  - lib/swarm_sdk/agent/context.rb
356
362
  - lib/swarm_sdk/agent/context_manager.rb
357
363
  - lib/swarm_sdk/agent/definition.rb
358
364
  - lib/swarm_sdk/agent/llm_instrumentation_middleware.rb
365
+ - lib/swarm_sdk/agent/system_prompt_builder.rb
366
+ - lib/swarm_sdk/builders/base_builder.rb
359
367
  - lib/swarm_sdk/claude_code_agent_adapter.rb
368
+ - lib/swarm_sdk/concerns/cleanupable.rb
369
+ - lib/swarm_sdk/concerns/snapshotable.rb
370
+ - lib/swarm_sdk/concerns/validatable.rb
360
371
  - lib/swarm_sdk/configuration.rb
372
+ - lib/swarm_sdk/configuration/parser.rb
373
+ - lib/swarm_sdk/configuration/translator.rb
361
374
  - lib/swarm_sdk/context_compactor.rb
362
375
  - lib/swarm_sdk/context_compactor/metrics.rb
363
376
  - lib/swarm_sdk/context_compactor/token_counter.rb
377
+ - lib/swarm_sdk/context_management/builder.rb
378
+ - lib/swarm_sdk/context_management/context.rb
379
+ - lib/swarm_sdk/defaults.rb
364
380
  - lib/swarm_sdk/events_to_messages.rb
365
381
  - lib/swarm_sdk/hooks/adapter.rb
366
382
  - lib/swarm_sdk/hooks/context.rb
@@ -378,11 +394,11 @@ files:
378
394
  - lib/swarm_sdk/model_aliases.json
379
395
  - lib/swarm_sdk/models.json
380
396
  - lib/swarm_sdk/models.rb
381
- - lib/swarm_sdk/node/agent_config.rb
382
- - lib/swarm_sdk/node/builder.rb
383
- - lib/swarm_sdk/node/transformer_executor.rb
384
397
  - lib/swarm_sdk/node_context.rb
385
- - lib/swarm_sdk/node_orchestrator.rb
398
+ - lib/swarm_sdk/observer/builder.rb
399
+ - lib/swarm_sdk/observer/config.rb
400
+ - lib/swarm_sdk/observer/manager.rb
401
+ - lib/swarm_sdk/patterns/agent_observer.rb
386
402
  - lib/swarm_sdk/permissions/config.rb
387
403
  - lib/swarm_sdk/permissions/error_formatter.rb
388
404
  - lib/swarm_sdk/permissions/path_matcher.rb
@@ -392,7 +408,6 @@ files:
392
408
  - lib/swarm_sdk/plugin_registry.rb
393
409
  - lib/swarm_sdk/proc_helpers.rb
394
410
  - lib/swarm_sdk/prompts/base_system_prompt.md.erb
395
- - lib/swarm_sdk/providers/openai_with_responses.rb
396
411
  - lib/swarm_sdk/restore_result.rb
397
412
  - lib/swarm_sdk/result.rb
398
413
  - lib/swarm_sdk/snapshot.rb
@@ -403,6 +418,9 @@ files:
403
418
  - lib/swarm_sdk/swarm/agent_initializer.rb
404
419
  - lib/swarm_sdk/swarm/all_agents_builder.rb
405
420
  - lib/swarm_sdk/swarm/builder.rb
421
+ - lib/swarm_sdk/swarm/executor.rb
422
+ - lib/swarm_sdk/swarm/hook_triggers.rb
423
+ - lib/swarm_sdk/swarm/logging_callbacks.rb
406
424
  - lib/swarm_sdk/swarm/mcp_configurator.rb
407
425
  - lib/swarm_sdk/swarm/swarm_registry_builder.rb
408
426
  - lib/swarm_sdk/swarm/tool_configurator.rb
@@ -440,6 +458,12 @@ files:
440
458
  - lib/swarm_sdk/utils.rb
441
459
  - lib/swarm_sdk/validation_result.rb
442
460
  - lib/swarm_sdk/version.rb
461
+ - lib/swarm_sdk/workflow.rb
462
+ - lib/swarm_sdk/workflow/agent_config.rb
463
+ - lib/swarm_sdk/workflow/builder.rb
464
+ - lib/swarm_sdk/workflow/executor.rb
465
+ - lib/swarm_sdk/workflow/node_builder.rb
466
+ - lib/swarm_sdk/workflow/transformer_executor.rb
443
467
  - llms.claude-swarm.txt
444
468
  - rubocop/cop/security/no_reflection_methods.rb
445
469
  - rubocop/cop/security/no_ruby_llm_logger.rb
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SwarmMemory
4
- # Extension module for SwarmSDK::Agent::Chat
5
- #
6
- # Adds individual tool removal capability needed for:
7
- # 1. Mode-based tool filtering (retrieval/interactive/researcher)
8
- # 2. LoadSkill's fine-grained tool swapping
9
- #
10
- # This is injected into SwarmSDK::Agent::Chat when SwarmMemory is loaded.
11
- module ChatExtension
12
- # Remove a specific tool by name
13
- #
14
- # Used by SwarmMemory to filter tools based on memory mode.
15
- # Unlike remove_mutable_tools (which removes ALL mutable tools),
16
- # this removes a single tool by name.
17
- #
18
- # @param tool_name [String, Symbol] Tool name to remove
19
- # @return [void]
20
- def remove_tool(tool_name)
21
- tool_sym = tool_name.to_sym
22
- tool_str = tool_name.to_s
23
-
24
- # Remove from @tools hash (tools are keyed by symbol)
25
- @tools.delete(tool_sym)
26
- @tools.delete(tool_str)
27
- end
28
- end
29
- end
30
-
31
- # Inject into SwarmSDK when both gems are loaded
32
- if defined?(SwarmSDK::Agent::Chat)
33
- SwarmSDK::Agent::Chat.include(SwarmMemory::ChatExtension)
34
- end