@khalilgharbaoui/opencode-claude-code-plugin 0.4.17 → 0.4.19

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.d.ts CHANGED
@@ -96,6 +96,9 @@ type OpenCodeHooks = {
96
96
  };
97
97
  type OpenCodePlugin = (input: unknown, options?: Record<string, unknown>) => Promise<OpenCodeHooks>;
98
98
 
99
+ type LogLevel = "debug" | "info" | "notice" | "warn" | "error";
100
+ type LogMode = "silent" | "debug";
101
+
99
102
  interface ClaudeCodeConfig {
100
103
  provider: string;
101
104
  cliPath: string;
@@ -147,8 +150,6 @@ interface LoggingConfig {
147
150
  */
148
151
  level?: LogLevel;
149
152
  }
150
- type LogLevel = "debug" | "info" | "notice" | "warn" | "error";
151
- type LogMode = "silent" | "debug";
152
153
  type WebSearchRouting = "claude" | "disabled" | (string & {});
153
154
  interface ClaudeCodeProviderSettings {
154
155
  cliPath?: string;
package/dist/index.js CHANGED
@@ -1316,8 +1316,8 @@ async function createProxyMcpServer(tools = DEFAULT_PROXY_TOOLS) {
1316
1316
  });
1317
1317
  } catch (error) {
1318
1318
  const errorMessage = error instanceof Error ? error.message : String(error);
1319
- const isTimeout = errorMessage.includes("timed out after") && errorMessage.includes("waiting for opencode to resolve");
1320
- const logFn = isTimeout ? log.notice : log.warn;
1319
+ const isExpectedCleanup = errorMessage.includes("timed out after") && errorMessage.includes("waiting for opencode to resolve") || errorMessage.includes("rejecting as orphaned") || errorMessage.includes("was orphaned by a new user turn");
1320
+ const logFn = isExpectedCleanup ? log.notice : log.warn;
1321
1321
  logFn("proxy-mcp error handling request", {
1322
1322
  error: errorMessage
1323
1323
  });
@@ -1549,7 +1549,7 @@ function rejectPendingProxyCallById(toolCallId, error) {
1549
1549
  indexRemove(pending.sessionKey, toolCallId);
1550
1550
  clearTimeout(pending.timer);
1551
1551
  pending.reject(error);
1552
- log.warn("rejected pending proxy call", {
1552
+ log.notice("rejected pending proxy call", {
1553
1553
  sessionKey: pending.sessionKey,
1554
1554
  toolCallId: pending.toolCallId,
1555
1555
  toolName: pending.toolName,
@@ -3384,7 +3384,7 @@ ${plan}
3384
3384
  });
3385
3385
  resolvePendingProxyCallById(call.toolCallId, result);
3386
3386
  } else {
3387
- log.warn(
3387
+ log.notice(
3388
3388
  "pending proxy call had no matching tool-result; rejecting as orphan",
3389
3389
  {
3390
3390
  sessionKey: sk,