@khalilgharbaoui/opencode-claude-code-plugin 0.4.11 → 0.4.13
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/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1211,7 +1211,7 @@ async function createProxyMcpServer(tools = DEFAULT_PROXY_TOOLS) {
|
|
|
1211
1211
|
timer = setTimeout(() => {
|
|
1212
1212
|
if (!pending.has(callId)) return;
|
|
1213
1213
|
pending.delete(callId);
|
|
1214
|
-
log.
|
|
1214
|
+
log.notice("proxy-mcp tool call timed out", {
|
|
1215
1215
|
callId,
|
|
1216
1216
|
toolName,
|
|
1217
1217
|
timeoutMs: PROXY_CALL_TIMEOUT_MS
|
|
@@ -1255,8 +1255,11 @@ async function createProxyMcpServer(tools = DEFAULT_PROXY_TOOLS) {
|
|
|
1255
1255
|
error: { code: -32601, message: `Unknown method: ${request.method}` }
|
|
1256
1256
|
});
|
|
1257
1257
|
} catch (error) {
|
|
1258
|
-
|
|
1259
|
-
|
|
1258
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
1259
|
+
const isTimeout = errorMessage.includes("timed out after") && errorMessage.includes("waiting for opencode to resolve");
|
|
1260
|
+
const logFn = isTimeout ? log.notice : log.warn;
|
|
1261
|
+
logFn("proxy-mcp error handling request", {
|
|
1262
|
+
error: errorMessage
|
|
1260
1263
|
});
|
|
1261
1264
|
try {
|
|
1262
1265
|
writeJson(res, {
|
|
@@ -1428,7 +1431,7 @@ function queuePendingProxyCall(sessionKey2, call) {
|
|
|
1428
1431
|
`Proxy tool call '${call.toolName}' timed out after ${PENDING_PROXY_CALL_TIMEOUT_MS}ms waiting for opencode to resolve the call`
|
|
1429
1432
|
)
|
|
1430
1433
|
);
|
|
1431
|
-
log.
|
|
1434
|
+
log.notice("timed out pending proxy call", {
|
|
1432
1435
|
sessionKey: current.sessionKey,
|
|
1433
1436
|
toolCallId: call.id,
|
|
1434
1437
|
toolName: call.toolName,
|
|
@@ -1551,7 +1554,7 @@ function looksLikeQuestion(text) {
|
|
|
1551
1554
|
const normalized = normalizeVisibleText(text).toLowerCase();
|
|
1552
1555
|
if (!normalized) return false;
|
|
1553
1556
|
if (normalized.includes("?")) return true;
|
|
1554
|
-
return /\b(please confirm|can you confirm|should i|would you like|do you want|which option|choose|pick one|need your|need you to|what would you like|let me know if|let me know whether|let me know what|let me know when|if you'?d like|if you want to|tell me if|tell me which|tell me whether|say (?:go|yes|no)|push back|sign off|sounds? (?:good|right)|your call|your move|up to you|ready to (?:ship|go|proceed|merge)|ready (?:when|whenever|once|if) you|standing by|i'?ll stand ?by|happy to (?:ship|go|proceed|merge))\b/.test(normalized);
|
|
1557
|
+
return /\b(please confirm|can you confirm|should i|would you like|do you want|which option|choose|pick one|need your|need you to|what would you like|let me know if|let me know whether|let me know what|let me know when|let me know how|if you'?d like|if you want to|tell me if|tell me which|tell me whether|say (?:go|yes|no)|push back|sign off|sounds? (?:good|right)|your call|your move|your turn|over to you|all yours|up to you|ready to (?:ship|go|proceed|merge)|ready (?:when|whenever|once|if) you|standing by|i'?ll stand ?by|i'?m here|happy to (?:ship|go|proceed|merge))\b/.test(normalized);
|
|
1555
1558
|
}
|
|
1556
1559
|
function looksLikeBlocker(text) {
|
|
1557
1560
|
const normalized = normalizeVisibleText(text).toLowerCase();
|