swarmauri-base 0.10.1.dev2__tar.gz → 0.11.0.dev1__tar.gz
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.
- swarmauri_base-0.11.0.dev1/PKG-INFO +218 -0
- swarmauri_base-0.11.0.dev1/README.md +183 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/pyproject.toml +16 -6
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ComponentBase.py +4 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/DynamicBase.py +122 -49
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/LoggerMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/TomlMixin.py +8 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/YamlMixin.py +8 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentBase.py +7 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentSystemContextMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OAuth20AppClientBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OAuth20LoginBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OAuth21AppClientBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OAuth21LoginBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OIDC10AppClientBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/http.py +6 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/utils.py +9 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/BillingProviderBase.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/CustomersMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/HostedCheckoutMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/OnlinePaymentsMixin.py +10 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/PaymentMethodsMixin.py +12 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/ProductsPricesMixin.py +6 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/RefundsMixin.py +13 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/SubscriptionsMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/WebhooksMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/refs.py +41 -16
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/specs.py +78 -30
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/certs/CertServiceBase.py +17 -6
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chains/ChainBase.py +6 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chains/ChainContextBase.py +4 -5
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chains/ChainStepBase.py +5 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chains/PromptContextChainBase.py +33 -13
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chunkers/ChunkerBase.py +4 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/cipher_suites/CipherSuiteBase.py +9 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/conversations/ConversationBase.py +10 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/crypto/CryptoBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/dataconnectors/DataConnectorBase.py +14 -7
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/distances/DistanceBase.py +24 -7
- swarmauri_base-0.11.0.dev1/swarmauri_base/distances/VisionDistanceBase.py +24 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/document_stores/DocumentStoreBase.py +13 -6
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/documents/DocumentBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/embeddings/EmbeddingBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/embeddings/VisionEmbeddingBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ensembles/EnsembleBase.py +7 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluator_pools/EvaluatorPoolBase.py +37 -19
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluator_results/EvalResultBase.py +9 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluators/EvaluatorBase.py +36 -14
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/factories/FactoryBase.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/git_filters/GitFilterBase.py +10 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/image_gens/ImageGenBase.py +19 -6
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/inner_products/InnerProductBase.py +33 -10
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/key_providers/KeyProviderBase.py +37 -14
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/key_providers/loaders.py +8 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/llms/LLMBase.py +13 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/loggers/LoggerBase.py +10 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/matrices/MatrixBase.py +33 -11
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/measurements/MeasurementAggregateMixin.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/measurements/MeasurementBase.py +2 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/measurements/MeasurementCalculateMixin.py +11 -5
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/messages/MessageBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/metrics/MetricBase.py +32 -10
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/middlewares/MiddlewareBase.py +9 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/mre_crypto/MreCryptoBase.py +9 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/norms/NormBase.py +55 -20
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/norms/UseInnerProductMixin.py +11 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ocrs/OCRBase.py +13 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/parsers/ParserBase.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pipelines/PipelineBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/PopSigningBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/PopVerifierMixin.py +17 -5
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/binding.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/programs/ProgramBase.py +14 -6
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompt_templates/PromptTemplateBase.py +7 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompts/PromptBase.py +11 -5
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompts/PromptGeneratorBase.py +12 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompts/PromptMatrixBase.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pseudometrics/PseudometricBase.py +30 -11
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/publishers/PublishBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/rate_limits/RateLimitBase.py +9 -3
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/schema_converters/SchemaConverterBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/secrets/__init__.py +6 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/seminorms/SeminormBase.py +23 -8
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/signing/SigningBase.py +30 -9
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/similarities/SimilarityBase.py +21 -9
- swarmauri_base-0.11.0.dev1/swarmauri_base/skills/FileSystemSkillMixin.py +85 -0
- swarmauri_base-0.11.0.dev1/swarmauri_base/skills/LocalSkillMixin.py +28 -0
- swarmauri_base-0.11.0.dev1/swarmauri_base/skills/SkillBase.py +115 -0
- swarmauri_base-0.11.0.dev1/swarmauri_base/skills/__init__.py +5 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/state/StateBase.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/storage/StorageAdapterBase.py +90 -7
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/stt/STTBase.py +13 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/swarms/SwarmBase.py +6 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/task_mgmt_strategies/TaskMgmtStrategyBase.py +7 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tensors/TensorBase.py +65 -22
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tokens/TokenServiceBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tool_llms/ToolLLMBase.py +39 -15
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/toolkits/ToolkitBase.py +20 -8
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tools/ParameterBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tools/ToolBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/appserver_mixin.py +5 -2
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/mixins.py +4 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tts/TTSBase.py +13 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VectorStoreBase.py +19 -8
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VectorStoreCloudMixin.py +2 -1
- swarmauri_base-0.11.0.dev1/swarmauri_base/vector_stores/VectorStoreComparator.py +115 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VectorStorePersistentMixin.py +11 -4
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VectorStoreRetrieveMixin.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VectorStoreSaveLoadMixin.py +24 -9
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vector_stores/VisionVectorStoreBase.py +3 -1
- swarmauri_base-0.11.0.dev1/swarmauri_base/vector_stores/__init__.py +13 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vectors/VectorBase.py +3 -1
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/vlms/VLMBase.py +16 -5
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/xmp/EmbedXmpBase.py +4 -1
- swarmauri_base-0.10.1.dev2/PKG-INFO +0 -245
- swarmauri_base-0.10.1.dev2/README.md +0 -215
- swarmauri_base-0.10.1.dev2/swarmauri_base/distances/VisionDistanceBase.py +0 -9
- swarmauri_base-0.10.1.dev2/swarmauri_base/vlms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/LICENSE +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ObserveBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ServiceMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentConversationMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentRetrieveMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentToolMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/AgentVectorStoreMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/agents/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/OIDC10LoginBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/auth_idp/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/BalanceTransfersMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/InvoicingMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/MarketplaceMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/PayoutsMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/PromotionsMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/ReportsMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/RiskMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/mixins.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/billing/utils.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/certs/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chains/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/chunkers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/cipher_suites/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/conversations/ConversationSystemContextMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/conversations/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/crypto/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/dataconnectors/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/distances/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/document_stores/DocumentStoreRetrieveBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/document_stores/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/documents/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/embeddings/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ensembles/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluator_pools/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluator_results/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/evaluators/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/factories/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/git_filters/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/glogging.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/image_gens/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/inner_products/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/key_providers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/llms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/logger_formatters/FormatterBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/logger_formatters/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/logger_handlers/HandlerBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/logger_handlers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/loggers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/matrices/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/measurements/MeasurementThresholdMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/measurements/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/messages/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/metrics/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/middlewares/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/mre_crypto/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/norms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/ocrs/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/parsers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pipelines/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/PopSignerMixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pop/util.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/programs/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompt_templates/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/prompts/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/pseudometrics/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/publishers/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/rate_limits/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/schema_converters/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/seminorms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/service_registries/ServiceRegistryBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/service_registries/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/signing/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/similarities/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/state/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/storage/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/stt/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/swarms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/task_mgmt_strategies/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tensors/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tokens/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tool_llms/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/toolkits/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tools/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/TransportBase.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/http_client_mixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/http_server_mixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/multiplex_mixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/peer_mixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/transports/runnable_mixin.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/tts/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2/swarmauri_base/vector_stores → swarmauri_base-0.11.0.dev1/swarmauri_base/vectors}/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2/swarmauri_base/vectors → swarmauri_base-0.11.0.dev1/swarmauri_base/vlms}/__init__.py +0 -0
- {swarmauri_base-0.10.1.dev2 → swarmauri_base-0.11.0.dev1}/swarmauri_base/xmp/__init__.py +0 -0
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: swarmauri_base
|
|
3
|
+
Version: 0.11.0.dev1
|
|
4
|
+
Summary: Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure.
|
|
5
|
+
License-Expression: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Keywords: swarmauri,base-classes,mixins,ai-sdk,component-model,component-registry,composable-intelligence,dynamic-json-schema,discriminated-unions,pydantic,pydantic-models,schema-first,serialization,yaml,toml,plugin-components,typed-components
|
|
8
|
+
Author: Jacob Stewart
|
|
9
|
+
Author-email: jacob@swarmauri.com
|
|
10
|
+
Requires-Python: >=3.10,<3.15
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
25
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
26
|
+
Classifier: Topic :: Text Processing :: Markup
|
|
27
|
+
Requires-Dist: numpy (>=1.26.4)
|
|
28
|
+
Requires-Dist: pydantic (>=2.0)
|
|
29
|
+
Requires-Dist: pyyaml (>=6.0.2)
|
|
30
|
+
Requires-Dist: swarmauri_core
|
|
31
|
+
Requires-Dist: swarmauri_typing
|
|
32
|
+
Requires-Dist: toml (>=0.10.2)
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+

