Commit Graph

1208 Commits

Author SHA1 Message Date
Claude c477ded1b5 fix: handle stdin unavailability and timeout to prevent hook hangs
Fixes #727 (PostToolUse hooks hanging at "1/2 done")
Addresses #646 (Bun stdin EINVAL crash)

Root causes:
1. Bun crashes with EINVAL when Claude Code doesn't provide valid stdin fd
2. stdin.on('end') never fires if Claude Code doesn't close stdin properly

Changes:
- Add isStdinAvailable() to safely check stdin before reading
- Wrap stdin access in try-catch to handle Bun's lazy fstat crash
- Add 5-second timeout to prevent indefinite hangs
- Gracefully return undefined instead of crashing on stdin errors
- Properly clean up event listeners to prevent memory leaks

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 03:06:03 -05:00
Alex Newman 3040ea8a97 MAESTRO: Mark PR #524 complete in PR-Triage-11 - minimum bun version check merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 03:04:59 -05:00
quicktime 9ad640a5c4 fix: add minimum bun version check to smart-install.js
Bun 1.1.14+ is required because:
- `.changes` property on SQLite statements (added in 1.1.14)
- Multi-statement SQL support in db.run() (fixed in 1.0.26)

Older versions cause silent failures in database migrations.

Fixes #519

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 03:04:32 -05:00
Alex Newman 109fb1b506 MAESTRO: Cherry-pick PR #712 - respect environment variables with correct priority
Adds applyEnvOverrides() method to SettingsDefaultsManager ensuring
env vars take highest priority over file and default settings.
Configuration priority is now: env > file > defaults.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 03:03:28 -05:00
Alex Newman 55e13047e4 MAESTRO: Mark PR #634 complete in PR-Triage-11 - CLAUDE_CONFIG_DIR path fix cherry-picked
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 03:00:43 -05:00
Alex Newman 75a0f2e981 fix: respect CLAUDE_CONFIG_DIR for plugin paths (#626)
Add MARKETPLACE_ROOT constant to paths.ts and update 5 source files to use
centralized path constants instead of hardcoded ~/.claude paths. Preserves
backwards compatibility when CLAUDE_CONFIG_DIR is not set.

Based on PR #634 by @Kuroakira, cherry-picked onto main due to build artifact
merge conflicts (source changes applied cleanly).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 03:00:08 -05:00
Alex Newman d935229711 MAESTRO: Mark PR #831 complete in PR-Triage-11 - Gemini model name fix merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:56:20 -05:00
Alex Newman 91e1d5baad fix: correct Gemini model name from gemini-3-flash to gemini-3-flash-preview
The Gemini API requires the -preview suffix for the Gemini 3 Flash model.
gemini-3-flash does not exist - only gemini-3-flash-preview is available.
This was causing 404 errors when users selected this model option.

Closes #831

Co-Authored-By: Glucksberg <markuscontasul@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:55:30 -05:00
Alex Newman 8de8afbab8 MAESTRO: Mark PR #862 complete in PR-Triage-11 - transcript parser graceful empty handling merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:52:24 -05:00
Dennis Hartrampf 75df2e52c1 fix: handle missing assistant messages gracefully in transcript parser
When a user exits Claude Code before any assistant response is generated,
the summarize Stop hook would crash with:
"No message found for role 'assistant' in transcript"

This happened because extractLastMessage() threw an error when no message
of the requested role was found. The fix returns an empty string instead,
which the summarize handler already handles gracefully (it logs
hasLastAssistantMessage: false and continues).

This is consistent with the function's existing behavior - it already
returns '' in other edge cases (line 64).

Fixes sessions that exit early before assistant responds.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 02:52:02 -05:00
Alex Newman 40e699209f MAESTRO: Mark PR #835 complete in PR-Triage-11 - nested XML parser fix merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:51:18 -05:00
Glucksberg 256ebcead0 fix: handle nested XML tags in parser extractField and extractArrayElements
The parser's regex patterns used `[^<]*` and `[^<]+` which fail immediately
when content contains any `<` character (like nested tags or code snippets).

Example failure case:
```xml
<investigated>
  <item>Checked parser.ts</item>
</investigated>
```

The `[^<]*` pattern stops at the first `<` of `<item>`, causing extractField()
to return null even though valid content exists.

## Changes

- `extractField()`: Changed from `[^<]*` to `[\s\S]*?` (non-greedy match any char)
- `extractArrayElements()`: Changed from `[^<]+` to `[\s\S]*?` for both array and element patterns

The `[\s\S]*?` pattern matches any character including newlines, non-greedily,
allowing nested XML tags to be captured correctly.

Fixes #798

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 02:50:36 -05:00
Alex Newman 44bfb74932 MAESTRO: Mark PR #970 complete in PR-Triage-10 - issue template duplicate check merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:48:13 -05:00
brianmccann 97c84a3963 fix: update bug and feature request templates to include duplicate check reminder 2026-02-06 02:47:43 -05:00
Alex Newman b493c2d6b0 MAESTRO: Close PR #882 in PR-Triage-10 - generic Windows notes duplicated by existing docs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:46:25 -05:00
Alex Newman 4ea03b0597 MAESTRO: Mark PR #919 complete in PR-Triage-10 - Windows npm PATH setup note merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:43:09 -05:00
Kamran Khalid 7b08c94bdb docs: add Windows setup note for npm not recognized error 2026-02-06 02:42:32 -05:00
Alex Newman 92f7c7dfd9 MAESTRO: Mark PR #691 complete in PR-Triage-10 - Urdu language support merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:41:19 -05:00
Yasir Ali 358215a92f fix: fix alignement 2026-02-06 02:40:14 -05:00
Yasir Ali 867513dc79 feat: Add Urdu language support with RTL formatting 2026-02-06 02:40:14 -05:00
Yasir Ali 583a76b150 feat: Add Urdu language support 2026-02-06 02:40:14 -05:00
Alex Newman 2a62a94b09 MAESTRO: Mark PR #907 complete in PR-Triage-10 - Traditional Chinese README translation merged
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:38:06 -05:00
Peter Dave Hello 05d65ed797 i18n: add Traditional Chinese (zh-TW) README translation
- Add docs/i18n/README.zh-tw.md with Taiwan Traditional Chinese translation
- Update language links in README.md and all i18n translations
- Add 🇹🇼 繁體中文 link after 🇨🇳 中文 in language selector
2026-02-06 02:37:42 -05:00
Alex Newman 1e04f82fe2 MAESTRO: Merge PR #894 updating documentation links to official website across 29 READMEs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:35:29 -05:00
dingben.db@bytedance.com 596f0ad16c docs: update documentation links to official website
- Update documentation links to point to https://docs.claude-mem.ai/
- Localize 'Browse on official website' text in all i18n README files
2026-02-06 02:34:36 -05:00
Alex Newman 296bf195ce MAESTRO: Merge PR #636 fixing Chinese README markdown bold rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:33:21 -05:00
WuMingDao ba0793127c docs: fix zh readme of md render error 2026-02-06 02:32:33 -05:00
Alex Newman 06711cfb20 MAESTRO: Merge PR #637 fixing Japanese README markdown bold rendering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:30:56 -05:00
WuMingDao 8628e4024d docs: fix ja readme of md render error 2026-02-06 02:30:24 -05:00
Alex Newman 1b912020ea MAESTRO: Merge PR #864 fixing Japanese README hyperlink formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:28:57 -05:00
Ikko Eltociear Ashimine 3093f80196 docs: update README.ja.md
fix markdown
2026-02-06 02:28:39 -05:00
Alex Newman 6b67b3df63 MAESTRO: Merge PR #898 fixing Korean README hyperlink formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:27:50 -05:00
youngsu5582 e9fee163a9 docs: update README.ko.md
Add spaces between URLs and Korean postpositions to fix hyperlink parsing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 02:27:25 -05:00
Alex Newman e24ad77ab5 MAESTRO: Merge PR #953 fixing README plugin command formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:26:11 -05:00
Leonardo Scappatura c56e0ae7f8 Fix formatting in README for plugin commands 2026-02-06 02:25:29 -05:00
Alex Newman ed9ffe76a7 MAESTRO: Review PR #792 persistent Chroma HTTP server — changes requested due to Zscaler SSL regression, missing tests, merge conflicts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:24:03 -05:00
Alex Newman 0622ebf534 MAESTRO: Close PR #830 requesting scope reduction and rebase after merge conflicts with #769/#884
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:18:27 -05:00
Alex Newman 63b0105d05 MAESTRO: Mark PR #884 task complete in PR-Triage-09 with detailed merge notes
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:15:59 -05:00
Alex Newman 3ad53733e8 MAESTRO: Merge PR #884 adding Zscaler SSL certificate support for ChromaDB vector search
Adds automatic detection and handling of Zscaler enterprise security certificates
on macOS. Combines standard certifi CA certificates with Zscaler certificates into
a single bundle, passed via SSL_CERT_FILE/REQUESTS_CA_BUNDLE/CURL_CA_BUNDLE env vars
to the chroma-mcp subprocess. Certificate bundle is cached for 24 hours. Falls back
gracefully when Zscaler is not present, with no impact on non-Zscaler environments.

Co-Authored-By: RClark4958 <rickdclark48@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:15:19 -05:00
Alex Newman 403913a0fc MAESTRO: Merge PR #769 fixing chroma-mcp zombie processes, rebuild compiled output
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:11:32 -05:00
Jenha Poyarkov 9f2a237aaf fix: close transport on connection error to prevent chroma-mcp zombie processes
Fixes #761

Root cause: When connection errors occur (MCP error -32000, Connection closed),
the code was resetting \`connected\` and \`client\` but NOT calling
\`transport.close()\`, leaving the chroma-mcp subprocess alive. Each
reconnection attempt spawned a NEW process while old ones accumulated.

Changes:
- Close transport before resetting state in ensureCollection() error handler
- Close transport before resetting state in queryChroma() error handler
- Set transport = null after closing to match close() method behavior
- Add regression tests for Issue #761 with source code verification

Tested on macOS - no more zombie processes after the fix.
2026-02-06 02:10:18 -05:00
Alex Newman b967772897 MAESTRO: Mark PR #887 task complete in PR-Triage-09
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:07:41 -05:00
Alex Newman e19617a065 build: rebuild compiled output after PR #887 merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:07:22 -05:00
Abdelkarim Mateos Sanchez 9bd56c993c fix: align IDs with metadatas in ChromaSearchStrategy
ChromaSync.queryChroma() returns deduplicated sqlite_ids but the
metadatas array contains multiple entries per observation (narrative +
facts). The filterByRecency() method was iterating over metadatas and
using the index to access ids, causing array out-of-bounds access.

The fix builds a Map from sqlite_id to metadata, then iterates over
the deduplicated ids array to ensure proper alignment.

Symptoms before fix:
- Semantic search returning incorrect/empty results
- Search only working with near-exact queries
- Recent items (same day) not being found

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 02:07:03 -05:00
Alex Newman f62b5d248c MAESTRO: Mark PR #615 task complete in PR-Triage-08
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:04:53 -05:00
Alex Newman 711f5455df fix: generate synthetic memorySessionId for stateless providers (PR #615)
Gemini and OpenRouter are stateless APIs that never return session IDs.
Without synthetic IDs, PR #693's defensive memorySessionId checks throw
errors on every observation processing call for these providers.

Generates provider-prefixed IDs (gemini-/openrouter-{contentSessionId}-
{timestamp}) before the first API call, persisted to the database via
updateMemorySessionId(). Applied from PR #615 (closed due to staleness).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:04:49 -05:00
Alex Newman e36efff00d MAESTRO: Close PR #910 in PR-Triage-08 — stale branch with regressions
PR #910 reverts 5 recently merged fixes (PRs #693, #937, #913, Issue #733,
createIterator API) and bundles unrelated features (observation dedup,
summary soft-delete, CLAUDE.md deletions). Requested re-submission as
focused PRs for the valuable synthetic memorySessionId feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 02:02:00 -05:00
Alex Newman 486bae633b MAESTRO: Mark PR #741 task complete in PR-Triage-08
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:58:59 -05:00
Alex Newman 228a006953 build: rebuild compiled output after PR #741 merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:58:08 -05:00
Alex Newman 2d40afe7ef fix: provider-aware recovery and stale session cleanup (PR #741)
Applies PR #741 by @licutis onto main, resolving conflicts with
recently merged PRs #693, #937, and #627. Adds getActiveAgent() to
WorkerService so startup-recovery uses the correct provider instead
of hardcoding SDKAgent. Also cleans up sessions stuck 'active' for
6+ hours and their pending messages before processing orphaned queues.

Co-Authored-By: licutis <43884712+licutis@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 01:58:00 -05:00