clementine-agent 1.0.60 → 1.0.61

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.
@@ -2571,6 +2571,18 @@ You have a cost budget per message — not a hard turn limit. Work until the tas
2571
2571
  if (!contradictionRetried && attempt < PersonalAssistant.RATE_LIMIT_MAX_RETRIES && responseText.trim()) {
2572
2572
  try {
2573
2573
  const toolCallRecords = collectToolCalls(collectedSdkMessages);
2574
+ // Diagnostic — emits once per turn so we can see what the
2575
+ // validator is working with even when it doesn't fire. Without
2576
+ // this we're blind to the "regex missed the phrasing" case.
2577
+ if (toolCallRecords.length > 0) {
2578
+ logger.info({
2579
+ sessionKey,
2580
+ sdkMessagesCaptured: collectedSdkMessages.length,
2581
+ toolCallsPaired: toolCallRecords.length,
2582
+ resultClasses: toolCallRecords.map(r => `${r.name}:${r.resultClass}`),
2583
+ replyPreview: responseText.slice(0, 200).replace(/\n/g, ' '),
2584
+ }, 'Contradiction validator pass');
2585
+ }
2574
2586
  const finding = detectContradiction(responseText, toolCallRecords);
2575
2587
  if (finding) {
2576
2588
  contradictionRetried = true;
@@ -15,7 +15,7 @@
15
15
  const ARG_ERROR_RE = /\b(invalid|unknown field|required|missing parameter|schema|unrecognized|unexpected property)\b/i;
16
16
  const AUTH_ERROR_RE = /\b(unauthori[sz]ed|401|not authenticated|token expired|token has expired|invalid[_ ]?token|access denied)\b/i;
17
17
  /** Regex matching reply phrasings that claim a connector-wide failure. */
18
- export const CONTRADICTION_RE = /(dead\s*end|doesn'?t exist|not in (the |my )?schema|schema[- ]level|aren'?t loading into|(not|isn'?t|aren'?t) (loaded|wired|available|coming through|responding)|connector[^.]{0,40}(dropped|is (a )?dead)|tools? array is empty|MCP server (still connecting|dropped|not responding)|no such tool available|tool doesn'?t exist|both directions are blocked)/i;
18
+ export const CONTRADICTION_RE = /(dead\s*end|doesn'?t exist|not in (the |my )?schema|schema[- ]level|aren'?t loading into|(not|isn'?t|aren'?t|wasn'?t) (loaded|wired|available|connected|coming through|responding|reachable|working)|connector[^.]{0,40}(dropped|is (a )?dead)|tools? array is empty|MCP server (still connecting|dropped|not responding|just isn'?t connected|isn'?t connected)|no such tool available|tool doesn'?t exist|both directions are blocked|(restart|close and reopen|reconnect) Claude Code)/i;
19
19
  export function classifyResult(content, isError) {
20
20
  if (!isError)
21
21
  return 'success';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clementine-agent",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "Clementine — Personal AI Assistant (TypeScript)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",