Skip to content

feat(cursor): add Hindsight memory plugin for Cursor#866

Draft
DK09876 wants to merge 9 commits intomainfrom
feat/cursor-integration
Draft

feat(cursor): add Hindsight memory plugin for Cursor#866
DK09876 wants to merge 9 commits intomainfrom
feat/cursor-integration

Conversation

@DK09876
Copy link
Copy Markdown
Contributor

@DK09876 DK09876 commented Apr 3, 2026

Summary

  • Adds a complete Cursor integration using the plugin architecture (hooks, skills, rules)
  • Auto-recall via beforeSubmitPrompt hook injects relevant memories as additionalContext
  • Auto-retain via stop hook captures conversation transcripts to Hindsight
  • Includes on-demand hindsight-recall skill and hindsight-memory rule
  • Full lib/ directory (config, bank, state, daemon, client, content, llm) — modeled after claude-code
  • 41 tests covering config loading, bank derivation, content processing, hook behavior, and manifest validation
  • CI job (test-cursor-integration) with change detection
  • Added to VALID_INTEGRATIONS in release script

Test plan

  • All 41 tests pass locally (python -m pytest tests/ -v)
  • CI passes on this PR
  • Manual smoke test: install plugin in Cursor, verify recall/retain work end-to-end

🤖 Generated with Claude Code

DK09876 and others added 3 commits April 6, 2026 11:18
Adds a complete Cursor integration using the plugin architecture
(hooks, skills, rules). Automatically recalls relevant memories
before each prompt and retains conversation transcripts on task
completion. Modeled after the claude-code integration with
Cursor-specific adaptations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add plugin-vs-MCP comparison table near top of integration doc
- Add "Verifying Plugin Hooks" section with state file commands
- Add troubleshooting note: visible tool calls = MCP, not plugin
- Write last_retain.json state file in retain.py for diagnostics
- Add mode: plugin and query_length to recall state file
- Fix test_settings_file_loaded to isolate from user config

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DK09876 DK09876 force-pushed the feat/cursor-integration branch from f2bccc3 to ed8e8cb Compare April 6, 2026 20:38
DK09876 and others added 6 commits April 6, 2026 13:51
- Add mkdir -p before cp -r in all install examples (first-run fix)
- Add "fully quit and reopen Cursor" note to all setup flows
- Recall/retain hooks now write status on every invocation
  (success, empty, skipped, error) not just on success
- Fix docs to show ~/.hindsight/cursor-state/ default path
- Add concrete Hindsight Cloud config snippet to Quick Start
- Add Cloud option to blog post setup section

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Support "session" in dynamicBankGranularity for per-conversation banks
- Add changelog page for cursor integration
- Add test for session-based dynamic bank ID

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add mkdir -p for plugin install path
- Add "fully quit and reopen Cursor" instruction
- Show Cloud as Option A, local as Option B, daemon as Option C
- Match the setup flow documented in the cookbook and blog

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add hindsight_cursor package with CLI `init` and `uninstall` commands
- Add pyproject.toml for PyPI publishing via existing release pipeline
- Update README install path: `pip install hindsight-cursor && hindsight-cursor init`
- Fix rule/skill files to describe plugin behavior instead of MCP tools
- Add diagnostics on get_api_url failure paths in both hooks
- Remove missing assets/avatar.png reference from plugin manifest
- Add Cloud token retrieval guidance (Settings > API Keys)
- Add test_cli.py with 8 tests for init/uninstall commands

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set daemonIdleTimeout default to 300s (was 0/infinite with no cleanup hook)
- Fix retainEveryNTurns fallback from 1 to 10 in retain.py
- Fix DEFAULTS: hindsightApiUrl="" and bankId="cursor" to match settings.json
- Document all config settings in README (was missing ~15 entries)
- Fix pytest version discrepancy in pyproject.toml
- Fix plugin.json author to "Vectorize" for consistency

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restructure Quick Start around Cloud vs Local as two clear paths
- Use hindsight-cursor init --api-url/--api-token for one-command setup
- Add Docker run command for users without a local Hindsight server
- Remove separate "configure" step that contradicted init behavior

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant