polydev-ai 1.9.20 → 1.9.21
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 +22 -0
- package/package.json +1 -1
package/mcp/stdio-wrapper.js
CHANGED
|
@@ -820,6 +820,28 @@ Dashboard: https://polydev.ai/dashboard`
|
|
|
820
820
|
* @returns {object} JSON-RPC response
|
|
821
821
|
*/
|
|
822
822
|
async triggerReAuth(id, reason = 'Token invalid or expired') {
|
|
823
|
+
// In sandboxed environments, browser login won't work — show token-paste instructions instead
|
|
824
|
+
if (this.isSandboxed()) {
|
|
825
|
+
console.error('[Polydev] Sandbox detected — skipping browser re-auth, showing token-paste instructions');
|
|
826
|
+
return {
|
|
827
|
+
jsonrpc: '2.0',
|
|
828
|
+
id,
|
|
829
|
+
result: {
|
|
830
|
+
content: [{
|
|
831
|
+
type: 'text',
|
|
832
|
+
text: `${reason}
|
|
833
|
+
|
|
834
|
+
Browser login is not available in this environment (Cowork/container).
|
|
835
|
+
|
|
836
|
+
To authenticate, pass your token directly:
|
|
837
|
+
1. Get your token from https://polydev.ai/dashboard
|
|
838
|
+
2. Call: mcp__plugin_polydev_mcp__get_auth_status({ user_token: "pd_your_token_here" })
|
|
839
|
+
3. Or: mcp__plugin_polydev_mcp__login({ user_token: "pd_your_token_here" })`
|
|
840
|
+
}]
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
|
|
823
845
|
const crypto = require('crypto');
|
|
824
846
|
const sessionId = crypto.randomBytes(32).toString('hex');
|
|
825
847
|
|