File tree Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Expand file tree Collapse file tree 1 file changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -76,5 +76,40 @@ This approach gives us several advantages:
76
76
3. **Security Inheritance** - Leverages MCP's existing security model
77
77
78
78
4. **Protocol Synergy** - Workers benefit from MCP's existing ecosystem
79
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
80
+ <br>
81
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
82
+ <br>
83
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
+ <br>
85
+ <br>
86
+ <H4>Example Workflow Execution</H4>
87
+ ```typescript
88
+ // Bootstrap the system
89
+ const mcpClient = new MCPClient();
90
+ const orchestrator = new MCPOrchestrator(mcpClient);
91
+
92
+ // Send initial request
93
+ mcpClient.sendMessage({
94
+ role: 'user',
95
+ content: 'Why does npm install fail in my project?',
96
+ metadata: {
97
+ sessionId: '123',
98
+ context: {
99
+ currentDir: '/projects/mixed-app',
100
+ os: 'linux'
101
+ }
102
+ }
103
+ });
79
104
80
-
105
+ // Worker responses will flow through the orchestrator
106
+ mcpClient.onMessage(msg => {
107
+ if (msg.metadata?.taskType === 'project-scan') {
108
+ console.log('Scan result:', msg.content);
109
+ }
110
+
111
+ if (msg.metadata?.status === 'completed') {
112
+ console.log('Task completed:', msg.metadata.taskId);
113
+ }
114
+ });
115
+ ```
You can’t perform that action at this time.
0 commit comments