|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="https://pepy.tech/project/swarmauri_base/">
|
|
39
|
+
<img src="https://static.pepy.tech/badge/swarmauri_base/month" alt="PyPI - Downloads"/></a>
|
|
40
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/base/">
|
|
41
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/base.svg"/></a>
|
|
42
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
43
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
44
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
45
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_base" alt="PyPI - License"/></a>
|
|
46
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
47
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_base?label=swarmauri_base&color=green" alt="PyPI - swarmauri_base"/></a>
|
|
48
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
49
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
50
|
+
|
|
51
|
+
# Swarmauri Base
|
|
52
|
+
|
|
53
|
+
`swarmauri_base` provides the reusable base classes, mixins, and dynamic component model used by Swarmauri SDK implementations. It builds on `swarmauri_core` interfaces and adds Pydantic models, typed component registration, JSON/YAML/TOML serialization, logging helpers, service helpers, and base classes for each major component family.
|
|
54
|
+
|
|
55
|
+
## Why Swarmauri Base?
|
|
56
|
+
|
|
57
|
+
`swarmauri_base` turns Swarmauri interfaces into reusable component foundations. It gives implementation packages consistent Pydantic modeling, resource metadata, dynamic subtype registration, serialization, and family-specific base behavior.
|
|
58
|
+
|
|
59
|
+
## FAQ
|
|
60
|
+
|
|
61
|
+
### Q: What is `ComponentBase`?
|
|
62
|
+
|
|
63
|
+
A: `ComponentBase` is the common Pydantic-backed base for Swarmauri components. It carries fields such as `type`, `resource`, `name`, and `version`, and participates in dynamic component registration.
|
|
64
|
+
|
|
65
|
+
### Q: What is `SubclassUnion` used for?
|
|
66
|
+
|
|
67
|
+
A: `SubclassUnion` lets Pydantic models hydrate registered concrete component types from serialized payloads that include a `type` discriminator.
|
|
68
|
+
|
|
69
|
+
### Q: When should I use `swarmauri_base` instead of `swarmauri_core`?
|
|
70
|
+
|
|
71
|
+
A: Use `swarmauri_base` when building a real component implementation. Use `swarmauri_core` when you only need the abstract interface contract.
|
|
72
|
+
|
|
73
|
+
## Features
|
|
74
|
+
|
|
75
|
+
- `ComponentBase` for Pydantic-backed Swarmauri components with `type`, `resource`, `name`, and `version` fields.
|
|
76
|
+
- `DynamicBase` and `SubclassUnion` for discriminated-union deserialization from concrete `type` values.
|
|
77
|
+
- JSON, YAML, and TOML serialization through Pydantic plus Swarmauri mixins.
|
|
78
|
+
- Base classes for agents, chains, chunkers, conversations, documents, embeddings, LLMs, tools, toolkits, vector stores, parsers, prompts, transports, middleware, signing, crypto, key providers, tokens, billing, XMP, and more.
|
|
79
|
+
- Default mixins for logging, service metadata, batch behavior, retrieval behavior, storage behavior, and component-family-specific workflows.
|
|
80
|
+
- Python 3.10, 3.11, 3.12, 3.13, and 3.14 support.
|
|
81
|
+
|
|
82
|
+
## Installation
|
|
83
|
+
|
|
84
|
+
Install with `uv`:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
uv add swarmauri_base
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Install with `pip`:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
pip install swarmauri_base
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Usage
|
|
97
|
+
|
|
98
|
+
Create a typed component by inheriting from `ComponentBase`:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from typing import Literal
|
|
102
|
+
|
|
103
|
+
from swarmauri_base.ComponentBase import ComponentBase
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
@ComponentBase.register_model()
|
|
107
|
+
class StoreConfig(ComponentBase):
|
|
108
|
+
type: Literal["StoreConfig"] = "StoreConfig"
|
|
109
|
+
name: str
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Register and hydrate concrete subtypes with `SubclassUnion`:
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
from typing import Literal
|
|
116
|
+
|
|
117
|
+
from pydantic import BaseModel
|
|
118
|
+
from swarmauri_base.ComponentBase import ComponentBase
|
|
119
|
+
from swarmauri_base.DynamicBase import SubclassUnion
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
@ComponentBase.register_model()
|
|
123
|
+
class StoreConfig(ComponentBase):
|
|
124
|
+
type: Literal["StoreConfig"] = "StoreConfig"
|
|
125
|
+
name: str
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
@ComponentBase.register_type(StoreConfig, "SqliteStoreConfig")
|
|
129
|
+
class SqliteStoreConfig(StoreConfig):
|
|
130
|
+
type: Literal["SqliteStoreConfig"] = "SqliteStoreConfig"
|
|
131
|
+
path: str
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
class StoreEnvelope(BaseModel):
|
|
135
|
+
store: SubclassUnion[StoreConfig]
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
envelope = StoreEnvelope.model_validate_json(
|
|
139
|
+
'{"store":{"type":"SqliteStoreConfig","name":"local","path":"./data.db"}}'
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
assert isinstance(envelope.store, SqliteStoreConfig)
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Build a concrete tool from `ToolBase`:
|
|
146
|
+
|
|
147
|
+
```python
|
|
148
|
+
from typing import Any, Literal
|
|
149
|
+
|
|
150
|
+
from swarmauri_base.tools.ToolBase import ToolBase
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
class EchoTool(ToolBase):
|
|
154
|
+
type: Literal["EchoTool"] = "EchoTool"
|
|
155
|
+
name: str = "echo"
|
|
156
|
+
description: str = "Return the input payload."
|
|
157
|
+
|
|
158
|
+
def __call__(self, payload: Any) -> Any:
|
|
159
|
+
return payload
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
tool = EchoTool()
|
|
163
|
+
assert tool("hello") == "hello"
|
|
164
|
+
assert tool.batch(["a", "b"]) == ["a", "b"]
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Component Families
|
|
168
|
+
|
|
169
|
+
`swarmauri_base` includes base classes and mixins for these component kinds:
|
|
170
|
+
|
|
171
|
+
- AI and agent workflow: agents, chains, conversations, prompts, prompt templates, pipelines, swarms, task management strategies, tool LLMs, tools, toolkits, LLMs, VLMs, OCR, STT, and TTS.
|
|
172
|
+
- Data and retrieval: documents, document stores, embeddings, vectors, vector stores, parsers, schema converters, data connectors, state, service registries, and storage adapters.
|
|
173
|
+
- Math and evaluation: vector-store comparators, deprecated distance compatibility shims, inner products, matrices, measurements, metrics, norms, pseudometrics, seminorms, similarities, tensors, evaluators, evaluator pools, and evaluator results.
|
|
174
|
+
- Runtime and infrastructure: transports, middleware, publishers, rate limits, logging handlers, logging formatters, loggers, tracing-oriented mixins, services, and programs.
|
|
175
|
+
- Security and trust: cert services, crypto, MRE crypto, cipher suites, signing, proof-of-possession helpers, key providers, token services, XMP embedding, and git filters.
|
|
176
|
+
- Business integrations: billing provider base classes and mixins for customers, hosted checkout, payments, invoices, subscriptions, refunds, payouts, reports, promotions, risk, marketplace, and webhooks.
|
|
177
|
+
|
|
178
|
+
## Component Author Workflow
|
|
179
|
+
|
|
180
|
+
1. Start with the relevant interface in [swarmauri_core](https://pypi.org/project/swarmauri_core/).
|
|
181
|
+
2. Inherit the matching base class from `swarmauri_base`.
|
|
182
|
+
3. Add a stable `type` literal and `resource` value.
|
|
183
|
+
4. Register the model or subtype with `ComponentBase.register_model()` or `ComponentBase.register_type(...)`.
|
|
184
|
+
5. Add package entry points or namespace mappings through [swarmauri](https://pypi.org/project/swarmauri/) when the implementation should be discoverable.
|
|
185
|
+
6. Document installation, direct instantiation, serialization behavior, and any provider-specific configuration in the implementation package README.
|
|
186
|
+
|
|
187
|
+
## Related Packages
|
|
188
|
+
|
|
189
|
+
Foundational packages:
|
|
190
|
+
|
|
191
|
+
- [swarmauri_core](https://pypi.org/project/swarmauri_core/) provides the interface contracts that these base classes implement.
|
|
192
|
+
- [swarmauri](https://pypi.org/project/swarmauri/) provides namespace imports and plugin discovery.
|
|
193
|
+
- [swarmauri_standard](https://pypi.org/project/swarmauri_standard/) provides first-party components built from these base classes.
|
|
194
|
+
- [swarmauri_typing](https://pypi.org/project/swarmauri_typing/) provides typing utilities used by dynamic union machinery.
|
|
195
|
+
|
|
196
|
+
Packages built on component-kind bases:
|
|
197
|
+
|
|
198
|
+
- [swarmauri_signing_ed25519](https://pypi.org/project/swarmauri_signing_ed25519/) builds on signing base behavior.
|
|
199
|
+
- [swarmauri_crypto_composite](https://pypi.org/project/swarmauri_crypto_composite/) builds on crypto base behavior.
|
|
200
|
+
- [swarmauri_keyprovider_inmemory](https://pypi.org/project/swarmauri_keyprovider_inmemory/) builds on key provider base behavior.
|
|
201
|
+
- [swarmauri_storage_memory](https://pypi.org/project/swarmauri_storage_memory/) builds on storage adapter base behavior.
|
|
202
|
+
- [swarmauri_transport_stdio](https://pypi.org/project/swarmauri_transport_stdio/) builds on transport base behavior.
|
|
203
|
+
- [swarmauri_middleware_jsonrpc](https://pypi.org/project/swarmauri_middleware_jsonrpc/) builds on middleware base behavior.
|
|
204
|
+
|
|
205
|
+
## When To Use This Package
|
|
206
|
+
|
|
207
|
+
Use `swarmauri_base` when implementing a Swarmauri component that needs serialization, registration, and shared base behavior. Use `swarmauri_core` when you only need interface definitions. Use implementation packages such as `swarmauri_standard` or individual component packages when you need ready-to-run behavior.
|
|
208
|
+
|
|
209
|
+
## License
|
|
210
|
+
|
|
211
|
+
Apache-2.0
|
|
212
|
+
|
|
213
|
+
## Contributing
|
|
214
|
+
|
|
215
|
+
When adding or changing a base class, keep it aligned with the corresponding `swarmauri_core` interface, preserve direct plugin instantiation patterns, update exports and tests, and follow the [Swarmauri SDK contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://pepy.tech/project/swarmauri_base/">
|
|
5
|
+
<img src="https://static.pepy.tech/badge/swarmauri_base/month" alt="PyPI - Downloads"/></a>
|
|
6
|
+
<a href="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/base/">
|
|
7
|
+
<img alt="Hits" src="https://hits.sh/github.com/swarmauri/swarmauri-sdk/tree/master/pkgs/base.svg"/></a>
|
|
8
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
9
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="PyPI - Python Version"/></a>
|
|
10
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
11
|
+
<img src="https://img.shields.io/pypi/l/swarmauri_base" alt="PyPI - License"/></a>
|
|
12
|
+
<a href="https://pypi.org/project/swarmauri_base/">
|
|
13
|
+
<img src="https://img.shields.io/pypi/v/swarmauri_base?label=swarmauri_base&color=green" alt="PyPI - swarmauri_base"/></a>
|
|
14
|
+
<a href="https://discord.gg/N4UpBuQv8T">
|
|
15
|
+
<img src="https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white" alt="Discord"/></a></p>
|
|
16
|
+
|
|
17
|
+
# Swarmauri Base
|
|
18
|
+
|
|
19
|
+
`swarmauri_base` provides the reusable base classes, mixins, and dynamic component model used by Swarmauri SDK implementations. It builds on `swarmauri_core` interfaces and adds Pydantic models, typed component registration, JSON/YAML/TOML serialization, logging helpers, service helpers, and base classes for each major component family.
|
|
20
|
+
|
|
21
|
+
## Why Swarmauri Base?
|
|
22
|
+
|
|
23
|
+
`swarmauri_base` turns Swarmauri interfaces into reusable component foundations. It gives implementation packages consistent Pydantic modeling, resource metadata, dynamic subtype registration, serialization, and family-specific base behavior.
|
|
24
|
+
|
|
25
|
+
## FAQ
|
|
26
|
+
|
|
27
|
+
### Q: What is `ComponentBase`?
|
|
28
|
+
|
|
29
|
+
A: `ComponentBase` is the common Pydantic-backed base for Swarmauri components. It carries fields such as `type`, `resource`, `name`, and `version`, and participates in dynamic component registration.
|
|
30
|
+
|
|
31
|
+
### Q: What is `SubclassUnion` used for?
|
|
32
|
+
|
|
33
|
+
A: `SubclassUnion` lets Pydantic models hydrate registered concrete component types from serialized payloads that include a `type` discriminator.
|
|
34
|
+
|
|
35
|
+
### Q: When should I use `swarmauri_base` instead of `swarmauri_core`?
|
|
36
|
+
|
|
37
|
+
A: Use `swarmauri_base` when building a real component implementation. Use `swarmauri_core` when you only need the abstract interface contract.
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- `ComponentBase` for Pydantic-backed Swarmauri components with `type`, `resource`, `name`, and `version` fields.
|
|
42
|
+
- `DynamicBase` and `SubclassUnion` for discriminated-union deserialization from concrete `type` values.
|
|
43
|
+
- JSON, YAML, and TOML serialization through Pydantic plus Swarmauri mixins.
|
|
44
|
+
- Base classes for agents, chains, chunkers, conversations, documents, embeddings, LLMs, tools, toolkits, vector stores, parsers, prompts, transports, middleware, signing, crypto, key providers, tokens, billing, XMP, and more.
|
|
45
|
+
- Default mixins for logging, service metadata, batch behavior, retrieval behavior, storage behavior, and component-family-specific workflows.
|
|
46
|
+
- Python 3.10, 3.11, 3.12, 3.13, and 3.14 support.
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
Install with `uv`:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
uv add swarmauri_base
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Install with `pip`:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
pip install swarmauri_base
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Usage
|
|
63
|
+
|
|
64
|
+
Create a typed component by inheriting from `ComponentBase`:
|
|
65
|
+
|
|
66
|
+
```python
|
|
67
|
+
from typing import Literal
|
|
68
|
+
|
|
69
|
+
from swarmauri_base.ComponentBase import ComponentBase
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
@ComponentBase.register_model()
|
|
73
|
+
class StoreConfig(ComponentBase):
|
|
74
|
+
type: Literal["StoreConfig"] = "StoreConfig"
|
|
75
|
+
name: str
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Register and hydrate concrete subtypes with `SubclassUnion`:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from typing import Literal
|
|
82
|
+
|
|
83
|
+
from pydantic import BaseModel
|
|
84
|
+
from swarmauri_base.ComponentBase import ComponentBase
|
|
85
|
+
from swarmauri_base.DynamicBase import SubclassUnion
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
@ComponentBase.register_model()
|
|
89
|
+
class StoreConfig(ComponentBase):
|
|
90
|
+
type: Literal["StoreConfig"] = "StoreConfig"
|
|
91
|
+
name: str
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
@ComponentBase.register_type(StoreConfig, "SqliteStoreConfig")
|
|
95
|
+
class SqliteStoreConfig(StoreConfig):
|
|
96
|
+
type: Literal["SqliteStoreConfig"] = "SqliteStoreConfig"
|
|
97
|
+
path: str
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
class StoreEnvelope(BaseModel):
|
|
101
|
+
store: SubclassUnion[StoreConfig]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
envelope = StoreEnvelope.model_validate_json(
|
|
105
|
+
'{"store":{"type":"SqliteStoreConfig","name":"local","path":"./data.db"}}'
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
assert isinstance(envelope.store, SqliteStoreConfig)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Build a concrete tool from `ToolBase`:
|
|
112
|
+
|
|
113
|
+
```python
|
|
114
|
+
from typing import Any, Literal
|
|
115
|
+
|
|
116
|
+
from swarmauri_base.tools.ToolBase import ToolBase
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class EchoTool(ToolBase):
|
|
120
|
+
type: Literal["EchoTool"] = "EchoTool"
|
|
121
|
+
name: str = "echo"
|
|
122
|
+
description: str = "Return the input payload."
|
|
123
|
+
|
|
124
|
+
def __call__(self, payload: Any) -> Any:
|
|
125
|
+
return payload
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
tool = EchoTool()
|
|
129
|
+
assert tool("hello") == "hello"
|
|
130
|
+
assert tool.batch(["a", "b"]) == ["a", "b"]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Component Families
|
|
134
|
+
|
|
135
|
+
`swarmauri_base` includes base classes and mixins for these component kinds:
|
|
136
|
+
|
|
137
|
+
- AI and agent workflow: agents, chains, conversations, prompts, prompt templates, pipelines, swarms, task management strategies, tool LLMs, tools, toolkits, LLMs, VLMs, OCR, STT, and TTS.
|
|
138
|
+
- Data and retrieval: documents, document stores, embeddings, vectors, vector stores, parsers, schema converters, data connectors, state, service registries, and storage adapters.
|
|
139
|
+
- Math and evaluation: vector-store comparators, deprecated distance compatibility shims, inner products, matrices, measurements, metrics, norms, pseudometrics, seminorms, similarities, tensors, evaluators, evaluator pools, and evaluator results.
|
|
140
|
+
- Runtime and infrastructure: transports, middleware, publishers, rate limits, logging handlers, logging formatters, loggers, tracing-oriented mixins, services, and programs.
|
|
141
|
+
- Security and trust: cert services, crypto, MRE crypto, cipher suites, signing, proof-of-possession helpers, key providers, token services, XMP embedding, and git filters.
|
|
142
|
+
- Business integrations: billing provider base classes and mixins for customers, hosted checkout, payments, invoices, subscriptions, refunds, payouts, reports, promotions, risk, marketplace, and webhooks.
|
|
143
|
+
|
|
144
|
+
## Component Author Workflow
|
|
145
|
+
|
|
146
|
+
1. Start with the relevant interface in [swarmauri_core](https://pypi.org/project/swarmauri_core/).
|
|
147
|
+
2. Inherit the matching base class from `swarmauri_base`.
|
|
148
|
+
3. Add a stable `type` literal and `resource` value.
|
|
149
|
+
4. Register the model or subtype with `ComponentBase.register_model()` or `ComponentBase.register_type(...)`.
|
|
150
|
+
5. Add package entry points or namespace mappings through [swarmauri](https://pypi.org/project/swarmauri/) when the implementation should be discoverable.
|
|
151
|
+
6. Document installation, direct instantiation, serialization behavior, and any provider-specific configuration in the implementation package README.
|
|
152
|
+
|
|
153
|
+
## Related Packages
|
|
154
|
+
|
|
155
|
+
Foundational packages:
|
|
156
|
+
|
|
157
|
+
- [swarmauri_core](https://pypi.org/project/swarmauri_core/) provides the interface contracts that these base classes implement.
|
|
158
|
+
- [swarmauri](https://pypi.org/project/swarmauri/) provides namespace imports and plugin discovery.
|
|
159
|
+
- [swarmauri_standard](https://pypi.org/project/swarmauri_standard/) provides first-party components built from these base classes.
|
|
160
|
+
- [swarmauri_typing](https://pypi.org/project/swarmauri_typing/) provides typing utilities used by dynamic union machinery.
|
|
161
|
+
|
|
162
|
+
Packages built on component-kind bases:
|
|
163
|
+
|
|
164
|
+
- [swarmauri_signing_ed25519](https://pypi.org/project/swarmauri_signing_ed25519/) builds on signing base behavior.
|
|
165
|
+
- [swarmauri_crypto_composite](https://pypi.org/project/swarmauri_crypto_composite/) builds on crypto base behavior.
|
|
166
|
+
- [swarmauri_keyprovider_inmemory](https://pypi.org/project/swarmauri_keyprovider_inmemory/) builds on key provider base behavior.
|
|
167
|
+
- [swarmauri_storage_memory](https://pypi.org/project/swarmauri_storage_memory/) builds on storage adapter base behavior.
|
|
168
|
+
- [swarmauri_transport_stdio](https://pypi.org/project/swarmauri_transport_stdio/) builds on transport base behavior.
|
|
169
|
+
- [swarmauri_middleware_jsonrpc](https://pypi.org/project/swarmauri_middleware_jsonrpc/) builds on middleware base behavior.
|
|
170
|
+
|
|
171
|
+
## When To Use This Package
|
|
172
|
+
|
|
173
|
+
Use `swarmauri_base` when implementing a Swarmauri component that needs serialization, registration, and shared base behavior. Use `swarmauri_core` when you only need interface definitions. Use implementation packages such as `swarmauri_standard` or individual component packages when you need ready-to-run behavior.
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
Apache-2.0
|
|
178
|
+
|
|
179
|
+
## Contributing
|
|
180
|
+
|
|
181
|
+
When adding or changing a base class, keep it aligned with the corresponding `swarmauri_core` interface, preserve direct plugin instantiation patterns, update exports and tests, and follow the [Swarmauri SDK contribution guide](https://github.com/swarmauri/swarmauri-sdk/blob/master/CONTRIBUTING.md).
|
|
182
|
+
|
|
183
|
+
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "swarmauri_base"
|
|
3
|
-
version = "0.
|
|
4
|
-
description = "
|
|
3
|
+
version = "0.11.0.dev1"
|
|
4
|
+
description = "Reusable Swarmauri base classes, mixins, and dynamic Pydantic component models for composable intelligence infrastructure."
|
|
5
5
|
keywords = [
|
|
6
6
|
"swarmauri",
|
|
7
7
|
"base-classes",
|
|
8
|
+
"mixins",
|
|
9
|
+
"ai-sdk",
|
|
10
|
+
"component-model",
|
|
11
|
+
"component-registry",
|
|
12
|
+
"composable-intelligence",
|
|
8
13
|
"dynamic-json-schema",
|
|
9
14
|
"discriminated-unions",
|
|
10
15
|
"pydantic",
|
|
16
|
+
"pydantic-models",
|
|
11
17
|
"schema-first",
|
|
12
18
|
"serialization",
|
|
13
19
|
"yaml",
|
|
14
20
|
"toml",
|
|
15
|
-
"plugin-
|
|
21
|
+
"plugin-components",
|
|
16
22
|
"typed-components",
|
|
17
23
|
]
|
|
18
24
|
authors = [{ name = "Jacob Stewart", email = "jacob@swarmauri.com" }]
|
|
@@ -20,7 +26,10 @@ license = "Apache-2.0"
|
|
|
20
26
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
21
27
|
repository = "http://github.com/swarmauri/swarmauri-sdk"
|
|
22
28
|
classifiers = [
|
|
29
|
+
"Development Status :: 4 - Beta",
|
|
30
|
+
"Intended Audience :: Developers",
|
|
23
31
|
"License :: OSI Approved :: Apache Software License",
|
|
32
|
+
"Operating System :: OS Independent",
|
|
24
33
|
"Programming Language :: Python",
|
|
25
34
|
"Programming Language :: Python :: 3",
|
|
26
35
|
"Programming Language :: Python :: 3 :: Only",
|
|
@@ -29,14 +38,16 @@ classifiers = [
|
|
|
29
38
|
"Programming Language :: Python :: 3.12",
|
|
30
39
|
"Programming Language :: Python :: 3.13",
|
|
31
40
|
"Programming Language :: Python :: 3.14",
|
|
41
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
42
|
+
"Topic :: Software Development :: Libraries",
|
|
43
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
44
|
+
"Topic :: Text Processing :: Markup",
|
|
32
45
|
]
|
|
33
46
|
requires-python = ">=3.10,<3.15"
|
|
34
47
|
dependencies = [
|
|
35
48
|
"pyyaml>=6.0.2",
|
|
36
49
|
"numpy>=1.26.4",
|
|
37
50
|
"pydantic>=2.0",
|
|
38
|
-
"requests>=2.0",
|
|
39
|
-
"pandas>=2.2",
|
|
40
51
|
"swarmauri_core",
|
|
41
52
|
"swarmauri_typing",
|
|
42
53
|
"toml>=0.10.2"
|
|
@@ -87,7 +98,6 @@ log_cli_date_format = "%Y-%m-%d %H:%M:%S"
|
|
|
87
98
|
|
|
88
99
|
asyncio_default_fixture_loop_scope = "function"
|
|
89
100
|
|
|
90
|
-
addopts = "--pylicense-accept-deps=numpy"
|
|
91
101
|
|
|
92
102
|
[build-system]
|
|
93
103
|
requires = ["poetry-core>=1.0.0"]
|
|
@@ -30,7 +30,9 @@ T = TypeVar("T", bound="ComponentBase")
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@DynamicBase.register_type()
|
|
33
|
-
class ComponentBase(
|
|
33
|
+
class ComponentBase(
|
|
34
|
+
LoggerMixin, YamlMixin, TomlMixin, ServiceMixin, DynamicBase
|
|
35
|
+
):
|
|
34
36
|
"""
|
|
35
37
|
Base class for all components.
|
|
36
38
|
"""
|
|
@@ -76,6 +78,7 @@ class ResourceTypes(Enum):
|
|
|
76
78
|
SWARM = "Swarm"
|
|
77
79
|
TOOLKIT = "Toolkit"
|
|
78
80
|
TOOL = "Tool"
|
|
81
|
+
SKILL = "Skill"
|
|
79
82
|
PARAMETER = "Parameter"
|
|
80
83
|
TRACE = "Trace"
|
|
81
84
|
UTIL = "Util"
|