polydev-ai 1.2.15 → 1.4.0

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/mcp/manifest.json CHANGED
@@ -381,7 +381,7 @@
381
381
  "minLength": 1
382
382
  }
383
383
  },
384
- "required": ["provider_id", "prompt"]
384
+ "required": ["prompt"]
385
385
  },
386
386
  "outputSchema": {
387
387
  "type": "object",
@@ -98,8 +98,14 @@ class StdioMCPWrapper {
98
98
  };
99
99
 
100
100
  case 'tools/call':
101
- // Handle CLI tools locally, forward others to remote server
101
+ // Handle get_perspectives with local CLIs + remote perspectives
102
102
  const toolName = params.name;
103
+
104
+ if (toolName === 'get_perspectives') {
105
+ return await this.handleGetPerspectivesWithCLIs(params, id);
106
+ }
107
+
108
+ // Handle other CLI tools locally
103
109
  if (toolName.startsWith('polydev.') && this.isCliTool(toolName)) {
104
110
  return await this.handleLocalCliTool(request);
105
111
  } else {
@@ -174,6 +180,45 @@ class StdioMCPWrapper {
174
180
  return cliTools.includes(toolName);
175
181
  }
176
182
 
183
+ /**
184
+ * Handle get_perspectives with local CLIs + remote perspectives
185
+ */
186
+ async handleGetPerspectivesWithCLIs(params, id) {
187
+ console.error(`[Stdio Wrapper] Handling get_perspectives with local CLIs + remote`);
188
+
189
+ try {
190
+ // Use existing localSendCliPrompt logic which already:
191
+ // 1. Checks all local CLIs
192
+ // 2. Calls remote perspectives
193
+ // 3. Combines results
194
+ const result = await this.localSendCliPrompt(params.arguments);
195
+
196
+ return {
197
+ jsonrpc: '2.0',
198
+ id,
199
+ result: {
200
+ content: [
201
+ {
202
+ type: 'text',
203
+ text: result.content || this.formatCliResponse(result)
204
+ }
205
+ ]
206
+ }
207
+ };
208
+
209
+ } catch (error) {
210
+ console.error(`[Stdio Wrapper] get_perspectives error:`, error);
211
+ return {
212
+ jsonrpc: '2.0',
213
+ id,
214
+ error: {
215
+ code: -32603,
216
+ message: error.message
217
+ }
218
+ };
219
+ }
220
+ }
221
+
177
222
  /**
178
223
  * Handle CLI tools locally without remote server calls
179
224
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydev-ai",
3
- "version": "1.2.15",
3
+ "version": "1.4.0",
4
4
  "description": "Agentic workflow assistant with CLI integration - get diverse perspectives from multiple LLMs when stuck or need enhanced reasoning",
5
5
  "keywords": [
6
6
  "mcp",