mcp_bundle 0.2.1
mcp_bundle: ^0.2.1 copied to clipboard
Bundle schema, loader, validator, expression language, and port contracts providing the foundation for the MCP ecosystem.
0.2.1 Channel Port & Port Contracts #
Added #
Channel Port (package:mcp_bundle/ports.dart)
Universal bidirectional communication interface for the MCP ecosystem.
-
ChannelIdentity
- Platform identifier (slack, telegram, discord, http, websocket, etc.)
- Channel-specific ID (workspace ID, server ID)
- Optional display name
- JSON serialization support
-
ConversationKey
- Unique conversation identifier
- Combines channel identity with conversation ID
- Optional user identifier
- Equality and hashing support
-
ChannelAttachment
- File/media attachment model
- Type, URL, filename, MIME type, size
- JSON serialization support
-
ChannelEvent
- Incoming event from channels
- Unique event ID for idempotency
- Conversation key, type, text content
- User ID/name, timestamp
- Attachments and platform metadata
- Factory:
ChannelEvent.message()for message events
-
ChannelResponse
- Outgoing response to channels
- Text and rich block content
- Attachments and reply-to support
- Platform-specific options
- Factories:
ChannelResponse.text(),ChannelResponse.rich()
-
ChannelCapabilities
- Feature flags for channel implementations
- text, richMessages, attachments, reactions
- threads, editing, deleting, typingIndicator
- Maximum message length constraint
- Presets:
ChannelCapabilities.full(),ChannelCapabilities.textOnly()
-
ChannelPort (Abstract)
- Universal interface for channel communication
identity,capabilities,eventsstreamstart(),stop(),send()methods- Optional:
sendTyping(),edit(),delete(),react()
-
Stub Implementations
StubChannelPortfor testing with event simulationEchoChannelPortfor echo-back testing
0.1.0 Initial Release #
Added #
Core Features
-
Bundle Schema
McpBundlemodel as the main containerBundleSkillfor skill definitionsBundleProfilefor profile definitionsBundleKnowledgefor knowledge items- Metadata and versioning support
-
Bundle Loader
BundleLoaderfor loading and saving bundles- File-based loading with
.mcpbformat - URL-based loading for remote bundles
- JSON data loading for in-memory bundles
- Bundle serialization and deserialization
-
Bundle Validator
BundleValidatorfor comprehensive validation- Schema validation for all bundle components
- Reference integrity checking
- Warning and error reporting
- Customizable validation rules
-
Expression Language
ExpressionEvaluatorfor template processing- Mustache-style variable syntax
{{variable}} - Conditional sections
{{#condition}}...{{/condition}} - Inverted sections
{{^condition}}...{{/condition}} - Array iteration
{{#array}}...{{/array}} - Nested property access
{{user.address.city}} - Built-in functions for data manipulation
-
Validation Results
BundleValidationwith errors and warnings- Detailed error messages with locations
- Validation context for debugging
Data Models #
McpBundle- Main bundle containerBundleSkill- Skill definition in bundleBundleProfile- Profile definition in bundleBundleKnowledge- Knowledge item in bundleBundleValidation- Validation result
Expression Features #
- Variable interpolation
- Conditional rendering
- Array iteration
- Nested property access
- Function calls