polydev-ai 1.8.25 → 1.8.26
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/stdio-wrapper.js +14 -4
- package/package.json +1 -1
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -186,6 +186,12 @@ function cleanCliResponse(content) {
|
|
|
186
186
|
foundCodexMarker = true;
|
|
187
187
|
continue;
|
|
188
188
|
}
|
|
189
|
+
// Skip MCP startup logs (mcp: xxx starting/ready/failed)
|
|
190
|
+
if (trimmed.startsWith('mcp:')) continue;
|
|
191
|
+
if (trimmed.startsWith('mcp startup:')) continue;
|
|
192
|
+
// Skip RMCP transport errors
|
|
193
|
+
if (trimmed.includes('rmcp::transport')) continue;
|
|
194
|
+
if (trimmed.includes('ERROR rmcp')) continue;
|
|
189
195
|
// Skip everything in user section (echoed prompt, errors)
|
|
190
196
|
continue;
|
|
191
197
|
}
|
|
@@ -804,10 +810,11 @@ class StdioMCPWrapper {
|
|
|
804
810
|
|
|
805
811
|
/**
|
|
806
812
|
* Report CLI results to server for dashboard storage
|
|
807
|
-
* This stores CLI results in Supabase so they appear in the dashboard
|
|
813
|
+
* This stores ONLY SUCCESSFUL CLI results in Supabase so they appear in the dashboard
|
|
814
|
+
* Failed CLI results are not stored - they will get API fallback instead
|
|
808
815
|
*/
|
|
809
816
|
async reportCliResultsToServer(prompt, localResults, args = {}) {
|
|
810
|
-
// Only report
|
|
817
|
+
// Only report successful CLI results (failed ones will get API fallback)
|
|
811
818
|
const successfulResults = localResults.filter(r => r.success);
|
|
812
819
|
if (successfulResults.length === 0) {
|
|
813
820
|
console.error('[Stdio Wrapper] No successful CLI results to report');
|
|
@@ -820,11 +827,14 @@ class StdioMCPWrapper {
|
|
|
820
827
|
}
|
|
821
828
|
|
|
822
829
|
try {
|
|
823
|
-
|
|
830
|
+
// IMPORTANT: Only send successful results to dashboard
|
|
831
|
+
// Failed CLI results will have API fallback, so we don't want to show both
|
|
832
|
+
const cliResults = successfulResults.map(result => ({
|
|
824
833
|
provider_id: result.provider_id,
|
|
825
834
|
// IMPORTANT: cliManager returns model_used, not model
|
|
826
835
|
model: result.model_used || result.model || this.getModelPreferenceForCli(result.provider_id),
|
|
827
|
-
|
|
836
|
+
// Clean the content before sending to dashboard (remove metadata, MCP logs, etc.)
|
|
837
|
+
content: cleanCliResponse(result.content || ''),
|
|
828
838
|
tokens_used: result.tokens_used || 0,
|
|
829
839
|
latency_ms: result.latency_ms || 0,
|
|
830
840
|
success: result.success || false,
|
package/package.json
CHANGED