swarm_cli 2.1.1 → 2.1.2
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/lib/swarm_cli/commands/mcp_serve.rb +2 -2
- data/lib/swarm_cli/config_loader.rb +3 -3
- data/lib/swarm_cli/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: ce573683afe4e8fbb1d144984c0b476db2dac070f490a62b0b1e3b7b32a3622e
|
|
4
|
+
data.tar.gz: e4b3a5f950a7c007ed543f00d55603b17fad3db31748a4fdce6348de680764e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 53f75f25ffe8d8a531db038274fc1d5853a56271215eacded92dba259737f3cc2f3d61e9dd9cd20b8c8273884a7156638e6646b58fccd44ece644637a362ba16
|
|
7
|
+
data.tar.gz: 9298ef6cda98c97db7ff9fea9c5f2176a2285dbcc74a24ef729f43ac2cca04a803f3a9d38aed68f8900c45c95f2697c24038e96909362c25e0b932ebaab3d5eb
|
|
@@ -29,7 +29,7 @@ module SwarmCLI
|
|
|
29
29
|
|
|
30
30
|
# Validate the swarm configuration
|
|
31
31
|
begin
|
|
32
|
-
SwarmSDK
|
|
32
|
+
SwarmSDK.load_file(config_path)
|
|
33
33
|
rescue SwarmSDK::ConfigurationError => e
|
|
34
34
|
$stderr.puts "Error: Invalid swarm configuration: #{e.message}"
|
|
35
35
|
exit(1)
|
|
@@ -92,7 +92,7 @@ module SwarmCLI
|
|
|
92
92
|
|
|
93
93
|
define_method(:call) do |task:, description: nil, thinking_budget: nil|
|
|
94
94
|
# Load swarm for each execution (ensures fresh state)
|
|
95
|
-
swarm = SwarmSDK
|
|
95
|
+
swarm = SwarmSDK.load_file(self.class.config_path)
|
|
96
96
|
|
|
97
97
|
# Build prompt with thinking budget if provided
|
|
98
98
|
prompt = task
|
|
@@ -4,7 +4,7 @@ module SwarmCLI
|
|
|
4
4
|
# ConfigLoader handles loading swarm configurations from both YAML and Ruby DSL files.
|
|
5
5
|
#
|
|
6
6
|
# Supports:
|
|
7
|
-
# - YAML files (.yml, .yaml) - loaded via SwarmSDK
|
|
7
|
+
# - YAML files (.yml, .yaml) - loaded via SwarmSDK.load_file
|
|
8
8
|
# - Ruby DSL files (.rb) - executed and expected to return a SwarmSDK::Swarm or SwarmSDK::NodeOrchestrator instance
|
|
9
9
|
#
|
|
10
10
|
# @example Load YAML config
|
|
@@ -18,7 +18,7 @@ module SwarmCLI
|
|
|
18
18
|
# Load a swarm configuration from file (YAML or Ruby DSL)
|
|
19
19
|
#
|
|
20
20
|
# Detects file type by extension:
|
|
21
|
-
# - .yml, .yaml -> Load as YAML using SwarmSDK
|
|
21
|
+
# - .yml, .yaml -> Load as YAML using SwarmSDK.load_file
|
|
22
22
|
# - .rb -> Execute as Ruby DSL and expect SwarmSDK::Swarm or SwarmSDK::NodeOrchestrator instance
|
|
23
23
|
#
|
|
24
24
|
# @param path [String, Pathname] Path to configuration file
|
|
@@ -50,7 +50,7 @@ module SwarmCLI
|
|
|
50
50
|
# @param path [Pathname] Path to YAML file
|
|
51
51
|
# @return [SwarmSDK::Swarm] Configured swarm instance
|
|
52
52
|
def load_yaml(path)
|
|
53
|
-
SwarmSDK
|
|
53
|
+
SwarmSDK.load_file(path.to_s)
|
|
54
54
|
rescue SwarmSDK::ConfigurationError => e
|
|
55
55
|
# Re-raise with CLI context
|
|
56
56
|
raise ConfigurationError, "Configuration error in #{path}: #{e.message}"
|
data/lib/swarm_cli/version.rb
CHANGED