@perstack/runtime 0.0.48 → 0.0.49

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.
package/README.md CHANGED
@@ -68,6 +68,41 @@ eventListener: (event) => {
68
68
  4. **Skill Provider**: Provides the client side of the **Model Context Protocol (MCP)** to securely execute tools.
69
69
  5. **Expert Delegation**: Implements the protocol for **Expert-to-Expert delegation**, allowing agents to call each other.
70
70
 
71
+ ## Skill Manager
72
+
73
+ The runtime manages skills through specialized Skill Managers. Each skill type has its own manager class:
74
+
75
+ | Type | Manager | Purpose |
76
+ | --------------- | ------------------------- | ---------------------------------- |
77
+ | MCP (stdio/SSE) | `McpSkillManager` | External tools via MCP protocol |
78
+ | Interactive | `InteractiveSkillManager` | User input tools (pause execution) |
79
+ | Delegate | `DelegateSkillManager` | Expert-to-Expert calls |
80
+
81
+ All managers extend `BaseSkillManager` which provides:
82
+ - `init()` — Initialize the skill (connect MCP servers, parse definitions)
83
+ - `close()` — Clean up resources (disconnect MCP servers)
84
+ - `getToolDefinitions()` — Get available tools
85
+ - `callTool()` — Execute a tool call
86
+
87
+ ### Initialization Flow
88
+
89
+ ```
90
+ getSkillManagers(expert, experts, setting)
91
+
92
+ ├─► Initialize MCP skills (parallel)
93
+ │ └─► McpSkillManager × N
94
+
95
+ ├─► Initialize Interactive skills (parallel)
96
+ │ └─► InteractiveSkillManager × N
97
+
98
+ └─► Initialize Delegate skills (parallel)
99
+ └─► DelegateSkillManager × N
100
+
101
+ Result: Record<skillName, BaseSkillManager>
102
+ ```
103
+
104
+ If any skill fails to initialize, all previously initialized skills are cleaned up before throwing.
105
+
71
106
  ## Architecture
72
107
 
73
108
  The runtime orchestrates the interaction between the user's definition of an Expert and the actual execution environment.