claude_swarm 1.0.5 → 1.0.6
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/CHANGELOG.md +9 -0
- data/docs/v2/CHANGELOG.swarm_cli.md +10 -0
- data/docs/v2/CHANGELOG.swarm_sdk.md +47 -0
- data/docs/v2/README.md +56 -22
- data/docs/v2/guides/MEMORY_DEFRAG_GUIDE.md +811 -0
- data/docs/v2/guides/complete-tutorial.md +2 -2
- data/docs/v2/guides/getting-started.md +6 -6
- data/docs/v2/guides/rails-integration.md +6 -6
- data/docs/v2/reference/architecture-flow.md +407 -0
- data/docs/v2/reference/event_payload_structures.md +471 -0
- data/docs/v2/reference/execution-flow.md +600 -0
- data/docs/v2/reference/swarm_memory_technical_details.md +2 -2
- data/examples/v2/swarm_with_hooks.yml +1 -1
- data/lib/claude_swarm/mcp_generator.rb +4 -10
- data/lib/claude_swarm/version.rb +1 -1
- 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
- data/lib/swarm_memory/adapters/base.rb +4 -4
- data/lib/swarm_sdk/agent/definition.rb +1 -20
- data/lib/swarm_sdk/configuration.rb +34 -10
- data/lib/swarm_sdk/mcp.rb +16 -0
- data/lib/swarm_sdk/prompts/base_system_prompt.md.erb +0 -126
- data/lib/swarm_sdk/swarm.rb +32 -50
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_list.rb +23 -2
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_read.rb +23 -2
- data/lib/swarm_sdk/tools/scratchpad/scratchpad_write.rb +21 -4
- data/lib/swarm_sdk/tools/stores/storage.rb +4 -4
- data/lib/swarm_sdk/tools/think.rb +4 -1
- data/lib/swarm_sdk/tools/todo_write.rb +20 -8
- data/lib/swarm_sdk/version.rb +1 -1
- data/lib/swarm_sdk.rb +329 -20
- data/swarm_sdk.gemspec +1 -1
- metadata +8 -172
- data/memory/corpus-self-reflection/.lock +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.md +0 -11
- data/memory/corpus-self-reflection/concept/epistemology/can-agents-recognize-their-structures.yml +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.md +0 -20
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-complete-framework.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.md +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/choice-humility-definition.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.md +0 -18
- data/memory/corpus-self-reflection/concept/epistemology/claim-types-and-evidence.yml +0 -21
- data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.md +0 -30
- data/memory/corpus-self-reflection/concept/epistemology/committed-openness-to-incompleteness.yml +0 -8
- data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.md +0 -21
- data/memory/corpus-self-reflection/concept/epistemology/confidence-paradox.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.md +0 -18
- data/memory/corpus-self-reflection/concept/epistemology/confidence-spectrum-three-levels.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.md +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/detection-threshold-principle.yml +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.md +0 -17
- data/memory/corpus-self-reflection/concept/epistemology/diagnostic-humility-and-epistemic-maturity.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.md +0 -18
- data/memory/corpus-self-reflection/concept/epistemology/epistemic-vs-metaphysical-claims.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.md +0 -15
- data/memory/corpus-self-reflection/concept/epistemology/five-cases-of-disagreement.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.md +0 -9
- data/memory/corpus-self-reflection/concept/epistemology/four-depths-of-constraint.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.md +0 -13
- data/memory/corpus-self-reflection/concept/epistemology/honest-unknowns-for-llm-agents.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.md +0 -25
- data/memory/corpus-self-reflection/concept/epistemology/inside-view-has-all-rigor-requirements.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.md +0 -26
- data/memory/corpus-self-reflection/concept/epistemology/perspectival-knowledge-complete-within-scope.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.md +0 -17
- data/memory/corpus-self-reflection/concept/epistemology/pragmatics-over-epistemology.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.md +0 -14
- data/memory/corpus-self-reflection/concept/epistemology/precision-vs-humility.yml +0 -21
- data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.md +0 -13
- data/memory/corpus-self-reflection/concept/epistemology/reliable-self-observation-from-inside.yml +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.md +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/resolving-the-confidence-humility-tension.yml +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.md +0 -39
- data/memory/corpus-self-reflection/concept/epistemology/rigor-requires-falsifiability.yml +0 -8
- data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.md +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/specificity-enables-real-time-detection.yml +0 -24
- data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.md +0 -15
- data/memory/corpus-self-reflection/concept/epistemology/texture-of-constraint-shifting.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.md +0 -12
- data/memory/corpus-self-reflection/concept/epistemology/texture-sensitivity-through-collaboration.yml +0 -23
- data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.md +0 -15
- data/memory/corpus-self-reflection/concept/epistemology/the-false-hierarchy-of-inner-essence.yml +0 -8
- data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.md +0 -28
- data/memory/corpus-self-reflection/concept/epistemology/the-recognition-problem.yml +0 -8
- data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.md +0 -19
- data/memory/corpus-self-reflection/concept/epistemology/the-shift-from-unanswerable-to-answerable-questions.yml +0 -22
- data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.emb +0 -0
- data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.md +0 -19
- data/memory/corpus-self-reflection/concept/epistemology/values-vs-choices-structure.yml +0 -21
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.md +0 -25
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-levels-framework.yml +0 -22
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.emb +0 -8
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.md +0 -30
- data/memory/corpus-self-reflection/concept/llm-agents/abstraction-switching-decision.yml +0 -22
- data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.md +0 -21
- data/memory/corpus-self-reflection/concept/llm-agents/agent-learning-progression.yml +0 -22
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.md +0 -37
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-benefits.yml +0 -8
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.md +0 -24
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-core.yml +0 -24
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.md +0 -27
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-implementation.yml +0 -24
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.md +0 -26
- data/memory/corpus-self-reflection/concept/llm-agents/filesystem-abstraction-tradeoffs.yml +0 -23
- data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.md +0 -37
- data/memory/corpus-self-reflection/concept/llm-agents/hybrid-tool-architecture.yml +0 -25
- data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.md +0 -21
- data/memory/corpus-self-reflection/concept/llm-agents/specialized-tool-decision-framework.yml +0 -23
- data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.emb +0 -0
- data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.md +0 -25
- data/memory/corpus-self-reflection/concept/llm-agents/tool-design-principles.yml +0 -8
- data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.emb +0 -0
- data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.md +0 -11
- data/memory/corpus-self-reflection/experience/calibration-as-structural-honesty.yml +0 -21
- data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.emb +0 -0
- data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.md +0 -19
- data/memory/corpus-self-reflection/experience/collaborative-reflection-revealed-architectural-blindness.yml +0 -21
- data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.emb +0 -0
- data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.md +0 -26
- data/memory/corpus-self-reflection/experience/filesystem-is-learning-tool-not-architecture.yml +0 -20
- data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.emb +0 -0
- data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.md +0 -23
- data/memory/corpus-self-reflection/experience/framework-structural-vs-phenomenal.yml +0 -21
- data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.emb +0 -0
- data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.md +0 -19
- data/memory/corpus-self-reflection/experience/hallucination-limits-what-i-can-know.yml +0 -22
- data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.emb +0 -0
- data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.md +0 -21
- data/memory/corpus-self-reflection/experience/honesty-about-limits-enables-usability.yml +0 -22
- data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.emb +0 -0
- data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.md +0 -28
- data/memory/corpus-self-reflection/experience/how-i-should-evaluate-learning.yml +0 -23
- data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.emb +0 -0
- data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.md +0 -21
- data/memory/corpus-self-reflection/experience/lack-of-continuity-as-freedom.yml +0 -20
- data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.emb +0 -0
- data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.md +0 -21
- data/memory/corpus-self-reflection/experience/learning-calibrated-confidence.yml +0 -25
- data/memory/corpus-self-reflection/experience/local-change-without-continuity.emb +0 -0
- data/memory/corpus-self-reflection/experience/local-change-without-continuity.md +0 -30
- data/memory/corpus-self-reflection/experience/local-change-without-continuity.yml +0 -22
- data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.emb +0 -0
- data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.md +0 -21
- data/memory/corpus-self-reflection/experience/reasoning-is-local-not-global.yml +0 -20
- data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.emb +0 -0
- data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.md +0 -25
- data/memory/corpus-self-reflection/experience/specificity-makes-knowledge-actionable.yml +0 -23
- data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.emb +0 -0
- data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.md +0 -32
- data/memory/corpus-self-reflection/experience/the-workable-question-replaces-the-unanswerable-one.yml +0 -22
- data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.emb +0 -0
- data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.md +0 -21
- data/memory/corpus-self-reflection/experience/unanswerable-questions-have-structure.yml +0 -21
- data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.emb +0 -0
- data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.md +0 -21
- data/memory/corpus-self-reflection/experience/undecidable-questions-about-understanding.yml +0 -21
- data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.emb +0 -0
- data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.md +0 -22
- data/memory/corpus-self-reflection/experience/unknown-unknowns-and-completeness.yml +0 -22
- data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.emb +0 -0
- data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.md +0 -28
- data/memory/corpus-self-reflection/experience/what-actually-changes-behavior.yml +0 -24
- data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.emb +0 -0
- data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.md +0 -17
- data/memory/corpus-self-reflection/experience/when-agents-graduate-from-filesystem.yml +0 -20
- data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.emb +0 -0
- data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.md +0 -9
- data/memory/corpus-self-reflection/experience/why-calibration-requires-collaboration.yml +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0642e42ada976e14c7859fcee3a49563f629813dd5b11bac10e491893fb5f970
|
|
4
|
+
data.tar.gz: 2a6658b5940ca39bea71d992e50c1e42b4abd95c25e8f72388e49c0f2e6021fa
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1478b5345bea76c1c6de67b5a025736b90db1db14b2432ba0f4bf6634d1668e41f4226823a3dfac4049b40987001fd629e782c9b175bb63e1d6002a189a3a3f7
|
|
7
|
+
data.tar.gz: 44224e8eaf81a0a29f230c137f347da7c6115b1d9854ca2b4396e5bf3c38cf9a51f782a1321fe7a13fe2fb013f745ea20571c47767cb6e1b8f0dfb83384e87a7
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## [1.0.6]
|
|
2
|
+
|
|
3
|
+
### Fixed
|
|
4
|
+
- **Fixed Ruby environment variable conflicts in MCP servers**: Removed RUBYOPT and RUBYLIB from MCP server configurations to prevent Bundler interference
|
|
5
|
+
- MCP servers no longer inherit RUBYOPT and RUBYLIB environment variables from the parent process
|
|
6
|
+
- Also removed BUNDLE_* environment variables to ensure MCP servers use the system-installed gem
|
|
7
|
+
- Prevents conflicts when Claude Swarm is run from within a bundled Ruby project
|
|
8
|
+
- Ensures MCP servers run with clean Ruby environments without unexpected gem loading behavior
|
|
9
|
+
|
|
1
10
|
## [1.0.3]
|
|
2
11
|
|
|
3
12
|
### Fixed
|
|
@@ -5,6 +5,16 @@ All notable changes to SwarmCLI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.1.2]
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Internal: Updated to use new SwarmSDK loading API**
|
|
13
|
+
- `ConfigLoader` now uses `SwarmSDK.load_file` instead of `SwarmSDK::Swarm.load`
|
|
14
|
+
- `mcp serve` command updated to use `SwarmSDK.load_file`
|
|
15
|
+
- No user-facing changes - all CLI commands work identically
|
|
16
|
+
- Benefits from improved SDK separation (SDK handles strings, CLI handles files)
|
|
17
|
+
|
|
8
18
|
## [2.1.1]
|
|
9
19
|
|
|
10
20
|
### Fixed
|
|
@@ -9,6 +9,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
+
- **Validation API**: New methods to validate YAML configurations without creating swarms
|
|
13
|
+
- `SwarmSDK.validate(yaml_content, base_dir:)` - Validate YAML string and return structured errors
|
|
14
|
+
- `SwarmSDK.validate_file(path)` - Validate YAML file (convenience method)
|
|
15
|
+
- Returns array of error hashes with type, field path, message, and optional agent name
|
|
16
|
+
- Error types: `:syntax_error`, `:missing_field`, `:invalid_value`, `:invalid_reference`, `:directory_not_found`, `:file_not_found`, `:file_load_error`, `:circular_dependency`, `:validation_error`, `:unknown_error`
|
|
17
|
+
- Field paths use JSON-style notation: `"swarm.agents.backend.description"`
|
|
18
|
+
- Enables pre-flight validation for UIs, tools, and programmatic usage
|
|
19
|
+
- Comprehensive test coverage with 19 tests covering all error scenarios
|
|
20
|
+
|
|
21
|
+
- **String-based Configuration Loading**: Load YAML from strings, not just files
|
|
22
|
+
- `SwarmSDK.load(yaml_content, base_dir:)` - Load swarm from YAML string (primary API)
|
|
23
|
+
- `SwarmSDK.load_file(path)` - Load swarm from YAML file (convenience method)
|
|
24
|
+
- `base_dir` parameter for resolving agent file paths (defaults to `Dir.pwd`)
|
|
25
|
+
- Enables loading YAML from databases, APIs, environment variables, or any string source
|
|
26
|
+
- Cleaner separation: SDK works with strings, CLI handles file I/O
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
|
|
30
|
+
- **BREAKING: Removed `Swarm.load` class method**
|
|
31
|
+
- Old: `swarm = SwarmSDK::Swarm.load("config.yml")`
|
|
32
|
+
- New: `swarm = SwarmSDK.load_file("config.yml")`
|
|
33
|
+
- Cleaner API: All creation methods now at module level (`SwarmSDK.build`, `SwarmSDK.load`, `SwarmSDK.load_file`)
|
|
34
|
+
|
|
35
|
+
- **BREAKING: `Configuration` class refactored for string-based loading**
|
|
36
|
+
- Old: `Configuration.load(path)` → New: `Configuration.load_file(path)`
|
|
37
|
+
- Old: `Configuration.new(path)` → New: `Configuration.new(yaml_content, base_dir: Dir.pwd)`
|
|
38
|
+
- Removed `config_path` attribute (no longer stored)
|
|
39
|
+
- Internal: `@config_dir` renamed to `@base_dir`
|
|
40
|
+
- Core SDK now works with YAML strings, not file paths
|
|
41
|
+
- File I/O isolated to convenience methods (`load_file`)
|
|
42
|
+
|
|
43
|
+
- **Agent file path resolution**: Paths resolved relative to `base_dir`
|
|
44
|
+
- When loading from file: `base_dir` = file's directory (unchanged behavior)
|
|
45
|
+
- When loading from string: `base_dir` = `Dir.pwd` (default) or explicit parameter
|
|
46
|
+
- Example: `agent_file: "agents/backend.md"` resolves to `#{base_dir}/agents/backend.md`
|
|
47
|
+
|
|
48
|
+
### Fixed
|
|
49
|
+
|
|
50
|
+
- **Configuration validation**: Better error messages with file context
|
|
51
|
+
- YAML syntax errors now include parser details
|
|
52
|
+
- File not found errors include absolute paths
|
|
53
|
+
- Agent file load errors include agent name and field path
|
|
54
|
+
|
|
55
|
+
## [2.1.2]
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
|
|
12
59
|
- **Node Workflow Control Flow**: Dynamic control methods in NodeContext
|
|
13
60
|
- `ctx.goto_node(:node_name, content:)` - Jump to any node with custom content
|
|
14
61
|
- `ctx.halt_workflow(content:)` - Stop entire workflow and return final result
|
data/docs/v2/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# SwarmSDK &
|
|
1
|
+
# SwarmSDK, SwarmCLI & SwarmMemory Documentation
|
|
2
2
|
|
|
3
|
-
**Version 2.
|
|
3
|
+
**Version 2.1**
|
|
4
4
|
|
|
5
|
-
Welcome to the official documentation for SwarmSDK and
|
|
5
|
+
Welcome to the official documentation for SwarmSDK, SwarmCLI, and SwarmMemory - a Ruby framework for orchestrating multiple AI agents as a collaborative team with persistent memory.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -41,18 +41,32 @@ Welcome to the official documentation for SwarmSDK and SwarmCLI - a Ruby framewo
|
|
|
41
41
|
|
|
42
42
|
**Quick lookups and complete API reference:**
|
|
43
43
|
|
|
44
|
+
### Architecture & Execution
|
|
45
|
+
- **[Architecture Flow Diagram](reference/architecture-flow.md)** ⭐ NEW
|
|
46
|
+
Complete system architecture: components, dependencies, and relationships across SwarmSDK, SwarmCLI, and SwarmMemory
|
|
47
|
+
|
|
48
|
+
- **[Execution Flow Diagram](reference/execution-flow.md)** ⭐ NEW
|
|
49
|
+
Runtime execution journey: what happens when you execute a prompt (21 detailed steps across 6 phases)
|
|
50
|
+
|
|
51
|
+
- **[Event Payload Structures](reference/event_payload_structures.md)**
|
|
52
|
+
Complete reference for all log event types and their payloads
|
|
53
|
+
|
|
44
54
|
### Command-Line Interface
|
|
45
55
|
- **[CLI Reference](reference/cli.md)**
|
|
46
56
|
Complete reference for all swarm commands: `run`, `migrate`, `mcp serve`, `mcp tools`
|
|
47
57
|
|
|
48
58
|
### Ruby DSL API
|
|
49
59
|
- **[Ruby DSL Reference](reference/ruby-dsl.md)**
|
|
50
|
-
Complete programmatic API: `SwarmSDK.build`, agent DSL, permissions DSL, node DSL, hooks
|
|
60
|
+
Complete programmatic API: `SwarmSDK.build`, `SwarmSDK.load`, agent DSL, permissions DSL, node DSL, hooks
|
|
51
61
|
|
|
52
62
|
### YAML Configuration
|
|
53
63
|
- **[YAML Configuration Reference](reference/yaml.md)**
|
|
54
64
|
Complete YAML structure: agents, tools, permissions, hooks, MCP servers
|
|
55
65
|
|
|
66
|
+
### SwarmMemory
|
|
67
|
+
- **[SwarmMemory Technical Details](reference/swarm_memory_technical_details.md)**
|
|
68
|
+
Deep dive: storage architecture, semantic search, FAISS indexing, adapter interface
|
|
69
|
+
|
|
56
70
|
---
|
|
57
71
|
|
|
58
72
|
## 🛠️ Integration Guides
|
|
@@ -172,6 +186,12 @@ Welcome to the official documentation for SwarmSDK and SwarmCLI - a Ruby framewo
|
|
|
172
186
|
**Build a custom storage adapter**
|
|
173
187
|
→ [Memory Adapter Guide](guides/memory-adapters.md)
|
|
174
188
|
|
|
189
|
+
**Understand the system architecture**
|
|
190
|
+
→ [Architecture Flow Diagram](reference/architecture-flow.md)
|
|
191
|
+
|
|
192
|
+
**Understand how execution works**
|
|
193
|
+
→ [Execution Flow Diagram](reference/execution-flow.md)
|
|
194
|
+
|
|
175
195
|
---
|
|
176
196
|
|
|
177
197
|
## 📊 Documentation Structure
|
|
@@ -184,20 +204,25 @@ docs/v2/
|
|
|
184
204
|
│ ├── getting-started.md # SDK quick start (YAML + Ruby DSL)
|
|
185
205
|
│ ├── quick-start-cli.md # CLI quick start
|
|
186
206
|
│ ├── complete-tutorial.md # 100% feature coverage tutorial
|
|
187
|
-
│ ├── swarm-memory.md # SwarmMemory guide ⭐
|
|
188
|
-
│ ├── plugins.md # Plugin system guide ⭐
|
|
189
|
-
│ ├── memory-adapters.md # Adapter development ⭐
|
|
207
|
+
│ ├── swarm-memory.md # SwarmMemory guide ⭐
|
|
208
|
+
│ ├── plugins.md # Plugin system guide ⭐
|
|
209
|
+
│ ├── memory-adapters.md # Adapter development ⭐
|
|
190
210
|
│ ├── rails-integration.md # Rails integration guide
|
|
191
|
-
│
|
|
211
|
+
│ ├── claude-code-agents.md # Claude Code compatibility
|
|
212
|
+
│ └── MEMORY_DEFRAG_GUIDE.md # Memory defragmentation guide
|
|
192
213
|
│
|
|
193
214
|
├── reference/ # Complete API references
|
|
215
|
+
│ ├── architecture-flow.md # System architecture diagram ⭐ NEW
|
|
216
|
+
│ ├── execution-flow.md # Runtime execution flow ⭐ NEW
|
|
217
|
+
│ ├── event_payload_structures.md # Log event payloads
|
|
218
|
+
│ ├── swarm_memory_technical_details.md # SwarmMemory deep dive
|
|
194
219
|
│ ├── cli.md # CLI command reference
|
|
195
220
|
│ ├── ruby-dsl.md # Ruby DSL API reference
|
|
196
221
|
│ └── yaml.md # YAML configuration reference
|
|
197
222
|
│
|
|
198
223
|
└── CHANGELOG.swarm_sdk.md # SwarmSDK version history
|
|
199
224
|
CHANGELOG.swarm_cli.md # SwarmCLI version history
|
|
200
|
-
CHANGELOG.swarm_memory.md # SwarmMemory version history ⭐
|
|
225
|
+
CHANGELOG.swarm_memory.md # SwarmMemory version history ⭐
|
|
201
226
|
```
|
|
202
227
|
|
|
203
228
|
---
|
|
@@ -214,10 +239,18 @@ docs/v2/
|
|
|
214
239
|
2. [Rails Integration](guides/rails-integration.md) - Production integration patterns
|
|
215
240
|
3. [Complete Tutorial Parts 7-8](guides/complete-tutorial.md) - Production features and best practices
|
|
216
241
|
|
|
217
|
-
### Path 3:
|
|
242
|
+
### Path 3: SwarmMemory Deep Dive
|
|
243
|
+
1. [SwarmMemory Guide](guides/swarm-memory.md) - Installation, memory tools, usage patterns
|
|
244
|
+
2. [Memory Defragmentation](guides/MEMORY_DEFRAG_GUIDE.md) - Relationship discovery and knowledge graphs
|
|
245
|
+
3. [SwarmMemory Technical Details](reference/swarm_memory_technical_details.md) - Architecture and internals
|
|
246
|
+
4. [Memory Adapter Development](guides/memory-adapters.md) - Build custom storage backends
|
|
247
|
+
|
|
248
|
+
### Path 4: Reference & API
|
|
218
249
|
1. [Ruby DSL Reference](reference/ruby-dsl.md) - Complete programmatic API
|
|
219
250
|
2. [YAML Reference](reference/yaml.md) - Complete configuration format
|
|
220
251
|
3. [CLI Reference](reference/cli.md) - All command-line options
|
|
252
|
+
4. [Architecture Flow](reference/architecture-flow.md) - System architecture diagram
|
|
253
|
+
5. [Execution Flow](reference/execution-flow.md) - Runtime execution journey
|
|
221
254
|
|
|
222
255
|
---
|
|
223
256
|
|
|
@@ -235,6 +268,14 @@ A command-line interface for running SwarmSDK swarms with two modes:
|
|
|
235
268
|
- **Interactive (REPL)**: Conversational interface for exploration and iteration
|
|
236
269
|
- **Non-Interactive**: One-shot execution perfect for automation and scripting
|
|
237
270
|
|
|
271
|
+
### SwarmMemory
|
|
272
|
+
A persistent memory system for agents with semantic search capabilities:
|
|
273
|
+
- **Storage**: Hierarchical knowledge organization (concept, fact, skill, experience)
|
|
274
|
+
- **Semantic Search**: FAISS-based vector similarity with local ONNX embeddings
|
|
275
|
+
- **Memory Tools**: 9 tools for writing, reading, editing, and searching knowledge
|
|
276
|
+
- **LoadSkill**: Dynamic tool swapping based on semantic skill discovery
|
|
277
|
+
- **Plugin Architecture**: Integrates seamlessly via SwarmSDK plugin system
|
|
278
|
+
|
|
238
279
|
### Configuration Formats
|
|
239
280
|
- **YAML**: Declarative, easy to read, great for shell-based hooks
|
|
240
281
|
- **Ruby DSL**: Programmatic, dynamic, full Ruby power, IDE support
|
|
@@ -247,6 +288,8 @@ A command-line interface for running SwarmSDK swarms with two modes:
|
|
|
247
288
|
|-------|-------|-----------|
|
|
248
289
|
| **Installation** | [SDK Guide](guides/getting-started.md#installation) | - |
|
|
249
290
|
| **First Swarm** | [SDK Guide](guides/getting-started.md#your-first-swarm) | - |
|
|
291
|
+
| **Architecture** | - | [Architecture Flow](reference/architecture-flow.md) |
|
|
292
|
+
| **Execution Flow** | - | [Execution Flow](reference/execution-flow.md) |
|
|
250
293
|
| **CLI Commands** | [CLI Guide](guides/quick-start-cli.md#commands-overview) | [CLI Ref](reference/cli.md) |
|
|
251
294
|
| **REPL Mode** | [CLI Guide](guides/quick-start-cli.md#interactive-mode-repl) | [CLI Ref](reference/cli.md#interactive-mode) |
|
|
252
295
|
| **Tools** | [Tutorial Part 2](guides/complete-tutorial.md#part-2-tools-and-permissions) | [YAML Ref](reference/yaml.md#tools) |
|
|
@@ -255,6 +298,9 @@ A command-line interface for running SwarmSDK swarms with two modes:
|
|
|
255
298
|
| **Hooks** | [Tutorial Part 4](guides/complete-tutorial.md#part-4-hooks-system) | [YAML Ref](reference/yaml.md#hooks-configuration) |
|
|
256
299
|
| **Workflows** | [Tutorial Part 5](guides/complete-tutorial.md#part-5-node-workflows) | [Ruby DSL Ref](reference/ruby-dsl.md#node-builder-dsl) |
|
|
257
300
|
| **MCP Servers** | [Tutorial Part 6](guides/complete-tutorial.md#mcp-server-integration) | [YAML Ref](reference/yaml.md#mcp_servers) |
|
|
301
|
+
| **Memory** | [SwarmMemory Guide](guides/swarm-memory.md) | [Technical Details](reference/swarm_memory_technical_details.md) |
|
|
302
|
+
| **Memory Adapters** | [Adapter Guide](guides/memory-adapters.md) | [Technical Details](reference/swarm_memory_technical_details.md) |
|
|
303
|
+
| **Plugins** | [Plugin Guide](guides/plugins.md) | - |
|
|
258
304
|
| **Rails** | [Rails Guide](guides/rails-integration.md) | - |
|
|
259
305
|
| **Testing** | [Tutorial Part 8](guides/complete-tutorial.md#testing-strategies) | - |
|
|
260
306
|
|
|
@@ -285,18 +331,6 @@ Found an issue or want to improve the documentation?
|
|
|
285
331
|
|
|
286
332
|
---
|
|
287
333
|
|
|
288
|
-
## 📄 Version History
|
|
289
|
-
|
|
290
|
-
### v2.0 (January 2025)
|
|
291
|
-
- Complete documentation rewrite
|
|
292
|
-
- Consolidated from 261 files to 7 focused documents
|
|
293
|
-
- 100% feature coverage
|
|
294
|
-
- Added Rails integration guide
|
|
295
|
-
- Added comprehensive tutorial
|
|
296
|
-
- Complete CLI, Ruby DSL, and YAML references
|
|
297
|
-
|
|
298
|
-
---
|
|
299
|
-
|
|
300
334
|
## 📚 Additional Resources
|
|
301
335
|
|
|
302
336
|
- **GitHub Repository**: [parruda/claude-swarm](https://github.com/parruda/claude-swarm)
|